@storyblok/astro 5.0.1 → 5.1.0-alpha.1

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.
@@ -1,90 +1,90 @@
1
- function Or(o, r, t) {
2
- const i = "virtual:storyblok-init", s = "\0" + i;
1
+ function E(r, t, e) {
2
+ const o = "virtual:storyblok-init", s = "\0" + o;
3
3
  return {
4
4
  name: "vite-plugin-storyblok-init",
5
- async resolveId(l) {
6
- if (l === i)
5
+ async resolveId(a) {
6
+ if (a === o)
7
7
  return s;
8
8
  },
9
- async load(l) {
10
- if (l === s)
9
+ async load(a) {
10
+ if (a === s)
11
11
  return `
12
12
  import { storyblokInit, apiPlugin } from "@storyblok/js";
13
13
  const { storyblokApi } = storyblokInit({
14
- accessToken: "${o}",
15
- use: ${r ? "[]" : "[apiPlugin]"},
16
- apiOptions: ${JSON.stringify(t)},
14
+ accessToken: "${r}",
15
+ use: ${t ? "[]" : "[apiPlugin]"},
16
+ apiOptions: ${JSON.stringify(e)},
17
17
  });
18
18
  export const storyblokApiInstance = storyblokApi;
19
19
  `;
20
20
  }
21
21
  };
22
22
  }
23
- const Cr = /[\p{Lu}]/u, jr = /[\p{Ll}]/u, ze = /^[\p{Lu}](?![\p{Lu}])/gu, Ge = /([\p{Alpha}\p{N}_]|$)/u, fe = /[_.\- ]+/, $r = new RegExp("^" + fe.source), Le = new RegExp(fe.source + Ge.source, "gu"), De = new RegExp("\\d+" + Ge.source, "gu"), xr = (o, r, t, i) => {
24
- let s = !1, l = !1, u = !1, f = !1;
25
- for (let g = 0; g < o.length; g++) {
26
- const b = o[g];
27
- f = g > 2 ? o[g - 3] === "-" : !0, s && Cr.test(b) ? (o = o.slice(0, g) + "-" + o.slice(g), s = !1, u = l, l = !0, g++) : l && u && jr.test(b) && (!f || i) ? (o = o.slice(0, g - 1) + "-" + o.slice(g - 1), u = l, l = !1, s = !0) : (s = r(b) === b && t(b) !== b, u = l, l = t(b) === b && r(b) !== b);
28
- }
29
- return o;
30
- }, Er = (o, r) => (ze.lastIndex = 0, o.replaceAll(ze, (t) => r(t))), Rr = (o, r) => (Le.lastIndex = 0, De.lastIndex = 0, o.replaceAll(De, (t, i, s) => ["_", "-"].includes(o.charAt(s + t.length)) ? t : r(t)).replaceAll(Le, (t, i) => r(i)));
31
- function Ue(o, r) {
32
- if (!(typeof o == "string" || Array.isArray(o)))
23
+ const C = /[\p{Lu}]/u, j = /[\p{Ll}]/u, k = /^[\p{Lu}](?![\p{Lu}])/gu, x = /([\p{Alpha}\p{N}_]|$)/u, b = /[_.\- ]+/, R = new RegExp("^" + b.source), w = new RegExp(b.source + x.source, "gu"), $ = new RegExp("\\d+" + x.source, "gu"), M = (r, t, e, o) => {
24
+ let s = !1, a = !1, n = !1, i = !1;
25
+ for (let l = 0; l < r.length; l++) {
26
+ const c = r[l];
27
+ i = l > 2 ? r[l - 3] === "-" : !0, s && C.test(c) ? (r = r.slice(0, l) + "-" + r.slice(l), s = !1, n = a, a = !0, l++) : a && n && j.test(c) && (!i || o) ? (r = r.slice(0, l - 1) + "-" + r.slice(l - 1), n = a, a = !1, s = !0) : (s = t(c) === c && e(c) !== c, n = a, a = e(c) === c && t(c) !== c);
28
+ }
29
+ return r;
30
+ }, O = (r, t) => (k.lastIndex = 0, r.replaceAll(k, (e) => t(e))), L = (r, t) => (w.lastIndex = 0, $.lastIndex = 0, r.replaceAll($, (e, o, s) => ["_", "-"].includes(r.charAt(s + e.length)) ? e : t(e)).replaceAll(w, (e, o) => t(o)));
31
+ function v(r, t) {
32
+ if (!(typeof r == "string" || Array.isArray(r)))
33
33
  throw new TypeError("Expected the input to be `string | string[]`");
34
- if (r = {
34
+ if (t = {
35
35
  pascalCase: !1,
36
36
  preserveConsecutiveUppercase: !1,
37
- ...r
38
- }, Array.isArray(o) ? o = o.map((l) => l.trim()).filter((l) => l.length).join("-") : o = o.trim(), o.length === 0)
37
+ ...t
38
+ }, Array.isArray(r) ? r = r.map((a) => a.trim()).filter((a) => a.length).join("-") : r = r.trim(), r.length === 0)
39
39
  return "";
40
- const t = r.locale === !1 ? (l) => l.toLowerCase() : (l) => l.toLocaleLowerCase(r.locale), i = r.locale === !1 ? (l) => l.toUpperCase() : (l) => l.toLocaleUpperCase(r.locale);
41
- return o.length === 1 ? fe.test(o) ? "" : r.pascalCase ? i(o) : t(o) : (o !== t(o) && (o = xr(o, t, i, r.preserveConsecutiveUppercase)), o = o.replace($r, ""), o = r.preserveConsecutiveUppercase ? Er(o, t) : t(o), r.pascalCase && (o = i(o.charAt(0)) + o.slice(1)), Rr(o, i));
40
+ const e = t.locale === !1 ? (a) => a.toLowerCase() : (a) => a.toLocaleLowerCase(t.locale), o = t.locale === !1 ? (a) => a.toUpperCase() : (a) => a.toLocaleUpperCase(t.locale);
41
+ return r.length === 1 ? b.test(r) ? "" : t.pascalCase ? o(r) : e(r) : (r !== e(r) && (r = M(r, e, o, t.preserveConsecutiveUppercase)), r = r.replace(R, ""), r = t.preserveConsecutiveUppercase ? O(r, e) : e(r), t.pascalCase && (r = o(r.charAt(0)) + r.slice(1)), L(r, o));
42
42
  }
43
- function Pr(o, r, t, i) {
44
- const s = "virtual:storyblok-components", l = "\0" + s;
43
+ function N(r, t, e, o) {
44
+ const s = "virtual:storyblok-components", a = "\0" + s;
45
45
  return {
46
46
  name: "vite-plugin-storyblok-components",
47
- async resolveId(u) {
48
- if (u === s)
49
- return l;
47
+ async resolveId(n) {
48
+ if (n === s)
49
+ return a;
50
50
  },
51
- async load(u) {
52
- if (u === l) {
53
- const f = [], g = [];
54
- for await (const [_, k] of Object.entries(r)) {
55
- const I = await this.resolve(
56
- "/" + o + "/" + k + ".astro"
51
+ async load(n) {
52
+ if (n === a) {
53
+ const i = [], l = [];
54
+ for await (const [u, f] of Object.entries(t)) {
55
+ const d = await this.resolve(
56
+ "/" + r + "/" + f + ".astro"
57
57
  );
58
- if (I)
59
- f.push(`import ${Ue(_)} from "${I.id}"`);
60
- else if (t)
61
- g.push(_);
58
+ if (d)
59
+ i.push(`import ${v(u)} from "${d.id}"`);
60
+ else if (e)
61
+ l.push(u);
62
62
  else
63
63
  throw new Error(
64
- `Component could not be found for blok "${_}"! Does "${"/" + o + "/" + k}.astro" exist?`
64
+ `Component could not be found for blok "${u}"! Does "${"/" + r + "/" + f}.astro" exist?`
65
65
  );
66
66
  }
67
- let b = "";
68
- if (t)
69
- if (b = ",FallbackComponent", i) {
70
- const _ = await this.resolve(
71
- "/" + o + "/" + i + ".astro"
67
+ let c = "";
68
+ if (e)
69
+ if (c = ",FallbackComponent", o) {
70
+ const u = await this.resolve(
71
+ "/" + r + "/" + o + ".astro"
72
72
  );
73
- if (!_)
73
+ if (!u)
74
74
  throw new Error(
75
- `Custom fallback component could not be found. Does "${"/" + o + "/" + i}.astro" exist?`
75
+ `Custom fallback component could not be found. Does "${"/" + r + "/" + o}.astro" exist?`
76
76
  );
77
- f.push(
78
- `import FallbackComponent from "${_.id}"`
77
+ i.push(
78
+ `import FallbackComponent from "${u.id}"`
79
79
  );
80
80
  } else
81
- f.push(
81
+ i.push(
82
82
  "import FallbackComponent from '@storyblok/astro/FallbackComponent.astro'"
83
83
  );
84
- if (Object.values(r).length)
85
- return `${f.join(";")};export default {${Object.keys(r).filter((_) => !g.includes(_)).map((_) => Ue(_)).join(",")}${b}}`;
86
- if (t)
87
- return `${f[0]}; export default {${b.replace(",", "")}}`;
84
+ if (Object.values(t).length)
85
+ return `${i.join(";")};export default {${Object.keys(t).filter((u) => !l.includes(u)).map((u) => v(u)).join(",")}${c}}`;
86
+ if (e)
87
+ return `${i[0]}; export default {${c.replace(",", "")}}`;
88
88
  throw new Error(
89
89
  `Currently, no Storyblok components are registered in astro.config.mjs.
90
90
  Please register your components or enable the fallback component.
@@ -94,53 +94,53 @@ Detailed information can be found here: https://github.com/storyblok/storyblok-a
94
94
  }
95
95
  };
96
96
  }
97
- function Mr(o) {
98
- const r = "virtual:storyblok-options", t = "\0" + r;
97
+ function P(r) {
98
+ const t = "virtual:storyblok-options", e = "\0" + t;
99
99
  return {
100
100
  name: "vite-plugin-storyblok-options",
101
- async resolveId(i) {
102
- if (i === r)
103
- return t;
101
+ async resolveId(o) {
102
+ if (o === t)
103
+ return e;
104
104
  },
105
- async load(i) {
106
- if (i === t)
107
- return `export default ${JSON.stringify(o)}`;
105
+ async load(o) {
106
+ if (o === e)
107
+ return `export default ${JSON.stringify(r)}`;
108
108
  }
109
109
  };
110
110
  }
111
- let Be = !1;
112
- const Fe = [], Nr = (o) => new Promise((r, t) => {
111
+ let I = !1;
112
+ const S = [], _ = (r) => new Promise((t, e) => {
113
113
  if (typeof window > "u" || (window.storyblokRegisterEvent = (s) => {
114
114
  if (window.location === window.parent.location) {
115
115
  console.warn("You are not in Draft Mode or in the Visual Editor.");
116
116
  return;
117
117
  }
118
- Be ? s() : Fe.push(s);
118
+ I ? s() : S.push(s);
119
119
  }, document.getElementById("storyblok-javascript-bridge"))) return;
120
- const i = document.createElement("script");
121
- i.async = !0, i.src = o, i.id = "storyblok-javascript-bridge", i.onerror = (s) => t(s), i.onload = (s) => {
122
- Fe.forEach((l) => l()), Be = !0, r(s);
123
- }, document.getElementsByTagName("head")[0].appendChild(i);
120
+ const o = document.createElement("script");
121
+ o.async = !0, o.src = r, o.id = "storyblok-javascript-bridge", o.onerror = (s) => e(s), o.onload = (s) => {
122
+ S.forEach((a) => a()), I = !0, t(s);
123
+ }, document.getElementsByTagName("head")[0].appendChild(o);
124
124
  });
125
- var zr = Object.defineProperty, Lr = (o, r, t) => r in o ? zr(o, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[r] = t, S = (o, r, t) => (Lr(o, typeof r != "symbol" ? r + "" : r, t), t);
126
- class Dr {
125
+ var z = Object.defineProperty, D = (r, t, e) => t in r ? z(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, g = (r, t, e) => D(r, typeof t != "symbol" ? t + "" : t, e);
126
+ class U {
127
127
  constructor() {
128
- S(this, "isCDNUrl", (r = "") => r.indexOf("/cdn/") > -1), S(this, "getOptionsPage", (r, t = 25, i = 1) => ({
129
- ...r,
130
- per_page: t,
131
- page: i
132
- })), S(this, "delay", (r) => new Promise((t) => setTimeout(t, r))), S(this, "arrayFrom", (r = 0, t) => [...Array(r)].map(t)), S(this, "range", (r = 0, t = r) => {
133
- const i = Math.abs(t - r) || 0, s = r < t ? 1 : -1;
134
- return this.arrayFrom(i, (l, u) => u * s + r);
135
- }), S(this, "asyncMap", async (r, t) => Promise.all(r.map(t))), S(this, "flatMap", (r = [], t) => r.map(t).reduce((i, s) => [...i, ...s], [])), S(this, "escapeHTML", function(r) {
136
- const t = {
128
+ g(this, "isCDNUrl", (t = "") => t.indexOf("/cdn/") > -1), g(this, "getOptionsPage", (t, e = 25, o = 1) => ({
129
+ ...t,
130
+ per_page: e,
131
+ page: o
132
+ })), g(this, "delay", (t) => new Promise((e) => setTimeout(e, t))), g(this, "arrayFrom", (t = 0, e) => [...Array(t)].map(e)), g(this, "range", (t = 0, e = t) => {
133
+ const o = Math.abs(e - t) || 0, s = t < e ? 1 : -1;
134
+ return this.arrayFrom(o, (a, n) => n * s + t);
135
+ }), g(this, "asyncMap", async (t, e) => Promise.all(t.map(e))), g(this, "flatMap", (t = [], e) => t.map(e).reduce((o, s) => [...o, ...s], [])), g(this, "escapeHTML", function(t) {
136
+ const e = {
137
137
  "&": "&amp;",
138
138
  "<": "&lt;",
139
139
  ">": "&gt;",
140
140
  '"': "&quot;",
141
141
  "'": "&#39;"
142
- }, i = /[&<>"']/g, s = RegExp(i.source);
143
- return r && s.test(r) ? r.replace(i, (l) => t[l]) : r;
142
+ }, o = /[&<>"']/g, s = RegExp(o.source);
143
+ return t && s.test(t) ? t.replace(o, (a) => e[a]) : t;
144
144
  });
145
145
  }
146
146
  /**
@@ -150,18 +150,18 @@ class Dr {
150
150
  * @param {Boolean} isArray
151
151
  * @return {String} Stringified object
152
152
  */
153
- stringify(r, t, i) {
153
+ stringify(t, e, o) {
154
154
  const s = [];
155
- for (const l in r) {
156
- if (!Object.prototype.hasOwnProperty.call(r, l))
155
+ for (const a in t) {
156
+ if (!Object.prototype.hasOwnProperty.call(t, a))
157
157
  continue;
158
- const u = r[l], f = i ? "" : encodeURIComponent(l);
159
- let g;
160
- typeof u == "object" ? g = this.stringify(
161
- u,
162
- t ? t + encodeURIComponent("[" + f + "]") : f,
163
- Array.isArray(u)
164
- ) : g = (t ? t + encodeURIComponent("[" + f + "]") : f) + "=" + encodeURIComponent(u), s.push(g);
158
+ const n = t[a], i = o ? "" : encodeURIComponent(a);
159
+ let l;
160
+ typeof n == "object" ? l = this.stringify(
161
+ n,
162
+ e ? e + encodeURIComponent("[" + i + "]") : i,
163
+ Array.isArray(n)
164
+ ) : l = (e ? e + encodeURIComponent("[" + i + "]") : i) + "=" + encodeURIComponent(n), s.push(l);
165
165
  }
166
166
  return s.join("&");
167
167
  }
@@ -170,203 +170,206 @@ class Dr {
170
170
  * @param {String} regionCode region code, could be eu, us, cn, ap or ca
171
171
  * @return {String} The base URL of the region
172
172
  */
173
- getRegionURL(r) {
174
- const t = "api.storyblok.com", i = "api-us.storyblok.com", s = "app.storyblokchina.cn", l = "api-ap.storyblok.com", u = "api-ca.storyblok.com";
175
- switch (r) {
173
+ getRegionURL(t) {
174
+ const e = "api.storyblok.com", o = "api-us.storyblok.com", s = "app.storyblokchina.cn", a = "api-ap.storyblok.com", n = "api-ca.storyblok.com";
175
+ switch (t) {
176
176
  case "us":
177
- return i;
177
+ return o;
178
178
  case "cn":
179
179
  return s;
180
180
  case "ap":
181
- return l;
181
+ return a;
182
182
  case "ca":
183
- return u;
183
+ return n;
184
184
  default:
185
- return t;
185
+ return e;
186
186
  }
187
187
  }
188
188
  }
189
- const Ur = function(o, r) {
190
- const t = {};
191
- for (const i in o) {
192
- const s = o[i];
193
- r.indexOf(i) > -1 && s !== null && (t[i] = s);
194
- }
195
- return t;
196
- }, Br = (o) => o === "email", Fr = () => ({
189
+ const B = function(r, t) {
190
+ const e = {};
191
+ for (const o in r) {
192
+ const s = r[o];
193
+ t.indexOf(o) > -1 && s !== null && (e[o] = s);
194
+ }
195
+ return e;
196
+ }, q = (r) => r === "email", F = () => ({
197
197
  singleTag: "hr"
198
- }), Hr = () => ({
198
+ }), H = () => ({
199
199
  tag: "blockquote"
200
- }), qr = () => ({
200
+ }), W = () => ({
201
201
  tag: "ul"
202
- }), Gr = (o) => ({
202
+ }), J = (r) => ({
203
203
  tag: [
204
204
  "pre",
205
205
  {
206
206
  tag: "code",
207
- attrs: o.attrs
207
+ attrs: r.attrs
208
208
  }
209
209
  ]
210
- }), Jr = () => ({
210
+ }), K = () => ({
211
211
  singleTag: "br"
212
- }), Kr = (o) => ({
213
- tag: `h${o.attrs.level}`
214
- }), Wr = (o) => ({
212
+ }), V = (r) => ({
213
+ tag: `h${r.attrs.level}`
214
+ }), G = (r) => ({
215
215
  singleTag: [
216
216
  {
217
217
  tag: "img",
218
- attrs: Ur(o.attrs, ["src", "alt", "title"])
218
+ attrs: B(r.attrs, ["src", "alt", "title"])
219
219
  }
220
220
  ]
221
- }), Yr = () => ({
221
+ }), Q = () => ({
222
222
  tag: "li"
223
- }), Vr = () => ({
223
+ }), X = () => ({
224
224
  tag: "ol"
225
- }), Xr = () => ({
225
+ }), Y = () => ({
226
226
  tag: "p"
227
- }), Zr = (o) => ({
227
+ }), Z = (r) => ({
228
228
  tag: [
229
229
  {
230
230
  tag: "span",
231
231
  attrs: {
232
232
  "data-type": "emoji",
233
- "data-name": o.attrs.name,
234
- emoji: o.attrs.emoji
233
+ "data-name": r.attrs.name,
234
+ emoji: r.attrs.emoji
235
235
  }
236
236
  }
237
237
  ]
238
- }), Qr = () => ({
238
+ }), ee = () => ({
239
239
  tag: "b"
240
- }), en = () => ({
240
+ }), te = () => ({
241
241
  tag: "s"
242
- }), tn = () => ({
242
+ }), re = () => ({
243
243
  tag: "u"
244
- }), rn = () => ({
244
+ }), oe = () => ({
245
245
  tag: "strong"
246
- }), nn = () => ({
246
+ }), se = () => ({
247
247
  tag: "code"
248
- }), on = () => ({
248
+ }), ae = () => ({
249
249
  tag: "i"
250
- }), an = (o) => {
251
- if (!o.attrs)
250
+ }), ne = (r) => {
251
+ if (!r.attrs)
252
252
  return {
253
253
  tag: ""
254
254
  };
255
- const r = new Dr().escapeHTML, t = { ...o.attrs }, { linktype: i = "url" } = o.attrs;
256
- if (delete t.linktype, t.href && (t.href = r(o.attrs.href || "")), Br(i) && (t.href = `mailto:${t.href}`), t.anchor && (t.href = `${t.href}#${t.anchor}`, delete t.anchor), t.custom) {
257
- for (const s in t.custom)
258
- t[s] = t.custom[s];
259
- delete t.custom;
255
+ const t = new U().escapeHTML, e = { ...r.attrs }, { linktype: o = "url" } = r.attrs;
256
+ if (delete e.linktype, e.href && (e.href = t(r.attrs.href || "")), q(o) && (e.href = `mailto:${e.href}`), e.anchor && (e.href = `${e.href}#${e.anchor}`, delete e.anchor), e.custom) {
257
+ for (const s in e.custom)
258
+ e[s] = e.custom[s];
259
+ delete e.custom;
260
260
  }
261
261
  return {
262
262
  tag: [
263
263
  {
264
264
  tag: "a",
265
- attrs: t
265
+ attrs: e
266
266
  }
267
267
  ]
268
268
  };
269
- }, sn = (o) => ({
269
+ }, le = (r) => ({
270
270
  tag: [
271
271
  {
272
272
  tag: "span",
273
- attrs: o.attrs
273
+ attrs: r.attrs
274
274
  }
275
275
  ]
276
- }), ln = () => ({
276
+ }), ie = () => ({
277
277
  tag: "sub"
278
- }), cn = () => ({
278
+ }), ce = () => ({
279
279
  tag: "sup"
280
- }), un = (o) => ({
280
+ }), ue = (r) => ({
281
281
  tag: [
282
282
  {
283
283
  tag: "span",
284
- attrs: o.attrs
284
+ attrs: r.attrs
285
285
  }
286
286
  ]
287
- }), fn = (o) => {
288
- var r;
289
- return (r = o.attrs) != null && r.color ? {
287
+ }), de = (r) => {
288
+ var t;
289
+ return (t = r.attrs) != null && t.color ? {
290
290
  tag: [
291
291
  {
292
292
  tag: "span",
293
293
  attrs: {
294
- style: `background-color:${o.attrs.color};`
294
+ style: `background-color:${r.attrs.color};`
295
295
  }
296
296
  }
297
297
  ]
298
298
  } : {
299
299
  tag: ""
300
300
  };
301
- }, pn = (o) => {
302
- var r;
303
- return (r = o.attrs) != null && r.color ? {
301
+ }, pe = (r) => {
302
+ var t;
303
+ return (t = r.attrs) != null && t.color ? {
304
304
  tag: [
305
305
  {
306
306
  tag: "span",
307
307
  attrs: {
308
- style: `color:${o.attrs.color}`
308
+ style: `color:${r.attrs.color}`
309
309
  }
310
310
  }
311
311
  ]
312
312
  } : {
313
313
  tag: ""
314
314
  };
315
- }, dn = {
315
+ }, ge = {
316
316
  nodes: {
317
- horizontal_rule: Fr,
318
- blockquote: Hr,
319
- bullet_list: qr,
320
- code_block: Gr,
321
- hard_break: Jr,
322
- heading: Kr,
323
- image: Wr,
324
- list_item: Yr,
325
- ordered_list: Vr,
326
- paragraph: Xr,
327
- emoji: Zr
317
+ horizontal_rule: F,
318
+ blockquote: H,
319
+ bullet_list: W,
320
+ code_block: J,
321
+ hard_break: K,
322
+ heading: V,
323
+ image: G,
324
+ list_item: Q,
325
+ ordered_list: X,
326
+ paragraph: Y,
327
+ emoji: Z
328
328
  },
329
329
  marks: {
330
- bold: Qr,
331
- strike: en,
332
- underline: tn,
333
- strong: rn,
334
- code: nn,
335
- italic: on,
336
- link: an,
337
- styled: sn,
338
- subscript: ln,
339
- superscript: cn,
340
- anchor: un,
341
- highlight: fn,
342
- textStyle: pn
343
- }
344
- }, gn = function(o) {
345
- const r = {
330
+ bold: ee,
331
+ strike: te,
332
+ underline: re,
333
+ strong: oe,
334
+ code: se,
335
+ italic: ae,
336
+ link: ne,
337
+ styled: le,
338
+ subscript: ie,
339
+ superscript: ce,
340
+ anchor: ue,
341
+ highlight: de,
342
+ textStyle: pe
343
+ }
344
+ }, fe = function(r) {
345
+ const t = {
346
346
  "&": "&amp;",
347
347
  "<": "&lt;",
348
348
  ">": "&gt;",
349
349
  '"': "&quot;",
350
350
  "'": "&#39;"
351
- }, t = /[&<>"']/g, i = RegExp(t.source);
352
- return o && i.test(o) ? o.replace(t, (s) => r[s]) : o;
351
+ }, e = /[&<>"']/g, o = RegExp(e.source);
352
+ return r && o.test(r) ? r.replace(e, (s) => t[s]) : r;
353
353
  };
354
- class hn {
355
- constructor(r) {
356
- S(this, "marks"), S(this, "nodes"), r || (r = dn), this.marks = r.marks || [], this.nodes = r.nodes || [];
357
- }
358
- addNode(r, t) {
359
- this.nodes[r] = t;
360
- }
361
- addMark(r, t) {
362
- this.marks[r] = t;
363
- }
364
- render(r, t = { optimizeImages: !1 }) {
365
- if (r && r.content && Array.isArray(r.content)) {
366
- let i = "";
367
- return r.content.forEach((s) => {
368
- i += this.renderNode(s);
369
- }), t.optimizeImages ? this.optimizeImages(i, t.optimizeImages) : i;
354
+ let T = !1;
355
+ class he {
356
+ constructor(t) {
357
+ g(this, "marks"), g(this, "nodes"), t || (t = ge), this.marks = t.marks || [], this.nodes = t.nodes || [];
358
+ }
359
+ addNode(t, e) {
360
+ this.nodes[t] = e;
361
+ }
362
+ addMark(t, e) {
363
+ this.marks[t] = e;
364
+ }
365
+ render(t, e = { optimizeImages: !1 }, o = !0) {
366
+ if (!T && o && (console.warn(
367
+ "Warning ⚠️: The RichTextResolver class is deprecated and will be removed in the next major release. Please use the `@storyblok/richtext` package instead. https://github.com/storyblok/richtext/"
368
+ ), T = !0), t && t.content && Array.isArray(t.content)) {
369
+ let s = "";
370
+ return t.content.forEach((a) => {
371
+ s += this.renderNode(a);
372
+ }), e.optimizeImages ? this.optimizeImages(s, e.optimizeImages) : s;
370
373
  }
371
374
  return console.warn(
372
375
  `The render method must receive an Object with a "content" field.
@@ -395,854 +398,251 @@ class hn {
395
398
  }`
396
399
  ), "";
397
400
  }
398
- optimizeImages(r, t) {
399
- let i = 0, s = 0, l = "", u = "";
400
- typeof t != "boolean" && (typeof t.width == "number" && t.width > 0 && (l += `width="${t.width}" `, i = t.width), typeof t.height == "number" && t.height > 0 && (l += `height="${t.height}" `, s = t.height), (t.loading === "lazy" || t.loading === "eager") && (l += `loading="${t.loading}" `), typeof t.class == "string" && t.class.length > 0 && (l += `class="${t.class}" `), t.filters && (typeof t.filters.blur == "number" && t.filters.blur >= 0 && t.filters.blur <= 100 && (u += `:blur(${t.filters.blur})`), typeof t.filters.brightness == "number" && t.filters.brightness >= -100 && t.filters.brightness <= 100 && (u += `:brightness(${t.filters.brightness})`), t.filters.fill && (t.filters.fill.match(/[0-9A-Fa-f]{6}/g) || t.filters.fill === "transparent") && (u += `:fill(${t.filters.fill})`), t.filters.format && ["webp", "png", "jpeg"].includes(t.filters.format) && (u += `:format(${t.filters.format})`), typeof t.filters.grayscale == "boolean" && t.filters.grayscale && (u += ":grayscale()"), typeof t.filters.quality == "number" && t.filters.quality >= 0 && t.filters.quality <= 100 && (u += `:quality(${t.filters.quality})`), t.filters.rotate && [90, 180, 270].includes(t.filters.rotate) && (u += `:rotate(${t.filters.rotate})`), u.length > 0 && (u = "/filters" + u))), l.length > 0 && (r = r.replace(/<img/g, `<img ${l.trim()}`));
401
- const f = i > 0 || s > 0 || u.length > 0 ? `${i}x${s}${u}` : "";
402
- return r = r.replace(
401
+ optimizeImages(t, e) {
402
+ let o = 0, s = 0, a = "", n = "";
403
+ typeof e != "boolean" && (typeof e.width == "number" && e.width > 0 && (a += `width="${e.width}" `, o = e.width), typeof e.height == "number" && e.height > 0 && (a += `height="${e.height}" `, s = e.height), (e.loading === "lazy" || e.loading === "eager") && (a += `loading="${e.loading}" `), typeof e.class == "string" && e.class.length > 0 && (a += `class="${e.class}" `), e.filters && (typeof e.filters.blur == "number" && e.filters.blur >= 0 && e.filters.blur <= 100 && (n += `:blur(${e.filters.blur})`), typeof e.filters.brightness == "number" && e.filters.brightness >= -100 && e.filters.brightness <= 100 && (n += `:brightness(${e.filters.brightness})`), e.filters.fill && (e.filters.fill.match(/[0-9A-Fa-f]{6}/g) || e.filters.fill === "transparent") && (n += `:fill(${e.filters.fill})`), e.filters.format && ["webp", "png", "jpeg"].includes(e.filters.format) && (n += `:format(${e.filters.format})`), typeof e.filters.grayscale == "boolean" && e.filters.grayscale && (n += ":grayscale()"), typeof e.filters.quality == "number" && e.filters.quality >= 0 && e.filters.quality <= 100 && (n += `:quality(${e.filters.quality})`), e.filters.rotate && [90, 180, 270].includes(e.filters.rotate) && (n += `:rotate(${e.filters.rotate})`), n.length > 0 && (n = "/filters" + n))), a.length > 0 && (t = t.replace(/<img/g, `<img ${a.trim()}`));
404
+ const i = o > 0 || s > 0 || n.length > 0 ? `${o}x${s}${n}` : "";
405
+ return t = t.replace(
403
406
  /a.storyblok.com\/f\/(\d+)\/([^.]+)\.(gif|jpg|jpeg|png|tif|tiff|bmp)/g,
404
- `a.storyblok.com/f/$1/$2.$3/m/${f}`
405
- ), typeof t != "boolean" && (t.sizes || t.srcset) && (r = r.replace(/<img.*?src=["|'](.*?)["|']/g, (g) => {
406
- var b, _;
407
- const k = g.match(
407
+ `a.storyblok.com/f/$1/$2.$3/m/${i}`
408
+ ), typeof e != "boolean" && (e.sizes || e.srcset) && (t = t.replace(/<img.*?src=["|'](.*?)["|']/g, (l) => {
409
+ var c, u;
410
+ const f = l.match(
408
411
  /a.storyblok.com\/f\/(\d+)\/([^.]+)\.(gif|jpg|jpeg|png|tif|tiff|bmp)/g
409
412
  );
410
- if (k && k.length > 0) {
411
- const I = {
412
- srcset: (b = t.srcset) == null ? void 0 : b.map((w) => {
413
- if (typeof w == "number")
414
- return `//${k}/m/${w}x0${u} ${w}w`;
415
- if (typeof w == "object" && w.length === 2) {
416
- let M = 0, F = 0;
417
- return typeof w[0] == "number" && (M = w[0]), typeof w[1] == "number" && (F = w[1]), `//${k}/m/${M}x${F}${u} ${M}w`;
413
+ if (f && f.length > 0) {
414
+ const d = {
415
+ srcset: (c = e.srcset) == null ? void 0 : c.map((p) => {
416
+ if (typeof p == "number")
417
+ return `//${f}/m/${p}x0${n} ${p}w`;
418
+ if (typeof p == "object" && p.length === 2) {
419
+ let y = 0, m = 0;
420
+ return typeof p[0] == "number" && (y = p[0]), typeof p[1] == "number" && (m = p[1]), `//${f}/m/${y}x${m}${n} ${y}w`;
418
421
  }
419
422
  }).join(", "),
420
- sizes: (_ = t.sizes) == null ? void 0 : _.map((w) => w).join(", ")
423
+ sizes: (u = e.sizes) == null ? void 0 : u.map((p) => p).join(", ")
421
424
  };
422
- let O = "";
423
- return I.srcset && (O += `srcset="${I.srcset}" `), I.sizes && (O += `sizes="${I.sizes}" `), g.replace(/<img/g, `<img ${O.trim()}`);
425
+ let h = "";
426
+ return d.srcset && (h += `srcset="${d.srcset}" `), d.sizes && (h += `sizes="${d.sizes}" `), l.replace(/<img/g, `<img ${h.trim()}`);
424
427
  }
425
- return g;
426
- })), r;
427
- }
428
- renderNode(r) {
429
- const t = [];
430
- r.marks && r.marks.forEach((s) => {
431
- const l = this.getMatchingMark(s);
432
- l && l.tag !== "" && t.push(this.renderOpeningTag(l.tag));
428
+ return l;
429
+ })), t;
430
+ }
431
+ renderNode(t) {
432
+ const e = [];
433
+ t.marks && t.marks.forEach((s) => {
434
+ const a = this.getMatchingMark(s);
435
+ a && a.tag !== "" && e.push(this.renderOpeningTag(a.tag));
433
436
  });
434
- const i = this.getMatchingNode(r);
435
- return i && i.tag && t.push(this.renderOpeningTag(i.tag)), r.content ? r.content.forEach((s) => {
436
- t.push(this.renderNode(s));
437
- }) : r.text ? t.push(gn(r.text)) : i && i.singleTag ? t.push(this.renderTag(i.singleTag, " /")) : i && i.html ? t.push(i.html) : r.type === "emoji" && t.push(this.renderEmoji(r)), i && i.tag && t.push(this.renderClosingTag(i.tag)), r.marks && r.marks.slice(0).reverse().forEach((s) => {
438
- const l = this.getMatchingMark(s);
439
- l && l.tag !== "" && t.push(this.renderClosingTag(l.tag));
440
- }), t.join("");
441
- }
442
- renderTag(r, t) {
443
- return r.constructor === String ? `<${r}${t}>` : r.map((i) => {
444
- if (i.constructor === String)
445
- return `<${i}${t}>`;
437
+ const o = this.getMatchingNode(t);
438
+ return o && o.tag && e.push(this.renderOpeningTag(o.tag)), t.content ? t.content.forEach((s) => {
439
+ e.push(this.renderNode(s));
440
+ }) : t.text ? e.push(fe(t.text)) : o && o.singleTag ? e.push(this.renderTag(o.singleTag, " /")) : o && o.html ? e.push(o.html) : t.type === "emoji" && e.push(this.renderEmoji(t)), o && o.tag && e.push(this.renderClosingTag(o.tag)), t.marks && t.marks.slice(0).reverse().forEach((s) => {
441
+ const a = this.getMatchingMark(s);
442
+ a && a.tag !== "" && e.push(this.renderClosingTag(a.tag));
443
+ }), e.join("");
444
+ }
445
+ renderTag(t, e) {
446
+ return t.constructor === String ? `<${t}${e}>` : t.map((o) => {
447
+ if (o.constructor === String)
448
+ return `<${o}${e}>`;
446
449
  {
447
- let s = `<${i.tag}`;
448
- if (i.attrs) {
449
- for (const l in i.attrs)
450
- if (Object.prototype.hasOwnProperty.call(i.attrs, l)) {
451
- const u = i.attrs[l];
452
- u !== null && (s += ` ${l}="${u}"`);
450
+ let s = `<${o.tag}`;
451
+ if (o.attrs) {
452
+ for (const a in o.attrs)
453
+ if (Object.prototype.hasOwnProperty.call(o.attrs, a)) {
454
+ const n = o.attrs[a];
455
+ n !== null && (s += ` ${a}="${n}"`);
453
456
  }
454
457
  }
455
- return `${s}${t}>`;
458
+ return `${s}${e}>`;
456
459
  }
457
460
  }).join("");
458
461
  }
459
- renderOpeningTag(r) {
460
- return this.renderTag(r, "");
462
+ renderOpeningTag(t) {
463
+ return this.renderTag(t, "");
461
464
  }
462
- renderClosingTag(r) {
463
- return r.constructor === String ? `</${r}>` : r.slice(0).reverse().map((t) => t.constructor === String ? `</${t}>` : `</${t.tag}>`).join("");
465
+ renderClosingTag(t) {
466
+ return t.constructor === String ? `</${t}>` : t.slice(0).reverse().map((e) => e.constructor === String ? `</${e}>` : `</${e.tag}>`).join("");
464
467
  }
465
- getMatchingNode(r) {
466
- const t = this.nodes[r.type];
467
- if (typeof t == "function")
468
- return t(r);
468
+ getMatchingNode(t) {
469
+ const e = this.nodes[t.type];
470
+ if (typeof e == "function")
471
+ return e(t);
469
472
  }
470
- getMatchingMark(r) {
471
- const t = this.marks[r.type];
472
- if (typeof t == "function")
473
- return t(r);
473
+ getMatchingMark(t) {
474
+ const e = this.marks[t.type];
475
+ if (typeof e == "function")
476
+ return e(t);
474
477
  }
475
- renderEmoji(r) {
476
- if (r.attrs.emoji)
477
- return r.attrs.emoji;
478
- const t = [
478
+ renderEmoji(t) {
479
+ if (t.attrs.emoji)
480
+ return t.attrs.emoji;
481
+ const e = [
479
482
  {
480
483
  tag: "img",
481
484
  attrs: {
482
- src: r.attrs.fallbackImage,
485
+ src: t.attrs.fallbackImage,
483
486
  draggable: "false",
484
487
  loading: "lazy",
485
488
  align: "absmiddle"
486
489
  }
487
490
  }
488
491
  ];
489
- return this.renderTag(t, " /");
492
+ return this.renderTag(e, " /");
490
493
  }
491
494
  }
492
- const $n = (o) => {
493
- if (typeof o != "object" || typeof o._editable > "u")
495
+ const ye = he, Te = (r) => {
496
+ if (typeof r != "object" || typeof r._editable > "u")
494
497
  return {};
495
498
  try {
496
- const r = JSON.parse(
497
- o._editable.replace(/^<!--#storyblok#/, "").replace(/-->$/, "")
499
+ const t = JSON.parse(
500
+ r._editable.replace(/^<!--#storyblok#/, "").replace(/-->$/, "")
498
501
  );
499
- return r ? {
500
- "data-blok-c": JSON.stringify(r),
501
- "data-blok-uid": r.id + "-" + r.uid
502
+ return t ? {
503
+ "data-blok-c": JSON.stringify(t),
504
+ "data-blok-uid": t.id + "-" + t.uid
502
505
  } : {};
503
506
  } catch {
504
507
  return {};
505
508
  }
506
509
  };
507
- let yn, bn = "https://app.storyblok.com/f/storyblok-v2-latest.js";
508
- const mn = (o, r) => {
509
- o.addNode("blok", (t) => {
510
- let i = "";
511
- return t.attrs.body.forEach((s) => {
512
- i += r(s.component, s);
510
+ let be, me = "https://app.storyblok.com/f/storyblok-v2-latest.js";
511
+ const ke = (r, t) => {
512
+ r.addNode("blok", (e) => {
513
+ let o = "";
514
+ return e.attrs.body.forEach((s) => {
515
+ o += t(s.component, s);
513
516
  }), {
514
- html: i
517
+ html: o
515
518
  };
516
519
  });
517
- }, vn = (o) => !o || !(o != null && o.content.some((r) => r.content || r.type === "blok" || r.type === "horizontal_rule")), _n = (o, r, t) => {
518
- let i = t || yn;
519
- if (!i) {
520
+ }, we = (r) => !r || !(r != null && r.content.some((t) => t.content || t.type === "blok" || t.type === "horizontal_rule")), $e = (r, t, e) => {
521
+ let o = e || be;
522
+ if (!o) {
520
523
  console.error(
521
524
  "Please initialize the Storyblok SDK before calling the renderRichText function"
522
525
  );
523
526
  return;
524
527
  }
525
- return vn(o) ? "" : (r && (i = new hn(r.schema), r.resolver && mn(i, r.resolver)), i.render(o));
526
- }, xn = () => Nr(bn);
527
- function wn(o) {
528
- let r = {
529
- resolveRelations: []
530
- };
531
- function t(i) {
532
- i && Array.isArray(r.resolveRelations) && r.resolveRelations.push(
533
- ...Array.isArray(i) ? i : [i]
534
- );
535
- }
536
- for (const i of o)
537
- if (i.options) {
538
- const { apiOptions: s, bridgeOptions: l } = i.options;
539
- if (t(s == null ? void 0 : s.resolve_relations), l) {
540
- const { resolveRelations: u, ...f } = l;
541
- t(u), Object.assign(r, f);
542
- }
543
- }
544
- return r.resolveRelations = [...new Set(r.resolveRelations)], r;
545
- }
546
- var X = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
547
- function Tn(o) {
548
- return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
549
- }
550
- var Z = { exports: {} };
551
- Z.exports;
552
- (function(o, r) {
553
- var t = 200, i = "__lodash_hash_undefined__", s = 800, l = 16, u = 9007199254740991, f = "[object Arguments]", g = "[object Array]", b = "[object AsyncFunction]", _ = "[object Boolean]", k = "[object Date]", I = "[object Error]", O = "[object Function]", w = "[object GeneratorFunction]", M = "[object Map]", F = "[object Number]", Je = "[object Null]", pe = "[object Object]", Ke = "[object Proxy]", We = "[object RegExp]", Ye = "[object Set]", Ve = "[object String]", Xe = "[object Undefined]", Ze = "[object WeakMap]", Qe = "[object ArrayBuffer]", et = "[object DataView]", tt = "[object Float32Array]", rt = "[object Float64Array]", nt = "[object Int8Array]", ot = "[object Int16Array]", at = "[object Int32Array]", it = "[object Uint8Array]", st = "[object Uint8ClampedArray]", lt = "[object Uint16Array]", ct = "[object Uint32Array]", ut = /[\\^$.*+?()[\]{}|]/g, ft = /^\[object .+?Constructor\]$/, pt = /^(?:0|[1-9]\d*)$/, y = {};
554
- y[tt] = y[rt] = y[nt] = y[ot] = y[at] = y[it] = y[st] = y[lt] = y[ct] = !0, y[f] = y[g] = y[Qe] = y[_] = y[et] = y[k] = y[I] = y[O] = y[M] = y[F] = y[pe] = y[We] = y[Ye] = y[Ve] = y[Ze] = !1;
555
- var de = typeof X == "object" && X && X.Object === Object && X, dt = typeof self == "object" && self && self.Object === Object && self, N = de || dt || Function("return this")(), ge = r && !r.nodeType && r, z = ge && !0 && o && !o.nodeType && o, he = z && z.exports === ge, Q = he && de.process, ye = function() {
556
- try {
557
- var e = z && z.require && z.require("util").types;
558
- return e || Q && Q.binding && Q.binding("util");
559
- } catch {
560
- }
561
- }(), be = ye && ye.isTypedArray;
562
- function gt(e, n, a) {
563
- switch (a.length) {
564
- case 0:
565
- return e.call(n);
566
- case 1:
567
- return e.call(n, a[0]);
568
- case 2:
569
- return e.call(n, a[0], a[1]);
570
- case 3:
571
- return e.call(n, a[0], a[1], a[2]);
572
- }
573
- return e.apply(n, a);
574
- }
575
- function ht(e, n) {
576
- for (var a = -1, c = Array(e); ++a < e; )
577
- c[a] = n(a);
578
- return c;
579
- }
580
- function yt(e) {
581
- return function(n) {
582
- return e(n);
583
- };
584
- }
585
- function bt(e, n) {
586
- return e == null ? void 0 : e[n];
587
- }
588
- function mt(e, n) {
589
- return function(a) {
590
- return e(n(a));
591
- };
592
- }
593
- var vt = Array.prototype, _t = Function.prototype, H = Object.prototype, ee = N["__core-js_shared__"], q = _t.toString, C = H.hasOwnProperty, me = function() {
594
- var e = /[^.]+$/.exec(ee && ee.keys && ee.keys.IE_PROTO || "");
595
- return e ? "Symbol(src)_1." + e : "";
596
- }(), ve = H.toString, wt = q.call(Object), Tt = RegExp(
597
- "^" + q.call(C).replace(ut, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
598
- ), G = he ? N.Buffer : void 0, _e = N.Symbol, we = N.Uint8Array, Te = G ? G.allocUnsafe : void 0, ke = mt(Object.getPrototypeOf, Object), Ae = Object.create, kt = H.propertyIsEnumerable, At = vt.splice, $ = _e ? _e.toStringTag : void 0, J = function() {
599
- try {
600
- var e = ne(Object, "defineProperty");
601
- return e({}, "", {}), e;
602
- } catch {
603
- }
604
- }(), It = G ? G.isBuffer : void 0, Ie = Math.max, St = Date.now, Se = ne(N, "Map"), L = ne(Object, "create"), Ot = /* @__PURE__ */ function() {
605
- function e() {
606
- }
607
- return function(n) {
608
- if (!E(n))
609
- return {};
610
- if (Ae)
611
- return Ae(n);
612
- e.prototype = n;
613
- var a = new e();
614
- return e.prototype = void 0, a;
615
- };
616
- }();
617
- function x(e) {
618
- var n = -1, a = e == null ? 0 : e.length;
619
- for (this.clear(); ++n < a; ) {
620
- var c = e[n];
621
- this.set(c[0], c[1]);
622
- }
623
- }
624
- function Ct() {
625
- this.__data__ = L ? L(null) : {}, this.size = 0;
626
- }
627
- function jt(e) {
628
- var n = this.has(e) && delete this.__data__[e];
629
- return this.size -= n ? 1 : 0, n;
630
- }
631
- function $t(e) {
632
- var n = this.__data__;
633
- if (L) {
634
- var a = n[e];
635
- return a === i ? void 0 : a;
636
- }
637
- return C.call(n, e) ? n[e] : void 0;
638
- }
639
- function xt(e) {
640
- var n = this.__data__;
641
- return L ? n[e] !== void 0 : C.call(n, e);
642
- }
643
- function Et(e, n) {
644
- var a = this.__data__;
645
- return this.size += this.has(e) ? 0 : 1, a[e] = L && n === void 0 ? i : n, this;
646
- }
647
- x.prototype.clear = Ct, x.prototype.delete = jt, x.prototype.get = $t, x.prototype.has = xt, x.prototype.set = Et;
648
- function j(e) {
649
- var n = -1, a = e == null ? 0 : e.length;
650
- for (this.clear(); ++n < a; ) {
651
- var c = e[n];
652
- this.set(c[0], c[1]);
653
- }
654
- }
655
- function Rt() {
656
- this.__data__ = [], this.size = 0;
657
- }
658
- function Pt(e) {
659
- var n = this.__data__, a = K(n, e);
660
- if (a < 0)
661
- return !1;
662
- var c = n.length - 1;
663
- return a == c ? n.pop() : At.call(n, a, 1), --this.size, !0;
664
- }
665
- function Mt(e) {
666
- var n = this.__data__, a = K(n, e);
667
- return a < 0 ? void 0 : n[a][1];
668
- }
669
- function Nt(e) {
670
- return K(this.__data__, e) > -1;
671
- }
672
- function zt(e, n) {
673
- var a = this.__data__, c = K(a, e);
674
- return c < 0 ? (++this.size, a.push([e, n])) : a[c][1] = n, this;
675
- }
676
- j.prototype.clear = Rt, j.prototype.delete = Pt, j.prototype.get = Mt, j.prototype.has = Nt, j.prototype.set = zt;
677
- function R(e) {
678
- var n = -1, a = e == null ? 0 : e.length;
679
- for (this.clear(); ++n < a; ) {
680
- var c = e[n];
681
- this.set(c[0], c[1]);
682
- }
683
- }
684
- function Lt() {
685
- this.size = 0, this.__data__ = {
686
- hash: new x(),
687
- map: new (Se || j)(),
688
- string: new x()
689
- };
690
- }
691
- function Dt(e) {
692
- var n = Y(this, e).delete(e);
693
- return this.size -= n ? 1 : 0, n;
694
- }
695
- function Ut(e) {
696
- return Y(this, e).get(e);
697
- }
698
- function Bt(e) {
699
- return Y(this, e).has(e);
700
- }
701
- function Ft(e, n) {
702
- var a = Y(this, e), c = a.size;
703
- return a.set(e, n), this.size += a.size == c ? 0 : 1, this;
704
- }
705
- R.prototype.clear = Lt, R.prototype.delete = Dt, R.prototype.get = Ut, R.prototype.has = Bt, R.prototype.set = Ft;
706
- function P(e) {
707
- var n = this.__data__ = new j(e);
708
- this.size = n.size;
709
- }
710
- function Ht() {
711
- this.__data__ = new j(), this.size = 0;
712
- }
713
- function qt(e) {
714
- var n = this.__data__, a = n.delete(e);
715
- return this.size = n.size, a;
716
- }
717
- function Gt(e) {
718
- return this.__data__.get(e);
719
- }
720
- function Jt(e) {
721
- return this.__data__.has(e);
722
- }
723
- function Kt(e, n) {
724
- var a = this.__data__;
725
- if (a instanceof j) {
726
- var c = a.__data__;
727
- if (!Se || c.length < t - 1)
728
- return c.push([e, n]), this.size = ++a.size, this;
729
- a = this.__data__ = new R(c);
730
- }
731
- return a.set(e, n), this.size = a.size, this;
732
- }
733
- P.prototype.clear = Ht, P.prototype.delete = qt, P.prototype.get = Gt, P.prototype.has = Jt, P.prototype.set = Kt;
734
- function Wt(e, n) {
735
- var a = ie(e), c = !a && ae(e), d = !a && !c && xe(e), h = !a && !c && !d && Re(e), m = a || c || d || h, p = m ? ht(e.length, String) : [], v = p.length;
736
- for (var A in e)
737
- (n || C.call(e, A)) && !(m && // Safari 9 has enumerable `arguments.length` in strict mode.
738
- (A == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
739
- d && (A == "offset" || A == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
740
- h && (A == "buffer" || A == "byteLength" || A == "byteOffset") || // Skip index properties.
741
- je(A, v))) && p.push(A);
742
- return p;
743
- }
744
- function te(e, n, a) {
745
- (a !== void 0 && !V(e[n], a) || a === void 0 && !(n in e)) && re(e, n, a);
746
- }
747
- function Yt(e, n, a) {
748
- var c = e[n];
749
- (!(C.call(e, n) && V(c, a)) || a === void 0 && !(n in e)) && re(e, n, a);
750
- }
751
- function K(e, n) {
752
- for (var a = e.length; a--; )
753
- if (V(e[a][0], n))
754
- return a;
755
- return -1;
756
- }
757
- function re(e, n, a) {
758
- n == "__proto__" && J ? J(e, n, {
759
- configurable: !0,
760
- enumerable: !0,
761
- value: a,
762
- writable: !0
763
- }) : e[n] = a;
764
- }
765
- var Vt = cr();
766
- function W(e) {
767
- return e == null ? e === void 0 ? Xe : Je : $ && $ in Object(e) ? ur(e) : yr(e);
768
- }
769
- function Oe(e) {
770
- return D(e) && W(e) == f;
771
- }
772
- function Xt(e) {
773
- if (!E(e) || gr(e))
774
- return !1;
775
- var n = le(e) ? Tt : ft;
776
- return n.test(_r(e));
777
- }
778
- function Zt(e) {
779
- return D(e) && Ee(e.length) && !!y[W(e)];
780
- }
781
- function Qt(e) {
782
- if (!E(e))
783
- return hr(e);
784
- var n = $e(e), a = [];
785
- for (var c in e)
786
- c == "constructor" && (n || !C.call(e, c)) || a.push(c);
787
- return a;
788
- }
789
- function Ce(e, n, a, c, d) {
790
- e !== n && Vt(n, function(h, m) {
791
- if (d || (d = new P()), E(h))
792
- er(e, n, m, a, Ce, c, d);
793
- else {
794
- var p = c ? c(oe(e, m), h, m + "", e, n, d) : void 0;
795
- p === void 0 && (p = h), te(e, m, p);
796
- }
797
- }, Pe);
798
- }
799
- function er(e, n, a, c, d, h, m) {
800
- var p = oe(e, a), v = oe(n, a), A = m.get(v);
801
- if (A) {
802
- te(e, a, A);
803
- return;
804
- }
805
- var T = h ? h(p, v, a + "", e, n, m) : void 0, U = T === void 0;
806
- if (U) {
807
- var ce = ie(v), ue = !ce && xe(v), Ne = !ce && !ue && Re(v);
808
- T = v, ce || ue || Ne ? ie(p) ? T = p : wr(p) ? T = ir(p) : ue ? (U = !1, T = nr(v, !0)) : Ne ? (U = !1, T = ar(v, !0)) : T = [] : Tr(v) || ae(v) ? (T = p, ae(p) ? T = kr(p) : (!E(p) || le(p)) && (T = fr(v))) : U = !1;
809
- }
810
- U && (m.set(v, T), d(T, v, c, h, m), m.delete(v)), te(e, a, T);
811
- }
812
- function tr(e, n) {
813
- return mr(br(e, n, Me), e + "");
814
- }
815
- var rr = J ? function(e, n) {
816
- return J(e, "toString", {
817
- configurable: !0,
818
- enumerable: !1,
819
- value: Ir(n),
820
- writable: !0
821
- });
822
- } : Me;
823
- function nr(e, n) {
824
- if (n)
825
- return e.slice();
826
- var a = e.length, c = Te ? Te(a) : new e.constructor(a);
827
- return e.copy(c), c;
828
- }
829
- function or(e) {
830
- var n = new e.constructor(e.byteLength);
831
- return new we(n).set(new we(e)), n;
832
- }
833
- function ar(e, n) {
834
- var a = n ? or(e.buffer) : e.buffer;
835
- return new e.constructor(a, e.byteOffset, e.length);
836
- }
837
- function ir(e, n) {
838
- var a = -1, c = e.length;
839
- for (n || (n = Array(c)); ++a < c; )
840
- n[a] = e[a];
841
- return n;
842
- }
843
- function sr(e, n, a, c) {
844
- var d = !a;
845
- a || (a = {});
846
- for (var h = -1, m = n.length; ++h < m; ) {
847
- var p = n[h], v = c ? c(a[p], e[p], p, a, e) : void 0;
848
- v === void 0 && (v = e[p]), d ? re(a, p, v) : Yt(a, p, v);
849
- }
850
- return a;
851
- }
852
- function lr(e) {
853
- return tr(function(n, a) {
854
- var c = -1, d = a.length, h = d > 1 ? a[d - 1] : void 0, m = d > 2 ? a[2] : void 0;
855
- for (h = e.length > 3 && typeof h == "function" ? (d--, h) : void 0, m && pr(a[0], a[1], m) && (h = d < 3 ? void 0 : h, d = 1), n = Object(n); ++c < d; ) {
856
- var p = a[c];
857
- p && e(n, p, c, h);
858
- }
859
- return n;
860
- });
861
- }
862
- function cr(e) {
863
- return function(n, a, c) {
864
- for (var d = -1, h = Object(n), m = c(n), p = m.length; p--; ) {
865
- var v = m[e ? p : ++d];
866
- if (a(h[v], v, h) === !1)
867
- break;
868
- }
869
- return n;
870
- };
871
- }
872
- function Y(e, n) {
873
- var a = e.__data__;
874
- return dr(n) ? a[typeof n == "string" ? "string" : "hash"] : a.map;
875
- }
876
- function ne(e, n) {
877
- var a = bt(e, n);
878
- return Xt(a) ? a : void 0;
879
- }
880
- function ur(e) {
881
- var n = C.call(e, $), a = e[$];
882
- try {
883
- e[$] = void 0;
884
- var c = !0;
885
- } catch {
886
- }
887
- var d = ve.call(e);
888
- return c && (n ? e[$] = a : delete e[$]), d;
889
- }
890
- function fr(e) {
891
- return typeof e.constructor == "function" && !$e(e) ? Ot(ke(e)) : {};
892
- }
893
- function je(e, n) {
894
- var a = typeof e;
895
- return n = n ?? u, !!n && (a == "number" || a != "symbol" && pt.test(e)) && e > -1 && e % 1 == 0 && e < n;
896
- }
897
- function pr(e, n, a) {
898
- if (!E(a))
899
- return !1;
900
- var c = typeof n;
901
- return (c == "number" ? se(a) && je(n, a.length) : c == "string" && n in a) ? V(a[n], e) : !1;
902
- }
903
- function dr(e) {
904
- var n = typeof e;
905
- return n == "string" || n == "number" || n == "symbol" || n == "boolean" ? e !== "__proto__" : e === null;
906
- }
907
- function gr(e) {
908
- return !!me && me in e;
909
- }
910
- function $e(e) {
911
- var n = e && e.constructor, a = typeof n == "function" && n.prototype || H;
912
- return e === a;
913
- }
914
- function hr(e) {
915
- var n = [];
916
- if (e != null)
917
- for (var a in Object(e))
918
- n.push(a);
919
- return n;
920
- }
921
- function yr(e) {
922
- return ve.call(e);
923
- }
924
- function br(e, n, a) {
925
- return n = Ie(n === void 0 ? e.length - 1 : n, 0), function() {
926
- for (var c = arguments, d = -1, h = Ie(c.length - n, 0), m = Array(h); ++d < h; )
927
- m[d] = c[n + d];
928
- d = -1;
929
- for (var p = Array(n + 1); ++d < n; )
930
- p[d] = c[d];
931
- return p[n] = a(m), gt(e, this, p);
932
- };
933
- }
934
- function oe(e, n) {
935
- if (!(n === "constructor" && typeof e[n] == "function") && n != "__proto__")
936
- return e[n];
937
- }
938
- var mr = vr(rr);
939
- function vr(e) {
940
- var n = 0, a = 0;
941
- return function() {
942
- var c = St(), d = l - (c - a);
943
- if (a = c, d > 0) {
944
- if (++n >= s)
945
- return arguments[0];
946
- } else
947
- n = 0;
948
- return e.apply(void 0, arguments);
949
- };
950
- }
951
- function _r(e) {
952
- if (e != null) {
953
- try {
954
- return q.call(e);
955
- } catch {
956
- }
957
- try {
958
- return e + "";
959
- } catch {
960
- }
961
- }
962
- return "";
963
- }
964
- function V(e, n) {
965
- return e === n || e !== e && n !== n;
966
- }
967
- var ae = Oe(/* @__PURE__ */ function() {
968
- return arguments;
969
- }()) ? Oe : function(e) {
970
- return D(e) && C.call(e, "callee") && !kt.call(e, "callee");
971
- }, ie = Array.isArray;
972
- function se(e) {
973
- return e != null && Ee(e.length) && !le(e);
974
- }
975
- function wr(e) {
976
- return D(e) && se(e);
977
- }
978
- var xe = It || Sr;
979
- function le(e) {
980
- if (!E(e))
981
- return !1;
982
- var n = W(e);
983
- return n == O || n == w || n == b || n == Ke;
984
- }
985
- function Ee(e) {
986
- return typeof e == "number" && e > -1 && e % 1 == 0 && e <= u;
987
- }
988
- function E(e) {
989
- var n = typeof e;
990
- return e != null && (n == "object" || n == "function");
991
- }
992
- function D(e) {
993
- return e != null && typeof e == "object";
994
- }
995
- function Tr(e) {
996
- if (!D(e) || W(e) != pe)
997
- return !1;
998
- var n = ke(e);
999
- if (n === null)
1000
- return !0;
1001
- var a = C.call(n, "constructor") && n.constructor;
1002
- return typeof a == "function" && a instanceof a && q.call(a) == wt;
1003
- }
1004
- var Re = be ? yt(be) : Zt;
1005
- function kr(e) {
1006
- return sr(e, Pe(e));
1007
- }
1008
- function Pe(e) {
1009
- return se(e) ? Wt(e, !0) : Qt(e);
1010
- }
1011
- var Ar = lr(function(e, n, a, c) {
1012
- Ce(e, n, a, c);
1013
- });
1014
- function Ir(e) {
1015
- return function() {
1016
- return e;
1017
- };
1018
- }
1019
- function Me(e) {
1020
- return e;
1021
- }
1022
- function Sr() {
1023
- return !1;
1024
- }
1025
- o.exports = Ar;
1026
- })(Z, Z.exports);
1027
- var kn = Z.exports;
1028
- const An = /* @__PURE__ */ Tn(kn);
1029
- function In(o) {
1030
- let r = {};
1031
- function t(i, s) {
1032
- if ((s == null ? void 0 : s.type) === "AwaitExpression" && s.argument.type === "CallExpression" && s.argument.callee.type === "Identifier" && s.argument.callee.name === "useStoryblok") {
1033
- const l = s.argument.arguments;
1034
- if (l && l[1].type === "ObjectExpression") {
1035
- const u = He(l[1].properties);
1036
- r = {
1037
- ...r,
1038
- apiOptions: u
1039
- };
1040
- }
1041
- if (l && l[2].type === "ObjectExpression") {
1042
- const u = He(l[2].properties);
1043
- r = {
1044
- ...r,
1045
- bridgeOptions: u
1046
- };
1047
- }
1048
- }
1049
- }
1050
- return An({}, o, t), r;
528
+ return we(r) ? "" : (t && (o = new ye(t.schema), t.resolver && ke(o, t.resolver)), o.render(r, {}, !1));
529
+ }, Ae = () => _(me);
530
+ function ve(r) {
531
+ return typeof r == "object" ? `const storyblokInstance = new StoryblokBridge(${JSON.stringify(r)});` : "const storyblokInstance = new StoryblokBridge();";
1051
532
  }
1052
- function He(o) {
1053
- const r = {};
1054
- return o.reduce((t, i) => {
1055
- if (i.type !== "Property") return t;
1056
- const { key: s, value: l } = i, { type: u } = l;
1057
- if (s.type !== "Identifier") return t;
1058
- if (u === "Literal")
1059
- t[s.name] = l.value;
1060
- else if (u === "ArrayExpression") {
1061
- const f = l.elements.reduce((g, b) => b.type === "Literal" && b.value ? [...g, b.value] : g, []);
1062
- t[s.name] = f;
1063
- }
1064
- return t;
1065
- }, r);
1066
- }
1067
- let B = [];
1068
- function Sn(o, r) {
1069
- const t = "virtual:storyblok-bridge", i = "\0" + t;
1070
- if (!o || r !== "server")
1071
- return {
1072
- name: "vite-plugin-storyblok-bridge",
1073
- resolveId(f) {
1074
- if (f === t)
1075
- return i;
1076
- },
1077
- load(f) {
1078
- if (f === i)
1079
- return "export const bridgeOptions = null";
1080
- }
533
+ let A;
534
+ async function xe(r) {
535
+ const { action: t, story: e } = r || {};
536
+ if (t === "input" && e) {
537
+ const o = async () => {
538
+ const a = await Se(e), n = document.body;
539
+ if (a.outerHTML === n.outerHTML) return;
540
+ const i = document.querySelector('[data-blok-focused="true"]');
541
+ Ie(n, a, i), document.dispatchEvent(new Event("storyblok-live-preview-updated"));
1081
542
  };
1082
- let s = [], l = null, u;
1083
- return {
1084
- name: "vite-plugin-storyblok-bridge",
1085
- async resolveId(f) {
1086
- if (f === t)
1087
- return i;
1088
- },
1089
- async transform(f, g) {
1090
- var O;
1091
- if (g.includes("node_modules") && !g.includes("/pages/") || !f.includes("useStoryblok") || !((O = this.getModuleInfo(g).meta) != null && O.astro)) return;
1092
- const [, ..._] = g.split("src/pages/"), k = _.join("/").replace(".astro", ""), I = In(this.parse(f));
1093
- B.length && (s = B.filter((w) => w.url !== k)), s.push({
1094
- url: k,
1095
- options: I
1096
- }), l && (u && clearTimeout(u), u = setTimeout(() => {
1097
- On(B, s) || (B.length !== 0 && (l.restart(), console.info("Bridge options updated. Restarting...")), B = [...s]);
1098
- }, 1e3));
1099
- },
1100
- async load(f) {
1101
- if (f === i)
1102
- return `export const bridgeOptions = ${JSON.stringify(wn(s))}`;
1103
- },
1104
- configureServer(f) {
1105
- l = f;
1106
- }
1107
- };
1108
- }
1109
- function On(o = [], r = []) {
1110
- return r.every(({ url: t, options: i }) => {
1111
- const s = o.find((l) => (l == null ? void 0 : l.url) === t);
1112
- return s && JSON.stringify(i) === JSON.stringify(s.options);
1113
- });
1114
- }
1115
- let qe;
1116
- async function En(o) {
1117
- const { action: r, story: t } = o || {};
1118
- if (r === "input" && t) {
1119
- const i = async () => {
1120
- const l = await jn(t), u = document.body;
1121
- if (l.outerHTML === u.outerHTML) return;
1122
- const f = document.querySelector('[data-blok-focused="true"]');
1123
- Cn(u, l, f);
1124
- };
1125
- clearTimeout(qe), qe = setTimeout(i, 500);
543
+ clearTimeout(A), A = setTimeout(o, 500);
1126
544
  }
1127
- ["published", "change"].includes(o == null ? void 0 : o.action) && location.reload();
545
+ ["published", "change"].includes(r == null ? void 0 : r.action) && location.reload();
1128
546
  }
1129
- function Cn(o, r, t) {
1130
- if (t) {
1131
- const i = t.getAttribute("data-blok-uid"), s = r.querySelector(
1132
- `[data-blok-uid="${i}"]`
547
+ function Ie(r, t, e) {
548
+ if (e) {
549
+ const o = e.getAttribute("data-blok-uid"), s = t.querySelector(
550
+ `[data-blok-uid="${o}"]`
1133
551
  );
1134
- s && (s.setAttribute("data-blok-focused", "true"), t.replaceWith(s));
552
+ s && (s.setAttribute("data-blok-focused", "true"), e.replaceWith(s));
1135
553
  } else
1136
- o.replaceWith(r);
554
+ r.replaceWith(t);
1137
555
  }
1138
- async function jn(o) {
1139
- const t = await (await fetch(location.href, {
556
+ async function Se(r) {
557
+ const e = await (await fetch(location.href, {
1140
558
  method: "POST",
1141
559
  body: JSON.stringify({
1142
- ...o,
560
+ ...r,
1143
561
  is_storyblok_preview: !0
1144
562
  }),
1145
563
  headers: {
1146
564
  "Content-Type": "application/json"
1147
565
  }
1148
566
  })).text();
1149
- return new DOMParser().parseFromString(t, "text/html").body;
567
+ return new DOMParser().parseFromString(e, "text/html").body;
1150
568
  }
1151
- function Rn() {
569
+ function Ee() {
1152
570
  return globalThis.storyblokApiInstance || console.error("storyblokApiInstance has not been initialized correctly"), globalThis.storyblokApiInstance;
1153
571
  }
1154
- async function Pn(o, r = {}, t = {}, i) {
1155
- globalThis.storyblokApiInstance || console.error("storyblokApiInstance has not been initialized correctly");
1156
- let s = null;
1157
- if (i && i.locals._storyblok_preview_data)
1158
- s = i.locals._storyblok_preview_data;
1159
- else {
1160
- const { data: l } = await globalThis.storyblokApiInstance.get(
1161
- o,
1162
- r,
1163
- t
1164
- );
1165
- s = l.story;
1166
- }
1167
- return s;
572
+ async function Ce(r) {
573
+ let t = null;
574
+ return r && r.locals._storyblok_preview_data && (t = r.locals._storyblok_preview_data), t;
1168
575
  }
1169
- function Mn(o, r) {
1170
- const t = globalThis.storyblokApiInstance.richTextResolver;
1171
- if (!t) {
576
+ function je(r, t) {
577
+ const e = globalThis.storyblokApiInstance.richTextResolver;
578
+ if (!e) {
1172
579
  console.error(
1173
580
  "Please initialize the Storyblok SDK before calling the renderRichText function"
1174
581
  );
1175
582
  return;
1176
583
  }
1177
- return _n(o, r, t);
584
+ return $e(r, t, e);
1178
585
  }
1179
- function Nn(o) {
1180
- const r = {
1181
- useCustomApi: !1,
1182
- bridge: !0,
1183
- componentsDir: "src",
1184
- enableFallbackComponent: !1,
1185
- livePreview: !1,
1186
- ...o
1187
- };
586
+ function Re({
587
+ useCustomApi: r = !1,
588
+ bridge: t = !0,
589
+ componentsDir: e = "src",
590
+ enableFallbackComponent: o = !1,
591
+ livePreview: s = !1,
592
+ ...a
593
+ }) {
594
+ const n = {
595
+ useCustomApi: r,
596
+ bridge: t,
597
+ componentsDir: e,
598
+ enableFallbackComponent: o,
599
+ livePreview: s,
600
+ ...a
601
+ }, i = ve(t);
1188
602
  return {
1189
603
  name: "@storyblok/astro",
1190
604
  hooks: {
1191
605
  "astro:config:setup": ({
1192
- injectScript: t,
1193
- updateConfig: i,
1194
- addDevToolbarApp: s,
1195
- addMiddleware: l,
1196
- config: u
606
+ injectScript: l,
607
+ updateConfig: c,
608
+ addDevToolbarApp: u,
609
+ addMiddleware: f,
610
+ config: d
1197
611
  }) => {
1198
- if (i({
612
+ if (c({
1199
613
  vite: {
1200
614
  plugins: [
1201
- Or(
1202
- r.accessToken,
1203
- r.useCustomApi,
1204
- r.apiOptions
615
+ E(
616
+ n.accessToken,
617
+ n.useCustomApi,
618
+ n.apiOptions
1205
619
  ),
1206
- Pr(
1207
- r.componentsDir,
1208
- r.components,
1209
- r.enableFallbackComponent,
1210
- r.customFallbackComponent
620
+ N(
621
+ n.componentsDir,
622
+ n.components,
623
+ n.enableFallbackComponent,
624
+ n.customFallbackComponent
1211
625
  ),
1212
- Mr(r),
1213
- Sn(
1214
- r.livePreview,
1215
- u.output
1216
- )
626
+ P(n)
1217
627
  ]
1218
628
  }
1219
- }), r.livePreview && (u == null ? void 0 : u.output) !== "server")
629
+ }), n.livePreview && (d == null ? void 0 : d.output) !== "server")
1220
630
  throw new Error(
1221
631
  "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."
1222
632
  );
1223
- if (t(
633
+ l(
1224
634
  "page-ssr",
1225
635
  `
1226
636
  import { storyblokApiInstance } from "virtual:storyblok-init";
1227
637
  globalThis.storyblokApiInstance = storyblokApiInstance;
1228
638
  `
1229
- ), r.bridge && !r.livePreview) {
1230
- let f = "";
1231
- if (typeof r.bridge == "object") {
1232
- const g = { ...r.bridge };
1233
- f = `const storyblokInstance = new StoryblokBridge(${JSON.stringify(
1234
- g
1235
- )});`;
1236
- } else
1237
- f = "const storyblokInstance = new StoryblokBridge()";
1238
- t(
1239
- "page",
1240
- `
639
+ ), t && !s && l(
640
+ "page",
641
+ `
1241
642
  import { loadStoryblokBridge } from "@storyblok/astro";
1242
643
  loadStoryblokBridge().then(() => {
1243
644
  const { StoryblokBridge, location } = window;
1244
- ${f}
1245
-
645
+ ${i}
1246
646
  storyblokInstance.on(["published", "change"], (event) => {
1247
647
  if (!event.slugChanged) {
1248
648
  location.reload(true);
@@ -1250,38 +650,33 @@ function Nn(o) {
1250
650
  });
1251
651
  });
1252
652
  `
1253
- );
1254
- }
1255
- r.livePreview && (t(
653
+ ), s && (l(
1256
654
  "page",
1257
655
  `
1258
656
  import { loadStoryblokBridge, handleStoryblokMessage } from "@storyblok/astro";
1259
- import { bridgeOptions } from "virtual:storyblok-bridge";
1260
657
  console.info("The Storyblok Astro live preview feature is currently in an experimental phase, and its API is subject to change in the future.")
1261
658
  loadStoryblokBridge().then(() => {
1262
659
  const { StoryblokBridge, location } = window;
1263
- if(bridgeOptions){
1264
- const storyblokInstance = new StoryblokBridge(bridgeOptions);
1265
- storyblokInstance.on(["published", "change", "input"], handleStoryblokMessage);
1266
- };
660
+ ${i}
661
+ storyblokInstance.on(["published", "change", "input"], handleStoryblokMessage);
1267
662
  });
1268
663
  `
1269
- ), l({
664
+ ), f({
1270
665
  entrypoint: "@storyblok/astro/middleware.ts",
1271
666
  order: "pre"
1272
- })), s("@storyblok/astro/toolbarApp.ts");
667
+ })), u("@storyblok/astro/toolbarApp.ts");
1273
668
  }
1274
669
  }
1275
670
  };
1276
671
  }
1277
672
  export {
1278
- hn as RichTextResolver,
1279
- dn as RichTextSchema,
1280
- Nn as default,
1281
- En as handleStoryblokMessage,
1282
- xn as loadStoryblokBridge,
1283
- Mn as renderRichText,
1284
- $n as storyblokEditable,
1285
- Pn as useStoryblok,
1286
- Rn as useStoryblokApi
673
+ ye as RichTextResolver,
674
+ ge as RichTextSchema,
675
+ Re as default,
676
+ Ce as getLiveStory,
677
+ xe as handleStoryblokMessage,
678
+ Ae as loadStoryblokBridge,
679
+ je as renderRichText,
680
+ Te as storyblokEditable,
681
+ Ee as useStoryblokApi
1287
682
  };