@zenpatient-org/healthspan-marketing-ui 0.2.21 → 0.2.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ComplexImageCarousel/useComplexImageCarousel.d.ts +6 -6
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/WistiaEmbed/WistiaEmbed.cjs.js +1 -0
- package/dist/components/WistiaEmbed/WistiaEmbed.d.ts +5 -0
- package/dist/components/WistiaEmbed/WistiaEmbed.es.js +8 -0
- package/dist/components/WistiaEmbed/wistiaEmbed.module.css +6 -0
- package/dist/components/YouTubeEmbed/YouTubeEmbed.cjs.js +1 -0
- package/dist/components/YouTubeEmbed/YouTubeEmbed.d.ts +6 -0
- package/dist/components/YouTubeEmbed/YouTubeEmbed.es.js +16 -0
- package/dist/components/YouTubeEmbed/youtubeEmbed.module.css +15 -0
- package/dist/modules/ContentHighlight/ContentHighlight.cjs.js +1 -1
- package/dist/modules/ContentHighlight/ContentHighlight.d.ts +5 -3
- package/dist/modules/ContentHighlight/ContentHighlight.es.js +39 -33
- package/dist/modules/ContentHighlight/contentHighlight.module.css +15 -2
- package/dist/node_modules/@wistia/wistia-player-react/dist/mjs/WistiaPlayer.cjs.js +1 -0
- package/dist/node_modules/@wistia/wistia-player-react/dist/mjs/WistiaPlayer.es.js +30 -0
- package/dist/node_modules/@wistia/wistia-player-react/dist/mjs/WistiaPlayerWrapper-KYHM7EWK.cjs.js +1 -0
- package/dist/node_modules/@wistia/wistia-player-react/dist/mjs/WistiaPlayerWrapper-KYHM7EWK.es.js +64 -0
- package/dist/node_modules/@wistia/wistia-player-react/dist/mjs/chunk-FSLSW5KG.cjs.js +21 -0
- package/dist/node_modules/@wistia/wistia-player-react/dist/mjs/chunk-FSLSW5KG.es.js +59 -0
- package/dist/node_modules/@wistia/wistia-player-react/dist/mjs/wistia-player-PKAEVX5L.cjs.js +52 -0
- package/dist/node_modules/@wistia/wistia-player-react/dist/mjs/wistia-player-PKAEVX5L.es.js +10285 -0
- package/package.json +6 -5
|
@@ -4,12 +4,12 @@ export declare const useComplexImageCarousel: ({ images }: {
|
|
|
4
4
|
images: TAdvancedImageView[];
|
|
5
5
|
}) => {
|
|
6
6
|
MOBILE_BREAKPOINT: number;
|
|
7
|
-
containerRef:
|
|
8
|
-
carouselRef:
|
|
9
|
-
imageRefs:
|
|
10
|
-
descriptionRef:
|
|
11
|
-
descriptionItemRef:
|
|
12
|
-
progressButtonContainerRef:
|
|
7
|
+
containerRef: React.RefObject<HTMLDivElement>;
|
|
8
|
+
carouselRef: React.RefObject<HTMLDivElement>;
|
|
9
|
+
imageRefs: React.MutableRefObject<HTMLDivElement[]>;
|
|
10
|
+
descriptionRef: React.RefObject<HTMLDivElement>;
|
|
11
|
+
descriptionItemRef: React.RefObject<HTMLDivElement>;
|
|
12
|
+
progressButtonContainerRef: React.RefObject<HTMLDivElement>;
|
|
13
13
|
visible: TAdvancedImageView[];
|
|
14
14
|
cardSizes: string[];
|
|
15
15
|
handleCustomPrevClick: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("../../src/components/WistiaEmbed/wistiaEmbed.module.css"),r=require("../../node_modules/@wistia/wistia-player-react/dist/mjs/WistiaPlayer.cjs.js"),n=require("../../utils/cn/cn.cjs.js"),c=({videoId:i,className:t})=>e.jsx("div",{className:n.cn(s.container,t),children:e.jsx(r.WistiaPlayer,{mediaId:i})});exports.WistiaEmbed=c;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import o from "../../components/WistiaEmbed/wistiaEmbed.module.css";
|
|
3
|
+
import { WistiaPlayer as t } from "../../node_modules/@wistia/wistia-player-react/dist/mjs/WistiaPlayer.es.js";
|
|
4
|
+
import { cn as e } from "../../utils/cn/cn.es.js";
|
|
5
|
+
const d = ({ videoId: i, className: m }) => /* @__PURE__ */ r("div", { className: e(o.container, m), children: /* @__PURE__ */ r(t, { mediaId: i }) });
|
|
6
|
+
export {
|
|
7
|
+
d as WistiaEmbed
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../../src/components/YouTubeEmbed/youtubeEmbed.module.css"),s=require("../../utils/cn/cn.cjs.js"),u=({videoId:r,title:c,className:o})=>e.jsx("div",{className:s.cn(t.container,o),children:e.jsx("iframe",{src:`https://www.youtube.com/embed/${r}`,title:c||"Healthspan video",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:t.iframe})});exports.YouTubeEmbed=u;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import r from "../../components/YouTubeEmbed/youtubeEmbed.module.css";
|
|
3
|
+
import { cn as c } from "../../utils/cn/cn.es.js";
|
|
4
|
+
const s = ({ videoId: t, title: o, className: a }) => /* @__PURE__ */ e("div", { className: c(r.container, a), children: /* @__PURE__ */ e(
|
|
5
|
+
"iframe",
|
|
6
|
+
{
|
|
7
|
+
src: `https://www.youtube.com/embed/${t}`,
|
|
8
|
+
title: o || "Healthspan video",
|
|
9
|
+
allow: "accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",
|
|
10
|
+
allowFullScreen: !0,
|
|
11
|
+
className: r.iframe
|
|
12
|
+
}
|
|
13
|
+
) });
|
|
14
|
+
export {
|
|
15
|
+
s as YouTubeEmbed
|
|
16
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),s=require("../../src/modules/ContentHighlight/contentHighlight.module.css"),d=require("../../components/YouTubeEmbed/YouTubeEmbed.cjs.js"),o=require("../../components/WistiaEmbed/WistiaEmbed.cjs.js"),n=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),a=require("../../components/Typography/Typography.cjs.js"),c=require("../../components/Button/Button.cjs.js"),m=({label:r,title:t,content:e})=>{const l=e.type==="youtube"||e.type==="wistia";return i.jsx("section",{className:s.root,children:i.jsxs("div",{className:s.container,children:[i.jsx("div",{className:s.topContainer,children:i.jsx(n.HighlightedTitle,{title:t,label:r,as:"div",defaultVariant:"displayMd",className:s.title})}),i.jsxs("div",{className:s.card,children:[l&&i.jsx("div",{className:s.videoContainer,children:e.type==="youtube"?i.jsx(d.YouTubeEmbed,{videoId:e.videoId||"",className:s.video}):i.jsx(o.WistiaEmbed,{videoId:e.videoId||"",className:s.video})}),e.image&&i.jsx("img",{src:e.image,alt:e.title,className:s.image}),i.jsxs("div",{className:s.content,children:[i.jsx(a.Typography,{defaultVariant:"headingLg",mobileVariant:"headingSm",className:s.contentTitle,children:e.title}),e.description&&i.jsx(a.Typography,{defaultVariant:"bodySm",mobileVariant:"bodySm",className:s.description,children:e.description}),e.buttonLabel&&e.link&&i.jsx("div",{className:s.button,children:i.jsx(c.Button,{as:"a",href:e.link,target:"_blank",rel:"noopener noreferrer",size:"sm",children:e.buttonLabel})})]})]})]})})};exports.ContentHighlight=m;
|
|
@@ -6,9 +6,11 @@ export type ContentHighlightProps = {
|
|
|
6
6
|
content: {
|
|
7
7
|
title: string;
|
|
8
8
|
description?: string;
|
|
9
|
-
image
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
image?: string;
|
|
10
|
+
type: 'image' | 'youtube' | 'wistia';
|
|
11
|
+
videoId?: string;
|
|
12
|
+
buttonLabel?: string;
|
|
13
|
+
link?: string;
|
|
12
14
|
};
|
|
13
15
|
};
|
|
14
16
|
export declare const ContentHighlight: ({ label, title, content }: ContentHighlightProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,36 +1,42 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
import { jsx as a, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import e from "../../modules/ContentHighlight/contentHighlight.module.css";
|
|
3
|
+
import { YouTubeEmbed as o } from "../../components/YouTubeEmbed/YouTubeEmbed.es.js";
|
|
4
|
+
import { WistiaEmbed as t } from "../../components/WistiaEmbed/WistiaEmbed.es.js";
|
|
5
|
+
import { HighlightedTitle as c } from "../../components/HighlightedTitle/HighlightedTitle.es.js";
|
|
6
|
+
import { Typography as s } from "../../components/Typography/Typography.es.js";
|
|
7
|
+
import { Button as p } from "../../components/Button/Button.es.js";
|
|
8
|
+
const f = ({ label: d, title: l, content: i }) => {
|
|
9
|
+
const m = i.type === "youtube" || i.type === "wistia";
|
|
10
|
+
return /* @__PURE__ */ a("section", { className: e.root, children: /* @__PURE__ */ r("div", { className: e.container, children: [
|
|
11
|
+
/* @__PURE__ */ a("div", { className: e.topContainer, children: /* @__PURE__ */ a(
|
|
12
|
+
c,
|
|
13
|
+
{
|
|
14
|
+
title: l,
|
|
15
|
+
label: d,
|
|
16
|
+
as: "div",
|
|
17
|
+
defaultVariant: "displayMd",
|
|
18
|
+
className: e.title
|
|
19
|
+
}
|
|
20
|
+
) }),
|
|
21
|
+
/* @__PURE__ */ r("div", { className: e.card, children: [
|
|
22
|
+
m && /* @__PURE__ */ a("div", { className: e.videoContainer, children: i.type === "youtube" ? /* @__PURE__ */ a(o, { videoId: i.videoId || "", className: e.video }) : /* @__PURE__ */ a(t, { videoId: i.videoId || "", className: e.video }) }),
|
|
23
|
+
i.image && /* @__PURE__ */ a("img", { src: i.image, alt: i.title, className: e.image }),
|
|
24
|
+
/* @__PURE__ */ r("div", { className: e.content, children: [
|
|
25
|
+
/* @__PURE__ */ a(
|
|
26
|
+
s,
|
|
27
|
+
{
|
|
28
|
+
defaultVariant: "headingLg",
|
|
29
|
+
mobileVariant: "headingSm",
|
|
30
|
+
className: e.contentTitle,
|
|
31
|
+
children: i.title
|
|
32
|
+
}
|
|
33
|
+
),
|
|
34
|
+
i.description && /* @__PURE__ */ a(s, { defaultVariant: "bodySm", mobileVariant: "bodySm", className: e.description, children: i.description }),
|
|
35
|
+
i.buttonLabel && i.link && /* @__PURE__ */ a("div", { className: e.button, children: /* @__PURE__ */ a(p, { as: "a", href: i.link, target: "_blank", rel: "noopener noreferrer", size: "sm", children: i.buttonLabel }) })
|
|
36
|
+
] })
|
|
31
37
|
] })
|
|
32
|
-
] })
|
|
33
|
-
|
|
38
|
+
] }) });
|
|
39
|
+
};
|
|
34
40
|
export {
|
|
35
|
-
|
|
41
|
+
f as ContentHighlight
|
|
36
42
|
};
|
|
@@ -50,6 +50,17 @@
|
|
|
50
50
|
max-width: none;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
.videoContainer {
|
|
54
|
+
width: 50%;
|
|
55
|
+
flex-shrink: 0;
|
|
56
|
+
max-width: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.video {
|
|
60
|
+
width: 100%;
|
|
61
|
+
aspect-ratio: 16/9;
|
|
62
|
+
}
|
|
63
|
+
|
|
53
64
|
.content {
|
|
54
65
|
display: flex;
|
|
55
66
|
width: 50%;
|
|
@@ -78,7 +89,8 @@
|
|
|
78
89
|
margin-right: 140px;
|
|
79
90
|
}
|
|
80
91
|
|
|
81
|
-
.image
|
|
92
|
+
.image,
|
|
93
|
+
.videoContainer {
|
|
82
94
|
max-width: 540px;
|
|
83
95
|
}
|
|
84
96
|
|
|
@@ -139,7 +151,8 @@
|
|
|
139
151
|
width: 100%;
|
|
140
152
|
}
|
|
141
153
|
|
|
142
|
-
.image
|
|
154
|
+
.image,
|
|
155
|
+
.videoContainer {
|
|
143
156
|
width: 100%;
|
|
144
157
|
}
|
|
145
158
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./chunk-FSLSW5KG.cjs.js"),s=require("react"),e=require("react/jsx-runtime");var S=s.lazy(async()=>Promise.resolve().then(()=>require("./WistiaPlayerWrapper-KYHM7EWK.cjs.js")).then(t=>({default:t.WistiaPlayerWrapper}))),p=s.forwardRef((t,c)=>{const{aspect:l,children:n,embedHost:a,mediaId:i,swatch:d,style:y}=t,o=r.getMergedEmbedOption(i,"embedHost",a!=null?a:void 0),u=r.isString(o)?o:"fast.wistia.com",h=l!==void 0,m=r.wistiaPlayerStyleBlock({mediaId:i,embedHost:u,aspect:l,shouldLoadSwatch:d});return e.jsx(s.Suspense,{fallback:h&&e.jsxs(s.Fragment,{children:[e.jsx("style",{children:m}),e.jsx("wistia-player",{"media-id":i,style:y,children:n})]}),children:e.jsx(S,{ref:c,...t})})});exports.WistiaPlayer=p;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { getMergedEmbedOption as y, wistiaPlayerStyleBlock as h, isString as f } from "./chunk-FSLSW5KG.es.js";
|
|
2
|
+
import { forwardRef as w, Suspense as b, lazy as g, Fragment as u } from "react";
|
|
3
|
+
import { jsx as t, jsxs as S } from "react/jsx-runtime";
|
|
4
|
+
var W = g(
|
|
5
|
+
async () => import("./WistiaPlayerWrapper-KYHM7EWK.es.js").then((e) => ({
|
|
6
|
+
default: e.WistiaPlayerWrapper
|
|
7
|
+
}))
|
|
8
|
+
), x = w(
|
|
9
|
+
(e, o) => {
|
|
10
|
+
const { aspect: r, children: l, embedHost: a, mediaId: i, swatch: d, style: c } = e, s = y(i, "embedHost", a != null ? a : void 0), n = f(s) ? s : "fast.wistia.com", m = r !== void 0, p = h({
|
|
11
|
+
mediaId: i,
|
|
12
|
+
embedHost: n,
|
|
13
|
+
aspect: r,
|
|
14
|
+
shouldLoadSwatch: d
|
|
15
|
+
});
|
|
16
|
+
return /* @__PURE__ */ t(
|
|
17
|
+
b,
|
|
18
|
+
{
|
|
19
|
+
fallback: m && /* @__PURE__ */ S(u, { children: [
|
|
20
|
+
/* @__PURE__ */ t("style", { children: p }),
|
|
21
|
+
/* @__PURE__ */ t("wistia-player", { "media-id": i, style: c, children: l })
|
|
22
|
+
] }),
|
|
23
|
+
children: /* @__PURE__ */ t(W, { ref: o, ...e })
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
export {
|
|
29
|
+
x as WistiaPlayer
|
|
30
|
+
};
|
package/dist/node_modules/@wistia/wistia-player-react/dist/mjs/WistiaPlayerWrapper-KYHM7EWK.cjs.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./chunk-FSLSW5KG.cjs.js"),n=require("react"),h=require("react/jsx-runtime");var L=l=>{const s={};return Object.entries(l).forEach(([d,a])=>{typeof a=="boolean"?s[d]=String(a):s[d]=a}),s},q=n.forwardRef((l,s)=>{const{aspect:d,children:a,className:w,embedHost:u,id:o,mediaId:c,roundedPlayer:E,swatch:p,style:P}=l,S=t.getMergedEmbedOption(c,"embedHost",u!=null?u:void 0),f=t.isString(S)?S:"fast.wistia.com",b=n.useRef(null),[m,v]=n.useState(d),[j,W]=n.useState(!1);n.useEffect(()=>{p!==!1&&m===void 0&&t.isString(f)&&t.getSwatchAspectRatio(c,f).then(e=>{v(e)}),Promise.resolve().then(()=>require("./wistia-player-PKAEVX5L.cjs.js")),customElements.whenDefined("wistia-player").then(()=>{W(!0)})},[]);const g={},y={};Object.entries(l).forEach(([e,i])=>{if(e.startsWith("on")&&e[2]===e[2].toUpperCase()){const r=t.camelCaseToKebabCase(e).slice(3);t.isFunction(i)&&(g[r]=i)}else t.isValidEmbedOption(i)&&(y[t.camelCaseToKebabCase(e)]=i)}),Object.entries(g).forEach(([e,i])=>{n.useEffect(()=>{const r=b.current;return r==null||r.addEventListener(e,i),()=>{r==null||r.removeEventListener(e,i)}},[i,j])});const O=m!==void 0,C=t.wistiaPlayerStyleBlock({mediaId:c,embedHost:f,aspect:m,shouldLoadSwatch:p,roundedPlayer:E});return h.jsxs(n.Fragment,{children:[O&&h.jsx("style",{dangerouslySetInnerHTML:{__html:C}}),h.jsx("wistia-player",{ref:e=>{b.current=e,typeof s=="function"?s(e):s!==null&&(s.current=e)},id:o!=null?o:void 0,"media-id":c,class:w,style:P,react:String(!0),...L(y),children:a},o!=null?o:c)]})});exports.WistiaPlayerWrapper=q;
|
package/dist/node_modules/@wistia/wistia-player-react/dist/mjs/WistiaPlayerWrapper-KYHM7EWK.es.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { getMergedEmbedOption as x, isString as E, getSwatchAspectRatio as A, camelCaseToKebabCase as b, isValidEmbedOption as B, wistiaPlayerStyleBlock as C, isFunction as I } from "./chunk-FSLSW5KG.es.js";
|
|
3
|
+
import { forwardRef as F, useRef as K, useState as g, useEffect as y, Fragment as M } from "react";
|
|
4
|
+
import { jsxs as R, jsx as S } from "react/jsx-runtime";
|
|
5
|
+
var T = (a) => {
|
|
6
|
+
const e = {};
|
|
7
|
+
return Object.entries(a).forEach(([c, r]) => {
|
|
8
|
+
typeof r == "boolean" ? e[c] = String(r) : e[c] = r;
|
|
9
|
+
}), e;
|
|
10
|
+
}, V = F(
|
|
11
|
+
(a, e) => {
|
|
12
|
+
const { aspect: c, children: r, className: v, embedHost: d, id: o, mediaId: n, roundedPlayer: P, swatch: m, style: O } = a, p = x(n, "embedHost", d != null ? d : void 0), l = E(p) ? p : "fast.wistia.com", h = K(null), [f, j] = g(c), [W, D] = g(!1);
|
|
13
|
+
y(() => {
|
|
14
|
+
m !== !1 && f === void 0 && E(l) && A(n, l).then((t) => {
|
|
15
|
+
j(t);
|
|
16
|
+
}), import("./wistia-player-PKAEVX5L.es.js"), customElements.whenDefined("wistia-player").then(() => {
|
|
17
|
+
D(!0);
|
|
18
|
+
});
|
|
19
|
+
}, []);
|
|
20
|
+
const u = {}, w = {};
|
|
21
|
+
Object.entries(a).forEach(([t, s]) => {
|
|
22
|
+
if (t.startsWith("on") && t[2] === t[2].toUpperCase()) {
|
|
23
|
+
const i = b(t).slice(3);
|
|
24
|
+
I(s) && (u[i] = s);
|
|
25
|
+
} else B(s) && (w[b(t)] = s);
|
|
26
|
+
}), Object.entries(u).forEach(([t, s]) => {
|
|
27
|
+
y(() => {
|
|
28
|
+
const i = h.current;
|
|
29
|
+
return i == null || i.addEventListener(t, s), () => {
|
|
30
|
+
i == null || i.removeEventListener(t, s);
|
|
31
|
+
};
|
|
32
|
+
}, [s, W]);
|
|
33
|
+
});
|
|
34
|
+
const H = f !== void 0, L = C({
|
|
35
|
+
mediaId: n,
|
|
36
|
+
embedHost: l,
|
|
37
|
+
aspect: f,
|
|
38
|
+
shouldLoadSwatch: m,
|
|
39
|
+
roundedPlayer: P
|
|
40
|
+
});
|
|
41
|
+
return /* @__PURE__ */ R(M, { children: [
|
|
42
|
+
H && /* @__PURE__ */ S("style", { dangerouslySetInnerHTML: { __html: L } }),
|
|
43
|
+
/* @__PURE__ */ S(
|
|
44
|
+
"wistia-player",
|
|
45
|
+
{
|
|
46
|
+
ref: (t) => {
|
|
47
|
+
h.current = t, typeof e == "function" ? e(t) : e !== null && (e.current = t);
|
|
48
|
+
},
|
|
49
|
+
id: o != null ? o : void 0,
|
|
50
|
+
"media-id": n,
|
|
51
|
+
class: v,
|
|
52
|
+
style: O,
|
|
53
|
+
react: String(!0),
|
|
54
|
+
...T(w),
|
|
55
|
+
children: r
|
|
56
|
+
},
|
|
57
|
+
o != null ? o : n
|
|
58
|
+
)
|
|
59
|
+
] });
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
export {
|
|
63
|
+
V as WistiaPlayerWrapper
|
|
64
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var b=i=>i===null,u=i=>i===void 0,g=i=>b(i)||u(i),r=i=>!g(i),d=i=>typeof i=="string",f=i=>typeof i=="number",O=i=>r(i)&&typeof i=="function",m=i=>r(i)&&typeof i=="boolean",l=i=>f(i)||d(i)||m(i),v=(i,t,e)=>{var n,s;let a=e;return typeof window=="undefined"||(r((n=window.wistiaOptions)==null?void 0:n._all)&&r(window.wistiaOptions._all[t])&&l(window.wistiaOptions._all[t])&&(a=window.wistiaOptions._all[t]),r((s=window.wistiaOptions)==null?void 0:s[i])&&r(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,e)=>(e!==0?"-":"")+t.toLowerCase()),$=async i=>{const t=new Image;return t.src=i,await t.decode(),t},p=(i,t)=>`https://${t}/embed/medias/${i}/swatch`,y=async(i,t="fast.wistia.com")=>{const e=await $(p(i,t)),{naturalHeight:a,naturalWidth:n}=e;return n/a},S=({mediaId:i,embedHost:t="fast.wistia.com",aspect:e=1.7,shouldLoadSwatch:a=!0,roundedPlayer:n=0})=>{const s={background:a?`center / contain no-repeat url(${p(i,t)})`:void 0,borderRadius:`${n}px`,display:"block",filter:"blur(5px)",paddingTop:`${100/e}%`};return`
|
|
2
|
+
wistia-player[media-id='${i}']:not(:defined) {
|
|
3
|
+
${Object.entries(s).map(([o,w])=>`${c(o)}: ${w};`).join(`\r
|
|
4
|
+
`)}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
wistia-player[media-id='${i}']:state(--initializing) {
|
|
8
|
+
${Object.entries(s).map(([o,w])=>`${c(o)}: ${w};`).join(`\r
|
|
9
|
+
`)}
|
|
10
|
+
}
|
|
11
|
+
`};/*! Bundled license information:
|
|
12
|
+
|
|
13
|
+
@wistia/type-guards/dist/index.mjs:
|
|
14
|
+
(*
|
|
15
|
+
* @license @wistia/type-guards v0.9.1
|
|
16
|
+
*
|
|
17
|
+
* Copyright (c) 2023-2025, Wistia, Inc. and its affiliates.
|
|
18
|
+
*
|
|
19
|
+
* This source code is unlicensed, all rights reserved.
|
|
20
|
+
*)
|
|
21
|
+
*/exports.camelCaseToKebabCase=c;exports.getMergedEmbedOption=v;exports.getSwatchAspectRatio=y;exports.isFunction=O;exports.isString=d;exports.isValidEmbedOption=l;exports.wistiaPlayerStyleBlock=S;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
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) => {
|
|
2
|
+
var r, s;
|
|
3
|
+
let a = n;
|
|
4
|
+
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;
|
|
5
|
+
}, c = (i) => i.replace(
|
|
6
|
+
/[A-Z]+(?![a-z])|[A-Z]/g,
|
|
7
|
+
(t, n) => (n !== 0 ? "-" : "") + t.toLowerCase()
|
|
8
|
+
), $ = async (i) => {
|
|
9
|
+
const t = new Image();
|
|
10
|
+
return t.src = i, await t.decode(), t;
|
|
11
|
+
}, d = (i, t) => `https://${t}/embed/medias/${i}/swatch`, h = async (i, t = "fast.wistia.com") => {
|
|
12
|
+
const n = await $(d(i, t)), { naturalHeight: a, naturalWidth: r } = n;
|
|
13
|
+
return r / a;
|
|
14
|
+
}, y = ({
|
|
15
|
+
mediaId: i,
|
|
16
|
+
embedHost: t = "fast.wistia.com",
|
|
17
|
+
aspect: n = 1.7,
|
|
18
|
+
shouldLoadSwatch: a = !0,
|
|
19
|
+
roundedPlayer: r = 0
|
|
20
|
+
}) => {
|
|
21
|
+
const s = {
|
|
22
|
+
background: a ? `center / contain no-repeat url(${d(i, t)})` : void 0,
|
|
23
|
+
borderRadius: `${r}px`,
|
|
24
|
+
display: "block",
|
|
25
|
+
filter: "blur(5px)",
|
|
26
|
+
paddingTop: `${100 / n}%`
|
|
27
|
+
};
|
|
28
|
+
return `
|
|
29
|
+
wistia-player[media-id='${i}']:not(:defined) {
|
|
30
|
+
${Object.entries(s).map(([o, w]) => `${c(o)}: ${w};`).join(`\r
|
|
31
|
+
`)}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
wistia-player[media-id='${i}']:state(--initializing) {
|
|
35
|
+
${Object.entries(s).map(([o, w]) => `${c(o)}: ${w};`).join(`\r
|
|
36
|
+
`)}
|
|
37
|
+
}
|
|
38
|
+
`;
|
|
39
|
+
};
|
|
40
|
+
/*! Bundled license information:
|
|
41
|
+
|
|
42
|
+
@wistia/type-guards/dist/index.mjs:
|
|
43
|
+
(*
|
|
44
|
+
* @license @wistia/type-guards v0.9.1
|
|
45
|
+
*
|
|
46
|
+
* Copyright (c) 2023-2025, Wistia, Inc. and its affiliates.
|
|
47
|
+
*
|
|
48
|
+
* This source code is unlicensed, all rights reserved.
|
|
49
|
+
*)
|
|
50
|
+
*/
|
|
51
|
+
export {
|
|
52
|
+
c as camelCaseToKebabCase,
|
|
53
|
+
m as getMergedEmbedOption,
|
|
54
|
+
h as getSwatchAspectRatio,
|
|
55
|
+
v as isFunction,
|
|
56
|
+
b as isString,
|
|
57
|
+
l as isValidEmbedOption,
|
|
58
|
+
y as wistiaPlayerStyleBlock
|
|
59
|
+
};
|