@animaapp/anima-sdk 0.9.0 → 0.11.0

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,17 +1,17 @@
1
- var Dr = Object.defineProperty, Lr = Object.defineProperties;
2
- var Fr = Object.getOwnPropertyDescriptors;
1
+ var Lr = Object.defineProperty, Fr = Object.defineProperties;
2
+ var $r = Object.getOwnPropertyDescriptors;
3
3
  var yn = Object.getOwnPropertySymbols;
4
- var $r = Object.prototype.hasOwnProperty, jr = Object.prototype.propertyIsEnumerable;
4
+ var jr = Object.prototype.hasOwnProperty, Mr = Object.prototype.propertyIsEnumerable;
5
5
  var bn = (e) => {
6
6
  throw TypeError(e);
7
- }, wn = Math.pow, vn = (e, t, n) => t in e ? Dr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, d = (e, t) => {
7
+ }, wn = Math.pow, vn = (e, t, n) => t in e ? Lr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, d = (e, t) => {
8
8
  for (var n in t || (t = {}))
9
- $r.call(t, n) && vn(e, n, t[n]);
9
+ jr.call(t, n) && vn(e, n, t[n]);
10
10
  if (yn)
11
11
  for (var n of yn(t))
12
- jr.call(t, n) && vn(e, n, t[n]);
12
+ Mr.call(t, n) && vn(e, n, t[n]);
13
13
  return e;
14
- }, v = (e, t) => Lr(e, Fr(t));
14
+ }, v = (e, t) => Fr(e, $r(t));
15
15
  var zt = (e, t, n) => t.has(e) || bn("Cannot " + n);
16
16
  var w = (e, t, n) => (zt(e, t, "read from private field"), n ? n.call(e) : t.get(e)), Y = (e, t, n) => t.has(e) ? bn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), W = (e, t, n, r) => (zt(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), F = (e, t, n) => (zt(e, t, "access private method"), n);
17
17
  var O = (e, t, n) => new Promise((r, a) => {
@@ -36,22 +36,22 @@ function $e(e) {
36
36
  for (; --t >= 0; )
37
37
  e[t] = 0;
38
38
  }
39
- const Mr = 0, er = 1, Ur = 2, Pr = 3, Br = 258, un = 29, ot = 256, Ye = ot + 1 + un, Oe = 30, fn = 19, tr = 2 * Ye + 1, we = 15, Dt = 16, Vr = 7, hn = 256, nr = 16, rr = 17, ar = 18, Bt = (
39
+ const Ur = 0, tr = 1, Pr = 2, Br = 3, Vr = 258, un = 29, ot = 256, Ye = ot + 1 + un, Oe = 30, fn = 19, nr = 2 * Ye + 1, we = 15, Dt = 16, Hr = 7, hn = 256, rr = 16, ar = 17, ir = 18, Bt = (
40
40
  /* extra bits for each length code */
41
41
  new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0])
42
42
  ), yt = (
43
43
  /* extra bits for each distance code */
44
44
  new Uint8Array([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13])
45
- ), Hr = (
45
+ ), Wr = (
46
46
  /* extra bits for each bit length code */
47
47
  new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7])
48
- ), ir = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), Wr = 512, ie = new Array((Ye + 2) * 2);
48
+ ), sr = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), qr = 512, ie = new Array((Ye + 2) * 2);
49
49
  $e(ie);
50
50
  const Ge = new Array(Oe * 2);
51
51
  $e(Ge);
52
- const Je = new Array(Wr);
52
+ const Je = new Array(qr);
53
53
  $e(Je);
54
- const Qe = new Array(Br - Pr + 1);
54
+ const Qe = new Array(Vr - Br + 1);
55
55
  $e(Qe);
56
56
  const _n = new Array(un);
57
57
  $e(_n);
@@ -60,11 +60,11 @@ $e(wt);
60
60
  function Lt(e, t, n, r, a) {
61
61
  this.static_tree = e, this.extra_bits = t, this.extra_base = n, this.elems = r, this.max_length = a, this.has_stree = e && e.length;
62
62
  }
63
- let sr, or, lr;
63
+ let or, lr, cr;
64
64
  function Ft(e, t) {
65
65
  this.dyn_tree = e, this.max_code = 0, this.stat_desc = t;
66
66
  }
67
- const cr = (e) => e < 256 ? Je[e] : Je[256 + (e >>> 7)], et = (e, t) => {
67
+ const dr = (e) => e < 256 ? Je[e] : Je[256 + (e >>> 7)], et = (e, t) => {
68
68
  e.pending_buf[e.pending++] = t & 255, e.pending_buf[e.pending++] = t >>> 8 & 255;
69
69
  }, U = (e, t, n) => {
70
70
  e.bi_valid > Dt - n ? (e.bi_buf |= t << e.bi_valid & 65535, et(e, e.bi_buf), e.bi_buf = t >> Dt - e.bi_valid, e.bi_valid += n - Dt) : (e.bi_buf |= t << e.bi_valid & 65535, e.bi_valid += n);
@@ -75,20 +75,20 @@ const cr = (e) => e < 256 ? Je[e] : Je[256 + (e >>> 7)], et = (e, t) => {
75
75
  n[t * 2 + 1]
76
76
  /*.Len*/
77
77
  );
78
- }, dr = (e, t) => {
78
+ }, ur = (e, t) => {
79
79
  let n = 0;
80
80
  do
81
81
  n |= e & 1, e >>>= 1, n <<= 1;
82
82
  while (--t > 0);
83
83
  return n >>> 1;
84
- }, qr = (e) => {
84
+ }, Kr = (e) => {
85
85
  e.bi_valid === 16 ? (et(e, e.bi_buf), e.bi_buf = 0, e.bi_valid = 0) : e.bi_valid >= 8 && (e.pending_buf[e.pending++] = e.bi_buf & 255, e.bi_buf >>= 8, e.bi_valid -= 8);
86
- }, Kr = (e, t) => {
86
+ }, Gr = (e, t) => {
87
87
  const n = t.dyn_tree, r = t.max_code, a = t.stat_desc.static_tree, i = t.stat_desc.has_stree, s = t.stat_desc.extra_bits, o = t.stat_desc.extra_base, c = t.stat_desc.max_length;
88
88
  let l, h, S, y, N, Z, B = 0;
89
89
  for (y = 0; y <= we; y++)
90
90
  e.bl_count[y] = 0;
91
- for (n[e.heap[e.heap_max] * 2 + 1] = 0, l = e.heap_max + 1; l < tr; l++)
91
+ for (n[e.heap[e.heap_max] * 2 + 1] = 0, l = e.heap_max + 1; l < nr; l++)
92
92
  h = e.heap[l], y = n[n[h * 2 + 1] * 2 + 1] + 1, y > c && (y = c, B++), n[h * 2 + 1] = y, !(h > r) && (e.bl_count[y]++, N = 0, h >= o && (N = s[h - o]), Z = n[h * 2], e.opt_len += Z * (y + N), i && (e.static_len += Z * (a[h * 2 + 1] + N)));
93
93
  if (B !== 0) {
94
94
  do {
@@ -100,16 +100,16 @@ const cr = (e) => e < 256 ? Je[e] : Je[256 + (e >>> 7)], et = (e, t) => {
100
100
  for (h = e.bl_count[y]; h !== 0; )
101
101
  S = e.heap[--l], !(S > r) && (n[S * 2 + 1] !== y && (e.opt_len += (y - n[S * 2 + 1]) * n[S * 2], n[S * 2 + 1] = y), h--);
102
102
  }
103
- }, ur = (e, t, n) => {
103
+ }, fr = (e, t, n) => {
104
104
  const r = new Array(we + 1);
105
105
  let a = 0, i, s;
106
106
  for (i = 1; i <= we; i++)
107
107
  a = a + n[i - 1] << 1, r[i] = a;
108
108
  for (s = 0; s <= t; s++) {
109
109
  let o = e[s * 2 + 1];
110
- o !== 0 && (e[s * 2] = dr(r[o]++, o));
110
+ o !== 0 && (e[s * 2] = ur(r[o]++, o));
111
111
  }
112
- }, Gr = () => {
112
+ }, Xr = () => {
113
113
  let e, t, n, r, a;
114
114
  const i = new Array(we + 1);
115
115
  for (n = 0, r = 0; r < un - 1; r++)
@@ -131,10 +131,10 @@ const cr = (e) => e < 256 ? Je[e] : Je[256 + (e >>> 7)], et = (e, t) => {
131
131
  ie[e * 2 + 1] = 7, e++, i[7]++;
132
132
  for (; e <= 287; )
133
133
  ie[e * 2 + 1] = 8, e++, i[8]++;
134
- for (ur(ie, Ye + 1, i), e = 0; e < Oe; e++)
135
- Ge[e * 2 + 1] = 5, Ge[e * 2] = dr(e, 5);
136
- sr = new Lt(ie, Bt, ot + 1, Ye, we), or = new Lt(Ge, yt, 0, Oe, we), lr = new Lt(new Array(0), Hr, 0, fn, Vr);
137
- }, fr = (e) => {
134
+ for (fr(ie, Ye + 1, i), e = 0; e < Oe; e++)
135
+ Ge[e * 2 + 1] = 5, Ge[e * 2] = ur(e, 5);
136
+ or = new Lt(ie, Bt, ot + 1, Ye, we), lr = new Lt(Ge, yt, 0, Oe, we), cr = new Lt(new Array(0), Wr, 0, fn, Hr);
137
+ }, hr = (e) => {
138
138
  let t;
139
139
  for (t = 0; t < Ye; t++)
140
140
  e.dyn_ltree[t * 2] = 0;
@@ -143,7 +143,7 @@ const cr = (e) => e < 256 ? Je[e] : Je[256 + (e >>> 7)], et = (e, t) => {
143
143
  for (t = 0; t < fn; t++)
144
144
  e.bl_tree[t * 2] = 0;
145
145
  e.dyn_ltree[hn * 2] = 1, e.opt_len = e.static_len = 0, e.sym_next = e.matches = 0;
146
- }, hr = (e) => {
146
+ }, _r = (e) => {
147
147
  e.bi_valid > 8 ? et(e, e.bi_buf) : e.bi_valid > 0 && (e.pending_buf[e.pending++] = e.bi_buf), e.bi_buf = 0, e.bi_valid = 0;
148
148
  }, xn = (e, t, n, r) => {
149
149
  const a = t * 2, i = n * 2;
@@ -158,13 +158,13 @@ const cr = (e) => e < 256 ? Je[e] : Je[256 + (e >>> 7)], et = (e, t) => {
158
158
  let r, a, i = 0, s, o;
159
159
  if (e.sym_next !== 0)
160
160
  do
161
- r = e.pending_buf[e.sym_buf + i++] & 255, r += (e.pending_buf[e.sym_buf + i++] & 255) << 8, a = e.pending_buf[e.sym_buf + i++], r === 0 ? Q(e, a, t) : (s = Qe[a], Q(e, s + ot + 1, t), o = Bt[s], o !== 0 && (a -= _n[s], U(e, a, o)), r--, s = cr(r), Q(e, s, n), o = yt[s], o !== 0 && (r -= wt[s], U(e, r, o)));
161
+ r = e.pending_buf[e.sym_buf + i++] & 255, r += (e.pending_buf[e.sym_buf + i++] & 255) << 8, a = e.pending_buf[e.sym_buf + i++], r === 0 ? Q(e, a, t) : (s = Qe[a], Q(e, s + ot + 1, t), o = Bt[s], o !== 0 && (a -= _n[s], U(e, a, o)), r--, s = dr(r), Q(e, s, n), o = yt[s], o !== 0 && (r -= wt[s], U(e, r, o)));
162
162
  while (i < e.sym_next);
163
163
  Q(e, hn, t);
164
164
  }, Vt = (e, t) => {
165
165
  const n = t.dyn_tree, r = t.stat_desc.static_tree, a = t.stat_desc.has_stree, i = t.stat_desc.elems;
166
166
  let s, o, c = -1, l;
167
- for (e.heap_len = 0, e.heap_max = tr, s = 0; s < i; s++)
167
+ for (e.heap_len = 0, e.heap_max = nr, s = 0; s < i; s++)
168
168
  n[s * 2] !== 0 ? (e.heap[++e.heap_len] = c = s, e.depth[s] = 0) : n[s * 2 + 1] = 0;
169
169
  for (; e.heap_len < 2; )
170
170
  l = e.heap[++e.heap_len] = c < 2 ? ++c : 0, n[l * 2] = 1, e.depth[l] = 0, e.opt_len--, a && (e.static_len -= r[l * 2 + 1]);
@@ -199,11 +199,11 @@ const cr = (e) => e < 256 ? Je[e] : Je[256 + (e >>> 7)], et = (e, t) => {
199
199
  e.heap[--e.heap_max] = e.heap[
200
200
  1
201
201
  /*SMALLEST*/
202
- ], Kr(e, t), ur(n, c, e.bl_count);
202
+ ], Gr(e, t), fr(n, c, e.bl_count);
203
203
  }, Sn = (e, t, n) => {
204
204
  let r, a = -1, i, s = t[1], o = 0, c = 7, l = 4;
205
205
  for (s === 0 && (c = 138, l = 3), t[(n + 1) * 2 + 1] = 65535, r = 0; r <= n; r++)
206
- i = s, s = t[(r + 1) * 2 + 1], !(++o < c && i === s) && (o < l ? e.bl_tree[i * 2] += o : i !== 0 ? (i !== a && e.bl_tree[i * 2]++, e.bl_tree[nr * 2]++) : o <= 10 ? e.bl_tree[rr * 2]++ : e.bl_tree[ar * 2]++, o = 0, a = i, s === 0 ? (c = 138, l = 3) : i === s ? (c = 6, l = 3) : (c = 7, l = 4));
206
+ i = s, s = t[(r + 1) * 2 + 1], !(++o < c && i === s) && (o < l ? e.bl_tree[i * 2] += o : i !== 0 ? (i !== a && e.bl_tree[i * 2]++, e.bl_tree[rr * 2]++) : o <= 10 ? e.bl_tree[ar * 2]++ : e.bl_tree[ir * 2]++, o = 0, a = i, s === 0 ? (c = 138, l = 3) : i === s ? (c = 6, l = 3) : (c = 7, l = 4));
207
207
  }, Tn = (e, t, n) => {
208
208
  let r, a = -1, i, s = t[1], o = 0, c = 7, l = 4;
209
209
  for (s === 0 && (c = 138, l = 3), r = 0; r <= n; r++)
@@ -212,20 +212,20 @@ const cr = (e) => e < 256 ? Je[e] : Je[256 + (e >>> 7)], et = (e, t) => {
212
212
  do
213
213
  Q(e, i, e.bl_tree);
214
214
  while (--o !== 0);
215
- else i !== 0 ? (i !== a && (Q(e, i, e.bl_tree), o--), Q(e, nr, e.bl_tree), U(e, o - 3, 2)) : o <= 10 ? (Q(e, rr, e.bl_tree), U(e, o - 3, 3)) : (Q(e, ar, e.bl_tree), U(e, o - 11, 7));
215
+ else i !== 0 ? (i !== a && (Q(e, i, e.bl_tree), o--), Q(e, rr, e.bl_tree), U(e, o - 3, 2)) : o <= 10 ? (Q(e, ar, e.bl_tree), U(e, o - 3, 3)) : (Q(e, ir, e.bl_tree), U(e, o - 11, 7));
216
216
  o = 0, a = i, s === 0 ? (c = 138, l = 3) : i === s ? (c = 6, l = 3) : (c = 7, l = 4);
217
217
  }
218
- }, Xr = (e) => {
218
+ }, Yr = (e) => {
219
219
  let t;
220
- for (Sn(e, e.dyn_ltree, e.l_desc.max_code), Sn(e, e.dyn_dtree, e.d_desc.max_code), Vt(e, e.bl_desc), t = fn - 1; t >= 3 && e.bl_tree[ir[t] * 2 + 1] === 0; t--)
220
+ for (Sn(e, e.dyn_ltree, e.l_desc.max_code), Sn(e, e.dyn_dtree, e.d_desc.max_code), Vt(e, e.bl_desc), t = fn - 1; t >= 3 && e.bl_tree[sr[t] * 2 + 1] === 0; t--)
221
221
  ;
222
222
  return e.opt_len += 3 * (t + 1) + 5 + 5 + 4, t;
223
- }, Yr = (e, t, n, r) => {
223
+ }, Jr = (e, t, n, r) => {
224
224
  let a;
225
225
  for (U(e, t - 257, 5), U(e, n - 1, 5), U(e, r - 4, 4), a = 0; a < r; a++)
226
- U(e, e.bl_tree[ir[a] * 2 + 1], 3);
226
+ U(e, e.bl_tree[sr[a] * 2 + 1], 3);
227
227
  Tn(e, e.dyn_ltree, t - 1), Tn(e, e.dyn_dtree, n - 1);
228
- }, Jr = (e) => {
228
+ }, Qr = (e) => {
229
229
  let t = 4093624447, n;
230
230
  for (n = 0; n <= 31; n++, t >>>= 1)
231
231
  if (t & 1 && e.dyn_ltree[n * 2] !== 0)
@@ -238,24 +238,24 @@ const cr = (e) => e < 256 ? Je[e] : Je[256 + (e >>> 7)], et = (e, t) => {
238
238
  return 0;
239
239
  };
240
240
  let En = !1;
241
- const Qr = (e) => {
242
- En || (Gr(), En = !0), e.l_desc = new Ft(e.dyn_ltree, sr), e.d_desc = new Ft(e.dyn_dtree, or), e.bl_desc = new Ft(e.bl_tree, lr), e.bi_buf = 0, e.bi_valid = 0, fr(e);
243
- }, _r = (e, t, n, r) => {
244
- U(e, (Mr << 1) + (r ? 1 : 0), 3), hr(e), et(e, n), et(e, ~n), n && e.pending_buf.set(e.window.subarray(t, t + n), e.pending), e.pending += n;
245
- }, ea = (e) => {
246
- U(e, er << 1, 3), Q(e, hn, ie), qr(e);
247
- }, ta = (e, t, n, r) => {
241
+ const ea = (e) => {
242
+ En || (Xr(), En = !0), e.l_desc = new Ft(e.dyn_ltree, or), e.d_desc = new Ft(e.dyn_dtree, lr), e.bl_desc = new Ft(e.bl_tree, cr), e.bi_buf = 0, e.bi_valid = 0, hr(e);
243
+ }, pr = (e, t, n, r) => {
244
+ U(e, (Ur << 1) + (r ? 1 : 0), 3), _r(e), et(e, n), et(e, ~n), n && e.pending_buf.set(e.window.subarray(t, t + n), e.pending), e.pending += n;
245
+ }, ta = (e) => {
246
+ U(e, tr << 1, 3), Q(e, hn, ie), Kr(e);
247
+ }, na = (e, t, n, r) => {
248
248
  let a, i, s = 0;
249
- e.level > 0 ? (e.strm.data_type === 2 && (e.strm.data_type = Jr(e)), Vt(e, e.l_desc), Vt(e, e.d_desc), s = Xr(e), a = e.opt_len + 3 + 7 >>> 3, i = e.static_len + 3 + 7 >>> 3, i <= a && (a = i)) : a = i = n + 5, n + 4 <= a && t !== -1 ? _r(e, t, n, r) : e.strategy === 4 || i === a ? (U(e, (er << 1) + (r ? 1 : 0), 3), kn(e, ie, Ge)) : (U(e, (Ur << 1) + (r ? 1 : 0), 3), Yr(e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, s + 1), kn(e, e.dyn_ltree, e.dyn_dtree)), fr(e), r && hr(e);
250
- }, na = (e, t, n) => (e.pending_buf[e.sym_buf + e.sym_next++] = t, e.pending_buf[e.sym_buf + e.sym_next++] = t >> 8, e.pending_buf[e.sym_buf + e.sym_next++] = n, t === 0 ? e.dyn_ltree[n * 2]++ : (e.matches++, t--, e.dyn_ltree[(Qe[n] + ot + 1) * 2]++, e.dyn_dtree[cr(t) * 2]++), e.sym_next === e.sym_end);
251
- var ra = Qr, aa = _r, ia = ta, sa = na, oa = ea, la = {
252
- _tr_init: ra,
253
- _tr_stored_block: aa,
254
- _tr_flush_block: ia,
255
- _tr_tally: sa,
256
- _tr_align: oa
249
+ e.level > 0 ? (e.strm.data_type === 2 && (e.strm.data_type = Qr(e)), Vt(e, e.l_desc), Vt(e, e.d_desc), s = Yr(e), a = e.opt_len + 3 + 7 >>> 3, i = e.static_len + 3 + 7 >>> 3, i <= a && (a = i)) : a = i = n + 5, n + 4 <= a && t !== -1 ? pr(e, t, n, r) : e.strategy === 4 || i === a ? (U(e, (tr << 1) + (r ? 1 : 0), 3), kn(e, ie, Ge)) : (U(e, (Pr << 1) + (r ? 1 : 0), 3), Jr(e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, s + 1), kn(e, e.dyn_ltree, e.dyn_dtree)), hr(e), r && _r(e);
250
+ }, ra = (e, t, n) => (e.pending_buf[e.sym_buf + e.sym_next++] = t, e.pending_buf[e.sym_buf + e.sym_next++] = t >> 8, e.pending_buf[e.sym_buf + e.sym_next++] = n, t === 0 ? e.dyn_ltree[n * 2]++ : (e.matches++, t--, e.dyn_ltree[(Qe[n] + ot + 1) * 2]++, e.dyn_dtree[dr(t) * 2]++), e.sym_next === e.sym_end);
251
+ var aa = ea, ia = pr, sa = na, oa = ra, la = ta, ca = {
252
+ _tr_init: aa,
253
+ _tr_stored_block: ia,
254
+ _tr_flush_block: sa,
255
+ _tr_tally: oa,
256
+ _tr_align: la
257
257
  };
258
- const ca = (e, t, n, r) => {
258
+ const da = (e, t, n, r) => {
259
259
  let a = e & 65535 | 0, i = e >>> 16 & 65535 | 0, s = 0;
260
260
  for (; n !== 0; ) {
261
261
  s = n > 2e3 ? 2e3 : n, n -= s;
@@ -266,8 +266,8 @@ const ca = (e, t, n, r) => {
266
266
  }
267
267
  return a | i << 16 | 0;
268
268
  };
269
- var pr = ca;
270
- const da = () => {
269
+ var gr = da;
270
+ const ua = () => {
271
271
  let e, t = [];
272
272
  for (var n = 0; n < 256; n++) {
273
273
  e = n;
@@ -276,14 +276,14 @@ const da = () => {
276
276
  t[n] = e;
277
277
  }
278
278
  return t;
279
- }, ua = new Uint32Array(da()), fa = (e, t, n, r) => {
280
- const a = ua, i = r + n;
279
+ }, fa = new Uint32Array(ua()), ha = (e, t, n, r) => {
280
+ const a = fa, i = r + n;
281
281
  e ^= -1;
282
282
  for (let s = r; s < i; s++)
283
283
  e = e >>> 8 ^ a[(e ^ t[s]) & 255];
284
284
  return e ^ -1;
285
285
  };
286
- var de = fa, xt = {
286
+ var de = ha, xt = {
287
287
  2: "need dictionary",
288
288
  /* Z_NEED_DICT 2 */
289
289
  1: "stream end",
@@ -302,7 +302,7 @@ var de = fa, xt = {
302
302
  /* Z_BUF_ERROR (-5) */
303
303
  "-6": "incompatible version"
304
304
  /* Z_VERSION_ERROR (-6) */
305
- }, gr = {
305
+ }, mr = {
306
306
  /* Allowed flush values; see deflate() and inflate() below for details */
307
307
  Z_NO_FLUSH: 0,
308
308
  Z_PARTIAL_FLUSH: 1,
@@ -330,30 +330,30 @@ var de = fa, xt = {
330
330
  Z_DEFLATED: 8
331
331
  //Z_NULL: null // Use -1 or null inline, depending on var type
332
332
  };
333
- const { _tr_init: ha, _tr_stored_block: Ht, _tr_flush_block: _a, _tr_tally: _e, _tr_align: pa } = la, {
333
+ const { _tr_init: _a, _tr_stored_block: Ht, _tr_flush_block: pa, _tr_tally: _e, _tr_align: ga } = ca, {
334
334
  Z_NO_FLUSH: pe,
335
- Z_PARTIAL_FLUSH: ga,
336
- Z_FULL_FLUSH: ma,
335
+ Z_PARTIAL_FLUSH: ma,
336
+ Z_FULL_FLUSH: ya,
337
337
  Z_FINISH: K,
338
338
  Z_BLOCK: An,
339
339
  Z_OK: D,
340
340
  Z_STREAM_END: On,
341
341
  Z_STREAM_ERROR: ee,
342
- Z_DATA_ERROR: ya,
342
+ Z_DATA_ERROR: va,
343
343
  Z_BUF_ERROR: jt,
344
- Z_DEFAULT_COMPRESSION: va,
345
- Z_FILTERED: ba,
344
+ Z_DEFAULT_COMPRESSION: ba,
345
+ Z_FILTERED: wa,
346
346
  Z_HUFFMAN_ONLY: _t,
347
- Z_RLE: wa,
348
- Z_FIXED: xa,
349
- Z_DEFAULT_STRATEGY: ka,
350
- Z_UNKNOWN: Sa,
347
+ Z_RLE: xa,
348
+ Z_FIXED: ka,
349
+ Z_DEFAULT_STRATEGY: Sa,
350
+ Z_UNKNOWN: Ta,
351
351
  Z_DEFLATED: Rt
352
- } = gr, Ta = 9, Ea = 15, Aa = 8, Oa = 29, Ca = 256, Wt = Ca + 1 + Oa, Ra = 30, Na = 19, Ia = 2 * Wt + 1, Za = 15, x = 3, he = 258, te = he + x + 1, za = 32, Re = 42, pn = 57, qt = 69, Kt = 73, Gt = 91, Xt = 103, xe = 113, Ve = 666, j = 1, je = 2, Se = 3, Me = 4, Da = 3, ke = (e, t) => (e.msg = xt[t], t), Cn = (e) => e * 2 - (e > 4 ? 9 : 0), fe = (e) => {
352
+ } = mr, Ea = 9, Aa = 15, Oa = 8, Ca = 29, Ra = 256, Wt = Ra + 1 + Ca, Na = 30, Ia = 19, Za = 2 * Wt + 1, za = 15, x = 3, he = 258, te = he + x + 1, Da = 32, Re = 42, pn = 57, qt = 69, Kt = 73, Gt = 91, Xt = 103, xe = 113, Ve = 666, j = 1, je = 2, Se = 3, Me = 4, La = 3, ke = (e, t) => (e.msg = xt[t], t), Cn = (e) => e * 2 - (e > 4 ? 9 : 0), fe = (e) => {
353
353
  let t = e.length;
354
354
  for (; --t >= 0; )
355
355
  e[t] = 0;
356
- }, La = (e) => {
356
+ }, Fa = (e) => {
357
357
  let t, n, r, a = e.w_size;
358
358
  t = e.hash_size, r = t;
359
359
  do
@@ -364,21 +364,21 @@ const { _tr_init: ha, _tr_stored_block: Ht, _tr_flush_block: _a, _tr_tally: _e,
364
364
  n = e.prev[--r], e.prev[r] = n >= a ? n - a : 0;
365
365
  while (--t);
366
366
  };
367
- let Fa = (e, t, n) => (t << e.hash_shift ^ n) & e.hash_mask, ge = Fa;
367
+ let $a = (e, t, n) => (t << e.hash_shift ^ n) & e.hash_mask, ge = $a;
368
368
  const V = (e) => {
369
369
  const t = e.state;
370
370
  let n = t.pending;
371
371
  n > e.avail_out && (n = e.avail_out), n !== 0 && (e.output.set(t.pending_buf.subarray(t.pending_out, t.pending_out + n), e.next_out), e.next_out += n, t.pending_out += n, e.total_out += n, e.avail_out -= n, t.pending -= n, t.pending === 0 && (t.pending_out = 0));
372
372
  }, H = (e, t) => {
373
- _a(e, e.block_start >= 0 ? e.block_start : -1, e.strstart - e.block_start, t), e.block_start = e.strstart, V(e.strm);
373
+ pa(e, e.block_start >= 0 ? e.block_start : -1, e.strstart - e.block_start, t), e.block_start = e.strstart, V(e.strm);
374
374
  }, A = (e, t) => {
375
375
  e.pending_buf[e.pending++] = t;
376
376
  }, Be = (e, t) => {
377
377
  e.pending_buf[e.pending++] = t >>> 8 & 255, e.pending_buf[e.pending++] = t & 255;
378
378
  }, Yt = (e, t, n, r) => {
379
379
  let a = e.avail_in;
380
- return a > r && (a = r), a === 0 ? 0 : (e.avail_in -= a, t.set(e.input.subarray(e.next_in, e.next_in + a), n), e.state.wrap === 1 ? e.adler = pr(e.adler, t, a, n) : e.state.wrap === 2 && (e.adler = de(e.adler, t, a, n)), e.next_in += a, e.total_in += a, a);
381
- }, mr = (e, t) => {
380
+ return a > r && (a = r), a === 0 ? 0 : (e.avail_in -= a, t.set(e.input.subarray(e.next_in, e.next_in + a), n), e.state.wrap === 1 ? e.adler = gr(e.adler, t, a, n) : e.state.wrap === 2 && (e.adler = de(e.adler, t, a, n)), e.next_in += a, e.total_in += a, a);
381
+ }, yr = (e, t) => {
382
382
  let n = e.max_chain_length, r = e.strstart, a, i, s = e.prev_length, o = e.nice_match;
383
383
  const c = e.strstart > e.w_size - te ? e.strstart - (e.w_size - te) : 0, l = e.window, h = e.w_mask, S = e.prev, y = e.strstart + he;
384
384
  let N = l[r + s - 1], Z = l[r + s];
@@ -401,13 +401,13 @@ const V = (e) => {
401
401
  const t = e.w_size;
402
402
  let n, r, a;
403
403
  do {
404
- if (r = e.window_size - e.lookahead - e.strstart, e.strstart >= t + (t - te) && (e.window.set(e.window.subarray(t, t + t - r), 0), e.match_start -= t, e.strstart -= t, e.block_start -= t, e.insert > e.strstart && (e.insert = e.strstart), La(e), r += t), e.strm.avail_in === 0)
404
+ if (r = e.window_size - e.lookahead - e.strstart, e.strstart >= t + (t - te) && (e.window.set(e.window.subarray(t, t + t - r), 0), e.match_start -= t, e.strstart -= t, e.block_start -= t, e.insert > e.strstart && (e.insert = e.strstart), Fa(e), r += t), e.strm.avail_in === 0)
405
405
  break;
406
406
  if (n = Yt(e.strm, e.window, e.strstart + e.lookahead, r), e.lookahead += n, e.lookahead + e.insert >= x)
407
407
  for (a = e.strstart - e.insert, e.ins_h = e.window[a], e.ins_h = ge(e, e.ins_h, e.window[a + 1]); e.insert && (e.ins_h = ge(e, e.ins_h, e.window[a + x - 1]), e.prev[a & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = a, a++, e.insert--, !(e.lookahead + e.insert < x)); )
408
408
  ;
409
409
  } while (e.lookahead < te && e.strm.avail_in !== 0);
410
- }, yr = (e, t) => {
410
+ }, vr = (e, t) => {
411
411
  let n = e.pending_buf_size - 5 > e.w_size ? e.w_size : e.pending_buf_size - 5, r, a, i, s = 0, o = e.strm.avail_in;
412
412
  do {
413
413
  if (r = 65535, i = e.bi_valid + 42 >> 3, e.strm.avail_out < i || (i = e.strm.avail_out - i, a = e.strstart - e.block_start, r > a + e.strm.avail_in && (r = a + e.strm.avail_in), r > i && (r = i), r < n && (r === 0 && t !== K || t === pe || r !== a + e.strm.avail_in)))
@@ -424,7 +424,7 @@ const V = (e) => {
424
424
  if (e.lookahead === 0)
425
425
  break;
426
426
  }
427
- if (n = 0, e.lookahead >= x && (e.ins_h = ge(e, e.ins_h, e.window[e.strstart + x - 1]), n = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), n !== 0 && e.strstart - n <= e.w_size - te && (e.match_length = mr(e, n)), e.match_length >= x)
427
+ if (n = 0, e.lookahead >= x && (e.ins_h = ge(e, e.ins_h, e.window[e.strstart + x - 1]), n = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), n !== 0 && e.strstart - n <= e.w_size - te && (e.match_length = yr(e, n)), e.match_length >= x)
428
428
  if (r = _e(e, e.strstart - e.match_start, e.match_length - x), e.lookahead -= e.match_length, e.match_length <= e.max_lazy_match && e.lookahead >= x) {
429
429
  e.match_length--;
430
430
  do
@@ -448,7 +448,7 @@ const V = (e) => {
448
448
  if (e.lookahead === 0)
449
449
  break;
450
450
  }
451
- if (n = 0, e.lookahead >= x && (e.ins_h = ge(e, e.ins_h, e.window[e.strstart + x - 1]), n = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), e.prev_length = e.match_length, e.prev_match = e.match_start, e.match_length = x - 1, n !== 0 && e.prev_length < e.max_lazy_match && e.strstart - n <= e.w_size - te && (e.match_length = mr(e, n), e.match_length <= 5 && (e.strategy === ba || e.match_length === x && e.strstart - e.match_start > 4096) && (e.match_length = x - 1)), e.prev_length >= x && e.match_length <= e.prev_length) {
451
+ if (n = 0, e.lookahead >= x && (e.ins_h = ge(e, e.ins_h, e.window[e.strstart + x - 1]), n = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), e.prev_length = e.match_length, e.prev_match = e.match_start, e.match_length = x - 1, n !== 0 && e.prev_length < e.max_lazy_match && e.strstart - n <= e.w_size - te && (e.match_length = yr(e, n), e.match_length <= 5 && (e.strategy === wa || e.match_length === x && e.strstart - e.match_start > 4096) && (e.match_length = x - 1)), e.prev_length >= x && e.match_length <= e.prev_length) {
452
452
  a = e.strstart + e.lookahead - x, r = _e(e, e.strstart - 1 - e.prev_match, e.prev_length - x), e.lookahead -= e.prev_length - 1, e.prev_length -= 2;
453
453
  do
454
454
  ++e.strstart <= a && (e.ins_h = ge(e, e.ins_h, e.window[e.strstart + x - 1]), n = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart);
@@ -462,7 +462,7 @@ const V = (e) => {
462
462
  e.match_available = 1, e.strstart++, e.lookahead--;
463
463
  }
464
464
  return e.match_available && (r = _e(e, 0, e.window[e.strstart - 1]), e.match_available = 0), e.insert = e.strstart < x - 1 ? e.strstart : x - 1, t === K ? (H(e, !0), e.strm.avail_out === 0 ? Se : Me) : e.sym_next && (H(e, !1), e.strm.avail_out === 0) ? j : je;
465
- }, $a = (e, t) => {
465
+ }, ja = (e, t) => {
466
466
  let n, r, a, i;
467
467
  const s = e.window;
468
468
  for (; ; ) {
@@ -483,7 +483,7 @@ const V = (e) => {
483
483
  return j;
484
484
  }
485
485
  return e.insert = 0, t === K ? (H(e, !0), e.strm.avail_out === 0 ? Se : Me) : e.sym_next && (H(e, !1), e.strm.avail_out === 0) ? j : je;
486
- }, ja = (e, t) => {
486
+ }, Ma = (e, t) => {
487
487
  let n;
488
488
  for (; ; ) {
489
489
  if (e.lookahead === 0 && (Ne(e), e.lookahead === 0)) {
@@ -501,7 +501,7 @@ function J(e, t, n, r, a) {
501
501
  }
502
502
  const He = [
503
503
  /* good lazy nice chain */
504
- new J(0, 0, 0, 0, yr),
504
+ new J(0, 0, 0, 0, vr),
505
505
  /* 0 store only */
506
506
  new J(4, 4, 8, 4, Mt),
507
507
  /* 1 max speed, no lazy matches */
@@ -521,11 +521,11 @@ const He = [
521
521
  /* 8 */
522
522
  new J(32, 258, 258, 4096, Ee)
523
523
  /* 9 max compression */
524
- ], Ma = (e) => {
524
+ ], Ua = (e) => {
525
525
  e.window_size = 2 * e.w_size, fe(e.head), e.max_lazy_match = He[e.level].max_lazy, e.good_match = He[e.level].good_length, e.nice_match = He[e.level].nice_length, e.max_chain_length = He[e.level].max_chain, e.strstart = 0, e.block_start = 0, e.lookahead = 0, e.insert = 0, e.match_length = e.prev_length = x - 1, e.match_available = 0, e.ins_h = 0;
526
526
  };
527
- function Ua() {
528
- this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = Rt, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new Uint16Array(Ia * 2), this.dyn_dtree = new Uint16Array((2 * Ra + 1) * 2), this.bl_tree = new Uint16Array((2 * Na + 1) * 2), fe(this.dyn_ltree), fe(this.dyn_dtree), fe(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new Uint16Array(Za + 1), this.heap = new Uint16Array(2 * Wt + 1), fe(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new Uint16Array(2 * Wt + 1), fe(this.depth), this.sym_buf = 0, this.lit_bufsize = 0, this.sym_next = 0, this.sym_end = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
527
+ function Pa() {
528
+ this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = Rt, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new Uint16Array(Za * 2), this.dyn_dtree = new Uint16Array((2 * Na + 1) * 2), this.bl_tree = new Uint16Array((2 * Ia + 1) * 2), fe(this.dyn_ltree), fe(this.dyn_dtree), fe(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new Uint16Array(za + 1), this.heap = new Uint16Array(2 * Wt + 1), fe(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new Uint16Array(2 * Wt + 1), fe(this.depth), this.sym_buf = 0, this.lit_bufsize = 0, this.sym_next = 0, this.sym_end = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
529
529
  }
530
530
  const lt = (e) => {
531
531
  if (!e)
@@ -534,29 +534,29 @@ const lt = (e) => {
534
534
  return !t || t.strm !== e || t.status !== Re && //#ifdef GZIP
535
535
  t.status !== pn && //#endif
536
536
  t.status !== qt && t.status !== Kt && t.status !== Gt && t.status !== Xt && t.status !== xe && t.status !== Ve ? 1 : 0;
537
- }, vr = (e) => {
537
+ }, br = (e) => {
538
538
  if (lt(e))
539
539
  return ke(e, ee);
540
- e.total_in = e.total_out = 0, e.data_type = Sa;
540
+ e.total_in = e.total_out = 0, e.data_type = Ta;
541
541
  const t = e.state;
542
542
  return t.pending = 0, t.pending_out = 0, t.wrap < 0 && (t.wrap = -t.wrap), t.status = //#ifdef GZIP
543
543
  t.wrap === 2 ? pn : (
544
544
  //#endif
545
545
  t.wrap ? Re : xe
546
- ), e.adler = t.wrap === 2 ? 0 : 1, t.last_flush = -2, ha(t), D;
547
- }, br = (e) => {
548
- const t = vr(e);
549
- return t === D && Ma(e.state), t;
550
- }, Pa = (e, t) => lt(e) || e.state.wrap !== 2 ? ee : (e.state.gzhead = t, D), wr = (e, t, n, r, a, i) => {
546
+ ), e.adler = t.wrap === 2 ? 0 : 1, t.last_flush = -2, _a(t), D;
547
+ }, wr = (e) => {
548
+ const t = br(e);
549
+ return t === D && Ua(e.state), t;
550
+ }, Ba = (e, t) => lt(e) || e.state.wrap !== 2 ? ee : (e.state.gzhead = t, D), xr = (e, t, n, r, a, i) => {
551
551
  if (!e)
552
552
  return ee;
553
553
  let s = 1;
554
- if (t === va && (t = 6), r < 0 ? (s = 0, r = -r) : r > 15 && (s = 2, r -= 16), a < 1 || a > Ta || n !== Rt || r < 8 || r > 15 || t < 0 || t > 9 || i < 0 || i > xa || r === 8 && s !== 1)
554
+ if (t === ba && (t = 6), r < 0 ? (s = 0, r = -r) : r > 15 && (s = 2, r -= 16), a < 1 || a > Ea || n !== Rt || r < 8 || r > 15 || t < 0 || t > 9 || i < 0 || i > ka || r === 8 && s !== 1)
555
555
  return ke(e, ee);
556
556
  r === 8 && (r = 9);
557
- const o = new Ua();
558
- return e.state = o, o.strm = e, o.status = Re, o.wrap = s, o.gzhead = null, o.w_bits = r, o.w_size = 1 << o.w_bits, o.w_mask = o.w_size - 1, o.hash_bits = a + 7, o.hash_size = 1 << o.hash_bits, o.hash_mask = o.hash_size - 1, o.hash_shift = ~~((o.hash_bits + x - 1) / x), o.window = new Uint8Array(o.w_size * 2), o.head = new Uint16Array(o.hash_size), o.prev = new Uint16Array(o.w_size), o.lit_bufsize = 1 << a + 6, o.pending_buf_size = o.lit_bufsize * 4, o.pending_buf = new Uint8Array(o.pending_buf_size), o.sym_buf = o.lit_bufsize, o.sym_end = (o.lit_bufsize - 1) * 3, o.level = t, o.strategy = i, o.method = n, br(e);
559
- }, Ba = (e, t) => wr(e, t, Rt, Ea, Aa, ka), Va = (e, t) => {
557
+ const o = new Pa();
558
+ return e.state = o, o.strm = e, o.status = Re, o.wrap = s, o.gzhead = null, o.w_bits = r, o.w_size = 1 << o.w_bits, o.w_mask = o.w_size - 1, o.hash_bits = a + 7, o.hash_size = 1 << o.hash_bits, o.hash_mask = o.hash_size - 1, o.hash_shift = ~~((o.hash_bits + x - 1) / x), o.window = new Uint8Array(o.w_size * 2), o.head = new Uint16Array(o.hash_size), o.prev = new Uint16Array(o.w_size), o.lit_bufsize = 1 << a + 6, o.pending_buf_size = o.lit_bufsize * 4, o.pending_buf = new Uint8Array(o.pending_buf_size), o.sym_buf = o.lit_bufsize, o.sym_end = (o.lit_bufsize - 1) * 3, o.level = t, o.strategy = i, o.method = n, wr(e);
559
+ }, Va = (e, t) => xr(e, t, Rt, Aa, Oa, Sa), Ha = (e, t) => {
560
560
  if (lt(e) || t > An || t < 0)
561
561
  return e ? ke(e, ee) : ee;
562
562
  const n = e.state;
@@ -572,7 +572,7 @@ const lt = (e) => {
572
572
  return ke(e, jt);
573
573
  if (n.status === Re && n.wrap === 0 && (n.status = xe), n.status === Re) {
574
574
  let a = Rt + (n.w_bits - 8 << 4) << 8, i = -1;
575
- if (n.strategy >= _t || n.level < 2 ? i = 0 : n.level < 6 ? i = 1 : n.level === 6 ? i = 2 : i = 3, a |= i << 6, n.strstart !== 0 && (a |= za), a += 31 - a % 31, Be(n, a), n.strstart !== 0 && (Be(n, e.adler >>> 16), Be(n, e.adler & 65535)), e.adler = 1, n.status = xe, V(e), n.pending !== 0)
575
+ if (n.strategy >= _t || n.level < 2 ? i = 0 : n.level < 6 ? i = 1 : n.level === 6 ? i = 2 : i = 3, a |= i << 6, n.strstart !== 0 && (a |= Da), a += 31 - a % 31, Be(n, a), n.strstart !== 0 && (Be(n, e.adler >>> 16), Be(n, e.adler & 65535)), e.adler = 1, n.status = xe, V(e), n.pending !== 0)
576
576
  return n.last_flush = -1, D;
577
577
  }
578
578
  if (n.status === pn) {
@@ -581,7 +581,7 @@ const lt = (e) => {
581
581
  n,
582
582
  (n.gzhead.text ? 1 : 0) + (n.gzhead.hcrc ? 2 : 0) + (n.gzhead.extra ? 4 : 0) + (n.gzhead.name ? 8 : 0) + (n.gzhead.comment ? 16 : 0)
583
583
  ), A(n, n.gzhead.time & 255), A(n, n.gzhead.time >> 8 & 255), A(n, n.gzhead.time >> 16 & 255), A(n, n.gzhead.time >> 24 & 255), A(n, n.level === 9 ? 2 : n.strategy >= _t || n.level < 2 ? 4 : 0), A(n, n.gzhead.os & 255), n.gzhead.extra && n.gzhead.extra.length && (A(n, n.gzhead.extra.length & 255), A(n, n.gzhead.extra.length >> 8 & 255)), n.gzhead.hcrc && (e.adler = de(e.adler, n.pending_buf, n.pending, 0)), n.gzindex = 0, n.status = qt;
584
- else if (A(n, 0), A(n, 0), A(n, 0), A(n, 0), A(n, 0), A(n, n.level === 9 ? 2 : n.strategy >= _t || n.level < 2 ? 4 : 0), A(n, Da), n.status = xe, V(e), n.pending !== 0)
584
+ else if (A(n, 0), A(n, 0), A(n, 0), A(n, 0), A(n, 0), A(n, n.level === 9 ? 2 : n.strategy >= _t || n.level < 2 ? 4 : 0), A(n, La), n.status = xe, V(e), n.pending !== 0)
585
585
  return n.last_flush = -1, D;
586
586
  }
587
587
  if (n.status === qt) {
@@ -638,26 +638,26 @@ const lt = (e) => {
638
638
  return n.last_flush = -1, D;
639
639
  }
640
640
  if (e.avail_in !== 0 || n.lookahead !== 0 || t !== pe && n.status !== Ve) {
641
- let a = n.level === 0 ? yr(n, t) : n.strategy === _t ? ja(n, t) : n.strategy === wa ? $a(n, t) : He[n.level].func(n, t);
641
+ let a = n.level === 0 ? vr(n, t) : n.strategy === _t ? Ma(n, t) : n.strategy === xa ? ja(n, t) : He[n.level].func(n, t);
642
642
  if ((a === Se || a === Me) && (n.status = Ve), a === j || a === Se)
643
643
  return e.avail_out === 0 && (n.last_flush = -1), D;
644
- if (a === je && (t === ga ? pa(n) : t !== An && (Ht(n, 0, 0, !1), t === ma && (fe(n.head), n.lookahead === 0 && (n.strstart = 0, n.block_start = 0, n.insert = 0))), V(e), e.avail_out === 0))
644
+ if (a === je && (t === ma ? ga(n) : t !== An && (Ht(n, 0, 0, !1), t === ya && (fe(n.head), n.lookahead === 0 && (n.strstart = 0, n.block_start = 0, n.insert = 0))), V(e), e.avail_out === 0))
645
645
  return n.last_flush = -1, D;
646
646
  }
647
647
  return t !== K ? D : n.wrap <= 0 ? On : (n.wrap === 2 ? (A(n, e.adler & 255), A(n, e.adler >> 8 & 255), A(n, e.adler >> 16 & 255), A(n, e.adler >> 24 & 255), A(n, e.total_in & 255), A(n, e.total_in >> 8 & 255), A(n, e.total_in >> 16 & 255), A(n, e.total_in >> 24 & 255)) : (Be(n, e.adler >>> 16), Be(n, e.adler & 65535)), V(e), n.wrap > 0 && (n.wrap = -n.wrap), n.pending !== 0 ? D : On);
648
- }, Ha = (e) => {
648
+ }, Wa = (e) => {
649
649
  if (lt(e))
650
650
  return ee;
651
651
  const t = e.state.status;
652
- return e.state = null, t === xe ? ke(e, ya) : D;
653
- }, Wa = (e, t) => {
652
+ return e.state = null, t === xe ? ke(e, va) : D;
653
+ }, qa = (e, t) => {
654
654
  let n = t.length;
655
655
  if (lt(e))
656
656
  return ee;
657
657
  const r = e.state, a = r.wrap;
658
658
  if (a === 2 || a === 1 && r.status !== Re || r.lookahead)
659
659
  return ee;
660
- if (a === 1 && (e.adler = pr(e.adler, t, n, 0)), r.wrap = 0, n >= r.w_size) {
660
+ if (a === 1 && (e.adler = gr(e.adler, t, n, 0)), r.wrap = 0, n >= r.w_size) {
661
661
  a === 0 && (fe(r.head), r.strstart = 0, r.block_start = 0, r.insert = 0);
662
662
  let c = new Uint8Array(r.w_size);
663
663
  c.set(t.subarray(n - r.w_size, n), 0), t = c, n = r.w_size;
@@ -672,19 +672,19 @@ const lt = (e) => {
672
672
  }
673
673
  return r.strstart += r.lookahead, r.block_start = r.strstart, r.insert = r.lookahead, r.lookahead = 0, r.match_length = r.prev_length = x - 1, r.match_available = 0, e.next_in = s, e.input = o, e.avail_in = i, r.wrap = a, D;
674
674
  };
675
- var qa = Ba, Ka = wr, Ga = br, Xa = vr, Ya = Pa, Ja = Va, Qa = Ha, ei = Wa, ti = "pako deflate (from Nodeca project)", Xe = {
676
- deflateInit: qa,
677
- deflateInit2: Ka,
678
- deflateReset: Ga,
679
- deflateResetKeep: Xa,
680
- deflateSetHeader: Ya,
681
- deflate: Ja,
682
- deflateEnd: Qa,
683
- deflateSetDictionary: ei,
684
- deflateInfo: ti
675
+ var Ka = Va, Ga = xr, Xa = wr, Ya = br, Ja = Ba, Qa = Ha, ei = Wa, ti = qa, ni = "pako deflate (from Nodeca project)", Xe = {
676
+ deflateInit: Ka,
677
+ deflateInit2: Ga,
678
+ deflateReset: Xa,
679
+ deflateResetKeep: Ya,
680
+ deflateSetHeader: Ja,
681
+ deflate: Qa,
682
+ deflateEnd: ei,
683
+ deflateSetDictionary: ti,
684
+ deflateInfo: ni
685
685
  };
686
- const ni = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
687
- var ri = function(e) {
686
+ const ri = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
687
+ var ai = function(e) {
688
688
  const t = Array.prototype.slice.call(arguments, 1);
689
689
  for (; t.length; ) {
690
690
  const n = t.shift();
@@ -692,11 +692,11 @@ var ri = function(e) {
692
692
  if (typeof n != "object")
693
693
  throw new TypeError(n + "must be non-object");
694
694
  for (const r in n)
695
- ni(n, r) && (e[r] = n[r]);
695
+ ri(n, r) && (e[r] = n[r]);
696
696
  }
697
697
  }
698
698
  return e;
699
- }, ai = (e) => {
699
+ }, ii = (e) => {
700
700
  let t = 0;
701
701
  for (let r = 0, a = e.length; r < a; r++)
702
702
  t += e[r].length;
@@ -706,21 +706,21 @@ var ri = function(e) {
706
706
  n.set(s, a), a += s.length;
707
707
  }
708
708
  return n;
709
- }, xr = {
710
- assign: ri,
711
- flattenChunks: ai
709
+ }, kr = {
710
+ assign: ai,
711
+ flattenChunks: ii
712
712
  };
713
- let kr = !0;
713
+ let Sr = !0;
714
714
  try {
715
715
  String.fromCharCode.apply(null, new Uint8Array(1));
716
716
  } catch (e) {
717
- kr = !1;
717
+ Sr = !1;
718
718
  }
719
719
  const tt = new Uint8Array(256);
720
720
  for (let e = 0; e < 256; e++)
721
721
  tt[e] = e >= 252 ? 6 : e >= 248 ? 5 : e >= 240 ? 4 : e >= 224 ? 3 : e >= 192 ? 2 : 1;
722
722
  tt[254] = tt[254] = 1;
723
- var ii = (e) => {
723
+ var si = (e) => {
724
724
  if (typeof TextEncoder == "function" && TextEncoder.prototype.encode)
725
725
  return new TextEncoder().encode(e);
726
726
  let t, n, r, a, i, s = e.length, o = 0;
@@ -730,15 +730,15 @@ var ii = (e) => {
730
730
  n = e.charCodeAt(a), (n & 64512) === 55296 && a + 1 < s && (r = e.charCodeAt(a + 1), (r & 64512) === 56320 && (n = 65536 + (n - 55296 << 10) + (r - 56320), a++)), n < 128 ? t[i++] = n : n < 2048 ? (t[i++] = 192 | n >>> 6, t[i++] = 128 | n & 63) : n < 65536 ? (t[i++] = 224 | n >>> 12, t[i++] = 128 | n >>> 6 & 63, t[i++] = 128 | n & 63) : (t[i++] = 240 | n >>> 18, t[i++] = 128 | n >>> 12 & 63, t[i++] = 128 | n >>> 6 & 63, t[i++] = 128 | n & 63);
731
731
  return t;
732
732
  };
733
- const si = (e, t) => {
734
- if (t < 65534 && e.subarray && kr)
733
+ const oi = (e, t) => {
734
+ if (t < 65534 && e.subarray && Sr)
735
735
  return String.fromCharCode.apply(null, e.length === t ? e : e.subarray(0, t));
736
736
  let n = "";
737
737
  for (let r = 0; r < t; r++)
738
738
  n += String.fromCharCode(e[r]);
739
739
  return n;
740
740
  };
741
- var oi = (e, t) => {
741
+ var li = (e, t) => {
742
742
  const n = t || e.length;
743
743
  if (typeof TextDecoder == "function" && TextDecoder.prototype.decode)
744
744
  return new TextDecoder().decode(e.subarray(0, t));
@@ -763,44 +763,44 @@ var oi = (e, t) => {
763
763
  }
764
764
  s < 65536 ? i[a++] = s : (s -= 65536, i[a++] = 55296 | s >> 10 & 1023, i[a++] = 56320 | s & 1023);
765
765
  }
766
- return si(i, a);
767
- }, li = (e, t) => {
766
+ return oi(i, a);
767
+ }, ci = (e, t) => {
768
768
  t = t || e.length, t > e.length && (t = e.length);
769
769
  let n = t - 1;
770
770
  for (; n >= 0 && (e[n] & 192) === 128; )
771
771
  n--;
772
772
  return n < 0 || n === 0 ? t : n + tt[e[n]] > t ? n : t;
773
- }, Sr = {
774
- string2buf: ii,
775
- buf2string: oi,
776
- utf8border: li
773
+ }, Tr = {
774
+ string2buf: si,
775
+ buf2string: li,
776
+ utf8border: ci
777
777
  };
778
- function ci() {
778
+ function di() {
779
779
  this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0;
780
780
  }
781
- var di = ci;
782
- const Tr = Object.prototype.toString, {
783
- Z_NO_FLUSH: ui,
784
- Z_SYNC_FLUSH: fi,
785
- Z_FULL_FLUSH: hi,
786
- Z_FINISH: _i,
781
+ var ui = di;
782
+ const Er = Object.prototype.toString, {
783
+ Z_NO_FLUSH: fi,
784
+ Z_SYNC_FLUSH: hi,
785
+ Z_FULL_FLUSH: _i,
786
+ Z_FINISH: pi,
787
787
  Z_OK: kt,
788
- Z_STREAM_END: pi,
789
- Z_DEFAULT_COMPRESSION: gi,
790
- Z_DEFAULT_STRATEGY: mi,
791
- Z_DEFLATED: yi
792
- } = gr;
788
+ Z_STREAM_END: gi,
789
+ Z_DEFAULT_COMPRESSION: mi,
790
+ Z_DEFAULT_STRATEGY: yi,
791
+ Z_DEFLATED: vi
792
+ } = mr;
793
793
  function Nt(e) {
794
- this.options = xr.assign({
795
- level: gi,
796
- method: yi,
794
+ this.options = kr.assign({
795
+ level: mi,
796
+ method: vi,
797
797
  chunkSize: 16384,
798
798
  windowBits: 15,
799
799
  memLevel: 8,
800
- strategy: mi
800
+ strategy: yi
801
801
  }, e || {});
802
802
  let t = this.options;
803
- t.raw && t.windowBits > 0 ? t.windowBits = -t.windowBits : t.gzip && t.windowBits > 0 && t.windowBits < 16 && (t.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new di(), this.strm.avail_out = 0;
803
+ t.raw && t.windowBits > 0 ? t.windowBits = -t.windowBits : t.gzip && t.windowBits > 0 && t.windowBits < 16 && (t.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new ui(), this.strm.avail_out = 0;
804
804
  let n = Xe.deflateInit2(
805
805
  this.strm,
806
806
  t.level,
@@ -813,7 +813,7 @@ function Nt(e) {
813
813
  throw new Error(xt[n]);
814
814
  if (t.header && Xe.deflateSetHeader(this.strm, t.header), t.dictionary) {
815
815
  let r;
816
- if (typeof t.dictionary == "string" ? r = Sr.string2buf(t.dictionary) : Tr.call(t.dictionary) === "[object ArrayBuffer]" ? r = new Uint8Array(t.dictionary) : r = t.dictionary, n = Xe.deflateSetDictionary(this.strm, r), n !== kt)
816
+ if (typeof t.dictionary == "string" ? r = Tr.string2buf(t.dictionary) : Er.call(t.dictionary) === "[object ArrayBuffer]" ? r = new Uint8Array(t.dictionary) : r = t.dictionary, n = Xe.deflateSetDictionary(this.strm, r), n !== kt)
817
817
  throw new Error(xt[n]);
818
818
  this._dict_set = !0;
819
819
  }
@@ -823,12 +823,12 @@ Nt.prototype.push = function(e, t) {
823
823
  let a, i;
824
824
  if (this.ended)
825
825
  return !1;
826
- for (t === ~~t ? i = t : i = t === !0 ? _i : ui, typeof e == "string" ? n.input = Sr.string2buf(e) : Tr.call(e) === "[object ArrayBuffer]" ? n.input = new Uint8Array(e) : n.input = e, n.next_in = 0, n.avail_in = n.input.length; ; ) {
827
- if (n.avail_out === 0 && (n.output = new Uint8Array(r), n.next_out = 0, n.avail_out = r), (i === fi || i === hi) && n.avail_out <= 6) {
826
+ for (t === ~~t ? i = t : i = t === !0 ? pi : fi, typeof e == "string" ? n.input = Tr.string2buf(e) : Er.call(e) === "[object ArrayBuffer]" ? n.input = new Uint8Array(e) : n.input = e, n.next_in = 0, n.avail_in = n.input.length; ; ) {
827
+ if (n.avail_out === 0 && (n.output = new Uint8Array(r), n.next_out = 0, n.avail_out = r), (i === hi || i === _i) && n.avail_out <= 6) {
828
828
  this.onData(n.output.subarray(0, n.next_out)), n.avail_out = 0;
829
829
  continue;
830
830
  }
831
- if (a = Xe.deflate(n, i), a === pi)
831
+ if (a = Xe.deflate(n, i), a === gi)
832
832
  return n.next_out > 0 && this.onData(n.output.subarray(0, n.next_out)), a = Xe.deflateEnd(this.strm), this.onEnd(a), this.ended = !0, a === kt;
833
833
  if (n.avail_out === 0) {
834
834
  this.onData(n.output);
@@ -846,22 +846,22 @@ Nt.prototype.onData = function(e) {
846
846
  this.chunks.push(e);
847
847
  };
848
848
  Nt.prototype.onEnd = function(e) {
849
- e === kt && (this.result = xr.flattenChunks(this.chunks)), this.chunks = [], this.err = e, this.msg = this.strm.msg;
849
+ e === kt && (this.result = kr.flattenChunks(this.chunks)), this.chunks = [], this.err = e, this.msg = this.strm.msg;
850
850
  };
851
- function vi(e, t) {
851
+ function bi(e, t) {
852
852
  const n = new Nt(t);
853
853
  if (n.push(e, !0), n.err)
854
854
  throw n.msg || xt[n.err];
855
855
  return n.result;
856
856
  }
857
- function bi(e, t) {
858
- return t = t || {}, t.gzip = !0, vi(e, t);
857
+ function wi(e, t) {
858
+ return t = t || {}, t.gzip = !0, bi(e, t);
859
859
  }
860
- var wi = bi, xi = {
861
- gzip: wi
860
+ var xi = wi, ki = {
861
+ gzip: xi
862
862
  };
863
- const { gzip: ki } = xi;
864
- var Si = ki;
863
+ const { gzip: Si } = ki;
864
+ var Ti = Si;
865
865
  class be extends Error {
866
866
  constructor({
867
867
  name: t,
@@ -872,12 +872,12 @@ class be extends Error {
872
872
  super(), this.name = t, this.message = n, this.detail = a, this.status = r;
873
873
  }
874
874
  }
875
- class Ti extends Error {
875
+ class Ei extends Error {
876
876
  constructor() {
877
877
  super("Malformatted Figma Token");
878
878
  }
879
879
  }
880
- class Ei extends Error {
880
+ class Ai extends Error {
881
881
  constructor() {
882
882
  super("Missing Figma Token");
883
883
  }
@@ -893,35 +893,40 @@ class Nn extends Error {
893
893
  }
894
894
  }
895
895
  class In extends Error {
896
- constructor({ reason: t }) {
897
- super("Unknown Forbidden Figma Error"), this.reason = t;
896
+ constructor() {
897
+ super("File Not Exportable");
898
898
  }
899
899
  }
900
- const Er = "Not Found";
901
- class Ai extends Error {
902
- constructor({ cause: t }) {
903
- super(Er), this.cause = t;
900
+ class Zn extends Error {
901
+ constructor({ reason: t }) {
902
+ super("Unknown Forbidden Figma Error"), this.reason = t;
904
903
  }
905
904
  }
906
- const Hs = (e) => e.message === Er, Ar = "Unknown Figma API Exception";
905
+ const Ar = "Not Found";
907
906
  class Oi extends Error {
908
907
  constructor({ cause: t }) {
909
908
  super(Ar), this.cause = t;
910
909
  }
911
910
  }
912
- const Ws = (e) => e.message === Ar, Or = "Rate Limit Exceeded";
913
- class Zn extends Error {
911
+ const Ws = (e) => e.message === Ar, Or = "Unknown Figma API Exception";
912
+ class Ci extends Error {
914
913
  constructor({ cause: t }) {
915
914
  super(Or), this.cause = t;
916
915
  }
917
916
  }
918
- const qs = (e) => e.message === Or, Cr = "Request Too Large";
919
- class Ci extends Error {
917
+ const qs = (e) => e.message === Or, Cr = "Rate Limit Exceeded";
918
+ class zn extends Error {
920
919
  constructor({ cause: t }) {
921
920
  super(Cr), this.cause = t;
922
921
  }
923
922
  }
924
- const Ks = (e) => e.message === Cr;
923
+ const Ks = (e) => e.message === Cr, Rr = "Request Too Large";
924
+ class Ri extends Error {
925
+ constructor({ cause: t }) {
926
+ super(Rr), this.cause = t;
927
+ }
928
+ }
929
+ const Gs = (e) => e.message === Rr;
925
930
  var E;
926
931
  (function(e) {
927
932
  e.assertEqual = (a) => {
@@ -959,10 +964,10 @@ var E;
959
964
  }
960
965
  e.joinValues = r, e.jsonStringifyReplacer = (a, i) => typeof i == "bigint" ? i.toString() : i;
961
966
  })(E || (E = {}));
962
- var zn;
967
+ var Dn;
963
968
  (function(e) {
964
969
  e.mergeShapes = (t, n) => d(d({}, t), n);
965
- })(zn || (zn = {}));
970
+ })(Dn || (Dn = {}));
966
971
  const _ = E.arrayToEnum([
967
972
  "string",
968
973
  "nan",
@@ -1143,11 +1148,11 @@ const Jt = (e, t) => {
1143
1148
  }
1144
1149
  return { message: n };
1145
1150
  };
1146
- let Ri = Jt;
1147
- function Ni() {
1148
- return Ri;
1151
+ let Ni = Jt;
1152
+ function Ii() {
1153
+ return Ni;
1149
1154
  }
1150
- const Ii = (e) => {
1155
+ const Zi = (e) => {
1151
1156
  const { data: t, path: n, errorMaps: r, issueData: a } = e, i = [...n, ...a.path || []], s = v(d({}, a), {
1152
1157
  path: i
1153
1158
  });
@@ -1166,7 +1171,7 @@ const Ii = (e) => {
1166
1171
  });
1167
1172
  };
1168
1173
  function f(e, t) {
1169
- const n = Ni(), r = Ii({
1174
+ const n = Ii(), r = Zi({
1170
1175
  issueData: t,
1171
1176
  data: e.data,
1172
1177
  path: e.path,
@@ -1228,7 +1233,7 @@ class M {
1228
1233
  }
1229
1234
  const m = Object.freeze({
1230
1235
  status: "aborted"
1231
- }), We = (e) => ({ status: "dirty", value: e }), G = (e) => ({ status: "valid", value: e }), Dn = (e) => e.status === "aborted", Ln = (e) => e.status === "dirty", Ie = (e) => e.status === "valid", St = (e) => typeof Promise != "undefined" && e instanceof Promise;
1236
+ }), We = (e) => ({ status: "dirty", value: e }), G = (e) => ({ status: "valid", value: e }), Ln = (e) => e.status === "aborted", Fn = (e) => e.status === "dirty", Ie = (e) => e.status === "valid", St = (e) => typeof Promise != "undefined" && e instanceof Promise;
1232
1237
  var p;
1233
1238
  (function(e) {
1234
1239
  e.errToObj = (t) => typeof t == "string" ? { message: t } : t || {}, e.toString = (t) => typeof t == "string" ? t : t == null ? void 0 : t.message;
@@ -1241,7 +1246,7 @@ class re {
1241
1246
  return this._cachedPath.length || (Array.isArray(this._key) ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
1242
1247
  }
1243
1248
  }
1244
- const Fn = (e, t) => {
1249
+ const $n = (e, t) => {
1245
1250
  if (Ie(t))
1246
1251
  return { success: !0, data: t.value };
1247
1252
  if (!e.common.issues.length)
@@ -1328,7 +1333,7 @@ class k {
1328
1333
  data: t,
1329
1334
  parsedType: ue(t)
1330
1335
  }, a = this._parseSync({ data: t, path: r.path, parent: r });
1331
- return Fn(r, a);
1336
+ return $n(r, a);
1332
1337
  }
1333
1338
  "~validate"(t) {
1334
1339
  var r, a;
@@ -1385,7 +1390,7 @@ class k {
1385
1390
  data: t,
1386
1391
  parsedType: ue(t)
1387
1392
  }, a = this._parse({ data: t, path: r.path, parent: r }), i = yield St(a) ? a : Promise.resolve(a);
1388
- return Fn(r, i);
1393
+ return $n(r, i);
1389
1394
  });
1390
1395
  }
1391
1396
  refine(t, n) {
@@ -1454,7 +1459,7 @@ class k {
1454
1459
  }));
1455
1460
  }
1456
1461
  brand() {
1457
- return new ts(d({
1462
+ return new ns(d({
1458
1463
  typeName: g.ZodBranded,
1459
1464
  type: this
1460
1465
  }, b(this._def)));
@@ -1486,28 +1491,28 @@ class k {
1486
1491
  return this.safeParse(null).success;
1487
1492
  }
1488
1493
  }
1489
- const Zi = /^c[^\s-]{8,}$/i, zi = /^[0-9a-z]+$/, Di = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Li = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, Fi = /^[a-z0-9_-]{21}$/i, $i = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, ji = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Mi = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Ui = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
1494
+ const zi = /^c[^\s-]{8,}$/i, Di = /^[0-9a-z]+$/, Li = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Fi = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, $i = /^[a-z0-9_-]{21}$/i, ji = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Mi = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Ui = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Pi = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
1490
1495
  let Ut;
1491
- const Pi = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Bi = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, Vi = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, Hi = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Wi = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, qi = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Rr = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", Ki = new RegExp(`^${Rr}$`);
1492
- function Nr(e) {
1496
+ const Bi = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Vi = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, Hi = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, Wi = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, qi = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Ki = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Nr = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", Gi = new RegExp(`^${Nr}$`);
1497
+ function Ir(e) {
1493
1498
  let t = "[0-5]\\d";
1494
1499
  e.precision ? t = `${t}\\.\\d{${e.precision}}` : e.precision == null && (t = `${t}(\\.\\d+)?`);
1495
1500
  const n = e.precision ? "+" : "?";
1496
1501
  return `([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`;
1497
1502
  }
1498
- function Gi(e) {
1499
- return new RegExp(`^${Nr(e)}$`);
1500
- }
1501
1503
  function Xi(e) {
1502
- let t = `${Rr}T${Nr(e)}`;
1504
+ return new RegExp(`^${Ir(e)}$`);
1505
+ }
1506
+ function Yi(e) {
1507
+ let t = `${Nr}T${Ir(e)}`;
1503
1508
  const n = [];
1504
1509
  return n.push(e.local ? "Z?" : "Z"), e.offset && n.push("([+-]\\d{2}:?\\d{2})"), t = `${t}(${n.join("|")})`, new RegExp(`^${t}$`);
1505
1510
  }
1506
- function Yi(e, t) {
1507
- return !!((t === "v4" || !t) && Pi.test(e) || (t === "v6" || !t) && Vi.test(e));
1508
- }
1509
1511
  function Ji(e, t) {
1510
- if (!$i.test(e))
1512
+ return !!((t === "v4" || !t) && Bi.test(e) || (t === "v6" || !t) && Hi.test(e));
1513
+ }
1514
+ function Qi(e, t) {
1515
+ if (!ji.test(e))
1511
1516
  return !1;
1512
1517
  try {
1513
1518
  const [n] = e.split(".");
@@ -1519,8 +1524,8 @@ function Ji(e, t) {
1519
1524
  return !1;
1520
1525
  }
1521
1526
  }
1522
- function Qi(e, t) {
1523
- return !!((t === "v4" || !t) && Bi.test(e) || (t === "v6" || !t) && Hi.test(e));
1527
+ function es(e, t) {
1528
+ return !!((t === "v4" || !t) && Vi.test(e) || (t === "v6" || !t) && Wi.test(e));
1524
1529
  }
1525
1530
  class oe extends k {
1526
1531
  _parse(t) {
@@ -1571,43 +1576,43 @@ class oe extends k {
1571
1576
  message: i.message
1572
1577
  }), r.dirty());
1573
1578
  } else if (i.kind === "email")
1574
- Mi.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1579
+ Ui.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1575
1580
  validation: "email",
1576
1581
  code: u.invalid_string,
1577
1582
  message: i.message
1578
1583
  }), r.dirty());
1579
1584
  else if (i.kind === "emoji")
1580
- Ut || (Ut = new RegExp(Ui, "u")), Ut.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1585
+ Ut || (Ut = new RegExp(Pi, "u")), Ut.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1581
1586
  validation: "emoji",
1582
1587
  code: u.invalid_string,
1583
1588
  message: i.message
1584
1589
  }), r.dirty());
1585
1590
  else if (i.kind === "uuid")
1586
- Li.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1591
+ Fi.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1587
1592
  validation: "uuid",
1588
1593
  code: u.invalid_string,
1589
1594
  message: i.message
1590
1595
  }), r.dirty());
1591
1596
  else if (i.kind === "nanoid")
1592
- Fi.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1597
+ $i.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1593
1598
  validation: "nanoid",
1594
1599
  code: u.invalid_string,
1595
1600
  message: i.message
1596
1601
  }), r.dirty());
1597
1602
  else if (i.kind === "cuid")
1598
- Zi.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1603
+ zi.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1599
1604
  validation: "cuid",
1600
1605
  code: u.invalid_string,
1601
1606
  message: i.message
1602
1607
  }), r.dirty());
1603
1608
  else if (i.kind === "cuid2")
1604
- zi.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1609
+ Di.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1605
1610
  validation: "cuid2",
1606
1611
  code: u.invalid_string,
1607
1612
  message: i.message
1608
1613
  }), r.dirty());
1609
1614
  else if (i.kind === "ulid")
1610
- Di.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1615
+ Li.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1611
1616
  validation: "ulid",
1612
1617
  code: u.invalid_string,
1613
1618
  message: i.message
@@ -1638,39 +1643,39 @@ class oe extends k {
1638
1643
  code: u.invalid_string,
1639
1644
  validation: { endsWith: i.value },
1640
1645
  message: i.message
1641
- }), r.dirty()) : i.kind === "datetime" ? Xi(i).test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1646
+ }), r.dirty()) : i.kind === "datetime" ? Yi(i).test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1642
1647
  code: u.invalid_string,
1643
1648
  validation: "datetime",
1644
1649
  message: i.message
1645
- }), r.dirty()) : i.kind === "date" ? Ki.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1650
+ }), r.dirty()) : i.kind === "date" ? Gi.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1646
1651
  code: u.invalid_string,
1647
1652
  validation: "date",
1648
1653
  message: i.message
1649
- }), r.dirty()) : i.kind === "time" ? Gi(i).test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1654
+ }), r.dirty()) : i.kind === "time" ? Xi(i).test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1650
1655
  code: u.invalid_string,
1651
1656
  validation: "time",
1652
1657
  message: i.message
1653
- }), r.dirty()) : i.kind === "duration" ? ji.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1658
+ }), r.dirty()) : i.kind === "duration" ? Mi.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1654
1659
  validation: "duration",
1655
1660
  code: u.invalid_string,
1656
1661
  message: i.message
1657
- }), r.dirty()) : i.kind === "ip" ? Yi(t.data, i.version) || (a = this._getOrReturnCtx(t, a), f(a, {
1662
+ }), r.dirty()) : i.kind === "ip" ? Ji(t.data, i.version) || (a = this._getOrReturnCtx(t, a), f(a, {
1658
1663
  validation: "ip",
1659
1664
  code: u.invalid_string,
1660
1665
  message: i.message
1661
- }), r.dirty()) : i.kind === "jwt" ? Ji(t.data, i.alg) || (a = this._getOrReturnCtx(t, a), f(a, {
1666
+ }), r.dirty()) : i.kind === "jwt" ? Qi(t.data, i.alg) || (a = this._getOrReturnCtx(t, a), f(a, {
1662
1667
  validation: "jwt",
1663
1668
  code: u.invalid_string,
1664
1669
  message: i.message
1665
- }), r.dirty()) : i.kind === "cidr" ? Qi(t.data, i.version) || (a = this._getOrReturnCtx(t, a), f(a, {
1670
+ }), r.dirty()) : i.kind === "cidr" ? es(t.data, i.version) || (a = this._getOrReturnCtx(t, a), f(a, {
1666
1671
  validation: "cidr",
1667
1672
  code: u.invalid_string,
1668
1673
  message: i.message
1669
- }), r.dirty()) : i.kind === "base64" ? Wi.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1674
+ }), r.dirty()) : i.kind === "base64" ? qi.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1670
1675
  validation: "base64",
1671
1676
  code: u.invalid_string,
1672
1677
  message: i.message
1673
- }), r.dirty()) : i.kind === "base64url" ? qi.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1678
+ }), r.dirty()) : i.kind === "base64url" ? Ki.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1674
1679
  validation: "base64url",
1675
1680
  code: u.invalid_string,
1676
1681
  message: i.message
@@ -1893,7 +1898,7 @@ oe.create = (e) => {
1893
1898
  coerce: (t = e == null ? void 0 : e.coerce) != null ? t : !1
1894
1899
  }, b(e)));
1895
1900
  };
1896
- function es(e, t) {
1901
+ function ts(e, t) {
1897
1902
  const n = (e.toString().split(".")[1] || "").length, r = (t.toString().split(".")[1] || "").length, a = n > r ? n : r, i = Number.parseInt(e.toFixed(a).replace(".", "")), s = Number.parseInt(t.toFixed(a).replace(".", ""));
1898
1903
  return i % s / wn(10, a);
1899
1904
  }
@@ -1932,7 +1937,7 @@ class Ze extends k {
1932
1937
  inclusive: i.inclusive,
1933
1938
  exact: !1,
1934
1939
  message: i.message
1935
- }), a.dirty()) : i.kind === "multipleOf" ? es(t.data, i.value) !== 0 && (r = this._getOrReturnCtx(t, r), f(r, {
1940
+ }), a.dirty()) : i.kind === "multipleOf" ? ts(t.data, i.value) !== 0 && (r = this._getOrReturnCtx(t, r), f(r, {
1936
1941
  code: u.not_multiple_of,
1937
1942
  multipleOf: i.value,
1938
1943
  message: i.message
@@ -2292,7 +2297,7 @@ Tt.create = (e) => new Tt(d({
2292
2297
  coerce: (e == null ? void 0 : e.coerce) || !1,
2293
2298
  typeName: g.ZodDate
2294
2299
  }, b(e)));
2295
- class $n extends k {
2300
+ class jn extends k {
2296
2301
  _parse(t) {
2297
2302
  if (this._getType(t) !== _.symbol) {
2298
2303
  const r = this._getOrReturnCtx(t);
@@ -2305,10 +2310,10 @@ class $n extends k {
2305
2310
  return G(t.data);
2306
2311
  }
2307
2312
  }
2308
- $n.create = (e) => new $n(d({
2313
+ jn.create = (e) => new jn(d({
2309
2314
  typeName: g.ZodSymbol
2310
2315
  }, b(e)));
2311
- class jn extends k {
2316
+ class Mn extends k {
2312
2317
  _parse(t) {
2313
2318
  if (this._getType(t) !== _.undefined) {
2314
2319
  const r = this._getOrReturnCtx(t);
@@ -2321,10 +2326,10 @@ class jn extends k {
2321
2326
  return G(t.data);
2322
2327
  }
2323
2328
  }
2324
- jn.create = (e) => new jn(d({
2329
+ Mn.create = (e) => new Mn(d({
2325
2330
  typeName: g.ZodUndefined
2326
2331
  }, b(e)));
2327
- class Mn extends k {
2332
+ class Un extends k {
2328
2333
  _parse(t) {
2329
2334
  if (this._getType(t) !== _.null) {
2330
2335
  const r = this._getOrReturnCtx(t);
@@ -2337,10 +2342,10 @@ class Mn extends k {
2337
2342
  return G(t.data);
2338
2343
  }
2339
2344
  }
2340
- Mn.create = (e) => new Mn(d({
2345
+ Un.create = (e) => new Un(d({
2341
2346
  typeName: g.ZodNull
2342
2347
  }, b(e)));
2343
- class Un extends k {
2348
+ class Pn extends k {
2344
2349
  constructor() {
2345
2350
  super(...arguments), this._any = !0;
2346
2351
  }
@@ -2348,7 +2353,7 @@ class Un extends k {
2348
2353
  return G(t.data);
2349
2354
  }
2350
2355
  }
2351
- Un.create = (e) => new Un(d({
2356
+ Pn.create = (e) => new Pn(d({
2352
2357
  typeName: g.ZodAny
2353
2358
  }, b(e)));
2354
2359
  class en extends k {
@@ -2375,7 +2380,7 @@ class ye extends k {
2375
2380
  ye.create = (e) => new ye(d({
2376
2381
  typeName: g.ZodNever
2377
2382
  }, b(e)));
2378
- class Pn extends k {
2383
+ class Bn extends k {
2379
2384
  _parse(t) {
2380
2385
  if (this._getType(t) !== _.undefined) {
2381
2386
  const r = this._getOrReturnCtx(t);
@@ -2388,7 +2393,7 @@ class Pn extends k {
2388
2393
  return G(t.data);
2389
2394
  }
2390
2395
  }
2391
- Pn.create = (e) => new Pn(d({
2396
+ Bn.create = (e) => new Bn(d({
2392
2397
  typeName: g.ZodVoid
2393
2398
  }, b(e)));
2394
2399
  class ne extends k {
@@ -2722,7 +2727,7 @@ class I extends k {
2722
2727
  }));
2723
2728
  }
2724
2729
  keyof() {
2725
- return Ir(E.objectKeys(this.shape));
2730
+ return Zr(E.objectKeys(this.shape));
2726
2731
  }
2727
2732
  }
2728
2733
  I.create = (e, t) => new I(d({
@@ -2840,10 +2845,10 @@ function tn(e, t) {
2840
2845
  class At extends k {
2841
2846
  _parse(t) {
2842
2847
  const { status: n, ctx: r } = this._processInputParams(t), a = (i, s) => {
2843
- if (Dn(i) || Dn(s))
2848
+ if (Ln(i) || Ln(s))
2844
2849
  return m;
2845
2850
  const o = tn(i.value, s.value);
2846
- return o.valid ? ((Ln(i) || Ln(s)) && n.dirty(), { status: n.value, value: o.data }) : (f(r, {
2851
+ return o.valid ? ((Fn(i) || Fn(s)) && n.dirty(), { status: n.value, value: o.data }) : (f(r, {
2847
2852
  code: u.invalid_intersection_types
2848
2853
  }), m);
2849
2854
  };
@@ -2961,7 +2966,7 @@ class Ot extends k {
2961
2966
  }, b(n)));
2962
2967
  }
2963
2968
  }
2964
- class Bn extends k {
2969
+ class Vn extends k {
2965
2970
  get keySchema() {
2966
2971
  return this._def.keyType;
2967
2972
  }
@@ -3003,7 +3008,7 @@ class Bn extends k {
3003
3008
  }
3004
3009
  }
3005
3010
  }
3006
- Bn.create = (e, t, n) => new Bn(d({
3011
+ Vn.create = (e, t, n) => new Vn(d({
3007
3012
  valueType: t,
3008
3013
  keyType: e,
3009
3014
  typeName: g.ZodMap
@@ -3069,7 +3074,7 @@ rt.create = (e, t) => new rt(d({
3069
3074
  maxSize: null,
3070
3075
  typeName: g.ZodSet
3071
3076
  }, b(t)));
3072
- class Vn extends k {
3077
+ class Hn extends k {
3073
3078
  get schema() {
3074
3079
  return this._def.getter();
3075
3080
  }
@@ -3078,7 +3083,7 @@ class Vn extends k {
3078
3083
  return this._def.getter()._parse({ data: n.data, path: n.path, parent: n });
3079
3084
  }
3080
3085
  }
3081
- Vn.create = (e, t) => new Vn(d({
3086
+ Hn.create = (e, t) => new Hn(d({
3082
3087
  getter: e,
3083
3088
  typeName: g.ZodLazy
3084
3089
  }, b(t)));
@@ -3102,7 +3107,7 @@ nn.create = (e, t) => new nn(d({
3102
3107
  value: e,
3103
3108
  typeName: g.ZodLiteral
3104
3109
  }, b(t)));
3105
- function Ir(e, t) {
3110
+ function Zr(e, t) {
3106
3111
  return new ze(d({
3107
3112
  values: e,
3108
3113
  typeName: g.ZodEnum
@@ -3156,8 +3161,8 @@ class ze extends k {
3156
3161
  return ze.create(this.options.filter((r) => !t.includes(r)), d(d({}, this._def), n));
3157
3162
  }
3158
3163
  }
3159
- ze.create = Ir;
3160
- class Hn extends k {
3164
+ ze.create = Zr;
3165
+ class Wn extends k {
3161
3166
  _parse(t) {
3162
3167
  const n = E.getValidEnumValues(this._def.values), r = this._getOrReturnCtx(t);
3163
3168
  if (r.parsedType !== _.string && r.parsedType !== _.number) {
@@ -3182,7 +3187,7 @@ class Hn extends k {
3182
3187
  return this._def.values;
3183
3188
  }
3184
3189
  }
3185
- Hn.create = (e, t) => new Hn(d({
3190
+ Wn.create = (e, t) => new Wn(d({
3186
3191
  values: e,
3187
3192
  typeName: g.ZodNativeEnum
3188
3193
  }, b(t)));
@@ -3380,7 +3385,7 @@ an.create = (e, t) => new an(d({
3380
3385
  typeName: g.ZodCatch,
3381
3386
  catchValue: typeof t.catch == "function" ? t.catch : () => t.catch
3382
3387
  }, b(t)));
3383
- class Wn extends k {
3388
+ class qn extends k {
3384
3389
  _parse(t) {
3385
3390
  if (this._getType(t) !== _.nan) {
3386
3391
  const r = this._getOrReturnCtx(t);
@@ -3393,10 +3398,10 @@ class Wn extends k {
3393
3398
  return { status: "valid", value: t.data };
3394
3399
  }
3395
3400
  }
3396
- Wn.create = (e) => new Wn(d({
3401
+ qn.create = (e) => new qn(d({
3397
3402
  typeName: g.ZodNaN
3398
3403
  }, b(e)));
3399
- class ts extends k {
3404
+ class ns extends k {
3400
3405
  _parse(t) {
3401
3406
  const { ctx: n } = this._processInputParams(t), r = n.data;
3402
3407
  return this._def.type._parse({
@@ -3466,32 +3471,32 @@ var g;
3466
3471
  (function(e) {
3467
3472
  e.ZodString = "ZodString", e.ZodNumber = "ZodNumber", e.ZodNaN = "ZodNaN", e.ZodBigInt = "ZodBigInt", e.ZodBoolean = "ZodBoolean", e.ZodDate = "ZodDate", e.ZodSymbol = "ZodSymbol", e.ZodUndefined = "ZodUndefined", e.ZodNull = "ZodNull", e.ZodAny = "ZodAny", e.ZodUnknown = "ZodUnknown", e.ZodNever = "ZodNever", e.ZodVoid = "ZodVoid", e.ZodArray = "ZodArray", e.ZodObject = "ZodObject", e.ZodUnion = "ZodUnion", e.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", e.ZodIntersection = "ZodIntersection", e.ZodTuple = "ZodTuple", e.ZodRecord = "ZodRecord", e.ZodMap = "ZodMap", e.ZodSet = "ZodSet", e.ZodFunction = "ZodFunction", e.ZodLazy = "ZodLazy", e.ZodLiteral = "ZodLiteral", e.ZodEnum = "ZodEnum", e.ZodEffects = "ZodEffects", e.ZodNativeEnum = "ZodNativeEnum", e.ZodOptional = "ZodOptional", e.ZodNullable = "ZodNullable", e.ZodDefault = "ZodDefault", e.ZodCatch = "ZodCatch", e.ZodPromise = "ZodPromise", e.ZodBranded = "ZodBranded", e.ZodPipeline = "ZodPipeline", e.ZodReadonly = "ZodReadonly";
3468
3473
  })(g || (g = {}));
3469
- const pt = oe.create, ns = Ze.create, X = Qt.create, rs = en.create;
3474
+ const pt = oe.create, rs = Ze.create, X = Qt.create, as = en.create;
3470
3475
  ye.create;
3471
- const qn = ne.create, gt = I.create, as = Et.create;
3476
+ const Kn = ne.create, gt = I.create, is = Et.create;
3472
3477
  At.create;
3473
3478
  Te.create;
3474
- const is = Ot.create, Kn = nn.create, mt = ze.create;
3479
+ const ss = Ot.create, Gn = nn.create, mt = ze.create;
3475
3480
  Ct.create;
3476
3481
  me.create;
3477
3482
  Le.create;
3478
- const ss = gt({
3483
+ const os = gt({
3479
3484
  language: mt(["typescript", "javascript"]).optional(),
3480
3485
  disableMarkedForExport: X().optional(),
3481
3486
  allowAutoSelectFirstNode: X().optional().default(!0),
3482
3487
  enableDisplayDataId: X().optional(),
3483
3488
  enableDisplayDataName: X().optional()
3484
3489
  }).and(
3485
- as([
3490
+ is([
3486
3491
  gt({
3487
- framework: Kn("react"),
3492
+ framework: Gn("react"),
3488
3493
  model: pt().optional(),
3489
3494
  styling: mt(["plain_css", "tailwind", "inline_styles"]),
3490
3495
  uiLibrary: mt(["mui", "antd", "radix", "shadcn", "clean_react"]).optional(),
3491
- responsivePages: qn(
3496
+ responsivePages: Kn(
3492
3497
  gt({
3493
3498
  name: pt(),
3494
- framesId: qn(pt())
3499
+ framesId: Kn(pt())
3495
3500
  })
3496
3501
  ).optional(),
3497
3502
  enableUILibraryTheming: X().optional(),
@@ -3500,41 +3505,41 @@ const ss = gt({
3500
3505
  enableGeneratePackageLock: X().optional(),
3501
3506
  enableAnimationsPreset: X().optional(),
3502
3507
  enableAutoSplit: X().optional(),
3503
- autoSplitThreshold: ns().optional(),
3508
+ autoSplitThreshold: rs().optional(),
3504
3509
  url: pt().url().optional(),
3505
- codegenSettings: is(rs()).optional()
3510
+ codegenSettings: ss(as()).optional()
3506
3511
  }),
3507
3512
  gt({
3508
- framework: Kn("html"),
3513
+ framework: Gn("html"),
3509
3514
  styling: mt(["plain_css", "inline_styles", "tailwind"]),
3510
3515
  enableTranslation: X().optional()
3511
3516
  })
3512
3517
  ])
3513
- ), os = (e) => {
3514
- const t = ss.safeParse(e);
3518
+ ), ls = (e) => {
3519
+ const t = os.safeParse(e);
3515
3520
  if (t.success === !1) {
3516
3521
  const n = new Error("Invalid codegen settings");
3517
3522
  throw n.cause = t.error, n;
3518
3523
  }
3519
3524
  return t.data;
3520
- }, Zr = (e, t) => {
3525
+ }, zr = (e, t) => {
3521
3526
  if (e.id === t)
3522
3527
  return e;
3523
3528
  if ("children" in e)
3524
3529
  for (const n of e.children) {
3525
- const r = Zr(n, t);
3530
+ const r = zr(n, t);
3526
3531
  if (r)
3527
3532
  return r;
3528
3533
  }
3529
3534
  return null;
3530
- }, Gn = /* @__PURE__ */ new Set([
3535
+ }, Xn = /* @__PURE__ */ new Set([
3531
3536
  "FRAME",
3532
3537
  "INSTANCE",
3533
3538
  "COMPONENT",
3534
3539
  "COMPONENT_SET",
3535
3540
  "GROUP"
3536
- ]), ls = (e, t, n = { allowAutoSelectFirstNode: !0 }) => {
3537
- const r = Zr(e.document, t);
3541
+ ]), cs = (e, t, n = { allowAutoSelectFirstNode: !0 }) => {
3542
+ const r = zr(e.document, t);
3538
3543
  if (!r)
3539
3544
  return {
3540
3545
  isValid: !1,
@@ -3542,7 +3547,7 @@ const ss = gt({
3542
3547
  };
3543
3548
  if (r.type === "CANVAS") {
3544
3549
  const a = r.children.filter(
3545
- (i) => Gn.has(i.type)
3550
+ (i) => Xn.has(i.type)
3546
3551
  );
3547
3552
  return a.length === 0 ? {
3548
3553
  isValid: !1,
@@ -3560,20 +3565,20 @@ const ss = gt({
3560
3565
  reason: "Selected node is a page with multiple children"
3561
3566
  };
3562
3567
  }
3563
- return Gn.has(r.type) ? { isValid: !0, node: r } : {
3568
+ return Xn.has(r.type) ? { isValid: !0, node: r } : {
3564
3569
  isValid: !1,
3565
3570
  reason: "Selected node type is not supported"
3566
3571
  };
3567
3572
  };
3568
- function cs(e) {
3573
+ function ds(e) {
3569
3574
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
3570
3575
  }
3571
- var vt = { exports: {} }, ds = vt.exports, Xn;
3572
- function us() {
3573
- return Xn || (Xn = 1, (function(e, t) {
3576
+ var vt = { exports: {} }, us = vt.exports, Yn;
3577
+ function fs() {
3578
+ return Yn || (Yn = 1, (function(e, t) {
3574
3579
  (function(n, r) {
3575
3580
  e.exports = r();
3576
- })(ds, (function() {
3581
+ })(us, (function() {
3577
3582
  var n = typeof Promise == "function", r = (function(R) {
3578
3583
  if (typeof globalThis == "object")
3579
3584
  return globalThis;
@@ -3626,8 +3631,8 @@ function us() {
3626
3631
  }));
3627
3632
  })(vt)), vt.exports;
3628
3633
  }
3629
- var fs = us();
3630
- const hs = /* @__PURE__ */ cs(fs), mn = typeof Buffer != "undefined", _s = mn && typeof Buffer.from != "undefined", ps = mn ? (
3634
+ var hs = fs();
3635
+ const _s = /* @__PURE__ */ ds(hs), mn = typeof Buffer != "undefined", ps = mn && typeof Buffer.from != "undefined", gs = mn ? (
3631
3636
  /**
3632
3637
  * is value is Buffer?
3633
3638
  *
@@ -3648,7 +3653,7 @@ const hs = /* @__PURE__ */ cs(fs), mn = typeof Buffer != "undefined", _s = mn &&
3648
3653
  function() {
3649
3654
  return !1;
3650
3655
  }
3651
- ), gs = _s ? (
3656
+ ), ms = ps ? (
3652
3657
  /**
3653
3658
  * copy Buffer
3654
3659
  *
@@ -3684,16 +3689,16 @@ const hs = /* @__PURE__ */ cs(fs), mn = typeof Buffer != "undefined", _s = mn &&
3684
3689
  }
3685
3690
  );
3686
3691
  function Fe(e) {
3687
- return ps(e) ? "Buffer" : hs(e);
3692
+ return gs(e) ? "Buffer" : _s(e);
3688
3693
  }
3689
- const ms = /* @__PURE__ */ new Set([
3694
+ const ys = /* @__PURE__ */ new Set([
3690
3695
  "Arguments",
3691
3696
  "Array",
3692
3697
  "Map",
3693
3698
  "Object",
3694
3699
  "Set"
3695
3700
  ]);
3696
- function ys(e, t, n = null) {
3701
+ function vs(e, t, n = null) {
3697
3702
  switch (n || Fe(e)) {
3698
3703
  case "Arguments":
3699
3704
  case "Array":
@@ -3706,9 +3711,9 @@ function ys(e, t, n = null) {
3706
3711
  }
3707
3712
  }
3708
3713
  function on(e) {
3709
- return ms.has(e);
3714
+ return ys.has(e);
3710
3715
  }
3711
- function Yn(e, t, n, r = null) {
3716
+ function Jn(e, t, n, r = null) {
3712
3717
  switch (r || Fe(e)) {
3713
3718
  case "Arguments":
3714
3719
  case "Array":
@@ -3724,29 +3729,29 @@ function Yn(e, t, n, r = null) {
3724
3729
  }
3725
3730
  return e;
3726
3731
  }
3727
- const vs = typeof globalThis != "undefined" && globalThis !== null && globalThis.Object === Object && globalThis, bs = typeof global != "undefined" && global !== null && global.Object === Object && global, ws = typeof self != "undefined" && self !== null && self.Object === Object && self, Pt = vs || bs || ws || Function("return this")();
3728
- function xs(e) {
3729
- return e.slice(0);
3730
- }
3732
+ const bs = typeof globalThis != "undefined" && globalThis !== null && globalThis.Object === Object && globalThis, ws = typeof global != "undefined" && global !== null && global.Object === Object && global, xs = typeof self != "undefined" && self !== null && self.Object === Object && self, Pt = bs || ws || xs || Function("return this")();
3731
3733
  function ks(e) {
3732
- return new Boolean(e.valueOf());
3734
+ return e.slice(0);
3733
3735
  }
3734
3736
  function Ss(e) {
3735
- return new DataView(e.buffer);
3737
+ return new Boolean(e.valueOf());
3736
3738
  }
3737
3739
  function Ts(e) {
3738
- return gs(e);
3740
+ return new DataView(e.buffer);
3739
3741
  }
3740
3742
  function Es(e) {
3741
- return new Date(e.getTime());
3743
+ return ms(e);
3742
3744
  }
3743
3745
  function As(e) {
3744
- return new Number(e);
3746
+ return new Date(e.getTime());
3745
3747
  }
3746
3748
  function Os(e) {
3747
- return new RegExp(e.source, e.flags);
3749
+ return new Number(e);
3748
3750
  }
3749
3751
  function Cs(e) {
3752
+ return new RegExp(e.source, e.flags);
3753
+ }
3754
+ function Rs(e) {
3750
3755
  return new String(e);
3751
3756
  }
3752
3757
  function ae(e, t) {
@@ -3755,28 +3760,28 @@ function ae(e, t) {
3755
3760
  function $(e) {
3756
3761
  return e;
3757
3762
  }
3758
- function Jn() {
3763
+ function Qn() {
3759
3764
  return [];
3760
3765
  }
3761
- function Rs() {
3766
+ function Ns() {
3762
3767
  return /* @__PURE__ */ new Map();
3763
3768
  }
3764
- function Ns() {
3769
+ function Is() {
3765
3770
  return {};
3766
3771
  }
3767
- function Is() {
3772
+ function Zs() {
3768
3773
  return /* @__PURE__ */ new Set();
3769
3774
  }
3770
- const Zs = /* @__PURE__ */ new Map([
3775
+ const zs = /* @__PURE__ */ new Map([
3771
3776
  // deep copy
3772
- ["ArrayBuffer", xs],
3773
- ["Boolean", ks],
3774
- ["Buffer", Ts],
3775
- ["DataView", Ss],
3776
- ["Date", Es],
3777
- ["Number", As],
3778
- ["RegExp", Os],
3779
- ["String", Cs],
3777
+ ["ArrayBuffer", ks],
3778
+ ["Boolean", Ss],
3779
+ ["Buffer", Es],
3780
+ ["DataView", Ts],
3781
+ ["Date", As],
3782
+ ["Number", Os],
3783
+ ["RegExp", Cs],
3784
+ ["String", Rs],
3780
3785
  // typed arrays
3781
3786
  // TODO: pass bound function
3782
3787
  ["Float32Array", ae],
@@ -3808,11 +3813,11 @@ const Zs = /* @__PURE__ */ new Map([
3808
3813
  ["undefined", $],
3809
3814
  // collections
3810
3815
  // NOTE: return empty value, because recursively copy later.
3811
- ["Arguments", Jn],
3812
- ["Array", Jn],
3813
- ["Map", Rs],
3814
- ["Object", Ns],
3815
- ["Set", Is]
3816
+ ["Arguments", Qn],
3817
+ ["Array", Qn],
3818
+ ["Map", Ns],
3819
+ ["Object", Is],
3820
+ ["Set", Zs]
3816
3821
  // NOTE: type-detect returns following types
3817
3822
  // 'Location'
3818
3823
  // 'Document'
@@ -3824,11 +3829,11 @@ const Zs = /* @__PURE__ */ new Map([
3824
3829
  // TODO: is type-detect never return 'object'?
3825
3830
  // 'object'
3826
3831
  ]);
3827
- function zs() {
3832
+ function Ds() {
3828
3833
  }
3829
- function ln(e, t = null, n = zs) {
3834
+ function ln(e, t = null, n = Ds) {
3830
3835
  arguments.length === 2 && typeof t == "function" && (n = t, t = null);
3831
- const r = t || Fe(e), a = Zs.get(r);
3836
+ const r = t || Fe(e), a = zs.get(r);
3832
3837
  if (r === "Object") {
3833
3838
  const i = n(e, r);
3834
3839
  if (i !== void 0)
@@ -3836,7 +3841,7 @@ function ln(e, t = null, n = zs) {
3836
3841
  }
3837
3842
  return a ? a(e, r) : e;
3838
3843
  }
3839
- function Qn(e, t = {}) {
3844
+ function er(e, t = {}) {
3840
3845
  typeof t == "function" && (t = {
3841
3846
  customizer: t
3842
3847
  });
@@ -3870,12 +3875,12 @@ function cn(e, t, n, r, a) {
3870
3875
  break;
3871
3876
  }
3872
3877
  for (let c of o) {
3873
- const l = ys(e, c, i);
3878
+ const l = vs(e, c, i);
3874
3879
  if (r.has(l))
3875
- Yn(t, c, n.get(l), i);
3880
+ Jn(t, c, n.get(l), i);
3876
3881
  else {
3877
3882
  const h = Fe(l), S = ln(l, h);
3878
- on(h) && (n.set(l, S), r.add(l)), Yn(
3883
+ on(h) && (n.set(l, S), r.add(l)), Jn(
3879
3884
  t,
3880
3885
  c,
3881
3886
  cn(
@@ -3891,7 +3896,7 @@ function cn(e, t, n, r, a) {
3891
3896
  return t;
3892
3897
  }
3893
3898
  var at, Ce, se, q, P, dn, bt, qe;
3894
- class Ds {
3899
+ class Ls {
3895
3900
  constructor({
3896
3901
  fetch: t = globalThis.fetch.bind(globalThis),
3897
3902
  baseAddress: n = "https://api.figma.com/",
@@ -3922,7 +3927,7 @@ class Ds {
3922
3927
  else if (r != null && r.startsWith("figu_"))
3923
3928
  n.Authorization = `Bearer ${r}`;
3924
3929
  else
3925
- throw new Ei();
3930
+ throw new Ai();
3926
3931
  return n;
3927
3932
  }
3928
3933
  getFile(a) {
@@ -3984,7 +3989,7 @@ class Ds {
3984
3989
  }
3985
3990
  at = new WeakMap(), Ce = new WeakMap(), se = new WeakMap(), q = new WeakMap(), P = new WeakSet(), dn = function(t) {
3986
3991
  if (!t.startsWith("figd_") && !t.startsWith("figu_"))
3987
- throw new Ti();
3992
+ throw new Ei();
3988
3993
  }, bt = function(t, n) {
3989
3994
  return O(this, null, function* () {
3990
3995
  var a;
@@ -3997,13 +4002,13 @@ at = new WeakMap(), Ce = new WeakMap(), se = new WeakMap(), q = new WeakMap(), P
3997
4002
  } catch (o) {
3998
4003
  }
3999
4004
  if (i === 403)
4000
- throw s != null && s.includes("Invalid token") ? new Rn() : s != null && s.includes("Token expired") ? new Nn() : new In({ reason: s });
4005
+ throw s != null && s.includes("Invalid token") ? new Rn() : s != null && s.includes("Token expired") ? new Nn() : s != null && s.includes("File not exportable") ? new In() : new Zn({ reason: s });
4001
4006
  if (i === 404)
4002
- throw new Ai({ cause: r });
4007
+ throw new Oi({ cause: r });
4003
4008
  if (i === 429) {
4004
4009
  const o = r.headers.get("Retry-After"), c = o ? Number(o) : null;
4005
4010
  if (!c)
4006
- throw new Zn({
4011
+ throw new zn({
4007
4012
  cause: r
4008
4013
  });
4009
4014
  if (yield (a = t.onRateLimited) == null ? void 0 : a.call(t, {
@@ -4028,8 +4033,8 @@ at = new WeakMap(), Ce = new WeakMap(), se = new WeakMap(), q = new WeakMap(), P
4028
4033
  clearTimeout(y), S(new Error("The operation was aborted."));
4029
4034
  });
4030
4035
  });
4031
- throw new Zn({ cause: r });
4032
- } else throw i === 500 && (s != null && s.includes("Request too large")) ? new Ci({ cause: r }) : new Oi({
4036
+ throw new zn({ cause: r });
4037
+ } else throw i === 500 && (s != null && s.includes("Request too large")) ? new Ri({ cause: r }) : new Ci({
4033
4038
  cause: r
4034
4039
  });
4035
4040
  }
@@ -4037,8 +4042,8 @@ at = new WeakMap(), Ce = new WeakMap(), se = new WeakMap(), q = new WeakMap(), P
4037
4042
  });
4038
4043
  }, qe = function(t) {
4039
4044
  return O(this, null, function* () {
4040
- const n = Qn(w(this, se));
4041
- W(this, se, Qn(w(this, q)));
4045
+ const n = er(w(this, se));
4046
+ W(this, se, er(w(this, q)));
4042
4047
  const r = () => O(this, null, function* () {
4043
4048
  return yield w(this, Ce).call(this, `${w(this, at)}${t}`, {
4044
4049
  method: "GET",
@@ -4049,7 +4054,7 @@ at = new WeakMap(), Ce = new WeakMap(), se = new WeakMap(), q = new WeakMap(), P
4049
4054
  try {
4050
4055
  return yield (yield F(this, P, bt).call(this, n, r)).json();
4051
4056
  } catch (a) {
4052
- if (n.onForbidden && (a instanceof Rn || a instanceof Nn || a instanceof In)) {
4057
+ if (n.onForbidden && (a instanceof Rn || a instanceof Nn || a instanceof In || a instanceof Zn)) {
4053
4058
  const i = yield n.onForbidden(a);
4054
4059
  if (i)
4055
4060
  return n.token = i.retry.newToken, yield (yield F(this, P, bt).call(this, n, r)).json();
@@ -4058,12 +4063,12 @@ at = new WeakMap(), Ce = new WeakMap(), se = new WeakMap(), q = new WeakMap(), P
4058
4063
  }
4059
4064
  });
4060
4065
  };
4061
- var C, it, st, le, zr, Ke;
4062
- class Gs {
4066
+ var C, it, st, le, Dr, Ke;
4067
+ class Xs {
4063
4068
  constructor({
4064
4069
  auth: t,
4065
4070
  apiBaseAddress: n = "https://public-api.animaapp.com",
4066
- figmaRestApi: r = new Ds()
4071
+ figmaRestApi: r = new Ls()
4067
4072
  } = {}) {
4068
4073
  Y(this, le);
4069
4074
  Y(this, C);
@@ -4095,8 +4100,8 @@ class Gs {
4095
4100
  if (h instanceof Error && h.name === "AbortError")
4096
4101
  throw h;
4097
4102
  }
4098
- const s = os(t.settings);
4099
- i && (yield F(this, le, zr).call(this, i, t.nodesId, {
4103
+ const s = ls(t.settings);
4104
+ i && (yield F(this, le, Dr).call(this, i, t.nodesId, {
4100
4105
  allowAutoSelectFirstNode: (l = s.allowAutoSelectFirstNode) != null ? l : !0
4101
4106
  }));
4102
4107
  let o = t.tracking;
@@ -4128,7 +4133,9 @@ class Gs {
4128
4133
  codegenSettings: s.codegenSettings,
4129
4134
  webhookUrl: t.webhookUrl,
4130
4135
  prompt: t.prompt,
4131
- images: t.images
4136
+ images: t.images,
4137
+ // @ts-expect-error: We don't need to expose this parameter to GetCodeParams
4138
+ createSession: t.createSession
4132
4139
  };
4133
4140
  return F(this, le, Ke).call(this, "/v1/codegen", c, n, "codegen", r);
4134
4141
  });
@@ -4138,7 +4145,13 @@ class Gs {
4138
4145
  let i = t.tracking;
4139
4146
  w(this, C) && "userId" in w(this, C) && w(this, C).userId && (i != null && i.externalId || (i = { externalId: w(this, C).userId }));
4140
4147
  let s;
4141
- if (t.mhtml)
4148
+ if (t.mhtmlUrl)
4149
+ s = {
4150
+ type: "hosted-mhtml",
4151
+ mhtmlUrl: t.mhtmlUrl,
4152
+ url: t.url
4153
+ };
4154
+ else if (t.mhtml)
4142
4155
  s = {
4143
4156
  type: "mhtml",
4144
4157
  mhtml: t.mhtml,
@@ -4150,7 +4163,7 @@ class Gs {
4150
4163
  url: t.url
4151
4164
  };
4152
4165
  else
4153
- throw new Error("Either 'url' or 'mhtml' must be provided");
4166
+ throw new Error("Either 'url', 'mhtml' or 'mhtmlUrl' must be provided");
4154
4167
  let o;
4155
4168
  t.experimental_useNewReactEngine && (o = "react-v2");
4156
4169
  const c = {
@@ -4245,10 +4258,10 @@ class Gs {
4245
4258
  });
4246
4259
  }
4247
4260
  }
4248
- C = new WeakMap(), it = new WeakMap(), st = new WeakMap(), le = new WeakSet(), zr = function(t, n, r) {
4261
+ C = new WeakMap(), it = new WeakMap(), st = new WeakMap(), le = new WeakSet(), Dr = function(t, n, r) {
4249
4262
  return O(this, null, function* () {
4250
4263
  const i = n.map(
4251
- (s) => ls(t, s, r)
4264
+ (s) => cs(t, s, r)
4252
4265
  ).find(
4253
4266
  (s) => !s.isValid
4254
4267
  );
@@ -4263,7 +4276,7 @@ C = new WeakMap(), it = new WeakMap(), st = new WeakMap(), le = new WeakSet(), z
4263
4276
  var y, N, Z, B, Ue, ct, Pe, dt, ut, ft, ht;
4264
4277
  if (this.hasAuth() === !1)
4265
4278
  throw new Error('It needs to set "auth" before calling this method.');
4266
- const s = {}, o = Si(JSON.stringify(n)), c = yield fetch(`${w(this, it)}${t}`, {
4279
+ const s = {}, o = Ti(JSON.stringify(n)), c = yield fetch(`${w(this, it)}${t}`, {
4267
4280
  method: "POST",
4268
4281
  headers: v(d({}, this.headers), {
4269
4282
  Accept: "text/event-stream",
@@ -4320,7 +4333,7 @@ C = new WeakMap(), it = new WeakMap(), st = new WeakMap(), le = new WeakSet(), z
4320
4333
  let T;
4321
4334
  try {
4322
4335
  T = JSON.parse(z.slice(6));
4323
- } catch (Bs) {
4336
+ } catch (Vs) {
4324
4337
  continue;
4325
4338
  }
4326
4339
  switch (T.type) {
@@ -4399,7 +4412,7 @@ C = new WeakMap(), it = new WeakMap(), st = new WeakMap(), le = new WeakSet(), z
4399
4412
  });
4400
4413
  });
4401
4414
  };
4402
- const Xs = (e) => {
4415
+ const Ys = (e) => {
4403
4416
  var t;
4404
4417
  if (!e)
4405
4418
  return [!1, "", ""];
@@ -4415,7 +4428,7 @@ const Xs = (e) => {
4415
4428
  } catch (n) {
4416
4429
  return [!1, "", ""];
4417
4430
  }
4418
- }, Ys = ({
4431
+ }, Js = ({
4419
4432
  fileKey: e,
4420
4433
  nodeId: t,
4421
4434
  duplicate: n
@@ -4423,12 +4436,12 @@ const Xs = (e) => {
4423
4436
  const r = new URL("https://www.figma.com");
4424
4437
  return r.pathname = `design/${e}`, n && (r.pathname = `${r.pathname}/dummy/duplicate`), t && r.searchParams.set("node-id", t.replace(":", "-")), r;
4425
4438
  };
4426
- class Js extends Error {
4439
+ class Qs extends Error {
4427
4440
  constructor(t, n) {
4428
4441
  super(t), this.response = n;
4429
4442
  }
4430
4443
  }
4431
- const Qs = ({
4444
+ const eo = ({
4432
4445
  files: e,
4433
4446
  screenPath: t = "src/screens"
4434
4447
  }) => {
@@ -4436,12 +4449,12 @@ const Qs = ({
4436
4449
  function a(i) {
4437
4450
  if (r.has(i) || !e[i])
4438
4451
  return;
4439
- r.add(i), n[i] = e[i], Ls(e[i].content).forEach((o) => {
4452
+ r.add(i), n[i] = e[i], Fs(e[i].content).forEach((o) => {
4440
4453
  try {
4441
- const c = Fs(i, o);
4454
+ const c = $s(i, o);
4442
4455
  if (c.startsWith("src/")) {
4443
4456
  const l = c.split("/").slice(0, -1).join("/");
4444
- $s(e, l).forEach((S) => {
4457
+ js(e, l).forEach((S) => {
4445
4458
  r.has(S) || a(S);
4446
4459
  });
4447
4460
  }
@@ -4457,7 +4470,7 @@ const Qs = ({
4457
4470
  i.startsWith(t) ? a(i) : i.startsWith("src/") || (n[i] = s);
4458
4471
  }), n;
4459
4472
  };
4460
- function Ls(e) {
4473
+ function Fs(e) {
4461
4474
  const t = /import.*?["']([^"']+)["']/g, n = /export.*from\s+["']([^"']+)["']/g, r = [];
4462
4475
  let a;
4463
4476
  for (; (a = t.exec(e)) !== null; )
@@ -4466,7 +4479,7 @@ function Ls(e) {
4466
4479
  r.push(a[1]);
4467
4480
  return [...new Set(r)];
4468
4481
  }
4469
- function Fs(e, t) {
4482
+ function $s(e, t) {
4470
4483
  if (!t.startsWith("."))
4471
4484
  return t;
4472
4485
  const n = e.split("/").slice(0, -1), r = t.split("/"), a = [...n];
@@ -4474,7 +4487,7 @@ function Fs(e, t) {
4474
4487
  i === ".." ? a.pop() : i !== "." && a.push(i);
4475
4488
  return a.join("/");
4476
4489
  }
4477
- function $s(e, t) {
4490
+ function js(e, t) {
4478
4491
  return Object.keys(e).filter((n) => n.startsWith(t));
4479
4492
  }
4480
4493
  function It(e, t, n) {
@@ -4505,7 +4518,7 @@ function It(e, t, n) {
4505
4518
  }
4506
4519
  });
4507
4520
  }
4508
- const js = (e, t) => It(e, t, e.generateCode);
4521
+ const Ms = (e, t) => It(e, t, e.generateCode);
4509
4522
  function Zt(e) {
4510
4523
  return O(this, null, function* () {
4511
4524
  var s, o, c, l;
@@ -4540,50 +4553,51 @@ data: ${JSON.stringify(
4540
4553
  });
4541
4554
  });
4542
4555
  }
4543
- const eo = (e, t) => O(null, null, function* () {
4544
- const n = js(e, t);
4545
- return Zt(n);
4546
- }), Ms = (e, t) => It(e, t, e.generateCodeFromWebsite), to = (e, t) => O(null, null, function* () {
4556
+ const to = (e, t) => O(null, null, function* () {
4547
4557
  const n = Ms(e, t);
4548
4558
  return Zt(n);
4549
- }), Us = (e, t) => It(e, t, e.generateCodeFromPrompt), no = (e, t) => O(null, null, function* () {
4559
+ }), Us = (e, t) => It(e, t, e.generateCodeFromWebsite), no = (e, t) => O(null, null, function* () {
4550
4560
  const n = Us(e, t);
4551
4561
  return Zt(n);
4552
- }), Ps = (e, t) => It(e, t, e.generateLink2Code), ro = (e, t) => O(null, null, function* () {
4562
+ }), Ps = (e, t) => It(e, t, e.generateCodeFromPrompt), ro = (e, t) => O(null, null, function* () {
4553
4563
  const n = Ps(e, t);
4554
4564
  return Zt(n);
4565
+ }), Bs = (e, t) => It(e, t, e.generateLink2Code), ao = (e, t) => O(null, null, function* () {
4566
+ const n = Bs(e, t);
4567
+ return Zt(n);
4555
4568
  });
4556
4569
  export {
4557
- Gs as Anima,
4570
+ Xs as Anima,
4558
4571
  be as CodegenError,
4559
4572
  Nn as ExpiredFigmaToken,
4560
- Ds as FigmaRestApi,
4561
- Ti as MalformattedFigmaToken,
4562
- Ei as MissingFigmaToken,
4573
+ Ls as FigmaRestApi,
4574
+ In as FileNotExportable,
4575
+ Ei as MalformattedFigmaToken,
4576
+ Ai as MissingFigmaToken,
4563
4577
  Rn as NeedsReauthFigmaToken,
4564
- Ai as NotFound,
4565
- Zn as RateLimitExceeded,
4566
- Ci as RequestTooLarge,
4567
- Js as ResponseError,
4568
- Oi as UnknownFigmaApiException,
4569
- In as UnknownForbiddenFigmaError,
4570
- no as createCodeFromPromptResponseEventStream,
4571
- Us as createCodeFromPromptStream,
4572
- to as createCodeFromWebsiteResponseEventStream,
4573
- Ms as createCodeFromWebsiteStream,
4574
- eo as createCodegenResponseEventStream,
4575
- js as createCodegenStream,
4576
- ro as createLink2CodeResponseEventStream,
4577
- Ps as createLink2CodeStream,
4578
- Zr as findChildrenNode,
4579
- Ys as formatToFigmaLink,
4580
- Qs as getRelatedScreenFiles,
4581
- ls as isNodeCodegenCompatible,
4582
- Hs as isNotFound,
4583
- qs as isRateLimitExceeded,
4584
- Ks as isRequestTooLarge,
4585
- Ws as isUnknownFigmaApiException,
4586
- Xs as isValidFigmaUrl,
4587
- os as validateSettings
4578
+ Oi as NotFound,
4579
+ zn as RateLimitExceeded,
4580
+ Ri as RequestTooLarge,
4581
+ Qs as ResponseError,
4582
+ Ci as UnknownFigmaApiException,
4583
+ Zn as UnknownForbiddenFigmaError,
4584
+ ro as createCodeFromPromptResponseEventStream,
4585
+ Ps as createCodeFromPromptStream,
4586
+ no as createCodeFromWebsiteResponseEventStream,
4587
+ Us as createCodeFromWebsiteStream,
4588
+ to as createCodegenResponseEventStream,
4589
+ Ms as createCodegenStream,
4590
+ ao as createLink2CodeResponseEventStream,
4591
+ Bs as createLink2CodeStream,
4592
+ zr as findChildrenNode,
4593
+ Js as formatToFigmaLink,
4594
+ eo as getRelatedScreenFiles,
4595
+ cs as isNodeCodegenCompatible,
4596
+ Ws as isNotFound,
4597
+ Ks as isRateLimitExceeded,
4598
+ Gs as isRequestTooLarge,
4599
+ qs as isUnknownFigmaApiException,
4600
+ Ys as isValidFigmaUrl,
4601
+ ls as validateSettings
4588
4602
  };
4589
4603
  //# sourceMappingURL=index.js.map