@storyblok/astro 7.3.7 → 7.3.9
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/storyblok-astro.es.js +187 -192
- package/dist/storyblok-astro.umd.js +4 -4
- package/package.json +2 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const
|
|
1
|
+
const ge = `
|
|
2
2
|
<svg class="logo-storyblok logo-storyblok--dark" role="img" aria-label="Storyblok Official Logo" viewBox="0 0 19 22" xmlns="http://www.w3.org/2000/svg">
|
|
3
3
|
<path d="M29.0287 14.9132C28.2686 14.9132 27.5302 14.8018 26.7918 14.5568C26.0988 14.3265 25.462 13.9468 24.924 13.4432L25.9013 11.7504C26.4443 12.1291 26.9655 12.4186 27.4867 12.6414C27.9862 12.8641 28.4858 12.9532 28.9636 12.9532C29.3111 12.9532 29.5934 12.8864 29.7888 12.7527C29.9843 12.6414 30.0712 12.4409 30.0712 12.1959C30.0712 11.9732 29.9626 11.7504 29.702 11.6168C29.2938 11.4162 28.8636 11.2666 28.4206 11.1714L26.9003 10.6591C26.4877 10.4809 26.1619 10.3027 25.9013 10.1023C25.6407 9.92408 25.4452 9.67908 25.3366 9.43408C25.2184 9.1529 25.1592 8.84935 25.1629 8.54317C25.1502 7.66646 25.5255 6.83107 26.1836 6.27136C26.4877 6.00408 26.8786 5.80363 27.313 5.64772C27.7473 5.49181 28.2251 5.42499 28.7247 5.42499C29.3979 5.42499 30.0277 5.51408 30.6141 5.69226C31.2005 5.89272 31.7652 6.22681 32.3081 6.71681L31.244 8.38726C30.8236 8.07881 30.3722 7.81747 29.8974 7.60772C29.4848 7.42954 29.1156 7.36272 28.7247 7.36272C28.4423 7.36272 28.1817 7.40726 27.9862 7.5409C27.7691 7.65226 27.6822 7.85272 27.6822 8.11999C27.6822 8.38726 27.7908 8.56545 28.008 8.69908C28.2251 8.83272 28.6595 8.96635 29.2459 9.12226C29.7903 9.26289 30.3268 9.4339 30.853 9.63454C31.2874 9.81272 31.6349 10.0132 31.9172 10.2136C32.4511 10.6169 32.7463 11.2726 32.6991 11.9509C32.6991 12.8641 32.3733 13.5768 31.7 14.1114C31.0485 14.6459 30.1798 14.9132 29.0287 14.9132ZM39.7792 14.2673C39.41 14.4232 38.9756 14.5791 38.4978 14.7127C38.02 14.8464 37.5422 14.9354 37.0427 14.9354C36.6952 14.9354 36.3911 14.8909 36.0871 14.8018C35.7915 14.7134 35.5176 14.5616 35.2835 14.3564C35.0663 14.1782 34.8926 13.9109 34.7623 13.6214C34.632 13.3095 34.5451 12.9309 34.5451 12.4854V7.69681H33.4158V5.60317H34.5668V2.68545H37.2599V5.5809H39.0842V7.69681H37.2599V11.5277C37.2599 11.8173 37.325 12.04 37.4771 12.1959C37.6291 12.3073 37.8245 12.3741 38.0417 12.3741C38.2589 12.3741 38.4761 12.3518 38.6715 12.2627C38.8887 12.1959 39.0842 12.1291 39.2362 12.04L39.7575 14.2673H39.7792ZM44.8612 14.9132C44.1701 14.9255 43.4835 14.7968 42.8414 14.5345C41.7112 14.076 40.8261 13.1439 40.409 11.9732C39.9823 10.8102 39.9823 9.52792 40.409 8.36499C40.8261 7.19423 41.7112 6.26214 42.8414 5.80363C43.4278 5.55863 44.1011 5.42499 44.8612 5.42499C46.1833 5.36117 47.4671 5.88947 48.3795 6.87272C48.7922 7.2959 49.0962 7.80817 49.3134 8.36499C49.758 9.5322 49.758 10.8282 49.3134 11.9954C48.8937 13.1518 48.0186 14.0734 46.9027 14.5345C46.2538 14.7998 45.5596 14.9285 44.8612 14.9132ZM42.9066 10.1914C42.9066 10.9041 43.0803 11.4832 43.4495 11.9064C43.8405 12.3518 44.3183 12.5745 44.8829 12.5745C45.4284 12.5853 45.9487 12.3391 46.2946 11.9064C46.4683 11.6836 46.5987 11.4609 46.7072 11.1491C46.8158 10.8595 46.8593 10.5254 46.8593 10.1914C46.8593 9.45636 46.6638 8.87726 46.2946 8.45408C45.9254 8.00863 45.4476 7.78589 44.8829 7.78589C44.3394 7.78464 43.8229 8.02909 43.4712 8.45408C43.2975 8.67681 43.1455 8.89954 43.0369 9.21136C42.939 9.52794 42.8949 9.85944 42.9066 10.1914ZM56.6541 7.98636C56.0026 7.98636 55.3945 8.09772 54.8515 8.32045C54.3736 8.48572 53.9666 8.81646 53.7005 9.2559V14.7573H50.9857V5.60317H53.4833V7.42954C53.7873 6.8059 54.1783 6.3159 54.6778 5.98181C55.1556 5.62545 55.6551 5.44726 56.1981 5.42499H56.4804L56.6541 5.44726V7.96408V7.98636ZM57.8486 16.1159C58.2263 16.2505 58.6217 16.3256 59.0214 16.3386C59.3472 16.3386 59.6078 16.2273 59.8033 16.0045C59.977 15.7818 60.129 15.3364 60.2811 14.7573L56.893 5.60317H59.6947L61.7579 12.3518L63.5605 5.60317H66.1015L62.6918 16.2273C62.1569 18.0318 60.3638 19.1157 58.5653 18.7218C58.3481 18.6773 58.0875 18.6104 57.8486 18.4991V16.1159ZM72.5301 14.9133C71.8568 14.9133 71.2487 14.7795 70.7492 14.4677C70.2417 14.1818 69.8208 13.758 69.533 13.2427V14.7573H67.1657V2.01727H69.9022V7.09545C70.4962 6.02938 71.6157 5.38681 72.8124 5.42499C73.3771 5.42499 73.8983 5.53636 74.3761 5.80363C74.8539 6.02636 75.2448 6.38272 75.614 6.8059C76.6831 8.32739 76.974 10.2831 76.3959 12.0623C76.1787 12.6414 75.8746 13.1536 75.5054 13.5768C74.7429 14.4342 73.6616 14.9198 72.5301 14.9133ZM71.7699 12.5745C72.6515 12.5764 73.4369 12.0037 73.7245 11.1491C74.043 10.2518 73.887 9.24956 73.3119 8.49863C72.9724 8.0401 72.4398 7.7753 71.8785 7.7859C71.4659 7.7859 71.0749 7.94181 70.7057 8.23136C70.3582 8.54317 70.0759 8.92181 69.8805 9.38954V11.305C70.2309 12.0628 70.9738 12.5476 71.7916 12.5523L71.7699 12.5745ZM78.0247 2.01727H80.7395V11.4832C80.7395 12.1959 81.0218 12.53 81.6082 12.53C81.9183 12.5309 82.2239 12.4545 82.4987 12.3073L82.8679 14.3786C82.1072 14.7203 81.2875 14.902 80.4572 14.9132C79.6753 14.9132 79.0672 14.6904 78.6546 14.2895C78.2202 13.8441 78.003 13.265 78.003 12.4632V2.01727H78.0247ZM87.9933 14.9132C87.3023 14.9255 86.6157 14.7968 85.9736 14.5345C84.8367 14.0789 83.9437 13.1469 83.5194 11.9732C82.8914 10.2226 83.2408 8.26037 84.4316 6.85045C84.8659 6.40499 85.3437 6.0709 85.9518 5.80363C86.5382 5.55863 87.2115 5.42499 87.9716 5.42499C89.2937 5.36117 90.5776 5.88947 91.49 6.87272C91.9243 7.2959 92.2066 7.80817 92.4238 8.36499C93.0767 10.1133 92.7249 12.0889 91.5117 13.4877C91.099 13.9332 90.5995 14.2895 89.9914 14.5345C89.3493 14.7968 88.6627 14.9255 87.9716 14.9132H87.9933ZM86.017 10.1914C86.017 10.9041 86.1907 11.4832 86.5599 11.9064C86.9509 12.3518 87.4287 12.5745 87.9933 12.5745C88.5382 12.5821 89.0571 12.3364 89.405 11.9064C89.5788 11.6836 89.7091 11.4609 89.8177 11.1491C89.9262 10.8595 89.9697 10.5254 89.9697 10.1914C89.9697 9.45636 89.7742 8.87726 89.405 8.45408C89.0358 8.00863 88.558 7.78589 87.9933 7.78589C87.4498 7.78464 86.9334 8.02909 86.5817 8.45408C86.4079 8.67681 86.2559 8.89954 86.1473 9.21136C86.0387 9.52317 86.017 9.83499 86.017 10.1914ZM100.112 14.7573L97.7882 11.06L96.8326 12.0845V14.7573H94.1178V2.01727H96.8326V9.38954L99.8514 5.60317H102.74L99.5256 9.54545L103.001 14.7573H100.112Z" fill="currentColor"></path>
|
|
4
4
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 1.71089C0 0.76599 0.76599 0 1.71089 0H17.1089C18.0538 0 18.8198 0.76599 18.8198 1.71089V17.1089C18.8198 18.0538 18.0538 18.8198 17.1089 18.8198H7.13145L4.57616 20.9297C4.24445 21.2036 3.74366 20.9676 3.74366 20.5375V18.8198H1.71089C0.76599 18.8198 0 18.0538 0 17.1089V1.71089ZM3.74233 3.10946H11.9675C13.7438 3.10946 15.1839 4.5495 15.1839 6.32587C15.1839 7.74936 14.2592 8.95687 12.9777 9.38045C14.4761 9.65447 15.6117 10.9667 15.6117 12.5443C15.6117 14.3207 14.1717 15.7607 12.3953 15.7607H3.74247V9.54229H3.74233V3.10946ZM10.583 6.00384H6.73607V7.93369H10.583C11.1159 7.93369 11.5479 7.50168 11.5479 6.96877C11.5479 6.43585 11.1159 6.00384 10.583 6.00384ZM6.73607 10.2925H10.9035C11.4956 10.2925 11.9757 10.7725 11.9757 11.3647C11.9757 11.9568 11.4956 12.4368 10.9035 12.4368H6.73607V10.2925Z" fill="currentColor"></path>
|
|
5
5
|
</svg>
|
|
6
6
|
`;
|
|
7
|
-
function
|
|
7
|
+
function be(e, t, s) {
|
|
8
8
|
const r = "virtual:storyblok-init", o = `\0${r}`;
|
|
9
9
|
return {
|
|
10
10
|
name: "vite-plugin-storyblok-init",
|
|
@@ -26,7 +26,7 @@ function Ce(e, t, s) {
|
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function Ce(e) {
|
|
30
30
|
const t = "virtual:storyblok-options", s = `\0${t}`;
|
|
31
31
|
return {
|
|
32
32
|
name: "vite-plugin-storyblok-options",
|
|
@@ -40,33 +40,33 @@ function ve(e) {
|
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function ht() {
|
|
44
44
|
if (!(globalThis != null && globalThis.storyblokApiInstance))
|
|
45
45
|
throw new Error("storyblokApiInstance has not been initialized correctly");
|
|
46
46
|
return globalThis.storyblokApiInstance;
|
|
47
47
|
}
|
|
48
|
-
async function
|
|
48
|
+
async function dt(e) {
|
|
49
49
|
let t = null;
|
|
50
50
|
return e && e.locals._storyblok_preview_data && (t = e.locals._storyblok_preview_data), t;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function ve(e) {
|
|
53
53
|
return typeof e == "object" ? `const storyblokInstance = new StoryblokBridge(${JSON.stringify(e)});` : "const storyblokInstance = new StoryblokBridge();";
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function ke(e) {
|
|
56
56
|
return e.endsWith(".astro") ? e : `${e}.astro`;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function B(e) {
|
|
59
59
|
return `/${e.trim().replace(/^\/+/, "").replace(/\/+$/, "").replace(/\/{2,}/g, "/")}`;
|
|
60
60
|
}
|
|
61
|
-
const
|
|
61
|
+
const we = /[\p{Lu}]/u, Le = /[\p{Ll}]/u, W = /^[\p{Lu}](?![\p{Lu}])/gu, ie = /([\p{Alpha}\p{N}_]|$)/u, F = /[_.\- ]+/, Ae = new RegExp("^" + F.source), Y = new RegExp(F.source + ie.source, "gu"), K = new RegExp("\\d+" + ie.source, "gu"), Ee = (e, t, s, r) => {
|
|
62
62
|
let o = !1, n = !1, a = !1, l = !1;
|
|
63
63
|
for (let c = 0; c < e.length; c++) {
|
|
64
64
|
const u = e[c];
|
|
65
|
-
l = c > 2 ? e[c - 3] === "-" : !0, o &&
|
|
65
|
+
l = c > 2 ? e[c - 3] === "-" : !0, o && we.test(u) ? (e = e.slice(0, c) + "-" + e.slice(c), o = !1, a = n, n = !0, c++) : n && a && Le.test(u) && (!l || r) ? (e = e.slice(0, c - 1) + "-" + e.slice(c - 1), a = n, n = !1, o = !0) : (o = t(u) === u && s(u) !== u, a = n, n = s(u) === u && t(u) !== u);
|
|
66
66
|
}
|
|
67
67
|
return e;
|
|
68
|
-
},
|
|
69
|
-
function
|
|
68
|
+
}, Re = (e, t) => (W.lastIndex = 0, e.replaceAll(W, (s) => t(s))), _e = (e, t) => (Y.lastIndex = 0, K.lastIndex = 0, e.replaceAll(K, (s, r, o) => ["_", "-"].includes(e.charAt(o + s.length)) ? s : t(s)).replaceAll(Y, (s, r) => t(r)));
|
|
69
|
+
function Te(e, t) {
|
|
70
70
|
if (!(typeof e == "string" || Array.isArray(e)))
|
|
71
71
|
throw new TypeError("Expected the input to be `string | string[]`");
|
|
72
72
|
if (t = {
|
|
@@ -76,12 +76,12 @@ function $e(e, t) {
|
|
|
76
76
|
}, Array.isArray(e) ? e = e.map((n) => n.trim()).filter((n) => n.length).join("-") : e = e.trim(), e.length === 0)
|
|
77
77
|
return "";
|
|
78
78
|
const s = t.locale === !1 ? (n) => n.toLowerCase() : (n) => n.toLocaleLowerCase(t.locale), r = t.locale === !1 ? (n) => n.toUpperCase() : (n) => n.toLocaleUpperCase(t.locale);
|
|
79
|
-
return e.length === 1 ?
|
|
79
|
+
return e.length === 1 ? F.test(e) ? "" : t.pascalCase ? r(e) : s(e) : (e !== s(e) && (e = Ee(e, s, r, t.preserveConsecutiveUppercase)), e = e.replace(Ae, ""), e = t.preserveConsecutiveUppercase ? Re(e, s) : s(e), t.pascalCase && (e = r(e.charAt(0)) + e.slice(1)), _e(e, r));
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
return
|
|
81
|
+
function $e(e) {
|
|
82
|
+
return Te(e);
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function Ie(e, t, s, r) {
|
|
85
85
|
const o = "virtual:import-storyblok-components", n = `\0${o}`;
|
|
86
86
|
return {
|
|
87
87
|
name: "vite-plugin-import-storyblok-components",
|
|
@@ -98,18 +98,18 @@ function Se(e, t, s, r) {
|
|
|
98
98
|
async load(a) {
|
|
99
99
|
if (a !== n)
|
|
100
100
|
return;
|
|
101
|
-
const l = await
|
|
101
|
+
const l = await Oe(
|
|
102
102
|
this,
|
|
103
103
|
t,
|
|
104
104
|
s,
|
|
105
105
|
r
|
|
106
|
-
), c = await
|
|
106
|
+
), c = await xe(
|
|
107
107
|
this,
|
|
108
108
|
e,
|
|
109
109
|
t,
|
|
110
110
|
s
|
|
111
111
|
);
|
|
112
|
-
return
|
|
112
|
+
return Se(
|
|
113
113
|
t,
|
|
114
114
|
l,
|
|
115
115
|
c
|
|
@@ -117,8 +117,8 @@ function Se(e, t, s, r) {
|
|
|
117
117
|
}
|
|
118
118
|
};
|
|
119
119
|
}
|
|
120
|
-
function
|
|
121
|
-
const o = `${
|
|
120
|
+
function Se(e, t, s) {
|
|
121
|
+
const o = `${B(e)}/storyblok/**/*.astro`;
|
|
122
122
|
return `
|
|
123
123
|
// Import utilities and fallback component
|
|
124
124
|
import { toCamelCase } from '@storyblok/astro';
|
|
@@ -161,7 +161,7 @@ function Oe(e, t, s) {
|
|
|
161
161
|
export { storyblokComponents };
|
|
162
162
|
`.trim();
|
|
163
163
|
}
|
|
164
|
-
async function
|
|
164
|
+
async function Oe(e, t, s, r) {
|
|
165
165
|
if (!s)
|
|
166
166
|
return "";
|
|
167
167
|
if (r) {
|
|
@@ -177,12 +177,12 @@ async function xe(e, t, s, r) {
|
|
|
177
177
|
}
|
|
178
178
|
return "import FallbackComponent from '@storyblok/astro/FallbackComponent.astro';";
|
|
179
179
|
}
|
|
180
|
-
async function
|
|
180
|
+
async function xe(e, t, s, r) {
|
|
181
181
|
const o = [];
|
|
182
182
|
for await (const [n, a] of Object.entries(t)) {
|
|
183
183
|
const l = ae(s, a), c = await e.resolve(l);
|
|
184
184
|
if (c)
|
|
185
|
-
o.push(`import ${
|
|
185
|
+
o.push(`import ${$e(n)} from "${c.id}"`);
|
|
186
186
|
else if (!r)
|
|
187
187
|
throw new Error(
|
|
188
188
|
`Component could not be found for blok "${n}"! Does "${l}" exist?`
|
|
@@ -191,10 +191,10 @@ async function Me(e, t, s, r) {
|
|
|
191
191
|
return o;
|
|
192
192
|
}
|
|
193
193
|
function ae(e, t) {
|
|
194
|
-
const r = `${
|
|
195
|
-
return
|
|
194
|
+
const r = `${B(e)}${B(t)}`;
|
|
195
|
+
return ke(r);
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function pt(e) {
|
|
198
198
|
const t = {
|
|
199
199
|
useCustomApi: !1,
|
|
200
200
|
bridge: !0,
|
|
@@ -212,7 +212,7 @@ function ft(e) {
|
|
|
212
212
|
components: c,
|
|
213
213
|
bridge: u,
|
|
214
214
|
livePreview: g
|
|
215
|
-
} = t, d =
|
|
215
|
+
} = t, d = ve(t.bridge);
|
|
216
216
|
return {
|
|
217
217
|
name: "@storyblok/astro",
|
|
218
218
|
hooks: {
|
|
@@ -220,20 +220,20 @@ function ft(e) {
|
|
|
220
220
|
injectScript: C,
|
|
221
221
|
updateConfig: R,
|
|
222
222
|
addDevToolbarApp: k,
|
|
223
|
-
addMiddleware:
|
|
223
|
+
addMiddleware: _,
|
|
224
224
|
config: $
|
|
225
225
|
}) => {
|
|
226
226
|
if (R({
|
|
227
227
|
vite: {
|
|
228
228
|
plugins: [
|
|
229
|
-
|
|
230
|
-
|
|
229
|
+
be(s, r, o),
|
|
230
|
+
Ie(
|
|
231
231
|
c || {},
|
|
232
232
|
n,
|
|
233
233
|
l,
|
|
234
234
|
a
|
|
235
235
|
),
|
|
236
|
-
|
|
236
|
+
Ce(t)
|
|
237
237
|
]
|
|
238
238
|
}
|
|
239
239
|
}), g && ($ == null ? void 0 : $.output) !== "server")
|
|
@@ -268,36 +268,36 @@ function ft(e) {
|
|
|
268
268
|
storyblokInstance.on(["published", "change", "input"], handleStoryblokMessage);
|
|
269
269
|
});
|
|
270
270
|
`
|
|
271
|
-
),
|
|
271
|
+
), _({
|
|
272
272
|
entrypoint: "@storyblok/astro/middleware.ts",
|
|
273
273
|
order: "pre"
|
|
274
274
|
})), k({
|
|
275
275
|
id: "storyblok",
|
|
276
276
|
name: "Storyblok",
|
|
277
|
-
icon:
|
|
277
|
+
icon: ge,
|
|
278
278
|
entrypoint: "@storyblok/astro/toolbarApp.ts"
|
|
279
279
|
});
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
};
|
|
283
283
|
}
|
|
284
|
-
let
|
|
284
|
+
let X;
|
|
285
285
|
async function mt(e) {
|
|
286
286
|
const { action: t, story: s } = e || {};
|
|
287
287
|
if (t === "input" && s) {
|
|
288
288
|
const r = async () => {
|
|
289
|
-
|
|
290
|
-
const n = await
|
|
289
|
+
Q("storyblok-live-preview-updating", { story: s });
|
|
290
|
+
const n = await Pe(s), a = document.body;
|
|
291
291
|
if (n.outerHTML === a.outerHTML)
|
|
292
292
|
return;
|
|
293
293
|
const l = document.querySelector('[data-blok-focused="true"]');
|
|
294
|
-
|
|
294
|
+
Me(a, n, l), Q("storyblok-live-preview-updated", { story: s });
|
|
295
295
|
};
|
|
296
|
-
clearTimeout(
|
|
296
|
+
clearTimeout(X), X = setTimeout(r, 500);
|
|
297
297
|
}
|
|
298
298
|
["published", "change"].includes(e == null ? void 0 : e.action) && location.reload();
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function Me(e, t, s) {
|
|
301
301
|
if (s) {
|
|
302
302
|
const r = s.getAttribute("data-blok-uid"), o = t.querySelector(
|
|
303
303
|
`[data-blok-uid="${r}"]`
|
|
@@ -306,7 +306,7 @@ function Pe(e, t, s) {
|
|
|
306
306
|
} else
|
|
307
307
|
e.replaceWith(t);
|
|
308
308
|
}
|
|
309
|
-
async function
|
|
309
|
+
async function Pe(e) {
|
|
310
310
|
const s = await (await fetch(location.href, {
|
|
311
311
|
method: "POST",
|
|
312
312
|
body: JSON.stringify({
|
|
@@ -319,20 +319,20 @@ async function He(e) {
|
|
|
319
319
|
})).text();
|
|
320
320
|
return new DOMParser().parseFromString(s, "text/html").body;
|
|
321
321
|
}
|
|
322
|
-
function
|
|
322
|
+
function Q(e, t) {
|
|
323
323
|
document.dispatchEvent(new CustomEvent(e, { detail: t }));
|
|
324
324
|
}
|
|
325
|
-
var
|
|
325
|
+
var He = Object.defineProperty, Ne = (e, t, s) => t in e ? He(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, y = (e, t, s) => Ne(e, typeof t != "symbol" ? t + "" : t, s);
|
|
326
326
|
let w = /* @__PURE__ */ function(e) {
|
|
327
327
|
return e.DOCUMENT = "doc", e.HEADING = "heading", e.PARAGRAPH = "paragraph", e.QUOTE = "blockquote", e.OL_LIST = "ordered_list", e.UL_LIST = "bullet_list", e.LIST_ITEM = "list_item", e.CODE_BLOCK = "code_block", e.HR = "horizontal_rule", e.BR = "hard_break", e.IMAGE = "image", e.EMOJI = "emoji", e.COMPONENT = "blok", e.TABLE = "table", e.TABLE_ROW = "tableRow", e.TABLE_CELL = "tableCell", e.TABLE_HEADER = "tableHeader", e;
|
|
328
328
|
}({}), A = /* @__PURE__ */ function(e) {
|
|
329
329
|
return e.BOLD = "bold", e.STRONG = "strong", e.STRIKE = "strike", e.UNDERLINE = "underline", e.ITALIC = "italic", e.CODE = "code", e.LINK = "link", e.ANCHOR = "anchor", e.STYLED = "styled", e.SUPERSCRIPT = "superscript", e.SUBSCRIPT = "subscript", e.TEXT_STYLE = "textStyle", e.HIGHLIGHT = "highlight", e;
|
|
330
|
-
}({}),
|
|
330
|
+
}({}), je = /* @__PURE__ */ function(e) {
|
|
331
331
|
return e.TEXT = "text", e;
|
|
332
332
|
}({}), M = /* @__PURE__ */ function(e) {
|
|
333
333
|
return e.URL = "url", e.STORY = "story", e.ASSET = "asset", e.EMAIL = "email", e;
|
|
334
334
|
}({});
|
|
335
|
-
const
|
|
335
|
+
const De = [
|
|
336
336
|
"area",
|
|
337
337
|
"base",
|
|
338
338
|
"br",
|
|
@@ -347,14 +347,14 @@ const Ue = [
|
|
|
347
347
|
"source",
|
|
348
348
|
"track",
|
|
349
349
|
"wbr"
|
|
350
|
-
],
|
|
350
|
+
], Ue = (e = {}) => {
|
|
351
351
|
const { custom: t, ...s } = e, r = {
|
|
352
352
|
...s,
|
|
353
353
|
...t
|
|
354
354
|
};
|
|
355
355
|
return Object.keys(r).map((o) => `${o}="${r[o]}"`).join(" ");
|
|
356
|
-
},
|
|
357
|
-
function
|
|
356
|
+
}, Ve = (e = {}) => Object.keys(e).map((t) => `${t}: ${e[t]}`).join("; ");
|
|
357
|
+
function Be(e) {
|
|
358
358
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
359
359
|
}
|
|
360
360
|
const S = (e) => Object.fromEntries(Object.entries(e).filter(([t, s]) => s !== void 0));
|
|
@@ -370,13 +370,13 @@ function qe(e, t) {
|
|
|
370
370
|
}
|
|
371
371
|
if (typeof t == "object") {
|
|
372
372
|
if (t.width !== void 0 && (typeof t.width == "number" && t.width >= 0 ? (o.width = t.width, s = t.width) : console.warn("[StoryblokRichText] - Width value must be a number greater than or equal to 0")), t.height !== void 0 && (typeof t.height == "number" && t.height >= 0 ? (o.height = t.height, r = t.height) : console.warn("[StoryblokRichText] - Height value must be a number greater than or equal to 0")), t.height === 0 && t.width === 0 && (delete o.width, delete o.height, console.warn("[StoryblokRichText] - Width and height values cannot both be 0")), t.loading && ["lazy", "eager"].includes(t.loading) && (o.loading = t.loading), t.class && (o.class = t.class), t.filters) {
|
|
373
|
-
const { filters: c } = t || {}, { blur: u, brightness: g, fill: d, format: C, grayscale: R, quality: k, rotate:
|
|
374
|
-
u && a(u, 0, 100, "blur", n), k && a(k, 0, 100, "quality", n), g && a(g, 0, 100, "brightness", n), d && n.push(`fill(${d})`), R && n.push("grayscale()"),
|
|
373
|
+
const { filters: c } = t || {}, { blur: u, brightness: g, fill: d, format: C, grayscale: R, quality: k, rotate: _ } = c || {};
|
|
374
|
+
u && a(u, 0, 100, "blur", n), k && a(k, 0, 100, "quality", n), g && a(g, 0, 100, "brightness", n), d && n.push(`fill(${d})`), R && n.push("grayscale()"), _ && [
|
|
375
375
|
0,
|
|
376
376
|
90,
|
|
377
377
|
180,
|
|
378
378
|
270
|
|
379
|
-
].includes(t.filters.rotate || 0) && n.push(`rotate(${
|
|
379
|
+
].includes(t.filters.rotate || 0) && n.push(`rotate(${_})`), C && [
|
|
380
380
|
"webp",
|
|
381
381
|
"png",
|
|
382
382
|
"jpeg"
|
|
@@ -399,137 +399,137 @@ function qe(e, t) {
|
|
|
399
399
|
attrs: o
|
|
400
400
|
};
|
|
401
401
|
}
|
|
402
|
-
function
|
|
403
|
-
const r =
|
|
402
|
+
function ee(e, t = {}, s) {
|
|
403
|
+
const r = Ue(t), o = r ? `${e} ${r}` : e, n = Array.isArray(s) ? s.join("") : s || "";
|
|
404
404
|
if (e) {
|
|
405
|
-
if (
|
|
405
|
+
if (De.includes(e)) return `<${o}>`;
|
|
406
406
|
} else return n;
|
|
407
407
|
return `<${o}>${n}</${e}>`;
|
|
408
408
|
}
|
|
409
|
-
function
|
|
410
|
-
const t = /* @__PURE__ */ new Map(), { renderFn: s =
|
|
411
|
-
const { textAlign: h, class: p, id:
|
|
412
|
-
return
|
|
409
|
+
function Fe(e = {}) {
|
|
410
|
+
const t = /* @__PURE__ */ new Map(), { renderFn: s = ee, textFn: r = Be, resolvers: o = {}, optimizeImages: n = !1, keyedResolvers: a = !1 } = e, l = s !== ee, c = (i = {}) => {
|
|
411
|
+
const { textAlign: h, class: p, id: m, style: f, ...v } = i, b = [];
|
|
412
|
+
return f && b.push(f.endsWith(";") ? f : `${f};`), h && b.push(`text-align: ${h};`), S({
|
|
413
413
|
...v,
|
|
414
414
|
class: p,
|
|
415
|
-
id:
|
|
415
|
+
id: m,
|
|
416
416
|
...b.length > 0 ? { style: b.join(" ") } : {}
|
|
417
417
|
});
|
|
418
418
|
}, u = (i) => (h, p) => {
|
|
419
|
-
const
|
|
420
|
-
return p.render(i,
|
|
419
|
+
const m = c(h.attrs);
|
|
420
|
+
return p.render(i, m, h.children || null);
|
|
421
421
|
}, g = (i, h) => {
|
|
422
|
-
const { src: p, alt:
|
|
422
|
+
const { src: p, alt: m, title: f, srcset: v, sizes: b } = i.attrs || {};
|
|
423
423
|
let E = p, L = {};
|
|
424
424
|
if (n) {
|
|
425
|
-
const { src:
|
|
426
|
-
E =
|
|
425
|
+
const { src: fe, attrs: ye } = qe(p, n);
|
|
426
|
+
E = fe, L = ye;
|
|
427
427
|
}
|
|
428
428
|
const I = {
|
|
429
429
|
src: E,
|
|
430
|
-
alt:
|
|
431
|
-
title:
|
|
430
|
+
alt: m,
|
|
431
|
+
title: f,
|
|
432
432
|
srcset: v,
|
|
433
433
|
sizes: b,
|
|
434
434
|
...L
|
|
435
435
|
};
|
|
436
436
|
return h.render("img", S(I));
|
|
437
437
|
}, d = (i, h) => {
|
|
438
|
-
const { level: p, ...
|
|
439
|
-
return h.render(`h${p}`,
|
|
438
|
+
const { level: p, ...m } = i.attrs || {}, f = c(m);
|
|
439
|
+
return h.render(`h${p}`, f, i.children);
|
|
440
440
|
}, C = (i, h) => {
|
|
441
|
-
var p,
|
|
441
|
+
var p, m, f, v;
|
|
442
442
|
const b = h.render("img", {
|
|
443
443
|
src: (p = i.attrs) == null ? void 0 : p.fallbackImage,
|
|
444
|
-
alt: (
|
|
444
|
+
alt: (m = i.attrs) == null ? void 0 : m.alt,
|
|
445
445
|
style: "width: 1.25em; height: 1.25em; vertical-align: text-top",
|
|
446
446
|
draggable: "false",
|
|
447
447
|
loading: "lazy"
|
|
448
448
|
});
|
|
449
449
|
return h.render("span", {
|
|
450
450
|
"data-type": "emoji",
|
|
451
|
-
"data-name": (
|
|
451
|
+
"data-name": (f = i.attrs) == null ? void 0 : f.name,
|
|
452
452
|
"data-emoji": (v = i.attrs) == null ? void 0 : v.emoji
|
|
453
453
|
}, b);
|
|
454
|
-
}, R = (i, h) => h.render("pre", i.attrs || {}, h.render("code", {}, i.children || "")), k = (i, h = !1) => ({ text: p, attrs:
|
|
455
|
-
const { class: v, id: b, ...E } =
|
|
454
|
+
}, R = (i, h) => h.render("pre", i.attrs || {}, h.render("code", {}, i.children || "")), k = (i, h = !1) => ({ text: p, attrs: m }, f) => {
|
|
455
|
+
const { class: v, id: b, ...E } = m || {}, L = h ? {
|
|
456
456
|
class: v,
|
|
457
457
|
id: b,
|
|
458
|
-
style:
|
|
459
|
-
} :
|
|
460
|
-
return
|
|
461
|
-
},
|
|
458
|
+
style: Ve(E) || void 0
|
|
459
|
+
} : m || {};
|
|
460
|
+
return f.render(i, S(L), p);
|
|
461
|
+
}, _ = (i) => j(i), $ = (i) => {
|
|
462
462
|
const { marks: h, ...p } = i;
|
|
463
463
|
if ("text" in i) {
|
|
464
|
-
if (h) return h.reduce((
|
|
464
|
+
if (h) return h.reduce((f, v) => _({
|
|
465
465
|
...v,
|
|
466
|
-
text:
|
|
467
|
-
}),
|
|
466
|
+
text: f
|
|
467
|
+
}), _({
|
|
468
468
|
...p,
|
|
469
469
|
children: p.children
|
|
470
470
|
}));
|
|
471
|
-
const
|
|
471
|
+
const m = i.attrs || {};
|
|
472
472
|
if (a) {
|
|
473
|
-
const
|
|
474
|
-
t.set("txt",
|
|
473
|
+
const f = t.get("txt") || 0;
|
|
474
|
+
t.set("txt", f + 1), m.key = `txt-${f}`;
|
|
475
475
|
}
|
|
476
|
-
return r(p.text,
|
|
476
|
+
return r(p.text, m);
|
|
477
477
|
}
|
|
478
478
|
return "";
|
|
479
|
-
},
|
|
480
|
-
const { linktype: p, href:
|
|
479
|
+
}, z = (i, h) => {
|
|
480
|
+
const { linktype: p, href: m, anchor: f, ...v } = i.attrs || {};
|
|
481
481
|
let b = "";
|
|
482
482
|
switch (p) {
|
|
483
483
|
case M.ASSET:
|
|
484
484
|
case M.URL:
|
|
485
|
-
b =
|
|
485
|
+
b = m;
|
|
486
486
|
break;
|
|
487
487
|
case M.EMAIL:
|
|
488
|
-
b = `mailto:${
|
|
488
|
+
b = `mailto:${m}`;
|
|
489
489
|
break;
|
|
490
490
|
case M.STORY:
|
|
491
|
-
b =
|
|
491
|
+
b = m, f && (b = `${b}#${f}`);
|
|
492
492
|
break;
|
|
493
493
|
default:
|
|
494
|
-
b =
|
|
494
|
+
b = m;
|
|
495
495
|
break;
|
|
496
496
|
}
|
|
497
497
|
const E = { ...v };
|
|
498
498
|
return b && (E.href = b), h.render("a", E, i.text);
|
|
499
|
-
},
|
|
500
|
-
var p,
|
|
499
|
+
}, ce = (i, h) => {
|
|
500
|
+
var p, m;
|
|
501
501
|
return console.warn("[StoryblokRichtText] - BLOK resolver is not available for vanilla usage"), h.render("span", {
|
|
502
502
|
blok: (p = i == null ? void 0 : i.attrs) == null ? void 0 : p.body[0],
|
|
503
|
-
id: (
|
|
503
|
+
id: (m = i.attrs) == null ? void 0 : m.id,
|
|
504
504
|
style: "display: none"
|
|
505
505
|
});
|
|
506
|
+
}, ue = (i, h) => {
|
|
507
|
+
const p = c(i.attrs), m = i.children || null;
|
|
508
|
+
return h.render("table", p, h.render("tbody", {}, m));
|
|
506
509
|
}, he = (i, h) => {
|
|
507
|
-
const p = c(i.attrs), f = i.children || null;
|
|
508
|
-
return h.render("table", p, h.render("tbody", {}, f));
|
|
509
|
-
}, de = (i, h) => {
|
|
510
510
|
const p = c(i.attrs);
|
|
511
511
|
return h.render("tr", p, i.children);
|
|
512
|
-
},
|
|
513
|
-
const { colspan: p, rowspan:
|
|
514
|
-
|
|
512
|
+
}, de = (i, h) => {
|
|
513
|
+
const { colspan: p, rowspan: m, colwidth: f, backgroundColor: v, textAlign: b, ...E } = i.attrs || {}, L = [];
|
|
514
|
+
f && L.push(`width: ${f}px;`), v && L.push(`background-color: ${v};`), b && L.push(`text-align: ${b};`);
|
|
515
515
|
const I = {
|
|
516
516
|
...E,
|
|
517
517
|
...p > 1 ? { colspan: p } : {},
|
|
518
|
-
...
|
|
518
|
+
...m > 1 ? { rowspan: m } : {},
|
|
519
519
|
...L.length > 0 ? { style: L.join(" ") } : {}
|
|
520
520
|
};
|
|
521
521
|
return h.render("td", S(I), i.children);
|
|
522
|
-
},
|
|
523
|
-
const { colspan: p, rowspan:
|
|
524
|
-
|
|
522
|
+
}, pe = (i, h) => {
|
|
523
|
+
const { colspan: p, rowspan: m, colwidth: f, backgroundColor: v, textAlign: b, ...E } = i.attrs || {}, L = [];
|
|
524
|
+
f && L.push(`width: ${f}px;`), v && L.push(`background-color: ${v};`), b && L.push(`text-align: ${b};`);
|
|
525
525
|
const I = {
|
|
526
526
|
...E,
|
|
527
527
|
...p > 1 ? { colspan: p } : {},
|
|
528
|
-
...
|
|
528
|
+
...m > 1 ? { rowspan: m } : {},
|
|
529
529
|
...L.length > 0 ? { style: L.join(" ") } : {}
|
|
530
530
|
};
|
|
531
531
|
return h.render("th", S(I), i.children);
|
|
532
|
-
},
|
|
532
|
+
}, Z = /* @__PURE__ */ new Map([
|
|
533
533
|
[w.DOCUMENT, u("")],
|
|
534
534
|
[w.HEADING, d],
|
|
535
535
|
[w.PARAGRAPH, u("p")],
|
|
@@ -542,10 +542,10 @@ function Ge(e = {}) {
|
|
|
542
542
|
[w.HR, u("hr")],
|
|
543
543
|
[w.BR, u("br")],
|
|
544
544
|
[w.QUOTE, u("blockquote")],
|
|
545
|
-
[w.COMPONENT,
|
|
546
|
-
[
|
|
547
|
-
[A.LINK,
|
|
548
|
-
[A.ANCHOR,
|
|
545
|
+
[w.COMPONENT, ce],
|
|
546
|
+
[je.TEXT, $],
|
|
547
|
+
[A.LINK, z],
|
|
548
|
+
[A.ANCHOR, z],
|
|
549
549
|
[A.STYLED, k("span", !0)],
|
|
550
550
|
[A.BOLD, k("strong")],
|
|
551
551
|
[A.TEXT_STYLE, k("span", !0)],
|
|
@@ -556,31 +556,31 @@ function Ge(e = {}) {
|
|
|
556
556
|
[A.SUPERSCRIPT, k("sup")],
|
|
557
557
|
[A.SUBSCRIPT, k("sub")],
|
|
558
558
|
[A.HIGHLIGHT, k("mark")],
|
|
559
|
-
[w.TABLE,
|
|
560
|
-
[w.TABLE_ROW,
|
|
561
|
-
[w.TABLE_CELL,
|
|
562
|
-
[w.TABLE_HEADER,
|
|
563
|
-
]),
|
|
559
|
+
[w.TABLE, ue],
|
|
560
|
+
[w.TABLE_ROW, he],
|
|
561
|
+
[w.TABLE_CELL, de],
|
|
562
|
+
[w.TABLE_HEADER, pe]
|
|
563
|
+
]), J = new Map([...Z, ...Object.entries(o).map(([i, h]) => [i, h])]), me = () => ({
|
|
564
564
|
render: (i, h = {}, p) => {
|
|
565
565
|
if (a && i) {
|
|
566
|
-
const
|
|
567
|
-
t.set(i,
|
|
566
|
+
const m = t.get(i) || 0;
|
|
567
|
+
t.set(i, m + 1), h.key = `${i}-${m}`;
|
|
568
568
|
}
|
|
569
569
|
return s(i, h, p);
|
|
570
570
|
},
|
|
571
|
-
originalResolvers:
|
|
572
|
-
mergedResolvers:
|
|
571
|
+
originalResolvers: Z,
|
|
572
|
+
mergedResolvers: J
|
|
573
573
|
});
|
|
574
574
|
function x(i) {
|
|
575
|
-
const h =
|
|
575
|
+
const h = J.get(i.type);
|
|
576
576
|
if (!h)
|
|
577
577
|
return console.error("<Storyblok>", `No resolver found for node type ${i.type}`), "";
|
|
578
578
|
const p = me();
|
|
579
579
|
if (i.type === "text") return h(i, p);
|
|
580
|
-
const
|
|
580
|
+
const m = i.content ? i.content.map(j) : void 0;
|
|
581
581
|
return h({
|
|
582
582
|
...i,
|
|
583
|
-
children:
|
|
583
|
+
children: m
|
|
584
584
|
}, p);
|
|
585
585
|
}
|
|
586
586
|
function j(i) {
|
|
@@ -588,8 +588,8 @@ function Ge(e = {}) {
|
|
|
588
588
|
}
|
|
589
589
|
return { render: j };
|
|
590
590
|
}
|
|
591
|
-
let
|
|
592
|
-
const
|
|
591
|
+
let te = !1;
|
|
592
|
+
const se = [], le = (e) => new Promise((t, s) => {
|
|
593
593
|
if (typeof window > "u") {
|
|
594
594
|
s(new Error("Cannot load Storyblok bridge: window is undefined (server-side environment)"));
|
|
595
595
|
return;
|
|
@@ -599,23 +599,23 @@ const re = [], le = (e) => new Promise((t, s) => {
|
|
|
599
599
|
console.warn("You are not in Draft Mode or in the Visual Editor.");
|
|
600
600
|
return;
|
|
601
601
|
}
|
|
602
|
-
|
|
602
|
+
te ? o() : se.push(o);
|
|
603
603
|
}, document.getElementById("storyblok-javascript-bridge")) {
|
|
604
604
|
t(void 0);
|
|
605
605
|
return;
|
|
606
606
|
}
|
|
607
607
|
const r = document.createElement("script");
|
|
608
608
|
r.async = !0, r.src = e, r.id = "storyblok-javascript-bridge", r.onerror = (o) => s(o), r.onload = (o) => {
|
|
609
|
-
|
|
609
|
+
se.forEach((n) => n()), te = !0, t(o);
|
|
610
610
|
}, document.getElementsByTagName("head")[0].appendChild(r);
|
|
611
|
-
}), D = (e = "") => e.includes("/cdn/"),
|
|
611
|
+
}), D = (e = "") => e.includes("/cdn/"), Ge = (e, t = 25, s = 1) => ({
|
|
612
612
|
...e,
|
|
613
613
|
per_page: t,
|
|
614
614
|
page: s
|
|
615
|
-
}),
|
|
615
|
+
}), ze = (e) => new Promise((t) => setTimeout(t, e)), Ze = (e = 0, t) => Array.from({ length: e }, t), Je = (e = 0, t = e) => {
|
|
616
616
|
const s = Math.abs(t - e) || 0, r = e < t ? 1 : -1;
|
|
617
|
-
return
|
|
618
|
-
},
|
|
617
|
+
return Ze(s, (o, n) => n * r + e);
|
|
618
|
+
}, We = async (e, t) => Promise.all(e.map(t)), Ye = (e = [], t) => e.map(t).reduce((s, r) => [...s, ...r], []), G = (e, t, s) => {
|
|
619
619
|
const r = [];
|
|
620
620
|
for (const o in e) {
|
|
621
621
|
if (!Object.prototype.hasOwnProperty.call(e, o)) continue;
|
|
@@ -623,10 +623,10 @@ const re = [], le = (e) => new Promise((t, s) => {
|
|
|
623
623
|
if (n == null) continue;
|
|
624
624
|
const a = s ? "" : encodeURIComponent(o);
|
|
625
625
|
let l;
|
|
626
|
-
typeof n == "object" ? l =
|
|
626
|
+
typeof n == "object" ? l = G(n, t ? t + encodeURIComponent(`[${a}]`) : a, Array.isArray(n)) : l = `${t ? t + encodeURIComponent(`[${a}]`) : a}=${encodeURIComponent(n)}`, r.push(l);
|
|
627
627
|
}
|
|
628
628
|
return r.join("&");
|
|
629
|
-
},
|
|
629
|
+
}, re = (e) => {
|
|
630
630
|
const t = {
|
|
631
631
|
eu: "api.storyblok.com",
|
|
632
632
|
us: "api-us.storyblok.com",
|
|
@@ -636,7 +636,7 @@ const re = [], le = (e) => new Promise((t, s) => {
|
|
|
636
636
|
};
|
|
637
637
|
return t[e] ?? t.eu;
|
|
638
638
|
};
|
|
639
|
-
var
|
|
639
|
+
var Ke = class {
|
|
640
640
|
constructor(e) {
|
|
641
641
|
y(this, "baseURL"), y(this, "timeout"), y(this, "headers"), y(this, "responseInterceptor"), y(this, "fetch"), y(this, "ejectInterceptor"), y(this, "url"), y(this, "parameters"), y(this, "fetchOptions"), this.baseURL = e.baseURL, this.headers = e.headers || new Headers(), this.timeout = e != null && e.timeout ? e.timeout * 1e3 : 0, this.responseInterceptor = e.responseInterceptor, this.fetch = (...t) => e.fetch ? e.fetch(...t) : fetch(...t), this.ejectInterceptor = !1, this.url = "", this.parameters = {}, this.fetchOptions = {};
|
|
642
642
|
}
|
|
@@ -673,7 +673,7 @@ var Xe = class {
|
|
|
673
673
|
}
|
|
674
674
|
async _methodHandler(e) {
|
|
675
675
|
let t = `${this.baseURL}${this.url}`, s = null;
|
|
676
|
-
e === "get" ? t = `${this.baseURL}${this.url}?${
|
|
676
|
+
e === "get" ? t = `${this.baseURL}${this.url}?${G(this.parameters)}` : s = JSON.stringify(this.parameters);
|
|
677
677
|
const r = new URL(t), o = new AbortController(), { signal: n } = o;
|
|
678
678
|
let a = null;
|
|
679
679
|
this.timeout && (a = setTimeout(() => o.abort(), this.timeout));
|
|
@@ -689,7 +689,7 @@ var Xe = class {
|
|
|
689
689
|
const c = await this._responseHandler(l);
|
|
690
690
|
return this.responseInterceptor && !this.ejectInterceptor ? this._statusHandler(this.responseInterceptor(c)) : this._statusHandler(c);
|
|
691
691
|
} catch (l) {
|
|
692
|
-
return { message: l };
|
|
692
|
+
return l.name === "AbortError" ? { message: "Request timeout: The request was aborted due to timeout" } : { message: l.message || l.toString() || "An unknown error occurred" };
|
|
693
693
|
}
|
|
694
694
|
}
|
|
695
695
|
setFetchOptions(e = {}) {
|
|
@@ -727,13 +727,12 @@ var Xe = class {
|
|
|
727
727
|
r(o);
|
|
728
728
|
});
|
|
729
729
|
}
|
|
730
|
-
},
|
|
731
|
-
const
|
|
730
|
+
}, Xe = Ke;
|
|
731
|
+
const oe = "SB-Agent", U = {
|
|
732
732
|
defaultAgentName: "SB-JS-CLIENT",
|
|
733
733
|
defaultAgentVersion: "SB-Agent-Version",
|
|
734
734
|
packageVersion: "7.0.0"
|
|
735
|
-
},
|
|
736
|
-
DRAFT: "draft",
|
|
735
|
+
}, Qe = {
|
|
737
736
|
PUBLISHED: "published"
|
|
738
737
|
}, et = 25, V = {
|
|
739
738
|
SMALL: 25,
|
|
@@ -744,27 +743,23 @@ const ne = "SB-Agent", U = {
|
|
|
744
743
|
MEDIUM: 15,
|
|
745
744
|
LARGE: 10,
|
|
746
745
|
VERY_LARGE: 6
|
|
747
|
-
},
|
|
748
|
-
function tt(e) {
|
|
749
|
-
return e.version === ce.DRAFT;
|
|
750
|
-
}
|
|
751
|
-
function st(e, t) {
|
|
746
|
+
}, ne = 1e3, P = 3;
|
|
747
|
+
function tt(e, t) {
|
|
752
748
|
const s = e.includes("/cdn/stories/"), r = e.split("/").length > 3 && !e.endsWith("/cdn/stories"), o = "find_by" in t;
|
|
753
749
|
return s && r || o;
|
|
754
750
|
}
|
|
755
|
-
function
|
|
751
|
+
function st(e) {
|
|
756
752
|
return e <= V.SMALL ? O.SINGLE_OR_SMALL : e <= V.MEDIUM ? O.MEDIUM : e <= V.LARGE ? O.LARGE : O.VERY_LARGE;
|
|
757
753
|
}
|
|
758
754
|
function H(e, t, s = {}, r) {
|
|
759
|
-
if (s.userRateLimit !== void 0) return Math.min(s.userRateLimit,
|
|
760
|
-
if (s.serverHeadersRateLimit !== void 0) return Math.min(s.serverHeadersRateLimit,
|
|
755
|
+
if (s.userRateLimit !== void 0) return Math.min(s.userRateLimit, ne);
|
|
756
|
+
if (s.serverHeadersRateLimit !== void 0) return Math.min(s.serverHeadersRateLimit, ne);
|
|
761
757
|
if (r !== void 0) return r;
|
|
762
|
-
if (t
|
|
763
|
-
if (st(e, t)) return O.SINGLE_OR_SMALL;
|
|
758
|
+
if (!e || !t || tt(e, t)) return O.SINGLE_OR_SMALL;
|
|
764
759
|
const o = t.per_page || et;
|
|
765
|
-
return
|
|
760
|
+
return st(o);
|
|
766
761
|
}
|
|
767
|
-
function
|
|
762
|
+
function rt(e) {
|
|
768
763
|
if (!e) return null;
|
|
769
764
|
const t = e["x-ratelimit"] || e["X-RateLimit"], s = e["x-ratelimit-policy"] || e["X-RateLimit-Policy"];
|
|
770
765
|
if (!t && !s) return null;
|
|
@@ -779,19 +774,19 @@ function ot(e) {
|
|
|
779
774
|
}
|
|
780
775
|
return Object.keys(r).length > 0 ? r : null;
|
|
781
776
|
}
|
|
782
|
-
function
|
|
777
|
+
function ot(e, t = !1) {
|
|
783
778
|
return {
|
|
784
779
|
userRateLimit: e,
|
|
785
780
|
serverHeadersRateLimit: void 0,
|
|
786
781
|
isManagementApi: t
|
|
787
782
|
};
|
|
788
783
|
}
|
|
789
|
-
var
|
|
784
|
+
var nt = class extends Error {
|
|
790
785
|
constructor(e) {
|
|
791
786
|
super(e), this.name = "AbortError";
|
|
792
787
|
}
|
|
793
788
|
};
|
|
794
|
-
function
|
|
789
|
+
function it(e, t, s) {
|
|
795
790
|
if (!Number.isFinite(t)) throw new TypeError("Expected `limit` to be a finite number");
|
|
796
791
|
if (!Number.isFinite(s)) throw new TypeError("Expected `interval` to be a finite number");
|
|
797
792
|
const r = [];
|
|
@@ -817,10 +812,10 @@ function at(e, t, s) {
|
|
|
817
812
|
}), n < t && l();
|
|
818
813
|
});
|
|
819
814
|
return c.abort = () => {
|
|
820
|
-
a = !0, o.forEach(clearTimeout), o = [], r.forEach((u) => u.reject(() => new
|
|
815
|
+
a = !0, o.forEach(clearTimeout), o = [], r.forEach((u) => u.reject(() => new nt("Throttle function aborted"))), r.length = 0;
|
|
821
816
|
}, c;
|
|
822
817
|
}
|
|
823
|
-
var
|
|
818
|
+
var at = it, lt = class {
|
|
824
819
|
constructor(e, t = 1e3) {
|
|
825
820
|
y(this, "queues"), y(this, "interval"), y(this, "throttledRequestFn"), this.queues = /* @__PURE__ */ new Map(), this.interval = t, this.throttledRequestFn = e;
|
|
826
821
|
}
|
|
@@ -829,7 +824,7 @@ var lt = at, ct = class {
|
|
|
829
824
|
*/
|
|
830
825
|
getQueue(e) {
|
|
831
826
|
let t = this.queues.get(e);
|
|
832
|
-
return t || (t =
|
|
827
|
+
return t || (t = at(this.throttledRequestFn, e, this.interval), this.queues.set(e, t)), t;
|
|
833
828
|
}
|
|
834
829
|
/**
|
|
835
830
|
* Executes a request through the appropriate throttle queue based on rate limit
|
|
@@ -854,8 +849,8 @@ var lt = at, ct = class {
|
|
|
854
849
|
}
|
|
855
850
|
};
|
|
856
851
|
let N = {};
|
|
857
|
-
const
|
|
858
|
-
var
|
|
852
|
+
const T = {};
|
|
853
|
+
var ct = class {
|
|
859
854
|
/**
|
|
860
855
|
*
|
|
861
856
|
* @param config ISbConfig interface
|
|
@@ -866,12 +861,12 @@ var ut = class {
|
|
|
866
861
|
let s = e.endpoint || t;
|
|
867
862
|
if (!s) {
|
|
868
863
|
const o = e.https === !1 ? "http" : "https";
|
|
869
|
-
e.oauthToken ? s = `${o}://${
|
|
864
|
+
e.oauthToken ? s = `${o}://${re(e.region)}/v1` : s = `${o}://${re(e.region)}/v2`;
|
|
870
865
|
}
|
|
871
866
|
const r = new Headers();
|
|
872
867
|
r.set("Content-Type", "application/json"), r.set("Accept", "application/json"), e.headers && (e.headers.constructor.name === "Headers" ? e.headers.entries().toArray() : Object.entries(e.headers)).forEach(([o, n]) => {
|
|
873
868
|
r.set(o, n);
|
|
874
|
-
}), r.has(
|
|
869
|
+
}), r.has(oe) || (r.set(oe, U.defaultAgentName), r.set(U.defaultAgentVersion, U.packageVersion)), e.oauthToken && r.set("Authorization", e.oauthToken), this.rateLimitConfig = ot(e.rateLimit, !!e.oauthToken), this.maxRetries = e.maxRetries || 10, this.retriesDelay = 300, this.throttleManager = new lt(this.throttledRequest.bind(this), 1e3), this.accessToken = e.accessToken || "", this.relations = {}, this.links = {}, this.cache = e.cache || { clear: "manual" }, this.resolveCounter = 0, this.resolveNestedRelations = e.resolveNestedRelations || !0, this.stringifiedStoriesCache = {}, this.version = e.version || Qe.PUBLISHED, this.inlineAssets = e.inlineAssets || !1, this.client = new Xe({
|
|
875
870
|
baseURL: s,
|
|
876
871
|
timeout: e.timeout || 0,
|
|
877
872
|
headers: r,
|
|
@@ -880,13 +875,13 @@ var ut = class {
|
|
|
880
875
|
});
|
|
881
876
|
}
|
|
882
877
|
parseParams(e) {
|
|
883
|
-
return e.token || (e.token = this.getToken()), e.cv || (e.cv =
|
|
878
|
+
return e.token || (e.token = this.getToken()), e.cv || (e.cv = T[e.token]), Array.isArray(e.resolve_relations) && (e.resolve_relations = e.resolve_relations.join(",")), typeof e.resolve_relations < "u" && (e.resolve_level = 2), e;
|
|
884
879
|
}
|
|
885
880
|
factoryParamOptions(e, t) {
|
|
886
881
|
return D(e) ? this.parseParams(t) : t;
|
|
887
882
|
}
|
|
888
883
|
makeRequest(e, t, s, r, o) {
|
|
889
|
-
const n = this.factoryParamOptions(e,
|
|
884
|
+
const n = this.factoryParamOptions(e, Ge(t, s, r));
|
|
890
885
|
return this.cacheResponse(e, n, void 0, o);
|
|
891
886
|
}
|
|
892
887
|
get(e, t = {}, s) {
|
|
@@ -899,8 +894,8 @@ var ut = class {
|
|
|
899
894
|
async getAll(e, t = {}, s, r) {
|
|
900
895
|
const o = (t == null ? void 0 : t.per_page) || 25, n = `/${e}`.replace(/\/$/, ""), a = s ?? n.substring(n.lastIndexOf("/") + 1);
|
|
901
896
|
t.version = t.version || this.version;
|
|
902
|
-
const l = 1, c = await this.makeRequest(n, t, o, l, r), u = c.total ? Math.ceil(c.total / (c.perPage || o)) : 1, g = await
|
|
903
|
-
return
|
|
897
|
+
const l = 1, c = await this.makeRequest(n, t, o, l, r), u = c.total ? Math.ceil(c.total / (c.perPage || o)) : 1, g = await We(Je(l, u), (d) => this.makeRequest(n, t, o, d + 1, r));
|
|
898
|
+
return Ye([c, ...g], (d) => Object.values(d.data[a]));
|
|
904
899
|
}
|
|
905
900
|
post(e, t = {}, s) {
|
|
906
901
|
const r = `/${e}`, o = H(void 0, void 0, this.rateLimitConfig, P);
|
|
@@ -1080,7 +1075,7 @@ var ut = class {
|
|
|
1080
1075
|
}), this.stringifiedStoriesCache = {}, delete this.links[s], delete this.relations[s];
|
|
1081
1076
|
}
|
|
1082
1077
|
async cacheResponse(e, t, s, r) {
|
|
1083
|
-
const o =
|
|
1078
|
+
const o = G({
|
|
1084
1079
|
url: e,
|
|
1085
1080
|
params: t
|
|
1086
1081
|
}), n = this.cacheProvider();
|
|
@@ -1098,20 +1093,20 @@ var ut = class {
|
|
|
1098
1093
|
data: d.data,
|
|
1099
1094
|
headers: d.headers
|
|
1100
1095
|
};
|
|
1101
|
-
const R =
|
|
1096
|
+
const R = rt(d.headers);
|
|
1102
1097
|
if ((R == null ? void 0 : R.max) !== void 0 && (this.rateLimitConfig.serverHeadersRateLimit = R.max), (g = d.headers) != null && g["per-page"] && (C = Object.assign({}, C, {
|
|
1103
1098
|
perPage: d.headers["per-page"] ? Number.parseInt(d.headers["per-page"]) : 0,
|
|
1104
1099
|
total: d.headers["per-page"] ? Number.parseInt(d.headers.total) : 0
|
|
1105
1100
|
})), C.data.story || C.data.stories) {
|
|
1106
|
-
const
|
|
1107
|
-
await this.resolveStories(C.data, t, `${
|
|
1101
|
+
const _ = this.resolveCounter = ++this.resolveCounter % 1e3;
|
|
1102
|
+
await this.resolveStories(C.data, t, `${_}`), C = await this.processInlineAssets(C);
|
|
1108
1103
|
}
|
|
1109
1104
|
t.version === "published" && e !== "/cdn/spaces/me" && await n.set(o, C);
|
|
1110
1105
|
const k = this.cache.clear === "onpreview" && t.version === "draft" || this.cache.clear === "auto";
|
|
1111
|
-
return t.token && C.data.cv && (k &&
|
|
1106
|
+
return t.token && C.data.cv && (k && T[t.token] && T[t.token] !== C.data.cv && await this.flushCache(), T[t.token] = C.data.cv), c(C);
|
|
1112
1107
|
} catch (d) {
|
|
1113
1108
|
if (d.response && d.status === 429 && (s = typeof s > "u" ? 0 : s + 1, s < this.maxRetries))
|
|
1114
|
-
return console.log(`Hit rate limit. Retrying in ${this.retriesDelay / 1e3} seconds.`), await
|
|
1109
|
+
return console.log(`Hit rate limit. Retrying in ${this.retriesDelay / 1e3} seconds.`), await ze(this.retriesDelay), this.cacheResponse(e, t, s).then(c).catch(u);
|
|
1115
1110
|
u(d);
|
|
1116
1111
|
}
|
|
1117
1112
|
});
|
|
@@ -1120,16 +1115,16 @@ var ut = class {
|
|
|
1120
1115
|
return this.client.setFetchOptions(r), this.client[e](t, s);
|
|
1121
1116
|
}
|
|
1122
1117
|
cacheVersions() {
|
|
1123
|
-
return
|
|
1118
|
+
return T;
|
|
1124
1119
|
}
|
|
1125
1120
|
cacheVersion() {
|
|
1126
|
-
return
|
|
1121
|
+
return T[this.accessToken];
|
|
1127
1122
|
}
|
|
1128
1123
|
setCacheVersion(e) {
|
|
1129
|
-
this.accessToken && (
|
|
1124
|
+
this.accessToken && (T[this.accessToken] = e);
|
|
1130
1125
|
}
|
|
1131
1126
|
clearCacheVersion() {
|
|
1132
|
-
this.accessToken && (
|
|
1127
|
+
this.accessToken && (T[this.accessToken] = 0);
|
|
1133
1128
|
}
|
|
1134
1129
|
cacheProvider() {
|
|
1135
1130
|
switch (this.cache.type) {
|
|
@@ -1185,8 +1180,8 @@ var ut = class {
|
|
|
1185
1180
|
};
|
|
1186
1181
|
return e.data.story && (e.data.story.content = t(e.data.story.content)), e.data.stories && (e.data.stories = e.data.stories.map((s) => (s.content = t(s.content), s))), e;
|
|
1187
1182
|
}
|
|
1188
|
-
},
|
|
1189
|
-
const
|
|
1183
|
+
}, ut = ct;
|
|
1184
|
+
const ft = (e = {}) => {
|
|
1190
1185
|
const { apiOptions: t } = e;
|
|
1191
1186
|
if (!t || !t.accessToken) {
|
|
1192
1187
|
console.error(
|
|
@@ -1194,8 +1189,8 @@ const yt = (e = {}) => {
|
|
|
1194
1189
|
);
|
|
1195
1190
|
return;
|
|
1196
1191
|
}
|
|
1197
|
-
return { storyblokApi: new
|
|
1198
|
-
},
|
|
1192
|
+
return { storyblokApi: new ut(t) };
|
|
1193
|
+
}, yt = (e) => {
|
|
1199
1194
|
if (typeof e != "object" || typeof e._editable > "u")
|
|
1200
1195
|
return {};
|
|
1201
1196
|
try {
|
|
@@ -1211,7 +1206,7 @@ const yt = (e = {}) => {
|
|
|
1211
1206
|
}
|
|
1212
1207
|
};
|
|
1213
1208
|
let q = "https://app.storyblok.com/f/storyblok-v2-latest.js";
|
|
1214
|
-
const
|
|
1209
|
+
const gt = (e = {}) => {
|
|
1215
1210
|
var t, s;
|
|
1216
1211
|
const {
|
|
1217
1212
|
bridge: r,
|
|
@@ -1229,20 +1224,20 @@ const bt = (e = {}) => {
|
|
|
1229
1224
|
const g = !(typeof window > "u") && ((s = (t = window.location) == null ? void 0 : t.search) == null ? void 0 : s.includes("_storyblok_tk"));
|
|
1230
1225
|
return r !== !1 && g && le(q), u;
|
|
1231
1226
|
};
|
|
1232
|
-
function
|
|
1233
|
-
return
|
|
1227
|
+
function bt(e, t) {
|
|
1228
|
+
return Fe(t).render(e);
|
|
1234
1229
|
}
|
|
1235
|
-
const
|
|
1230
|
+
const Ct = () => le(q);
|
|
1236
1231
|
export {
|
|
1237
|
-
|
|
1238
|
-
|
|
1232
|
+
ft as apiPlugin,
|
|
1233
|
+
dt as getLiveStory,
|
|
1239
1234
|
mt as handleStoryblokMessage,
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1235
|
+
Ct as loadStoryblokBridge,
|
|
1236
|
+
bt as renderRichText,
|
|
1237
|
+
Fe as richTextResolver,
|
|
1238
|
+
pt as storyblok,
|
|
1239
|
+
yt as storyblokEditable,
|
|
1240
|
+
gt as storyblokInit,
|
|
1241
|
+
$e as toCamelCase,
|
|
1242
|
+
ht as useStoryblokApi
|
|
1248
1243
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<path d="M29.0287 14.9132C28.2686 14.9132 27.5302 14.8018 26.7918 14.5568C26.0988 14.3265 25.462 13.9468 24.924 13.4432L25.9013 11.7504C26.4443 12.1291 26.9655 12.4186 27.4867 12.6414C27.9862 12.8641 28.4858 12.9532 28.9636 12.9532C29.3111 12.9532 29.5934 12.8864 29.7888 12.7527C29.9843 12.6414 30.0712 12.4409 30.0712 12.1959C30.0712 11.9732 29.9626 11.7504 29.702 11.6168C29.2938 11.4162 28.8636 11.2666 28.4206 11.1714L26.9003 10.6591C26.4877 10.4809 26.1619 10.3027 25.9013 10.1023C25.6407 9.92408 25.4452 9.67908 25.3366 9.43408C25.2184 9.1529 25.1592 8.84935 25.1629 8.54317C25.1502 7.66646 25.5255 6.83107 26.1836 6.27136C26.4877 6.00408 26.8786 5.80363 27.313 5.64772C27.7473 5.49181 28.2251 5.42499 28.7247 5.42499C29.3979 5.42499 30.0277 5.51408 30.6141 5.69226C31.2005 5.89272 31.7652 6.22681 32.3081 6.71681L31.244 8.38726C30.8236 8.07881 30.3722 7.81747 29.8974 7.60772C29.4848 7.42954 29.1156 7.36272 28.7247 7.36272C28.4423 7.36272 28.1817 7.40726 27.9862 7.5409C27.7691 7.65226 27.6822 7.85272 27.6822 8.11999C27.6822 8.38726 27.7908 8.56545 28.008 8.69908C28.2251 8.83272 28.6595 8.96635 29.2459 9.12226C29.7903 9.26289 30.3268 9.4339 30.853 9.63454C31.2874 9.81272 31.6349 10.0132 31.9172 10.2136C32.4511 10.6169 32.7463 11.2726 32.6991 11.9509C32.6991 12.8641 32.3733 13.5768 31.7 14.1114C31.0485 14.6459 30.1798 14.9132 29.0287 14.9132ZM39.7792 14.2673C39.41 14.4232 38.9756 14.5791 38.4978 14.7127C38.02 14.8464 37.5422 14.9354 37.0427 14.9354C36.6952 14.9354 36.3911 14.8909 36.0871 14.8018C35.7915 14.7134 35.5176 14.5616 35.2835 14.3564C35.0663 14.1782 34.8926 13.9109 34.7623 13.6214C34.632 13.3095 34.5451 12.9309 34.5451 12.4854V7.69681H33.4158V5.60317H34.5668V2.68545H37.2599V5.5809H39.0842V7.69681H37.2599V11.5277C37.2599 11.8173 37.325 12.04 37.4771 12.1959C37.6291 12.3073 37.8245 12.3741 38.0417 12.3741C38.2589 12.3741 38.4761 12.3518 38.6715 12.2627C38.8887 12.1959 39.0842 12.1291 39.2362 12.04L39.7575 14.2673H39.7792ZM44.8612 14.9132C44.1701 14.9255 43.4835 14.7968 42.8414 14.5345C41.7112 14.076 40.8261 13.1439 40.409 11.9732C39.9823 10.8102 39.9823 9.52792 40.409 8.36499C40.8261 7.19423 41.7112 6.26214 42.8414 5.80363C43.4278 5.55863 44.1011 5.42499 44.8612 5.42499C46.1833 5.36117 47.4671 5.88947 48.3795 6.87272C48.7922 7.2959 49.0962 7.80817 49.3134 8.36499C49.758 9.5322 49.758 10.8282 49.3134 11.9954C48.8937 13.1518 48.0186 14.0734 46.9027 14.5345C46.2538 14.7998 45.5596 14.9285 44.8612 14.9132ZM42.9066 10.1914C42.9066 10.9041 43.0803 11.4832 43.4495 11.9064C43.8405 12.3518 44.3183 12.5745 44.8829 12.5745C45.4284 12.5853 45.9487 12.3391 46.2946 11.9064C46.4683 11.6836 46.5987 11.4609 46.7072 11.1491C46.8158 10.8595 46.8593 10.5254 46.8593 10.1914C46.8593 9.45636 46.6638 8.87726 46.2946 8.45408C45.9254 8.00863 45.4476 7.78589 44.8829 7.78589C44.3394 7.78464 43.8229 8.02909 43.4712 8.45408C43.2975 8.67681 43.1455 8.89954 43.0369 9.21136C42.939 9.52794 42.8949 9.85944 42.9066 10.1914ZM56.6541 7.98636C56.0026 7.98636 55.3945 8.09772 54.8515 8.32045C54.3736 8.48572 53.9666 8.81646 53.7005 9.2559V14.7573H50.9857V5.60317H53.4833V7.42954C53.7873 6.8059 54.1783 6.3159 54.6778 5.98181C55.1556 5.62545 55.6551 5.44726 56.1981 5.42499H56.4804L56.6541 5.44726V7.96408V7.98636ZM57.8486 16.1159C58.2263 16.2505 58.6217 16.3256 59.0214 16.3386C59.3472 16.3386 59.6078 16.2273 59.8033 16.0045C59.977 15.7818 60.129 15.3364 60.2811 14.7573L56.893 5.60317H59.6947L61.7579 12.3518L63.5605 5.60317H66.1015L62.6918 16.2273C62.1569 18.0318 60.3638 19.1157 58.5653 18.7218C58.3481 18.6773 58.0875 18.6104 57.8486 18.4991V16.1159ZM72.5301 14.9133C71.8568 14.9133 71.2487 14.7795 70.7492 14.4677C70.2417 14.1818 69.8208 13.758 69.533 13.2427V14.7573H67.1657V2.01727H69.9022V7.09545C70.4962 6.02938 71.6157 5.38681 72.8124 5.42499C73.3771 5.42499 73.8983 5.53636 74.3761 5.80363C74.8539 6.02636 75.2448 6.38272 75.614 6.8059C76.6831 8.32739 76.974 10.2831 76.3959 12.0623C76.1787 12.6414 75.8746 13.1536 75.5054 13.5768C74.7429 14.4342 73.6616 14.9198 72.5301 14.9133ZM71.7699 12.5745C72.6515 12.5764 73.4369 12.0037 73.7245 11.1491C74.043 10.2518 73.887 9.24956 73.3119 8.49863C72.9724 8.0401 72.4398 7.7753 71.8785 7.7859C71.4659 7.7859 71.0749 7.94181 70.7057 8.23136C70.3582 8.54317 70.0759 8.92181 69.8805 9.38954V11.305C70.2309 12.0628 70.9738 12.5476 71.7916 12.5523L71.7699 12.5745ZM78.0247 2.01727H80.7395V11.4832C80.7395 12.1959 81.0218 12.53 81.6082 12.53C81.9183 12.5309 82.2239 12.4545 82.4987 12.3073L82.8679 14.3786C82.1072 14.7203 81.2875 14.902 80.4572 14.9132C79.6753 14.9132 79.0672 14.6904 78.6546 14.2895C78.2202 13.8441 78.003 13.265 78.003 12.4632V2.01727H78.0247ZM87.9933 14.9132C87.3023 14.9255 86.6157 14.7968 85.9736 14.5345C84.8367 14.0789 83.9437 13.1469 83.5194 11.9732C82.8914 10.2226 83.2408 8.26037 84.4316 6.85045C84.8659 6.40499 85.3437 6.0709 85.9518 5.80363C86.5382 5.55863 87.2115 5.42499 87.9716 5.42499C89.2937 5.36117 90.5776 5.88947 91.49 6.87272C91.9243 7.2959 92.2066 7.80817 92.4238 8.36499C93.0767 10.1133 92.7249 12.0889 91.5117 13.4877C91.099 13.9332 90.5995 14.2895 89.9914 14.5345C89.3493 14.7968 88.6627 14.9255 87.9716 14.9132H87.9933ZM86.017 10.1914C86.017 10.9041 86.1907 11.4832 86.5599 11.9064C86.9509 12.3518 87.4287 12.5745 87.9933 12.5745C88.5382 12.5821 89.0571 12.3364 89.405 11.9064C89.5788 11.6836 89.7091 11.4609 89.8177 11.1491C89.9262 10.8595 89.9697 10.5254 89.9697 10.1914C89.9697 9.45636 89.7742 8.87726 89.405 8.45408C89.0358 8.00863 88.558 7.78589 87.9933 7.78589C87.4498 7.78464 86.9334 8.02909 86.5817 8.45408C86.4079 8.67681 86.2559 8.89954 86.1473 9.21136C86.0387 9.52317 86.017 9.83499 86.017 10.1914ZM100.112 14.7573L97.7882 11.06L96.8326 12.0845V14.7573H94.1178V2.01727H96.8326V9.38954L99.8514 5.60317H102.74L99.5256 9.54545L103.001 14.7573H100.112Z" fill="currentColor"></path>
|
|
4
4
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 1.71089C0 0.76599 0.76599 0 1.71089 0H17.1089C18.0538 0 18.8198 0.76599 18.8198 1.71089V17.1089C18.8198 18.0538 18.0538 18.8198 17.1089 18.8198H7.13145L4.57616 20.9297C4.24445 21.2036 3.74366 20.9676 3.74366 20.5375V18.8198H1.71089C0.76599 18.8198 0 18.0538 0 17.1089V1.71089ZM3.74233 3.10946H11.9675C13.7438 3.10946 15.1839 4.5495 15.1839 6.32587C15.1839 7.74936 14.2592 8.95687 12.9777 9.38045C14.4761 9.65447 15.6117 10.9667 15.6117 12.5443C15.6117 14.3207 14.1717 15.7607 12.3953 15.7607H3.74247V9.54229H3.74233V3.10946ZM10.583 6.00384H6.73607V7.93369H10.583C11.1159 7.93369 11.5479 7.50168 11.5479 6.96877C11.5479 6.43585 11.1159 6.00384 10.583 6.00384ZM6.73607 10.2925H10.9035C11.4956 10.2925 11.9757 10.7725 11.9757 11.3647C11.9757 11.9568 11.4956 12.4368 10.9035 12.4368H6.73607V10.2925Z" fill="currentColor"></path>
|
|
5
5
|
</svg>
|
|
6
|
-
`;function
|
|
6
|
+
`;function pe(e,t,s){const r="virtual:storyblok-init",o=`\0${r}`;return{name:"vite-plugin-storyblok-init",async resolveId(n){if(n===r)return o},async load(n){if(n===o)return`
|
|
7
7
|
import { storyblokInit, apiPlugin } from "@storyblok/astro";
|
|
8
8
|
const { storyblokApi } = storyblokInit({
|
|
9
9
|
accessToken: "${e}",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
apiOptions: ${JSON.stringify(s)},
|
|
12
12
|
});
|
|
13
13
|
export const storyblokApiInstance = storyblokApi;
|
|
14
|
-
`}}}function
|
|
14
|
+
`}}}function fe(e){const t="virtual:storyblok-options",s=`\0${t}`;return{name:"vite-plugin-storyblok-options",async resolveId(r){if(r===t)return s},async load(r){if(r===s)return`export default ${JSON.stringify(e)}`}}}function me(){if(!(globalThis!=null&&globalThis.storyblokApiInstance))throw new Error("storyblokApiInstance has not been initialized correctly");return globalThis.storyblokApiInstance}async function ye(e){let t=null;return e&&e.locals._storyblok_preview_data&&(t=e.locals._storyblok_preview_data),t}function ge(e){return typeof e=="object"?`const storyblokInstance = new StoryblokBridge(${JSON.stringify(e)});`:"const storyblokInstance = new StoryblokBridge();"}function be(e){return e.endsWith(".astro")?e:`${e}.astro`}function U(e){return`/${e.trim().replace(/^\/+/,"").replace(/\/+$/,"").replace(/\/{2,}/g,"/")}`}const Ce=/[\p{Lu}]/u,ve=/[\p{Ll}]/u,J=/^[\p{Lu}](?![\p{Lu}])/gu,W=/([\p{Alpha}\p{N}_]|$)/u,V=/[_.\- ]+/,ke=new RegExp("^"+V.source),Y=new RegExp(V.source+W.source,"gu"),K=new RegExp("\\d+"+W.source,"gu"),we=(e,t,s,r)=>{let o=!1,n=!1,a=!1,l=!1;for(let c=0;c<e.length;c++){const u=e[c];l=c>2?e[c-3]==="-":!0,o&&Ce.test(u)?(e=e.slice(0,c)+"-"+e.slice(c),o=!1,a=n,n=!0,c++):n&&a&&ve.test(u)&&(!l||r)?(e=e.slice(0,c-1)+"-"+e.slice(c-1),a=n,n=!1,o=!0):(o=t(u)===u&&s(u)!==u,a=n,n=s(u)===u&&t(u)!==u)}return e},Le=(e,t)=>(J.lastIndex=0,e.replaceAll(J,s=>t(s))),Ae=(e,t)=>(Y.lastIndex=0,K.lastIndex=0,e.replaceAll(K,(s,r,o)=>["_","-"].includes(e.charAt(o+s.length))?s:t(s)).replaceAll(Y,(s,r)=>t(r)));function Ee(e,t){if(!(typeof e=="string"||Array.isArray(e)))throw new TypeError("Expected the input to be `string | string[]`");if(t={pascalCase:!1,preserveConsecutiveUppercase:!1,...t},Array.isArray(e)?e=e.map(n=>n.trim()).filter(n=>n.length).join("-"):e=e.trim(),e.length===0)return"";const s=t.locale===!1?n=>n.toLowerCase():n=>n.toLocaleLowerCase(t.locale),r=t.locale===!1?n=>n.toUpperCase():n=>n.toLocaleUpperCase(t.locale);return e.length===1?V.test(e)?"":t.pascalCase?r(e):s(e):(e!==s(e)&&(e=we(e,s,r,t.preserveConsecutiveUppercase)),e=e.replace(ke,""),e=t.preserveConsecutiveUppercase?Le(e,s):s(e),t.pascalCase&&(e=r(e.charAt(0))+e.slice(1)),Ae(e,r))}function X(e){return Ee(e)}function Re(e,t,s,r){const o="virtual:import-storyblok-components",n=`\0${o}`;return{name:"vite-plugin-import-storyblok-components",async resolveId(a){if(a===o)return n},async load(a){if(a!==n)return;const l=await _e(this,t,s,r),c=await Se(this,e,t,s);return Te(t,l,c)}}}function Te(e,t,s){const o=`${U(e)}/storyblok/**/*.astro`;return`
|
|
15
15
|
// Import utilities and fallback component
|
|
16
16
|
import { toCamelCase } from '@storyblok/astro';
|
|
17
17
|
${t}
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
|
|
48
48
|
// Export the components object for use in Storyblok initialization
|
|
49
49
|
export { storyblokComponents };
|
|
50
|
-
`.trim()}async function
|
|
50
|
+
`.trim()}async function _e(e,t,s,r){if(!s)return"";if(r){const o=Q(t,r);if(!await e.resolve(o))throw new Error(`Custom fallback component could not be found. Does "${o}" exist?`);return`import FallbackComponent from '${o}';`}return"import FallbackComponent from '@storyblok/astro/FallbackComponent.astro';"}async function Se(e,t,s,r){const o=[];for await(const[n,a]of Object.entries(t)){const l=Q(s,a),c=await e.resolve(l);if(c)o.push(`import ${X(n)} from "${c.id}"`);else if(!r)throw new Error(`Component could not be found for blok "${n}"! Does "${l}" exist?`)}return o}function Q(e,t){const r=`${U(e)}${U(t)}`;return be(r)}function $e(e){const t={useCustomApi:!1,bridge:!0,componentsDir:"src",enableFallbackComponent:!1,livePreview:!1,...e},{accessToken:s,useCustomApi:r,apiOptions:o,componentsDir:n,customFallbackComponent:a,enableFallbackComponent:l,components:c,bridge:u,livePreview:g}=t,d=ge(t.bridge);return{name:"@storyblok/astro",hooks:{"astro:config:setup":({injectScript:C,updateConfig:T,addDevToolbarApp:w,addMiddleware:_,config:M})=>{if(T({vite:{plugins:[pe(s,r,o),Re(c||{},n,l,a),fe(t)]}}),g&&(M==null?void 0:M.output)!=="server")throw new Error("To utilize the Astro Storyblok Live feature, Astro must be configured to run in SSR mode. Please disable this feature or switch Astro to SSR mode.");C("page-ssr",`
|
|
51
51
|
import { storyblokApiInstance } from "virtual:storyblok-init";
|
|
52
52
|
globalThis.storyblokApiInstance = storyblokApiInstance;
|
|
53
53
|
`),u&&!g&&C("page",`import { loadStoryblokBridge } from "@storyblok/astro";
|
|
@@ -66,4 +66,4 @@
|
|
|
66
66
|
${d}
|
|
67
67
|
storyblokInstance.on(["published", "change", "input"], handleStoryblokMessage);
|
|
68
68
|
});
|
|
69
|
-
`),_({entrypoint:"@storyblok/astro/middleware.ts",order:"pre"})),w({id:"storyblok",name:"Storyblok",icon:$,entrypoint:"@storyblok/astro/toolbarApp.ts"})}}}}let te;async function Oe(e){const{action:t,story:s}=e||{};if(t==="input"&&s){const r=async()=>{se("storyblok-live-preview-updating",{story:s});const n=await Pe(s),a=document.body;if(n.outerHTML===a.outerHTML)return;const l=document.querySelector('[data-blok-focused="true"]');Me(a,n,l),se("storyblok-live-preview-updated",{story:s})};clearTimeout(te),te=setTimeout(r,500)}["published","change"].includes(e==null?void 0:e.action)&&location.reload()}function Me(e,t,s){if(s){const r=s.getAttribute("data-blok-uid"),o=t.querySelector(`[data-blok-uid="${r}"]`);o&&(o.setAttribute("data-blok-focused","true"),s.replaceWith(o))}else e.replaceWith(t)}async function Pe(e){const s=await(await fetch(location.href,{method:"POST",body:JSON.stringify({...e,is_storyblok_preview:!0}),headers:{"Content-Type":"application/json"}})).text();return new DOMParser().parseFromString(s,"text/html").body}function se(e,t){document.dispatchEvent(new CustomEvent(e,{detail:t}))}var xe=Object.defineProperty,He=(e,t,s)=>t in e?xe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,m=(e,t,s)=>He(e,typeof t!="symbol"?t+"":t,s);let k=function(e){return e.DOCUMENT="doc",e.HEADING="heading",e.PARAGRAPH="paragraph",e.QUOTE="blockquote",e.OL_LIST="ordered_list",e.UL_LIST="bullet_list",e.LIST_ITEM="list_item",e.CODE_BLOCK="code_block",e.HR="horizontal_rule",e.BR="hard_break",e.IMAGE="image",e.EMOJI="emoji",e.COMPONENT="blok",e.TABLE="table",e.TABLE_ROW="tableRow",e.TABLE_CELL="tableCell",e.TABLE_HEADER="tableHeader",e}({}),E=function(e){return e.BOLD="bold",e.STRONG="strong",e.STRIKE="strike",e.UNDERLINE="underline",e.ITALIC="italic",e.CODE="code",e.LINK="link",e.ANCHOR="anchor",e.STYLED="styled",e.SUPERSCRIPT="superscript",e.SUBSCRIPT="subscript",e.TEXT_STYLE="textStyle",e.HIGHLIGHT="highlight",e}({}),Ne=function(e){return e.TEXT="text",e}({}),x=function(e){return e.URL="url",e.STORY="story",e.ASSET="asset",e.EMAIL="email",e}({});const je=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],De=(e={})=>{const{custom:t,...s}=e,r={...s,...t};return Object.keys(r).map(o=>`${o}="${r[o]}"`).join(" ")},Ue=(e={})=>Object.keys(e).map(t=>`${t}: ${e[t]}`).join("; ");function Ve(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const I=e=>Object.fromEntries(Object.entries(e).filter(([t,s])=>s!==void 0));function Be(e,t){if(!t)return{src:e,attrs:{}};let s=0,r=0;const o={},n=[];function a(c,u,g,d,C){typeof c!="number"||c<=u||c>=g?console.warn(`[StoryblokRichText] - ${d.charAt(0).toUpperCase()+d.slice(1)} value must be a number between ${u} and ${g} (inclusive)`):C.push(`${d}(${c})`)}if(typeof t=="object"){if(t.width!==void 0&&(typeof t.width=="number"&&t.width>=0?(o.width=t.width,s=t.width):console.warn("[StoryblokRichText] - Width value must be a number greater than or equal to 0")),t.height!==void 0&&(typeof t.height=="number"&&t.height>=0?(o.height=t.height,r=t.height):console.warn("[StoryblokRichText] - Height value must be a number greater than or equal to 0")),t.height===0&&t.width===0&&(delete o.width,delete o.height,console.warn("[StoryblokRichText] - Width and height values cannot both be 0")),t.loading&&["lazy","eager"].includes(t.loading)&&(o.loading=t.loading),t.class&&(o.class=t.class),t.filters){const{filters:c}=t||{},{blur:u,brightness:g,fill:d,format:C,grayscale:T,quality:w,rotate:_}=c||{};u&&a(u,0,100,"blur",n),w&&a(w,0,100,"quality",n),g&&a(g,0,100,"brightness",n),d&&n.push(`fill(${d})`),T&&n.push("grayscale()"),_&&[0,90,180,270].includes(t.filters.rotate||0)&&n.push(`rotate(${_})`),C&&["webp","png","jpeg"].includes(C)&&n.push(`format(${C})`)}t.srcset&&(o.srcset=t.srcset.map(c=>{if(typeof c=="number")return`${e}/m/${c}x0/${n.length>0?`filters:${n.join(":")}`:""} ${c}w`;if(Array.isArray(c)&&c.length===2){const[u,g]=c;return`${e}/m/${u}x${g}/${n.length>0?`filters:${n.join(":")}`:""} ${u}w`}else{console.warn("[StoryblokRichText] - srcset entry must be a number or a tuple of two numbers");return}}).join(", ")),t.sizes&&(o.sizes=t.sizes.join(", "))}let l=`${e}/m/`;return(s>0||r>0)&&(l=`${l}${s}x${r}/`),n.length>0&&(l=`${l}filters:${n.join(":")}`),{src:l,attrs:o}}function re(e,t={},s){const r=De(t),o=r?`${e} ${r}`:e,n=Array.isArray(s)?s.join(""):s||"";if(e){if(je.includes(e))return`<${o}>`}else return n;return`<${o}>${n}</${e}>`}function oe(e={}){const t=new Map,{renderFn:s=re,textFn:r=Ve,resolvers:o={},optimizeImages:n=!1,keyedResolvers:a=!1}=e,l=s!==re,c=(i={})=>{const{textAlign:h,class:p,id:f,style:y,...v}=i,b=[];return y&&b.push(y.endsWith(";")?y:`${y};`),h&&b.push(`text-align: ${h};`),I({...v,class:p,id:f,...b.length>0?{style:b.join(" ")}:{}})},u=i=>(h,p)=>{const f=c(h.attrs);return p.render(i,f,h.children||null)},g=(i,h)=>{const{src:p,alt:f,title:y,srcset:v,sizes:b}=i.attrs||{};let R=p,A={};if(n){const{src:vt,attrs:kt}=Be(p,n);R=vt,A=kt}const P={src:R,alt:f,title:y,srcset:v,sizes:b,...A};return h.render("img",I(P))},d=(i,h)=>{const{level:p,...f}=i.attrs||{},y=c(f);return h.render(`h${p}`,y,i.children)},C=(i,h)=>{var p,f,y,v;const b=h.render("img",{src:(p=i.attrs)==null?void 0:p.fallbackImage,alt:(f=i.attrs)==null?void 0:f.alt,style:"width: 1.25em; height: 1.25em; vertical-align: text-top",draggable:"false",loading:"lazy"});return h.render("span",{"data-type":"emoji","data-name":(y=i.attrs)==null?void 0:y.name,"data-emoji":(v=i.attrs)==null?void 0:v.emoji},b)},T=(i,h)=>h.render("pre",i.attrs||{},h.render("code",{},i.children||"")),w=(i,h=!1)=>({text:p,attrs:f},y)=>{const{class:v,id:b,...R}=f||{},A=h?{class:v,id:b,style:Ue(R)||void 0}:f||{};return y.render(i,I(A),p)},_=i=>J(i),M=i=>{const{marks:h,...p}=i;if("text"in i){if(h)return h.reduce((y,v)=>_({...v,text:y}),_({...p,children:p.children}));const f=i.attrs||{};if(a){const y=t.get("txt")||0;t.set("txt",y+1),f.key=`txt-${y}`}return r(p.text,f)}return""},he=(i,h)=>{const{linktype:p,href:f,anchor:y,...v}=i.attrs||{};let b="";switch(p){case x.ASSET:case x.URL:b=f;break;case x.EMAIL:b=`mailto:${f}`;break;case x.STORY:b=f,y&&(b=`${b}#${y}`);break;default:b=f;break}const R={...v};return b&&(R.href=b),h.render("a",R,i.text)},ft=(i,h)=>{var p,f;return console.warn("[StoryblokRichtText] - BLOK resolver is not available for vanilla usage"),h.render("span",{blok:(p=i==null?void 0:i.attrs)==null?void 0:p.body[0],id:(f=i.attrs)==null?void 0:f.id,style:"display: none"})},mt=(i,h)=>{const p=c(i.attrs),f=i.children||null;return h.render("table",p,h.render("tbody",{},f))},yt=(i,h)=>{const p=c(i.attrs);return h.render("tr",p,i.children)},gt=(i,h)=>{const{colspan:p,rowspan:f,colwidth:y,backgroundColor:v,textAlign:b,...R}=i.attrs||{},A=[];y&&A.push(`width: ${y}px;`),v&&A.push(`background-color: ${v};`),b&&A.push(`text-align: ${b};`);const P={...R,...p>1?{colspan:p}:{},...f>1?{rowspan:f}:{},...A.length>0?{style:A.join(" ")}:{}};return h.render("td",I(P),i.children)},bt=(i,h)=>{const{colspan:p,rowspan:f,colwidth:y,backgroundColor:v,textAlign:b,...R}=i.attrs||{},A=[];y&&A.push(`width: ${y}px;`),v&&A.push(`background-color: ${v};`),b&&A.push(`text-align: ${b};`);const P={...R,...p>1?{colspan:p}:{},...f>1?{rowspan:f}:{},...A.length>0?{style:A.join(" ")}:{}};return h.render("th",I(P),i.children)},de=new Map([[k.DOCUMENT,u("")],[k.HEADING,d],[k.PARAGRAPH,u("p")],[k.UL_LIST,u("ul")],[k.OL_LIST,u("ol")],[k.LIST_ITEM,u("li")],[k.IMAGE,g],[k.EMOJI,C],[k.CODE_BLOCK,T],[k.HR,u("hr")],[k.BR,u("br")],[k.QUOTE,u("blockquote")],[k.COMPONENT,ft],[Ne.TEXT,M],[E.LINK,he],[E.ANCHOR,he],[E.STYLED,w("span",!0)],[E.BOLD,w("strong")],[E.TEXT_STYLE,w("span",!0)],[E.ITALIC,w("em")],[E.UNDERLINE,w("u")],[E.STRIKE,w("s")],[E.CODE,w("code")],[E.SUPERSCRIPT,w("sup")],[E.SUBSCRIPT,w("sub")],[E.HIGHLIGHT,w("mark")],[k.TABLE,mt],[k.TABLE_ROW,yt],[k.TABLE_CELL,gt],[k.TABLE_HEADER,bt]]),pe=new Map([...de,...Object.entries(o).map(([i,h])=>[i,h])]),Ct=()=>({render:(i,h={},p)=>{if(a&&i){const f=t.get(i)||0;t.set(i,f+1),h.key=`${i}-${f}`}return s(i,h,p)},originalResolvers:de,mergedResolvers:pe});function D(i){const h=pe.get(i.type);if(!h)return console.error("<Storyblok>",`No resolver found for node type ${i.type}`),"";const p=Ct();if(i.type==="text")return h(i,p);const f=i.content?i.content.map(J):void 0;return h({...i,children:f},p)}function J(i){return i.type==="doc"?l?i.content.map(D):i.content.map(D).join(""):Array.isArray(i)?i.map(D):D(i)}return{render:J}}let ne=!1;const ie=[],ae=e=>new Promise((t,s)=>{if(typeof window>"u"){s(new Error("Cannot load Storyblok bridge: window is undefined (server-side environment)"));return}if(window.storyblokRegisterEvent=o=>{if(!window.location.search.includes("_storyblok")){console.warn("You are not in Draft Mode or in the Visual Editor.");return}ne?o():ie.push(o)},document.getElementById("storyblok-javascript-bridge")){t(void 0);return}const r=document.createElement("script");r.async=!0,r.src=e,r.id="storyblok-javascript-bridge",r.onerror=o=>s(o),r.onload=o=>{ie.forEach(n=>n()),ne=!0,t(o)},document.getElementsByTagName("head")[0].appendChild(r)}),B=(e="")=>e.includes("/cdn/"),Fe=(e,t=25,s=1)=>({...e,per_page:t,page:s}),qe=e=>new Promise(t=>setTimeout(t,e)),Ge=(e=0,t)=>Array.from({length:e},t),ze=(e=0,t=e)=>{const s=Math.abs(t-e)||0,r=e<t?1:-1;return Ge(s,(o,n)=>n*r+e)},Ze=async(e,t)=>Promise.all(e.map(t)),Je=(e=[],t)=>e.map(t).reduce((s,r)=>[...s,...r],[]),F=(e,t,s)=>{const r=[];for(const o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;const n=e[o];if(n==null)continue;const a=s?"":encodeURIComponent(o);let l;typeof n=="object"?l=F(n,t?t+encodeURIComponent(`[${a}]`):a,Array.isArray(n)):l=`${t?t+encodeURIComponent(`[${a}]`):a}=${encodeURIComponent(n)}`,r.push(l)}return r.join("&")},le=e=>{const t={eu:"api.storyblok.com",us:"api-us.storyblok.com",cn:"app.storyblokchina.cn",ap:"api-ap.storyblok.com",ca:"api-ca.storyblok.com"};return t[e]??t.eu};var We=class{constructor(e){m(this,"baseURL"),m(this,"timeout"),m(this,"headers"),m(this,"responseInterceptor"),m(this,"fetch"),m(this,"ejectInterceptor"),m(this,"url"),m(this,"parameters"),m(this,"fetchOptions"),this.baseURL=e.baseURL,this.headers=e.headers||new Headers,this.timeout=e!=null&&e.timeout?e.timeout*1e3:0,this.responseInterceptor=e.responseInterceptor,this.fetch=(...t)=>e.fetch?e.fetch(...t):fetch(...t),this.ejectInterceptor=!1,this.url="",this.parameters={},this.fetchOptions={}}get(e,t){return this.url=e,this.parameters=t,this._methodHandler("get")}post(e,t){return this.url=e,this.parameters=t,this._methodHandler("post")}put(e,t){return this.url=e,this.parameters=t,this._methodHandler("put")}delete(e,t){return this.url=e,this.parameters=t??{},this._methodHandler("delete")}async _responseHandler(e){const t=[],s={data:{},headers:{},status:0,statusText:""};e.status!==204&&await e.json().then(r=>{s.data=r});for(const r of e.headers.entries())t[r[0]]=r[1];return s.headers={...t},s.status=e.status,s.statusText=e.statusText,s}async _methodHandler(e){let t=`${this.baseURL}${this.url}`,s=null;e==="get"?t=`${this.baseURL}${this.url}?${F(this.parameters)}`:s=JSON.stringify(this.parameters);const r=new URL(t),o=new AbortController,{signal:n}=o;let a=null;this.timeout&&(a=setTimeout(()=>o.abort(),this.timeout));try{const l=await this.fetch(`${r}`,{method:e,headers:this.headers,body:s,signal:n,...this.fetchOptions});this.timeout&&a&&clearTimeout(a);const c=await this._responseHandler(l);return this.responseInterceptor&&!this.ejectInterceptor?this._statusHandler(this.responseInterceptor(c)):this._statusHandler(c)}catch(l){return{message:l}}}setFetchOptions(e={}){Object.keys(e).length>0&&"method"in e&&delete e.method,this.fetchOptions={...e}}eject(){this.ejectInterceptor=!0}_normalizeErrorMessage(e){if(Array.isArray(e))return e[0]||"Unknown error";if(e&&typeof e=="object"){if(e.error)return e.error;for(const t in e){if(Array.isArray(e[t]))return`${t}: ${e[t][0]}`;if(typeof e[t]=="string")return`${t}: ${e[t]}`}if(e.slug)return e.slug}return"Unknown error"}_statusHandler(e){const t=/20[0-6]/g;return new Promise((s,r)=>{if(t.test(`${e.status}`))return s(e);const o={message:this._normalizeErrorMessage(e.data),status:e.status,response:e};r(o)})}},Ye=We;const ce="SB-Agent",q={defaultAgentName:"SB-JS-CLIENT",defaultAgentVersion:"SB-Agent-Version",packageVersion:"7.0.0"},ue={DRAFT:"draft",PUBLISHED:"published"},Ke=25,G={SMALL:25,MEDIUM:50,LARGE:75},O={SINGLE_OR_SMALL:50,MEDIUM:15,LARGE:10,VERY_LARGE:6},z=1e3,H=3;function Xe(e){return e.version===ue.DRAFT}function Qe(e,t){const s=e.includes("/cdn/stories/"),r=e.split("/").length>3&&!e.endsWith("/cdn/stories"),o="find_by"in t;return s&&r||o}function et(e){return e<=G.SMALL?O.SINGLE_OR_SMALL:e<=G.MEDIUM?O.MEDIUM:e<=G.LARGE?O.LARGE:O.VERY_LARGE}function N(e,t,s={},r){if(s.userRateLimit!==void 0)return Math.min(s.userRateLimit,z);if(s.serverHeadersRateLimit!==void 0)return Math.min(s.serverHeadersRateLimit,z);if(r!==void 0)return r;if(t&&!Xe(t))return z;if(Qe(e,t))return O.SINGLE_OR_SMALL;const o=t.per_page||Ke;return et(o)}function tt(e){if(!e)return null;const t=e["x-ratelimit"]||e["X-RateLimit"],s=e["x-ratelimit-policy"]||e["X-RateLimit-Policy"];if(!t&&!s)return null;const r={};if(t){const o=t.match(/r=(\d+)/);o&&(r.remaining=Number.parseInt(o[1],10))}if(s){const o=s.match(/q=(\d+)/);o&&(r.max=Number.parseInt(o[1],10))}return Object.keys(r).length>0?r:null}function st(e,t=!1){return{userRateLimit:e,serverHeadersRateLimit:void 0,isManagementApi:t}}var rt=class extends Error{constructor(e){super(e),this.name="AbortError"}};function ot(e,t,s){if(!Number.isFinite(t))throw new TypeError("Expected `limit` to be a finite number");if(!Number.isFinite(s))throw new TypeError("Expected `interval` to be a finite number");const r=[];let o=[],n=0,a=!1;const l=async()=>{n++;const u=r.shift();if(u)try{const d=await e(...u.args);u.resolve(d)}catch(d){u.reject(d)}const g=setTimeout(()=>{n--,r.length>0&&l(),o=o.filter(d=>d!==g)},s);o.includes(g)||o.push(g)},c=(...u)=>a?Promise.reject(new Error("Throttled function is already aborted and not accepting new promises")):new Promise((g,d)=>{r.push({resolve:g,reject:d,args:u}),n<t&&l()});return c.abort=()=>{a=!0,o.forEach(clearTimeout),o=[],r.forEach(u=>u.reject(()=>new rt("Throttle function aborted"))),r.length=0},c}var nt=ot,it=class{constructor(e,t=1e3){m(this,"queues"),m(this,"interval"),m(this,"throttledRequestFn"),this.queues=new Map,this.interval=t,this.throttledRequestFn=e}getQueue(e){let t=this.queues.get(e);return t||(t=nt(this.throttledRequestFn,e,this.interval),this.queues.set(e,t)),t}execute(e,...t){return this.getQueue(e)(...t)}abortAll(){this.queues.forEach(e=>{var t;(t=e.abort)==null||t.call(e)}),this.queues.clear()}getQueueCount(){return this.queues.size}};let j={};const S={};var at=class{constructor(e,t){m(this,"client"),m(this,"maxRetries"),m(this,"retriesDelay"),m(this,"throttleManager"),m(this,"accessToken"),m(this,"cache"),m(this,"resolveCounter"),m(this,"relations"),m(this,"links"),m(this,"version"),m(this,"rateLimitConfig"),m(this,"richTextResolver"),m(this,"resolveNestedRelations"),m(this,"stringifiedStoriesCache"),m(this,"inlineAssets");let s=e.endpoint||t;if(!s){const o=e.https===!1?"http":"https";e.oauthToken?s=`${o}://${le(e.region)}/v1`:s=`${o}://${le(e.region)}/v2`}const r=new Headers;r.set("Content-Type","application/json"),r.set("Accept","application/json"),e.headers&&(e.headers.constructor.name==="Headers"?e.headers.entries().toArray():Object.entries(e.headers)).forEach(([o,n])=>{r.set(o,n)}),r.has(ce)||(r.set(ce,q.defaultAgentName),r.set(q.defaultAgentVersion,q.packageVersion)),e.oauthToken&&r.set("Authorization",e.oauthToken),this.rateLimitConfig=st(e.rateLimit,!!e.oauthToken),this.maxRetries=e.maxRetries||10,this.retriesDelay=300,this.throttleManager=new it(this.throttledRequest.bind(this),1e3),this.accessToken=e.accessToken||"",this.relations={},this.links={},this.cache=e.cache||{clear:"manual"},this.resolveCounter=0,this.resolveNestedRelations=e.resolveNestedRelations||!0,this.stringifiedStoriesCache={},this.version=e.version||ue.PUBLISHED,this.inlineAssets=e.inlineAssets||!1,this.client=new Ye({baseURL:s,timeout:e.timeout||0,headers:r,responseInterceptor:e.responseInterceptor,fetch:e.fetch})}parseParams(e){return e.token||(e.token=this.getToken()),e.cv||(e.cv=S[e.token]),Array.isArray(e.resolve_relations)&&(e.resolve_relations=e.resolve_relations.join(",")),typeof e.resolve_relations<"u"&&(e.resolve_level=2),e}factoryParamOptions(e,t){return B(e)?this.parseParams(t):t}makeRequest(e,t,s,r,o){const n=this.factoryParamOptions(e,Fe(t,s,r));return this.cacheResponse(e,n,void 0,o)}get(e,t={},s){t||(t={});const r=`/${e}`;B(r)&&(t.version=t.version||this.version);const o=this.factoryParamOptions(r,t);return this.cacheResponse(r,o,void 0,s)}async getAll(e,t={},s,r){const o=(t==null?void 0:t.per_page)||25,n=`/${e}`.replace(/\/$/,""),a=s??n.substring(n.lastIndexOf("/")+1);t.version=t.version||this.version;const l=1,c=await this.makeRequest(n,t,o,l,r),u=c.total?Math.ceil(c.total/(c.perPage||o)):1,g=await Ze(ze(l,u),d=>this.makeRequest(n,t,o,d+1,r));return Je([c,...g],d=>Object.values(d.data[a]))}post(e,t={},s){const r=`/${e}`,o=N(void 0,void 0,this.rateLimitConfig,H);return this.throttleManager.execute(o,"post",r,t,s)}put(e,t={},s){const r=`/${e}`,o=N(void 0,void 0,this.rateLimitConfig,H);return this.throttleManager.execute(o,"put",r,t,s)}delete(e,t={},s){t||(t={});const r=`/${e}`,o=N(void 0,void 0,this.rateLimitConfig,H);return this.throttleManager.execute(o,"delete",r,t,s)}getStories(e={},t){return this._addResolveLevel(e),this.get("cdn/stories",e,t)}getStory(e,t={},s){return this._addResolveLevel(t),this.get(`cdn/stories/${e}`,t,s)}getToken(){return this.accessToken}ejectInterceptor(){this.client.eject()}_addResolveLevel(e){typeof e.resolve_relations<"u"&&(e.resolve_level=2)}_cleanCopy(e){return JSON.parse(JSON.stringify(e))}_insertLinks(e,t,s){const r=e[t];r&&r.fieldtype==="multilink"&&r.linktype==="story"&&typeof r.id=="string"&&this.links[s][r.id]?r.story=this._cleanCopy(this.links[s][r.id]):r&&r.linktype==="story"&&typeof r.uuid=="string"&&this.links[s][r.uuid]&&(r.story=this._cleanCopy(this.links[s][r.uuid]))}getStoryReference(e,t){return this.relations[e][t]?JSON.parse(this.stringifiedStoriesCache[t]||JSON.stringify(this.relations[e][t])):t}_resolveField(e,t,s){const r=e[t];typeof r=="string"?e[t]=this.getStoryReference(s,r):Array.isArray(r)&&(e[t]=r.map(o=>this.getStoryReference(s,o)).filter(Boolean))}_insertRelations(e,t,s,r){if(Array.isArray(s)?s.find(n=>n.endsWith(`.${t}`)):s.endsWith(`.${t}`)){this._resolveField(e,t,r);return}const o=e.component?`${e.component}.${t}`:t;(Array.isArray(s)?s.includes(o):s===o)&&this._resolveField(e,t,r)}iterateTree(e,t,s){const r=(o,n="")=>{if(!(!o||o._stopResolving)){if(Array.isArray(o))o.forEach((a,l)=>r(a,`${n}[${l}]`));else if(typeof o=="object")for(const a in o){const l=n?`${n}.${a}`:a;(o.component&&o._uid||o.type==="link")&&(this._insertRelations(o,a,t,s),this._insertLinks(o,a,s)),r(o[a],l)}}};r(e.content)}async resolveLinks(e,t,s){let r=[];if(e.link_uuids){const o=e.link_uuids.length,n=[],a=50;for(let l=0;l<o;l+=a){const c=Math.min(o,l+a);n.push(e.link_uuids.slice(l,c))}for(let l=0;l<n.length;l++)(await this.getStories({per_page:a,language:t.language,version:t.version,starts_with:t.starts_with,by_uuids:n[l].join(",")})).data.stories.forEach(c=>{r.push(c)})}else r=e.links;r.forEach(o=>{this.links[s][o.uuid]={...o,_stopResolving:!0}})}async resolveRelations(e,t,s){let r=[];if(e.rel_uuids){const o=e.rel_uuids.length,n=[],a=50;for(let l=0;l<o;l+=a){const c=Math.min(o,l+a);n.push(e.rel_uuids.slice(l,c))}for(let l=0;l<n.length;l++)(await this.getStories({per_page:a,language:t.language,version:t.version,starts_with:t.starts_with,by_uuids:n[l].join(","),excluding_fields:t.excluding_fields})).data.stories.forEach(c=>{r.push(c)});r.length>0&&(e.rels=r,delete e.rel_uuids)}else r=e.rels;r&&r.length>0&&r.forEach(o=>{this.relations[s][o.uuid]={...o,_stopResolving:!0}})}async resolveStories(e,t,s){var r,o;let n=[];if(this.links[s]={},this.relations[s]={},typeof t.resolve_relations<"u"&&t.resolve_relations.length>0&&(typeof t.resolve_relations=="string"&&(n=t.resolve_relations.split(",")),await this.resolveRelations(e,t,s)),t.resolve_links&&["1","story","url","link"].includes(t.resolve_links)&&((r=e.links)!=null&&r.length||(o=e.link_uuids)!=null&&o.length)&&await this.resolveLinks(e,t,s),this.resolveNestedRelations)for(const a in this.relations[s])this.iterateTree(this.relations[s][a],n,s);e.story?this.iterateTree(e.story,n,s):e.stories.forEach(a=>{this.iterateTree(a,n,s)}),this.stringifiedStoriesCache={},delete this.links[s],delete this.relations[s]}async cacheResponse(e,t,s,r){const o=F({url:e,params:t}),n=this.cacheProvider();if(t.version==="published"&&e!=="/cdn/spaces/me"){const c=await n.get(o);if(c)return Promise.resolve(c)}const a=!B(e)&&this.rateLimitConfig.isManagementApi?H:void 0,l=N(e,t,this.rateLimitConfig,a);return new Promise(async(c,u)=>{var g;try{const d=await this.throttleManager.execute(l,"get",e,t,r);if(d.status!==200)return u(d);let C={data:d.data,headers:d.headers};const T=tt(d.headers);if((T==null?void 0:T.max)!==void 0&&(this.rateLimitConfig.serverHeadersRateLimit=T.max),(g=d.headers)!=null&&g["per-page"]&&(C=Object.assign({},C,{perPage:d.headers["per-page"]?Number.parseInt(d.headers["per-page"]):0,total:d.headers["per-page"]?Number.parseInt(d.headers.total):0})),C.data.story||C.data.stories){const _=this.resolveCounter=++this.resolveCounter%1e3;await this.resolveStories(C.data,t,`${_}`),C=await this.processInlineAssets(C)}t.version==="published"&&e!=="/cdn/spaces/me"&&await n.set(o,C);const w=this.cache.clear==="onpreview"&&t.version==="draft"||this.cache.clear==="auto";return t.token&&C.data.cv&&(w&&S[t.token]&&S[t.token]!==C.data.cv&&await this.flushCache(),S[t.token]=C.data.cv),c(C)}catch(d){if(d.response&&d.status===429&&(s=typeof s>"u"?0:s+1,s<this.maxRetries))return console.log(`Hit rate limit. Retrying in ${this.retriesDelay/1e3} seconds.`),await qe(this.retriesDelay),this.cacheResponse(e,t,s).then(c).catch(u);u(d)}})}throttledRequest(e,t,s,r){return this.client.setFetchOptions(r),this.client[e](t,s)}cacheVersions(){return S}cacheVersion(){return S[this.accessToken]}setCacheVersion(e){this.accessToken&&(S[this.accessToken]=e)}clearCacheVersion(){this.accessToken&&(S[this.accessToken]=0)}cacheProvider(){switch(this.cache.type){case"memory":return{get(e){return Promise.resolve(j[e])},getAll(){return Promise.resolve(j)},set(e,t){return j[e]=t,Promise.resolve(void 0)},flush(){return j={},Promise.resolve(void 0)}};case"custom":if(this.cache.custom)return this.cache.custom;default:return{get(){return Promise.resolve()},getAll(){return Promise.resolve(void 0)},set(){return Promise.resolve(void 0)},flush(){return Promise.resolve(void 0)}}}}async flushCache(){return await this.cacheProvider().flush(),this.clearCacheVersion(),this}async processInlineAssets(e){if(!this.inlineAssets)return e;const t=s=>{if(!s||typeof s!="object")return s;if(Array.isArray(s))return s.map(o=>t(o));let r={...s};r.fieldtype==="asset"&&Array.isArray(e.data.assets)&&(r={...e.data.assets.find(o=>o.id===r.id),...r});for(const o in r)typeof r[o]=="object"&&(r[o]=t(r[o]));return r};return e.data.story&&(e.data.story.content=t(e.data.story.content)),e.data.stories&&(e.data.stories=e.data.stories.map(s=>(s.content=t(s.content),s))),e}},lt=at;const ct=(e={})=>{const{apiOptions:t}=e;if(!t||!t.accessToken){console.error("You need to provide an access token to interact with Storyblok API. Read https://www.storyblok.com/docs/api/content-delivery#topics/authentication");return}return{storyblokApi:new lt(t)}},ut=e=>{if(typeof e!="object"||typeof e._editable>"u")return{};try{const t=JSON.parse(e._editable.replace(/^<!--#storyblok#/,"").replace(/-->$/,""));return t?{"data-blok-c":JSON.stringify(t),"data-blok-uid":`${t.id}-${t.uid}`}:{}}catch{return{}}};let Z="https://app.storyblok.com/f/storyblok-v2-latest.js";const ht=(e={})=>{var t,s;const{bridge:r,accessToken:o,use:n=[],apiOptions:a={},bridgeUrl:l}=e;a.accessToken=a.accessToken||o;const c={bridge:r,apiOptions:a};let u={};n.forEach(d=>{u={...u,...d(c)}}),l&&(Z=l);const g=!(typeof window>"u")&&((s=(t=window.location)==null?void 0:t.search)==null?void 0:s.includes("_storyblok_tk"));return r!==!1&&g&&ae(Z),u};function dt(e,t){return oe(t).render(e)}const pt=()=>ae(Z);L.apiPlugin=ct,L.getLiveStory=ge,L.handleStoryblokMessage=Oe,L.loadStoryblokBridge=pt,L.renderRichText=dt,L.richTextResolver=oe,L.storyblok=Ie,L.storyblokEditable=ut,L.storyblokInit=ht,L.toCamelCase=Q,L.useStoryblokApi=ye,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
|
|
69
|
+
`),_({entrypoint:"@storyblok/astro/middleware.ts",order:"pre"})),w({id:"storyblok",name:"Storyblok",icon:$,entrypoint:"@storyblok/astro/toolbarApp.ts"})}}}}let ee;async function Ie(e){const{action:t,story:s}=e||{};if(t==="input"&&s){const r=async()=>{te("storyblok-live-preview-updating",{story:s});const n=await Me(s),a=document.body;if(n.outerHTML===a.outerHTML)return;const l=document.querySelector('[data-blok-focused="true"]');Oe(a,n,l),te("storyblok-live-preview-updated",{story:s})};clearTimeout(ee),ee=setTimeout(r,500)}["published","change"].includes(e==null?void 0:e.action)&&location.reload()}function Oe(e,t,s){if(s){const r=s.getAttribute("data-blok-uid"),o=t.querySelector(`[data-blok-uid="${r}"]`);o&&(o.setAttribute("data-blok-focused","true"),s.replaceWith(o))}else e.replaceWith(t)}async function Me(e){const s=await(await fetch(location.href,{method:"POST",body:JSON.stringify({...e,is_storyblok_preview:!0}),headers:{"Content-Type":"application/json"}})).text();return new DOMParser().parseFromString(s,"text/html").body}function te(e,t){document.dispatchEvent(new CustomEvent(e,{detail:t}))}var Pe=Object.defineProperty,xe=(e,t,s)=>t in e?Pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,m=(e,t,s)=>xe(e,typeof t!="symbol"?t+"":t,s);let k=function(e){return e.DOCUMENT="doc",e.HEADING="heading",e.PARAGRAPH="paragraph",e.QUOTE="blockquote",e.OL_LIST="ordered_list",e.UL_LIST="bullet_list",e.LIST_ITEM="list_item",e.CODE_BLOCK="code_block",e.HR="horizontal_rule",e.BR="hard_break",e.IMAGE="image",e.EMOJI="emoji",e.COMPONENT="blok",e.TABLE="table",e.TABLE_ROW="tableRow",e.TABLE_CELL="tableCell",e.TABLE_HEADER="tableHeader",e}({}),E=function(e){return e.BOLD="bold",e.STRONG="strong",e.STRIKE="strike",e.UNDERLINE="underline",e.ITALIC="italic",e.CODE="code",e.LINK="link",e.ANCHOR="anchor",e.STYLED="styled",e.SUPERSCRIPT="superscript",e.SUBSCRIPT="subscript",e.TEXT_STYLE="textStyle",e.HIGHLIGHT="highlight",e}({}),He=function(e){return e.TEXT="text",e}({}),x=function(e){return e.URL="url",e.STORY="story",e.ASSET="asset",e.EMAIL="email",e}({});const Ne=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],je=(e={})=>{const{custom:t,...s}=e,r={...s,...t};return Object.keys(r).map(o=>`${o}="${r[o]}"`).join(" ")},De=(e={})=>Object.keys(e).map(t=>`${t}: ${e[t]}`).join("; ");function Ue(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const I=e=>Object.fromEntries(Object.entries(e).filter(([t,s])=>s!==void 0));function Ve(e,t){if(!t)return{src:e,attrs:{}};let s=0,r=0;const o={},n=[];function a(c,u,g,d,C){typeof c!="number"||c<=u||c>=g?console.warn(`[StoryblokRichText] - ${d.charAt(0).toUpperCase()+d.slice(1)} value must be a number between ${u} and ${g} (inclusive)`):C.push(`${d}(${c})`)}if(typeof t=="object"){if(t.width!==void 0&&(typeof t.width=="number"&&t.width>=0?(o.width=t.width,s=t.width):console.warn("[StoryblokRichText] - Width value must be a number greater than or equal to 0")),t.height!==void 0&&(typeof t.height=="number"&&t.height>=0?(o.height=t.height,r=t.height):console.warn("[StoryblokRichText] - Height value must be a number greater than or equal to 0")),t.height===0&&t.width===0&&(delete o.width,delete o.height,console.warn("[StoryblokRichText] - Width and height values cannot both be 0")),t.loading&&["lazy","eager"].includes(t.loading)&&(o.loading=t.loading),t.class&&(o.class=t.class),t.filters){const{filters:c}=t||{},{blur:u,brightness:g,fill:d,format:C,grayscale:T,quality:w,rotate:_}=c||{};u&&a(u,0,100,"blur",n),w&&a(w,0,100,"quality",n),g&&a(g,0,100,"brightness",n),d&&n.push(`fill(${d})`),T&&n.push("grayscale()"),_&&[0,90,180,270].includes(t.filters.rotate||0)&&n.push(`rotate(${_})`),C&&["webp","png","jpeg"].includes(C)&&n.push(`format(${C})`)}t.srcset&&(o.srcset=t.srcset.map(c=>{if(typeof c=="number")return`${e}/m/${c}x0/${n.length>0?`filters:${n.join(":")}`:""} ${c}w`;if(Array.isArray(c)&&c.length===2){const[u,g]=c;return`${e}/m/${u}x${g}/${n.length>0?`filters:${n.join(":")}`:""} ${u}w`}else{console.warn("[StoryblokRichText] - srcset entry must be a number or a tuple of two numbers");return}}).join(", ")),t.sizes&&(o.sizes=t.sizes.join(", "))}let l=`${e}/m/`;return(s>0||r>0)&&(l=`${l}${s}x${r}/`),n.length>0&&(l=`${l}filters:${n.join(":")}`),{src:l,attrs:o}}function se(e,t={},s){const r=je(t),o=r?`${e} ${r}`:e,n=Array.isArray(s)?s.join(""):s||"";if(e){if(Ne.includes(e))return`<${o}>`}else return n;return`<${o}>${n}</${e}>`}function re(e={}){const t=new Map,{renderFn:s=se,textFn:r=Ue,resolvers:o={},optimizeImages:n=!1,keyedResolvers:a=!1}=e,l=s!==se,c=(i={})=>{const{textAlign:h,class:p,id:f,style:y,...v}=i,b=[];return y&&b.push(y.endsWith(";")?y:`${y};`),h&&b.push(`text-align: ${h};`),I({...v,class:p,id:f,...b.length>0?{style:b.join(" ")}:{}})},u=i=>(h,p)=>{const f=c(h.attrs);return p.render(i,f,h.children||null)},g=(i,h)=>{const{src:p,alt:f,title:y,srcset:v,sizes:b}=i.attrs||{};let R=p,A={};if(n){const{src:Ct,attrs:vt}=Ve(p,n);R=Ct,A=vt}const P={src:R,alt:f,title:y,srcset:v,sizes:b,...A};return h.render("img",I(P))},d=(i,h)=>{const{level:p,...f}=i.attrs||{},y=c(f);return h.render(`h${p}`,y,i.children)},C=(i,h)=>{var p,f,y,v;const b=h.render("img",{src:(p=i.attrs)==null?void 0:p.fallbackImage,alt:(f=i.attrs)==null?void 0:f.alt,style:"width: 1.25em; height: 1.25em; vertical-align: text-top",draggable:"false",loading:"lazy"});return h.render("span",{"data-type":"emoji","data-name":(y=i.attrs)==null?void 0:y.name,"data-emoji":(v=i.attrs)==null?void 0:v.emoji},b)},T=(i,h)=>h.render("pre",i.attrs||{},h.render("code",{},i.children||"")),w=(i,h=!1)=>({text:p,attrs:f},y)=>{const{class:v,id:b,...R}=f||{},A=h?{class:v,id:b,style:De(R)||void 0}:f||{};return y.render(i,I(A),p)},_=i=>Z(i),M=i=>{const{marks:h,...p}=i;if("text"in i){if(h)return h.reduce((y,v)=>_({...v,text:y}),_({...p,children:p.children}));const f=i.attrs||{};if(a){const y=t.get("txt")||0;t.set("txt",y+1),f.key=`txt-${y}`}return r(p.text,f)}return""},ue=(i,h)=>{const{linktype:p,href:f,anchor:y,...v}=i.attrs||{};let b="";switch(p){case x.ASSET:case x.URL:b=f;break;case x.EMAIL:b=`mailto:${f}`;break;case x.STORY:b=f,y&&(b=`${b}#${y}`);break;default:b=f;break}const R={...v};return b&&(R.href=b),h.render("a",R,i.text)},pt=(i,h)=>{var p,f;return console.warn("[StoryblokRichtText] - BLOK resolver is not available for vanilla usage"),h.render("span",{blok:(p=i==null?void 0:i.attrs)==null?void 0:p.body[0],id:(f=i.attrs)==null?void 0:f.id,style:"display: none"})},ft=(i,h)=>{const p=c(i.attrs),f=i.children||null;return h.render("table",p,h.render("tbody",{},f))},mt=(i,h)=>{const p=c(i.attrs);return h.render("tr",p,i.children)},yt=(i,h)=>{const{colspan:p,rowspan:f,colwidth:y,backgroundColor:v,textAlign:b,...R}=i.attrs||{},A=[];y&&A.push(`width: ${y}px;`),v&&A.push(`background-color: ${v};`),b&&A.push(`text-align: ${b};`);const P={...R,...p>1?{colspan:p}:{},...f>1?{rowspan:f}:{},...A.length>0?{style:A.join(" ")}:{}};return h.render("td",I(P),i.children)},gt=(i,h)=>{const{colspan:p,rowspan:f,colwidth:y,backgroundColor:v,textAlign:b,...R}=i.attrs||{},A=[];y&&A.push(`width: ${y}px;`),v&&A.push(`background-color: ${v};`),b&&A.push(`text-align: ${b};`);const P={...R,...p>1?{colspan:p}:{},...f>1?{rowspan:f}:{},...A.length>0?{style:A.join(" ")}:{}};return h.render("th",I(P),i.children)},he=new Map([[k.DOCUMENT,u("")],[k.HEADING,d],[k.PARAGRAPH,u("p")],[k.UL_LIST,u("ul")],[k.OL_LIST,u("ol")],[k.LIST_ITEM,u("li")],[k.IMAGE,g],[k.EMOJI,C],[k.CODE_BLOCK,T],[k.HR,u("hr")],[k.BR,u("br")],[k.QUOTE,u("blockquote")],[k.COMPONENT,pt],[He.TEXT,M],[E.LINK,ue],[E.ANCHOR,ue],[E.STYLED,w("span",!0)],[E.BOLD,w("strong")],[E.TEXT_STYLE,w("span",!0)],[E.ITALIC,w("em")],[E.UNDERLINE,w("u")],[E.STRIKE,w("s")],[E.CODE,w("code")],[E.SUPERSCRIPT,w("sup")],[E.SUBSCRIPT,w("sub")],[E.HIGHLIGHT,w("mark")],[k.TABLE,ft],[k.TABLE_ROW,mt],[k.TABLE_CELL,yt],[k.TABLE_HEADER,gt]]),de=new Map([...he,...Object.entries(o).map(([i,h])=>[i,h])]),bt=()=>({render:(i,h={},p)=>{if(a&&i){const f=t.get(i)||0;t.set(i,f+1),h.key=`${i}-${f}`}return s(i,h,p)},originalResolvers:he,mergedResolvers:de});function D(i){const h=de.get(i.type);if(!h)return console.error("<Storyblok>",`No resolver found for node type ${i.type}`),"";const p=bt();if(i.type==="text")return h(i,p);const f=i.content?i.content.map(Z):void 0;return h({...i,children:f},p)}function Z(i){return i.type==="doc"?l?i.content.map(D):i.content.map(D).join(""):Array.isArray(i)?i.map(D):D(i)}return{render:Z}}let oe=!1;const ne=[],ie=e=>new Promise((t,s)=>{if(typeof window>"u"){s(new Error("Cannot load Storyblok bridge: window is undefined (server-side environment)"));return}if(window.storyblokRegisterEvent=o=>{if(!window.location.search.includes("_storyblok")){console.warn("You are not in Draft Mode or in the Visual Editor.");return}oe?o():ne.push(o)},document.getElementById("storyblok-javascript-bridge")){t(void 0);return}const r=document.createElement("script");r.async=!0,r.src=e,r.id="storyblok-javascript-bridge",r.onerror=o=>s(o),r.onload=o=>{ne.forEach(n=>n()),oe=!0,t(o)},document.getElementsByTagName("head")[0].appendChild(r)}),B=(e="")=>e.includes("/cdn/"),Be=(e,t=25,s=1)=>({...e,per_page:t,page:s}),qe=e=>new Promise(t=>setTimeout(t,e)),Fe=(e=0,t)=>Array.from({length:e},t),Ge=(e=0,t=e)=>{const s=Math.abs(t-e)||0,r=e<t?1:-1;return Fe(s,(o,n)=>n*r+e)},ze=async(e,t)=>Promise.all(e.map(t)),Ze=(e=[],t)=>e.map(t).reduce((s,r)=>[...s,...r],[]),q=(e,t,s)=>{const r=[];for(const o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;const n=e[o];if(n==null)continue;const a=s?"":encodeURIComponent(o);let l;typeof n=="object"?l=q(n,t?t+encodeURIComponent(`[${a}]`):a,Array.isArray(n)):l=`${t?t+encodeURIComponent(`[${a}]`):a}=${encodeURIComponent(n)}`,r.push(l)}return r.join("&")},ae=e=>{const t={eu:"api.storyblok.com",us:"api-us.storyblok.com",cn:"app.storyblokchina.cn",ap:"api-ap.storyblok.com",ca:"api-ca.storyblok.com"};return t[e]??t.eu};var Je=class{constructor(e){m(this,"baseURL"),m(this,"timeout"),m(this,"headers"),m(this,"responseInterceptor"),m(this,"fetch"),m(this,"ejectInterceptor"),m(this,"url"),m(this,"parameters"),m(this,"fetchOptions"),this.baseURL=e.baseURL,this.headers=e.headers||new Headers,this.timeout=e!=null&&e.timeout?e.timeout*1e3:0,this.responseInterceptor=e.responseInterceptor,this.fetch=(...t)=>e.fetch?e.fetch(...t):fetch(...t),this.ejectInterceptor=!1,this.url="",this.parameters={},this.fetchOptions={}}get(e,t){return this.url=e,this.parameters=t,this._methodHandler("get")}post(e,t){return this.url=e,this.parameters=t,this._methodHandler("post")}put(e,t){return this.url=e,this.parameters=t,this._methodHandler("put")}delete(e,t){return this.url=e,this.parameters=t??{},this._methodHandler("delete")}async _responseHandler(e){const t=[],s={data:{},headers:{},status:0,statusText:""};e.status!==204&&await e.json().then(r=>{s.data=r});for(const r of e.headers.entries())t[r[0]]=r[1];return s.headers={...t},s.status=e.status,s.statusText=e.statusText,s}async _methodHandler(e){let t=`${this.baseURL}${this.url}`,s=null;e==="get"?t=`${this.baseURL}${this.url}?${q(this.parameters)}`:s=JSON.stringify(this.parameters);const r=new URL(t),o=new AbortController,{signal:n}=o;let a=null;this.timeout&&(a=setTimeout(()=>o.abort(),this.timeout));try{const l=await this.fetch(`${r}`,{method:e,headers:this.headers,body:s,signal:n,...this.fetchOptions});this.timeout&&a&&clearTimeout(a);const c=await this._responseHandler(l);return this.responseInterceptor&&!this.ejectInterceptor?this._statusHandler(this.responseInterceptor(c)):this._statusHandler(c)}catch(l){return l.name==="AbortError"?{message:"Request timeout: The request was aborted due to timeout"}:{message:l.message||l.toString()||"An unknown error occurred"}}}setFetchOptions(e={}){Object.keys(e).length>0&&"method"in e&&delete e.method,this.fetchOptions={...e}}eject(){this.ejectInterceptor=!0}_normalizeErrorMessage(e){if(Array.isArray(e))return e[0]||"Unknown error";if(e&&typeof e=="object"){if(e.error)return e.error;for(const t in e){if(Array.isArray(e[t]))return`${t}: ${e[t][0]}`;if(typeof e[t]=="string")return`${t}: ${e[t]}`}if(e.slug)return e.slug}return"Unknown error"}_statusHandler(e){const t=/20[0-6]/g;return new Promise((s,r)=>{if(t.test(`${e.status}`))return s(e);const o={message:this._normalizeErrorMessage(e.data),status:e.status,response:e};r(o)})}},We=Je;const le="SB-Agent",F={defaultAgentName:"SB-JS-CLIENT",defaultAgentVersion:"SB-Agent-Version",packageVersion:"7.0.0"},Ye={PUBLISHED:"published"},Ke=25,G={SMALL:25,MEDIUM:50,LARGE:75},O={SINGLE_OR_SMALL:50,MEDIUM:15,LARGE:10,VERY_LARGE:6},ce=1e3,H=3;function Xe(e,t){const s=e.includes("/cdn/stories/"),r=e.split("/").length>3&&!e.endsWith("/cdn/stories"),o="find_by"in t;return s&&r||o}function Qe(e){return e<=G.SMALL?O.SINGLE_OR_SMALL:e<=G.MEDIUM?O.MEDIUM:e<=G.LARGE?O.LARGE:O.VERY_LARGE}function N(e,t,s={},r){if(s.userRateLimit!==void 0)return Math.min(s.userRateLimit,ce);if(s.serverHeadersRateLimit!==void 0)return Math.min(s.serverHeadersRateLimit,ce);if(r!==void 0)return r;if(!e||!t||Xe(e,t))return O.SINGLE_OR_SMALL;const o=t.per_page||Ke;return Qe(o)}function et(e){if(!e)return null;const t=e["x-ratelimit"]||e["X-RateLimit"],s=e["x-ratelimit-policy"]||e["X-RateLimit-Policy"];if(!t&&!s)return null;const r={};if(t){const o=t.match(/r=(\d+)/);o&&(r.remaining=Number.parseInt(o[1],10))}if(s){const o=s.match(/q=(\d+)/);o&&(r.max=Number.parseInt(o[1],10))}return Object.keys(r).length>0?r:null}function tt(e,t=!1){return{userRateLimit:e,serverHeadersRateLimit:void 0,isManagementApi:t}}var st=class extends Error{constructor(e){super(e),this.name="AbortError"}};function rt(e,t,s){if(!Number.isFinite(t))throw new TypeError("Expected `limit` to be a finite number");if(!Number.isFinite(s))throw new TypeError("Expected `interval` to be a finite number");const r=[];let o=[],n=0,a=!1;const l=async()=>{n++;const u=r.shift();if(u)try{const d=await e(...u.args);u.resolve(d)}catch(d){u.reject(d)}const g=setTimeout(()=>{n--,r.length>0&&l(),o=o.filter(d=>d!==g)},s);o.includes(g)||o.push(g)},c=(...u)=>a?Promise.reject(new Error("Throttled function is already aborted and not accepting new promises")):new Promise((g,d)=>{r.push({resolve:g,reject:d,args:u}),n<t&&l()});return c.abort=()=>{a=!0,o.forEach(clearTimeout),o=[],r.forEach(u=>u.reject(()=>new st("Throttle function aborted"))),r.length=0},c}var ot=rt,nt=class{constructor(e,t=1e3){m(this,"queues"),m(this,"interval"),m(this,"throttledRequestFn"),this.queues=new Map,this.interval=t,this.throttledRequestFn=e}getQueue(e){let t=this.queues.get(e);return t||(t=ot(this.throttledRequestFn,e,this.interval),this.queues.set(e,t)),t}execute(e,...t){return this.getQueue(e)(...t)}abortAll(){this.queues.forEach(e=>{var t;(t=e.abort)==null||t.call(e)}),this.queues.clear()}getQueueCount(){return this.queues.size}};let j={};const S={};var it=class{constructor(e,t){m(this,"client"),m(this,"maxRetries"),m(this,"retriesDelay"),m(this,"throttleManager"),m(this,"accessToken"),m(this,"cache"),m(this,"resolveCounter"),m(this,"relations"),m(this,"links"),m(this,"version"),m(this,"rateLimitConfig"),m(this,"richTextResolver"),m(this,"resolveNestedRelations"),m(this,"stringifiedStoriesCache"),m(this,"inlineAssets");let s=e.endpoint||t;if(!s){const o=e.https===!1?"http":"https";e.oauthToken?s=`${o}://${ae(e.region)}/v1`:s=`${o}://${ae(e.region)}/v2`}const r=new Headers;r.set("Content-Type","application/json"),r.set("Accept","application/json"),e.headers&&(e.headers.constructor.name==="Headers"?e.headers.entries().toArray():Object.entries(e.headers)).forEach(([o,n])=>{r.set(o,n)}),r.has(le)||(r.set(le,F.defaultAgentName),r.set(F.defaultAgentVersion,F.packageVersion)),e.oauthToken&&r.set("Authorization",e.oauthToken),this.rateLimitConfig=tt(e.rateLimit,!!e.oauthToken),this.maxRetries=e.maxRetries||10,this.retriesDelay=300,this.throttleManager=new nt(this.throttledRequest.bind(this),1e3),this.accessToken=e.accessToken||"",this.relations={},this.links={},this.cache=e.cache||{clear:"manual"},this.resolveCounter=0,this.resolveNestedRelations=e.resolveNestedRelations||!0,this.stringifiedStoriesCache={},this.version=e.version||Ye.PUBLISHED,this.inlineAssets=e.inlineAssets||!1,this.client=new We({baseURL:s,timeout:e.timeout||0,headers:r,responseInterceptor:e.responseInterceptor,fetch:e.fetch})}parseParams(e){return e.token||(e.token=this.getToken()),e.cv||(e.cv=S[e.token]),Array.isArray(e.resolve_relations)&&(e.resolve_relations=e.resolve_relations.join(",")),typeof e.resolve_relations<"u"&&(e.resolve_level=2),e}factoryParamOptions(e,t){return B(e)?this.parseParams(t):t}makeRequest(e,t,s,r,o){const n=this.factoryParamOptions(e,Be(t,s,r));return this.cacheResponse(e,n,void 0,o)}get(e,t={},s){t||(t={});const r=`/${e}`;B(r)&&(t.version=t.version||this.version);const o=this.factoryParamOptions(r,t);return this.cacheResponse(r,o,void 0,s)}async getAll(e,t={},s,r){const o=(t==null?void 0:t.per_page)||25,n=`/${e}`.replace(/\/$/,""),a=s??n.substring(n.lastIndexOf("/")+1);t.version=t.version||this.version;const l=1,c=await this.makeRequest(n,t,o,l,r),u=c.total?Math.ceil(c.total/(c.perPage||o)):1,g=await ze(Ge(l,u),d=>this.makeRequest(n,t,o,d+1,r));return Ze([c,...g],d=>Object.values(d.data[a]))}post(e,t={},s){const r=`/${e}`,o=N(void 0,void 0,this.rateLimitConfig,H);return this.throttleManager.execute(o,"post",r,t,s)}put(e,t={},s){const r=`/${e}`,o=N(void 0,void 0,this.rateLimitConfig,H);return this.throttleManager.execute(o,"put",r,t,s)}delete(e,t={},s){t||(t={});const r=`/${e}`,o=N(void 0,void 0,this.rateLimitConfig,H);return this.throttleManager.execute(o,"delete",r,t,s)}getStories(e={},t){return this._addResolveLevel(e),this.get("cdn/stories",e,t)}getStory(e,t={},s){return this._addResolveLevel(t),this.get(`cdn/stories/${e}`,t,s)}getToken(){return this.accessToken}ejectInterceptor(){this.client.eject()}_addResolveLevel(e){typeof e.resolve_relations<"u"&&(e.resolve_level=2)}_cleanCopy(e){return JSON.parse(JSON.stringify(e))}_insertLinks(e,t,s){const r=e[t];r&&r.fieldtype==="multilink"&&r.linktype==="story"&&typeof r.id=="string"&&this.links[s][r.id]?r.story=this._cleanCopy(this.links[s][r.id]):r&&r.linktype==="story"&&typeof r.uuid=="string"&&this.links[s][r.uuid]&&(r.story=this._cleanCopy(this.links[s][r.uuid]))}getStoryReference(e,t){return this.relations[e][t]?JSON.parse(this.stringifiedStoriesCache[t]||JSON.stringify(this.relations[e][t])):t}_resolveField(e,t,s){const r=e[t];typeof r=="string"?e[t]=this.getStoryReference(s,r):Array.isArray(r)&&(e[t]=r.map(o=>this.getStoryReference(s,o)).filter(Boolean))}_insertRelations(e,t,s,r){if(Array.isArray(s)?s.find(n=>n.endsWith(`.${t}`)):s.endsWith(`.${t}`)){this._resolveField(e,t,r);return}const o=e.component?`${e.component}.${t}`:t;(Array.isArray(s)?s.includes(o):s===o)&&this._resolveField(e,t,r)}iterateTree(e,t,s){const r=(o,n="")=>{if(!(!o||o._stopResolving)){if(Array.isArray(o))o.forEach((a,l)=>r(a,`${n}[${l}]`));else if(typeof o=="object")for(const a in o){const l=n?`${n}.${a}`:a;(o.component&&o._uid||o.type==="link")&&(this._insertRelations(o,a,t,s),this._insertLinks(o,a,s)),r(o[a],l)}}};r(e.content)}async resolveLinks(e,t,s){let r=[];if(e.link_uuids){const o=e.link_uuids.length,n=[],a=50;for(let l=0;l<o;l+=a){const c=Math.min(o,l+a);n.push(e.link_uuids.slice(l,c))}for(let l=0;l<n.length;l++)(await this.getStories({per_page:a,language:t.language,version:t.version,starts_with:t.starts_with,by_uuids:n[l].join(",")})).data.stories.forEach(c=>{r.push(c)})}else r=e.links;r.forEach(o=>{this.links[s][o.uuid]={...o,_stopResolving:!0}})}async resolveRelations(e,t,s){let r=[];if(e.rel_uuids){const o=e.rel_uuids.length,n=[],a=50;for(let l=0;l<o;l+=a){const c=Math.min(o,l+a);n.push(e.rel_uuids.slice(l,c))}for(let l=0;l<n.length;l++)(await this.getStories({per_page:a,language:t.language,version:t.version,starts_with:t.starts_with,by_uuids:n[l].join(","),excluding_fields:t.excluding_fields})).data.stories.forEach(c=>{r.push(c)});r.length>0&&(e.rels=r,delete e.rel_uuids)}else r=e.rels;r&&r.length>0&&r.forEach(o=>{this.relations[s][o.uuid]={...o,_stopResolving:!0}})}async resolveStories(e,t,s){var r,o;let n=[];if(this.links[s]={},this.relations[s]={},typeof t.resolve_relations<"u"&&t.resolve_relations.length>0&&(typeof t.resolve_relations=="string"&&(n=t.resolve_relations.split(",")),await this.resolveRelations(e,t,s)),t.resolve_links&&["1","story","url","link"].includes(t.resolve_links)&&((r=e.links)!=null&&r.length||(o=e.link_uuids)!=null&&o.length)&&await this.resolveLinks(e,t,s),this.resolveNestedRelations)for(const a in this.relations[s])this.iterateTree(this.relations[s][a],n,s);e.story?this.iterateTree(e.story,n,s):e.stories.forEach(a=>{this.iterateTree(a,n,s)}),this.stringifiedStoriesCache={},delete this.links[s],delete this.relations[s]}async cacheResponse(e,t,s,r){const o=q({url:e,params:t}),n=this.cacheProvider();if(t.version==="published"&&e!=="/cdn/spaces/me"){const c=await n.get(o);if(c)return Promise.resolve(c)}const a=!B(e)&&this.rateLimitConfig.isManagementApi?H:void 0,l=N(e,t,this.rateLimitConfig,a);return new Promise(async(c,u)=>{var g;try{const d=await this.throttleManager.execute(l,"get",e,t,r);if(d.status!==200)return u(d);let C={data:d.data,headers:d.headers};const T=et(d.headers);if((T==null?void 0:T.max)!==void 0&&(this.rateLimitConfig.serverHeadersRateLimit=T.max),(g=d.headers)!=null&&g["per-page"]&&(C=Object.assign({},C,{perPage:d.headers["per-page"]?Number.parseInt(d.headers["per-page"]):0,total:d.headers["per-page"]?Number.parseInt(d.headers.total):0})),C.data.story||C.data.stories){const _=this.resolveCounter=++this.resolveCounter%1e3;await this.resolveStories(C.data,t,`${_}`),C=await this.processInlineAssets(C)}t.version==="published"&&e!=="/cdn/spaces/me"&&await n.set(o,C);const w=this.cache.clear==="onpreview"&&t.version==="draft"||this.cache.clear==="auto";return t.token&&C.data.cv&&(w&&S[t.token]&&S[t.token]!==C.data.cv&&await this.flushCache(),S[t.token]=C.data.cv),c(C)}catch(d){if(d.response&&d.status===429&&(s=typeof s>"u"?0:s+1,s<this.maxRetries))return console.log(`Hit rate limit. Retrying in ${this.retriesDelay/1e3} seconds.`),await qe(this.retriesDelay),this.cacheResponse(e,t,s).then(c).catch(u);u(d)}})}throttledRequest(e,t,s,r){return this.client.setFetchOptions(r),this.client[e](t,s)}cacheVersions(){return S}cacheVersion(){return S[this.accessToken]}setCacheVersion(e){this.accessToken&&(S[this.accessToken]=e)}clearCacheVersion(){this.accessToken&&(S[this.accessToken]=0)}cacheProvider(){switch(this.cache.type){case"memory":return{get(e){return Promise.resolve(j[e])},getAll(){return Promise.resolve(j)},set(e,t){return j[e]=t,Promise.resolve(void 0)},flush(){return j={},Promise.resolve(void 0)}};case"custom":if(this.cache.custom)return this.cache.custom;default:return{get(){return Promise.resolve()},getAll(){return Promise.resolve(void 0)},set(){return Promise.resolve(void 0)},flush(){return Promise.resolve(void 0)}}}}async flushCache(){return await this.cacheProvider().flush(),this.clearCacheVersion(),this}async processInlineAssets(e){if(!this.inlineAssets)return e;const t=s=>{if(!s||typeof s!="object")return s;if(Array.isArray(s))return s.map(o=>t(o));let r={...s};r.fieldtype==="asset"&&Array.isArray(e.data.assets)&&(r={...e.data.assets.find(o=>o.id===r.id),...r});for(const o in r)typeof r[o]=="object"&&(r[o]=t(r[o]));return r};return e.data.story&&(e.data.story.content=t(e.data.story.content)),e.data.stories&&(e.data.stories=e.data.stories.map(s=>(s.content=t(s.content),s))),e}},at=it;const lt=(e={})=>{const{apiOptions:t}=e;if(!t||!t.accessToken){console.error("You need to provide an access token to interact with Storyblok API. Read https://www.storyblok.com/docs/api/content-delivery#topics/authentication");return}return{storyblokApi:new at(t)}},ct=e=>{if(typeof e!="object"||typeof e._editable>"u")return{};try{const t=JSON.parse(e._editable.replace(/^<!--#storyblok#/,"").replace(/-->$/,""));return t?{"data-blok-c":JSON.stringify(t),"data-blok-uid":`${t.id}-${t.uid}`}:{}}catch{return{}}};let z="https://app.storyblok.com/f/storyblok-v2-latest.js";const ut=(e={})=>{var t,s;const{bridge:r,accessToken:o,use:n=[],apiOptions:a={},bridgeUrl:l}=e;a.accessToken=a.accessToken||o;const c={bridge:r,apiOptions:a};let u={};n.forEach(d=>{u={...u,...d(c)}}),l&&(z=l);const g=!(typeof window>"u")&&((s=(t=window.location)==null?void 0:t.search)==null?void 0:s.includes("_storyblok_tk"));return r!==!1&&g&&ie(z),u};function ht(e,t){return re(t).render(e)}const dt=()=>ie(z);L.apiPlugin=lt,L.getLiveStory=ye,L.handleStoryblokMessage=Ie,L.loadStoryblokBridge=dt,L.renderRichText=ht,L.richTextResolver=re,L.storyblok=$e,L.storyblokEditable=ct,L.storyblokInit=ut,L.toCamelCase=X,L.useStoryblokApi=me,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storyblok/astro",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.3.
|
|
4
|
+
"version": "7.3.9",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Official Astro integration for the Storyblok Headless CMS",
|
|
7
7
|
"author": "Storyblok",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"camelcase": "^8.0.0",
|
|
56
|
-
"@storyblok/js": "4.4.
|
|
56
|
+
"@storyblok/js": "4.4.5"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@cypress/vite-dev-server": "^6.0.3",
|