@animaapp/anima-sdk 0.11.0 → 0.13.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,19 +1,19 @@
1
- var Lr = Object.defineProperty, Fr = Object.defineProperties;
2
- var $r = Object.getOwnPropertyDescriptors;
3
- var yn = Object.getOwnPropertySymbols;
4
- var jr = Object.prototype.hasOwnProperty, Mr = Object.prototype.propertyIsEnumerable;
5
- var bn = (e) => {
1
+ var $r = Object.defineProperty, Mr = Object.defineProperties;
2
+ var Ur = Object.getOwnPropertyDescriptors;
3
+ var wn = Object.getOwnPropertySymbols;
4
+ var Pr = Object.prototype.hasOwnProperty, Br = Object.prototype.propertyIsEnumerable;
5
+ var kn = (e) => {
6
6
  throw TypeError(e);
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) => {
7
+ }, Sn = Math.pow, xn = (e, t, n) => t in e ? $r(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
- jr.call(t, n) && vn(e, n, t[n]);
10
- if (yn)
11
- for (var n of yn(t))
12
- Mr.call(t, n) && vn(e, n, t[n]);
9
+ Pr.call(t, n) && xn(e, n, t[n]);
10
+ if (wn)
11
+ for (var n of wn(t))
12
+ Br.call(t, n) && xn(e, n, t[n]);
13
13
  return e;
14
- }, v = (e, t) => Fr(e, $r(t));
15
- var zt = (e, t, n) => t.has(e) || bn("Cannot " + n);
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);
14
+ }, v = (e, t) => Mr(e, Ur(t));
15
+ var Ft = (e, t, n) => t.has(e) || kn("Cannot " + n);
16
+ var w = (e, t, n) => (Ft(e, t, "read from private field"), n ? n.call(e) : t.get(e)), X = (e, t, n) => t.has(e) ? kn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), H = (e, t, n, r) => (Ft(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), L = (e, t, n) => (Ft(e, t, "access private method"), n);
17
17
  var O = (e, t, n) => new Promise((r, a) => {
18
18
  var i = (c) => {
19
19
  try {
@@ -31,145 +31,145 @@ var O = (e, t, n) => new Promise((r, a) => {
31
31
  o((n = n.apply(e, t)).next());
32
32
  });
33
33
  /*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */
34
- function $e(e) {
34
+ function Me(e) {
35
35
  let t = e.length;
36
36
  for (; --t >= 0; )
37
37
  e[t] = 0;
38
38
  }
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 = (
39
+ const Vr = 0, ar = 1, Hr = 2, Wr = 3, qr = 258, _n = 29, lt = 256, Ye = lt + 1 + _n, Re = 30, pn = 19, ir = 2 * Ye + 1, we = 15, jt = 16, Gr = 7, gn = 256, sr = 16, or = 17, lr = 18, Wt = (
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
- ), yt = (
42
+ ), xt = (
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
- ), Wr = (
45
+ ), Kr = (
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
- ), 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
- $e(ie);
50
- const Ge = new Array(Oe * 2);
51
- $e(Ge);
52
- const Je = new Array(qr);
53
- $e(Je);
54
- const Qe = new Array(Vr - Br + 1);
55
- $e(Qe);
56
- const _n = new Array(un);
57
- $e(_n);
58
- const wt = new Array(Oe);
59
- $e(wt);
60
- function Lt(e, t, n, r, a) {
48
+ ), cr = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), Jr = 512, se = new Array((Ye + 2) * 2);
49
+ Me(se);
50
+ const Je = new Array(Re * 2);
51
+ Me(Je);
52
+ const Qe = new Array(Jr);
53
+ Me(Qe);
54
+ const et = new Array(qr - Wr + 1);
55
+ Me(et);
56
+ const mn = new Array(_n);
57
+ Me(mn);
58
+ const Tt = new Array(Re);
59
+ Me(Tt);
60
+ function $t(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 or, lr, cr;
64
- function Ft(e, t) {
63
+ let dr, ur, fr;
64
+ function Mt(e, t) {
65
65
  this.dyn_tree = e, this.max_code = 0, this.stat_desc = t;
66
66
  }
67
- const dr = (e) => e < 256 ? Je[e] : Je[256 + (e >>> 7)], et = (e, t) => {
67
+ const hr = (e) => e < 256 ? Qe[e] : Qe[256 + (e >>> 7)], tt = (e, t) => {
68
68
  e.pending_buf[e.pending++] = t & 255, e.pending_buf[e.pending++] = t >>> 8 & 255;
69
- }, U = (e, t, n) => {
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);
69
+ }, M = (e, t, n) => {
70
+ e.bi_valid > jt - n ? (e.bi_buf |= t << e.bi_valid & 65535, tt(e, e.bi_buf), e.bi_buf = t >> jt - e.bi_valid, e.bi_valid += n - jt) : (e.bi_buf |= t << e.bi_valid & 65535, e.bi_valid += n);
71
71
  }, Q = (e, t, n) => {
72
- U(
72
+ M(
73
73
  e,
74
74
  n[t * 2],
75
75
  n[t * 2 + 1]
76
76
  /*.Len*/
77
77
  );
78
- }, ur = (e, t) => {
78
+ }, _r = (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
- }, Kr = (e) => {
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
- }, Gr = (e, t) => {
84
+ }, Xr = (e) => {
85
+ e.bi_valid === 16 ? (tt(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
+ }, Yr = (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
- let l, h, S, y, N, Z, B = 0;
88
+ let l, h, T, y, N, I, P = 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 < nr; l++)
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
- if (B !== 0) {
91
+ for (n[e.heap[e.heap_max] * 2 + 1] = 0, l = e.heap_max + 1; l < ir; l++)
92
+ h = e.heap[l], y = n[n[h * 2 + 1] * 2 + 1] + 1, y > c && (y = c, P++), n[h * 2 + 1] = y, !(h > r) && (e.bl_count[y]++, N = 0, h >= o && (N = s[h - o]), I = n[h * 2], e.opt_len += I * (y + N), i && (e.static_len += I * (a[h * 2 + 1] + N)));
93
+ if (P !== 0) {
94
94
  do {
95
95
  for (y = c - 1; e.bl_count[y] === 0; )
96
96
  y--;
97
- e.bl_count[y]--, e.bl_count[y + 1] += 2, e.bl_count[c]--, B -= 2;
98
- } while (B > 0);
97
+ e.bl_count[y]--, e.bl_count[y + 1] += 2, e.bl_count[c]--, P -= 2;
98
+ } while (P > 0);
99
99
  for (y = c; y !== 0; y--)
100
100
  for (h = e.bl_count[y]; h !== 0; )
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--);
101
+ T = e.heap[--l], !(T > r) && (n[T * 2 + 1] !== y && (e.opt_len += (y - n[T * 2 + 1]) * n[T * 2], n[T * 2 + 1] = y), h--);
102
102
  }
103
- }, fr = (e, t, n) => {
103
+ }, pr = (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] = ur(r[o]++, o));
110
+ o !== 0 && (e[s * 2] = _r(r[o]++, o));
111
111
  }
112
- }, Xr = () => {
112
+ }, Qr = () => {
113
113
  let e, t, n, r, a;
114
114
  const i = new Array(we + 1);
115
- for (n = 0, r = 0; r < un - 1; r++)
116
- for (_n[r] = n, e = 0; e < 1 << Bt[r]; e++)
117
- Qe[n++] = r;
118
- for (Qe[n - 1] = r, a = 0, r = 0; r < 16; r++)
119
- for (wt[r] = a, e = 0; e < 1 << yt[r]; e++)
120
- Je[a++] = r;
121
- for (a >>= 7; r < Oe; r++)
122
- for (wt[r] = a << 7, e = 0; e < 1 << yt[r] - 7; e++)
123
- Je[256 + a++] = r;
115
+ for (n = 0, r = 0; r < _n - 1; r++)
116
+ for (mn[r] = n, e = 0; e < 1 << Wt[r]; e++)
117
+ et[n++] = r;
118
+ for (et[n - 1] = r, a = 0, r = 0; r < 16; r++)
119
+ for (Tt[r] = a, e = 0; e < 1 << xt[r]; e++)
120
+ Qe[a++] = r;
121
+ for (a >>= 7; r < Re; r++)
122
+ for (Tt[r] = a << 7, e = 0; e < 1 << xt[r] - 7; e++)
123
+ Qe[256 + a++] = r;
124
124
  for (t = 0; t <= we; t++)
125
125
  i[t] = 0;
126
126
  for (e = 0; e <= 143; )
127
- ie[e * 2 + 1] = 8, e++, i[8]++;
127
+ se[e * 2 + 1] = 8, e++, i[8]++;
128
128
  for (; e <= 255; )
129
- ie[e * 2 + 1] = 9, e++, i[9]++;
129
+ se[e * 2 + 1] = 9, e++, i[9]++;
130
130
  for (; e <= 279; )
131
- ie[e * 2 + 1] = 7, e++, i[7]++;
131
+ se[e * 2 + 1] = 7, e++, i[7]++;
132
132
  for (; e <= 287; )
133
- ie[e * 2 + 1] = 8, e++, i[8]++;
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) => {
133
+ se[e * 2 + 1] = 8, e++, i[8]++;
134
+ for (pr(se, Ye + 1, i), e = 0; e < Re; e++)
135
+ Je[e * 2 + 1] = 5, Je[e * 2] = _r(e, 5);
136
+ dr = new $t(se, Wt, lt + 1, Ye, we), ur = new $t(Je, xt, 0, Re, we), fr = new $t(new Array(0), Kr, 0, pn, Gr);
137
+ }, gr = (e) => {
138
138
  let t;
139
139
  for (t = 0; t < Ye; t++)
140
140
  e.dyn_ltree[t * 2] = 0;
141
- for (t = 0; t < Oe; t++)
141
+ for (t = 0; t < Re; t++)
142
142
  e.dyn_dtree[t * 2] = 0;
143
- for (t = 0; t < fn; t++)
143
+ for (t = 0; t < pn; t++)
144
144
  e.bl_tree[t * 2] = 0;
145
- e.dyn_ltree[hn * 2] = 1, e.opt_len = e.static_len = 0, e.sym_next = e.matches = 0;
146
- }, _r = (e) => {
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
- }, xn = (e, t, n, r) => {
145
+ e.dyn_ltree[gn * 2] = 1, e.opt_len = e.static_len = 0, e.sym_next = e.matches = 0;
146
+ }, mr = (e) => {
147
+ e.bi_valid > 8 ? tt(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
+ }, Tn = (e, t, n, r) => {
149
149
  const a = t * 2, i = n * 2;
150
150
  return e[a] < e[i] || e[a] === e[i] && r[t] <= r[n];
151
- }, $t = (e, t, n) => {
151
+ }, Ut = (e, t, n) => {
152
152
  const r = e.heap[n];
153
153
  let a = n << 1;
154
- for (; a <= e.heap_len && (a < e.heap_len && xn(t, e.heap[a + 1], e.heap[a], e.depth) && a++, !xn(t, r, e.heap[a], e.depth)); )
154
+ for (; a <= e.heap_len && (a < e.heap_len && Tn(t, e.heap[a + 1], e.heap[a], e.depth) && a++, !Tn(t, r, e.heap[a], e.depth)); )
155
155
  e.heap[n] = e.heap[a], n = a, a <<= 1;
156
156
  e.heap[n] = r;
157
- }, kn = (e, t, n) => {
157
+ }, En = (e, t, n) => {
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 = dr(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 = et[a], Q(e, s + lt + 1, t), o = Wt[s], o !== 0 && (a -= mn[s], M(e, a, o)), r--, s = hr(r), Q(e, s, n), o = xt[s], o !== 0 && (r -= Tt[s], M(e, r, o)));
162
162
  while (i < e.sym_next);
163
- Q(e, hn, t);
164
- }, Vt = (e, t) => {
163
+ Q(e, gn, t);
164
+ }, qt = (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 = nr, s = 0; s < i; s++)
167
+ for (e.heap_len = 0, e.heap_max = ir, 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]);
171
171
  for (t.max_code = c, s = e.heap_len >> 1; s >= 1; s--)
172
- $t(e, n, s);
172
+ Ut(e, n, s);
173
173
  l = i;
174
174
  do
175
175
  s = e.heap[
@@ -178,7 +178,7 @@ const dr = (e) => e < 256 ? Je[e] : Je[256 + (e >>> 7)], et = (e, t) => {
178
178
  ], e.heap[
179
179
  1
180
180
  /*SMALLEST*/
181
- ] = e.heap[e.heap_len--], $t(
181
+ ] = e.heap[e.heap_len--], Ut(
182
182
  e,
183
183
  n,
184
184
  1
@@ -189,7 +189,7 @@ const dr = (e) => e < 256 ? Je[e] : Je[256 + (e >>> 7)], et = (e, t) => {
189
189
  ], e.heap[--e.heap_max] = s, e.heap[--e.heap_max] = o, n[l * 2] = n[s * 2] + n[o * 2], e.depth[l] = (e.depth[s] >= e.depth[o] ? e.depth[s] : e.depth[o]) + 1, n[s * 2 + 1] = n[o * 2 + 1] = l, e.heap[
190
190
  1
191
191
  /*SMALLEST*/
192
- ] = l++, $t(
192
+ ] = l++, Ut(
193
193
  e,
194
194
  n,
195
195
  1
@@ -199,12 +199,12 @@ const dr = (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
- ], Gr(e, t), fr(n, c, e.bl_count);
203
- }, Sn = (e, t, n) => {
202
+ ], Yr(e, t), pr(n, c, e.bl_count);
203
+ }, An = (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[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
- }, Tn = (e, t, n) => {
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[sr * 2]++) : o <= 10 ? e.bl_tree[or * 2]++ : e.bl_tree[lr * 2]++, o = 0, a = i, s === 0 ? (c = 138, l = 3) : i === s ? (c = 6, l = 3) : (c = 7, l = 4));
207
+ }, On = (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++)
210
210
  if (i = s, s = t[(r + 1) * 2 + 1], !(++o < c && i === s)) {
@@ -212,50 +212,50 @@ const dr = (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, 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));
215
+ else i !== 0 ? (i !== a && (Q(e, i, e.bl_tree), o--), Q(e, sr, e.bl_tree), M(e, o - 3, 2)) : o <= 10 ? (Q(e, or, e.bl_tree), M(e, o - 3, 3)) : (Q(e, lr, e.bl_tree), M(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
- }, Yr = (e) => {
218
+ }, ea = (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[sr[t] * 2 + 1] === 0; t--)
220
+ for (An(e, e.dyn_ltree, e.l_desc.max_code), An(e, e.dyn_dtree, e.d_desc.max_code), qt(e, e.bl_desc), t = pn - 1; t >= 3 && e.bl_tree[cr[t] * 2 + 1] === 0; t--)
221
221
  ;
222
222
  return e.opt_len += 3 * (t + 1) + 5 + 5 + 4, t;
223
- }, Jr = (e, t, n, r) => {
223
+ }, ta = (e, t, n, r) => {
224
224
  let a;
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[sr[a] * 2 + 1], 3);
227
- Tn(e, e.dyn_ltree, t - 1), Tn(e, e.dyn_dtree, n - 1);
228
- }, Qr = (e) => {
225
+ for (M(e, t - 257, 5), M(e, n - 1, 5), M(e, r - 4, 4), a = 0; a < r; a++)
226
+ M(e, e.bl_tree[cr[a] * 2 + 1], 3);
227
+ On(e, e.dyn_ltree, t - 1), On(e, e.dyn_dtree, n - 1);
228
+ }, na = (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)
232
232
  return 0;
233
233
  if (e.dyn_ltree[18] !== 0 || e.dyn_ltree[20] !== 0 || e.dyn_ltree[26] !== 0)
234
234
  return 1;
235
- for (n = 32; n < ot; n++)
235
+ for (n = 32; n < lt; n++)
236
236
  if (e.dyn_ltree[n * 2] !== 0)
237
237
  return 1;
238
238
  return 0;
239
239
  };
240
- let En = !1;
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) => {
240
+ let Cn = !1;
241
+ const ra = (e) => {
242
+ Cn || (Qr(), Cn = !0), e.l_desc = new Mt(e.dyn_ltree, dr), e.d_desc = new Mt(e.dyn_dtree, ur), e.bl_desc = new Mt(e.bl_tree, fr), e.bi_buf = 0, e.bi_valid = 0, gr(e);
243
+ }, yr = (e, t, n, r) => {
244
+ M(e, (Vr << 1) + (r ? 1 : 0), 3), mr(e), tt(e, n), tt(e, ~n), n && e.pending_buf.set(e.window.subarray(t, t + n), e.pending), e.pending += n;
245
+ }, aa = (e) => {
246
+ M(e, ar << 1, 3), Q(e, gn, se), Xr(e);
247
+ }, ia = (e, t, n, r) => {
248
248
  let a, i, s = 0;
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
249
+ e.level > 0 ? (e.strm.data_type === 2 && (e.strm.data_type = na(e)), qt(e, e.l_desc), qt(e, e.d_desc), s = ea(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 ? yr(e, t, n, r) : e.strategy === 4 || i === a ? (M(e, (ar << 1) + (r ? 1 : 0), 3), En(e, se, Je)) : (M(e, (Hr << 1) + (r ? 1 : 0), 3), ta(e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, s + 1), En(e, e.dyn_ltree, e.dyn_dtree)), gr(e), r && mr(e);
250
+ }, sa = (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[(et[n] + lt + 1) * 2]++, e.dyn_dtree[hr(t) * 2]++), e.sym_next === e.sym_end);
251
+ var oa = ra, la = yr, ca = ia, da = sa, ua = aa, fa = {
252
+ _tr_init: oa,
253
+ _tr_stored_block: la,
254
+ _tr_flush_block: ca,
255
+ _tr_tally: da,
256
+ _tr_align: ua
257
257
  };
258
- const da = (e, t, n, r) => {
258
+ const ha = (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 da = (e, t, n, r) => {
266
266
  }
267
267
  return a | i << 16 | 0;
268
268
  };
269
- var gr = da;
270
- const ua = () => {
269
+ var vr = ha;
270
+ const _a = () => {
271
271
  let e, t = [];
272
272
  for (var n = 0; n < 256; n++) {
273
273
  e = n;
@@ -276,14 +276,14 @@ const ua = () => {
276
276
  t[n] = e;
277
277
  }
278
278
  return t;
279
- }, fa = new Uint32Array(ua()), ha = (e, t, n, r) => {
280
- const a = fa, i = r + n;
279
+ }, pa = new Uint32Array(_a()), ga = (e, t, n, r) => {
280
+ const a = pa, 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 = ha, xt = {
286
+ var de = ga, Et = {
287
287
  2: "need dictionary",
288
288
  /* Z_NEED_DICT 2 */
289
289
  1: "stream end",
@@ -302,7 +302,7 @@ var de = ha, xt = {
302
302
  /* Z_BUF_ERROR (-5) */
303
303
  "-6": "incompatible version"
304
304
  /* Z_VERSION_ERROR (-6) */
305
- }, mr = {
305
+ }, br = {
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 = ha, 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: _a, _tr_stored_block: Ht, _tr_flush_block: pa, _tr_tally: _e, _tr_align: ga } = ca, {
333
+ const { _tr_init: ma, _tr_stored_block: Gt, _tr_flush_block: ya, _tr_tally: _e, _tr_align: va } = fa, {
334
334
  Z_NO_FLUSH: pe,
335
- Z_PARTIAL_FLUSH: ma,
336
- Z_FULL_FLUSH: ya,
337
- Z_FINISH: K,
338
- Z_BLOCK: An,
335
+ Z_PARTIAL_FLUSH: ba,
336
+ Z_FULL_FLUSH: wa,
337
+ Z_FINISH: q,
338
+ Z_BLOCK: Rn,
339
339
  Z_OK: D,
340
- Z_STREAM_END: On,
341
- Z_STREAM_ERROR: ee,
342
- Z_DATA_ERROR: va,
343
- Z_BUF_ERROR: jt,
344
- Z_DEFAULT_COMPRESSION: ba,
345
- Z_FILTERED: wa,
346
- Z_HUFFMAN_ONLY: _t,
347
- Z_RLE: xa,
348
- Z_FIXED: ka,
349
- Z_DEFAULT_STRATEGY: Sa,
350
- Z_UNKNOWN: Ta,
351
- Z_DEFLATED: Rt
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) => {
340
+ Z_STREAM_END: Nn,
341
+ Z_STREAM_ERROR: te,
342
+ Z_DATA_ERROR: xa,
343
+ Z_BUF_ERROR: Pt,
344
+ Z_DEFAULT_COMPRESSION: ka,
345
+ Z_FILTERED: Sa,
346
+ Z_HUFFMAN_ONLY: yt,
347
+ Z_RLE: Ta,
348
+ Z_FIXED: Ea,
349
+ Z_DEFAULT_STRATEGY: Aa,
350
+ Z_UNKNOWN: Oa,
351
+ Z_DEFLATED: zt
352
+ } = br, Ca = 9, Ra = 15, Na = 8, Ia = 29, Za = 256, Kt = Za + 1 + Ia, za = 30, Da = 19, La = 2 * Kt + 1, Fa = 15, x = 3, he = 258, ne = he + x + 1, ja = 32, Ie = 42, yn = 57, Jt = 69, Xt = 73, Yt = 91, Qt = 103, xe = 113, We = 666, j = 1, Ue = 2, Se = 3, Pe = 4, $a = 3, ke = (e, t) => (e.msg = Et[t], t), In = (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
- }, Fa = (e) => {
356
+ }, Ma = (e) => {
357
357
  let t, n, r, a = e.w_size;
358
358
  t = e.hash_size, r = t;
359
359
  do
@@ -364,27 +364,27 @@ const { _tr_init: _a, _tr_stored_block: Ht, _tr_flush_block: pa, _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 $a = (e, t, n) => (t << e.hash_shift ^ n) & e.hash_mask, ge = $a;
368
- const V = (e) => {
367
+ let Ua = (e, t, n) => (t << e.hash_shift ^ n) & e.hash_mask, ge = Ua;
368
+ const B = (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
- }, H = (e, t) => {
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);
372
+ }, V = (e, t) => {
373
+ ya(e, e.block_start >= 0 ? e.block_start : -1, e.strstart - e.block_start, t), e.block_start = e.strstart, B(e.strm);
374
374
  }, A = (e, t) => {
375
375
  e.pending_buf[e.pending++] = t;
376
- }, Be = (e, t) => {
376
+ }, He = (e, t) => {
377
377
  e.pending_buf[e.pending++] = t >>> 8 & 255, e.pending_buf[e.pending++] = t & 255;
378
- }, Yt = (e, t, n, r) => {
378
+ }, en = (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 = 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) => {
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 = vr(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
+ }, wr = (e, t) => {
382
382
  let n = e.max_chain_length, r = e.strstart, a, i, s = e.prev_length, o = e.nice_match;
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
- let N = l[r + s - 1], Z = l[r + s];
383
+ const c = e.strstart > e.w_size - ne ? e.strstart - (e.w_size - ne) : 0, l = e.window, h = e.w_mask, T = e.prev, y = e.strstart + he;
384
+ let N = l[r + s - 1], I = l[r + s];
385
385
  e.prev_length >= e.good_match && (n >>= 2), o > e.lookahead && (o = e.lookahead);
386
386
  do
387
- if (a = t, !(l[a + s] !== Z || l[a + s - 1] !== N || l[a] !== l[r] || l[++a] !== l[r + 1])) {
387
+ if (a = t, !(l[a + s] !== I || l[a + s - 1] !== N || l[a] !== l[r] || l[++a] !== l[r + 1])) {
388
388
  r += 2, a++;
389
389
  do
390
390
  ;
@@ -392,39 +392,39 @@ const V = (e) => {
392
392
  if (i = he - (y - r), r = y - he, i > s) {
393
393
  if (e.match_start = t, s = i, i >= o)
394
394
  break;
395
- N = l[r + s - 1], Z = l[r + s];
395
+ N = l[r + s - 1], I = l[r + s];
396
396
  }
397
397
  }
398
- while ((t = S[t & h]) > c && --n !== 0);
398
+ while ((t = T[t & h]) > c && --n !== 0);
399
399
  return s <= e.lookahead ? s : e.lookahead;
400
- }, Ne = (e) => {
400
+ }, Ze = (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), Fa(e), r += t), e.strm.avail_in === 0)
404
+ if (r = e.window_size - e.lookahead - e.strstart, e.strstart >= t + (t - ne) && (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), Ma(e), r += t), e.strm.avail_in === 0)
405
405
  break;
406
- if (n = Yt(e.strm, e.window, e.strstart + e.lookahead, r), e.lookahead += n, e.lookahead + e.insert >= x)
406
+ if (n = en(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
- } while (e.lookahead < te && e.strm.avail_in !== 0);
410
- }, vr = (e, t) => {
409
+ } while (e.lookahead < ne && e.strm.avail_in !== 0);
410
+ }, xr = (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
- 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)))
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 !== q || t === pe || r !== a + e.strm.avail_in)))
414
414
  break;
415
- s = t === K && r === a + e.strm.avail_in ? 1 : 0, Ht(e, 0, 0, s), e.pending_buf[e.pending - 4] = r, e.pending_buf[e.pending - 3] = r >> 8, e.pending_buf[e.pending - 2] = ~r, e.pending_buf[e.pending - 1] = ~r >> 8, V(e.strm), a && (a > r && (a = r), e.strm.output.set(e.window.subarray(e.block_start, e.block_start + a), e.strm.next_out), e.strm.next_out += a, e.strm.avail_out -= a, e.strm.total_out += a, e.block_start += a, r -= a), r && (Yt(e.strm, e.strm.output, e.strm.next_out, r), e.strm.next_out += r, e.strm.avail_out -= r, e.strm.total_out += r);
415
+ s = t === q && r === a + e.strm.avail_in ? 1 : 0, Gt(e, 0, 0, s), e.pending_buf[e.pending - 4] = r, e.pending_buf[e.pending - 3] = r >> 8, e.pending_buf[e.pending - 2] = ~r, e.pending_buf[e.pending - 1] = ~r >> 8, B(e.strm), a && (a > r && (a = r), e.strm.output.set(e.window.subarray(e.block_start, e.block_start + a), e.strm.next_out), e.strm.next_out += a, e.strm.avail_out -= a, e.strm.total_out += a, e.block_start += a, r -= a), r && (en(e.strm, e.strm.output, e.strm.next_out, r), e.strm.next_out += r, e.strm.avail_out -= r, e.strm.total_out += r);
416
416
  } while (s === 0);
417
- return o -= e.strm.avail_in, o && (o >= e.w_size ? (e.matches = 2, e.window.set(e.strm.input.subarray(e.strm.next_in - e.w_size, e.strm.next_in), 0), e.strstart = e.w_size, e.insert = e.strstart) : (e.window_size - e.strstart <= o && (e.strstart -= e.w_size, e.window.set(e.window.subarray(e.w_size, e.w_size + e.strstart), 0), e.matches < 2 && e.matches++, e.insert > e.strstart && (e.insert = e.strstart)), e.window.set(e.strm.input.subarray(e.strm.next_in - o, e.strm.next_in), e.strstart), e.strstart += o, e.insert += o > e.w_size - e.insert ? e.w_size - e.insert : o), e.block_start = e.strstart), e.high_water < e.strstart && (e.high_water = e.strstart), s ? Me : t !== pe && t !== K && e.strm.avail_in === 0 && e.strstart === e.block_start ? je : (i = e.window_size - e.strstart, e.strm.avail_in > i && e.block_start >= e.w_size && (e.block_start -= e.w_size, e.strstart -= e.w_size, e.window.set(e.window.subarray(e.w_size, e.w_size + e.strstart), 0), e.matches < 2 && e.matches++, i += e.w_size, e.insert > e.strstart && (e.insert = e.strstart)), i > e.strm.avail_in && (i = e.strm.avail_in), i && (Yt(e.strm, e.window, e.strstart, i), e.strstart += i, e.insert += i > e.w_size - e.insert ? e.w_size - e.insert : i), e.high_water < e.strstart && (e.high_water = e.strstart), i = e.bi_valid + 42 >> 3, i = e.pending_buf_size - i > 65535 ? 65535 : e.pending_buf_size - i, n = i > e.w_size ? e.w_size : i, a = e.strstart - e.block_start, (a >= n || (a || t === K) && t !== pe && e.strm.avail_in === 0 && a <= i) && (r = a > i ? i : a, s = t === K && e.strm.avail_in === 0 && r === a ? 1 : 0, Ht(e, e.block_start, r, s), e.block_start += r, V(e.strm)), s ? Se : j);
418
- }, Mt = (e, t) => {
417
+ return o -= e.strm.avail_in, o && (o >= e.w_size ? (e.matches = 2, e.window.set(e.strm.input.subarray(e.strm.next_in - e.w_size, e.strm.next_in), 0), e.strstart = e.w_size, e.insert = e.strstart) : (e.window_size - e.strstart <= o && (e.strstart -= e.w_size, e.window.set(e.window.subarray(e.w_size, e.w_size + e.strstart), 0), e.matches < 2 && e.matches++, e.insert > e.strstart && (e.insert = e.strstart)), e.window.set(e.strm.input.subarray(e.strm.next_in - o, e.strm.next_in), e.strstart), e.strstart += o, e.insert += o > e.w_size - e.insert ? e.w_size - e.insert : o), e.block_start = e.strstart), e.high_water < e.strstart && (e.high_water = e.strstart), s ? Pe : t !== pe && t !== q && e.strm.avail_in === 0 && e.strstart === e.block_start ? Ue : (i = e.window_size - e.strstart, e.strm.avail_in > i && e.block_start >= e.w_size && (e.block_start -= e.w_size, e.strstart -= e.w_size, e.window.set(e.window.subarray(e.w_size, e.w_size + e.strstart), 0), e.matches < 2 && e.matches++, i += e.w_size, e.insert > e.strstart && (e.insert = e.strstart)), i > e.strm.avail_in && (i = e.strm.avail_in), i && (en(e.strm, e.window, e.strstart, i), e.strstart += i, e.insert += i > e.w_size - e.insert ? e.w_size - e.insert : i), e.high_water < e.strstart && (e.high_water = e.strstart), i = e.bi_valid + 42 >> 3, i = e.pending_buf_size - i > 65535 ? 65535 : e.pending_buf_size - i, n = i > e.w_size ? e.w_size : i, a = e.strstart - e.block_start, (a >= n || (a || t === q) && t !== pe && e.strm.avail_in === 0 && a <= i) && (r = a > i ? i : a, s = t === q && e.strm.avail_in === 0 && r === a ? 1 : 0, Gt(e, e.block_start, r, s), e.block_start += r, B(e.strm)), s ? Se : j);
418
+ }, Bt = (e, t) => {
419
419
  let n, r;
420
420
  for (; ; ) {
421
- if (e.lookahead < te) {
422
- if (Ne(e), e.lookahead < te && t === pe)
421
+ if (e.lookahead < ne) {
422
+ if (Ze(e), e.lookahead < ne && t === pe)
423
423
  return j;
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 = yr(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 - ne && (e.match_length = wr(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
@@ -435,39 +435,39 @@ const V = (e) => {
435
435
  e.strstart += e.match_length, e.match_length = 0, e.ins_h = e.window[e.strstart], e.ins_h = ge(e, e.ins_h, e.window[e.strstart + 1]);
436
436
  else
437
437
  r = _e(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++;
438
- if (r && (H(e, !1), e.strm.avail_out === 0))
438
+ if (r && (V(e, !1), e.strm.avail_out === 0))
439
439
  return j;
440
440
  }
441
- return 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;
442
- }, Ee = (e, t) => {
441
+ return e.insert = e.strstart < x - 1 ? e.strstart : x - 1, t === q ? (V(e, !0), e.strm.avail_out === 0 ? Se : Pe) : e.sym_next && (V(e, !1), e.strm.avail_out === 0) ? j : Ue;
442
+ }, Ae = (e, t) => {
443
443
  let n, r, a;
444
444
  for (; ; ) {
445
- if (e.lookahead < te) {
446
- if (Ne(e), e.lookahead < te && t === pe)
445
+ if (e.lookahead < ne) {
446
+ if (Ze(e), e.lookahead < ne && t === pe)
447
447
  return j;
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 = 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) {
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 - ne && (e.match_length = wr(e, n), e.match_length <= 5 && (e.strategy === Sa || 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);
455
455
  while (--e.prev_length !== 0);
456
- if (e.match_available = 0, e.match_length = x - 1, e.strstart++, r && (H(e, !1), e.strm.avail_out === 0))
456
+ if (e.match_available = 0, e.match_length = x - 1, e.strstart++, r && (V(e, !1), e.strm.avail_out === 0))
457
457
  return j;
458
458
  } else if (e.match_available) {
459
- if (r = _e(e, 0, e.window[e.strstart - 1]), r && H(e, !1), e.strstart++, e.lookahead--, e.strm.avail_out === 0)
459
+ if (r = _e(e, 0, e.window[e.strstart - 1]), r && V(e, !1), e.strstart++, e.lookahead--, e.strm.avail_out === 0)
460
460
  return j;
461
461
  } else
462
462
  e.match_available = 1, e.strstart++, e.lookahead--;
463
463
  }
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
- }, ja = (e, t) => {
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 === q ? (V(e, !0), e.strm.avail_out === 0 ? Se : Pe) : e.sym_next && (V(e, !1), e.strm.avail_out === 0) ? j : Ue;
465
+ }, Pa = (e, t) => {
466
466
  let n, r, a, i;
467
467
  const s = e.window;
468
468
  for (; ; ) {
469
469
  if (e.lookahead <= he) {
470
- if (Ne(e), e.lookahead <= he && t === pe)
470
+ if (Ze(e), e.lookahead <= he && t === pe)
471
471
  return j;
472
472
  if (e.lookahead === 0)
473
473
  break;
@@ -479,131 +479,131 @@ const V = (e) => {
479
479
  while (r === s[++a] && r === s[++a] && r === s[++a] && r === s[++a] && r === s[++a] && r === s[++a] && r === s[++a] && r === s[++a] && a < i);
480
480
  e.match_length = he - (i - a), e.match_length > e.lookahead && (e.match_length = e.lookahead);
481
481
  }
482
- if (e.match_length >= x ? (n = _e(e, 1, e.match_length - x), e.lookahead -= e.match_length, e.strstart += e.match_length, e.match_length = 0) : (n = _e(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++), n && (H(e, !1), e.strm.avail_out === 0))
482
+ if (e.match_length >= x ? (n = _e(e, 1, e.match_length - x), e.lookahead -= e.match_length, e.strstart += e.match_length, e.match_length = 0) : (n = _e(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++), n && (V(e, !1), e.strm.avail_out === 0))
483
483
  return j;
484
484
  }
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
- }, Ma = (e, t) => {
485
+ return e.insert = 0, t === q ? (V(e, !0), e.strm.avail_out === 0 ? Se : Pe) : e.sym_next && (V(e, !1), e.strm.avail_out === 0) ? j : Ue;
486
+ }, Ba = (e, t) => {
487
487
  let n;
488
488
  for (; ; ) {
489
- if (e.lookahead === 0 && (Ne(e), e.lookahead === 0)) {
489
+ if (e.lookahead === 0 && (Ze(e), e.lookahead === 0)) {
490
490
  if (t === pe)
491
491
  return j;
492
492
  break;
493
493
  }
494
- if (e.match_length = 0, n = _e(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++, n && (H(e, !1), e.strm.avail_out === 0))
494
+ if (e.match_length = 0, n = _e(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++, n && (V(e, !1), e.strm.avail_out === 0))
495
495
  return j;
496
496
  }
497
- 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;
497
+ return e.insert = 0, t === q ? (V(e, !0), e.strm.avail_out === 0 ? Se : Pe) : e.sym_next && (V(e, !1), e.strm.avail_out === 0) ? j : Ue;
498
498
  };
499
- function J(e, t, n, r, a) {
499
+ function Y(e, t, n, r, a) {
500
500
  this.good_length = e, this.max_lazy = t, this.nice_length = n, this.max_chain = r, this.func = a;
501
501
  }
502
- const He = [
502
+ const qe = [
503
503
  /* good lazy nice chain */
504
- new J(0, 0, 0, 0, vr),
504
+ new Y(0, 0, 0, 0, xr),
505
505
  /* 0 store only */
506
- new J(4, 4, 8, 4, Mt),
506
+ new Y(4, 4, 8, 4, Bt),
507
507
  /* 1 max speed, no lazy matches */
508
- new J(4, 5, 16, 8, Mt),
508
+ new Y(4, 5, 16, 8, Bt),
509
509
  /* 2 */
510
- new J(4, 6, 32, 32, Mt),
510
+ new Y(4, 6, 32, 32, Bt),
511
511
  /* 3 */
512
- new J(4, 4, 16, 16, Ee),
512
+ new Y(4, 4, 16, 16, Ae),
513
513
  /* 4 lazy matches */
514
- new J(8, 16, 32, 32, Ee),
514
+ new Y(8, 16, 32, 32, Ae),
515
515
  /* 5 */
516
- new J(8, 16, 128, 128, Ee),
516
+ new Y(8, 16, 128, 128, Ae),
517
517
  /* 6 */
518
- new J(8, 32, 128, 256, Ee),
518
+ new Y(8, 32, 128, 256, Ae),
519
519
  /* 7 */
520
- new J(32, 128, 258, 1024, Ee),
520
+ new Y(32, 128, 258, 1024, Ae),
521
521
  /* 8 */
522
- new J(32, 258, 258, 4096, Ee)
522
+ new Y(32, 258, 258, 4096, Ae)
523
523
  /* 9 max compression */
524
- ], Ua = (e) => {
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;
524
+ ], Va = (e) => {
525
+ e.window_size = 2 * e.w_size, fe(e.head), e.max_lazy_match = qe[e.level].max_lazy, e.good_match = qe[e.level].good_length, e.nice_match = qe[e.level].nice_length, e.max_chain_length = qe[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 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;
527
+ function Ha() {
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 = zt, 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(La * 2), this.dyn_dtree = new Uint16Array((2 * za + 1) * 2), this.bl_tree = new Uint16Array((2 * Da + 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(Fa + 1), this.heap = new Uint16Array(2 * Kt + 1), fe(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new Uint16Array(2 * Kt + 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
- const lt = (e) => {
530
+ const ct = (e) => {
531
531
  if (!e)
532
532
  return 1;
533
533
  const t = e.state;
534
- return !t || t.strm !== e || t.status !== Re && //#ifdef GZIP
535
- t.status !== pn && //#endif
536
- t.status !== qt && t.status !== Kt && t.status !== Gt && t.status !== Xt && t.status !== xe && t.status !== Ve ? 1 : 0;
537
- }, br = (e) => {
538
- if (lt(e))
539
- return ke(e, ee);
540
- e.total_in = e.total_out = 0, e.data_type = Ta;
534
+ return !t || t.strm !== e || t.status !== Ie && //#ifdef GZIP
535
+ t.status !== yn && //#endif
536
+ t.status !== Jt && t.status !== Xt && t.status !== Yt && t.status !== Qt && t.status !== xe && t.status !== We ? 1 : 0;
537
+ }, kr = (e) => {
538
+ if (ct(e))
539
+ return ke(e, te);
540
+ e.total_in = e.total_out = 0, e.data_type = Oa;
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
- t.wrap === 2 ? pn : (
543
+ t.wrap === 2 ? yn : (
544
544
  //#endif
545
- t.wrap ? Re : xe
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) => {
545
+ t.wrap ? Ie : xe
546
+ ), e.adler = t.wrap === 2 ? 0 : 1, t.last_flush = -2, ma(t), D;
547
+ }, Sr = (e) => {
548
+ const t = kr(e);
549
+ return t === D && Va(e.state), t;
550
+ }, Wa = (e, t) => ct(e) || e.state.wrap !== 2 ? te : (e.state.gzhead = t, D), Tr = (e, t, n, r, a, i) => {
551
551
  if (!e)
552
- return ee;
552
+ return te;
553
553
  let 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
- return ke(e, ee);
554
+ if (t === ka && (t = 6), r < 0 ? (s = 0, r = -r) : r > 15 && (s = 2, r -= 16), a < 1 || a > Ca || n !== zt || r < 8 || r > 15 || t < 0 || t > 9 || i < 0 || i > Ea || r === 8 && s !== 1)
555
+ return ke(e, te);
556
556
  r === 8 && (r = 9);
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
- if (lt(e) || t > An || t < 0)
561
- return e ? ke(e, ee) : ee;
557
+ const o = new Ha();
558
+ return e.state = o, o.strm = e, o.status = Ie, 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, Sr(e);
559
+ }, qa = (e, t) => Tr(e, t, zt, Ra, Na, Aa), Ga = (e, t) => {
560
+ if (ct(e) || t > Rn || t < 0)
561
+ return e ? ke(e, te) : te;
562
562
  const n = e.state;
563
- if (!e.output || e.avail_in !== 0 && !e.input || n.status === Ve && t !== K)
564
- return ke(e, e.avail_out === 0 ? jt : ee);
563
+ if (!e.output || e.avail_in !== 0 && !e.input || n.status === We && t !== q)
564
+ return ke(e, e.avail_out === 0 ? Pt : te);
565
565
  const r = n.last_flush;
566
566
  if (n.last_flush = t, n.pending !== 0) {
567
- if (V(e), e.avail_out === 0)
567
+ if (B(e), e.avail_out === 0)
568
568
  return n.last_flush = -1, D;
569
- } else if (e.avail_in === 0 && Cn(t) <= Cn(r) && t !== K)
570
- return ke(e, jt);
571
- if (n.status === Ve && e.avail_in !== 0)
572
- return ke(e, jt);
573
- if (n.status === Re && n.wrap === 0 && (n.status = xe), n.status === Re) {
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 |= 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)
569
+ } else if (e.avail_in === 0 && In(t) <= In(r) && t !== q)
570
+ return ke(e, Pt);
571
+ if (n.status === We && e.avail_in !== 0)
572
+ return ke(e, Pt);
573
+ if (n.status === Ie && n.wrap === 0 && (n.status = xe), n.status === Ie) {
574
+ let a = zt + (n.w_bits - 8 << 4) << 8, i = -1;
575
+ if (n.strategy >= yt || n.level < 2 ? i = 0 : n.level < 6 ? i = 1 : n.level === 6 ? i = 2 : i = 3, a |= i << 6, n.strstart !== 0 && (a |= ja), a += 31 - a % 31, He(n, a), n.strstart !== 0 && (He(n, e.adler >>> 16), He(n, e.adler & 65535)), e.adler = 1, n.status = xe, B(e), n.pending !== 0)
576
576
  return n.last_flush = -1, D;
577
577
  }
578
- if (n.status === pn) {
578
+ if (n.status === yn) {
579
579
  if (e.adler = 0, A(n, 31), A(n, 139), A(n, 8), n.gzhead)
580
580
  A(
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
- ), 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, La), n.status = xe, V(e), n.pending !== 0)
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 >= yt || 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 = Jt;
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 >= yt || n.level < 2 ? 4 : 0), A(n, $a), n.status = xe, B(e), n.pending !== 0)
585
585
  return n.last_flush = -1, D;
586
586
  }
587
- if (n.status === qt) {
587
+ if (n.status === Jt) {
588
588
  if (n.gzhead.extra) {
589
589
  let a = n.pending, i = (n.gzhead.extra.length & 65535) - n.gzindex;
590
590
  for (; n.pending + i > n.pending_buf_size; ) {
591
591
  let o = n.pending_buf_size - n.pending;
592
- if (n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex, n.gzindex + o), n.pending), n.pending = n.pending_buf_size, n.gzhead.hcrc && n.pending > a && (e.adler = de(e.adler, n.pending_buf, n.pending - a, a)), n.gzindex += o, V(e), n.pending !== 0)
592
+ if (n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex, n.gzindex + o), n.pending), n.pending = n.pending_buf_size, n.gzhead.hcrc && n.pending > a && (e.adler = de(e.adler, n.pending_buf, n.pending - a, a)), n.gzindex += o, B(e), n.pending !== 0)
593
593
  return n.last_flush = -1, D;
594
594
  a = 0, i -= o;
595
595
  }
596
596
  let s = new Uint8Array(n.gzhead.extra);
597
597
  n.pending_buf.set(s.subarray(n.gzindex, n.gzindex + i), n.pending), n.pending += i, n.gzhead.hcrc && n.pending > a && (e.adler = de(e.adler, n.pending_buf, n.pending - a, a)), n.gzindex = 0;
598
598
  }
599
- n.status = Kt;
599
+ n.status = Xt;
600
600
  }
601
- if (n.status === Kt) {
601
+ if (n.status === Xt) {
602
602
  if (n.gzhead.name) {
603
603
  let a = n.pending, i;
604
604
  do {
605
605
  if (n.pending === n.pending_buf_size) {
606
- if (n.gzhead.hcrc && n.pending > a && (e.adler = de(e.adler, n.pending_buf, n.pending - a, a)), V(e), n.pending !== 0)
606
+ if (n.gzhead.hcrc && n.pending > a && (e.adler = de(e.adler, n.pending_buf, n.pending - a, a)), B(e), n.pending !== 0)
607
607
  return n.last_flush = -1, D;
608
608
  a = 0;
609
609
  }
@@ -611,14 +611,14 @@ const lt = (e) => {
611
611
  } while (i !== 0);
612
612
  n.gzhead.hcrc && n.pending > a && (e.adler = de(e.adler, n.pending_buf, n.pending - a, a)), n.gzindex = 0;
613
613
  }
614
- n.status = Gt;
614
+ n.status = Yt;
615
615
  }
616
- if (n.status === Gt) {
616
+ if (n.status === Yt) {
617
617
  if (n.gzhead.comment) {
618
618
  let a = n.pending, i;
619
619
  do {
620
620
  if (n.pending === n.pending_buf_size) {
621
- if (n.gzhead.hcrc && n.pending > a && (e.adler = de(e.adler, n.pending_buf, n.pending - a, a)), V(e), n.pending !== 0)
621
+ if (n.gzhead.hcrc && n.pending > a && (e.adler = de(e.adler, n.pending_buf, n.pending - a, a)), B(e), n.pending !== 0)
622
622
  return n.last_flush = -1, D;
623
623
  a = 0;
624
624
  }
@@ -626,65 +626,65 @@ const lt = (e) => {
626
626
  } while (i !== 0);
627
627
  n.gzhead.hcrc && n.pending > a && (e.adler = de(e.adler, n.pending_buf, n.pending - a, a));
628
628
  }
629
- n.status = Xt;
629
+ n.status = Qt;
630
630
  }
631
- if (n.status === Xt) {
631
+ if (n.status === Qt) {
632
632
  if (n.gzhead.hcrc) {
633
- if (n.pending + 2 > n.pending_buf_size && (V(e), n.pending !== 0))
633
+ if (n.pending + 2 > n.pending_buf_size && (B(e), n.pending !== 0))
634
634
  return n.last_flush = -1, D;
635
635
  A(n, e.adler & 255), A(n, e.adler >> 8 & 255), e.adler = 0;
636
636
  }
637
- if (n.status = xe, V(e), n.pending !== 0)
637
+ if (n.status = xe, B(e), n.pending !== 0)
638
638
  return n.last_flush = -1, D;
639
639
  }
640
- if (e.avail_in !== 0 || n.lookahead !== 0 || t !== pe && n.status !== Ve) {
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
- if ((a === Se || a === Me) && (n.status = Ve), a === j || a === Se)
640
+ if (e.avail_in !== 0 || n.lookahead !== 0 || t !== pe && n.status !== We) {
641
+ let a = n.level === 0 ? xr(n, t) : n.strategy === yt ? Ba(n, t) : n.strategy === Ta ? Pa(n, t) : qe[n.level].func(n, t);
642
+ if ((a === Se || a === Pe) && (n.status = We), a === j || a === Se)
643
643
  return e.avail_out === 0 && (n.last_flush = -1), D;
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))
644
+ if (a === Ue && (t === ba ? va(n) : t !== Rn && (Gt(n, 0, 0, !1), t === wa && (fe(n.head), n.lookahead === 0 && (n.strstart = 0, n.block_start = 0, n.insert = 0))), B(e), e.avail_out === 0))
645
645
  return n.last_flush = -1, D;
646
646
  }
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
- }, Wa = (e) => {
649
- if (lt(e))
650
- return ee;
647
+ return t !== q ? D : n.wrap <= 0 ? Nn : (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)) : (He(n, e.adler >>> 16), He(n, e.adler & 65535)), B(e), n.wrap > 0 && (n.wrap = -n.wrap), n.pending !== 0 ? D : Nn);
648
+ }, Ka = (e) => {
649
+ if (ct(e))
650
+ return te;
651
651
  const t = e.state.status;
652
- return e.state = null, t === xe ? ke(e, va) : D;
653
- }, qa = (e, t) => {
652
+ return e.state = null, t === xe ? ke(e, xa) : D;
653
+ }, Ja = (e, t) => {
654
654
  let n = t.length;
655
- if (lt(e))
656
- return ee;
655
+ if (ct(e))
656
+ return te;
657
657
  const r = e.state, a = r.wrap;
658
- if (a === 2 || a === 1 && r.status !== Re || r.lookahead)
659
- return ee;
660
- if (a === 1 && (e.adler = gr(e.adler, t, n, 0)), r.wrap = 0, n >= r.w_size) {
658
+ if (a === 2 || a === 1 && r.status !== Ie || r.lookahead)
659
+ return te;
660
+ if (a === 1 && (e.adler = vr(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;
664
664
  }
665
665
  const i = e.avail_in, s = e.next_in, o = e.input;
666
- for (e.avail_in = n, e.next_in = 0, e.input = t, Ne(r); r.lookahead >= x; ) {
666
+ for (e.avail_in = n, e.next_in = 0, e.input = t, Ze(r); r.lookahead >= x; ) {
667
667
  let c = r.strstart, l = r.lookahead - (x - 1);
668
668
  do
669
669
  r.ins_h = ge(r, r.ins_h, r.window[c + x - 1]), r.prev[c & r.w_mask] = r.head[r.ins_h], r.head[r.ins_h] = c, c++;
670
670
  while (--l);
671
- r.strstart = c, r.lookahead = x - 1, Ne(r);
671
+ r.strstart = c, r.lookahead = x - 1, Ze(r);
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 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
675
+ var Xa = qa, Ya = Tr, Qa = Sr, ei = kr, ti = Wa, ni = Ga, ri = Ka, ai = Ja, ii = "pako deflate (from Nodeca project)", Xe = {
676
+ deflateInit: Xa,
677
+ deflateInit2: Ya,
678
+ deflateReset: Qa,
679
+ deflateResetKeep: ei,
680
+ deflateSetHeader: ti,
681
+ deflate: ni,
682
+ deflateEnd: ri,
683
+ deflateSetDictionary: ai,
684
+ deflateInfo: ii
685
685
  };
686
- const ri = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
687
- var ai = function(e) {
686
+ const si = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
687
+ var oi = 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 ai = 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
- ri(n, r) && (e[r] = n[r]);
695
+ si(n, r) && (e[r] = n[r]);
696
696
  }
697
697
  }
698
698
  return e;
699
- }, ii = (e) => {
699
+ }, li = (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 ai = function(e) {
706
706
  n.set(s, a), a += s.length;
707
707
  }
708
708
  return n;
709
- }, kr = {
710
- assign: ai,
711
- flattenChunks: ii
709
+ }, Er = {
710
+ assign: oi,
711
+ flattenChunks: li
712
712
  };
713
- let Sr = !0;
713
+ let Ar = !0;
714
714
  try {
715
715
  String.fromCharCode.apply(null, new Uint8Array(1));
716
716
  } catch (e) {
717
- Sr = !1;
717
+ Ar = !1;
718
718
  }
719
- const tt = new Uint8Array(256);
719
+ const nt = new Uint8Array(256);
720
720
  for (let e = 0; e < 256; e++)
721
- tt[e] = e >= 252 ? 6 : e >= 248 ? 5 : e >= 240 ? 4 : e >= 224 ? 3 : e >= 192 ? 2 : 1;
722
- tt[254] = tt[254] = 1;
723
- var si = (e) => {
721
+ nt[e] = e >= 252 ? 6 : e >= 248 ? 5 : e >= 240 ? 4 : e >= 224 ? 3 : e >= 192 ? 2 : 1;
722
+ nt[254] = nt[254] = 1;
723
+ var ci = (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 si = (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 oi = (e, t) => {
734
- if (t < 65534 && e.subarray && Sr)
733
+ const di = (e, t) => {
734
+ if (t < 65534 && e.subarray && Ar)
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 li = (e, t) => {
741
+ var ui = (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));
@@ -750,7 +750,7 @@ var li = (e, t) => {
750
750
  i[a++] = s;
751
751
  continue;
752
752
  }
753
- let o = tt[s];
753
+ let o = nt[s];
754
754
  if (o > 4) {
755
755
  i[a++] = 65533, r += o - 1;
756
756
  continue;
@@ -763,44 +763,44 @@ var li = (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 oi(i, a);
767
- }, ci = (e, t) => {
766
+ return di(i, a);
767
+ }, fi = (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
- return n < 0 || n === 0 ? t : n + tt[e[n]] > t ? n : t;
773
- }, Tr = {
774
- string2buf: si,
775
- buf2string: li,
776
- utf8border: ci
772
+ return n < 0 || n === 0 ? t : n + nt[e[n]] > t ? n : t;
773
+ }, Or = {
774
+ string2buf: ci,
775
+ buf2string: ui,
776
+ utf8border: fi
777
777
  };
778
- function di() {
778
+ function hi() {
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 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
- Z_OK: kt,
788
- Z_STREAM_END: gi,
789
- Z_DEFAULT_COMPRESSION: mi,
790
- Z_DEFAULT_STRATEGY: yi,
791
- Z_DEFLATED: vi
792
- } = mr;
793
- function Nt(e) {
794
- this.options = kr.assign({
795
- level: mi,
796
- method: vi,
781
+ var _i = hi;
782
+ const Cr = Object.prototype.toString, {
783
+ Z_NO_FLUSH: pi,
784
+ Z_SYNC_FLUSH: gi,
785
+ Z_FULL_FLUSH: mi,
786
+ Z_FINISH: yi,
787
+ Z_OK: At,
788
+ Z_STREAM_END: vi,
789
+ Z_DEFAULT_COMPRESSION: bi,
790
+ Z_DEFAULT_STRATEGY: wi,
791
+ Z_DEFLATED: xi
792
+ } = br;
793
+ function Dt(e) {
794
+ this.options = Er.assign({
795
+ level: bi,
796
+ method: xi,
797
797
  chunkSize: 16384,
798
798
  windowBits: 15,
799
799
  memLevel: 8,
800
- strategy: yi
800
+ strategy: wi
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 ui(), 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 _i(), this.strm.avail_out = 0;
804
804
  let n = Xe.deflateInit2(
805
805
  this.strm,
806
806
  t.level,
@@ -809,27 +809,27 @@ function Nt(e) {
809
809
  t.memLevel,
810
810
  t.strategy
811
811
  );
812
- if (n !== kt)
813
- throw new Error(xt[n]);
812
+ if (n !== At)
813
+ throw new Error(Et[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 = 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
- throw new Error(xt[n]);
816
+ if (typeof t.dictionary == "string" ? r = Or.string2buf(t.dictionary) : Cr.call(t.dictionary) === "[object ArrayBuffer]" ? r = new Uint8Array(t.dictionary) : r = t.dictionary, n = Xe.deflateSetDictionary(this.strm, r), n !== At)
817
+ throw new Error(Et[n]);
818
818
  this._dict_set = !0;
819
819
  }
820
820
  }
821
- Nt.prototype.push = function(e, t) {
821
+ Dt.prototype.push = function(e, t) {
822
822
  const n = this.strm, r = this.options.chunkSize;
823
823
  let a, i;
824
824
  if (this.ended)
825
825
  return !1;
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) {
826
+ for (t === ~~t ? i = t : i = t === !0 ? yi : pi, typeof e == "string" ? n.input = Or.string2buf(e) : Cr.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 === gi || i === mi) && 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 === gi)
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;
831
+ if (a = Xe.deflate(n, i), a === vi)
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 === At;
833
833
  if (n.avail_out === 0) {
834
834
  this.onData(n.output);
835
835
  continue;
@@ -842,26 +842,26 @@ Nt.prototype.push = function(e, t) {
842
842
  }
843
843
  return !0;
844
844
  };
845
- Nt.prototype.onData = function(e) {
845
+ Dt.prototype.onData = function(e) {
846
846
  this.chunks.push(e);
847
847
  };
848
- Nt.prototype.onEnd = function(e) {
849
- e === kt && (this.result = kr.flattenChunks(this.chunks)), this.chunks = [], this.err = e, this.msg = this.strm.msg;
848
+ Dt.prototype.onEnd = function(e) {
849
+ e === At && (this.result = Er.flattenChunks(this.chunks)), this.chunks = [], this.err = e, this.msg = this.strm.msg;
850
850
  };
851
- function bi(e, t) {
852
- const n = new Nt(t);
851
+ function ki(e, t) {
852
+ const n = new Dt(t);
853
853
  if (n.push(e, !0), n.err)
854
- throw n.msg || xt[n.err];
854
+ throw n.msg || Et[n.err];
855
855
  return n.result;
856
856
  }
857
- function wi(e, t) {
858
- return t = t || {}, t.gzip = !0, bi(e, t);
857
+ function Si(e, t) {
858
+ return t = t || {}, t.gzip = !0, ki(e, t);
859
859
  }
860
- var xi = wi, ki = {
861
- gzip: xi
860
+ var Ti = Si, Ei = {
861
+ gzip: Ti
862
862
  };
863
- const { gzip: Si } = ki;
864
- var Ti = Si;
863
+ const { gzip: Ai } = Ei;
864
+ var Oi = Ai;
865
865
  class be extends Error {
866
866
  constructor({
867
867
  name: t,
@@ -872,61 +872,61 @@ 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 Ei extends Error {
875
+ class Ci extends Error {
876
876
  constructor() {
877
877
  super("Malformatted Figma Token");
878
878
  }
879
879
  }
880
- class Ai extends Error {
880
+ class Ri extends Error {
881
881
  constructor() {
882
882
  super("Missing Figma Token");
883
883
  }
884
884
  }
885
- class Rn extends Error {
885
+ class Zn extends Error {
886
886
  constructor() {
887
887
  super("Needs Reauth Figma Token");
888
888
  }
889
889
  }
890
- class Nn extends Error {
890
+ class zn extends Error {
891
891
  constructor() {
892
892
  super("Expired Figma Token");
893
893
  }
894
894
  }
895
- class In extends Error {
895
+ class Dn extends Error {
896
896
  constructor() {
897
897
  super("File Not Exportable");
898
898
  }
899
899
  }
900
- class Zn extends Error {
900
+ class Ln extends Error {
901
901
  constructor({ reason: t }) {
902
902
  super("Unknown Forbidden Figma Error"), this.reason = t;
903
903
  }
904
904
  }
905
- const Ar = "Not Found";
906
- class Oi extends Error {
905
+ const Rr = "Not Found";
906
+ class Ni extends Error {
907
907
  constructor({ cause: t }) {
908
- super(Ar), this.cause = t;
908
+ super(Rr), this.cause = t;
909
909
  }
910
910
  }
911
- const Ws = (e) => e.message === Ar, Or = "Unknown Figma API Exception";
912
- class Ci extends Error {
911
+ const Xs = (e) => e.message === Rr, Nr = "Unknown Figma API Exception";
912
+ class Ii extends Error {
913
913
  constructor({ cause: t }) {
914
- super(Or), this.cause = t;
914
+ super(Nr), this.cause = t;
915
915
  }
916
916
  }
917
- const qs = (e) => e.message === Or, Cr = "Rate Limit Exceeded";
918
- class zn extends Error {
917
+ const Ys = (e) => e.message === Nr, Ir = "Rate Limit Exceeded";
918
+ class Fn extends Error {
919
919
  constructor({ cause: t }) {
920
- super(Cr), this.cause = t;
920
+ super(Ir), this.cause = t;
921
921
  }
922
922
  }
923
- const Ks = (e) => e.message === Cr, Rr = "Request Too Large";
924
- class Ri extends Error {
923
+ const Qs = (e) => e.message === Ir, Zr = "Request Too Large";
924
+ class Zi extends Error {
925
925
  constructor({ cause: t }) {
926
- super(Rr), this.cause = t;
926
+ super(Zr), this.cause = t;
927
927
  }
928
928
  }
929
- const Gs = (e) => e.message === Rr;
929
+ const eo = (e) => e.message === Zr;
930
930
  var E;
931
931
  (function(e) {
932
932
  e.assertEqual = (a) => {
@@ -964,10 +964,10 @@ var E;
964
964
  }
965
965
  e.joinValues = r, e.jsonStringifyReplacer = (a, i) => typeof i == "bigint" ? i.toString() : i;
966
966
  })(E || (E = {}));
967
- var Dn;
967
+ var jn;
968
968
  (function(e) {
969
969
  e.mergeShapes = (t, n) => d(d({}, t), n);
970
- })(Dn || (Dn = {}));
970
+ })(jn || (jn = {}));
971
971
  const _ = E.arrayToEnum([
972
972
  "string",
973
973
  "nan",
@@ -1092,7 +1092,7 @@ class ce extends Error {
1092
1092
  }
1093
1093
  }
1094
1094
  ce.create = (e) => new ce(e);
1095
- const Jt = (e, t) => {
1095
+ const tn = (e, t) => {
1096
1096
  let n;
1097
1097
  switch (e.code) {
1098
1098
  case u.invalid_type:
@@ -1148,11 +1148,11 @@ const Jt = (e, t) => {
1148
1148
  }
1149
1149
  return { message: n };
1150
1150
  };
1151
- let Ni = Jt;
1152
- function Ii() {
1153
- return Ni;
1151
+ let zi = tn;
1152
+ function Di() {
1153
+ return zi;
1154
1154
  }
1155
- const Zi = (e) => {
1155
+ const Li = (e) => {
1156
1156
  const { data: t, path: n, errorMaps: r, issueData: a } = e, i = [...n, ...a.path || []], s = v(d({}, a), {
1157
1157
  path: i
1158
1158
  });
@@ -1171,7 +1171,7 @@ const Zi = (e) => {
1171
1171
  });
1172
1172
  };
1173
1173
  function f(e, t) {
1174
- const n = Ii(), r = Zi({
1174
+ const n = Di(), r = Li({
1175
1175
  issueData: t,
1176
1176
  data: e.data,
1177
1177
  path: e.path,
@@ -1182,13 +1182,13 @@ function f(e, t) {
1182
1182
  // then schema-bound map if available
1183
1183
  n,
1184
1184
  // then global override map
1185
- n === Jt ? void 0 : Jt
1185
+ n === tn ? void 0 : tn
1186
1186
  // then global default map
1187
1187
  ].filter((a) => !!a)
1188
1188
  });
1189
1189
  e.common.issues.push(r);
1190
1190
  }
1191
- class M {
1191
+ class $ {
1192
1192
  constructor() {
1193
1193
  this.value = "valid";
1194
1194
  }
@@ -1217,7 +1217,7 @@ class M {
1217
1217
  value: s
1218
1218
  });
1219
1219
  }
1220
- return M.mergeObjectSync(t, r);
1220
+ return $.mergeObjectSync(t, r);
1221
1221
  });
1222
1222
  }
1223
1223
  static mergeObjectSync(t, n) {
@@ -1233,12 +1233,12 @@ class M {
1233
1233
  }
1234
1234
  const m = Object.freeze({
1235
1235
  status: "aborted"
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;
1236
+ }), Ge = (e) => ({ status: "dirty", value: e }), G = (e) => ({ status: "valid", value: e }), $n = (e) => e.status === "aborted", Mn = (e) => e.status === "dirty", ze = (e) => e.status === "valid", Ot = (e) => typeof Promise != "undefined" && e instanceof Promise;
1237
1237
  var p;
1238
1238
  (function(e) {
1239
1239
  e.errToObj = (t) => typeof t == "string" ? { message: t } : t || {}, e.toString = (t) => typeof t == "string" ? t : t == null ? void 0 : t.message;
1240
1240
  })(p || (p = {}));
1241
- class re {
1241
+ class ae {
1242
1242
  constructor(t, n, r, a) {
1243
1243
  this._cachedPath = [], this.parent = t, this.data = n, this._path = r, this._key = a;
1244
1244
  }
@@ -1246,8 +1246,8 @@ class re {
1246
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;
1247
1247
  }
1248
1248
  }
1249
- const $n = (e, t) => {
1250
- if (Ie(t))
1249
+ const Un = (e, t) => {
1250
+ if (ze(t))
1251
1251
  return { success: !0, data: t.value };
1252
1252
  if (!e.common.issues.length)
1253
1253
  throw new Error("Validation failed but no issues detected.");
@@ -1292,7 +1292,7 @@ class k {
1292
1292
  }
1293
1293
  _processInputParams(t) {
1294
1294
  return {
1295
- status: new M(),
1295
+ status: new $(),
1296
1296
  ctx: {
1297
1297
  common: t.parent.common,
1298
1298
  data: t.data,
@@ -1305,7 +1305,7 @@ class k {
1305
1305
  }
1306
1306
  _parseSync(t) {
1307
1307
  const n = this._parse(t);
1308
- if (St(n))
1308
+ if (Ot(n))
1309
1309
  throw new Error("Synchronous parse encountered promise.");
1310
1310
  return n;
1311
1311
  }
@@ -1333,7 +1333,7 @@ class k {
1333
1333
  data: t,
1334
1334
  parsedType: ue(t)
1335
1335
  }, a = this._parseSync({ data: t, path: r.path, parent: r });
1336
- return $n(r, a);
1336
+ return Un(r, a);
1337
1337
  }
1338
1338
  "~validate"(t) {
1339
1339
  var r, a;
@@ -1351,7 +1351,7 @@ class k {
1351
1351
  if (!this["~standard"].async)
1352
1352
  try {
1353
1353
  const i = this._parseSync({ data: t, path: [], parent: n });
1354
- return Ie(i) ? {
1354
+ return ze(i) ? {
1355
1355
  value: i.value
1356
1356
  } : {
1357
1357
  issues: n.common.issues
@@ -1362,7 +1362,7 @@ class k {
1362
1362
  async: !0
1363
1363
  };
1364
1364
  }
1365
- return this._parseAsync({ data: t, path: [], parent: n }).then((i) => Ie(i) ? {
1365
+ return this._parseAsync({ data: t, path: [], parent: n }).then((i) => ze(i) ? {
1366
1366
  value: i.value
1367
1367
  } : {
1368
1368
  issues: n.common.issues
@@ -1389,8 +1389,8 @@ class k {
1389
1389
  parent: null,
1390
1390
  data: t,
1391
1391
  parsedType: ue(t)
1392
- }, a = this._parse({ data: t, path: r.path, parent: r }), i = yield St(a) ? a : Promise.resolve(a);
1393
- return $n(r, i);
1392
+ }, a = this._parse({ data: t, path: r.path, parent: r }), i = yield Ot(a) ? a : Promise.resolve(a);
1393
+ return Un(r, i);
1394
1394
  });
1395
1395
  }
1396
1396
  refine(t, n) {
@@ -1406,7 +1406,7 @@ class k {
1406
1406
  return this._refinement((r, a) => t(r) ? !0 : (a.addIssue(typeof n == "function" ? n(r, a) : n), !1));
1407
1407
  }
1408
1408
  _refinement(t) {
1409
- return new De({
1409
+ return new Fe({
1410
1410
  schema: this,
1411
1411
  typeName: g.ZodEffects,
1412
1412
  effect: { type: "refinement", refinement: t }
@@ -1426,25 +1426,25 @@ class k {
1426
1426
  return me.create(this, this._def);
1427
1427
  }
1428
1428
  nullable() {
1429
- return Le.create(this, this._def);
1429
+ return je.create(this, this._def);
1430
1430
  }
1431
1431
  nullish() {
1432
1432
  return this.nullable().optional();
1433
1433
  }
1434
1434
  array() {
1435
- return ne.create(this);
1435
+ return re.create(this);
1436
1436
  }
1437
1437
  promise() {
1438
- return Ct.create(this, this._def);
1438
+ return Zt.create(this, this._def);
1439
1439
  }
1440
1440
  or(t) {
1441
- return Et.create([this, t], this._def);
1441
+ return Rt.create([this, t], this._def);
1442
1442
  }
1443
1443
  and(t) {
1444
- return At.create(this, t, this._def);
1444
+ return Nt.create(this, t, this._def);
1445
1445
  }
1446
1446
  transform(t) {
1447
- return new De(v(d({}, b(this._def)), {
1447
+ return new Fe(v(d({}, b(this._def)), {
1448
1448
  schema: this,
1449
1449
  typeName: g.ZodEffects,
1450
1450
  effect: { type: "transform", transform: t }
@@ -1452,21 +1452,21 @@ class k {
1452
1452
  }
1453
1453
  default(t) {
1454
1454
  const n = typeof t == "function" ? t : () => t;
1455
- return new rn(v(d({}, b(this._def)), {
1455
+ return new on(v(d({}, b(this._def)), {
1456
1456
  innerType: this,
1457
1457
  defaultValue: n,
1458
1458
  typeName: g.ZodDefault
1459
1459
  }));
1460
1460
  }
1461
1461
  brand() {
1462
- return new ns(d({
1462
+ return new is(d({
1463
1463
  typeName: g.ZodBranded,
1464
1464
  type: this
1465
1465
  }, b(this._def)));
1466
1466
  }
1467
1467
  catch(t) {
1468
1468
  const n = typeof t == "function" ? t : () => t;
1469
- return new an(v(d({}, b(this._def)), {
1469
+ return new ln(v(d({}, b(this._def)), {
1470
1470
  innerType: this,
1471
1471
  catchValue: n,
1472
1472
  typeName: g.ZodCatch
@@ -1479,10 +1479,10 @@ class k {
1479
1479
  }));
1480
1480
  }
1481
1481
  pipe(t) {
1482
- return gn.create(this, t);
1482
+ return vn.create(this, t);
1483
1483
  }
1484
1484
  readonly() {
1485
- return sn.create(this);
1485
+ return cn.create(this);
1486
1486
  }
1487
1487
  isOptional() {
1488
1488
  return this.safeParse(void 0).success;
@@ -1491,28 +1491,28 @@ class k {
1491
1491
  return this.safeParse(null).success;
1492
1492
  }
1493
1493
  }
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})+$";
1495
- let Ut;
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) {
1494
+ const Fi = /^c[^\s-]{8,}$/i, ji = /^[0-9a-z]+$/, $i = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Mi = /^[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, Ui = /^[a-z0-9_-]{21}$/i, Pi = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Bi = /^[-+]?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)?)??$/, Vi = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Hi = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
1495
+ let Vt;
1496
+ const Wi = /^(?:(?: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])$/, qi = /^(?:(?: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])$/, Gi = /^(([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]))$/, Ki = /^(([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])$/, Ji = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Xi = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, zr = "((\\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])))", Yi = new RegExp(`^${zr}$`);
1497
+ function Dr(e) {
1498
1498
  let t = "[0-5]\\d";
1499
1499
  e.precision ? t = `${t}\\.\\d{${e.precision}}` : e.precision == null && (t = `${t}(\\.\\d+)?`);
1500
1500
  const n = e.precision ? "+" : "?";
1501
1501
  return `([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`;
1502
1502
  }
1503
- function Xi(e) {
1504
- return new RegExp(`^${Ir(e)}$`);
1503
+ function Qi(e) {
1504
+ return new RegExp(`^${Dr(e)}$`);
1505
1505
  }
1506
- function Yi(e) {
1507
- let t = `${Nr}T${Ir(e)}`;
1506
+ function es(e) {
1507
+ let t = `${zr}T${Dr(e)}`;
1508
1508
  const n = [];
1509
1509
  return n.push(e.local ? "Z?" : "Z"), e.offset && n.push("([+-]\\d{2}:?\\d{2})"), t = `${t}(${n.join("|")})`, new RegExp(`^${t}$`);
1510
1510
  }
1511
- function Ji(e, t) {
1512
- return !!((t === "v4" || !t) && Bi.test(e) || (t === "v6" || !t) && Hi.test(e));
1511
+ function ts(e, t) {
1512
+ return !!((t === "v4" || !t) && Wi.test(e) || (t === "v6" || !t) && Gi.test(e));
1513
1513
  }
1514
- function Qi(e, t) {
1515
- if (!ji.test(e))
1514
+ function ns(e, t) {
1515
+ if (!Pi.test(e))
1516
1516
  return !1;
1517
1517
  try {
1518
1518
  const [n] = e.split(".");
@@ -1524,10 +1524,10 @@ function Qi(e, t) {
1524
1524
  return !1;
1525
1525
  }
1526
1526
  }
1527
- function es(e, t) {
1528
- return !!((t === "v4" || !t) && Vi.test(e) || (t === "v6" || !t) && Wi.test(e));
1527
+ function rs(e, t) {
1528
+ return !!((t === "v4" || !t) && qi.test(e) || (t === "v6" || !t) && Ki.test(e));
1529
1529
  }
1530
- class oe extends k {
1530
+ class le extends k {
1531
1531
  _parse(t) {
1532
1532
  if (this._def.coerce && (t.data = String(t.data)), this._getType(t) !== _.string) {
1533
1533
  const i = this._getOrReturnCtx(t);
@@ -1537,7 +1537,7 @@ class oe extends k {
1537
1537
  received: i.parsedType
1538
1538
  }), m;
1539
1539
  }
1540
- const r = new M();
1540
+ const r = new $();
1541
1541
  let a;
1542
1542
  for (const i of this._def.checks)
1543
1543
  if (i.kind === "min")
@@ -1576,43 +1576,43 @@ class oe extends k {
1576
1576
  message: i.message
1577
1577
  }), r.dirty());
1578
1578
  } else if (i.kind === "email")
1579
- Ui.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1579
+ Vi.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1580
1580
  validation: "email",
1581
1581
  code: u.invalid_string,
1582
1582
  message: i.message
1583
1583
  }), r.dirty());
1584
1584
  else if (i.kind === "emoji")
1585
- Ut || (Ut = new RegExp(Pi, "u")), Ut.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1585
+ Vt || (Vt = new RegExp(Hi, "u")), Vt.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1586
1586
  validation: "emoji",
1587
1587
  code: u.invalid_string,
1588
1588
  message: i.message
1589
1589
  }), r.dirty());
1590
1590
  else if (i.kind === "uuid")
1591
- Fi.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1591
+ Mi.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1592
1592
  validation: "uuid",
1593
1593
  code: u.invalid_string,
1594
1594
  message: i.message
1595
1595
  }), r.dirty());
1596
1596
  else if (i.kind === "nanoid")
1597
- $i.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1597
+ Ui.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1598
1598
  validation: "nanoid",
1599
1599
  code: u.invalid_string,
1600
1600
  message: i.message
1601
1601
  }), r.dirty());
1602
1602
  else if (i.kind === "cuid")
1603
- zi.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1603
+ Fi.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1604
1604
  validation: "cuid",
1605
1605
  code: u.invalid_string,
1606
1606
  message: i.message
1607
1607
  }), r.dirty());
1608
1608
  else if (i.kind === "cuid2")
1609
- Di.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1609
+ ji.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1610
1610
  validation: "cuid2",
1611
1611
  code: u.invalid_string,
1612
1612
  message: i.message
1613
1613
  }), r.dirty());
1614
1614
  else if (i.kind === "ulid")
1615
- Li.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1615
+ $i.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1616
1616
  validation: "ulid",
1617
1617
  code: u.invalid_string,
1618
1618
  message: i.message
@@ -1643,39 +1643,39 @@ class oe extends k {
1643
1643
  code: u.invalid_string,
1644
1644
  validation: { endsWith: i.value },
1645
1645
  message: i.message
1646
- }), r.dirty()) : i.kind === "datetime" ? Yi(i).test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1646
+ }), r.dirty()) : i.kind === "datetime" ? es(i).test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1647
1647
  code: u.invalid_string,
1648
1648
  validation: "datetime",
1649
1649
  message: i.message
1650
- }), r.dirty()) : i.kind === "date" ? Gi.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1650
+ }), r.dirty()) : i.kind === "date" ? Yi.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1651
1651
  code: u.invalid_string,
1652
1652
  validation: "date",
1653
1653
  message: i.message
1654
- }), r.dirty()) : i.kind === "time" ? Xi(i).test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1654
+ }), r.dirty()) : i.kind === "time" ? Qi(i).test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1655
1655
  code: u.invalid_string,
1656
1656
  validation: "time",
1657
1657
  message: i.message
1658
- }), r.dirty()) : i.kind === "duration" ? Mi.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1658
+ }), r.dirty()) : i.kind === "duration" ? Bi.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1659
1659
  validation: "duration",
1660
1660
  code: u.invalid_string,
1661
1661
  message: i.message
1662
- }), r.dirty()) : i.kind === "ip" ? Ji(t.data, i.version) || (a = this._getOrReturnCtx(t, a), f(a, {
1662
+ }), r.dirty()) : i.kind === "ip" ? ts(t.data, i.version) || (a = this._getOrReturnCtx(t, a), f(a, {
1663
1663
  validation: "ip",
1664
1664
  code: u.invalid_string,
1665
1665
  message: i.message
1666
- }), r.dirty()) : i.kind === "jwt" ? Qi(t.data, i.alg) || (a = this._getOrReturnCtx(t, a), f(a, {
1666
+ }), r.dirty()) : i.kind === "jwt" ? ns(t.data, i.alg) || (a = this._getOrReturnCtx(t, a), f(a, {
1667
1667
  validation: "jwt",
1668
1668
  code: u.invalid_string,
1669
1669
  message: i.message
1670
- }), r.dirty()) : i.kind === "cidr" ? es(t.data, i.version) || (a = this._getOrReturnCtx(t, a), f(a, {
1670
+ }), r.dirty()) : i.kind === "cidr" ? rs(t.data, i.version) || (a = this._getOrReturnCtx(t, a), f(a, {
1671
1671
  validation: "cidr",
1672
1672
  code: u.invalid_string,
1673
1673
  message: i.message
1674
- }), r.dirty()) : i.kind === "base64" ? qi.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1674
+ }), r.dirty()) : i.kind === "base64" ? Ji.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1675
1675
  validation: "base64",
1676
1676
  code: u.invalid_string,
1677
1677
  message: i.message
1678
- }), r.dirty()) : i.kind === "base64url" ? Ki.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1678
+ }), r.dirty()) : i.kind === "base64url" ? Xi.test(t.data) || (a = this._getOrReturnCtx(t, a), f(a, {
1679
1679
  validation: "base64url",
1680
1680
  code: u.invalid_string,
1681
1681
  message: i.message
@@ -1689,7 +1689,7 @@ class oe extends k {
1689
1689
  }, p.errToObj(r)));
1690
1690
  }
1691
1691
  _addCheck(t) {
1692
- return new oe(v(d({}, this._def), {
1692
+ return new le(v(d({}, this._def), {
1693
1693
  checks: [...this._def.checks, t]
1694
1694
  }));
1695
1695
  }
@@ -1815,17 +1815,17 @@ class oe extends k {
1815
1815
  return this.min(1, p.errToObj(t));
1816
1816
  }
1817
1817
  trim() {
1818
- return new oe(v(d({}, this._def), {
1818
+ return new le(v(d({}, this._def), {
1819
1819
  checks: [...this._def.checks, { kind: "trim" }]
1820
1820
  }));
1821
1821
  }
1822
1822
  toLowerCase() {
1823
- return new oe(v(d({}, this._def), {
1823
+ return new le(v(d({}, this._def), {
1824
1824
  checks: [...this._def.checks, { kind: "toLowerCase" }]
1825
1825
  }));
1826
1826
  }
1827
1827
  toUpperCase() {
1828
- return new oe(v(d({}, this._def), {
1828
+ return new le(v(d({}, this._def), {
1829
1829
  checks: [...this._def.checks, { kind: "toUpperCase" }]
1830
1830
  }));
1831
1831
  }
@@ -1890,19 +1890,19 @@ class oe extends k {
1890
1890
  return t;
1891
1891
  }
1892
1892
  }
1893
- oe.create = (e) => {
1893
+ le.create = (e) => {
1894
1894
  var t;
1895
- return new oe(d({
1895
+ return new le(d({
1896
1896
  checks: [],
1897
1897
  typeName: g.ZodString,
1898
1898
  coerce: (t = e == null ? void 0 : e.coerce) != null ? t : !1
1899
1899
  }, b(e)));
1900
1900
  };
1901
- function ts(e, t) {
1901
+ function as(e, t) {
1902
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(".", ""));
1903
- return i % s / wn(10, a);
1903
+ return i % s / Sn(10, a);
1904
1904
  }
1905
- class Ze extends k {
1905
+ class De extends k {
1906
1906
  constructor() {
1907
1907
  super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
1908
1908
  }
@@ -1916,7 +1916,7 @@ class Ze extends k {
1916
1916
  }), m;
1917
1917
  }
1918
1918
  let r;
1919
- const a = new M();
1919
+ const a = new $();
1920
1920
  for (const i of this._def.checks)
1921
1921
  i.kind === "int" ? E.isInteger(t.data) || (r = this._getOrReturnCtx(t, r), f(r, {
1922
1922
  code: u.invalid_type,
@@ -1937,7 +1937,7 @@ class Ze extends k {
1937
1937
  inclusive: i.inclusive,
1938
1938
  exact: !1,
1939
1939
  message: i.message
1940
- }), a.dirty()) : i.kind === "multipleOf" ? ts(t.data, i.value) !== 0 && (r = this._getOrReturnCtx(t, r), f(r, {
1940
+ }), a.dirty()) : i.kind === "multipleOf" ? as(t.data, i.value) !== 0 && (r = this._getOrReturnCtx(t, r), f(r, {
1941
1941
  code: u.not_multiple_of,
1942
1942
  multipleOf: i.value,
1943
1943
  message: i.message
@@ -1960,7 +1960,7 @@ class Ze extends k {
1960
1960
  return this.setLimit("max", t, !1, p.toString(n));
1961
1961
  }
1962
1962
  setLimit(t, n, r, a) {
1963
- return new Ze(v(d({}, this._def), {
1963
+ return new De(v(d({}, this._def), {
1964
1964
  checks: [
1965
1965
  ...this._def.checks,
1966
1966
  {
@@ -1973,7 +1973,7 @@ class Ze extends k {
1973
1973
  }));
1974
1974
  }
1975
1975
  _addCheck(t) {
1976
- return new Ze(v(d({}, this._def), {
1976
+ return new De(v(d({}, this._def), {
1977
1977
  checks: [...this._def.checks, t]
1978
1978
  }));
1979
1979
  }
@@ -2066,12 +2066,12 @@ class Ze extends k {
2066
2066
  return Number.isFinite(n) && Number.isFinite(t);
2067
2067
  }
2068
2068
  }
2069
- Ze.create = (e) => new Ze(d({
2069
+ De.create = (e) => new De(d({
2070
2070
  checks: [],
2071
2071
  typeName: g.ZodNumber,
2072
2072
  coerce: (e == null ? void 0 : e.coerce) || !1
2073
2073
  }, b(e)));
2074
- class nt extends k {
2074
+ class rt extends k {
2075
2075
  constructor() {
2076
2076
  super(...arguments), this.min = this.gte, this.max = this.lte;
2077
2077
  }
@@ -2085,7 +2085,7 @@ class nt extends k {
2085
2085
  if (this._getType(t) !== _.bigint)
2086
2086
  return this._getInvalidInput(t);
2087
2087
  let r;
2088
- const a = new M();
2088
+ const a = new $();
2089
2089
  for (const i of this._def.checks)
2090
2090
  i.kind === "min" ? (i.inclusive ? t.data < i.value : t.data <= i.value) && (r = this._getOrReturnCtx(t, r), f(r, {
2091
2091
  code: u.too_small,
@@ -2127,7 +2127,7 @@ class nt extends k {
2127
2127
  return this.setLimit("max", t, !1, p.toString(n));
2128
2128
  }
2129
2129
  setLimit(t, n, r, a) {
2130
- return new nt(v(d({}, this._def), {
2130
+ return new rt(v(d({}, this._def), {
2131
2131
  checks: [
2132
2132
  ...this._def.checks,
2133
2133
  {
@@ -2140,7 +2140,7 @@ class nt extends k {
2140
2140
  }));
2141
2141
  }
2142
2142
  _addCheck(t) {
2143
- return new nt(v(d({}, this._def), {
2143
+ return new rt(v(d({}, this._def), {
2144
2144
  checks: [...this._def.checks, t]
2145
2145
  }));
2146
2146
  }
@@ -2196,15 +2196,15 @@ class nt extends k {
2196
2196
  return t;
2197
2197
  }
2198
2198
  }
2199
- nt.create = (e) => {
2199
+ rt.create = (e) => {
2200
2200
  var t;
2201
- return new nt(d({
2201
+ return new rt(d({
2202
2202
  checks: [],
2203
2203
  typeName: g.ZodBigInt,
2204
2204
  coerce: (t = e == null ? void 0 : e.coerce) != null ? t : !1
2205
2205
  }, b(e)));
2206
2206
  };
2207
- class Qt extends k {
2207
+ class nn extends k {
2208
2208
  _parse(t) {
2209
2209
  if (this._def.coerce && (t.data = !!t.data), this._getType(t) !== _.boolean) {
2210
2210
  const r = this._getOrReturnCtx(t);
@@ -2217,11 +2217,11 @@ class Qt extends k {
2217
2217
  return G(t.data);
2218
2218
  }
2219
2219
  }
2220
- Qt.create = (e) => new Qt(d({
2220
+ nn.create = (e) => new nn(d({
2221
2221
  typeName: g.ZodBoolean,
2222
2222
  coerce: (e == null ? void 0 : e.coerce) || !1
2223
2223
  }, b(e)));
2224
- class Tt extends k {
2224
+ class Ct extends k {
2225
2225
  _parse(t) {
2226
2226
  if (this._def.coerce && (t.data = new Date(t.data)), this._getType(t) !== _.date) {
2227
2227
  const i = this._getOrReturnCtx(t);
@@ -2237,7 +2237,7 @@ class Tt extends k {
2237
2237
  code: u.invalid_date
2238
2238
  }), m;
2239
2239
  }
2240
- const r = new M();
2240
+ const r = new $();
2241
2241
  let a;
2242
2242
  for (const i of this._def.checks)
2243
2243
  i.kind === "min" ? t.data.getTime() < i.value && (a = this._getOrReturnCtx(t, a), f(a, {
@@ -2261,7 +2261,7 @@ class Tt extends k {
2261
2261
  };
2262
2262
  }
2263
2263
  _addCheck(t) {
2264
- return new Tt(v(d({}, this._def), {
2264
+ return new Ct(v(d({}, this._def), {
2265
2265
  checks: [...this._def.checks, t]
2266
2266
  }));
2267
2267
  }
@@ -2292,12 +2292,12 @@ class Tt extends k {
2292
2292
  return t != null ? new Date(t) : null;
2293
2293
  }
2294
2294
  }
2295
- Tt.create = (e) => new Tt(d({
2295
+ Ct.create = (e) => new Ct(d({
2296
2296
  checks: [],
2297
2297
  coerce: (e == null ? void 0 : e.coerce) || !1,
2298
2298
  typeName: g.ZodDate
2299
2299
  }, b(e)));
2300
- class jn extends k {
2300
+ class Pn extends k {
2301
2301
  _parse(t) {
2302
2302
  if (this._getType(t) !== _.symbol) {
2303
2303
  const r = this._getOrReturnCtx(t);
@@ -2310,10 +2310,10 @@ class jn extends k {
2310
2310
  return G(t.data);
2311
2311
  }
2312
2312
  }
2313
- jn.create = (e) => new jn(d({
2313
+ Pn.create = (e) => new Pn(d({
2314
2314
  typeName: g.ZodSymbol
2315
2315
  }, b(e)));
2316
- class Mn extends k {
2316
+ class Bn extends k {
2317
2317
  _parse(t) {
2318
2318
  if (this._getType(t) !== _.undefined) {
2319
2319
  const r = this._getOrReturnCtx(t);
@@ -2326,10 +2326,10 @@ class Mn extends k {
2326
2326
  return G(t.data);
2327
2327
  }
2328
2328
  }
2329
- Mn.create = (e) => new Mn(d({
2329
+ Bn.create = (e) => new Bn(d({
2330
2330
  typeName: g.ZodUndefined
2331
2331
  }, b(e)));
2332
- class Un extends k {
2332
+ class Vn extends k {
2333
2333
  _parse(t) {
2334
2334
  if (this._getType(t) !== _.null) {
2335
2335
  const r = this._getOrReturnCtx(t);
@@ -2342,10 +2342,10 @@ class Un extends k {
2342
2342
  return G(t.data);
2343
2343
  }
2344
2344
  }
2345
- Un.create = (e) => new Un(d({
2345
+ Vn.create = (e) => new Vn(d({
2346
2346
  typeName: g.ZodNull
2347
2347
  }, b(e)));
2348
- class Pn extends k {
2348
+ class Hn extends k {
2349
2349
  constructor() {
2350
2350
  super(...arguments), this._any = !0;
2351
2351
  }
@@ -2353,10 +2353,10 @@ class Pn extends k {
2353
2353
  return G(t.data);
2354
2354
  }
2355
2355
  }
2356
- Pn.create = (e) => new Pn(d({
2356
+ Hn.create = (e) => new Hn(d({
2357
2357
  typeName: g.ZodAny
2358
2358
  }, b(e)));
2359
- class en extends k {
2359
+ class rn extends k {
2360
2360
  constructor() {
2361
2361
  super(...arguments), this._unknown = !0;
2362
2362
  }
@@ -2364,7 +2364,7 @@ class en extends k {
2364
2364
  return G(t.data);
2365
2365
  }
2366
2366
  }
2367
- en.create = (e) => new en(d({
2367
+ rn.create = (e) => new rn(d({
2368
2368
  typeName: g.ZodUnknown
2369
2369
  }, b(e)));
2370
2370
  class ye extends k {
@@ -2380,7 +2380,7 @@ class ye extends k {
2380
2380
  ye.create = (e) => new ye(d({
2381
2381
  typeName: g.ZodNever
2382
2382
  }, b(e)));
2383
- class Bn extends k {
2383
+ class Wn extends k {
2384
2384
  _parse(t) {
2385
2385
  if (this._getType(t) !== _.undefined) {
2386
2386
  const r = this._getOrReturnCtx(t);
@@ -2393,10 +2393,10 @@ class Bn extends k {
2393
2393
  return G(t.data);
2394
2394
  }
2395
2395
  }
2396
- Bn.create = (e) => new Bn(d({
2396
+ Wn.create = (e) => new Wn(d({
2397
2397
  typeName: g.ZodVoid
2398
2398
  }, b(e)));
2399
- class ne extends k {
2399
+ class re extends k {
2400
2400
  _parse(t) {
2401
2401
  const { ctx: n, status: r } = this._processInputParams(t), a = this._def;
2402
2402
  if (n.parsedType !== _.array)
@@ -2432,25 +2432,25 @@ class ne extends k {
2432
2432
  exact: !1,
2433
2433
  message: a.maxLength.message
2434
2434
  }), r.dirty()), n.common.async)
2435
- return Promise.all([...n.data].map((s, o) => a.type._parseAsync(new re(n, s, n.path, o)))).then((s) => M.mergeArray(r, s));
2436
- const i = [...n.data].map((s, o) => a.type._parseSync(new re(n, s, n.path, o)));
2437
- return M.mergeArray(r, i);
2435
+ return Promise.all([...n.data].map((s, o) => a.type._parseAsync(new ae(n, s, n.path, o)))).then((s) => $.mergeArray(r, s));
2436
+ const i = [...n.data].map((s, o) => a.type._parseSync(new ae(n, s, n.path, o)));
2437
+ return $.mergeArray(r, i);
2438
2438
  }
2439
2439
  get element() {
2440
2440
  return this._def.type;
2441
2441
  }
2442
2442
  min(t, n) {
2443
- return new ne(v(d({}, this._def), {
2443
+ return new re(v(d({}, this._def), {
2444
2444
  minLength: { value: t, message: p.toString(n) }
2445
2445
  }));
2446
2446
  }
2447
2447
  max(t, n) {
2448
- return new ne(v(d({}, this._def), {
2448
+ return new re(v(d({}, this._def), {
2449
2449
  maxLength: { value: t, message: p.toString(n) }
2450
2450
  }));
2451
2451
  }
2452
2452
  length(t, n) {
2453
- return new ne(v(d({}, this._def), {
2453
+ return new re(v(d({}, this._def), {
2454
2454
  exactLength: { value: t, message: p.toString(n) }
2455
2455
  }));
2456
2456
  }
@@ -2458,28 +2458,28 @@ class ne extends k {
2458
2458
  return this.min(1, t);
2459
2459
  }
2460
2460
  }
2461
- ne.create = (e, t) => new ne(d({
2461
+ re.create = (e, t) => new re(d({
2462
2462
  type: e,
2463
2463
  minLength: null,
2464
2464
  maxLength: null,
2465
2465
  exactLength: null,
2466
2466
  typeName: g.ZodArray
2467
2467
  }, b(t)));
2468
- function Ae(e) {
2469
- if (e instanceof I) {
2468
+ function Oe(e) {
2469
+ if (e instanceof z) {
2470
2470
  const t = {};
2471
2471
  for (const n in e.shape) {
2472
2472
  const r = e.shape[n];
2473
- t[n] = me.create(Ae(r));
2473
+ t[n] = me.create(Oe(r));
2474
2474
  }
2475
- return new I(v(d({}, e._def), {
2475
+ return new z(v(d({}, e._def), {
2476
2476
  shape: () => t
2477
2477
  }));
2478
- } else return e instanceof ne ? new ne(v(d({}, e._def), {
2479
- type: Ae(e.element)
2480
- })) : e instanceof me ? me.create(Ae(e.unwrap())) : e instanceof Le ? Le.create(Ae(e.unwrap())) : e instanceof Te ? Te.create(e.items.map((t) => Ae(t))) : e;
2478
+ } else return e instanceof re ? new re(v(d({}, e._def), {
2479
+ type: Oe(e.element)
2480
+ })) : e instanceof me ? me.create(Oe(e.unwrap())) : e instanceof je ? je.create(Oe(e.unwrap())) : e instanceof Te ? Te.create(e.items.map((t) => Oe(t))) : e;
2481
2481
  }
2482
- class I extends k {
2482
+ class z extends k {
2483
2483
  constructor() {
2484
2484
  super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
2485
2485
  }
@@ -2504,10 +2504,10 @@ class I extends k {
2504
2504
  s.includes(l) || o.push(l);
2505
2505
  const c = [];
2506
2506
  for (const l of s) {
2507
- const h = i[l], S = a.data[l];
2507
+ const h = i[l], T = a.data[l];
2508
2508
  c.push({
2509
2509
  key: { status: "valid", value: l },
2510
- value: h._parse(new re(a, S, a.path, l)),
2510
+ value: h._parse(new ae(a, T, a.path, l)),
2511
2511
  alwaysSet: l in a.data
2512
2512
  });
2513
2513
  }
@@ -2528,11 +2528,11 @@ class I extends k {
2528
2528
  } else {
2529
2529
  const l = this._def.catchall;
2530
2530
  for (const h of o) {
2531
- const S = a.data[h];
2531
+ const T = a.data[h];
2532
2532
  c.push({
2533
2533
  key: { status: "valid", value: h },
2534
2534
  value: l._parse(
2535
- new re(a, S, a.path, h)
2535
+ new ae(a, T, a.path, h)
2536
2536
  //, ctx.child(key), value, getParsedType(value)
2537
2537
  ),
2538
2538
  alwaysSet: h in a.data
@@ -2542,21 +2542,21 @@ class I extends k {
2542
2542
  return a.common.async ? Promise.resolve().then(() => O(this, null, function* () {
2543
2543
  const l = [];
2544
2544
  for (const h of c) {
2545
- const S = yield h.key, y = yield h.value;
2545
+ const T = yield h.key, y = yield h.value;
2546
2546
  l.push({
2547
- key: S,
2547
+ key: T,
2548
2548
  value: y,
2549
2549
  alwaysSet: h.alwaysSet
2550
2550
  });
2551
2551
  }
2552
2552
  return l;
2553
- })).then((l) => M.mergeObjectSync(r, l)) : M.mergeObjectSync(r, c);
2553
+ })).then((l) => $.mergeObjectSync(r, l)) : $.mergeObjectSync(r, c);
2554
2554
  }
2555
2555
  get shape() {
2556
2556
  return this._def.shape();
2557
2557
  }
2558
2558
  strict(t) {
2559
- return p.errToObj, new I(d(v(d({}, this._def), {
2559
+ return p.errToObj, new z(d(v(d({}, this._def), {
2560
2560
  unknownKeys: "strict"
2561
2561
  }), t !== void 0 ? {
2562
2562
  errorMap: (n, r) => {
@@ -2571,12 +2571,12 @@ class I extends k {
2571
2571
  } : {}));
2572
2572
  }
2573
2573
  strip() {
2574
- return new I(v(d({}, this._def), {
2574
+ return new z(v(d({}, this._def), {
2575
2575
  unknownKeys: "strip"
2576
2576
  }));
2577
2577
  }
2578
2578
  passthrough() {
2579
- return new I(v(d({}, this._def), {
2579
+ return new z(v(d({}, this._def), {
2580
2580
  unknownKeys: "passthrough"
2581
2581
  }));
2582
2582
  }
@@ -2598,7 +2598,7 @@ class I extends k {
2598
2598
  // }) as any;
2599
2599
  // };
2600
2600
  extend(t) {
2601
- return new I(v(d({}, this._def), {
2601
+ return new z(v(d({}, this._def), {
2602
2602
  shape: () => d(d({}, this._def.shape()), t)
2603
2603
  }));
2604
2604
  }
@@ -2608,7 +2608,7 @@ class I extends k {
2608
2608
  * upgrade if you are experiencing issues.
2609
2609
  */
2610
2610
  merge(t) {
2611
- return new I({
2611
+ return new z({
2612
2612
  unknownKeys: t._def.unknownKeys,
2613
2613
  catchall: t._def.catchall,
2614
2614
  shape: () => d(d({}, this._def.shape()), t._def.shape()),
@@ -2675,7 +2675,7 @@ class I extends k {
2675
2675
  // return merged;
2676
2676
  // }
2677
2677
  catchall(t) {
2678
- return new I(v(d({}, this._def), {
2678
+ return new z(v(d({}, this._def), {
2679
2679
  catchall: t
2680
2680
  }));
2681
2681
  }
@@ -2683,7 +2683,7 @@ class I extends k {
2683
2683
  const n = {};
2684
2684
  for (const r of E.objectKeys(t))
2685
2685
  t[r] && this.shape[r] && (n[r] = this.shape[r]);
2686
- return new I(v(d({}, this._def), {
2686
+ return new z(v(d({}, this._def), {
2687
2687
  shape: () => n
2688
2688
  }));
2689
2689
  }
@@ -2691,7 +2691,7 @@ class I extends k {
2691
2691
  const n = {};
2692
2692
  for (const r of E.objectKeys(this.shape))
2693
2693
  t[r] || (n[r] = this.shape[r]);
2694
- return new I(v(d({}, this._def), {
2694
+ return new z(v(d({}, this._def), {
2695
2695
  shape: () => n
2696
2696
  }));
2697
2697
  }
@@ -2699,7 +2699,7 @@ class I extends k {
2699
2699
  * @deprecated
2700
2700
  */
2701
2701
  deepPartial() {
2702
- return Ae(this);
2702
+ return Oe(this);
2703
2703
  }
2704
2704
  partial(t) {
2705
2705
  const n = {};
@@ -2707,7 +2707,7 @@ class I extends k {
2707
2707
  const a = this.shape[r];
2708
2708
  t && !t[r] ? n[r] = a : n[r] = a.optional();
2709
2709
  }
2710
- return new I(v(d({}, this._def), {
2710
+ return new z(v(d({}, this._def), {
2711
2711
  shape: () => n
2712
2712
  }));
2713
2713
  }
@@ -2722,33 +2722,33 @@ class I extends k {
2722
2722
  i = i._def.innerType;
2723
2723
  n[r] = i;
2724
2724
  }
2725
- return new I(v(d({}, this._def), {
2725
+ return new z(v(d({}, this._def), {
2726
2726
  shape: () => n
2727
2727
  }));
2728
2728
  }
2729
2729
  keyof() {
2730
- return Zr(E.objectKeys(this.shape));
2730
+ return Lr(E.objectKeys(this.shape));
2731
2731
  }
2732
2732
  }
2733
- I.create = (e, t) => new I(d({
2733
+ z.create = (e, t) => new z(d({
2734
2734
  shape: () => e,
2735
2735
  unknownKeys: "strip",
2736
2736
  catchall: ye.create(),
2737
2737
  typeName: g.ZodObject
2738
2738
  }, b(t)));
2739
- I.strictCreate = (e, t) => new I(d({
2739
+ z.strictCreate = (e, t) => new z(d({
2740
2740
  shape: () => e,
2741
2741
  unknownKeys: "strict",
2742
2742
  catchall: ye.create(),
2743
2743
  typeName: g.ZodObject
2744
2744
  }, b(t)));
2745
- I.lazycreate = (e, t) => new I(d({
2745
+ z.lazycreate = (e, t) => new z(d({
2746
2746
  shape: e,
2747
2747
  unknownKeys: "strip",
2748
2748
  catchall: ye.create(),
2749
2749
  typeName: g.ZodObject
2750
2750
  }, b(t)));
2751
- class Et extends k {
2751
+ class Rt extends k {
2752
2752
  _parse(t) {
2753
2753
  const { ctx: n } = this._processInputParams(t), r = this._def.options;
2754
2754
  function a(i) {
@@ -2812,18 +2812,18 @@ class Et extends k {
2812
2812
  return this._def.options;
2813
2813
  }
2814
2814
  }
2815
- Et.create = (e, t) => new Et(d({
2815
+ Rt.create = (e, t) => new Rt(d({
2816
2816
  options: e,
2817
2817
  typeName: g.ZodUnion
2818
2818
  }, b(t)));
2819
- function tn(e, t) {
2819
+ function an(e, t) {
2820
2820
  const n = ue(e), r = ue(t);
2821
2821
  if (e === t)
2822
2822
  return { valid: !0, data: e };
2823
2823
  if (n === _.object && r === _.object) {
2824
2824
  const a = E.objectKeys(t), i = E.objectKeys(e).filter((o) => a.indexOf(o) !== -1), s = d(d({}, e), t);
2825
2825
  for (const o of i) {
2826
- const c = tn(e[o], t[o]);
2826
+ const c = an(e[o], t[o]);
2827
2827
  if (!c.valid)
2828
2828
  return { valid: !1 };
2829
2829
  s[o] = c.data;
@@ -2834,7 +2834,7 @@ function tn(e, t) {
2834
2834
  return { valid: !1 };
2835
2835
  const a = [];
2836
2836
  for (let i = 0; i < e.length; i++) {
2837
- const s = e[i], o = t[i], c = tn(s, o);
2837
+ const s = e[i], o = t[i], c = an(s, o);
2838
2838
  if (!c.valid)
2839
2839
  return { valid: !1 };
2840
2840
  a.push(c.data);
@@ -2842,13 +2842,13 @@ function tn(e, t) {
2842
2842
  return { valid: !0, data: a };
2843
2843
  } else return n === _.date && r === _.date && +e == +t ? { valid: !0, data: e } : { valid: !1 };
2844
2844
  }
2845
- class At extends k {
2845
+ class Nt extends k {
2846
2846
  _parse(t) {
2847
2847
  const { status: n, ctx: r } = this._processInputParams(t), a = (i, s) => {
2848
- if (Ln(i) || Ln(s))
2848
+ if ($n(i) || $n(s))
2849
2849
  return m;
2850
- const o = tn(i.value, s.value);
2851
- return o.valid ? ((Fn(i) || Fn(s)) && n.dirty(), { status: n.value, value: o.data }) : (f(r, {
2850
+ const o = an(i.value, s.value);
2851
+ return o.valid ? ((Mn(i) || Mn(s)) && n.dirty(), { status: n.value, value: o.data }) : (f(r, {
2852
2852
  code: u.invalid_intersection_types
2853
2853
  }), m);
2854
2854
  };
@@ -2874,7 +2874,7 @@ class At extends k {
2874
2874
  }));
2875
2875
  }
2876
2876
  }
2877
- At.create = (e, t, n) => new At(d({
2877
+ Nt.create = (e, t, n) => new Nt(d({
2878
2878
  left: e,
2879
2879
  right: t,
2880
2880
  typeName: g.ZodIntersection
@@ -2905,9 +2905,9 @@ class Te extends k {
2905
2905
  }), n.dirty());
2906
2906
  const i = [...r.data].map((s, o) => {
2907
2907
  const c = this._def.items[o] || this._def.rest;
2908
- return c ? c._parse(new re(r, s, r.path, o)) : null;
2908
+ return c ? c._parse(new ae(r, s, r.path, o)) : null;
2909
2909
  }).filter((s) => !!s);
2910
- return r.common.async ? Promise.all(i).then((s) => M.mergeArray(n, s)) : M.mergeArray(n, i);
2910
+ return r.common.async ? Promise.all(i).then((s) => $.mergeArray(n, s)) : $.mergeArray(n, i);
2911
2911
  }
2912
2912
  get items() {
2913
2913
  return this._def.items;
@@ -2927,7 +2927,7 @@ Te.create = (e, t) => {
2927
2927
  rest: null
2928
2928
  }, b(t)));
2929
2929
  };
2930
- class Ot extends k {
2930
+ class It extends k {
2931
2931
  get keySchema() {
2932
2932
  return this._def.keyType;
2933
2933
  }
@@ -2945,28 +2945,28 @@ class Ot extends k {
2945
2945
  const a = [], i = this._def.keyType, s = this._def.valueType;
2946
2946
  for (const o in r.data)
2947
2947
  a.push({
2948
- key: i._parse(new re(r, o, r.path, o)),
2949
- value: s._parse(new re(r, r.data[o], r.path, o)),
2948
+ key: i._parse(new ae(r, o, r.path, o)),
2949
+ value: s._parse(new ae(r, r.data[o], r.path, o)),
2950
2950
  alwaysSet: o in r.data
2951
2951
  });
2952
- return r.common.async ? M.mergeObjectAsync(n, a) : M.mergeObjectSync(n, a);
2952
+ return r.common.async ? $.mergeObjectAsync(n, a) : $.mergeObjectSync(n, a);
2953
2953
  }
2954
2954
  get element() {
2955
2955
  return this._def.valueType;
2956
2956
  }
2957
2957
  static create(t, n, r) {
2958
- return n instanceof k ? new Ot(d({
2958
+ return n instanceof k ? new It(d({
2959
2959
  keyType: t,
2960
2960
  valueType: n,
2961
2961
  typeName: g.ZodRecord
2962
- }, b(r))) : new Ot(d({
2963
- keyType: oe.create(),
2962
+ }, b(r))) : new It(d({
2963
+ keyType: le.create(),
2964
2964
  valueType: t,
2965
2965
  typeName: g.ZodRecord
2966
2966
  }, b(n)));
2967
2967
  }
2968
2968
  }
2969
- class Vn extends k {
2969
+ class qn extends k {
2970
2970
  get keySchema() {
2971
2971
  return this._def.keyType;
2972
2972
  }
@@ -2982,8 +2982,8 @@ class Vn extends k {
2982
2982
  received: r.parsedType
2983
2983
  }), m;
2984
2984
  const a = this._def.keyType, i = this._def.valueType, s = [...r.data.entries()].map(([o, c], l) => ({
2985
- key: a._parse(new re(r, o, r.path, [l, "key"])),
2986
- value: i._parse(new re(r, c, r.path, [l, "value"]))
2985
+ key: a._parse(new ae(r, o, r.path, [l, "key"])),
2986
+ value: i._parse(new ae(r, c, r.path, [l, "value"]))
2987
2987
  }));
2988
2988
  if (r.common.async) {
2989
2989
  const o = /* @__PURE__ */ new Map();
@@ -3008,12 +3008,12 @@ class Vn extends k {
3008
3008
  }
3009
3009
  }
3010
3010
  }
3011
- Vn.create = (e, t, n) => new Vn(d({
3011
+ qn.create = (e, t, n) => new qn(d({
3012
3012
  valueType: t,
3013
3013
  keyType: e,
3014
3014
  typeName: g.ZodMap
3015
3015
  }, b(n)));
3016
- class rt extends k {
3016
+ class at extends k {
3017
3017
  _parse(t) {
3018
3018
  const { status: n, ctx: r } = this._processInputParams(t);
3019
3019
  if (r.parsedType !== _.set)
@@ -3048,16 +3048,16 @@ class rt extends k {
3048
3048
  }
3049
3049
  return { status: n.value, value: l };
3050
3050
  }
3051
- const o = [...r.data.values()].map((c, l) => i._parse(new re(r, c, r.path, l)));
3051
+ const o = [...r.data.values()].map((c, l) => i._parse(new ae(r, c, r.path, l)));
3052
3052
  return r.common.async ? Promise.all(o).then((c) => s(c)) : s(o);
3053
3053
  }
3054
3054
  min(t, n) {
3055
- return new rt(v(d({}, this._def), {
3055
+ return new at(v(d({}, this._def), {
3056
3056
  minSize: { value: t, message: p.toString(n) }
3057
3057
  }));
3058
3058
  }
3059
3059
  max(t, n) {
3060
- return new rt(v(d({}, this._def), {
3060
+ return new at(v(d({}, this._def), {
3061
3061
  maxSize: { value: t, message: p.toString(n) }
3062
3062
  }));
3063
3063
  }
@@ -3068,13 +3068,13 @@ class rt extends k {
3068
3068
  return this.min(1, t);
3069
3069
  }
3070
3070
  }
3071
- rt.create = (e, t) => new rt(d({
3071
+ at.create = (e, t) => new at(d({
3072
3072
  valueType: e,
3073
3073
  minSize: null,
3074
3074
  maxSize: null,
3075
3075
  typeName: g.ZodSet
3076
3076
  }, b(t)));
3077
- class Hn extends k {
3077
+ class Gn extends k {
3078
3078
  get schema() {
3079
3079
  return this._def.getter();
3080
3080
  }
@@ -3083,11 +3083,11 @@ class Hn extends k {
3083
3083
  return this._def.getter()._parse({ data: n.data, path: n.path, parent: n });
3084
3084
  }
3085
3085
  }
3086
- Hn.create = (e, t) => new Hn(d({
3086
+ Gn.create = (e, t) => new Gn(d({
3087
3087
  getter: e,
3088
3088
  typeName: g.ZodLazy
3089
3089
  }, b(t)));
3090
- class nn extends k {
3090
+ class sn extends k {
3091
3091
  _parse(t) {
3092
3092
  if (t.data !== this._def.value) {
3093
3093
  const n = this._getOrReturnCtx(t);
@@ -3103,17 +3103,17 @@ class nn extends k {
3103
3103
  return this._def.value;
3104
3104
  }
3105
3105
  }
3106
- nn.create = (e, t) => new nn(d({
3106
+ sn.create = (e, t) => new sn(d({
3107
3107
  value: e,
3108
3108
  typeName: g.ZodLiteral
3109
3109
  }, b(t)));
3110
- function Zr(e, t) {
3111
- return new ze(d({
3110
+ function Lr(e, t) {
3111
+ return new Le(d({
3112
3112
  values: e,
3113
3113
  typeName: g.ZodEnum
3114
3114
  }, b(t)));
3115
3115
  }
3116
- class ze extends k {
3116
+ class Le extends k {
3117
3117
  _parse(t) {
3118
3118
  if (typeof t.data != "string") {
3119
3119
  const n = this._getOrReturnCtx(t), r = this._def.values;
@@ -3155,14 +3155,14 @@ class ze extends k {
3155
3155
  return t;
3156
3156
  }
3157
3157
  extract(t, n = this._def) {
3158
- return ze.create(t, d(d({}, this._def), n));
3158
+ return Le.create(t, d(d({}, this._def), n));
3159
3159
  }
3160
3160
  exclude(t, n = this._def) {
3161
- return ze.create(this.options.filter((r) => !t.includes(r)), d(d({}, this._def), n));
3161
+ return Le.create(this.options.filter((r) => !t.includes(r)), d(d({}, this._def), n));
3162
3162
  }
3163
3163
  }
3164
- ze.create = Zr;
3165
- class Wn extends k {
3164
+ Le.create = Lr;
3165
+ class Kn extends k {
3166
3166
  _parse(t) {
3167
3167
  const n = E.getValidEnumValues(this._def.values), r = this._getOrReturnCtx(t);
3168
3168
  if (r.parsedType !== _.string && r.parsedType !== _.number) {
@@ -3187,11 +3187,11 @@ class Wn extends k {
3187
3187
  return this._def.values;
3188
3188
  }
3189
3189
  }
3190
- Wn.create = (e, t) => new Wn(d({
3190
+ Kn.create = (e, t) => new Kn(d({
3191
3191
  values: e,
3192
3192
  typeName: g.ZodNativeEnum
3193
3193
  }, b(t)));
3194
- class Ct extends k {
3194
+ class Zt extends k {
3195
3195
  unwrap() {
3196
3196
  return this._def.type;
3197
3197
  }
@@ -3210,11 +3210,11 @@ class Ct extends k {
3210
3210
  })));
3211
3211
  }
3212
3212
  }
3213
- Ct.create = (e, t) => new Ct(d({
3213
+ Zt.create = (e, t) => new Zt(d({
3214
3214
  type: e,
3215
3215
  typeName: g.ZodPromise
3216
3216
  }, b(t)));
3217
- class De extends k {
3217
+ class Fe extends k {
3218
3218
  innerType() {
3219
3219
  return this._def.schema;
3220
3220
  }
@@ -3241,7 +3241,7 @@ class De extends k {
3241
3241
  path: r.path,
3242
3242
  parent: r
3243
3243
  });
3244
- return c.status === "aborted" ? m : c.status === "dirty" || n.value === "dirty" ? We(c.value) : c;
3244
+ return c.status === "aborted" ? m : c.status === "dirty" || n.value === "dirty" ? Ge(c.value) : c;
3245
3245
  }));
3246
3246
  {
3247
3247
  if (n.value === "aborted")
@@ -3251,7 +3251,7 @@ class De extends k {
3251
3251
  path: r.path,
3252
3252
  parent: r
3253
3253
  });
3254
- return o.status === "aborted" ? m : o.status === "dirty" || n.value === "dirty" ? We(o.value) : o;
3254
+ return o.status === "aborted" ? m : o.status === "dirty" || n.value === "dirty" ? Ge(o.value) : o;
3255
3255
  }
3256
3256
  }
3257
3257
  if (a.type === "refinement") {
@@ -3280,26 +3280,26 @@ class De extends k {
3280
3280
  path: r.path,
3281
3281
  parent: r
3282
3282
  });
3283
- if (!Ie(s))
3283
+ if (!ze(s))
3284
3284
  return m;
3285
3285
  const o = a.transform(s.value, i);
3286
3286
  if (o instanceof Promise)
3287
3287
  throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
3288
3288
  return { status: n.value, value: o };
3289
3289
  } else
3290
- return this._def.schema._parseAsync({ data: r.data, path: r.path, parent: r }).then((s) => Ie(s) ? Promise.resolve(a.transform(s.value, i)).then((o) => ({
3290
+ return this._def.schema._parseAsync({ data: r.data, path: r.path, parent: r }).then((s) => ze(s) ? Promise.resolve(a.transform(s.value, i)).then((o) => ({
3291
3291
  status: n.value,
3292
3292
  value: o
3293
3293
  })) : m);
3294
3294
  E.assertNever(a);
3295
3295
  }
3296
3296
  }
3297
- De.create = (e, t, n) => new De(d({
3297
+ Fe.create = (e, t, n) => new Fe(d({
3298
3298
  schema: e,
3299
3299
  typeName: g.ZodEffects,
3300
3300
  effect: t
3301
3301
  }, b(n)));
3302
- De.createWithPreprocess = (e, t, n) => new De(d({
3302
+ Fe.createWithPreprocess = (e, t, n) => new Fe(d({
3303
3303
  schema: t,
3304
3304
  effect: { type: "preprocess", transform: e },
3305
3305
  typeName: g.ZodEffects
@@ -3316,7 +3316,7 @@ me.create = (e, t) => new me(d({
3316
3316
  innerType: e,
3317
3317
  typeName: g.ZodOptional
3318
3318
  }, b(t)));
3319
- class Le extends k {
3319
+ class je extends k {
3320
3320
  _parse(t) {
3321
3321
  return this._getType(t) === _.null ? G(null) : this._def.innerType._parse(t);
3322
3322
  }
@@ -3324,11 +3324,11 @@ class Le extends k {
3324
3324
  return this._def.innerType;
3325
3325
  }
3326
3326
  }
3327
- Le.create = (e, t) => new Le(d({
3327
+ je.create = (e, t) => new je(d({
3328
3328
  innerType: e,
3329
3329
  typeName: g.ZodNullable
3330
3330
  }, b(t)));
3331
- class rn extends k {
3331
+ class on extends k {
3332
3332
  _parse(t) {
3333
3333
  const { ctx: n } = this._processInputParams(t);
3334
3334
  let r = n.data;
@@ -3342,12 +3342,12 @@ class rn extends k {
3342
3342
  return this._def.innerType;
3343
3343
  }
3344
3344
  }
3345
- rn.create = (e, t) => new rn(d({
3345
+ on.create = (e, t) => new on(d({
3346
3346
  innerType: e,
3347
3347
  typeName: g.ZodDefault,
3348
3348
  defaultValue: typeof t.default == "function" ? t.default : () => t.default
3349
3349
  }, b(t)));
3350
- class an extends k {
3350
+ class ln extends k {
3351
3351
  _parse(t) {
3352
3352
  const { ctx: n } = this._processInputParams(t), r = v(d({}, n), {
3353
3353
  common: v(d({}, n.common), {
@@ -3358,7 +3358,7 @@ class an extends k {
3358
3358
  path: r.path,
3359
3359
  parent: d({}, r)
3360
3360
  });
3361
- return St(a) ? a.then((i) => ({
3361
+ return Ot(a) ? a.then((i) => ({
3362
3362
  status: "valid",
3363
3363
  value: i.status === "valid" ? i.value : this._def.catchValue({
3364
3364
  get error() {
@@ -3380,12 +3380,12 @@ class an extends k {
3380
3380
  return this._def.innerType;
3381
3381
  }
3382
3382
  }
3383
- an.create = (e, t) => new an(d({
3383
+ ln.create = (e, t) => new ln(d({
3384
3384
  innerType: e,
3385
3385
  typeName: g.ZodCatch,
3386
3386
  catchValue: typeof t.catch == "function" ? t.catch : () => t.catch
3387
3387
  }, b(t)));
3388
- class qn extends k {
3388
+ class Jn extends k {
3389
3389
  _parse(t) {
3390
3390
  if (this._getType(t) !== _.nan) {
3391
3391
  const r = this._getOrReturnCtx(t);
@@ -3398,10 +3398,10 @@ class qn extends k {
3398
3398
  return { status: "valid", value: t.data };
3399
3399
  }
3400
3400
  }
3401
- qn.create = (e) => new qn(d({
3401
+ Jn.create = (e) => new Jn(d({
3402
3402
  typeName: g.ZodNaN
3403
3403
  }, b(e)));
3404
- class ns extends k {
3404
+ class is extends k {
3405
3405
  _parse(t) {
3406
3406
  const { ctx: n } = this._processInputParams(t), r = n.data;
3407
3407
  return this._def.type._parse({
@@ -3414,7 +3414,7 @@ class ns extends k {
3414
3414
  return this._def.type;
3415
3415
  }
3416
3416
  }
3417
- class gn extends k {
3417
+ class vn extends k {
3418
3418
  _parse(t) {
3419
3419
  const { status: n, ctx: r } = this._processInputParams(t);
3420
3420
  if (r.common.async)
@@ -3424,7 +3424,7 @@ class gn extends k {
3424
3424
  path: r.path,
3425
3425
  parent: r
3426
3426
  });
3427
- return i.status === "aborted" ? m : i.status === "dirty" ? (n.dirty(), We(i.value)) : this._def.out._parseAsync({
3427
+ return i.status === "aborted" ? m : i.status === "dirty" ? (n.dirty(), Ge(i.value)) : this._def.out._parseAsync({
3428
3428
  data: i.value,
3429
3429
  path: r.path,
3430
3430
  parent: r
@@ -3447,23 +3447,23 @@ class gn extends k {
3447
3447
  }
3448
3448
  }
3449
3449
  static create(t, n) {
3450
- return new gn({
3450
+ return new vn({
3451
3451
  in: t,
3452
3452
  out: n,
3453
3453
  typeName: g.ZodPipeline
3454
3454
  });
3455
3455
  }
3456
3456
  }
3457
- class sn extends k {
3457
+ class cn extends k {
3458
3458
  _parse(t) {
3459
- const n = this._def.innerType._parse(t), r = (a) => (Ie(a) && (a.value = Object.freeze(a.value)), a);
3460
- return St(n) ? n.then((a) => r(a)) : r(n);
3459
+ const n = this._def.innerType._parse(t), r = (a) => (ze(a) && (a.value = Object.freeze(a.value)), a);
3460
+ return Ot(n) ? n.then((a) => r(a)) : r(n);
3461
3461
  }
3462
3462
  unwrap() {
3463
3463
  return this._def.innerType;
3464
3464
  }
3465
3465
  }
3466
- sn.create = (e, t) => new sn(d({
3466
+ cn.create = (e, t) => new cn(d({
3467
3467
  innerType: e,
3468
3468
  typeName: g.ZodReadonly
3469
3469
  }, b(t)));
@@ -3471,75 +3471,75 @@ var g;
3471
3471
  (function(e) {
3472
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";
3473
3473
  })(g || (g = {}));
3474
- const pt = oe.create, rs = Ze.create, X = Qt.create, as = en.create;
3474
+ const vt = le.create, ss = De.create, K = nn.create, os = rn.create;
3475
3475
  ye.create;
3476
- const Kn = ne.create, gt = I.create, is = Et.create;
3477
- At.create;
3476
+ const Xn = re.create, bt = z.create, ls = Rt.create;
3477
+ Nt.create;
3478
3478
  Te.create;
3479
- const ss = Ot.create, Gn = nn.create, mt = ze.create;
3480
- Ct.create;
3479
+ const cs = It.create, Yn = sn.create, wt = Le.create;
3480
+ Zt.create;
3481
3481
  me.create;
3482
- Le.create;
3483
- const os = gt({
3484
- language: mt(["typescript", "javascript"]).optional(),
3485
- disableMarkedForExport: X().optional(),
3486
- allowAutoSelectFirstNode: X().optional().default(!0),
3487
- enableDisplayDataId: X().optional(),
3488
- enableDisplayDataName: X().optional()
3482
+ je.create;
3483
+ const ds = bt({
3484
+ language: wt(["typescript", "javascript"]).optional(),
3485
+ disableMarkedForExport: K().optional(),
3486
+ allowAutoSelectFirstNode: K().optional().default(!0),
3487
+ enableDisplayDataId: K().optional(),
3488
+ enableDisplayDataName: K().optional()
3489
3489
  }).and(
3490
- is([
3491
- gt({
3492
- framework: Gn("react"),
3493
- model: pt().optional(),
3494
- styling: mt(["plain_css", "tailwind", "inline_styles"]),
3495
- uiLibrary: mt(["mui", "antd", "radix", "shadcn", "clean_react"]).optional(),
3496
- responsivePages: Kn(
3497
- gt({
3498
- name: pt(),
3499
- framesId: Kn(pt())
3490
+ ls([
3491
+ bt({
3492
+ framework: Yn("react"),
3493
+ model: vt().optional(),
3494
+ styling: wt(["plain_css", "tailwind", "inline_styles"]),
3495
+ uiLibrary: wt(["mui", "antd", "radix", "shadcn", "clean_react"]).optional(),
3496
+ responsivePages: Xn(
3497
+ bt({
3498
+ name: vt(),
3499
+ framesId: Xn(vt())
3500
3500
  })
3501
3501
  ).optional(),
3502
- enableUILibraryTheming: X().optional(),
3503
- enableCompactStructure: X().optional(),
3504
- enableDisplayScreenModelId: X().optional(),
3505
- enableGeneratePackageLock: X().optional(),
3506
- enableAnimationsPreset: X().optional(),
3507
- enableAutoSplit: X().optional(),
3508
- autoSplitThreshold: rs().optional(),
3509
- url: pt().url().optional(),
3510
- codegenSettings: ss(as()).optional()
3502
+ enableUILibraryTheming: K().optional(),
3503
+ enableCompactStructure: K().optional(),
3504
+ enableDisplayScreenModelId: K().optional(),
3505
+ enableGeneratePackageLock: K().optional(),
3506
+ enableAnimationsPreset: K().optional(),
3507
+ enableAutoSplit: K().optional(),
3508
+ autoSplitThreshold: ss().optional(),
3509
+ url: vt().url().optional(),
3510
+ codegenSettings: cs(os()).optional()
3511
3511
  }),
3512
- gt({
3513
- framework: Gn("html"),
3514
- styling: mt(["plain_css", "inline_styles", "tailwind"]),
3515
- enableTranslation: X().optional()
3512
+ bt({
3513
+ framework: Yn("html"),
3514
+ styling: wt(["plain_css", "inline_styles", "tailwind"]),
3515
+ enableTranslation: K().optional()
3516
3516
  })
3517
3517
  ])
3518
- ), ls = (e) => {
3519
- const t = os.safeParse(e);
3518
+ ), us = (e) => {
3519
+ const t = ds.safeParse(e);
3520
3520
  if (t.success === !1) {
3521
3521
  const n = new Error("Invalid codegen settings");
3522
3522
  throw n.cause = t.error, n;
3523
3523
  }
3524
3524
  return t.data;
3525
- }, zr = (e, t) => {
3525
+ }, Fr = (e, t) => {
3526
3526
  if (e.id === t)
3527
3527
  return e;
3528
3528
  if ("children" in e)
3529
3529
  for (const n of e.children) {
3530
- const r = zr(n, t);
3530
+ const r = Fr(n, t);
3531
3531
  if (r)
3532
3532
  return r;
3533
3533
  }
3534
3534
  return null;
3535
- }, Xn = /* @__PURE__ */ new Set([
3535
+ }, Qn = /* @__PURE__ */ new Set([
3536
3536
  "FRAME",
3537
3537
  "INSTANCE",
3538
3538
  "COMPONENT",
3539
3539
  "COMPONENT_SET",
3540
3540
  "GROUP"
3541
- ]), cs = (e, t, n = { allowAutoSelectFirstNode: !0 }) => {
3542
- const r = zr(e.document, t);
3541
+ ]), fs = (e, t, n = { allowAutoSelectFirstNode: !0 }) => {
3542
+ const r = Fr(e.document, t);
3543
3543
  if (!r)
3544
3544
  return {
3545
3545
  isValid: !1,
@@ -3547,7 +3547,7 @@ const os = gt({
3547
3547
  };
3548
3548
  if (r.type === "CANVAS") {
3549
3549
  const a = r.children.filter(
3550
- (i) => Xn.has(i.type)
3550
+ (i) => Qn.has(i.type)
3551
3551
  );
3552
3552
  return a.length === 0 ? {
3553
3553
  isValid: !1,
@@ -3565,20 +3565,20 @@ const os = gt({
3565
3565
  reason: "Selected node is a page with multiple children"
3566
3566
  };
3567
3567
  }
3568
- return Xn.has(r.type) ? { isValid: !0, node: r } : {
3568
+ return Qn.has(r.type) ? { isValid: !0, node: r } : {
3569
3569
  isValid: !1,
3570
3570
  reason: "Selected node type is not supported"
3571
3571
  };
3572
3572
  };
3573
- function ds(e) {
3573
+ function hs(e) {
3574
3574
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
3575
3575
  }
3576
- var vt = { exports: {} }, us = vt.exports, Yn;
3577
- function fs() {
3578
- return Yn || (Yn = 1, (function(e, t) {
3576
+ var kt = { exports: {} }, _s = kt.exports, er;
3577
+ function ps() {
3578
+ return er || (er = 1, (function(e, t) {
3579
3579
  (function(n, r) {
3580
3580
  e.exports = r();
3581
- })(us, (function() {
3581
+ })(_s, (function() {
3582
3582
  var n = typeof Promise == "function", r = (function(R) {
3583
3583
  if (typeof globalThis == "object")
3584
3584
  return globalThis;
@@ -3588,18 +3588,18 @@ function fs() {
3588
3588
  },
3589
3589
  configurable: !0
3590
3590
  });
3591
- var L = typeDetectGlobalObject;
3592
- return delete R.typeDetectGlobalObject, L;
3593
- })(Object.prototype), a = typeof Symbol != "undefined", i = typeof Map != "undefined", s = typeof Set != "undefined", o = typeof WeakMap != "undefined", c = typeof WeakSet != "undefined", l = typeof DataView != "undefined", h = a && typeof Symbol.iterator != "undefined", S = a && typeof Symbol.toStringTag != "undefined", y = s && typeof Set.prototype.entries == "function", N = i && typeof Map.prototype.entries == "function", Z = y && Object.getPrototypeOf((/* @__PURE__ */ new Set()).entries()), B = N && Object.getPrototypeOf((/* @__PURE__ */ new Map()).entries()), Ue = h && typeof Array.prototype[Symbol.iterator] == "function", ct = Ue && Object.getPrototypeOf([][Symbol.iterator]()), Pe = h && typeof String.prototype[Symbol.iterator] == "function", dt = Pe && Object.getPrototypeOf(""[Symbol.iterator]()), ut = 8, ft = -1;
3594
- function ht(R) {
3595
- var L = typeof R;
3596
- if (L !== "object")
3597
- return L;
3591
+ var ve = typeDetectGlobalObject;
3592
+ return delete R.typeDetectGlobalObject, ve;
3593
+ })(Object.prototype), a = typeof Symbol != "undefined", i = typeof Map != "undefined", s = typeof Set != "undefined", o = typeof WeakMap != "undefined", c = typeof WeakSet != "undefined", l = typeof DataView != "undefined", h = a && typeof Symbol.iterator != "undefined", T = a && typeof Symbol.toStringTag != "undefined", y = s && typeof Set.prototype.entries == "function", N = i && typeof Map.prototype.entries == "function", I = y && Object.getPrototypeOf((/* @__PURE__ */ new Set()).entries()), P = N && Object.getPrototypeOf((/* @__PURE__ */ new Map()).entries()), Be = h && typeof Array.prototype[Symbol.iterator] == "function", ft = Be && Object.getPrototypeOf([][Symbol.iterator]()), Ve = h && typeof String.prototype[Symbol.iterator] == "function", ht = Ve && Object.getPrototypeOf(""[Symbol.iterator]()), _t = 8, pt = -1;
3594
+ function gt(R) {
3595
+ var ve = typeof R;
3596
+ if (ve !== "object")
3597
+ return ve;
3598
3598
  if (R === null)
3599
3599
  return "null";
3600
3600
  if (R === r)
3601
3601
  return "global";
3602
- if (Array.isArray(R) && (S === !1 || !(Symbol.toStringTag in R)))
3602
+ if (Array.isArray(R) && (T === !1 || !(Symbol.toStringTag in R)))
3603
3603
  return "Array";
3604
3604
  if (typeof window == "object" && window !== null) {
3605
3605
  if (typeof window.location == "object" && R === window.location)
@@ -3621,18 +3621,18 @@ function fs() {
3621
3621
  return "HTMLTableHeaderCellElement";
3622
3622
  }
3623
3623
  }
3624
- var ve = S && R[Symbol.toStringTag];
3625
- if (typeof ve == "string")
3626
- return ve;
3627
- var z = Object.getPrototypeOf(R);
3628
- return z === RegExp.prototype ? "RegExp" : z === Date.prototype ? "Date" : n && z === Promise.prototype ? "Promise" : s && z === Set.prototype ? "Set" : i && z === Map.prototype ? "Map" : c && z === WeakSet.prototype ? "WeakSet" : o && z === WeakMap.prototype ? "WeakMap" : l && z === DataView.prototype ? "DataView" : i && z === B ? "Map Iterator" : s && z === Z ? "Set Iterator" : Ue && z === ct ? "Array Iterator" : Pe && z === dt ? "String Iterator" : z === null ? "Object" : Object.prototype.toString.call(R).slice(ut, ft);
3624
+ var Ee = T && R[Symbol.toStringTag];
3625
+ if (typeof Ee == "string")
3626
+ return Ee;
3627
+ var Z = Object.getPrototypeOf(R);
3628
+ return Z === RegExp.prototype ? "RegExp" : Z === Date.prototype ? "Date" : n && Z === Promise.prototype ? "Promise" : s && Z === Set.prototype ? "Set" : i && Z === Map.prototype ? "Map" : c && Z === WeakSet.prototype ? "WeakSet" : o && Z === WeakMap.prototype ? "WeakMap" : l && Z === DataView.prototype ? "DataView" : i && Z === P ? "Map Iterator" : s && Z === I ? "Set Iterator" : Be && Z === ft ? "Array Iterator" : Ve && Z === ht ? "String Iterator" : Z === null ? "Object" : Object.prototype.toString.call(R).slice(_t, pt);
3629
3629
  }
3630
- return ht;
3630
+ return gt;
3631
3631
  }));
3632
- })(vt)), vt.exports;
3632
+ })(kt)), kt.exports;
3633
3633
  }
3634
- var hs = fs();
3635
- const _s = /* @__PURE__ */ ds(hs), mn = typeof Buffer != "undefined", ps = mn && typeof Buffer.from != "undefined", gs = mn ? (
3634
+ var gs = ps();
3635
+ const ms = /* @__PURE__ */ hs(gs), bn = typeof Buffer != "undefined", ys = bn && typeof Buffer.from != "undefined", vs = bn ? (
3636
3636
  /**
3637
3637
  * is value is Buffer?
3638
3638
  *
@@ -3653,7 +3653,7 @@ const _s = /* @__PURE__ */ ds(hs), mn = typeof Buffer != "undefined", ps = mn &&
3653
3653
  function() {
3654
3654
  return !1;
3655
3655
  }
3656
- ), ms = ps ? (
3656
+ ), bs = ys ? (
3657
3657
  /**
3658
3658
  * copy Buffer
3659
3659
  *
@@ -3663,7 +3663,7 @@ const _s = /* @__PURE__ */ ds(hs), mn = typeof Buffer != "undefined", ps = mn &&
3663
3663
  function(t) {
3664
3664
  return Buffer.from(t);
3665
3665
  }
3666
- ) : mn ? (
3666
+ ) : bn ? (
3667
3667
  /**
3668
3668
  * copy Buffer
3669
3669
  *
@@ -3688,18 +3688,18 @@ const _s = /* @__PURE__ */ ds(hs), mn = typeof Buffer != "undefined", ps = mn &&
3688
3688
  return t;
3689
3689
  }
3690
3690
  );
3691
- function Fe(e) {
3692
- return gs(e) ? "Buffer" : _s(e);
3691
+ function $e(e) {
3692
+ return vs(e) ? "Buffer" : ms(e);
3693
3693
  }
3694
- const ys = /* @__PURE__ */ new Set([
3694
+ const ws = /* @__PURE__ */ new Set([
3695
3695
  "Arguments",
3696
3696
  "Array",
3697
3697
  "Map",
3698
3698
  "Object",
3699
3699
  "Set"
3700
3700
  ]);
3701
- function vs(e, t, n = null) {
3702
- switch (n || Fe(e)) {
3701
+ function xs(e, t, n = null) {
3702
+ switch (n || $e(e)) {
3703
3703
  case "Arguments":
3704
3704
  case "Array":
3705
3705
  case "Object":
@@ -3710,11 +3710,11 @@ function vs(e, t, n = null) {
3710
3710
  return t;
3711
3711
  }
3712
3712
  }
3713
- function on(e) {
3714
- return ys.has(e);
3713
+ function dn(e) {
3714
+ return ws.has(e);
3715
3715
  }
3716
- function Jn(e, t, n, r = null) {
3717
- switch (r || Fe(e)) {
3716
+ function tr(e, t, n, r = null) {
3717
+ switch (r || $e(e)) {
3718
3718
  case "Arguments":
3719
3719
  case "Array":
3720
3720
  case "Object":
@@ -3729,95 +3729,95 @@ function Jn(e, t, n, r = null) {
3729
3729
  }
3730
3730
  return e;
3731
3731
  }
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")();
3733
- function ks(e) {
3732
+ const ks = typeof globalThis != "undefined" && globalThis !== null && globalThis.Object === Object && globalThis, Ss = typeof global != "undefined" && global !== null && global.Object === Object && global, Ts = typeof self != "undefined" && self !== null && self.Object === Object && self, Ht = ks || Ss || Ts || Function("return this")();
3733
+ function Es(e) {
3734
3734
  return e.slice(0);
3735
3735
  }
3736
- function Ss(e) {
3736
+ function As(e) {
3737
3737
  return new Boolean(e.valueOf());
3738
3738
  }
3739
- function Ts(e) {
3739
+ function Os(e) {
3740
3740
  return new DataView(e.buffer);
3741
3741
  }
3742
- function Es(e) {
3743
- return ms(e);
3742
+ function Cs(e) {
3743
+ return bs(e);
3744
3744
  }
3745
- function As(e) {
3745
+ function Rs(e) {
3746
3746
  return new Date(e.getTime());
3747
3747
  }
3748
- function Os(e) {
3748
+ function Ns(e) {
3749
3749
  return new Number(e);
3750
3750
  }
3751
- function Cs(e) {
3751
+ function Is(e) {
3752
3752
  return new RegExp(e.source, e.flags);
3753
3753
  }
3754
- function Rs(e) {
3754
+ function Zs(e) {
3755
3755
  return new String(e);
3756
3756
  }
3757
- function ae(e, t) {
3758
- return Pt[t].from ? Pt[t].from(e) : new Pt[t](e);
3757
+ function ie(e, t) {
3758
+ return Ht[t].from ? Ht[t].from(e) : new Ht[t](e);
3759
3759
  }
3760
- function $(e) {
3760
+ function F(e) {
3761
3761
  return e;
3762
3762
  }
3763
- function Qn() {
3763
+ function nr() {
3764
3764
  return [];
3765
3765
  }
3766
- function Ns() {
3766
+ function zs() {
3767
3767
  return /* @__PURE__ */ new Map();
3768
3768
  }
3769
- function Is() {
3769
+ function Ds() {
3770
3770
  return {};
3771
3771
  }
3772
- function Zs() {
3772
+ function Ls() {
3773
3773
  return /* @__PURE__ */ new Set();
3774
3774
  }
3775
- const zs = /* @__PURE__ */ new Map([
3775
+ const Fs = /* @__PURE__ */ new Map([
3776
3776
  // deep copy
3777
- ["ArrayBuffer", ks],
3778
- ["Boolean", Ss],
3779
- ["Buffer", Es],
3780
- ["DataView", Ts],
3781
- ["Date", As],
3782
- ["Number", Os],
3783
- ["RegExp", Cs],
3784
- ["String", Rs],
3777
+ ["ArrayBuffer", Es],
3778
+ ["Boolean", As],
3779
+ ["Buffer", Cs],
3780
+ ["DataView", Os],
3781
+ ["Date", Rs],
3782
+ ["Number", Ns],
3783
+ ["RegExp", Is],
3784
+ ["String", Zs],
3785
3785
  // typed arrays
3786
3786
  // TODO: pass bound function
3787
- ["Float32Array", ae],
3788
- ["Float64Array", ae],
3789
- ["Int16Array", ae],
3790
- ["Int32Array", ae],
3791
- ["Int8Array", ae],
3792
- ["Uint16Array", ae],
3793
- ["Uint32Array", ae],
3794
- ["Uint8Array", ae],
3795
- ["Uint8ClampedArray", ae],
3787
+ ["Float32Array", ie],
3788
+ ["Float64Array", ie],
3789
+ ["Int16Array", ie],
3790
+ ["Int32Array", ie],
3791
+ ["Int8Array", ie],
3792
+ ["Uint16Array", ie],
3793
+ ["Uint32Array", ie],
3794
+ ["Uint8Array", ie],
3795
+ ["Uint8ClampedArray", ie],
3796
3796
  // shallow copy
3797
- ["Array Iterator", $],
3798
- ["Map Iterator", $],
3799
- ["Promise", $],
3800
- ["Set Iterator", $],
3801
- ["String Iterator", $],
3802
- ["function", $],
3803
- ["global", $],
3797
+ ["Array Iterator", F],
3798
+ ["Map Iterator", F],
3799
+ ["Promise", F],
3800
+ ["Set Iterator", F],
3801
+ ["String Iterator", F],
3802
+ ["function", F],
3803
+ ["global", F],
3804
3804
  // NOTE: WeakMap and WeakSet cannot get entries
3805
- ["WeakMap", $],
3806
- ["WeakSet", $],
3805
+ ["WeakMap", F],
3806
+ ["WeakSet", F],
3807
3807
  // primitives
3808
- ["boolean", $],
3809
- ["null", $],
3810
- ["number", $],
3811
- ["string", $],
3812
- ["symbol", $],
3813
- ["undefined", $],
3808
+ ["boolean", F],
3809
+ ["null", F],
3810
+ ["number", F],
3811
+ ["string", F],
3812
+ ["symbol", F],
3813
+ ["undefined", F],
3814
3814
  // collections
3815
3815
  // NOTE: return empty value, because recursively copy later.
3816
- ["Arguments", Qn],
3817
- ["Array", Qn],
3818
- ["Map", Ns],
3819
- ["Object", Is],
3820
- ["Set", Zs]
3816
+ ["Arguments", nr],
3817
+ ["Array", nr],
3818
+ ["Map", zs],
3819
+ ["Object", Ds],
3820
+ ["Set", Ls]
3821
3821
  // NOTE: type-detect returns following types
3822
3822
  // 'Location'
3823
3823
  // 'Document'
@@ -3829,11 +3829,11 @@ const zs = /* @__PURE__ */ new Map([
3829
3829
  // TODO: is type-detect never return 'object'?
3830
3830
  // 'object'
3831
3831
  ]);
3832
- function Ds() {
3832
+ function js() {
3833
3833
  }
3834
- function ln(e, t = null, n = Ds) {
3834
+ function un(e, t = null, n = js) {
3835
3835
  arguments.length === 2 && typeof t == "function" && (n = t, t = null);
3836
- const r = t || Fe(e), a = zs.get(r);
3836
+ const r = t || $e(e), a = Fs.get(r);
3837
3837
  if (r === "Object") {
3838
3838
  const i = n(e, r);
3839
3839
  if (i !== void 0)
@@ -3841,7 +3841,7 @@ function ln(e, t = null, n = Ds) {
3841
3841
  }
3842
3842
  return a ? a(e, r) : e;
3843
3843
  }
3844
- function er(e, t = {}) {
3844
+ function rr(e, t = {}) {
3845
3845
  typeof t == "function" && (t = {
3846
3846
  customizer: t
3847
3847
  });
@@ -3850,15 +3850,15 @@ function er(e, t = {}) {
3850
3850
  customizer: n
3851
3851
  // TODO: max depth
3852
3852
  // depth = Infinity,
3853
- } = t, r = Fe(e);
3854
- if (!on(r))
3855
- return cn(e, null, null, null);
3856
- const a = ln(e, r, n), i = new WeakMap([[e, a]]), s = new WeakSet([e]);
3857
- return cn(e, a, i, s);
3853
+ } = t, r = $e(e);
3854
+ if (!dn(r))
3855
+ return fn(e, null, null, null);
3856
+ const a = un(e, r, n), i = new WeakMap([[e, a]]), s = new WeakSet([e]);
3857
+ return fn(e, a, i, s);
3858
3858
  }
3859
- function cn(e, t, n, r, a) {
3860
- const i = Fe(e), s = ln(e, i);
3861
- if (!on(i))
3859
+ function fn(e, t, n, r, a) {
3860
+ const i = $e(e), s = un(e, i);
3861
+ if (!dn(i))
3862
3862
  return s;
3863
3863
  let o;
3864
3864
  switch (i) {
@@ -3875,17 +3875,17 @@ function cn(e, t, n, r, a) {
3875
3875
  break;
3876
3876
  }
3877
3877
  for (let c of o) {
3878
- const l = vs(e, c, i);
3878
+ const l = xs(e, c, i);
3879
3879
  if (r.has(l))
3880
- Jn(t, c, n.get(l), i);
3880
+ tr(t, c, n.get(l), i);
3881
3881
  else {
3882
- const h = Fe(l), S = ln(l, h);
3883
- on(h) && (n.set(l, S), r.add(l)), Jn(
3882
+ const h = $e(l), T = un(l, h);
3883
+ dn(h) && (n.set(l, T), r.add(l)), tr(
3884
3884
  t,
3885
3885
  c,
3886
- cn(
3886
+ fn(
3887
3887
  l,
3888
- S,
3888
+ T,
3889
3889
  n,
3890
3890
  r
3891
3891
  ),
@@ -3895,39 +3895,39 @@ function cn(e, t, n, r, a) {
3895
3895
  }
3896
3896
  return t;
3897
3897
  }
3898
- var at, Ce, se, q, P, dn, bt, qe;
3899
- class Ls {
3898
+ var it, Ne, oe, W, U, hn, St, Ke;
3899
+ class $s {
3900
3900
  constructor({
3901
3901
  fetch: t = globalThis.fetch.bind(globalThis),
3902
3902
  baseAddress: n = "https://api.figma.com/",
3903
3903
  defaultOptions: r = {}
3904
3904
  } = {}) {
3905
- Y(this, P);
3906
- Y(this, at);
3907
- Y(this, Ce);
3908
- Y(this, se);
3909
- Y(this, q);
3910
- W(this, at, n), W(this, Ce, t), W(this, q, r), W(this, se, w(this, q)), r.token && F(this, P, dn).call(this, r.token);
3905
+ X(this, U);
3906
+ X(this, it);
3907
+ X(this, Ne);
3908
+ X(this, oe);
3909
+ X(this, W);
3910
+ H(this, it, n), H(this, Ne, t), H(this, W, r), H(this, oe, w(this, W)), r.token && L(this, U, hn).call(this, r.token);
3911
3911
  }
3912
3912
  hasDefaultToken() {
3913
- return !!w(this, q).token;
3913
+ return !!w(this, W).token;
3914
3914
  }
3915
3915
  updateDefaultOptions(t) {
3916
- t.token && F(this, P, dn).call(this, t.token), W(this, q, d(d({}, w(this, q)), t)), W(this, se, w(this, q));
3916
+ t.token && L(this, U, hn).call(this, t.token), H(this, W, d(d({}, w(this, W)), t)), H(this, oe, w(this, W));
3917
3917
  }
3918
3918
  withOptions(t) {
3919
- return W(this, se, d(d(d({}, w(this, q)), w(this, se)), t)), this;
3919
+ return H(this, oe, d(d(d({}, w(this, W)), w(this, oe)), t)), this;
3920
3920
  }
3921
3921
  getHeaders(t) {
3922
3922
  const n = {
3923
3923
  "Content-Type": "application/json"
3924
- }, r = t != null ? t : w(this, q).token;
3924
+ }, r = t != null ? t : w(this, W).token;
3925
3925
  if (r != null && r.startsWith("figd_"))
3926
3926
  n["X-FIGMA-TOKEN"] = r;
3927
3927
  else if (r != null && r.startsWith("figu_"))
3928
3928
  n.Authorization = `Bearer ${r}`;
3929
3929
  else
3930
- throw new Ai();
3930
+ throw new Ri();
3931
3931
  return n;
3932
3932
  }
3933
3933
  getFile(a) {
@@ -3942,7 +3942,7 @@ class Ls {
3942
3942
  });
3943
3943
  n.length > 0 && i.append("ids", n.join(",")), r && i.append("depth", `${r}`);
3944
3944
  const s = i.toString(), o = `v1/files/${t}?${s}`;
3945
- return yield F(this, P, qe).call(this, o);
3945
+ return yield L(this, U, Ke).call(this, o);
3946
3946
  });
3947
3947
  }
3948
3948
  getNodeImages(s) {
@@ -3953,20 +3953,20 @@ class Ls {
3953
3953
  as: a = "arrayBuffer",
3954
3954
  format: i = "jpg"
3955
3955
  }) {
3956
- const c = (yield F(this, P, qe).call(this, `v1/images/${t}?ids=${n}&format=${i}&scale=${r}`)).images;
3956
+ const c = (yield L(this, U, Ke).call(this, `v1/images/${t}?ids=${n}&format=${i}&scale=${r}`)).images;
3957
3957
  if (a === "links")
3958
3958
  return c;
3959
3959
  const l = n.map((y) => O(this, null, function* () {
3960
3960
  const N = c[y];
3961
3961
  if (!N)
3962
3962
  return null;
3963
- const Z = yield w(this, Ce).call(this, N);
3964
- return Z.ok ? yield Z.arrayBuffer() : null;
3963
+ const I = yield w(this, Ne).call(this, N);
3964
+ return I.ok ? yield I.arrayBuffer() : null;
3965
3965
  })), h = yield Promise.allSettled(l);
3966
3966
  return n.reduce(
3967
- (y, N, Z) => {
3968
- const B = h[Z];
3969
- return B.status === "fulfilled" ? y[N] = B.value : y[N] = null, y;
3967
+ (y, N, I) => {
3968
+ const P = h[I];
3969
+ return P.status === "fulfilled" ? y[N] = P.value : y[N] = null, y;
3970
3970
  },
3971
3971
  {}
3972
3972
  );
@@ -3978,19 +3978,19 @@ class Ls {
3978
3978
  }) {
3979
3979
  var i, s;
3980
3980
  const r = `v1/files/${t}/images`;
3981
- return (s = (i = (yield F(this, P, qe).call(this, r)).meta) == null ? void 0 : i.images) != null ? s : {};
3981
+ return (s = (i = (yield L(this, U, Ke).call(this, r)).meta) == null ? void 0 : i.images) != null ? s : {};
3982
3982
  });
3983
3983
  }
3984
3984
  getMe() {
3985
3985
  return O(this, null, function* () {
3986
- return yield F(this, P, qe).call(this, "v1/me");
3986
+ return yield L(this, U, Ke).call(this, "v1/me");
3987
3987
  });
3988
3988
  }
3989
3989
  }
3990
- at = new WeakMap(), Ce = new WeakMap(), se = new WeakMap(), q = new WeakMap(), P = new WeakSet(), dn = function(t) {
3990
+ it = new WeakMap(), Ne = new WeakMap(), oe = new WeakMap(), W = new WeakMap(), U = new WeakSet(), hn = function(t) {
3991
3991
  if (!t.startsWith("figd_") && !t.startsWith("figu_"))
3992
- throw new Ei();
3993
- }, bt = function(t, n) {
3992
+ throw new Ci();
3993
+ }, St = function(t, n) {
3994
3994
  return O(this, null, function* () {
3995
3995
  var a;
3996
3996
  const r = yield n();
@@ -4002,13 +4002,13 @@ at = new WeakMap(), Ce = new WeakMap(), se = new WeakMap(), q = new WeakMap(), P
4002
4002
  } catch (o) {
4003
4003
  }
4004
4004
  if (i === 403)
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 });
4005
+ throw s != null && s.includes("Invalid token") ? new Zn() : s != null && s.includes("Token expired") ? new zn() : s != null && s.includes("File not exportable") ? new Dn() : new Ln({ reason: s });
4006
4006
  if (i === 404)
4007
- throw new Oi({ cause: r });
4007
+ throw new Ni({ cause: r });
4008
4008
  if (i === 429) {
4009
4009
  const o = r.headers.get("Retry-After"), c = o ? Number(o) : null;
4010
4010
  if (!c)
4011
- throw new zn({
4011
+ throw new Fn({
4012
4012
  cause: r
4013
4013
  });
4014
4014
  if (yield (a = t.onRateLimited) == null ? void 0 : a.call(t, {
@@ -4020,67 +4020,72 @@ at = new WeakMap(), Ce = new WeakMap(), se = new WeakMap(), q = new WeakMap(), P
4020
4020
  "X-Figma-Rate-Limit-Type"
4021
4021
  )
4022
4022
  }))
4023
- return new Promise((h, S) => {
4023
+ return new Promise((h, T) => {
4024
4024
  var N;
4025
4025
  const y = setTimeout(
4026
4026
  () => {
4027
- var Z;
4028
- (Z = t.abortSignal) != null && Z.aborted || F(this, P, bt).call(this, t, n).then(h).catch(S);
4027
+ var I;
4028
+ (I = t.abortSignal) != null && I.aborted || L(this, U, St).call(this, t, n).then(h).catch(T);
4029
4029
  },
4030
4030
  c * 1e3 + 1e3
4031
4031
  );
4032
4032
  (N = t.abortSignal) == null || N.addEventListener("abort", () => {
4033
- clearTimeout(y), S(new Error("The operation was aborted."));
4033
+ clearTimeout(y), T(new Error("The operation was aborted."));
4034
4034
  });
4035
4035
  });
4036
- throw new zn({ cause: r });
4037
- } else throw i === 500 && (s != null && s.includes("Request too large")) ? new Ri({ cause: r }) : new Ci({
4036
+ throw new Fn({ cause: r });
4037
+ } else throw i === 500 && (s != null && s.includes("Request too large")) ? new Zi({ cause: r }) : new Ii({
4038
4038
  cause: r
4039
4039
  });
4040
4040
  }
4041
4041
  return r;
4042
4042
  });
4043
- }, qe = function(t) {
4043
+ }, Ke = function(t) {
4044
4044
  return O(this, null, function* () {
4045
- const n = er(w(this, se));
4046
- W(this, se, er(w(this, q)));
4045
+ const n = rr(w(this, oe));
4046
+ H(this, oe, rr(w(this, W)));
4047
4047
  const r = () => O(this, null, function* () {
4048
- return yield w(this, Ce).call(this, `${w(this, at)}${t}`, {
4048
+ return yield w(this, Ne).call(this, `${w(this, it)}${t}`, {
4049
4049
  method: "GET",
4050
4050
  headers: this.getHeaders(n.token),
4051
4051
  signal: n.abortSignal
4052
4052
  });
4053
4053
  });
4054
4054
  try {
4055
- return yield (yield F(this, P, bt).call(this, n, r)).json();
4055
+ return yield (yield L(this, U, St).call(this, n, r)).json();
4056
4056
  } catch (a) {
4057
- if (n.onForbidden && (a instanceof Rn || a instanceof Nn || a instanceof In || a instanceof Zn)) {
4057
+ if (n.onForbidden && (a instanceof Zn || a instanceof zn || a instanceof Dn || a instanceof Ln)) {
4058
4058
  const i = yield n.onForbidden(a);
4059
4059
  if (i)
4060
- return n.token = i.retry.newToken, yield (yield F(this, P, bt).call(this, n, r)).json();
4060
+ return n.token = i.retry.newToken, yield (yield L(this, U, St).call(this, n, r)).json();
4061
4061
  }
4062
4062
  throw a;
4063
4063
  }
4064
4064
  });
4065
4065
  };
4066
- var C, it, st, le, Dr, Ke;
4067
- class Xs {
4066
+ const Ms = {
4067
+ codegen: "f2c",
4068
+ l2c: "l2c",
4069
+ p2c: "p2c"
4070
+ };
4071
+ var C, st, ot, ee, jr, Ce;
4072
+ class to {
4068
4073
  constructor({
4069
4074
  auth: t,
4070
4075
  apiBaseAddress: n = "https://public-api.animaapp.com",
4071
- figmaRestApi: r = new Ls()
4076
+ figmaRestApi: r = new $s()
4072
4077
  } = {}) {
4073
- Y(this, le);
4074
- Y(this, C);
4075
- Y(this, it);
4076
- Y(this, st);
4077
- W(this, it, n), W(this, st, r), t && (this.auth = t);
4078
+ X(this, ee);
4079
+ X(this, C);
4080
+ X(this, st);
4081
+ X(this, ot);
4082
+ H(this, st, n), H(this, ot, r), t && (this.auth = t);
4078
4083
  }
4079
4084
  hasAuth() {
4080
4085
  return !!w(this, C);
4081
4086
  }
4082
4087
  set auth(t) {
4083
- W(this, C, t);
4088
+ H(this, C, t);
4084
4089
  }
4085
4090
  get headers() {
4086
4091
  const t = {
@@ -4093,15 +4098,15 @@ class Xs {
4093
4098
  var l;
4094
4099
  let i;
4095
4100
  try {
4096
- i = yield w(this, st).withOptions({ token: t.figmaToken, abortSignal: r }).getFile({
4101
+ i = yield w(this, ot).withOptions({ token: t.figmaToken, abortSignal: r }).getFile({
4097
4102
  fileKey: t.fileKey
4098
4103
  });
4099
4104
  } catch (h) {
4100
4105
  if (h instanceof Error && h.name === "AbortError")
4101
4106
  throw h;
4102
4107
  }
4103
- const s = ls(t.settings);
4104
- i && (yield F(this, le, Dr).call(this, i, t.nodesId, {
4108
+ const s = us(t.settings);
4109
+ i && (yield L(this, ee, jr).call(this, i, t.nodesId, {
4105
4110
  allowAutoSelectFirstNode: (l = s.allowAutoSelectFirstNode) != null ? l : !0
4106
4111
  }));
4107
4112
  let o = t.tracking;
@@ -4137,7 +4142,7 @@ class Xs {
4137
4142
  // @ts-expect-error: We don't need to expose this parameter to GetCodeParams
4138
4143
  createSession: t.createSession
4139
4144
  };
4140
- return F(this, le, Ke).call(this, "/v1/codegen", c, n, "codegen", r);
4145
+ return L(this, ee, Ce).call(this, "POST", "/v1/codegen", c, n, "codegen", r);
4141
4146
  });
4142
4147
  }
4143
4148
  generateCodeFromWebsite(a) {
@@ -4184,7 +4189,7 @@ class Xs {
4184
4189
  engine: o
4185
4190
  }
4186
4191
  };
4187
- return F(this, le, Ke).call(this, "/v1/l2c", c, n, "l2c", r);
4192
+ return L(this, ee, Ce).call(this, "POST", "/v1/l2c", c, n, "l2c", r);
4188
4193
  });
4189
4194
  }
4190
4195
  /**
@@ -4239,7 +4244,7 @@ class Xs {
4239
4244
  }, (o = t.settings.codegenSettings) != null ? o : {}),
4240
4245
  webhookUrl: t.webhookUrl
4241
4246
  };
4242
- return F(this, le, Ke).call(this, "/v1/p2c", s, n, "p2c", r);
4247
+ return L(this, ee, Ce).call(this, "POST", "/v1/p2c", s, n, "p2c", r);
4243
4248
  });
4244
4249
  }
4245
4250
  /**
@@ -4254,14 +4259,20 @@ class Xs {
4254
4259
  assetsStorage: t.assetsStorage,
4255
4260
  params: t.params
4256
4261
  };
4257
- return F(this, le, Ke).call(this, "/v1/l2c", s, n, "l2c", r);
4262
+ return L(this, ee, Ce).call(this, "POST", "/v1/l2c", s, n, "l2c", r);
4263
+ });
4264
+ }
4265
+ attachToGenerationJob(a) {
4266
+ return O(this, arguments, function* (t, n = {}, r) {
4267
+ const i = {};
4268
+ return L(this, ee, Ce).call(this, "GET", `/v1/jobs/${t.sessionId}`, i, n, void 0, r);
4258
4269
  });
4259
4270
  }
4260
4271
  }
4261
- C = new WeakMap(), it = new WeakMap(), st = new WeakMap(), le = new WeakSet(), Dr = function(t, n, r) {
4272
+ C = new WeakMap(), st = new WeakMap(), ot = new WeakMap(), ee = new WeakSet(), jr = function(t, n, r) {
4262
4273
  return O(this, null, function* () {
4263
4274
  const i = n.map(
4264
- (s) => cs(t, s, r)
4275
+ (s) => fs(t, s, r)
4265
4276
  ).find(
4266
4277
  (s) => !s.isValid
4267
4278
  );
@@ -4271,139 +4282,146 @@ C = new WeakMap(), it = new WeakMap(), st = new WeakMap(), le = new WeakSet(), D
4271
4282
  reason: i.reason
4272
4283
  });
4273
4284
  });
4274
- }, Ke = function(t, n, r, a, i) {
4285
+ }, Ce = function(t, n, r, a, i, s) {
4275
4286
  return O(this, null, function* () {
4276
- var y, N, Z, B, Ue, ct, Pe, dt, ut, ft, ht;
4287
+ var P, Be, ft, Ve, ht, _t, pt, gt, R, ve, Ee;
4277
4288
  if (this.hasAuth() === !1)
4278
4289
  throw new Error('It needs to set "auth" before calling this method.');
4279
- const s = {}, o = Ti(JSON.stringify(n)), c = yield fetch(`${w(this, it)}${t}`, {
4280
- method: "POST",
4290
+ const o = {}, c = {
4291
+ method: t,
4281
4292
  headers: v(d({}, this.headers), {
4282
- Accept: "text/event-stream",
4293
+ Accept: "text/event-stream"
4294
+ }),
4295
+ signal: s
4296
+ };
4297
+ if (t === "POST") {
4298
+ const Z = Oi(JSON.stringify(r));
4299
+ c.body = Z, c.headers = v(d({}, c.headers), {
4283
4300
  "Content-Encoding": "gzip",
4284
4301
  "Content-Type": "application/json"
4285
- }),
4286
- body: o,
4287
- signal: i
4288
- });
4289
- if (!c.ok) {
4290
- const R = yield c.text();
4291
- let L;
4302
+ });
4303
+ }
4304
+ const l = yield fetch(`${w(this, st)}${n}`, c);
4305
+ if (!l.ok) {
4306
+ const Z = yield l.text();
4307
+ let J;
4292
4308
  try {
4293
- L = JSON.parse(R);
4294
- } catch (ve) {
4309
+ J = JSON.parse(Z);
4310
+ } catch (Lt) {
4295
4311
  }
4296
- throw ((y = L == null ? void 0 : L.error) == null ? void 0 : y.name) === "ZodError" ? (console.log(
4312
+ throw ((P = J == null ? void 0 : J.error) == null ? void 0 : P.name) === "ZodError" ? (console.log(
4297
4313
  "Zod validation error:",
4298
- JSON.stringify(L.error.issues, null, 2)
4314
+ JSON.stringify(J.error.issues, null, 2)
4299
4315
  ), new be({
4300
4316
  name: "HTTP error from Anima API",
4301
4317
  reason: "Invalid body payload",
4302
- detail: L.error.issues,
4303
- status: c.status
4304
- })) : typeof L == "object" ? new be({
4305
- name: `Error "${L}"`,
4318
+ detail: J.error.issues,
4319
+ status: l.status
4320
+ })) : typeof J == "object" ? new be({
4321
+ name: `Error "${J}"`,
4306
4322
  reason: "Unknown",
4307
- status: c.status
4323
+ status: l.status
4308
4324
  }) : new be({
4309
4325
  name: "HTTP error from Anima API",
4310
- reason: R,
4311
- status: c.status
4326
+ reason: Z,
4327
+ status: l.status
4312
4328
  });
4313
4329
  }
4314
- if (!c.body)
4330
+ if (!l.body)
4315
4331
  throw new be({
4316
4332
  name: "Stream Error",
4317
4333
  reason: "Response body is null",
4318
- status: c.status
4334
+ status: l.status
4319
4335
  });
4320
- const l = c.body.getReader(), h = new TextDecoder();
4321
- let S = "";
4336
+ const h = l.headers.get("x-anima-job-type"), T = h && Ms[h];
4337
+ T && typeof a == "function" && a({ type: "set_job_type", payload: { jobType: T } });
4338
+ const y = l.body.getReader(), N = new TextDecoder();
4339
+ let I = "";
4322
4340
  try {
4323
4341
  for (; ; ) {
4324
- const { done: R, value: L } = yield l.read();
4325
- if (R)
4342
+ const { done: Z, value: J } = yield y.read();
4343
+ if (Z)
4326
4344
  break;
4327
- S += h.decode(L, { stream: !0 });
4328
- const ve = S.split(`
4345
+ I += N.decode(J, { stream: !0 });
4346
+ const Lt = I.split(`
4329
4347
  `);
4330
- S = ve.pop() || "";
4331
- for (const z of ve)
4332
- if (!(!z.trim() || z.startsWith(":")) && z.startsWith("data: ")) {
4333
- let T;
4348
+ I = Lt.pop() || "";
4349
+ for (const mt of Lt)
4350
+ if (!(!mt.trim() || mt.startsWith(":")) && mt.startsWith("data: ")) {
4351
+ let S;
4334
4352
  try {
4335
- T = JSON.parse(z.slice(6));
4336
- } catch (Vs) {
4353
+ S = JSON.parse(mt.slice(6));
4354
+ } catch (Ks) {
4337
4355
  continue;
4338
4356
  }
4339
- switch (T.type) {
4357
+ switch (S.type) {
4340
4358
  case "queueing": {
4341
- typeof r == "function" ? r(T) : (N = r.onQueueing) == null || N.call(r, {
4342
- sessionId: T.sessionId
4359
+ typeof a == "function" ? a(S) : (Be = a.onQueueing) == null || Be.call(a, {
4360
+ sessionId: S.sessionId
4343
4361
  });
4344
4362
  break;
4345
4363
  }
4346
4364
  case "start": {
4347
- s.sessionId = T.sessionId, typeof r == "function" ? r(T) : (Z = r.onStart) == null || Z.call(r, { sessionId: T.sessionId });
4365
+ o.sessionId = S.sessionId, typeof a == "function" ? a(S) : (ft = a.onStart) == null || ft.call(a, { sessionId: S.sessionId });
4348
4366
  break;
4349
4367
  }
4350
4368
  case "pre_codegen": {
4351
- a === "codegen" && (typeof r == "function" ? r(T) : (B = r.onPreCodegen) == null || B.call(r, {
4352
- message: T.message
4369
+ i === "codegen" && (typeof a == "function" ? a(S) : (Ve = a.onPreCodegen) == null || Ve.call(a, {
4370
+ message: S.message
4353
4371
  }));
4354
4372
  break;
4355
4373
  }
4356
4374
  case "assets_uploaded": {
4357
- typeof r == "function" ? r(T) : (Ue = r.onAssetsUploaded) == null || Ue.call(r);
4375
+ typeof a == "function" ? a(S) : (ht = a.onAssetsUploaded) == null || ht.call(a);
4358
4376
  break;
4359
4377
  }
4360
4378
  case "assets_list": {
4361
- s.assets = T.payload.assets, typeof r == "function" ? r(T) : (ct = r.onAssetsList) == null || ct.call(r, T.payload);
4379
+ o.assets = S.payload.assets, typeof a == "function" ? a(S) : (_t = a.onAssetsList) == null || _t.call(a, S.payload);
4362
4380
  break;
4363
4381
  }
4364
4382
  case "figma_metadata": {
4365
- a === "codegen" && (s.figmaFileName = T.figmaFileName, s.figmaSelectedFrameName = T.figmaSelectedFrameName, typeof r == "function" ? r(T) : (Pe = r.onFigmaMetadata) == null || Pe.call(r, {
4366
- figmaFileName: T.figmaFileName,
4367
- figmaSelectedFrameName: T.figmaSelectedFrameName
4383
+ i === "codegen" && (o.figmaFileName = S.figmaFileName, o.figmaSelectedFrameName = S.figmaSelectedFrameName, typeof a == "function" ? a(S) : (pt = a.onFigmaMetadata) == null || pt.call(a, {
4384
+ figmaFileName: S.figmaFileName,
4385
+ figmaSelectedFrameName: S.figmaSelectedFrameName
4368
4386
  }));
4369
4387
  break;
4370
4388
  }
4371
4389
  case "generating_code": {
4372
- T.payload.status === "success" && (s.files = T.payload.files), typeof r == "function" ? r(T) : (dt = r.onGeneratingCode) == null || dt.call(r, {
4373
- status: T.payload.status,
4374
- progress: T.payload.progress,
4375
- files: T.payload.files
4390
+ S.payload.status === "success" && (o.files = S.payload.files), typeof a == "function" ? a(S) : (gt = a.onGeneratingCode) == null || gt.call(a, {
4391
+ status: S.payload.status,
4392
+ progress: S.payload.progress,
4393
+ files: S.payload.files
4376
4394
  });
4377
4395
  break;
4378
4396
  }
4379
4397
  case "progress_messages_updated": {
4380
- typeof r == "function" ? r(T) : (ut = r.onProgressMessagesUpdated) == null || ut.call(
4381
- r,
4382
- T.payload.progressMessages
4398
+ typeof a == "function" ? a(S) : (R = a.onProgressMessagesUpdated) == null || R.call(
4399
+ a,
4400
+ S.payload.progressMessages
4383
4401
  );
4384
4402
  break;
4385
4403
  }
4386
4404
  case "job_status_updated": {
4387
- typeof r == "function" ? r(T) : (ft = r.onJobStatusUpdated) == null || ft.call(r, T.payload.jobStatus);
4405
+ typeof a == "function" ? a(S) : (ve = a.onJobStatusUpdated) == null || ve.call(a, S.payload.jobStatus);
4388
4406
  break;
4389
4407
  }
4390
4408
  case "codegen_completed":
4391
4409
  case "generation_completed": {
4392
- typeof r == "function" ? r(T) : (ht = r.onCodegenCompleted) == null || ht.call(r);
4410
+ typeof a == "function" ? a(S) : (Ee = a.onCodegenCompleted) == null || Ee.call(a);
4393
4411
  break;
4394
4412
  }
4395
4413
  case "error":
4396
4414
  throw new be({
4397
- name: T.payload.errorName,
4398
- reason: T.payload.reason
4415
+ name: S.payload.errorName,
4416
+ reason: S.payload.reason
4399
4417
  });
4400
4418
  case "done":
4401
- return s.tokenUsage = T.payload.tokenUsage, s.sessionId = T.payload.sessionId, s;
4419
+ return o.tokenUsage = S.payload.tokenUsage, o.sessionId = S.payload.sessionId, o;
4402
4420
  }
4403
4421
  }
4404
4422
  }
4405
4423
  } finally {
4406
- l.cancel();
4424
+ y.cancel();
4407
4425
  }
4408
4426
  throw new be({
4409
4427
  name: "Connection",
@@ -4412,7 +4430,7 @@ C = new WeakMap(), it = new WeakMap(), st = new WeakMap(), le = new WeakSet(), D
4412
4430
  });
4413
4431
  });
4414
4432
  };
4415
- const Ys = (e) => {
4433
+ const no = (e) => {
4416
4434
  var t;
4417
4435
  if (!e)
4418
4436
  return [!1, "", ""];
@@ -4428,7 +4446,7 @@ const Ys = (e) => {
4428
4446
  } catch (n) {
4429
4447
  return [!1, "", ""];
4430
4448
  }
4431
- }, Js = ({
4449
+ }, ro = ({
4432
4450
  fileKey: e,
4433
4451
  nodeId: t,
4434
4452
  duplicate: n
@@ -4436,12 +4454,12 @@ const Ys = (e) => {
4436
4454
  const r = new URL("https://www.figma.com");
4437
4455
  return r.pathname = `design/${e}`, n && (r.pathname = `${r.pathname}/dummy/duplicate`), t && r.searchParams.set("node-id", t.replace(":", "-")), r;
4438
4456
  };
4439
- class Qs extends Error {
4457
+ class ao extends Error {
4440
4458
  constructor(t, n) {
4441
4459
  super(t), this.response = n;
4442
4460
  }
4443
4461
  }
4444
- const eo = ({
4462
+ const io = ({
4445
4463
  files: e,
4446
4464
  screenPath: t = "src/screens"
4447
4465
  }) => {
@@ -4449,13 +4467,13 @@ const eo = ({
4449
4467
  function a(i) {
4450
4468
  if (r.has(i) || !e[i])
4451
4469
  return;
4452
- r.add(i), n[i] = e[i], Fs(e[i].content).forEach((o) => {
4470
+ r.add(i), n[i] = e[i], Us(e[i].content).forEach((o) => {
4453
4471
  try {
4454
- const c = $s(i, o);
4472
+ const c = Ps(i, o);
4455
4473
  if (c.startsWith("src/")) {
4456
4474
  const l = c.split("/").slice(0, -1).join("/");
4457
- js(e, l).forEach((S) => {
4458
- r.has(S) || a(S);
4475
+ Bs(e, l).forEach((T) => {
4476
+ r.has(T) || a(T);
4459
4477
  });
4460
4478
  }
4461
4479
  } catch (c) {
@@ -4470,7 +4488,7 @@ const eo = ({
4470
4488
  i.startsWith(t) ? a(i) : i.startsWith("src/") || (n[i] = s);
4471
4489
  }), n;
4472
4490
  };
4473
- function Fs(e) {
4491
+ function Us(e) {
4474
4492
  const t = /import.*?["']([^"']+)["']/g, n = /export.*from\s+["']([^"']+)["']/g, r = [];
4475
4493
  let a;
4476
4494
  for (; (a = t.exec(e)) !== null; )
@@ -4479,7 +4497,7 @@ function Fs(e) {
4479
4497
  r.push(a[1]);
4480
4498
  return [...new Set(r)];
4481
4499
  }
4482
- function $s(e, t) {
4500
+ function Ps(e, t) {
4483
4501
  if (!t.startsWith("."))
4484
4502
  return t;
4485
4503
  const n = e.split("/").slice(0, -1), r = t.split("/"), a = [...n];
@@ -4487,10 +4505,10 @@ function $s(e, t) {
4487
4505
  i === ".." ? a.pop() : i !== "." && a.push(i);
4488
4506
  return a.join("/");
4489
4507
  }
4490
- function js(e, t) {
4508
+ function Bs(e, t) {
4491
4509
  return Object.keys(e).filter((n) => n.startsWith(t));
4492
4510
  }
4493
- function It(e, t, n) {
4511
+ function dt(e, t, n) {
4494
4512
  return new ReadableStream({
4495
4513
  start(r) {
4496
4514
  n.call(e, t, (a) => {
@@ -4518,8 +4536,8 @@ function It(e, t, n) {
4518
4536
  }
4519
4537
  });
4520
4538
  }
4521
- const Ms = (e, t) => It(e, t, e.generateCode);
4522
- function Zt(e) {
4539
+ const Vs = (e, t) => dt(e, t, e.generateCode);
4540
+ function ut(e) {
4523
4541
  return O(this, null, function* () {
4524
4542
  var s, o, c, l;
4525
4543
  const [t, n] = e.tee(), r = yield t.getReader().read();
@@ -4532,14 +4550,14 @@ function Zt(e) {
4532
4550
  });
4533
4551
  const a = new TextEncoder(), i = n.pipeThrough(
4534
4552
  new TransformStream({
4535
- transform(h, S) {
4553
+ transform(h, T) {
4536
4554
  const y = `event: ${h.type}
4537
4555
  data: ${JSON.stringify(
4538
4556
  h
4539
4557
  )}
4540
4558
 
4541
4559
  `;
4542
- S.enqueue(a.encode(y));
4560
+ T.enqueue(a.encode(y));
4543
4561
  }
4544
4562
  })
4545
4563
  );
@@ -4553,51 +4571,56 @@ data: ${JSON.stringify(
4553
4571
  });
4554
4572
  });
4555
4573
  }
4556
- const to = (e, t) => O(null, null, function* () {
4557
- const n = Ms(e, t);
4558
- return Zt(n);
4559
- }), Us = (e, t) => It(e, t, e.generateCodeFromWebsite), no = (e, t) => O(null, null, function* () {
4560
- const n = Us(e, t);
4561
- return Zt(n);
4562
- }), Ps = (e, t) => It(e, t, e.generateCodeFromPrompt), ro = (e, t) => O(null, null, function* () {
4563
- const n = Ps(e, t);
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);
4574
+ const so = (e, t) => O(null, null, function* () {
4575
+ const n = Vs(e, t);
4576
+ return ut(n);
4577
+ }), Hs = (e, t) => dt(e, t, e.generateCodeFromWebsite), oo = (e, t) => O(null, null, function* () {
4578
+ const n = Hs(e, t);
4579
+ return ut(n);
4580
+ }), Ws = (e, t) => dt(e, t, e.generateCodeFromPrompt), lo = (e, t) => O(null, null, function* () {
4581
+ const n = Ws(e, t);
4582
+ return ut(n);
4583
+ }), qs = (e, t) => dt(e, t, e.attachToGenerationJob), co = (e, t) => O(null, null, function* () {
4584
+ const n = qs(e, t);
4585
+ return ut(n);
4586
+ }), Gs = (e, t) => dt(e, t, e.generateLink2Code), uo = (e, t) => O(null, null, function* () {
4587
+ const n = Gs(e, t);
4588
+ return ut(n);
4568
4589
  });
4569
4590
  export {
4570
- Xs as Anima,
4591
+ to as Anima,
4571
4592
  be as CodegenError,
4572
- Nn as ExpiredFigmaToken,
4573
- Ls as FigmaRestApi,
4574
- In as FileNotExportable,
4575
- Ei as MalformattedFigmaToken,
4576
- Ai as MissingFigmaToken,
4577
- Rn as NeedsReauthFigmaToken,
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
4593
+ zn as ExpiredFigmaToken,
4594
+ $s as FigmaRestApi,
4595
+ Dn as FileNotExportable,
4596
+ Ci as MalformattedFigmaToken,
4597
+ Ri as MissingFigmaToken,
4598
+ Zn as NeedsReauthFigmaToken,
4599
+ Ni as NotFound,
4600
+ Fn as RateLimitExceeded,
4601
+ Zi as RequestTooLarge,
4602
+ ao as ResponseError,
4603
+ Ii as UnknownFigmaApiException,
4604
+ Ln as UnknownForbiddenFigmaError,
4605
+ co as attachToGenerationJobResponseEventStream,
4606
+ qs as attachToGenerationJobStream,
4607
+ lo as createCodeFromPromptResponseEventStream,
4608
+ Ws as createCodeFromPromptStream,
4609
+ oo as createCodeFromWebsiteResponseEventStream,
4610
+ Hs as createCodeFromWebsiteStream,
4611
+ so as createCodegenResponseEventStream,
4612
+ Vs as createCodegenStream,
4613
+ uo as createLink2CodeResponseEventStream,
4614
+ Gs as createLink2CodeStream,
4615
+ Fr as findChildrenNode,
4616
+ ro as formatToFigmaLink,
4617
+ io as getRelatedScreenFiles,
4618
+ fs as isNodeCodegenCompatible,
4619
+ Xs as isNotFound,
4620
+ Qs as isRateLimitExceeded,
4621
+ eo as isRequestTooLarge,
4622
+ Ys as isUnknownFigmaApiException,
4623
+ no as isValidFigmaUrl,
4624
+ us as validateSettings
4602
4625
  };
4603
4626
  //# sourceMappingURL=index.js.map