@janbox/contentful-marketplace-sdk 1.0.13 → 1.0.14

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/index.js CHANGED
@@ -1,4 +1,4 @@
1
- var vt = Function.prototype.toString, A = Object.create, St = Object.prototype.toString, kt = (
1
+ var St = Function.prototype.toString, O = Object.create, kt = Object.prototype.toString, At = (
2
2
  /** @class */
3
3
  (function() {
4
4
  function t() {
@@ -13,160 +13,160 @@ var vt = Function.prototype.toString, A = Object.create, St = Object.prototype.t
13
13
  }, t;
14
14
  })()
15
15
  );
16
- function At() {
17
- return new kt();
18
- }
19
16
  function Ot() {
17
+ return new At();
18
+ }
19
+ function jt() {
20
20
  return /* @__PURE__ */ new WeakMap();
21
21
  }
22
- var jt = typeof WeakMap < "u" ? Ot : At;
23
- function B(t) {
22
+ var Tt = typeof WeakMap < "u" ? jt : Ot;
23
+ function Q(t) {
24
24
  if (!t)
25
- return A(null);
25
+ return O(null);
26
26
  var e = t.constructor;
27
27
  if (e === Object)
28
- return t === Object.prototype ? {} : A(t);
29
- if (e && ~vt.call(e).indexOf("[native code]"))
28
+ return t === Object.prototype ? {} : O(t);
29
+ if (e && ~St.call(e).indexOf("[native code]"))
30
30
  try {
31
31
  return new e();
32
32
  } catch {
33
33
  }
34
- return A(t);
34
+ return O(t);
35
35
  }
36
36
  function qt(t) {
37
37
  var e = "";
38
38
  return t.global && (e += "g"), t.ignoreCase && (e += "i"), t.multiline && (e += "m"), t.unicode && (e += "u"), t.sticky && (e += "y"), e;
39
39
  }
40
- function Tt(t) {
40
+ function _t(t) {
41
41
  return t.flags;
42
42
  }
43
- var _t = /test/g.flags === "g" ? Tt : qt;
44
- function at(t) {
45
- var e = St.call(t);
43
+ var Pt = /test/g.flags === "g" ? _t : qt;
44
+ function lt(t) {
45
+ var e = kt.call(t);
46
46
  return e.substring(8, e.length - 1);
47
47
  }
48
- function Pt(t) {
49
- return t[Symbol.toStringTag] || at(t);
48
+ function xt(t) {
49
+ return t[Symbol.toStringTag] || lt(t);
50
50
  }
51
- var xt = typeof Symbol < "u" ? Pt : at, Rt = Object.defineProperty, It = Object.getOwnPropertyDescriptor, lt = Object.getOwnPropertyNames, Q = Object.getOwnPropertySymbols, ct = Object.prototype, ut = ct.hasOwnProperty, Dt = ct.propertyIsEnumerable, ft = typeof Q == "function";
52
- function Mt(t) {
53
- return lt(t).concat(Q(t));
51
+ var It = typeof Symbol < "u" ? xt : lt, Rt = Object.defineProperty, Dt = Object.getOwnPropertyDescriptor, ct = Object.getOwnPropertyNames, F = Object.getOwnPropertySymbols, ut = Object.prototype, ft = ut.hasOwnProperty, Mt = ut.propertyIsEnumerable, gt = typeof F == "function";
52
+ function zt(t) {
53
+ return ct(t).concat(F(t));
54
54
  }
55
- var zt = ft ? Mt : lt;
56
- function S(t, e, r) {
57
- for (var a = zt(t), s = 0, n = a.length, i = void 0, o = void 0; s < n; ++s)
58
- if (i = a[s], !(i === "callee" || i === "caller")) {
59
- if (o = It(t, i), !o) {
60
- e[i] = r.copier(t[i], r);
55
+ var Et = gt ? zt : ct;
56
+ function k(t, e, r) {
57
+ for (var a = Et(t), s = 0, i = a.length, n = void 0, o = void 0; s < i; ++s)
58
+ if (n = a[s], !(n === "callee" || n === "caller")) {
59
+ if (o = Dt(t, n), !o) {
60
+ e[n] = r.copier(t[n], r);
61
61
  continue;
62
62
  }
63
63
  !o.get && !o.set && (o.value = r.copier(o.value, r));
64
64
  try {
65
- Rt(e, i, o);
65
+ Rt(e, n, o);
66
66
  } catch {
67
- e[i] = o.value;
67
+ e[n] = o.value;
68
68
  }
69
69
  }
70
70
  return e;
71
71
  }
72
- function Et(t, e) {
72
+ function Lt(t, e) {
73
73
  var r = new e.Constructor();
74
74
  e.cache.set(t, r);
75
75
  for (var a = 0, s = t.length; a < s; ++a)
76
76
  r[a] = e.copier(t[a], e);
77
77
  return r;
78
78
  }
79
- function Lt(t, e) {
79
+ function Vt(t, e) {
80
80
  var r = new e.Constructor();
81
- return e.cache.set(t, r), S(t, r, e);
81
+ return e.cache.set(t, r), k(t, r, e);
82
82
  }
83
- function gt(t, e) {
83
+ function pt(t, e) {
84
84
  return t.slice(0);
85
85
  }
86
- function Vt(t, e) {
87
- return t.slice(0, t.size, t.type);
88
- }
89
86
  function Nt(t, e) {
90
- return new e.Constructor(gt(t.buffer));
87
+ return t.slice(0, t.size, t.type);
91
88
  }
92
89
  function Bt(t, e) {
90
+ return new e.Constructor(pt(t.buffer));
91
+ }
92
+ function Qt(t, e) {
93
93
  return new e.Constructor(t.getTime());
94
94
  }
95
- function pt(t, e) {
95
+ function ht(t, e) {
96
96
  var r = new e.Constructor();
97
97
  return e.cache.set(t, r), t.forEach(function(a, s) {
98
98
  r.set(s, e.copier(a, e));
99
99
  }), r;
100
100
  }
101
- function Qt(t, e) {
102
- return S(t, pt(t, e), e);
103
- }
104
101
  function Ft(t, e) {
105
- var r = B(e.prototype);
102
+ return k(t, ht(t, e), e);
103
+ }
104
+ function Gt(t, e) {
105
+ var r = Q(e.prototype);
106
106
  e.cache.set(t, r);
107
107
  for (var a in t)
108
- ut.call(t, a) && (r[a] = e.copier(t[a], e));
108
+ ft.call(t, a) && (r[a] = e.copier(t[a], e));
109
109
  return r;
110
110
  }
111
- function Gt(t, e) {
112
- var r = B(e.prototype);
111
+ function Ut(t, e) {
112
+ var r = Q(e.prototype);
113
113
  e.cache.set(t, r);
114
114
  for (var a in t)
115
- ut.call(t, a) && (r[a] = e.copier(t[a], e));
116
- for (var s = Q(t), n = 0, i = s.length, o = void 0; n < i; ++n)
117
- o = s[n], Dt.call(t, o) && (r[o] = e.copier(t[o], e));
115
+ ft.call(t, a) && (r[a] = e.copier(t[a], e));
116
+ for (var s = F(t), i = 0, n = s.length, o = void 0; i < n; ++i)
117
+ o = s[i], Mt.call(t, o) && (r[o] = e.copier(t[o], e));
118
118
  return r;
119
119
  }
120
- var Ut = ft ? Gt : Ft;
121
- function Kt(t, e) {
122
- var r = B(e.prototype);
123
- return e.cache.set(t, r), S(t, r, e);
120
+ var Kt = gt ? Ut : Gt;
121
+ function Wt(t, e) {
122
+ var r = Q(e.prototype);
123
+ return e.cache.set(t, r), k(t, r, e);
124
124
  }
125
- function O(t, e) {
125
+ function j(t, e) {
126
126
  return new e.Constructor(t.valueOf());
127
127
  }
128
- function Wt(t, e) {
129
- var r = new e.Constructor(t.source, _t(t));
128
+ function Jt(t, e) {
129
+ var r = new e.Constructor(t.source, Pt(t));
130
130
  return r.lastIndex = t.lastIndex, r;
131
131
  }
132
- function v(t, e) {
132
+ function S(t, e) {
133
133
  return t;
134
134
  }
135
- function ht(t, e) {
135
+ function yt(t, e) {
136
136
  var r = new e.Constructor();
137
137
  return e.cache.set(t, r), t.forEach(function(a) {
138
138
  r.add(e.copier(a, e));
139
139
  }), r;
140
140
  }
141
- function Jt(t, e) {
142
- return S(t, ht(t, e), e);
141
+ function Ht(t, e) {
142
+ return k(t, yt(t, e), e);
143
143
  }
144
- var Ht = Array.isArray, F = Object.assign, Yt = Object.getPrototypeOf || (function(t) {
144
+ var Yt = Array.isArray, G = Object.assign, Xt = Object.getPrototypeOf || (function(t) {
145
145
  return t.__proto__;
146
146
  }), mt = {
147
- array: Et,
148
- arrayBuffer: gt,
149
- blob: Vt,
150
- dataView: Nt,
151
- date: Bt,
152
- error: v,
153
- map: pt,
154
- object: Ut,
155
- regExp: Wt,
156
- set: ht
157
- }, Xt = F({}, mt, {
158
147
  array: Lt,
159
- map: Qt,
148
+ arrayBuffer: pt,
149
+ blob: Nt,
150
+ dataView: Bt,
151
+ date: Qt,
152
+ error: S,
153
+ map: ht,
160
154
  object: Kt,
161
- set: Jt
155
+ regExp: Jt,
156
+ set: yt
157
+ }, Zt = G({}, mt, {
158
+ array: Vt,
159
+ map: Ft,
160
+ object: Wt,
161
+ set: Ht
162
162
  });
163
- function Zt(t) {
163
+ function te(t) {
164
164
  return {
165
165
  Arguments: t.object,
166
166
  Array: t.array,
167
167
  ArrayBuffer: t.arrayBuffer,
168
168
  Blob: t.blob,
169
- Boolean: O,
169
+ Boolean: j,
170
170
  DataView: t.dataView,
171
171
  Date: t.date,
172
172
  Error: t.error,
@@ -176,14 +176,14 @@ function Zt(t) {
176
176
  Int16Array: t.arrayBuffer,
177
177
  Int32Array: t.arrayBuffer,
178
178
  Map: t.map,
179
- Number: O,
179
+ Number: j,
180
180
  Object: t.object,
181
- Promise: v,
181
+ Promise: S,
182
182
  RegExp: t.regExp,
183
183
  Set: t.set,
184
- String: O,
185
- WeakMap: v,
186
- WeakSet: v,
184
+ String: j,
185
+ WeakMap: S,
186
+ WeakSet: S,
187
187
  Uint8Array: t.arrayBuffer,
188
188
  Uint8ClampedArray: t.arrayBuffer,
189
189
  Uint16Array: t.arrayBuffer,
@@ -191,39 +191,39 @@ function Zt(t) {
191
191
  Uint64Array: t.arrayBuffer
192
192
  };
193
193
  }
194
- function yt(t) {
195
- var e = F({}, mt, t), r = Zt(e), a = r.Array, s = r.Object;
196
- function n(i, o) {
197
- if (o.prototype = o.Constructor = void 0, !i || typeof i != "object")
198
- return i;
199
- if (o.cache.has(i))
200
- return o.cache.get(i);
201
- if (o.prototype = Yt(i), o.Constructor = o.prototype && o.prototype.constructor, !o.Constructor || o.Constructor === Object)
202
- return s(i, o);
203
- if (Ht(i))
204
- return a(i, o);
205
- var l = r[xt(i)];
206
- return l ? l(i, o) : typeof i.then == "function" ? i : s(i, o);
194
+ function dt(t) {
195
+ var e = G({}, mt, t), r = te(e), a = r.Array, s = r.Object;
196
+ function i(n, o) {
197
+ if (o.prototype = o.Constructor = void 0, !n || typeof n != "object")
198
+ return n;
199
+ if (o.cache.has(n))
200
+ return o.cache.get(n);
201
+ if (o.prototype = Xt(n), o.Constructor = o.prototype && o.prototype.constructor, !o.Constructor || o.Constructor === Object)
202
+ return s(n, o);
203
+ if (Yt(n))
204
+ return a(n, o);
205
+ var l = r[It(n)];
206
+ return l ? l(n, o) : typeof n.then == "function" ? n : s(n, o);
207
207
  }
208
208
  return function(o) {
209
- return n(o, {
209
+ return i(o, {
210
210
  Constructor: void 0,
211
- cache: jt(),
212
- copier: n,
211
+ cache: Tt(),
212
+ copier: i,
213
213
  prototype: void 0
214
214
  });
215
215
  };
216
216
  }
217
- function te(t) {
218
- return yt(F({}, Xt, t));
217
+ function ee(t) {
218
+ return dt(G({}, Zt, t));
219
219
  }
220
- te({});
221
- yt({});
222
- var C = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, j = { exports: {} }, G;
223
- function ee() {
224
- if (G) return j.exports;
225
- G = 1;
226
- var t = j.exports = {}, e, r;
220
+ ee({});
221
+ dt({});
222
+ var C = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, T = { exports: {} }, U;
223
+ function re() {
224
+ if (U) return T.exports;
225
+ U = 1;
226
+ var t = T.exports = {}, e, r;
227
227
  function a() {
228
228
  throw new Error("setTimeout has not been defined");
229
229
  }
@@ -242,33 +242,33 @@ function ee() {
242
242
  r = s;
243
243
  }
244
244
  })();
245
- function n(p) {
245
+ function i(h) {
246
246
  if (e === setTimeout)
247
- return setTimeout(p, 0);
247
+ return setTimeout(h, 0);
248
248
  if ((e === a || !e) && setTimeout)
249
- return e = setTimeout, setTimeout(p, 0);
249
+ return e = setTimeout, setTimeout(h, 0);
250
250
  try {
251
- return e(p, 0);
251
+ return e(h, 0);
252
252
  } catch {
253
253
  try {
254
- return e.call(null, p, 0);
254
+ return e.call(null, h, 0);
255
255
  } catch {
256
- return e.call(this, p, 0);
256
+ return e.call(this, h, 0);
257
257
  }
258
258
  }
259
259
  }
260
- function i(p) {
260
+ function n(h) {
261
261
  if (r === clearTimeout)
262
- return clearTimeout(p);
262
+ return clearTimeout(h);
263
263
  if ((r === s || !r) && clearTimeout)
264
- return r = clearTimeout, clearTimeout(p);
264
+ return r = clearTimeout, clearTimeout(h);
265
265
  try {
266
- return r(p);
266
+ return r(h);
267
267
  } catch {
268
268
  try {
269
- return r.call(null, p);
269
+ return r.call(null, h);
270
270
  } catch {
271
- return r.call(this, p);
271
+ return r.call(this, h);
272
272
  }
273
273
  }
274
274
  }
@@ -278,152 +278,152 @@ function ee() {
278
278
  }
279
279
  function g() {
280
280
  if (!l) {
281
- var p = n(f);
281
+ var h = i(f);
282
282
  l = !0;
283
283
  for (var d = o.length; d; ) {
284
284
  for (c = o, o = []; ++u < d; )
285
285
  c && c[u].run();
286
286
  u = -1, d = o.length;
287
287
  }
288
- c = null, l = !1, i(p);
288
+ c = null, l = !1, n(h);
289
289
  }
290
290
  }
291
- t.nextTick = function(p) {
291
+ t.nextTick = function(h) {
292
292
  var d = new Array(arguments.length - 1);
293
293
  if (arguments.length > 1)
294
- for (var b = 1; b < arguments.length; b++)
295
- d[b - 1] = arguments[b];
296
- o.push(new h(p, d)), o.length === 1 && !l && n(g);
294
+ for (var $ = 1; $ < arguments.length; $++)
295
+ d[$ - 1] = arguments[$];
296
+ o.push(new y(h, d)), o.length === 1 && !l && i(g);
297
297
  };
298
- function h(p, d) {
299
- this.fun = p, this.array = d;
298
+ function y(h, d) {
299
+ this.fun = h, this.array = d;
300
300
  }
301
- h.prototype.run = function() {
301
+ y.prototype.run = function() {
302
302
  this.fun.apply(null, this.array);
303
303
  }, t.title = "browser", t.browser = !0, t.env = {}, t.argv = [], t.version = "", t.versions = {};
304
- function m() {
304
+ function p() {
305
305
  }
306
- return t.on = m, t.addListener = m, t.once = m, t.off = m, t.removeListener = m, t.removeAllListeners = m, t.emit = m, t.prependListener = m, t.prependOnceListener = m, t.listeners = function(p) {
306
+ return t.on = p, t.addListener = p, t.once = p, t.off = p, t.removeListener = p, t.removeAllListeners = p, t.emit = p, t.prependListener = p, t.prependOnceListener = p, t.listeners = function(h) {
307
307
  return [];
308
- }, t.binding = function(p) {
308
+ }, t.binding = function(h) {
309
309
  throw new Error("process.binding is not supported");
310
310
  }, t.cwd = function() {
311
311
  return "/";
312
- }, t.chdir = function(p) {
312
+ }, t.chdir = function(h) {
313
313
  throw new Error("process.chdir is not supported");
314
314
  }, t.umask = function() {
315
315
  return 0;
316
- }, j.exports;
316
+ }, T.exports;
317
317
  }
318
- ee();
319
- var q, U;
320
- function re() {
321
- if (U) return q;
322
- U = 1;
318
+ re();
319
+ var q, K;
320
+ function ne() {
321
+ if (K) return q;
322
+ K = 1;
323
323
  var t = typeof C == "object" && C && C.Object === Object && C;
324
324
  return q = t, q;
325
325
  }
326
- var T, K;
327
- function ie() {
328
- if (K) return T;
329
- K = 1;
330
- var t = re(), e = typeof self == "object" && self && self.Object === Object && self, r = t || e || Function("return this")();
331
- return T = r, T;
332
- }
333
326
  var _, W;
334
- function dt() {
327
+ function oe() {
335
328
  if (W) return _;
336
329
  W = 1;
337
- var t = ie(), e = t.Symbol;
338
- return _ = e, _;
330
+ var t = ne(), e = typeof self == "object" && self && self.Object === Object && self, r = t || e || Function("return this")();
331
+ return _ = r, _;
339
332
  }
340
333
  var P, J;
341
- function oe() {
334
+ function bt() {
342
335
  if (J) return P;
343
336
  J = 1;
344
- var t = dt(), e = Object.prototype, r = e.hasOwnProperty, a = e.toString, s = t ? t.toStringTag : void 0;
345
- function n(i) {
346
- var o = r.call(i, s), l = i[s];
337
+ var t = oe(), e = t.Symbol;
338
+ return P = e, P;
339
+ }
340
+ var x, H;
341
+ function ie() {
342
+ if (H) return x;
343
+ H = 1;
344
+ var t = bt(), e = Object.prototype, r = e.hasOwnProperty, a = e.toString, s = t ? t.toStringTag : void 0;
345
+ function i(n) {
346
+ var o = r.call(n, s), l = n[s];
347
347
  try {
348
- i[s] = void 0;
348
+ n[s] = void 0;
349
349
  var c = !0;
350
350
  } catch {
351
351
  }
352
- var u = a.call(i);
353
- return c && (o ? i[s] = l : delete i[s]), u;
352
+ var u = a.call(n);
353
+ return c && (o ? n[s] = l : delete n[s]), u;
354
354
  }
355
- return P = n, P;
355
+ return x = i, x;
356
356
  }
357
- var x, H;
358
- function ne() {
359
- if (H) return x;
360
- H = 1;
357
+ var I, Y;
358
+ function se() {
359
+ if (Y) return I;
360
+ Y = 1;
361
361
  var t = Object.prototype, e = t.toString;
362
362
  function r(a) {
363
363
  return e.call(a);
364
364
  }
365
- return x = r, x;
366
- }
367
- var R, Y;
368
- function bt() {
369
- if (Y) return R;
370
- Y = 1;
371
- var t = dt(), e = oe(), r = ne(), a = "[object Null]", s = "[object Undefined]", n = t ? t.toStringTag : void 0;
372
- function i(o) {
373
- return o == null ? o === void 0 ? s : a : n && n in Object(o) ? e(o) : r(o);
374
- }
375
- return R = i, R;
365
+ return I = r, I;
376
366
  }
377
- var I, X;
378
- function se() {
379
- if (X) return I;
367
+ var R, X;
368
+ function $t() {
369
+ if (X) return R;
380
370
  X = 1;
381
- var t = Array.isArray;
382
- return I = t, I;
371
+ var t = bt(), e = ie(), r = se(), a = "[object Null]", s = "[object Undefined]", i = t ? t.toStringTag : void 0;
372
+ function n(o) {
373
+ return o == null ? o === void 0 ? s : a : i && i in Object(o) ? e(o) : r(o);
374
+ }
375
+ return R = n, R;
383
376
  }
384
377
  var D, Z;
385
- function $t() {
378
+ function ae() {
386
379
  if (Z) return D;
387
380
  Z = 1;
388
- function t(e) {
389
- return e != null && typeof e == "object";
390
- }
381
+ var t = Array.isArray;
391
382
  return D = t, D;
392
383
  }
393
384
  var M, tt;
394
- function ae() {
385
+ function wt() {
395
386
  if (tt) return M;
396
387
  tt = 1;
397
- var t = bt(), e = se(), r = $t(), a = "[object String]";
398
- function s(n) {
399
- return typeof n == "string" || !e(n) && r(n) && t(n) == a;
388
+ function t(e) {
389
+ return e != null && typeof e == "object";
400
390
  }
401
- return M = s, M;
391
+ return M = t, M;
402
392
  }
403
- ae();
404
393
  var z, et;
405
394
  function le() {
406
395
  if (et) return z;
407
396
  et = 1;
408
- function t(e, r) {
409
- return function(a) {
410
- return e(r(a));
411
- };
397
+ var t = $t(), e = ae(), r = wt(), a = "[object String]";
398
+ function s(i) {
399
+ return typeof i == "string" || !e(i) && r(i) && t(i) == a;
412
400
  }
413
- return z = t, z;
401
+ return z = s, z;
414
402
  }
403
+ le();
415
404
  var E, rt;
416
405
  function ce() {
417
406
  if (rt) return E;
418
407
  rt = 1;
419
- var t = le(), e = t(Object.getPrototypeOf, Object);
420
- return E = e, E;
408
+ function t(e, r) {
409
+ return function(a) {
410
+ return e(r(a));
411
+ };
412
+ }
413
+ return E = t, E;
421
414
  }
422
- var L, it;
415
+ var L, nt;
423
416
  function ue() {
424
- if (it) return L;
425
- it = 1;
426
- var t = bt(), e = ce(), r = $t(), a = "[object Object]", s = Function.prototype, n = Object.prototype, i = s.toString, o = n.hasOwnProperty, l = i.call(Object);
417
+ if (nt) return L;
418
+ nt = 1;
419
+ var t = ce(), e = t(Object.getPrototypeOf, Object);
420
+ return L = e, L;
421
+ }
422
+ var V, ot;
423
+ function fe() {
424
+ if (ot) return V;
425
+ ot = 1;
426
+ var t = $t(), e = ue(), r = wt(), a = "[object Object]", s = Function.prototype, i = Object.prototype, n = s.toString, o = i.hasOwnProperty, l = n.call(Object);
427
427
  function c(u) {
428
428
  if (!r(u) || t(u) != a)
429
429
  return !1;
@@ -431,91 +431,91 @@ function ue() {
431
431
  if (f === null)
432
432
  return !0;
433
433
  var g = o.call(f, "constructor") && f.constructor;
434
- return typeof g == "function" && g instanceof g && i.call(g) == l;
434
+ return typeof g == "function" && g instanceof g && n.call(g) == l;
435
435
  }
436
- return L = c, L;
436
+ return V = c, V;
437
437
  }
438
- ue();
439
- var Ct = { 0: 8203, 1: 8204, 2: 8205, 3: 8290, 4: 8291, 5: 8288, 6: 65279, 7: 8289, 8: 119155, 9: 119156, a: 119157, b: 119158, c: 119159, d: 119160, e: 119161, f: 119162 }, wt = { 0: 8203, 1: 8204, 2: 8205, 3: 65279 };
440
- new Array(4).fill(String.fromCodePoint(wt[0])).join("");
441
- Object.fromEntries(Object.entries(wt).map((t) => t.reverse()));
438
+ fe();
439
+ var Ct = { 0: 8203, 1: 8204, 2: 8205, 3: 8290, 4: 8291, 5: 8288, 6: 65279, 7: 8289, 8: 119155, 9: 119156, a: 119157, b: 119158, c: 119159, d: 119160, e: 119161, f: 119162 }, vt = { 0: 8203, 1: 8204, 2: 8205, 3: 65279 };
440
+ new Array(4).fill(String.fromCodePoint(vt[0])).join("");
441
+ Object.fromEntries(Object.entries(vt).map((t) => t.reverse()));
442
442
  Object.fromEntries(Object.entries(Ct).map((t) => t.reverse()));
443
443
  `${Object.values(Ct).map((t) => `\\u{${t.toString(16)}}`).join("")}`;
444
- var V, ot;
445
- function fe() {
446
- if (ot) return V;
447
- ot = 1;
444
+ var N, it;
445
+ function ge() {
446
+ if (it) return N;
447
+ it = 1;
448
448
  var t = Object.prototype.hasOwnProperty, e = Object.prototype.toString;
449
- return V = function(r, a, s) {
449
+ return N = function(r, a, s) {
450
450
  if (e.call(a) !== "[object Function]")
451
451
  throw new TypeError("iterator must be a function");
452
- var n = r.length;
453
- if (n === +n)
454
- for (var i = 0; i < n; i++)
455
- a.call(s, r[i], i, r);
452
+ var i = r.length;
453
+ if (i === +i)
454
+ for (var n = 0; n < i; n++)
455
+ a.call(s, r[n], n, r);
456
456
  else
457
457
  for (var o in r)
458
458
  t.call(r, o) && a.call(s, r[o], o, r);
459
- }, V;
459
+ }, N;
460
460
  }
461
- var N, nt;
462
- function ge() {
463
- if (nt) return N;
464
- nt = 1;
465
- var t = fe();
466
- N = e;
461
+ var B, st;
462
+ function pe() {
463
+ if (st) return B;
464
+ st = 1;
465
+ var t = ge();
466
+ B = e;
467
467
  function e(r, a, s) {
468
468
  if (arguments.length === 3)
469
469
  return e.set(r, a, s);
470
470
  if (arguments.length === 2)
471
471
  return e.get(r, a);
472
- var n = e.bind(e, r);
473
- for (var i in e)
474
- e.hasOwnProperty(i) && (n[i] = e[i].bind(n, r));
475
- return n;
472
+ var i = e.bind(e, r);
473
+ for (var n in e)
474
+ e.hasOwnProperty(n) && (i[n] = e[n].bind(i, r));
475
+ return i;
476
476
  }
477
477
  return e.get = function(r, a) {
478
- for (var s = Array.isArray(a) ? a : e.parse(a), n = 0; n < s.length; ++n) {
479
- var i = s[n];
480
- if (!(typeof r == "object" && i in r))
481
- throw new Error("Invalid reference token: " + i);
482
- r = r[i];
478
+ for (var s = Array.isArray(a) ? a : e.parse(a), i = 0; i < s.length; ++i) {
479
+ var n = s[i];
480
+ if (!(typeof r == "object" && n in r))
481
+ throw new Error("Invalid reference token: " + n);
482
+ r = r[n];
483
483
  }
484
484
  return r;
485
485
  }, e.set = function(r, a, s) {
486
- var n = Array.isArray(a) ? a : e.parse(a), i = n[0];
487
- if (n.length === 0)
486
+ var i = Array.isArray(a) ? a : e.parse(a), n = i[0];
487
+ if (i.length === 0)
488
488
  throw Error("Can not set the root object");
489
- for (var o = 0; o < n.length - 1; ++o) {
490
- var l = n[o];
491
- typeof l != "string" && typeof l != "number" && (l = String(l)), !(l === "__proto__" || l === "constructor" || l === "prototype") && (l === "-" && Array.isArray(r) && (l = r.length), i = n[o + 1], l in r || (i.match(/^(\d+|-)$/) ? r[l] = [] : r[l] = {}), r = r[l]);
489
+ for (var o = 0; o < i.length - 1; ++o) {
490
+ var l = i[o];
491
+ typeof l != "string" && typeof l != "number" && (l = String(l)), !(l === "__proto__" || l === "constructor" || l === "prototype") && (l === "-" && Array.isArray(r) && (l = r.length), n = i[o + 1], l in r || (n.match(/^(\d+|-)$/) ? r[l] = [] : r[l] = {}), r = r[l]);
492
492
  }
493
- return i === "-" && Array.isArray(r) && (i = r.length), r[i] = s, this;
493
+ return n === "-" && Array.isArray(r) && (n = r.length), r[n] = s, this;
494
494
  }, e.remove = function(r, a) {
495
- var s = Array.isArray(a) ? a : e.parse(a), n = s[s.length - 1];
496
- if (n === void 0)
495
+ var s = Array.isArray(a) ? a : e.parse(a), i = s[s.length - 1];
496
+ if (i === void 0)
497
497
  throw new Error('Invalid JSON pointer for remove: "' + a + '"');
498
- var i = e.get(r, s.slice(0, -1));
499
- if (Array.isArray(i)) {
500
- var o = +n;
501
- if (n === "" && isNaN(o))
502
- throw new Error('Invalid array index: "' + n + '"');
503
- Array.prototype.splice.call(i, o, 1);
498
+ var n = e.get(r, s.slice(0, -1));
499
+ if (Array.isArray(n)) {
500
+ var o = +i;
501
+ if (i === "" && isNaN(o))
502
+ throw new Error('Invalid array index: "' + i + '"');
503
+ Array.prototype.splice.call(n, o, 1);
504
504
  } else
505
- delete i[n];
505
+ delete n[i];
506
506
  }, e.dict = function(r, a) {
507
507
  var s = {};
508
- return e.walk(r, function(n, i) {
509
- s[i] = n;
508
+ return e.walk(r, function(i, n) {
509
+ s[n] = i;
510
510
  }, a), s;
511
511
  }, e.walk = function(r, a, s) {
512
- var n = [];
513
- s = s || function(i) {
514
- var o = Object.prototype.toString.call(i);
512
+ var i = [];
513
+ s = s || function(n) {
514
+ var o = Object.prototype.toString.call(n);
515
515
  return o === "[object Object]" || o === "[object Array]";
516
- }, (function i(o) {
516
+ }, (function n(o) {
517
517
  t(o, function(l, c) {
518
- n.push(String(c)), s(l) ? i(l) : a(l, e.compile(n)), n.pop();
518
+ i.push(String(c)), s(l) ? n(l) : a(l, e.compile(i)), i.pop();
519
519
  });
520
520
  })(r);
521
521
  }, e.has = function(r, a) {
@@ -537,32 +537,32 @@ function ge() {
537
537
  return r.substring(1).split(/\//).map(e.unescape);
538
538
  }, e.compile = function(r) {
539
539
  return r.length === 0 ? "" : "/" + r.map(e.escape).join("/");
540
- }, N;
540
+ }, B;
541
541
  }
542
- ge();
543
- var w = { exports: {} }, st;
544
- function pe() {
545
- return st || (st = 1, (function(t, e) {
542
+ pe();
543
+ var v = { exports: {} }, at;
544
+ function he() {
545
+ return at || (at = 1, (function(t, e) {
546
546
  e = t.exports = r, e.getSerialize = a;
547
- function r(s, n, i, o) {
548
- return JSON.stringify(s, a(n, o), i);
547
+ function r(s, i, n, o) {
548
+ return JSON.stringify(s, a(i, o), n);
549
549
  }
550
- function a(s, n) {
551
- var i = [], o = [];
552
- return n == null && (n = function(l, c) {
553
- return i[0] === c ? "[Circular ~]" : "[Circular ~." + o.slice(0, i.indexOf(c)).join(".") + "]";
550
+ function a(s, i) {
551
+ var n = [], o = [];
552
+ return i == null && (i = function(l, c) {
553
+ return n[0] === c ? "[Circular ~]" : "[Circular ~." + o.slice(0, n.indexOf(c)).join(".") + "]";
554
554
  }), function(l, c) {
555
- if (i.length > 0) {
556
- var u = i.indexOf(this);
557
- ~u ? i.splice(u + 1) : i.push(this), ~u ? o.splice(u, 1 / 0, l) : o.push(l), ~i.indexOf(c) && (c = n.call(this, l, c));
558
- } else i.push(c);
555
+ if (n.length > 0) {
556
+ var u = n.indexOf(this);
557
+ ~u ? n.splice(u + 1) : n.push(this), ~u ? o.splice(u, 1 / 0, l) : o.push(l), ~n.indexOf(c) && (c = i.call(this, l, c));
558
+ } else n.push(c);
559
559
  return s == null ? c : s.call(this, l, c);
560
560
  };
561
561
  }
562
- })(w, w.exports)), w.exports;
562
+ })(v, v.exports)), v.exports;
563
563
  }
564
- pe();
565
- class y {
564
+ he();
565
+ class m {
566
566
  static _clientParams;
567
567
  // static getter
568
568
  static get clientParams() {
@@ -577,8 +577,8 @@ class y {
577
577
  };
578
578
  }
579
579
  static async graphqlQuery(e, r = {}) {
580
- const { space: a, accessToken: s, environment: n = "master" } = this.clientParams, i = await fetch(
581
- `https://graphql.contentful.com/content/v1/spaces/${a}/environments/${n}`,
580
+ const { space: a, accessToken: s, environment: i = "master" } = this.clientParams, n = await fetch(
581
+ `https://graphql.contentful.com/content/v1/spaces/${a}/environments/${i}`,
582
582
  {
583
583
  method: "POST",
584
584
  headers: {
@@ -588,14 +588,14 @@ class y {
588
588
  body: JSON.stringify({ query: e, variables: r })
589
589
  }
590
590
  );
591
- if (!i.ok) {
592
- const l = await i.text();
591
+ if (!n.ok) {
592
+ const l = await n.text();
593
593
  throw new Error(
594
- `GraphQL request failed: ${i.status} ${i.statusText}
594
+ `GraphQL request failed: ${n.status} ${n.statusText}
595
595
  ${l}`
596
596
  );
597
597
  }
598
- const o = await i.json();
598
+ const o = await n.json();
599
599
  if (o.errors)
600
600
  throw new Error(
601
601
  `GraphQL errors: ${JSON.stringify(o.errors, null, 2)}`
@@ -603,26 +603,43 @@ ${l}`
603
603
  return o.data;
604
604
  }
605
605
  }
606
- const he = async ({
606
+ class b {
607
+ page;
608
+ total;
609
+ size;
610
+ items;
611
+ constructor({
612
+ page: e,
613
+ total: r,
614
+ size: a,
615
+ items: s
616
+ }) {
617
+ this.page = e, this.total = r, this.size = a, this.items = s;
618
+ }
619
+ get totalPages() {
620
+ return Math.ceil(this.total / this.size);
621
+ }
622
+ }
623
+ const ye = async ({
607
624
  slot: t,
608
625
  page: e = 1,
609
626
  size: r = 20,
610
627
  platform: a,
611
628
  marketCode: s,
612
- locale: n
629
+ locale: i
613
630
  }) => {
614
- const i = Math.max(1, Math.floor(e)), o = Math.max(1, Math.floor(r)), l = [
631
+ const n = Math.max(1, Math.floor(e)), o = Math.max(1, Math.floor(r)), l = [
615
632
  "$slot: String!",
616
633
  "$limit: Int!",
617
634
  "$skip: Int!"
618
635
  ], c = {
619
636
  slot: t,
620
637
  limit: o,
621
- skip: (i - 1) * o
638
+ skip: (n - 1) * o
622
639
  }, u = ["{ slot: $slot }"];
623
640
  a && (l.push("$platform: String!"), c.platform = a, u.push("{ platform_contains_some: [$platform] }")), s && (l.push("$marketCode: String!"), c.marketCode = s, u.push(
624
641
  "{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }"
625
- )), n && (l.push("$locale: String!"), c.locale = n, u.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));
642
+ )), i && (l.push("$locale: String!"), c.locale = i, u.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));
626
643
  const f = `(${l.join(", ")})`, g = `(
627
644
  limit: $limit
628
645
  skip: $skip
@@ -632,7 +649,7 @@ const he = async ({
632
649
  `)}
633
650
  ]
634
651
  }
635
- )`, h = `
652
+ )`, y = `
636
653
  query${f} {
637
654
  bannerCollectionCollection${g} {
638
655
  total
@@ -669,17 +686,17 @@ query${f} {
669
686
  }
670
687
  }
671
688
  }
672
- `, { bannerCollectionCollection: m } = await y.graphqlQuery(h, {
689
+ `, { bannerCollectionCollection: p } = await m.graphqlQuery(y, {
673
690
  ...c
674
691
  });
675
- return {
676
- page: i,
677
- total: m.total,
692
+ return new b({
693
+ page: n,
694
+ total: p.total,
678
695
  size: o,
679
- items: m.items
680
- };
696
+ items: p.items
697
+ });
681
698
  };
682
- class $ extends Response {
699
+ class w extends Response {
683
700
  constructor(...e) {
684
701
  super(e[0] ?? "Not Found", {
685
702
  status: 404,
@@ -693,9 +710,9 @@ const me = async ({
693
710
  collectionId: r,
694
711
  categoryId: a,
695
712
  page: s = 1,
696
- size: n = 20
713
+ size: i = 20
697
714
  } = {}) => {
698
- const i = Math.max(1, Math.floor(s)), o = Math.max(1, Math.floor(n));
715
+ const n = Math.max(1, Math.floor(s)), o = Math.max(1, Math.floor(i));
699
716
  if (r) {
700
717
  const d = `
701
718
  query($collectionId: String!, $limit: Int!, $skip: Int!) {
@@ -716,6 +733,12 @@ query($collectionId: String!, $limit: Int!, $skip: Int!) {
716
733
  items {
717
734
  title
718
735
  slug
736
+ featuredImage {
737
+ url
738
+ width
739
+ height
740
+ contentType
741
+ }
719
742
  }
720
743
  }
721
744
  featuredImage {
@@ -729,23 +752,23 @@ query($collectionId: String!, $limit: Int!, $skip: Int!) {
729
752
  }
730
753
  }
731
754
  }
732
- `, { blogCollectionCollection: b } = await y.graphqlQuery(d, {
755
+ `, { blogCollectionCollection: $ } = await m.graphqlQuery(d, {
733
756
  collectionId: r,
734
757
  limit: o,
735
- skip: (i - 1) * o
736
- }), k = b.items.at(0);
737
- if (!k)
738
- throw new $();
739
- return {
740
- page: i,
741
- total: k.postsCollection?.total ?? 0,
758
+ skip: (n - 1) * o
759
+ }), A = $.items.at(0);
760
+ if (!A)
761
+ throw new w();
762
+ return new b({
763
+ page: n,
764
+ total: A.postsCollection?.total ?? 0,
742
765
  size: o,
743
- items: k.postsCollection?.items ?? []
744
- };
766
+ items: A.postsCollection?.items ?? []
767
+ });
745
768
  }
746
769
  const l = ["$limit: Int!", "$skip: Int!"], c = {
747
770
  limit: o,
748
- skip: (i - 1) * o
771
+ skip: (n - 1) * o
749
772
  }, u = ["limit: $limit", "skip: $skip"], f = [];
750
773
  t && (l.push("$marketCode: String!"), c.marketCode = t, f.push(
751
774
  "{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }"
@@ -755,12 +778,12 @@ query($collectionId: String!, $limit: Int!, $skip: Int!) {
755
778
  `)}
756
779
  ]
757
780
  }`);
758
- const g = l.length ? `(${l.join(", ")})` : "", h = u.length ? `(
781
+ const g = l.length ? `(${l.join(", ")})` : "", y = u.length ? `(
759
782
  ${u.join(`
760
783
  `)}
761
- )` : "", m = `
784
+ )` : "", p = `
762
785
  query${g} {
763
- blogPostCollection${h} {
786
+ blogPostCollection${y} {
764
787
  total
765
788
  items {
766
789
  sys {
@@ -775,6 +798,12 @@ query${g} {
775
798
  items {
776
799
  title
777
800
  slug
801
+ featuredImage {
802
+ url
803
+ width
804
+ height
805
+ contentType
806
+ }
778
807
  }
779
808
  }
780
809
  featuredImage {
@@ -786,36 +815,36 @@ query${g} {
786
815
  }
787
816
  }
788
817
  }
789
- `, { blogPostCollection: p } = await y.graphqlQuery(m, {
818
+ `, { blogPostCollection: h } = await m.graphqlQuery(p, {
790
819
  ...c
791
820
  });
792
- return {
793
- page: i,
794
- total: p.total,
821
+ return new b({
822
+ page: n,
823
+ total: h.total,
795
824
  size: o,
796
- items: p.items
797
- };
798
- }, ye = async ({
825
+ items: h.items
826
+ });
827
+ }, de = async ({
799
828
  id: t,
800
829
  slug: e,
801
830
  marketCode: r,
802
831
  locale: a
803
832
  }) => {
804
- const s = [], n = {}, i = [];
833
+ const s = [], i = {}, n = [];
805
834
  if (t)
806
- s.push("$id: String!"), n.id = t, i.push("{ sys: { id: $id } }");
835
+ s.push("$id: String!"), i.id = t, n.push("{ sys: { id: $id } }");
807
836
  else if (e)
808
- s.push("$slug: String!"), n.slug = e, i.push("{ slug: $slug }");
837
+ s.push("$slug: String!"), i.slug = e, n.push("{ slug: $slug }");
809
838
  else
810
839
  throw new Error("Either id or slug is required.");
811
- r && (s.push("$marketCode: String!"), n.marketCode = r, i.push(
840
+ r && (s.push("$marketCode: String!"), i.marketCode = r, n.push(
812
841
  "{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }"
813
- )), a && (s.push("$locale: String!"), n.locale = a, i.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));
842
+ )), a && (s.push("$locale: String!"), i.locale = a, n.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));
814
843
  const o = `(${s.join(", ")})`, l = `(
815
844
  limit: 1
816
845
  where: {
817
846
  AND: [
818
- ${i.join(`
847
+ ${n.join(`
819
848
  `)}
820
849
  ]
821
850
  }
@@ -835,6 +864,12 @@ query${o} {
835
864
  items {
836
865
  title
837
866
  slug
867
+ featuredImage {
868
+ url
869
+ width
870
+ height
871
+ contentType
872
+ }
838
873
  }
839
874
  }
840
875
  featuredImage {
@@ -879,31 +914,31 @@ query${o} {
879
914
  }
880
915
  }
881
916
  }
882
- `, { blogPostCollection: u } = await y.graphqlQuery(c, {
883
- ...n
917
+ `, { blogPostCollection: u } = await m.graphqlQuery(c, {
918
+ ...i
884
919
  }), f = u.items.at(0);
885
920
  if (!f)
886
- throw new $();
921
+ throw new w();
887
922
  return f;
888
- }, de = async ({
923
+ }, be = async ({
889
924
  marketCode: t,
890
925
  locale: e,
891
926
  page: r = 1,
892
927
  size: a = 20
893
928
  } = {}) => {
894
- const s = Math.max(1, Math.floor(r)), n = Math.max(1, Math.floor(a)), i = ["$limit: Int!", "$skip: Int!"], o = {
895
- limit: n,
896
- skip: (s - 1) * n
929
+ const s = Math.max(1, Math.floor(r)), i = Math.max(1, Math.floor(a)), n = ["$limit: Int!", "$skip: Int!"], o = {
930
+ limit: i,
931
+ skip: (s - 1) * i
897
932
  }, l = ["limit: $limit", "skip: $skip"], c = [];
898
- t && (i.push("$marketCode: String!"), o.marketCode = t, c.push(
933
+ t && (n.push("$marketCode: String!"), o.marketCode = t, c.push(
899
934
  "{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }"
900
- )), e && (i.push("$locale: String!"), o.locale = e, c.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }")), c.length && l.push(`where: {
935
+ )), e && (n.push("$locale: String!"), o.locale = e, c.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }")), c.length && l.push(`where: {
901
936
  AND: [
902
937
  ${c.join(`
903
938
  `)}
904
939
  ]
905
940
  }`);
906
- const u = i.length ? `(${i.join(", ")})` : "", f = l.length ? `(
941
+ const u = n.length ? `(${n.join(", ")})` : "", f = l.length ? `(
907
942
  ${l.join(`
908
943
  `)}
909
944
  )` : "", g = `
@@ -919,36 +954,36 @@ query${u} {
919
954
  }
920
955
  }
921
956
  }
922
- `, { blogCategoryCollection: h } = await y.graphqlQuery(g, {
957
+ `, { blogCategoryCollection: y } = await m.graphqlQuery(g, {
923
958
  ...o
924
959
  });
925
- return {
960
+ return new b({
926
961
  page: s,
927
- total: h.total,
928
- size: n,
929
- items: h.items
930
- };
931
- }, be = async ({
962
+ total: y.total,
963
+ size: i,
964
+ items: y.items
965
+ });
966
+ }, $e = async ({
932
967
  id: t,
933
968
  slug: e,
934
969
  marketCode: r,
935
970
  locale: a
936
971
  }) => {
937
- const s = [], n = {}, i = [];
972
+ const s = [], i = {}, n = [];
938
973
  if (t)
939
- s.push("$id: String!"), n.id = t, i.push("{ sys: { id: $id } }");
974
+ s.push("$id: String!"), i.id = t, n.push("{ sys: { id: $id } }");
940
975
  else if (e)
941
- s.push("$slug: String!"), n.slug = e, i.push("{ slug: $slug }");
976
+ s.push("$slug: String!"), i.slug = e, n.push("{ slug: $slug }");
942
977
  else
943
978
  throw new Error("Either id or slug is required.");
944
- r && (s.push("$marketCode: String!"), n.marketCode = r, i.push(
979
+ r && (s.push("$marketCode: String!"), i.marketCode = r, n.push(
945
980
  "{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }"
946
- )), a && (s.push("$locale: String!"), n.locale = a, i.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));
981
+ )), a && (s.push("$locale: String!"), i.locale = a, n.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));
947
982
  const o = `(${s.join(", ")})`, l = `(
948
983
  limit: 1
949
984
  where: {
950
985
  AND: [
951
- ${i.join(`
986
+ ${n.join(`
952
987
  `)}
953
988
  ]
954
989
  }
@@ -982,31 +1017,33 @@ query${o} {
982
1017
  }
983
1018
  }
984
1019
  }
985
- `, { blogCategoryCollection: u } = await y.graphqlQuery(c, {
986
- ...n
1020
+ `, { blogCategoryCollection: u } = await m.graphqlQuery(c, {
1021
+ ...i
987
1022
  }), f = u.items.at(0);
988
1023
  if (!f)
989
- throw new $();
1024
+ throw new w();
990
1025
  return f;
991
- }, $e = async ({
1026
+ }, we = async ({
992
1027
  marketCode: t,
993
1028
  locale: e,
994
1029
  page: r = 1,
995
1030
  size: a = 20
996
1031
  } = {}) => {
997
- const s = Math.max(1, Math.floor(r)), n = Math.max(1, Math.floor(a)), i = ["$limit: Int!", "$skip: Int!"], o = {
998
- limit: n,
999
- skip: (s - 1) * n
1032
+ const s = Math.max(1, Math.floor(r)), i = Math.max(1, Math.floor(a)), n = ["$limit: Int!", "$skip: Int!"], o = {
1033
+ limit: i,
1034
+ skip: (s - 1) * i
1000
1035
  }, l = ["limit: $limit", "skip: $skip"], c = [];
1001
- t && (i.push("$marketCode: String!"), o.marketCode = t, c.push(
1036
+ t && (n.push("$marketCode: String!"), o.marketCode = t, c.push(
1002
1037
  "{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }"
1003
- )), e && (i.push("$locale: String!"), o.locale = e, c.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }")), c.length && l.push(`where: {
1038
+ )), e && (n.push("$locale: String!"), o.locale = e, c.push(
1039
+ "{ OR: [{ locale_exists: false }, { locale: $locale }] }"
1040
+ )), c.length && l.push(`where: {
1004
1041
  AND: [
1005
1042
  ${c.join(`
1006
1043
  `)}
1007
1044
  ]
1008
1045
  }`);
1009
- const u = i.length ? `(${i.join(", ")})` : "", f = l.length ? `(
1046
+ const u = n.length ? `(${n.join(", ")})` : "", f = l.length ? `(
1010
1047
  ${l.join(`
1011
1048
  `)}
1012
1049
  )` : "", g = `
@@ -1036,29 +1073,34 @@ query${u} {
1036
1073
  }
1037
1074
  }
1038
1075
  }
1039
- `, { blogCollectionCollection: h } = await y.graphqlQuery(g, {
1076
+ `, { blogCollectionCollection: y } = await m.graphqlQuery(g, {
1040
1077
  ...o
1041
1078
  });
1042
- return {
1079
+ return new b({
1043
1080
  page: s,
1044
- total: h.total,
1045
- size: n,
1046
- items: h.items
1047
- };
1081
+ total: y.total,
1082
+ size: i,
1083
+ items: y.items.map((p) => ({
1084
+ ...p,
1085
+ category: p.type === "category" ? p.category : null,
1086
+ categoryId: p.type === "category" ? p.category?.sys.id ?? null : null,
1087
+ collectionId: p.type === "manual" ? p.sys.id : null
1088
+ }))
1089
+ });
1048
1090
  }, Ce = async ({
1049
1091
  page: t = 1,
1050
1092
  size: e = 20,
1051
1093
  marketCode: r,
1052
1094
  locale: a
1053
1095
  } = {}) => {
1054
- const s = Math.max(1, Math.floor(t)), n = Math.max(1, Math.floor(e)), i = ["$limit: Int!", "$skip: Int!"], o = {
1055
- limit: n,
1056
- skip: (s - 1) * n
1096
+ const s = Math.max(1, Math.floor(t)), i = Math.max(1, Math.floor(e)), n = ["$limit: Int!", "$skip: Int!"], o = {
1097
+ limit: i,
1098
+ skip: (s - 1) * i
1057
1099
  }, l = [];
1058
- r && (i.push("$marketCode: String!"), o.marketCode = r, l.push(
1100
+ r && (n.push("$marketCode: String!"), o.marketCode = r, l.push(
1059
1101
  "{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }"
1060
- )), a && (i.push("$locale: String!"), o.locale = a, l.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));
1061
- const c = `(${i.join(", ")})`, u = l.length ? `(
1102
+ )), a && (n.push("$locale: String!"), o.locale = a, l.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));
1103
+ const c = `(${n.join(", ")})`, u = l.length ? `(
1062
1104
  limit: $limit
1063
1105
  skip: $skip
1064
1106
  where: {
@@ -1106,28 +1148,28 @@ query${c} {
1106
1148
  }
1107
1149
  }
1108
1150
  }
1109
- `, { brandCollectionCollection: g } = await y.graphqlQuery(f, {
1151
+ `, { brandCollectionCollection: g } = await m.graphqlQuery(f, {
1110
1152
  ...o
1111
1153
  });
1112
- return {
1154
+ return new b({
1113
1155
  page: s,
1114
1156
  total: g.total,
1115
- size: n,
1157
+ size: i,
1116
1158
  items: g.items
1117
- };
1118
- }, we = async ({
1159
+ });
1160
+ }, ve = async ({
1119
1161
  marketCode: t,
1120
1162
  locale: e,
1121
1163
  page: r = 1,
1122
1164
  size: a = 20
1123
1165
  } = {}) => {
1124
- const s = Math.max(1, Math.floor(r)), n = Math.max(1, Math.floor(a)), i = ["$limit: Int!", "$skip: Int!"], o = {
1125
- limit: n,
1126
- skip: (s - 1) * n
1166
+ const s = Math.max(1, Math.floor(r)), i = Math.max(1, Math.floor(a)), n = ["$limit: Int!", "$skip: Int!"], o = {
1167
+ limit: i,
1168
+ skip: (s - 1) * i
1127
1169
  }, l = ["limit: $limit", "skip: $skip"], c = [];
1128
- t && (i.push("$marketCode: String!"), o.marketCode = t, c.push(
1170
+ t && (n.push("$marketCode: String!"), o.marketCode = t, c.push(
1129
1171
  "{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }"
1130
- )), e && (i.push("$locale: String!"), o.locale = e, c.push(
1172
+ )), e && (n.push("$locale: String!"), o.locale = e, c.push(
1131
1173
  "{ OR: [{ locale_exists: false }, { locale: $locale }] }"
1132
1174
  )), c.length && l.push(`where: {
1133
1175
  AND: [
@@ -1135,7 +1177,7 @@ query${c} {
1135
1177
  `)}
1136
1178
  ]
1137
1179
  }`);
1138
- const u = i.length ? `(${i.join(", ")})` : "", f = l.length ? `(
1180
+ const u = n.length ? `(${n.join(", ")})` : "", f = l.length ? `(
1139
1181
  ${l.join(`
1140
1182
  `)}
1141
1183
  )` : "", g = `
@@ -1161,38 +1203,38 @@ query${u} {
1161
1203
  }
1162
1204
  }
1163
1205
  }
1164
- `, { documentationCategoryCollection: h } = await y.graphqlQuery(g, {
1206
+ `, { documentationCategoryCollection: y } = await m.graphqlQuery(g, {
1165
1207
  ...o
1166
1208
  });
1167
- return {
1209
+ return new b({
1168
1210
  page: s,
1169
- total: h.total,
1170
- size: n,
1171
- items: h.items
1172
- };
1173
- }, ve = async ({
1211
+ total: y.total,
1212
+ size: i,
1213
+ items: y.items
1214
+ });
1215
+ }, Se = async ({
1174
1216
  id: t,
1175
1217
  slug: e,
1176
1218
  marketCode: r,
1177
1219
  locale: a
1178
1220
  }) => {
1179
- const s = [], n = {}, i = [];
1221
+ const s = [], i = {}, n = [];
1180
1222
  if (t)
1181
- s.push("$id: String!"), n.id = t, i.push("{ sys: { id: $id } }");
1223
+ s.push("$id: String!"), i.id = t, n.push("{ sys: { id: $id } }");
1182
1224
  else if (e)
1183
- s.push("$slug: String!"), n.slug = e, i.push("{ slug: $slug }");
1225
+ s.push("$slug: String!"), i.slug = e, n.push("{ slug: $slug }");
1184
1226
  else
1185
1227
  throw new Error("Either id or slug is required.");
1186
- r && (s.push("$marketCode: String!"), n.marketCode = r, i.push(
1228
+ r && (s.push("$marketCode: String!"), i.marketCode = r, n.push(
1187
1229
  "{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }"
1188
- )), a && (s.push("$locale: String!"), n.locale = a, i.push(
1230
+ )), a && (s.push("$locale: String!"), i.locale = a, n.push(
1189
1231
  "{ OR: [{ locale_exists: false }, { locale: $locale }] }"
1190
1232
  ));
1191
1233
  const o = `(${s.join(", ")})`, l = `(
1192
1234
  limit: 1
1193
1235
  where: {
1194
1236
  AND: [
1195
- ${i.join(`
1237
+ ${n.join(`
1196
1238
  `)}
1197
1239
  ]
1198
1240
  }
@@ -1218,22 +1260,22 @@ query${o} {
1218
1260
  }
1219
1261
  }
1220
1262
  }
1221
- `, { documentationCategoryCollection: u } = await y.graphqlQuery(c, {
1222
- ...n
1263
+ `, { documentationCategoryCollection: u } = await m.graphqlQuery(c, {
1264
+ ...i
1223
1265
  }), f = u.items.at(0);
1224
1266
  if (!f)
1225
- throw new $();
1267
+ throw new w();
1226
1268
  return f;
1227
- }, Se = async ({
1269
+ }, ke = async ({
1228
1270
  marketCode: t,
1229
1271
  locale: e,
1230
1272
  categorySlug: r,
1231
1273
  page: a = 1,
1232
1274
  size: s = 20
1233
1275
  } = {}) => {
1234
- const n = Math.max(1, Math.floor(a)), i = Math.max(1, Math.floor(s)), o = ["$limit: Int!", "$skip: Int!"], l = {
1235
- limit: i,
1236
- skip: (n - 1) * i
1276
+ const i = Math.max(1, Math.floor(a)), n = Math.max(1, Math.floor(s)), o = ["$limit: Int!", "$skip: Int!"], l = {
1277
+ limit: n,
1278
+ skip: (i - 1) * n
1237
1279
  }, c = ["limit: $limit", "skip: $skip"], u = [];
1238
1280
  t && (o.push("$marketCode: String!"), l.marketCode = t, u.push(
1239
1281
  "{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }"
@@ -1248,7 +1290,7 @@ query${o} {
1248
1290
  const f = o.length ? `(${o.join(", ")})` : "", g = c.length ? `(
1249
1291
  ${c.join(`
1250
1292
  `)}
1251
- )` : "", h = `
1293
+ )` : "", y = `
1252
1294
  query${f} {
1253
1295
  documentationArticleCollection${g} {
1254
1296
  total
@@ -1278,38 +1320,38 @@ query${f} {
1278
1320
  }
1279
1321
  }
1280
1322
  }
1281
- `, { documentationArticleCollection: m } = await y.graphqlQuery(h, {
1323
+ `, { documentationArticleCollection: p } = await m.graphqlQuery(y, {
1282
1324
  ...l
1283
1325
  });
1284
- return {
1285
- page: n,
1286
- total: m.total,
1287
- size: i,
1288
- items: m.items
1289
- };
1290
- }, ke = async ({
1326
+ return new b({
1327
+ page: i,
1328
+ total: p.total,
1329
+ size: n,
1330
+ items: p.items
1331
+ });
1332
+ }, Ae = async ({
1291
1333
  id: t,
1292
1334
  slug: e,
1293
1335
  marketCode: r,
1294
1336
  locale: a
1295
1337
  }) => {
1296
- const s = [], n = {}, i = [];
1338
+ const s = [], i = {}, n = [];
1297
1339
  if (t)
1298
- s.push("$id: String!"), n.id = t, i.push("{ sys: { id: $id } }");
1340
+ s.push("$id: String!"), i.id = t, n.push("{ sys: { id: $id } }");
1299
1341
  else if (e)
1300
- s.push("$slug: String!"), n.slug = e, i.push("{ slug: $slug }");
1342
+ s.push("$slug: String!"), i.slug = e, n.push("{ slug: $slug }");
1301
1343
  else
1302
1344
  throw new Error("Either id or slug is required.");
1303
- r && (s.push("$marketCode: String!"), n.marketCode = r, i.push(
1345
+ r && (s.push("$marketCode: String!"), i.marketCode = r, n.push(
1304
1346
  "{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }"
1305
- )), a && (s.push("$locale: String!"), n.locale = a, i.push(
1347
+ )), a && (s.push("$locale: String!"), i.locale = a, n.push(
1306
1348
  "{ OR: [{ locale_exists: false }, { locale: $locale }] }"
1307
1349
  ));
1308
1350
  const o = `(${s.join(", ")})`, l = `(
1309
1351
  limit: 1
1310
1352
  where: {
1311
1353
  AND: [
1312
- ${i.join(`
1354
+ ${n.join(`
1313
1355
  `)}
1314
1356
  ]
1315
1357
  }
@@ -1366,26 +1408,26 @@ query${o} {
1366
1408
  }
1367
1409
  }
1368
1410
  }
1369
- `, { documentationArticleCollection: u } = await y.graphqlQuery(c, {
1370
- ...n
1411
+ `, { documentationArticleCollection: u } = await m.graphqlQuery(c, {
1412
+ ...i
1371
1413
  }), f = u.items.at(0);
1372
1414
  if (!f)
1373
- throw new $();
1415
+ throw new w();
1374
1416
  return f;
1375
- }, Ae = async ({
1417
+ }, Oe = async ({
1376
1418
  page: t = 1,
1377
1419
  size: e = 20,
1378
1420
  marketCode: r,
1379
1421
  locale: a
1380
1422
  } = {}) => {
1381
- const s = Math.max(1, Math.floor(t)), n = Math.max(1, Math.floor(e)), i = ["$limit: Int!", "$skip: Int!"], o = {
1382
- limit: n,
1383
- skip: (s - 1) * n
1423
+ const s = Math.max(1, Math.floor(t)), i = Math.max(1, Math.floor(e)), n = ["$limit: Int!", "$skip: Int!"], o = {
1424
+ limit: i,
1425
+ skip: (s - 1) * i
1384
1426
  }, l = [];
1385
- r && (i.push("$marketCode: String!"), o.marketCode = r, l.push(
1427
+ r && (n.push("$marketCode: String!"), o.marketCode = r, l.push(
1386
1428
  "{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }"
1387
- )), a && (i.push("$locale: String!"), o.locale = a, l.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));
1388
- const c = i.length ? `(${i.join(", ")})` : "", u = l.length ? `(
1429
+ )), a && (n.push("$locale: String!"), o.locale = a, l.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));
1430
+ const c = n.length ? `(${n.join(", ")})` : "", u = l.length ? `(
1389
1431
  limit: $limit
1390
1432
  skip: $skip
1391
1433
  order: order_ASC
@@ -1424,32 +1466,32 @@ query${c} {
1424
1466
  }
1425
1467
  }
1426
1468
  }
1427
- `, { hyperlinkCollectionCollection: g } = await y.graphqlQuery(
1469
+ `, { hyperlinkCollectionCollection: g } = await m.graphqlQuery(
1428
1470
  f,
1429
1471
  {
1430
1472
  ...o
1431
1473
  }
1432
1474
  );
1433
- return {
1475
+ return new b({
1434
1476
  page: s,
1435
1477
  total: g.total,
1436
- size: n,
1478
+ size: i,
1437
1479
  items: g.items
1438
- };
1439
- }, Oe = async ({
1480
+ });
1481
+ }, je = async ({
1440
1482
  page: t = 1,
1441
1483
  size: e = 20,
1442
1484
  marketCode: r,
1443
1485
  locale: a
1444
1486
  } = {}) => {
1445
- const s = Math.max(1, Math.floor(t)), n = Math.max(1, Math.floor(e)), i = ["$limit: Int!", "$skip: Int!"], o = {
1446
- limit: n,
1447
- skip: (s - 1) * n
1487
+ const s = Math.max(1, Math.floor(t)), i = Math.max(1, Math.floor(e)), n = ["$limit: Int!", "$skip: Int!"], o = {
1488
+ limit: i,
1489
+ skip: (s - 1) * i
1448
1490
  }, l = [];
1449
- r && (i.push("$marketCode: String!"), o.marketCode = r, l.push(
1491
+ r && (n.push("$marketCode: String!"), o.marketCode = r, l.push(
1450
1492
  "{ OR: [{ marketsCollection_exists: false }, { markets: { code: $marketCode } }] }"
1451
- )), a && (i.push("$locale: String!"), o.locale = a, l.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));
1452
- const c = `(${i.join(", ")})`, u = l.length ? `(
1493
+ )), a && (n.push("$locale: String!"), o.locale = a, l.push("{ OR: [{ locale_exists: false }, { locale: $locale }] }"));
1494
+ const c = `(${n.join(", ")})`, u = l.length ? `(
1453
1495
  limit: $limit
1454
1496
  skip: $skip
1455
1497
  where: {
@@ -1475,29 +1517,30 @@ query${c} {
1475
1517
  }
1476
1518
  }
1477
1519
  }
1478
- `, { keywordCollectionCollection: g } = await y.graphqlQuery(f, {
1520
+ `, { keywordCollectionCollection: g } = await m.graphqlQuery(f, {
1479
1521
  ...o
1480
1522
  });
1481
- return {
1523
+ return new b({
1482
1524
  page: s,
1483
1525
  total: g.total,
1484
- size: n,
1526
+ size: i,
1485
1527
  items: g.items
1486
- };
1528
+ });
1487
1529
  };
1488
1530
  export {
1489
- y as ContentfulSDK,
1490
- he as getBannerCollections,
1491
- de as getBlogCategories,
1492
- be as getBlogCategoryDetail,
1493
- $e as getBlogCollections,
1494
- ye as getBlogPostDetail,
1531
+ m as ContentfulSDK,
1532
+ b as PaginatedResponse,
1533
+ ye as getBannerCollections,
1534
+ be as getBlogCategories,
1535
+ $e as getBlogCategoryDetail,
1536
+ we as getBlogCollections,
1537
+ de as getBlogPostDetail,
1495
1538
  me as getBlogPosts,
1496
1539
  Ce as getBrandCollections,
1497
- ke as getDocArticleDetail,
1498
- Se as getDocArticles,
1499
- we as getDocCategories,
1500
- ve as getDocCategoryDetail,
1501
- Ae as getHyperlinkCollections,
1502
- Oe as getKeywordCollections
1540
+ Ae as getDocArticleDetail,
1541
+ ke as getDocArticles,
1542
+ ve as getDocCategories,
1543
+ Se as getDocCategoryDetail,
1544
+ Oe as getHyperlinkCollections,
1545
+ je as getKeywordCollections
1503
1546
  };