turbo-ignore 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +4 -370
- package/dist/cli.js +1 -1
- package/package.json +4 -4
package/LICENSE
CHANGED
|
@@ -1,373 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
==================================
|
|
1
|
+
Copyright (c) 2024 Vercel, Inc
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
--------------
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
means each individual or legal entity that creates, contributes to
|
|
9
|
-
the creation of, or owns Covered Software.
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
10
6
|
|
|
11
|
-
|
|
12
|
-
means the combination of the Contributions of others (if any) used
|
|
13
|
-
by a Contributor and that particular Contributor's Contribution.
|
|
14
|
-
|
|
15
|
-
1.3. "Contribution"
|
|
16
|
-
means Covered Software of a particular Contributor.
|
|
17
|
-
|
|
18
|
-
1.4. "Covered Software"
|
|
19
|
-
means Source Code Form to which the initial Contributor has attached
|
|
20
|
-
the notice in Exhibit A, the Executable Form of such Source Code
|
|
21
|
-
Form, and Modifications of such Source Code Form, in each case
|
|
22
|
-
including portions thereof.
|
|
23
|
-
|
|
24
|
-
1.5. "Incompatible With Secondary Licenses"
|
|
25
|
-
means
|
|
26
|
-
|
|
27
|
-
(a) that the initial Contributor has attached the notice described
|
|
28
|
-
in Exhibit B to the Covered Software; or
|
|
29
|
-
|
|
30
|
-
(b) that the Covered Software was made available under the terms of
|
|
31
|
-
version 1.1 or earlier of the License, but not also under the
|
|
32
|
-
terms of a Secondary License.
|
|
33
|
-
|
|
34
|
-
1.6. "Executable Form"
|
|
35
|
-
means any form of the work other than Source Code Form.
|
|
36
|
-
|
|
37
|
-
1.7. "Larger Work"
|
|
38
|
-
means a work that combines Covered Software with other material, in
|
|
39
|
-
a separate file or files, that is not Covered Software.
|
|
40
|
-
|
|
41
|
-
1.8. "License"
|
|
42
|
-
means this document.
|
|
43
|
-
|
|
44
|
-
1.9. "Licensable"
|
|
45
|
-
means having the right to grant, to the maximum extent possible,
|
|
46
|
-
whether at the time of the initial grant or subsequently, any and
|
|
47
|
-
all of the rights conveyed by this License.
|
|
48
|
-
|
|
49
|
-
1.10. "Modifications"
|
|
50
|
-
means any of the following:
|
|
51
|
-
|
|
52
|
-
(a) any file in Source Code Form that results from an addition to,
|
|
53
|
-
deletion from, or modification of the contents of Covered
|
|
54
|
-
Software; or
|
|
55
|
-
|
|
56
|
-
(b) any new file in Source Code Form that contains any Covered
|
|
57
|
-
Software.
|
|
58
|
-
|
|
59
|
-
1.11. "Patent Claims" of a Contributor
|
|
60
|
-
means any patent claim(s), including without limitation, method,
|
|
61
|
-
process, and apparatus claims, in any patent Licensable by such
|
|
62
|
-
Contributor that would be infringed, but for the grant of the
|
|
63
|
-
License, by the making, using, selling, offering for sale, having
|
|
64
|
-
made, import, or transfer of either its Contributions or its
|
|
65
|
-
Contributor Version.
|
|
66
|
-
|
|
67
|
-
1.12. "Secondary License"
|
|
68
|
-
means either the GNU General Public License, Version 2.0, the GNU
|
|
69
|
-
Lesser General Public License, Version 2.1, the GNU Affero General
|
|
70
|
-
Public License, Version 3.0, or any later versions of those
|
|
71
|
-
licenses.
|
|
72
|
-
|
|
73
|
-
1.13. "Source Code Form"
|
|
74
|
-
means the form of the work preferred for making modifications.
|
|
75
|
-
|
|
76
|
-
1.14. "You" (or "Your")
|
|
77
|
-
means an individual or a legal entity exercising rights under this
|
|
78
|
-
License. For legal entities, "You" includes any entity that
|
|
79
|
-
controls, is controlled by, or is under common control with You. For
|
|
80
|
-
purposes of this definition, "control" means (a) the power, direct
|
|
81
|
-
or indirect, to cause the direction or management of such entity,
|
|
82
|
-
whether by contract or otherwise, or (b) ownership of more than
|
|
83
|
-
fifty percent (50%) of the outstanding shares or beneficial
|
|
84
|
-
ownership of such entity.
|
|
85
|
-
|
|
86
|
-
2. License Grants and Conditions
|
|
87
|
-
--------------------------------
|
|
88
|
-
|
|
89
|
-
2.1. Grants
|
|
90
|
-
|
|
91
|
-
Each Contributor hereby grants You a world-wide, royalty-free,
|
|
92
|
-
non-exclusive license:
|
|
93
|
-
|
|
94
|
-
(a) under intellectual property rights (other than patent or trademark)
|
|
95
|
-
Licensable by such Contributor to use, reproduce, make available,
|
|
96
|
-
modify, display, perform, distribute, and otherwise exploit its
|
|
97
|
-
Contributions, either on an unmodified basis, with Modifications, or
|
|
98
|
-
as part of a Larger Work; and
|
|
99
|
-
|
|
100
|
-
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
|
101
|
-
for sale, have made, import, and otherwise transfer either its
|
|
102
|
-
Contributions or its Contributor Version.
|
|
103
|
-
|
|
104
|
-
2.2. Effective Date
|
|
105
|
-
|
|
106
|
-
The licenses granted in Section 2.1 with respect to any Contribution
|
|
107
|
-
become effective for each Contribution on the date the Contributor first
|
|
108
|
-
distributes such Contribution.
|
|
109
|
-
|
|
110
|
-
2.3. Limitations on Grant Scope
|
|
111
|
-
|
|
112
|
-
The licenses granted in this Section 2 are the only rights granted under
|
|
113
|
-
this License. No additional rights or licenses will be implied from the
|
|
114
|
-
distribution or licensing of Covered Software under this License.
|
|
115
|
-
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
|
116
|
-
Contributor:
|
|
117
|
-
|
|
118
|
-
(a) for any code that a Contributor has removed from Covered Software;
|
|
119
|
-
or
|
|
120
|
-
|
|
121
|
-
(b) for infringements caused by: (i) Your and any other third party's
|
|
122
|
-
modifications of Covered Software, or (ii) the combination of its
|
|
123
|
-
Contributions with other software (except as part of its Contributor
|
|
124
|
-
Version); or
|
|
125
|
-
|
|
126
|
-
(c) under Patent Claims infringed by Covered Software in the absence of
|
|
127
|
-
its Contributions.
|
|
128
|
-
|
|
129
|
-
This License does not grant any rights in the trademarks, service marks,
|
|
130
|
-
or logos of any Contributor (except as may be necessary to comply with
|
|
131
|
-
the notice requirements in Section 3.4).
|
|
132
|
-
|
|
133
|
-
2.4. Subsequent Licenses
|
|
134
|
-
|
|
135
|
-
No Contributor makes additional grants as a result of Your choice to
|
|
136
|
-
distribute the Covered Software under a subsequent version of this
|
|
137
|
-
License (see Section 10.2) or under the terms of a Secondary License (if
|
|
138
|
-
permitted under the terms of Section 3.3).
|
|
139
|
-
|
|
140
|
-
2.5. Representation
|
|
141
|
-
|
|
142
|
-
Each Contributor represents that the Contributor believes its
|
|
143
|
-
Contributions are its original creation(s) or it has sufficient rights
|
|
144
|
-
to grant the rights to its Contributions conveyed by this License.
|
|
145
|
-
|
|
146
|
-
2.6. Fair Use
|
|
147
|
-
|
|
148
|
-
This License is not intended to limit any rights You have under
|
|
149
|
-
applicable copyright doctrines of fair use, fair dealing, or other
|
|
150
|
-
equivalents.
|
|
151
|
-
|
|
152
|
-
2.7. Conditions
|
|
153
|
-
|
|
154
|
-
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
|
155
|
-
in Section 2.1.
|
|
156
|
-
|
|
157
|
-
3. Responsibilities
|
|
158
|
-
-------------------
|
|
159
|
-
|
|
160
|
-
3.1. Distribution of Source Form
|
|
161
|
-
|
|
162
|
-
All distribution of Covered Software in Source Code Form, including any
|
|
163
|
-
Modifications that You create or to which You contribute, must be under
|
|
164
|
-
the terms of this License. You must inform recipients that the Source
|
|
165
|
-
Code Form of the Covered Software is governed by the terms of this
|
|
166
|
-
License, and how they can obtain a copy of this License. You may not
|
|
167
|
-
attempt to alter or restrict the recipients' rights in the Source Code
|
|
168
|
-
Form.
|
|
169
|
-
|
|
170
|
-
3.2. Distribution of Executable Form
|
|
171
|
-
|
|
172
|
-
If You distribute Covered Software in Executable Form then:
|
|
173
|
-
|
|
174
|
-
(a) such Covered Software must also be made available in Source Code
|
|
175
|
-
Form, as described in Section 3.1, and You must inform recipients of
|
|
176
|
-
the Executable Form how they can obtain a copy of such Source Code
|
|
177
|
-
Form by reasonable means in a timely manner, at a charge no more
|
|
178
|
-
than the cost of distribution to the recipient; and
|
|
179
|
-
|
|
180
|
-
(b) You may distribute such Executable Form under the terms of this
|
|
181
|
-
License, or sublicense it under different terms, provided that the
|
|
182
|
-
license for the Executable Form does not attempt to limit or alter
|
|
183
|
-
the recipients' rights in the Source Code Form under this License.
|
|
184
|
-
|
|
185
|
-
3.3. Distribution of a Larger Work
|
|
186
|
-
|
|
187
|
-
You may create and distribute a Larger Work under terms of Your choice,
|
|
188
|
-
provided that You also comply with the requirements of this License for
|
|
189
|
-
the Covered Software. If the Larger Work is a combination of Covered
|
|
190
|
-
Software with a work governed by one or more Secondary Licenses, and the
|
|
191
|
-
Covered Software is not Incompatible With Secondary Licenses, this
|
|
192
|
-
License permits You to additionally distribute such Covered Software
|
|
193
|
-
under the terms of such Secondary License(s), so that the recipient of
|
|
194
|
-
the Larger Work may, at their option, further distribute the Covered
|
|
195
|
-
Software under the terms of either this License or such Secondary
|
|
196
|
-
License(s).
|
|
197
|
-
|
|
198
|
-
3.4. Notices
|
|
199
|
-
|
|
200
|
-
You may not remove or alter the substance of any license notices
|
|
201
|
-
(including copyright notices, patent notices, disclaimers of warranty,
|
|
202
|
-
or limitations of liability) contained within the Source Code Form of
|
|
203
|
-
the Covered Software, except that You may alter any license notices to
|
|
204
|
-
the extent required to remedy known factual inaccuracies.
|
|
205
|
-
|
|
206
|
-
3.5. Application of Additional Terms
|
|
207
|
-
|
|
208
|
-
You may choose to offer, and to charge a fee for, warranty, support,
|
|
209
|
-
indemnity or liability obligations to one or more recipients of Covered
|
|
210
|
-
Software. However, You may do so only on Your own behalf, and not on
|
|
211
|
-
behalf of any Contributor. You must make it absolutely clear that any
|
|
212
|
-
such warranty, support, indemnity, or liability obligation is offered by
|
|
213
|
-
You alone, and You hereby agree to indemnify every Contributor for any
|
|
214
|
-
liability incurred by such Contributor as a result of warranty, support,
|
|
215
|
-
indemnity or liability terms You offer. You may include additional
|
|
216
|
-
disclaimers of warranty and limitations of liability specific to any
|
|
217
|
-
jurisdiction.
|
|
218
|
-
|
|
219
|
-
4. Inability to Comply Due to Statute or Regulation
|
|
220
|
-
---------------------------------------------------
|
|
221
|
-
|
|
222
|
-
If it is impossible for You to comply with any of the terms of this
|
|
223
|
-
License with respect to some or all of the Covered Software due to
|
|
224
|
-
statute, judicial order, or regulation then You must: (a) comply with
|
|
225
|
-
the terms of this License to the maximum extent possible; and (b)
|
|
226
|
-
describe the limitations and the code they affect. Such description must
|
|
227
|
-
be placed in a text file included with all distributions of the Covered
|
|
228
|
-
Software under this License. Except to the extent prohibited by statute
|
|
229
|
-
or regulation, such description must be sufficiently detailed for a
|
|
230
|
-
recipient of ordinary skill to be able to understand it.
|
|
231
|
-
|
|
232
|
-
5. Termination
|
|
233
|
-
--------------
|
|
234
|
-
|
|
235
|
-
5.1. The rights granted under this License will terminate automatically
|
|
236
|
-
if You fail to comply with any of its terms. However, if You become
|
|
237
|
-
compliant, then the rights granted under this License from a particular
|
|
238
|
-
Contributor are reinstated (a) provisionally, unless and until such
|
|
239
|
-
Contributor explicitly and finally terminates Your grants, and (b) on an
|
|
240
|
-
ongoing basis, if such Contributor fails to notify You of the
|
|
241
|
-
non-compliance by some reasonable means prior to 60 days after You have
|
|
242
|
-
come back into compliance. Moreover, Your grants from a particular
|
|
243
|
-
Contributor are reinstated on an ongoing basis if such Contributor
|
|
244
|
-
notifies You of the non-compliance by some reasonable means, this is the
|
|
245
|
-
first time You have received notice of non-compliance with this License
|
|
246
|
-
from such Contributor, and You become compliant prior to 30 days after
|
|
247
|
-
Your receipt of the notice.
|
|
248
|
-
|
|
249
|
-
5.2. If You initiate litigation against any entity by asserting a patent
|
|
250
|
-
infringement claim (excluding declaratory judgment actions,
|
|
251
|
-
counter-claims, and cross-claims) alleging that a Contributor Version
|
|
252
|
-
directly or indirectly infringes any patent, then the rights granted to
|
|
253
|
-
You by any and all Contributors for the Covered Software under Section
|
|
254
|
-
2.1 of this License shall terminate.
|
|
255
|
-
|
|
256
|
-
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
|
257
|
-
end user license agreements (excluding distributors and resellers) which
|
|
258
|
-
have been validly granted by You or Your distributors under this License
|
|
259
|
-
prior to termination shall survive termination.
|
|
260
|
-
|
|
261
|
-
************************************************************************
|
|
262
|
-
* *
|
|
263
|
-
* 6. Disclaimer of Warranty *
|
|
264
|
-
* ------------------------- *
|
|
265
|
-
* *
|
|
266
|
-
* Covered Software is provided under this License on an "as is" *
|
|
267
|
-
* basis, without warranty of any kind, either expressed, implied, or *
|
|
268
|
-
* statutory, including, without limitation, warranties that the *
|
|
269
|
-
* Covered Software is free of defects, merchantable, fit for a *
|
|
270
|
-
* particular purpose or non-infringing. The entire risk as to the *
|
|
271
|
-
* quality and performance of the Covered Software is with You. *
|
|
272
|
-
* Should any Covered Software prove defective in any respect, You *
|
|
273
|
-
* (not any Contributor) assume the cost of any necessary servicing, *
|
|
274
|
-
* repair, or correction. This disclaimer of warranty constitutes an *
|
|
275
|
-
* essential part of this License. No use of any Covered Software is *
|
|
276
|
-
* authorized under this License except under this disclaimer. *
|
|
277
|
-
* *
|
|
278
|
-
************************************************************************
|
|
279
|
-
|
|
280
|
-
************************************************************************
|
|
281
|
-
* *
|
|
282
|
-
* 7. Limitation of Liability *
|
|
283
|
-
* -------------------------- *
|
|
284
|
-
* *
|
|
285
|
-
* Under no circumstances and under no legal theory, whether tort *
|
|
286
|
-
* (including negligence), contract, or otherwise, shall any *
|
|
287
|
-
* Contributor, or anyone who distributes Covered Software as *
|
|
288
|
-
* permitted above, be liable to You for any direct, indirect, *
|
|
289
|
-
* special, incidental, or consequential damages of any character *
|
|
290
|
-
* including, without limitation, damages for lost profits, loss of *
|
|
291
|
-
* goodwill, work stoppage, computer failure or malfunction, or any *
|
|
292
|
-
* and all other commercial damages or losses, even if such party *
|
|
293
|
-
* shall have been informed of the possibility of such damages. This *
|
|
294
|
-
* limitation of liability shall not apply to liability for death or *
|
|
295
|
-
* personal injury resulting from such party's negligence to the *
|
|
296
|
-
* extent applicable law prohibits such limitation. Some *
|
|
297
|
-
* jurisdictions do not allow the exclusion or limitation of *
|
|
298
|
-
* incidental or consequential damages, so this exclusion and *
|
|
299
|
-
* limitation may not apply to You. *
|
|
300
|
-
* *
|
|
301
|
-
************************************************************************
|
|
302
|
-
|
|
303
|
-
8. Litigation
|
|
304
|
-
-------------
|
|
305
|
-
|
|
306
|
-
Any litigation relating to this License may be brought only in the
|
|
307
|
-
courts of a jurisdiction where the defendant maintains its principal
|
|
308
|
-
place of business and such litigation shall be governed by laws of that
|
|
309
|
-
jurisdiction, without reference to its conflict-of-law provisions.
|
|
310
|
-
Nothing in this Section shall prevent a party's ability to bring
|
|
311
|
-
cross-claims or counter-claims.
|
|
312
|
-
|
|
313
|
-
9. Miscellaneous
|
|
314
|
-
----------------
|
|
315
|
-
|
|
316
|
-
This License represents the complete agreement concerning the subject
|
|
317
|
-
matter hereof. If any provision of this License is held to be
|
|
318
|
-
unenforceable, such provision shall be reformed only to the extent
|
|
319
|
-
necessary to make it enforceable. Any law or regulation which provides
|
|
320
|
-
that the language of a contract shall be construed against the drafter
|
|
321
|
-
shall not be used to construe this License against a Contributor.
|
|
322
|
-
|
|
323
|
-
10. Versions of the License
|
|
324
|
-
---------------------------
|
|
325
|
-
|
|
326
|
-
10.1. New Versions
|
|
327
|
-
|
|
328
|
-
Mozilla Foundation is the license steward. Except as provided in Section
|
|
329
|
-
10.3, no one other than the license steward has the right to modify or
|
|
330
|
-
publish new versions of this License. Each version will be given a
|
|
331
|
-
distinguishing version number.
|
|
332
|
-
|
|
333
|
-
10.2. Effect of New Versions
|
|
334
|
-
|
|
335
|
-
You may distribute the Covered Software under the terms of the version
|
|
336
|
-
of the License under which You originally received the Covered Software,
|
|
337
|
-
or under the terms of any subsequent version published by the license
|
|
338
|
-
steward.
|
|
339
|
-
|
|
340
|
-
10.3. Modified Versions
|
|
341
|
-
|
|
342
|
-
If you create software not governed by this License, and you want to
|
|
343
|
-
create a new license for such software, you may create and use a
|
|
344
|
-
modified version of this License if you rename the license and remove
|
|
345
|
-
any references to the name of the license steward (except to note that
|
|
346
|
-
such modified license differs from this License).
|
|
347
|
-
|
|
348
|
-
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
|
349
|
-
Licenses
|
|
350
|
-
|
|
351
|
-
If You choose to distribute Source Code Form that is Incompatible With
|
|
352
|
-
Secondary Licenses under the terms of this version of the License, the
|
|
353
|
-
notice described in Exhibit B of this License must be attached.
|
|
354
|
-
|
|
355
|
-
Exhibit A - Source Code Form License Notice
|
|
356
|
-
-------------------------------------------
|
|
357
|
-
|
|
358
|
-
This Source Code Form is subject to the terms of the Mozilla Public
|
|
359
|
-
License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
360
|
-
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
361
|
-
|
|
362
|
-
If it is not possible or desirable to put the notice in a particular
|
|
363
|
-
file, then You may include the notice in a location (such as a LICENSE
|
|
364
|
-
file in a relevant directory) where a recipient would be likely to look
|
|
365
|
-
for such a notice.
|
|
366
|
-
|
|
367
|
-
You may add additional accurate notices of copyright ownership.
|
|
368
|
-
|
|
369
|
-
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
|
370
|
-
---------------------------------------------------------
|
|
371
|
-
|
|
372
|
-
This Source Code Form is "Incompatible With Secondary Licenses", as
|
|
373
|
-
defined by the Mozilla Public License, v. 2.0.
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/dist/cli.js
CHANGED
|
@@ -97,7 +97,7 @@ Please report this to https://github.com/szmarczak/http2-wrapper/`);y(v)}return}
|
|
|
97
97
|
`+t.slice(i,s),i=s+1),o=a;return u+=`
|
|
98
98
|
`,t.length-i>e&&o>i?u+=t.slice(i,o)+`
|
|
99
99
|
`+t.slice(o+1):u+=t.slice(i),u.slice(1)}function W3(t){for(var e="",r=0,n,i=0;i<t.length;r>=65536?i+=2:i++)r=ta(t,i),n=dt[r],!n&&sa(r)?(e+=t[i],r>=65536&&(e+=t[i+1])):e+=n||N3(r);return e}function z3(t,e,r){var n="",i=t.tag,s,o,a;for(s=0,o=r.length;s<o;s+=1)a=r[s],t.replacer&&(a=t.replacer.call(r,String(s),a)),(tn(t,e,a,!1,!1)||typeof a>"u"&&tn(t,e,null,!1,!1))&&(n!==""&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=i,t.dump="["+n+"]"}function I1(t,e,r,n){var i="",s=t.tag,o,a,u;for(o=0,a=r.length;o<a;o+=1)u=r[o],t.replacer&&(u=t.replacer.call(r,String(o),u)),(tn(t,e+1,u,!0,!0,!1,!0)||typeof u>"u"&&tn(t,e+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=ld(t,e)),t.dump&&na===t.dump.charCodeAt(0)?i+="-":i+="- ",i+=t.dump);t.tag=s,t.dump=i||"[]"}function Y3(t,e,r){var n="",i=t.tag,s=Object.keys(r),o,a,u,l,f;for(o=0,a=s.length;o<a;o+=1)f="",n!==""&&(f+=", "),t.condenseFlow&&(f+='"'),u=s[o],l=r[u],t.replacer&&(l=t.replacer.call(r,u,l)),tn(t,e,u,!1,!1)&&(t.dump.length>1024&&(f+="? "),f+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),tn(t,e,l,!1,!1)&&(f+=t.dump,n+=f));t.tag=i,t.dump="{"+n+"}"}function K3(t,e,r,n){var i="",s=t.tag,o=Object.keys(r),a,u,l,f,h,d;if(t.sortKeys===!0)o.sort();else if(typeof t.sortKeys=="function")o.sort(t.sortKeys);else if(t.sortKeys)throw new kt("sortKeys must be a boolean or a function");for(a=0,u=o.length;a<u;a+=1)d="",(!n||i!=="")&&(d+=ld(t,e)),l=o[a],f=r[l],t.replacer&&(f=t.replacer.call(r,l,f)),tn(t,e+1,l,!0,!0,!0)&&(h=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,h&&(t.dump&&na===t.dump.charCodeAt(0)?d+="?":d+="? "),d+=t.dump,h&&(d+=ld(t,e)),tn(t,e+1,f,!0,h)&&(t.dump&&na===t.dump.charCodeAt(0)?d+=":":d+=": ",d+=t.dump,i+=d));t.tag=s,t.dump=i||"{}"}function B1(t,e,r){var n,i,s,o,a,u;for(i=r?t.explicitTypes:t.implicitTypes,s=0,o=i.length;s<o;s+=1)if(a=i[s],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof e=="object"&&e instanceof a.instanceOf)&&(!a.predicate||a.predicate(e))){if(r?a.multi&&a.representName?t.tag=a.representName(e):t.tag=a.tag:t.tag="?",a.represent){if(u=t.styleMap[a.tag]||a.defaultStyle,Z1.call(a.represent)==="[object Function]")n=a.represent(e,u);else if(J1.call(a.represent,u))n=a.represent[u](e,u);else throw new kt("!<"+a.tag+'> tag resolver accepts not "'+u+'" style');t.dump=n}return!0}return!1}function tn(t,e,r,n,i,s,o){t.tag=null,t.dump=r,B1(t,r,!1)||B1(t,r,!0);var a=Z1.call(t.dump),u=n,l;n&&(n=t.flowLevel<0||t.flowLevel>e);var f=a==="[object Object]"||a==="[object Array]",h,d;if(f&&(h=t.duplicates.indexOf(r),d=h!==-1),(t.tag!==null&&t.tag!=="?"||d||t.indent!==2&&e>0)&&(i=!1),d&&t.usedDuplicates[h])t.dump="*ref_"+h;else{if(f&&d&&!t.usedDuplicates[h]&&(t.usedDuplicates[h]=!0),a==="[object Object]")n&&Object.keys(t.dump).length!==0?(K3(t,e,t.dump,i),d&&(t.dump="&ref_"+h+t.dump)):(Y3(t,e,t.dump),d&&(t.dump="&ref_"+h+" "+t.dump));else if(a==="[object Array]")n&&t.dump.length!==0?(t.noArrayIndent&&!o&&e>0?I1(t,e-1,t.dump,i):I1(t,e,t.dump,i),d&&(t.dump="&ref_"+h+t.dump)):(z3(t,e,t.dump),d&&(t.dump="&ref_"+h+" "+t.dump));else if(a==="[object String]")t.tag!=="?"&&G3(t,t.dump,e,s,u);else{if(a==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new kt("unacceptable kind of an object to dump "+a)}t.tag!==null&&t.tag!=="?"&&(l=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?l="!"+l:l.slice(0,18)==="tag:yaml.org,2002:"?l="!!"+l.slice(18):l="!<"+l+">",t.dump=l+" "+t.dump)}return!0}function Z3(t,e){var r=[],n=[],i,s;for(hd(t,r,n),i=0,s=n.length;i<s;i+=1)e.duplicates.push(r[n[i]]);e.usedDuplicates=new Array(s)}function hd(t,e,r){var n,i,s;if(t!==null&&typeof t=="object")if(i=e.indexOf(t),i!==-1)r.indexOf(i)===-1&&r.push(i);else if(e.push(t),Array.isArray(t))for(i=0,s=t.length;i<s;i+=1)hd(t[i],e,r);else for(n=Object.keys(t),i=0,s=n.length;i<s;i+=1)hd(t[n[i]],e,r)}function J3(t,e){e=e||{};var r=new q3(e);r.noRefs||Z3(t,r);var n=t;return r.replacer&&(n=r.replacer.call({"":n},"",n)),tn(r,0,n,!0,!0)?r.dump+`
|
|
100
|
-
`:""}var X3=J3,Q3={dump:X3};function yd(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}var wZ=K1.load,xZ=K1.loadAll,SZ=Q3.dump;var AZ=yd("safeLoad","load"),CZ=yd("safeLoadAll","loadAll"),DZ=yd("safeDump","dump");var z4=me(zx());var De={};k5(De,{bold:()=>j4,dimmed:()=>$4,error:()=>hC,grey:()=>U4,info:()=>q4,item:()=>G4,log:()=>Un,turboBlue:()=>Bs,turboGradient:()=>M4,turboLoader:()=>lC,turboRed:()=>uC,underline:()=>H4,warn:()=>fC,yellow:()=>cC});c();var $n=me(ha()),iC=me(kA()),sC=me(nC()),oC="#0099F7",aC="#F11712",N4="#FFFF00",M4=(0,sC.default)(oC,aC),Bs=$n.default.hex(oC),uC=$n.default.hex(aC),cC=$n.default.hex(N4),lC=t=>(0,iC.default)({text:t,spinner:{frames:[" ",Bs("> "),Bs(">> "),Bs(">>>")]}}),q4=(...t)=>{Un(Bs.bold(">>>"),...t)},j4=(...t)=>{Un($n.default.bold(...t))},H4=(...t)=>{Un($n.default.underline(...t))},$4=(...t)=>{Un($n.default.dim(...t))},U4=(...t)=>{Un($n.default.grey(...t))},G4=(...t)=>{Un(Bs.bold(" \u2022"),...t)},Un=(...t)=>{console.log(...t)},fC=(...t)=>{console.error(cC.bold(">>>"),...t)},hC=(...t)=>{console.error(uC.bold(">>>"),...t)};c();var jj=me(require("os")),Hj=me(qD());c();c();var $j=me(require("path"));var Uj=me(ha());c();var uF=require("stream"),cF=require("util"),DV=require("path"),RV=require("os"),lF=require("fs"),OV=me(NO());var xte=(0,cF.promisify)(uF.Stream.pipeline);c();c();var qV=me(require("path")),jV=me(yF()),HV=me(ha());c();c();var n5=me($c());c();var $r=me(LF(),1),vre=$r.default.v1,Ere=$r.default.v3,wo=$r.default.v4,bre=$r.default.v5,wre=$r.default.NIL,xre=$r.default.version,Sre=$r.default.validate,Are=$r.default.stringify,Cre=$r.default.parse;c();var ve;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{let s={};for(let o of i)s[o]=o;return s},t.getValidEnumValues=i=>{let s=t.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),o={};for(let a of s)o[a]=i[a];return t.objectValues(o)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let s=[];for(let o in i)Object.prototype.hasOwnProperty.call(i,o)&&s.push(o);return s},t.find=(i,s)=>{for(let o of i)if(s(o))return o},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,s=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(ve||(ve={}));var Qy;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Qy||(Qy={}));var V=ve.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ai=t=>{switch(typeof t){case"undefined":return V.undefined;case"string":return V.string;case"number":return isNaN(t)?V.nan:V.number;case"boolean":return V.boolean;case"function":return V.function;case"bigint":return V.bigint;case"symbol":return V.symbol;case"object":return Array.isArray(t)?V.array:t===null?V.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?V.promise:typeof Map<"u"&&t instanceof Map?V.map:typeof Set<"u"&&t instanceof Set?V.set:typeof Date<"u"&&t instanceof Date?V.date:V.object;default:return V.unknown}},L=ve.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),JW=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),Yt=class extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let r=e||function(s){return s.message},n={_errors:[]},i=s=>{for(let o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let a=n,u=0;for(;u<o.path.length;){let l=o.path[u];u===o.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(r(o))):a[l]=a[l]||{_errors:[]},a=a[l],u++}}};return i(this),n}toString(){return this.message}get message(){return JSON.stringify(this.issues,ve.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Yt.create=t=>new Yt(t);var iu=(t,e)=>{let r;switch(t.code){case L.invalid_type:t.received===V.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case L.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,ve.jsonStringifyReplacer)}`;break;case L.unrecognized_keys:r=`Unrecognized key(s) in object: ${ve.joinValues(t.keys,", ")}`;break;case L.invalid_union:r="Invalid input";break;case L.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ve.joinValues(t.options)}`;break;case L.invalid_enum_value:r=`Invalid enum value. Expected ${ve.joinValues(t.options)}, received '${t.received}'`;break;case L.invalid_arguments:r="Invalid function arguments";break;case L.invalid_return_type:r="Invalid function return type";break;case L.invalid_date:r="Invalid date";break;case L.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:ve.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case L.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case L.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case L.custom:r="Invalid input";break;case L.invalid_intersection_types:r="Intersection results could not be merged";break;case L.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case L.not_finite:r="Number must be finite";break;default:r=e.defaultError,ve.assertNever(t)}return{message:r}},qF=iu;function XW(t){qF=t}function Wf(){return qF}var zf=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,s=[...r,...i.path||[]],o={...i,path:s},a="",u=n.filter(l=>!!l).slice().reverse();for(let l of u)a=l(o,{data:e,defaultError:a}).message;return{...i,path:s,message:i.message||a}},QW=[];function W(t,e){let r=zf({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Wf(),iu].filter(n=>!!n)});t.common.issues.push(r)}var ot=class{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let i of r){if(i.status==="aborted")return ue;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let i of r)n.push({key:await i.key,value:await i.value});return ot.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:s,value:o}=i;if(s.status==="aborted"||o.status==="aborted")return ue;s.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(n[s.value]=o.value)}return{status:e.value,value:n}}},ue=Object.freeze({status:"aborted"}),jF=t=>({status:"dirty",value:t}),Rt=t=>({status:"valid",value:t}),e_=t=>t.status==="aborted",t_=t=>t.status==="dirty",su=t=>t.status==="valid",Yf=t=>typeof Promise<"u"&&t instanceof Promise,ee;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(ee||(ee={}));var dr=class{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},NF=(t,e)=>{if(su(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Yt(t.common.issues);return this._error=r,this._error}}};function le(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(o,a)=>o.code!=="invalid_type"?{message:a.defaultError}:typeof a.data>"u"?{message:n!=null?n:a.defaultError}:{message:r!=null?r:a.defaultError},description:i}}var fe=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return ai(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:ai(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ot,ctx:{common:e.parent.common,data:e.data,parsedType:ai(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Yf(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;let i={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ai(e)},s=this._parseSync({data:e,path:i.path,parent:i});return NF(i,s)}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ai(e)},i=this._parse({data:e,path:n.path,parent:n}),s=await(Yf(i)?i:Promise.resolve(i));return NF(n,s)}refine(e,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,s)=>{let o=e(i),a=()=>s.addIssue({code:L.custom,...n(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new Zt({schema:this,typeName:ne.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Sr.create(this,this._def)}nullable(){return Cn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Kt.create(this,this._def)}promise(){return li.create(this,this._def)}or(e){return Wi.create([this,e],this._def)}and(e){return zi.create(this,e,this._def)}transform(e){return new Zt({...le(this._def),schema:this,typeName:ne.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new Xi({...le(this._def),innerType:this,defaultValue:r,typeName:ne.ZodDefault})}brand(){return new Kf({typeName:ne.ZodBranded,type:this,...le(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new Ro({...le(this._def),innerType:this,catchValue:r,typeName:ne.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Qi.create(this,e)}readonly(){return To.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},ez=/^c[^\s-]{8,}$/i,tz=/^[a-z][a-z0-9]*$/,rz=/^[0-9A-HJKMNP-TV-Z]{26}$/,nz=/^[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,iz=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,sz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Xy,oz=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,az=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,uz=t=>t.precision?t.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}Z$`):t.precision===0?t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function cz(t,e){return!!((e==="v4"||!e)&&oz.test(t)||(e==="v6"||!e)&&az.test(t))}var zt=class extends fe{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==V.string){let s=this._getOrReturnCtx(e);return W(s,{code:L.invalid_type,expected:V.string,received:s.parsedType}),ue}let n=new ot,i;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),W(i,{code:L.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),W(i,{code:L.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){let o=e.data.length>s.value,a=e.data.length<s.value;(o||a)&&(i=this._getOrReturnCtx(e,i),o?W(i,{code:L.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&W(i,{code:L.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")iz.test(e.data)||(i=this._getOrReturnCtx(e,i),W(i,{validation:"email",code:L.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")Xy||(Xy=new RegExp(sz,"u")),Xy.test(e.data)||(i=this._getOrReturnCtx(e,i),W(i,{validation:"emoji",code:L.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")nz.test(e.data)||(i=this._getOrReturnCtx(e,i),W(i,{validation:"uuid",code:L.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")ez.test(e.data)||(i=this._getOrReturnCtx(e,i),W(i,{validation:"cuid",code:L.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")tz.test(e.data)||(i=this._getOrReturnCtx(e,i),W(i,{validation:"cuid2",code:L.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")rz.test(e.data)||(i=this._getOrReturnCtx(e,i),W(i,{validation:"ulid",code:L.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),W(i,{validation:"url",code:L.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),W(i,{validation:"regex",code:L.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),W(i,{code:L.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),W(i,{code:L.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),W(i,{code:L.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?uz(s).test(e.data)||(i=this._getOrReturnCtx(e,i),W(i,{code:L.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="ip"?cz(e.data,s.version)||(i=this._getOrReturnCtx(e,i),W(i,{validation:"ip",code:L.invalid_string,message:s.message}),n.dirty()):ve.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:L.invalid_string,...ee.errToObj(n)})}_addCheck(e){return new zt({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ee.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ee.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ee.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ee.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ee.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ee.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ee.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ee.errToObj(e)})}datetime(e){var r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(r=e==null?void 0:e.offset)!==null&&r!==void 0?r:!1,...ee.errToObj(e==null?void 0:e.message)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...ee.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...ee.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...ee.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...ee.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...ee.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...ee.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...ee.errToObj(r)})}nonempty(e){return this.min(1,ee.errToObj(e))}trim(){return new zt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new zt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new zt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};zt.create=t=>{var e;return new zt({checks:[],typeName:ne.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...le(t)})};function lz(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,s=parseInt(t.toFixed(i).replace(".","")),o=parseInt(e.toFixed(i).replace(".",""));return s%o/Math.pow(10,i)}var Ur=class extends fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==V.number){let s=this._getOrReturnCtx(e);return W(s,{code:L.invalid_type,expected:V.number,received:s.parsedType}),ue}let n,i=new ot;for(let s of this._def.checks)s.kind==="int"?ve.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),W(n,{code:L.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),W(n,{code:L.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),W(n,{code:L.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?lz(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),W(n,{code:L.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),W(n,{code:L.not_finite,message:s.message}),i.dirty()):ve.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,ee.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ee.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ee.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ee.toString(r))}setLimit(e,r,n,i){return new Ur({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ee.toString(i)}]})}_addCheck(e){return new Ur({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ee.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ee.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ee.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ee.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ee.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ee.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:ee.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ee.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ee.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&ve.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};Ur.create=t=>new Ur({checks:[],typeName:ne.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...le(t)});var Gr=class extends fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==V.bigint){let s=this._getOrReturnCtx(e);return W(s,{code:L.invalid_type,expected:V.bigint,received:s.parsedType}),ue}let n,i=new ot;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),W(n,{code:L.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),W(n,{code:L.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),W(n,{code:L.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):ve.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,ee.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ee.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ee.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ee.toString(r))}setLimit(e,r,n,i){return new Gr({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ee.toString(i)}]})}_addCheck(e){return new Gr({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ee.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ee.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ee.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ee.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ee.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};Gr.create=t=>{var e;return new Gr({checks:[],typeName:ne.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...le(t)})};var Ui=class extends fe{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==V.boolean){let n=this._getOrReturnCtx(e);return W(n,{code:L.invalid_type,expected:V.boolean,received:n.parsedType}),ue}return Rt(e.data)}};Ui.create=t=>new Ui({typeName:ne.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...le(t)});var Sn=class extends fe{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==V.date){let s=this._getOrReturnCtx(e);return W(s,{code:L.invalid_type,expected:V.date,received:s.parsedType}),ue}if(isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return W(s,{code:L.invalid_date}),ue}let n=new ot,i;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),W(i,{code:L.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),W(i,{code:L.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):ve.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Sn({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:ee.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:ee.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};Sn.create=t=>new Sn({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:ne.ZodDate,...le(t)});var So=class extends fe{_parse(e){if(this._getType(e)!==V.symbol){let n=this._getOrReturnCtx(e);return W(n,{code:L.invalid_type,expected:V.symbol,received:n.parsedType}),ue}return Rt(e.data)}};So.create=t=>new So({typeName:ne.ZodSymbol,...le(t)});var Gi=class extends fe{_parse(e){if(this._getType(e)!==V.undefined){let n=this._getOrReturnCtx(e);return W(n,{code:L.invalid_type,expected:V.undefined,received:n.parsedType}),ue}return Rt(e.data)}};Gi.create=t=>new Gi({typeName:ne.ZodUndefined,...le(t)});var Vi=class extends fe{_parse(e){if(this._getType(e)!==V.null){let n=this._getOrReturnCtx(e);return W(n,{code:L.invalid_type,expected:V.null,received:n.parsedType}),ue}return Rt(e.data)}};Vi.create=t=>new Vi({typeName:ne.ZodNull,...le(t)});var ci=class extends fe{constructor(){super(...arguments),this._any=!0}_parse(e){return Rt(e.data)}};ci.create=t=>new ci({typeName:ne.ZodAny,...le(t)});var xn=class extends fe{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Rt(e.data)}};xn.create=t=>new xn({typeName:ne.ZodUnknown,...le(t)});var Ar=class extends fe{_parse(e){let r=this._getOrReturnCtx(e);return W(r,{code:L.invalid_type,expected:V.never,received:r.parsedType}),ue}};Ar.create=t=>new Ar({typeName:ne.ZodNever,...le(t)});var Ao=class extends fe{_parse(e){if(this._getType(e)!==V.undefined){let n=this._getOrReturnCtx(e);return W(n,{code:L.invalid_type,expected:V.void,received:n.parsedType}),ue}return Rt(e.data)}};Ao.create=t=>new Ao({typeName:ne.ZodVoid,...le(t)});var Kt=class extends fe{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==V.array)return W(r,{code:L.invalid_type,expected:V.array,received:r.parsedType}),ue;if(i.exactLength!==null){let o=r.data.length>i.exactLength.value,a=r.data.length<i.exactLength.value;(o||a)&&(W(r,{code:o?L.too_big:L.too_small,minimum:a?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(W(r,{code:L.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(W(r,{code:L.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,a)=>i.type._parseAsync(new dr(r,o,r.path,a)))).then(o=>ot.mergeArray(n,o));let s=[...r.data].map((o,a)=>i.type._parseSync(new dr(r,o,r.path,a)));return ot.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new Kt({...this._def,minLength:{value:e,message:ee.toString(r)}})}max(e,r){return new Kt({...this._def,maxLength:{value:e,message:ee.toString(r)}})}length(e,r){return new Kt({...this._def,exactLength:{value:e,message:ee.toString(r)}})}nonempty(e){return this.min(1,e)}};Kt.create=(t,e)=>new Kt({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ne.ZodArray,...le(e)});function xo(t){if(t instanceof Pe){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=Sr.create(xo(n))}return new Pe({...t._def,shape:()=>e})}else return t instanceof Kt?new Kt({...t._def,type:xo(t.element)}):t instanceof Sr?Sr.create(xo(t.unwrap())):t instanceof Cn?Cn.create(xo(t.unwrap())):t instanceof pr?pr.create(t.items.map(e=>xo(e))):t}var Pe=class extends fe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=ve.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==V.object){let l=this._getOrReturnCtx(e);return W(l,{code:L.invalid_type,expected:V.object,received:l.parsedType}),ue}let{status:n,ctx:i}=this._processInputParams(e),{shape:s,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Ar&&this._def.unknownKeys==="strip"))for(let l in i.data)o.includes(l)||a.push(l);let u=[];for(let l of o){let f=s[l],h=i.data[l];u.push({key:{status:"valid",value:l},value:f._parse(new dr(i,h,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Ar){let l=this._def.unknownKeys;if(l==="passthrough")for(let f of a)u.push({key:{status:"valid",value:f},value:{status:"valid",value:i.data[f]}});else if(l==="strict")a.length>0&&(W(i,{code:L.unrecognized_keys,keys:a}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let l=this._def.catchall;for(let f of a){let h=i.data[f];u.push({key:{status:"valid",value:f},value:l._parse(new dr(i,h,i.path,f)),alwaysSet:f in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let l=[];for(let f of u){let h=await f.key;l.push({key:h,value:await f.value,alwaysSet:f.alwaysSet})}return l}).then(l=>ot.mergeObjectSync(n,l)):ot.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return ee.errToObj,new Pe({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,s,o,a;let u=(o=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,r,n).message)!==null&&o!==void 0?o:n.defaultError;return r.code==="unrecognized_keys"?{message:(a=ee.errToObj(e).message)!==null&&a!==void 0?a:u}:{message:u}}}:{}})}strip(){return new Pe({...this._def,unknownKeys:"strip"})}passthrough(){return new Pe({...this._def,unknownKeys:"passthrough"})}extend(e){return new Pe({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Pe({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ne.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new Pe({...this._def,catchall:e})}pick(e){let r={};return ve.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new Pe({...this._def,shape:()=>r})}omit(e){let r={};return ve.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new Pe({...this._def,shape:()=>r})}deepPartial(){return xo(this)}partial(e){let r={};return ve.objectKeys(this.shape).forEach(n=>{let i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}),new Pe({...this._def,shape:()=>r})}required(e){let r={};return ve.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof Sr;)s=s._def.innerType;r[n]=s}}),new Pe({...this._def,shape:()=>r})}keyof(){return HF(ve.objectKeys(this.shape))}};Pe.create=(t,e)=>new Pe({shape:()=>t,unknownKeys:"strip",catchall:Ar.create(),typeName:ne.ZodObject,...le(e)});Pe.strictCreate=(t,e)=>new Pe({shape:()=>t,unknownKeys:"strict",catchall:Ar.create(),typeName:ne.ZodObject,...le(e)});Pe.lazycreate=(t,e)=>new Pe({shape:t,unknownKeys:"strip",catchall:Ar.create(),typeName:ne.ZodObject,...le(e)});var Wi=class extends fe{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(s){for(let a of s)if(a.result.status==="valid")return a.result;for(let a of s)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let o=s.map(a=>new Yt(a.ctx.common.issues));return W(r,{code:L.invalid_union,unionErrors:o}),ue}if(r.common.async)return Promise.all(n.map(async s=>{let o={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(i);{let s,o=[];for(let u of n){let l={...r,common:{...r.common,issues:[]},parent:null},f=u._parseSync({data:r.data,path:r.path,parent:l});if(f.status==="valid")return f;f.status==="dirty"&&!s&&(s={result:f,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let a=o.map(u=>new Yt(u));return W(r,{code:L.invalid_union,unionErrors:a}),ue}}get options(){return this._def.options}};Wi.create=(t,e)=>new Wi({options:t,typeName:ne.ZodUnion,...le(e)});var Vf=t=>t instanceof Ki?Vf(t.schema):t instanceof Zt?Vf(t.innerType()):t instanceof Zi?[t.value]:t instanceof Vr?t.options:t instanceof Ji?Object.keys(t.enum):t instanceof Xi?Vf(t._def.innerType):t instanceof Gi?[void 0]:t instanceof Vi?[null]:null,Co=class extends fe{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==V.object)return W(r,{code:L.invalid_type,expected:V.object,received:r.parsedType}),ue;let n=this.discriminator,i=r.data[n],s=this.optionsMap.get(i);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(W(r,{code:L.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),ue)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let i=new Map;for(let s of r){let o=Vf(s.shape[e]);if(!o)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of o){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,s)}}return new Co({typeName:ne.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...le(n)})}};function r_(t,e){let r=ai(t),n=ai(e);if(t===e)return{valid:!0,data:t};if(r===V.object&&n===V.object){let i=ve.objectKeys(e),s=ve.objectKeys(t).filter(a=>i.indexOf(a)!==-1),o={...t,...e};for(let a of s){let u=r_(t[a],e[a]);if(!u.valid)return{valid:!1};o[a]=u.data}return{valid:!0,data:o}}else if(r===V.array&&n===V.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let s=0;s<t.length;s++){let o=t[s],a=e[s],u=r_(o,a);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return r===V.date&&n===V.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var zi=class extends fe{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(s,o)=>{if(e_(s)||e_(o))return ue;let a=r_(s.value,o.value);return a.valid?((t_(s)||t_(o))&&r.dirty(),{status:r.value,value:a.data}):(W(n,{code:L.invalid_intersection_types}),ue)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,o])=>i(s,o)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};zi.create=(t,e,r)=>new zi({left:t,right:e,typeName:ne.ZodIntersection,...le(r)});var pr=class extends fe{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.array)return W(n,{code:L.invalid_type,expected:V.array,received:n.parsedType}),ue;if(n.data.length<this._def.items.length)return W(n,{code:L.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ue;!this._def.rest&&n.data.length>this._def.items.length&&(W(n,{code:L.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...n.data].map((o,a)=>{let u=this._def.items[a]||this._def.rest;return u?u._parse(new dr(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(s).then(o=>ot.mergeArray(r,o)):ot.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new pr({...this._def,rest:e})}};pr.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new pr({items:t,typeName:ne.ZodTuple,rest:null,...le(e)})};var Yi=class extends fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.object)return W(n,{code:L.invalid_type,expected:V.object,received:n.parsedType}),ue;let i=[],s=this._def.keyType,o=this._def.valueType;for(let a in n.data)i.push({key:s._parse(new dr(n,a,n.path,a)),value:o._parse(new dr(n,n.data[a],n.path,a))});return n.common.async?ot.mergeObjectAsync(r,i):ot.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof fe?new Yi({keyType:e,valueType:r,typeName:ne.ZodRecord,...le(n)}):new Yi({keyType:zt.create(),valueType:e,typeName:ne.ZodRecord,...le(r)})}},Do=class extends fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.map)return W(n,{code:L.invalid_type,expected:V.map,received:n.parsedType}),ue;let i=this._def.keyType,s=this._def.valueType,o=[...n.data.entries()].map(([a,u],l)=>({key:i._parse(new dr(n,a,n.path,[l,"key"])),value:s._parse(new dr(n,u,n.path,[l,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let u of o){let l=await u.key,f=await u.value;if(l.status==="aborted"||f.status==="aborted")return ue;(l.status==="dirty"||f.status==="dirty")&&r.dirty(),a.set(l.value,f.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let u of o){let l=u.key,f=u.value;if(l.status==="aborted"||f.status==="aborted")return ue;(l.status==="dirty"||f.status==="dirty")&&r.dirty(),a.set(l.value,f.value)}return{status:r.value,value:a}}}};Do.create=(t,e,r)=>new Do({valueType:e,keyType:t,typeName:ne.ZodMap,...le(r)});var An=class extends fe{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.set)return W(n,{code:L.invalid_type,expected:V.set,received:n.parsedType}),ue;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(W(n,{code:L.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(W(n,{code:L.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let s=this._def.valueType;function o(u){let l=new Set;for(let f of u){if(f.status==="aborted")return ue;f.status==="dirty"&&r.dirty(),l.add(f.value)}return{status:r.value,value:l}}let a=[...n.data.values()].map((u,l)=>s._parse(new dr(n,u,n.path,l)));return n.common.async?Promise.all(a).then(u=>o(u)):o(a)}min(e,r){return new An({...this._def,minSize:{value:e,message:ee.toString(r)}})}max(e,r){return new An({...this._def,maxSize:{value:e,message:ee.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};An.create=(t,e)=>new An({valueType:t,minSize:null,maxSize:null,typeName:ne.ZodSet,...le(e)});var ui=class extends fe{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==V.function)return W(r,{code:L.invalid_type,expected:V.function,received:r.parsedType}),ue;function n(a,u){return zf({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Wf(),iu].filter(l=>!!l),issueData:{code:L.invalid_arguments,argumentsError:u}})}function i(a,u){return zf({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Wf(),iu].filter(l=>!!l),issueData:{code:L.invalid_return_type,returnTypeError:u}})}let s={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof li){let a=this;return Rt(async function(...u){let l=new Yt([]),f=await a._def.args.parseAsync(u,s).catch(g=>{throw l.addIssue(n(u,g)),l}),h=await Reflect.apply(o,this,f);return await a._def.returns._def.type.parseAsync(h,s).catch(g=>{throw l.addIssue(i(h,g)),l})})}else{let a=this;return Rt(function(...u){let l=a._def.args.safeParse(u,s);if(!l.success)throw new Yt([n(u,l.error)]);let f=Reflect.apply(o,this,l.data),h=a._def.returns.safeParse(f,s);if(!h.success)throw new Yt([i(f,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ui({...this._def,args:pr.create(e).rest(xn.create())})}returns(e){return new ui({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new ui({args:e||pr.create([]).rest(xn.create()),returns:r||xn.create(),typeName:ne.ZodFunction,...le(n)})}},Ki=class extends fe{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Ki.create=(t,e)=>new Ki({getter:t,typeName:ne.ZodLazy,...le(e)});var Zi=class extends fe{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return W(r,{received:r.data,code:L.invalid_literal,expected:this._def.value}),ue}return{status:"valid",value:e.data}}get value(){return this._def.value}};Zi.create=(t,e)=>new Zi({value:t,typeName:ne.ZodLiteral,...le(e)});function HF(t,e){return new Vr({values:t,typeName:ne.ZodEnum,...le(e)})}var Vr=class extends fe{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return W(r,{expected:ve.joinValues(n),received:r.parsedType,code:L.invalid_type}),ue}if(this._def.values.indexOf(e.data)===-1){let r=this._getOrReturnCtx(e),n=this._def.values;return W(r,{received:r.data,code:L.invalid_enum_value,options:n}),ue}return Rt(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e){return Vr.create(e)}exclude(e){return Vr.create(this.options.filter(r=>!e.includes(r)))}};Vr.create=HF;var Ji=class extends fe{_parse(e){let r=ve.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==V.string&&n.parsedType!==V.number){let i=ve.objectValues(r);return W(n,{expected:ve.joinValues(i),received:n.parsedType,code:L.invalid_type}),ue}if(r.indexOf(e.data)===-1){let i=ve.objectValues(r);return W(n,{received:n.data,code:L.invalid_enum_value,options:i}),ue}return Rt(e.data)}get enum(){return this._def.values}};Ji.create=(t,e)=>new Ji({values:t,typeName:ne.ZodNativeEnum,...le(e)});var li=class extends fe{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==V.promise&&r.common.async===!1)return W(r,{code:L.invalid_type,expected:V.promise,received:r.parsedType}),ue;let n=r.parsedType===V.promise?r.data:Promise.resolve(r.data);return Rt(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};li.create=(t,e)=>new li({type:t,typeName:ne.ZodPromise,...le(e)});var Zt=class extends fe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ne.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:o=>{W(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){let o=i.transform(n.data,s);return n.common.issues.length?{status:"dirty",value:n.data}:n.common.async?Promise.resolve(o).then(a=>this._def.schema._parseAsync({data:a,path:n.path,parent:n})):this._def.schema._parseSync({data:o,path:n.path,parent:n})}if(i.type==="refinement"){let o=a=>{let u=i.refinement(a,s);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?ue:(a.status==="dirty"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?ue:(a.status==="dirty"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(i.type==="transform")if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!su(o))return o;let a=i.transform(o.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>su(o)?Promise.resolve(i.transform(o.value,s)).then(a=>({status:r.value,value:a})):o);ve.assertNever(i)}};Zt.create=(t,e,r)=>new Zt({schema:t,typeName:ne.ZodEffects,effect:e,...le(r)});Zt.createWithPreprocess=(t,e,r)=>new Zt({schema:e,effect:{type:"preprocess",transform:t},typeName:ne.ZodEffects,...le(r)});var Sr=class extends fe{_parse(e){return this._getType(e)===V.undefined?Rt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Sr.create=(t,e)=>new Sr({innerType:t,typeName:ne.ZodOptional,...le(e)});var Cn=class extends fe{_parse(e){return this._getType(e)===V.null?Rt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Cn.create=(t,e)=>new Cn({innerType:t,typeName:ne.ZodNullable,...le(e)});var Xi=class extends fe{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===V.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Xi.create=(t,e)=>new Xi({innerType:t,typeName:ne.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...le(e)});var Ro=class extends fe{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Yf(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Yt(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Yt(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Ro.create=(t,e)=>new Ro({innerType:t,typeName:ne.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...le(e)});var Oo=class extends fe{_parse(e){if(this._getType(e)!==V.nan){let n=this._getOrReturnCtx(e);return W(n,{code:L.invalid_type,expected:V.nan,received:n.parsedType}),ue}return{status:"valid",value:e.data}}};Oo.create=t=>new Oo({typeName:ne.ZodNaN,...le(t)});var fz=Symbol("zod_brand"),Kf=class extends fe{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},Qi=class extends fe{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?ue:s.status==="dirty"?(r.dirty(),jF(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?ue:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new Qi({in:e,out:r,typeName:ne.ZodPipeline})}},To=class extends fe{_parse(e){let r=this._def.innerType._parse(e);return su(r)&&(r.value=Object.freeze(r.value)),r}};To.create=(t,e)=>new To({innerType:t,typeName:ne.ZodReadonly,...le(e)});var $F=(t,e={},r)=>t?ci.create().superRefine((n,i)=>{var s,o;if(!t(n)){let a=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,u=(o=(s=a.fatal)!==null&&s!==void 0?s:r)!==null&&o!==void 0?o:!0,l=typeof a=="string"?{message:a}:a;i.addIssue({code:"custom",...l,fatal:u})}}):ci.create(),hz={object:Pe.lazycreate},ne;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ne||(ne={}));var dz=(t,e={message:`Input not instance of ${t.name}`})=>$F(r=>r instanceof t,e),UF=zt.create,GF=Ur.create,pz=Oo.create,mz=Gr.create,VF=Ui.create,gz=Sn.create,yz=So.create,_z=Gi.create,vz=Vi.create,Ez=ci.create,bz=xn.create,wz=Ar.create,xz=Ao.create,Sz=Kt.create,Az=Pe.create,Cz=Pe.strictCreate,Dz=Wi.create,Rz=Co.create,Oz=zi.create,Tz=pr.create,kz=Yi.create,Fz=Do.create,Pz=An.create,Iz=ui.create,Bz=Ki.create,Lz=Zi.create,Nz=Vr.create,Mz=Ji.create,qz=li.create,MF=Zt.create,jz=Sr.create,Hz=Cn.create,$z=Zt.createWithPreprocess,Uz=Qi.create,Gz=()=>UF().optional(),Vz=()=>GF().optional(),Wz=()=>VF().optional(),zz={string:t=>zt.create({...t,coerce:!0}),number:t=>Ur.create({...t,coerce:!0}),boolean:t=>Ui.create({...t,coerce:!0}),bigint:t=>Gr.create({...t,coerce:!0}),date:t=>Sn.create({...t,coerce:!0})},Yz=ue,ko=Object.freeze({__proto__:null,defaultErrorMap:iu,setErrorMap:XW,getErrorMap:Wf,makeIssue:zf,EMPTY_PATH:QW,addIssueToContext:W,ParseStatus:ot,INVALID:ue,DIRTY:jF,OK:Rt,isAborted:e_,isDirty:t_,isValid:su,isAsync:Yf,get util(){return ve},get objectUtil(){return Qy},ZodParsedType:V,getParsedType:ai,ZodType:fe,ZodString:zt,ZodNumber:Ur,ZodBigInt:Gr,ZodBoolean:Ui,ZodDate:Sn,ZodSymbol:So,ZodUndefined:Gi,ZodNull:Vi,ZodAny:ci,ZodUnknown:xn,ZodNever:Ar,ZodVoid:Ao,ZodArray:Kt,ZodObject:Pe,ZodUnion:Wi,ZodDiscriminatedUnion:Co,ZodIntersection:zi,ZodTuple:pr,ZodRecord:Yi,ZodMap:Do,ZodSet:An,ZodFunction:ui,ZodLazy:Ki,ZodLiteral:Zi,ZodEnum:Vr,ZodNativeEnum:Ji,ZodPromise:li,ZodEffects:Zt,ZodTransformer:Zt,ZodOptional:Sr,ZodNullable:Cn,ZodDefault:Xi,ZodCatch:Ro,ZodNaN:Oo,BRAND:fz,ZodBranded:Kf,ZodPipeline:Qi,ZodReadonly:To,custom:$F,Schema:fe,ZodSchema:fe,late:hz,get ZodFirstPartyTypeKind(){return ne},coerce:zz,any:Ez,array:Sz,bigint:mz,boolean:VF,date:gz,discriminatedUnion:Rz,effect:MF,enum:Nz,function:Iz,instanceof:dz,intersection:Oz,lazy:Bz,literal:Lz,map:Fz,nan:pz,nativeEnum:Mz,never:wz,null:vz,nullable:Hz,number:GF,object:Az,oboolean:Wz,onumber:Vz,optional:jz,ostring:Gz,pipeline:Uz,preprocess:$z,promise:qz,record:kz,set:Pz,strictObject:Cz,string:UF,symbol:yz,transformer:MF,tuple:Tz,undefined:_z,union:Dz,unknown:bz,void:xz,NEVER:Yz,ZodIssueCode:L,quotelessJson:JW,ZodError:Yt});c();var u_=me(require("os")),e5=me(require("crypto")),t5=me(require("path")),r5=me(QF());function iY(t){let e=process.version,r=u_.default.type(),n=u_.default.arch();return`${t.name} ${t.version} ${e} ${r} ${n}`}async function sY(){let t=process.env.TURBO_CONFIG_DIR_PATH?process.env.TURBO_CONFIG_DIR_PATH:await(0,r5.configDir)();if(!t)throw new Error("Could not find telemetry config directory");return t5.default.join(t,"turborepo","telemetry.json")}function oY({input:t,salt:e}){return e5.default.createHash("sha256").update(`${e}${t}`).digest("hex")}var Fo={buildUserAgent:iY,oneWayHashWithSalt:oY,defaultConfigPath:sY};var aY="TURBO_TELEMETRY_DEBUG",uY="TURBO_TELEMETRY_DISABLED",cY="TURBO_TELEMETRY_MESSAGE_DISABLED",lY="DO_NOT_TRACK",fY=ko.object({telemetry_enabled:ko.boolean(),telemetry_id:ko.string(),telemetry_salt:ko.string(),telemetry_alerted:ko.string().optional()}),Mt=class{constructor({configPath:e,config:r}){this.config=r,this.configPath=e}static fromConfigPath(e){try{let r=(0,Po.readFileSync)(e,"utf-8"),n=JSON.parse(r),i=Mt.validateConfig(n);return new Mt({configPath:e,config:i})}catch{return Mt.tryRemove({configPath:e})?Mt.create({configPath:e}):void 0}}static async fromDefaultConfig(){try{let e=await Fo.defaultConfigPath();return Mt.fromConfigPath(e)}catch{return}}static validateConfig(e){try{return fY.parse(e)}catch{throw new Error("Config is invalid.")}}static create({configPath:e}){let r=wo(),n=wo(),i=Fo.oneWayHashWithSalt({input:r,salt:n}),s=new Mt({configPath:e,config:{telemetry_enabled:!0,telemetry_id:i,telemetry_salt:n}});if(s.tryWrite())return s}tryWrite(){try{let e=JSON.stringify(this.config,null,2);return(0,Po.writeFileSync)(this.configPath,e),!0}catch{return!1}}static tryRemove({configPath:e}){try{return(0,Po.rmSync)(e,{force:!0}),!0}catch{return!1}}hasSeenAlert(){return this.config.telemetry_alerted!==void 0}isEnabled(){let e=process.env[lY]||"0",r=process.env[uY]||"0";return e==="1"||e.toLowerCase()==="true"||r==="1"||r.toLowerCase()==="true"?!1:this.config.telemetry_enabled}isTelemetryWarningEnabled(){let e=process.env[cY]||"0";return!(e==="1"||e.toLowerCase()==="true")}get id(){return this.config.telemetry_id}showAlert(){!this.hasSeenAlert()&&this.isEnabled()&&this.isTelemetryWarningEnabled()&&(De.log(),De.bold("Attention:"),De.grey("Turborepo now collects completely anonymous telemetry regarding usage."),De.grey("This information is used to shape the Turborepo roadmap and prioritize features."),De.grey("You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:"),De.underline(n5.default.grey("https://turbo.build/repo/docs/telemetry"))),this.alertShown()}enable(){this.config.telemetry_enabled=!0,this.tryWrite()}disable(){this.config.telemetry_enabled=!1,this.tryWrite()}alertShown(){return this.hasSeenAlert()||(this.config.telemetry_alerted=new Date().toISOString(),this.tryWrite()),!0}oneWayHash(e){return Fo.oneWayHashWithSalt({input:e,salt:this.config.telemetry_salt})}static isDebug(){let e=process.env[aY]||"0";return e==="1"||e.toLowerCase()==="true"}};c();c();var i5=me(aF());var hY=20,dY="/api/turborepo/v1/events",es=class{constructor({api:e,packageInfo:r,config:n,opts:i}){this.batchSize=hY;this.timeout=250;this.sessionId=wo();this.eventBatches=[];this.events=[];let s=new URL(dY,e);this.api=s.toString(),this.packageInfo=r,this.config=n,i!=null&&i.timeout&&(this.timeout=i.timeout),i!=null&&i.batchSize&&(this.batchSize=i.batchSize)}hasPendingEvents(){return this.events.length!==0}async waitForFlush(){await Promise.all(this.eventBatches)}flushEvents(){let e=this.events.splice(0,this.batchSize);this.config.isEnabled()&&this.eventBatches.push(i5.default.post(this.api,{timeout:this.timeout,json:e,headers:{"x-turbo-telemetry-id":this.config.id,"x-turbo-session-id":this.sessionId,"User-Agent":Fo.buildUserAgent(this.packageInfo)}}))}track({key:e,value:r,parentId:n,isSensitive:i}){let s={id:wo(),key:e,value:i?this.config.oneWayHash(r):r,package_name:this.packageInfo.name,package_version:this.packageInfo.version,parent_id:n};return Mt.isDebug()&&(De.log(),De.bold("[telemetry event]"),De.dimmed(JSON.stringify(s,null,2)),De.log()),this.config.isEnabled()&&(this.events.push({package:s}),this.events.length>=this.batchSize&&this.flushEvents()),s}async close(){for(;this.hasPendingEvents();)this.flushEvents();try{await this.waitForFlush()}catch{}}trackCliOption({option:e,value:r}){return this.track({key:`option:${e}`,value:r})}trackCliArgument({argument:e,value:r}){return this.track({key:`argument:${e}`,value:r})}trackCliCommand({command:e,value:r}){return this.track({key:`command:${e}`,value:r})}trackCommandStatus({command:e,status:r}){return this.trackCliCommand({command:e,value:r})}trackCommandWarning(e){return this.track({key:"warning",value:e})}trackCommandError(e){return this.track({key:"error",value:e})}};var ou=class extends es{trackOptionExample(e){if(e)return this.trackCliOption({option:"example",value:e})}trackOptionPackageManager(e){if(e)return this.trackCliOption({option:"package_manager",value:e})}trackOptionSkipInstall(e){if(e)return this.trackCliOption({option:"skip_install",value:e.toString()})}trackOptionSkipTransforms(e){if(e)return this.trackCliOption({option:"skip_transforms",value:e.toString()})}trackOptionTurboVersion(e){if(e)return this.trackCliOption({option:"turbo_version",value:e})}trackOptionExamplePath(e){if(e)return this.trackCliOption({option:"example_path",value:e})}trackArgumentDirectory(e){if(e)return this.trackCliArgument({argument:"project_directory",value:"provided"})}trackArgumentPackageManager(e){if(e)return this.trackCliArgument({argument:"package_manager",value:e})}};c();var c5=me(u5());var mY=["build","test","lint","typecheck","checktypes","check-types","type-check","check"],au=class extends es{trackCI(){var e;return this.track({key:"ci",value:(e=c5.name)!=null?e:"unknown"})}trackArgumentWorkspace(e){if(e)return this.trackCliArgument({argument:"workspace",value:"provided"})}trackOptionTask(e){if(e)return this.trackCliOption({option:"task",value:mY.includes(e)?e:"other"})}trackOptionFallback(e){if(e)return this.trackCliOption({option:"fallback",value:e})}trackOptionDirectory(e){if(e)return this.trackCliOption({option:"directory",value:"custom"})}trackOptionMaxBuffer(e){if(e!==void 0)return this.trackCliOption({option:"max_buffer",value:e.toString()})}};var gY={"create-turbo":ou,"turbo-ignore":au},yY="https://telemetry.vercel.com";async function c_({packageInfo:t,opts:e}){let r=gY[t.name],n=await Mt.fromDefaultConfig();return n?(n.showAlert(),{telemetry:new r({api:yY,packageInfo:t,config:n,opts:e})}):{telemetry:void 0}}c();var uu=me($c());var l5="status",_Y=["enable","disable",l5];function vY(t){var r;let e=(r=t.telemetry)==null?void 0:r.config.isEnabled();De.log(`Status: ${e?uu.default.bold(uu.default.green("Enabled")):uu.default.bold(uu.default.red("Disabled"))}`),De.log(),e?De.log("Turborepo telemetry is completely anonymous. Thank you for participating!"):De.log("You have opted-out of Turborepo anonymous telemetry. No data will be collected from your machine."),De.log("Learn more: https://turbo.build/repo/docs/telemetry")}function EY(t,e){if(!e.telemetry){De.error("Telemetry could not be initialized");return}t==="enable"?(e.telemetry.config.enable(),De.bold("Success!")):t==="disable"&&(e.telemetry.config.disable(),De.bold("Success!")),De.log(),vY(e)}function l_(t){t.command("telemetry").description("Manage telemetry settings").addArgument(new P_("[action]","Action to perform").choices(_Y).default(l5)).action(EY)}var Jf={name:"turbo-ignore",version:"2.0.0",description:"",homepage:"https://turbo.build/repo",keywords:[],author:"Jared Palmer",license:"MIT",repository:{type:"git",url:"https://github.com/vercel/turbo",directory:"packages/turbo-ignore"},bugs:{url:"https://github.com/vercel/turbo/issues"},files:["dist"],bin:"dist/cli.js",scripts:{build:"tsup",test:"jest",lint:"eslint src __tests__","check-types":"tsc --noEmit","lint:prettier":"prettier -c . --cache --ignore-path=../../.prettierignore"},devDependencies:{"@turbo/eslint-config":"workspace:*","@turbo/telemetry":"workspace:*","@turbo/test-utils":"workspace:*","@turbo/tsconfig":"workspace:*","@turbo/types":"workspace:*","@turbo/utils":"workspace:*","@types/jest":"^27.4.0","@types/node":"^18.17.2",commander:"^11.0.0",jest:"^27.4.3","ts-jest":"^27.1.1",tsup:"^5.12.1",typescript:"5.3.3"}};c();var b5=require("child_process"),w5=me(require("path")),x5=require("fs");c();var f5=require("child_process");c();var f_="\u226B ";function je(...t){console.log(f_,...t)}function Dn(...t){console.error(f_,...t)}function h_(...t){console.warn(f_,...t)}function d_(...t){console.log(...t)}function wY(t){try{return(0,f5.execSync)(`git cat-file -t ${t}`,{stdio:"ignore"}),!0}catch{return!1}}function p_(t){return t.fallback?(je(`Falling back to ref ${t.fallback}`),{ref:t.fallback,type:"customFallback"}):null}function h5(t){let{workspace:e}=t;return process.env.VERCEL==="1"?process.env.VERCEL_GIT_PREVIOUS_SHA?wY(process.env.VERCEL_GIT_PREVIOUS_SHA)?(je(`Found previous deployment ("${process.env.VERCEL_GIT_PREVIOUS_SHA}") for "${e}"${process.env.VERCEL_GIT_COMMIT_REF?` on branch "${process.env.VERCEL_GIT_COMMIT_REF}"`:""}`),{ref:process.env.VERCEL_GIT_PREVIOUS_SHA,type:"previousDeploy"}):(je(`Previous deployment ("${process.env.VERCEL_GIT_PREVIOUS_SHA}") for "${e}"${process.env.VERCEL_GIT_COMMIT_REF?` on branch "${process.env.VERCEL_GIT_COMMIT_REF}"`:""} is unreachable.`),p_(t)):(je(`No previous deployments found for "${e}"${process.env.VERCEL_GIT_COMMIT_REF?` on branch "${process.env.VERCEL_GIT_COMMIT_REF}"`:""}`),p_(t)):t.fallback?p_(t):{ref:"HEAD^",type:"headRelative"}}c();function d5(t){return t.task?(je(`Using "${t.task}" as the task from the arguments`),`"${t.task}"`):(je('Using "build" as the task as it was unspecified'),"build")}c();var p5=me(require("fs")),m5=me(require("path"));function g5(t){let{directory:e=process.cwd(),workspace:r}=t;if(r)return je(`Using "${r}" as workspace from arguments`),r;let n=m5.default.join(e,"package.json");try{let i=p5.default.readFileSync(n,"utf8"),s=JSON.parse(i);return s.name?(je(`Inferred "${s.name}" as workspace from "package.json"`),s.name):(Dn(`"${n}" is missing the "name" field (required).`),null)}catch{return Dn(`"${n}" could not be found. turbo-ignore inferencing failed`),null}}c();var m_={MISSING_LOCKFILE:{regex:[/reading (?:yarn.lock|package-lock.json|pnpm-lock.yaml):.*?no such file or directory/i],message:"turbo-ignore could not complete - no lockfile found, please commit one to your repository"},NO_PACKAGE_MANAGER:{regex:[/run failed: We did not detect an in-use package manager for your project/i],message:'turbo-ignore could not complete - no package manager detected, please commit a lockfile, or set "packageManager" in your root "package.json"'},UNREACHABLE_PARENT:{regex:[/failed to resolve packages to run: commit HEAD\^ does not exist/i],message:"turbo-ignore could not complete - parent commit does not exist or is unreachable"},INVALID_COMPARISON:{regex:[/commit \S+ does not exist/i,/unknown revision/i,/invalid symmetric difference expression/i],message:"turbo-ignore could not complete - a ref or SHA is invalid. It could have been removed from the branch history via a force push, or this could be a shallow clone with insufficient history"}};function y5({err:t}){let e=Object.keys(m_).find(r=>{let{regex:n}=m_[r];return n.some(i=>i.test(t))});return e?{level:"warn",message:m_[e].message,code:e}:{level:"error",message:t,code:"UNKNOWN_ERROR"}}c();var _5=require("child_process"),xY=["[skip ci]","[ci skip]","[no ci]","[skip vercel]","[vercel skip]"],SY=["[vercel deploy]","[vercel build]"];function AY({workspace:t}){return[`[vercel skip ${t}]`]}function CY({workspace:t}){return[`[vercel deploy ${t}]`,`[vercel build ${t}]`]}var DY=/\[vercel only .+\]/;function RY({workspace:t}){return[`[vercel only ${t}]`]}function OY(){return process.env.VERCEL==="1"&&process.env.VERCEL_GIT_COMMIT_MESSAGE?process.env.VERCEL_GIT_COMMIT_MESSAGE:(0,_5.execSync)("git show -s --format=%B").toString()}function v5({workspace:t}){var u;let e=OY(),r=l=>e.includes(l),n=(u=DY.exec(e))==null?void 0:u[0];if(n)return RY({workspace:t}).find(l=>l===n)?{result:"deploy",scope:"workspace",reason:`Found commit message: ${n}`}:{result:"skip",scope:"workspace",reason:`Found commit message: ${n}`};let i=CY({workspace:t}).find(r),s=AY({workspace:t}).find(r);if(i&&s)return{result:"conflict",scope:"workspace",reason:`Conflicting commit messages found: ${i} and ${s}`};if(i)return{result:"deploy",scope:"workspace",reason:`Found commit message: ${i}`};if(s)return{result:"skip",scope:"workspace",reason:`Found commit message: ${s}`};let o=SY.find(r),a=xY.find(r);return o&&a?{result:"conflict",scope:"global",reason:`Conflicting commit messages found: ${o} and ${a}`}:o?{result:"deploy",scope:"global",reason:`Found commit message: ${o}`}:a?{result:"skip",scope:"global",reason:`Found commit message: ${a}`}:{result:"continue",scope:"global",reason:"No deploy or skip string found in commit message."}}function TY(t){var e,r,n,i;(e=t.telemetry)==null||e.trackOptionTask(t.task),(r=t.telemetry)==null||r.trackOptionFallback(t.fallback),(n=t.telemetry)==null||n.trackOptionDirectory(t.directory),(i=t.telemetry)==null||i.trackOptionMaxBuffer(t.maxBuffer)}function E5(){return d_("\u23ED Ignoring the change"),process.exit(0)}function zr(){return d_("\u2713 Proceeding with deployment"),process.exit(1)}function S5(t,e){var f,h;(f=e.telemetry)==null||f.trackCommandStatus({command:"ignore",status:"start"}),(h=e.telemetry)==null||h.trackArgumentWorkspace(t!==void 0),TY(e);let r={workspace:t,...e};if(je(`Using Turborepo to determine if this project is affected by the commit...
|
|
100
|
+
`:""}var X3=J3,Q3={dump:X3};function yd(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}var wZ=K1.load,xZ=K1.loadAll,SZ=Q3.dump;var AZ=yd("safeLoad","load"),CZ=yd("safeLoadAll","loadAll"),DZ=yd("safeDump","dump");var z4=me(zx());var De={};k5(De,{bold:()=>j4,dimmed:()=>$4,error:()=>hC,grey:()=>U4,info:()=>q4,item:()=>G4,log:()=>Un,turboBlue:()=>Bs,turboGradient:()=>M4,turboLoader:()=>lC,turboRed:()=>uC,underline:()=>H4,warn:()=>fC,yellow:()=>cC});c();var $n=me(ha()),iC=me(kA()),sC=me(nC()),oC="#0099F7",aC="#F11712",N4="#FFFF00",M4=(0,sC.default)(oC,aC),Bs=$n.default.hex(oC),uC=$n.default.hex(aC),cC=$n.default.hex(N4),lC=t=>(0,iC.default)({text:t,spinner:{frames:[" ",Bs("> "),Bs(">> "),Bs(">>>")]}}),q4=(...t)=>{Un(Bs.bold(">>>"),...t)},j4=(...t)=>{Un($n.default.bold(...t))},H4=(...t)=>{Un($n.default.underline(...t))},$4=(...t)=>{Un($n.default.dim(...t))},U4=(...t)=>{Un($n.default.grey(...t))},G4=(...t)=>{Un(Bs.bold(" \u2022"),...t)},Un=(...t)=>{console.log(...t)},fC=(...t)=>{console.error(cC.bold(">>>"),...t)},hC=(...t)=>{console.error(uC.bold(">>>"),...t)};c();var jj=me(require("os")),Hj=me(qD());c();c();var $j=me(require("path"));var Uj=me(ha());c();var uF=require("stream"),cF=require("util"),DV=require("path"),RV=require("os"),lF=require("fs"),OV=me(NO());var xte=(0,cF.promisify)(uF.Stream.pipeline);c();c();var qV=me(require("path")),jV=me(yF()),HV=me(ha());c();c();var n5=me($c());c();var $r=me(LF(),1),vre=$r.default.v1,Ere=$r.default.v3,wo=$r.default.v4,bre=$r.default.v5,wre=$r.default.NIL,xre=$r.default.version,Sre=$r.default.validate,Are=$r.default.stringify,Cre=$r.default.parse;c();var ve;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{let s={};for(let o of i)s[o]=o;return s},t.getValidEnumValues=i=>{let s=t.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),o={};for(let a of s)o[a]=i[a];return t.objectValues(o)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let s=[];for(let o in i)Object.prototype.hasOwnProperty.call(i,o)&&s.push(o);return s},t.find=(i,s)=>{for(let o of i)if(s(o))return o},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,s=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(ve||(ve={}));var Qy;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Qy||(Qy={}));var V=ve.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ai=t=>{switch(typeof t){case"undefined":return V.undefined;case"string":return V.string;case"number":return isNaN(t)?V.nan:V.number;case"boolean":return V.boolean;case"function":return V.function;case"bigint":return V.bigint;case"symbol":return V.symbol;case"object":return Array.isArray(t)?V.array:t===null?V.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?V.promise:typeof Map<"u"&&t instanceof Map?V.map:typeof Set<"u"&&t instanceof Set?V.set:typeof Date<"u"&&t instanceof Date?V.date:V.object;default:return V.unknown}},L=ve.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),JW=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),Yt=class extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let r=e||function(s){return s.message},n={_errors:[]},i=s=>{for(let o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let a=n,u=0;for(;u<o.path.length;){let l=o.path[u];u===o.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(r(o))):a[l]=a[l]||{_errors:[]},a=a[l],u++}}};return i(this),n}toString(){return this.message}get message(){return JSON.stringify(this.issues,ve.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Yt.create=t=>new Yt(t);var iu=(t,e)=>{let r;switch(t.code){case L.invalid_type:t.received===V.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case L.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,ve.jsonStringifyReplacer)}`;break;case L.unrecognized_keys:r=`Unrecognized key(s) in object: ${ve.joinValues(t.keys,", ")}`;break;case L.invalid_union:r="Invalid input";break;case L.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ve.joinValues(t.options)}`;break;case L.invalid_enum_value:r=`Invalid enum value. Expected ${ve.joinValues(t.options)}, received '${t.received}'`;break;case L.invalid_arguments:r="Invalid function arguments";break;case L.invalid_return_type:r="Invalid function return type";break;case L.invalid_date:r="Invalid date";break;case L.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:ve.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case L.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case L.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case L.custom:r="Invalid input";break;case L.invalid_intersection_types:r="Intersection results could not be merged";break;case L.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case L.not_finite:r="Number must be finite";break;default:r=e.defaultError,ve.assertNever(t)}return{message:r}},qF=iu;function XW(t){qF=t}function Wf(){return qF}var zf=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,s=[...r,...i.path||[]],o={...i,path:s},a="",u=n.filter(l=>!!l).slice().reverse();for(let l of u)a=l(o,{data:e,defaultError:a}).message;return{...i,path:s,message:i.message||a}},QW=[];function W(t,e){let r=zf({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Wf(),iu].filter(n=>!!n)});t.common.issues.push(r)}var ot=class{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let i of r){if(i.status==="aborted")return ue;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let i of r)n.push({key:await i.key,value:await i.value});return ot.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:s,value:o}=i;if(s.status==="aborted"||o.status==="aborted")return ue;s.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(n[s.value]=o.value)}return{status:e.value,value:n}}},ue=Object.freeze({status:"aborted"}),jF=t=>({status:"dirty",value:t}),Rt=t=>({status:"valid",value:t}),e_=t=>t.status==="aborted",t_=t=>t.status==="dirty",su=t=>t.status==="valid",Yf=t=>typeof Promise<"u"&&t instanceof Promise,ee;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(ee||(ee={}));var dr=class{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},NF=(t,e)=>{if(su(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Yt(t.common.issues);return this._error=r,this._error}}};function le(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(o,a)=>o.code!=="invalid_type"?{message:a.defaultError}:typeof a.data>"u"?{message:n!=null?n:a.defaultError}:{message:r!=null?r:a.defaultError},description:i}}var fe=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return ai(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:ai(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ot,ctx:{common:e.parent.common,data:e.data,parsedType:ai(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Yf(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;let i={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ai(e)},s=this._parseSync({data:e,path:i.path,parent:i});return NF(i,s)}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ai(e)},i=this._parse({data:e,path:n.path,parent:n}),s=await(Yf(i)?i:Promise.resolve(i));return NF(n,s)}refine(e,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,s)=>{let o=e(i),a=()=>s.addIssue({code:L.custom,...n(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new Zt({schema:this,typeName:ne.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Sr.create(this,this._def)}nullable(){return Cn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Kt.create(this,this._def)}promise(){return li.create(this,this._def)}or(e){return Wi.create([this,e],this._def)}and(e){return zi.create(this,e,this._def)}transform(e){return new Zt({...le(this._def),schema:this,typeName:ne.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new Xi({...le(this._def),innerType:this,defaultValue:r,typeName:ne.ZodDefault})}brand(){return new Kf({typeName:ne.ZodBranded,type:this,...le(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new Ro({...le(this._def),innerType:this,catchValue:r,typeName:ne.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Qi.create(this,e)}readonly(){return To.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},ez=/^c[^\s-]{8,}$/i,tz=/^[a-z][a-z0-9]*$/,rz=/^[0-9A-HJKMNP-TV-Z]{26}$/,nz=/^[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,iz=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,sz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Xy,oz=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,az=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,uz=t=>t.precision?t.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}Z$`):t.precision===0?t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function cz(t,e){return!!((e==="v4"||!e)&&oz.test(t)||(e==="v6"||!e)&&az.test(t))}var zt=class extends fe{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==V.string){let s=this._getOrReturnCtx(e);return W(s,{code:L.invalid_type,expected:V.string,received:s.parsedType}),ue}let n=new ot,i;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),W(i,{code:L.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),W(i,{code:L.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){let o=e.data.length>s.value,a=e.data.length<s.value;(o||a)&&(i=this._getOrReturnCtx(e,i),o?W(i,{code:L.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&W(i,{code:L.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")iz.test(e.data)||(i=this._getOrReturnCtx(e,i),W(i,{validation:"email",code:L.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")Xy||(Xy=new RegExp(sz,"u")),Xy.test(e.data)||(i=this._getOrReturnCtx(e,i),W(i,{validation:"emoji",code:L.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")nz.test(e.data)||(i=this._getOrReturnCtx(e,i),W(i,{validation:"uuid",code:L.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")ez.test(e.data)||(i=this._getOrReturnCtx(e,i),W(i,{validation:"cuid",code:L.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")tz.test(e.data)||(i=this._getOrReturnCtx(e,i),W(i,{validation:"cuid2",code:L.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")rz.test(e.data)||(i=this._getOrReturnCtx(e,i),W(i,{validation:"ulid",code:L.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),W(i,{validation:"url",code:L.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),W(i,{validation:"regex",code:L.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),W(i,{code:L.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),W(i,{code:L.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),W(i,{code:L.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?uz(s).test(e.data)||(i=this._getOrReturnCtx(e,i),W(i,{code:L.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="ip"?cz(e.data,s.version)||(i=this._getOrReturnCtx(e,i),W(i,{validation:"ip",code:L.invalid_string,message:s.message}),n.dirty()):ve.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:L.invalid_string,...ee.errToObj(n)})}_addCheck(e){return new zt({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ee.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ee.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ee.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ee.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ee.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ee.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ee.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ee.errToObj(e)})}datetime(e){var r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(r=e==null?void 0:e.offset)!==null&&r!==void 0?r:!1,...ee.errToObj(e==null?void 0:e.message)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...ee.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...ee.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...ee.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...ee.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...ee.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...ee.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...ee.errToObj(r)})}nonempty(e){return this.min(1,ee.errToObj(e))}trim(){return new zt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new zt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new zt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};zt.create=t=>{var e;return new zt({checks:[],typeName:ne.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...le(t)})};function lz(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,s=parseInt(t.toFixed(i).replace(".","")),o=parseInt(e.toFixed(i).replace(".",""));return s%o/Math.pow(10,i)}var Ur=class extends fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==V.number){let s=this._getOrReturnCtx(e);return W(s,{code:L.invalid_type,expected:V.number,received:s.parsedType}),ue}let n,i=new ot;for(let s of this._def.checks)s.kind==="int"?ve.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),W(n,{code:L.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),W(n,{code:L.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),W(n,{code:L.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?lz(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),W(n,{code:L.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),W(n,{code:L.not_finite,message:s.message}),i.dirty()):ve.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,ee.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ee.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ee.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ee.toString(r))}setLimit(e,r,n,i){return new Ur({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ee.toString(i)}]})}_addCheck(e){return new Ur({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ee.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ee.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ee.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ee.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ee.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ee.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:ee.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ee.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ee.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&ve.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};Ur.create=t=>new Ur({checks:[],typeName:ne.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...le(t)});var Gr=class extends fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==V.bigint){let s=this._getOrReturnCtx(e);return W(s,{code:L.invalid_type,expected:V.bigint,received:s.parsedType}),ue}let n,i=new ot;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),W(n,{code:L.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),W(n,{code:L.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),W(n,{code:L.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):ve.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,ee.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ee.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ee.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ee.toString(r))}setLimit(e,r,n,i){return new Gr({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ee.toString(i)}]})}_addCheck(e){return new Gr({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ee.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ee.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ee.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ee.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ee.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};Gr.create=t=>{var e;return new Gr({checks:[],typeName:ne.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...le(t)})};var Ui=class extends fe{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==V.boolean){let n=this._getOrReturnCtx(e);return W(n,{code:L.invalid_type,expected:V.boolean,received:n.parsedType}),ue}return Rt(e.data)}};Ui.create=t=>new Ui({typeName:ne.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...le(t)});var Sn=class extends fe{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==V.date){let s=this._getOrReturnCtx(e);return W(s,{code:L.invalid_type,expected:V.date,received:s.parsedType}),ue}if(isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return W(s,{code:L.invalid_date}),ue}let n=new ot,i;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),W(i,{code:L.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),W(i,{code:L.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):ve.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Sn({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:ee.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:ee.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};Sn.create=t=>new Sn({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:ne.ZodDate,...le(t)});var So=class extends fe{_parse(e){if(this._getType(e)!==V.symbol){let n=this._getOrReturnCtx(e);return W(n,{code:L.invalid_type,expected:V.symbol,received:n.parsedType}),ue}return Rt(e.data)}};So.create=t=>new So({typeName:ne.ZodSymbol,...le(t)});var Gi=class extends fe{_parse(e){if(this._getType(e)!==V.undefined){let n=this._getOrReturnCtx(e);return W(n,{code:L.invalid_type,expected:V.undefined,received:n.parsedType}),ue}return Rt(e.data)}};Gi.create=t=>new Gi({typeName:ne.ZodUndefined,...le(t)});var Vi=class extends fe{_parse(e){if(this._getType(e)!==V.null){let n=this._getOrReturnCtx(e);return W(n,{code:L.invalid_type,expected:V.null,received:n.parsedType}),ue}return Rt(e.data)}};Vi.create=t=>new Vi({typeName:ne.ZodNull,...le(t)});var ci=class extends fe{constructor(){super(...arguments),this._any=!0}_parse(e){return Rt(e.data)}};ci.create=t=>new ci({typeName:ne.ZodAny,...le(t)});var xn=class extends fe{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Rt(e.data)}};xn.create=t=>new xn({typeName:ne.ZodUnknown,...le(t)});var Ar=class extends fe{_parse(e){let r=this._getOrReturnCtx(e);return W(r,{code:L.invalid_type,expected:V.never,received:r.parsedType}),ue}};Ar.create=t=>new Ar({typeName:ne.ZodNever,...le(t)});var Ao=class extends fe{_parse(e){if(this._getType(e)!==V.undefined){let n=this._getOrReturnCtx(e);return W(n,{code:L.invalid_type,expected:V.void,received:n.parsedType}),ue}return Rt(e.data)}};Ao.create=t=>new Ao({typeName:ne.ZodVoid,...le(t)});var Kt=class extends fe{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==V.array)return W(r,{code:L.invalid_type,expected:V.array,received:r.parsedType}),ue;if(i.exactLength!==null){let o=r.data.length>i.exactLength.value,a=r.data.length<i.exactLength.value;(o||a)&&(W(r,{code:o?L.too_big:L.too_small,minimum:a?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(W(r,{code:L.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(W(r,{code:L.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,a)=>i.type._parseAsync(new dr(r,o,r.path,a)))).then(o=>ot.mergeArray(n,o));let s=[...r.data].map((o,a)=>i.type._parseSync(new dr(r,o,r.path,a)));return ot.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new Kt({...this._def,minLength:{value:e,message:ee.toString(r)}})}max(e,r){return new Kt({...this._def,maxLength:{value:e,message:ee.toString(r)}})}length(e,r){return new Kt({...this._def,exactLength:{value:e,message:ee.toString(r)}})}nonempty(e){return this.min(1,e)}};Kt.create=(t,e)=>new Kt({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ne.ZodArray,...le(e)});function xo(t){if(t instanceof Pe){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=Sr.create(xo(n))}return new Pe({...t._def,shape:()=>e})}else return t instanceof Kt?new Kt({...t._def,type:xo(t.element)}):t instanceof Sr?Sr.create(xo(t.unwrap())):t instanceof Cn?Cn.create(xo(t.unwrap())):t instanceof pr?pr.create(t.items.map(e=>xo(e))):t}var Pe=class extends fe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=ve.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==V.object){let l=this._getOrReturnCtx(e);return W(l,{code:L.invalid_type,expected:V.object,received:l.parsedType}),ue}let{status:n,ctx:i}=this._processInputParams(e),{shape:s,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Ar&&this._def.unknownKeys==="strip"))for(let l in i.data)o.includes(l)||a.push(l);let u=[];for(let l of o){let f=s[l],h=i.data[l];u.push({key:{status:"valid",value:l},value:f._parse(new dr(i,h,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Ar){let l=this._def.unknownKeys;if(l==="passthrough")for(let f of a)u.push({key:{status:"valid",value:f},value:{status:"valid",value:i.data[f]}});else if(l==="strict")a.length>0&&(W(i,{code:L.unrecognized_keys,keys:a}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let l=this._def.catchall;for(let f of a){let h=i.data[f];u.push({key:{status:"valid",value:f},value:l._parse(new dr(i,h,i.path,f)),alwaysSet:f in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let l=[];for(let f of u){let h=await f.key;l.push({key:h,value:await f.value,alwaysSet:f.alwaysSet})}return l}).then(l=>ot.mergeObjectSync(n,l)):ot.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return ee.errToObj,new Pe({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,s,o,a;let u=(o=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,r,n).message)!==null&&o!==void 0?o:n.defaultError;return r.code==="unrecognized_keys"?{message:(a=ee.errToObj(e).message)!==null&&a!==void 0?a:u}:{message:u}}}:{}})}strip(){return new Pe({...this._def,unknownKeys:"strip"})}passthrough(){return new Pe({...this._def,unknownKeys:"passthrough"})}extend(e){return new Pe({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Pe({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ne.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new Pe({...this._def,catchall:e})}pick(e){let r={};return ve.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new Pe({...this._def,shape:()=>r})}omit(e){let r={};return ve.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new Pe({...this._def,shape:()=>r})}deepPartial(){return xo(this)}partial(e){let r={};return ve.objectKeys(this.shape).forEach(n=>{let i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}),new Pe({...this._def,shape:()=>r})}required(e){let r={};return ve.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof Sr;)s=s._def.innerType;r[n]=s}}),new Pe({...this._def,shape:()=>r})}keyof(){return HF(ve.objectKeys(this.shape))}};Pe.create=(t,e)=>new Pe({shape:()=>t,unknownKeys:"strip",catchall:Ar.create(),typeName:ne.ZodObject,...le(e)});Pe.strictCreate=(t,e)=>new Pe({shape:()=>t,unknownKeys:"strict",catchall:Ar.create(),typeName:ne.ZodObject,...le(e)});Pe.lazycreate=(t,e)=>new Pe({shape:t,unknownKeys:"strip",catchall:Ar.create(),typeName:ne.ZodObject,...le(e)});var Wi=class extends fe{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(s){for(let a of s)if(a.result.status==="valid")return a.result;for(let a of s)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let o=s.map(a=>new Yt(a.ctx.common.issues));return W(r,{code:L.invalid_union,unionErrors:o}),ue}if(r.common.async)return Promise.all(n.map(async s=>{let o={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(i);{let s,o=[];for(let u of n){let l={...r,common:{...r.common,issues:[]},parent:null},f=u._parseSync({data:r.data,path:r.path,parent:l});if(f.status==="valid")return f;f.status==="dirty"&&!s&&(s={result:f,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let a=o.map(u=>new Yt(u));return W(r,{code:L.invalid_union,unionErrors:a}),ue}}get options(){return this._def.options}};Wi.create=(t,e)=>new Wi({options:t,typeName:ne.ZodUnion,...le(e)});var Vf=t=>t instanceof Ki?Vf(t.schema):t instanceof Zt?Vf(t.innerType()):t instanceof Zi?[t.value]:t instanceof Vr?t.options:t instanceof Ji?Object.keys(t.enum):t instanceof Xi?Vf(t._def.innerType):t instanceof Gi?[void 0]:t instanceof Vi?[null]:null,Co=class extends fe{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==V.object)return W(r,{code:L.invalid_type,expected:V.object,received:r.parsedType}),ue;let n=this.discriminator,i=r.data[n],s=this.optionsMap.get(i);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(W(r,{code:L.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),ue)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let i=new Map;for(let s of r){let o=Vf(s.shape[e]);if(!o)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of o){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,s)}}return new Co({typeName:ne.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...le(n)})}};function r_(t,e){let r=ai(t),n=ai(e);if(t===e)return{valid:!0,data:t};if(r===V.object&&n===V.object){let i=ve.objectKeys(e),s=ve.objectKeys(t).filter(a=>i.indexOf(a)!==-1),o={...t,...e};for(let a of s){let u=r_(t[a],e[a]);if(!u.valid)return{valid:!1};o[a]=u.data}return{valid:!0,data:o}}else if(r===V.array&&n===V.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let s=0;s<t.length;s++){let o=t[s],a=e[s],u=r_(o,a);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return r===V.date&&n===V.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var zi=class extends fe{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(s,o)=>{if(e_(s)||e_(o))return ue;let a=r_(s.value,o.value);return a.valid?((t_(s)||t_(o))&&r.dirty(),{status:r.value,value:a.data}):(W(n,{code:L.invalid_intersection_types}),ue)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,o])=>i(s,o)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};zi.create=(t,e,r)=>new zi({left:t,right:e,typeName:ne.ZodIntersection,...le(r)});var pr=class extends fe{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.array)return W(n,{code:L.invalid_type,expected:V.array,received:n.parsedType}),ue;if(n.data.length<this._def.items.length)return W(n,{code:L.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ue;!this._def.rest&&n.data.length>this._def.items.length&&(W(n,{code:L.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...n.data].map((o,a)=>{let u=this._def.items[a]||this._def.rest;return u?u._parse(new dr(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(s).then(o=>ot.mergeArray(r,o)):ot.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new pr({...this._def,rest:e})}};pr.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new pr({items:t,typeName:ne.ZodTuple,rest:null,...le(e)})};var Yi=class extends fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.object)return W(n,{code:L.invalid_type,expected:V.object,received:n.parsedType}),ue;let i=[],s=this._def.keyType,o=this._def.valueType;for(let a in n.data)i.push({key:s._parse(new dr(n,a,n.path,a)),value:o._parse(new dr(n,n.data[a],n.path,a))});return n.common.async?ot.mergeObjectAsync(r,i):ot.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof fe?new Yi({keyType:e,valueType:r,typeName:ne.ZodRecord,...le(n)}):new Yi({keyType:zt.create(),valueType:e,typeName:ne.ZodRecord,...le(r)})}},Do=class extends fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.map)return W(n,{code:L.invalid_type,expected:V.map,received:n.parsedType}),ue;let i=this._def.keyType,s=this._def.valueType,o=[...n.data.entries()].map(([a,u],l)=>({key:i._parse(new dr(n,a,n.path,[l,"key"])),value:s._parse(new dr(n,u,n.path,[l,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let u of o){let l=await u.key,f=await u.value;if(l.status==="aborted"||f.status==="aborted")return ue;(l.status==="dirty"||f.status==="dirty")&&r.dirty(),a.set(l.value,f.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let u of o){let l=u.key,f=u.value;if(l.status==="aborted"||f.status==="aborted")return ue;(l.status==="dirty"||f.status==="dirty")&&r.dirty(),a.set(l.value,f.value)}return{status:r.value,value:a}}}};Do.create=(t,e,r)=>new Do({valueType:e,keyType:t,typeName:ne.ZodMap,...le(r)});var An=class extends fe{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==V.set)return W(n,{code:L.invalid_type,expected:V.set,received:n.parsedType}),ue;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(W(n,{code:L.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(W(n,{code:L.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let s=this._def.valueType;function o(u){let l=new Set;for(let f of u){if(f.status==="aborted")return ue;f.status==="dirty"&&r.dirty(),l.add(f.value)}return{status:r.value,value:l}}let a=[...n.data.values()].map((u,l)=>s._parse(new dr(n,u,n.path,l)));return n.common.async?Promise.all(a).then(u=>o(u)):o(a)}min(e,r){return new An({...this._def,minSize:{value:e,message:ee.toString(r)}})}max(e,r){return new An({...this._def,maxSize:{value:e,message:ee.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};An.create=(t,e)=>new An({valueType:t,minSize:null,maxSize:null,typeName:ne.ZodSet,...le(e)});var ui=class extends fe{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==V.function)return W(r,{code:L.invalid_type,expected:V.function,received:r.parsedType}),ue;function n(a,u){return zf({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Wf(),iu].filter(l=>!!l),issueData:{code:L.invalid_arguments,argumentsError:u}})}function i(a,u){return zf({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Wf(),iu].filter(l=>!!l),issueData:{code:L.invalid_return_type,returnTypeError:u}})}let s={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof li){let a=this;return Rt(async function(...u){let l=new Yt([]),f=await a._def.args.parseAsync(u,s).catch(g=>{throw l.addIssue(n(u,g)),l}),h=await Reflect.apply(o,this,f);return await a._def.returns._def.type.parseAsync(h,s).catch(g=>{throw l.addIssue(i(h,g)),l})})}else{let a=this;return Rt(function(...u){let l=a._def.args.safeParse(u,s);if(!l.success)throw new Yt([n(u,l.error)]);let f=Reflect.apply(o,this,l.data),h=a._def.returns.safeParse(f,s);if(!h.success)throw new Yt([i(f,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ui({...this._def,args:pr.create(e).rest(xn.create())})}returns(e){return new ui({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new ui({args:e||pr.create([]).rest(xn.create()),returns:r||xn.create(),typeName:ne.ZodFunction,...le(n)})}},Ki=class extends fe{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Ki.create=(t,e)=>new Ki({getter:t,typeName:ne.ZodLazy,...le(e)});var Zi=class extends fe{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return W(r,{received:r.data,code:L.invalid_literal,expected:this._def.value}),ue}return{status:"valid",value:e.data}}get value(){return this._def.value}};Zi.create=(t,e)=>new Zi({value:t,typeName:ne.ZodLiteral,...le(e)});function HF(t,e){return new Vr({values:t,typeName:ne.ZodEnum,...le(e)})}var Vr=class extends fe{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return W(r,{expected:ve.joinValues(n),received:r.parsedType,code:L.invalid_type}),ue}if(this._def.values.indexOf(e.data)===-1){let r=this._getOrReturnCtx(e),n=this._def.values;return W(r,{received:r.data,code:L.invalid_enum_value,options:n}),ue}return Rt(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e){return Vr.create(e)}exclude(e){return Vr.create(this.options.filter(r=>!e.includes(r)))}};Vr.create=HF;var Ji=class extends fe{_parse(e){let r=ve.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==V.string&&n.parsedType!==V.number){let i=ve.objectValues(r);return W(n,{expected:ve.joinValues(i),received:n.parsedType,code:L.invalid_type}),ue}if(r.indexOf(e.data)===-1){let i=ve.objectValues(r);return W(n,{received:n.data,code:L.invalid_enum_value,options:i}),ue}return Rt(e.data)}get enum(){return this._def.values}};Ji.create=(t,e)=>new Ji({values:t,typeName:ne.ZodNativeEnum,...le(e)});var li=class extends fe{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==V.promise&&r.common.async===!1)return W(r,{code:L.invalid_type,expected:V.promise,received:r.parsedType}),ue;let n=r.parsedType===V.promise?r.data:Promise.resolve(r.data);return Rt(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};li.create=(t,e)=>new li({type:t,typeName:ne.ZodPromise,...le(e)});var Zt=class extends fe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ne.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:o=>{W(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){let o=i.transform(n.data,s);return n.common.issues.length?{status:"dirty",value:n.data}:n.common.async?Promise.resolve(o).then(a=>this._def.schema._parseAsync({data:a,path:n.path,parent:n})):this._def.schema._parseSync({data:o,path:n.path,parent:n})}if(i.type==="refinement"){let o=a=>{let u=i.refinement(a,s);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?ue:(a.status==="dirty"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?ue:(a.status==="dirty"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(i.type==="transform")if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!su(o))return o;let a=i.transform(o.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>su(o)?Promise.resolve(i.transform(o.value,s)).then(a=>({status:r.value,value:a})):o);ve.assertNever(i)}};Zt.create=(t,e,r)=>new Zt({schema:t,typeName:ne.ZodEffects,effect:e,...le(r)});Zt.createWithPreprocess=(t,e,r)=>new Zt({schema:e,effect:{type:"preprocess",transform:t},typeName:ne.ZodEffects,...le(r)});var Sr=class extends fe{_parse(e){return this._getType(e)===V.undefined?Rt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Sr.create=(t,e)=>new Sr({innerType:t,typeName:ne.ZodOptional,...le(e)});var Cn=class extends fe{_parse(e){return this._getType(e)===V.null?Rt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Cn.create=(t,e)=>new Cn({innerType:t,typeName:ne.ZodNullable,...le(e)});var Xi=class extends fe{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===V.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Xi.create=(t,e)=>new Xi({innerType:t,typeName:ne.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...le(e)});var Ro=class extends fe{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Yf(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Yt(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Yt(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Ro.create=(t,e)=>new Ro({innerType:t,typeName:ne.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...le(e)});var Oo=class extends fe{_parse(e){if(this._getType(e)!==V.nan){let n=this._getOrReturnCtx(e);return W(n,{code:L.invalid_type,expected:V.nan,received:n.parsedType}),ue}return{status:"valid",value:e.data}}};Oo.create=t=>new Oo({typeName:ne.ZodNaN,...le(t)});var fz=Symbol("zod_brand"),Kf=class extends fe{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},Qi=class extends fe{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?ue:s.status==="dirty"?(r.dirty(),jF(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?ue:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new Qi({in:e,out:r,typeName:ne.ZodPipeline})}},To=class extends fe{_parse(e){let r=this._def.innerType._parse(e);return su(r)&&(r.value=Object.freeze(r.value)),r}};To.create=(t,e)=>new To({innerType:t,typeName:ne.ZodReadonly,...le(e)});var $F=(t,e={},r)=>t?ci.create().superRefine((n,i)=>{var s,o;if(!t(n)){let a=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,u=(o=(s=a.fatal)!==null&&s!==void 0?s:r)!==null&&o!==void 0?o:!0,l=typeof a=="string"?{message:a}:a;i.addIssue({code:"custom",...l,fatal:u})}}):ci.create(),hz={object:Pe.lazycreate},ne;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ne||(ne={}));var dz=(t,e={message:`Input not instance of ${t.name}`})=>$F(r=>r instanceof t,e),UF=zt.create,GF=Ur.create,pz=Oo.create,mz=Gr.create,VF=Ui.create,gz=Sn.create,yz=So.create,_z=Gi.create,vz=Vi.create,Ez=ci.create,bz=xn.create,wz=Ar.create,xz=Ao.create,Sz=Kt.create,Az=Pe.create,Cz=Pe.strictCreate,Dz=Wi.create,Rz=Co.create,Oz=zi.create,Tz=pr.create,kz=Yi.create,Fz=Do.create,Pz=An.create,Iz=ui.create,Bz=Ki.create,Lz=Zi.create,Nz=Vr.create,Mz=Ji.create,qz=li.create,MF=Zt.create,jz=Sr.create,Hz=Cn.create,$z=Zt.createWithPreprocess,Uz=Qi.create,Gz=()=>UF().optional(),Vz=()=>GF().optional(),Wz=()=>VF().optional(),zz={string:t=>zt.create({...t,coerce:!0}),number:t=>Ur.create({...t,coerce:!0}),boolean:t=>Ui.create({...t,coerce:!0}),bigint:t=>Gr.create({...t,coerce:!0}),date:t=>Sn.create({...t,coerce:!0})},Yz=ue,ko=Object.freeze({__proto__:null,defaultErrorMap:iu,setErrorMap:XW,getErrorMap:Wf,makeIssue:zf,EMPTY_PATH:QW,addIssueToContext:W,ParseStatus:ot,INVALID:ue,DIRTY:jF,OK:Rt,isAborted:e_,isDirty:t_,isValid:su,isAsync:Yf,get util(){return ve},get objectUtil(){return Qy},ZodParsedType:V,getParsedType:ai,ZodType:fe,ZodString:zt,ZodNumber:Ur,ZodBigInt:Gr,ZodBoolean:Ui,ZodDate:Sn,ZodSymbol:So,ZodUndefined:Gi,ZodNull:Vi,ZodAny:ci,ZodUnknown:xn,ZodNever:Ar,ZodVoid:Ao,ZodArray:Kt,ZodObject:Pe,ZodUnion:Wi,ZodDiscriminatedUnion:Co,ZodIntersection:zi,ZodTuple:pr,ZodRecord:Yi,ZodMap:Do,ZodSet:An,ZodFunction:ui,ZodLazy:Ki,ZodLiteral:Zi,ZodEnum:Vr,ZodNativeEnum:Ji,ZodPromise:li,ZodEffects:Zt,ZodTransformer:Zt,ZodOptional:Sr,ZodNullable:Cn,ZodDefault:Xi,ZodCatch:Ro,ZodNaN:Oo,BRAND:fz,ZodBranded:Kf,ZodPipeline:Qi,ZodReadonly:To,custom:$F,Schema:fe,ZodSchema:fe,late:hz,get ZodFirstPartyTypeKind(){return ne},coerce:zz,any:Ez,array:Sz,bigint:mz,boolean:VF,date:gz,discriminatedUnion:Rz,effect:MF,enum:Nz,function:Iz,instanceof:dz,intersection:Oz,lazy:Bz,literal:Lz,map:Fz,nan:pz,nativeEnum:Mz,never:wz,null:vz,nullable:Hz,number:GF,object:Az,oboolean:Wz,onumber:Vz,optional:jz,ostring:Gz,pipeline:Uz,preprocess:$z,promise:qz,record:kz,set:Pz,strictObject:Cz,string:UF,symbol:yz,transformer:MF,tuple:Tz,undefined:_z,union:Dz,unknown:bz,void:xz,NEVER:Yz,ZodIssueCode:L,quotelessJson:JW,ZodError:Yt});c();var u_=me(require("os")),e5=me(require("crypto")),t5=me(require("path")),r5=me(QF());function iY(t){let e=process.version,r=u_.default.type(),n=u_.default.arch();return`${t.name} ${t.version} ${e} ${r} ${n}`}async function sY(){let t=process.env.TURBO_CONFIG_DIR_PATH?process.env.TURBO_CONFIG_DIR_PATH:await(0,r5.configDir)();if(!t)throw new Error("Could not find telemetry config directory");return t5.default.join(t,"turborepo","telemetry.json")}function oY({input:t,salt:e}){return e5.default.createHash("sha256").update(`${e}${t}`).digest("hex")}var Fo={buildUserAgent:iY,oneWayHashWithSalt:oY,defaultConfigPath:sY};var aY="TURBO_TELEMETRY_DEBUG",uY="TURBO_TELEMETRY_DISABLED",cY="TURBO_TELEMETRY_MESSAGE_DISABLED",lY="DO_NOT_TRACK",fY=ko.object({telemetry_enabled:ko.boolean(),telemetry_id:ko.string(),telemetry_salt:ko.string(),telemetry_alerted:ko.string().optional()}),Mt=class{constructor({configPath:e,config:r}){this.config=r,this.configPath=e}static fromConfigPath(e){try{let r=(0,Po.readFileSync)(e,"utf-8"),n=JSON.parse(r),i=Mt.validateConfig(n);return new Mt({configPath:e,config:i})}catch{return Mt.tryRemove({configPath:e})?Mt.create({configPath:e}):void 0}}static async fromDefaultConfig(){try{let e=await Fo.defaultConfigPath();return Mt.fromConfigPath(e)}catch{return}}static validateConfig(e){try{return fY.parse(e)}catch{throw new Error("Config is invalid.")}}static create({configPath:e}){let r=wo(),n=wo(),i=Fo.oneWayHashWithSalt({input:r,salt:n}),s=new Mt({configPath:e,config:{telemetry_enabled:!0,telemetry_id:i,telemetry_salt:n}});if(s.tryWrite())return s}tryWrite(){try{let e=JSON.stringify(this.config,null,2);return(0,Po.writeFileSync)(this.configPath,e),!0}catch{return!1}}static tryRemove({configPath:e}){try{return(0,Po.rmSync)(e,{force:!0}),!0}catch{return!1}}hasSeenAlert(){return this.config.telemetry_alerted!==void 0}isEnabled(){let e=process.env[lY]||"0",r=process.env[uY]||"0";return e==="1"||e.toLowerCase()==="true"||r==="1"||r.toLowerCase()==="true"?!1:this.config.telemetry_enabled}isTelemetryWarningEnabled(){let e=process.env[cY]||"0";return!(e==="1"||e.toLowerCase()==="true")}get id(){return this.config.telemetry_id}showAlert(){!this.hasSeenAlert()&&this.isEnabled()&&this.isTelemetryWarningEnabled()&&(De.log(),De.bold("Attention:"),De.grey("Turborepo now collects completely anonymous telemetry regarding usage."),De.grey("This information is used to shape the Turborepo roadmap and prioritize features."),De.grey("You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:"),De.underline(n5.default.grey("https://turbo.build/repo/docs/telemetry"))),this.alertShown()}enable(){this.config.telemetry_enabled=!0,this.tryWrite()}disable(){this.config.telemetry_enabled=!1,this.tryWrite()}alertShown(){return this.hasSeenAlert()||(this.config.telemetry_alerted=new Date().toISOString(),this.tryWrite()),!0}oneWayHash(e){return Fo.oneWayHashWithSalt({input:e,salt:this.config.telemetry_salt})}static isDebug(){let e=process.env[aY]||"0";return e==="1"||e.toLowerCase()==="true"}};c();c();var i5=me(aF());var hY=20,dY="/api/turborepo/v1/events",es=class{constructor({api:e,packageInfo:r,config:n,opts:i}){this.batchSize=hY;this.timeout=250;this.sessionId=wo();this.eventBatches=[];this.events=[];let s=new URL(dY,e);this.api=s.toString(),this.packageInfo=r,this.config=n,i!=null&&i.timeout&&(this.timeout=i.timeout),i!=null&&i.batchSize&&(this.batchSize=i.batchSize)}hasPendingEvents(){return this.events.length!==0}async waitForFlush(){await Promise.all(this.eventBatches)}flushEvents(){let e=this.events.splice(0,this.batchSize);this.config.isEnabled()&&this.eventBatches.push(i5.default.post(this.api,{timeout:this.timeout,json:e,headers:{"x-turbo-telemetry-id":this.config.id,"x-turbo-session-id":this.sessionId,"User-Agent":Fo.buildUserAgent(this.packageInfo)}}))}track({key:e,value:r,parentId:n,isSensitive:i}){let s={id:wo(),key:e,value:i?this.config.oneWayHash(r):r,package_name:this.packageInfo.name,package_version:this.packageInfo.version,parent_id:n};return Mt.isDebug()&&(De.log(),De.bold("[telemetry event]"),De.dimmed(JSON.stringify(s,null,2)),De.log()),this.config.isEnabled()&&(this.events.push({package:s}),this.events.length>=this.batchSize&&this.flushEvents()),s}async close(){for(;this.hasPendingEvents();)this.flushEvents();try{await this.waitForFlush()}catch{}}trackCliOption({option:e,value:r}){return this.track({key:`option:${e}`,value:r})}trackCliArgument({argument:e,value:r}){return this.track({key:`argument:${e}`,value:r})}trackCliCommand({command:e,value:r}){return this.track({key:`command:${e}`,value:r})}trackCommandStatus({command:e,status:r}){return this.trackCliCommand({command:e,value:r})}trackCommandWarning(e){return this.track({key:"warning",value:e})}trackCommandError(e){return this.track({key:"error",value:e})}};var ou=class extends es{trackOptionExample(e){if(e)return this.trackCliOption({option:"example",value:e})}trackOptionPackageManager(e){if(e)return this.trackCliOption({option:"package_manager",value:e})}trackOptionSkipInstall(e){if(e)return this.trackCliOption({option:"skip_install",value:e.toString()})}trackOptionSkipTransforms(e){if(e)return this.trackCliOption({option:"skip_transforms",value:e.toString()})}trackOptionTurboVersion(e){if(e)return this.trackCliOption({option:"turbo_version",value:e})}trackOptionExamplePath(e){if(e)return this.trackCliOption({option:"example_path",value:e})}trackArgumentDirectory(e){if(e)return this.trackCliArgument({argument:"project_directory",value:"provided"})}trackArgumentPackageManager(e){if(e)return this.trackCliArgument({argument:"package_manager",value:e})}};c();var c5=me(u5());var mY=["build","test","lint","typecheck","checktypes","check-types","type-check","check"],au=class extends es{trackCI(){var e;return this.track({key:"ci",value:(e=c5.name)!=null?e:"unknown"})}trackArgumentWorkspace(e){if(e)return this.trackCliArgument({argument:"workspace",value:"provided"})}trackOptionTask(e){if(e)return this.trackCliOption({option:"task",value:mY.includes(e)?e:"other"})}trackOptionFallback(e){if(e)return this.trackCliOption({option:"fallback",value:e})}trackOptionDirectory(e){if(e)return this.trackCliOption({option:"directory",value:"custom"})}trackOptionMaxBuffer(e){if(e!==void 0)return this.trackCliOption({option:"max_buffer",value:e.toString()})}};var gY={"create-turbo":ou,"turbo-ignore":au},yY="https://telemetry.vercel.com";async function c_({packageInfo:t,opts:e}){let r=gY[t.name],n=await Mt.fromDefaultConfig();return n?(n.showAlert(),{telemetry:new r({api:yY,packageInfo:t,config:n,opts:e})}):{telemetry:void 0}}c();var uu=me($c());var l5="status",_Y=["enable","disable",l5];function vY(t){var r;let e=(r=t.telemetry)==null?void 0:r.config.isEnabled();De.log(`Status: ${e?uu.default.bold(uu.default.green("Enabled")):uu.default.bold(uu.default.red("Disabled"))}`),De.log(),e?De.log("Turborepo telemetry is completely anonymous. Thank you for participating!"):De.log("You have opted-out of Turborepo anonymous telemetry. No data will be collected from your machine."),De.log("Learn more: https://turbo.build/repo/docs/telemetry")}function EY(t,e){if(!e.telemetry){De.error("Telemetry could not be initialized");return}t==="enable"?(e.telemetry.config.enable(),De.bold("Success!")):t==="disable"&&(e.telemetry.config.disable(),De.bold("Success!")),De.log(),vY(e)}function l_(t){t.command("telemetry").description("Manage telemetry settings").addArgument(new P_("[action]","Action to perform").choices(_Y).default(l5)).action(EY)}var Jf={name:"turbo-ignore",version:"2.0.1",description:"",homepage:"https://turbo.build/repo",keywords:[],author:"Jared Palmer",license:"MIT",repository:{type:"git",url:"https://github.com/vercel/turbo",directory:"packages/turbo-ignore"},bugs:{url:"https://github.com/vercel/turbo/issues"},files:["dist"],bin:"dist/cli.js",scripts:{build:"tsup",test:"jest",lint:"eslint src __tests__","check-types":"tsc --noEmit","lint:prettier":"prettier -c . --cache --ignore-path=../../.prettierignore"},devDependencies:{"@turbo/eslint-config":"workspace:*","@turbo/telemetry":"workspace:*","@turbo/test-utils":"workspace:*","@turbo/tsconfig":"workspace:*","@turbo/types":"workspace:*","@turbo/utils":"workspace:*","@types/jest":"^27.4.0","@types/node":"^18.17.2",commander:"^11.0.0",jest:"^27.4.3","ts-jest":"^27.1.1",tsup:"^5.12.1",typescript:"5.3.3"}};c();var b5=require("child_process"),w5=me(require("path")),x5=require("fs");c();var f5=require("child_process");c();var f_="\u226B ";function je(...t){console.log(f_,...t)}function Dn(...t){console.error(f_,...t)}function h_(...t){console.warn(f_,...t)}function d_(...t){console.log(...t)}function wY(t){try{return(0,f5.execSync)(`git cat-file -t ${t}`,{stdio:"ignore"}),!0}catch{return!1}}function p_(t){return t.fallback?(je(`Falling back to ref ${t.fallback}`),{ref:t.fallback,type:"customFallback"}):null}function h5(t){let{workspace:e}=t;return process.env.VERCEL==="1"?process.env.VERCEL_GIT_PREVIOUS_SHA?wY(process.env.VERCEL_GIT_PREVIOUS_SHA)?(je(`Found previous deployment ("${process.env.VERCEL_GIT_PREVIOUS_SHA}") for "${e}"${process.env.VERCEL_GIT_COMMIT_REF?` on branch "${process.env.VERCEL_GIT_COMMIT_REF}"`:""}`),{ref:process.env.VERCEL_GIT_PREVIOUS_SHA,type:"previousDeploy"}):(je(`Previous deployment ("${process.env.VERCEL_GIT_PREVIOUS_SHA}") for "${e}"${process.env.VERCEL_GIT_COMMIT_REF?` on branch "${process.env.VERCEL_GIT_COMMIT_REF}"`:""} is unreachable.`),p_(t)):(je(`No previous deployments found for "${e}"${process.env.VERCEL_GIT_COMMIT_REF?` on branch "${process.env.VERCEL_GIT_COMMIT_REF}"`:""}`),p_(t)):t.fallback?p_(t):{ref:"HEAD^",type:"headRelative"}}c();function d5(t){return t.task?(je(`Using "${t.task}" as the task from the arguments`),`"${t.task}"`):(je('Using "build" as the task as it was unspecified'),"build")}c();var p5=me(require("fs")),m5=me(require("path"));function g5(t){let{directory:e=process.cwd(),workspace:r}=t;if(r)return je(`Using "${r}" as workspace from arguments`),r;let n=m5.default.join(e,"package.json");try{let i=p5.default.readFileSync(n,"utf8"),s=JSON.parse(i);return s.name?(je(`Inferred "${s.name}" as workspace from "package.json"`),s.name):(Dn(`"${n}" is missing the "name" field (required).`),null)}catch{return Dn(`"${n}" could not be found. turbo-ignore inferencing failed`),null}}c();var m_={MISSING_LOCKFILE:{regex:[/reading (?:yarn.lock|package-lock.json|pnpm-lock.yaml):.*?no such file or directory/i],message:"turbo-ignore could not complete - no lockfile found, please commit one to your repository"},NO_PACKAGE_MANAGER:{regex:[/run failed: We did not detect an in-use package manager for your project/i],message:'turbo-ignore could not complete - no package manager detected, please commit a lockfile, or set "packageManager" in your root "package.json"'},UNREACHABLE_PARENT:{regex:[/failed to resolve packages to run: commit HEAD\^ does not exist/i],message:"turbo-ignore could not complete - parent commit does not exist or is unreachable"},INVALID_COMPARISON:{regex:[/commit \S+ does not exist/i,/unknown revision/i,/invalid symmetric difference expression/i],message:"turbo-ignore could not complete - a ref or SHA is invalid. It could have been removed from the branch history via a force push, or this could be a shallow clone with insufficient history"}};function y5({err:t}){let e=Object.keys(m_).find(r=>{let{regex:n}=m_[r];return n.some(i=>i.test(t))});return e?{level:"warn",message:m_[e].message,code:e}:{level:"error",message:t,code:"UNKNOWN_ERROR"}}c();var _5=require("child_process"),xY=["[skip ci]","[ci skip]","[no ci]","[skip vercel]","[vercel skip]"],SY=["[vercel deploy]","[vercel build]"];function AY({workspace:t}){return[`[vercel skip ${t}]`]}function CY({workspace:t}){return[`[vercel deploy ${t}]`,`[vercel build ${t}]`]}var DY=/\[vercel only .+\]/;function RY({workspace:t}){return[`[vercel only ${t}]`]}function OY(){return process.env.VERCEL==="1"&&process.env.VERCEL_GIT_COMMIT_MESSAGE?process.env.VERCEL_GIT_COMMIT_MESSAGE:(0,_5.execSync)("git show -s --format=%B").toString()}function v5({workspace:t}){var u;let e=OY(),r=l=>e.includes(l),n=(u=DY.exec(e))==null?void 0:u[0];if(n)return RY({workspace:t}).find(l=>l===n)?{result:"deploy",scope:"workspace",reason:`Found commit message: ${n}`}:{result:"skip",scope:"workspace",reason:`Found commit message: ${n}`};let i=CY({workspace:t}).find(r),s=AY({workspace:t}).find(r);if(i&&s)return{result:"conflict",scope:"workspace",reason:`Conflicting commit messages found: ${i} and ${s}`};if(i)return{result:"deploy",scope:"workspace",reason:`Found commit message: ${i}`};if(s)return{result:"skip",scope:"workspace",reason:`Found commit message: ${s}`};let o=SY.find(r),a=xY.find(r);return o&&a?{result:"conflict",scope:"global",reason:`Conflicting commit messages found: ${o} and ${a}`}:o?{result:"deploy",scope:"global",reason:`Found commit message: ${o}`}:a?{result:"skip",scope:"global",reason:`Found commit message: ${a}`}:{result:"continue",scope:"global",reason:"No deploy or skip string found in commit message."}}function TY(t){var e,r,n,i;(e=t.telemetry)==null||e.trackOptionTask(t.task),(r=t.telemetry)==null||r.trackOptionFallback(t.fallback),(n=t.telemetry)==null||n.trackOptionDirectory(t.directory),(i=t.telemetry)==null||i.trackOptionMaxBuffer(t.maxBuffer)}function E5(){return d_("\u23ED Ignoring the change"),process.exit(0)}function zr(){return d_("\u2713 Proceeding with deployment"),process.exit(1)}function S5(t,e){var f,h;(f=e.telemetry)==null||f.trackCommandStatus({command:"ignore",status:"start"}),(h=e.telemetry)==null||h.trackArgumentWorkspace(t!==void 0),TY(e);let r={workspace:t,...e};if(je(`Using Turborepo to determine if this project is affected by the commit...
|
|
101
101
|
`),e.directory){let d=w5.default.resolve(e.directory);(0,x5.existsSync)(d)?r.directory=d:(h_(`Directory "${e.directory}" does not exist, using current directory`),r.directory=process.cwd())}else r.directory=process.cwd();if(process.env.TURBO_FORCE==="true")return je("`TURBO_FORCE` detected"),zr();let n=Pu(r.directory);if(!n)return Dn("Monorepo root not found. turbo-ignore inferencing failed"),zr();let i=g5(r);if(!i)return zr();let s=d5(r),o=v5({workspace:i});if(o.result==="skip")return je(o.reason),E5();if(o.result==="deploy")return je(o.reason),zr();o.result==="conflict"&&je(o.reason);let a=h5({workspace:i,fallback:r.fallback});if(!a)return zr();let u=`npx turbo run ${s} --filter="${i}...[${a.ref}]" --dry=json`;je(`Analyzing results of \`${u}\``);let l={cwd:n};e.maxBuffer&&(l.maxBuffer=e.maxBuffer),(0,b5.exec)(u,l,(d,g)=>{var y,v;if(d){let{level:E,code:x,message:O}=y5({err:d.message});return E==="warn"?((y=e.telemetry)==null||y.trackCommandWarning(O),h_(O)):Dn(`${x}: ${d.message}`),zr()}try{let E=JSON.parse(g);if(E===null)return Dn(`Failed to parse JSON output from \`${u}\`.`),zr();let{packages:x}=E;return x?x.length>0?(x.length===1?je(`This commit affects "${i}"`):je(`This commit affects "${i}" and ${x.length-1} ${x.length-1===1?"dependency":"dependencies"} (${x.slice(1).join(", ")})`),zr()):(je("This project and its dependencies are not affected"),E5()):(je("Detected single package repo"),zr())}catch(E){return Dn(`Failed to parse JSON output from \`${u}\`.`),Dn(E),zr()}finally{(v=e.telemetry)==null||v.trackCommandStatus({command:"ignore",status:"end"})}})}var Xf,g_=new F_;g_.name(Jf.name).description("Only proceed with deployment if the workspace or any of its dependencies have changed").hook("preAction",async(t,e)=>{let{telemetry:r}=await c_({packageInfo:{name:"turbo-ignore",version:Jf.version}});e.addOption(new ts("--telemetry").default(r).hideHelp()),Xf=r}).hook("postAction",async()=>{await(Xf==null?void 0:Xf.close())}).argument("[workspace]",'The workspace being deployed. If [workspace] is not provided, it will be inferred from the "name" field of the "package.json" located at the current working directory.').addOption(new ts("-t, --task <name>","The task to execute").default("build")).addOption(new ts("-f, --fallback <ref>","On Vercel, if no previously deployed SHA is available to compare against, fallback to comparing against the provided ref")).addOption(new ts("-d, --directory <path>","The directory to run in (default: cwd)")).addOption(new ts("-b, --max-buffer <number>","maxBuffer for the child process in KB (default: 1024 KB)").argParser(t=>parseInt(t,10)*1024)).version(Jf.version,"-v, --version","Output the current version").helpOption("-h, --help","Display help for command").showHelpAfterError(!1).action(S5);l_(g_);g_.parse();
|
|
102
102
|
/*!
|
|
103
103
|
* fill-range <https://github.com/jonschlinkert/fill-range>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "turbo-ignore",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"homepage": "https://turbo.build/repo",
|
|
6
6
|
"keywords": [],
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"tsup": "^5.12.1",
|
|
28
28
|
"typescript": "5.3.3",
|
|
29
29
|
"@turbo/eslint-config": "0.0.0",
|
|
30
|
+
"@turbo/telemetry": "0.0.0",
|
|
30
31
|
"@turbo/test-utils": "0.0.0",
|
|
31
32
|
"@turbo/tsconfig": "0.0.0",
|
|
32
|
-
"@turbo/types": "2.0.
|
|
33
|
-
"@turbo/utils": "0.0.0"
|
|
34
|
-
"@turbo/telemetry": "0.0.0"
|
|
33
|
+
"@turbo/types": "2.0.1",
|
|
34
|
+
"@turbo/utils": "0.0.0"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "tsup",
|