var p = (i) => i === null, f = (i) => i === void 0, u = (i) => p(i) || f(i), e = (i) => !u(i), b = (i) => typeof i == "string", g = (i) => typeof i == "number", v = (i) => e(i) && typeof i == "function", O = (i) => e(i) && typeof i == "boolean", l = (i) => g(i) || b(i) || O(i), m = (i, t, n) => {
  var r, s;
  let a = n;
  return typeof window == "undefined" || (e((r = window.wistiaOptions) == null ? void 0 : r._all) && e(window.wistiaOptions._all[t]) && l(window.wistiaOptions._all[t]) && (a = window.wistiaOptions._all[t]), e((s = window.wistiaOptions) == null ? void 0 : s[i]) && e(window.wistiaOptions[i]) && l(window.wistiaOptions[i][t]) && (a = window.wistiaOptions[i][t])), a;
}, c = (i) => i.replace(
  /[A-Z]+(?![a-z])|[A-Z]/g,
  (t, n) => (n !== 0 ? "-" : "") + t.toLowerCase()
), $ = async (i) => {
  const t = new Image();
  return t.src = i, await t.decode(), t;
}, d = (i, t) => `https://${t}/embed/medias/${i}/swatch`, h = async (i, t = "fast.wistia.com") => {
  const n = await $(d(i, t)), { naturalHeight: a, naturalWidth: r } = n;
  return r / a;
}, y = ({
  mediaId: i,
  embedHost: t = "fast.wistia.com",
  aspect: n = 1.7,
  shouldLoadSwatch: a = !0,
  roundedPlayer: r = 0
}) => {
  const s = {
    background: a ? `center / contain no-repeat url(${d(i, t)})` : void 0,
    borderRadius: `${r}px`,
    display: "block",
    filter: "blur(5px)",
    paddingTop: `${100 / n}%`
  };
  return `
    wistia-player[media-id='${i}']:not(:defined) {
      ${Object.entries(s).map(([o, w]) => `${c(o)}: ${w};`).join(`\r
`)}
    }

    wistia-player[media-id='${i}']:state(--initializing) {
      ${Object.entries(s).map(([o, w]) => `${c(o)}: ${w};`).join(`\r
`)}
    }
  `;
};
/*! Bundled license information:

@wistia/type-guards/dist/index.mjs:
  (*
   * @license @wistia/type-guards v0.9.1
   *
   * Copyright (c) 2023-2025, Wistia, Inc. and its affiliates.
   *
   * This source code is unlicensed, all rights reserved.
   *)
*/
export {
  c as camelCaseToKebabCase,
  m as getMergedEmbedOption,
  h as getSwatchAspectRatio,
  v as isFunction,
  b as isString,
  l as isValidEmbedOption,
  y as wistiaPlayerStyleBlock
};
