gamestage 0.20.0 → 0.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/cli.mjs +411 -125
  2. package/package.json +1 -1
package/cli.mjs CHANGED
@@ -10,7 +10,7 @@
10
10
  * A single bundled file, minified. Nothing here phones home, and inspect,
11
11
  * create and manifest validate all run without an account.
12
12
  */
13
- var NS=Object.defineProperty;var y=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(o){throw r=[o],o}};var We=(e,t)=>{for(var r in t)NS(e,r,{get:t[r],enumerable:!0})};var vn,Ar,xe,Me,bn,ge,MS,US,FS,GS,Us,Zt=y(()=>{"use strict";vn=`/**
13
+ var l$=Object.defineProperty;var v=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(o){throw r=[o],o}};var nt=(e,t)=>{for(var r in t)l$(e,r,{get:t[r],enumerable:!0})};var $n,Nr,be,Ve,$t,ae,f$,g$,y$,v$,qs,Et=v(()=>{"use strict";$n=`/**
14
14
  * @monterosa/gamestage-player, bundled for a browser.
15
15
  *
16
16
  * Generated by the Gamestage CLI. Do not edit: it is replaced whenever the CLI
@@ -20,6 +20,29 @@ var NS=Object.defineProperty;var y=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(
20
20
  var ENDPOINTS = {
21
21
  runtime: "/play/v1/games/{game}/runtime",
22
22
  currentRound: "/play/v1/games/{game}/rounds/current",
23
+ /**
24
+ * Every round the game has, so a fan can be offered a second one. GS-273.
25
+ *
26
+ * Until this existed a game had one live round and it was the same round for
27
+ * every fan, so "Play Another" had nothing to ask for: a client could not
28
+ * discover that a second round was even there.
29
+ */
30
+ rounds: "/play/v1/games/{game}/rounds",
31
+ /**
32
+ * Which of those rounds this caller has played, and which they finished.
33
+ *
34
+ * Read from the per-player state the play path already writes, so it cannot
35
+ * disagree with what was actually played.
36
+ */
37
+ roundsMine: "/play/v1/games/{game}/rounds/mine",
38
+ /**
39
+ * The round behind "Play Another": the next one this caller has not finished.
40
+ *
41
+ * Answers 200 either way. A pool with nothing left says so in the body rather
42
+ * than 404ing, because "you have played them all" is a sentence a fan should
43
+ * read, not an error a client has to guess the meaning of.
44
+ */
45
+ nextRound: "/play/v1/games/{game}/rounds/next",
23
46
  round: "/play/v1/games/{game}/rounds/{round}",
24
47
  plays: "/play/v1/games/{game}/rounds/{round}/plays",
25
48
  /**
@@ -111,6 +134,18 @@ function createPlayerClient(options) {
111
134
  getRuntime: () => call(path(ENDPOINTS.runtime, options.game)),
112
135
  getCurrentRound: () => call(path(ENDPOINTS.currentRound, options.game)),
113
136
  getRound: (id) => call(path(ENDPOINTS.round, options.game, id)),
137
+ /**
138
+ * The next round this fan has not finished, or word that there is not one.
139
+ *
140
+ * The Engine answers 200 either way and says which in \`status\`, so a caller
141
+ * never has to read an absent \`round\` as either an empty pool or a failed
142
+ * request. Draw the empty state on \`exhausted\` and the board on \`ready\`.
143
+ *
144
+ * GS-273 built the route and nothing called it, which is the shape of
145
+ * defect this repo keeps meeting: a feature that shipped with no way for a
146
+ * fan to reach it.
147
+ */
148
+ getNextRound: () => call(path(ENDPOINTS.nextRound, options.game)),
114
149
  getRoundState: (roundId) => call(path(ENDPOINTS.roundState, options.game, roundId)),
115
150
  getProfile: () => call(path(ENDPOINTS.profile, options.game)),
116
151
  getLeaderboard: () => call(path(ENDPOINTS.leaderboard, options.game)),
@@ -127,7 +162,10 @@ function createPlayerClient(options) {
127
162
  idempotency_key: idempotencyKey,
128
163
  round_version: input.roundVersion,
129
164
  challenge_instance_id: input.challengeInstanceId ?? null,
130
- payload: { picks: input.picks }
165
+ payload: {
166
+ picks: input.picks,
167
+ ...input.answers ? { answers: input.answers } : {}
168
+ }
131
169
  })
132
170
  })
133
171
  };
@@ -137,7 +175,7 @@ export {
137
175
  createPlayerClient,
138
176
  newIdempotencyKey
139
177
  };
140
- `,Ar="d783262b079500e8",xe="gamestage-player.js",Me=`/**
178
+ `,Nr="bee538bc95c9c83e",be="gamestage-player.js",Ve=`/**
141
179
  * @monterosa/gamestage, bundled for a browser.
142
180
  *
143
181
  * Generated by the Gamestage CLI. Do not edit: it is replaced whenever the CLI
@@ -224,6 +262,162 @@ var init_app_settings = __esm({
224
262
  description: "What the share button says at the end of a round. Leave it empty to keep the game's own word.",
225
263
  readBy: "The game's own page, on its share button.",
226
264
  section: "Wording"
265
+ },
266
+ /**
267
+ * How far off the target a fan finished, said three ways in three places.
268
+ *
269
+ * Tom, 2026-08-20: copy being configurable is a functional change, so these
270
+ * come in under the freeze on design work. They were the last hard-coded
271
+ * words a fan reads in The Limit, and \`CLAUDE.md\` makes "no copy is ever hard
272
+ * coded, and that includes labels" a MUST that gates launch.
273
+ *
274
+ * **Nine fields rather than three, because the three surfaces are worded
275
+ * differently on purpose.** \`game.js\` records the decision: the result screen
276
+ * "has always said 'away from the target' where the splash and the card say
277
+ * 'short', and this keeps that rather than quietly unifying the wording".
278
+ * Collapsing them onto three shared fields would make a producer's first edit
279
+ * a design change, and design is exactly what is frozen this week. The shared
280
+ * sentence differs again because it is read by somebody who has not seen the
281
+ * game, so it names the target and the rank.
282
+ *
283
+ * **The placeholders are what stop us taking a decision that is not ours.**
284
+ * "Over by 41,267" puts the words before the number and "25,660 short" puts
285
+ * them after, and no single rule covers both. A field carrying \`{n}\` hands
286
+ * the placement to the producer, which is where it belongs, instead of us
287
+ * choosing a shape and calling it the wording.
288
+ *
289
+ * Offered only to a game whose page reads them, like the three above, so a
290
+ * scaffolded starter with no margin to report is never asked for the words.
291
+ */
292
+ {
293
+ key: "margin_over",
294
+ label: "Went over, in the summary",
295
+ type: "freetext",
296
+ description: \`What the splash and the share picture say when a fan went over, e.g. "over by {n}". {n} is how far out they were, and where you put it is up to you. Leave it empty to keep the game's own words.\`,
297
+ readBy: "The game's own page, on the returning splash and the share picture.",
298
+ section: "Wording"
299
+ },
300
+ {
301
+ key: "margin_exact",
302
+ label: "Landed exactly, in the summary",
303
+ type: "freetext",
304
+ description: \`What the splash and the share picture say when a fan hit the target exactly, e.g. "exactly on the number". There is no amount to show, so no {n}. Leave it empty to keep the game's own words.\`,
305
+ readBy: "The game's own page, on the returning splash and the share picture.",
306
+ section: "Wording"
307
+ },
308
+ {
309
+ key: "margin_under",
310
+ label: "Stayed under, in the summary",
311
+ type: "freetext",
312
+ description: \`What the splash and the share picture say when a fan finished under, e.g. "{n} short". {n} is how far under they were. Leave it empty to keep the game's own words.\`,
313
+ readBy: "The game's own page, on the returning splash and the share picture.",
314
+ section: "Wording"
315
+ },
316
+ {
317
+ key: "result_over",
318
+ label: "Went over, on the result",
319
+ type: "freetext",
320
+ description: \`What the result screen says when a fan went over, e.g. "Over the limit by {n}". **The game speaking to the fan, so write it in the second person.** Use {n} for the amount, {target} for the target, {rank} for the rank, {player} for the player who took them over, {value} for what that player was worth, and {fact} for that player's note. Leave it empty to keep the game's own words.\`,
321
+ readBy: "The game's own page, on the result screen.",
322
+ section: "Wording"
323
+ },
324
+ {
325
+ key: "result_exact",
326
+ label: "Landed exactly, on the result",
327
+ type: "freetext",
328
+ description: \`What the result screen says when a fan hit the target exactly, e.g. "Exactly on the number!". Leave it empty to keep the game's own words.\`,
329
+ readBy: "The game's own page, on the result screen.",
330
+ section: "Wording"
331
+ },
332
+ {
333
+ key: "result_under",
334
+ label: "Stayed under, on the result",
335
+ type: "freetext",
336
+ description: \`What the result screen says when a fan finished under, e.g. "{n} away from the target". Leave it empty to keep the game's own words.\`,
337
+ readBy: "The game's own page, on the result screen.",
338
+ section: "Wording"
339
+ },
340
+ {
341
+ key: "share_over",
342
+ label: "Went over, in the shared text",
343
+ type: "freetext",
344
+ description: \`The sentence a fan pastes when they went over, e.g. "over the limit by {n}." **The fan speaking to a friend, so write it in the first person: "my", never "your".** Use {n} for the amount, {target} for the target, {rank} for the rank, {player} for the player who took them over, {value} for what that player was worth, and {fact} for that player's note. Keep it to one line: the shared text is four lines and this is the first. Leave it empty to keep the game's own words.\`,
345
+ readBy: "The game's own page, in the text the share button copies.",
346
+ section: "Wording"
347
+ },
348
+ {
349
+ key: "share_exact",
350
+ label: "Landed exactly, in the shared text",
351
+ type: "freetext",
352
+ description: \`The sentence a fan pastes when they hit the target exactly, e.g. "Exactly on {target}. {rank}." Leave it empty to keep the game's own words.\`,
353
+ readBy: "The game's own page, in the text the share button copies.",
354
+ section: "Wording"
355
+ },
356
+ {
357
+ key: "share_under",
358
+ label: "Stayed under, in the shared text",
359
+ type: "freetext",
360
+ description: \`The sentence a fan pastes when they finished under, e.g. "{n} short of {target}. {rank}." Leave it empty to keep the game's own words.\`,
361
+ readBy: "The game's own page, in the text the share button copies.",
362
+ section: "Wording"
363
+ },
364
+ /**
365
+ * The bust, said properly. Tom, 2026-08-20, after playing v2: "For busted
366
+ * can you do better? And some factoid about the player that took me over
367
+ * the limit? Play with the limit words."
368
+ *
369
+ * **Four fields rather than two, because the voice is the whole point.** A
370
+ * result screen is the game talking to the fan, so it says "your"; a share
371
+ * is the fan talking to a friend, so it says "my". Collapsing them onto one
372
+ * field would make a producer's first edit pick a side and get the other one
373
+ * wrong, and the file already splits \`result_*\` from \`share_*\` for exactly
374
+ * this reason. The descriptions say which voice each is in, so nobody has to
375
+ * infer it from the key.
376
+ *
377
+ * \`{player}\` is whoever took them over, worked out by walking the picks in
378
+ * order to the one after which the total passed the target. \`{value}\` is
379
+ * what that pick was worth. \`{fact}\` is that choice's own note where a
380
+ * producer has written one, and the game's derived observation where they
381
+ * have not, so this is never blank and never needs anybody to type first.
382
+ */
383
+ {
384
+ key: "result_bust_note",
385
+ label: "Went over: the line about the player",
386
+ type: "freetext",
387
+ description: \`The line on the result screen naming the player who took a fan over, e.g. "{player} alone was worth {value} of your {target}." **The game speaking to the fan, so second person.** {fact} is that player's own note if the producer wrote one. Leave it empty to keep the game's own words.\`,
388
+ readBy: "The game's own page, under the result when a fan went over.",
389
+ section: "Wording"
390
+ },
391
+ {
392
+ key: "share_bust_note",
393
+ label: "Went over: the line about the player, shared",
394
+ type: "freetext",
395
+ description: \`The same line in the text a fan pastes, e.g. "{player} alone was {value} of my {target}." **The fan speaking to a friend, so first person: "my", never "your".** Surname alone reads better here; the full name is on the card. Leave it empty to keep the game's own words.\`,
396
+ readBy: "The game's own page, in the text the share button copies.",
397
+ section: "Wording"
398
+ },
399
+ /**
400
+ * The dare, which is what turns a share from a report into an invitation.
401
+ *
402
+ * Aimed at whoever reads it rather than at the fan who sent it, which is why
403
+ * it is the last line before the link. On the result screen it is the game
404
+ * daring the fan to go again.
405
+ */
406
+ {
407
+ key: "share_dare",
408
+ label: "The challenge in the shared text",
409
+ type: "freetext",
410
+ description: 'The last line of the text a fan pastes, aimed at whoever reads it, e.g. "Can you do better?" Leave it empty and the line is not sent.',
411
+ readBy: "The game's own page, in the text the share button copies.",
412
+ section: "Wording"
413
+ },
414
+ {
415
+ key: "result_dare",
416
+ label: "The challenge on the result",
417
+ type: "freetext",
418
+ description: 'A closing line on the result screen, e.g. "Can you do better?" Leave it empty and the line is not drawn.',
419
+ readBy: "The game's own page, under the result.",
420
+ section: "Wording"
227
421
  }
228
422
  ];
229
423
  OPTIONAL_WORDING_KEYS = OPTIONAL_WORDING_FIELDS.map((field) => field.key);
@@ -514,7 +708,20 @@ var init_app_settings = __esm({
514
708
  result_button_label: "resultButtonLabel",
515
709
  share_button_label: "shareButtonLabel",
516
710
  edition_name: "editionName",
517
- edition_strapline: "editionStrapline"
711
+ edition_strapline: "editionStrapline",
712
+ margin_over: "marginOver",
713
+ margin_exact: "marginExact",
714
+ margin_under: "marginUnder",
715
+ result_over: "resultOver",
716
+ result_exact: "resultExact",
717
+ result_under: "resultUnder",
718
+ share_over: "shareOver",
719
+ share_exact: "shareExact",
720
+ share_under: "shareUnder",
721
+ result_bust_note: "resultBustNote",
722
+ share_bust_note: "shareBustNote",
723
+ share_dare: "shareDare",
724
+ result_dare: "resultDare"
518
725
  };
519
726
  }
520
727
  });
@@ -5323,7 +5530,7 @@ async function createMonterosaPlatform(ids2) {
5323
5530
  * and nothing else, so anything nested is JSON-encoded rather than passed
5324
5531
  * through. Encoded rather than dropped, because a game that put its picks in
5325
5532
  * an array should see them arrive; and encoded here rather than at the call
5326
- * site, because the shape a kit accepts is exactly the sort of thing a facade
5533
+ * site, because the shape a kit accepts is exactly the sort of thing a library
5327
5534
  * exists to absorb.
5328
5535
  */
5329
5536
  emit(event) {
@@ -5365,6 +5572,29 @@ var init_monterosa = __esm({
5365
5572
  var ENDPOINTS = {
5366
5573
  runtime: "/play/v1/games/{game}/runtime",
5367
5574
  currentRound: "/play/v1/games/{game}/rounds/current",
5575
+ /**
5576
+ * Every round the game has, so a fan can be offered a second one. GS-273.
5577
+ *
5578
+ * Until this existed a game had one live round and it was the same round for
5579
+ * every fan, so "Play Another" had nothing to ask for: a client could not
5580
+ * discover that a second round was even there.
5581
+ */
5582
+ rounds: "/play/v1/games/{game}/rounds",
5583
+ /**
5584
+ * Which of those rounds this caller has played, and which they finished.
5585
+ *
5586
+ * Read from the per-player state the play path already writes, so it cannot
5587
+ * disagree with what was actually played.
5588
+ */
5589
+ roundsMine: "/play/v1/games/{game}/rounds/mine",
5590
+ /**
5591
+ * The round behind "Play Another": the next one this caller has not finished.
5592
+ *
5593
+ * Answers 200 either way. A pool with nothing left says so in the body rather
5594
+ * than 404ing, because "you have played them all" is a sentence a fan should
5595
+ * read, not an error a client has to guess the meaning of.
5596
+ */
5597
+ nextRound: "/play/v1/games/{game}/rounds/next",
5368
5598
  round: "/play/v1/games/{game}/rounds/{round}",
5369
5599
  plays: "/play/v1/games/{game}/rounds/{round}/plays",
5370
5600
  /**
@@ -5454,6 +5684,18 @@ function createPlayerClient(options) {
5454
5684
  getRuntime: () => call(path(ENDPOINTS.runtime, options.game)),
5455
5685
  getCurrentRound: () => call(path(ENDPOINTS.currentRound, options.game)),
5456
5686
  getRound: (id) => call(path(ENDPOINTS.round, options.game, id)),
5687
+ /**
5688
+ * The next round this fan has not finished, or word that there is not one.
5689
+ *
5690
+ * The Engine answers 200 either way and says which in \`status\`, so a caller
5691
+ * never has to read an absent \`round\` as either an empty pool or a failed
5692
+ * request. Draw the empty state on \`exhausted\` and the board on \`ready\`.
5693
+ *
5694
+ * GS-273 built the route and nothing called it, which is the shape of
5695
+ * defect this repo keeps meeting: a feature that shipped with no way for a
5696
+ * fan to reach it.
5697
+ */
5698
+ getNextRound: () => call(path(ENDPOINTS.nextRound, options.game)),
5457
5699
  getRoundState: (roundId) => call(path(ENDPOINTS.roundState, options.game, roundId)),
5458
5700
  getProfile: () => call(path(ENDPOINTS.profile, options.game)),
5459
5701
  getLeaderboard: () => call(path(ENDPOINTS.leaderboard, options.game)),
@@ -5470,7 +5712,10 @@ function createPlayerClient(options) {
5470
5712
  idempotency_key: idempotencyKey,
5471
5713
  round_version: input.roundVersion,
5472
5714
  challenge_instance_id: input.challengeInstanceId ?? null,
5473
- payload: { picks: input.picks }
5715
+ payload: {
5716
+ picks: input.picks,
5717
+ ...input.answers ? { answers: input.answers } : {}
5718
+ }
5474
5719
  })
5475
5720
  })
5476
5721
  };
@@ -5533,23 +5778,42 @@ function showBusyModal(kind, options = {}) {
5533
5778
  "inset:0",
5534
5779
  "z-index:2147483000",
5535
5780
  "display:flex",
5536
- "align-items:center",
5781
+ // The two lines that make it a tray: down at the bottom, and no padding
5782
+ // under it, so the card meets the edge of the screen rather than floating
5783
+ // above it.
5784
+ "align-items:flex-end",
5537
5785
  "justify-content:center",
5538
- "padding:24px",
5786
+ "padding:0",
5539
5787
  "background:rgba(0,0,0,0.6)",
5540
5788
  "font-family:inherit"
5541
5789
  ].join(";");
5542
5790
  const card = doc.createElement("div");
5543
5791
  card.style.cssText = [
5544
- "max-width:22rem",
5792
+ // Wider than the old 22rem card, because a tray spans the foot of the
5793
+ // screen. Capped at the same phone column our own games use, so it does
5794
+ // not become a 1280px band on a desktop.
5795
+ "max-width:480px",
5545
5796
  "width:100%",
5546
5797
  "box-sizing:border-box",
5547
- "padding:24px",
5548
- "border-radius:16px",
5798
+ // The safe-area inset is not optional on a bottom-anchored element. A
5799
+ // creator's page may or may not serve \`viewport-fit=cover\`; where it does
5800
+ // not, \`env()\` resolves to the fallback and this is the padding it always
5801
+ // had.
5802
+ "padding:20px 24px calc(24px + env(safe-area-inset-bottom, 0px))",
5803
+ "border-radius:16px 16px 0 0",
5549
5804
  "background:#fff",
5550
5805
  "color:#111",
5551
5806
  "text-align:center",
5552
- "box-shadow:0 20px 50px rgba(0,0,0,0.35)"
5807
+ "box-shadow:0 -18px 40px -20px rgba(0,0,0,0.45)"
5808
+ ].join(";");
5809
+ const grip = doc.createElement("div");
5810
+ grip.setAttribute("aria-hidden", "true");
5811
+ grip.style.cssText = [
5812
+ "width:36px",
5813
+ "height:4px",
5814
+ "margin:0 auto 16px",
5815
+ "border-radius:999px",
5816
+ "background:rgba(17,17,17,0.18)"
5553
5817
  ].join(";");
5554
5818
  const title = doc.createElement("h2");
5555
5819
  title.id = \`\${BUSY_MODAL_ID}-title\`;
@@ -5584,7 +5848,7 @@ function showBusyModal(kind, options = {}) {
5584
5848
  if (event.target === overlay) dismiss();
5585
5849
  });
5586
5850
  doc.addEventListener("keydown", onKey);
5587
- card.append(title, body, close);
5851
+ card.append(grip, title, body, close);
5588
5852
  overlay.append(card);
5589
5853
  parent.append(overlay);
5590
5854
  close.focus?.();
@@ -5904,6 +6168,7 @@ async function platformFor(globals4, search, options) {
5904
6168
  const eventId = fromPage.eventId;
5905
6169
  let because;
5906
6170
  if ((!host || !projectId) && globals4.GAMESTAGE_IC_LOOKUP && options?.api && options?.game) {
6171
+ options?.step?.("looking-up");
5907
6172
  const asked = await askForPlatformIds(
5908
6173
  options.api,
5909
6174
  options.game,
@@ -5932,17 +6197,28 @@ async function platformFor(globals4, search, options) {
5932
6197
  )
5933
6198
  });
5934
6199
  }
5935
- return createMonterosaPlatform2({ host, projectId, eventId, locale: localeFor(fromPage) });
6200
+ return createMonterosaPlatform2(
6201
+ { host, projectId, eventId, locale: localeFor(fromPage) },
6202
+ options?.step
6203
+ );
5936
6204
  }
5937
- async function createMonterosaPlatform2(ids2) {
6205
+ async function createMonterosaPlatform2(ids2, step) {
6206
+ step?.("loading-kits");
5938
6207
  const module = await Promise.resolve().then(() => (init_monterosa(), monterosa_exports));
6208
+ step?.("opening");
5939
6209
  return module.createMonterosaPlatform(ids2);
5940
6210
  }
5941
6211
  async function start(options = {}) {
5942
6212
  const globals4 = options.globals ?? globalThis.window ?? globalThis;
5943
6213
  const { api, game } = ids(globals4);
5944
6214
  const search = options.search ?? globalThis.location?.search;
5945
- const platform = options.platform ?? await platformFor(globals4, search, { api, game, fetch: options.fetch });
6215
+ const step = (at) => {
6216
+ try {
6217
+ options.onStep?.(at);
6218
+ } catch {
6219
+ }
6220
+ };
6221
+ const platformSoon = options.platform !== void 0 ? Promise.resolve(options.platform) : platformFor(globals4, search, { api, game, fetch: options.fetch, step });
5946
6222
  let identity = await resolveIdentity(options.identity);
5947
6223
  const policy = {
5948
6224
  analyticsRequiresConsent: options.consent?.analyticsRequiresConsent ?? true
@@ -5961,20 +6237,29 @@ async function start(options = {}) {
5961
6237
  // hour later.
5962
6238
  identity: () => tokenOf(identity)
5963
6239
  });
6240
+ step("fetching-round");
6241
+ const roundSoon = client.getCurrentRound().then(
6242
+ (value) => ({ ok: true, value }),
6243
+ (cause) => ({ ok: false, cause })
6244
+ );
6245
+ const platform = await platformSoon;
5964
6246
  let round;
5965
6247
  const listeners = /* @__PURE__ */ new Set();
5966
- const reread = async (first = false) => {
6248
+ const reread = async (first2 = false) => {
5967
6249
  try {
5968
6250
  const next = await client.getCurrentRound();
5969
6251
  sampleIso(platform.clock, next.server_time);
5970
6252
  round = next;
5971
6253
  return next;
5972
6254
  } catch (cause) {
5973
- if (first) throw cause;
6255
+ if (first2) throw cause;
5974
6256
  return void 0;
5975
6257
  }
5976
6258
  };
5977
- await reread(true);
6259
+ const first = await roundSoon;
6260
+ if (!first.ok) throw first.cause;
6261
+ sampleIso(platform.clock, first.value.server_time);
6262
+ round = first.value;
5978
6263
  const undoAnnounce = platform.onRoundAnnounced(() => {
5979
6264
  void (async () => {
5980
6265
  const next = await reread();
@@ -6046,7 +6331,7 @@ async function start(options = {}) {
6046
6331
  * Re-reads the token from the source the game declared.
6047
6332
  *
6048
6333
  * Called by a game after its own sign-in completes, or after a refresh, which
6049
- * is the only moment the facade could know about. It is the game's login
6334
+ * is the only moment the library could know about. It is the game's login
6050
6335
  * system, so the game is what knows when it changed.
6051
6336
  */
6052
6337
  async refreshIdentity() {
@@ -6147,7 +6432,7 @@ export {
6147
6432
  storageAllowed,
6148
6433
  tokenOf
6149
6434
  };
6150
- `,bn="fb80091f1f47b01c",ge="gamestage.js",MS=`<!doctype html>
6435
+ `,$t="c1e93b811187103c",ae="gamestage.js",f$=`<!doctype html>
6151
6436
  <html lang="en">
6152
6437
  <head>
6153
6438
  <meta charset="utf-8" />
@@ -6397,7 +6682,7 @@ async function main() {
6397
6682
  );
6398
6683
  }
6399
6684
 
6400
- // The round moved, so the board is redrawn from the round the facade re-read
6685
+ // The round moved, so the board is redrawn from the round the library re-read
6401
6686
  // from the Engine. Never from the announcement: an element update says that
6402
6687
  // something changed and never what it changed to, because the Engine owns the
6403
6688
  // round's truth and Interaction Cloud only carries the news.
@@ -6421,7 +6706,7 @@ el("submit").onclick = async () => {
6421
6706
  const picks = [...selected];
6422
6707
 
6423
6708
  try {
6424
- // The facade mints one key per call and hands it back, so a caller retrying
6709
+ // The library mints one key per call and hands it back, so a caller retrying
6425
6710
  // a lost response reuses it rather than spending a second attempt.
6426
6711
  const result = await game.play({ picks });
6427
6712
 
@@ -6501,7 +6786,7 @@ main().catch((error) => {
6501
6786
  </script>
6502
6787
  </body>
6503
6788
  </html>
6504
- `,US=`<!doctype html>
6789
+ `,g$=`<!doctype html>
6505
6790
  <html lang="en">
6506
6791
  <head>
6507
6792
  <meta charset="utf-8" />
@@ -6771,7 +7056,7 @@ function renderState(state) {
6771
7056
  }
6772
7057
  }
6773
7058
 
6774
- /** Draws everything the round decides, from the round the facade last read. */
7059
+ /** Draws everything the round decides, from the round the library last read. */
6775
7060
  function renderRound() {
6776
7061
  round = game.round;
6777
7062
  el("prompt").textContent = round.challenge.prompt || "Get as close as you can without going over.";
@@ -6814,7 +7099,7 @@ async function main() {
6814
7099
  }
6815
7100
 
6816
7101
  // The round moved, so everything it decides is redrawn from the round the
6817
- // facade re-read from the Engine. Never from the announcement: an element
7102
+ // library re-read from the Engine. Never from the announcement: an element
6818
7103
  // update says that something changed and never what it changed to, because the
6819
7104
  // Engine owns the round's truth and Interaction Cloud only carries the news.
6820
7105
  game.onRoundChanged(async () => {
@@ -6837,7 +7122,7 @@ el("submit").onclick = async () => {
6837
7122
  el("submit").disabled = true;
6838
7123
 
6839
7124
  try {
6840
- // The facade mints one key per call and hands it back, so a caller retrying a
7125
+ // The library mints one key per call and hands it back, so a caller retrying a
6841
7126
  // lost response reuses it rather than spending a pick.
6842
7127
  const result = await game.play({ picks: [chosen] });
6843
7128
 
@@ -6904,7 +7189,7 @@ main().catch((error) => {
6904
7189
  </script>
6905
7190
  </body>
6906
7191
  </html>
6907
- `,FS=`<!doctype html>
7192
+ `,y$=`<!doctype html>
6908
7193
  <html lang="en">
6909
7194
  <head>
6910
7195
  <meta charset="utf-8" />
@@ -7250,7 +7535,7 @@ async function main() {
7250
7535
  );
7251
7536
  }
7252
7537
 
7253
- // The round moved, so the board is redrawn from the round the facade re-read
7538
+ // The round moved, so the board is redrawn from the round the library re-read
7254
7539
  // from the Engine. Never from the announcement: an element update says that
7255
7540
  // something changed and never what it changed to.
7256
7541
  game.onRoundChanged(() => {
@@ -7273,7 +7558,7 @@ el("submit").onclick = async () => {
7273
7558
  const picks = [...selected];
7274
7559
 
7275
7560
  try {
7276
- // The facade mints one key per call and hands it back, so a caller retrying
7561
+ // The library mints one key per call and hands it back, so a caller retrying
7277
7562
  // a lost response reuses it rather than spending an attempt.
7278
7563
  const result = await game.play({ picks });
7279
7564
 
@@ -7361,7 +7646,7 @@ main().catch((error) => {
7361
7646
  </script>
7362
7647
  </body>
7363
7648
  </html>
7364
- `,GS=`<!doctype html>
7649
+ `,v$=`<!doctype html>
7365
7650
  <html lang="en">
7366
7651
  <head>
7367
7652
  <meta charset="utf-8" />
@@ -7617,7 +7902,7 @@ async function main() {
7617
7902
  }
7618
7903
 
7619
7904
  // The round moved, which for this format usually means the result arrived.
7620
- // Redrawn from the round the facade re-read from the Engine, never from the
7905
+ // Redrawn from the round the library re-read from the Engine, never from the
7621
7906
  // announcement: an element update says something changed and never what to.
7622
7907
  game.onRoundChanged(async () => {
7623
7908
  chosen = null;
@@ -7637,13 +7922,13 @@ el("submit").onclick = async () => {
7637
7922
  el("submit").disabled = true;
7638
7923
 
7639
7924
  try {
7640
- // \`picks\`, plural, holding one key. The facade's play takes \`picks\` and
7925
+ // \`picks\`, plural, holding one key. The library's play takes \`picks\` and
7641
7926
  // forwards nothing else, so a \`{ pick }\` is silently dropped and the Engine
7642
7927
  // marks an empty key: the round refuses it as \`unknown_option\`, which reads
7643
7928
  // like a broken board rather than a dropped field. The rules for this
7644
7929
  // archetype read \`picks[0]\`.
7645
7930
  //
7646
- // The facade mints one idempotency key per call and hands it back, so a
7931
+ // The library mints one idempotency key per call and hands it back, so a
7647
7932
  // caller retrying a lost response reuses it rather than spending the
7648
7933
  // player's single call.
7649
7934
  const result = await game.play({ picks: [chosen] });
@@ -7716,107 +8001,109 @@ main().catch((error) => {
7716
8001
  </script>
7717
8002
  </body>
7718
8003
  </html>
7719
- `,Us={hunt:MS,push:US,group:FS,predict:GS}});function If(e){wn=e}function j(){return wn}function Fs(e=process.argv,t=process.env){if(t.GAMESTAGE_INVOCATION)return t.GAMESTAGE_INVOCATION;let r=(e[1]??"").split(/[\\/]/).pop()??"";return r==="gamestage.mjs"||r==="cli.mjs"?`node ${r}`:"gamestage"}function je(e){return`${Fs()} ${e}`}function v(e=""){wn||process.stdout.write(e+`
7720
- `)}function O(e){v(),v(S.bold(e))}function E(e,t="-"){v(` ${S.dim(t)} ${e}`)}function I(e,t){v(` ${S.dim(e.padEnd(18))} ${t}`)}function L(e){wn&&process.stdout.write(JSON.stringify(e,null,2)+`
7721
- `)}function C(e,t){if(wn)process.stderr.write(JSON.stringify({ok:!1,error:e,detail:t??[]},null,2)+`
7722
- `);else{process.stderr.write(`${S.red("Error")} ${e}
8004
+ `,qs={hunt:f$,push:g$,group:y$,predict:v$}});function Kf(e){Tn=e}function M(){return Tn}function Xs(e=process.argv,t=process.env){if(t.GAMESTAGE_INVOCATION)return t.GAMESTAGE_INVOCATION;let r=(e[1]??"").split(/[\\/]/).pop()??"";return r==="gamestage.mjs"||r==="cli.mjs"?`node ${r}`:"gamestage"}function Fe(e){return`${Xs()} ${e}`}function y(e=""){Tn||process.stdout.write(e+`
8005
+ `)}function R(e){y(),y($.bold(e))}function k(e,t="-"){y(` ${$.dim(t)} ${e}`)}function O(e,t){y(` ${$.dim(e.padEnd(18))} ${t}`)}function U(e){Tn&&process.stdout.write(JSON.stringify(e,null,2)+`
8006
+ `)}function P(e,t){if(Tn)process.stderr.write(JSON.stringify({ok:!1,error:e,detail:t??[]},null,2)+`
8007
+ `);else{process.stderr.write(`${$.red("Error")} ${e}
7723
8008
  `);for(let r of t??[])process.stderr.write(` ${r}
7724
- `)}process.exit(1)}var wn,BS,_n,S,ne=y(()=>{"use strict";wn=!1;BS=()=>!wn&&process.stdout.isTTY===!0&&!process.env.NO_COLOR,_n=(e,t)=>BS()?`\x1B[${e}m${t}\x1B[0m`:t,S={bold:e=>_n("1",e),dim:e=>_n("2",e),red:e=>_n("31",e),green:e=>_n("32",e),yellow:e=>_n("33",e),cyan:e=>_n("36",e)}});function Kt(e,t={}){let r=e?.trim()||kn;return t.lower&&!/[A-Z]/.test(r.slice(1))&&(r=r.toLowerCase()),t.plural?`${r}s`:r}var kn,Ir=y(()=>{"use strict";kn="Round"});function Ve(e){return XS[e]??e}function Of(e){if(!e||typeof e!="object"||Array.isArray(e))return e;let t=e;if(typeof t.archetype!="string")return e;let r=Ve(t.archetype);return r===t.archetype?e:{...t,archetype:r}}var XS,Gs,Nf,Wt=y(()=>{"use strict";XS={target_selection:"hunt",target_total:"push",puzzle:"group",prediction:"predict",forecast:"predict"};Gs={hunt:"gamestage-target-selection-element",push:"gamestage-target-total-element",group:"gamestage-puzzle-element",predict:"gamestage-prediction-element"},Nf={hunt:"Find the answer",push:"Under the limit",group:"Puzzle",predict:"Prediction"}});function g(e,t,r){function o(s,c){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,c);let l=a.prototype,p=Object.keys(l);for(let d=0;d<p.length;d++){let m=p[d];m in s||(s[m]=l[m].bind(s))}}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function a(s){var c;let l=r?.Parent?new i:this;o(l,s),(c=l._zod).deferred??(c.deferred=[]);for(let p of l._zod.deferred)p();return l}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}function Q(e){return e&&Object.assign(Vt,e),Vt}var Rf,Bs,Zs,Ue,bt,Vt,Ht=y(()=>{Bs=Object.freeze({status:"aborted"});Zs=Symbol("zod_brand"),Ue=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},bt=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(Rf=globalThis).__zod_globalConfig??(Rf.__zod_globalConfig={});Vt=globalThis.__zod_globalConfig});var $={};We($,{BIGINT_FORMAT_RANGES:()=>ec,Class:()=>Ws,NUMBER_FORMAT_RANGES:()=>Qs,aborted:()=>xt,allowsEval:()=>Js,assert:()=>r$,assertEqual:()=>QS,assertIs:()=>t$,assertNever:()=>n$,assertNotEqual:()=>e$,assignProp:()=>wt,base64ToUint8Array:()=>jf,base64urlToUint8Array:()=>_$,cached:()=>Sn,captureStackTrace:()=>Bo,cleanEnum:()=>b$,cleanRegex:()=>Or,clone:()=>ye,cloneDef:()=>i$,createTransparentProxy:()=>d$,defineLazy:()=>G,esc:()=>Go,escapeRegex:()=>Le,explicitlyAborted:()=>tc,extend:()=>h$,finalizeIssue:()=>ve,floatSafeRemainder:()=>Vs,getElementAtPath:()=>a$,getEnumValues:()=>Pr,getLengthableOrigin:()=>Dr,getParsedType:()=>u$,getSizableOrigin:()=>Rr,hexToUint8Array:()=>k$,isObject:()=>Jt,isPlainObject:()=>kt,issue:()=>$n,joinValues:()=>b,jsonStringifyReplacer:()=>xn,merge:()=>g$,mergeDefs:()=>st,normalizeParams:()=>T,nullish:()=>_t,numKeys:()=>l$,objectClone:()=>o$,omit:()=>m$,optionalKeys:()=>Xs,parsedType:()=>x,partial:()=>y$,pick:()=>p$,prefixIssues:()=>Se,primitiveTypes:()=>qs,promiseAllObject:()=>s$,propertyKeyTypes:()=>Nr,randomString:()=>c$,required:()=>v$,safeExtend:()=>f$,shallowClone:()=>Ys,slugify:()=>Hs,stringifyPrimitive:()=>k,uint8ArrayToBase64:()=>Lf,uint8ArrayToBase64url:()=>w$,uint8ArrayToHex:()=>x$,unwrapMessage:()=>Cr});function QS(e){return e}function e$(e){return e}function t$(e){}function n$(e){throw new Error("Unexpected value in exhaustive check")}function r$(e){}function Pr(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function b(e,t="|"){return e.map(r=>k(r)).join(t)}function xn(e,t){return typeof t=="bigint"?t.toString():t}function Sn(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function _t(e){return e==null}function Or(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Vs(e,t){let r=e/t,o=Math.round(r),n=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-o)<n?0:r-o}function G(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==Df)return o===void 0&&(o=Df,o=r()),o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function o$(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function wt(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function st(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function i$(e){return st(e._zod.def)}function a$(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function s$(e){let t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{let n={};for(let i=0;i<t.length;i++)n[t[i]]=o[i];return n})}function c$(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function Go(e){return JSON.stringify(e)}function Hs(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function Jt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function kt(e){if(Jt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Jt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Ys(e){return kt(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function l$(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}function Le(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ye(e,t,r){let o=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(o._zod.parent=e),o}function T(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function d$(e){let t;return new Proxy({},{get(r,o,n){return t??(t=e()),Reflect.get(t,o,n)},set(r,o,n,i){return t??(t=e()),Reflect.set(t,o,n,i)},has(r,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t??(t=e()),Reflect.defineProperty(t,o,n)}})}function k(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Xs(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function p$(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=st(e._zod.def,{get shape(){let a={};for(let s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(a[s]=r.shape[s])}return wt(this,"shape",a),a},checks:[]});return ye(e,i)}function m$(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=st(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete a[s]}return wt(this,"shape",a),a},checks:[]});return ye(e,i)}function h$(e,t){if(!kt(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let i=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(i,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=st(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return wt(this,"shape",i),i}});return ye(e,n)}function f$(e,t){if(!kt(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=st(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return wt(this,"shape",o),o}});return ye(e,r)}function g$(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=st(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return wt(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return ye(e,r)}function y$(e,t,r){let n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=st(t._zod.def,{get shape(){let s=t._zod.def.shape,c={...s};if(r)for(let l in r){if(!(l in s))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(c[l]=e?new e({type:"optional",innerType:s[l]}):s[l])}else for(let l in s)c[l]=e?new e({type:"optional",innerType:s[l]}):s[l];return wt(this,"shape",c),c},checks:[]});return ye(t,a)}function v$(e,t,r){let o=st(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let a in r){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(i[a]=new e({type:"nonoptional",innerType:n[a]}))}else for(let a in n)i[a]=new e({type:"nonoptional",innerType:n[a]});return wt(this,"shape",i),i}});return ye(t,o)}function xt(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function tc(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function Se(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function Cr(e){return typeof e=="string"?e:e?.message}function ve(e,t,r){let o=e.message?e.message:Cr(e.inst?._zod.def?.error?.(e))??Cr(t?.error?.(e))??Cr(r.customError?.(e))??Cr(r.localeError?.(e))??"Invalid input",{inst:n,continue:i,input:a,...s}=e;return s.path??(s.path=[]),s.message=o,t?.reportInput&&(s.input=a),s}function Rr(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Dr(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function x(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function $n(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function b$(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function jf(e){let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r}function Lf(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function _$(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return jf(t+r)}function w$(e){return Lf(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function k$(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)r[o/2]=Number.parseInt(t.slice(o,o+2),16);return r}function x$(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Df,Bo,Js,u$,Nr,qs,Qs,ec,Ws,N=y(()=>{Ht();Df=Symbol("evaluating");Bo="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};Js=Sn(()=>{if(Vt.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});u$=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Nr=new Set(["string","number","symbol"]),qs=new Set(["string","number","bigint","boolean","symbol","undefined"]);Qs={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},ec={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};Ws=class{constructor(...t){}}});function Lr(e,t=r=>r.message){let r={},o=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):o.push(t(n));return{formErrors:o,fieldErrors:r}}function zr(e,t=r=>r.message){let r={_errors:[]},o=(n,i=[])=>{for(let a of n.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>o({issues:s},[...i,...a.path]));else if(a.code==="invalid_key")o({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")o({issues:a.issues},[...i,...a.path]);else{let s=[...i,...a.path];if(s.length===0)r._errors.push(t(a));else{let c=r,l=0;for(;l<s.length;){let p=s[l];l===s.length-1?(c[p]=c[p]||{_errors:[]},c[p]._errors.push(t(a))):c[p]=c[p]||{_errors:[]},c=c[p],l++}}}};return o(e),r}function nc(e,t=r=>r.message){let r={errors:[]},o=(n,i=[])=>{var a,s;for(let c of n.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>o({issues:l},[...i,...c.path]));else if(c.code==="invalid_key")o({issues:c.issues},[...i,...c.path]);else if(c.code==="invalid_element")o({issues:c.issues},[...i,...c.path]);else{let l=[...i,...c.path];if(l.length===0){r.errors.push(t(c));continue}let p=r,d=0;for(;d<l.length;){let m=l[d],h=d===l.length-1;typeof m=="string"?(p.properties??(p.properties={}),(a=p.properties)[m]??(a[m]={errors:[]}),p=p.properties[m]):(p.items??(p.items=[]),(s=p.items)[m]??(s[m]={errors:[]}),p=p.items[m]),h&&p.errors.push(t(c)),d++}}};return o(e),r}function Mf(e){let t=[],r=e.map(o=>typeof o=="object"?o.key:o);for(let o of r)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function rc(e){let t=[],r=[...e.issues].sort((o,n)=>(o.path??[]).length-(n.path??[]).length);for(let o of r)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${Mf(o.path)}`);return t.join(`
7725
- `)}var zf,jr,$e,oc=y(()=>{Ht();N();zf=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,xn,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},jr=g("$ZodError",zf),$e=g("$ZodError",zf,{Parent:Error})});var En,Zo,Tn,Ko,An,ic,In,ac,Wo,$$,Vo,E$,Ho,T$,Jo,A$,Yo,I$,qo,C$,Xo,P$,Qo,O$,sc=y(()=>{Ht();oc();N();En=e=>(t,r,o,n)=>{let i=o?{...o,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new Ue;if(a.issues.length){let s=new(n?.Err??e)(a.issues.map(c=>ve(c,i,Q())));throw Bo(s,n?.callee),s}return a.value},Zo=En($e),Tn=e=>async(t,r,o,n)=>{let i=o?{...o,async:!0}:{async:!0},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(n?.Err??e)(a.issues.map(c=>ve(c,i,Q())));throw Bo(s,n?.callee),s}return a.value},Ko=Tn($e),An=e=>(t,r,o)=>{let n=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new Ue;return i.issues.length?{success:!1,error:new(e??jr)(i.issues.map(a=>ve(a,n,Q())))}:{success:!0,data:i.value}},ic=An($e),In=e=>async(t,r,o)=>{let n=o?{...o,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>ve(a,n,Q())))}:{success:!0,data:i.value}},ac=In($e),Wo=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return En(e)(t,r,n)},$$=Wo($e),Vo=e=>(t,r,o)=>En(e)(t,r,o),E$=Vo($e),Ho=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return Tn(e)(t,r,n)},T$=Ho($e),Jo=e=>async(t,r,o)=>Tn(e)(t,r,o),A$=Jo($e),Yo=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return An(e)(t,r,n)},I$=Yo($e),qo=e=>(t,r,o)=>An(e)(t,r,o),C$=qo($e),Xo=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return In(e)(t,r,n)},P$=Xo($e),Qo=e=>async(t,r,o)=>In(e)(t,r,o),O$=Qo($e)});var Ce={};We(Ce,{base64:()=>xc,base64url:()=>ei,bigint:()=>Cc,boolean:()=>Oc,browserEmail:()=>U$,cidrv4:()=>wc,cidrv6:()=>kc,cuid:()=>cc,cuid2:()=>lc,date:()=>Ec,datetime:()=>Ac,domain:()=>B$,duration:()=>hc,e164:()=>$c,email:()=>gc,emoji:()=>yc,extendedDuration:()=>N$,guid:()=>fc,hex:()=>Z$,hostname:()=>G$,html5Email:()=>L$,httpProtocol:()=>Sc,idnEmail:()=>M$,integer:()=>Pc,ipv4:()=>vc,ipv6:()=>bc,ksuid:()=>pc,lowercase:()=>Dc,mac:()=>_c,md5_base64:()=>W$,md5_base64url:()=>V$,md5_hex:()=>K$,nanoid:()=>mc,null:()=>Nc,number:()=>ti,rfc5322Email:()=>z$,sha1_base64:()=>J$,sha1_base64url:()=>Y$,sha1_hex:()=>H$,sha256_base64:()=>X$,sha256_base64url:()=>Q$,sha256_hex:()=>q$,sha384_base64:()=>tE,sha384_base64url:()=>nE,sha384_hex:()=>eE,sha512_base64:()=>oE,sha512_base64url:()=>iE,sha512_hex:()=>rE,string:()=>Ic,time:()=>Tc,ulid:()=>uc,undefined:()=>Rc,unicodeEmail:()=>Uf,uppercase:()=>jc,uuid:()=>Yt,uuid4:()=>R$,uuid6:()=>D$,uuid7:()=>j$,xid:()=>dc});function yc(){return new RegExp(F$,"u")}function Gf(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Tc(e){return new RegExp(`^${Gf(e)}$`)}function Ac(e){let t=Gf({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${r.join("|")})`;return new RegExp(`^${Ff}T(?:${o})$`)}function Mr(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Ur(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var cc,lc,uc,dc,pc,mc,hc,N$,fc,Yt,R$,D$,j$,gc,L$,z$,Uf,M$,U$,F$,vc,bc,_c,wc,kc,xc,ei,G$,B$,Sc,$c,Ff,Ec,Ic,Cc,Pc,ti,Oc,Nc,Rc,Dc,jc,Z$,K$,W$,V$,H$,J$,Y$,q$,X$,Q$,eE,tE,nE,rE,oE,iE,ni=y(()=>{N();cc=/^[cC][0-9a-z]{6,}$/,lc=/^[0-9a-z]+$/,uc=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,dc=/^[0-9a-vA-V]{20}$/,pc=/^[A-Za-z0-9]{27}$/,mc=/^[a-zA-Z0-9_-]{21}$/,hc=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,N$=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,fc=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Yt=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,R$=Yt(4),D$=Yt(6),j$=Yt(7),gc=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,L$=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,z$=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Uf=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,M$=Uf,U$=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,F$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";vc=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,bc=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,_c=e=>{let t=Le(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},wc=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,kc=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,xc=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ei=/^[A-Za-z0-9_-]*$/,G$=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,B$=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Sc=/^https?$/,$c=/^\+[1-9]\d{6,14}$/,Ff="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Ec=new RegExp(`^${Ff}$`);Ic=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Cc=/^-?\d+n?$/,Pc=/^-?\d+$/,ti=/^-?\d+(?:\.\d+)?$/,Oc=/^(?:true|false)$/i,Nc=/^null$/i,Rc=/^undefined$/i,Dc=/^[^A-Z]*$/,jc=/^[^a-z]*$/,Z$=/^[0-9a-fA-F]*$/;K$=/^[0-9a-fA-F]{32}$/,W$=Mr(22,"=="),V$=Ur(22),H$=/^[0-9a-fA-F]{40}$/,J$=Mr(27,"="),Y$=Ur(27),q$=/^[0-9a-fA-F]{64}$/,X$=Mr(43,"="),Q$=Ur(43),eE=/^[0-9a-fA-F]{96}$/,tE=Mr(64,""),nE=Ur(64),rE=/^[0-9a-fA-F]{128}$/,oE=Mr(86,"=="),iE=Ur(86)});function Bf(e,t,r){e.issues.length&&t.issues.push(...Se(r,e.issues))}var J,Zf,ri,oi,Lc,zc,Mc,Uc,Fc,Gc,Bc,Zc,Kc,Cn,Wc,Vc,Hc,Jc,Yc,qc,Xc,Qc,el,ii=y(()=>{Ht();ni();N();J=g("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Zf={number:"number",bigint:"bigint",object:"date"},ri=g("$ZodCheckLessThan",(e,t)=>{J.init(e,t);let r=Zf[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),oi=g("$ZodCheckGreaterThan",(e,t)=>{J.init(e,t);let r=Zf[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Lc=g("$ZodCheckMultipleOf",(e,t)=>{J.init(e,t),e._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Vs(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),zc=g("$ZodCheckNumberFormat",(e,t)=>{J.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,i]=Qs[t.format];e._zod.onattach.push(a=>{let s=a._zod.bag;s.format=t.format,s.minimum=n,s.maximum=i,r&&(s.pattern=Pc)}),e._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s)){a.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}s<n&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Mc=g("$ZodCheckBigIntFormat",(e,t)=>{J.init(e,t);let[r,o]=ec[t.format];e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o}),e._zod.check=n=>{let i=n.value;i<r&&n.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),i>o&&n.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Uc=g("$ZodCheckMaxSize",(e,t)=>{var r;J.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!_t(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;n.size<=t.maximum||o.issues.push({origin:Rr(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Fc=g("$ZodCheckMinSize",(e,t)=>{var r;J.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!_t(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;n.size>=t.minimum||o.issues.push({origin:Rr(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Gc=g("$ZodCheckSizeEquals",(e,t)=>{var r;J.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!_t(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=o=>{let n=o.value,i=n.size;if(i===t.size)return;let a=i>t.size;o.issues.push({origin:Rr(n),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Bc=g("$ZodCheckMaxLength",(e,t)=>{var r;J.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!_t(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;if(n.length<=t.maximum)return;let a=Dr(n);o.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Zc=g("$ZodCheckMinLength",(e,t)=>{var r;J.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!_t(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;if(n.length>=t.minimum)return;let a=Dr(n);o.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Kc=g("$ZodCheckLengthEquals",(e,t)=>{var r;J.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!_t(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=o=>{let n=o.value,i=n.length;if(i===t.length)return;let a=Dr(n),s=i>t.length;o.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Cn=g("$ZodCheckStringFormat",(e,t)=>{var r,o;J.init(e,t),e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),Wc=g("$ZodCheckRegex",(e,t)=>{Cn.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Vc=g("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Dc),Cn.init(e,t)}),Hc=g("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=jc),Cn.init(e,t)}),Jc=g("$ZodCheckIncludes",(e,t)=>{J.init(e,t);let r=Le(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Yc=g("$ZodCheckStartsWith",(e,t)=>{J.init(e,t);let r=new RegExp(`^${Le(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),qc=g("$ZodCheckEndsWith",(e,t)=>{J.init(e,t);let r=new RegExp(`.*${Le(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});Xc=g("$ZodCheckProperty",(e,t)=>{J.init(e,t),e._zod.check=r=>{let o=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(n=>Bf(n,r,t.property));Bf(o,r,t.property)}}),Qc=g("$ZodCheckMimeType",(e,t)=>{J.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),el=g("$ZodCheckOverwrite",(e,t)=>{J.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}})});var Fr,tl=y(()=>{Fr=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(`
8009
+ `)}process.exit(1)}var Tn,b$,En,$,le=v(()=>{"use strict";Tn=!1;b$=()=>!Tn&&process.stdout.isTTY===!0&&!process.env.NO_COLOR,En=(e,t)=>b$()?`\x1B[${e}m${t}\x1B[0m`:t,$={bold:e=>En("1",e),dim:e=>En("2",e),red:e=>En("31",e),green:e=>En("32",e),yellow:e=>En("33",e),cyan:e=>En("36",e)}});function Qt(e,t={}){let r=e?.trim()||An;return t.lower&&!/[A-Z]/.test(r.slice(1))&&(r=r.toLowerCase()),t.plural?`${r}s`:r}var An,Rr=v(()=>{"use strict";An="Round"});function He(e){return A$[e]??e}function Jf(e){if(!e||typeof e!="object"||Array.isArray(e))return e;let t=e;if(typeof t.archetype!="string")return e;let r=He(t.archetype);return r===t.archetype?e:{...t,archetype:r}}var A$,Qs,Yf,Tt=v(()=>{"use strict";A$={target_selection:"hunt",target_total:"push",puzzle:"group",prediction:"predict",forecast:"predict"};Qs={hunt:"gamestage-target-selection-element",push:"gamestage-target-total-element",group:"gamestage-puzzle-element",predict:"gamestage-prediction-element"},Yf={hunt:"Find the answer",push:"Under the limit",group:"Puzzle",predict:"Prediction"}});function g(e,t,r){function o(s,c){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,c);let d=a.prototype,u=Object.keys(d);for(let p=0;p<u.length;p++){let m=u[p];m in s||(s[m]=d[m].bind(s))}}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function a(s){var c;let d=r?.Parent?new i:this;o(d,s),(c=d._zod).deferred??(c.deferred=[]);for(let u of d._zod.deferred)u();return d}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}function ne(e){return e&&Object.assign(en,e),en}var qf,ec,tc,Je,At,en,tn=v(()=>{ec=Object.freeze({status:"aborted"});tc=Symbol("zod_brand"),Je=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},At=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(qf=globalThis).__zod_globalConfig??(qf.__zod_globalConfig={});en=globalThis.__zod_globalConfig});var E={};nt(E,{BIGINT_FORMAT_RANGES:()=>uc,Class:()=>rc,NUMBER_FORMAT_RANGES:()=>dc,aborted:()=>Ot,allowsEval:()=>ac,assert:()=>N$,assertEqual:()=>I$,assertIs:()=>P$,assertNever:()=>O$,assertNotEqual:()=>C$,assignProp:()=>Ct,base64ToUint8Array:()=>Qf,base64urlToUint8Array:()=>Y$,cached:()=>Cn,captureStackTrace:()=>Xo,cleanEnum:()=>J$,cleanRegex:()=>Lr,clone:()=>_e,cloneDef:()=>D$,createTransparentProxy:()=>F$,defineLazy:()=>W,esc:()=>qo,escapeRegex:()=>Ge,explicitlyAborted:()=>pc,extend:()=>W$,finalizeIssue:()=>we,floatSafeRemainder:()=>oc,getElementAtPath:()=>j$,getEnumValues:()=>jr,getLengthableOrigin:()=>Ur,getParsedType:()=>U$,getSizableOrigin:()=>zr,hexToUint8Array:()=>X$,isObject:()=>nn,isPlainObject:()=>Pt,issue:()=>Pn,joinValues:()=>b,jsonStringifyReplacer:()=>In,merge:()=>K$,mergeDefs:()=>pt,normalizeParams:()=>I,nullish:()=>It,numKeys:()=>z$,objectClone:()=>R$,omit:()=>B$,optionalKeys:()=>lc,parsedType:()=>S,partial:()=>V$,pick:()=>G$,prefixIssues:()=>Te,primitiveTypes:()=>cc,promiseAllObject:()=>L$,propertyKeyTypes:()=>Mr,randomString:()=>M$,required:()=>H$,safeExtend:()=>Z$,shallowClone:()=>sc,slugify:()=>ic,stringifyPrimitive:()=>x,uint8ArrayToBase64:()=>eg,uint8ArrayToBase64url:()=>q$,uint8ArrayToHex:()=>Q$,unwrapMessage:()=>Dr});function I$(e){return e}function C$(e){return e}function P$(e){}function O$(e){throw new Error("Unexpected value in exhaustive check")}function N$(e){}function jr(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function b(e,t="|"){return e.map(r=>x(r)).join(t)}function In(e,t){return typeof t=="bigint"?t.toString():t}function Cn(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function It(e){return e==null}function Lr(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function oc(e,t){let r=e/t,o=Math.round(r),n=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-o)<n?0:r-o}function W(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==Xf)return o===void 0&&(o=Xf,o=r()),o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function R$(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Ct(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function pt(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function D$(e){return pt(e._zod.def)}function j$(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function L$(e){let t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{let n={};for(let i=0;i<t.length;i++)n[t[i]]=o[i];return n})}function M$(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function qo(e){return JSON.stringify(e)}function ic(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function nn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Pt(e){if(nn(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(nn(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function sc(e){return Pt(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function z$(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}function Ge(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function _e(e,t,r){let o=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(o._zod.parent=e),o}function I(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function F$(e){let t;return new Proxy({},{get(r,o,n){return t??(t=e()),Reflect.get(t,o,n)},set(r,o,n,i){return t??(t=e()),Reflect.set(t,o,n,i)},has(r,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t??(t=e()),Reflect.defineProperty(t,o,n)}})}function x(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function lc(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function G$(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=pt(e._zod.def,{get shape(){let a={};for(let s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(a[s]=r.shape[s])}return Ct(this,"shape",a),a},checks:[]});return _e(e,i)}function B$(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=pt(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete a[s]}return Ct(this,"shape",a),a},checks:[]});return _e(e,i)}function W$(e,t){if(!Pt(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let i=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(i,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=pt(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Ct(this,"shape",i),i}});return _e(e,n)}function Z$(e,t){if(!Pt(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=pt(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Ct(this,"shape",o),o}});return _e(e,r)}function K$(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=pt(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return Ct(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return _e(e,r)}function V$(e,t,r){let n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=pt(t._zod.def,{get shape(){let s=t._zod.def.shape,c={...s};if(r)for(let d in r){if(!(d in s))throw new Error(`Unrecognized key: "${d}"`);r[d]&&(c[d]=e?new e({type:"optional",innerType:s[d]}):s[d])}else for(let d in s)c[d]=e?new e({type:"optional",innerType:s[d]}):s[d];return Ct(this,"shape",c),c},checks:[]});return _e(t,a)}function H$(e,t,r){let o=pt(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let a in r){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(i[a]=new e({type:"nonoptional",innerType:n[a]}))}else for(let a in n)i[a]=new e({type:"nonoptional",innerType:n[a]});return Ct(this,"shape",i),i}});return _e(t,o)}function Ot(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function pc(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function Te(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function Dr(e){return typeof e=="string"?e:e?.message}function we(e,t,r){let o=e.message?e.message:Dr(e.inst?._zod.def?.error?.(e))??Dr(t?.error?.(e))??Dr(r.customError?.(e))??Dr(r.localeError?.(e))??"Invalid input",{inst:n,continue:i,input:a,...s}=e;return s.path??(s.path=[]),s.message=o,t?.reportInput&&(s.input=a),s}function zr(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Ur(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function S(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function Pn(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function J$(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Qf(e){let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r}function eg(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function Y$(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Qf(t+r)}function q$(e){return eg(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function X$(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)r[o/2]=Number.parseInt(t.slice(o,o+2),16);return r}function Q$(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Xf,Xo,ac,U$,Mr,cc,dc,uc,rc,L=v(()=>{tn();Xf=Symbol("evaluating");Xo="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};ac=Cn(()=>{if(en.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});U$=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Mr=new Set(["string","number","symbol"]),cc=new Set(["string","number","bigint","boolean","symbol","undefined"]);dc={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},uc={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};rc=class{constructor(...t){}}});function Gr(e,t=r=>r.message){let r={},o=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):o.push(t(n));return{formErrors:o,fieldErrors:r}}function Br(e,t=r=>r.message){let r={_errors:[]},o=(n,i=[])=>{for(let a of n.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>o({issues:s},[...i,...a.path]));else if(a.code==="invalid_key")o({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")o({issues:a.issues},[...i,...a.path]);else{let s=[...i,...a.path];if(s.length===0)r._errors.push(t(a));else{let c=r,d=0;for(;d<s.length;){let u=s[d];d===s.length-1?(c[u]=c[u]||{_errors:[]},c[u]._errors.push(t(a))):c[u]=c[u]||{_errors:[]},c=c[u],d++}}}};return o(e),r}function mc(e,t=r=>r.message){let r={errors:[]},o=(n,i=[])=>{var a,s;for(let c of n.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(d=>o({issues:d},[...i,...c.path]));else if(c.code==="invalid_key")o({issues:c.issues},[...i,...c.path]);else if(c.code==="invalid_element")o({issues:c.issues},[...i,...c.path]);else{let d=[...i,...c.path];if(d.length===0){r.errors.push(t(c));continue}let u=r,p=0;for(;p<d.length;){let m=d[p],h=p===d.length-1;typeof m=="string"?(u.properties??(u.properties={}),(a=u.properties)[m]??(a[m]={errors:[]}),u=u.properties[m]):(u.items??(u.items=[]),(s=u.items)[m]??(s[m]={errors:[]}),u=u.items[m]),h&&u.errors.push(t(c)),p++}}};return o(e),r}function ng(e){let t=[],r=e.map(o=>typeof o=="object"?o.key:o);for(let o of r)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function hc(e){let t=[],r=[...e.issues].sort((o,n)=>(o.path??[]).length-(n.path??[]).length);for(let o of r)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${ng(o.path)}`);return t.join(`
8010
+ `)}var tg,Fr,Ae,fc=v(()=>{tn();L();tg=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,In,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Fr=g("$ZodError",tg),Ae=g("$ZodError",tg,{Parent:Error})});var On,Qo,Nn,ei,Rn,gc,Dn,yc,ti,tE,ni,nE,ri,rE,oi,oE,ii,iE,ai,aE,si,sE,ci,cE,vc=v(()=>{tn();fc();L();On=e=>(t,r,o,n)=>{let i=o?{...o,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new Je;if(a.issues.length){let s=new(n?.Err??e)(a.issues.map(c=>we(c,i,ne())));throw Xo(s,n?.callee),s}return a.value},Qo=On(Ae),Nn=e=>async(t,r,o,n)=>{let i=o?{...o,async:!0}:{async:!0},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(n?.Err??e)(a.issues.map(c=>we(c,i,ne())));throw Xo(s,n?.callee),s}return a.value},ei=Nn(Ae),Rn=e=>(t,r,o)=>{let n=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new Je;return i.issues.length?{success:!1,error:new(e??Fr)(i.issues.map(a=>we(a,n,ne())))}:{success:!0,data:i.value}},gc=Rn(Ae),Dn=e=>async(t,r,o)=>{let n=o?{...o,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>we(a,n,ne())))}:{success:!0,data:i.value}},yc=Dn(Ae),ti=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return On(e)(t,r,n)},tE=ti(Ae),ni=e=>(t,r,o)=>On(e)(t,r,o),nE=ni(Ae),ri=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return Nn(e)(t,r,n)},rE=ri(Ae),oi=e=>async(t,r,o)=>Nn(e)(t,r,o),oE=oi(Ae),ii=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return Rn(e)(t,r,n)},iE=ii(Ae),ai=e=>(t,r,o)=>Rn(e)(t,r,o),aE=ai(Ae),si=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return Dn(e)(t,r,n)},sE=si(Ae),ci=e=>async(t,r,o)=>Dn(e)(t,r,o),cE=ci(Ae)});var Ne={};nt(Ne,{base64:()=>Rc,base64url:()=>li,bigint:()=>Fc,boolean:()=>Bc,browserEmail:()=>gE,cidrv4:()=>Oc,cidrv6:()=>Nc,cuid:()=>bc,cuid2:()=>_c,date:()=>Lc,datetime:()=>zc,domain:()=>bE,duration:()=>$c,e164:()=>jc,email:()=>Tc,emoji:()=>Ac,extendedDuration:()=>lE,guid:()=>Ec,hex:()=>_E,hostname:()=>vE,html5Email:()=>mE,httpProtocol:()=>Dc,idnEmail:()=>fE,integer:()=>Gc,ipv4:()=>Ic,ipv6:()=>Cc,ksuid:()=>xc,lowercase:()=>Kc,mac:()=>Pc,md5_base64:()=>kE,md5_base64url:()=>xE,md5_hex:()=>wE,nanoid:()=>Sc,null:()=>Wc,number:()=>di,rfc5322Email:()=>hE,sha1_base64:()=>$E,sha1_base64url:()=>EE,sha1_hex:()=>SE,sha256_base64:()=>AE,sha256_base64url:()=>IE,sha256_hex:()=>TE,sha384_base64:()=>PE,sha384_base64url:()=>OE,sha384_hex:()=>CE,sha512_base64:()=>RE,sha512_base64url:()=>DE,sha512_hex:()=>NE,string:()=>Uc,time:()=>Mc,ulid:()=>wc,undefined:()=>Zc,unicodeEmail:()=>rg,uppercase:()=>Vc,uuid:()=>rn,uuid4:()=>dE,uuid6:()=>uE,uuid7:()=>pE,xid:()=>kc});function Ac(){return new RegExp(yE,"u")}function ig(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Mc(e){return new RegExp(`^${ig(e)}$`)}function zc(e){let t=ig({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${r.join("|")})`;return new RegExp(`^${og}T(?:${o})$`)}function Wr(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Zr(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var bc,_c,wc,kc,xc,Sc,$c,lE,Ec,rn,dE,uE,pE,Tc,mE,hE,rg,fE,gE,yE,Ic,Cc,Pc,Oc,Nc,Rc,li,vE,bE,Dc,jc,og,Lc,Uc,Fc,Gc,di,Bc,Wc,Zc,Kc,Vc,_E,wE,kE,xE,SE,$E,EE,TE,AE,IE,CE,PE,OE,NE,RE,DE,ui=v(()=>{L();bc=/^[cC][0-9a-z]{6,}$/,_c=/^[0-9a-z]+$/,wc=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,kc=/^[0-9a-vA-V]{20}$/,xc=/^[A-Za-z0-9]{27}$/,Sc=/^[a-zA-Z0-9_-]{21}$/,$c=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,lE=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ec=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,rn=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,dE=rn(4),uE=rn(6),pE=rn(7),Tc=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,mE=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,hE=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,rg=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,fE=rg,gE=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,yE="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";Ic=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Cc=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Pc=e=>{let t=Ge(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Oc=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Nc=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Rc=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,li=/^[A-Za-z0-9_-]*$/,vE=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,bE=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Dc=/^https?$/,jc=/^\+[1-9]\d{6,14}$/,og="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Lc=new RegExp(`^${og}$`);Uc=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Fc=/^-?\d+n?$/,Gc=/^-?\d+$/,di=/^-?\d+(?:\.\d+)?$/,Bc=/^(?:true|false)$/i,Wc=/^null$/i,Zc=/^undefined$/i,Kc=/^[^A-Z]*$/,Vc=/^[^a-z]*$/,_E=/^[0-9a-fA-F]*$/;wE=/^[0-9a-fA-F]{32}$/,kE=Wr(22,"=="),xE=Zr(22),SE=/^[0-9a-fA-F]{40}$/,$E=Wr(27,"="),EE=Zr(27),TE=/^[0-9a-fA-F]{64}$/,AE=Wr(43,"="),IE=Zr(43),CE=/^[0-9a-fA-F]{96}$/,PE=Wr(64,""),OE=Zr(64),NE=/^[0-9a-fA-F]{128}$/,RE=Wr(86,"=="),DE=Zr(86)});function ag(e,t,r){e.issues.length&&t.issues.push(...Te(r,e.issues))}var q,sg,pi,mi,Hc,Jc,Yc,qc,Xc,Qc,el,tl,nl,jn,rl,ol,il,al,sl,cl,ll,dl,ul,hi=v(()=>{tn();ui();L();q=g("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),sg={number:"number",bigint:"bigint",object:"date"},pi=g("$ZodCheckLessThan",(e,t)=>{q.init(e,t);let r=sg[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),mi=g("$ZodCheckGreaterThan",(e,t)=>{q.init(e,t);let r=sg[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Hc=g("$ZodCheckMultipleOf",(e,t)=>{q.init(e,t),e._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):oc(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Jc=g("$ZodCheckNumberFormat",(e,t)=>{q.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,i]=dc[t.format];e._zod.onattach.push(a=>{let s=a._zod.bag;s.format=t.format,s.minimum=n,s.maximum=i,r&&(s.pattern=Gc)}),e._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s)){a.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}s<n&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Yc=g("$ZodCheckBigIntFormat",(e,t)=>{q.init(e,t);let[r,o]=uc[t.format];e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o}),e._zod.check=n=>{let i=n.value;i<r&&n.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),i>o&&n.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),qc=g("$ZodCheckMaxSize",(e,t)=>{var r;q.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!It(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;n.size<=t.maximum||o.issues.push({origin:zr(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Xc=g("$ZodCheckMinSize",(e,t)=>{var r;q.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!It(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;n.size>=t.minimum||o.issues.push({origin:zr(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Qc=g("$ZodCheckSizeEquals",(e,t)=>{var r;q.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!It(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=o=>{let n=o.value,i=n.size;if(i===t.size)return;let a=i>t.size;o.issues.push({origin:zr(n),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),el=g("$ZodCheckMaxLength",(e,t)=>{var r;q.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!It(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;if(n.length<=t.maximum)return;let a=Ur(n);o.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),tl=g("$ZodCheckMinLength",(e,t)=>{var r;q.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!It(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;if(n.length>=t.minimum)return;let a=Ur(n);o.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),nl=g("$ZodCheckLengthEquals",(e,t)=>{var r;q.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!It(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=o=>{let n=o.value,i=n.length;if(i===t.length)return;let a=Ur(n),s=i>t.length;o.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),jn=g("$ZodCheckStringFormat",(e,t)=>{var r,o;q.init(e,t),e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),rl=g("$ZodCheckRegex",(e,t)=>{jn.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ol=g("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Kc),jn.init(e,t)}),il=g("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Vc),jn.init(e,t)}),al=g("$ZodCheckIncludes",(e,t)=>{q.init(e,t);let r=Ge(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),sl=g("$ZodCheckStartsWith",(e,t)=>{q.init(e,t);let r=new RegExp(`^${Ge(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),cl=g("$ZodCheckEndsWith",(e,t)=>{q.init(e,t);let r=new RegExp(`.*${Ge(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});ll=g("$ZodCheckProperty",(e,t)=>{q.init(e,t),e._zod.check=r=>{let o=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(n=>ag(n,r,t.property));ag(o,r,t.property)}}),dl=g("$ZodCheckMimeType",(e,t)=>{q.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),ul=g("$ZodCheckOverwrite",(e,t)=>{q.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}})});var Kr,pl=v(()=>{Kr=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(`
7726
8011
  `).filter(a=>a),n=Math.min(...o.map(a=>a.length-a.trimStart().length)),i=o.map(a=>a.slice(n)).map(a=>" ".repeat(this.indent*2)+a);for(let a of i)this.content.push(a)}compile(){let t=Function,r=this?.args,n=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...r,n.join(`
7727
- `))}}});var nl,rl=y(()=>{nl={major:4,minor:4,patch:3}});function $l(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}function ag(e){if(!ei.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return $l(r)}function sg(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[o]=r;if(!o)return!1;let n=JSON.parse(atob(o));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}function Wf(e,t,r){e.issues.length&&t.issues.push(...Se(r,e.issues)),t.value[r]=e.value}function li(e,t,r,o,n,i){let a=r in o;if(e.issues.length){if(n&&i&&!a)return;t.issues.push(...Se(r,e.issues))}if(!a&&!n){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?a&&(t.value[r]=void 0):t.value[r]=e.value}function cg(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let r=Xs(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function lg(e,t,r,o,n,i){let a=[],s=n.keySet,c=n.catchall._zod,l=c.def.type,p=c.optin==="optional",d=c.optout==="optional";for(let m in t){if(m==="__proto__"||s.has(m))continue;if(l==="never"){a.push(m);continue}let h=c.run({value:t[m],issues:[]},o);h instanceof Promise?e.push(h.then(f=>li(f,r,m,t,p,d))):li(h,r,m,t,p,d)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}function Vf(e,t,r,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let n=e.filter(i=>!xt(i));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>ve(a,o,Q())))}),t)}function Hf(e,t,r,o){let n=e.filter(i=>i.issues.length===0);return n.length===1?(t.value=n[0].value,t):(n.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>ve(a,o,Q())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}function ol(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(kt(e)&&kt(t)){let r=Object.keys(t),o=Object.keys(e).filter(i=>r.indexOf(i)!==-1),n={...e,...t};for(let i of o){let a=ol(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n[i]=a.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o],a=ol(n,i);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Jf(e,t,r){let o=new Map,n;for(let s of t.issues)if(s.code==="unrecognized_keys"){n??(n=s);for(let c of s.keys)o.has(c)||o.set(c,{}),o.get(c).l=!0}else e.issues.push(s);for(let s of r.issues)if(s.code==="unrecognized_keys")for(let c of s.keys)o.has(c)||o.set(c,{}),o.get(c).r=!0;else e.issues.push(s);let i=[...o].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(i.length&&n&&e.issues.push({...n,keys:i}),xt(e))return e;let a=ol(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}function Yf(e,t){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[t]!=="optional")return r+1;return 0}function qf(e,t,r){e.issues.length&&t.issues.push(...Se(r,e.issues)),t.value[r]=e.value}function Xf(e,t,r,o,n){for(let i=0;i<r.length;i++){let a=e[i],s=i<o.length;if(a.issues.length){if(!s&&i>=n){t.value.length=i;break}t.issues.push(...Se(i,a.issues))}t.value[i]=a.value}for(let i=t.value.length-1;i>=o.length&&(r[i]._zod.optout==="optional"&&t.value[i]===void 0);i--)t.value.length=i;return t}function Qf(e,t,r,o,n,i,a){e.issues.length&&(Nr.has(typeof o)?r.issues.push(...Se(o,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:i,issues:e.issues.map(s=>ve(s,a,Q()))})),t.issues.length&&(Nr.has(typeof o)?r.issues.push(...Se(o,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:t.issues.map(s=>ve(s,a,Q()))})),r.value.set(e.value,t.value)}function eg(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function tg(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}function ng(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function rg(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function ai(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}function si(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);return n instanceof Promise?n.then(i=>ci(e,i,t.out,r)):ci(e,n,t.out,r)}else{let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(i=>ci(e,i,t.in,r)):ci(e,n,t.in,r)}}function ci(e,t,r,o){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},o)}function og(e){return e.value=Object.freeze(e.value),e}function ig(e,t,r,o){if(!e){let n={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(n.params=o._zod.def.params),t.issues.push($n(n))}}var M,qt,V,il,al,sl,cl,ll,ul,dl,pl,ml,hl,fl,gl,yl,vl,bl,_l,wl,kl,xl,Sl,El,Tl,Al,Il,Cl,ui,Pl,Gr,di,Ol,Nl,Rl,Dl,jl,Ll,zl,Ml,Ul,Fl,ug,Gl,Br,Bl,Zl,Kl,pi,Wl,Vl,Hl,Jl,Yl,ql,Xl,mi,Ql,eu,tu,nu,ru,ou,iu,au,hi,Zr,su,cu,lu,uu,du,pu,mu,hu=y(()=>{ii();Ht();tl();sc();ni();N();rl();N();M=g("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=nl;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let n of o)for(let i of n._zod.onattach)i(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let n=(a,s,c)=>{let l=xt(a),p;for(let d of s){if(d._zod.def.when){if(tc(a)||!d._zod.def.when(a))continue}else if(l)continue;let m=a.issues.length,h=d._zod.check(a);if(h instanceof Promise&&c?.async===!1)throw new Ue;if(p||h instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await h,a.issues.length!==m&&(l||(l=xt(a,m)))});else{if(a.issues.length===m)continue;l||(l=xt(a,m))}}return p?p.then(()=>a):a},i=(a,s,c)=>{if(xt(a))return a.aborted=!0,a;let l=n(s,o,c);if(l instanceof Promise){if(c.async===!1)throw new Ue;return l.then(p=>e._zod.parse(p,c))}return e._zod.parse(l,c)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let l=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return l instanceof Promise?l.then(p=>i(p,a,s)):i(l,a,s)}let c=e._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new Ue;return c.then(l=>n(l,o,s))}return n(c,o,s)}}G(e,"~standard",()=>({validate:n=>{try{let i=ic(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return ac(e,n).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),qt=g("$ZodString",(e,t)=>{M.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Ic(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),V=g("$ZodStringFormat",(e,t)=>{Cn.init(e,t),qt.init(e,t)}),il=g("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=fc),V.init(e,t)}),al=g("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Yt(o))}else t.pattern??(t.pattern=Yt());V.init(e,t)}),sl=g("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=gc),V.init(e,t)}),cl=g("$ZodURL",(e,t)=>{V.init(e,t),e._zod.check=r=>{try{let o=r.value.trim();if(!t.normalize&&t.protocol?.source===Sc.source&&!/^https?:\/\//i.test(o)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}let n=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),ll=g("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=yc()),V.init(e,t)}),ul=g("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=mc),V.init(e,t)}),dl=g("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=cc),V.init(e,t)}),pl=g("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=lc),V.init(e,t)}),ml=g("$ZodULID",(e,t)=>{t.pattern??(t.pattern=uc),V.init(e,t)}),hl=g("$ZodXID",(e,t)=>{t.pattern??(t.pattern=dc),V.init(e,t)}),fl=g("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=pc),V.init(e,t)}),gl=g("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Ac(t)),V.init(e,t)}),yl=g("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Ec),V.init(e,t)}),vl=g("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Tc(t)),V.init(e,t)}),bl=g("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=hc),V.init(e,t)}),_l=g("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=vc),V.init(e,t),e._zod.bag.format="ipv4"}),wl=g("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=bc),V.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),kl=g("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=_c(t.delimiter)),V.init(e,t),e._zod.bag.format="mac"}),xl=g("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=wc),V.init(e,t)}),Sl=g("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=kc),V.init(e,t),e._zod.check=r=>{let o=r.value.split("/");try{if(o.length!==2)throw new Error;let[n,i]=o;if(!i)throw new Error;let a=Number(i);if(`${a}`!==i)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});El=g("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=xc),V.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{$l(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});Tl=g("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ei),V.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{ag(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Al=g("$ZodE164",(e,t)=>{t.pattern??(t.pattern=$c),V.init(e,t)});Il=g("$ZodJWT",(e,t)=>{V.init(e,t),e._zod.check=r=>{sg(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Cl=g("$ZodCustomStringFormat",(e,t)=>{V.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),ui=g("$ZodNumber",(e,t)=>{M.init(e,t),e._zod.pattern=e._zod.bag.pattern??ti,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let i=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...i?{received:i}:{}}),r}}),Pl=g("$ZodNumberFormat",(e,t)=>{zc.init(e,t),ui.init(e,t)}),Gr=g("$ZodBoolean",(e,t)=>{M.init(e,t),e._zod.pattern=Oc,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=!!r.value}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),di=g("$ZodBigInt",(e,t)=>{M.init(e,t),e._zod.pattern=Cc,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),Ol=g("$ZodBigIntFormat",(e,t)=>{Mc.init(e,t),di.init(e,t)}),Nl=g("$ZodSymbol",(e,t)=>{M.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),Rl=g("$ZodUndefined",(e,t)=>{M.init(e,t),e._zod.pattern=Rc,e._zod.values=new Set([void 0]),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),Dl=g("$ZodNull",(e,t)=>{M.init(e,t),e._zod.pattern=Nc,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),jl=g("$ZodAny",(e,t)=>{M.init(e,t),e._zod.parse=r=>r}),Ll=g("$ZodUnknown",(e,t)=>{M.init(e,t),e._zod.parse=r=>r}),zl=g("$ZodNever",(e,t)=>{M.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),Ml=g("$ZodVoid",(e,t)=>{M.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),Ul=g("$ZodDate",(e,t)=>{M.init(e,t),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let n=r.value,i=n instanceof Date;return i&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...i?{received:"Invalid Date"}:{},inst:e}),r}});Fl=g("$ZodArray",(e,t)=>{M.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let i=[];for(let a=0;a<n.length;a++){let s=n[a],c=t.element._zod.run({value:s,issues:[]},o);c instanceof Promise?i.push(c.then(l=>Wf(l,r,a))):Wf(c,r,a)}return i.length?Promise.all(i).then(()=>r):r}});ug=g("$ZodObject",(e,t)=>{if(M.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let s=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...s};return Object.defineProperty(t,"shape",{value:c}),c}})}let o=Sn(()=>cg(t));G(e._zod,"propValues",()=>{let s=t.shape,c={};for(let l in s){let p=s[l]._zod;if(p.values){c[l]??(c[l]=new Set);for(let d of p.values)c[l].add(d)}}return c});let n=Jt,i=t.catchall,a;e._zod.parse=(s,c)=>{a??(a=o.value);let l=s.value;if(!n(l))return s.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),s;s.value={};let p=[],d=a.shape;for(let m of a.keys){let h=d[m],f=h._zod.optin==="optional",w=h._zod.optout==="optional",_=h._zod.run({value:l[m],issues:[]},c);_ instanceof Promise?p.push(_.then(A=>li(A,s,m,l,f,w))):li(_,s,m,l,f,w)}return i?lg(p,l,s,c,o.value,e):p.length?Promise.all(p).then(()=>s):s}}),Gl=g("$ZodObjectJIT",(e,t)=>{ug.init(e,t);let r=e._zod.parse,o=Sn(()=>cg(t)),n=m=>{let h=new Fr(["shape","payload","ctx"]),f=o.value,w=U=>{let B=Go(U);return`shape[${B}]._zod.run({ value: input[${B}], issues: [] }, ctx)`};h.write("const input = payload.value;");let _=Object.create(null),A=0;for(let U of f.keys)_[U]=`key_${A++}`;h.write("const newResult = {};");for(let U of f.keys){let B=_[U],Z=Go(U),Ke=m[U],rt=Ke?._zod?.optin==="optional",q=Ke?._zod?.optout==="optional";h.write(`const ${B} = ${w(U)};`),rt&&q?h.write(`
7728
- if (${B}.issues.length) {
7729
- if (${Z} in input) {
7730
- payload.issues = payload.issues.concat(${B}.issues.map(iss => ({
8012
+ `))}}});var ml,hl=v(()=>{ml={major:4,minor:4,patch:3}});function jl(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}function xg(e){if(!li.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return jl(r)}function Sg(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[o]=r;if(!o)return!1;let n=JSON.parse(atob(o));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}function lg(e,t,r){e.issues.length&&t.issues.push(...Te(r,e.issues)),t.value[r]=e.value}function vi(e,t,r,o,n,i){let a=r in o;if(e.issues.length){if(n&&i&&!a)return;t.issues.push(...Te(r,e.issues))}if(!a&&!n){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?a&&(t.value[r]=void 0):t.value[r]=e.value}function $g(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let r=lc(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Eg(e,t,r,o,n,i){let a=[],s=n.keySet,c=n.catchall._zod,d=c.def.type,u=c.optin==="optional",p=c.optout==="optional";for(let m in t){if(m==="__proto__"||s.has(m))continue;if(d==="never"){a.push(m);continue}let h=c.run({value:t[m],issues:[]},o);h instanceof Promise?e.push(h.then(f=>vi(f,r,m,t,u,p))):vi(h,r,m,t,u,p)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}function dg(e,t,r,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let n=e.filter(i=>!Ot(i));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>we(a,o,ne())))}),t)}function ug(e,t,r,o){let n=e.filter(i=>i.issues.length===0);return n.length===1?(t.value=n[0].value,t):(n.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>we(a,o,ne())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}function fl(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Pt(e)&&Pt(t)){let r=Object.keys(t),o=Object.keys(e).filter(i=>r.indexOf(i)!==-1),n={...e,...t};for(let i of o){let a=fl(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n[i]=a.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o],a=fl(n,i);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function pg(e,t,r){let o=new Map,n;for(let s of t.issues)if(s.code==="unrecognized_keys"){n??(n=s);for(let c of s.keys)o.has(c)||o.set(c,{}),o.get(c).l=!0}else e.issues.push(s);for(let s of r.issues)if(s.code==="unrecognized_keys")for(let c of s.keys)o.has(c)||o.set(c,{}),o.get(c).r=!0;else e.issues.push(s);let i=[...o].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(i.length&&n&&e.issues.push({...n,keys:i}),Ot(e))return e;let a=fl(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}function mg(e,t){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[t]!=="optional")return r+1;return 0}function hg(e,t,r){e.issues.length&&t.issues.push(...Te(r,e.issues)),t.value[r]=e.value}function fg(e,t,r,o,n){for(let i=0;i<r.length;i++){let a=e[i],s=i<o.length;if(a.issues.length){if(!s&&i>=n){t.value.length=i;break}t.issues.push(...Te(i,a.issues))}t.value[i]=a.value}for(let i=t.value.length-1;i>=o.length&&(r[i]._zod.optout==="optional"&&t.value[i]===void 0);i--)t.value.length=i;return t}function gg(e,t,r,o,n,i,a){e.issues.length&&(Mr.has(typeof o)?r.issues.push(...Te(o,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:i,issues:e.issues.map(s=>we(s,a,ne()))})),t.issues.length&&(Mr.has(typeof o)?r.issues.push(...Te(o,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:t.issues.map(s=>we(s,a,ne()))})),r.value.set(e.value,t.value)}function yg(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function vg(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}function bg(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function _g(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function fi(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}function gi(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);return n instanceof Promise?n.then(i=>yi(e,i,t.out,r)):yi(e,n,t.out,r)}else{let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(i=>yi(e,i,t.in,r)):yi(e,n,t.in,r)}}function yi(e,t,r,o){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},o)}function wg(e){return e.value=Object.freeze(e.value),e}function kg(e,t,r,o){if(!e){let n={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(n.params=o._zod.def.params),t.issues.push(Pn(n))}}var G,on,H,gl,yl,vl,bl,_l,wl,kl,xl,Sl,$l,El,Tl,Al,Il,Cl,Pl,Ol,Nl,Rl,Dl,Ll,Ml,zl,Ul,Fl,bi,Gl,Vr,_i,Bl,Wl,Zl,Kl,Vl,Hl,Jl,Yl,ql,Xl,Tg,Ql,Hr,ed,td,nd,wi,rd,od,id,ad,sd,cd,ld,ki,dd,ud,pd,md,hd,fd,gd,yd,xi,Jr,vd,bd,_d,wd,kd,xd,Sd,$d=v(()=>{hi();tn();pl();vc();ui();L();hl();L();G=g("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ml;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let n of o)for(let i of n._zod.onattach)i(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let n=(a,s,c)=>{let d=Ot(a),u;for(let p of s){if(p._zod.def.when){if(pc(a)||!p._zod.def.when(a))continue}else if(d)continue;let m=a.issues.length,h=p._zod.check(a);if(h instanceof Promise&&c?.async===!1)throw new Je;if(u||h instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await h,a.issues.length!==m&&(d||(d=Ot(a,m)))});else{if(a.issues.length===m)continue;d||(d=Ot(a,m))}}return u?u.then(()=>a):a},i=(a,s,c)=>{if(Ot(a))return a.aborted=!0,a;let d=n(s,o,c);if(d instanceof Promise){if(c.async===!1)throw new Je;return d.then(u=>e._zod.parse(u,c))}return e._zod.parse(d,c)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let d=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return d instanceof Promise?d.then(u=>i(u,a,s)):i(d,a,s)}let c=e._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new Je;return c.then(d=>n(d,o,s))}return n(c,o,s)}}W(e,"~standard",()=>({validate:n=>{try{let i=gc(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return yc(e,n).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),on=g("$ZodString",(e,t)=>{G.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Uc(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),H=g("$ZodStringFormat",(e,t)=>{jn.init(e,t),on.init(e,t)}),gl=g("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Ec),H.init(e,t)}),yl=g("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=rn(o))}else t.pattern??(t.pattern=rn());H.init(e,t)}),vl=g("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Tc),H.init(e,t)}),bl=g("$ZodURL",(e,t)=>{H.init(e,t),e._zod.check=r=>{try{let o=r.value.trim();if(!t.normalize&&t.protocol?.source===Dc.source&&!/^https?:\/\//i.test(o)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}let n=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),_l=g("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Ac()),H.init(e,t)}),wl=g("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Sc),H.init(e,t)}),kl=g("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=bc),H.init(e,t)}),xl=g("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=_c),H.init(e,t)}),Sl=g("$ZodULID",(e,t)=>{t.pattern??(t.pattern=wc),H.init(e,t)}),$l=g("$ZodXID",(e,t)=>{t.pattern??(t.pattern=kc),H.init(e,t)}),El=g("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=xc),H.init(e,t)}),Tl=g("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=zc(t)),H.init(e,t)}),Al=g("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Lc),H.init(e,t)}),Il=g("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Mc(t)),H.init(e,t)}),Cl=g("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=$c),H.init(e,t)}),Pl=g("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Ic),H.init(e,t),e._zod.bag.format="ipv4"}),Ol=g("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Cc),H.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Nl=g("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Pc(t.delimiter)),H.init(e,t),e._zod.bag.format="mac"}),Rl=g("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Oc),H.init(e,t)}),Dl=g("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Nc),H.init(e,t),e._zod.check=r=>{let o=r.value.split("/");try{if(o.length!==2)throw new Error;let[n,i]=o;if(!i)throw new Error;let a=Number(i);if(`${a}`!==i)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});Ll=g("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Rc),H.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{jl(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});Ml=g("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=li),H.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{xg(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),zl=g("$ZodE164",(e,t)=>{t.pattern??(t.pattern=jc),H.init(e,t)});Ul=g("$ZodJWT",(e,t)=>{H.init(e,t),e._zod.check=r=>{Sg(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Fl=g("$ZodCustomStringFormat",(e,t)=>{H.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),bi=g("$ZodNumber",(e,t)=>{G.init(e,t),e._zod.pattern=e._zod.bag.pattern??di,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let i=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...i?{received:i}:{}}),r}}),Gl=g("$ZodNumberFormat",(e,t)=>{Jc.init(e,t),bi.init(e,t)}),Vr=g("$ZodBoolean",(e,t)=>{G.init(e,t),e._zod.pattern=Bc,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=!!r.value}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),_i=g("$ZodBigInt",(e,t)=>{G.init(e,t),e._zod.pattern=Fc,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),Bl=g("$ZodBigIntFormat",(e,t)=>{Yc.init(e,t),_i.init(e,t)}),Wl=g("$ZodSymbol",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),Zl=g("$ZodUndefined",(e,t)=>{G.init(e,t),e._zod.pattern=Zc,e._zod.values=new Set([void 0]),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),Kl=g("$ZodNull",(e,t)=>{G.init(e,t),e._zod.pattern=Wc,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),Vl=g("$ZodAny",(e,t)=>{G.init(e,t),e._zod.parse=r=>r}),Hl=g("$ZodUnknown",(e,t)=>{G.init(e,t),e._zod.parse=r=>r}),Jl=g("$ZodNever",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),Yl=g("$ZodVoid",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),ql=g("$ZodDate",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let n=r.value,i=n instanceof Date;return i&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...i?{received:"Invalid Date"}:{},inst:e}),r}});Xl=g("$ZodArray",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let i=[];for(let a=0;a<n.length;a++){let s=n[a],c=t.element._zod.run({value:s,issues:[]},o);c instanceof Promise?i.push(c.then(d=>lg(d,r,a))):lg(c,r,a)}return i.length?Promise.all(i).then(()=>r):r}});Tg=g("$ZodObject",(e,t)=>{if(G.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let s=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...s};return Object.defineProperty(t,"shape",{value:c}),c}})}let o=Cn(()=>$g(t));W(e._zod,"propValues",()=>{let s=t.shape,c={};for(let d in s){let u=s[d]._zod;if(u.values){c[d]??(c[d]=new Set);for(let p of u.values)c[d].add(p)}}return c});let n=nn,i=t.catchall,a;e._zod.parse=(s,c)=>{a??(a=o.value);let d=s.value;if(!n(d))return s.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),s;s.value={};let u=[],p=a.shape;for(let m of a.keys){let h=p[m],f=h._zod.optin==="optional",_=h._zod.optout==="optional",T=h._zod.run({value:d[m],issues:[]},c);T instanceof Promise?u.push(T.then(A=>vi(A,s,m,d,f,_))):vi(T,s,m,d,f,_)}return i?Eg(u,d,s,c,o.value,e):u.length?Promise.all(u).then(()=>s):s}}),Ql=g("$ZodObjectJIT",(e,t)=>{Tg.init(e,t);let r=e._zod.parse,o=Cn(()=>$g(t)),n=m=>{let h=new Kr(["shape","payload","ctx"]),f=o.value,_=C=>{let D=qo(C);return`shape[${D}]._zod.run({ value: input[${D}], issues: [] }, ctx)`};h.write("const input = payload.value;");let T=Object.create(null),A=0;for(let C of f.keys)T[C]=`key_${A++}`;h.write("const newResult = {};");for(let C of f.keys){let D=T[C],j=qo(C),X=m[C],V=X?._zod?.optin==="optional",te=X?._zod?.optout==="optional";h.write(`const ${D} = ${_(C)};`),V&&te?h.write(`
8013
+ if (${D}.issues.length) {
8014
+ if (${j} in input) {
8015
+ payload.issues = payload.issues.concat(${D}.issues.map(iss => ({
7731
8016
  ...iss,
7732
- path: iss.path ? [${Z}, ...iss.path] : [${Z}]
8017
+ path: iss.path ? [${j}, ...iss.path] : [${j}]
7733
8018
  })));
7734
8019
  }
7735
8020
  }
7736
8021
 
7737
- if (${B}.value === undefined) {
7738
- if (${Z} in input) {
7739
- newResult[${Z}] = undefined;
8022
+ if (${D}.value === undefined) {
8023
+ if (${j} in input) {
8024
+ newResult[${j}] = undefined;
7740
8025
  }
7741
8026
  } else {
7742
- newResult[${Z}] = ${B}.value;
8027
+ newResult[${j}] = ${D}.value;
7743
8028
  }
7744
8029
 
7745
- `):rt?h.write(`
7746
- if (${B}.issues.length) {
7747
- payload.issues = payload.issues.concat(${B}.issues.map(iss => ({
8030
+ `):V?h.write(`
8031
+ if (${D}.issues.length) {
8032
+ payload.issues = payload.issues.concat(${D}.issues.map(iss => ({
7748
8033
  ...iss,
7749
- path: iss.path ? [${Z}, ...iss.path] : [${Z}]
8034
+ path: iss.path ? [${j}, ...iss.path] : [${j}]
7750
8035
  })));
7751
8036
  }
7752
8037
 
7753
- if (${B}.value === undefined) {
7754
- if (${Z} in input) {
7755
- newResult[${Z}] = undefined;
8038
+ if (${D}.value === undefined) {
8039
+ if (${j} in input) {
8040
+ newResult[${j}] = undefined;
7756
8041
  }
7757
8042
  } else {
7758
- newResult[${Z}] = ${B}.value;
8043
+ newResult[${j}] = ${D}.value;
7759
8044
  }
7760
8045
 
7761
8046
  `):h.write(`
7762
- const ${B}_present = ${Z} in input;
7763
- if (${B}.issues.length) {
7764
- payload.issues = payload.issues.concat(${B}.issues.map(iss => ({
8047
+ const ${D}_present = ${j} in input;
8048
+ if (${D}.issues.length) {
8049
+ payload.issues = payload.issues.concat(${D}.issues.map(iss => ({
7765
8050
  ...iss,
7766
- path: iss.path ? [${Z}, ...iss.path] : [${Z}]
8051
+ path: iss.path ? [${j}, ...iss.path] : [${j}]
7767
8052
  })));
7768
8053
  }
7769
- if (!${B}_present && !${B}.issues.length) {
8054
+ if (!${D}_present && !${D}.issues.length) {
7770
8055
  payload.issues.push({
7771
8056
  code: "invalid_type",
7772
8057
  expected: "nonoptional",
7773
8058
  input: undefined,
7774
- path: [${Z}]
8059
+ path: [${j}]
7775
8060
  });
7776
8061
  }
7777
8062
 
7778
- if (${B}_present) {
7779
- if (${B}.value === undefined) {
7780
- newResult[${Z}] = undefined;
8063
+ if (${D}_present) {
8064
+ if (${D}.value === undefined) {
8065
+ newResult[${j}] = undefined;
7781
8066
  } else {
7782
- newResult[${Z}] = ${B}.value;
8067
+ newResult[${j}] = ${D}.value;
7783
8068
  }
7784
8069
  }
7785
8070
 
7786
- `)}h.write("payload.value = newResult;"),h.write("return payload;");let R=h.compile();return(U,B)=>R(m,U,B)},i,a=Jt,s=!Vt.jitless,l=s&&Js.value,p=t.catchall,d;e._zod.parse=(m,h)=>{d??(d=o.value);let f=m.value;return a(f)?s&&l&&h?.async===!1&&h.jitless!==!0?(i||(i=n(t.shape)),m=i(m,h),p?lg([],f,m,h,d,e):m):r(m,h):(m.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),m)}});Br=g("$ZodUnion",(e,t)=>{M.init(e,t),G(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),G(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),G(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),G(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(n=>n._zod.pattern);return new RegExp(`^(${o.map(n=>Or(n.source)).join("|")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,n)=>{if(r)return r(o,n);let i=!1,a=[];for(let s of t.options){let c=s._zod.run({value:o.value,issues:[]},n);if(c instanceof Promise)a.push(c),i=!0;else{if(c.issues.length===0)return c;a.push(c)}}return i?Promise.all(a).then(s=>Vf(s,o,e,n)):Vf(a,o,e,n)}});Bl=g("$ZodXor",(e,t)=>{Br.init(e,t),t.inclusive=!1;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,n)=>{if(r)return r(o,n);let i=!1,a=[];for(let s of t.options){let c=s._zod.run({value:o.value,issues:[]},n);c instanceof Promise?(a.push(c),i=!0):a.push(c)}return i?Promise.all(a).then(s=>Hf(s,o,e,n)):Hf(a,o,e,n)}}),Zl=g("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Br.init(e,t);let r=e._zod.parse;G(e._zod,"propValues",()=>{let n={};for(let i of t.options){let a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[s,c]of Object.entries(a)){n[s]||(n[s]=new Set);for(let l of c)n[s].add(l)}}return n});let o=Sn(()=>{let n=t.options,i=new Map;for(let a of n){let s=a._zod.propValues?.[t.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let c of s){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,a)}}return i});e._zod.parse=(n,i)=>{let a=n.value;if(!Jt(a))return n.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),n;let s=o.value.get(a?.[t.discriminator]);return s?s._zod.run(n,i):t.unionFallback||i.direction==="backward"?r(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:a,path:[t.discriminator],inst:e}),n)}}),Kl=g("$ZodIntersection",(e,t)=>{M.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),a=t.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([c,l])=>Jf(r,c,l)):Jf(r,i,a)}});pi=g("$ZodTuple",(e,t)=>{M.init(e,t);let r=t.items;e._zod.parse=(o,n)=>{let i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];let a=[],s=Yf(r,"optin"),c=Yf(r,"optout");if(!t.rest){if(i.length<s)return o.issues.push({code:"too_small",minimum:s,inclusive:!0,input:i,inst:e,origin:"array"}),o;i.length>r.length&&o.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:i,inst:e,origin:"array"})}let l=new Array(r.length);for(let p=0;p<r.length;p++){let d=r[p]._zod.run({value:i[p],issues:[]},n);d instanceof Promise?a.push(d.then(m=>{l[p]=m})):l[p]=d}if(t.rest){let p=r.length-1,d=i.slice(r.length);for(let m of d){p++;let h=t.rest._zod.run({value:m,issues:[]},n);h instanceof Promise?a.push(h.then(f=>qf(f,o,p))):qf(h,o,p)}}return a.length?Promise.all(a).then(()=>Xf(l,o,r,i,c)):Xf(l,o,r,i,c)}});Wl=g("$ZodRecord",(e,t)=>{M.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!kt(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let i=[],a=t.keyType._zod.values;if(a){r.value={};let s=new Set;for(let l of a)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){s.add(typeof l=="number"?l.toString():l);let p=t.keyType._zod.run({value:l,issues:[]},o);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(p.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(h=>ve(h,o,Q())),input:l,path:[l],inst:e});continue}let d=p.value,m=t.valueType._zod.run({value:n[l],issues:[]},o);m instanceof Promise?i.push(m.then(h=>{h.issues.length&&r.issues.push(...Se(l,h.issues)),r.value[d]=h.value})):(m.issues.length&&r.issues.push(...Se(l,m.issues)),r.value[d]=m.value)}let c;for(let l in n)s.has(l)||(c=c??[],c.push(l));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:c})}else{r.value={};for(let s of Reflect.ownKeys(n)){if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(n,s))continue;let c=t.keyType._zod.run({value:s,issues:[]},o);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&ti.test(s)&&c.issues.length){let d=t.keyType._zod.run({value:Number(s),issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(c=d)}if(c.issues.length){t.mode==="loose"?r.value[s]=n[s]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(d=>ve(d,o,Q())),input:s,path:[s],inst:e});continue}let p=t.valueType._zod.run({value:n[s],issues:[]},o);p instanceof Promise?i.push(p.then(d=>{d.issues.length&&r.issues.push(...Se(s,d.issues)),r.value[c.value]=d.value})):(p.issues.length&&r.issues.push(...Se(s,p.issues)),r.value[c.value]=p.value)}}return i.length?Promise.all(i).then(()=>r):r}}),Vl=g("$ZodMap",(e,t)=>{M.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;let i=[];r.value=new Map;for(let[a,s]of n){let c=t.keyType._zod.run({value:a,issues:[]},o),l=t.valueType._zod.run({value:s,issues:[]},o);c instanceof Promise||l instanceof Promise?i.push(Promise.all([c,l]).then(([p,d])=>{Qf(p,d,r,a,n,e,o)})):Qf(c,l,r,a,n,e,o)}return i.length?Promise.all(i).then(()=>r):r}});Hl=g("$ZodSet",(e,t)=>{M.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;let i=[];r.value=new Set;for(let a of n){let s=t.valueType._zod.run({value:a,issues:[]},o);s instanceof Promise?i.push(s.then(c=>eg(c,r))):eg(s,r)}return i.length?Promise.all(i).then(()=>r):r}});Jl=g("$ZodEnum",(e,t)=>{M.init(e,t);let r=Pr(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(n=>Nr.has(typeof n)).map(n=>typeof n=="string"?Le(n):n.toString()).join("|")})$`),e._zod.parse=(n,i)=>{let a=n.value;return o.has(a)||n.issues.push({code:"invalid_value",values:r,input:a,inst:e}),n}}),Yl=g("$ZodLiteral",(e,t)=>{if(M.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?Le(o):o?Le(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,n)=>{let i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),ql=g("$ZodFile",(e,t)=>{M.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),Xl=g("$ZodTransform",(e,t)=>{M.init(e,t),e._zod.optin="optional",e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new bt(e.constructor.name);let n=t.transform(r.value,r);if(o.async)return(n instanceof Promise?n:Promise.resolve(n)).then(a=>(r.value=a,r.fallback=!0,r));if(n instanceof Promise)throw new Ue;return r.value=n,r.fallback=!0,r}});mi=g("$ZodOptional",(e,t)=>{M.init(e,t),e._zod.optin="optional",e._zod.optout="optional",G(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),G(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Or(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin==="optional"){let n=r.value,i=t.innerType._zod.run(r,o);return i instanceof Promise?i.then(a=>tg(a,n)):tg(i,n)}return r.value===void 0?r:t.innerType._zod.run(r,o)}}),Ql=g("$ZodExactOptional",(e,t)=>{mi.init(e,t),G(e._zod,"values",()=>t.innerType._zod.values),G(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,o)=>t.innerType._zod.run(r,o)}),eu=g("$ZodNullable",(e,t)=>{M.init(e,t),G(e._zod,"optin",()=>t.innerType._zod.optin),G(e._zod,"optout",()=>t.innerType._zod.optout),G(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Or(r.source)}|null)$`):void 0}),G(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:t.innerType._zod.run(r,o)}),tu=g("$ZodDefault",(e,t)=>{M.init(e,t),e._zod.optin="optional",G(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>ng(i,t)):ng(n,t)}});nu=g("$ZodPrefault",(e,t)=>{M.init(e,t),e._zod.optin="optional",G(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,o))}),ru=g("$ZodNonOptional",(e,t)=>{M.init(e,t),G(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>rg(i,e)):rg(n,e)}});ou=g("$ZodSuccess",(e,t)=>{M.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new bt("ZodSuccess");let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),iu=g("$ZodCatch",(e,t)=>{M.init(e,t),e._zod.optin="optional",G(e._zod,"optout",()=>t.innerType._zod.optout),G(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(a=>ve(a,o,Q()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(i=>ve(i,o,Q()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),au=g("$ZodNaN",(e,t)=>{M.init(e,t),e._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),hi=g("$ZodPipe",(e,t)=>{M.init(e,t),G(e._zod,"values",()=>t.in._zod.values),G(e._zod,"optin",()=>t.in._zod.optin),G(e._zod,"optout",()=>t.out._zod.optout),G(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(a=>ai(a,t.in,o)):ai(i,t.in,o)}let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>ai(i,t.out,o)):ai(n,t.out,o)}});Zr=g("$ZodCodec",(e,t)=>{M.init(e,t),G(e._zod,"values",()=>t.in._zod.values),G(e._zod,"optin",()=>t.in._zod.optin),G(e._zod,"optout",()=>t.out._zod.optout),G(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(r,o);return i instanceof Promise?i.then(a=>si(a,t,o)):si(i,t,o)}else{let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(a=>si(a,t,o)):si(i,t,o)}}});su=g("$ZodPreprocess",(e,t)=>{hi.init(e,t)}),cu=g("$ZodReadonly",(e,t)=>{M.init(e,t),G(e._zod,"propValues",()=>t.innerType._zod.propValues),G(e._zod,"values",()=>t.innerType._zod.values),G(e._zod,"optin",()=>t.innerType?._zod?.optin),G(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(og):og(n)}});lu=g("$ZodTemplateLiteral",(e,t)=>{M.init(e,t);let r=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let n=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=n.startsWith("^")?1:0,a=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(i,a))}else if(o===null||qs.has(typeof o))r.push(Le(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(o,n)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o)}),uu=g("$ZodFunction",(e,t)=>(M.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...o){let n=e._def.input?Zo(e._def.input,o):o,i=Reflect.apply(r,this,n);return e._def.output?Zo(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let n=e._def.input?await Ko(e._def.input,o):o,i=await Reflect.apply(r,this,n);return e._def.output?await Ko(e._def.output,i):i}},e._zod.parse=(r,o)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let o=e.constructor;return Array.isArray(r[0])?new o({type:"function",input:new pi({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new o({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:r})},e)),du=g("$ZodPromise",(e,t)=>{M.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o))}),pu=g("$ZodLazy",(e,t)=>{M.init(e,t),G(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),G(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),G(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),G(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),G(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o)}),mu=g("$ZodCustom",(e,t)=>{J.init(e,t),M.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=r=>{let o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then(i=>ig(i,r,o,e));ig(n,r,o,e)}})});function dg(){return{localeError:sE()}}var sE,pg=y(()=>{N();sE=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(n){return e[n]??null}let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return n.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${k(n.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${r[i.format]??n.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${n.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${b(n.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}}});function mg(){return{localeError:cE()}}var cE,hg=y(()=>{N();cE=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${s}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${k(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[i.format]??n.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${b(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}}});function fg(e,t,r,o){let n=Math.abs(e),i=n%10,a=n%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?r:o}function gg(){return{localeError:lE()}}var lE,yg=y(()=>{N();lE=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(n){return e[n]??null}let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},o={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${k(n.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=fg(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${n.maximum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=fg(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${n.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${b(n.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${n.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}}});function vg(){return{localeError:uE()}}var uE,bg=y(()=>{N();uE=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${k(n.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${n.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${n.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;if(i.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${i.prefix}"`;if(i.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${i.suffix}"`;if(i.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${i.includes}"`;if(i.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${i.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${r[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${n.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u043E\u0432\u0435":""}: ${b(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}}});function _g(){return{localeError:dE()}}var dE,wg=y(()=>{N();dE=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${s}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${k(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${b(n.values," o ")}`;case"too_big":{let i=n.inclusive?"com a m\xE0xim":"menys de",a=t(n.origin);return a?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${i} ${n.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(n.origin);return a?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${i} ${n.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${r[i.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${n.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${n.origin}`;default:return"Entrada inv\xE0lida"}}}});function kg(){return{localeError:pE()}}var pE,xg=y(()=>{N();pE=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(n){return e[n]??null}let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${s}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${k(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${r[i.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${b(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${n.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${n.origin}`;default:return"Neplatn\xFD vstup"}}}});function Sg(){return{localeError:mE()}}var mE,$g=y(()=>{N();mE=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(n){return e[n]??null}let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${s}`:`Ugyldigt input: forventede ${i}, fik ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${k(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin),s=o[n.origin]??n.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${i} ${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin),s=o[n.origin]??n.origin;return a?`For lille: forventede ${s} ${a.verb} ${i} ${n.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${b(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${n.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${n.origin}`;default:return"Ugyldigt input"}}}});function Eg(){return{localeError:hE()}}var hE,Tg=y(()=>{N();hE=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},o={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${s}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${k(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ist`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ist`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${r[i.format]??n.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${b(n.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${n.origin}`;default:return"Ung\xFCltige Eingabe"}}}});function Ag(){return{localeError:fE()}}var fE,Ig=y(()=>{N();fE=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(n){return e[n]??null}let r={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return typeof n.expected=="string"&&/^[A-Z]/.test(n.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${n.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}case"invalid_value":return n.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${k(n.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${n.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${n.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${i.prefix}"`:i.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${i.suffix}"`:i.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${i.includes}"`:i.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${i.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[i.format]??n.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${n.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${n.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${n.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${b(n.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${n.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${n.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}}});function fi(){return{localeError:gE()}}var gE,fu=y(()=>{N();gE=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return`Invalid input: expected ${i}, received ${s}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${k(n.values[0])}`:`Invalid option: expected one of ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Too big: expected ${n.origin??"value"} to have ${i}${n.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Too small: expected ${n.origin} to have ${i}${n.minimum.toString()} ${a.unit}`:`Too small: expected ${n.origin} to be ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${r[i.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`Invalid discriminator value. Expected ${n.options.map(a=>`'${a}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}}});function Cg(){return{localeError:yE()}}var yE,Pg=y(()=>{N();yE=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${s}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${k(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${i}${n.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${r[i.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}}});function Og(){return{localeError:vE()}}var vE,Ng=y(()=>{N();vE=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${s}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${k(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin),s=o[n.origin]??n.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${i}${n.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin),s=o[n.origin]??n.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${i}${n.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${r[i.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o[n.origin]??n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o[n.origin]??n.origin}`;default:return"Entrada inv\xE1lida"}}}});function Rg(){return{localeError:bE()}}var bE,Dg=y(()=>{N();bE=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(n){return e[n]??null}let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${k(n.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${b(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[i.format]??n.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${n.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${b(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${n.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}}});function jg(){return{localeError:_E()}}var _E,Lg=y(()=>{N();_E=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(n){return e[n]??null}let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${s}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${k(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${i}${n.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${i}${n.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${r[i.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${b(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}}});function zg(){return{localeError:wE()}}var wE,Mg=y(()=>{N();wE=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${s} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${k(n.values[0])} attendu`:`Option invalide : une valeur parmi ${b(n.values,"|")} attendue`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Trop grand : ${o[n.origin]??"valeur"} doit ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${o[n.origin]??"valeur"} doit \xEAtre ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Trop petit : ${o[n.origin]??"valeur"} doit ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Trop petit : ${o[n.origin]??"valeur"} doit \xEAtre ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${r[i.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${b(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}}});function Ug(){return{localeError:kE()}}var kE,Fg=y(()=>{N();kE=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${s}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${k(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u2264":"<",a=t(n.origin);return a?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${i}${n.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u2265":">",a=t(n.origin);return a?`Trop petit : attendu que ${n.origin} ait ${i}${n.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${n.origin} soit ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${r[i.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${b(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}}});function Gg(){return{localeError:xE()}}var xE,Bg=y(()=>{N();xE=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=l=>l?e[l]:void 0,o=l=>{let p=r(l);return p?p.label:l??e.unknown.label},n=l=>`\u05D4${o(l)}`,i=l=>(r(l)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=l=>l?t[l]??null:null,s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},c={nan:"NaN"};return l=>{switch(l.code){case"invalid_type":{let p=l.expected,d=c[p??""]??o(p),m=x(l.input),h=c[m]??e[m]?.label??m;return/^[A-Z]/.test(l.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${l.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`}case"invalid_value":{if(l.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${k(l.values[0])}`;let p=l.values.map(h=>k(h));if(l.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${p[0]} \u05D0\u05D5 ${p[1]}`;let d=p[p.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${p.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let p=a(l.origin),d=n(l.origin??"value");if(l.origin==="string")return`${p?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.maximum.toString()} ${p?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(l.origin==="number"){let f=l.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${l.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${f}`}if(l.origin==="array"||l.origin==="set"){let f=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",w=l.inclusive?`${l.maximum} ${p?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${l.maximum} ${p?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${f} \u05DC\u05D4\u05DB\u05D9\u05DC ${w}`.trim()}let m=l.inclusive?"<=":"<",h=i(l.origin??"value");return p?.unit?`${p.longLabel} \u05DE\u05D3\u05D9: ${d} ${h} ${m}${l.maximum.toString()} ${p.unit}`:`${p?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${h} ${m}${l.maximum.toString()}`}case"too_small":{let p=a(l.origin),d=n(l.origin??"value");if(l.origin==="string")return`${p?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.minimum.toString()} ${p?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(l.origin==="number"){let f=l.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${l.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${f}`}if(l.origin==="array"||l.origin==="set"){let f=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let _=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${f} \u05DC\u05D4\u05DB\u05D9\u05DC ${_}`}let w=l.inclusive?`${l.minimum} ${p?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${l.minimum} ${p?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${f} \u05DC\u05D4\u05DB\u05D9\u05DC ${w}`.trim()}let m=l.inclusive?">=":">",h=i(l.origin??"value");return p?.unit?`${p.shortLabel} \u05DE\u05D3\u05D9: ${d} ${h} ${m}${l.minimum.toString()} ${p.unit}`:`${p?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${h} ${m}${l.minimum.toString()}`}case"invalid_format":{let p=l;if(p.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${p.prefix}"`;if(p.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${p.suffix}"`;if(p.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${p.includes}"`;if(p.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${p.pattern}`;let d=s[p.format],m=d?.label??p.format,f=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${m} \u05DC\u05D0 ${f}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${l.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${l.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${l.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${b(l.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n(l.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}}});function Zg(){return{localeError:SE()}}var SE,Kg=y(()=>{N();SE=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(n){return e[n]??null}let r={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},o={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${n.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${s}`}case"invalid_value":return n.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${k(n.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin),s=o[n.origin]??n.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${i}${n.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin),s=o[n.origin]??n.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${i}${n.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${i.prefix}"`:i.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${i.suffix}"`:i.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${i.includes}"`:i.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`:`Neispravna ${r[i.format]??n.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${n.divisor}`;case"unrecognized_keys":return`Neprepoznat${n.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${b(n.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${o[n.origin]??n.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${o[n.origin]??n.origin}`;default:return"Neispravan unos"}}}});function Wg(){return{localeError:$E()}}var $E,Vg=y(()=>{N();$E=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}let r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},o={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${k(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${n.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${i}${n.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[i.format]??n.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${n.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}}});function Hg(e,t,r){return Math.abs(e)===1?t:r}function Pn(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}function Jg(){return{localeError:EE()}}var EE,Yg=y(()=>{N();EE=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(n){return e[n]??null}let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},o={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${n.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return n.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${k(n.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=Hg(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Pn(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${n.maximum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Pn(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=Hg(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Pn(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${n.minimum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Pn(n.origin)} \u056C\u056B\u0576\u056B ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[i.format]??n.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${n.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${n.keys.length>1?"\u0576\u0565\u0580":""}. ${b(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Pn(n.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Pn(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}}});function qg(){return{localeError:TE()}}var TE,Xg=y(()=>{N();TE=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${i}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${k(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${i}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: diharapkan ${n.origin} memiliki ${i}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${r[i.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}}});function Qg(){return{localeError:AE()}}var AE,ey=y(()=>{N();AE=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(n){return e[n]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},o={nan:"NaN",number:"n\xFAmer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${k(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${i}${n.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} s\xE9 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${i}${n.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${r[i.format]??n.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${b(n.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${n.origin}`;default:return"Rangt gildi"}}}});function ty(){return{localeError:IE()}}var IE,ny=y(()=>{N();IE=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${s}`:`Input non valido: atteso ${i}, ricevuto ${s}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${k(n.values[0])}`:`Opzione non valida: atteso uno tra ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Troppo grande: ${n.origin??"valore"} deve avere ${i}${n.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Troppo piccolo: ${n.origin} deve avere ${i}${n.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${n.origin} deve essere ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Input non valido: ${r[i.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${b(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}}});function ry(){return{localeError:CE()}}var CE,oy=y(()=>{N();CE=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(n){return e[n]??null}let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},o={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${k(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${b(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(n.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${a.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(n.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${a.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[i.format]??n.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${n.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${n.keys.length>1?"\u7FA4":""}: ${b(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}}});function iy(){return{localeError:PE()}}var PE,ay=y(()=>{N();PE=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(n){return e[n]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},o={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${n.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return n.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${k(n.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${b(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${n.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${n.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${b(n.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${n.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${n.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}}});function gi(){return{localeError:OE()}}var OE,gu=y(()=>{N();OE=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(n){return e[n]??null}let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},o={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return n.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${k(n.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${n.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${b(n.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}}});function sy(){return gi()}var cy=y(()=>{gu()});function ly(){return{localeError:NE()}}var NE,uy=y(()=>{N();NE=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(n){return e[n]??null}let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${k(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${b(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(n.origin),c=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${c} ${i}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${i}${a}`}case"too_small":{let i=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(n.origin),c=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${c} ${i}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${i}${a}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[i.format]??n.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${b(n.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}}});function dy(e){let t=Math.abs(e),r=t%10,o=t%100;return o>=11&&o<=19||r===0?"many":r===1?"one":"few"}function py(){return{localeError:RE()}}var Kr,RE,my=y(()=>{N();Kr=e=>e.charAt(0).toUpperCase()+e.slice(1);RE=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(n,i,a,s){let c=e[n]??null;return c===null?c:{unit:c.unit[i],verb:c.verb[s][a?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},o={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${i}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${k(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${b(n.values,"|")} pasirinkim\u0173`;case"too_big":{let i=o[n.origin]??n.origin,a=t(n.origin,dy(Number(n.maximum)),n.inclusive??!1,"smaller");if(a?.verb)return`${Kr(i??n.origin??"reik\u0161m\u0117")} ${a.verb} ${n.maximum.toString()} ${a.unit??"element\u0173"}`;let s=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Kr(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.maximum.toString()} ${a?.unit}`}case"too_small":{let i=o[n.origin]??n.origin,a=t(n.origin,dy(Number(n.minimum)),n.inclusive??!1,"bigger");if(a?.verb)return`${Kr(i??n.origin??"reik\u0161m\u0117")} ${a.verb} ${n.minimum.toString()} ${a.unit??"element\u0173"}`;let s=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Kr(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.minimum.toString()} ${a?.unit}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${r[i.format]??n.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${b(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=o[n.origin]??n.origin;return`${Kr(i??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}}});function hy(){return{localeError:DE()}}var DE,fy=y(()=>{N();DE=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(n){return e[n]??null}let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},o={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${k(n.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${r[i.format]??n.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${b(n.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${n.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}}});function gy(){return{localeError:jE()}}var jE,yy=y(()=>{N();jE=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${s}`:`Input tidak sah: dijangka ${i}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${k(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: dijangka ${n.origin??"nilai"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: dijangka ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${r[i.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${b(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}}});function vy(){return{localeError:LE()}}var LE,by=y(()=>{N();LE=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(n){return e[n]??null}let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},o={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${i}, ontving ${s}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${k(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin),s=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} is`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin),s=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${n.origin} ${i}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${n.origin} ${i}${n.minimum.toString()} is`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${r[i.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}}});function _y(){return{localeError:zE()}}var zE,wy=y(()=>{N();zE=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(n){return e[n]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${s}`:`Ugyldig input: forventet ${i}, fikk ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${k(n.values[0])}`:`Ugyldig valg: forventet en av ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${b(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}}});function ky(){return{localeError:ME()}}var ME,xy=y(()=>{N();ME=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${k(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=n;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[i.format]??n.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}}});function Sy(){return{localeError:UE()}}var UE,$y=y(()=>{N();UE=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(n){return e[n]??null}let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${k(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${b(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[i.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${b(n.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${n.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}}});function Ey(){return{localeError:FE()}}var FE,Ty=y(()=>{N();FE=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(n){return e[n]??null}let r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},o={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${s}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${k(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[i.format]??n.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${n.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}}});function Ay(){return{localeError:GE()}}var GE,Iy=y(()=>{N();GE=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}let r={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",number:"n\xFAmero",null:"nulo"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${s}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${s}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${k(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${i}${n.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Muito pequeno: esperado que ${n.origin} tivesse ${i}${n.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${r[i.format]??n.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${n.origin}`;default:return"Campo inv\xE1lido"}}}});function Cy(){return{localeError:BE()}}var BE,Py=y(()=>{N();BE=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(n){return e[n]??null}let r={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},o={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${s}`}case"invalid_value":return n.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${k(n.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} s\u0103 fie ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Prea mic: a\u0219teptat ca ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${n.origin} s\u0103 fie ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${i.prefix}"`:i.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${i.suffix}"`:i.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${i.includes}"`:i.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${i.pattern}`:`Format invalid: ${r[i.format]??n.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${n.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${b(n.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${n.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${n.origin}`;default:return"Intrare invalid\u0103"}}}});function Oy(e,t,r,o){let n=Math.abs(e),i=n%10,a=n%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?r:o}function Ny(){return{localeError:ZE()}}var ZE,Ry=y(()=>{N();ZE=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${k(n.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=Oy(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.maximum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=Oy(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.minimum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${b(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}}});function Dy(){return{localeError:KE()}}var KE,jy=y(()=>{N();KE=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}let r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},o={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${s}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${k(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${i}${n.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${i}${n.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${r[i.format]??n.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${b(n.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}}});function Ly(){return{localeError:WE()}}var WE,zy=y(()=>{N();WE=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(n){return e[n]??null}let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},o={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${s}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${k(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${r[i.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${b(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}}});function My(){return{localeError:VE()}}var VE,Uy=y(()=>{N();VE=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(n){return e[n]??null}let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return n.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${k(n.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${b(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${b(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}}});function Fy(){return{localeError:HE()}}var HE,Gy=y(()=>{N();HE=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(n){return e[n]??null}let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},o={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${k(n.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(n.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(n.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[i.format]??n.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${n.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${b(n.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}}});function By(){return{localeError:JE()}}var JE,Zy=y(()=>{N();JE=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(n){return e[n]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${k(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[i.format]??n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${b(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}}});function yi(){return{localeError:YE()}}var YE,yu=y(()=>{N();YE=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${k(n.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} \u0431\u0443\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${b(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${n.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}}});function Ky(){return yi()}var Wy=y(()=>{yu()});function Vy(){return{localeError:qE()}}var qE,Hy=y(()=>{N();qE=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(n){return e[n]??null}let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},o={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${k(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${b(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${i}${n.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${i}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${n.keys.length>1?"\u0632":""}: ${b(n.keys,"\u060C ")}`;case"invalid_key":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}}});function Jy(){return{localeError:XE()}}var XE,Yy=y(()=>{N();XE=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(n){return e[n]??null}let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},o={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${s}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${k(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Juda kichik: kutilgan ${n.origin} ${i}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[i.format]??n.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${n.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${n.keys.length>1?"lar":""}: ${b(n.keys,", ")}`;case"invalid_key":return`${n.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${n.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}}});function qy(){return{localeError:QE()}}var QE,Xy=y(()=>{N();QE=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(n){return e[n]??null}let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},o={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${k(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${r[i.format]??n.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${n.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${b(n.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}}});function Qy(){return{localeError:eT()}}var eT,ev=y(()=>{N();eT=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(n){return e[n]??null}let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},o={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${k(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${r[i.format]??n.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${b(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}}});function tv(){return{localeError:tT()}}var tT,nv=y(()=>{N();tT=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(n){return e[n]??null}let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${n.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${k(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${b(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}}});function rv(){return{localeError:nT()}}var nT,ov=y(()=>{N();nT=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(n){return e[n]??null}let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},o={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=x(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${n.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${k(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${a.verb} ${i}${n.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.maximum}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${a.verb} ${i}${n.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.minimum}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${r[i.format]??n.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${n.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${b(n.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}}});var Wr={};We(Wr,{ar:()=>dg,az:()=>mg,be:()=>gg,bg:()=>vg,ca:()=>_g,cs:()=>kg,da:()=>Sg,de:()=>Eg,el:()=>Ag,en:()=>fi,eo:()=>Cg,es:()=>Og,fa:()=>Rg,fi:()=>jg,fr:()=>zg,frCA:()=>Ug,he:()=>Gg,hr:()=>Zg,hu:()=>Wg,hy:()=>Jg,id:()=>qg,is:()=>Qg,it:()=>ty,ja:()=>ry,ka:()=>iy,kh:()=>sy,km:()=>gi,ko:()=>ly,lt:()=>py,mk:()=>hy,ms:()=>gy,nl:()=>vy,no:()=>_y,ota:()=>ky,pl:()=>Ey,ps:()=>Sy,pt:()=>Ay,ro:()=>Cy,ru:()=>Ny,sl:()=>Dy,sv:()=>Ly,ta:()=>My,th:()=>Fy,tr:()=>By,ua:()=>Ky,uk:()=>yi,ur:()=>Vy,uz:()=>Jy,vi:()=>qy,yo:()=>rv,zhCN:()=>Qy,zhTW:()=>tv});var vu=y(()=>{pg();hg();yg();bg();wg();xg();$g();Tg();Ig();fu();Pg();Ng();Dg();Lg();Mg();Fg();Bg();Kg();Vg();Yg();Xg();ey();ny();oy();ay();cy();gu();uy();my();fy();yy();by();wy();xy();$y();Ty();Iy();Py();Ry();jy();zy();Uy();Gy();Zy();Wy();yu();Hy();Yy();Xy();ev();nv();ov()});function bi(){return new vi}var iv,bu,_u,vi,ae,Vr=y(()=>{bu=Symbol("ZodOutput"),_u=Symbol("ZodInput"),vi=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let o=r[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let o={...this.get(r)??{}};delete o.id;let n={...o,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};(iv=globalThis).__zod_globalRegistry??(iv.__zod_globalRegistry=bi());ae=globalThis.__zod_globalRegistry});function wu(e,t){return new e({type:"string",...T(t)})}function ku(e,t){return new e({type:"string",coerce:!0,...T(t)})}function _i(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...T(t)})}function Hr(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...T(t)})}function wi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...T(t)})}function ki(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...T(t)})}function xi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...T(t)})}function Si(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...T(t)})}function Jr(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...T(t)})}function $i(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...T(t)})}function Ei(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...T(t)})}function Ti(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...T(t)})}function Ai(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...T(t)})}function Ii(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...T(t)})}function Ci(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...T(t)})}function Pi(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...T(t)})}function Oi(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...T(t)})}function Ni(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...T(t)})}function xu(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...T(t)})}function Ri(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...T(t)})}function Di(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...T(t)})}function ji(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...T(t)})}function Li(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...T(t)})}function zi(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...T(t)})}function Mi(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...T(t)})}function $u(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...T(t)})}function Eu(e,t){return new e({type:"string",format:"date",check:"string_format",...T(t)})}function Tu(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...T(t)})}function Au(e,t){return new e({type:"string",format:"duration",check:"string_format",...T(t)})}function Iu(e,t){return new e({type:"number",checks:[],...T(t)})}function Cu(e,t){return new e({type:"number",coerce:!0,checks:[],...T(t)})}function Pu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...T(t)})}function Ou(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...T(t)})}function Nu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...T(t)})}function Ru(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...T(t)})}function Du(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...T(t)})}function ju(e,t){return new e({type:"boolean",...T(t)})}function Lu(e,t){return new e({type:"boolean",coerce:!0,...T(t)})}function zu(e,t){return new e({type:"bigint",...T(t)})}function Mu(e,t){return new e({type:"bigint",coerce:!0,...T(t)})}function Uu(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...T(t)})}function Fu(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...T(t)})}function Gu(e,t){return new e({type:"symbol",...T(t)})}function Bu(e,t){return new e({type:"undefined",...T(t)})}function Zu(e,t){return new e({type:"null",...T(t)})}function Ku(e){return new e({type:"any"})}function Wu(e){return new e({type:"unknown"})}function Vu(e,t){return new e({type:"never",...T(t)})}function Hu(e,t){return new e({type:"void",...T(t)})}function Ju(e,t){return new e({type:"date",...T(t)})}function Yu(e,t){return new e({type:"date",coerce:!0,...T(t)})}function qu(e,t){return new e({type:"nan",...T(t)})}function He(e,t){return new ri({check:"less_than",...T(t),value:e,inclusive:!1})}function Pe(e,t){return new ri({check:"less_than",...T(t),value:e,inclusive:!0})}function Je(e,t){return new oi({check:"greater_than",...T(t),value:e,inclusive:!1})}function be(e,t){return new oi({check:"greater_than",...T(t),value:e,inclusive:!0})}function Ui(e){return Je(0,e)}function Fi(e){return He(0,e)}function Gi(e){return Pe(0,e)}function Bi(e){return be(0,e)}function St(e,t){return new Lc({check:"multiple_of",...T(t),value:e})}function $t(e,t){return new Uc({check:"max_size",...T(t),maximum:e})}function Ye(e,t){return new Fc({check:"min_size",...T(t),minimum:e})}function Xt(e,t){return new Gc({check:"size_equals",...T(t),size:e})}function Qt(e,t){return new Bc({check:"max_length",...T(t),maximum:e})}function ct(e,t){return new Zc({check:"min_length",...T(t),minimum:e})}function en(e,t){return new Kc({check:"length_equals",...T(t),length:e})}function On(e,t){return new Wc({check:"string_format",format:"regex",...T(t),pattern:e})}function Nn(e){return new Vc({check:"string_format",format:"lowercase",...T(e)})}function Rn(e){return new Hc({check:"string_format",format:"uppercase",...T(e)})}function Dn(e,t){return new Jc({check:"string_format",format:"includes",...T(t),includes:e})}function jn(e,t){return new Yc({check:"string_format",format:"starts_with",...T(t),prefix:e})}function Ln(e,t){return new qc({check:"string_format",format:"ends_with",...T(t),suffix:e})}function Zi(e,t,r){return new Xc({check:"property",property:e,schema:t,...T(r)})}function zn(e,t){return new Qc({check:"mime_type",mime:e,...T(t)})}function Fe(e){return new el({check:"overwrite",tx:e})}function Mn(e){return Fe(t=>t.normalize(e))}function Un(){return Fe(e=>e.trim())}function Fn(){return Fe(e=>e.toLowerCase())}function Gn(){return Fe(e=>e.toUpperCase())}function Bn(){return Fe(e=>Hs(e))}function Xu(e,t,r){return new e({type:"array",element:t,...T(r)})}function oT(e,t,r){return new e({type:"union",options:t,...T(r)})}function iT(e,t,r){return new e({type:"union",options:t,inclusive:!1,...T(r)})}function aT(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...T(o)})}function sT(e,t,r){return new e({type:"intersection",left:t,right:r})}function cT(e,t,r,o){let n=r instanceof M,i=n?o:r,a=n?r:null;return new e({type:"tuple",items:t,rest:a,...T(i)})}function lT(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...T(o)})}function uT(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...T(o)})}function dT(e,t,r){return new e({type:"set",valueType:t,...T(r)})}function pT(e,t,r){let o=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:o,...T(r)})}function mT(e,t,r){return new e({type:"enum",entries:t,...T(r)})}function hT(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...T(r)})}function Qu(e,t){return new e({type:"file",...T(t)})}function fT(e,t){return new e({type:"transform",transform:t})}function gT(e,t){return new e({type:"optional",innerType:t})}function yT(e,t){return new e({type:"nullable",innerType:t})}function vT(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Ys(r)}})}function bT(e,t,r){return new e({type:"nonoptional",innerType:t,...T(r)})}function _T(e,t){return new e({type:"success",innerType:t})}function wT(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function kT(e,t,r){return new e({type:"pipe",in:t,out:r})}function xT(e,t){return new e({type:"readonly",innerType:t})}function ST(e,t,r){return new e({type:"template_literal",parts:t,...T(r)})}function $T(e,t){return new e({type:"lazy",getter:t})}function ET(e,t){return new e({type:"promise",innerType:t})}function ed(e,t,r){let o=T(r);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function td(e,t,r){return new e({type:"custom",check:"custom",fn:t,...T(r)})}function nd(e,t){let r=av(o=>(o.addIssue=n=>{if(typeof n=="string")o.issues.push($n(n,o.value,r._zod.def));else{let i=n;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),o.issues.push($n(i))}},e(o.value,o)),t);return r}function av(e,t){let r=new J({check:"custom",...T(t)});return r._zod.check=e,r}function rd(e){let t=new J({check:"describe"});return t._zod.onattach=[r=>{let o=ae.get(r)??{};ae.add(r,{...o,description:e})}],t._zod.check=()=>{},t}function od(e){let t=new J({check:"meta"});return t._zod.onattach=[r=>{let o=ae.get(r)??{};ae.add(r,{...o,...e})}],t._zod.check=()=>{},t}function id(e,t){let r=T(t),o=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(o=o.map(h=>typeof h=="string"?h.toLowerCase():h),n=n.map(h=>typeof h=="string"?h.toLowerCase():h));let i=new Set(o),a=new Set(n),s=e.Codec??Zr,c=e.Boolean??Gr,l=e.String??qt,p=new l({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),m=new s({type:"pipe",in:p,out:d,transform:((h,f)=>{let w=h;return r.case!=="sensitive"&&(w=w.toLowerCase()),i.has(w)?!0:a.has(w)?!1:(f.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:f.value,inst:m,continue:!1}),{})}),reverseTransform:((h,f)=>h===!0?o[0]||"true":n[0]||"false"),error:r.error});return m}function Zn(e,t,r,o={}){let n=T(o),i={...T(o),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:s=>r.test(s),...n};return r instanceof RegExp&&(i.pattern=r),new e(i)}var Su,sv=y(()=>{ii();Vr();hu();N();Su={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function Et(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ae,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function W(e,t,r={path:[],schemaPath:[]}){var o;let n=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let p={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,p);else{let m=a.schema,h=t.processors[n.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);h(e,t,m,p)}let d=e._zod.parent;d&&(a.ref||(a.ref=d),W(d,t,p),t.seen.get(d).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(a.schema,c),t.io==="input"&&_e(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function Tt(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let c=o.get(s);if(c&&c!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(s,a[0])}}let n=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let d=e.external.registry.get(a[0])?.id,m=e.external.uri??(f=>f);if(d)return{ref:m(d)};let h=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=h,{defId:h,ref:`${m("__shared")}#/${s}/${h}`}}if(a[1]===r)return{ref:"#"};let l=`#/${s}/`,p=a[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:l+p}},i=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:c,defId:l}=n(a);s.def={...s.schema},l&&(s.defId=l);let p=s.schema;for(let d in p)delete p[d];p.$ref=c};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
7787
-
7788
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){i(a);continue}if(e.external){let l=e.external.registry.get(a[0])?.id;if(t!==a[0]&&l){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}if(s.count>1&&e.reused==="ref"){i(a);continue}}}function At(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=s=>{let c=e.seen.get(s);if(c.ref===null)return;let l=c.def??c.schema,p={...l},d=c.ref;if(c.ref=null,d){o(d);let h=e.seen.get(d),f=h.schema;if(f.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(f)):Object.assign(l,f),Object.assign(l,p),s._zod.parent===d)for(let _ in l)_==="$ref"||_==="allOf"||_ in p||delete l[_];if(f.$ref&&h.def)for(let _ in l)_==="$ref"||_==="allOf"||_ in h.def&&JSON.stringify(l[_])===JSON.stringify(h.def[_])&&delete l[_]}let m=s._zod.parent;if(m&&m!==d){o(m);let h=e.seen.get(m);if(h?.schema.$ref&&(l.$ref=h.schema.$ref,h.def))for(let f in l)f==="$ref"||f==="allOf"||f in h.def&&JSON.stringify(l[f])===JSON.stringify(h.def[f])&&delete l[f]}e.override({zodSchema:s,jsonSchema:l,path:c.path??[]})};for(let s of[...e.seen.entries()].reverse())o(s[0]);let n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(s)}Object.assign(n,r.def??r.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&n.id===i&&delete n.id;let a=e.external?.defs??{};for(let s of e.seen.entries()){let c=s[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,a[c.defId]=c.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?n.$defs=a:n.definitions=a);try{let s=JSON.parse(JSON.stringify(n));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Kn(t,"input",e.processors),output:Kn(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function _e(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return _e(o.element,r);if(o.type==="set")return _e(o.valueType,r);if(o.type==="lazy")return _e(o.getter(),r);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return _e(o.innerType,r);if(o.type==="intersection")return _e(o.left,r)||_e(o.right,r);if(o.type==="record"||o.type==="map")return _e(o.keyType,r)||_e(o.valueType,r);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:_e(o.in,r)||_e(o.out,r);if(o.type==="object"){for(let n in o.shape)if(_e(o.shape[n],r))return!0;return!1}if(o.type==="union"){for(let n of o.options)if(_e(n,r))return!0;return!1}if(o.type==="tuple"){for(let n of o.items)if(_e(n,r))return!0;return!!(o.rest&&_e(o.rest,r))}return!1}var ad,Kn,Yr=y(()=>{Vr();ad=(e,t={})=>r=>{let o=Et({...r,processors:t});return W(e,o),Tt(o,e),At(o,e)},Kn=(e,t,r={})=>o=>{let{libraryOptions:n,target:i}=o??{},a=Et({...n??{},target:i,io:t,processors:r});return W(e,a),Tt(a,e),At(a,e)}});function Hi(e,t){if("_idmap"in e){let o=e,n=Et({...t,processors:Ki}),i={};for(let c of o._idmap.entries()){let[l,p]=c;W(p,n)}let a={},s={registry:o,uri:t?.uri,defs:i};n.external=s;for(let c of o._idmap.entries()){let[l,p]=c;Tt(n,p),a[l]=At(n,p)}if(Object.keys(i).length>0){let c=n.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:i}}return{schemas:a}}let r=Et({...t,processors:Ki});return W(e,r),Tt(r,e),At(r,e)}var TT,sd,cd,ld,ud,dd,pd,md,hd,fd,gd,yd,vd,bd,_d,wd,kd,xd,Sd,$d,Ed,Td,Ad,Id,Cd,Pd,Wi,Od,Nd,Rd,Dd,jd,Ld,zd,Md,Ud,Fd,Gd,Vi,Bd,Ki,qr=y(()=>{Yr();N();TT={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},sd=(e,t,r,o)=>{let n=r;n.type="string";let{minimum:i,maximum:a,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof i=="number"&&(n.minLength=i),typeof a=="number"&&(n.maxLength=a),s&&(n.format=TT[s]??s,n.format===""&&delete n.format,s==="time"&&delete n.format),l&&(n.contentEncoding=l),c&&c.size>0){let p=[...c];p.length===1?n.pattern=p[0].source:p.length>1&&(n.allOf=[...p.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},cd=(e,t,r,o)=>{let n=r,{minimum:i,maximum:a,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:p}=e._zod.bag;typeof s=="string"&&s.includes("int")?n.type="integer":n.type="number";let d=typeof p=="number"&&p>=(i??Number.NEGATIVE_INFINITY),m=typeof l=="number"&&l<=(a??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";d?h?(n.minimum=p,n.exclusiveMinimum=!0):n.exclusiveMinimum=p:typeof i=="number"&&(n.minimum=i),m?h?(n.maximum=l,n.exclusiveMaximum=!0):n.exclusiveMaximum=l:typeof a=="number"&&(n.maximum=a),typeof c=="number"&&(n.multipleOf=c)},ld=(e,t,r,o)=>{r.type="boolean"},ud=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},dd=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},pd=(e,t,r,o)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},md=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},hd=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},fd=(e,t,r,o)=>{r.not={}},gd=(e,t,r,o)=>{},yd=(e,t,r,o)=>{},vd=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},bd=(e,t,r,o)=>{let n=e._zod.def,i=Pr(n.entries);i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),r.enum=i},_d=(e,t,r,o)=>{let n=e._zod.def,i=[];for(let a of n.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){let a=i[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),i.every(a=>typeof a=="boolean")&&(r.type="boolean"),i.every(a=>a===null)&&(r.type="null"),r.enum=i},wd=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},kd=(e,t,r,o)=>{let n=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=i.source},xd=(e,t,r,o)=>{let n=r,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:c}=e._zod.bag;a!==void 0&&(i.minLength=a),s!==void 0&&(i.maxLength=s),c?c.length===1?(i.contentMediaType=c[0],Object.assign(n,i)):(Object.assign(n,i),n.anyOf=c.map(l=>({contentMediaType:l}))):Object.assign(n,i)},Sd=(e,t,r,o)=>{r.type="boolean"},$d=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Ed=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Td=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Ad=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Id=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Cd=(e,t,r,o)=>{let n=r,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(n.minItems=a),typeof s=="number"&&(n.maxItems=s),n.type="array",n.items=W(i.element,t,{...o,path:[...o.path,"items"]})},Pd=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object",n.properties={};let a=i.shape;for(let l in a)n.properties[l]=W(a[l],t,{...o,path:[...o.path,"properties",l]});let s=new Set(Object.keys(a)),c=new Set([...s].filter(l=>{let p=i.shape[l]._zod;return t.io==="input"?p.optin===void 0:p.optout===void 0}));c.size>0&&(n.required=Array.from(c)),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=W(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},Wi=(e,t,r,o)=>{let n=e._zod.def,i=n.inclusive===!1,a=n.options.map((s,c)=>W(s,t,{...o,path:[...o.path,i?"oneOf":"anyOf",c]}));i?r.oneOf=a:r.anyOf=a},Od=(e,t,r,o)=>{let n=e._zod.def,i=W(n.left,t,{...o,path:[...o.path,"allOf",0]}),a=W(n.right,t,{...o,path:[...o.path,"allOf",1]}),s=l=>"allOf"in l&&Object.keys(l).length===1,c=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];r.allOf=c},Nd=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((m,h)=>W(m,t,{...o,path:[...o.path,a,h]})),l=i.rest?W(i.rest,t,{...o,path:[...o.path,s,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=c,l&&(n.items=l)):t.target==="openapi-3.0"?(n.items={anyOf:c},l&&n.items.anyOf.push(l),n.minItems=c.length,l||(n.maxItems=c.length)):(n.items=c,l&&(n.additionalItems=l));let{minimum:p,maximum:d}=e._zod.bag;typeof p=="number"&&(n.minItems=p),typeof d=="number"&&(n.maxItems=d)},Rd=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object";let a=i.keyType,c=a._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){let p=W(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});n.patternProperties={};for(let d of c)n.patternProperties[d.source]=p}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=W(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),n.additionalProperties=W(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let l=a._zod.values;if(l){let p=[...l].filter(d=>typeof d=="string"||typeof d=="number");p.length>0&&(n.required=p)}},Dd=(e,t,r,o)=>{let n=e._zod.def,i=W(n.innerType,t,o),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=n.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},jd=(e,t,r,o)=>{let n=e._zod.def;W(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},Ld=(e,t,r,o)=>{let n=e._zod.def;W(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},zd=(e,t,r,o)=>{let n=e._zod.def;W(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},Md=(e,t,r,o)=>{let n=e._zod.def;W(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType;let a;try{a=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},Ud=(e,t,r,o)=>{let n=e._zod.def,i=n.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?i?n.out:n.in:n.out;W(a,t,o);let s=t.seen.get(e);s.ref=a},Fd=(e,t,r,o)=>{let n=e._zod.def;W(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.readOnly=!0},Gd=(e,t,r,o)=>{let n=e._zod.def;W(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},Vi=(e,t,r,o)=>{let n=e._zod.def;W(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},Bd=(e,t,r,o)=>{let n=e._zod.innerType;W(n,t,o);let i=t.seen.get(e);i.ref=n},Ki={string:sd,number:cd,boolean:ld,bigint:ud,symbol:dd,null:pd,undefined:md,void:hd,never:fd,any:gd,unknown:yd,date:vd,enum:bd,literal:_d,nan:wd,template_literal:kd,file:xd,success:Sd,custom:$d,function:Ed,transform:Td,map:Ad,set:Id,array:Cd,object:Pd,union:Wi,intersection:Od,tuple:Nd,record:Rd,nullable:Dd,nonoptional:jd,default:Ld,prefault:zd,catch:Md,pipe:Ud,readonly:Fd,promise:Gd,optional:Vi,lazy:Bd}});var Ji,cv=y(()=>{qr();Yr();Ji=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=Et({processors:Ki,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return W(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),Tt(this.ctx,t);let o=At(this.ctx,t),{"~standard":n,...i}=o;return i}}});var lv={};var uv=y(()=>{});var lt={};We(lt,{$ZodAny:()=>jl,$ZodArray:()=>Fl,$ZodAsyncError:()=>Ue,$ZodBase64:()=>El,$ZodBase64URL:()=>Tl,$ZodBigInt:()=>di,$ZodBigIntFormat:()=>Ol,$ZodBoolean:()=>Gr,$ZodCIDRv4:()=>xl,$ZodCIDRv6:()=>Sl,$ZodCUID:()=>dl,$ZodCUID2:()=>pl,$ZodCatch:()=>iu,$ZodCheck:()=>J,$ZodCheckBigIntFormat:()=>Mc,$ZodCheckEndsWith:()=>qc,$ZodCheckGreaterThan:()=>oi,$ZodCheckIncludes:()=>Jc,$ZodCheckLengthEquals:()=>Kc,$ZodCheckLessThan:()=>ri,$ZodCheckLowerCase:()=>Vc,$ZodCheckMaxLength:()=>Bc,$ZodCheckMaxSize:()=>Uc,$ZodCheckMimeType:()=>Qc,$ZodCheckMinLength:()=>Zc,$ZodCheckMinSize:()=>Fc,$ZodCheckMultipleOf:()=>Lc,$ZodCheckNumberFormat:()=>zc,$ZodCheckOverwrite:()=>el,$ZodCheckProperty:()=>Xc,$ZodCheckRegex:()=>Wc,$ZodCheckSizeEquals:()=>Gc,$ZodCheckStartsWith:()=>Yc,$ZodCheckStringFormat:()=>Cn,$ZodCheckUpperCase:()=>Hc,$ZodCodec:()=>Zr,$ZodCustom:()=>mu,$ZodCustomStringFormat:()=>Cl,$ZodDate:()=>Ul,$ZodDefault:()=>tu,$ZodDiscriminatedUnion:()=>Zl,$ZodE164:()=>Al,$ZodEmail:()=>sl,$ZodEmoji:()=>ll,$ZodEncodeError:()=>bt,$ZodEnum:()=>Jl,$ZodError:()=>jr,$ZodExactOptional:()=>Ql,$ZodFile:()=>ql,$ZodFunction:()=>uu,$ZodGUID:()=>il,$ZodIPv4:()=>_l,$ZodIPv6:()=>wl,$ZodISODate:()=>yl,$ZodISODateTime:()=>gl,$ZodISODuration:()=>bl,$ZodISOTime:()=>vl,$ZodIntersection:()=>Kl,$ZodJWT:()=>Il,$ZodKSUID:()=>fl,$ZodLazy:()=>pu,$ZodLiteral:()=>Yl,$ZodMAC:()=>kl,$ZodMap:()=>Vl,$ZodNaN:()=>au,$ZodNanoID:()=>ul,$ZodNever:()=>zl,$ZodNonOptional:()=>ru,$ZodNull:()=>Dl,$ZodNullable:()=>eu,$ZodNumber:()=>ui,$ZodNumberFormat:()=>Pl,$ZodObject:()=>ug,$ZodObjectJIT:()=>Gl,$ZodOptional:()=>mi,$ZodPipe:()=>hi,$ZodPrefault:()=>nu,$ZodPreprocess:()=>su,$ZodPromise:()=>du,$ZodReadonly:()=>cu,$ZodRealError:()=>$e,$ZodRecord:()=>Wl,$ZodRegistry:()=>vi,$ZodSet:()=>Hl,$ZodString:()=>qt,$ZodStringFormat:()=>V,$ZodSuccess:()=>ou,$ZodSymbol:()=>Nl,$ZodTemplateLiteral:()=>lu,$ZodTransform:()=>Xl,$ZodTuple:()=>pi,$ZodType:()=>M,$ZodULID:()=>ml,$ZodURL:()=>cl,$ZodUUID:()=>al,$ZodUndefined:()=>Rl,$ZodUnion:()=>Br,$ZodUnknown:()=>Ll,$ZodVoid:()=>Ml,$ZodXID:()=>hl,$ZodXor:()=>Bl,$brand:()=>Zs,$constructor:()=>g,$input:()=>_u,$output:()=>bu,Doc:()=>Fr,JSONSchema:()=>lv,JSONSchemaGenerator:()=>Ji,NEVER:()=>Bs,TimePrecision:()=>Su,_any:()=>Ku,_array:()=>Xu,_base64:()=>ji,_base64url:()=>Li,_bigint:()=>zu,_boolean:()=>ju,_catch:()=>wT,_check:()=>av,_cidrv4:()=>Ri,_cidrv6:()=>Di,_coercedBigint:()=>Mu,_coercedBoolean:()=>Lu,_coercedDate:()=>Yu,_coercedNumber:()=>Cu,_coercedString:()=>ku,_cuid:()=>Ti,_cuid2:()=>Ai,_custom:()=>ed,_date:()=>Ju,_decode:()=>Vo,_decodeAsync:()=>Jo,_default:()=>vT,_discriminatedUnion:()=>aT,_e164:()=>zi,_email:()=>_i,_emoji:()=>$i,_encode:()=>Wo,_encodeAsync:()=>Ho,_endsWith:()=>Ln,_enum:()=>pT,_file:()=>Qu,_float32:()=>Ou,_float64:()=>Nu,_gt:()=>Je,_gte:()=>be,_guid:()=>Hr,_includes:()=>Dn,_int:()=>Pu,_int32:()=>Ru,_int64:()=>Uu,_intersection:()=>sT,_ipv4:()=>Oi,_ipv6:()=>Ni,_isoDate:()=>Eu,_isoDateTime:()=>$u,_isoDuration:()=>Au,_isoTime:()=>Tu,_jwt:()=>Mi,_ksuid:()=>Pi,_lazy:()=>$T,_length:()=>en,_literal:()=>hT,_lowercase:()=>Nn,_lt:()=>He,_lte:()=>Pe,_mac:()=>xu,_map:()=>uT,_max:()=>Pe,_maxLength:()=>Qt,_maxSize:()=>$t,_mime:()=>zn,_min:()=>be,_minLength:()=>ct,_minSize:()=>Ye,_multipleOf:()=>St,_nan:()=>qu,_nanoid:()=>Ei,_nativeEnum:()=>mT,_negative:()=>Fi,_never:()=>Vu,_nonnegative:()=>Bi,_nonoptional:()=>bT,_nonpositive:()=>Gi,_normalize:()=>Mn,_null:()=>Zu,_nullable:()=>yT,_number:()=>Iu,_optional:()=>gT,_overwrite:()=>Fe,_parse:()=>En,_parseAsync:()=>Tn,_pipe:()=>kT,_positive:()=>Ui,_promise:()=>ET,_property:()=>Zi,_readonly:()=>xT,_record:()=>lT,_refine:()=>td,_regex:()=>On,_safeDecode:()=>qo,_safeDecodeAsync:()=>Qo,_safeEncode:()=>Yo,_safeEncodeAsync:()=>Xo,_safeParse:()=>An,_safeParseAsync:()=>In,_set:()=>dT,_size:()=>Xt,_slugify:()=>Bn,_startsWith:()=>jn,_string:()=>wu,_stringFormat:()=>Zn,_stringbool:()=>id,_success:()=>_T,_superRefine:()=>nd,_symbol:()=>Gu,_templateLiteral:()=>ST,_toLowerCase:()=>Fn,_toUpperCase:()=>Gn,_transform:()=>fT,_trim:()=>Un,_tuple:()=>cT,_uint32:()=>Du,_uint64:()=>Fu,_ulid:()=>Ii,_undefined:()=>Bu,_union:()=>oT,_unknown:()=>Wu,_uppercase:()=>Rn,_url:()=>Jr,_uuid:()=>wi,_uuidv4:()=>ki,_uuidv6:()=>xi,_uuidv7:()=>Si,_void:()=>Hu,_xid:()=>Ci,_xor:()=>iT,clone:()=>ye,config:()=>Q,createStandardJSONSchemaMethod:()=>Kn,createToJSONSchemaMethod:()=>ad,decode:()=>E$,decodeAsync:()=>A$,describe:()=>rd,encode:()=>$$,encodeAsync:()=>T$,extractDefs:()=>Tt,finalize:()=>At,flattenError:()=>Lr,formatError:()=>zr,globalConfig:()=>Vt,globalRegistry:()=>ae,initializeContext:()=>Et,isValidBase64:()=>$l,isValidBase64URL:()=>ag,isValidJWT:()=>sg,locales:()=>Wr,meta:()=>od,parse:()=>Zo,parseAsync:()=>Ko,prettifyError:()=>rc,process:()=>W,regexes:()=>Ce,registry:()=>bi,safeDecode:()=>C$,safeDecodeAsync:()=>O$,safeEncode:()=>I$,safeEncodeAsync:()=>P$,safeParse:()=>ic,safeParseAsync:()=>ac,toDotPath:()=>Mf,toJSONSchema:()=>Hi,treeifyError:()=>nc,util:()=>$,version:()=>nl});var Oe=y(()=>{Ht();sc();oc();hu();ii();rl();N();ni();vu();Vr();tl();sv();Yr();qr();cv();uv()});var Yi={};We(Yi,{endsWith:()=>Ln,gt:()=>Je,gte:()=>be,includes:()=>Dn,length:()=>en,lowercase:()=>Nn,lt:()=>He,lte:()=>Pe,maxLength:()=>Qt,maxSize:()=>$t,mime:()=>zn,minLength:()=>ct,minSize:()=>Ye,multipleOf:()=>St,negative:()=>Fi,nonnegative:()=>Bi,nonpositive:()=>Gi,normalize:()=>Mn,overwrite:()=>Fe,positive:()=>Ui,property:()=>Zi,regex:()=>On,size:()=>Xt,slugify:()=>Bn,startsWith:()=>jn,toLowerCase:()=>Fn,toUpperCase:()=>Gn,trim:()=>Un,uppercase:()=>Rn});var qi=y(()=>{Oe()});var Wn={};We(Wn,{ZodISODate:()=>Qi,ZodISODateTime:()=>Xi,ZodISODuration:()=>ta,ZodISOTime:()=>ea,date:()=>Kd,datetime:()=>Zd,duration:()=>Vd,time:()=>Wd});function Zd(e){return $u(Xi,e)}function Kd(e){return Eu(Qi,e)}function Wd(e){return Tu(ea,e)}function Vd(e){return Au(ta,e)}var Xi,Qi,ea,ta,Xr=y(()=>{Oe();eo();Xi=g("ZodISODateTime",(e,t)=>{gl.init(e,t),H.init(e,t)});Qi=g("ZodISODate",(e,t)=>{yl.init(e,t),H.init(e,t)});ea=g("ZodISOTime",(e,t)=>{vl.init(e,t),H.init(e,t)});ta=g("ZodISODuration",(e,t)=>{bl.init(e,t),H.init(e,t)})});var dv,IT,Ee,Hd=y(()=>{Oe();Oe();N();dv=(e,t)=>{jr.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>zr(e,r)},flatten:{value:r=>Lr(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,xn,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,xn,2)}},isEmpty:{get(){return e.issues.length===0}}})},IT=g("ZodError",dv),Ee=g("ZodError",dv,{Parent:Error})});var Jd,Yd,qd,Xd,Qd,ep,tp,np,rp,op,ip,ap,sp=y(()=>{Oe();Hd();Jd=En(Ee),Yd=Tn(Ee),qd=An(Ee),Xd=In(Ee),Qd=Wo(Ee),ep=Vo(Ee),tp=Ho(Ee),np=Jo(Ee),rp=Yo(Ee),op=qo(Ee),ip=Xo(Ee),ap=Qo(Ee)});var Qr={};We(Qr,{ZodAny:()=>fp,ZodArray:()=>bp,ZodBase64:()=>ya,ZodBase64URL:()=>va,ZodBigInt:()=>Qn,ZodBigIntFormat:()=>wa,ZodBoolean:()=>Xn,ZodCIDRv4:()=>fa,ZodCIDRv6:()=>ga,ZodCUID:()=>ca,ZodCUID2:()=>la,ZodCatch:()=>Fp,ZodCodec:()=>mo,ZodCustom:()=>ho,ZodCustomStringFormat:()=>Yn,ZodDate:()=>so,ZodDefault:()=>Dp,ZodDiscriminatedUnion:()=>wp,ZodE164:()=>ba,ZodEmail:()=>ia,ZodEmoji:()=>aa,ZodEnum:()=>Hn,ZodExactOptional:()=>Op,ZodFile:()=>Cp,ZodFunction:()=>qp,ZodGUID:()=>no,ZodIPv4:()=>ma,ZodIPv6:()=>ha,ZodIntersection:()=>kp,ZodJWT:()=>_a,ZodKSUID:()=>pa,ZodLazy:()=>Hp,ZodLiteral:()=>Ip,ZodMAC:()=>cp,ZodMap:()=>Tp,ZodNaN:()=>Bp,ZodNanoID:()=>sa,ZodNever:()=>yp,ZodNonOptional:()=>Ta,ZodNull:()=>mp,ZodNullable:()=>Rp,ZodNumber:()=>qn,ZodNumberFormat:()=>nn,ZodObject:()=>lo,ZodOptional:()=>Ea,ZodPipe:()=>po,ZodPrefault:()=>Lp,ZodPreprocess:()=>Zp,ZodPromise:()=>Yp,ZodReadonly:()=>Kp,ZodRecord:()=>Vn,ZodSet:()=>Ap,ZodString:()=>Jn,ZodStringFormat:()=>H,ZodSuccess:()=>Up,ZodSymbol:()=>dp,ZodTemplateLiteral:()=>Vp,ZodTransform:()=>Pp,ZodTuple:()=>Sp,ZodType:()=>F,ZodULID:()=>ua,ZodURL:()=>ao,ZodUUID:()=>qe,ZodUndefined:()=>pp,ZodUnion:()=>uo,ZodUnknown:()=>gp,ZodVoid:()=>vp,ZodXID:()=>da,ZodXor:()=>_p,_ZodString:()=>oa,_default:()=>jp,_function:()=>bb,any:()=>Yv,array:()=>co,base64:()=>Nv,base64url:()=>Rv,bigint:()=>Kv,boolean:()=>up,catch:()=>Gp,check:()=>_b,cidrv4:()=>Pv,cidrv6:()=>Ov,codec:()=>fb,cuid:()=>xv,cuid2:()=>Sv,custom:()=>wb,date:()=>Xv,describe:()=>kb,discriminatedUnion:()=>ob,e164:()=>Dv,email:()=>mv,emoji:()=>wv,enum:()=>Sa,exactOptional:()=>Np,file:()=>db,float32:()=>Fv,float64:()=>Gv,function:()=>bb,guid:()=>hv,hash:()=>Uv,hex:()=>Mv,hostname:()=>zv,httpUrl:()=>_v,instanceof:()=>Sb,int:()=>na,int32:()=>Bv,int64:()=>Wv,intersection:()=>xp,invertCodec:()=>gb,ipv4:()=>Av,ipv6:()=>Cv,json:()=>Eb,jwt:()=>jv,keyof:()=>Qv,ksuid:()=>Tv,lazy:()=>Jp,literal:()=>ub,looseObject:()=>nb,looseRecord:()=>ab,mac:()=>Iv,map:()=>sb,meta:()=>xb,nan:()=>hb,nanoid:()=>kv,nativeEnum:()=>lb,never:()=>ka,nonoptional:()=>Mp,null:()=>hp,nullable:()=>oo,nullish:()=>pb,number:()=>lp,object:()=>eb,optional:()=>ro,partialRecord:()=>ib,pipe:()=>ra,prefault:()=>zp,preprocess:()=>Tb,promise:()=>vb,readonly:()=>Wp,record:()=>Ep,refine:()=>Xp,set:()=>cb,strictObject:()=>tb,string:()=>to,stringFormat:()=>Lv,stringbool:()=>$b,success:()=>mb,superRefine:()=>Qp,symbol:()=>Hv,templateLiteral:()=>yb,transform:()=>$a,tuple:()=>$p,uint32:()=>Zv,uint64:()=>Vv,ulid:()=>$v,undefined:()=>Jv,union:()=>xa,unknown:()=>tn,url:()=>bv,uuid:()=>fv,uuidv4:()=>gv,uuidv6:()=>yv,uuidv7:()=>vv,void:()=>qv,xid:()=>Ev,xor:()=>rb});function io(e,t,r){let o=Object.getPrototypeOf(e),n=pv.get(o);if(n||(n=new Set,pv.set(o,n)),!n.has(t)){n.add(t);for(let i in r){let a=r[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){let s=a.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}}function to(e){return wu(Jn,e)}function mv(e){return _i(ia,e)}function hv(e){return Hr(no,e)}function fv(e){return wi(qe,e)}function gv(e){return ki(qe,e)}function yv(e){return xi(qe,e)}function vv(e){return Si(qe,e)}function bv(e){return Jr(ao,e)}function _v(e){return Jr(ao,{protocol:Ce.httpProtocol,hostname:Ce.domain,...$.normalizeParams(e)})}function wv(e){return $i(aa,e)}function kv(e){return Ei(sa,e)}function xv(e){return Ti(ca,e)}function Sv(e){return Ai(la,e)}function $v(e){return Ii(ua,e)}function Ev(e){return Ci(da,e)}function Tv(e){return Pi(pa,e)}function Av(e){return Oi(ma,e)}function Iv(e){return xu(cp,e)}function Cv(e){return Ni(ha,e)}function Pv(e){return Ri(fa,e)}function Ov(e){return Di(ga,e)}function Nv(e){return ji(ya,e)}function Rv(e){return Li(va,e)}function Dv(e){return zi(ba,e)}function jv(e){return Mi(_a,e)}function Lv(e,t,r={}){return Zn(Yn,e,t,r)}function zv(e){return Zn(Yn,"hostname",Ce.hostname,e)}function Mv(e){return Zn(Yn,"hex",Ce.hex,e)}function Uv(e,t){let r=t?.enc??"hex",o=`${e}_${r}`,n=Ce[o];if(!n)throw new Error(`Unrecognized hash format: ${o}`);return Zn(Yn,o,n,t)}function lp(e){return Iu(qn,e)}function na(e){return Pu(nn,e)}function Fv(e){return Ou(nn,e)}function Gv(e){return Nu(nn,e)}function Bv(e){return Ru(nn,e)}function Zv(e){return Du(nn,e)}function up(e){return ju(Xn,e)}function Kv(e){return zu(Qn,e)}function Wv(e){return Uu(wa,e)}function Vv(e){return Fu(wa,e)}function Hv(e){return Gu(dp,e)}function Jv(e){return Bu(pp,e)}function hp(e){return Zu(mp,e)}function Yv(){return Ku(fp)}function tn(){return Wu(gp)}function ka(e){return Vu(yp,e)}function qv(e){return Hu(vp,e)}function Xv(e){return Ju(so,e)}function co(e,t){return Xu(bp,e,t)}function Qv(e){let t=e._zod.def.shape;return Sa(Object.keys(t))}function eb(e,t){let r={type:"object",shape:e??{},...$.normalizeParams(t)};return new lo(r)}function tb(e,t){return new lo({type:"object",shape:e,catchall:ka(),...$.normalizeParams(t)})}function nb(e,t){return new lo({type:"object",shape:e,catchall:tn(),...$.normalizeParams(t)})}function xa(e,t){return new uo({type:"union",options:e,...$.normalizeParams(t)})}function rb(e,t){return new _p({type:"union",options:e,inclusive:!1,...$.normalizeParams(t)})}function ob(e,t,r){return new wp({type:"union",options:t,discriminator:e,...$.normalizeParams(r)})}function xp(e,t){return new kp({type:"intersection",left:e,right:t})}function $p(e,t,r){let o=t instanceof M,n=o?r:t,i=o?t:null;return new Sp({type:"tuple",items:e,rest:i,...$.normalizeParams(n)})}function Ep(e,t,r){return!t||!t._zod?new Vn({type:"record",keyType:to(),valueType:e,...$.normalizeParams(t)}):new Vn({type:"record",keyType:e,valueType:t,...$.normalizeParams(r)})}function ib(e,t,r){let o=ye(e);return o._zod.values=void 0,new Vn({type:"record",keyType:o,valueType:t,...$.normalizeParams(r)})}function ab(e,t,r){return new Vn({type:"record",keyType:e,valueType:t,mode:"loose",...$.normalizeParams(r)})}function sb(e,t,r){return new Tp({type:"map",keyType:e,valueType:t,...$.normalizeParams(r)})}function cb(e,t){return new Ap({type:"set",valueType:e,...$.normalizeParams(t)})}function Sa(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Hn({type:"enum",entries:r,...$.normalizeParams(t)})}function lb(e,t){return new Hn({type:"enum",entries:e,...$.normalizeParams(t)})}function ub(e,t){return new Ip({type:"literal",values:Array.isArray(e)?e:[e],...$.normalizeParams(t)})}function db(e){return Qu(Cp,e)}function $a(e){return new Pp({type:"transform",transform:e})}function ro(e){return new Ea({type:"optional",innerType:e})}function Np(e){return new Op({type:"optional",innerType:e})}function oo(e){return new Rp({type:"nullable",innerType:e})}function pb(e){return ro(oo(e))}function jp(e,t){return new Dp({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():$.shallowClone(t)}})}function zp(e,t){return new Lp({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():$.shallowClone(t)}})}function Mp(e,t){return new Ta({type:"nonoptional",innerType:e,...$.normalizeParams(t)})}function mb(e){return new Up({type:"success",innerType:e})}function Gp(e,t){return new Fp({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function hb(e){return qu(Bp,e)}function ra(e,t){return new po({type:"pipe",in:e,out:t})}function fb(e,t,r){return new mo({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function gb(e){let t=e._zod.def;return new mo({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function Wp(e){return new Kp({type:"readonly",innerType:e})}function yb(e,t){return new Vp({type:"template_literal",parts:e,...$.normalizeParams(t)})}function Jp(e){return new Hp({type:"lazy",getter:e})}function vb(e){return new Yp({type:"promise",innerType:e})}function bb(e){return new qp({type:"function",input:Array.isArray(e?.input)?$p(e?.input):e?.input??co(tn()),output:e?.output??tn()})}function _b(e){let t=new J({check:"custom"});return t._zod.check=e,t}function wb(e,t){return ed(ho,e??(()=>!0),t)}function Xp(e,t={}){return td(ho,e,t)}function Qp(e,t){return nd(e,t)}function Sb(e,t={}){let r=new ho({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...$.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:r,path:[...r._zod.def.path??[]]})},r}function Eb(e){let t=Jp(()=>xa([to(e),lp(),up(),hp(),co(t),Ep(to(),t)]));return t}function Tb(e,t){return new Zp({type:"pipe",in:$a(e),out:t})}var pv,F,oa,Jn,H,ia,no,qe,ao,aa,sa,ca,la,ua,da,pa,ma,cp,ha,fa,ga,ya,va,ba,_a,Yn,qn,nn,Xn,Qn,wa,dp,pp,mp,fp,gp,yp,vp,so,bp,lo,uo,_p,wp,kp,Sp,Vn,Tp,Ap,Hn,Ip,Cp,Pp,Ea,Op,Rp,Dp,Lp,Ta,Up,Fp,Bp,po,mo,Zp,Kp,Vp,Hp,Yp,qp,ho,kb,xb,$b,eo=y(()=>{Oe();Oe();qr();Yr();qi();Xr();sp();pv=new WeakMap;F=g("ZodType",(e,t)=>(M.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Kn(e,"input"),output:Kn(e,"output")}}),e.toJSONSchema=ad(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,o)=>Jd(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>qd(e,r,o),e.parseAsync=async(r,o)=>Yd(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>Xd(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>Qd(e,r,o),e.decode=(r,o)=>ep(e,r,o),e.encodeAsync=async(r,o)=>tp(e,r,o),e.decodeAsync=async(r,o)=>np(e,r,o),e.safeEncode=(r,o)=>rp(e,r,o),e.safeDecode=(r,o)=>op(e,r,o),e.safeEncodeAsync=async(r,o)=>ip(e,r,o),e.safeDecodeAsync=async(r,o)=>ap(e,r,o),io(e,"ZodType",{check(...r){let o=this.def;return this.clone($.mergeDefs(o,{checks:[...o.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,o){return ye(this,r,o)},brand(){return this},register(r,o){return r.add(this,o),this},refine(r,o){return this.check(Xp(r,o))},superRefine(r,o){return this.check(Qp(r,o))},overwrite(r){return this.check(Fe(r))},optional(){return ro(this)},exactOptional(){return Np(this)},nullable(){return oo(this)},nullish(){return ro(oo(this))},nonoptional(r){return Mp(this,r)},array(){return co(this)},or(r){return xa([this,r])},and(r){return xp(this,r)},transform(r){return ra(this,$a(r))},default(r){return jp(this,r)},prefault(r){return zp(this,r)},catch(r){return Gp(this,r)},pipe(r){return ra(this,r)},readonly(){return Wp(this)},describe(r){let o=this.clone();return ae.add(o,{description:r}),o},meta(...r){if(r.length===0)return ae.get(this);let o=this.clone();return ae.add(o,r[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return ae.get(e)?.description},configurable:!0}),e)),oa=g("_ZodString",(e,t)=>{qt.init(e,t),F.init(e,t),e._zod.processJSONSchema=(o,n,i)=>sd(e,o,n,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,io(e,"_ZodString",{regex(...o){return this.check(On(...o))},includes(...o){return this.check(Dn(...o))},startsWith(...o){return this.check(jn(...o))},endsWith(...o){return this.check(Ln(...o))},min(...o){return this.check(ct(...o))},max(...o){return this.check(Qt(...o))},length(...o){return this.check(en(...o))},nonempty(...o){return this.check(ct(1,...o))},lowercase(o){return this.check(Nn(o))},uppercase(o){return this.check(Rn(o))},trim(){return this.check(Un())},normalize(...o){return this.check(Mn(...o))},toLowerCase(){return this.check(Fn())},toUpperCase(){return this.check(Gn())},slugify(){return this.check(Bn())}})}),Jn=g("ZodString",(e,t)=>{qt.init(e,t),oa.init(e,t),e.email=r=>e.check(_i(ia,r)),e.url=r=>e.check(Jr(ao,r)),e.jwt=r=>e.check(Mi(_a,r)),e.emoji=r=>e.check($i(aa,r)),e.guid=r=>e.check(Hr(no,r)),e.uuid=r=>e.check(wi(qe,r)),e.uuidv4=r=>e.check(ki(qe,r)),e.uuidv6=r=>e.check(xi(qe,r)),e.uuidv7=r=>e.check(Si(qe,r)),e.nanoid=r=>e.check(Ei(sa,r)),e.guid=r=>e.check(Hr(no,r)),e.cuid=r=>e.check(Ti(ca,r)),e.cuid2=r=>e.check(Ai(la,r)),e.ulid=r=>e.check(Ii(ua,r)),e.base64=r=>e.check(ji(ya,r)),e.base64url=r=>e.check(Li(va,r)),e.xid=r=>e.check(Ci(da,r)),e.ksuid=r=>e.check(Pi(pa,r)),e.ipv4=r=>e.check(Oi(ma,r)),e.ipv6=r=>e.check(Ni(ha,r)),e.cidrv4=r=>e.check(Ri(fa,r)),e.cidrv6=r=>e.check(Di(ga,r)),e.e164=r=>e.check(zi(ba,r)),e.datetime=r=>e.check(Zd(r)),e.date=r=>e.check(Kd(r)),e.time=r=>e.check(Wd(r)),e.duration=r=>e.check(Vd(r))});H=g("ZodStringFormat",(e,t)=>{V.init(e,t),oa.init(e,t)}),ia=g("ZodEmail",(e,t)=>{sl.init(e,t),H.init(e,t)});no=g("ZodGUID",(e,t)=>{il.init(e,t),H.init(e,t)});qe=g("ZodUUID",(e,t)=>{al.init(e,t),H.init(e,t)});ao=g("ZodURL",(e,t)=>{cl.init(e,t),H.init(e,t)});aa=g("ZodEmoji",(e,t)=>{ll.init(e,t),H.init(e,t)});sa=g("ZodNanoID",(e,t)=>{ul.init(e,t),H.init(e,t)});ca=g("ZodCUID",(e,t)=>{dl.init(e,t),H.init(e,t)});la=g("ZodCUID2",(e,t)=>{pl.init(e,t),H.init(e,t)});ua=g("ZodULID",(e,t)=>{ml.init(e,t),H.init(e,t)});da=g("ZodXID",(e,t)=>{hl.init(e,t),H.init(e,t)});pa=g("ZodKSUID",(e,t)=>{fl.init(e,t),H.init(e,t)});ma=g("ZodIPv4",(e,t)=>{_l.init(e,t),H.init(e,t)});cp=g("ZodMAC",(e,t)=>{kl.init(e,t),H.init(e,t)});ha=g("ZodIPv6",(e,t)=>{wl.init(e,t),H.init(e,t)});fa=g("ZodCIDRv4",(e,t)=>{xl.init(e,t),H.init(e,t)});ga=g("ZodCIDRv6",(e,t)=>{Sl.init(e,t),H.init(e,t)});ya=g("ZodBase64",(e,t)=>{El.init(e,t),H.init(e,t)});va=g("ZodBase64URL",(e,t)=>{Tl.init(e,t),H.init(e,t)});ba=g("ZodE164",(e,t)=>{Al.init(e,t),H.init(e,t)});_a=g("ZodJWT",(e,t)=>{Il.init(e,t),H.init(e,t)});Yn=g("ZodCustomStringFormat",(e,t)=>{Cl.init(e,t),H.init(e,t)});qn=g("ZodNumber",(e,t)=>{ui.init(e,t),F.init(e,t),e._zod.processJSONSchema=(o,n,i)=>cd(e,o,n,i),io(e,"ZodNumber",{gt(o,n){return this.check(Je(o,n))},gte(o,n){return this.check(be(o,n))},min(o,n){return this.check(be(o,n))},lt(o,n){return this.check(He(o,n))},lte(o,n){return this.check(Pe(o,n))},max(o,n){return this.check(Pe(o,n))},int(o){return this.check(na(o))},safe(o){return this.check(na(o))},positive(o){return this.check(Je(0,o))},nonnegative(o){return this.check(be(0,o))},negative(o){return this.check(He(0,o))},nonpositive(o){return this.check(Pe(0,o))},multipleOf(o,n){return this.check(St(o,n))},step(o,n){return this.check(St(o,n))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});nn=g("ZodNumberFormat",(e,t)=>{Pl.init(e,t),qn.init(e,t)});Xn=g("ZodBoolean",(e,t)=>{Gr.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ld(e,r,o,n)});Qn=g("ZodBigInt",(e,t)=>{di.init(e,t),F.init(e,t),e._zod.processJSONSchema=(o,n,i)=>ud(e,o,n,i),e.gte=(o,n)=>e.check(be(o,n)),e.min=(o,n)=>e.check(be(o,n)),e.gt=(o,n)=>e.check(Je(o,n)),e.gte=(o,n)=>e.check(be(o,n)),e.min=(o,n)=>e.check(be(o,n)),e.lt=(o,n)=>e.check(He(o,n)),e.lte=(o,n)=>e.check(Pe(o,n)),e.max=(o,n)=>e.check(Pe(o,n)),e.positive=o=>e.check(Je(BigInt(0),o)),e.negative=o=>e.check(He(BigInt(0),o)),e.nonpositive=o=>e.check(Pe(BigInt(0),o)),e.nonnegative=o=>e.check(be(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(St(o,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});wa=g("ZodBigIntFormat",(e,t)=>{Ol.init(e,t),Qn.init(e,t)});dp=g("ZodSymbol",(e,t)=>{Nl.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>dd(e,r,o,n)});pp=g("ZodUndefined",(e,t)=>{Rl.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>md(e,r,o,n)});mp=g("ZodNull",(e,t)=>{Dl.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>pd(e,r,o,n)});fp=g("ZodAny",(e,t)=>{jl.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>gd(e,r,o,n)});gp=g("ZodUnknown",(e,t)=>{Ll.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>yd(e,r,o,n)});yp=g("ZodNever",(e,t)=>{zl.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>fd(e,r,o,n)});vp=g("ZodVoid",(e,t)=>{Ml.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>hd(e,r,o,n)});so=g("ZodDate",(e,t)=>{Ul.init(e,t),F.init(e,t),e._zod.processJSONSchema=(o,n,i)=>vd(e,o,n,i),e.min=(o,n)=>e.check(be(o,n)),e.max=(o,n)=>e.check(Pe(o,n));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});bp=g("ZodArray",(e,t)=>{Fl.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Cd(e,r,o,n),e.element=t.element,io(e,"ZodArray",{min(r,o){return this.check(ct(r,o))},nonempty(r){return this.check(ct(1,r))},max(r,o){return this.check(Qt(r,o))},length(r,o){return this.check(en(r,o))},unwrap(){return this.element}})});lo=g("ZodObject",(e,t)=>{Gl.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Pd(e,r,o,n),$.defineLazy(e,"shape",()=>t.shape),io(e,"ZodObject",{keyof(){return Sa(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:tn()})},loose(){return this.clone({...this._zod.def,catchall:tn()})},strict(){return this.clone({...this._zod.def,catchall:ka()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return $.extend(this,r)},safeExtend(r){return $.safeExtend(this,r)},merge(r){return $.merge(this,r)},pick(r){return $.pick(this,r)},omit(r){return $.omit(this,r)},partial(...r){return $.partial(Ea,this,r[0])},required(...r){return $.required(Ta,this,r[0])}})});uo=g("ZodUnion",(e,t)=>{Br.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Wi(e,r,o,n),e.options=t.options});_p=g("ZodXor",(e,t)=>{uo.init(e,t),Bl.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Wi(e,r,o,n),e.options=t.options});wp=g("ZodDiscriminatedUnion",(e,t)=>{uo.init(e,t),Zl.init(e,t)});kp=g("ZodIntersection",(e,t)=>{Kl.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Od(e,r,o,n)});Sp=g("ZodTuple",(e,t)=>{pi.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Nd(e,r,o,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});Vn=g("ZodRecord",(e,t)=>{Wl.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Rd(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType});Tp=g("ZodMap",(e,t)=>{Vl.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ad(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(Ye(...r)),e.nonempty=r=>e.check(Ye(1,r)),e.max=(...r)=>e.check($t(...r)),e.size=(...r)=>e.check(Xt(...r))});Ap=g("ZodSet",(e,t)=>{Hl.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Id(e,r,o,n),e.min=(...r)=>e.check(Ye(...r)),e.nonempty=r=>e.check(Ye(1,r)),e.max=(...r)=>e.check($t(...r)),e.size=(...r)=>e.check(Xt(...r))});Hn=g("ZodEnum",(e,t)=>{Jl.init(e,t),F.init(e,t),e._zod.processJSONSchema=(o,n,i)=>bd(e,o,n,i),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{let i={};for(let a of o)if(r.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Hn({...t,checks:[],...$.normalizeParams(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let a of o)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new Hn({...t,checks:[],...$.normalizeParams(n),entries:i})}});Ip=g("ZodLiteral",(e,t)=>{Yl.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>_d(e,r,o,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});Cp=g("ZodFile",(e,t)=>{ql.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>xd(e,r,o,n),e.min=(r,o)=>e.check(Ye(r,o)),e.max=(r,o)=>e.check($t(r,o)),e.mime=(r,o)=>e.check(zn(Array.isArray(r)?r:[r],o))});Pp=g("ZodTransform",(e,t)=>{Xl.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Td(e,r,o,n),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new bt(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push($.issue(i,r.value,t));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push($.issue(a))}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r.fallback=!0,r)):(r.value=n,r.fallback=!0,r)}});Ea=g("ZodOptional",(e,t)=>{mi.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Vi(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});Op=g("ZodExactOptional",(e,t)=>{Ql.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Vi(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});Rp=g("ZodNullable",(e,t)=>{eu.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Dd(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});Dp=g("ZodDefault",(e,t)=>{tu.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ld(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});Lp=g("ZodPrefault",(e,t)=>{nu.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>zd(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});Ta=g("ZodNonOptional",(e,t)=>{ru.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>jd(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});Up=g("ZodSuccess",(e,t)=>{ou.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Sd(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});Fp=g("ZodCatch",(e,t)=>{iu.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Md(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});Bp=g("ZodNaN",(e,t)=>{au.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>wd(e,r,o,n)});po=g("ZodPipe",(e,t)=>{hi.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ud(e,r,o,n),e.in=t.in,e.out=t.out});mo=g("ZodCodec",(e,t)=>{po.init(e,t),Zr.init(e,t)});Zp=g("ZodPreprocess",(e,t)=>{po.init(e,t),su.init(e,t)}),Kp=g("ZodReadonly",(e,t)=>{cu.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Fd(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});Vp=g("ZodTemplateLiteral",(e,t)=>{lu.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>kd(e,r,o,n)});Hp=g("ZodLazy",(e,t)=>{pu.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Bd(e,r,o,n),e.unwrap=()=>e._zod.def.getter()});Yp=g("ZodPromise",(e,t)=>{du.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Gd(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});qp=g("ZodFunction",(e,t)=>{uu.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ed(e,r,o,n)});ho=g("ZodCustom",(e,t)=>{mu.init(e,t),F.init(e,t),e._zod.processJSONSchema=(r,o,n)=>$d(e,r,o,n)});kb=rd,xb=od;$b=(...e)=>id({Codec:mo,Boolean:Xn,String:Jn},...e)});function OT(e){Q({customError:e})}function NT(){return Q().customError}var PT,em,Ab=y(()=>{Oe();PT={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};em||(em={})});function DT(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function jT(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let o=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===o){let n=r[1];if(!n||!t.defs[n])throw new Error(`Reference not found: ${e}`);return t.defs[n]}throw new Error(`Reference not found: ${e}`)}function Ib(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return P.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return P.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let i=jT(n,t),a=ue(i,t);return t.refs.set(n,a),t.processing.delete(n),a}if(e.enum!==void 0){let n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&n.length===1&&n[0]===null)return P.null();if(n.length===0)return P.never();if(n.length===1)return P.literal(n[0]);if(n.every(a=>typeof a=="string"))return P.enum(n);let i=n.map(a=>P.literal(a));return i.length<2?i[0]:P.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return P.literal(e.const);let r=e.type;if(Array.isArray(r)){let n=r.map(i=>{let a={...e,type:i};return Ib(a,t)});return n.length===0?P.never():n.length===1?n[0]:P.union(n)}if(!r)return P.any();let o;switch(r){case"string":{let n=P.string();if(e.format){let i=e.format;i==="email"?n=n.check(P.email()):i==="uri"||i==="uri-reference"?n=n.check(P.url()):i==="uuid"||i==="guid"?n=n.check(P.uuid()):i==="date-time"?n=n.check(P.iso.datetime()):i==="date"?n=n.check(P.iso.date()):i==="time"?n=n.check(P.iso.time()):i==="duration"?n=n.check(P.iso.duration()):i==="ipv4"?n=n.check(P.ipv4()):i==="ipv6"?n=n.check(P.ipv6()):i==="mac"?n=n.check(P.mac()):i==="cidr"?n=n.check(P.cidrv4()):i==="cidr-v6"?n=n.check(P.cidrv6()):i==="base64"?n=n.check(P.base64()):i==="base64url"?n=n.check(P.base64url()):i==="e164"?n=n.check(P.e164()):i==="jwt"?n=n.check(P.jwt()):i==="emoji"?n=n.check(P.emoji()):i==="nanoid"?n=n.check(P.nanoid()):i==="cuid"?n=n.check(P.cuid()):i==="cuid2"?n=n.check(P.cuid2()):i==="ulid"?n=n.check(P.ulid()):i==="xid"?n=n.check(P.xid()):i==="ksuid"&&(n=n.check(P.ksuid()))}typeof e.minLength=="number"&&(n=n.min(e.minLength)),typeof e.maxLength=="number"&&(n=n.max(e.maxLength)),e.pattern&&(n=n.regex(new RegExp(e.pattern))),o=n;break}case"number":case"integer":{let n=r==="integer"?P.number().int():P.number();typeof e.minimum=="number"&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&(n=n.max(e.maximum)),typeof e.exclusiveMinimum=="number"?n=n.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(n=n.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?n=n.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(n=n.lt(e.maximum)),typeof e.multipleOf=="number"&&(n=n.multipleOf(e.multipleOf)),o=n;break}case"boolean":{o=P.boolean();break}case"null":{o=P.null();break}case"object":{let n={},i=e.properties||{},a=new Set(e.required||[]);for(let[c,l]of Object.entries(i)){let p=ue(l,t);n[c]=a.has(c)?p:p.optional()}if(e.propertyNames){let c=ue(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?ue(e.additionalProperties,t):P.any();if(Object.keys(n).length===0){o=P.record(c,l);break}let p=P.object(n).passthrough(),d=P.looseRecord(c,l);o=P.intersection(p,d);break}if(e.patternProperties){let c=e.patternProperties,l=Object.keys(c),p=[];for(let m of l){let h=ue(c[m],t),f=P.string().regex(new RegExp(m));p.push(P.looseRecord(f,h))}let d=[];if(Object.keys(n).length>0&&d.push(P.object(n).passthrough()),d.push(...p),d.length===0)o=P.object({}).passthrough();else if(d.length===1)o=d[0];else{let m=P.intersection(d[0],d[1]);for(let h=2;h<d.length;h++)m=P.intersection(m,d[h]);o=m}break}let s=P.object(n);e.additionalProperties===!1?o=s.strict():typeof e.additionalProperties=="object"?o=s.catchall(ue(e.additionalProperties,t)):o=s.passthrough();break}case"array":{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=n.map(c=>ue(c,t)),s=i&&typeof i=="object"&&!Array.isArray(i)?ue(i,t):void 0;s?o=P.tuple(a).rest(s):o=P.tuple(a),typeof e.minItems=="number"&&(o=o.check(P.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(P.maxLength(e.maxItems)))}else if(Array.isArray(i)){let a=i.map(c=>ue(c,t)),s=e.additionalItems&&typeof e.additionalItems=="object"?ue(e.additionalItems,t):void 0;s?o=P.tuple(a).rest(s):o=P.tuple(a),typeof e.minItems=="number"&&(o=o.check(P.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(P.maxLength(e.maxItems)))}else if(i!==void 0){let a=ue(i,t),s=P.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),o=s}else o=P.array(P.any());break}default:throw new Error(`Unsupported type: ${r}`)}return o}function ue(e,t){if(typeof e=="boolean")return e?P.any():P.never();let r=Ib(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(l=>ue(l,t)),c=P.union(s);r=o?P.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(l=>ue(l,t)),c=P.xor(s);r=o?P.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=o?r:P.any();else{let s=o?r:ue(e.allOf[0],t),c=o?0:1;for(let l=c;l<e.allOf.length;l++)s=P.intersection(s,ue(e.allOf[l],t));r=s}e.nullable===!0&&t.version==="openapi-3.0"&&(r=P.nullable(r)),e.readOnly===!0&&(r=P.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let n={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of i)s in e&&(n[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(n[s]=e[s]);for(let s of Object.keys(e))RT.has(s)||(n[s]=e[s]);return Object.keys(n).length>0&&t.registry.add(r,n),e.description&&(r=r.describe(e.description)),r}function Cb(e,t){if(typeof e=="boolean")return e?P.any():P.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let o=DT(r,t?.defaultTarget),n=r.$defs||r.definitions||{},i={version:o,defs:n,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??ae};return ue(r,i)}var P,RT,Pb=y(()=>{Vr();qi();Xr();eo();P={...Qr,...Yi,iso:Wn},RT=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"])});var tm={};We(tm,{bigint:()=>UT,boolean:()=>MT,date:()=>FT,number:()=>zT,string:()=>LT});function LT(e){return ku(Jn,e)}function zT(e){return Cu(qn,e)}function MT(e){return Lu(Xn,e)}function UT(e){return Mu(Qn,e)}function FT(e){return Yu(so,e)}var Ob=y(()=>{Oe();eo()});var u={};We(u,{$brand:()=>Zs,$input:()=>_u,$output:()=>bu,NEVER:()=>Bs,TimePrecision:()=>Su,ZodAny:()=>fp,ZodArray:()=>bp,ZodBase64:()=>ya,ZodBase64URL:()=>va,ZodBigInt:()=>Qn,ZodBigIntFormat:()=>wa,ZodBoolean:()=>Xn,ZodCIDRv4:()=>fa,ZodCIDRv6:()=>ga,ZodCUID:()=>ca,ZodCUID2:()=>la,ZodCatch:()=>Fp,ZodCodec:()=>mo,ZodCustom:()=>ho,ZodCustomStringFormat:()=>Yn,ZodDate:()=>so,ZodDefault:()=>Dp,ZodDiscriminatedUnion:()=>wp,ZodE164:()=>ba,ZodEmail:()=>ia,ZodEmoji:()=>aa,ZodEnum:()=>Hn,ZodError:()=>IT,ZodExactOptional:()=>Op,ZodFile:()=>Cp,ZodFirstPartyTypeKind:()=>em,ZodFunction:()=>qp,ZodGUID:()=>no,ZodIPv4:()=>ma,ZodIPv6:()=>ha,ZodISODate:()=>Qi,ZodISODateTime:()=>Xi,ZodISODuration:()=>ta,ZodISOTime:()=>ea,ZodIntersection:()=>kp,ZodIssueCode:()=>PT,ZodJWT:()=>_a,ZodKSUID:()=>pa,ZodLazy:()=>Hp,ZodLiteral:()=>Ip,ZodMAC:()=>cp,ZodMap:()=>Tp,ZodNaN:()=>Bp,ZodNanoID:()=>sa,ZodNever:()=>yp,ZodNonOptional:()=>Ta,ZodNull:()=>mp,ZodNullable:()=>Rp,ZodNumber:()=>qn,ZodNumberFormat:()=>nn,ZodObject:()=>lo,ZodOptional:()=>Ea,ZodPipe:()=>po,ZodPrefault:()=>Lp,ZodPreprocess:()=>Zp,ZodPromise:()=>Yp,ZodReadonly:()=>Kp,ZodRealError:()=>Ee,ZodRecord:()=>Vn,ZodSet:()=>Ap,ZodString:()=>Jn,ZodStringFormat:()=>H,ZodSuccess:()=>Up,ZodSymbol:()=>dp,ZodTemplateLiteral:()=>Vp,ZodTransform:()=>Pp,ZodTuple:()=>Sp,ZodType:()=>F,ZodULID:()=>ua,ZodURL:()=>ao,ZodUUID:()=>qe,ZodUndefined:()=>pp,ZodUnion:()=>uo,ZodUnknown:()=>gp,ZodVoid:()=>vp,ZodXID:()=>da,ZodXor:()=>_p,_ZodString:()=>oa,_default:()=>jp,_function:()=>bb,any:()=>Yv,array:()=>co,base64:()=>Nv,base64url:()=>Rv,bigint:()=>Kv,boolean:()=>up,catch:()=>Gp,check:()=>_b,cidrv4:()=>Pv,cidrv6:()=>Ov,clone:()=>ye,codec:()=>fb,coerce:()=>tm,config:()=>Q,core:()=>lt,cuid:()=>xv,cuid2:()=>Sv,custom:()=>wb,date:()=>Xv,decode:()=>ep,decodeAsync:()=>np,describe:()=>kb,discriminatedUnion:()=>ob,e164:()=>Dv,email:()=>mv,emoji:()=>wv,encode:()=>Qd,encodeAsync:()=>tp,endsWith:()=>Ln,enum:()=>Sa,exactOptional:()=>Np,file:()=>db,flattenError:()=>Lr,float32:()=>Fv,float64:()=>Gv,formatError:()=>zr,fromJSONSchema:()=>Cb,function:()=>bb,getErrorMap:()=>NT,globalRegistry:()=>ae,gt:()=>Je,gte:()=>be,guid:()=>hv,hash:()=>Uv,hex:()=>Mv,hostname:()=>zv,httpUrl:()=>_v,includes:()=>Dn,instanceof:()=>Sb,int:()=>na,int32:()=>Bv,int64:()=>Wv,intersection:()=>xp,invertCodec:()=>gb,ipv4:()=>Av,ipv6:()=>Cv,iso:()=>Wn,json:()=>Eb,jwt:()=>jv,keyof:()=>Qv,ksuid:()=>Tv,lazy:()=>Jp,length:()=>en,literal:()=>ub,locales:()=>Wr,looseObject:()=>nb,looseRecord:()=>ab,lowercase:()=>Nn,lt:()=>He,lte:()=>Pe,mac:()=>Iv,map:()=>sb,maxLength:()=>Qt,maxSize:()=>$t,meta:()=>xb,mime:()=>zn,minLength:()=>ct,minSize:()=>Ye,multipleOf:()=>St,nan:()=>hb,nanoid:()=>kv,nativeEnum:()=>lb,negative:()=>Fi,never:()=>ka,nonnegative:()=>Bi,nonoptional:()=>Mp,nonpositive:()=>Gi,normalize:()=>Mn,null:()=>hp,nullable:()=>oo,nullish:()=>pb,number:()=>lp,object:()=>eb,optional:()=>ro,overwrite:()=>Fe,parse:()=>Jd,parseAsync:()=>Yd,partialRecord:()=>ib,pipe:()=>ra,positive:()=>Ui,prefault:()=>zp,preprocess:()=>Tb,prettifyError:()=>rc,promise:()=>vb,property:()=>Zi,readonly:()=>Wp,record:()=>Ep,refine:()=>Xp,regex:()=>On,regexes:()=>Ce,registry:()=>bi,safeDecode:()=>op,safeDecodeAsync:()=>ap,safeEncode:()=>rp,safeEncodeAsync:()=>ip,safeParse:()=>qd,safeParseAsync:()=>Xd,set:()=>cb,setErrorMap:()=>OT,size:()=>Xt,slugify:()=>Bn,startsWith:()=>jn,strictObject:()=>tb,string:()=>to,stringFormat:()=>Lv,stringbool:()=>$b,success:()=>mb,superRefine:()=>Qp,symbol:()=>Hv,templateLiteral:()=>yb,toJSONSchema:()=>Hi,toLowerCase:()=>Fn,toUpperCase:()=>Gn,transform:()=>$a,treeifyError:()=>nc,trim:()=>Un,tuple:()=>$p,uint32:()=>Zv,uint64:()=>Vv,ulid:()=>$v,undefined:()=>Jv,union:()=>xa,unknown:()=>tn,uppercase:()=>Rn,url:()=>bv,util:()=>$,uuid:()=>fv,uuidv4:()=>gv,uuidv6:()=>yv,uuidv7:()=>vv,void:()=>qv,xid:()=>Ev,xor:()=>rb});var nm=y(()=>{Oe();eo();qi();Hd();sp();Ab();Oe();fu();Oe();qr();Pb();vu();Xr();Xr();Ob();Q(fi())});var Xe=y(()=>{nm();nm()});function Nb(e){let t=e.trim().toLowerCase().replace(/\.$/,"");if(!t)return!1;if(BT.has(t)||GT.some(o=>t.endsWith(o))||/^127\./.test(t)||/^10\./.test(t)||/^192\.168\./.test(t)||/^172\.(1[6-9]|2[0-9]|3[01])\./.test(t))return!0;let r=/^\[::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})\]$/.exec(t);if(r){let o=Number.parseInt(r[1],16),n=Number.parseInt(r[2],16),i=`${o>>8}.${o&255}.${n>>8}.${n&255}`;if(i!==t)return Nb(i)}return!!(/^169\.254\./.test(t)||/^\[?fe80:/.test(t)||/^\[?f[cd][0-9a-f]{2}:/.test(t))}function Rb(e){let t;try{t=new URL(e)}catch{return"unparseable"}if(Nb(t.hostname))return"local";if(t.protocol!=="https:")return"insecure"}var GT,BT,rm=y(()=>{"use strict";GT=[".localhost",".local",".internal",".test",".localdomain"],BT=new Set(["localhost","127.0.0.1","::1","[::1]","0.0.0.0","[::]"])});var fo,Aa=y(()=>{"use strict";Xe();fo=u.discriminatedUnion("source",[u.object({source:u.literal("manifest")}),u.object({source:u.literal("studio"),element_id:u.string().min(1),edition_id:u.string().min(1)})])});function er(e){return`round-${e.number}`}var om,ZT,KT,WT,VT,Db,HT,im,JT,jb,YT,ze,e1,t1,n1,It=y(()=>{"use strict";Xe();Wt();Aa();om=u.object({archetype:u.literal("hunt"),number:u.number().int().positive().default(1),prompt:u.string().default(""),board:u.array(u.string().min(1)).min(2),targets:u.array(u.string().min(1)).min(1),required:u.number().int().positive().optional(),pointsPerTarget:u.number().int().nonnegative().default(10),completionBonus:u.number().int().nonnegative().default(0),attemptsAllowed:u.number().int().positive().default(10),mistakesAllowed:u.number().int().positive().default(4),open:u.boolean().default(!0),playsPerSecond:u.number().int().positive().optional()}).superRefine((e,t)=>{let r=e.targets.filter(o=>!e.board.includes(o));r.length&&t.addIssue({code:"custom",path:["targets"],message:`Not on the board: ${r.join(", ")}. Every target must be pickable.`}),new Set(e.targets).size!==e.targets.length&&t.addIssue({code:"custom",path:["targets"],message:"The same target twice. Each one counts once."}),e.required!==void 0&&e.required>e.targets.length&&t.addIssue({code:"custom",path:["required"],message:`Asks for ${e.required} of ${e.targets.length} targets, which cannot be reached.`})}),ZT=u.object({key:u.string().min(1),label:u.string().min(1),value:u.number().int().nonnegative()}),KT=u.object({id:u.string().min(1),label:u.string().default(""),entries:u.array(ZT).min(1)}),WT=u.object({within:u.number().min(0).max(1),label:u.string().min(1)}),VT=[{within:.02,label:"Hall of Fame"},{within:.05,label:"All-NBA"},{within:.1,label:"All-Star"},{within:.18,label:"Starter"},{within:.28,label:"Veteran"}],Db=u.object({archetype:u.literal("push"),number:u.number().int().positive().default(1),prompt:u.string().default(""),target:u.number().int().positive(),targetLabel:u.string().default(""),unit:u.string().max(4).default(""),slates:u.array(KT).min(1),tiers:u.array(WT).default(VT),floorLabel:u.string().default("Rookie"),bustLabel:u.string().default("Busted"),open:u.boolean().default(!0),playsPerSecond:u.number().int().positive().optional()}).superRefine((e,t)=>{let r=e.slates.map(s=>s.id);new Set(r).size!==r.length&&t.addIssue({code:"custom",path:["slates"],message:"Two slates share an id. A play names the slate it picked from."});let o=e.slates.flatMap(s=>s.entries.map(c=>c.key)),n=[...new Set(o.filter((s,c)=>o.indexOf(s)!==c))];n.length&&t.addIssue({code:"custom",path:["slates"],message:`The same key on more than one slate: ${n.join(", ")}. A play names a key, so each one must belong to exactly one slate.`});let i=e.slates.reduce((s,c)=>s+Math.min(...c.entries.map(l=>l.value)),0);i>e.target&&t.addIssue({code:"custom",path:["target"],message:`The lowest possible total is ${i}, which is already over ${e.target}. Every player would bust.`}),e.tiers.every((s,c)=>c===0||s.within>e.tiers[c-1].within)||t.addIssue({code:"custom",path:["tiers"],message:"Tiers must be ordered from closest to furthest. Out of order, the first one that matches is the wrong one and every player is awarded it."})}),HT=u.object({key:u.string().min(1),label:u.string().min(1),members:u.array(u.string().min(1)).min(2)}),im=u.object({archetype:u.literal("group"),number:u.number().int().positive().default(1),prompt:u.string().default(""),board:u.array(u.string().min(1)).min(4),groups:u.array(HT).min(2),pointsPerGroup:u.number().int().nonnegative().default(10),completionBonus:u.number().int().nonnegative().default(0),attemptsAllowed:u.number().int().positive().default(10),mistakesAllowed:u.number().int().positive().default(4),open:u.boolean().default(!0),playsPerSecond:u.number().int().positive().optional()}).superRefine((e,t)=>{let r=new Map;for(let i of e.groups){let a=i.members.filter(s=>!e.board.includes(s));a.length&&t.addIssue({code:"custom",path:["groups"],message:`${i.key} has members that are not on the board: ${a.join(", ")}.`});for(let s of i.members){let c=r.get(s);c&&c!==i.key&&t.addIssue({code:"custom",path:["groups"],message:`${s} is in both ${c} and ${i.key}. Groups cannot overlap.`}),r.set(s,i.key)}}new Set(e.groups.map(i=>i.key)).size!==e.groups.length&&t.addIssue({code:"custom",path:["groups"],message:"Two groups share a key. Each one needs its own."}),e.groups.length>e.attemptsAllowed&&t.addIssue({code:"custom",path:["attemptsAllowed"],message:`${e.groups.length} groups cannot be found in ${e.attemptsAllowed} attempts.`});let o=new Set(e.groups.flatMap(i=>i.members)),n=e.board.filter(i=>!o.has(i));n.length&&t.addIssue({code:"custom",path:["board"],message:`On the board and in no group: ${n.join(", ")}. Every item needs a group.`})}),JT=u.object({key:u.string().min(1),label:u.string().min(1),points:u.number().int().nonnegative().optional()}),jb=u.object({archetype:u.literal("predict"),number:u.number().int().positive().default(1),prompt:u.string().default(""),options:u.array(JT).min(2),result:u.string().min(1).optional(),pointsForCorrect:u.number().int().nonnegative().default(10),attemptsAllowed:u.number().int().positive().default(1),open:u.boolean().default(!0),playsPerSecond:u.number().int().positive().optional()}).superRefine((e,t)=>{new Set(e.options.map(r=>r.key)).size!==e.options.length&&t.addIssue({code:"custom",path:["options"],message:"Two options share a key. Each one needs its own."}),e.result!==void 0&&!e.options.some(r=>r.key===e.result)&&t.addIssue({code:"custom",path:["result"],message:`${e.result} is not one of the options, so nobody could have predicted it.`})}),YT=u.discriminatedUnion("archetype",[om,Db,im,jb]),ze=u.preprocess(Of,YT);e1=u.object({action:u.literal("settle"),game:u.string().min(1),roundId:u.string().min(1),result:u.string().min(1)}),t1=u.object({game:u.string().min(1),round:ze,origin:fo.optional(),snapshot:u.string().default(""),source:u.string().optional(),roundId:u.string().min(1).optional(),selection:u.object({mode:u.literal("rotation"),windowSeconds:u.number().int().positive(),rounds:u.array(u.object({id:u.string().min(1),round:ze,origin:fo.optional()})).min(1)}).optional()}),n1=u.object({roundId:u.string(),version:u.number().int().nonnegative(),changed:u.boolean(),current:u.boolean()})});function zb(e){let t=[];e.measurement.signal.enabled&&!e.identity.consent.analytics_requires_consent&&t.push({path:"identity.consent.analytics_requires_consent",message:"Cannot be false while measurement.signal.enabled is true. Signal collects player engagement under Monterosa's own controllership, so consent is required and is not the game's to waive. Turn Signal off, or leave consent required."});let r=e.operations.promotion;if(r.offers_prize&&(r.terms_url||t.push({path:"operations.promotion.terms_url",message:"Required when the game offers a prize."}),r.jurisdictions.length===0&&t.push({path:"operations.promotion.jurisdictions",message:"Name the countries the promotion is open in. An unbounded prize draw is open in jurisdictions whose rules you have not read."}),!r.skill_based&&!r.free_entry_route&&t.push({path:"operations.promotion.free_entry_route",message:"A paid-entry prize needs either a published free entry route or a real skill test. Set `free_entry_route`, or set `skill_based` if entry turns on skill, knowledge or judgement."})),e.identity.provider==="jwt"&&!e.identity.jwt&&t.push({path:"identity.jwt",message:"Required when identity.provider is `jwt`. Name the `issuer` and the `jwks_uri` of the login system whose tokens this game accepts. Gamestage provides no identity provider."}),e.identity.jwt)for(let o of["issuer","jwks_uri"]){let n=e.identity.jwt[o],i=Rb(n);i&&t.push({path:`identity.jwt.${o}`,message:i==="local"?"Names a host only the machine running it can reach, which is the local `gamestage dev --as` harness. That harness signs its own tokens, so a deployed game pointed at it would let anyone who can reach the key be any player. Name the login system a real fan signs in to. `gamestage dev` supplies its own and needs nothing here.":i==="insecure"?"Must be https. A key set fetched in clear text is a key set the network chooses, and a token checked against it has proved nothing.":"Not a URL. Name the full issuer and JWKS URI of the login system whose tokens this game accepts."})}return e.identity.age_gate.required&&!e.identity.age_gate.minimum_age&&t.push({path:"identity.age_gate.minimum_age",message:"Required when identity.age_gate.required is true."}),e.identity.age_gate.method==="verified"&&!e.identity.age_gate.verifier&&t.push({path:"identity.age_gate.verifier",message:"Name the verifier when the method is `verified`. Gamestage provides no age verification, so an unnamed verifier is an unevidenced claim."}),t}var Ia,am,sm,cm,Ct,tr,Lb,qT,Qe,XT,QT,eA,tA,nA,Pt,rA,oA,iA,aA,sA,cA,lA,uA,dA,pA,mA,hA,fA,rn,nr,rr=y(()=>{"use strict";Xe();rm();Ir();Wt();It();Ia="1.0",am=u.enum(["missing","proposed","confirmed","verified","approved"]),sm={missing:0,proposed:1,confirmed:2,verified:3,approved:4},cm=u.enum(["runtime","live","enterprise"]),Ct=u.enum(["L0","L1","L2","L3","L4","L5"]),tr={L0:0,L1:1,L2:2,L3:3,L4:4,L5:5},Lb={L0:"Concept",L1:"Experience",L2:"Integration",L3:"Deployable",L4:"Production",L5:"Operating"},qT=u.discriminatedUnion("kind",[u.object({kind:u.literal("human_decision"),owner:u.string(),date:u.string(),note:u.string().optional()}),u.object({kind:u.literal("generated_proposal"),tool:u.string(),model:u.string().optional(),source_context:u.string().optional()}),u.object({kind:u.literal("repository_evidence"),file:u.string(),commit:u.string().optional(),package:u.string().optional()}),u.object({kind:u.literal("platform_evidence"),system:u.string(),id:u.string()}),u.object({kind:u.literal("external_evidence"),supplier:u.string(),licence:u.string().optional(),dataset_version:u.string().optional()})]),Qe={status:am.default("missing"),provenance:u.array(qT).default([])},XT=u.object({schema_version:u.string(),revision:u.number().int().nonnegative().default(0),conformance:Ct.default("L0")}),QT=u.object({repository:u.string().url(),branch:u.string().default("main")}),eA=u.object({id:u.string().min(1),title:u.string().min(1),summary:u.string().optional(),source:QT.optional(),owners:u.object({ip:u.string().optional(),delivery:u.string().optional(),platform:u.string().optional()}).prefault({}),...Qe}),tA=u.enum(["bring_your_own","managed_runtime","manifest_driven","dedicated_engine"]),nA=u.enum(["trivia","predict","group","timed_round","synchronous_event","collection_ranking","hunt","push"]),Pt=u.preprocess(e=>typeof e=="string"?Ve(e):e,nA),rA=u.object({route:tA.optional(),archetype:Pt.optional(),component:u.string().optional(),version:u.string().optional(),variant:u.string().optional(),configuration:u.record(u.string(),u.unknown()).default({}),round:ze.optional(),...Qe}),oA=u.object({surfaces:u.array(u.string()).default([]),container_label:u.string().min(1).default(kn),screen_graph:u.string().optional(),design:u.object({figma_file:u.string().optional(),figma_version:u.string().optional(),tokens:u.string().optional(),fidelity:Ct.optional()}).optional(),...Qe}),iA=u.object({spec_url:u.string().optional(),version:u.string().optional(),...Qe}),aA=u.object({family:u.string().optional(),version:u.string().optional(),configuration_schema:u.string().optional(),...Qe}),sA=u.object({project_template:u.string().optional(),project_id:u.string().optional(),events:u.array(u.string()).default([]),elements:u.array(u.string()).default([]),...Qe}),cA=u.object({required:u.boolean().default(!1),minimum_age:u.number().int().positive().max(120).optional(),method:u.enum(["self_declared","verified"]).default("self_declared"),verifier:u.string().optional()}),lA=u.object({issuer:u.string().url(),jwks_uri:u.string().url(),audience:u.string().optional()}),uA=u.object({provider:u.enum(["identify","anonymous","custom","jwt"]).optional(),jwt:lA.optional(),require_authenticated_writes:u.boolean().default(!0),age_gate:cA.prefault({}),consent:u.object({analytics_requires_consent:u.boolean().default(!0),provider:u.string().optional()}).prefault({}),...Qe}),dA=u.object({type:u.enum(["monterosa","posthog","ga4","webhook"]),enabled:u.boolean().default(!0),config:u.record(u.string(),u.string()).default({})}),pA=u.object({destinations:u.array(dA).default([{type:"monterosa",enabled:!0,config:{}}]),trusted_events:u.array(u.string()).default([]),signal:u.object({enabled:u.boolean().default(!1),application_id:u.string().optional(),write_key:u.string().optional(),monterosa:u.object({enabled:u.boolean().default(!1),organisation_id:u.string().optional(),project_id:u.string().optional()}).prefault({})}).prefault({}),...Qe}),mA=u.object({hosting:u.string().optional(),space_spec:u.string().optional(),environments:u.array(u.enum(["local","playground","staging","production"])).default(["local"]),...Qe}),hA=u.object({offers_prize:u.boolean().default(!1),free_entry_route:u.string().optional(),skill_based:u.boolean().default(!1),terms_url:u.string().optional(),jurisdictions:u.array(u.string()).default([])}),fA=u.object({support_tier:cm.optional(),runbook:u.string().optional(),promotion:hA.prefault({}),...Qe}),rn=u.object({manifest:XT,app:eA,experience:oA.prefault({}),studio_app:iA.prefault({}),studio_surface:aA.prefault({}),backend:rA.prefault({}),interaction_cloud:sA.prefault({}),identity:uA.prefault({}),measurement:pA.prefault({}),deployment:mA.prefault({}),operations:fA.prefault({})});nr=["app","experience","studio_app","studio_surface","backend","interaction_cloud","identity","measurement","deployment","operations"]});function Ge(e){let t=gA.map(l=>({id:l.id,level:l.level,requirement:l.requirement,passed:l.check(e)})),r="L0",o=!0;for(let l of Mb)t.filter(m=>m.level===l).every(m=>m.passed)&&o?r=l:o=!1;let n=t.filter(l=>l.level==="L0").every(l=>l.passed),i=tr[r]+1,a=Mb[i],s=a?t.filter(l=>l.level===a&&!l.passed):[],c=e.manifest.conformance;return{computed:r,computedName:Lb[r],claimed:c,overclaimed:!n||tr[c]>tr[r],results:t,blockers:n?s:t.filter(l=>l.level==="L0"&&!l.passed)}}function Ub(e,t){let o=Ge(e).results.filter(n=>!n.passed&&tr[n.level]<=tr[t]);return{ok:o.length===0,missing:o}}var ut,Te,gA,Mb,Fb=y(()=>{"use strict";rr();ut=(e,t,r)=>{let o=e[t];return sm[o?.status??"missing"]>=sm[r]},Te=e=>typeof e=="string"?e.trim().length>0:e!=null,gA=[{level:"L0",id:"L0.app.identity",requirement:"app.id and app.title are set",check:e=>Te(e.app.id)&&Te(e.app.title)},{level:"L0",id:"L0.app.status",requirement:"app section is at least proposed",check:e=>ut(e,"app","proposed")},{level:"L0",id:"L0.schema.version",requirement:"manifest.schema_version is set",check:e=>Te(e.manifest.schema_version)},{level:"L1",id:"L1.experience.defined",requirement:"experience declares a screen graph or at least one player surface",check:e=>Te(e.experience.screen_graph)||e.experience.surfaces.length>0},{level:"L1",id:"L1.experience.status",requirement:"experience section is at least proposed",check:e=>ut(e,"experience","proposed")},{level:"L1",id:"L1.backend.route",requirement:"backend.route is chosen, so authority is decided before client code",check:e=>Te(e.backend.route)},{level:"L2",id:"L2.backend.pinned",requirement:"backend names a component and version, confirmed or better",check:e=>Te(e.backend.component)&&Te(e.backend.version)&&ut(e,"backend","confirmed")},{level:"L2",id:"L2.identity.policy",requirement:"identity provider is set and the section is confirmed",check:e=>Te(e.identity.provider)&&ut(e,"identity","confirmed")},{level:"L2",id:"L2.measurement.destination",requirement:"at least one enabled analytics destination is declared",check:e=>e.measurement.destinations.some(t=>t.enabled)},{level:"L2",id:"L2.platform.identifiers",requirement:"a real platform identity exists (Studio App Spec or Interaction Cloud project)",check:e=>Te(e.studio_app.spec_url)||Te(e.interaction_cloud.project_id)},{level:"L3",id:"L3.deployment.space",requirement:"deployment names a Space spec and a non-local environment",check:e=>Te(e.deployment.space_spec)&&e.deployment.environments.some(t=>t!=="local")},{level:"L3",id:"L3.surface.declared",requirement:"a Studio Surface family is declared for operator control",check:e=>Te(e.studio_surface.family)},{level:"L3",id:"L3.sections.confirmed",requirement:"experience, backend and deployment are all confirmed or better",check:e=>ut(e,"experience","confirmed")&&ut(e,"backend","confirmed")&&ut(e,"deployment","confirmed")},{level:"L4",id:"L4.sections.verified",requirement:"experience, backend, identity and deployment are verified with evidence attached",check:e=>["experience","backend","identity","deployment"].every(t=>ut(e,t,"verified")&&e[t].provenance.length>0)},{level:"L4",id:"L4.operations.runbook",requirement:"operations declares a support tier and a runbook",check:e=>Te(e.operations.support_tier)&&Te(e.operations.runbook)},{level:"L5",id:"L5.production.approved",requirement:"the manifest is approved and deployed to a production environment",check:e=>ut(e,"operations","approved")&&e.deployment.environments.includes("production")}],Mb=["L0","L1","L2","L3","L4","L5"]});function r_(e){return typeof e>"u"||e===null}function yA(e){return typeof e=="object"&&e!==null}function vA(e){return Array.isArray(e)?e:r_(e)?[]:[e]}function bA(e,t){var r,o,n,i;if(t)for(i=Object.keys(t),r=0,o=i.length;r<o;r+=1)n=i[r],e[n]=t[n];return e}function _A(e,t){var r="",o;for(o=0;o<t;o+=1)r+=e;return r}function wA(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}function o_(e,t){var r="",o=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
7789
-
7790
- `+e.mark.snippet),o+" "+r):o}function yo(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=o_(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}function lm(e,t,r,o,n){var i="",a="",s=Math.floor(n/2)-1;return o-t>s&&(i=" ... ",t=o-s+i.length),r-o>s&&(a=" ...",r=o+s-a.length),{str:i+e.slice(t,r).replace(/\t/g,"\u2192")+a,pos:o-t+i.length}}function um(e,t){return te.repeat(" ",t-e.length)+e}function AA(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,o=[0],n=[],i,a=-1;i=r.exec(e.buffer);)n.push(i.index),o.push(i.index+i[0].length),e.position<=i.index&&a<0&&(a=o.length-2);a<0&&(a=o.length-1);var s="",c,l,p=Math.min(e.line+t.linesAfter,n.length).toString().length,d=t.maxLength-(t.indent+p+3);for(c=1;c<=t.linesBefore&&!(a-c<0);c++)l=lm(e.buffer,o[a-c],n[a-c],e.position-(o[a]-o[a-c]),d),s=te.repeat(" ",t.indent)+um((e.line-c+1).toString(),p)+" | "+l.str+`
7791
- `+s;for(l=lm(e.buffer,o[a],n[a],e.position,d),s+=te.repeat(" ",t.indent)+um((e.line+1).toString(),p)+" | "+l.str+`
7792
- `,s+=te.repeat("-",t.indent+p+3+l.pos)+`^
7793
- `,c=1;c<=t.linesAfter&&!(a+c>=n.length);c++)l=lm(e.buffer,o[a+c],n[a+c],e.position-(o[a]-o[a+c]),d),s+=te.repeat(" ",t.indent)+um((e.line+c+1).toString(),p)+" | "+l.str+`
7794
- `;return s.replace(/\n$/,"")}function OA(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(o){t[String(o)]=r})}),t}function NA(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(CA.indexOf(r)===-1)throw new we('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=OA(t.styleAliases||null),PA.indexOf(this.kind)===-1)throw new we('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}function Gb(e,t){var r=[];return e[t].forEach(function(o){var n=r.length;r.forEach(function(i,a){i.tag===o.tag&&i.kind===o.kind&&i.multi===o.multi&&(n=a)}),r[n]=o}),r}function RA(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function o(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(o);return e}function pm(e){return this.extend(e)}function DA(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function jA(){return null}function LA(e){return e===null}function zA(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function MA(e){return e==="true"||e==="True"||e==="TRUE"}function UA(e){return Object.prototype.toString.call(e)==="[object Boolean]"}function FA(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function GA(e){return 48<=e&&e<=55}function BA(e){return 48<=e&&e<=57}function ZA(e){if(e===null)return!1;var t=e.length,r=0,o=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;o=!0}return o&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!FA(e.charCodeAt(r)))return!1;o=!0}return o&&n!=="_"}if(n==="o"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!GA(e.charCodeAt(r)))return!1;o=!0}return o&&n!=="_"}}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(!BA(e.charCodeAt(r)))return!1;o=!0}return!(!o||n==="_")}function KA(e){var t=e,r=1,o;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),o=t[0],(o==="-"||o==="+")&&(o==="-"&&(r=-1),t=t.slice(1),o=t[0]),t==="0")return 0;if(o==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function WA(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!te.isNegativeZero(e)}function HA(e){return!(e===null||!VA.test(e)||e[e.length-1]==="_")}function JA(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}function qA(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(te.isNegativeZero(e))return"-0.0";return r=e.toString(10),YA.test(r)?r.replace("e",".e"):r}function XA(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||te.isNegativeZero(e))}function QA(e){return e===null?!1:g_.exec(e)!==null||y_.exec(e)!==null}function eI(e){var t,r,o,n,i,a,s,c=0,l=null,p,d,m;if(t=g_.exec(e),t===null&&(t=y_.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],o=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,o,n));if(i=+t[4],a=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(p=+t[10],d=+(t[11]||0),l=(p*60+d)*6e4,t[9]==="-"&&(l=-l)),m=new Date(Date.UTC(r,o,n,i,a,s,c)),l&&m.setTime(m.getTime()-l),m}function tI(e){return e.toISOString()}function nI(e){return e==="<<"||e===null}function rI(e){if(e===null)return!1;var t,r,o=0,n=e.length,i=ym;for(r=0;r<n;r++)if(t=i.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;o+=6}return o%8===0}function oI(e){var t,r,o=e.replace(/[\r\n=]/g,""),n=o.length,i=ym,a=0,s=[];for(t=0;t<n;t++)t%4===0&&t&&(s.push(a>>16&255),s.push(a>>8&255),s.push(a&255)),a=a<<6|i.indexOf(o.charAt(t));return r=n%4*6,r===0?(s.push(a>>16&255),s.push(a>>8&255),s.push(a&255)):r===18?(s.push(a>>10&255),s.push(a>>2&255)):r===12&&s.push(a>>4&255),new Uint8Array(s)}function iI(e){var t="",r=0,o,n,i=e.length,a=ym;for(o=0;o<i;o++)o%3===0&&o&&(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]),r=(r<<8)+e[o];return n=i%3,n===0?(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]):n===2?(t+=a[r>>10&63],t+=a[r>>4&63],t+=a[r<<2&63],t+=a[64]):n===1&&(t+=a[r>>2&63],t+=a[r<<4&63],t+=a[64],t+=a[64]),t}function aI(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}function lI(e){if(e===null)return!0;var t=[],r,o,n,i,a,s=e;for(r=0,o=s.length;r<o;r+=1){if(n=s[r],a=!1,cI.call(n)!=="[object Object]")return!1;for(i in n)if(sI.call(n,i))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(i)===-1)t.push(i);else return!1}return!0}function uI(e){return e!==null?e:[]}function pI(e){if(e===null)return!0;var t,r,o,n,i,a=e;for(i=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(o=a[t],dI.call(o)!=="[object Object]"||(n=Object.keys(o),n.length!==1))return!1;i[t]=[n[0],o[n[0]]]}return!0}function mI(e){if(e===null)return[];var t,r,o,n,i,a=e;for(i=new Array(a.length),t=0,r=a.length;t<r;t+=1)o=a[t],n=Object.keys(o),i[t]=[n[0],o[n[0]]];return i}function fI(e){if(e===null)return!0;var t,r=e;for(t in r)if(hI.call(r,t)&&r[t]!==null)return!1;return!0}function gI(e){return e!==null?e:{}}function Zb(e){return Object.prototype.toString.call(e)}function et(e){return e===10||e===13}function an(e){return e===9||e===32}function Ae(e){return e===9||e===32||e===10||e===13}function ir(e){return e===44||e===91||e===93||e===123||e===125}function wI(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function kI(e){return e===120?2:e===117?4:e===85?8:0}function xI(e){return 48<=e&&e<=57?e-48:-1}function Kb(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
7795
- `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function SI(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function A_(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}function $I(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||vm,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function P_(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=IA(r),new we(t,r)}function D(e,t){throw P_(e,t)}function Oa(e,t){e.onWarning&&e.onWarning.call(null,P_(e,t))}function Ot(e,t,r,o){var n,i,a,s;if(t<r){if(s=e.input.slice(t,r),o)for(n=0,i=s.length;n<i;n+=1)a=s.charCodeAt(n),a===9||32<=a&&a<=1114111||D(e,"expected valid JSON character");else vI.test(s)&&D(e,"the stream contains non-printable characters");e.result+=s}}function Vb(e,t,r,o){var n,i,a,s;for(te.isObject(r)||D(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),a=0,s=n.length;a<s;a+=1)i=n[a],Nt.call(t,i)||(A_(t,i,r[i]),o[i]=!0)}function ar(e,t,r,o,n,i,a,s,c){var l,p;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),l=0,p=n.length;l<p;l+=1)Array.isArray(n[l])&&D(e,"nested arrays are not supported inside keys"),typeof n=="object"&&Zb(n[l])==="[object Object]"&&(n[l]="[object Object]");if(typeof n=="object"&&Zb(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),o==="tag:yaml.org,2002:merge")if(Array.isArray(i))for(l=0,p=i.length;l<p;l+=1)Vb(e,t,i[l],r);else Vb(e,t,i,r);else!e.json&&!Nt.call(r,n)&&Nt.call(t,n)&&(e.line=a||e.line,e.lineStart=s||e.lineStart,e.position=c||e.position,D(e,"duplicated mapping key")),A_(t,n,i),delete r[n];return t}function bm(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):D(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function ee(e,t,r){for(var o=0,n=e.input.charCodeAt(e.position);n!==0;){for(;an(n);)n===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(et(n))for(bm(e),n=e.input.charCodeAt(e.position),o++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&o!==0&&e.lineIndent<r&&Oa(e,"deficient indentation"),o}function Da(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Ae(r)))}function _m(e,t){t===1?e.result+=" ":t>1&&(e.result+=te.repeat(`
7796
- `,t-1))}function EI(e,t,r){var o,n,i,a,s,c,l,p,d=e.kind,m=e.result,h;if(h=e.input.charCodeAt(e.position),Ae(h)||ir(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(n=e.input.charCodeAt(e.position+1),Ae(n)||r&&ir(n)))return!1;for(e.kind="scalar",e.result="",i=a=e.position,s=!1;h!==0;){if(h===58){if(n=e.input.charCodeAt(e.position+1),Ae(n)||r&&ir(n))break}else if(h===35){if(o=e.input.charCodeAt(e.position-1),Ae(o))break}else{if(e.position===e.lineStart&&Da(e)||r&&ir(h))break;if(et(h))if(c=e.line,l=e.lineStart,p=e.lineIndent,ee(e,!1,-1),e.lineIndent>=t){s=!0,h=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=c,e.lineStart=l,e.lineIndent=p;break}}s&&(Ot(e,i,a,!1),_m(e,e.line-c),i=a=e.position,s=!1),an(h)||(a=e.position+1),h=e.input.charCodeAt(++e.position)}return Ot(e,i,a,!1),e.result?!0:(e.kind=d,e.result=m,!1)}function TI(e,t){var r,o,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,o=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Ot(e,o,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)o=e.position,e.position++,n=e.position;else return!0;else et(r)?(Ot(e,o,n,!0),_m(e,ee(e,!1,t)),o=n=e.position):e.position===e.lineStart&&Da(e)?D(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);D(e,"unexpected end of the stream within a single quoted scalar")}function AI(e,t){var r,o,n,i,a,s;if(s=e.input.charCodeAt(e.position),s!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=o=e.position;(s=e.input.charCodeAt(e.position))!==0;){if(s===34)return Ot(e,r,e.position,!0),e.position++,!0;if(s===92){if(Ot(e,r,e.position,!0),s=e.input.charCodeAt(++e.position),et(s))ee(e,!1,t);else if(s<256&&I_[s])e.result+=C_[s],e.position++;else if((a=kI(s))>0){for(n=a,i=0;n>0;n--)s=e.input.charCodeAt(++e.position),(a=wI(s))>=0?i=(i<<4)+a:D(e,"expected hexadecimal character");e.result+=SI(i),e.position++}else D(e,"unknown escape sequence");r=o=e.position}else et(s)?(Ot(e,r,o,!0),_m(e,ee(e,!1,t)),r=o=e.position):e.position===e.lineStart&&Da(e)?D(e,"unexpected end of the document within a double quoted scalar"):(e.position++,o=e.position)}D(e,"unexpected end of the stream within a double quoted scalar")}function II(e,t){var r=!0,o,n,i,a=e.tag,s,c=e.anchor,l,p,d,m,h,f=Object.create(null),w,_,A,R;if(R=e.input.charCodeAt(e.position),R===91)p=93,h=!1,s=[];else if(R===123)p=125,h=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),R=e.input.charCodeAt(++e.position);R!==0;){if(ee(e,!0,t),R=e.input.charCodeAt(e.position),R===p)return e.position++,e.tag=a,e.anchor=c,e.kind=h?"mapping":"sequence",e.result=s,!0;r?R===44&&D(e,"expected the node content, but found ','"):D(e,"missed comma between flow collection entries"),_=w=A=null,d=m=!1,R===63&&(l=e.input.charCodeAt(e.position+1),Ae(l)&&(d=m=!0,e.position++,ee(e,!0,t))),o=e.line,n=e.lineStart,i=e.position,sr(e,t,Ca,!1,!0),_=e.tag,w=e.result,ee(e,!0,t),R=e.input.charCodeAt(e.position),(m||e.line===o)&&R===58&&(d=!0,R=e.input.charCodeAt(++e.position),ee(e,!0,t),sr(e,t,Ca,!1,!0),A=e.result),h?ar(e,s,f,_,w,A,o,n,i):d?s.push(ar(e,null,f,_,w,A,o,n,i)):s.push(w),ee(e,!0,t),R=e.input.charCodeAt(e.position),R===44?(r=!0,R=e.input.charCodeAt(++e.position)):r=!1}D(e,"unexpected end of the stream within a flow collection")}function CI(e,t){var r,o,n=dm,i=!1,a=!1,s=t,c=0,l=!1,p,d;if(d=e.input.charCodeAt(e.position),d===124)o=!1;else if(d===62)o=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)dm===n?n=d===43?Bb:yI:D(e,"repeat of a chomping mode identifier");else if((p=xI(d))>=0)p===0?D(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?D(e,"repeat of an indentation width identifier"):(s=t+p-1,a=!0);else break;if(an(d)){do d=e.input.charCodeAt(++e.position);while(an(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!et(d)&&d!==0)}for(;d!==0;){for(bm(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!a||e.lineIndent<s)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>s&&(s=e.lineIndent),et(d)){c++;continue}if(e.lineIndent<s){n===Bb?e.result+=te.repeat(`
7797
- `,i?1+c:c):n===dm&&i&&(e.result+=`
7798
- `);break}for(o?an(d)?(l=!0,e.result+=te.repeat(`
7799
- `,i?1+c:c)):l?(l=!1,e.result+=te.repeat(`
7800
- `,c+1)):c===0?i&&(e.result+=" "):e.result+=te.repeat(`
7801
- `,c):e.result+=te.repeat(`
7802
- `,i?1+c:c),i=!0,a=!0,c=0,r=e.position;!et(d)&&d!==0;)d=e.input.charCodeAt(++e.position);Ot(e,r,e.position,!1)}return!0}function Hb(e,t){var r,o=e.tag,n=e.anchor,i=[],a,s=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=i),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,D(e,"tab characters must not be used in indentation")),!(c!==45||(a=e.input.charCodeAt(e.position+1),!Ae(a))));){if(s=!0,e.position++,ee(e,!0,-1)&&e.lineIndent<=t){i.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,sr(e,t,$_,!1,!0),i.push(e.result),ee(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&c!==0)D(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return s?(e.tag=o,e.anchor=n,e.kind="sequence",e.result=i,!0):!1}function PI(e,t,r){var o,n,i,a,s,c,l=e.tag,p=e.anchor,d={},m=Object.create(null),h=null,f=null,w=null,_=!1,A=!1,R;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),R=e.input.charCodeAt(e.position);R!==0;){if(!_&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,D(e,"tab characters must not be used in indentation")),o=e.input.charCodeAt(e.position+1),i=e.line,(R===63||R===58)&&Ae(o))R===63?(_&&(ar(e,d,m,h,f,null,a,s,c),h=f=w=null),A=!0,_=!0,n=!0):_?(_=!1,n=!0):D(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,R=o;else{if(a=e.line,s=e.lineStart,c=e.position,!sr(e,r,S_,!1,!0))break;if(e.line===i){for(R=e.input.charCodeAt(e.position);an(R);)R=e.input.charCodeAt(++e.position);if(R===58)R=e.input.charCodeAt(++e.position),Ae(R)||D(e,"a whitespace character is expected after the key-value separator within a block mapping"),_&&(ar(e,d,m,h,f,null,a,s,c),h=f=w=null),A=!0,_=!1,n=!1,h=e.tag,f=e.result;else if(A)D(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=l,e.anchor=p,!0}else if(A)D(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=l,e.anchor=p,!0}if((e.line===i||e.lineIndent>t)&&(_&&(a=e.line,s=e.lineStart,c=e.position),sr(e,t,Pa,!0,n)&&(_?f=e.result:w=e.result),_||(ar(e,d,m,h,f,w,a,s,c),h=f=w=null),ee(e,!0,-1),R=e.input.charCodeAt(e.position)),(e.line===i||e.lineIndent>t)&&R!==0)D(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return _&&ar(e,d,m,h,f,null,a,s,c),A&&(e.tag=l,e.anchor=p,e.kind="mapping",e.result=d),A}function OI(e){var t,r=!1,o=!1,n,i,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&D(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(r=!0,a=e.input.charCodeAt(++e.position)):a===33?(o=!0,n="!!",a=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(i=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):D(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!Ae(a);)a===33&&(o?D(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),E_.test(n)||D(e,"named tag handle cannot contain such characters"),o=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),_I.test(i)&&D(e,"tag suffix cannot contain flow indicator characters")}i&&!T_.test(i)&&D(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch{D(e,"tag name is malformed: "+i)}return r?e.tag=i:Nt.call(e.tagMap,n)?e.tag=e.tagMap[n]+i:n==="!"?e.tag="!"+i:n==="!!"?e.tag="tag:yaml.org,2002:"+i:D(e,'undeclared tag handle "'+n+'"'),!0}function NI(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&D(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Ae(r)&&!ir(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&D(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function RI(e){var t,r,o;if(o=e.input.charCodeAt(e.position),o!==42)return!1;for(o=e.input.charCodeAt(++e.position),t=e.position;o!==0&&!Ae(o)&&!ir(o);)o=e.input.charCodeAt(++e.position);return e.position===t&&D(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Nt.call(e.anchorMap,r)||D(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],ee(e,!0,-1),!0}function sr(e,t,r,o,n){var i,a,s,c=1,l=!1,p=!1,d,m,h,f,w,_;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,i=a=s=Pa===r||$_===r,o&&ee(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;OI(e)||NI(e);)ee(e,!0,-1)?(l=!0,s=i,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):s=!1;if(s&&(s=l||n),(c===1||Pa===r)&&(Ca===r||S_===r?w=t:w=t+1,_=e.position-e.lineStart,c===1?s&&(Hb(e,_)||PI(e,_,w))||II(e,w)?p=!0:(a&&CI(e,w)||TI(e,w)||AI(e,w)?p=!0:RI(e)?(p=!0,(e.tag!==null||e.anchor!==null)&&D(e,"alias node should not have any properties")):EI(e,w,Ca===r)&&(p=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(p=s&&Hb(e,_))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&D(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,m=e.implicitTypes.length;d<m;d+=1)if(f=e.implicitTypes[d],f.resolve(e.result)){e.result=f.construct(e.result),e.tag=f.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Nt.call(e.typeMap[e.kind||"fallback"],e.tag))f=e.typeMap[e.kind||"fallback"][e.tag];else for(f=null,h=e.typeMap.multi[e.kind||"fallback"],d=0,m=h.length;d<m;d+=1)if(e.tag.slice(0,h[d].tag.length)===h[d].tag){f=h[d];break}f||D(e,"unknown tag !<"+e.tag+">"),e.result!==null&&f.kind!==e.kind&&D(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):D(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||p}function DI(e){var t=e.position,r,o,n,i=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(ee(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(i=!0,a=e.input.charCodeAt(++e.position),r=e.position;a!==0&&!Ae(a);)a=e.input.charCodeAt(++e.position);for(o=e.input.slice(r,e.position),n=[],o.length<1&&D(e,"directive name must not be less than one character in length");a!==0;){for(;an(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!et(a));break}if(et(a))break;for(r=e.position;a!==0&&!Ae(a);)a=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}a!==0&&bm(e),Nt.call(Wb,o)?Wb[o](e,o,n):Oa(e,'unknown document directive "'+o+'"')}if(ee(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,ee(e,!0,-1)):i&&D(e,"directives end mark is expected"),sr(e,e.lineIndent-1,Pa,!1,!0),ee(e,!0,-1),e.checkLineBreaks&&bI.test(e.input.slice(t,e.position))&&Oa(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Da(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,ee(e,!0,-1));return}if(e.position<e.length-1)D(e,"end of the stream or a document separator is expected");else return}function O_(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
7803
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new $I(e,t),o=e.indexOf("\0");for(o!==-1&&(r.position=o,D(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)DI(r);return r.documents}function jI(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var o=O_(e,r);if(typeof t!="function")return o;for(var n=0,i=o.length;n<i;n+=1)t(o[n])}function LI(e,t){var r=O_(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new we("expected a single document in the stream, but found more")}}function o0(e,t){var r,o,n,i,a,s,c;if(t===null)return{};for(r={},o=Object.keys(t),n=0,i=o.length;n<i;n+=1)a=o[n],s=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),c=e.compiledTypeMap.fallback[a],c&&D_.call(c.styleAliases,s)&&(s=c.styleAliases[s]),r[a]=s;return r}function i0(e){var t,r,o;if(t=e.toString(16).toUpperCase(),e<=255)r="x",o=2;else if(e<=65535)r="u",o=4;else if(e<=4294967295)r="U",o=8;else throw new we("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+te.repeat("0",o-t.length)+t}function s0(e){this.schema=e.schema||vm,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=te.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=o0(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?bo:a0,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Jb(e,t){for(var r=te.repeat(" ",t),o=0,n=-1,i="",a,s=e.length;o<s;)n=e.indexOf(`
8071
+ `)}h.write("payload.value = newResult;"),h.write("return payload;");let w=h.compile();return(C,D)=>w(m,C,D)},i,a=nn,s=!en.jitless,d=s&&ac.value,u=t.catchall,p;e._zod.parse=(m,h)=>{p??(p=o.value);let f=m.value;return a(f)?s&&d&&h?.async===!1&&h.jitless!==!0?(i||(i=n(t.shape)),m=i(m,h),u?Eg([],f,m,h,p,e):m):r(m,h):(m.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),m)}});Hr=g("$ZodUnion",(e,t)=>{G.init(e,t),W(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),W(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),W(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),W(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(n=>n._zod.pattern);return new RegExp(`^(${o.map(n=>Lr(n.source)).join("|")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,n)=>{if(r)return r(o,n);let i=!1,a=[];for(let s of t.options){let c=s._zod.run({value:o.value,issues:[]},n);if(c instanceof Promise)a.push(c),i=!0;else{if(c.issues.length===0)return c;a.push(c)}}return i?Promise.all(a).then(s=>dg(s,o,e,n)):dg(a,o,e,n)}});ed=g("$ZodXor",(e,t)=>{Hr.init(e,t),t.inclusive=!1;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,n)=>{if(r)return r(o,n);let i=!1,a=[];for(let s of t.options){let c=s._zod.run({value:o.value,issues:[]},n);c instanceof Promise?(a.push(c),i=!0):a.push(c)}return i?Promise.all(a).then(s=>ug(s,o,e,n)):ug(a,o,e,n)}}),td=g("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Hr.init(e,t);let r=e._zod.parse;W(e._zod,"propValues",()=>{let n={};for(let i of t.options){let a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[s,c]of Object.entries(a)){n[s]||(n[s]=new Set);for(let d of c)n[s].add(d)}}return n});let o=Cn(()=>{let n=t.options,i=new Map;for(let a of n){let s=a._zod.propValues?.[t.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let c of s){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,a)}}return i});e._zod.parse=(n,i)=>{let a=n.value;if(!nn(a))return n.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),n;let s=o.value.get(a?.[t.discriminator]);return s?s._zod.run(n,i):t.unionFallback||i.direction==="backward"?r(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:a,path:[t.discriminator],inst:e}),n)}}),nd=g("$ZodIntersection",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),a=t.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([c,d])=>pg(r,c,d)):pg(r,i,a)}});wi=g("$ZodTuple",(e,t)=>{G.init(e,t);let r=t.items;e._zod.parse=(o,n)=>{let i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];let a=[],s=mg(r,"optin"),c=mg(r,"optout");if(!t.rest){if(i.length<s)return o.issues.push({code:"too_small",minimum:s,inclusive:!0,input:i,inst:e,origin:"array"}),o;i.length>r.length&&o.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:i,inst:e,origin:"array"})}let d=new Array(r.length);for(let u=0;u<r.length;u++){let p=r[u]._zod.run({value:i[u],issues:[]},n);p instanceof Promise?a.push(p.then(m=>{d[u]=m})):d[u]=p}if(t.rest){let u=r.length-1,p=i.slice(r.length);for(let m of p){u++;let h=t.rest._zod.run({value:m,issues:[]},n);h instanceof Promise?a.push(h.then(f=>hg(f,o,u))):hg(h,o,u)}}return a.length?Promise.all(a).then(()=>fg(d,o,r,i,c)):fg(d,o,r,i,c)}});rd=g("$ZodRecord",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Pt(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let i=[],a=t.keyType._zod.values;if(a){r.value={};let s=new Set;for(let d of a)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){s.add(typeof d=="number"?d.toString():d);let u=t.keyType._zod.run({value:d,issues:[]},o);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(h=>we(h,o,ne())),input:d,path:[d],inst:e});continue}let p=u.value,m=t.valueType._zod.run({value:n[d],issues:[]},o);m instanceof Promise?i.push(m.then(h=>{h.issues.length&&r.issues.push(...Te(d,h.issues)),r.value[p]=h.value})):(m.issues.length&&r.issues.push(...Te(d,m.issues)),r.value[p]=m.value)}let c;for(let d in n)s.has(d)||(c=c??[],c.push(d));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:c})}else{r.value={};for(let s of Reflect.ownKeys(n)){if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(n,s))continue;let c=t.keyType._zod.run({value:s,issues:[]},o);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&di.test(s)&&c.issues.length){let p=t.keyType._zod.run({value:Number(s),issues:[]},o);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(c=p)}if(c.issues.length){t.mode==="loose"?r.value[s]=n[s]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(p=>we(p,o,ne())),input:s,path:[s],inst:e});continue}let u=t.valueType._zod.run({value:n[s],issues:[]},o);u instanceof Promise?i.push(u.then(p=>{p.issues.length&&r.issues.push(...Te(s,p.issues)),r.value[c.value]=p.value})):(u.issues.length&&r.issues.push(...Te(s,u.issues)),r.value[c.value]=u.value)}}return i.length?Promise.all(i).then(()=>r):r}}),od=g("$ZodMap",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;let i=[];r.value=new Map;for(let[a,s]of n){let c=t.keyType._zod.run({value:a,issues:[]},o),d=t.valueType._zod.run({value:s,issues:[]},o);c instanceof Promise||d instanceof Promise?i.push(Promise.all([c,d]).then(([u,p])=>{gg(u,p,r,a,n,e,o)})):gg(c,d,r,a,n,e,o)}return i.length?Promise.all(i).then(()=>r):r}});id=g("$ZodSet",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;let i=[];r.value=new Set;for(let a of n){let s=t.valueType._zod.run({value:a,issues:[]},o);s instanceof Promise?i.push(s.then(c=>yg(c,r))):yg(s,r)}return i.length?Promise.all(i).then(()=>r):r}});ad=g("$ZodEnum",(e,t)=>{G.init(e,t);let r=jr(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(n=>Mr.has(typeof n)).map(n=>typeof n=="string"?Ge(n):n.toString()).join("|")})$`),e._zod.parse=(n,i)=>{let a=n.value;return o.has(a)||n.issues.push({code:"invalid_value",values:r,input:a,inst:e}),n}}),sd=g("$ZodLiteral",(e,t)=>{if(G.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?Ge(o):o?Ge(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,n)=>{let i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),cd=g("$ZodFile",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),ld=g("$ZodTransform",(e,t)=>{G.init(e,t),e._zod.optin="optional",e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new At(e.constructor.name);let n=t.transform(r.value,r);if(o.async)return(n instanceof Promise?n:Promise.resolve(n)).then(a=>(r.value=a,r.fallback=!0,r));if(n instanceof Promise)throw new Je;return r.value=n,r.fallback=!0,r}});ki=g("$ZodOptional",(e,t)=>{G.init(e,t),e._zod.optin="optional",e._zod.optout="optional",W(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),W(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Lr(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin==="optional"){let n=r.value,i=t.innerType._zod.run(r,o);return i instanceof Promise?i.then(a=>vg(a,n)):vg(i,n)}return r.value===void 0?r:t.innerType._zod.run(r,o)}}),dd=g("$ZodExactOptional",(e,t)=>{ki.init(e,t),W(e._zod,"values",()=>t.innerType._zod.values),W(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,o)=>t.innerType._zod.run(r,o)}),ud=g("$ZodNullable",(e,t)=>{G.init(e,t),W(e._zod,"optin",()=>t.innerType._zod.optin),W(e._zod,"optout",()=>t.innerType._zod.optout),W(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Lr(r.source)}|null)$`):void 0}),W(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:t.innerType._zod.run(r,o)}),pd=g("$ZodDefault",(e,t)=>{G.init(e,t),e._zod.optin="optional",W(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>bg(i,t)):bg(n,t)}});md=g("$ZodPrefault",(e,t)=>{G.init(e,t),e._zod.optin="optional",W(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,o))}),hd=g("$ZodNonOptional",(e,t)=>{G.init(e,t),W(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>_g(i,e)):_g(n,e)}});fd=g("$ZodSuccess",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new At("ZodSuccess");let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),gd=g("$ZodCatch",(e,t)=>{G.init(e,t),e._zod.optin="optional",W(e._zod,"optout",()=>t.innerType._zod.optout),W(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(a=>we(a,o,ne()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(i=>we(i,o,ne()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),yd=g("$ZodNaN",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),xi=g("$ZodPipe",(e,t)=>{G.init(e,t),W(e._zod,"values",()=>t.in._zod.values),W(e._zod,"optin",()=>t.in._zod.optin),W(e._zod,"optout",()=>t.out._zod.optout),W(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(a=>fi(a,t.in,o)):fi(i,t.in,o)}let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>fi(i,t.out,o)):fi(n,t.out,o)}});Jr=g("$ZodCodec",(e,t)=>{G.init(e,t),W(e._zod,"values",()=>t.in._zod.values),W(e._zod,"optin",()=>t.in._zod.optin),W(e._zod,"optout",()=>t.out._zod.optout),W(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(r,o);return i instanceof Promise?i.then(a=>gi(a,t,o)):gi(i,t,o)}else{let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(a=>gi(a,t,o)):gi(i,t,o)}}});vd=g("$ZodPreprocess",(e,t)=>{xi.init(e,t)}),bd=g("$ZodReadonly",(e,t)=>{G.init(e,t),W(e._zod,"propValues",()=>t.innerType._zod.propValues),W(e._zod,"values",()=>t.innerType._zod.values),W(e._zod,"optin",()=>t.innerType?._zod?.optin),W(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(wg):wg(n)}});_d=g("$ZodTemplateLiteral",(e,t)=>{G.init(e,t);let r=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let n=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=n.startsWith("^")?1:0,a=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(i,a))}else if(o===null||cc.has(typeof o))r.push(Ge(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(o,n)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o)}),wd=g("$ZodFunction",(e,t)=>(G.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...o){let n=e._def.input?Qo(e._def.input,o):o,i=Reflect.apply(r,this,n);return e._def.output?Qo(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let n=e._def.input?await ei(e._def.input,o):o,i=await Reflect.apply(r,this,n);return e._def.output?await ei(e._def.output,i):i}},e._zod.parse=(r,o)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let o=e.constructor;return Array.isArray(r[0])?new o({type:"function",input:new wi({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new o({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:r})},e)),kd=g("$ZodPromise",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o))}),xd=g("$ZodLazy",(e,t)=>{G.init(e,t),W(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),W(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),W(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),W(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),W(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o)}),Sd=g("$ZodCustom",(e,t)=>{q.init(e,t),G.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=r=>{let o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then(i=>kg(i,r,o,e));kg(n,r,o,e)}})});function Ag(){return{localeError:LE()}}var LE,Ig=v(()=>{L();LE=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(n){return e[n]??null}let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return n.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${x(n.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${r[i.format]??n.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${n.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${b(n.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}}});function Cg(){return{localeError:ME()}}var ME,Pg=v(()=>{L();ME=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${s}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${x(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[i.format]??n.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${b(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}}});function Og(e,t,r,o){let n=Math.abs(e),i=n%10,a=n%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?r:o}function Ng(){return{localeError:zE()}}var zE,Rg=v(()=>{L();zE=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(n){return e[n]??null}let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},o={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${x(n.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=Og(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${n.maximum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=Og(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${n.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${b(n.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${n.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}}});function Dg(){return{localeError:UE()}}var UE,jg=v(()=>{L();UE=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${x(n.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${n.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${n.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;if(i.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${i.prefix}"`;if(i.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${i.suffix}"`;if(i.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${i.includes}"`;if(i.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${i.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${r[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${n.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u043E\u0432\u0435":""}: ${b(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}}});function Lg(){return{localeError:FE()}}var FE,Mg=v(()=>{L();FE=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${s}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${x(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${b(n.values," o ")}`;case"too_big":{let i=n.inclusive?"com a m\xE0xim":"menys de",a=t(n.origin);return a?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${i} ${n.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(n.origin);return a?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${i} ${n.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${r[i.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${n.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${n.origin}`;default:return"Entrada inv\xE0lida"}}}});function zg(){return{localeError:GE()}}var GE,Ug=v(()=>{L();GE=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(n){return e[n]??null}let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${s}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${x(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${r[i.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${b(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${n.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${n.origin}`;default:return"Neplatn\xFD vstup"}}}});function Fg(){return{localeError:BE()}}var BE,Gg=v(()=>{L();BE=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(n){return e[n]??null}let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${s}`:`Ugyldigt input: forventede ${i}, fik ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${x(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin),s=o[n.origin]??n.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${i} ${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin),s=o[n.origin]??n.origin;return a?`For lille: forventede ${s} ${a.verb} ${i} ${n.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${b(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${n.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${n.origin}`;default:return"Ugyldigt input"}}}});function Bg(){return{localeError:WE()}}var WE,Wg=v(()=>{L();WE=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},o={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${s}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${x(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ist`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ist`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${r[i.format]??n.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${b(n.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${n.origin}`;default:return"Ung\xFCltige Eingabe"}}}});function Zg(){return{localeError:ZE()}}var ZE,Kg=v(()=>{L();ZE=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(n){return e[n]??null}let r={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return typeof n.expected=="string"&&/^[A-Z]/.test(n.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${n.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}case"invalid_value":return n.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${x(n.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${n.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${n.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${i.prefix}"`:i.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${i.suffix}"`:i.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${i.includes}"`:i.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${i.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[i.format]??n.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${n.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${n.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${n.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${b(n.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${n.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${n.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}}});function Si(){return{localeError:KE()}}var KE,Ed=v(()=>{L();KE=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return`Invalid input: expected ${i}, received ${s}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${x(n.values[0])}`:`Invalid option: expected one of ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Too big: expected ${n.origin??"value"} to have ${i}${n.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Too small: expected ${n.origin} to have ${i}${n.minimum.toString()} ${a.unit}`:`Too small: expected ${n.origin} to be ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${r[i.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`Invalid discriminator value. Expected ${n.options.map(a=>`'${a}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}}});function Vg(){return{localeError:VE()}}var VE,Hg=v(()=>{L();VE=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${s}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${x(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${i}${n.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${r[i.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}}});function Jg(){return{localeError:HE()}}var HE,Yg=v(()=>{L();HE=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${s}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${x(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin),s=o[n.origin]??n.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${i}${n.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin),s=o[n.origin]??n.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${i}${n.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${r[i.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o[n.origin]??n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o[n.origin]??n.origin}`;default:return"Entrada inv\xE1lida"}}}});function qg(){return{localeError:JE()}}var JE,Xg=v(()=>{L();JE=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(n){return e[n]??null}let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${x(n.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${b(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[i.format]??n.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${n.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${b(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${n.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}}});function Qg(){return{localeError:YE()}}var YE,ey=v(()=>{L();YE=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(n){return e[n]??null}let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${s}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${x(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${i}${n.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${i}${n.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${r[i.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${b(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}}});function ty(){return{localeError:qE()}}var qE,ny=v(()=>{L();qE=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${s} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${x(n.values[0])} attendu`:`Option invalide : une valeur parmi ${b(n.values,"|")} attendue`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Trop grand : ${o[n.origin]??"valeur"} doit ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${o[n.origin]??"valeur"} doit \xEAtre ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Trop petit : ${o[n.origin]??"valeur"} doit ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Trop petit : ${o[n.origin]??"valeur"} doit \xEAtre ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${r[i.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${b(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}}});function ry(){return{localeError:XE()}}var XE,oy=v(()=>{L();XE=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${s}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${x(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u2264":"<",a=t(n.origin);return a?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${i}${n.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u2265":">",a=t(n.origin);return a?`Trop petit : attendu que ${n.origin} ait ${i}${n.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${n.origin} soit ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${r[i.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${b(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}}});function iy(){return{localeError:QE()}}var QE,ay=v(()=>{L();QE=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=d=>d?e[d]:void 0,o=d=>{let u=r(d);return u?u.label:d??e.unknown.label},n=d=>`\u05D4${o(d)}`,i=d=>(r(d)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=d=>d?t[d]??null:null,s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},c={nan:"NaN"};return d=>{switch(d.code){case"invalid_type":{let u=d.expected,p=c[u??""]??o(u),m=S(d.input),h=c[m]??e[m]?.label??m;return/^[A-Z]/.test(d.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${d.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`}case"invalid_value":{if(d.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${x(d.values[0])}`;let u=d.values.map(h=>x(h));if(d.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${u[0]} \u05D0\u05D5 ${u[1]}`;let p=u[u.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${u.slice(0,-1).join(", ")} \u05D0\u05D5 ${p}`}case"too_big":{let u=a(d.origin),p=n(d.origin??"value");if(d.origin==="string")return`${u?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${d.maximum.toString()} ${u?.unit??""} ${d.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(d.origin==="number"){let f=d.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${d.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${d.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${f}`}if(d.origin==="array"||d.origin==="set"){let f=d.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",_=d.inclusive?`${d.maximum} ${u?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${d.maximum} ${u?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} ${f} \u05DC\u05D4\u05DB\u05D9\u05DC ${_}`.trim()}let m=d.inclusive?"<=":"<",h=i(d.origin??"value");return u?.unit?`${u.longLabel} \u05DE\u05D3\u05D9: ${p} ${h} ${m}${d.maximum.toString()} ${u.unit}`:`${u?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${p} ${h} ${m}${d.maximum.toString()}`}case"too_small":{let u=a(d.origin),p=n(d.origin??"value");if(d.origin==="string")return`${u?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${d.minimum.toString()} ${u?.unit??""} ${d.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(d.origin==="number"){let f=d.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${d.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${d.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${f}`}if(d.origin==="array"||d.origin==="set"){let f=d.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(d.minimum===1&&d.inclusive){let T=(d.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${f} \u05DC\u05D4\u05DB\u05D9\u05DC ${T}`}let _=d.inclusive?`${d.minimum} ${u?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${d.minimum} ${u?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${f} \u05DC\u05D4\u05DB\u05D9\u05DC ${_}`.trim()}let m=d.inclusive?">=":">",h=i(d.origin??"value");return u?.unit?`${u.shortLabel} \u05DE\u05D3\u05D9: ${p} ${h} ${m}${d.minimum.toString()} ${u.unit}`:`${u?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${p} ${h} ${m}${d.minimum.toString()}`}case"invalid_format":{let u=d;if(u.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${u.prefix}"`;if(u.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${u.suffix}"`;if(u.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${u.includes}"`;if(u.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${u.pattern}`;let p=s[u.format],m=p?.label??u.format,f=(p?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${m} \u05DC\u05D0 ${f}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${d.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${d.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${d.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${b(d.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n(d.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}}});function sy(){return{localeError:eT()}}var eT,cy=v(()=>{L();eT=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(n){return e[n]??null}let r={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},o={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${n.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${s}`}case"invalid_value":return n.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${x(n.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin),s=o[n.origin]??n.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${i}${n.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin),s=o[n.origin]??n.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${i}${n.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${i.prefix}"`:i.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${i.suffix}"`:i.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${i.includes}"`:i.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`:`Neispravna ${r[i.format]??n.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${n.divisor}`;case"unrecognized_keys":return`Neprepoznat${n.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${b(n.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${o[n.origin]??n.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${o[n.origin]??n.origin}`;default:return"Neispravan unos"}}}});function ly(){return{localeError:tT()}}var tT,dy=v(()=>{L();tT=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}let r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},o={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${x(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${n.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${i}${n.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[i.format]??n.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${n.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}}});function uy(e,t,r){return Math.abs(e)===1?t:r}function Ln(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}function py(){return{localeError:nT()}}var nT,my=v(()=>{L();nT=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(n){return e[n]??null}let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},o={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${n.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return n.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${x(n.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=uy(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ln(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${n.maximum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ln(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=uy(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ln(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${n.minimum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ln(n.origin)} \u056C\u056B\u0576\u056B ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[i.format]??n.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${n.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${n.keys.length>1?"\u0576\u0565\u0580":""}. ${b(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Ln(n.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Ln(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}}});function hy(){return{localeError:rT()}}var rT,fy=v(()=>{L();rT=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${i}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${x(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${i}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: diharapkan ${n.origin} memiliki ${i}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${r[i.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}}});function gy(){return{localeError:oT()}}var oT,yy=v(()=>{L();oT=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(n){return e[n]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},o={nan:"NaN",number:"n\xFAmer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${x(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${i}${n.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} s\xE9 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${i}${n.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${r[i.format]??n.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${b(n.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${n.origin}`;default:return"Rangt gildi"}}}});function vy(){return{localeError:iT()}}var iT,by=v(()=>{L();iT=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${s}`:`Input non valido: atteso ${i}, ricevuto ${s}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${x(n.values[0])}`:`Opzione non valida: atteso uno tra ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Troppo grande: ${n.origin??"valore"} deve avere ${i}${n.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Troppo piccolo: ${n.origin} deve avere ${i}${n.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${n.origin} deve essere ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Input non valido: ${r[i.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${b(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}}});function _y(){return{localeError:aT()}}var aT,wy=v(()=>{L();aT=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(n){return e[n]??null}let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},o={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${x(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${b(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(n.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${a.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(n.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${a.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[i.format]??n.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${n.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${n.keys.length>1?"\u7FA4":""}: ${b(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}}});function ky(){return{localeError:sT()}}var sT,xy=v(()=>{L();sT=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(n){return e[n]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},o={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${n.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return n.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${x(n.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${b(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${n.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${n.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${b(n.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${n.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${n.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}}});function $i(){return{localeError:cT()}}var cT,Td=v(()=>{L();cT=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(n){return e[n]??null}let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},o={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return n.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${x(n.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${n.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${b(n.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}}});function Sy(){return $i()}var $y=v(()=>{Td()});function Ey(){return{localeError:lT()}}var lT,Ty=v(()=>{L();lT=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(n){return e[n]??null}let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${x(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${b(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(n.origin),c=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${c} ${i}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${i}${a}`}case"too_small":{let i=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(n.origin),c=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${c} ${i}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${i}${a}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[i.format]??n.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${b(n.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}}});function Ay(e){let t=Math.abs(e),r=t%10,o=t%100;return o>=11&&o<=19||r===0?"many":r===1?"one":"few"}function Iy(){return{localeError:dT()}}var Yr,dT,Cy=v(()=>{L();Yr=e=>e.charAt(0).toUpperCase()+e.slice(1);dT=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(n,i,a,s){let c=e[n]??null;return c===null?c:{unit:c.unit[i],verb:c.verb[s][a?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},o={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${i}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${x(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${b(n.values,"|")} pasirinkim\u0173`;case"too_big":{let i=o[n.origin]??n.origin,a=t(n.origin,Ay(Number(n.maximum)),n.inclusive??!1,"smaller");if(a?.verb)return`${Yr(i??n.origin??"reik\u0161m\u0117")} ${a.verb} ${n.maximum.toString()} ${a.unit??"element\u0173"}`;let s=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Yr(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.maximum.toString()} ${a?.unit}`}case"too_small":{let i=o[n.origin]??n.origin,a=t(n.origin,Ay(Number(n.minimum)),n.inclusive??!1,"bigger");if(a?.verb)return`${Yr(i??n.origin??"reik\u0161m\u0117")} ${a.verb} ${n.minimum.toString()} ${a.unit??"element\u0173"}`;let s=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Yr(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.minimum.toString()} ${a?.unit}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${r[i.format]??n.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${b(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=o[n.origin]??n.origin;return`${Yr(i??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}}});function Py(){return{localeError:uT()}}var uT,Oy=v(()=>{L();uT=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(n){return e[n]??null}let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},o={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${x(n.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${r[i.format]??n.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${b(n.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${n.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}}});function Ny(){return{localeError:pT()}}var pT,Ry=v(()=>{L();pT=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${s}`:`Input tidak sah: dijangka ${i}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${x(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: dijangka ${n.origin??"nilai"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: dijangka ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${r[i.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${b(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}}});function Dy(){return{localeError:mT()}}var mT,jy=v(()=>{L();mT=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(n){return e[n]??null}let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},o={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${i}, ontving ${s}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${x(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin),s=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} is`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin),s=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${n.origin} ${i}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${n.origin} ${i}${n.minimum.toString()} is`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${r[i.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}}});function Ly(){return{localeError:hT()}}var hT,My=v(()=>{L();hT=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(n){return e[n]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${s}`:`Ugyldig input: forventet ${i}, fikk ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${x(n.values[0])}`:`Ugyldig valg: forventet en av ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${b(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}}});function zy(){return{localeError:fT()}}var fT,Uy=v(()=>{L();fT=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${x(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=n;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[i.format]??n.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}}});function Fy(){return{localeError:gT()}}var gT,Gy=v(()=>{L();gT=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(n){return e[n]??null}let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${x(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${b(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[i.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${b(n.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${n.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}}});function By(){return{localeError:yT()}}var yT,Wy=v(()=>{L();yT=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(n){return e[n]??null}let r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},o={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${s}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${x(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[i.format]??n.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${n.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}}});function Zy(){return{localeError:vT()}}var vT,Ky=v(()=>{L();vT=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}let r={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",number:"n\xFAmero",null:"nulo"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${s}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${s}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${x(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${i}${n.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Muito pequeno: esperado que ${n.origin} tivesse ${i}${n.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${r[i.format]??n.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${b(n.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${n.origin}`;default:return"Campo inv\xE1lido"}}}});function Vy(){return{localeError:bT()}}var bT,Hy=v(()=>{L();bT=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(n){return e[n]??null}let r={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},o={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${s}`}case"invalid_value":return n.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${x(n.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} s\u0103 fie ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Prea mic: a\u0219teptat ca ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${n.origin} s\u0103 fie ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${i.prefix}"`:i.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${i.suffix}"`:i.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${i.includes}"`:i.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${i.pattern}`:`Format invalid: ${r[i.format]??n.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${n.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${b(n.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${n.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${n.origin}`;default:return"Intrare invalid\u0103"}}}});function Jy(e,t,r,o){let n=Math.abs(e),i=n%10,a=n%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?r:o}function Yy(){return{localeError:_T()}}var _T,qy=v(()=>{L();_T=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${x(n.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=Jy(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.maximum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=Jy(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.minimum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${b(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}}});function Xy(){return{localeError:wT()}}var wT,Qy=v(()=>{L();wT=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}let r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},o={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${s}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${x(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${i}${n.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${i}${n.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${r[i.format]??n.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${b(n.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}}});function ev(){return{localeError:kT()}}var kT,tv=v(()=>{L();kT=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(n){return e[n]??null}let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},o={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${s}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${x(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${r[i.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${b(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}}});function nv(){return{localeError:xT()}}var xT,rv=v(()=>{L();xT=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(n){return e[n]??null}let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return n.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${x(n.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${b(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${b(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}}});function ov(){return{localeError:ST()}}var ST,iv=v(()=>{L();ST=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(n){return e[n]??null}let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},o={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${x(n.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(n.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(n.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[i.format]??n.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${n.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${b(n.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}}});function av(){return{localeError:$T()}}var $T,sv=v(()=>{L();$T=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(n){return e[n]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${x(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[i.format]??n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${b(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}}});function Ei(){return{localeError:ET()}}var ET,Ad=v(()=>{L();ET=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${x(n.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} \u0431\u0443\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${b(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${n.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}}});function cv(){return Ei()}var lv=v(()=>{Ad()});function dv(){return{localeError:TT()}}var TT,uv=v(()=>{L();TT=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(n){return e[n]??null}let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},o={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${x(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${b(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${i}${n.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${i}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${n.keys.length>1?"\u0632":""}: ${b(n.keys,"\u060C ")}`;case"invalid_key":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}}});function pv(){return{localeError:AT()}}var AT,mv=v(()=>{L();AT=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(n){return e[n]??null}let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},o={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${s}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${x(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Juda kichik: kutilgan ${n.origin} ${i}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[i.format]??n.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${n.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${n.keys.length>1?"lar":""}: ${b(n.keys,", ")}`;case"invalid_key":return`${n.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${n.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}}});function hv(){return{localeError:IT()}}var IT,fv=v(()=>{L();IT=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(n){return e[n]??null}let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},o={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${x(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${r[i.format]??n.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${n.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${b(n.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}}});function gv(){return{localeError:CT()}}var CT,yv=v(()=>{L();CT=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(n){return e[n]??null}let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},o={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${x(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${r[i.format]??n.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${b(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}}});function vv(){return{localeError:PT()}}var PT,bv=v(()=>{L();PT=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(n){return e[n]??null}let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${n.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${x(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${b(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}}});function _v(){return{localeError:OT()}}var OT,wv=v(()=>{L();OT=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(n){return e[n]??null}let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},o={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=S(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${n.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${x(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${b(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${a.verb} ${i}${n.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.maximum}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${a.verb} ${i}${n.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.minimum}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${r[i.format]??n.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${n.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${b(n.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}}});var qr={};nt(qr,{ar:()=>Ag,az:()=>Cg,be:()=>Ng,bg:()=>Dg,ca:()=>Lg,cs:()=>zg,da:()=>Fg,de:()=>Bg,el:()=>Zg,en:()=>Si,eo:()=>Vg,es:()=>Jg,fa:()=>qg,fi:()=>Qg,fr:()=>ty,frCA:()=>ry,he:()=>iy,hr:()=>sy,hu:()=>ly,hy:()=>py,id:()=>hy,is:()=>gy,it:()=>vy,ja:()=>_y,ka:()=>ky,kh:()=>Sy,km:()=>$i,ko:()=>Ey,lt:()=>Iy,mk:()=>Py,ms:()=>Ny,nl:()=>Dy,no:()=>Ly,ota:()=>zy,pl:()=>By,ps:()=>Fy,pt:()=>Zy,ro:()=>Vy,ru:()=>Yy,sl:()=>Xy,sv:()=>ev,ta:()=>nv,th:()=>ov,tr:()=>av,ua:()=>cv,uk:()=>Ei,ur:()=>dv,uz:()=>pv,vi:()=>hv,yo:()=>_v,zhCN:()=>gv,zhTW:()=>vv});var Id=v(()=>{Ig();Pg();Rg();jg();Mg();Ug();Gg();Wg();Kg();Ed();Hg();Yg();Xg();ey();ny();oy();ay();cy();dy();my();fy();yy();by();wy();xy();$y();Td();Ty();Cy();Oy();Ry();jy();My();Uy();Gy();Wy();Ky();Hy();qy();Qy();tv();rv();iv();sv();lv();Ad();uv();mv();fv();yv();bv();wv()});function Ai(){return new Ti}var kv,Cd,Pd,Ti,me,Xr=v(()=>{Cd=Symbol("ZodOutput"),Pd=Symbol("ZodInput"),Ti=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let o=r[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let o={...this.get(r)??{}};delete o.id;let n={...o,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};(kv=globalThis).__zod_globalRegistry??(kv.__zod_globalRegistry=Ai());me=globalThis.__zod_globalRegistry});function Od(e,t){return new e({type:"string",...I(t)})}function Nd(e,t){return new e({type:"string",coerce:!0,...I(t)})}function Ii(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...I(t)})}function Qr(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...I(t)})}function Ci(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...I(t)})}function Pi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...I(t)})}function Oi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...I(t)})}function Ni(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...I(t)})}function eo(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...I(t)})}function Ri(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...I(t)})}function Di(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...I(t)})}function ji(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...I(t)})}function Li(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...I(t)})}function Mi(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...I(t)})}function zi(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...I(t)})}function Ui(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...I(t)})}function Fi(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...I(t)})}function Gi(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...I(t)})}function Rd(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...I(t)})}function Bi(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...I(t)})}function Wi(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...I(t)})}function Zi(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...I(t)})}function Ki(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...I(t)})}function Vi(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...I(t)})}function Hi(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...I(t)})}function jd(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...I(t)})}function Ld(e,t){return new e({type:"string",format:"date",check:"string_format",...I(t)})}function Md(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...I(t)})}function zd(e,t){return new e({type:"string",format:"duration",check:"string_format",...I(t)})}function Ud(e,t){return new e({type:"number",checks:[],...I(t)})}function Fd(e,t){return new e({type:"number",coerce:!0,checks:[],...I(t)})}function Gd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...I(t)})}function Bd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...I(t)})}function Wd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...I(t)})}function Zd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...I(t)})}function Kd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...I(t)})}function Vd(e,t){return new e({type:"boolean",...I(t)})}function Hd(e,t){return new e({type:"boolean",coerce:!0,...I(t)})}function Jd(e,t){return new e({type:"bigint",...I(t)})}function Yd(e,t){return new e({type:"bigint",coerce:!0,...I(t)})}function qd(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...I(t)})}function Xd(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...I(t)})}function Qd(e,t){return new e({type:"symbol",...I(t)})}function eu(e,t){return new e({type:"undefined",...I(t)})}function tu(e,t){return new e({type:"null",...I(t)})}function nu(e){return new e({type:"any"})}function ru(e){return new e({type:"unknown"})}function ou(e,t){return new e({type:"never",...I(t)})}function iu(e,t){return new e({type:"void",...I(t)})}function au(e,t){return new e({type:"date",...I(t)})}function su(e,t){return new e({type:"date",coerce:!0,...I(t)})}function cu(e,t){return new e({type:"nan",...I(t)})}function rt(e,t){return new pi({check:"less_than",...I(t),value:e,inclusive:!1})}function Re(e,t){return new pi({check:"less_than",...I(t),value:e,inclusive:!0})}function ot(e,t){return new mi({check:"greater_than",...I(t),value:e,inclusive:!1})}function ke(e,t){return new mi({check:"greater_than",...I(t),value:e,inclusive:!0})}function Ji(e){return ot(0,e)}function Yi(e){return rt(0,e)}function qi(e){return Re(0,e)}function Xi(e){return ke(0,e)}function Nt(e,t){return new Hc({check:"multiple_of",...I(t),value:e})}function Rt(e,t){return new qc({check:"max_size",...I(t),maximum:e})}function it(e,t){return new Xc({check:"min_size",...I(t),minimum:e})}function an(e,t){return new Qc({check:"size_equals",...I(t),size:e})}function sn(e,t){return new el({check:"max_length",...I(t),maximum:e})}function mt(e,t){return new tl({check:"min_length",...I(t),minimum:e})}function cn(e,t){return new nl({check:"length_equals",...I(t),length:e})}function Mn(e,t){return new rl({check:"string_format",format:"regex",...I(t),pattern:e})}function zn(e){return new ol({check:"string_format",format:"lowercase",...I(e)})}function Un(e){return new il({check:"string_format",format:"uppercase",...I(e)})}function Fn(e,t){return new al({check:"string_format",format:"includes",...I(t),includes:e})}function Gn(e,t){return new sl({check:"string_format",format:"starts_with",...I(t),prefix:e})}function Bn(e,t){return new cl({check:"string_format",format:"ends_with",...I(t),suffix:e})}function Qi(e,t,r){return new ll({check:"property",property:e,schema:t,...I(r)})}function Wn(e,t){return new dl({check:"mime_type",mime:e,...I(t)})}function Ye(e){return new ul({check:"overwrite",tx:e})}function Zn(e){return Ye(t=>t.normalize(e))}function Kn(){return Ye(e=>e.trim())}function Vn(){return Ye(e=>e.toLowerCase())}function Hn(){return Ye(e=>e.toUpperCase())}function Jn(){return Ye(e=>ic(e))}function lu(e,t,r){return new e({type:"array",element:t,...I(r)})}function RT(e,t,r){return new e({type:"union",options:t,...I(r)})}function DT(e,t,r){return new e({type:"union",options:t,inclusive:!1,...I(r)})}function jT(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...I(o)})}function LT(e,t,r){return new e({type:"intersection",left:t,right:r})}function MT(e,t,r,o){let n=r instanceof G,i=n?o:r,a=n?r:null;return new e({type:"tuple",items:t,rest:a,...I(i)})}function zT(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...I(o)})}function UT(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...I(o)})}function FT(e,t,r){return new e({type:"set",valueType:t,...I(r)})}function GT(e,t,r){let o=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:o,...I(r)})}function BT(e,t,r){return new e({type:"enum",entries:t,...I(r)})}function WT(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...I(r)})}function du(e,t){return new e({type:"file",...I(t)})}function ZT(e,t){return new e({type:"transform",transform:t})}function KT(e,t){return new e({type:"optional",innerType:t})}function VT(e,t){return new e({type:"nullable",innerType:t})}function HT(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():sc(r)}})}function JT(e,t,r){return new e({type:"nonoptional",innerType:t,...I(r)})}function YT(e,t){return new e({type:"success",innerType:t})}function qT(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function XT(e,t,r){return new e({type:"pipe",in:t,out:r})}function QT(e,t){return new e({type:"readonly",innerType:t})}function eA(e,t,r){return new e({type:"template_literal",parts:t,...I(r)})}function tA(e,t){return new e({type:"lazy",getter:t})}function nA(e,t){return new e({type:"promise",innerType:t})}function uu(e,t,r){let o=I(r);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function pu(e,t,r){return new e({type:"custom",check:"custom",fn:t,...I(r)})}function mu(e,t){let r=xv(o=>(o.addIssue=n=>{if(typeof n=="string")o.issues.push(Pn(n,o.value,r._zod.def));else{let i=n;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),o.issues.push(Pn(i))}},e(o.value,o)),t);return r}function xv(e,t){let r=new q({check:"custom",...I(t)});return r._zod.check=e,r}function hu(e){let t=new q({check:"describe"});return t._zod.onattach=[r=>{let o=me.get(r)??{};me.add(r,{...o,description:e})}],t._zod.check=()=>{},t}function fu(e){let t=new q({check:"meta"});return t._zod.onattach=[r=>{let o=me.get(r)??{};me.add(r,{...o,...e})}],t._zod.check=()=>{},t}function gu(e,t){let r=I(t),o=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(o=o.map(h=>typeof h=="string"?h.toLowerCase():h),n=n.map(h=>typeof h=="string"?h.toLowerCase():h));let i=new Set(o),a=new Set(n),s=e.Codec??Jr,c=e.Boolean??Vr,d=e.String??on,u=new d({type:"string",error:r.error}),p=new c({type:"boolean",error:r.error}),m=new s({type:"pipe",in:u,out:p,transform:((h,f)=>{let _=h;return r.case!=="sensitive"&&(_=_.toLowerCase()),i.has(_)?!0:a.has(_)?!1:(f.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:f.value,inst:m,continue:!1}),{})}),reverseTransform:((h,f)=>h===!0?o[0]||"true":n[0]||"false"),error:r.error});return m}function Yn(e,t,r,o={}){let n=I(o),i={...I(o),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:s=>r.test(s),...n};return r instanceof RegExp&&(i.pattern=r),new e(i)}var Dd,Sv=v(()=>{hi();Xr();$d();L();Dd={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function Dt(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??me,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function K(e,t,r={path:[],schemaPath:[]}){var o;let n=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let u={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,u);else{let m=a.schema,h=t.processors[n.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);h(e,t,m,u)}let p=e._zod.parent;p&&(a.ref||(a.ref=p),K(p,t,u),t.seen.get(p).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(a.schema,c),t.io==="input"&&xe(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function jt(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let c=o.get(s);if(c&&c!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(s,a[0])}}let n=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let p=e.external.registry.get(a[0])?.id,m=e.external.uri??(f=>f);if(p)return{ref:m(p)};let h=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=h,{defId:h,ref:`${m("__shared")}#/${s}/${h}`}}if(a[1]===r)return{ref:"#"};let d=`#/${s}/`,u=a[1].schema.id??`__schema${e.counter++}`;return{defId:u,ref:d+u}},i=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:c,defId:d}=n(a);s.def={...s.schema},d&&(s.defId=d);let u=s.schema;for(let p in u)delete u[p];u.$ref=c};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
8072
+
8073
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){i(a);continue}if(e.external){let d=e.external.registry.get(a[0])?.id;if(t!==a[0]&&d){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}if(s.count>1&&e.reused==="ref"){i(a);continue}}}function Lt(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=s=>{let c=e.seen.get(s);if(c.ref===null)return;let d=c.def??c.schema,u={...d},p=c.ref;if(c.ref=null,p){o(p);let h=e.seen.get(p),f=h.schema;if(f.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(f)):Object.assign(d,f),Object.assign(d,u),s._zod.parent===p)for(let T in d)T==="$ref"||T==="allOf"||T in u||delete d[T];if(f.$ref&&h.def)for(let T in d)T==="$ref"||T==="allOf"||T in h.def&&JSON.stringify(d[T])===JSON.stringify(h.def[T])&&delete d[T]}let m=s._zod.parent;if(m&&m!==p){o(m);let h=e.seen.get(m);if(h?.schema.$ref&&(d.$ref=h.schema.$ref,h.def))for(let f in d)f==="$ref"||f==="allOf"||f in h.def&&JSON.stringify(d[f])===JSON.stringify(h.def[f])&&delete d[f]}e.override({zodSchema:s,jsonSchema:d,path:c.path??[]})};for(let s of[...e.seen.entries()].reverse())o(s[0]);let n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(s)}Object.assign(n,r.def??r.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&n.id===i&&delete n.id;let a=e.external?.defs??{};for(let s of e.seen.entries()){let c=s[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,a[c.defId]=c.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?n.$defs=a:n.definitions=a);try{let s=JSON.parse(JSON.stringify(n));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:qn(t,"input",e.processors),output:qn(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function xe(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return xe(o.element,r);if(o.type==="set")return xe(o.valueType,r);if(o.type==="lazy")return xe(o.getter(),r);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return xe(o.innerType,r);if(o.type==="intersection")return xe(o.left,r)||xe(o.right,r);if(o.type==="record"||o.type==="map")return xe(o.keyType,r)||xe(o.valueType,r);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:xe(o.in,r)||xe(o.out,r);if(o.type==="object"){for(let n in o.shape)if(xe(o.shape[n],r))return!0;return!1}if(o.type==="union"){for(let n of o.options)if(xe(n,r))return!0;return!1}if(o.type==="tuple"){for(let n of o.items)if(xe(n,r))return!0;return!!(o.rest&&xe(o.rest,r))}return!1}var yu,qn,to=v(()=>{Xr();yu=(e,t={})=>r=>{let o=Dt({...r,processors:t});return K(e,o),jt(o,e),Lt(o,e)},qn=(e,t,r={})=>o=>{let{libraryOptions:n,target:i}=o??{},a=Dt({...n??{},target:i,io:t,processors:r});return K(e,a),jt(a,e),Lt(a,e)}});function ra(e,t){if("_idmap"in e){let o=e,n=Dt({...t,processors:ea}),i={};for(let c of o._idmap.entries()){let[d,u]=c;K(u,n)}let a={},s={registry:o,uri:t?.uri,defs:i};n.external=s;for(let c of o._idmap.entries()){let[d,u]=c;jt(n,u),a[d]=Lt(n,u)}if(Object.keys(i).length>0){let c=n.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:i}}return{schemas:a}}let r=Dt({...t,processors:ea});return K(e,r),jt(r,e),Lt(r,e)}var rA,vu,bu,_u,wu,ku,xu,Su,$u,Eu,Tu,Au,Iu,Cu,Pu,Ou,Nu,Ru,Du,ju,Lu,Mu,zu,Uu,Fu,Gu,ta,Bu,Wu,Zu,Ku,Vu,Hu,Ju,Yu,qu,Xu,Qu,na,ep,ea,no=v(()=>{to();L();rA={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},vu=(e,t,r,o)=>{let n=r;n.type="string";let{minimum:i,maximum:a,format:s,patterns:c,contentEncoding:d}=e._zod.bag;if(typeof i=="number"&&(n.minLength=i),typeof a=="number"&&(n.maxLength=a),s&&(n.format=rA[s]??s,n.format===""&&delete n.format,s==="time"&&delete n.format),d&&(n.contentEncoding=d),c&&c.size>0){let u=[...c];u.length===1?n.pattern=u[0].source:u.length>1&&(n.allOf=[...u.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},bu=(e,t,r,o)=>{let n=r,{minimum:i,maximum:a,format:s,multipleOf:c,exclusiveMaximum:d,exclusiveMinimum:u}=e._zod.bag;typeof s=="string"&&s.includes("int")?n.type="integer":n.type="number";let p=typeof u=="number"&&u>=(i??Number.NEGATIVE_INFINITY),m=typeof d=="number"&&d<=(a??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";p?h?(n.minimum=u,n.exclusiveMinimum=!0):n.exclusiveMinimum=u:typeof i=="number"&&(n.minimum=i),m?h?(n.maximum=d,n.exclusiveMaximum=!0):n.exclusiveMaximum=d:typeof a=="number"&&(n.maximum=a),typeof c=="number"&&(n.multipleOf=c)},_u=(e,t,r,o)=>{r.type="boolean"},wu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},ku=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},xu=(e,t,r,o)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},Su=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},$u=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Eu=(e,t,r,o)=>{r.not={}},Tu=(e,t,r,o)=>{},Au=(e,t,r,o)=>{},Iu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Cu=(e,t,r,o)=>{let n=e._zod.def,i=jr(n.entries);i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),r.enum=i},Pu=(e,t,r,o)=>{let n=e._zod.def,i=[];for(let a of n.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){let a=i[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),i.every(a=>typeof a=="boolean")&&(r.type="boolean"),i.every(a=>a===null)&&(r.type="null"),r.enum=i},Ou=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Nu=(e,t,r,o)=>{let n=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=i.source},Ru=(e,t,r,o)=>{let n=r,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:c}=e._zod.bag;a!==void 0&&(i.minLength=a),s!==void 0&&(i.maxLength=s),c?c.length===1?(i.contentMediaType=c[0],Object.assign(n,i)):(Object.assign(n,i),n.anyOf=c.map(d=>({contentMediaType:d}))):Object.assign(n,i)},Du=(e,t,r,o)=>{r.type="boolean"},ju=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Lu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Mu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},zu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Uu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Fu=(e,t,r,o)=>{let n=r,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(n.minItems=a),typeof s=="number"&&(n.maxItems=s),n.type="array",n.items=K(i.element,t,{...o,path:[...o.path,"items"]})},Gu=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object",n.properties={};let a=i.shape;for(let d in a)n.properties[d]=K(a[d],t,{...o,path:[...o.path,"properties",d]});let s=new Set(Object.keys(a)),c=new Set([...s].filter(d=>{let u=i.shape[d]._zod;return t.io==="input"?u.optin===void 0:u.optout===void 0}));c.size>0&&(n.required=Array.from(c)),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=K(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},ta=(e,t,r,o)=>{let n=e._zod.def,i=n.inclusive===!1,a=n.options.map((s,c)=>K(s,t,{...o,path:[...o.path,i?"oneOf":"anyOf",c]}));i?r.oneOf=a:r.anyOf=a},Bu=(e,t,r,o)=>{let n=e._zod.def,i=K(n.left,t,{...o,path:[...o.path,"allOf",0]}),a=K(n.right,t,{...o,path:[...o.path,"allOf",1]}),s=d=>"allOf"in d&&Object.keys(d).length===1,c=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];r.allOf=c},Wu=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((m,h)=>K(m,t,{...o,path:[...o.path,a,h]})),d=i.rest?K(i.rest,t,{...o,path:[...o.path,s,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=c,d&&(n.items=d)):t.target==="openapi-3.0"?(n.items={anyOf:c},d&&n.items.anyOf.push(d),n.minItems=c.length,d||(n.maxItems=c.length)):(n.items=c,d&&(n.additionalItems=d));let{minimum:u,maximum:p}=e._zod.bag;typeof u=="number"&&(n.minItems=u),typeof p=="number"&&(n.maxItems=p)},Zu=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object";let a=i.keyType,c=a._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){let u=K(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});n.patternProperties={};for(let p of c)n.patternProperties[p.source]=u}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=K(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),n.additionalProperties=K(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let d=a._zod.values;if(d){let u=[...d].filter(p=>typeof p=="string"||typeof p=="number");u.length>0&&(n.required=u)}},Ku=(e,t,r,o)=>{let n=e._zod.def,i=K(n.innerType,t,o),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=n.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},Vu=(e,t,r,o)=>{let n=e._zod.def;K(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},Hu=(e,t,r,o)=>{let n=e._zod.def;K(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},Ju=(e,t,r,o)=>{let n=e._zod.def;K(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},Yu=(e,t,r,o)=>{let n=e._zod.def;K(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType;let a;try{a=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},qu=(e,t,r,o)=>{let n=e._zod.def,i=n.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?i?n.out:n.in:n.out;K(a,t,o);let s=t.seen.get(e);s.ref=a},Xu=(e,t,r,o)=>{let n=e._zod.def;K(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.readOnly=!0},Qu=(e,t,r,o)=>{let n=e._zod.def;K(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},na=(e,t,r,o)=>{let n=e._zod.def;K(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},ep=(e,t,r,o)=>{let n=e._zod.innerType;K(n,t,o);let i=t.seen.get(e);i.ref=n},ea={string:vu,number:bu,boolean:_u,bigint:wu,symbol:ku,null:xu,undefined:Su,void:$u,never:Eu,any:Tu,unknown:Au,date:Iu,enum:Cu,literal:Pu,nan:Ou,template_literal:Nu,file:Ru,success:Du,custom:ju,function:Lu,transform:Mu,map:zu,set:Uu,array:Fu,object:Gu,union:ta,intersection:Bu,tuple:Wu,record:Zu,nullable:Ku,nonoptional:Vu,default:Hu,prefault:Ju,catch:Yu,pipe:qu,readonly:Xu,promise:Qu,optional:na,lazy:ep}});var oa,$v=v(()=>{no();to();oa=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=Dt({processors:ea,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return K(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),jt(this.ctx,t);let o=Lt(this.ctx,t),{"~standard":n,...i}=o;return i}}});var Ev={};var Tv=v(()=>{});var ht={};nt(ht,{$ZodAny:()=>Vl,$ZodArray:()=>Xl,$ZodAsyncError:()=>Je,$ZodBase64:()=>Ll,$ZodBase64URL:()=>Ml,$ZodBigInt:()=>_i,$ZodBigIntFormat:()=>Bl,$ZodBoolean:()=>Vr,$ZodCIDRv4:()=>Rl,$ZodCIDRv6:()=>Dl,$ZodCUID:()=>kl,$ZodCUID2:()=>xl,$ZodCatch:()=>gd,$ZodCheck:()=>q,$ZodCheckBigIntFormat:()=>Yc,$ZodCheckEndsWith:()=>cl,$ZodCheckGreaterThan:()=>mi,$ZodCheckIncludes:()=>al,$ZodCheckLengthEquals:()=>nl,$ZodCheckLessThan:()=>pi,$ZodCheckLowerCase:()=>ol,$ZodCheckMaxLength:()=>el,$ZodCheckMaxSize:()=>qc,$ZodCheckMimeType:()=>dl,$ZodCheckMinLength:()=>tl,$ZodCheckMinSize:()=>Xc,$ZodCheckMultipleOf:()=>Hc,$ZodCheckNumberFormat:()=>Jc,$ZodCheckOverwrite:()=>ul,$ZodCheckProperty:()=>ll,$ZodCheckRegex:()=>rl,$ZodCheckSizeEquals:()=>Qc,$ZodCheckStartsWith:()=>sl,$ZodCheckStringFormat:()=>jn,$ZodCheckUpperCase:()=>il,$ZodCodec:()=>Jr,$ZodCustom:()=>Sd,$ZodCustomStringFormat:()=>Fl,$ZodDate:()=>ql,$ZodDefault:()=>pd,$ZodDiscriminatedUnion:()=>td,$ZodE164:()=>zl,$ZodEmail:()=>vl,$ZodEmoji:()=>_l,$ZodEncodeError:()=>At,$ZodEnum:()=>ad,$ZodError:()=>Fr,$ZodExactOptional:()=>dd,$ZodFile:()=>cd,$ZodFunction:()=>wd,$ZodGUID:()=>gl,$ZodIPv4:()=>Pl,$ZodIPv6:()=>Ol,$ZodISODate:()=>Al,$ZodISODateTime:()=>Tl,$ZodISODuration:()=>Cl,$ZodISOTime:()=>Il,$ZodIntersection:()=>nd,$ZodJWT:()=>Ul,$ZodKSUID:()=>El,$ZodLazy:()=>xd,$ZodLiteral:()=>sd,$ZodMAC:()=>Nl,$ZodMap:()=>od,$ZodNaN:()=>yd,$ZodNanoID:()=>wl,$ZodNever:()=>Jl,$ZodNonOptional:()=>hd,$ZodNull:()=>Kl,$ZodNullable:()=>ud,$ZodNumber:()=>bi,$ZodNumberFormat:()=>Gl,$ZodObject:()=>Tg,$ZodObjectJIT:()=>Ql,$ZodOptional:()=>ki,$ZodPipe:()=>xi,$ZodPrefault:()=>md,$ZodPreprocess:()=>vd,$ZodPromise:()=>kd,$ZodReadonly:()=>bd,$ZodRealError:()=>Ae,$ZodRecord:()=>rd,$ZodRegistry:()=>Ti,$ZodSet:()=>id,$ZodString:()=>on,$ZodStringFormat:()=>H,$ZodSuccess:()=>fd,$ZodSymbol:()=>Wl,$ZodTemplateLiteral:()=>_d,$ZodTransform:()=>ld,$ZodTuple:()=>wi,$ZodType:()=>G,$ZodULID:()=>Sl,$ZodURL:()=>bl,$ZodUUID:()=>yl,$ZodUndefined:()=>Zl,$ZodUnion:()=>Hr,$ZodUnknown:()=>Hl,$ZodVoid:()=>Yl,$ZodXID:()=>$l,$ZodXor:()=>ed,$brand:()=>tc,$constructor:()=>g,$input:()=>Pd,$output:()=>Cd,Doc:()=>Kr,JSONSchema:()=>Ev,JSONSchemaGenerator:()=>oa,NEVER:()=>ec,TimePrecision:()=>Dd,_any:()=>nu,_array:()=>lu,_base64:()=>Zi,_base64url:()=>Ki,_bigint:()=>Jd,_boolean:()=>Vd,_catch:()=>qT,_check:()=>xv,_cidrv4:()=>Bi,_cidrv6:()=>Wi,_coercedBigint:()=>Yd,_coercedBoolean:()=>Hd,_coercedDate:()=>su,_coercedNumber:()=>Fd,_coercedString:()=>Nd,_cuid:()=>ji,_cuid2:()=>Li,_custom:()=>uu,_date:()=>au,_decode:()=>ni,_decodeAsync:()=>oi,_default:()=>HT,_discriminatedUnion:()=>jT,_e164:()=>Vi,_email:()=>Ii,_emoji:()=>Ri,_encode:()=>ti,_encodeAsync:()=>ri,_endsWith:()=>Bn,_enum:()=>GT,_file:()=>du,_float32:()=>Bd,_float64:()=>Wd,_gt:()=>ot,_gte:()=>ke,_guid:()=>Qr,_includes:()=>Fn,_int:()=>Gd,_int32:()=>Zd,_int64:()=>qd,_intersection:()=>LT,_ipv4:()=>Fi,_ipv6:()=>Gi,_isoDate:()=>Ld,_isoDateTime:()=>jd,_isoDuration:()=>zd,_isoTime:()=>Md,_jwt:()=>Hi,_ksuid:()=>Ui,_lazy:()=>tA,_length:()=>cn,_literal:()=>WT,_lowercase:()=>zn,_lt:()=>rt,_lte:()=>Re,_mac:()=>Rd,_map:()=>UT,_max:()=>Re,_maxLength:()=>sn,_maxSize:()=>Rt,_mime:()=>Wn,_min:()=>ke,_minLength:()=>mt,_minSize:()=>it,_multipleOf:()=>Nt,_nan:()=>cu,_nanoid:()=>Di,_nativeEnum:()=>BT,_negative:()=>Yi,_never:()=>ou,_nonnegative:()=>Xi,_nonoptional:()=>JT,_nonpositive:()=>qi,_normalize:()=>Zn,_null:()=>tu,_nullable:()=>VT,_number:()=>Ud,_optional:()=>KT,_overwrite:()=>Ye,_parse:()=>On,_parseAsync:()=>Nn,_pipe:()=>XT,_positive:()=>Ji,_promise:()=>nA,_property:()=>Qi,_readonly:()=>QT,_record:()=>zT,_refine:()=>pu,_regex:()=>Mn,_safeDecode:()=>ai,_safeDecodeAsync:()=>ci,_safeEncode:()=>ii,_safeEncodeAsync:()=>si,_safeParse:()=>Rn,_safeParseAsync:()=>Dn,_set:()=>FT,_size:()=>an,_slugify:()=>Jn,_startsWith:()=>Gn,_string:()=>Od,_stringFormat:()=>Yn,_stringbool:()=>gu,_success:()=>YT,_superRefine:()=>mu,_symbol:()=>Qd,_templateLiteral:()=>eA,_toLowerCase:()=>Vn,_toUpperCase:()=>Hn,_transform:()=>ZT,_trim:()=>Kn,_tuple:()=>MT,_uint32:()=>Kd,_uint64:()=>Xd,_ulid:()=>Mi,_undefined:()=>eu,_union:()=>RT,_unknown:()=>ru,_uppercase:()=>Un,_url:()=>eo,_uuid:()=>Ci,_uuidv4:()=>Pi,_uuidv6:()=>Oi,_uuidv7:()=>Ni,_void:()=>iu,_xid:()=>zi,_xor:()=>DT,clone:()=>_e,config:()=>ne,createStandardJSONSchemaMethod:()=>qn,createToJSONSchemaMethod:()=>yu,decode:()=>nE,decodeAsync:()=>oE,describe:()=>hu,encode:()=>tE,encodeAsync:()=>rE,extractDefs:()=>jt,finalize:()=>Lt,flattenError:()=>Gr,formatError:()=>Br,globalConfig:()=>en,globalRegistry:()=>me,initializeContext:()=>Dt,isValidBase64:()=>jl,isValidBase64URL:()=>xg,isValidJWT:()=>Sg,locales:()=>qr,meta:()=>fu,parse:()=>Qo,parseAsync:()=>ei,prettifyError:()=>hc,process:()=>K,regexes:()=>Ne,registry:()=>Ai,safeDecode:()=>aE,safeDecodeAsync:()=>cE,safeEncode:()=>iE,safeEncodeAsync:()=>sE,safeParse:()=>gc,safeParseAsync:()=>yc,toDotPath:()=>ng,toJSONSchema:()=>ra,treeifyError:()=>mc,util:()=>E,version:()=>ml});var De=v(()=>{tn();vc();fc();$d();hi();hl();L();ui();Id();Xr();pl();Sv();to();no();$v();Tv()});var ia={};nt(ia,{endsWith:()=>Bn,gt:()=>ot,gte:()=>ke,includes:()=>Fn,length:()=>cn,lowercase:()=>zn,lt:()=>rt,lte:()=>Re,maxLength:()=>sn,maxSize:()=>Rt,mime:()=>Wn,minLength:()=>mt,minSize:()=>it,multipleOf:()=>Nt,negative:()=>Yi,nonnegative:()=>Xi,nonpositive:()=>qi,normalize:()=>Zn,overwrite:()=>Ye,positive:()=>Ji,property:()=>Qi,regex:()=>Mn,size:()=>an,slugify:()=>Jn,startsWith:()=>Gn,toLowerCase:()=>Vn,toUpperCase:()=>Hn,trim:()=>Kn,uppercase:()=>Un});var aa=v(()=>{De()});var Xn={};nt(Xn,{ZodISODate:()=>ca,ZodISODateTime:()=>sa,ZodISODuration:()=>da,ZodISOTime:()=>la,date:()=>np,datetime:()=>tp,duration:()=>op,time:()=>rp});function tp(e){return jd(sa,e)}function np(e){return Ld(ca,e)}function rp(e){return Md(la,e)}function op(e){return zd(da,e)}var sa,ca,la,da,ro=v(()=>{De();io();sa=g("ZodISODateTime",(e,t)=>{Tl.init(e,t),J.init(e,t)});ca=g("ZodISODate",(e,t)=>{Al.init(e,t),J.init(e,t)});la=g("ZodISOTime",(e,t)=>{Il.init(e,t),J.init(e,t)});da=g("ZodISODuration",(e,t)=>{Cl.init(e,t),J.init(e,t)})});var Av,iA,Ie,ip=v(()=>{De();De();L();Av=(e,t)=>{Fr.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Br(e,r)},flatten:{value:r=>Gr(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,In,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,In,2)}},isEmpty:{get(){return e.issues.length===0}}})},iA=g("ZodError",Av),Ie=g("ZodError",Av,{Parent:Error})});var ap,sp,cp,lp,dp,up,pp,mp,hp,fp,gp,yp,vp=v(()=>{De();ip();ap=On(Ie),sp=Nn(Ie),cp=Rn(Ie),lp=Dn(Ie),dp=ti(Ie),up=ni(Ie),pp=ri(Ie),mp=oi(Ie),hp=ii(Ie),fp=ai(Ie),gp=si(Ie),yp=ci(Ie)});var oo={};nt(oo,{ZodAny:()=>Ep,ZodArray:()=>Cp,ZodBase64:()=>Ea,ZodBase64URL:()=>Ta,ZodBigInt:()=>ir,ZodBigIntFormat:()=>Ca,ZodBoolean:()=>or,ZodCIDRv4:()=>Sa,ZodCIDRv6:()=>$a,ZodCUID:()=>ya,ZodCUID2:()=>va,ZodCatch:()=>Xp,ZodCodec:()=>vo,ZodCustom:()=>bo,ZodCustomStringFormat:()=>nr,ZodDate:()=>mo,ZodDefault:()=>Kp,ZodDiscriminatedUnion:()=>Op,ZodE164:()=>Aa,ZodEmail:()=>ha,ZodEmoji:()=>fa,ZodEnum:()=>er,ZodExactOptional:()=>Bp,ZodFile:()=>Fp,ZodFunction:()=>cm,ZodGUID:()=>so,ZodIPv4:()=>ka,ZodIPv6:()=>xa,ZodIntersection:()=>Np,ZodJWT:()=>Ia,ZodKSUID:()=>wa,ZodLazy:()=>im,ZodLiteral:()=>Up,ZodMAC:()=>bp,ZodMap:()=>Mp,ZodNaN:()=>em,ZodNanoID:()=>ga,ZodNever:()=>Ap,ZodNonOptional:()=>ja,ZodNull:()=>Sp,ZodNullable:()=>Zp,ZodNumber:()=>rr,ZodNumberFormat:()=>dn,ZodObject:()=>fo,ZodOptional:()=>Da,ZodPipe:()=>yo,ZodPrefault:()=>Hp,ZodPreprocess:()=>tm,ZodPromise:()=>sm,ZodReadonly:()=>nm,ZodRecord:()=>Qn,ZodSet:()=>zp,ZodString:()=>tr,ZodStringFormat:()=>J,ZodSuccess:()=>qp,ZodSymbol:()=>kp,ZodTemplateLiteral:()=>om,ZodTransform:()=>Gp,ZodTuple:()=>Dp,ZodType:()=>B,ZodULID:()=>ba,ZodURL:()=>po,ZodUUID:()=>at,ZodUndefined:()=>xp,ZodUnion:()=>go,ZodUnknown:()=>Tp,ZodVoid:()=>Ip,ZodXID:()=>_a,ZodXor:()=>Pp,_ZodString:()=>ma,_default:()=>Vp,_function:()=>jb,any:()=>mb,array:()=>ho,base64:()=>Yv,base64url:()=>qv,bigint:()=>cb,boolean:()=>wp,catch:()=>Qp,check:()=>Lb,cidrv4:()=>Hv,cidrv6:()=>Jv,codec:()=>Ob,cuid:()=>Uv,cuid2:()=>Fv,custom:()=>Mb,date:()=>fb,describe:()=>zb,discriminatedUnion:()=>wb,e164:()=>Xv,email:()=>Cv,emoji:()=>Mv,enum:()=>Na,exactOptional:()=>Wp,file:()=>Ab,float32:()=>ob,float64:()=>ib,function:()=>jb,guid:()=>Pv,hash:()=>rb,hex:()=>nb,hostname:()=>tb,httpUrl:()=>Lv,instanceof:()=>Fb,int:()=>ua,int32:()=>ab,int64:()=>lb,intersection:()=>Rp,invertCodec:()=>Nb,ipv4:()=>Zv,ipv6:()=>Vv,json:()=>Bb,jwt:()=>Qv,keyof:()=>gb,ksuid:()=>Wv,lazy:()=>am,literal:()=>Tb,looseObject:()=>bb,looseRecord:()=>xb,mac:()=>Kv,map:()=>Sb,meta:()=>Ub,nan:()=>Pb,nanoid:()=>zv,nativeEnum:()=>Eb,never:()=>Pa,nonoptional:()=>Yp,null:()=>$p,nullable:()=>lo,nullish:()=>Ib,number:()=>_p,object:()=>yb,optional:()=>co,partialRecord:()=>kb,pipe:()=>pa,prefault:()=>Jp,preprocess:()=>Wb,promise:()=>Db,readonly:()=>rm,record:()=>Lp,refine:()=>lm,set:()=>$b,strictObject:()=>vb,string:()=>ao,stringFormat:()=>eb,stringbool:()=>Gb,success:()=>Cb,superRefine:()=>dm,symbol:()=>ub,templateLiteral:()=>Rb,transform:()=>Ra,tuple:()=>jp,uint32:()=>sb,uint64:()=>db,ulid:()=>Gv,undefined:()=>pb,union:()=>Oa,unknown:()=>ln,url:()=>jv,uuid:()=>Ov,uuidv4:()=>Nv,uuidv6:()=>Rv,uuidv7:()=>Dv,void:()=>hb,xid:()=>Bv,xor:()=>_b});function uo(e,t,r){let o=Object.getPrototypeOf(e),n=Iv.get(o);if(n||(n=new Set,Iv.set(o,n)),!n.has(t)){n.add(t);for(let i in r){let a=r[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){let s=a.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}}function ao(e){return Od(tr,e)}function Cv(e){return Ii(ha,e)}function Pv(e){return Qr(so,e)}function Ov(e){return Ci(at,e)}function Nv(e){return Pi(at,e)}function Rv(e){return Oi(at,e)}function Dv(e){return Ni(at,e)}function jv(e){return eo(po,e)}function Lv(e){return eo(po,{protocol:Ne.httpProtocol,hostname:Ne.domain,...E.normalizeParams(e)})}function Mv(e){return Ri(fa,e)}function zv(e){return Di(ga,e)}function Uv(e){return ji(ya,e)}function Fv(e){return Li(va,e)}function Gv(e){return Mi(ba,e)}function Bv(e){return zi(_a,e)}function Wv(e){return Ui(wa,e)}function Zv(e){return Fi(ka,e)}function Kv(e){return Rd(bp,e)}function Vv(e){return Gi(xa,e)}function Hv(e){return Bi(Sa,e)}function Jv(e){return Wi($a,e)}function Yv(e){return Zi(Ea,e)}function qv(e){return Ki(Ta,e)}function Xv(e){return Vi(Aa,e)}function Qv(e){return Hi(Ia,e)}function eb(e,t,r={}){return Yn(nr,e,t,r)}function tb(e){return Yn(nr,"hostname",Ne.hostname,e)}function nb(e){return Yn(nr,"hex",Ne.hex,e)}function rb(e,t){let r=t?.enc??"hex",o=`${e}_${r}`,n=Ne[o];if(!n)throw new Error(`Unrecognized hash format: ${o}`);return Yn(nr,o,n,t)}function _p(e){return Ud(rr,e)}function ua(e){return Gd(dn,e)}function ob(e){return Bd(dn,e)}function ib(e){return Wd(dn,e)}function ab(e){return Zd(dn,e)}function sb(e){return Kd(dn,e)}function wp(e){return Vd(or,e)}function cb(e){return Jd(ir,e)}function lb(e){return qd(Ca,e)}function db(e){return Xd(Ca,e)}function ub(e){return Qd(kp,e)}function pb(e){return eu(xp,e)}function $p(e){return tu(Sp,e)}function mb(){return nu(Ep)}function ln(){return ru(Tp)}function Pa(e){return ou(Ap,e)}function hb(e){return iu(Ip,e)}function fb(e){return au(mo,e)}function ho(e,t){return lu(Cp,e,t)}function gb(e){let t=e._zod.def.shape;return Na(Object.keys(t))}function yb(e,t){let r={type:"object",shape:e??{},...E.normalizeParams(t)};return new fo(r)}function vb(e,t){return new fo({type:"object",shape:e,catchall:Pa(),...E.normalizeParams(t)})}function bb(e,t){return new fo({type:"object",shape:e,catchall:ln(),...E.normalizeParams(t)})}function Oa(e,t){return new go({type:"union",options:e,...E.normalizeParams(t)})}function _b(e,t){return new Pp({type:"union",options:e,inclusive:!1,...E.normalizeParams(t)})}function wb(e,t,r){return new Op({type:"union",options:t,discriminator:e,...E.normalizeParams(r)})}function Rp(e,t){return new Np({type:"intersection",left:e,right:t})}function jp(e,t,r){let o=t instanceof G,n=o?r:t,i=o?t:null;return new Dp({type:"tuple",items:e,rest:i,...E.normalizeParams(n)})}function Lp(e,t,r){return!t||!t._zod?new Qn({type:"record",keyType:ao(),valueType:e,...E.normalizeParams(t)}):new Qn({type:"record",keyType:e,valueType:t,...E.normalizeParams(r)})}function kb(e,t,r){let o=_e(e);return o._zod.values=void 0,new Qn({type:"record",keyType:o,valueType:t,...E.normalizeParams(r)})}function xb(e,t,r){return new Qn({type:"record",keyType:e,valueType:t,mode:"loose",...E.normalizeParams(r)})}function Sb(e,t,r){return new Mp({type:"map",keyType:e,valueType:t,...E.normalizeParams(r)})}function $b(e,t){return new zp({type:"set",valueType:e,...E.normalizeParams(t)})}function Na(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new er({type:"enum",entries:r,...E.normalizeParams(t)})}function Eb(e,t){return new er({type:"enum",entries:e,...E.normalizeParams(t)})}function Tb(e,t){return new Up({type:"literal",values:Array.isArray(e)?e:[e],...E.normalizeParams(t)})}function Ab(e){return du(Fp,e)}function Ra(e){return new Gp({type:"transform",transform:e})}function co(e){return new Da({type:"optional",innerType:e})}function Wp(e){return new Bp({type:"optional",innerType:e})}function lo(e){return new Zp({type:"nullable",innerType:e})}function Ib(e){return co(lo(e))}function Vp(e,t){return new Kp({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():E.shallowClone(t)}})}function Jp(e,t){return new Hp({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():E.shallowClone(t)}})}function Yp(e,t){return new ja({type:"nonoptional",innerType:e,...E.normalizeParams(t)})}function Cb(e){return new qp({type:"success",innerType:e})}function Qp(e,t){return new Xp({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function Pb(e){return cu(em,e)}function pa(e,t){return new yo({type:"pipe",in:e,out:t})}function Ob(e,t,r){return new vo({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function Nb(e){let t=e._zod.def;return new vo({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function rm(e){return new nm({type:"readonly",innerType:e})}function Rb(e,t){return new om({type:"template_literal",parts:e,...E.normalizeParams(t)})}function am(e){return new im({type:"lazy",getter:e})}function Db(e){return new sm({type:"promise",innerType:e})}function jb(e){return new cm({type:"function",input:Array.isArray(e?.input)?jp(e?.input):e?.input??ho(ln()),output:e?.output??ln()})}function Lb(e){let t=new q({check:"custom"});return t._zod.check=e,t}function Mb(e,t){return uu(bo,e??(()=>!0),t)}function lm(e,t={}){return pu(bo,e,t)}function dm(e,t){return mu(e,t)}function Fb(e,t={}){let r=new bo({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...E.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:r,path:[...r._zod.def.path??[]]})},r}function Bb(e){let t=am(()=>Oa([ao(e),_p(),wp(),$p(),ho(t),Lp(ao(),t)]));return t}function Wb(e,t){return new tm({type:"pipe",in:Ra(e),out:t})}var Iv,B,ma,tr,J,ha,so,at,po,fa,ga,ya,va,ba,_a,wa,ka,bp,xa,Sa,$a,Ea,Ta,Aa,Ia,nr,rr,dn,or,ir,Ca,kp,xp,Sp,Ep,Tp,Ap,Ip,mo,Cp,fo,go,Pp,Op,Np,Dp,Qn,Mp,zp,er,Up,Fp,Gp,Da,Bp,Zp,Kp,Hp,ja,qp,Xp,em,yo,vo,tm,nm,om,im,sm,cm,bo,zb,Ub,Gb,io=v(()=>{De();De();no();to();aa();ro();vp();Iv=new WeakMap;B=g("ZodType",(e,t)=>(G.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:qn(e,"input"),output:qn(e,"output")}}),e.toJSONSchema=yu(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,o)=>ap(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>cp(e,r,o),e.parseAsync=async(r,o)=>sp(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>lp(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>dp(e,r,o),e.decode=(r,o)=>up(e,r,o),e.encodeAsync=async(r,o)=>pp(e,r,o),e.decodeAsync=async(r,o)=>mp(e,r,o),e.safeEncode=(r,o)=>hp(e,r,o),e.safeDecode=(r,o)=>fp(e,r,o),e.safeEncodeAsync=async(r,o)=>gp(e,r,o),e.safeDecodeAsync=async(r,o)=>yp(e,r,o),uo(e,"ZodType",{check(...r){let o=this.def;return this.clone(E.mergeDefs(o,{checks:[...o.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,o){return _e(this,r,o)},brand(){return this},register(r,o){return r.add(this,o),this},refine(r,o){return this.check(lm(r,o))},superRefine(r,o){return this.check(dm(r,o))},overwrite(r){return this.check(Ye(r))},optional(){return co(this)},exactOptional(){return Wp(this)},nullable(){return lo(this)},nullish(){return co(lo(this))},nonoptional(r){return Yp(this,r)},array(){return ho(this)},or(r){return Oa([this,r])},and(r){return Rp(this,r)},transform(r){return pa(this,Ra(r))},default(r){return Vp(this,r)},prefault(r){return Jp(this,r)},catch(r){return Qp(this,r)},pipe(r){return pa(this,r)},readonly(){return rm(this)},describe(r){let o=this.clone();return me.add(o,{description:r}),o},meta(...r){if(r.length===0)return me.get(this);let o=this.clone();return me.add(o,r[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return me.get(e)?.description},configurable:!0}),e)),ma=g("_ZodString",(e,t)=>{on.init(e,t),B.init(e,t),e._zod.processJSONSchema=(o,n,i)=>vu(e,o,n,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,uo(e,"_ZodString",{regex(...o){return this.check(Mn(...o))},includes(...o){return this.check(Fn(...o))},startsWith(...o){return this.check(Gn(...o))},endsWith(...o){return this.check(Bn(...o))},min(...o){return this.check(mt(...o))},max(...o){return this.check(sn(...o))},length(...o){return this.check(cn(...o))},nonempty(...o){return this.check(mt(1,...o))},lowercase(o){return this.check(zn(o))},uppercase(o){return this.check(Un(o))},trim(){return this.check(Kn())},normalize(...o){return this.check(Zn(...o))},toLowerCase(){return this.check(Vn())},toUpperCase(){return this.check(Hn())},slugify(){return this.check(Jn())}})}),tr=g("ZodString",(e,t)=>{on.init(e,t),ma.init(e,t),e.email=r=>e.check(Ii(ha,r)),e.url=r=>e.check(eo(po,r)),e.jwt=r=>e.check(Hi(Ia,r)),e.emoji=r=>e.check(Ri(fa,r)),e.guid=r=>e.check(Qr(so,r)),e.uuid=r=>e.check(Ci(at,r)),e.uuidv4=r=>e.check(Pi(at,r)),e.uuidv6=r=>e.check(Oi(at,r)),e.uuidv7=r=>e.check(Ni(at,r)),e.nanoid=r=>e.check(Di(ga,r)),e.guid=r=>e.check(Qr(so,r)),e.cuid=r=>e.check(ji(ya,r)),e.cuid2=r=>e.check(Li(va,r)),e.ulid=r=>e.check(Mi(ba,r)),e.base64=r=>e.check(Zi(Ea,r)),e.base64url=r=>e.check(Ki(Ta,r)),e.xid=r=>e.check(zi(_a,r)),e.ksuid=r=>e.check(Ui(wa,r)),e.ipv4=r=>e.check(Fi(ka,r)),e.ipv6=r=>e.check(Gi(xa,r)),e.cidrv4=r=>e.check(Bi(Sa,r)),e.cidrv6=r=>e.check(Wi($a,r)),e.e164=r=>e.check(Vi(Aa,r)),e.datetime=r=>e.check(tp(r)),e.date=r=>e.check(np(r)),e.time=r=>e.check(rp(r)),e.duration=r=>e.check(op(r))});J=g("ZodStringFormat",(e,t)=>{H.init(e,t),ma.init(e,t)}),ha=g("ZodEmail",(e,t)=>{vl.init(e,t),J.init(e,t)});so=g("ZodGUID",(e,t)=>{gl.init(e,t),J.init(e,t)});at=g("ZodUUID",(e,t)=>{yl.init(e,t),J.init(e,t)});po=g("ZodURL",(e,t)=>{bl.init(e,t),J.init(e,t)});fa=g("ZodEmoji",(e,t)=>{_l.init(e,t),J.init(e,t)});ga=g("ZodNanoID",(e,t)=>{wl.init(e,t),J.init(e,t)});ya=g("ZodCUID",(e,t)=>{kl.init(e,t),J.init(e,t)});va=g("ZodCUID2",(e,t)=>{xl.init(e,t),J.init(e,t)});ba=g("ZodULID",(e,t)=>{Sl.init(e,t),J.init(e,t)});_a=g("ZodXID",(e,t)=>{$l.init(e,t),J.init(e,t)});wa=g("ZodKSUID",(e,t)=>{El.init(e,t),J.init(e,t)});ka=g("ZodIPv4",(e,t)=>{Pl.init(e,t),J.init(e,t)});bp=g("ZodMAC",(e,t)=>{Nl.init(e,t),J.init(e,t)});xa=g("ZodIPv6",(e,t)=>{Ol.init(e,t),J.init(e,t)});Sa=g("ZodCIDRv4",(e,t)=>{Rl.init(e,t),J.init(e,t)});$a=g("ZodCIDRv6",(e,t)=>{Dl.init(e,t),J.init(e,t)});Ea=g("ZodBase64",(e,t)=>{Ll.init(e,t),J.init(e,t)});Ta=g("ZodBase64URL",(e,t)=>{Ml.init(e,t),J.init(e,t)});Aa=g("ZodE164",(e,t)=>{zl.init(e,t),J.init(e,t)});Ia=g("ZodJWT",(e,t)=>{Ul.init(e,t),J.init(e,t)});nr=g("ZodCustomStringFormat",(e,t)=>{Fl.init(e,t),J.init(e,t)});rr=g("ZodNumber",(e,t)=>{bi.init(e,t),B.init(e,t),e._zod.processJSONSchema=(o,n,i)=>bu(e,o,n,i),uo(e,"ZodNumber",{gt(o,n){return this.check(ot(o,n))},gte(o,n){return this.check(ke(o,n))},min(o,n){return this.check(ke(o,n))},lt(o,n){return this.check(rt(o,n))},lte(o,n){return this.check(Re(o,n))},max(o,n){return this.check(Re(o,n))},int(o){return this.check(ua(o))},safe(o){return this.check(ua(o))},positive(o){return this.check(ot(0,o))},nonnegative(o){return this.check(ke(0,o))},negative(o){return this.check(rt(0,o))},nonpositive(o){return this.check(Re(0,o))},multipleOf(o,n){return this.check(Nt(o,n))},step(o,n){return this.check(Nt(o,n))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});dn=g("ZodNumberFormat",(e,t)=>{Gl.init(e,t),rr.init(e,t)});or=g("ZodBoolean",(e,t)=>{Vr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>_u(e,r,o,n)});ir=g("ZodBigInt",(e,t)=>{_i.init(e,t),B.init(e,t),e._zod.processJSONSchema=(o,n,i)=>wu(e,o,n,i),e.gte=(o,n)=>e.check(ke(o,n)),e.min=(o,n)=>e.check(ke(o,n)),e.gt=(o,n)=>e.check(ot(o,n)),e.gte=(o,n)=>e.check(ke(o,n)),e.min=(o,n)=>e.check(ke(o,n)),e.lt=(o,n)=>e.check(rt(o,n)),e.lte=(o,n)=>e.check(Re(o,n)),e.max=(o,n)=>e.check(Re(o,n)),e.positive=o=>e.check(ot(BigInt(0),o)),e.negative=o=>e.check(rt(BigInt(0),o)),e.nonpositive=o=>e.check(Re(BigInt(0),o)),e.nonnegative=o=>e.check(ke(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(Nt(o,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});Ca=g("ZodBigIntFormat",(e,t)=>{Bl.init(e,t),ir.init(e,t)});kp=g("ZodSymbol",(e,t)=>{Wl.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ku(e,r,o,n)});xp=g("ZodUndefined",(e,t)=>{Zl.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Su(e,r,o,n)});Sp=g("ZodNull",(e,t)=>{Kl.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>xu(e,r,o,n)});Ep=g("ZodAny",(e,t)=>{Vl.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Tu(e,r,o,n)});Tp=g("ZodUnknown",(e,t)=>{Hl.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Au(e,r,o,n)});Ap=g("ZodNever",(e,t)=>{Jl.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Eu(e,r,o,n)});Ip=g("ZodVoid",(e,t)=>{Yl.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>$u(e,r,o,n)});mo=g("ZodDate",(e,t)=>{ql.init(e,t),B.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Iu(e,o,n,i),e.min=(o,n)=>e.check(ke(o,n)),e.max=(o,n)=>e.check(Re(o,n));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});Cp=g("ZodArray",(e,t)=>{Xl.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Fu(e,r,o,n),e.element=t.element,uo(e,"ZodArray",{min(r,o){return this.check(mt(r,o))},nonempty(r){return this.check(mt(1,r))},max(r,o){return this.check(sn(r,o))},length(r,o){return this.check(cn(r,o))},unwrap(){return this.element}})});fo=g("ZodObject",(e,t)=>{Ql.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Gu(e,r,o,n),E.defineLazy(e,"shape",()=>t.shape),uo(e,"ZodObject",{keyof(){return Na(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:ln()})},loose(){return this.clone({...this._zod.def,catchall:ln()})},strict(){return this.clone({...this._zod.def,catchall:Pa()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return E.extend(this,r)},safeExtend(r){return E.safeExtend(this,r)},merge(r){return E.merge(this,r)},pick(r){return E.pick(this,r)},omit(r){return E.omit(this,r)},partial(...r){return E.partial(Da,this,r[0])},required(...r){return E.required(ja,this,r[0])}})});go=g("ZodUnion",(e,t)=>{Hr.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ta(e,r,o,n),e.options=t.options});Pp=g("ZodXor",(e,t)=>{go.init(e,t),ed.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ta(e,r,o,n),e.options=t.options});Op=g("ZodDiscriminatedUnion",(e,t)=>{go.init(e,t),td.init(e,t)});Np=g("ZodIntersection",(e,t)=>{nd.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Bu(e,r,o,n)});Dp=g("ZodTuple",(e,t)=>{wi.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Wu(e,r,o,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});Qn=g("ZodRecord",(e,t)=>{rd.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Zu(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType});Mp=g("ZodMap",(e,t)=>{od.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>zu(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(it(...r)),e.nonempty=r=>e.check(it(1,r)),e.max=(...r)=>e.check(Rt(...r)),e.size=(...r)=>e.check(an(...r))});zp=g("ZodSet",(e,t)=>{id.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Uu(e,r,o,n),e.min=(...r)=>e.check(it(...r)),e.nonempty=r=>e.check(it(1,r)),e.max=(...r)=>e.check(Rt(...r)),e.size=(...r)=>e.check(an(...r))});er=g("ZodEnum",(e,t)=>{ad.init(e,t),B.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Cu(e,o,n,i),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{let i={};for(let a of o)if(r.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new er({...t,checks:[],...E.normalizeParams(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let a of o)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new er({...t,checks:[],...E.normalizeParams(n),entries:i})}});Up=g("ZodLiteral",(e,t)=>{sd.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Pu(e,r,o,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});Fp=g("ZodFile",(e,t)=>{cd.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ru(e,r,o,n),e.min=(r,o)=>e.check(it(r,o)),e.max=(r,o)=>e.check(Rt(r,o)),e.mime=(r,o)=>e.check(Wn(Array.isArray(r)?r:[r],o))});Gp=g("ZodTransform",(e,t)=>{ld.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Mu(e,r,o,n),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new At(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(E.issue(i,r.value,t));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(E.issue(a))}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r.fallback=!0,r)):(r.value=n,r.fallback=!0,r)}});Da=g("ZodOptional",(e,t)=>{ki.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>na(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});Bp=g("ZodExactOptional",(e,t)=>{dd.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>na(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});Zp=g("ZodNullable",(e,t)=>{ud.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ku(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});Kp=g("ZodDefault",(e,t)=>{pd.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Hu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});Hp=g("ZodPrefault",(e,t)=>{md.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ju(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});ja=g("ZodNonOptional",(e,t)=>{hd.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Vu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});qp=g("ZodSuccess",(e,t)=>{fd.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Du(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});Xp=g("ZodCatch",(e,t)=>{gd.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Yu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});em=g("ZodNaN",(e,t)=>{yd.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ou(e,r,o,n)});yo=g("ZodPipe",(e,t)=>{xi.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>qu(e,r,o,n),e.in=t.in,e.out=t.out});vo=g("ZodCodec",(e,t)=>{yo.init(e,t),Jr.init(e,t)});tm=g("ZodPreprocess",(e,t)=>{yo.init(e,t),vd.init(e,t)}),nm=g("ZodReadonly",(e,t)=>{bd.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Xu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});om=g("ZodTemplateLiteral",(e,t)=>{_d.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Nu(e,r,o,n)});im=g("ZodLazy",(e,t)=>{xd.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ep(e,r,o,n),e.unwrap=()=>e._zod.def.getter()});sm=g("ZodPromise",(e,t)=>{kd.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Qu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});cm=g("ZodFunction",(e,t)=>{wd.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Lu(e,r,o,n)});bo=g("ZodCustom",(e,t)=>{Sd.init(e,t),B.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ju(e,r,o,n)});zb=hu,Ub=fu;Gb=(...e)=>gu({Codec:vo,Boolean:or,String:tr},...e)});function cA(e){ne({customError:e})}function lA(){return ne().customError}var sA,um,Zb=v(()=>{De();sA={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};um||(um={})});function uA(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function pA(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let o=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===o){let n=r[1];if(!n||!t.defs[n])throw new Error(`Reference not found: ${e}`);return t.defs[n]}throw new Error(`Reference not found: ${e}`)}function Kb(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return N.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return N.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let i=pA(n,t),a=fe(i,t);return t.refs.set(n,a),t.processing.delete(n),a}if(e.enum!==void 0){let n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&n.length===1&&n[0]===null)return N.null();if(n.length===0)return N.never();if(n.length===1)return N.literal(n[0]);if(n.every(a=>typeof a=="string"))return N.enum(n);let i=n.map(a=>N.literal(a));return i.length<2?i[0]:N.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return N.literal(e.const);let r=e.type;if(Array.isArray(r)){let n=r.map(i=>{let a={...e,type:i};return Kb(a,t)});return n.length===0?N.never():n.length===1?n[0]:N.union(n)}if(!r)return N.any();let o;switch(r){case"string":{let n=N.string();if(e.format){let i=e.format;i==="email"?n=n.check(N.email()):i==="uri"||i==="uri-reference"?n=n.check(N.url()):i==="uuid"||i==="guid"?n=n.check(N.uuid()):i==="date-time"?n=n.check(N.iso.datetime()):i==="date"?n=n.check(N.iso.date()):i==="time"?n=n.check(N.iso.time()):i==="duration"?n=n.check(N.iso.duration()):i==="ipv4"?n=n.check(N.ipv4()):i==="ipv6"?n=n.check(N.ipv6()):i==="mac"?n=n.check(N.mac()):i==="cidr"?n=n.check(N.cidrv4()):i==="cidr-v6"?n=n.check(N.cidrv6()):i==="base64"?n=n.check(N.base64()):i==="base64url"?n=n.check(N.base64url()):i==="e164"?n=n.check(N.e164()):i==="jwt"?n=n.check(N.jwt()):i==="emoji"?n=n.check(N.emoji()):i==="nanoid"?n=n.check(N.nanoid()):i==="cuid"?n=n.check(N.cuid()):i==="cuid2"?n=n.check(N.cuid2()):i==="ulid"?n=n.check(N.ulid()):i==="xid"?n=n.check(N.xid()):i==="ksuid"&&(n=n.check(N.ksuid()))}typeof e.minLength=="number"&&(n=n.min(e.minLength)),typeof e.maxLength=="number"&&(n=n.max(e.maxLength)),e.pattern&&(n=n.regex(new RegExp(e.pattern))),o=n;break}case"number":case"integer":{let n=r==="integer"?N.number().int():N.number();typeof e.minimum=="number"&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&(n=n.max(e.maximum)),typeof e.exclusiveMinimum=="number"?n=n.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(n=n.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?n=n.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(n=n.lt(e.maximum)),typeof e.multipleOf=="number"&&(n=n.multipleOf(e.multipleOf)),o=n;break}case"boolean":{o=N.boolean();break}case"null":{o=N.null();break}case"object":{let n={},i=e.properties||{},a=new Set(e.required||[]);for(let[c,d]of Object.entries(i)){let u=fe(d,t);n[c]=a.has(c)?u:u.optional()}if(e.propertyNames){let c=fe(e.propertyNames,t),d=e.additionalProperties&&typeof e.additionalProperties=="object"?fe(e.additionalProperties,t):N.any();if(Object.keys(n).length===0){o=N.record(c,d);break}let u=N.object(n).passthrough(),p=N.looseRecord(c,d);o=N.intersection(u,p);break}if(e.patternProperties){let c=e.patternProperties,d=Object.keys(c),u=[];for(let m of d){let h=fe(c[m],t),f=N.string().regex(new RegExp(m));u.push(N.looseRecord(f,h))}let p=[];if(Object.keys(n).length>0&&p.push(N.object(n).passthrough()),p.push(...u),p.length===0)o=N.object({}).passthrough();else if(p.length===1)o=p[0];else{let m=N.intersection(p[0],p[1]);for(let h=2;h<p.length;h++)m=N.intersection(m,p[h]);o=m}break}let s=N.object(n);e.additionalProperties===!1?o=s.strict():typeof e.additionalProperties=="object"?o=s.catchall(fe(e.additionalProperties,t)):o=s.passthrough();break}case"array":{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=n.map(c=>fe(c,t)),s=i&&typeof i=="object"&&!Array.isArray(i)?fe(i,t):void 0;s?o=N.tuple(a).rest(s):o=N.tuple(a),typeof e.minItems=="number"&&(o=o.check(N.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(N.maxLength(e.maxItems)))}else if(Array.isArray(i)){let a=i.map(c=>fe(c,t)),s=e.additionalItems&&typeof e.additionalItems=="object"?fe(e.additionalItems,t):void 0;s?o=N.tuple(a).rest(s):o=N.tuple(a),typeof e.minItems=="number"&&(o=o.check(N.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(N.maxLength(e.maxItems)))}else if(i!==void 0){let a=fe(i,t),s=N.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),o=s}else o=N.array(N.any());break}default:throw new Error(`Unsupported type: ${r}`)}return o}function fe(e,t){if(typeof e=="boolean")return e?N.any():N.never();let r=Kb(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(d=>fe(d,t)),c=N.union(s);r=o?N.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(d=>fe(d,t)),c=N.xor(s);r=o?N.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=o?r:N.any();else{let s=o?r:fe(e.allOf[0],t),c=o?0:1;for(let d=c;d<e.allOf.length;d++)s=N.intersection(s,fe(e.allOf[d],t));r=s}e.nullable===!0&&t.version==="openapi-3.0"&&(r=N.nullable(r)),e.readOnly===!0&&(r=N.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let n={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of i)s in e&&(n[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(n[s]=e[s]);for(let s of Object.keys(e))dA.has(s)||(n[s]=e[s]);return Object.keys(n).length>0&&t.registry.add(r,n),e.description&&(r=r.describe(e.description)),r}function Vb(e,t){if(typeof e=="boolean")return e?N.any():N.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let o=uA(r,t?.defaultTarget),n=r.$defs||r.definitions||{},i={version:o,defs:n,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??me};return fe(r,i)}var N,dA,Hb=v(()=>{Xr();aa();ro();io();N={...oo,...ia,iso:Xn},dA=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"])});var pm={};nt(pm,{bigint:()=>gA,boolean:()=>fA,date:()=>yA,number:()=>hA,string:()=>mA});function mA(e){return Nd(tr,e)}function hA(e){return Fd(rr,e)}function fA(e){return Hd(or,e)}function gA(e){return Yd(ir,e)}function yA(e){return su(mo,e)}var Jb=v(()=>{De();io()});var l={};nt(l,{$brand:()=>tc,$input:()=>Pd,$output:()=>Cd,NEVER:()=>ec,TimePrecision:()=>Dd,ZodAny:()=>Ep,ZodArray:()=>Cp,ZodBase64:()=>Ea,ZodBase64URL:()=>Ta,ZodBigInt:()=>ir,ZodBigIntFormat:()=>Ca,ZodBoolean:()=>or,ZodCIDRv4:()=>Sa,ZodCIDRv6:()=>$a,ZodCUID:()=>ya,ZodCUID2:()=>va,ZodCatch:()=>Xp,ZodCodec:()=>vo,ZodCustom:()=>bo,ZodCustomStringFormat:()=>nr,ZodDate:()=>mo,ZodDefault:()=>Kp,ZodDiscriminatedUnion:()=>Op,ZodE164:()=>Aa,ZodEmail:()=>ha,ZodEmoji:()=>fa,ZodEnum:()=>er,ZodError:()=>iA,ZodExactOptional:()=>Bp,ZodFile:()=>Fp,ZodFirstPartyTypeKind:()=>um,ZodFunction:()=>cm,ZodGUID:()=>so,ZodIPv4:()=>ka,ZodIPv6:()=>xa,ZodISODate:()=>ca,ZodISODateTime:()=>sa,ZodISODuration:()=>da,ZodISOTime:()=>la,ZodIntersection:()=>Np,ZodIssueCode:()=>sA,ZodJWT:()=>Ia,ZodKSUID:()=>wa,ZodLazy:()=>im,ZodLiteral:()=>Up,ZodMAC:()=>bp,ZodMap:()=>Mp,ZodNaN:()=>em,ZodNanoID:()=>ga,ZodNever:()=>Ap,ZodNonOptional:()=>ja,ZodNull:()=>Sp,ZodNullable:()=>Zp,ZodNumber:()=>rr,ZodNumberFormat:()=>dn,ZodObject:()=>fo,ZodOptional:()=>Da,ZodPipe:()=>yo,ZodPrefault:()=>Hp,ZodPreprocess:()=>tm,ZodPromise:()=>sm,ZodReadonly:()=>nm,ZodRealError:()=>Ie,ZodRecord:()=>Qn,ZodSet:()=>zp,ZodString:()=>tr,ZodStringFormat:()=>J,ZodSuccess:()=>qp,ZodSymbol:()=>kp,ZodTemplateLiteral:()=>om,ZodTransform:()=>Gp,ZodTuple:()=>Dp,ZodType:()=>B,ZodULID:()=>ba,ZodURL:()=>po,ZodUUID:()=>at,ZodUndefined:()=>xp,ZodUnion:()=>go,ZodUnknown:()=>Tp,ZodVoid:()=>Ip,ZodXID:()=>_a,ZodXor:()=>Pp,_ZodString:()=>ma,_default:()=>Vp,_function:()=>jb,any:()=>mb,array:()=>ho,base64:()=>Yv,base64url:()=>qv,bigint:()=>cb,boolean:()=>wp,catch:()=>Qp,check:()=>Lb,cidrv4:()=>Hv,cidrv6:()=>Jv,clone:()=>_e,codec:()=>Ob,coerce:()=>pm,config:()=>ne,core:()=>ht,cuid:()=>Uv,cuid2:()=>Fv,custom:()=>Mb,date:()=>fb,decode:()=>up,decodeAsync:()=>mp,describe:()=>zb,discriminatedUnion:()=>wb,e164:()=>Xv,email:()=>Cv,emoji:()=>Mv,encode:()=>dp,encodeAsync:()=>pp,endsWith:()=>Bn,enum:()=>Na,exactOptional:()=>Wp,file:()=>Ab,flattenError:()=>Gr,float32:()=>ob,float64:()=>ib,formatError:()=>Br,fromJSONSchema:()=>Vb,function:()=>jb,getErrorMap:()=>lA,globalRegistry:()=>me,gt:()=>ot,gte:()=>ke,guid:()=>Pv,hash:()=>rb,hex:()=>nb,hostname:()=>tb,httpUrl:()=>Lv,includes:()=>Fn,instanceof:()=>Fb,int:()=>ua,int32:()=>ab,int64:()=>lb,intersection:()=>Rp,invertCodec:()=>Nb,ipv4:()=>Zv,ipv6:()=>Vv,iso:()=>Xn,json:()=>Bb,jwt:()=>Qv,keyof:()=>gb,ksuid:()=>Wv,lazy:()=>am,length:()=>cn,literal:()=>Tb,locales:()=>qr,looseObject:()=>bb,looseRecord:()=>xb,lowercase:()=>zn,lt:()=>rt,lte:()=>Re,mac:()=>Kv,map:()=>Sb,maxLength:()=>sn,maxSize:()=>Rt,meta:()=>Ub,mime:()=>Wn,minLength:()=>mt,minSize:()=>it,multipleOf:()=>Nt,nan:()=>Pb,nanoid:()=>zv,nativeEnum:()=>Eb,negative:()=>Yi,never:()=>Pa,nonnegative:()=>Xi,nonoptional:()=>Yp,nonpositive:()=>qi,normalize:()=>Zn,null:()=>$p,nullable:()=>lo,nullish:()=>Ib,number:()=>_p,object:()=>yb,optional:()=>co,overwrite:()=>Ye,parse:()=>ap,parseAsync:()=>sp,partialRecord:()=>kb,pipe:()=>pa,positive:()=>Ji,prefault:()=>Jp,preprocess:()=>Wb,prettifyError:()=>hc,promise:()=>Db,property:()=>Qi,readonly:()=>rm,record:()=>Lp,refine:()=>lm,regex:()=>Mn,regexes:()=>Ne,registry:()=>Ai,safeDecode:()=>fp,safeDecodeAsync:()=>yp,safeEncode:()=>hp,safeEncodeAsync:()=>gp,safeParse:()=>cp,safeParseAsync:()=>lp,set:()=>$b,setErrorMap:()=>cA,size:()=>an,slugify:()=>Jn,startsWith:()=>Gn,strictObject:()=>vb,string:()=>ao,stringFormat:()=>eb,stringbool:()=>Gb,success:()=>Cb,superRefine:()=>dm,symbol:()=>ub,templateLiteral:()=>Rb,toJSONSchema:()=>ra,toLowerCase:()=>Vn,toUpperCase:()=>Hn,transform:()=>Ra,treeifyError:()=>mc,trim:()=>Kn,tuple:()=>jp,uint32:()=>sb,uint64:()=>db,ulid:()=>Gv,undefined:()=>pb,union:()=>Oa,unknown:()=>ln,uppercase:()=>Un,url:()=>jv,util:()=>E,uuid:()=>Ov,uuidv4:()=>Nv,uuidv6:()=>Rv,uuidv7:()=>Dv,void:()=>hb,xid:()=>Bv,xor:()=>_b});var mm=v(()=>{De();io();aa();ip();vp();Zb();De();Ed();De();no();Hb();Id();ro();ro();Jb();ne(Si())});var qe=v(()=>{mm();mm()});function Yb(e){let t=e.trim().toLowerCase().replace(/\.$/,"");if(!t)return!1;if(bA.has(t)||vA.some(o=>t.endsWith(o))||/^127\./.test(t)||/^10\./.test(t)||/^192\.168\./.test(t)||/^172\.(1[6-9]|2[0-9]|3[01])\./.test(t))return!0;let r=/^\[::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})\]$/.exec(t);if(r){let o=Number.parseInt(r[1],16),n=Number.parseInt(r[2],16),i=`${o>>8}.${o&255}.${n>>8}.${n&255}`;if(i!==t)return Yb(i)}return!!(/^169\.254\./.test(t)||/^\[?fe80:/.test(t)||/^\[?f[cd][0-9a-f]{2}:/.test(t))}function qb(e){let t;try{t=new URL(e)}catch{return"unparseable"}if(Yb(t.hostname))return"local";if(t.protocol!=="https:")return"insecure"}var vA,bA,hm=v(()=>{"use strict";vA=[".localhost",".local",".internal",".test",".localdomain"],bA=new Set(["localhost","127.0.0.1","::1","[::1]","0.0.0.0","[::]"])});var _o,La=v(()=>{"use strict";qe();_o=l.discriminatedUnion("source",[l.object({source:l.literal("manifest")}),l.object({source:l.literal("studio"),element_id:l.string().min(1),edition_id:l.string().min(1)})])});function t_(e){return e.questions?e.questions:[{id:"1",kind:"choice",prompt:e.prompt,options:e.options??[],result:e.result,points:void 0,min:void 0,max:void 0,step:void 0,tolerance:void 0}]}function Ma(e,t,r){if(e.result===void 0)return 0;let n=(e.kind==="choice"?(e.options??[]).find(i=>i.key===e.result):void 0)?.points??e.points??r;if(e.kind==="number"){if(typeof t!="number"||typeof e.result!="number")return 0;let i=Math.abs(t-e.result);return i===0?n:e.tolerance===void 0||i>=e.tolerance?0:Math.round(n*(1-i/e.tolerance))}return t===e.result?n:0}function ar(e){return`round-${e.number}`}var fm,_A,wA,kA,xA,Xb,SA,gm,Qb,$A,e_,EA,Be,iM,aM,sM,ft=v(()=>{"use strict";qe();Tt();La();fm=l.object({archetype:l.literal("hunt"),number:l.number().int().positive().default(1),prompt:l.string().default(""),board:l.array(l.string().min(1)).min(2),targets:l.array(l.string().min(1)).min(1),required:l.number().int().positive().optional(),pointsPerTarget:l.number().int().nonnegative().default(10),completionBonus:l.number().int().nonnegative().default(0),attemptsAllowed:l.number().int().positive().default(10),mistakesAllowed:l.number().int().positive().default(4),open:l.boolean().default(!0),playsPerSecond:l.number().int().positive().optional(),timerSeconds:l.number().int().positive().optional()}).superRefine((e,t)=>{let r=e.targets.filter(o=>!e.board.includes(o));r.length&&t.addIssue({code:"custom",path:["targets"],message:`Not on the board: ${r.join(", ")}. Every target must be pickable.`}),new Set(e.targets).size!==e.targets.length&&t.addIssue({code:"custom",path:["targets"],message:"The same target twice. Each one counts once."}),e.required!==void 0&&e.required>e.targets.length&&t.addIssue({code:"custom",path:["required"],message:`Asks for ${e.required} of ${e.targets.length} targets, which cannot be reached.`})}),_A=l.object({key:l.string().min(1),label:l.string().min(1),value:l.number().int().nonnegative()}),wA=l.object({id:l.string().min(1),label:l.string().default(""),entries:l.array(_A).min(1)}),kA=l.object({within:l.number().min(0).max(1),label:l.string().min(1)}),xA=[{within:.02,label:"Hall of Fame"},{within:.05,label:"All-NBA"},{within:.1,label:"All-Star"},{within:.18,label:"Starter"},{within:.28,label:"Veteran"}],Xb=l.object({archetype:l.literal("push"),number:l.number().int().positive().default(1),prompt:l.string().default(""),target:l.number().int().positive(),targetLabel:l.string().default(""),unit:l.string().max(4).default(""),theme:l.string().default(""),slates:l.array(wA).min(1),tiers:l.array(kA).default(xA),floorLabel:l.string().default("Rookie"),bustLabel:l.string().default("Busted"),open:l.boolean().default(!0),playsPerSecond:l.number().int().positive().optional(),timerSeconds:l.number().int().positive().optional()}).superRefine((e,t)=>{let r=e.slates.map(s=>s.id);new Set(r).size!==r.length&&t.addIssue({code:"custom",path:["slates"],message:"Two slates share an id. A play names the slate it picked from."});let o=e.slates.flatMap(s=>s.entries.map(c=>c.key)),n=[...new Set(o.filter((s,c)=>o.indexOf(s)!==c))];n.length&&t.addIssue({code:"custom",path:["slates"],message:`The same key on more than one slate: ${n.join(", ")}. A play names a key, so each one must belong to exactly one slate.`});let i=e.slates.reduce((s,c)=>s+Math.min(...c.entries.map(d=>d.value)),0);i>e.target&&t.addIssue({code:"custom",path:["target"],message:`The lowest possible total is ${i}, which is already over ${e.target}. Every player would bust.`}),e.tiers.every((s,c)=>c===0||s.within>e.tiers[c-1].within)||t.addIssue({code:"custom",path:["tiers"],message:"Tiers must be ordered from closest to furthest. Out of order, the first one that matches is the wrong one and every player is awarded it."})}),SA=l.object({key:l.string().min(1),label:l.string().min(1),members:l.array(l.string().min(1)).min(2)}),gm=l.object({archetype:l.literal("group"),number:l.number().int().positive().default(1),prompt:l.string().default(""),board:l.array(l.string().min(1)).min(4),groups:l.array(SA).min(2),pointsPerGroup:l.number().int().nonnegative().default(10),completionBonus:l.number().int().nonnegative().default(0),attemptsAllowed:l.number().int().positive().default(10),mistakesAllowed:l.number().int().positive().default(4),open:l.boolean().default(!0),playsPerSecond:l.number().int().positive().optional(),timerSeconds:l.number().int().positive().optional()}).superRefine((e,t)=>{let r=new Map;for(let i of e.groups){let a=i.members.filter(s=>!e.board.includes(s));a.length&&t.addIssue({code:"custom",path:["groups"],message:`${i.key} has members that are not on the board: ${a.join(", ")}.`});for(let s of i.members){let c=r.get(s);c&&c!==i.key&&t.addIssue({code:"custom",path:["groups"],message:`${s} is in both ${c} and ${i.key}. Groups cannot overlap.`}),r.set(s,i.key)}}new Set(e.groups.map(i=>i.key)).size!==e.groups.length&&t.addIssue({code:"custom",path:["groups"],message:"Two groups share a key. Each one needs its own."}),e.groups.length>e.attemptsAllowed&&t.addIssue({code:"custom",path:["attemptsAllowed"],message:`${e.groups.length} groups cannot be found in ${e.attemptsAllowed} attempts.`});let o=new Set(e.groups.flatMap(i=>i.members)),n=e.board.filter(i=>!o.has(i));n.length&&t.addIssue({code:"custom",path:["board"],message:`On the board and in no group: ${n.join(", ")}. Every item needs a group.`})}),Qb=l.object({key:l.string().min(1),label:l.string().min(1),points:l.number().int().nonnegative().optional()}),$A=l.object({id:l.string().min(1),kind:l.enum(["choice","number"]).default("choice"),prompt:l.string().default(""),options:l.array(Qb).optional(),min:l.number().optional(),max:l.number().optional(),step:l.number().positive().optional(),result:l.union([l.string().min(1),l.number()]).optional(),points:l.number().int().nonnegative().optional(),tolerance:l.number().positive().optional()}).superRefine((e,t)=>{if(e.kind==="choice"){if(!e.options||e.options.length<2){t.addIssue({code:"custom",path:["options"],message:"A choice needs at least two options, or there is nothing to predict."});return}new Set(e.options.map(r=>r.key)).size!==e.options.length&&t.addIssue({code:"custom",path:["options"],message:"Two options share a key. Each one needs its own."}),typeof e.result=="string"&&!e.options.some(r=>r.key===e.result)&&t.addIssue({code:"custom",path:["result"],message:`${e.result} is not one of the options, so nobody could have predicted it.`}),typeof e.result=="number"&&t.addIssue({code:"custom",path:["result"],message:"A choice settles to one of its option keys, not to a number."});return}e.options&&e.options.length>0&&t.addIssue({code:"custom",path:["options"],message:"A number question has no options: a fan gives a value."}),e.min===void 0||e.max===void 0?t.addIssue({code:"custom",path:["min"],message:"A number needs a min and a max, or a fan is given a control with no ends."}):e.max<=e.min&&t.addIssue({code:"custom",path:["max"],message:"The maximum has to be above the minimum."}),typeof e.result=="string"&&t.addIssue({code:"custom",path:["result"],message:"A number settles to a number."})}),e_=l.object({archetype:l.literal("predict"),number:l.number().int().positive().default(1),prompt:l.string().default(""),options:l.array(Qb).min(2).optional(),questions:l.array($A).min(1).optional(),result:l.string().min(1).optional(),pointsForCorrect:l.number().int().nonnegative().default(10),attemptsAllowed:l.number().int().positive().default(1),open:l.boolean().default(!0),playsPerSecond:l.number().int().positive().optional(),timerSeconds:l.number().int().positive().optional()}).superRefine((e,t)=>{let r=e.options!==void 0,o=e.questions!==void 0;if(r&&o&&t.addIssue({code:"custom",path:["questions"],message:"A round declares options or questions, not both. Two homes for one question is how they drift apart."}),!r&&!o&&t.addIssue({code:"custom",path:["questions"],message:"A prediction needs something to predict: options, or questions."}),o&&e.questions){let n=e.questions.map(i=>i.id);new Set(n).size!==n.length&&t.addIssue({code:"custom",path:["questions"],message:"Two questions share an id. A play names the question it answered."})}e.options&&new Set(e.options.map(n=>n.key)).size!==e.options.length&&t.addIssue({code:"custom",path:["options"],message:"Two options share a key. Each one needs its own."}),e.result!==void 0&&e.options!==void 0&&!e.options.some(n=>n.key===e.result)&&t.addIssue({code:"custom",path:["result"],message:`${e.result} is not one of the options, so nobody could have predicted it.`})});EA=l.discriminatedUnion("archetype",[fm,Xb,gm,e_]),Be=l.preprocess(Jf,EA);iM=l.object({action:l.literal("settle"),game:l.string().min(1),roundId:l.string().min(1),result:l.string().min(1)}),aM=l.object({game:l.string().min(1),round:Be,origin:_o.optional(),snapshot:l.string().default(""),source:l.string().optional(),roundId:l.string().min(1).optional(),selection:l.object({mode:l.literal("rotation"),windowSeconds:l.number().int().positive(),rounds:l.array(l.object({id:l.string().min(1),round:Be,origin:_o.optional()})).min(1)}).optional()}),sM=l.object({roundId:l.string(),version:l.number().int().nonnegative(),changed:l.boolean(),current:l.boolean()})});function r_(e){let t=[];e.measurement.signal.enabled&&!e.identity.consent.analytics_requires_consent&&t.push({path:"identity.consent.analytics_requires_consent",message:"Cannot be false while measurement.signal.enabled is true. Signal collects player engagement under Monterosa's own controllership, so consent is required and is not the game's to waive. Turn Signal off, or leave consent required."});let r=e.operations.promotion;if(r.offers_prize&&(r.terms_url||t.push({path:"operations.promotion.terms_url",message:"Required when the game offers a prize."}),r.jurisdictions.length===0&&t.push({path:"operations.promotion.jurisdictions",message:"Name the countries the promotion is open in. An unbounded prize draw is open in jurisdictions whose rules you have not read."}),!r.skill_based&&!r.free_entry_route&&t.push({path:"operations.promotion.free_entry_route",message:"A paid-entry prize needs either a published free entry route or a real skill test. Set `free_entry_route`, or set `skill_based` if entry turns on skill, knowledge or judgement."})),e.identity.provider==="jwt"&&!e.identity.jwt&&t.push({path:"identity.jwt",message:"Required when identity.provider is `jwt`. Name the `issuer` and the `jwks_uri` of the login system whose tokens this game accepts. Gamestage provides no identity provider."}),e.identity.jwt)for(let o of["issuer","jwks_uri"]){let n=e.identity.jwt[o],i=qb(n);i&&t.push({path:`identity.jwt.${o}`,message:i==="local"?"Names a host only the machine running it can reach, which is the local `gamestage dev --as` harness. That harness signs its own tokens, so a deployed game pointed at it would let anyone who can reach the key be any player. Name the login system a real fan signs in to. `gamestage dev` supplies its own and needs nothing here.":i==="insecure"?"Must be https. A key set fetched in clear text is a key set the network chooses, and a token checked against it has proved nothing.":"Not a URL. Name the full issuer and JWKS URI of the login system whose tokens this game accepts."})}return e.identity.age_gate.required&&!e.identity.age_gate.minimum_age&&t.push({path:"identity.age_gate.minimum_age",message:"Required when identity.age_gate.required is true."}),e.identity.age_gate.method==="verified"&&!e.identity.age_gate.verifier&&t.push({path:"identity.age_gate.verifier",message:"Name the verifier when the method is `verified`. Gamestage provides no age verification, so an unnamed verifier is an unevidenced claim."}),t}var wo,ym,vm,bm,Mt,sr,n_,TA,st,AA,IA,CA,PA,OA,zt,NA,RA,DA,jA,LA,MA,zA,UA,FA,GA,BA,WA,ZA,Ut,cr,un=v(()=>{"use strict";qe();hm();Rr();Tt();ft();wo="1.0",ym=l.enum(["missing","proposed","confirmed","verified","approved"]),vm={missing:0,proposed:1,confirmed:2,verified:3,approved:4},bm=l.enum(["runtime","live","enterprise"]),Mt=l.enum(["L0","L1","L2","L3","L4","L5"]),sr={L0:0,L1:1,L2:2,L3:3,L4:4,L5:5},n_={L0:"Concept",L1:"Experience",L2:"Integration",L3:"Deployable",L4:"Production",L5:"Operating"},TA=l.discriminatedUnion("kind",[l.object({kind:l.literal("human_decision"),owner:l.string(),date:l.string(),note:l.string().optional()}),l.object({kind:l.literal("generated_proposal"),tool:l.string(),model:l.string().optional(),source_context:l.string().optional()}),l.object({kind:l.literal("repository_evidence"),file:l.string(),commit:l.string().optional(),package:l.string().optional()}),l.object({kind:l.literal("platform_evidence"),system:l.string(),id:l.string()}),l.object({kind:l.literal("external_evidence"),supplier:l.string(),licence:l.string().optional(),dataset_version:l.string().optional()})]),st={status:ym.default("missing"),provenance:l.array(TA).default([])},AA=l.object({schema_version:l.string(),revision:l.number().int().nonnegative().default(0),conformance:Mt.default("L0")}),IA=l.object({repository:l.string().url(),branch:l.string().default("main")}),CA=l.object({id:l.string().min(1),title:l.string().min(1),summary:l.string().optional(),source:IA.optional(),owners:l.object({ip:l.string().optional(),delivery:l.string().optional(),platform:l.string().optional()}).prefault({}),...st}),PA=l.enum(["bring_your_own","managed_runtime","manifest_driven","dedicated_engine"]),OA=l.enum(["trivia","predict","group","timed_round","synchronous_event","collection_ranking","hunt","push"]),zt=l.preprocess(e=>typeof e=="string"?He(e):e,OA),NA=l.object({route:PA.optional(),archetype:zt.optional(),component:l.string().optional(),version:l.string().optional(),variant:l.string().optional(),configuration:l.record(l.string(),l.unknown()).default({}),round:Be.optional(),...st}),RA=l.object({surfaces:l.array(l.string()).default([]),container_label:l.string().min(1).default(An),screen_graph:l.string().optional(),design:l.object({figma_file:l.string().optional(),figma_version:l.string().optional(),tokens:l.string().optional(),fidelity:Mt.optional()}).optional(),...st}),DA=l.object({spec_url:l.string().optional(),version:l.string().optional(),...st}),jA=l.object({family:l.string().optional(),version:l.string().optional(),configuration_schema:l.string().optional(),...st}),LA=l.object({project_template:l.string().optional(),project_id:l.string().optional(),events:l.array(l.string()).default([]),elements:l.array(l.string()).default([]),...st}),MA=l.object({required:l.boolean().default(!1),minimum_age:l.number().int().positive().max(120).optional(),method:l.enum(["self_declared","verified"]).default("self_declared"),verifier:l.string().optional()}),zA=l.object({issuer:l.string().url(),jwks_uri:l.string().url(),audience:l.string().optional()}),UA=l.object({provider:l.enum(["identify","anonymous","custom","jwt"]).optional(),jwt:zA.optional(),require_authenticated_writes:l.boolean().default(!0),age_gate:MA.prefault({}),consent:l.object({analytics_requires_consent:l.boolean().default(!0),provider:l.string().optional()}).prefault({}),...st}),FA=l.object({type:l.enum(["monterosa","posthog","ga4","webhook"]),enabled:l.boolean().default(!0),config:l.record(l.string(),l.string()).default({})}),GA=l.object({destinations:l.array(FA).default([{type:"monterosa",enabled:!0,config:{}}]),trusted_events:l.array(l.string()).default([]),signal:l.object({enabled:l.boolean().default(!1),application_id:l.string().optional(),write_key:l.string().optional(),monterosa:l.object({enabled:l.boolean().default(!1),organisation_id:l.string().optional(),project_id:l.string().optional()}).prefault({})}).prefault({}),...st}),BA=l.object({hosting:l.string().optional(),space_spec:l.string().optional(),environments:l.array(l.enum(["local","playground","staging","production"])).default(["local"]),...st}),WA=l.object({offers_prize:l.boolean().default(!1),free_entry_route:l.string().optional(),skill_based:l.boolean().default(!1),terms_url:l.string().optional(),jurisdictions:l.array(l.string()).default([])}),ZA=l.object({support_tier:bm.optional(),runbook:l.string().optional(),promotion:WA.prefault({}),...st}),Ut=l.object({manifest:AA,app:CA,experience:RA.prefault({}),studio_app:DA.prefault({}),studio_surface:jA.prefault({}),backend:NA.prefault({}),interaction_cloud:LA.prefault({}),identity:UA.prefault({}),measurement:GA.prefault({}),deployment:BA.prefault({}),operations:ZA.prefault({})});cr=["app","experience","studio_app","studio_surface","backend","interaction_cloud","identity","measurement","deployment","operations"]});function je(e){let t=KA.map(d=>({id:d.id,level:d.level,requirement:d.requirement,passed:d.check(e)})),r="L0",o=!0;for(let d of o_)t.filter(m=>m.level===d).every(m=>m.passed)&&o?r=d:o=!1;let n=t.filter(d=>d.level==="L0").every(d=>d.passed),i=sr[r]+1,a=o_[i],s=a?t.filter(d=>d.level===a&&!d.passed):[],c=e.manifest.conformance;return{computed:r,computedName:n_[r],claimed:c,overclaimed:!n||sr[c]>sr[r],results:t,blockers:n?s:t.filter(d=>d.level==="L0"&&!d.passed)}}function i_(e,t){let o=je(e).results.filter(n=>!n.passed&&sr[n.level]<=sr[t]);return{ok:o.length===0,missing:o}}var gt,Ce,KA,o_,_m=v(()=>{"use strict";un();gt=(e,t,r)=>{let o=e[t];return vm[o?.status??"missing"]>=vm[r]},Ce=e=>typeof e=="string"?e.trim().length>0:e!=null,KA=[{level:"L0",id:"L0.app.identity",requirement:"app.id and app.title are set",check:e=>Ce(e.app.id)&&Ce(e.app.title)},{level:"L0",id:"L0.app.status",requirement:"app section is at least proposed",check:e=>gt(e,"app","proposed")},{level:"L0",id:"L0.schema.version",requirement:"manifest.schema_version is set",check:e=>Ce(e.manifest.schema_version)},{level:"L1",id:"L1.experience.defined",requirement:"experience declares a screen graph or at least one player surface",check:e=>Ce(e.experience.screen_graph)||e.experience.surfaces.length>0},{level:"L1",id:"L1.experience.status",requirement:"experience section is at least proposed",check:e=>gt(e,"experience","proposed")},{level:"L1",id:"L1.backend.route",requirement:"backend.route is chosen, so authority is decided before client code",check:e=>Ce(e.backend.route)},{level:"L2",id:"L2.backend.pinned",requirement:"backend names a component and version, confirmed or better",check:e=>Ce(e.backend.component)&&Ce(e.backend.version)&&gt(e,"backend","confirmed")},{level:"L2",id:"L2.identity.policy",requirement:"identity provider is set and the section is confirmed",check:e=>Ce(e.identity.provider)&&gt(e,"identity","confirmed")},{level:"L2",id:"L2.measurement.destination",requirement:"at least one enabled analytics destination is declared",check:e=>e.measurement.destinations.some(t=>t.enabled)},{level:"L2",id:"L2.platform.identifiers",requirement:"a real platform identity exists (Studio App Spec or Interaction Cloud project)",check:e=>Ce(e.studio_app.spec_url)||Ce(e.interaction_cloud.project_id)},{level:"L3",id:"L3.deployment.space",requirement:"deployment names a Space spec and a non-local environment",check:e=>Ce(e.deployment.space_spec)&&e.deployment.environments.some(t=>t!=="local")},{level:"L3",id:"L3.surface.declared",requirement:"a Studio Surface family is declared for operator control",check:e=>Ce(e.studio_surface.family)},{level:"L3",id:"L3.sections.confirmed",requirement:"experience, backend and deployment are all confirmed or better",check:e=>gt(e,"experience","confirmed")&&gt(e,"backend","confirmed")&&gt(e,"deployment","confirmed")},{level:"L4",id:"L4.sections.verified",requirement:"experience, backend, identity and deployment are verified with evidence attached",check:e=>["experience","backend","identity","deployment"].every(t=>gt(e,t,"verified")&&e[t].provenance.length>0)},{level:"L4",id:"L4.operations.runbook",requirement:"operations declares a support tier and a runbook",check:e=>Ce(e.operations.support_tier)&&Ce(e.operations.runbook)},{level:"L5",id:"L5.production.approved",requirement:"the manifest is approved and deployed to a production environment",check:e=>gt(e,"operations","approved")&&e.deployment.environments.includes("production")}],o_=["L0","L1","L2","L3","L4","L5"]});function w_(e){return typeof e>"u"||e===null}function VA(e){return typeof e=="object"&&e!==null}function HA(e){return Array.isArray(e)?e:w_(e)?[]:[e]}function JA(e,t){var r,o,n,i;if(t)for(i=Object.keys(t),r=0,o=i.length;r<o;r+=1)n=i[r],e[n]=t[n];return e}function YA(e,t){var r="",o;for(o=0;o<t;o+=1)r+=e;return r}function qA(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}function k_(e,t){var r="",o=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
8074
+
8075
+ `+e.mark.snippet),o+" "+r):o}function xo(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=k_(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}function wm(e,t,r,o,n){var i="",a="",s=Math.floor(n/2)-1;return o-t>s&&(i=" ... ",t=o-s+i.length),r-o>s&&(a=" ...",r=o+s-a.length),{str:i+e.slice(t,r).replace(/\t/g,"\u2192")+a,pos:o-t+i.length}}function km(e,t){return se.repeat(" ",t-e.length)+e}function oI(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,o=[0],n=[],i,a=-1;i=r.exec(e.buffer);)n.push(i.index),o.push(i.index+i[0].length),e.position<=i.index&&a<0&&(a=o.length-2);a<0&&(a=o.length-1);var s="",c,d,u=Math.min(e.line+t.linesAfter,n.length).toString().length,p=t.maxLength-(t.indent+u+3);for(c=1;c<=t.linesBefore&&!(a-c<0);c++)d=wm(e.buffer,o[a-c],n[a-c],e.position-(o[a]-o[a-c]),p),s=se.repeat(" ",t.indent)+km((e.line-c+1).toString(),u)+" | "+d.str+`
8076
+ `+s;for(d=wm(e.buffer,o[a],n[a],e.position,p),s+=se.repeat(" ",t.indent)+km((e.line+1).toString(),u)+" | "+d.str+`
8077
+ `,s+=se.repeat("-",t.indent+u+3+d.pos)+`^
8078
+ `,c=1;c<=t.linesAfter&&!(a+c>=n.length);c++)d=wm(e.buffer,o[a+c],n[a+c],e.position-(o[a]-o[a+c]),p),s+=se.repeat(" ",t.indent)+km((e.line+c+1).toString(),u)+" | "+d.str+`
8079
+ `;return s.replace(/\n$/,"")}function cI(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(o){t[String(o)]=r})}),t}function lI(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(aI.indexOf(r)===-1)throw new Se('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=cI(t.styleAliases||null),sI.indexOf(this.kind)===-1)throw new Se('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}function a_(e,t){var r=[];return e[t].forEach(function(o){var n=r.length;r.forEach(function(i,a){i.tag===o.tag&&i.kind===o.kind&&i.multi===o.multi&&(n=a)}),r[n]=o}),r}function dI(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function o(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(o);return e}function Sm(e){return this.extend(e)}function uI(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function pI(){return null}function mI(e){return e===null}function hI(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function fI(e){return e==="true"||e==="True"||e==="TRUE"}function gI(e){return Object.prototype.toString.call(e)==="[object Boolean]"}function yI(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function vI(e){return 48<=e&&e<=55}function bI(e){return 48<=e&&e<=57}function _I(e){if(e===null)return!1;var t=e.length,r=0,o=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;o=!0}return o&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!yI(e.charCodeAt(r)))return!1;o=!0}return o&&n!=="_"}if(n==="o"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!vI(e.charCodeAt(r)))return!1;o=!0}return o&&n!=="_"}}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(!bI(e.charCodeAt(r)))return!1;o=!0}return!(!o||n==="_")}function wI(e){var t=e,r=1,o;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),o=t[0],(o==="-"||o==="+")&&(o==="-"&&(r=-1),t=t.slice(1),o=t[0]),t==="0")return 0;if(o==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function kI(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!se.isNegativeZero(e)}function SI(e){return!(e===null||!xI.test(e)||e[e.length-1]==="_")}function $I(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}function TI(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(se.isNegativeZero(e))return"-0.0";return r=e.toString(10),EI.test(r)?r.replace("e",".e"):r}function AI(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||se.isNegativeZero(e))}function II(e){return e===null?!1:R_.exec(e)!==null||D_.exec(e)!==null}function CI(e){var t,r,o,n,i,a,s,c=0,d=null,u,p,m;if(t=R_.exec(e),t===null&&(t=D_.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],o=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,o,n));if(i=+t[4],a=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(u=+t[10],p=+(t[11]||0),d=(u*60+p)*6e4,t[9]==="-"&&(d=-d)),m=new Date(Date.UTC(r,o,n,i,a,s,c)),d&&m.setTime(m.getTime()-d),m}function PI(e){return e.toISOString()}function OI(e){return e==="<<"||e===null}function NI(e){if(e===null)return!1;var t,r,o=0,n=e.length,i=Im;for(r=0;r<n;r++)if(t=i.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;o+=6}return o%8===0}function RI(e){var t,r,o=e.replace(/[\r\n=]/g,""),n=o.length,i=Im,a=0,s=[];for(t=0;t<n;t++)t%4===0&&t&&(s.push(a>>16&255),s.push(a>>8&255),s.push(a&255)),a=a<<6|i.indexOf(o.charAt(t));return r=n%4*6,r===0?(s.push(a>>16&255),s.push(a>>8&255),s.push(a&255)):r===18?(s.push(a>>10&255),s.push(a>>2&255)):r===12&&s.push(a>>4&255),new Uint8Array(s)}function DI(e){var t="",r=0,o,n,i=e.length,a=Im;for(o=0;o<i;o++)o%3===0&&o&&(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]),r=(r<<8)+e[o];return n=i%3,n===0?(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]):n===2?(t+=a[r>>10&63],t+=a[r>>4&63],t+=a[r<<2&63],t+=a[64]):n===1&&(t+=a[r>>2&63],t+=a[r<<4&63],t+=a[64],t+=a[64]),t}function jI(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}function zI(e){if(e===null)return!0;var t=[],r,o,n,i,a,s=e;for(r=0,o=s.length;r<o;r+=1){if(n=s[r],a=!1,MI.call(n)!=="[object Object]")return!1;for(i in n)if(LI.call(n,i))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(i)===-1)t.push(i);else return!1}return!0}function UI(e){return e!==null?e:[]}function GI(e){if(e===null)return!0;var t,r,o,n,i,a=e;for(i=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(o=a[t],FI.call(o)!=="[object Object]"||(n=Object.keys(o),n.length!==1))return!1;i[t]=[n[0],o[n[0]]]}return!0}function BI(e){if(e===null)return[];var t,r,o,n,i,a=e;for(i=new Array(a.length),t=0,r=a.length;t<r;t+=1)o=a[t],n=Object.keys(o),i[t]=[n[0],o[n[0]]];return i}function ZI(e){if(e===null)return!0;var t,r=e;for(t in r)if(WI.call(r,t)&&r[t]!==null)return!1;return!0}function KI(e){return e!==null?e:{}}function c_(e){return Object.prototype.toString.call(e)}function ct(e){return e===10||e===13}function mn(e){return e===9||e===32}function Pe(e){return e===9||e===32||e===10||e===13}function dr(e){return e===44||e===91||e===93||e===123||e===125}function qI(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function XI(e){return e===120?2:e===117?4:e===85?8:0}function QI(e){return 48<=e&&e<=57?e-48:-1}function l_(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
8080
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function e0(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function K_(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}function t0(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Cm,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function J_(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=iI(r),new Se(t,r)}function z(e,t){throw J_(e,t)}function Fa(e,t){e.onWarning&&e.onWarning.call(null,J_(e,t))}function Ft(e,t,r,o){var n,i,a,s;if(t<r){if(s=e.input.slice(t,r),o)for(n=0,i=s.length;n<i;n+=1)a=s.charCodeAt(n),a===9||32<=a&&a<=1114111||z(e,"expected valid JSON character");else HI.test(s)&&z(e,"the stream contains non-printable characters");e.result+=s}}function u_(e,t,r,o){var n,i,a,s;for(se.isObject(r)||z(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),a=0,s=n.length;a<s;a+=1)i=n[a],Gt.call(t,i)||(K_(t,i,r[i]),o[i]=!0)}function ur(e,t,r,o,n,i,a,s,c){var d,u;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),d=0,u=n.length;d<u;d+=1)Array.isArray(n[d])&&z(e,"nested arrays are not supported inside keys"),typeof n=="object"&&c_(n[d])==="[object Object]"&&(n[d]="[object Object]");if(typeof n=="object"&&c_(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),o==="tag:yaml.org,2002:merge")if(Array.isArray(i))for(d=0,u=i.length;d<u;d+=1)u_(e,t,i[d],r);else u_(e,t,i,r);else!e.json&&!Gt.call(r,n)&&Gt.call(t,n)&&(e.line=a||e.line,e.lineStart=s||e.lineStart,e.position=c||e.position,z(e,"duplicated mapping key")),K_(t,n,i),delete r[n];return t}function Pm(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):z(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function oe(e,t,r){for(var o=0,n=e.input.charCodeAt(e.position);n!==0;){for(;mn(n);)n===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(ct(n))for(Pm(e),n=e.input.charCodeAt(e.position),o++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&o!==0&&e.lineIndent<r&&Fa(e,"deficient indentation"),o}function Wa(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Pe(r)))}function Om(e,t){t===1?e.result+=" ":t>1&&(e.result+=se.repeat(`
8081
+ `,t-1))}function n0(e,t,r){var o,n,i,a,s,c,d,u,p=e.kind,m=e.result,h;if(h=e.input.charCodeAt(e.position),Pe(h)||dr(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(n=e.input.charCodeAt(e.position+1),Pe(n)||r&&dr(n)))return!1;for(e.kind="scalar",e.result="",i=a=e.position,s=!1;h!==0;){if(h===58){if(n=e.input.charCodeAt(e.position+1),Pe(n)||r&&dr(n))break}else if(h===35){if(o=e.input.charCodeAt(e.position-1),Pe(o))break}else{if(e.position===e.lineStart&&Wa(e)||r&&dr(h))break;if(ct(h))if(c=e.line,d=e.lineStart,u=e.lineIndent,oe(e,!1,-1),e.lineIndent>=t){s=!0,h=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=c,e.lineStart=d,e.lineIndent=u;break}}s&&(Ft(e,i,a,!1),Om(e,e.line-c),i=a=e.position,s=!1),mn(h)||(a=e.position+1),h=e.input.charCodeAt(++e.position)}return Ft(e,i,a,!1),e.result?!0:(e.kind=p,e.result=m,!1)}function r0(e,t){var r,o,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,o=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Ft(e,o,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)o=e.position,e.position++,n=e.position;else return!0;else ct(r)?(Ft(e,o,n,!0),Om(e,oe(e,!1,t)),o=n=e.position):e.position===e.lineStart&&Wa(e)?z(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);z(e,"unexpected end of the stream within a single quoted scalar")}function o0(e,t){var r,o,n,i,a,s;if(s=e.input.charCodeAt(e.position),s!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=o=e.position;(s=e.input.charCodeAt(e.position))!==0;){if(s===34)return Ft(e,r,e.position,!0),e.position++,!0;if(s===92){if(Ft(e,r,e.position,!0),s=e.input.charCodeAt(++e.position),ct(s))oe(e,!1,t);else if(s<256&&V_[s])e.result+=H_[s],e.position++;else if((a=XI(s))>0){for(n=a,i=0;n>0;n--)s=e.input.charCodeAt(++e.position),(a=qI(s))>=0?i=(i<<4)+a:z(e,"expected hexadecimal character");e.result+=e0(i),e.position++}else z(e,"unknown escape sequence");r=o=e.position}else ct(s)?(Ft(e,r,o,!0),Om(e,oe(e,!1,t)),r=o=e.position):e.position===e.lineStart&&Wa(e)?z(e,"unexpected end of the document within a double quoted scalar"):(e.position++,o=e.position)}z(e,"unexpected end of the stream within a double quoted scalar")}function i0(e,t){var r=!0,o,n,i,a=e.tag,s,c=e.anchor,d,u,p,m,h,f=Object.create(null),_,T,A,w;if(w=e.input.charCodeAt(e.position),w===91)u=93,h=!1,s=[];else if(w===123)u=125,h=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),w=e.input.charCodeAt(++e.position);w!==0;){if(oe(e,!0,t),w=e.input.charCodeAt(e.position),w===u)return e.position++,e.tag=a,e.anchor=c,e.kind=h?"mapping":"sequence",e.result=s,!0;r?w===44&&z(e,"expected the node content, but found ','"):z(e,"missed comma between flow collection entries"),T=_=A=null,p=m=!1,w===63&&(d=e.input.charCodeAt(e.position+1),Pe(d)&&(p=m=!0,e.position++,oe(e,!0,t))),o=e.line,n=e.lineStart,i=e.position,pr(e,t,za,!1,!0),T=e.tag,_=e.result,oe(e,!0,t),w=e.input.charCodeAt(e.position),(m||e.line===o)&&w===58&&(p=!0,w=e.input.charCodeAt(++e.position),oe(e,!0,t),pr(e,t,za,!1,!0),A=e.result),h?ur(e,s,f,T,_,A,o,n,i):p?s.push(ur(e,null,f,T,_,A,o,n,i)):s.push(_),oe(e,!0,t),w=e.input.charCodeAt(e.position),w===44?(r=!0,w=e.input.charCodeAt(++e.position)):r=!1}z(e,"unexpected end of the stream within a flow collection")}function a0(e,t){var r,o,n=xm,i=!1,a=!1,s=t,c=0,d=!1,u,p;if(p=e.input.charCodeAt(e.position),p===124)o=!1;else if(p===62)o=!0;else return!1;for(e.kind="scalar",e.result="";p!==0;)if(p=e.input.charCodeAt(++e.position),p===43||p===45)xm===n?n=p===43?s_:VI:z(e,"repeat of a chomping mode identifier");else if((u=QI(p))>=0)u===0?z(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?z(e,"repeat of an indentation width identifier"):(s=t+u-1,a=!0);else break;if(mn(p)){do p=e.input.charCodeAt(++e.position);while(mn(p));if(p===35)do p=e.input.charCodeAt(++e.position);while(!ct(p)&&p!==0)}for(;p!==0;){for(Pm(e),e.lineIndent=0,p=e.input.charCodeAt(e.position);(!a||e.lineIndent<s)&&p===32;)e.lineIndent++,p=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>s&&(s=e.lineIndent),ct(p)){c++;continue}if(e.lineIndent<s){n===s_?e.result+=se.repeat(`
8082
+ `,i?1+c:c):n===xm&&i&&(e.result+=`
8083
+ `);break}for(o?mn(p)?(d=!0,e.result+=se.repeat(`
8084
+ `,i?1+c:c)):d?(d=!1,e.result+=se.repeat(`
8085
+ `,c+1)):c===0?i&&(e.result+=" "):e.result+=se.repeat(`
8086
+ `,c):e.result+=se.repeat(`
8087
+ `,i?1+c:c),i=!0,a=!0,c=0,r=e.position;!ct(p)&&p!==0;)p=e.input.charCodeAt(++e.position);Ft(e,r,e.position,!1)}return!0}function p_(e,t){var r,o=e.tag,n=e.anchor,i=[],a,s=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=i),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,z(e,"tab characters must not be used in indentation")),!(c!==45||(a=e.input.charCodeAt(e.position+1),!Pe(a))));){if(s=!0,e.position++,oe(e,!0,-1)&&e.lineIndent<=t){i.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,pr(e,t,B_,!1,!0),i.push(e.result),oe(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&c!==0)z(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return s?(e.tag=o,e.anchor=n,e.kind="sequence",e.result=i,!0):!1}function s0(e,t,r){var o,n,i,a,s,c,d=e.tag,u=e.anchor,p={},m=Object.create(null),h=null,f=null,_=null,T=!1,A=!1,w;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=p),w=e.input.charCodeAt(e.position);w!==0;){if(!T&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,z(e,"tab characters must not be used in indentation")),o=e.input.charCodeAt(e.position+1),i=e.line,(w===63||w===58)&&Pe(o))w===63?(T&&(ur(e,p,m,h,f,null,a,s,c),h=f=_=null),A=!0,T=!0,n=!0):T?(T=!1,n=!0):z(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,w=o;else{if(a=e.line,s=e.lineStart,c=e.position,!pr(e,r,G_,!1,!0))break;if(e.line===i){for(w=e.input.charCodeAt(e.position);mn(w);)w=e.input.charCodeAt(++e.position);if(w===58)w=e.input.charCodeAt(++e.position),Pe(w)||z(e,"a whitespace character is expected after the key-value separator within a block mapping"),T&&(ur(e,p,m,h,f,null,a,s,c),h=f=_=null),A=!0,T=!1,n=!1,h=e.tag,f=e.result;else if(A)z(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=d,e.anchor=u,!0}else if(A)z(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=d,e.anchor=u,!0}if((e.line===i||e.lineIndent>t)&&(T&&(a=e.line,s=e.lineStart,c=e.position),pr(e,t,Ua,!0,n)&&(T?f=e.result:_=e.result),T||(ur(e,p,m,h,f,_,a,s,c),h=f=_=null),oe(e,!0,-1),w=e.input.charCodeAt(e.position)),(e.line===i||e.lineIndent>t)&&w!==0)z(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return T&&ur(e,p,m,h,f,null,a,s,c),A&&(e.tag=d,e.anchor=u,e.kind="mapping",e.result=p),A}function c0(e){var t,r=!1,o=!1,n,i,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&z(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(r=!0,a=e.input.charCodeAt(++e.position)):a===33?(o=!0,n="!!",a=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(i=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):z(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!Pe(a);)a===33&&(o?z(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),W_.test(n)||z(e,"named tag handle cannot contain such characters"),o=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),YI.test(i)&&z(e,"tag suffix cannot contain flow indicator characters")}i&&!Z_.test(i)&&z(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch{z(e,"tag name is malformed: "+i)}return r?e.tag=i:Gt.call(e.tagMap,n)?e.tag=e.tagMap[n]+i:n==="!"?e.tag="!"+i:n==="!!"?e.tag="tag:yaml.org,2002:"+i:z(e,'undeclared tag handle "'+n+'"'),!0}function l0(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&z(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Pe(r)&&!dr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&z(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function d0(e){var t,r,o;if(o=e.input.charCodeAt(e.position),o!==42)return!1;for(o=e.input.charCodeAt(++e.position),t=e.position;o!==0&&!Pe(o)&&!dr(o);)o=e.input.charCodeAt(++e.position);return e.position===t&&z(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Gt.call(e.anchorMap,r)||z(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],oe(e,!0,-1),!0}function pr(e,t,r,o,n){var i,a,s,c=1,d=!1,u=!1,p,m,h,f,_,T;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,i=a=s=Ua===r||B_===r,o&&oe(e,!0,-1)&&(d=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;c0(e)||l0(e);)oe(e,!0,-1)?(d=!0,s=i,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):s=!1;if(s&&(s=d||n),(c===1||Ua===r)&&(za===r||G_===r?_=t:_=t+1,T=e.position-e.lineStart,c===1?s&&(p_(e,T)||s0(e,T,_))||i0(e,_)?u=!0:(a&&a0(e,_)||r0(e,_)||o0(e,_)?u=!0:d0(e)?(u=!0,(e.tag!==null||e.anchor!==null)&&z(e,"alias node should not have any properties")):n0(e,_,za===r)&&(u=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(u=s&&p_(e,T))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&z(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),p=0,m=e.implicitTypes.length;p<m;p+=1)if(f=e.implicitTypes[p],f.resolve(e.result)){e.result=f.construct(e.result),e.tag=f.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Gt.call(e.typeMap[e.kind||"fallback"],e.tag))f=e.typeMap[e.kind||"fallback"][e.tag];else for(f=null,h=e.typeMap.multi[e.kind||"fallback"],p=0,m=h.length;p<m;p+=1)if(e.tag.slice(0,h[p].tag.length)===h[p].tag){f=h[p];break}f||z(e,"unknown tag !<"+e.tag+">"),e.result!==null&&f.kind!==e.kind&&z(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):z(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||u}function u0(e){var t=e.position,r,o,n,i=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(oe(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(i=!0,a=e.input.charCodeAt(++e.position),r=e.position;a!==0&&!Pe(a);)a=e.input.charCodeAt(++e.position);for(o=e.input.slice(r,e.position),n=[],o.length<1&&z(e,"directive name must not be less than one character in length");a!==0;){for(;mn(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!ct(a));break}if(ct(a))break;for(r=e.position;a!==0&&!Pe(a);)a=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}a!==0&&Pm(e),Gt.call(d_,o)?d_[o](e,o,n):Fa(e,'unknown document directive "'+o+'"')}if(oe(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,oe(e,!0,-1)):i&&z(e,"directives end mark is expected"),pr(e,e.lineIndent-1,Ua,!1,!0),oe(e,!0,-1),e.checkLineBreaks&&JI.test(e.input.slice(t,e.position))&&Fa(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Wa(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,oe(e,!0,-1));return}if(e.position<e.length-1)z(e,"end of the stream or a document separator is expected");else return}function Y_(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
8088
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new t0(e,t),o=e.indexOf("\0");for(o!==-1&&(r.position=o,z(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)u0(r);return r.documents}function p0(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var o=Y_(e,r);if(typeof t!="function")return o;for(var n=0,i=o.length;n<i;n+=1)t(o[n])}function m0(e,t){var r=Y_(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Se("expected a single document in the stream, but found more")}}function R0(e,t){var r,o,n,i,a,s,c;if(t===null)return{};for(r={},o=Object.keys(t),n=0,i=o.length;n<i;n+=1)a=o[n],s=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),c=e.compiledTypeMap.fallback[a],c&&Q_.call(c.styleAliases,s)&&(s=c.styleAliases[s]),r[a]=s;return r}function D0(e){var t,r,o;if(t=e.toString(16).toUpperCase(),e<=255)r="x",o=2;else if(e<=65535)r="u",o=4;else if(e<=4294967295)r="U",o=8;else throw new Se("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+se.repeat("0",o-t.length)+t}function L0(e){this.schema=e.schema||Cm,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=se.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=R0(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?$o:j0,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function m_(e,t){for(var r=se.repeat(" ",t),o=0,n=-1,i="",a,s=e.length;o<s;)n=e.indexOf(`
7804
8089
  `,o),n===-1?(a=e.slice(o),o=s):(a=e.slice(o,n+1),o=n+1),a.length&&a!==`
7805
- `&&(i+=r),i+=a;return i}function hm(e,t){return`
7806
- `+te.repeat(" ",e.indent*t)}function c0(e,t){var r,o,n;for(r=0,o=e.implicitTypes.length;r<o;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}function Ra(e){return e===GI||e===UI}function _o(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==wm||65536<=e&&e<=1114111}function Yb(e){return _o(e)&&e!==wm&&e!==FI&&e!==vo}function qb(e,t,r){var o=Yb(e),n=o&&!Ra(e);return(r?o:o&&e!==j_&&e!==L_&&e!==z_&&e!==M_&&e!==U_)&&e!==mm&&!(t===Na&&!n)||Yb(t)&&!Ra(t)&&e===mm||t===Na&&n}function l0(e){return _o(e)&&e!==wm&&!Ra(e)&&e!==JI&&e!==XI&&e!==Na&&e!==j_&&e!==L_&&e!==z_&&e!==M_&&e!==U_&&e!==mm&&e!==WI&&e!==HI&&e!==BI&&e!==t0&&e!==YI&&e!==qI&&e!==VI&&e!==ZI&&e!==KI&&e!==QI&&e!==e0}function u0(e){return!Ra(e)&&e!==Na}function go(e,t){var r=e.charCodeAt(t),o;return r>=55296&&r<=56319&&t+1<e.length&&(o=e.charCodeAt(t+1),o>=56320&&o<=57343)?(r-55296)*1024+o-56320+65536:r}function F_(e){var t=/^\n* /;return t.test(e)}function d0(e,t,r,o,n,i,a,s){var c,l=0,p=null,d=!1,m=!1,h=o!==-1,f=-1,w=l0(go(e,0))&&u0(go(e,e.length-1));if(t||a)for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=go(e,c),!_o(l))return or;w=w&&qb(l,p,s),p=l}else{for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=go(e,c),l===vo)d=!0,h&&(m=m||c-f-1>o&&e[f+1]!==" ",f=c);else if(!_o(l))return or;w=w&&qb(l,p,s),p=l}m=m||h&&c-f-1>o&&e[f+1]!==" "}return!d&&!m?w&&!a&&!n(e)?G_:i===bo?or:fm:r>9&&F_(e)?or:a?i===bo?or:fm:m?Z_:B_}function p0(e,t,r,o,n){e.dump=(function(){if(t.length===0)return e.quotingType===bo?'""':"''";if(!e.noCompatMode&&(n0.indexOf(t)!==-1||r0.test(t)))return e.quotingType===bo?'"'+t+'"':"'"+t+"'";var i=e.indent*Math.max(1,r),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),s=o||e.flowLevel>-1&&r>=e.flowLevel;function c(l){return c0(e,l)}switch(d0(t,s,e.indent,a,c,e.quotingType,e.forceQuotes&&!o,n)){case G_:return t;case fm:return"'"+t.replace(/'/g,"''")+"'";case B_:return"|"+Xb(t,e.indent)+Qb(Jb(t,i));case Z_:return">"+Xb(t,e.indent)+Qb(Jb(m0(t,a),i));case or:return'"'+h0(t)+'"';default:throw new we("impossible error: invalid scalar style")}})()}function Xb(e,t){var r=F_(e)?String(t):"",o=e[e.length-1]===`
8090
+ `&&(i+=r),i+=a;return i}function Em(e,t){return`
8091
+ `+se.repeat(" ",e.indent*t)}function M0(e,t){var r,o,n;for(r=0,o=e.implicitTypes.length;r<o;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}function Ba(e){return e===v0||e===g0}function Eo(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Nm||65536<=e&&e<=1114111}function h_(e){return Eo(e)&&e!==Nm&&e!==y0&&e!==So}function f_(e,t,r){var o=h_(e),n=o&&!Ba(e);return(r?o:o&&e!==ew&&e!==tw&&e!==nw&&e!==rw&&e!==ow)&&e!==$m&&!(t===Ga&&!n)||h_(t)&&!Ba(t)&&e===$m||t===Ga&&n}function z0(e){return Eo(e)&&e!==Nm&&!Ba(e)&&e!==$0&&e!==A0&&e!==Ga&&e!==ew&&e!==tw&&e!==nw&&e!==rw&&e!==ow&&e!==$m&&e!==k0&&e!==S0&&e!==b0&&e!==P0&&e!==E0&&e!==T0&&e!==x0&&e!==_0&&e!==w0&&e!==I0&&e!==C0}function U0(e){return!Ba(e)&&e!==Ga}function ko(e,t){var r=e.charCodeAt(t),o;return r>=55296&&r<=56319&&t+1<e.length&&(o=e.charCodeAt(t+1),o>=56320&&o<=57343)?(r-55296)*1024+o-56320+65536:r}function iw(e){var t=/^\n* /;return t.test(e)}function F0(e,t,r,o,n,i,a,s){var c,d=0,u=null,p=!1,m=!1,h=o!==-1,f=-1,_=z0(ko(e,0))&&U0(ko(e,e.length-1));if(t||a)for(c=0;c<e.length;d>=65536?c+=2:c++){if(d=ko(e,c),!Eo(d))return lr;_=_&&f_(d,u,s),u=d}else{for(c=0;c<e.length;d>=65536?c+=2:c++){if(d=ko(e,c),d===So)p=!0,h&&(m=m||c-f-1>o&&e[f+1]!==" ",f=c);else if(!Eo(d))return lr;_=_&&f_(d,u,s),u=d}m=m||h&&c-f-1>o&&e[f+1]!==" "}return!p&&!m?_&&!a&&!n(e)?aw:i===$o?lr:Tm:r>9&&iw(e)?lr:a?i===$o?lr:Tm:m?cw:sw}function G0(e,t,r,o,n){e.dump=(function(){if(t.length===0)return e.quotingType===$o?'""':"''";if(!e.noCompatMode&&(O0.indexOf(t)!==-1||N0.test(t)))return e.quotingType===$o?'"'+t+'"':"'"+t+"'";var i=e.indent*Math.max(1,r),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),s=o||e.flowLevel>-1&&r>=e.flowLevel;function c(d){return M0(e,d)}switch(F0(t,s,e.indent,a,c,e.quotingType,e.forceQuotes&&!o,n)){case aw:return t;case Tm:return"'"+t.replace(/'/g,"''")+"'";case sw:return"|"+g_(t,e.indent)+y_(m_(t,i));case cw:return">"+g_(t,e.indent)+y_(m_(B0(t,a),i));case lr:return'"'+W0(t)+'"';default:throw new Se("impossible error: invalid scalar style")}})()}function g_(e,t){var r=iw(e)?String(t):"",o=e[e.length-1]===`
7807
8092
  `,n=o&&(e[e.length-2]===`
7808
8093
  `||e===`
7809
8094
  `),i=n?"+":o?"":"-";return r+i+`
7810
- `}function Qb(e){return e[e.length-1]===`
7811
- `?e.slice(0,-1):e}function m0(e,t){for(var r=/(\n+)([^\n]*)/g,o=(function(){var l=e.indexOf(`
7812
- `);return l=l!==-1?l:e.length,r.lastIndex=l,e_(e.slice(0,l),t)})(),n=e[0]===`
8095
+ `}function y_(e){return e[e.length-1]===`
8096
+ `?e.slice(0,-1):e}function B0(e,t){for(var r=/(\n+)([^\n]*)/g,o=(function(){var d=e.indexOf(`
8097
+ `);return d=d!==-1?d:e.length,r.lastIndex=d,v_(e.slice(0,d),t)})(),n=e[0]===`
7813
8098
  `||e[0]===" ",i,a;a=r.exec(e);){var s=a[1],c=a[2];i=c[0]===" ",o+=s+(!n&&!i&&c!==""?`
7814
- `:"")+e_(c,t),n=i}return o}function e_(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,o,n=0,i,a=0,s=0,c="";o=r.exec(e);)s=o.index,s-n>t&&(i=a>n?a:s,c+=`
8099
+ `:"")+v_(c,t),n=i}return o}function v_(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,o,n=0,i,a=0,s=0,c="";o=r.exec(e);)s=o.index,s-n>t&&(i=a>n?a:s,c+=`
7815
8100
  `+e.slice(n,i),n=i+1),a=s;return c+=`
7816
8101
  `,e.length-n>t&&a>n?c+=e.slice(n,a)+`
7817
- `+e.slice(a+1):c+=e.slice(n),c.slice(1)}function h0(e){for(var t="",r=0,o,n=0;n<e.length;r>=65536?n+=2:n++)r=go(e,n),o=de[r],!o&&_o(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=o||i0(r);return t}function f0(e,t,r){var o="",n=e.tag,i,a,s;for(i=0,a=r.length;i<a;i+=1)s=r[i],e.replacer&&(s=e.replacer.call(r,String(i),s)),(dt(e,t,s,!1,!1)||typeof s>"u"&&dt(e,t,null,!1,!1))&&(o!==""&&(o+=","+(e.condenseFlow?"":" ")),o+=e.dump);e.tag=n,e.dump="["+o+"]"}function t_(e,t,r,o){var n="",i=e.tag,a,s,c;for(a=0,s=r.length;a<s;a+=1)c=r[a],e.replacer&&(c=e.replacer.call(r,String(a),c)),(dt(e,t+1,c,!0,!0,!1,!0)||typeof c>"u"&&dt(e,t+1,null,!0,!0,!1,!0))&&((!o||n!=="")&&(n+=hm(e,t)),e.dump&&vo===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=i,e.dump=n||"[]"}function g0(e,t,r){var o="",n=e.tag,i=Object.keys(r),a,s,c,l,p;for(a=0,s=i.length;a<s;a+=1)p="",o!==""&&(p+=", "),e.condenseFlow&&(p+='"'),c=i[a],l=r[c],e.replacer&&(l=e.replacer.call(r,c,l)),dt(e,t,c,!1,!1)&&(e.dump.length>1024&&(p+="? "),p+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),dt(e,t,l,!1,!1)&&(p+=e.dump,o+=p));e.tag=n,e.dump="{"+o+"}"}function y0(e,t,r,o){var n="",i=e.tag,a=Object.keys(r),s,c,l,p,d,m;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new we("sortKeys must be a boolean or a function");for(s=0,c=a.length;s<c;s+=1)m="",(!o||n!=="")&&(m+=hm(e,t)),l=a[s],p=r[l],e.replacer&&(p=e.replacer.call(r,l,p)),dt(e,t+1,l,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&vo===e.dump.charCodeAt(0)?m+="?":m+="? "),m+=e.dump,d&&(m+=hm(e,t)),dt(e,t+1,p,!0,d)&&(e.dump&&vo===e.dump.charCodeAt(0)?m+=":":m+=": ",m+=e.dump,n+=m));e.tag=i,e.dump=n||"{}"}function n_(e,t,r){var o,n,i,a,s,c;for(n=r?e.explicitTypes:e.implicitTypes,i=0,a=n.length;i<a;i+=1)if(s=n[i],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof t=="object"&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(r?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag="?",s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,R_.call(s.represent)==="[object Function]")o=s.represent(t,c);else if(D_.call(s.represent,c))o=s.represent[c](t,c);else throw new we("!<"+s.tag+'> tag resolver accepts not "'+c+'" style');e.dump=o}return!0}return!1}function dt(e,t,r,o,n,i,a){e.tag=null,e.dump=r,n_(e,r,!1)||n_(e,r,!0);var s=R_.call(e.dump),c=o,l;o&&(o=e.flowLevel<0||e.flowLevel>t);var p=s==="[object Object]"||s==="[object Array]",d,m;if(p&&(d=e.duplicates.indexOf(r),m=d!==-1),(e.tag!==null&&e.tag!=="?"||m||e.indent!==2&&t>0)&&(n=!1),m&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(p&&m&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),s==="[object Object]")o&&Object.keys(e.dump).length!==0?(y0(e,t,e.dump,n),m&&(e.dump="&ref_"+d+e.dump)):(g0(e,t,e.dump),m&&(e.dump="&ref_"+d+" "+e.dump));else if(s==="[object Array]")o&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?t_(e,t-1,e.dump,n):t_(e,t,e.dump,n),m&&(e.dump="&ref_"+d+e.dump)):(f0(e,t,e.dump),m&&(e.dump="&ref_"+d+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&p0(e,e.dump,t,i,c);else{if(s==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new we("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(l=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?l="!"+l:l.slice(0,18)==="tag:yaml.org,2002:"?l="!!"+l.slice(18):l="!<"+l+">",e.dump=l+" "+e.dump)}return!0}function v0(e,t){var r=[],o=[],n,i;for(gm(e,r,o),n=0,i=o.length;n<i;n+=1)t.duplicates.push(r[o[n]]);t.usedDuplicates=new Array(i)}function gm(e,t,r){var o,n,i;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,i=e.length;n<i;n+=1)gm(e[n],t,r);else for(o=Object.keys(e),n=0,i=o.length;n<i;n+=1)gm(e[o[n]],t,r)}function b0(e,t){t=t||{};var r=new s0(t);r.noRefs||v0(e,r);var o=e;return r.replacer&&(o=r.replacer.call({"":o},"",o)),dt(r,0,o,!0,!0)?r.dump+`
7818
- `:""}function km(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var kA,xA,SA,$A,EA,TA,te,we,IA,CA,PA,se,i_,a_,s_,c_,l_,u_,d_,p_,VA,YA,m_,h_,f_,g_,y_,v_,b_,ym,__,sI,cI,w_,dI,k_,hI,x_,vm,Nt,Ca,S_,$_,Pa,dm,yI,Bb,vI,bI,_I,E_,T_,I_,C_,on,Wb,zI,MI,N_,R_,D_,wm,UI,vo,FI,GI,BI,ZI,mm,KI,WI,VI,HI,j_,JI,Na,YI,qI,XI,QI,L_,z_,e0,M_,t0,U_,de,n0,r0,a0,bo,G_,fm,B_,Z_,or,_0,w0,k0,x0,S0,$0,E0,T0,A0,I0,C0,P0,O0,N0,R0,D0,xm,K_=y(()=>{kA=r_,xA=yA,SA=vA,$A=_A,EA=wA,TA=bA,te={isNothing:kA,isObject:xA,toArray:SA,repeat:$A,isNegativeZero:EA,extend:TA};yo.prototype=Object.create(Error.prototype);yo.prototype.constructor=yo;yo.prototype.toString=function(t){return this.name+": "+o_(this,t)};we=yo;IA=AA,CA=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],PA=["scalar","sequence","mapping"];se=NA;pm.prototype.extend=function(t){var r=[],o=[];if(t instanceof se)o.push(t);else if(Array.isArray(t))o=o.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(o=o.concat(t.explicit));else throw new we("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(i){if(!(i instanceof se))throw new we("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(i.loadKind&&i.loadKind!=="scalar")throw new we("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(i.multi)throw new we("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),o.forEach(function(i){if(!(i instanceof se))throw new we("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(pm.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(o),n.compiledImplicit=Gb(n,"implicit"),n.compiledExplicit=Gb(n,"explicit"),n.compiledTypeMap=RA(n.compiledImplicit,n.compiledExplicit),n};i_=pm,a_=new se("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),s_=new se("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),c_=new se("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),l_=new i_({explicit:[a_,s_,c_]});u_=new se("tag:yaml.org,2002:null",{kind:"scalar",resolve:DA,construct:jA,predicate:LA,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});d_=new se("tag:yaml.org,2002:bool",{kind:"scalar",resolve:zA,construct:MA,predicate:UA,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});p_=new se("tag:yaml.org,2002:int",{kind:"scalar",resolve:ZA,construct:KA,predicate:WA,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),VA=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");YA=/^[-+]?[0-9]+e/;m_=new se("tag:yaml.org,2002:float",{kind:"scalar",resolve:HA,construct:JA,predicate:XA,represent:qA,defaultStyle:"lowercase"}),h_=l_.extend({implicit:[u_,d_,p_,m_]}),f_=h_,g_=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),y_=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");v_=new se("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:QA,construct:eI,instanceOf:Date,represent:tI});b_=new se("tag:yaml.org,2002:merge",{kind:"scalar",resolve:nI}),ym=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
7819
- \r`;__=new se("tag:yaml.org,2002:binary",{kind:"scalar",resolve:rI,construct:oI,predicate:aI,represent:iI}),sI=Object.prototype.hasOwnProperty,cI=Object.prototype.toString;w_=new se("tag:yaml.org,2002:omap",{kind:"sequence",resolve:lI,construct:uI}),dI=Object.prototype.toString;k_=new se("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:pI,construct:mI}),hI=Object.prototype.hasOwnProperty;x_=new se("tag:yaml.org,2002:set",{kind:"mapping",resolve:fI,construct:gI}),vm=f_.extend({implicit:[v_,b_],explicit:[__,w_,k_,x_]}),Nt=Object.prototype.hasOwnProperty,Ca=1,S_=2,$_=3,Pa=4,dm=1,yI=2,Bb=3,vI=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,bI=/[\x85\u2028\u2029]/,_I=/[,\[\]\{\}]/,E_=/^(?:!|!!|![a-z\-]+!)$/i,T_=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;I_=new Array(256),C_=new Array(256);for(on=0;on<256;on++)I_[on]=Kb(on)?1:0,C_[on]=Kb(on);Wb={YAML:function(t,r,o){var n,i,a;t.version!==null&&D(t,"duplication of %YAML directive"),o.length!==1&&D(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(o[0]),n===null&&D(t,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),a=parseInt(n[2],10),i!==1&&D(t,"unacceptable YAML version of the document"),t.version=o[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&Oa(t,"unsupported YAML version of the document")},TAG:function(t,r,o){var n,i;o.length!==2&&D(t,"TAG directive accepts exactly two arguments"),n=o[0],i=o[1],E_.test(n)||D(t,"ill-formed tag handle (first argument) of the TAG directive"),Nt.call(t.tagMap,n)&&D(t,'there is a previously declared suffix for "'+n+'" tag handle'),T_.test(i)||D(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch{D(t,"tag prefix is malformed: "+i)}t.tagMap[n]=i}};zI=jI,MI=LI,N_={loadAll:zI,load:MI},R_=Object.prototype.toString,D_=Object.prototype.hasOwnProperty,wm=65279,UI=9,vo=10,FI=13,GI=32,BI=33,ZI=34,mm=35,KI=37,WI=38,VI=39,HI=42,j_=44,JI=45,Na=58,YI=61,qI=62,XI=63,QI=64,L_=91,z_=93,e0=96,M_=123,t0=124,U_=125,de={};de[0]="\\0";de[7]="\\a";de[8]="\\b";de[9]="\\t";de[10]="\\n";de[11]="\\v";de[12]="\\f";de[13]="\\r";de[27]="\\e";de[34]='\\"';de[92]="\\\\";de[133]="\\N";de[160]="\\_";de[8232]="\\L";de[8233]="\\P";n0=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],r0=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;a0=1,bo=2;G_=1,fm=2,B_=3,Z_=4,or=5;_0=b0,w0={dump:_0};k0=se,x0=i_,S0=l_,$0=h_,E0=f_,T0=vm,A0=N_.load,I0=N_.loadAll,C0=w0.dump,P0=we,O0={binary:__,float:m_,map:c_,null:u_,pairs:k_,set:x_,timestamp:v_,bool:d_,int:p_,merge:b_,omap:w_,seq:s_,str:a_},N0=km("safeLoad","load"),R0=km("safeLoadAll","loadAll"),D0=km("safeDump","dump"),xm={Type:k0,Schema:x0,FAILSAFE_SCHEMA:S0,JSON_SCHEMA:$0,CORE_SCHEMA:E0,DEFAULT_SCHEMA:T0,load:A0,loadAll:I0,dump:C0,YAMLException:P0,types:O0,safeLoad:N0,safeLoadAll:R0,safeDump:D0}});function pe(e){let t;try{t=xm.load(e)}catch(n){return{ok:!1,issues:[{path:"(document)",message:n instanceof Error?n.message:"YAML parse failed"}]}}if(t===null||typeof t!="object")return{ok:!1,issues:[{path:"(document)",message:"Manifest must be a YAML mapping"}]};let r=rn.safeParse(t);if(!r.success)return{ok:!1,issues:j0(r.error)};let o=zb(r.data);return o.length?{ok:!1,issues:o}:{ok:!0,manifest:r.data}}function j0(e){return e.issues.map(t=>({path:t.path.length?t.path.join("."):"(root)",message:t.message}))}function ja(e){return xm.dump(e,{indent:2,lineWidth:100,noRefs:!0,sortKeys:!1})}function La(e,t){return rn.parse({manifest:{schema_version:Ia,revision:0,conformance:"L0"},app:{id:e,title:t,status:"proposed"}})}var W_=y(()=>{"use strict";K_();rr()});var re,za,V_=y(()=>{"use strict";re={runtime:"/play/v1/games/{game}/runtime",currentRound:"/play/v1/games/{game}/rounds/current",round:"/play/v1/games/{game}/rounds/{round}",plays:"/play/v1/games/{game}/rounds/{round}/plays",session:"/play/v1/games/{game}/session",roundState:"/play/v1/games/{game}/rounds/{round}/players/me",profile:"/play/v1/games/{game}/players/me/profile",leaderboard:"/play/v1/games/{game}/leaderboard"},za="/play"});function Ma(e,t){let r=t==="won"?e.current_streak+1:t==="lost"?0:e.current_streak;return{...e,played:e.played+1,won:e.won+(t==="won"?1:0),current_streak:r,max_streak:Math.max(e.max_streak,r)}}var H_,sn,L0,z0,M0,_1,U0,w1,k1,Y_,F0,G0,x1,B0,Z0,S1,J_,$1,E1,Sm=y(()=>{"use strict";Xe();rr();Aa();V_();H_="2.0",sn=u.object({server_time:u.string(),snapshot:u.string()}),L0=u.enum(["at_commit","at_settlement"]),z0=u.enum(["shared","per_player","feed"]),M0=u.object({kind:u.enum(["fixed","local_midnight","feed","continuous"]),timezone:u.string().optional()}),_1=sn.extend({game:u.string(),api_version:u.literal(H_).default(H_),archetype:Pt,marking:L0,challenge_source:z0,schedule:M0,updates:u.object({transport:u.enum(["poll","socket"]),freshness_seconds:u.number().int().positive()}),display:u.record(u.string(),u.unknown()).default({}),identity:u.object({required:u.boolean(),provider:u.string(),anonymous_play:u.boolean().default(!1)}),archive:u.boolean().default(!1),capabilities:u.array(u.string()).default([])}),U0=u.object({accepting_plays:u.boolean(),results_available:u.boolean(),solution_revealed:u.boolean(),closed:u.boolean(),optimistic_play:u.boolean().default(!1)}),w1=sn.extend({id:u.string(),number:u.number().int().positive().optional(),origin:fo.optional(),version:u.number().int().nonnegative(),can:U0,opens_at:u.string().optional(),locks_at:u.string().optional(),challenge_instance_id:u.string().nullable().default(null),challenge:u.record(u.string(),u.unknown()).default({}),solution:u.record(u.string(),u.unknown()).optional()}),k1=sn.extend({token:u.string(),player_id:u.string(),kind:u.literal("anonymous")}),Y_=u.object({idempotency_key:u.string().min(8),round_version:u.number().int().nonnegative(),challenge_instance_id:u.string().nullable().default(null),payload:u.record(u.string(),u.unknown())}),F0=u.enum(["accepted","rejected","duplicate","stale","busy"]),G0=u.object({key:u.string(),verdict:u.enum(["correct","close","wrong","higher","lower","unknown"]),label:u.string().optional()}),x1=sn.extend({play_id:u.string(),outcome:F0,reason:u.string().optional(),round_version:u.number().int().nonnegative(),retry_after_seconds:u.number().int().positive().optional(),marked:u.boolean().default(!0),feedback:u.array(G0).default([]),round_state:u.lazy(()=>Z0).optional()}),B0=u.object({title:u.string(),grid:u.array(u.string()).default([]),text:u.string().optional()}),Z0=sn.extend({player_id:u.string(),round_id:u.string(),attempts_used:u.number().int().nonnegative().default(0),attempts_allowed:u.number().int().nonnegative().optional(),mistakes_used:u.number().int().nonnegative().default(0),mistakes_allowed:u.number().int().nonnegative().optional(),progress:u.record(u.string(),u.unknown()).default({}),score:u.number().default(0),score_revision:u.number().int().nonnegative().default(0),finished:u.boolean().default(!1),outcome:u.enum(["won","lost","incomplete","pending"]).optional(),share:B0.optional()}),S1=sn.extend({player_id:u.string(),played:u.number().int().nonnegative().default(0),won:u.number().int().nonnegative().default(0),current_streak:u.number().int().nonnegative().default(0),max_streak:u.number().int().nonnegative().default(0),distribution:u.record(u.string(),u.number()).default({}),constraints:u.record(u.string(),u.unknown()).default({})});J_=u.object({rank:u.number().int().positive(),player_id:u.string(),display_name:u.string().optional(),score:u.number()}),$1=sn.extend({round_id:u.string().optional(),order:u.enum(["high_first","low_first"]).default("high_first"),tie_break:u.enum(["earliest_play","fewest_attempts","none"]).default("none"),entries:u.array(J_).default([]),total:u.number().int().nonnegative().default(0),truncated:u.boolean().default(!1),me:J_.optional()}),E1=u.object({error:u.object({code:u.string(),message:u.string(),retryable:u.boolean()})})});function Q_(e,t=new Date){let r=typeof t=="string"?Date.parse(t):t.getTime(),o,n=Number.NEGATIVE_INFINITY;for(let i of e.rounds){let a=Date.parse(i.locksAt);Number.isNaN(a)||a>n&&(n=a,o=i)}return o?n>r?{state:"live",round:o}:{state:"stale",round:o,lockedForMs:r-n}:{state:"none"}}function ew(e){if(e.state!=="stale")return null;let t=Math.floor(e.lockedForMs/36e5),r=t<1?`${Math.max(1,Math.floor(e.lockedForMs/6e4))} minutes`:t<48?`${t} hours`:`${Math.floor(t/24)} days`;return`The round this game is serving, ${e.round.label}, locked ${r} ago and nothing has replaced it. Fans are playing a closed round. Run \`gamestage deploy\` or refresh the round to move it on.`}function Ua(e){let t=nw.safeParse(e.access);return t.success?t.data:"pending"}function rw(e){let t=n=>typeof n=="string"&&n.trim()?n:null,r=e.decision??null,o=r?t(r.state):null;return{workspaceId:t(e.workspaceId)??"unknown",name:t(e.name),ownerEmail:t(e.ownerEmail)??"",company:t(e.company),intent:t(e.intent),signals:t(e.signals),registeredAt:t(e.registeredAt)??"",decision:o==="approved"||o==="refused"?{state:o,at:t(r.at)??t(e.registeredAt)??"",by:t(r.by)??"unknown",reason:t(r.reason)}:null}}function ow(e){return{waiting:e.filter(t=>!t.decision).sort((t,r)=>t.registeredAt.localeCompare(r.registeredAt)),decided:e.filter(t=>t.decision).sort((t,r)=>r.decision.at.localeCompare(t.decision.at))}}function aw(e){return e.filter(t=>t.limit>0&&t.used>=t.limit)}function sw(e){return e.limit<=0?0:Math.min(1,e.used/e.limit)}var K0,W0,q_,V0,H0,J0,Y0,X_,q0,X0,tw,Q0,eC,tC,nw,N1,R1,nC,D1,j1,L1,z1,M1,rC,U1,iw,F1,oC,Fa=y(()=>{"use strict";Xe();rr();Ir();It();K0=u.enum(["draft","live","sleeping","throttled","expired","archived"]),W0=u.enum(["scheduled","open","locked","settled"]),q_=u.object({id:u.string(),label:u.string(),used:u.number(),limit:u.number(),unit:u.string()}),V0=u.object({date:u.string(),plays:u.number(),players:u.number()}),H0=u.object({id:u.string(),label:u.string(),state:W0,opensAt:u.string(),locksAt:u.string(),settledAt:u.string().nullable(),plays:u.number()}),J0=u.object({id:u.string(),name:u.string(),enabled:u.boolean(),consentRequired:u.boolean(),note:u.string()}),Y0=u.object({number:u.number().int().positive(),title:u.string(),openedAt:u.string(),labels:u.array(u.string()).default([]),fromGame:u.boolean().default(!1)}),X_=u.object({at:u.string(),level:u.enum(["info","warn","error"]),roundId:u.string().nullable(),message:u.string()}),q0=u.enum(["absent","pending","ready","failed"]),X0=u.object({state:q0.default("absent"),url:u.string().nullable().default(null),regenerations:u.number().int().nonnegative().default(0),updatedAt:u.string().nullable().default(null),onProject:u.string().nullable().default(null)});tw=u.object({section:u.string(),status:am}),Q0=u.object({id:u.string(),name:u.string(),containerLabel:u.string().min(1).default(kn),repository:u.string().nullable(),openIssues:u.number().int().nonnegative(),issues:u.array(Y0).default([]),archetype:Pt,offersPrize:u.boolean().default(!1),state:K0,archivePrefix:u.string().nullable().default(null),space:u.string().nullable().default(null).optional(),platformProject:u.string().nullable().default(null).optional(),platformEvent:u.string().nullable().default(null).optional(),platformElement:u.string().nullable().default(null).optional(),studioUrl:u.string().nullable().default(null).optional(),appSpec:u.object({version:u.string(),shape:u.string(),resource:u.string().nullable().default(null),specUrl:u.string().optional(),wording:u.array(u.string()).optional(),refusal:u.object({at:u.string(),reason:u.string()}).nullable().default(null).optional()}).nullable().default(null).optional(),art:X0.prefault({}).optional(),playgroundUrl:u.string().nullable(),playerEndpoint:u.string().nullable(),manifestRevision:u.string(),conformance:Ct,contentHash:u.string(),referenceDigest:u.string().optional(),sections:u.array(tw),meters:u.array(q_),history:u.array(V0),rounds:u.array(H0),destinations:u.array(J0),logs:u.array(X_),updatedAt:u.string()}),eC=u.object({login:u.string(),linkedAt:u.string()}),tC=u.object({enabled:u.boolean().default(!1),applicationId:u.string().nullable().default(null),writeKey:u.string().nullable().default(null)}),nw=u.enum(["pending","approved","refused"]),N1=u.enum(["manual","automatic"]);R1=u.enum(["approved","refused"]);nC=u.object({id:u.string(),name:u.string(),tier:cm,ownerEmail:u.string(),access:nw.default("pending"),liveGameAllowance:u.number(),supplierGrants:u.array(u.string()).default([]),github:eC.nullable().default(null),signal:tC.prefault({}),meters:u.array(q_),games:u.array(Q0)}),D1=nC.extend({gamesTotal:u.number().int().nonnegative(),archivedTotal:u.number().int().nonnegative().default(0)}),j1=u.object({player:u.string().nullable(),control:u.string().nullable(),playground:u.string().nullable()}),L1=u.object({id:u.string(),name:u.string(),archetype:Pt,repository:u.string().nullable().default(null),manifestRevision:u.string(),contentHash:u.string(),conformance:Ct,offersPrize:u.boolean().default(!1),sections:u.array(tw).default([]),containerLabel:u.string().min(1).optional()}),z1=u.object({uploadUrl:u.string(),publicUrl:u.string(),key:u.string(),expiresInSeconds:u.number().int().positive(),playerApiOrigin:u.string()}),M1=u.object({manifestRevision:u.string(),contentHash:u.string(),conformance:Ct,offersPrize:u.boolean().default(!1),round:ze.optional(),wording:u.array(u.string()).optional()}),rC=u.object({limit:u.coerce.number().int().positive().max(1e3).default(100),since:u.string().nullable().default(null),level:X_.shape.level.nullable().default(null)}),U1=u.enum(["access_pending","github_not_linked","live_allowance_reached","meter_breached","nothing_to_do","tier_required","game_archived","art_limit_reached","art_unavailable","round_source_unreadable","round_not_seeded"]),iw=u.enum(["workspace.created","workspace.approved","workspace.refused","github.linked","github.unlinked","game.registered","game.deployed","game.deploy_refused","round.provisioned","round.provision_failed","round.seeded","game.platform_provisioned","game.platform_provision_failed","game.app_spec_refused","art.requested","art.generated","art.failed","art.published","game.woken","game.suspended","game.throttled","game.approaching_fair_use","game.archived","game.deleted","workspace.plan_changed","destination.changed","signal.enabled","signal.disabled"]),F1=u.object({id:u.string(),at:u.string(),action:iw,actor:u.object({kind:u.enum(["creator","operator","system"]),id:u.string(),email:u.string().nullable().default(null)}),gameId:u.string().nullable().default(null),correlationId:u.string(),detail:u.record(u.string(),u.unknown()).default({})}),oC=u.object({limit:u.coerce.number().int().positive().max(1e3).default(100),action:iw.nullable().default(null),actorId:u.string().nullable().default(null),gameId:u.string().nullable().default(null),from:u.string().nullable().default(null),to:u.string().nullable().default(null)})});var cn=y(()=>{"use strict"});function cC(e){return`slate-${e+1}`}function uw(e){return{archetype:"push",prompt:e.prompt??"",target:e.target,targetLabel:e.targetLabel??"",unit:e.unit??"",slates:e.slates.map((t,r)=>({id:cC(r),label:t.label??"",entries:t.entries.map(o=>({key:o.key,label:o.label??""}))}))}}var aC,sC,lw,cr=y(()=>{"use strict";Xe();cn();aC=u.object({key:u.string().min(1),label:u.string().default("")}),sC=u.object({id:u.string().min(1),label:u.string().default(""),entries:u.array(aC).min(1)}),lw=u.object({archetype:u.literal("push"),prompt:u.string().default(""),target:u.number().int().positive(),targetLabel:u.string().default(""),unit:u.string().max(4).default(""),slates:u.array(sC).min(1)})});var Q1,Ba=y(()=>{"use strict";Xe();It();cr();cn();Q1=u.discriminatedUnion("archetype",[lw,om,im])});var sz,$m=y(()=>{"use strict";Wt();cr();Ba();sz=3600*24});import{createHash as lC}from"node:crypto";function dC(e){return lC("sha256").update(e).digest("hex").slice(0,16)}function Za(e){return dC(e)}var uC,Rt,ln=y(()=>{"use strict";Xe();cn();It();uC=u.object({key:u.string().min(1),label:u.string().default(""),values:u.record(u.string(),u.number().int().nonnegative())}),Rt=u.object({corpus:u.literal("1"),measures:u.array(uC).min(1)}).superRefine((e,t)=>{let r=e.measures.map(o=>o.key);new Set(r).size!==r.length&&t.addIssue({code:"custom",path:["measures"],message:"Two measures share a key. A round names the measure it is counted on."})})});var Em=y(()=>{"use strict";cn();It()});var Cz,Tm=y(()=>{"use strict";ln();cr();cn();Wt();Ba();Cz=1440*60});function Rm(e,t){let r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp([`\\bpresentation\\s*\\.\\s*${r}\\b`,`\\bpresentation\\s*\\[\\s*["']${r}["']\\s*\\]`,`\\b${r}\\s*:`].join("|")).test(e)||t==="primaryColour"&&/\broot\s*:/.test(e)}function Ka(e){return Am.filter(t=>Rm(e,Nm[t.key])).map(t=>t.key)}var Am,Im,dw,Cm,Pm,pC,pw,mw,mC,hC,hw,Om,Nm,Dm=y(()=>{"use strict";Am=[{key:"play_again_label",label:"Play again button",type:"freetext",description:"What the button that starts the next round says, at the end of a finished one. Leave it empty to keep the game's own word.",readBy:"The game's own page, on its play-again button.",section:"Wording"},{key:"result_button_label",label:"Result link",type:"freetext",description:"What the link back to a finished round says, for a fan who has already played today. Leave it empty to keep the game's own word.",readBy:"The game's own page, on its see-your-result link.",section:"Wording"},{key:"share_button_label",label:"Share button",type:"freetext",description:"What the share button says at the end of a round. Leave it empty to keep the game's own word.",readBy:"The game's own page, on its share button.",section:"Wording"}],Im=Am.map(e=>e.key),dw=[{key:"display_name",label:"Game name",type:"freetext",description:"What a fan sees at the top of the game. Leave it empty to use the name the game was deployed with.",readBy:"The game's own page, as its heading and its browser title.",section:"Identity"},{key:"strapline",label:"Strapline",type:"freetext",description:"One line under the name. Leave it empty and the line is not drawn.",readBy:"The game's own page, under the heading.",section:"Identity"},{key:"how_to_play",label:"How to play",type:"freetext",description:"The rules in a fan's words. Shown before they start, and reachable while they play.",readBy:"The game's own page, in its how-to-play panel.",section:"Identity"},{key:"reference_url",label:"Reference data",type:"freetext",description:"A link to JSON holding the data this game draws on, shared by every round. Fetched by the Engine, never sent to a fan's browser. Leave it empty if each round carries everything it needs.",readBy:"The control plane, when it provisions a round.",section:"Content",public:!1},{key:"primary_colour",label:"Primary colour",type:"colour",description:"The colour of the button a fan presses. Everything else stays as the game was built.",readBy:"The game's own page, as the --gamestage-primary custom property.",section:"Brand"},{key:"play_button_label",label:"Main button",type:"freetext",description:"What the button that submits a fan's answer says. Leave it empty to keep the game's own word.",readBy:"The game's own page, on its submit button.",section:"Wording"},...Am,{key:"rank_ladder",label:"Rank names",type:"collection",itemLabel:"{{rank_label}}",description:"What each rank is called, best first. The game decides which rank a fan earned; this is only what it is called. Leave it empty to use the game's own names.",readBy:"The Engine, which awards the rank and returns its name.",section:"Wording",fieldset:[{key:"rank_label",label:"Name",type:"freetext",description:'What a fan sees when they earn this rank, e.g. "Hall of Fame".',readBy:"The Engine, on a finished round.",section:"Wording"}]},{key:"round_selection",label:"How the live round is chosen",type:"freetext",description:"Calendar: the round on today's edition, which a producer prepares. Rotation: one of a pool, chosen by the clock, the same one for everybody playing at that moment. Leave it empty for calendar.",readBy:"The control plane, when it provisions a round.",section:"Content",public:!1},{key:"round_window_seconds",label:"How long a round stays up",type:"number",description:"Under rotation, how many seconds each round is the live one before the next takes over. Leave it empty for a day.",readBy:"The control plane, when it provisions a round.",section:"Content",public:!1},{key:"measure",label:"Measure",type:"freetext",description:'Which column of the reference data a round counts, when it holds more than one, e.g. "points". A round can name its own instead. Leave it empty if the data holds one measure.',readBy:"The control plane, when it joins a round to the reference data.",section:"Content",public:!1}],Cm=[{key:"edition_name",label:"Edition name",type:"freetext",description:"What a fan sees this edition called. Leave it empty to use the game's own word for its container.",readBy:"The game's own page, wherever it names the round.",section:"This edition"},{key:"edition_strapline",label:"Edition line",type:"freetext",description:"A line for this edition only: a sponsor, a fixture, a date. Leave it empty and the line is not drawn.",readBy:"The game's own page, beside the edition name.",section:"This edition"}],Pm=[{key:"source_url",label:"Content source",type:"freetext",description:"A link to JSON holding this round's content. Fetched by the Engine when the round is provisioned, so it is never sent to a fan's browser and may hold the answers. Leave it empty to use the round in the game's manifest.",readBy:"The control plane, when it provisions the round.",section:"Content",public:!1},{key:"measure",label:"Measure",type:"freetext",description:'Which column of the reference data this round counts, e.g. "assists". Leave it empty to count what the game counts.',readBy:"The control plane, when it joins this round to the reference data.",section:"Content",public:!1}],pC=[{key:"round_prompt",label:"What a fan is told",type:"freetext",description:"The line above the board, in a fan's words. Leave it empty to keep the wording the game was built with.",readBy:"The game's own page, above the board.",section:"This round"},{key:"round_target",label:"The target",type:"number",description:"The total a fan must get as close to as they can without going over. Public: it is the goal they are set, and the game is unplayable without it.",readBy:"The Engine, which marks against it, and the page, which shows it.",section:"This round"},{key:"round_target_label",label:"What is being counted",type:"freetext",description:'Shown beside the target, e.g. "Career Points".',readBy:"The game's own page, beside the target.",section:"This round"},{key:"round_unit",label:"Unit",type:"freetext",description:'Put in front of every number in this round, e.g. "\xA3". Leave it empty for a round that counts something with no unit, like points.',readBy:"The game's own page, in front of the target, each pick and the total.",section:"This round"},{key:"round_slates",label:"The picks",type:"collection",itemLabel:"{{slate_label}}",description:"One group per pick, in the order a fan plays them. Five groups means five picks.",readBy:"The Engine, which marks against them, and the page, which draws them.",section:"This round",fieldset:[{key:"slate_label",label:"Group",type:"freetext",description:'What a fan sees above the choices, e.g. "1996-97 CHI".',readBy:"The game's own page.",section:"This round"},{key:"slate_entries",label:"Choices",type:"collection",itemLabel:"{{entry_label}}",description:"The choices a fan picks between in this group.",readBy:"The Engine and the page.",section:"This round",fieldset:[{key:"entry_label",label:"Name",type:"freetext",description:'What a fan sees, e.g. "Michael Jordan".',readBy:"The game's own page.",section:"This round"},{key:"entry_key",label:"Reference",type:"freetext",description:`The id this choice has in the game's own data, e.g. "jordami01". It is how the Engine finds what the choice is worth, so it has to match the data the game was deployed with. Never shown to a fan.`,readBy:"The Engine, to look up what this choice is worth.",section:"This round"}]}]}],pw="Never shown to a fan. This is the answer, so it is withheld from the feeds a browser reads.",mw={key:"round_board",label:"The board",type:"collection",itemLabel:"{{board_item}}",description:"Everything a fan can pick from, in the order they should see it.",readBy:"The Engine, which marks against it, and the page, which draws it.",section:"This round",fieldset:[{key:"board_item",label:"Pick",type:"freetext",description:'One thing a fan can pick, exactly as they should read it, e.g. "Michael Jordan".',readBy:"The game's own page, and the Engine, which marks a pick by it.",section:"This round"}]},mC=[{key:"round_prompt",label:"What a fan is told",type:"freetext",description:"The line above the board, in a fan's words. Leave it empty to keep the wording the game was built with.",readBy:"The game's own page, above the board.",section:"This round"},mw,{key:"round_targets",label:"The right answers",type:"freetext",description:`The picks that are right, separated by commas, written exactly as they appear on the board, e.g. "Michael Jordan, Larry Bird". ${pw}`,readBy:"The Engine, to mark a pick.",section:"This round",public:!1}],hC=[{key:"round_prompt",label:"What a fan is told",type:"freetext",description:"The line above the board, in a fan's words. Leave it empty to keep the wording the game was built with.",readBy:"The game's own page, above the board.",section:"This round"},mw,{key:"round_groups",label:"The connections",type:"collection",itemLabel:"{{group_label}}",description:`One per hidden group. ${pw}`,readBy:"The Engine, to mark a guess and to name a group once it is found.",section:"This round",public:!1,fieldset:[{key:"group_label",label:"What connects them",type:"freetext",description:'Shown to a fan only once they have found this group, e.g. "1996-97 Bulls".',readBy:"The game's own page, after the group is solved.",section:"This round"},{key:"group_members",label:"Which ones",type:"freetext",description:'The picks in this group, separated by commas, written exactly as they appear on the board, e.g. "Michael Jordan, Scottie Pippen". Every one has to be on the board, and no pick may be in two groups.',readBy:"The Engine, to mark a guess.",section:"This round"}]}],hw=[{key:"prediction_question",label:"Question",type:"freetext",description:"What a fan is asked to call, in their words.",readBy:"The Engine, when it provisions the round.",section:"Content"},{key:"prediction_option",label:"Option",type:"freetext",description:"One thing a fan can call. Add one per outcome.",readBy:"The Engine, when it provisions the round.",section:"Content"}],Om={hunt:mC,push:pC,group:hC,predict:[]},Nm={display_name:"displayName",strapline:"strapline",how_to_play:"howToPlay",primary_colour:"primaryColour",play_button_label:"playButtonLabel",play_again_label:"playAgainLabel",result_button_label:"resultButtonLabel",share_button_label:"shareButtonLabel",edition_name:"editionName",edition_strapline:"editionStrapline"}});function yC(e){let t=new Map,r=o=>{for(let n of o){let i=t.get(n.key);if(i){if(i.type!==n.type)throw new Error(`The field "${n.key}" is declared as both ${i.type} and ${n.type}. One key is one declaration; a level's own label and description travel on its field set entry, its type does not.`)}else t.set(n.key,n);r(n.fieldset??[])}};return r(e),[...t.values()]}function jm(e){let t=[];for(let r of e){let o=r.public===!1,n={label:r.label,key:r.key,description:r.description,...r.type==="collection"?{}:{mandatory:!1},...o?{public:!1,cloneable:!1}:{}},i=t.find(a=>a.name===r.section);i?i.properties.push(n):t.push({name:r.section,properties:[n]})}return t}function vC(e){let t=e.archetypes.map(Ve);for(let i of t)if(!fw[i])throw new Error(`No Studio element name for the ${i} archetype. Add one to ARCHETYPE_ELEMENT_NAMES rather than letting Studio show a blank type.`);let r=i=>`${e.urls.baseAppsUrl}/${i}`,o=new Set(e.wording??Im),n=dw.filter(i=>!Im.includes(i.key)||o.has(i.key));return{"spec.json":{name:e.name,id:e.id,version:e.version,base_apps_url:e.urls.baseAppsUrl,dash_image:e.urls.dashImage,embed_url:e.urls.embedUrl,elements:r("elements.json"),fields:r("fields.json"),project_settings:r("project_settings.json"),event_settings:r("event_settings.json"),schedule:!0,analytics:!0,live_activity:!0,localisation:!1},"elements.json":t.map(i=>({name:fw[i],content_type:yw(i),derived_from:gw[i]?.derivedFrom??"data",duration:gw[i]?.duration??{mode:"instant"},label:i==="predict"?"{{question.text}}":e.name,custom_fields:jm([...Pm,...Om[Ve(i)]??[]]),...i==="predict"?{label_question:"Question",label_option:"Option",reveal_results:{modes:["manual"],default:"manual"},correct_option:{live_update:!0},question:[{label:"Question",key:"text",field:"prediction_question",mandatory:"question"}],option:[{label:"Option",key:"text",field:"prediction_option",mandatory:"option"}]}:{}})),"fields.json":yC([...n,...Cm,...Pm,...Object.values(Om).flat(),...hw]).map(gC),"project_settings.json":{sections:jm(n)},"event_settings.json":{sections:jm(Cm)}}}function vw(e){return vC({name:e.gameName,id:e.gameId,wording:e.wording??[],version:`0.0.${e.manifestRevision}`,archetypes:[e.archetype],urls:e.urls})}var fw,yw,gw,fC,gC,Lm=y(()=>{"use strict";Dm();Wt();fw=Nf,yw=e=>{let t=Ve(e);return Gs[t]??`gamestage-${t.replaceAll("_","-")}-element`},gw={hunt:{derivedFrom:"data",duration:{mode:"fixed",default:86400}},push:{derivedFrom:"data",duration:{mode:"fixed",default:86400}},group:{derivedFrom:"data",duration:{mode:"fixed",default:86400}},predict:{derivedFrom:"prediction",duration:{mode:"flexible"}}},fC=new Set(["freetext","wysiwyg","image","file"]),gC=e=>({key:e.key,type:e.type,...fC.has(e.type)?{localisable:!1}:{},...e.type==="collection"?{...e.itemLabel?{item_label:e.itemLabel}:{},fieldset:(e.fieldset??[]).map(t=>({label:t.label,key:t.key,...t.description?{description:t.description}:{}}))}:{}})});var zm=y(()=>{"use strict"});var bw=y(()=>{"use strict";Ir();Fa();$m();ln();Em();Tm();Lm();zm();Sm();It()});function _C(e){let t=1e3*2**(e-1),r=t*.2*(Math.random()*2-1);return Math.round(t+r)}function ww(e){let t=e.fetch??globalThis.fetch,r=e.maxAttempts??4,o=e.baseUrl.replace(/\/+$/,"");return async function(i,a,s={}){let c=globalThis.location?.origin,l=new URL(`${o}${a}`,o.startsWith("/")?c:void 0);for(let[d,m]of Object.entries(s.query??{}))m!=null&&l.searchParams.set(d,String(m));let p;for(let d=1;d<=r;d++){let m=typeof e.token=="function"?await e.token():e.token,h=await t(l,{method:i,headers:{authorization:`Bearer ${m}`,...s.body===void 0?{}:{"content-type":"application/json"}},body:s.body===void 0?void 0:JSON.stringify(s.body)});if(h.ok)return await h.json();let f=await h.json().catch(()=>({}));if(p=new pt(h.status,f.error?.code??"unknown",f.error?.message??h.statusText,f.error?.retryable??!1),!p.retryable||d===r)break;let w=Number(h.headers.get("retry-after"));await bC(Number.isFinite(w)&&w>0?w*1e3:_C(d))}throw p??new pt(0,"unknown","Request failed.",!1)}}function kw(e){let t=ww(e);return{setWorkspaceAccess:(r,o,n)=>t("PUT",`/v1/admin/workspaces/${encodeURIComponent(r)}/access`,{body:{access:o,reason:n??null}}),async listAccess(){let r=await t("GET","/v1/admin/access"),o=[...r.waiting??[],...r.decided??[]].filter(n=>typeof n=="object"&&n!==null).map(rw);return ow(o)}}}function lr(e){let t=ww(e),r=i=>({...i,containerLabel:i.containerLabel??"Round"}),o=i=>({...i,access:Ua(i),games:(i.games??[]).map(r),gamesTotal:i.gamesTotal??(i.games??[]).length,archivedTotal:i.archivedTotal??(i.games??[]).filter(a=>a.state==="archived").length}),n=i=>({...i,workspace:{...i.workspace,access:Ua(i.workspace??{}),games:(i.workspace?.games??[]).map(r)}});return{getWorkspace:async()=>o(await t("GET","/v1/workspace")),getWorkspaceSummary:async()=>{try{return o(await t("GET","/v1/workspace/summary"))}catch(i){if(!(i instanceof pt)||i.status!==404)throw i;return _w||(_w=!0,console.warn("[control-plane] no /v1/workspace/summary, falling back to the full workspace read. If this persists the control plane is behind the site, and every Stage screen is carrying the whole workspace again.")),o(await t("GET","/v1/workspace"))}},linkGitHub:async i=>n(await t("PUT","/v1/workspace/github",{body:{login:i}})),setPlan:async i=>n(await t("PUT","/v1/workspace/plan",{body:{tier:i}})),uploadTarget:(i,a)=>t("POST",`/v1/games/${encodeURIComponent(i)}/uploads`,{body:{filename:a}}),referenceUploadTarget:(i,a)=>t("POST","/v1/reference/uploads",{body:{name:i,digest:a}}),pruneBundle:(i,a)=>t("PUT",`/v1/games/${encodeURIComponent(i)}/bundle`,{body:{filenames:a}}),async getGame(i){try{return r(await t("GET",`/v1/games/${encodeURIComponent(i)}`))}catch(a){if(a instanceof pt&&a.status===404)return;throw a}},setAwake:(i,a)=>t("PUT",`/v1/games/${encodeURIComponent(i)}/state`,{body:{awake:a}}),setDestination:(i,a,s)=>t("PUT",`/v1/games/${encodeURIComponent(i)}/destinations`,{body:{destination_id:a,enabled:s}}),registerGame:i=>t("POST","/v1/games",{body:i}),archiveGame:i=>t("POST",`/v1/games/${encodeURIComponent(i)}/archive`),deploy:(i,a)=>t("POST",`/v1/games/${encodeURIComponent(i)}/deploy`,{body:a}),refreshRound:i=>t("POST",`/v1/games/${encodeURIComponent(i)}/round/refresh`),async seedRound(i,a){try{return await t("PUT",`/v1/games/${encodeURIComponent(i)}/round`,{body:{round:a}})}catch(s){throw s instanceof pt&&s.status===404&&!/no such game/i.test(s.message)?new pt(404,"not_supported","This control plane cannot take a round yet. It is running a build older than this CLI, so the round has to go in through Studio until it is updated.",!1):s}},setSignal:async i=>n(await t("PUT","/v1/workspace/signal",{body:{enabled:i}})),async getEndpoints(i){try{return await t("GET",`/v1/games/${encodeURIComponent(i)}/endpoints`)}catch(a){if(a instanceof pt&&a.status===404)return;throw a}},async getLogs(i,a){let{lines:s}=await t("GET",`/v1/games/${encodeURIComponent(i)}/logs`,{query:a});return s},async getAuditLog(i){let{records:a}=await t("GET","/v1/audit",{query:i});return a}}}var pt,bC,_w,xw=y(()=>{"use strict";Fa();pt=class extends Error{status;code;retryable;constructor(t,r,o,n){super(o),this.status=t,this.code=r,this.retryable=n,this.name="ControlPlaneError"}},bC=e=>new Promise(t=>setTimeout(t,e)),_w=!1});var Sw=y(()=>{"use strict";cr()});var wC,kC,xC,_2,Mm=y(()=>{"use strict";Xe();wC=u.discriminatedUnion("kind",[u.object({kind:u.literal("everyone")}),u.object({kind:u.literal("domains"),domains:u.array(u.string().min(1)).min(1)}),u.object({kind:u.literal("named")})]),kC=u.enum(["licensed","unofficial","creator"]),xC=u.enum(["ours","creator"]),_2=u.object({id:u.string().min(1),label:u.string().min(1),standing:kC,origin:xC,tiers:u.array(u.enum(["runtime","live","enterprise"])).min(1),produces:u.array(u.string()),note:u.string().min(1),audience:wC.optional()})});var $w=y(()=>{"use strict";Mm()});var Ew=y(()=>{"use strict";ln()});var Tw=y(()=>{"use strict";ln()});function SC(e){let t;try{t=JSON.parse(e)}catch(o){return{ok:!1,reason:"That is not JSON.",detail:o instanceof Error?o.message:void 0}}let r=Rt.safeParse(t);if(!r.success){let o=r.error.issues[0];return{ok:!1,reason:"That is not valid reference data.",detail:o?`${o.path.join(".")||"document"}: ${o.message}`:void 0}}return{ok:!0,summary:{digest:Za(e),measures:r.data.measures.map(o=>o.key),counts:Object.fromEntries(r.data.measures.map(o=>[o.key,Object.keys(o.values).length]))}}}async function Aw(e,t){let r=SC(e);return r.ok&&(await t("copy",e),await t("pointer",e)),r}var Iw=y(()=>{"use strict";ln()});var Cw=y(()=>{"use strict"});var Pw=y(()=>{"use strict"});function Um(e){return e.playerId?.trim()||e.sourceIp?.trim()||"unknown"}function Fm(e,t){return`${e.length}:${e}${t}`}var N2,Ow=y(()=>{"use strict";N2=600*1e3});var oe=y(()=>{"use strict";Ir();Wt();rr();rm();Fb();W_();Aa();Sm();It();Fa();bw();xw();Dm();cn();Em();cr();Ba();Sw();ln();$w();Mm();Ew();Tw();Iw();Tm();Cw();Lm();$m();Pw();zm();Ow()});import{readFile as BC}from"node:fs/promises";async function Hm(e){let t;try{t=await BC(e)}catch{return}if(t.byteLength>ZC)return;if(t.byteLength>=2){if(t[0]===255&&t[1]===254)return t.toString("utf16le");if(t[0]===254&&t[1]===255)return t.swap16().toString("utf16le")}let r=t.subarray(0,8192);if(!r.includes(0))return t.toString("utf8");let o=0,n=0;for(let a=0;a<r.length;a+=1)r[a]===0&&(a%2===0?o+=1:n+=1);let i=Math.floor(r.length/2);if(i>8){if(n>i*.7&&o<i*.1)return t.toString("utf16le");if(o>i*.7&&n<i*.1)return t.swap16().toString("utf16le")}}async function Ya(e){let t=[];for(let r of e){let o=r.relativePath.split("/").pop();if(o===ge||o===xe)continue;let n=await Hm(r.path);n!==void 0&&t.push({relative:r.relativePath,text:n})}return t}var ZC,Jm=y(()=>{"use strict";Zt();ZC=8e6});import{lstatSync as KC,readdirSync as WC}from"node:fs";import{relative as VC,resolve as Jw,sep as HC}from"node:path";function Yw(e){let t=e.split("/").pop()??e;return JC.has(t)||t.startsWith(".env.")}function Ym(e,t={}){let r=t.symlinks??"throw",o=Jw(e),n=[],i=[];function a(s){for(let c of WC(s,{withFileTypes:!0}).sort((l,p)=>l.name.localeCompare(p.name))){let l=Jw(s,c.name),p=VC(o,l).split(HC).join("/");if(c.isSymbolicLink()){if(r==="throw")throw new Error(`Directory ${e} contains a symlink: ${p}`);i.push(p);continue}if(c.isDirectory())a(l);else if(c.isFile()){if(Yw(p))continue;n.push({path:l,relativePath:p})}}}if(!KC(o).isDirectory())throw new Error(`${e} is not a directory.`);return a(o),{files:n,skippedLinks:i}}function qm(e){return Ym(e,{symlinks:"throw"}).files}var JC,Xm=y(()=>{"use strict";JC=new Set(["gamestage.yaml","gamestage.yml",".env",".env.local","gamestage.mjs","cli.mjs"])});import{createHash as YC}from"node:crypto";function qa(e){return YC("sha256").update(e,"utf8").digest()[0]&127}var qw,Qm=y(()=>{"use strict";qw=128});import{createHmac as qC,randomBytes as XC,timingSafeEqual as QC}from"node:crypto";function th(e){return e.startsWith(eh)}function So(e){let t=(e??"").replace(/[^A-Za-z0-9_.-]/g,"").slice(0,64);return`${eh}${t||"unknown"}`}async function Xw(e){if(!e.token)return e.sessionSecret?{playerId:nP(e.anonymousId,e.sessionSecret)??So(void 0)}:{playerId:So(e.anonymousId)};let t=e.resolver??eP,r=await t.resolve(e.token);return r?{playerId:r.playerId,alias:r.alias}:{playerId:So(e.anonymousId),refused:t.lastRefusal?.()??"identity_unresolved"}}function ek(e){let t=`${eh}${XC(16).toString("base64url")}`;return{playerId:t,token:tP(t,e)}}function tk(e,t){return qC("sha256",t).update(e).digest("base64url")}function tP(e,t){return`${e}${Qw}${tk(e,t)}`}function nP(e,t){if(!e)return;let r=e.lastIndexOf(Qw);if(r<=0)return;let o=e.slice(0,r);if(!th(o))return;let n=Buffer.from(e.slice(r+1)),i=Buffer.from(tk(o,t));if(n.length===i.length)return QC(n,i)?o:void 0}var eh,eP,Qw,nh=y(()=>{"use strict";eh="anon:";eP={async resolve(){}};Qw="."});function hr(e){return e instanceof Error?e.name:"unknown"}function un(e){console.error(rP,e)}function nk(e,t){console.error(oP,{violation:e,...t})}var rP,oP,Xa=y(()=>{"use strict";rP="engine_error",oP="engine_integrity_violation"});function rk(e){let{tenant:t,playerId:r,store:o,rules:n}=e,i=e.now??(()=>new Date().toISOString()),a=0,s=e.newPlayId??(()=>`play_${++a}_${r}`),c=()=>({server_time:i(),snapshot:e.runtime.snapshot}),l=_=>_;function p(_,A){return!n.settle||!_.round.can.results_available||A.outcome!=="pending"?A:n.settle({secret:_.secret,state:A,limits:_.limits,now:i()})}function d(_){if(!_.fusedUntil)return 0;let A=Math.ceil((Date.parse(_.fusedUntil)-Date.parse(i()))/1e3);return Number.isFinite(A)&&A>0?A:0}async function m(_,A){let R=e.fuse?.note(t,qa(r),A);if(!R)return;let U=new Date(Date.parse(i())+R.holdSeconds*1e3).toISOString();if(R.kind==="stop")try{await o.setFuse(t,_,U)}catch(B){un({event:"fuse_write_failed",tenant:t,round_id:_,name:hr(B)})}try{await e.onFuse?.({...R,until:U})}catch(B){un({event:"fuse_notify_failed",tenant:t,round_id:_,name:hr(B)})}}function h(_){return d(_)<=0?_.round:{..._.round,can:{..._.round.can,accepting_plays:!1}}}async function f(_,A){let R=await o.getState(t,_,r);return R?{state:R.state,version:R.version}:{state:n.initialState({playerId:r,roundId:_,limits:A,now:i()}),version:void 0}}let w=(_,A,R)=>({...c(),play_id:s(),outcome:_,reason:A,round_version:R,marked:!1,feedback:[]});return{async getRuntime(){return{...e.runtime,...c()}},async getCurrentRound(){let _=await o.getCurrentRound(t);if(!_)throw new Error(rh);return{...h(_),...c()}},async getRound(_){let A=await o.getRound(t,_);return A?{...h(A),...c()}:void 0},async getRoundState(_){let A=await o.getRound(t,_);if(!A)throw new Error(rh);let R=l(A),{state:U}=await f(_,R.limits),B=p(R,U);return B!==U&&B.finished&&await o.recordScore(t,_,r,B.score),{...B,...c()}},async getProfile(){return{...await o.getProfile(t,r),...c()}},async getLeaderboard(_){let R=(await o.getCurrentRound(t))?.round.id??"";return{...await o.getLeaderboard(t,R,{limit:_,viewerId:r}),...c()}},async play(_,A){let R=await o.getRound(t,_);if(!R)return w("rejected",rh,0);let U=l(R);if(e.runtime.identity?.required&&th(r))return w("rejected",e.identityRefusal??"identity_required",U.round.version);if(d(U)>0)return{...w("busy","fair_use",U.round.version),retry_after_seconds:d(U)};if(U.limits.playsPerSecond!==void 0){let ot=i().slice(0,19),le=await o.countPlay(t,_,ot,r),$r=Math.max(1,Math.ceil(U.limits.playsPerSecond/le.buckets));if(le.inBucket>$r)return await m(_,ot),{...w("busy","capped",U.round.version),retry_after_seconds:1}}let B=await o.getPlay(t,r,A.idempotency_key);if(B)return{...B.result,...c(),outcome:"duplicate"};let{state:Z,version:Ke}=await f(_,U.limits),rt=n.admissible({accepting:U.round.can.accepting_plays,roundVersion:U.round.version,playedVersion:A.round_version,challengeInstanceId:U.round.challenge_instance_id??null,playedChallengeInstanceId:A.challenge_instance_id??null,state:Z,secret:U.secret,limits:U.limits});if(!rt.ok){let ot=rt.reason==="round_version"?"stale":"rejected";return w(ot,rt.reason,U.round.version)}let q=n.mark({payload:A.payload,secret:U.secret,state:Z,limits:U.limits,markAtSettlement:e.runtime.marking==="at_settlement",now:i()});if(q.outcome!=="accepted")return w("rejected",q.reason??"rejected",U.round.version);let fe={...c(),play_id:s(),outcome:q.outcome,round_version:U.round.version,marked:q.marked,feedback:q.feedback,round_state:{...q.next,...c()}},hn=`play:${JSON.stringify([t,r,A.idempotency_key])}`,zo=[{id:hn,at:fe.server_time,tenant:t,round_id:_,player_id:r,action:"play.committed",detail:{play_id:fe.play_id,idempotency_key:A.idempotency_key,outcome:fe.outcome,marked:fe.marked,round_version:fe.round_version,score_before:Z.score,score_after:q.next.score,attempts_used:q.next.attempts_used,attempts_allowed:q.next.attempts_allowed,mistakes_used:q.next.mistakes_used,mistakes_allowed:q.next.mistakes_allowed,...n.auditDetail({secret:U.secret,before:Z,decision:q,payload:A.payload})}}];q.marked&&zo.push({id:`score:${JSON.stringify([t,r,A.idempotency_key])}`,at:fe.server_time,tenant:t,round_id:_,player_id:r,action:"score.recorded",detail:{play_id:fe.play_id,score_before:Z.score,score_after:q.next.score,marked:!0,outcome:q.next.outcome}});let fn=q.next.finished&&!Z.finished?Ma(await o.getProfile(t,r),q.next.outcome):void 0,Gt=await o.commitPlay({tenant:t,playerId:r,idempotencyKey:A.idempotency_key,play:{result:fe},state:q.next,expectedVersion:Ke,audit:zo,...q.marked?{score:{roundId:_,score:q.next.score}}:{},...fn?{profile:fn}:{}});if(!Gt.ok&&Gt.reason==="play_exists"){let ot=await o.getPlay(t,r,A.idempotency_key);return ot?{...ot.result,...c(),outcome:"duplicate"}:(un({stage:"play_receipt_missing",tenant:t,round_id:_,player_id:r}),w("rejected","play_conflict",U.round.version))}return Gt.ok?fe:(await o.appendAudit({id:hn,at:fe.server_time,tenant:t,round_id:_,player_id:r,action:"play.refused",detail:{play_id:fe.play_id,idempotency_key:A.idempotency_key,reason:"round_version",attempt_spent:!1}}),w("stale","round_version",U.round.version))}}}var rh,oh=y(()=>{"use strict";Qm();nh();Xa();oe();rh="round_not_found"});function iP(e){return e.accepting?e.playedVersion!==e.roundVersion?{ok:!1,reason:"round_version"}:e.challengeInstanceId!==null&&e.playedChallengeInstanceId!==e.challengeInstanceId?{ok:!1,reason:"challenge_instance_id"}:e.state.finished?{ok:!1,reason:"round_finished"}:e.state.attempts_used>=e.limits.attemptsAllowed?{ok:!1,reason:"attempts_exhausted"}:e.state.mistakes_used>=e.limits.mistakesAllowed?{ok:!1,reason:"mistakes_exhausted"}:{ok:!0}:{ok:!1,reason:"round_closed"}}function aP(e){let{attempt:t,secret:r,state:o,limits:n}=e,i=new Set(Array.isArray(o.progress.solved)?o.progress.solved:[]),a=t.picks.filter(A=>r.targets.includes(A)&&!i.has(A)),s=t.picks.filter(A=>!r.targets.includes(A)),c=o.attempts_used+1,l=o.mistakes_used+(s.length>0?1:0);for(let A of a)i.add(A);let p=i.size>=r.required,d=l>=n.mistakesAllowed,m=c>=n.attemptsAllowed,h=p||d||m,f=e.markAtSettlement?o.score:a.length*r.pointsPerTarget+o.score+(p?r.completionBonus:0),w={...o,server_time:e.now,attempts_used:c,attempts_allowed:n.attemptsAllowed,mistakes_used:l,mistakes_allowed:n.mistakesAllowed,progress:{...o.progress,solved:[...i]},score:f,finished:h,outcome:e.markAtSettlement?"pending":p?"won":h?"lost":"incomplete"};return e.markAtSettlement?{outcome:"accepted",marked:!1,feedback:[],next:w}:{outcome:"accepted",marked:!0,feedback:t.picks.map(A=>({key:A,verdict:r.targets.includes(A)?"correct":"wrong"})),next:w}}function sP(e){return{server_time:e.now,snapshot:"",player_id:e.playerId,round_id:e.roundId,attempts_used:0,attempts_allowed:e.limits.attemptsAllowed,mistakes_used:0,mistakes_allowed:e.limits.mistakesAllowed,progress:{solved:[]},score:0,score_revision:0,finished:!1,outcome:"incomplete"}}var ih,ah=y(()=>{"use strict";ih={archetype:"hunt",admissible:iP,mark(e){let t=Array.isArray(e.payload.picks)?e.payload.picks:[];return aP({...e,attempt:{picks:t}})},initialState:sP,auditDetail({secret:e,decision:t,payload:r}){let o=Array.isArray(r.picks)?r.picks:[];return{correct_picks:t.feedback.filter(n=>n.verdict==="correct").length,picks_submitted:o.length,points_per_target:e.pointsPerTarget,completion_bonus:e.completionBonus}}}});function sh(e){let t=e.progress;return{total:typeof t.total=="number"?t.total:0,picks:Array.isArray(t.picks)?t.picks:[],bust:t.bust===!0}}function cP(e,t){if(t>e.target)return e.bustLabel;let r=(e.target-t)/e.target;for(let o of e.tiers)if(r<=o.within)return o.label;return e.floorLabel}function lP(e){return e.accepting?e.playedVersion!==e.roundVersion?{ok:!1,reason:"round_version"}:e.challengeInstanceId!==null&&e.playedChallengeInstanceId!==e.challengeInstanceId?{ok:!1,reason:"challenge_instance_id"}:e.state.finished?{ok:!1,reason:"round_finished"}:e.state.attempts_used>=e.limits.picksAllowed?{ok:!1,reason:"picks_exhausted"}:{ok:!0}:{ok:!1,reason:"round_closed"}}function uP(e){let{secret:t,state:r,limits:o}=e,n=sh(r),i=A=>({outcome:"rejected",reason:A,marked:!1,feedback:[],next:r});if(e.attempt.picks.length!==1)return i("one_pick_per_play");let a=t.slates[r.attempts_used];if(!a)return i("picks_exhausted");let[s]=e.attempt.picks,c=a.entries.find(A=>A.key===s);if(!c)return i("not_on_slate");let l=n.total+c.value,p=l>t.target,d=[...n.picks,{slate:a.id,key:c.key,label:c.label,value:c.value}],m=r.attempts_used+1,h=m>=o.picksAllowed,f=p||h,w={...r,server_time:e.now,attempts_used:m,attempts_allowed:o.picksAllowed,progress:{total:l,picks:d,bust:p,...f?{tier:cP(t,l)}:{}},score:e.markAtSettlement?r.score:p?0:l,finished:f,outcome:e.markAtSettlement?"pending":p?"lost":f?"won":"incomplete"};return e.markAtSettlement?{outcome:"accepted",marked:!1,feedback:[],next:w}:{outcome:"accepted",marked:!0,feedback:[{key:c.key,verdict:p?"wrong":"correct",label:String(c.value)}],next:w}}function dP(e){return{server_time:e.now,snapshot:"",player_id:e.playerId,round_id:e.roundId,attempts_used:0,attempts_allowed:e.limits.picksAllowed,mistakes_used:0,mistakes_allowed:0,progress:{total:0,picks:[],bust:!1},score:0,score_revision:0,finished:!1,outcome:"incomplete"}}var ch,lh=y(()=>{"use strict";ch={archetype:"push",admissible:lP,mark(e){let t=Array.isArray(e.payload.picks)?e.payload.picks:[];return uP({...e,attempt:{picks:t}})},initialState:dP,auditDetail({secret:e,before:t,decision:r}){let o=sh(t),n=sh(r.next);return{target:e.target,total_before:o.total,total_after:n.total,bust:n.bust,picks_committed:n.picks.length,...n.tier?{tier:n.tier}:{}}}}});function hP(e){return e.accepting?e.playedVersion!==e.roundVersion?{ok:!1,reason:"round_version"}:e.challengeInstanceId!==null&&e.playedChallengeInstanceId!==e.challengeInstanceId?{ok:!1,reason:"challenge_instance_id"}:e.state.finished?{ok:!1,reason:"round_finished"}:e.state.attempts_used>=e.limits.attemptsAllowed?{ok:!1,reason:"attempts_exhausted"}:e.state.mistakes_used>=e.limits.mistakesAllowed?{ok:!1,reason:"mistakes_exhausted"}:{ok:!0}:{ok:!1,reason:"round_closed"}}function fP(e){let{attempt:t,secret:r,state:o,limits:n}=e,i=new Set(Array.isArray(o.progress.solved)?o.progress.solved:[]),a=Array.isArray(o.progress.revealed)?o.progress.revealed:[],s=r.groups.filter(Z=>!i.has(Z.key)),c=s.find(Z=>pP(Z.members,t.picks)),l=o.attempts_used+1,p=o.mistakes_used+(c?0:1);c&&(i.add(c.key),a.push({key:c.key,label:c.label,members:[...c.members]}));let d=i.size>=r.groups.length,m=p>=n.mistakesAllowed,h=l>=n.attemptsAllowed,f=d||m||h,w=e.markAtSettlement?o.score:o.score+(c?r.pointsPerGroup:0)+(d?r.completionBonus:0),_={...o,server_time:e.now,attempts_used:l,attempts_allowed:n.attemptsAllowed,mistakes_used:p,mistakes_allowed:n.mistakesAllowed,progress:{...o.progress,solved:[...i],revealed:a},score:w,finished:f,outcome:e.markAtSettlement?"pending":d?"won":f?"lost":"incomplete"};if(e.markAtSettlement)return{outcome:"accepted",marked:!1,feedback:[],next:_};let A=s.reduce((Z,Ke)=>Math.max(Z,mP(t.picks,Ke)),0),R=!c&&t.picks.length>1&&A===t.picks.length-1,U=c?"correct":R?"close":"wrong";return{outcome:"accepted",marked:!0,feedback:t.picks.map(Z=>({key:Z,verdict:U,...c?{label:c.label}:{}})),next:_}}function gP(e){return{server_time:e.now,snapshot:"",player_id:e.playerId,round_id:e.roundId,attempts_used:0,attempts_allowed:e.limits.attemptsAllowed,mistakes_used:0,mistakes_allowed:e.limits.mistakesAllowed,progress:{solved:[],revealed:[]},score:0,score_revision:0,finished:!1,outcome:"incomplete"}}var pP,mP,ok,ik=y(()=>{"use strict";pP=(e,t)=>e.length===t.length&&new Set([...e,...t]).size===e.length,mP=(e,t)=>new Set(e.filter(r=>t.members.includes(r))).size;ok={archetype:"group",admissible:hP,mark(e){let t=Array.isArray(e.payload.picks)?e.payload.picks:[];return fP({...e,attempt:{picks:t}})},initialState:gP,auditDetail({secret:e,decision:t,payload:r}){let o=Array.isArray(r.picks)?r.picks:[],n=t.feedback[0]?.verdict;return{group_found:n==="correct"?t.next.progress.solved.at(-1):null,near_miss:n==="close",picks_submitted:o.length,groups_total:e.groups.length,points_per_group:e.pointsPerGroup}}}});function yP(e,t){return e.options.find(r=>r.key===t)?.points??e.pointsForCorrect}function vP(e){return e.accepting?e.playedVersion!==e.roundVersion?{ok:!1,reason:"round_version"}:e.challengeInstanceId!==null&&e.playedChallengeInstanceId!==e.challengeInstanceId?{ok:!1,reason:"challenge_instance_id"}:e.state.attempts_used>=e.limits.attemptsAllowed?{ok:!1,reason:"attempts_exhausted"}:{ok:!0}:{ok:!1,reason:"round_closed"}}function bP(e){let{attempt:t,secret:r,state:o,limits:n}=e,i=r.options.some(l=>l.key===t.pick),a=o.attempts_used+1;if(!i)return{outcome:"rejected",reason:"unknown_option",marked:!1,feedback:[],next:o};let s=[...Array.isArray(o.progress.picks)?o.progress.picks:[],t.pick],c={...o,server_time:e.now,attempts_used:a,attempts_allowed:n.attemptsAllowed,progress:{...o.progress,picks:s},finished:a>=n.attemptsAllowed};return r.result===void 0?{outcome:"accepted",marked:!1,feedback:[],next:{...c,outcome:"pending"}}:{outcome:"accepted",marked:!0,feedback:_P(r,t.pick),next:ak(r,c,t.pick)}}function _P(e,t){return[{key:t,verdict:t===e.result?"correct":"wrong",...e.options.find(r=>r.key===e.result)?.label?{label:e.options.find(r=>r.key===e.result).label}:{}}]}function ak(e,t,r){let o=r===e.result;return{...t,score:o?yP(e,r):0,finished:!0,outcome:o?"won":"lost"}}function wP(e){let{secret:t,state:r}=e;if(t.result===void 0)return r;let o=Array.isArray(r.progress.picks)?r.progress.picks:[];return o.length===0?{...r,server_time:e.now,finished:!0,outcome:"lost"}:{...ak(t,r,o[0]),server_time:e.now}}function kP(e){return{server_time:e.now,snapshot:"",player_id:e.playerId,round_id:e.roundId,attempts_used:0,attempts_allowed:e.limits.attemptsAllowed,mistakes_used:0,mistakes_allowed:0,progress:{picks:[]},score:0,score_revision:0,finished:!1,outcome:"incomplete"}}var sk,ck=y(()=>{"use strict";sk={archetype:"predict",admissible:vP,mark(e){let t=typeof e.payload.pick=="string"?e.payload.pick:Array.isArray(e.payload.picks)&&typeof e.payload.picks[0]=="string"?e.payload.picks[0]:"";return bP({...e,attempt:{pick:t}})},initialState:kP,settle:wP,auditDetail({secret:e,decision:t,payload:r}){return{predicted:typeof r.pick=="string"?r.pick:null,settled_at_commit:e.result!==void 0,marked:t.marked,options_offered:e.options.length}}}});function xP(e){return lk[Ve(e)]}function uk(e){return xP(e.archetype??"hunt")}function dk(e){return{server_time:"",snapshot:e.snapshot,game:e.game,api_version:"2.0",archetype:e.archetype,marking:e.marking??"at_commit",challenge_source:e.challengeSource??"shared",schedule:{kind:"local_midnight"},updates:{transport:"poll",freshness_seconds:30},display:{title:e.title??e.game},identity:{required:e.identityRequired??!1,provider:"jwt",anonymous_play:!e.identityRequired},archive:!0,capabilities:["plays","profile","leaderboard"]}}var lk,dn,Qa=y(()=>{"use strict";oe();ah();lh();ik();ck();lk={hunt:ih,push:ch,group:ok,predict:sk},dn=Object.keys(lk)});function pk(e){let t=uk(e.round);if(t)return rk({...e,rules:t})}var mk=y(()=>{"use strict";oh();Qa();ah();lh();oh()});function gk(e){let t=2166136261;for(let r=0;r<e.length;r+=1)t^=e.charCodeAt(r),t=t+((t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24))>>>0;return t^=t>>>16,t=Math.imul(t,2246822507)>>>0,t^=t>>>13,t=Math.imul(t,3266489909)>>>0,t^=t>>>16,t>>>0}function SP(e){let t=hk[gk(`a:${e}`)%hk.length],r=fk[gk(`n:${e}`)%fk.length];return`${t} ${r}`}function yk(e,t){return t?.trim()||SP(e)}var hk,fk,vk=y(()=>{"use strict";hk=["Amber","Brave","Bright","Calm","Clever","Copper","Eager","Early","Fleet","Gentle","Golden","Happy","Keen","Kind","Lucky","Merry","Nimble","Noble","Quick","Quiet","Rapid","Ready","Royal","Silver","Steady","Sunny","Swift","Tidy","True","Warm","Wise","Zesty"],fk=["Badger","Beaver","Bison","Falcon","Ferret","Finch","Gibbon","Heron","Ibex","Jaguar","Kestrel","Lemur","Lynx","Marten","Meerkat","Osprey","Otter","Panda","Puffin","Quokka","Rabbit","Raven","Robin","Salmon","Sparrow","Stoat","Tapir","Teal","Vole","Walrus","Weasel","Wombat"]});function bk(e){let t=new Map,r=new Map,o=new Map,n=new Map,i=new Map,a=new Map,s=new Map,c=e.currentRoundId,l,p=e.now??Date.now;for(let d of e.rounds)t.set(d.round.id,d);for(let d of e.states??[])r.set(Re(e.tenant,d.round_id,d.player_id),{state:d,version:0});return{async getRound(d,m){let h=t.get(m);return h?structuredClone(h):void 0},async putRound(d,m,h){t.set(m.round.id,structuredClone(m)),h&&(c=m.round.id,l=void 0)},async setRotation(d,m,h){l={roundIds:[...m],windowSeconds:h}},async getCurrentRound(){let d=l?l.roundIds[Math.floor(p()/1e3/l.windowSeconds)%l.roundIds.length]:c,m=t.get(d);return m?structuredClone(m):void 0},async getState(d,m,h){let f=r.get(Re(d,m,h));return f?structuredClone(f):void 0},async putStateIfVersion(d,m,h){let f=Re(d,m.round_id,m.player_id),w=r.get(f);return h===void 0?w?!1:(r.set(f,{state:structuredClone(m),version:0}),!0):!w||w.version!==h?!1:(r.set(f,{state:structuredClone(m),version:w.version+1}),!0)},async getPlay(d,m,h){let f=o.get(Re(d,m,h));return f?structuredClone(f):void 0},async putPlayIfAbsent(d,m,h,f){let w=Re(d,m,h);return o.has(w)?!1:(o.set(w,structuredClone(f)),!0)},async getLeaderboard(d,m,h){if(e.leaderboard)return structuredClone(e.leaderboard);let f=[...n.entries()].filter(([_])=>_.startsWith(Re(d,m)+"#")).map(([_,A])=>({rank:0,player_id:_.slice(_.lastIndexOf("#")+1),display_name:yk(_.slice(_.lastIndexOf("#")+1)),score:A})).sort((_,A)=>A.score-_.score).map((_,A)=>({..._,rank:A+1})),w=h?.limit??f.length;return{server_time:"",snapshot:"",round_id:m,order:"high_first",tie_break:"earliest_play",entries:f.slice(0,w),total:f.length,truncated:!1,me:h?.viewerId?f.find(_=>_.player_id===h.viewerId):void 0}},async getProfile(d,m){let h=s.get(Re(d,m));return h?structuredClone(h):e.profile?structuredClone(e.profile):{server_time:"",snapshot:"",player_id:m,played:0,won:0,current_streak:0,max_streak:0,distribution:{},constraints:{}}},async countPlay(d,m,h,f){let w=Re(d,m,h,String(qa(f))),_=(i.get(w)??0)+1;return i.set(w,_),{inBucket:_,buckets:qw}},async setFuse(d,m,h){let f=t.get(m);f&&(f.fusedUntil=h)},async setResult(d,m,h){let f=t.get(m);f&&(f.secret.result=h,f.round.challenge={...f.round.challenge,result:h},f.round.can={...f.round.can,accepting_plays:!1,results_available:!0,solution_revealed:!0,closed:!0})},async recordScore(d,m,h,f){n.set(Re(d,m,h),f)},async appendAudit(d){if(a.has(d.id))throw nk("audit_record_overwrite",{tenant:d.tenant,round_id:d.round_id,action:d.action,record_id:d.id}),new Error("audit_record_exists");a.set(d.id,structuredClone(d))},async commitPlay(d){let m=Re(d.tenant,d.playerId,d.idempotencyKey);if(o.has(m))return{ok:!1,reason:"play_exists"};let h=Re(d.tenant,d.state.round_id,d.state.player_id),f=r.get(h);if(d.expectedVersion===void 0){if(f)return{ok:!1,reason:"state_version"}}else if(!f||f.version!==d.expectedVersion)return{ok:!1,reason:"state_version"};for(let w of d.audit)if(a.has(w.id))throw new Error("audit_record_exists");o.set(m,structuredClone(d.play)),r.set(h,{state:structuredClone(d.state),version:d.expectedVersion===void 0?0:d.expectedVersion+1});for(let w of d.audit)a.set(w.id,structuredClone(w));return d.score&&n.set(Re(d.tenant,d.score.roundId,d.playerId),d.score.score),d.profile&&s.set(Re(d.tenant,d.playerId),structuredClone(d.profile)),{ok:!0}}}}var Re,_k=y(()=>{"use strict";vk();Qm();Xa();Re=(...e)=>e.join("#")});function $P(e,t){return{archetype:"hunt",round:{server_time:"",snapshot:t,id:er(e),number:e.number,can:{accepting_plays:e.open,results_available:!1,solution_revealed:!1,closed:!e.open,optimistic_play:!1},challenge_instance_id:null,challenge:{board:e.board,pick:e.required??e.targets.length,prompt:e.prompt}},secret:{targets:e.targets,required:e.required??e.targets.length,pointsPerTarget:e.pointsPerTarget,completionBonus:e.completionBonus},limits:{attemptsAllowed:e.attemptsAllowed,mistakesAllowed:e.mistakesAllowed,...e.playsPerSecond===void 0?{}:{playsPerSecond:e.playsPerSecond}}}}function EP(e,t){return{archetype:"push",round:{server_time:"",snapshot:t,id:er(e),number:e.number,can:{accepting_plays:e.open,results_available:!1,solution_revealed:!1,closed:!e.open,optimistic_play:!1},challenge_instance_id:null,challenge:{prompt:e.prompt,target:e.target,target_label:e.targetLabel,unit:e.unit,picks:e.slates.length,slates:e.slates.map(o=>({id:o.id,label:o.label,entries:o.entries.map(n=>({key:n.key,label:n.label}))})),tiers:e.tiers,floor_label:e.floorLabel,bust_label:e.bustLabel}},secret:{target:e.target,targetLabel:e.targetLabel,slates:e.slates,tiers:e.tiers,floorLabel:e.floorLabel,bustLabel:e.bustLabel},limits:{picksAllowed:e.slates.length,...e.playsPerSecond===void 0?{}:{playsPerSecond:e.playsPerSecond}}}}function TP(e,t){return{archetype:"group",round:{server_time:"",snapshot:t,id:er(e),number:e.number,can:{accepting_plays:e.open,results_available:!1,solution_revealed:!1,closed:!e.open,optimistic_play:!1},challenge_instance_id:null,challenge:{board:e.board,prompt:e.prompt,groups:e.groups.length,group_size:e.groups[0]?.members.length??0}},secret:{groups:e.groups,pointsPerGroup:e.pointsPerGroup,completionBonus:e.completionBonus},limits:{attemptsAllowed:e.attemptsAllowed,mistakesAllowed:e.mistakesAllowed,...e.playsPerSecond===void 0?{}:{playsPerSecond:e.playsPerSecond}}}}function AP(e,t){let r=e.result!==void 0;return{archetype:"predict",round:{server_time:"",snapshot:t,id:er(e),number:e.number,can:{accepting_plays:e.open&&!r,results_available:r,solution_revealed:r,closed:!e.open||r,optimistic_play:!1},challenge_instance_id:null,challenge:{prompt:e.prompt,options:e.options.map(n=>({key:n.key,label:n.label})),...r?{result:e.result}:{}}},secret:{options:e.options,...r?{result:e.result}:{},pointsForCorrect:e.pointsForCorrect},limits:{attemptsAllowed:e.attemptsAllowed,...e.playsPerSecond===void 0?{}:{playsPerSecond:e.playsPerSecond}}}}function IP(e,t){switch(e.archetype){case"hunt":return $P(e,t);case"push":return EP(e,t);case"group":return TP(e,t);case"predict":return AP(e,t)}}function es(e){return e===null||typeof e!="object"?JSON.stringify(e):Array.isArray(e)?`[${e.map(es).join(",")}]`:`{${Object.entries(e).filter(([,r])=>r!==void 0).sort(([r],[o])=>r<o?-1:r>o?1:0).map(([r,o])=>`${JSON.stringify(r)}:${es(o)}`).join(",")}}`}function CP(e,t){let r=o=>{let{server_time:n,snapshot:i,...a}=o,{version:s,...c}=a;return c};return es({round:r(e.round),secret:e.secret,limits:e.limits,archetype:e.archetype})===es({round:r(t.round),secret:t.secret,limits:t.limits,archetype:t.archetype??"hunt"})}async function wk(e,t,r,o,n=!0,i,a){let s=i??er(r),c=await e.getRound(t,s),l=IP(r,o);if(l.round.id=s,a&&(l.round.origin=a),c&&CP(l,c)){let{fusedUntil:m,...h}=c;return await e.putRound(t,{...h,archetype:l.archetype},n),{roundId:s,version:c.round.version,changed:!1,current:n}}let p=c?c.round.version+1:1,d={round:{...l.round,version:p},secret:l.secret,limits:l.limits,archetype:l.archetype};return await e.putRound(t,d,n),await e.appendAudit({id:`round_${s}_v${p}`,at:new Date().toISOString(),tenant:t,round_id:s,player_id:null,action:c?"round.replaced":"round.provisioned",detail:{version:p,snapshot:o,number:r.number,archetype:r.archetype,accepting_plays:r.open}}),{roundId:s,version:p,changed:!0,current:n}}var kk=y(()=>{"use strict";oe()});function jt(e){let t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`^${t.replace(/\\\{[^}]+\\\}/g,"([^/]+)")}$`)}async function Sk(e,t,r,o){let n=e.path.replace(/\/+$/,"")||e.path;if(e.method==="OPTIONS")return{status:204,headers:uh,body:void 0};if(e.method==="GET"&&n===`${za}/health`)return tt(200,{status:"ok"});let i=Lt.session.exec(n);if(i){if(e.method!=="POST")return nt(405,"method_not_allowed","This route accepts POST.");let s=decodeURIComponent(i[1]),c=o?.check(Fm(s,Um(e)));if(c&&!c.allowed)return xk(c.retryAfterSeconds);let l=r?.issue(s);return l?tt(200,{server_time:"",snapshot:"",token:l.token,player_id:l.playerId,kind:"anonymous"}):nt(503,"unavailable","This deployment cannot issue a session.",!0)}let a=[["runtime",Lt.runtime],["currentRound",Lt.currentRound],["plays",Lt.plays],["roundState",Lt.roundState],["profile",Lt.profile],["leaderboard",Lt.leaderboard],["round",Lt.round]];for(let[s,c]of a){let l=c.exec(n);if(!l)continue;let p=decodeURIComponent(l[1]),d=l[2]?decodeURIComponent(l[2]):void 0,m=o?.check(Fm(p,Um(e)));if(m&&!m.allowed)return xk(m.retryAfterSeconds);let h=s==="plays";if(h?e.method!=="POST":e.method!=="GET")return nt(405,"method_not_allowed",`This route accepts ${h?"POST":"GET"}.`);let f;try{f=await t.forPlayer(p,e)}catch(w){return un({path:e.path,method:e.method,game:p,stage:"resolve",name:hr(w)}),nt(503,"unavailable","The Engine is briefly unavailable.",!0)}if(!f)return nt(404,"not_found",`No game with id "${p}".`);try{switch(s){case"runtime":return tt(200,await f.getRuntime());case"currentRound":return tt(200,await f.getCurrentRound());case"round":{let w=await f.getRound(d);return w?tt(200,w):nt(404,"not_found","No such round.")}case"roundState":return tt(200,await f.getRoundState(d));case"profile":return tt(200,await f.getProfile());case"leaderboard":return tt(200,await f.getLeaderboard());case"plays":{let w=Y_.safeParse(e.body);if(!w.success)return nt(422,"invalid_request",w.error.issues.map(R=>`${R.path.join(".")||"body"}: ${R.message}`).join("; "));let _=await f.play(d,w.data),A=tt(200,_);return _.outcome==="busy"&&_.retry_after_seconds&&(A.headers["retry-after"]=String(_.retry_after_seconds)),A}}}catch(w){return w instanceof Error&&w.message==="round_not_found"?nt(404,"not_found","No such round."):(un({path:e.path,method:e.method,game:p,name:hr(w)}),nt(500,"internal","Something went wrong at our end.",!0))}}return PP}var uh,tt,nt,Lt,PP,xk,$k=y(()=>{"use strict";oe();Xa();uh={"access-control-allow-origin":"*","access-control-allow-methods":"GET, POST, OPTIONS","access-control-allow-headers":"authorization, content-type, x-gamestage-player","access-control-max-age":"600"},tt=(e,t)=>({status:e,headers:{"content-type":"application/json",...uh},body:t}),nt=(e,t,r,o=!1)=>tt(e,{error:{code:t,message:r,retryable:o}});Lt={runtime:jt(re.runtime),currentRound:jt(re.currentRound),round:jt(re.round),plays:jt(re.plays),roundState:jt(re.roundState),profile:jt(re.profile),leaderboard:jt(re.leaderboard),session:jt(re.session)},PP=nt(404,"not_found","No such route on the player API."),xk=e=>({status:429,headers:{"content-type":"application/json","retry-after":String(e),...uh},body:{error:{code:"rate_limited",message:"Too many requests for this game from one caller. Slow down.",retryable:!0}}})});function ns(...e){let t=e.reduce((n,{length:i})=>n+i,0),r=new Uint8Array(t),o=0;for(let n of e)r.set(n,o),o+=n.length;return r}function ht(e){let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);if(o>127)throw new TypeError("non-ASCII string encountered in encode()");t[r]=o}return t}var pn,$o,ts,CU,fr=y(()=>{pn=new TextEncoder,$o=new TextDecoder,ts=new TextDecoder("utf-8",{fatal:!0}),CU=2**32});function OP(e,t){if(t&&!e.usages.includes(t))throw new TypeError(`CryptoKey does not support this operation, its usages must include ${t}.`)}function Ek(e,t,r){let o=e.algorithm;if(o.name!==t.name)throw rs(t.name);if(t.hash&&o.hash?.name!==t.hash)throw rs(t.hash,"algorithm.hash");if(t.namedCurve&&o.namedCurve!==t.namedCurve)throw rs(t.namedCurve,"algorithm.namedCurve");if(t.length!==void 0&&o.length!==t.length)throw rs(t.length,"algorithm.length");OP(e,r)}var rs,Tk=y(()=>{rs=(e,t="algorithm.name")=>new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)});function Ak(e,t,...r){if(r=r.filter(Boolean),r.length>2){let o=r.pop();e+=`one of type ${r.join(", ")}, or ${o}.`}else r.length===2?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return t==null?e+=` Received ${t}`:typeof t=="function"&&t.name?e+=` Received function ${t.name}`:typeof t=="object"&&t!=null&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}var Ik,dh,ph=y(()=>{Ik=(e,...t)=>Ak("Key must be ",e,...t),dh=(e,t,...r)=>Ak(`Key for the ${e} algorithm must be `,t,...r)});var he,De,Eo,os,ie,X,zt,To,gr,is,as,ss,ke=y(()=>{he=class extends Error{static code="ERR_JOSE_GENERIC";code="ERR_JOSE_GENERIC";constructor(t,r){super(t,r),this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}},De=class extends he{static code="ERR_JWT_CLAIM_VALIDATION_FAILED";code="ERR_JWT_CLAIM_VALIDATION_FAILED";claim;reason;payload;constructor(t,r,o="unspecified",n="unspecified"){super(t,{cause:{claim:o,reason:n,payload:r}}),this.claim=o,this.reason=n,this.payload=r}},Eo=class extends he{static code="ERR_JWT_EXPIRED";code="ERR_JWT_EXPIRED";claim;reason;payload;constructor(t,r,o="unspecified",n="unspecified"){super(t,{cause:{claim:o,reason:n,payload:r}}),this.claim=o,this.reason=n,this.payload=r}},os=class extends he{static code="ERR_JOSE_ALG_NOT_ALLOWED";code="ERR_JOSE_ALG_NOT_ALLOWED"},ie=class extends he{static code="ERR_JOSE_NOT_SUPPORTED";code="ERR_JOSE_NOT_SUPPORTED"},X=class extends he{static code="ERR_JWS_INVALID";code="ERR_JWS_INVALID"},zt=class extends he{static code="ERR_JWT_INVALID";code="ERR_JWT_INVALID"},To=class extends he{static code="ERR_JWKS_INVALID";code="ERR_JWKS_INVALID"},gr=class extends he{static code="ERR_JWKS_NO_MATCHING_KEY";code="ERR_JWKS_NO_MATCHING_KEY";constructor(t="no applicable key found in the JSON Web Key Set",r){super(t,r)}},is=class extends he{[Symbol.asyncIterator]=async function*(){};static code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";constructor(t="multiple matching keys found in the JSON Web Key Set",r){super(t,r)}},as=class extends he{static code="ERR_JWKS_TIMEOUT";code="ERR_JWKS_TIMEOUT";constructor(t="request timed out",r){super(t,r)}},ss=class extends he{static code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";constructor(t="signature verification failed",r){super(t,r)}}});var yr,mh,hh,fh=y(()=>{yr=e=>{if(e?.[Symbol.toStringTag]==="CryptoKey")return!0;try{return e instanceof CryptoKey}catch{return!1}},mh=e=>e?.[Symbol.toStringTag]==="KeyObject",hh=e=>yr(e)||mh(e)});function gh(e){if(Uint8Array.prototype.toBase64)return e.toBase64();let t=32768,r=[];for(let o=0;o<e.length;o+=t)r.push(String.fromCharCode.apply(null,e.subarray(o,o+t)));return btoa(r.join(""))}function cs(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(e);let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r}var yh=y(()=>{});function Ao(e){if(Uint8Array.fromBase64)try{return Uint8Array.fromBase64(typeof e=="string"?e:$o.decode(e),{alphabet:"base64url"})}catch(r){throw new TypeError("The input to be decoded is not correctly encoded.",{cause:r})}let t=e;if(t instanceof Uint8Array&&(t=$o.decode(t)),t.includes("+")||t.includes("/"))throw new TypeError("The input to be decoded is not correctly encoded.");t=t.replace(/-/g,"+").replace(/_/g,"/");try{return cs(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}}function vr(e){let t=e;return typeof t=="string"&&(t=pn.encode(t)),Uint8Array.prototype.toBase64?t.toBase64({alphabet:"base64url",omitPadding:!0}):gh(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var Io=y(()=>{fr();yh()});function Ze(e){if(!NP(e)||Object.prototype.toString.call(e)!=="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ls(...e){let t=e.filter(Boolean);if(t.length===0||t.length===1)return!0;let r;for(let o of t){let n=Object.keys(o);if(!r||r.size===0){r=new Set(n);continue}for(let i of n){if(r.has(i))return!1;r.add(i)}}return!0}var NP,vh,Ck,Pk,Ok,Mt=y(()=>{NP=e=>typeof e=="object"&&e!==null;vh=e=>Ze(e)&&typeof e.kty=="string",Ck=e=>e.kty!=="oct"&&(e.kty==="AKP"&&typeof e.priv=="string"||typeof e.d=="string"),Pk=e=>e.kty!=="oct"&&e.d===void 0&&e.priv===void 0,Ok=e=>e.kty==="oct"&&typeof e.k=="string"});function bh(e,t){if(e)throw new TypeError(`${t} can only be called once`)}function _h(e,t,r){try{return Ao(e)}catch{throw new r(`Failed to base64url decode the ${t}`)}}function Nk(e,t,r){try{return ht(e)}catch{throw new r(`The ${t} is not a valid base64url string`)}}function Rk(e,t,r){let o;try{o=JSON.parse(ts.decode(Ao(e)))}catch{throw new t(r)}if(!Ze(o))throw new t(r);return o}var wh=y(()=>{Io();fr();Mt()});function jP(e,t){if(!e.kty.includes(t.kty))throw new ie(DP);return e.subtleFor?.({kty:t.kty,crv:t.crv})??e.subtle}async function us(e,t){if(t.kty==="RSA"&&"oth"in t&&t.oth!==void 0)throw new ie('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');let r=jP(e,t),o=!!(t.d||t.priv),n=o?e.usages.private:e.usages.public,i={...t};return i.kty!=="AKP"&&delete i.alg,delete i.use,crypto.subtle.importKey("jwk",i,r,t.ext??!o,t.key_ops??n)}var DP,kh=y(()=>{ke();DP='Invalid or unsupported JWK "alg" (Algorithm) Parameter value'});function MP(e,t,r){return e.symmetric?LP(e,t,r):zP(e,t,r)}function Lk(e,t){return ps||=new WeakMap,ps.get(e)?.[t]}function zk(e,t,r){let o=ps.get(e);return o?o[t]=r:ps.set(e,{[t]:r}),r}async function ms(e,t,r){let o=MP(e,t,r);switch(o.kind){case jk:case Sh:return o.key;case ds:{if(o.key.k)return Ao(o.key.k);if(!Object.isFrozen(o.key)){let{key_ops:n}=o.key;Array.isArray(n)&&Object.freeze(n),Object.freeze(o.key)}return Dk(o.key,o.key,e)}case $h:{let n=o.key;return n.type==="secret"?n.export():"toCryptoKey"in n&&typeof n.toCryptoKey=="function"?FP(n,e):Dk(n,n.export({format:"jwk"}),e)}}}var br,xh,LP,zP,jk,Sh,$h,ds,ps,UP,Dk,FP,Eh=y(()=>{ph();fh();Mt();Io();kh();br=e=>e[Symbol.toStringTag],xh=(e,t,r)=>{let{alg:o}=e;if(t.use!==void 0){let n;switch(r){case"sign":case"verify":n="sig";break;case"encrypt":case"decrypt":n="enc";break}if(t.use!==n)throw new TypeError(`Invalid key for this operation, its "use" must be "${n}" when present`)}if(t.alg!==void 0&&t.alg!==o)throw new TypeError(`Invalid key for this operation, its "alg" must be "${o}" when present`);if(Array.isArray(t.key_ops)){let n=r==="encrypt"||r==="decrypt"?e.keyOps?.[r]:r;if(n&&t.key_ops?.includes?.(n)===!1)throw new TypeError(`Invalid key for this operation, its "key_ops" must include "${n}" when present`)}return!0},LP=(e,t,r)=>{let{alg:o}=e;if(t instanceof Uint8Array)return{kind:jk,key:t};if(vh(t)){if(Ok(t)&&xh(e,t,r))return{kind:ds,key:t};throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!hh(t))throw new TypeError(dh(o,t,"CryptoKey","KeyObject","JSON Web Key","Uint8Array"));if(t.type!=="secret")throw new TypeError(`${br(t)} instances for symmetric algorithms must be of type "secret"`);return yr(t)?{kind:Sh,key:t}:{kind:$h,key:t}},zP=(e,t,r)=>{let{alg:o}=e;if(vh(t))switch(r){case"decrypt":case"sign":if(Ck(t)&&xh(e,t,r))return{kind:ds,key:t};throw new TypeError("JSON Web Key for this operation must be a private JWK");case"encrypt":case"verify":if(Pk(t)&&xh(e,t,r))return{kind:ds,key:t};throw new TypeError("JSON Web Key for this operation must be a public JWK")}if(!hh(t))throw new TypeError(dh(o,t,"CryptoKey","KeyObject","JSON Web Key"));if(t.type==="secret")throw new TypeError(`${br(t)} instances for asymmetric algorithms must not be of type "secret"`);if(t.type==="public")switch(r){case"sign":throw new TypeError(`${br(t)} instances for asymmetric algorithm signing must be of type "private"`);case"decrypt":throw new TypeError(`${br(t)} instances for asymmetric algorithm decryption must be of type "private"`)}if(t.type==="private")switch(r){case"verify":throw new TypeError(`${br(t)} instances for asymmetric algorithm verifying must be of type "public"`);case"encrypt":throw new TypeError(`${br(t)} instances for asymmetric algorithm encryption must be of type "public"`)}return yr(t)?{kind:Sh,key:t}:{kind:$h,key:t}},jk=Symbol(),Sh=Symbol(),$h=Symbol(),ds=Symbol();UP={__proto__:null,prime256v1:"P-256",secp384r1:"P-384",secp521r1:"P-521"};Dk=async(e,t,r)=>{let o=Lk(e,r.alg);if(o)return o;let n=await us(r,{...t,alg:r.alg});return zk(e,r.alg,n)},FP=(e,t)=>{let r=Lk(e,t.alg);if(r)return r;let o=e.type==="public",n=o?t.usages.public:t.usages.private,{asymmetricKeyType:i}=e,a=UP[e.asymmetricKeyDetails?.namedCurve],s=t.subtleFor?.({crv:a,asymmetricKeyType:i})??t.subtle;return zk(e,t.alg,e.toCryptoKey(s,o,n))}});function Co(e){let t={__proto__:null};for(let r of Object.keys(e))t[r]={...e[r],alg:r};return t}var Th=y(()=>{});function hs(e){return{kty:["RSA"],subtle:{name:"RSA-OAEP",hash:`SHA-${e}`},usages:GP,minModulusLength:2048,keyOps:{encrypt:"wrapKey",decrypt:"unwrapKey"}}}function fs(e){return{kty:["EC","OKP"],subtle:{name:"ECDH"},subtleFor:({kty:t,crv:r,asymmetricKeyType:o})=>{if(r==="X25519"||o==="x25519")return{name:"X25519"};if(t==="OKP")throw new ie('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');return{name:"ECDH",namedCurve:r}},usages:BP,kwBits:e,keyOps:{decrypt:"deriveBits"}}}function Ah(e){return{kty:["oct"],symmetric:!0,subtle:{name:"AES-KW",length:e},usages:gs,keyOps:{encrypt:"wrapKey",decrypt:"unwrapKey"}}}function Ih(e){return{kty:["oct"],symmetric:!0,subtle:{name:"AES-GCM",length:e},usages:gs,gcmkw:`A${e}GCM`,keyOps:{encrypt:"encrypt",decrypt:"decrypt"}}}function Ch(e,t){return{kty:["oct"],symmetric:!0,subtle:{name:"PBKDF2"},usages:gs,pbes2Hash:`SHA-${e}`,kwBits:t,keyOps:{encrypt:"deriveBits",decrypt:"deriveBits"}}}function Ph(e){return{kty:["oct"],symmetric:!0,subtle:{name:"AES-GCM",length:e},usages:Mk,keyOps:Uk,cekBits:e,ivBits:96,cbc:!1}}function Oh(e){return{kty:["oct"],symmetric:!0,subtle:{name:"AES-CBC",length:e},usages:Mk,keyOps:Uk,cekBits:e,ivBits:128,cbc:!0}}function Fk(e){return ZP[e]}var GP,BP,gs,ZP,Mk,Uk,e4,Gk=y(()=>{ke();Th();GP={public:["encrypt","wrapKey"],private:["decrypt","unwrapKey"]},BP={public:[],private:["deriveBits"]},gs={public:[],private:[]};ZP=Co({dir:{kty:["oct"],symmetric:!0,subtle:{name:"AES-GCM"},usages:gs,keyOps:{encrypt:"encrypt",decrypt:"decrypt"}},"RSA-OAEP":hs(1),"RSA-OAEP-256":hs(256),"RSA-OAEP-384":hs(384),"RSA-OAEP-512":hs(512),"ECDH-ES":fs(),"ECDH-ES+A128KW":fs(128),"ECDH-ES+A192KW":fs(192),"ECDH-ES+A256KW":fs(256),A128KW:Ah(128),A192KW:Ah(192),A256KW:Ah(256),A128GCMKW:Ih(128),A192GCMKW:Ih(192),A256GCMKW:Ih(256),"PBES2-HS256+A128KW":Ch(256,128),"PBES2-HS384+A192KW":Ch(384,192),"PBES2-HS512+A256KW":Ch(512,256)}),Mk={public:[],private:[]},Uk={encrypt:"encrypt",decrypt:"decrypt"};e4=Co({A128GCM:Ph(128),A192GCM:Ph(192),A256GCM:Ph(256),"A128CBC-HS256":Oh(256),"A192CBC-HS384":Oh(384),"A256CBC-HS512":Oh(512)})});function KP(e,t){let{modulusLength:r}=t.algorithm;if(typeof r!="number"||r<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}function WP(e,t,r){Ek(t,e.subtle,r),e.minModulusLength&&KP(e.alg,t)}async function Bk(e,t,r){return t instanceof Uint8Array?crypto.subtle.importKey("raw",t,e.subtle,!1,[r]):(WP(e,t,r),t)}async function Zk(e,t,r){let o=await Bk(e,t,"sign"),n=await crypto.subtle.sign(e.operation,o,r);return new Uint8Array(n)}async function Kk(e,t,r,o){let n=await Bk(e,t,"verify");try{return await crypto.subtle.verify(e.operation,n,r,o)}catch{return!1}}var Nh=y(()=>{Tk()});function Wk(e,t){if(t!==void 0&&(!Array.isArray(t)||t.some(r=>typeof r!="string")))throw new TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)}function Vk(e,t){let{crit:r}=t??{};if(Array.isArray(r)&&new Set(r).size!==r.length)throw new e('"crit" (Critical) Header Parameter MUST NOT contain duplicate values')}function vs(e,t,r,o,n){if(n.crit!==void 0&&o?.crit===void 0)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!o||o.crit===void 0)return new Set;if(!Array.isArray(o.crit)||o.crit.length===0||o.crit.some(a=>typeof a!="string"||a.length===0))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let i;r!==void 0?i=new Map([...Object.entries(r),...t.entries()]):i=t;for(let a of o.crit){if(!i.has(a))throw new ie(`Extension Header Parameter "${a}" is not recognized`);if(n[a]===void 0)throw new e(`Extension Header Parameter "${a}" is missing`);if(i.get(a)&&o[a]===void 0)throw new e(`Extension Header Parameter "${a}" MUST be integrity protected`)}return new Set(o.crit)}var ys,Rh=y(()=>{ke();ys=new Map([["b64",!0]])});function Dh(e){let t={name:"HMAC",hash:`SHA-${e}`};return{kty:["oct"],symmetric:!0,subtle:t,operation:t,usages:Po}}function _r(e,t,r){let o={name:e,hash:`SHA-${t}`};return{kty:["RSA"],subtle:o,operation:r?{...o,saltLength:r}:o,usages:Po,minModulusLength:2048}}function jh(e,t){return{kty:["EC"],crv:e,subtle:{name:"ECDSA",namedCurve:e},operation:{name:"ECDSA",hash:`SHA-${t}`},usages:Po}}function Hk(){let e={name:"Ed25519"};return{kty:["OKP"],crv:"Ed25519",subtle:e,operation:e,usages:Po}}function Lh(e){let t={name:e};return{kty:["AKP"],subtle:t,operation:t,usages:Po}}function bs(e){let t=Jk[e];if(!t)throw new ie(`alg ${e} is not supported either by JOSE or your javascript runtime`);return t}function _s(e){return Jk[e]}var Po,Jk,Oo=y(()=>{ke();Th();Po={public:["verify"],private:["sign"]};Jk=Co({HS256:Dh(256),HS384:Dh(384),HS512:Dh(512),RS256:_r("RSASSA-PKCS1-v1_5",256),RS384:_r("RSASSA-PKCS1-v1_5",384),RS512:_r("RSASSA-PKCS1-v1_5",512),PS256:_r("RSA-PSS",256,32),PS384:_r("RSA-PSS",384,48),PS512:_r("RSA-PSS",512,64),ES256:jh("P-256",256),ES384:jh("P-384",384),ES512:jh("P-521",512),EdDSA:Hk(),Ed25519:Hk(),"ML-DSA-44":Lh("ML-DSA-44"),"ML-DSA-65":Lh("ML-DSA-65"),"ML-DSA-87":Lh("ML-DSA-87")})});function Yk(e){return{algorithms:e&&Wk("algorithms",e.algorithms),crit:e?.crit}}async function VP(e,t,r){let o={};e.protected&&(o=Rk(e.protected,X,"JWS Protected Header is invalid"));let n;if(e.header!==void 0){if(!ls(o,e.header))throw new X("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");n={...o,...e.header}}else n=o;let i=vs(X,ys,t.crit,o,n),a=!0;if(i.has("b64")&&(a=o.b64,typeof a!="boolean"))throw new X('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:s}=n;if(typeof s!="string"||!s)throw new X('JWS "alg" (Algorithm) Header Parameter missing or invalid');if(t.algorithms&&!t.algorithms.has(s))throw new os('"alg" (Algorithm) Header Parameter value not allowed');if(a){if(typeof e.payload!="string")throw new X("JWS Payload must be a string")}else if(typeof e.payload!="string"&&!(e.payload instanceof Uint8Array))throw new X("JWS Payload must be a string or an Uint8Array instance");let c=!1;typeof r=="function"&&(r=await r(o,e),c=!0);let l=bs(s),p=ns(e.protected!==void 0?ht(e.protected):new Uint8Array,ht("."),typeof e.payload=="string"?a?t.b64p??=Nk(e.payload,"payload",X):pn.encode(e.payload):e.payload),d=_h(e.signature,"signature",X),m=await ms(l,r,"verify");if(!await Kk(l,m,d,p))throw new ss;let f;return a?f=_h(e.payload,"payload",X):typeof e.payload=="string"?f=pn.encode(e.payload):f=e.payload,{payload:f,parsedProt:o,b64:a,key:m,resolvedKey:c}}async function qk(e,t,r){if(e instanceof Uint8Array&&(e=$o.decode(e)),typeof e!="string")throw new X("Compact JWS must be a string or Uint8Array");let{0:o,1:n,2:i,length:a}=e.split(".");if(a!==3)throw new X("Invalid Compact JWS");return VP({payload:n,protected:o,signature:i},t,r)}var Xk=y(()=>{Nh();Oo();ke();fr();wh();Mt();Rh();Eh()});function No(e){let t=YP.exec(e);if(!t||t[4]&&t[1])throw new TypeError("Invalid time period format");let r=parseFloat(t[2]),o=t[3].toLowerCase(),n;switch(o){case"sec":case"secs":case"second":case"seconds":case"s":n=Math.round(r);break;case"minute":case"minutes":case"min":case"mins":case"m":n=Math.round(r*ex);break;case"hour":case"hours":case"hr":case"hrs":case"h":n=Math.round(r*tx);break;case"day":case"days":case"d":n=Math.round(r*zh);break;case"week":case"weeks":case"w":n=Math.round(r*HP);break;default:n=Math.round(r*JP);break}return t[1]==="-"||t[4]==="ago"?-n:n}function ft(e,t){if(!Number.isFinite(t))throw new TypeError(`Invalid ${e} input`);return t}function nx(e,t,r={}){let o;try{o=JSON.parse(ts.decode(t))}catch{}if(!Ze(o))throw new zt("JWT Claims Set must be a top-level JSON object");let{typ:n}=r;if(n&&(typeof e.typ!="string"||Qk(e.typ)!==Qk(n)))throw new De('unexpected "typ" JWT header value',o,"typ","check_failed");let{requiredClaims:i=[],issuer:a,subject:s,audience:c,maxTokenAge:l}=r,p=[...i];l!==void 0&&p.push("iat"),c!==void 0&&p.push("aud"),s!==void 0&&p.push("sub"),a!==void 0&&p.push("iss");for(let f of new Set(p.reverse()))if(!(f in o))throw new De(`missing required "${f}" claim`,o,f,"missing");if(a!==void 0&&!(Array.isArray(a)?a:[a]).includes(o.iss))throw new De('unexpected "iss" claim value',o,"iss","check_failed");if(s!==void 0&&o.sub!==s)throw new De('unexpected "sub" claim value',o,"sub","check_failed");if(c!==void 0&&!qP(o.aud,typeof c=="string"?[c]:c))throw new De('unexpected "aud" claim value',o,"aud","check_failed");let d;switch(typeof r.clockTolerance){case"string":d=No(r.clockTolerance);break;case"number":d=r.clockTolerance;break;case"undefined":d=0;break;default:throw new TypeError("Invalid clockTolerance option type")}ft("clockTolerance option",d);let{currentDate:m}=r,h=ft("currentDate option",Ut(m||new Date));if((o.iat!==void 0||l!==void 0)&&typeof o.iat!="number")throw new De('"iat" claim must be a number',o,"iat","invalid");if(o.nbf!==void 0){if(typeof o.nbf!="number")throw new De('"nbf" claim must be a number',o,"nbf","invalid");if(o.nbf>h+d)throw new De('"nbf" claim timestamp check failed',o,"nbf","check_failed")}if(o.exp!==void 0){if(typeof o.exp!="number")throw new De('"exp" claim must be a number',o,"exp","invalid");if(o.exp<=h-d)throw new Eo('"exp" claim timestamp check failed',o,"exp","check_failed")}if(l!==void 0){let f=h-o.iat,w=typeof l=="number"?l:No(l);if(f-d>w)throw new Eo('"iat" claim timestamp check failed (too far in the past)',o,"iat","check_failed");if(f<0-d)throw new De('"iat" claim timestamp check failed (it should be in the past)',o,"iat","check_failed")}return o}var Ut,ex,tx,zh,HP,JP,YP,Qk,qP,ws,Mh=y(()=>{ke();fr();Mt();Ut=e=>Math.floor(e.getTime()/1e3),ex=60,tx=ex*60,zh=tx*24,HP=zh*7,JP=zh*365.25,YP=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;Qk=e=>e.includes("/")?e.toLowerCase():`application/${e.toLowerCase()}`,qP=(e,t)=>typeof e=="string"?t.includes(e):Array.isArray(e)?t.some(Set.prototype.has.bind(new Set(e))):!1;ws=class{#e;constructor(t){if(!Ze(t))throw new TypeError("JWT Claims Set MUST be an object");this.#e=structuredClone(t)}data(){return pn.encode(JSON.stringify(this.#e))}get iss(){return this.#e.iss}set iss(t){this.#e.iss=t}get sub(){return this.#e.sub}set sub(t){this.#e.sub=t}get aud(){return this.#e.aud}set aud(t){this.#e.aud=t}set jti(t){this.#e.jti=t}set nbf(t){typeof t=="number"?this.#e.nbf=ft("setNotBefore",t):t instanceof Date?this.#e.nbf=ft("setNotBefore",Ut(t)):this.#e.nbf=Ut(new Date)+No(t)}set exp(t){typeof t=="number"?this.#e.exp=ft("setExpirationTime",t):t instanceof Date?this.#e.exp=ft("setExpirationTime",Ut(t)):this.#e.exp=Ut(new Date)+No(t)}set iat(t){t===void 0?this.#e.iat=Ut(new Date):t instanceof Date?this.#e.iat=ft("setIssuedAt",Ut(t)):typeof t=="string"?this.#e.iat=ft("setIssuedAt",Ut(new Date)+No(t)):this.#e.iat=ft("setIssuedAt",t)}}});async function Uh(e,t,r){let o=await qk(e,Yk(r),t);if(!o.b64)throw new zt("JWTs MUST NOT use unencoded payload");let i={payload:nx(o.parsedProt,o.payload,r),protectedHeader:o.parsedProt};return typeof t=="function"?{...i,key:o.key}:i}var rx=y(()=>{Xk();Mh();ke()});function ks(e){return e?.b64===!1&&Array.isArray(e.crit)&&e.crit.includes("b64")}async function ox(e,t){let{protectedHeader:r,unprotectedHeader:o}=e;if(!ls(r,o))throw new X("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let n={...r,...o};Vk(X,r);let i=vs(X,ys,e.crit,r,n),a=!0;if(i.has("b64")&&(a=r.b64,typeof a!="boolean"))throw new X('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:s}=n;if(typeof s!="string"||!s)throw new X('JWS "alg" (Algorithm) Header Parameter missing or invalid');let c=bs(s),l,p;if(a){let A=e.encoded??={};A.b64??=vr(e.payload),A.raw??=ht(A.b64),l=A.b64,p=A.raw}else p=e.payload,l="";let d,m;r?(d=vr(JSON.stringify(r)),m=ht(d)):(d="",m=new Uint8Array);let h=ns(m,ht("."),p),f=await ms(c,t,"sign"),w=await Zk(c,f,h),_={signature:vr(w),payload:l};return r&&(_.protected=d),_}var xs=y(()=>{Io();Nh();Oo();Mt();ke();fr();Rh();Eh()});var Ss,ix=y(()=>{ke();xs();wh();Ss=class{#e;#t;#n;constructor(t){if(!(t instanceof Uint8Array))throw new TypeError("payload must be an instance of Uint8Array");this.#e=t}setProtectedHeader(t){return bh(this.#t,"setProtectedHeader"),this.#t=t,this}setUnprotectedHeader(t){return bh(this.#n,"setUnprotectedHeader"),this.#n=t,this}async sign(t,r){if(!this.#t&&!this.#n)throw new X("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");let o=await ox({payload:this.#e,protectedHeader:this.#t,unprotectedHeader:this.#n,crit:r?.crit},t);return this.#n&&(o.header=this.#n),o}}});var $s,ax=y(()=>{ix();xs();$s=class{#e;#t;constructor(t){this.#e=new Ss(t)}setProtectedHeader(t){return this.#e.setProtectedHeader(t),this.#t=t,this}async sign(t,r){if(ks(this.#t))throw new TypeError("use the flattened module for creating JWS with b64: false");let o=await this.#e.sign(t,r);return`${o.protected}.${o.payload}.${o.signature}`}}});var Ro,sx=y(()=>{ax();xs();ke();Mh();Ro=class{#e;#t;constructor(t={}){this.#t=new ws(t)}setIssuer(t){return this.#t.iss=t,this}setSubject(t){return this.#t.sub=t,this}setAudience(t){return this.#t.aud=t,this}setJti(t){return this.#t.jti=t,this}setNotBefore(t){return this.#t.nbf=t,this}setExpirationTime(t){return this.#t.exp=t,this}setIssuedAt(t){return this.#t.iat=t,this}setProtectedHeader(t){return this.#e=t,this}async sign(t,r){let o=new $s(this.#t.data());if(o.setProtectedHeader(this.#e),ks(this.#e))throw new zt("JWTs MUST NOT use unencoded payload");return o.sign(t,r)}}});function cx(){return new ie('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}function lx(e){if(typeof e!="string")throw cx();let t=_s(e)??Fk(e);if(!t)throw cx();return t}var ux=y(()=>{ke();Oo();Gk()});function eO(e){jo(e,48,"Invalid PKCS#8 structure"),Do(e),jo(e,2,"Expected version field");let t=Do(e);e.pos+=t,jo(e,48,"Expected algorithm identifier");let r=Do(e);return{algIdStart:e.pos,algIdLength:r}}var Fh,XP,Gh,Do,jo,dx,QP,tO,nO,rO,px,mx=y(()=>{yh();ke();ux();Fh=(e,t)=>{if(e.byteLength!==t.length)return!1;for(let r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0},XP=e=>({data:e,pos:0}),Gh=e=>{let t=e.data[e.pos++];if(t===void 0)throw new Error("Unexpected end of ASN.1 input");return t},Do=e=>{let t=Gh(e);if(t&128){let r=t&127,o=0;for(let n=0;n<r;n++)o=o<<8|Gh(e);return o}return t},jo=(e,t,r)=>{if(Gh(e)!==t)throw new Error(r)},dx=(e,t)=>{if(t<0||e.pos+t>e.data.length)throw new Error("Unexpected end of ASN.1 input");let r=e.data.subarray(e.pos,e.pos+t);return e.pos+=t,r},QP=e=>{jo(e,6,"Expected algorithm OID");let t=Do(e);return dx(e,t)};tO=e=>{let t=QP(e);if(Fh(t,[43,101,110]))return"X25519";if(!Fh(t,[42,134,72,206,61,2,1]))throw new Error("Unsupported key algorithm");jo(e,6,"Expected curve OID");let r=Do(e),o=dx(e,r);for(let{name:n,oid:i}of[{name:"P-256",oid:[42,134,72,206,61,3,1,7]},{name:"P-384",oid:[43,129,4,0,34]},{name:"P-521",oid:[43,129,4,0,35]}])if(Fh(o,i))return n;throw new Error("Unsupported named curve")},nO=async(e,t,r,o)=>{let n=lx(r);if(n.symmetric)throw new ie('Invalid or unsupported "alg" (Algorithm) value');let i=e==="spki",a;if(n.subtleFor)try{a=n.subtleFor({crv:o.getNamedCurve(t)})}catch{throw new ie("Invalid or unsupported key format")}else a=n.subtle;return crypto.subtle.importKey(e,t,a,o?.extractable??!!i,i?n.usages.public:n.usages.private)},rO=(e,t)=>cs(e.replace(t,"")),px=(e,t,r)=>{let o=rO(e,/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g),n=r;return t?.startsWith?.("ECDH-ES")&&(n||={},n.getNamedCurve=i=>{let a=XP(i);return eO(a),tO(a)}),nO("pkcs8",o,t,n)}});function oO(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}async function iO(e){if(mh(e))if(e.type==="secret")e=e.export();else return e.export({format:"jwk"});if(e instanceof Uint8Array)return{kty:"oct",k:vr(e)};if(!yr(e))throw new TypeError(Ik(e,"CryptoKey","KeyObject","Uint8Array"));if(!e.extractable)throw new TypeError("non-extractable CryptoKey cannot be exported as a JWK");let{ext:t,key_ops:r,alg:o,use:n,...i}=oO(await crypto.subtle.exportKey("jwk",e));return i.kty==="AKP"&&(i.alg=o),i}async function Bh(e){return iO(e)}var hx=y(()=>{ph();Io();fh()});function aO(e){let t=typeof e=="string"?_s(e):void 0;if(!t||t.symmetric)throw new ie('Unsupported "alg" value for a JSON Web Key Set');return t}function sO(e){if(!e||typeof e!="object")return!1;let{keys:t}=e;return Array.isArray(t)&&t.every(cO)}function cO(e){return Ze(e)}async function fx(e,t,r){let o=e.get(t)||e.set(t,{}).get(t);if(o[r.alg]===void 0){let n=await us(r,{...t,alg:r.alg,ext:!0});if(n.type!=="public")throw new To("JSON Web Key Set members must be public keys");o[r.alg]=n}return o[r.alg]}function Kh(e){let t=new Zh(e),r=async(o,n)=>t.getKey(o,n);return Object.defineProperties(r,{jwks:{value:()=>structuredClone(t.jwks()),enumerable:!1,configurable:!1,writable:!1}}),r}var Zh,gx=y(()=>{kh();Oo();ke();Mt();Zh=class{#e;#t=new WeakMap;constructor(t){if(!sO(t))throw new To("JSON Web Key Set malformed");this.#e=structuredClone(t)}jwks(){return this.#e}async getKey(t,r){let{alg:o,kid:n}={...t,...r?.header},i=aO(o),a=this.#e.keys.filter(l=>{let p=i.kty.includes(l.kty);return p&&typeof n=="string"&&(p=n===l.kid),p&&(typeof l.alg=="string"||l.kty==="AKP")&&(p=o===l.alg),p&&typeof l.use=="string"&&(p=l.use==="sig"),p&&Array.isArray(l.key_ops)&&(p=l.key_ops.includes("verify")),p&&i.crv&&(p=l.crv===i.crv),p}),{0:s,length:c}=a;if(c===0)throw new gr;if(c!==1){let l=new is,p=this.#t;throw l[Symbol.asyncIterator]=async function*(){for(let d of a)try{yield await fx(p,d,i)}catch{}},l}return fx(this.#t,s,i)}}});function lO(){return typeof WebSocketPair<"u"||typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"||typeof EdgeRuntime<"u"&&EdgeRuntime==="vercel"}async function uO(e,t,r,o=fetch){let n=await o(e,{method:"GET",signal:r,redirect:"manual",headers:t}).catch(i=>{throw i.name==="TimeoutError"?new as:i});if(n.status!==200)throw new he("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await n.json()}catch{throw new he("Failed to parse the JSON Web Key Set HTTP response as JSON")}}function dO(e,t){return!(typeof e!="object"||e===null||!("uat"in e)||typeof e.uat!="number"||Date.now()-e.uat>=t||!("jwks"in e)||!Ze(e.jwks)||!Array.isArray(e.jwks.keys)||!Array.prototype.every.call(e.jwks.keys,Ze))}function Hh(e,t){let r=new Vh(e,t),o=async(n,i)=>r.getKey(n,i);return Object.defineProperties(o,{coolingDown:{get:()=>r.coolingDown(),enumerable:!0,configurable:!1},fresh:{get:()=>r.fresh(),enumerable:!0,configurable:!1},reload:{value:()=>r.reload(),enumerable:!0,configurable:!1,writable:!1},reloading:{get:()=>r.pendingFetch(),enumerable:!0,configurable:!1},jwks:{value:()=>r.jwks(),enumerable:!0,configurable:!1,writable:!1}}),o}var Wh,yx,Es,Vh,vx=y(()=>{ke();gx();Mt();(typeof navigator>"u"||!navigator.userAgent?.startsWith?.("Mozilla/5.0 "))&&(Wh="jose/v6.2.5");yx=Symbol();Es=Symbol();Vh=class{#e;#t;#n;#c;#i;#r;#o;#l;#a;#s;constructor(t,r){if(!(t instanceof URL))throw new TypeError("url must be an instance of URL");this.#e=new URL(t.href),this.#t=typeof r?.timeoutDuration=="number"?r?.timeoutDuration:5e3,this.#n=typeof r?.cooldownDuration=="number"?r?.cooldownDuration:3e4,this.#c=typeof r?.cacheMaxAge=="number"?r?.cacheMaxAge:6e5,this.#o=new Headers(r?.headers),Wh&&!this.#o.has("User-Agent")&&this.#o.set("User-Agent",Wh),this.#o.has("accept")||(this.#o.set("accept","application/json"),this.#o.append("accept","application/jwk-set+json")),this.#l=r?.[yx],r?.[Es]!==void 0&&(this.#s=r?.[Es],dO(r?.[Es],this.#c)&&(this.#i=this.#s.uat,this.#a=Kh(this.#s.jwks)))}pendingFetch(){return!!this.#r}coolingDown(){return typeof this.#i=="number"?Date.now()<this.#i+this.#n:!1}fresh(){return typeof this.#i=="number"?Date.now()<this.#i+this.#c:!1}jwks(){return this.#a?.jwks()}async getKey(t,r){(!this.#a||!this.fresh())&&await this.reload();try{return await this.#a(t,r)}catch(o){if(o instanceof gr&&this.coolingDown()===!1)return await this.reload(),this.#a(t,r);throw o}}async reload(){this.#r&&lO()&&(this.#r=void 0),this.#r||=uO(this.#e.href,this.#o,AbortSignal.timeout(this.#t),this.#l).then(t=>{this.#a=Kh(t),this.#s&&(this.#s.uat=Date.now(),this.#s.jwks=t),this.#i=Date.now(),this.#r=void 0}).catch(t=>{throw this.#r=void 0,t}),await this.#r}}});async function Jh(e,t,r){if(typeof e!="string"||e.indexOf("-----BEGIN PRIVATE KEY-----")!==0)throw new TypeError('"pkcs8" must be PKCS#8 formatted string');return px(e,t,r)}var bx=y(()=>{mx()});var Yh=y(()=>{rx();sx();vx();hx();bx()});function pO(e){let t=_x.get(e);return t||(t=Hh(new URL(e)),_x.set(e,t)),t}function wx(e){let t;return{lastRefusal:()=>t,async resolve(r){t=void 0;try{let{payload:o}=await Uh(r,pO(e.jwksUri),{issuer:e.issuer,...e.audience?{audience:e.audience}:{}}),n=typeof o.sub=="string"?o.sub:"";if(!n){t="token_malformed";return}let i=typeof o.name=="string"?o.name:typeof o.preferred_username=="string"?o.preferred_username:void 0;return{playerId:`${mO}${n}`,...i?{alias:i}:{}}}catch(o){let n=o?.code;t=n==="ERR_JWT_EXPIRED"?"token_expired":n==="ERR_JWS_INVALID"||n==="ERR_JWT_INVALID"?"token_malformed":"token_untrusted";return}}}}var _x,mO,kx=y(()=>{"use strict";Yh();_x=new Map;mO="id:"});import{createPublicKey as hO,generateKeyPairSync as fO}from"node:crypto";async function qh(e){let t=e.replace(/\/+$/,""),r=t,o=`${t}${Ts}`,{privateKey:n,publicKey:i}=fO("rsa",{modulusLength:2048,privateKeyEncoding:{type:"pkcs8",format:"pem"},publicKeyEncoding:{type:"spki",format:"pem"}}),a=await Jh(n,"RS256"),s=await Bh(hO(i)),c="gamestage-dev",l={keys:[{...s,kid:c,alg:"RS256",use:"sig"}]};return{issuer:r,jwksUri:o,jwks:l,resolver:wx({issuer:r,jwksUri:o}),async mint(p,d={}){let m=Math.floor(Date.now()/1e3);return new Ro({name:p}).setProtectedHeader({alg:"RS256",kid:c}).setIssuer(r).setSubject(p).setIssuedAt(m).setExpirationTime(m+(d.expiresInSeconds??3600)).sign(a)}}}var Ts,Xh=y(()=>{"use strict";Yh();kx();Ts="/.well-known/jwks.json"});import{createServer as gO}from"node:http";import{randomBytes as yO}from"node:crypto";async function bO(e){let t=bk({tenant:e.game,rounds:[],currentRoundId:""});await wk(t,e.game,e.round,"local",!0,void 0,{source:"manifest"});let r=dk({game:e.game,archetype:e.round.archetype,snapshot:"local",title:e.title,identityRequired:e.identityRequired});return{async forPlayer(o,n){if(o===e.game)return pk({tenant:e.game,playerId:n.playerId??So(void 0),identityRefusal:n.identityRefusal,runtime:r,store:t,now:e.now,round:{archetype:e.round.archetype}})}}}async function _O(e){let t=[];for await(let r of e)t.push(Buffer.from(r));if(t.length!==0)try{return JSON.parse(Buffer.concat(t).toString("utf8"))}catch{return}}async function As(e){let t=await bO(e),r=yO(32).toString("base64"),o={issue:()=>ek(r)},n=e.devIdentity,i=gO((a,s)=>{(async()=>{let c=new URL(a.url??"/","http://localhost");if(n&&c.pathname===Ts){let m=JSON.stringify(n.jwks);s.writeHead(200,{"content-type":"application/jwk-set+json; charset=utf-8","access-control-allow-origin":"*","content-length":Buffer.byteLength(m)}),s.end(m);return}if(e.clientBundle&&a.method==="GET"&&/^\/(client\/[^/]+\/)?gamestage\.js$/.test(c.pathname)){let m=e.clientBundle;s.writeHead(200,{"content-type":"text/javascript; charset=utf-8","cache-control":"no-store","access-control-allow-origin":"*","content-length":Buffer.byteLength(m)}),s.end(m);return}let l=a.headers[vO],p=a.headers.authorization,d=await Sk({method:a.method??"GET",path:c.pathname,body:await _O(a),...(({playerId:m,refused:h})=>({playerId:m,identityRefusal:h}))(await Xw({token:p?.replace(/^Bearer\s+/i,"")||void 0,anonymousId:Array.isArray(l)?l[0]:l,sessionSecret:r,resolver:n?.resolver}))},t,o);s.writeHead(d.status,d.headers),s.end(d.body===void 0?void 0:JSON.stringify(d.body))})().catch(()=>{s.headersSent?s.destroy():(s.writeHead(500,{"content-type":"application/json"}),s.end(JSON.stringify({error:{code:"internal",message:"The local Engine failed.",retryable:!0}})))})});return i.attachDevIdentity=a=>{n=a},i}var vO,Qh=y(()=>{"use strict";mk();Qa();_k();kk();$k();nh();Xh();Xh();Qa();vO="x-gamestage-player"});import{spawn as wO}from"node:child_process";import{createHash as kO,randomBytes as Sx}from"node:crypto";import{constants as xO}from"node:fs";import{access as SO,mkdtemp as $O,rm as $x}from"node:fs/promises";import{request as EO}from"node:http";import{homedir as Is,tmpdir as TO}from"node:os";import{join as Lo}from"node:path";function ef(e,t={}){let r=Buffer.isBuffer(e)?e:Buffer.from(e),o=t.maskingKey??Sx(4);if(o.length!==4)throw new Error("A WebSocket masking key must be four bytes.");let n=r.length<126?0:r.length<=65535?2:8,i=Buffer.alloc(2+n+4+r.length);i[0]=(t.fin===!1?0:128)|(t.opcode??1),i[1]=128|(n===0?r.length:n===2?126:127);let a=2;n===2?(i.writeUInt16BE(r.length,a),a+=2):n===8&&(i.writeBigUInt64BE(BigInt(r.length),a),a+=8),o.copy(i,a),a+=4;for(let s=0;s<r.length;s++)i[a+s]=r[s]^o[s%4];return i}async function af(e={}){let r=[(e.env??process.env).GAMESTAGE_CHROME,...e.locations??IO].filter(s=>!!s),o;for(let s of[...new Set(r)])try{await SO(s,xO.X_OK),o=s;break}catch{}if(!o)return{status:"skipped",detail:"No supported browser found. Install Chrome, Chromium, Brave or Edge, or set GAMESTAGE_CHROME to its executable path, then run verify again."};let n=await $O(Lo(TO(),"gamestage-chrome-")),i=wO(o,["--headless=new","--remote-debugging-port=0","--no-first-run","--no-default-browser-check",`--user-data-dir=${n}`,"about:blank"],{stdio:["ignore","ignore","pipe"]}),a;try{a=await PO(await CO(i,1e4));let{targetId:s}=await a.send("Target.createTarget",{url:"about:blank"}),{sessionId:c}=await a.send("Target.attachToTarget",{targetId:s,flatten:!0});return{status:"available",browser:await of.create(a,c,i,n)}}catch(s){throw a?.close(),await Ex(i),await $x(n,{recursive:!0,force:!0}),s}}function CO(e,t){return new Promise((r,o)=>{let n="",i=p=>{clearTimeout(l),e.stderr?.off("data",a),e.off("error",s),e.off("close",c),p()},a=p=>{n=(n+p.toString("utf8")).slice(-4e3);let d=n.match(/DevTools listening on (ws:\/\/\S+)/);d&&i(()=>r(d[1]))},s=p=>i(()=>o(p)),c=p=>i(()=>o(new Error(`Chrome exited before DevTools was ready${p===null?"":` (code ${p})`}.`)));e.stderr?.on("data",a),e.on("error",s),e.on("close",c);let l=setTimeout(()=>i(()=>o(new Error("Chrome did not open DevTools within 10000ms."))),t)})}function PO(e){return new Promise((t,r)=>{let o=new URL(e),n=Sx(16).toString("base64"),i=kO("sha1").update(n+AO).digest("base64"),a=EO({hostname:o.hostname,port:o.port,path:`${o.pathname}${o.search}`,headers:{Connection:"Upgrade",Upgrade:"websocket","Sec-WebSocket-Version":"13","Sec-WebSocket-Key":n}});a.on("upgrade",(s,c,l)=>{s.headers["sec-websocket-accept"]!==i?(c.destroy(),r(new Error("Chrome returned an invalid WebSocket handshake."))):t(new rf(c,l))}),a.on("response",s=>{s.resume(),r(new Error(`Chrome refused the WebSocket upgrade with status ${s.statusCode}.`))}),a.on("error",r),a.end()})}async function Ex(e){e.exitCode===null&&(e.kill("SIGTERM"),!await xx(e,1e3)&&(e.kill("SIGKILL"),await xx(e,1e3)))}function xx(e,t){return e.exitCode!==null?Promise.resolve(!0):new Promise(r=>{let o=a=>{clearTimeout(i),e.off("close",n),r(a)},n=()=>o(!0);e.once("close",n);let i=setTimeout(()=>o(!1),t)})}function tf(e){return new Promise(t=>setTimeout(t,e))}var AO,nf,rf,of,IO,Tx=y(()=>{"use strict";AO="258EAFA5-E914-47DA-95CA-C5AB0DC85B11";nf=class{buffered=Buffer.alloc(0);fragments=[];fragmentedOpcode;push(t){this.buffered=this.buffered.length?Buffer.concat([this.buffered,t]):Buffer.from(t);let r=[];for(;this.buffered.length>=2;){let o=this.buffered[0],n=this.buffered[1],i=(o&128)!==0,a=o&15,s=(n&128)!==0,c=n&127,l=2;if(c===126){if(this.buffered.length<l+2)break;c=this.buffered.readUInt16BE(l),l+=2}else if(c===127){if(this.buffered.length<l+8)break;let m=this.buffered.readBigUInt64BE(l);if(m>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("WebSocket frame is too large to decode safely.");c=Number(m),l+=8}let p=l;if(s&&(l+=4),this.buffered.length<l+c)break;let d=Buffer.from(this.buffered.subarray(l,l+c));if(s)for(let m=0;m<d.length;m++)d[m]^=this.buffered[p+m%4];if(this.buffered=this.buffered.subarray(l+c),a===8||a===9||a===10)r.push({opcode:a,payload:d});else if(a===1){if(this.fragmentedOpcode!==void 0)throw new Error("A new WebSocket message arrived before its continuation finished.");i?r.push({opcode:a,payload:d}):(this.fragmentedOpcode=a,this.fragments=[d])}else if(a===0){if(this.fragmentedOpcode===void 0)throw new Error("A WebSocket continuation arrived without a first frame.");this.fragments.push(d),i&&(r.push({opcode:this.fragmentedOpcode,payload:Buffer.concat(this.fragments)}),this.fragmentedOpcode=void 0,this.fragments=[])}else throw new Error(`Unsupported WebSocket opcode ${a}.`)}return r}},rf=class{constructor(t,r){this.socket=t;t.on("data",o=>this.receive(o)),t.on("error",o=>this.fail(o)),t.on("close",()=>this.fail(new Error("Chrome closed the DevTools connection."))),r.length&&this.receive(r)}socket;decoder=new nf;pending=new Map;listeners=new Map;nextId=1;ended=!1;send(t,r={},o){if(this.ended)return Promise.reject(new Error("Chrome's DevTools connection is closed."));let n=this.nextId++;return new Promise((i,a)=>{this.pending.set(n,{resolve:s=>i(s),reject:a}),this.socket.write(ef(JSON.stringify({id:n,method:t,params:r,...o?{sessionId:o}:{}})),s=>{s&&(this.pending.delete(n),a(s))})})}on(t,r,o){let n=`${o??""}:${t}`,i=this.listeners.get(n)??new Set;return i.add(r),this.listeners.set(n,i),()=>i.delete(r)}close(){this.ended||(this.ended=!0,this.socket.end(ef(Buffer.alloc(0),{opcode:8})),this.rejectPending(new Error("Chrome's DevTools connection was closed.")))}receive(t){try{for(let r of this.decoder.push(t)){if(r.opcode===8){this.ended=!0,this.socket.end(),this.rejectPending(new Error("Chrome closed the DevTools connection."));continue}if(r.opcode===9){this.socket.write(ef(r.payload,{opcode:10}));continue}if(r.opcode===10)continue;let o=JSON.parse(r.payload.toString("utf8"));if(o.id!==void 0){let n=this.pending.get(o.id);if(!n)continue;this.pending.delete(o.id),o.error?n.reject(new Error(o.error.message??"Chrome rejected a CDP command.")):n.resolve(o.result)}else if(o.method){let n=`${o.sessionId??""}:${o.method}`;for(let i of this.listeners.get(n)??[])i(o.params??{})}}}catch(r){this.fail(r instanceof Error?r:new Error("Could not read Chrome's response."))}}fail(t){this.ended||(this.ended=!0,this.socket.destroy(),this.rejectPending(t))}rejectPending(t){for(let r of this.pending.values())r.reject(t);this.pending.clear()}},of=class e{constructor(t,r,o,n){this.cdp=t;this.sessionId=r;this.child=o;this.profile=n;this.on("Runtime.exceptionThrown",a=>{let s=a.exceptionDetails,c=s?.exception?.description??s?.text??"Unknown page error";this.pageErrors.push(c.split(`
8102
+ `+e.slice(a+1):c+=e.slice(n),c.slice(1)}function W0(e){for(var t="",r=0,o,n=0;n<e.length;r>=65536?n+=2:n++)r=ko(e,n),o=ge[r],!o&&Eo(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=o||D0(r);return t}function Z0(e,t,r){var o="",n=e.tag,i,a,s;for(i=0,a=r.length;i<a;i+=1)s=r[i],e.replacer&&(s=e.replacer.call(r,String(i),s)),(yt(e,t,s,!1,!1)||typeof s>"u"&&yt(e,t,null,!1,!1))&&(o!==""&&(o+=","+(e.condenseFlow?"":" ")),o+=e.dump);e.tag=n,e.dump="["+o+"]"}function b_(e,t,r,o){var n="",i=e.tag,a,s,c;for(a=0,s=r.length;a<s;a+=1)c=r[a],e.replacer&&(c=e.replacer.call(r,String(a),c)),(yt(e,t+1,c,!0,!0,!1,!0)||typeof c>"u"&&yt(e,t+1,null,!0,!0,!1,!0))&&((!o||n!=="")&&(n+=Em(e,t)),e.dump&&So===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=i,e.dump=n||"[]"}function K0(e,t,r){var o="",n=e.tag,i=Object.keys(r),a,s,c,d,u;for(a=0,s=i.length;a<s;a+=1)u="",o!==""&&(u+=", "),e.condenseFlow&&(u+='"'),c=i[a],d=r[c],e.replacer&&(d=e.replacer.call(r,c,d)),yt(e,t,c,!1,!1)&&(e.dump.length>1024&&(u+="? "),u+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),yt(e,t,d,!1,!1)&&(u+=e.dump,o+=u));e.tag=n,e.dump="{"+o+"}"}function V0(e,t,r,o){var n="",i=e.tag,a=Object.keys(r),s,c,d,u,p,m;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new Se("sortKeys must be a boolean or a function");for(s=0,c=a.length;s<c;s+=1)m="",(!o||n!=="")&&(m+=Em(e,t)),d=a[s],u=r[d],e.replacer&&(u=e.replacer.call(r,d,u)),yt(e,t+1,d,!0,!0,!0)&&(p=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,p&&(e.dump&&So===e.dump.charCodeAt(0)?m+="?":m+="? "),m+=e.dump,p&&(m+=Em(e,t)),yt(e,t+1,u,!0,p)&&(e.dump&&So===e.dump.charCodeAt(0)?m+=":":m+=": ",m+=e.dump,n+=m));e.tag=i,e.dump=n||"{}"}function __(e,t,r){var o,n,i,a,s,c;for(n=r?e.explicitTypes:e.implicitTypes,i=0,a=n.length;i<a;i+=1)if(s=n[i],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof t=="object"&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(r?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag="?",s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,X_.call(s.represent)==="[object Function]")o=s.represent(t,c);else if(Q_.call(s.represent,c))o=s.represent[c](t,c);else throw new Se("!<"+s.tag+'> tag resolver accepts not "'+c+'" style');e.dump=o}return!0}return!1}function yt(e,t,r,o,n,i,a){e.tag=null,e.dump=r,__(e,r,!1)||__(e,r,!0);var s=X_.call(e.dump),c=o,d;o&&(o=e.flowLevel<0||e.flowLevel>t);var u=s==="[object Object]"||s==="[object Array]",p,m;if(u&&(p=e.duplicates.indexOf(r),m=p!==-1),(e.tag!==null&&e.tag!=="?"||m||e.indent!==2&&t>0)&&(n=!1),m&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(u&&m&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),s==="[object Object]")o&&Object.keys(e.dump).length!==0?(V0(e,t,e.dump,n),m&&(e.dump="&ref_"+p+e.dump)):(K0(e,t,e.dump),m&&(e.dump="&ref_"+p+" "+e.dump));else if(s==="[object Array]")o&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?b_(e,t-1,e.dump,n):b_(e,t,e.dump,n),m&&(e.dump="&ref_"+p+e.dump)):(Z0(e,t,e.dump),m&&(e.dump="&ref_"+p+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&G0(e,e.dump,t,i,c);else{if(s==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Se("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(d=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",e.dump=d+" "+e.dump)}return!0}function H0(e,t){var r=[],o=[],n,i;for(Am(e,r,o),n=0,i=o.length;n<i;n+=1)t.duplicates.push(r[o[n]]);t.usedDuplicates=new Array(i)}function Am(e,t,r){var o,n,i;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,i=e.length;n<i;n+=1)Am(e[n],t,r);else for(o=Object.keys(e),n=0,i=o.length;n<i;n+=1)Am(e[o[n]],t,r)}function J0(e,t){t=t||{};var r=new L0(t);r.noRefs||H0(e,r);var o=e;return r.replacer&&(o=r.replacer.call({"":o},"",o)),yt(r,0,o,!0,!0)?r.dump+`
8103
+ `:""}function Rm(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var XA,QA,eI,tI,nI,rI,se,Se,iI,aI,sI,he,x_,S_,$_,E_,T_,A_,I_,C_,xI,EI,P_,O_,N_,R_,D_,j_,L_,Im,M_,LI,MI,z_,FI,U_,WI,F_,Cm,Gt,za,G_,B_,Ua,xm,VI,s_,HI,JI,YI,W_,Z_,V_,H_,pn,d_,h0,f0,q_,X_,Q_,Nm,g0,So,y0,v0,b0,_0,$m,w0,k0,x0,S0,ew,$0,Ga,E0,T0,A0,I0,tw,nw,C0,rw,P0,ow,ge,O0,N0,j0,$o,aw,Tm,sw,cw,lr,Y0,q0,X0,Q0,eC,tC,nC,rC,Dm,oC,iC,aC,sC,cC,lC,dC,jm,Lm=v(()=>{XA=w_,QA=VA,eI=HA,tI=YA,nI=qA,rI=JA,se={isNothing:XA,isObject:QA,toArray:eI,repeat:tI,isNegativeZero:nI,extend:rI};xo.prototype=Object.create(Error.prototype);xo.prototype.constructor=xo;xo.prototype.toString=function(t){return this.name+": "+k_(this,t)};Se=xo;iI=oI,aI=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],sI=["scalar","sequence","mapping"];he=lI;Sm.prototype.extend=function(t){var r=[],o=[];if(t instanceof he)o.push(t);else if(Array.isArray(t))o=o.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(o=o.concat(t.explicit));else throw new Se("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(i){if(!(i instanceof he))throw new Se("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(i.loadKind&&i.loadKind!=="scalar")throw new Se("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(i.multi)throw new Se("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),o.forEach(function(i){if(!(i instanceof he))throw new Se("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(Sm.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(o),n.compiledImplicit=a_(n,"implicit"),n.compiledExplicit=a_(n,"explicit"),n.compiledTypeMap=dI(n.compiledImplicit,n.compiledExplicit),n};x_=Sm,S_=new he("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),$_=new he("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),E_=new he("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),T_=new x_({explicit:[S_,$_,E_]});A_=new he("tag:yaml.org,2002:null",{kind:"scalar",resolve:uI,construct:pI,predicate:mI,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});I_=new he("tag:yaml.org,2002:bool",{kind:"scalar",resolve:hI,construct:fI,predicate:gI,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});C_=new he("tag:yaml.org,2002:int",{kind:"scalar",resolve:_I,construct:wI,predicate:kI,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),xI=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");EI=/^[-+]?[0-9]+e/;P_=new he("tag:yaml.org,2002:float",{kind:"scalar",resolve:SI,construct:$I,predicate:AI,represent:TI,defaultStyle:"lowercase"}),O_=T_.extend({implicit:[A_,I_,C_,P_]}),N_=O_,R_=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),D_=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");j_=new he("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:II,construct:CI,instanceOf:Date,represent:PI});L_=new he("tag:yaml.org,2002:merge",{kind:"scalar",resolve:OI}),Im=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
8104
+ \r`;M_=new he("tag:yaml.org,2002:binary",{kind:"scalar",resolve:NI,construct:RI,predicate:jI,represent:DI}),LI=Object.prototype.hasOwnProperty,MI=Object.prototype.toString;z_=new he("tag:yaml.org,2002:omap",{kind:"sequence",resolve:zI,construct:UI}),FI=Object.prototype.toString;U_=new he("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:GI,construct:BI}),WI=Object.prototype.hasOwnProperty;F_=new he("tag:yaml.org,2002:set",{kind:"mapping",resolve:ZI,construct:KI}),Cm=N_.extend({implicit:[j_,L_],explicit:[M_,z_,U_,F_]}),Gt=Object.prototype.hasOwnProperty,za=1,G_=2,B_=3,Ua=4,xm=1,VI=2,s_=3,HI=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,JI=/[\x85\u2028\u2029]/,YI=/[,\[\]\{\}]/,W_=/^(?:!|!!|![a-z\-]+!)$/i,Z_=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;V_=new Array(256),H_=new Array(256);for(pn=0;pn<256;pn++)V_[pn]=l_(pn)?1:0,H_[pn]=l_(pn);d_={YAML:function(t,r,o){var n,i,a;t.version!==null&&z(t,"duplication of %YAML directive"),o.length!==1&&z(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(o[0]),n===null&&z(t,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),a=parseInt(n[2],10),i!==1&&z(t,"unacceptable YAML version of the document"),t.version=o[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&Fa(t,"unsupported YAML version of the document")},TAG:function(t,r,o){var n,i;o.length!==2&&z(t,"TAG directive accepts exactly two arguments"),n=o[0],i=o[1],W_.test(n)||z(t,"ill-formed tag handle (first argument) of the TAG directive"),Gt.call(t.tagMap,n)&&z(t,'there is a previously declared suffix for "'+n+'" tag handle'),Z_.test(i)||z(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch{z(t,"tag prefix is malformed: "+i)}t.tagMap[n]=i}};h0=p0,f0=m0,q_={loadAll:h0,load:f0},X_=Object.prototype.toString,Q_=Object.prototype.hasOwnProperty,Nm=65279,g0=9,So=10,y0=13,v0=32,b0=33,_0=34,$m=35,w0=37,k0=38,x0=39,S0=42,ew=44,$0=45,Ga=58,E0=61,T0=62,A0=63,I0=64,tw=91,nw=93,C0=96,rw=123,P0=124,ow=125,ge={};ge[0]="\\0";ge[7]="\\a";ge[8]="\\b";ge[9]="\\t";ge[10]="\\n";ge[11]="\\v";ge[12]="\\f";ge[13]="\\r";ge[27]="\\e";ge[34]='\\"';ge[92]="\\\\";ge[133]="\\N";ge[160]="\\_";ge[8232]="\\L";ge[8233]="\\P";O0=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],N0=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;j0=1,$o=2;aw=1,Tm=2,sw=3,cw=4,lr=5;Y0=J0,q0={dump:Y0};X0=he,Q0=x_,eC=T_,tC=O_,nC=N_,rC=Cm,Dm=q_.load,oC=q_.loadAll,iC=q0.dump,aC=Se,sC={binary:M_,float:P_,map:E_,null:A_,pairs:U_,set:F_,timestamp:j_,bool:I_,int:C_,merge:L_,omap:z_,seq:$_,str:S_},cC=Rm("safeLoad","load"),lC=Rm("safeLoadAll","loadAll"),dC=Rm("safeDump","dump"),jm={Type:X0,Schema:Q0,FAILSAFE_SCHEMA:eC,JSON_SCHEMA:tC,CORE_SCHEMA:nC,DEFAULT_SCHEMA:rC,load:Dm,loadAll:oC,dump:iC,YAMLException:aC,types:sC,safeLoad:cC,safeLoadAll:lC,safeDump:dC}});function ce(e){let t;try{t=jm.load(e)}catch(n){return{ok:!1,issues:[{path:"(document)",message:n instanceof Error?n.message:"YAML parse failed"}]}}if(t===null||typeof t!="object")return{ok:!1,issues:[{path:"(document)",message:"Manifest must be a YAML mapping"}]};let r=Ut.safeParse(t);if(!r.success)return{ok:!1,issues:uC(r.error)};let o=r_(r.data);return o.length?{ok:!1,issues:o}:{ok:!0,manifest:r.data}}function uC(e){return e.issues.map(t=>({path:t.path.length?t.path.join("."):"(root)",message:t.message}))}function To(e){return jm.dump(e,{indent:2,lineWidth:100,noRefs:!0,sortKeys:!1})}function Za(e,t){return Ut.parse({manifest:{schema_version:wo,revision:0,conformance:"L0"},app:{id:e,title:t,status:"proposed"}})}var Mm=v(()=>{"use strict";Lm();un()});function lw(e,t){let r=e.backend.archetype;if(!r)throw new Error("registerInputFromManifest needs backend.archetype. Run registrationProblems first.");return{id:e.app.id,name:e.app.title,archetype:r,repository:e.app.source?.repository??null,manifestRevision:String(e.manifest.revision),contentHash:t,conformance:je(e).computed,offersPrize:e.operations.promotion.offers_prize,containerLabel:e.experience.container_label,sections:cr.map(o=>({section:o,status:e[o].status}))}}function dw(e,t){let r=[];return t&&e.app.id!==t&&r.push(`This manifest is for the game "${e.app.id}", and you are editing "${t}". A manifest cannot change which game it belongs to: set app.id to "${t}", or register "${e.app.id}" as its own game.`),e.backend.archetype||r.push("This manifest declares no backend.archetype, so there is nothing to register. The control plane keys a game on its archetype and a game without one could never be deployed against."),r}var uw=v(()=>{"use strict";_m();Mm();un()});var re,Ka,pw=v(()=>{"use strict";re={runtime:"/play/v1/games/{game}/runtime",currentRound:"/play/v1/games/{game}/rounds/current",rounds:"/play/v1/games/{game}/rounds",roundsMine:"/play/v1/games/{game}/rounds/mine",nextRound:"/play/v1/games/{game}/rounds/next",round:"/play/v1/games/{game}/rounds/{round}",plays:"/play/v1/games/{game}/rounds/{round}/plays",session:"/play/v1/games/{game}/session",roundState:"/play/v1/games/{game}/rounds/{round}/players/me",profile:"/play/v1/games/{game}/players/me/profile",leaderboard:"/play/v1/games/{game}/leaderboard"},Ka="/play"});function Va(e,t){let r=t==="won"?e.current_streak+1:t==="lost"||t==="partial"?0:e.current_streak;return{...e,played:e.played+1,won:e.won+(t==="won"?1:0),current_streak:r,max_streak:Math.max(e.max_streak,r)}}var mw,lt,pC,mC,hC,IM,fw,fC,gC,CM,yC,PM,OM,NM,gw,vC,bC,RM,_C,wC,DM,hw,jM,LM,zm=v(()=>{"use strict";qe();un();La();pw();mw="2.0",lt=l.object({server_time:l.string(),snapshot:l.string()}),pC=l.enum(["at_commit","at_settlement"]),mC=l.enum(["shared","per_player","feed"]),hC=l.object({kind:l.enum(["fixed","local_midnight","feed","continuous"]),timezone:l.string().optional()}),IM=lt.extend({game:l.string(),api_version:l.literal(mw).default(mw),archetype:zt,marking:pC,challenge_source:mC,schedule:hC,updates:l.object({transport:l.enum(["poll","socket"]),freshness_seconds:l.number().int().positive()}),display:l.record(l.string(),l.unknown()).default({}),identity:l.object({required:l.boolean(),provider:l.string(),anonymous_play:l.boolean().default(!1)}),archive:l.boolean().default(!1),capabilities:l.array(l.string()).default([])}),fw=l.object({accepting_plays:l.boolean(),results_available:l.boolean(),solution_revealed:l.boolean(),closed:l.boolean(),optimistic_play:l.boolean().default(!1)}),fC=lt.extend({id:l.string(),number:l.number().int().positive().optional(),origin:_o.optional(),version:l.number().int().nonnegative(),can:fw,opens_at:l.string().optional(),locks_at:l.string().optional(),timer_seconds:l.number().int().positive().optional(),challenge_instance_id:l.string().nullable().default(null),challenge:l.record(l.string(),l.unknown()).default({}),solution:l.record(l.string(),l.unknown()).optional()}),gC=l.object({id:l.string(),number:l.number().int().positive().optional(),version:l.number().int().nonnegative(),can:fw,opens_at:l.string().optional(),locks_at:l.string().optional(),current:l.boolean().default(!1)}),CM=lt.extend({rounds:l.array(gC)}),yC=l.object({round_id:l.string(),finished:l.boolean(),score:l.number(),outcome:l.enum(["won","lost","partial","incomplete","pending"]).optional()}),PM=lt.extend({player_id:l.string(),played:l.array(yC)}),OM=lt.extend({status:l.enum(["ready","exhausted"]),round:fC.optional()}),NM=lt.extend({token:l.string(),player_id:l.string(),kind:l.literal("anonymous")}),gw=l.object({idempotency_key:l.string().min(8),round_version:l.number().int().nonnegative(),challenge_instance_id:l.string().nullable().default(null),payload:l.record(l.string(),l.unknown())}),vC=l.enum(["accepted","rejected","duplicate","stale","busy"]),bC=l.object({key:l.string(),verdict:l.enum(["correct","close","wrong","higher","lower","unknown"]),label:l.string().optional()}),RM=lt.extend({play_id:l.string(),outcome:vC,reason:l.string().optional(),round_version:l.number().int().nonnegative(),retry_after_seconds:l.number().int().positive().optional(),marked:l.boolean().default(!0),feedback:l.array(bC).default([]),round_state:l.lazy(()=>wC).optional()}),_C=l.object({title:l.string(),grid:l.array(l.string()).default([]),text:l.string().optional()}),wC=lt.extend({player_id:l.string(),round_id:l.string(),started_at:l.string().optional(),attempts_used:l.number().int().nonnegative().default(0),attempts_allowed:l.number().int().nonnegative().optional(),mistakes_used:l.number().int().nonnegative().default(0),mistakes_allowed:l.number().int().nonnegative().optional(),progress:l.record(l.string(),l.unknown()).default({}),score:l.number().default(0),score_revision:l.number().int().nonnegative().default(0),finished:l.boolean().default(!1),outcome:l.enum(["won","lost","partial","incomplete","pending"]).optional(),share:_C.optional()}),DM=lt.extend({player_id:l.string(),display_name:l.string().optional(),played:l.number().int().nonnegative().default(0),won:l.number().int().nonnegative().default(0),current_streak:l.number().int().nonnegative().default(0),max_streak:l.number().int().nonnegative().default(0),distribution:l.record(l.string(),l.number()).default({}),constraints:l.record(l.string(),l.unknown()).default({})});hw=l.object({rank:l.number().int().positive(),player_id:l.string(),display_name:l.string().optional(),score:l.number()}),jM=lt.extend({round_id:l.string().optional(),order:l.enum(["high_first","low_first"]).default("high_first"),tie_break:l.enum(["earliest_play","fewest_attempts","none"]).default("none"),entries:l.array(hw).default([]),total:l.number().int().nonnegative().default(0),truncated:l.boolean().default(!1),me:hw.optional()}),LM=l.object({error:l.object({code:l.string(),message:l.string(),retryable:l.boolean()})})});function bw(e,t=new Date){let r=typeof t=="string"?Date.parse(t):t.getTime(),o,n=Number.NEGATIVE_INFINITY;for(let i of e.rounds){let a=Date.parse(i.locksAt);Number.isNaN(a)||a>n&&(n=a,o=i)}return o?n>r?{state:"live",round:o}:{state:"stale",round:o,lockedForMs:r-n}:{state:"none"}}function _w(e){if(e.state!=="stale")return null;let t=Math.floor(e.lockedForMs/36e5),r=t<1?`${Math.max(1,Math.floor(e.lockedForMs/6e4))} minutes`:t<48?`${t} hours`:`${Math.floor(t/24)} days`;return`The round this game is serving, ${e.round.label}, locked ${r} ago and nothing has replaced it. Fans are playing a closed round. Run \`gamestage deploy\` or refresh the round to move it on.`}function Ha(e){let t=kw.safeParse(e.access);return t.success?t.data:"pending"}function xw(e){let t=n=>typeof n=="string"&&n.trim()?n:null,r=e.decision??null,o=r?t(r.state):null;return{workspaceId:t(e.workspaceId)??"unknown",name:t(e.name),ownerEmail:t(e.ownerEmail)??"",company:t(e.company),intent:t(e.intent),signals:t(e.signals),registeredAt:t(e.registeredAt)??"",decision:o==="approved"||o==="refused"?{state:o,at:t(r.at)??t(e.registeredAt)??"",by:t(r.by)??"unknown",reason:t(r.reason)}:null}}function Sw(e){return{waiting:e.filter(t=>!t.decision).sort((t,r)=>t.registeredAt.localeCompare(r.registeredAt)),decided:e.filter(t=>t.decision).sort((t,r)=>r.decision.at.localeCompare(t.decision.at))}}function Ew(e){return e.filter(t=>t.limit>0&&t.used>=t.limit)}function Tw(e){return e.limit<=0?0:Math.min(1,e.used/e.limit)}var kC,xC,yw,SC,$C,EC,TC,vw,AC,IC,ww,CC,PC,OC,kw,WM,ZM,NC,KM,VM,HM,JM,YM,RC,qM,$w,XM,DC,Ja=v(()=>{"use strict";qe();un();Rr();ft();kC=l.enum(["draft","live","sleeping","throttled","expired","archived"]),xC=l.enum(["scheduled","open","locked","settled"]),yw=l.object({id:l.string(),label:l.string(),used:l.number(),limit:l.number(),unit:l.string()}),SC=l.object({date:l.string(),plays:l.number(),players:l.number()}),$C=l.object({id:l.string(),label:l.string(),state:xC,opensAt:l.string(),locksAt:l.string(),settledAt:l.string().nullable(),plays:l.number()}),EC=l.object({id:l.string(),name:l.string(),enabled:l.boolean(),consentRequired:l.boolean(),note:l.string()}),TC=l.object({number:l.number().int().positive(),title:l.string(),openedAt:l.string(),labels:l.array(l.string()).default([]),fromGame:l.boolean().default(!1)}),vw=l.object({at:l.string(),level:l.enum(["info","warn","error"]),roundId:l.string().nullable(),message:l.string(),dataset:l.string().optional()}),AC=l.enum(["absent","pending","ready","failed"]),IC=l.object({state:AC.default("absent"),url:l.string().nullable().default(null),regenerations:l.number().int().nonnegative().default(0),updatedAt:l.string().nullable().default(null),onProject:l.string().nullable().default(null)});ww=l.object({section:l.string(),status:ym}),CC=l.object({id:l.string(),name:l.string(),containerLabel:l.string().min(1).default(An),repository:l.string().nullable(),openIssues:l.number().int().nonnegative(),issues:l.array(TC).default([]),archetype:zt,offersPrize:l.boolean().default(!1),state:kC,archivePrefix:l.string().nullable().default(null),space:l.string().nullable().default(null).optional(),platformProject:l.string().nullable().default(null).optional(),platformEvent:l.string().nullable().default(null).optional(),platformElement:l.string().nullable().default(null).optional(),studioUrl:l.string().nullable().default(null).optional(),appSpec:l.object({version:l.string(),shape:l.string(),resource:l.string().nullable().default(null),specUrl:l.string().optional(),wording:l.array(l.string()).optional(),refusal:l.object({at:l.string(),reason:l.string()}).nullable().default(null).optional()}).nullable().default(null).optional(),art:IC.prefault({}).optional(),playgroundUrl:l.string().nullable(),playerEndpoint:l.string().nullable(),manifestRevision:l.string(),conformance:Mt,contentHash:l.string(),referenceDigest:l.string().optional(),referenceName:l.string().optional(),sections:l.array(ww),meters:l.array(yw),history:l.array(SC),rounds:l.array($C),destinations:l.array(EC),logs:l.array(vw),updatedAt:l.string()}),PC=l.object({login:l.string(),linkedAt:l.string()}),OC=l.object({enabled:l.boolean().default(!1),applicationId:l.string().nullable().default(null),writeKey:l.string().nullable().default(null)}),kw=l.enum(["pending","approved","refused"]),WM=l.enum(["manual","automatic"]);ZM=l.enum(["approved","refused"]);NC=l.object({id:l.string(),name:l.string(),tier:bm,ownerEmail:l.string(),access:kw.default("pending"),liveGameAllowance:l.number(),supplierGrants:l.array(l.string()).default([]),github:PC.nullable().default(null),signal:OC.prefault({}),meters:l.array(yw),games:l.array(CC)}),KM=NC.extend({gamesTotal:l.number().int().nonnegative(),archivedTotal:l.number().int().nonnegative().default(0)}),VM=l.object({player:l.string().nullable(),control:l.string().nullable(),playground:l.string().nullable()}),HM=l.object({id:l.string(),name:l.string(),archetype:zt,repository:l.string().nullable().default(null),manifestRevision:l.string(),contentHash:l.string(),conformance:Mt,offersPrize:l.boolean().default(!1),sections:l.array(ww).default([]),containerLabel:l.string().min(1).optional()}),JM=l.object({uploadUrl:l.string(),publicUrl:l.string(),key:l.string(),expiresInSeconds:l.number().int().positive(),playerApiOrigin:l.string()}),YM=l.object({manifestRevision:l.string(),contentHash:l.string(),conformance:Mt,offersPrize:l.boolean().default(!1),round:Be.optional(),wording:l.array(l.string()).optional()}),RC=l.object({limit:l.coerce.number().int().positive().max(1e3).default(100),since:l.string().nullable().default(null),level:vw.shape.level.nullable().default(null)}),qM=l.enum(["access_pending","github_not_linked","live_allowance_reached","meter_breached","nothing_to_do","tier_required","game_archived","art_limit_reached","art_unavailable","round_source_unreadable","round_not_seeded","delete_refused"]),$w=l.enum(["workspace.created","workspace.approved","workspace.refused","github.linked","github.unlinked","game.registered","game.deployed","game.deploy_refused","round.provisioned","round.provision_failed","round.seeded","game.platform_provisioned","game.platform_provision_failed","game.app_spec_refused","art.requested","art.generated","art.failed","art.published","game.woken","game.suspended","game.throttled","game.approaching_fair_use","game.archived","game.deleted","game.deleted","workspace.plan_changed","destination.changed","signal.enabled","signal.disabled"]),XM=l.object({id:l.string(),at:l.string(),action:$w,actor:l.object({kind:l.enum(["creator","operator","system"]),id:l.string(),email:l.string().nullable().default(null)}),gameId:l.string().nullable().default(null),correlationId:l.string(),detail:l.record(l.string(),l.unknown()).default({})}),DC=l.object({limit:l.coerce.number().int().positive().max(1e3).default(100),action:$w.nullable().default(null),actorId:l.string().nullable().default(null),gameId:l.string().nullable().default(null),from:l.string().nullable().default(null),to:l.string().nullable().default(null)})});var hn=v(()=>{"use strict"});function zC(e){return`slate-${e+1}`}function Cw(e){return{archetype:"push",theme:e.theme??"",prompt:e.prompt??"",target:e.target,targetLabel:e.targetLabel??"",unit:e.unit??"",slates:e.slates.map((t,r)=>({id:zC(r),label:t.label??"",entries:t.entries.map(o=>({key:o.key,label:o.label??""}))}))}}var LC,MC,Iw,mr=v(()=>{"use strict";qe();hn();LC=l.object({key:l.string().min(1),label:l.string().default(""),note:l.string().optional()}),MC=l.object({id:l.string().min(1),label:l.string().default(""),entries:l.array(LC).min(1)}),Iw=l.object({archetype:l.literal("push"),theme:l.string().default(""),prompt:l.string().default(""),target:l.number().int().positive(),targetLabel:l.string().default(""),unit:l.string().max(4).default(""),slates:l.array(MC).min(1)})});var u2,qa=v(()=>{"use strict";qe();ft();mr();hn();u2=l.discriminatedUnion("archetype",[Iw,fm,gm])});var Xa=v(()=>{"use strict"});var Um=v(()=>{"use strict";Tt();mr();qa();Xa()});import{createHash as UC}from"node:crypto";function GC(e){return UC("sha256").update(e).digest("hex").slice(0,16)}function Qa(e){return GC(e)}var FC,Bt,fn=v(()=>{"use strict";qe();hn();ft();FC=l.object({key:l.string().min(1),label:l.string().default(""),values:l.record(l.string(),l.number().int().nonnegative())}),Bt=l.object({corpus:l.literal("1"),measures:l.array(FC).min(1)}).superRefine((e,t)=>{let r=e.measures.map(o=>o.key);new Set(r).size!==r.length&&t.addIssue({code:"custom",path:["measures"],message:"Two measures share a key. A round names the measure it is counted on."})})});var BC,Pw,WC,O2,Ow,N2,R2,D2,Fm=v(()=>{"use strict";qe();BC=l.enum(["push","pull"]),Pw=l.object({workspaceId:l.string().min(1),name:l.string().min(1),key:l.string().min(1),digest:l.string().regex(/^[0-9a-f]{16}$/),measures:l.array(l.string()).default([]),counts:l.record(l.string(),l.number().int().nonnegative()).default({}),bytes:l.number().int().nonnegative().default(0),origin:BC.default("push"),supplier:l.string().optional(),publishedAt:l.string().nullable().default(null),checkedAt:l.string().nullable().default(null),failing:l.boolean().default(!1),counted:l.boolean().default(!1)}),WC=l.object({gameId:l.string().min(1),gameName:l.string().default(""),pinnedDigest:l.string().nullable().default(null),stale:l.boolean().default(!1),roundIds:l.array(l.string()).default([])}),O2=l.object({dataset:Pw,usedBy:l.array(WC).default([])}),Ow=l.enum(["pushed","pulled","joined","refused","failed"]),N2=l.object({at:l.string(),event:Ow,dataset:l.string().min(1),digest:l.string().nullable().default(null),gameId:l.string().nullable().default(null),gameName:l.string().nullable().default(null),roundId:l.string().nullable().default(null),message:l.string().default(""),ok:l.boolean().default(!0)}),R2=l.object({dataset:l.string().optional(),gameId:l.string().optional(),event:l.array(Ow).optional(),since:l.string().optional(),search:l.string().optional(),before:l.string().optional(),limit:l.number().int().positive().max(500).default(100)}),D2=l.object({datasets:l.array(Pw).default([]),unavailable:l.string().nullable().default(null)})});var Gm=v(()=>{"use strict";hn();ft()});var Bm=v(()=>{"use strict";fn();mr();hn();ft();Tt();Xa();qa()});function Ym(e,t){let r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp([`\\bpresentation\\s*\\.\\s*${r}\\b`,`\\bpresentation\\s*\\[\\s*["']${r}["']\\s*\\]`,`\\b${r}\\s*:`].join("|")).test(e)||t==="primaryColour"&&/\broot\s*:/.test(e)}function es(e){return Wm.filter(t=>Ym(e,Jm[t.key])).map(t=>t.key)}var Wm,Zm,Nw,Km,Vm,ZC,Rw,Dw,KC,VC,jw,Hm,Jm,qm=v(()=>{"use strict";Wm=[{key:"play_again_label",label:"Play again button",type:"freetext",description:"What the button that starts the next round says, at the end of a finished one. Leave it empty to keep the game's own word.",readBy:"The game's own page, on its play-again button.",section:"Wording"},{key:"result_button_label",label:"Result link",type:"freetext",description:"What the link back to a finished round says, for a fan who has already played today. Leave it empty to keep the game's own word.",readBy:"The game's own page, on its see-your-result link.",section:"Wording"},{key:"share_button_label",label:"Share button",type:"freetext",description:"What the share button says at the end of a round. Leave it empty to keep the game's own word.",readBy:"The game's own page, on its share button.",section:"Wording"},{key:"margin_over",label:"Went over, in the summary",type:"freetext",description:`What the splash and the share picture say when a fan went over, e.g. "over by {n}". {n} is how far out they were, and where you put it is up to you. Leave it empty to keep the game's own words.`,readBy:"The game's own page, on the returning splash and the share picture.",section:"Wording"},{key:"margin_exact",label:"Landed exactly, in the summary",type:"freetext",description:`What the splash and the share picture say when a fan hit the target exactly, e.g. "exactly on the number". There is no amount to show, so no {n}. Leave it empty to keep the game's own words.`,readBy:"The game's own page, on the returning splash and the share picture.",section:"Wording"},{key:"margin_under",label:"Stayed under, in the summary",type:"freetext",description:`What the splash and the share picture say when a fan finished under, e.g. "{n} short". {n} is how far under they were. Leave it empty to keep the game's own words.`,readBy:"The game's own page, on the returning splash and the share picture.",section:"Wording"},{key:"result_over",label:"Went over, on the result",type:"freetext",description:`What the result screen says when a fan went over, e.g. "Over the limit by {n}". **The game speaking to the fan, so write it in the second person.** Use {n} for the amount, {target} for the target, {rank} for the rank, {player} for the player who took them over, {value} for what that player was worth, and {fact} for that player's note. Leave it empty to keep the game's own words.`,readBy:"The game's own page, on the result screen.",section:"Wording"},{key:"result_exact",label:"Landed exactly, on the result",type:"freetext",description:`What the result screen says when a fan hit the target exactly, e.g. "Exactly on the number!". Leave it empty to keep the game's own words.`,readBy:"The game's own page, on the result screen.",section:"Wording"},{key:"result_under",label:"Stayed under, on the result",type:"freetext",description:`What the result screen says when a fan finished under, e.g. "{n} away from the target". Leave it empty to keep the game's own words.`,readBy:"The game's own page, on the result screen.",section:"Wording"},{key:"share_over",label:"Went over, in the shared text",type:"freetext",description:`The sentence a fan pastes when they went over, e.g. "over the limit by {n}." **The fan speaking to a friend, so write it in the first person: "my", never "your".** Use {n} for the amount, {target} for the target, {rank} for the rank, {player} for the player who took them over, {value} for what that player was worth, and {fact} for that player's note. Keep it to one line: the shared text is four lines and this is the first. Leave it empty to keep the game's own words.`,readBy:"The game's own page, in the text the share button copies.",section:"Wording"},{key:"share_exact",label:"Landed exactly, in the shared text",type:"freetext",description:`The sentence a fan pastes when they hit the target exactly, e.g. "Exactly on {target}. {rank}." Leave it empty to keep the game's own words.`,readBy:"The game's own page, in the text the share button copies.",section:"Wording"},{key:"share_under",label:"Stayed under, in the shared text",type:"freetext",description:`The sentence a fan pastes when they finished under, e.g. "{n} short of {target}. {rank}." Leave it empty to keep the game's own words.`,readBy:"The game's own page, in the text the share button copies.",section:"Wording"},{key:"result_bust_note",label:"Went over: the line about the player",type:"freetext",description:`The line on the result screen naming the player who took a fan over, e.g. "{player} alone was worth {value} of your {target}." **The game speaking to the fan, so second person.** {fact} is that player's own note if the producer wrote one. Leave it empty to keep the game's own words.`,readBy:"The game's own page, under the result when a fan went over.",section:"Wording"},{key:"share_bust_note",label:"Went over: the line about the player, shared",type:"freetext",description:`The same line in the text a fan pastes, e.g. "{player} alone was {value} of my {target}." **The fan speaking to a friend, so first person: "my", never "your".** Surname alone reads better here; the full name is on the card. Leave it empty to keep the game's own words.`,readBy:"The game's own page, in the text the share button copies.",section:"Wording"},{key:"share_dare",label:"The challenge in the shared text",type:"freetext",description:'The last line of the text a fan pastes, aimed at whoever reads it, e.g. "Can you do better?" Leave it empty and the line is not sent.',readBy:"The game's own page, in the text the share button copies.",section:"Wording"},{key:"result_dare",label:"The challenge on the result",type:"freetext",description:'A closing line on the result screen, e.g. "Can you do better?" Leave it empty and the line is not drawn.',readBy:"The game's own page, under the result.",section:"Wording"}],Zm=Wm.map(e=>e.key),Nw=[{key:"display_name",label:"Game name",type:"freetext",description:"What a fan sees at the top of the game. Leave it empty to use the name the game was deployed with.",readBy:"The game's own page, as its heading and its browser title.",section:"Identity"},{key:"strapline",label:"Strapline",type:"freetext",description:"One line under the name. Leave it empty and the line is not drawn.",readBy:"The game's own page, under the heading.",section:"Identity"},{key:"how_to_play",label:"How to play",type:"freetext",description:"The rules in a fan's words. Shown before they start, and reachable while they play.",readBy:"The game's own page, in its how-to-play panel.",section:"Identity"},{key:"reference_url",label:"Reference data",type:"freetext",description:"A link to JSON holding the data this game draws on, shared by every round. Fetched by the Engine, never sent to a fan's browser. Leave it empty if each round carries everything it needs.",readBy:"The control plane, when it provisions a round.",section:"Content",public:!1},{key:"primary_colour",label:"Primary colour",type:"colour",description:"The colour of the button a fan presses. Everything else stays as the game was built.",readBy:"The game's own page, as the --gamestage-primary custom property.",section:"Brand"},{key:"play_button_label",label:"Main button",type:"freetext",description:"What the button that submits a fan's answer says. Leave it empty to keep the game's own word.",readBy:"The game's own page, on its submit button.",section:"Wording"},...Wm,{key:"rank_ladder",label:"Rank names",type:"collection",itemLabel:"{{rank_label}}",description:"What each rank is called, best first. The game decides which rank a fan earned; this is only what it is called. Leave it empty to use the game's own names.",readBy:"The Engine, which awards the rank and returns its name.",section:"Wording",fieldset:[{key:"rank_label",label:"Name",type:"freetext",description:'What a fan sees when they earn this rank, e.g. "Hall of Fame".',readBy:"The Engine, on a finished round.",section:"Wording"}]},{key:"round_selection",label:"How the live round is chosen",type:"freetext",description:"Calendar: the round on today's edition, which a producer prepares. Rotation: one of a pool, chosen by the clock, the same one for everybody playing at that moment. Leave it empty for calendar.",readBy:"The control plane, when it provisions a round.",section:"Content",public:!1},{key:"round_window_seconds",label:"How long a round stays up",type:"number",description:"Under rotation, how many seconds each round is the live one before the next takes over. Leave it empty for a day.",readBy:"The control plane, when it provisions a round.",section:"Content",public:!1},{key:"measure",label:"Measure",type:"freetext",description:'Which column of the reference data a round counts, when it holds more than one, e.g. "points". A round can name its own instead. Leave it empty if the data holds one measure.',readBy:"The control plane, when it joins a round to the reference data.",section:"Content",public:!1}],Km=[{key:"edition_name",label:"Edition name",type:"freetext",description:"What a fan sees this edition called. Leave it empty to use the game's own word for its container.",readBy:"The game's own page, wherever it names the round.",section:"This edition"},{key:"edition_strapline",label:"Edition line",type:"freetext",description:"A line for this edition only: a sponsor, a fixture, a date. Leave it empty and the line is not drawn.",readBy:"The game's own page, beside the edition name.",section:"This edition"}],Vm=[{key:"source_url",label:"Content source",type:"freetext",description:"A link to JSON holding this round's content. Fetched by the Engine when the round is provisioned, so it is never sent to a fan's browser and may hold the answers. Leave it empty to use the round in the game's manifest.",readBy:"The control plane, when it provisions the round.",section:"Content",public:!1},{key:"measure",label:"Measure",type:"freetext",description:'Which column of the reference data this round counts, e.g. "assists". Leave it empty to count what the game counts.',readBy:"The control plane, when it joins this round to the reference data.",section:"Content",public:!1},{key:"round_timer_seconds",label:"Time limit",type:"number",description:"How many seconds a fan gets on this round, counted from when they open it: 180 for three minutes. The Engine refuses a play that arrives after it. Leave it empty for a round with no clock.",readBy:"The Engine, which refuses a late play, and the game's own page, which counts it down.",section:"Content"}],ZC=[{key:"round_theme",label:"Theme",type:"freetext",description:`What this round is about, in a word or two, e.g. "The Eighties". Shown above the game's name. Leave it empty for a round that is not one of a themed set.`,readBy:"The game's own page, above the title.",section:"This round"},{key:"round_prompt",label:"What a fan is told",type:"freetext",description:"The line above the board, in a fan's words. Leave it empty to keep the wording the game was built with.",readBy:"The game's own page, above the board.",section:"This round"},{key:"round_target",label:"The target",type:"number",description:"The total a fan must get as close to as they can without going over. Public: it is the goal they are set, and the game is unplayable without it.",readBy:"The Engine, which marks against it, and the page, which shows it.",section:"This round"},{key:"round_target_label",label:"What is being counted",type:"freetext",description:'Shown beside the target, e.g. "Career Points".',readBy:"The game's own page, beside the target.",section:"This round"},{key:"round_unit",label:"Unit",type:"freetext",description:'Put in front of every number in this round, e.g. "\xA3". Leave it empty for a round that counts something with no unit, like points.',readBy:"The game's own page, in front of the target, each pick and the total.",section:"This round"},{key:"round_slates",label:"The picks",type:"collection",itemLabel:"{{slate_label}}",description:"One group per pick, in the order a fan plays them. Five groups means five picks.",readBy:"The Engine, which marks against them, and the page, which draws them.",section:"This round",fieldset:[{key:"slate_label",label:"Group",type:"freetext",description:'What a fan sees above the choices, e.g. "1996-97 CHI".',readBy:"The game's own page.",section:"This round"},{key:"slate_entries",label:"Choices",type:"collection",itemLabel:"{{entry_label}}",description:"The choices a fan picks between in this group.",readBy:"The Engine and the page.",section:"This round",fieldset:[{key:"entry_label",label:"Name",type:"freetext",description:'What a fan sees, e.g. "Michael Jordan".',readBy:"The game's own page.",section:"This round"},{key:"entry_key",label:"Reference",type:"freetext",description:`The id this choice has in the game's own data, e.g. "jordami01". It is how the Engine finds what the choice is worth, so it has to match the data the game was deployed with. Never shown to a fan.`,readBy:"The Engine, to look up what this choice is worth.",section:"This round"},{key:"entry_note",label:"Note",type:"freetext",description:'Something worth knowing about this choice, shown to a fan who went over because of it, e.g. "Six rings, six Finals MVPs." Leave it empty and the game works out its own line.',readBy:"The game's own page, on the result when this choice took a fan over.",section:"This round"}]}]}],Rw="Never shown to a fan. This is the answer, so it is withheld from the feeds a browser reads.",Dw={key:"round_board",label:"The board",type:"collection",itemLabel:"{{board_item}}",description:"Everything a fan can pick from, in the order they should see it.",readBy:"The Engine, which marks against it, and the page, which draws it.",section:"This round",fieldset:[{key:"board_item",label:"Pick",type:"freetext",description:'One thing a fan can pick, exactly as they should read it, e.g. "Michael Jordan".',readBy:"The game's own page, and the Engine, which marks a pick by it.",section:"This round"}]},KC=[{key:"round_prompt",label:"What a fan is told",type:"freetext",description:"The line above the board, in a fan's words. Leave it empty to keep the wording the game was built with.",readBy:"The game's own page, above the board.",section:"This round"},Dw,{key:"round_targets",label:"The right answers",type:"freetext",description:`The picks that are right, separated by commas, written exactly as they appear on the board, e.g. "Michael Jordan, Larry Bird". ${Rw}`,readBy:"The Engine, to mark a pick.",section:"This round",public:!1}],VC=[{key:"round_prompt",label:"What a fan is told",type:"freetext",description:"The line above the board, in a fan's words. Leave it empty to keep the wording the game was built with.",readBy:"The game's own page, above the board.",section:"This round"},Dw,{key:"round_groups",label:"The connections",type:"collection",itemLabel:"{{group_label}}",description:`One per hidden group. ${Rw}`,readBy:"The Engine, to mark a guess and to name a group once it is found.",section:"This round",public:!1,fieldset:[{key:"group_label",label:"What connects them",type:"freetext",description:'Shown to a fan only once they have found this group, e.g. "1996-97 Bulls".',readBy:"The game's own page, after the group is solved.",section:"This round"},{key:"group_members",label:"Which ones",type:"freetext",description:'The picks in this group, separated by commas, written exactly as they appear on the board, e.g. "Michael Jordan, Scottie Pippen". Every one has to be on the board, and no pick may be in two groups.',readBy:"The Engine, to mark a guess.",section:"This round"}]}],jw=[{key:"prediction_question",label:"Question",type:"freetext",description:"What a fan is asked to call, in their words.",readBy:"The Engine, when it provisions the round.",section:"Content"},{key:"prediction_option",label:"Option",type:"freetext",description:"One thing a fan can call. Add one per outcome.",readBy:"The Engine, when it provisions the round.",section:"Content"}],Hm={hunt:KC,push:ZC,group:VC,predict:[]},Jm={display_name:"displayName",strapline:"strapline",how_to_play:"howToPlay",primary_colour:"primaryColour",play_button_label:"playButtonLabel",play_again_label:"playAgainLabel",result_button_label:"resultButtonLabel",share_button_label:"shareButtonLabel",edition_name:"editionName",edition_strapline:"editionStrapline",margin_over:"marginOver",margin_exact:"marginExact",margin_under:"marginUnder",result_over:"resultOver",result_exact:"resultExact",result_under:"resultUnder",share_over:"shareOver",share_exact:"shareExact",share_under:"shareUnder",result_bust_note:"resultBustNote",share_bust_note:"shareBustNote",share_dare:"shareDare",result_dare:"resultDare"}});function YC(e){let t=new Map,r=o=>{for(let n of o){let i=t.get(n.key);if(i){if(i.type!==n.type)throw new Error(`The field "${n.key}" is declared as both ${i.type} and ${n.type}. One key is one declaration; a level's own label and description travel on its field set entry, its type does not.`)}else t.set(n.key,n);r(n.fieldset??[])}};return r(e),[...t.values()]}function Xm(e){let t=[];for(let r of e){let o=r.public===!1,n={label:r.label,key:r.key,description:r.description,...r.type==="collection"?{}:{mandatory:!1},...o?{public:!1,cloneable:!1}:{}},i=t.find(a=>a.name===r.section);i?i.properties.push(n):t.push({name:r.section,properties:[n]})}return t}function qC(e){let t=e.archetypes.map(He);for(let i of t)if(!Lw[i])throw new Error(`No Studio element name for the ${i} archetype. Add one to ARCHETYPE_ELEMENT_NAMES rather than letting Studio show a blank type.`);let r=i=>`${e.urls.baseAppsUrl}/${i}`,o=new Set(e.wording??Zm),n=Nw.filter(i=>!Zm.includes(i.key)||o.has(i.key));return{"spec.json":{name:e.name,id:e.id,version:e.version,base_apps_url:e.urls.baseAppsUrl,dash_image:e.urls.dashImage,embed_url:e.urls.embedUrl,elements:r("elements.json"),fields:r("fields.json"),project_settings:r("project_settings.json"),event_settings:r("event_settings.json"),schedule:!0,analytics:!0,live_activity:!0,localisation:!1},"elements.json":t.map(i=>({name:Lw[i],content_type:zw(i),derived_from:Mw[i]?.derivedFrom??"data",duration:Mw[i]?.duration??{mode:"instant"},label:i==="predict"?"{{question.text}}":e.name,custom_fields:Xm([...Vm,...Hm[He(i)]??[]]),...i==="predict"?{label_question:"Question",label_option:"Option",reveal_results:{modes:["manual"],default:"manual"},correct_option:{live_update:!0},question:[{label:"Question",key:"text",field:"prediction_question",mandatory:"question"}],option:[{label:"Option",key:"text",field:"prediction_option",mandatory:"option"}]}:{}})),"fields.json":YC([...n,...Km,...Vm,...Object.values(Hm).flat(),...jw]).map(JC),"project_settings.json":{sections:Xm(n)},"event_settings.json":{sections:Xm(Km)}}}function Uw(e){return qC({name:e.gameName,id:e.gameId,wording:e.wording??[],version:`0.0.${e.manifestRevision}`,archetypes:[e.archetype],urls:e.urls})}var Lw,zw,Mw,HC,JC,Qm=v(()=>{"use strict";qm();Tt();Lw=Yf,zw=e=>{let t=He(e);return Qs[t]??`gamestage-${t.replaceAll("_","-")}-element`},Mw={hunt:{derivedFrom:"data",duration:{mode:"fixed",default:86400}},push:{derivedFrom:"data",duration:{mode:"fixed",default:86400}},group:{derivedFrom:"data",duration:{mode:"fixed",default:86400}},predict:{derivedFrom:"prediction",duration:{mode:"flexible"}}},HC=new Set(["freetext","wysiwyg","image","file"]),JC=e=>({key:e.key,type:e.type,...HC.has(e.type)?{localisable:!1}:{},...e.type==="collection"?{...e.itemLabel?{item_label:e.itemLabel}:{},fieldset:(e.fieldset??[]).map(t=>({label:t.label,key:t.key,...t.description?{description:t.description}:{}}))}:{}})});var eh=v(()=>{"use strict";Tt()});var Fw=v(()=>{"use strict";Rr();Ja();Um();fn();Fm();Gm();Bm();Qm();eh();zm();ft()});function QC(e){let t=1e3*2**(e-1),r=t*.2*(Math.random()*2-1);return Math.round(t+r)}function Ww(e){let t=e.fetch??globalThis.fetch,r=e.maxAttempts??4,o=e.baseUrl.replace(/\/+$/,"");return async function(i,a,s={}){let c=globalThis.location?.origin,d=new URL(`${o}${a}`,o.startsWith("/")?c:void 0);for(let[p,m]of Object.entries(s.query??{}))m!=null&&d.searchParams.set(p,String(m));let u;for(let p=1;p<=r;p++){let m=typeof e.token=="function"?await e.token():e.token,h=await t(d,{method:i,headers:{authorization:`Bearer ${m}`,...s.body===void 0?{}:{"content-type":"application/json"}},body:s.body===void 0?void 0:JSON.stringify(s.body)});if(h.ok)return await h.json();let f=await h.json().catch(()=>({}));if(u=new We(h.status,f.error?.code??"unknown",f.error?.message??h.statusText,f.error?.retryable??!1),!u.retryable||p===r)break;let _=Number(h.headers.get("retry-after"));await XC(Number.isFinite(_)&&_>0?_*1e3:QC(p))}throw u??new We(0,"unknown","Request failed.",!1)}}function Zw(e){let t=Ww(e);return{setWorkspaceAccess:(r,o,n)=>t("PUT",`/v1/admin/workspaces/${encodeURIComponent(r)}/access`,{body:{access:o,reason:n??null}}),async listAccess(){let r=await t("GET","/v1/admin/access"),o=[...r.waiting??[],...r.decided??[]].filter(n=>typeof n=="object"&&n!==null).map(xw);return Sw(o)}}}function hr(e){let t=Ww(e),r=i=>({...i,containerLabel:i.containerLabel??"Round"}),o=i=>({...i,access:Ha(i),games:(i.games??[]).map(r),gamesTotal:i.gamesTotal??(i.games??[]).length,archivedTotal:i.archivedTotal??(i.games??[]).filter(a=>a.state==="archived").length}),n=i=>({...i,workspace:{...i.workspace,access:Ha(i.workspace??{}),games:(i.workspace?.games??[]).map(r)}});return{getWorkspace:async()=>o(await t("GET","/v1/workspace")),getWorkspaceSummary:async()=>{try{return o(await t("GET","/v1/workspace/summary"))}catch(i){if(!(i instanceof We)||i.status!==404)throw i;return Gw||(Gw=!0,console.warn("[control-plane] no /v1/workspace/summary, falling back to the full workspace read. If this persists the control plane is behind the site, and every Stage screen is carrying the whole workspace again.")),o(await t("GET","/v1/workspace"))}},linkGitHub:async i=>n(await t("PUT","/v1/workspace/github",{body:{login:i}})),setPlan:async i=>n(await t("PUT","/v1/workspace/plan",{body:{tier:i}})),uploadTarget:(i,a)=>t("POST",`/v1/games/${encodeURIComponent(i)}/uploads`,{body:{filename:a}}),referenceUploadTarget:(i,a)=>t("POST","/v1/reference/uploads",{body:{name:i,digest:a}}),pruneBundle:(i,a)=>t("PUT",`/v1/games/${encodeURIComponent(i)}/bundle`,{body:{filenames:a}}),async getGame(i){try{return r(await t("GET",`/v1/games/${encodeURIComponent(i)}`))}catch(a){if(a instanceof We&&a.status===404)return;throw a}},setAwake:(i,a)=>t("PUT",`/v1/games/${encodeURIComponent(i)}/state`,{body:{awake:a}}),setDestination:(i,a,s)=>t("PUT",`/v1/games/${encodeURIComponent(i)}/destinations`,{body:{destination_id:a,enabled:s}}),registerGame:i=>t("POST","/v1/games",{body:i}),archiveGame:i=>t("POST",`/v1/games/${encodeURIComponent(i)}/archive`),deleteGame:i=>t("DELETE",`/v1/games/${encodeURIComponent(i)}`),deploy:(i,a)=>t("POST",`/v1/games/${encodeURIComponent(i)}/deploy`,{body:a}),refreshRound:i=>t("POST",`/v1/games/${encodeURIComponent(i)}/round/refresh`),async seedRound(i,a){try{return await t("PUT",`/v1/games/${encodeURIComponent(i)}/round`,{body:{round:a}})}catch(s){throw s instanceof We&&s.status===404&&!/no such game/i.test(s.message)?new We(404,"not_supported","This control plane cannot take a round yet. It is running a build older than this CLI, so the round has to go in through Studio until it is updated.",!1):s}},setSignal:async i=>n(await t("PUT","/v1/workspace/signal",{body:{enabled:i}})),async getEndpoints(i){try{return await t("GET",`/v1/games/${encodeURIComponent(i)}/endpoints`)}catch(a){if(a instanceof We&&a.status===404)return;throw a}},async getLogs(i,a){let{lines:s}=await t("GET",`/v1/games/${encodeURIComponent(i)}/logs`,{query:a});return s},async getAuditLog(i){let{records:a}=await t("GET","/v1/audit",{query:i});return a},async listDatasets(){try{let i=await t("GET","/v1/reference/datasets");return!i||!Array.isArray(i.datasets)?{datasets:[],unavailable:Bw}:{datasets:i.datasets,unavailable:i.unavailable??null}}catch(i){if(i instanceof We&&i.status===404)return{datasets:[],unavailable:Bw};throw i}},async getDataset(i){try{let a=await t("GET",`/v1/reference/datasets/${encodeURIComponent(i)}`);return a?.dataset?a:void 0}catch(a){if(a instanceof We&&a.status===404)return;throw a}},async getDataLog(i){try{let a=await t("GET","/v1/reference/log",{query:i});return Array.isArray(a?.lines)?a.lines:[]}catch(a){if(a instanceof We&&a.status===404)return[];throw a}}}}var We,XC,Gw,Bw,Kw=v(()=>{"use strict";Ja();We=class extends Error{status;code;retryable;constructor(t,r,o,n){super(o),this.status=t,this.code=r,this.retryable=n,this.name="ControlPlaneError"}},XC=e=>new Promise(t=>setTimeout(t,e)),Gw=!1;Bw="This control plane is running a build older than this screen, so it cannot list datasets yet."});function eP(e){if(e.timerSeconds===void 0||!Number.isInteger(e.timerSeconds)||e.timerSeconds<=0||!e.startedAt)return;let t=Date.parse(e.startedAt);if(Number.isFinite(t))return t+e.timerSeconds*1e3}function Vw(e,t){let r=eP(e);if(r===void 0)return!1;let o=typeof t=="number"?t:Date.parse(t);return Number.isFinite(o)?o>r:!1}var Hw=v(()=>{"use strict"});var Jw=v(()=>{"use strict";mr()});var tP,nP,rP,eU,th=v(()=>{"use strict";qe();tP=l.discriminatedUnion("kind",[l.object({kind:l.literal("everyone")}),l.object({kind:l.literal("domains"),domains:l.array(l.string().min(1)).min(1)}),l.object({kind:l.literal("named")})]),nP=l.enum(["licensed","unofficial","creator"]),rP=l.enum(["ours","creator"]),eU=l.object({id:l.string().min(1),label:l.string().min(1),standing:nP,origin:rP,tiers:l.array(l.enum(["runtime","live","enterprise"])).min(1),produces:l.array(l.string()),note:l.string().min(1),audience:tP.optional()})});var Yw=v(()=>{"use strict";th()});var qw=v(()=>{"use strict";fn()});var Xw=v(()=>{"use strict";fn()});function oP(e){let t;try{t=JSON.parse(e)}catch(o){return{ok:!1,reason:"That is not JSON.",detail:o instanceof Error?o.message:void 0}}let r=Bt.safeParse(t);if(!r.success){let o=r.error.issues[0];return{ok:!1,reason:"That is not valid reference data.",detail:o?`${o.path.join(".")||"document"}: ${o.message}`:void 0}}return{ok:!0,summary:{digest:Qa(e),measures:r.data.measures.map(o=>o.key),counts:Object.fromEntries(r.data.measures.map(o=>[o.key,Object.keys(o.values).length]))}}}async function Qw(e,t){let r=oP(e);return r.ok&&(await t("copy",e),await t("pointer",e)),r}var ek=v(()=>{"use strict";fn()});var tk=v(()=>{"use strict"});var nk=v(()=>{"use strict"});function nh(e){return e.sourceIp?.trim()||"unknown"}function rh(e,t){return`${e.length}:${e}${t}`}var iP,rk,ok,ik,ak,mU,hU,fU,sk=v(()=>{"use strict";iP=e=>{if(e===void 0)return;let t=Number(e);return Number.isFinite(t)&&t>0?t:void 0},rk=e=>typeof process>"u"?void 0:iP(process.env?.[e]),ok=(e,t,r)=>({burst:rk(t)??e.burst,perMinute:rk(r)??e.perMinute}),ik={player:{burst:300,perMinute:600},publicRoutes:{burst:100,perMinute:300}},ak={player:ok(ik.player,"GAMESTAGE_RATE_PLAYER_BURST","GAMESTAGE_RATE_PLAYER_PER_MINUTE"),publicRoutes:ok(ik.publicRoutes,"GAMESTAGE_RATE_PUBLIC_BURST","GAMESTAGE_RATE_PUBLIC_PER_MINUTE")},mU=ak.player,hU=ak.publicRoutes,fU=600*1e3});var ie=v(()=>{"use strict";Rr();Tt();un();hm();_m();Mm();uw();La();zm();ft();Ja();Fw();Kw();qm();hn();Gm();Hw();mr();qa();Jw();fn();Yw();th();qw();Xw();ek();Fm();Xa();Bm();tk();Qm();Um();nk();eh();sk()});import{open as SP,readFile as Sk}from"node:fs/promises";import{createHash as $P}from"node:crypto";import{gunzipSync as EP}from"node:zlib";function IP(e){for(let{pattern:t,what:r}of AP)if(t.test(e))return r}function uh(e){let t=(e.split("/").pop()??e).toLowerCase();return t===".env"||t.startsWith(".env.")||TP.has(t)||/^(credentials|secrets)\.(json|ya?ml|ini|toml|txt|env)$/.test(t)||/\.(pem|key|p12|pfx|keystore|jks)$/.test(t)}async function Ek(e,t){let r;try{r=await SP(e,"r")}catch{return}try{let{size:o}=await r.stat();if(o<=t){let s=Buffer.alloc(o);return o>0&&await r.read(s,0,o,0),s}let n=Math.floor(t/2),i=Buffer.alloc(n),a=Buffer.alloc(n);return await r.read(i,0,n,0),await r.read(a,0,n,o-n),Buffer.concat([i,Buffer.from(`
8105
+ `),a])}catch{return}finally{await r.close()}}async function PP(e){return(await Ek(e,$k))?.toString("latin1")}async function Po(e){let t=await Ek(e,$k);if(!t)return;if(t.byteLength>=2&&t[0]===31&&t[1]===139)try{let s=await Sk(e);t=EP(s,{maxOutputLength:CP})}catch{}if(t.byteLength>=2){if(t[0]===255&&t[1]===254)return t.toString("utf16le");if(t[0]===254&&t[1]===255)return t.swap16().toString("utf16le")}let r=t.subarray(0,8192);if(!r.includes(0))return t.toString("utf8");let o=0,n=0,i=0;for(let s=0;s<r.length;s+=1)r[s]===0&&(i+=1,s%2===0?o+=1:n+=1);let a=Math.floor(r.length/2);if(a>8){if(n>a*.7&&o<a*.1)return t.toString("utf16le");if(o>a*.7&&n<a*.1)return t.swap16().toString("utf16le")}if(i<=8&&i*20<r.length)return t.toString("utf8").split("\0").join("")}function OP(e){let t=ce(e);if(t.ok)return{manifest:!0,round:!!t.manifest.backend.round}}function br(e,t){if(t.archetype==="hunt"){let n=t.targets;if(n.length===0)return[];let i=n.filter(a=>new RegExp(`["'\`]${a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}["'\`]`,"i").test(e));return i.length===n.length?i:[]}if(t.archetype==="predict")return[];if(t.archetype==="group"){let n=[];for(let i of t.groups){if(new RegExp(`["\`']${i.label.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}["\`']`,"i").test(e)){n.push(i.label);continue}e.split(`
8106
+ `).some(c=>i.members.every(d=>new RegExp(`["\`']${d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}["\`']`,"i").test(c)))&&n.push(i.label)}return n}let r=n=>n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=[];for(let n of t.slates)for(let i of n.entries){let a=`${r(i.key)}|${r(i.label)}`,s=new RegExp(`(?:${a})[^\\n]{0,120}?\\b${i.value}\\b`,"i"),c=new RegExp(`\\b${i.value}\\b[^\\n]{0,120}?(?:${a})`,"i");(s.test(e)||c.test(e))&&o.push(i.label)}return o}function _r(e,t){if(e.archetype==="hunt")return`Every target appears in the artefact: ${t.join(", ")}. A solution in the bundle can be read before anybody plays.`;if(e.archetype==="group")return`The page holds the grouping: ${t.join(", ")}. A player who reads it has the categories, which is the puzzle.`;let r=t.slice(0,5).join(", "),o=t.length>5?`, and ${t.length-5} more`:"";return`The page carries what each pick is worth: ${r}${o}. A game that is arithmetic is finished the moment the numbers ship, without a move being played.`}function RP(e){try{return JSON.parse(e)}catch{}try{let t=Dm(e);return typeof t=="object"?t:void 0}catch{return}}function DP(e){let t=RP(e);if(!t||typeof t!="object")return;let r,o=new Set,n=(i,a)=>{if(!(r||a>6||!i||typeof i!="object")&&!o.has(i)){if(o.add(i),Array.isArray(i)){for(let s of i)n(s,a+1);return}for(let[s,c]of Object.entries(i)){if(NP.has(s.toLowerCase())){r=s;return}n(c,a+1)}}};return n(t,0),r}function jP(e){let t=e.split(/\r?\n/).filter(r=>r.trim().length>0);if(t.length<dh+1)return!1;for(let r of[","," ",";"]){let o=t.slice(0,500).map(u=>u.split(r)),n=o[0].length,i=o.filter(u=>u.length===n);if(n<2||i.length<o.length*.95||i.length<dh+1)continue;let a=i.slice(1),s=Math.min(...a.map(u=>u.length)),c=!1,d=!1;for(let u=0;u<s;u+=1){let p=a.map(m=>m[u].trim());p.every(m=>m.length>0&&/^-?\d+(\.\d+)?$/.test(m))?c=!0:p.every(m=>m.length>0&&!/^-?\d+(\.\d+)?$/.test(m))&&(d=!0)}if(c&&d)return!0}try{let r=JSON.parse(e);if(r&&typeof r=="object"&&!Array.isArray(r)){let o=Object.values(r);if(o.length>=dh&&o.every(n=>typeof n=="number"))return!0}}catch{}return!1}function zP(e){let t=(e.split("/").pop()??e).toLowerCase(),r=t.lastIndexOf(".");return r>0&&MP.has(t.slice(r+1))&&(t=t.slice(0,r)),r=t.lastIndexOf("."),r<=0?!0:LP.has(t.slice(r+1))}function FP(e){let t=e.split("/").slice(0,-1),r=t.findIndex(o=>UP.includes(o));return r===-1?void 0:`${t.slice(0,r+1).join("/")}/`}async function GP(e){if(e.relativePath!==ae)return;let t;try{t=await Sk(e.path)}catch{return}if($P("sha256").update(t).digest("hex").slice(0,16)!==$t)return{path:e.relativePath,why:"needs regenerating. Run `gamestage client`, then deploy again.",confidence:"certain"}}async function Tk(e,t={}){let r=[],o=[],n=[],i=[],a=new Set(t.allow??[]),s=new Set(t.exempt??[]),c;for(let d of e){let u=FP(d.relativePath);if(u){i.includes(u)||i.push(u);continue}let p=await GP(d);if(p){c??=p;continue}if(s.has(d.relativePath)){r.push(d);continue}let m=await ph(d,t.round);if(!m){r.push(d);continue}if(m.confidence==="suspected"&&a.has(d.relativePath)){n.push(m),r.push(d);continue}if(m.alwaysWithheld||zP(d.relativePath)){o.push(m);continue}c??=m}return{publish:r,withheld:o,allowed:n,walkedPast:i,...c?{refuse:c}:{}}}async function ph(e,t){let r=(i,a,s=!1)=>({path:e.relativePath,why:i,confidence:a,...s?{alwaysWithheld:s}:{}});if(uh(e.relativePath))return r("is environment or credential shaped","certain",!0);let o=await Po(e.path);if(o!==void 0){let i=IP(o);if(i)return r(`carries ${i}, whatever the file is called`,"certain",!0);let a=OP(o);if(a)return r(a.round?"is an App Manifest, which carries the round's private half":"is an App Manifest, which is ours rather than the game's","certain",!0);if(t){let s=br(o,t);if(s.length)return r(_r(t,s),"certain")}}if(t&&o===void 0){let i=await PP(e.path);if(i!==void 0){let a=br(i,t);if(a.length)return r(_r(t,a),"certain")}}if(o===void 0)return;let n=DP(o);if(n){let i=/^[aeiou]/i.test(n)?"an":"a";return r(`looks like it holds a round's answers: it has ${i} "${n}" key. If that is the game's own data rather than its answers, publish it with --allow ${e.relativePath}`,"suspected")}if(jP(o))return r(`looks like reference data: a long table of labels against numbers, which is what a round is scored against. If it is the game's own data, publish it with --allow ${e.relativePath}`,"suspected")}var TP,AP,$k,CP,NP,dh,LP,MP,UP,is=v(()=>{"use strict";Lm();ie();Et();TP=new Set([".envrc",".netrc",".npmrc",".pgpass","id_rsa","id_ed25519","credentials","secrets","env.local"]),AP=[{pattern:/-----BEGIN [A-Z ]*PRIVATE KEY-----/,what:"a private key block"},{pattern:/-----BEGIN OPENSSH PRIVATE KEY-----/,what:"an OpenSSH private key"},{pattern:/\bAKIA[0-9A-Z]{16}\b/,what:"an AWS access key id"},{pattern:/\baws_secret_access_key\s*[=:]/i,what:"an AWS secret access key"},{pattern:/\bsk-(live|proj|ant)-[A-Za-z0-9_-]{16,}/,what:"a live API key"},{pattern:/\bsk_live_[A-Za-z0-9]{16,}/,what:"a live Stripe key"},{pattern:/\bgh[pousr]_[A-Za-z0-9]{30,}/,what:"a GitHub token"},{pattern:/\bxox[baprs]-[A-Za-z0-9-]{10,}/,what:"a Slack token"},{pattern:/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}/,what:"a signed token"},{pattern:/\bauthorization\s*:\s*["']?\s*(bearer|basic)\s+\S{12,}/i,what:"an Authorization header with a token in it"}];$k=8e6,CP=32e6;NP=new Set(["answers","answer_key","answerkey","solution","solutions","targets","correct","correct_option","correct_options","groups","corpus","reference_data","referencedata"]);dh=20;LP=new Set(["txt","log","md","markdown","yaml","yml","toml","ini","cfg","csv","tsv","map","bak","orig","rej","lock"]),MP=new Set(["gz","br","zst","zz"]);UP=[".git","node_modules",".next",".nuxt",".svelte-kit",".cache"]});async function as(e){let t=[];for(let r of e){let o=r.relativePath.split("/").pop();if(o===ae||o===be)continue;let n=await Po(r.path);n!==void 0&&t.push({relative:r.relativePath,text:n})}return t}var mh=v(()=>{"use strict";Et();is()});import{lstatSync as BP,readdirSync as WP}from"node:fs";import{relative as ZP,resolve as Ak,sep as KP}from"node:path";function Ik(e){let t=e.split("/").pop()??e;return VP.has(t)||t.startsWith(".env.")}function hh(e,t={}){let r=t.symlinks??"throw",o=Ak(e),n=[],i=[];function a(s){for(let c of WP(s,{withFileTypes:!0}).sort((d,u)=>d.name.localeCompare(u.name))){let d=Ak(s,c.name),u=ZP(o,d).split(KP).join("/");if(c.isSymbolicLink()){if(r==="throw")throw new Error(`Directory ${e} contains a symlink: ${u}`);i.push(u);continue}if(c.isDirectory())a(d);else if(c.isFile()){if(Ik(u))continue;n.push({path:d,relativePath:u})}}}if(!BP(o).isDirectory())throw new Error(`${e} is not a directory.`);return a(o),{files:n,skippedLinks:i}}function fh(e){return hh(e,{symlinks:"throw"}).files}var VP,gh=v(()=>{"use strict";VP=new Set(["gamestage.yaml","gamestage.yml",".env",".env.local","gamestage.mjs","cli.mjs"])});import{createHash as HP}from"node:crypto";function ss(e){return HP("sha256").update(e,"utf8").digest()[0]&127}var Ck,yh=v(()=>{"use strict";Ck=128});import{createHmac as JP,randomBytes as YP,timingSafeEqual as qP}from"node:crypto";function bh(e){return e.startsWith(vh)}function Oo(e){let t=(e??"").replace(/[^A-Za-z0-9_.-]/g,"").slice(0,64);return`${vh}${t||"unknown"}`}async function Pk(e){if(!e.token)return e.sessionSecret?{playerId:eO(e.anonymousId,e.sessionSecret)??Oo(void 0)}:{playerId:Oo(e.anonymousId)};let t=e.resolver??XP,r=await t.resolve(e.token);return r?{playerId:r.playerId,alias:r.alias}:{playerId:Oo(e.anonymousId),refused:t.lastRefusal?.()??"identity_unresolved"}}function Nk(e){let t=`${vh}${YP(16).toString("base64url")}`;return{playerId:t,token:QP(t,e)}}function Rk(e,t){return JP("sha256",t).update(e).digest("base64url")}function QP(e,t){return`${e}${Ok}${Rk(e,t)}`}function eO(e,t){if(!e)return;let r=e.lastIndexOf(Ok);if(r<=0)return;let o=e.slice(0,r);if(!bh(o))return;let n=Buffer.from(e.slice(r+1)),i=Buffer.from(Rk(o,t));if(n.length===i.length)return qP(n,i)?o:void 0}var vh,XP,Ok,_h=v(()=>{"use strict";vh="anon:";XP={async resolve(){}};Ok="."});function gn(e){return e instanceof Error?e.name:"unknown"}function Wt(e){console.error(tO,e)}function Dk(e,t){console.error(nO,{violation:e,...t})}var tO,nO,cs=v(()=>{"use strict";tO="engine_error",nO="engine_integrity_violation"});function Mk(e){let t=2166136261;for(let r=0;r<e.length;r+=1)t^=e.charCodeAt(r),t=t+((t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24))>>>0;return t^=t>>>16,t=Math.imul(t,2246822507)>>>0,t^=t>>>13,t=Math.imul(t,3266489909)>>>0,t^=t>>>16,t>>>0}function rO(e){let t=jk[Mk(`a:${e}`)%jk.length],r=Lk[Mk(`n:${e}`)%Lk.length];return`${t} ${r}`}function ls(e,t){return t?.trim()||rO(e)}var jk,Lk,wh=v(()=>{"use strict";jk=["Amber","Brave","Bright","Calm","Clever","Copper","Eager","Early","Fleet","Gentle","Golden","Happy","Keen","Kind","Lucky","Merry","Nimble","Noble","Quick","Quiet","Rapid","Ready","Royal","Silver","Steady","Sunny","Swift","Tidy","True","Warm","Wise","Zesty"],Lk=["Badger","Beaver","Bison","Falcon","Ferret","Finch","Gibbon","Heron","Ibex","Jaguar","Kestrel","Lemur","Lynx","Marten","Meerkat","Osprey","Otter","Panda","Puffin","Quokka","Rabbit","Raven","Robin","Salmon","Sparrow","Stoat","Tapir","Teal","Vole","Walrus","Weasel","Wombat"]});function Zt(e){return Vw({startedAt:e.state.started_at,timerSeconds:e.limits.timerSeconds},e.now)}function zk(e){let{tenant:t,playerId:r,store:o,rules:n}=e,i=e.now??(()=>new Date().toISOString()),a=0,s=e.newPlayId??(()=>`play_${++a}_${r}`),c=()=>({server_time:i(),snapshot:e.runtime.snapshot}),d=w=>w;function u(w,C){return!n.settle||!w.round.can.results_available||C.outcome!=="pending"?C:n.settle({secret:w.secret,state:C,limits:w.limits,now:i()})}function p(w){if(!w.fusedUntil)return 0;let C=Math.ceil((Date.parse(w.fusedUntil)-Date.parse(i()))/1e3);return Number.isFinite(C)&&C>0?C:0}async function m(w,C){let D=e.fuse?.note(t,ss(r),C);if(!D)return;let j=new Date(Date.parse(i())+D.holdSeconds*1e3).toISOString();if(D.kind==="stop")try{await o.setFuse(t,w,j)}catch(X){Wt({event:"fuse_write_failed",tenant:t,round_id:w,name:gn(X)})}try{await e.onFuse?.({...D,until:j})}catch(X){Wt({event:"fuse_notify_failed",tenant:t,round_id:w,name:gn(X)})}}function h(w){return p(w)<=0?w.round:{...w.round,can:{...w.round.can,accepting_plays:!1}}}function f(w,C){let D=w.round.number??Number.POSITIVE_INFINITY,j=C.round.number??Number.POSITIVE_INFINITY;return D!==j?D-j:w.round.id.localeCompare(C.round.id)}async function _(w,C){let D=await o.getState(t,w,r);return D?{state:D.state,version:D.version}:{state:{...n.initialState({playerId:r,roundId:w,limits:C,now:i()}),started_at:i()},version:void 0}}async function T(w,C,D,j){if(C.timerSeconds===void 0||j!==void 0)return D;try{if(await o.putStateIfVersion(t,D,void 0))return D}catch(V){return Wt({event:"round_open_write_failed",tenant:t,round_id:w,name:gn(V)}),D}return(await o.getState(t,w,r))?.state??D}let A=(w,C,D)=>({...c(),play_id:s(),outcome:w,reason:C,round_version:D,marked:!1,feedback:[]});return{async getRuntime(){return{...e.runtime,...c()}},async getCurrentRound(){let w=await o.getCurrentRound(t);if(!w)throw new Error(kh);return{...h(w),...c()}},async getRound(w){let C=await o.getRound(t,w);return C?{...h(C),...c()}:void 0},async getRoundPool(){let[w,C]=await Promise.all([o.listRounds(t),o.getCurrentRound(t)]),D=C?.round.id,j=[...w].sort(f).map(X=>{let V=h(X);return{id:V.id,number:V.number,version:V.version,can:V.can,opens_at:V.opens_at,locks_at:V.locks_at,current:V.id===D}});return{...c(),rounds:j}},async getPlayedRounds(){let w=await o.listStatesForPlayer(t,r);return{...c(),player_id:r,played:w.map(C=>({round_id:C.round_id,finished:C.finished,score:C.score,outcome:C.outcome})).sort((C,D)=>C.round_id.localeCompare(D.round_id))}},async getNextRound(){let[w,C]=await Promise.all([o.listRounds(t),o.listStatesForPlayer(t,r)]),D=new Set(C.filter(te=>te.finished).map(te=>te.round_id)),j=new Set(C.map(te=>te.round_id)),X=[...w].filter(te=>h(te).can.accepting_plays&&!D.has(te.round.id)).sort(f),V=X.find(te=>!j.has(te.round.id))??X[0];return V?{...c(),status:"ready",round:{...h(V),...c()}}:{...c(),status:"exhausted"}},async getRoundState(w){let C=await o.getRound(t,w);if(!C)throw new Error(kh);let D=d(C),{state:j,version:X}=await _(w,D.limits),V=await T(w,D.limits,j,X),te=u(D,V);return te!==V&&te.finished&&await o.recordScore(t,w,r,te.score),{...te,...c()}},async getProfile(){let w=await o.getProfile(t,r);return{...w,display_name:ls(r,w.display_name),...c()}},async getLeaderboard(w){let D=(await o.getCurrentRound(t))?.round.id??"";return{...await o.getLeaderboard(t,D,{limit:w,viewerId:r}),...c()}},async play(w,C){let D=await o.getRound(t,w);if(!D)return A("rejected",kh,0);let j=d(D);if(e.runtime.identity?.required&&bh(r))return A("rejected",e.identityRefusal??"identity_required",j.round.version);if(p(j)>0)return{...A("busy","fair_use",j.round.version),retry_after_seconds:p(j)};if(j.limits.playsPerSecond!==void 0){let Ze=i().slice(0,19),F=await o.countPlay(t,w,Ze,r),Ke=Math.max(1,Math.ceil(j.limits.playsPerSecond/F.buckets));if(F.inBucket>Ke)return await m(w,Ze),{...A("busy","capped",j.round.version),retry_after_seconds:1}}let X=await o.getPlay(t,r,C.idempotency_key);if(X)return{...X.result,...c(),outcome:"duplicate"};let{state:V,version:te}=await _(w,j.limits),qt=n.admissible({accepting:j.round.can.accepting_plays,roundVersion:j.round.version,playedVersion:C.round_version,challengeInstanceId:j.round.challenge_instance_id??null,playedChallengeInstanceId:C.challenge_instance_id??null,state:V,secret:j.secret,limits:j.limits,now:i()});if(!qt.ok){let Ze=qt.reason==="round_version"?"stale":"rejected";return A(Ze,qt.reason,j.round.version)}let Q=n.mark({payload:C.payload,secret:j.secret,state:V,limits:j.limits,markAtSettlement:e.runtime.marking==="at_settlement",now:i()});if(Q.outcome!=="accepted")return A("rejected",Q.reason??"rejected",j.round.version);let Oe={...c(),play_id:s(),outcome:Q.outcome,round_version:j.round.version,marked:Q.marked,feedback:Q.feedback,round_state:{...Q.next,...c()}},wn=`play:${JSON.stringify([t,r,C.idempotency_key])}`,kn=[{id:wn,at:Oe.server_time,tenant:t,round_id:w,player_id:r,action:"play.committed",detail:{play_id:Oe.play_id,idempotency_key:C.idempotency_key,outcome:Oe.outcome,marked:Oe.marked,round_version:Oe.round_version,score_before:V.score,score_after:Q.next.score,attempts_used:Q.next.attempts_used,attempts_allowed:Q.next.attempts_allowed,mistakes_used:Q.next.mistakes_used,mistakes_allowed:Q.next.mistakes_allowed,...n.auditDetail({secret:j.secret,before:V,decision:Q,payload:C.payload})}}];Q.marked&&kn.push({id:`score:${JSON.stringify([t,r,C.idempotency_key])}`,at:Oe.server_time,tenant:t,round_id:w,player_id:r,action:"score.recorded",detail:{play_id:Oe.play_id,score_before:V.score,score_after:Q.next.score,marked:!0,outcome:Q.next.outcome}});let Vo=Q.next.finished&&!V.finished?Va(await o.getProfile(t,r),Q.next.outcome):void 0,pe=await o.commitPlay({tenant:t,playerId:r,idempotencyKey:C.idempotency_key,play:{result:Oe},state:Q.next,expectedVersion:te,audit:kn,...Q.marked?{score:{roundId:w,score:Q.next.score}}:{},...Vo?{profile:Vo}:{}});if(!pe.ok&&pe.reason==="play_exists"){let Ze=await o.getPlay(t,r,C.idempotency_key);return Ze?{...Ze.result,...c(),outcome:"duplicate"}:(Wt({stage:"play_receipt_missing",tenant:t,round_id:w,player_id:r}),A("rejected","play_conflict",j.round.version))}return pe.ok?Oe:(await o.appendAudit({id:wn,at:Oe.server_time,tenant:t,round_id:w,player_id:r,action:"play.refused",detail:{play_id:Oe.play_id,idempotency_key:C.idempotency_key,reason:"round_version",attempt_spent:!1}}),A("stale","round_version",j.round.version))}}}var Kt,kh,yn=v(()=>{"use strict";yh();_h();cs();wh();ie();Kt="time_expired",kh="round_not_found"});function oO(e){return e.accepting?e.playedVersion!==e.roundVersion?{ok:!1,reason:"round_version"}:e.challengeInstanceId!==null&&e.playedChallengeInstanceId!==e.challengeInstanceId?{ok:!1,reason:"challenge_instance_id"}:e.state.finished?{ok:!1,reason:"round_finished"}:Zt(e)?{ok:!1,reason:Kt}:e.state.attempts_used>=e.limits.attemptsAllowed?{ok:!1,reason:"attempts_exhausted"}:e.state.mistakes_used>=e.limits.mistakesAllowed?{ok:!1,reason:"mistakes_exhausted"}:{ok:!0}:{ok:!1,reason:"round_closed"}}function iO(e){let{attempt:t,secret:r,state:o,limits:n}=e,i=new Set(Array.isArray(o.progress.solved)?o.progress.solved:[]),a=t.picks.filter(A=>r.targets.includes(A)&&!i.has(A)),s=t.picks.filter(A=>!r.targets.includes(A)),c=o.attempts_used+1,d=o.mistakes_used+(s.length>0?1:0);for(let A of a)i.add(A);let u=i.size>=r.required,p=d>=n.mistakesAllowed,m=c>=n.attemptsAllowed,h=u||p||m,f=e.markAtSettlement?o.score:a.length*r.pointsPerTarget+o.score+(u?r.completionBonus:0),_={...o,server_time:e.now,attempts_used:c,attempts_allowed:n.attemptsAllowed,mistakes_used:d,mistakes_allowed:n.mistakesAllowed,progress:{...o.progress,solved:[...i]},score:f,finished:h,outcome:e.markAtSettlement?"pending":u?"won":h?"lost":"incomplete"};return e.markAtSettlement?{outcome:"accepted",marked:!1,feedback:[],next:_}:{outcome:"accepted",marked:!0,feedback:t.picks.map(A=>({key:A,verdict:r.targets.includes(A)?"correct":"wrong"})),next:_}}function aO(e){return{server_time:e.now,snapshot:"",player_id:e.playerId,round_id:e.roundId,attempts_used:0,attempts_allowed:e.limits.attemptsAllowed,mistakes_used:0,mistakes_allowed:e.limits.mistakesAllowed,progress:{solved:[]},score:0,score_revision:0,finished:!1,outcome:"incomplete"}}var xh,Sh=v(()=>{"use strict";yn();xh={archetype:"hunt",admissible:oO,mark(e){let t=Array.isArray(e.payload.picks)?e.payload.picks:[];return iO({...e,attempt:{picks:t}})},initialState:aO,auditDetail({secret:e,decision:t,payload:r}){let o=Array.isArray(r.picks)?r.picks:[];return{correct_picks:t.feedback.filter(n=>n.verdict==="correct").length,picks_submitted:o.length,points_per_target:e.pointsPerTarget,completion_bonus:e.completionBonus}}}});function $h(e){let t=e.progress;return{total:typeof t.total=="number"?t.total:0,picks:Array.isArray(t.picks)?t.picks:[],bust:t.bust===!0}}function sO(e,t){if(t>e.target)return e.bustLabel;let r=(e.target-t)/e.target;for(let o of e.tiers)if(r<=o.within)return o.label;return e.floorLabel}function cO(e){return e.accepting?e.playedVersion!==e.roundVersion?{ok:!1,reason:"round_version"}:e.challengeInstanceId!==null&&e.playedChallengeInstanceId!==e.challengeInstanceId?{ok:!1,reason:"challenge_instance_id"}:e.state.finished?{ok:!1,reason:"round_finished"}:Zt(e)?{ok:!1,reason:Kt}:e.state.attempts_used>=e.limits.picksAllowed?{ok:!1,reason:"picks_exhausted"}:{ok:!0}:{ok:!1,reason:"round_closed"}}function lO(e){let{secret:t,state:r,limits:o}=e,n=$h(r),i=A=>({outcome:"rejected",reason:A,marked:!1,feedback:[],next:r});if(e.attempt.picks.length!==1)return i("one_pick_per_play");let a=t.slates[r.attempts_used];if(!a)return i("picks_exhausted");let[s]=e.attempt.picks,c=a.entries.find(A=>A.key===s);if(!c)return i("not_on_slate");let d=n.total+c.value,u=d>t.target,p=[...n.picks,{slate:a.id,key:c.key,label:c.label,value:c.value}],m=r.attempts_used+1,h=m>=o.picksAllowed,f=u||h,_={...r,server_time:e.now,attempts_used:m,attempts_allowed:o.picksAllowed,progress:{total:d,picks:p,bust:u,...f?{tier:sO(t,d)}:{}},score:e.markAtSettlement?r.score:u?0:d,finished:f,outcome:e.markAtSettlement?"pending":u?"lost":f?"won":"incomplete"};return e.markAtSettlement?{outcome:"accepted",marked:!1,feedback:[],next:_}:{outcome:"accepted",marked:!0,feedback:[{key:c.key,verdict:u?"wrong":"correct",label:String(c.value)}],next:_}}function dO(e){return{server_time:e.now,snapshot:"",player_id:e.playerId,round_id:e.roundId,attempts_used:0,attempts_allowed:e.limits.picksAllowed,mistakes_used:0,mistakes_allowed:0,progress:{total:0,picks:[],bust:!1},score:0,score_revision:0,finished:!1,outcome:"incomplete"}}var Eh,Th=v(()=>{"use strict";yn();Eh={archetype:"push",admissible:cO,mark(e){let t=Array.isArray(e.payload.picks)?e.payload.picks:[];return lO({...e,attempt:{picks:t}})},initialState:dO,auditDetail({secret:e,before:t,decision:r}){let o=$h(t),n=$h(r.next);return{target:e.target,total_before:o.total,total_after:n.total,bust:n.bust,picks_committed:n.picks.length,...n.tier?{tier:n.tier}:{}}}}});function mO(e){return e.accepting?e.playedVersion!==e.roundVersion?{ok:!1,reason:"round_version"}:e.challengeInstanceId!==null&&e.playedChallengeInstanceId!==e.challengeInstanceId?{ok:!1,reason:"challenge_instance_id"}:e.state.finished?{ok:!1,reason:"round_finished"}:Zt(e)?{ok:!1,reason:Kt}:e.state.attempts_used>=e.limits.attemptsAllowed?{ok:!1,reason:"attempts_exhausted"}:e.state.mistakes_used>=e.limits.mistakesAllowed?{ok:!1,reason:"mistakes_exhausted"}:{ok:!0}:{ok:!1,reason:"round_closed"}}function hO(e){let{attempt:t,secret:r,state:o,limits:n}=e,i=new Set(Array.isArray(o.progress.solved)?o.progress.solved:[]),a=Array.isArray(o.progress.revealed)?o.progress.revealed:[],s=r.groups.filter(j=>!i.has(j.key)),c=s.find(j=>uO(j.members,t.picks)),d=o.attempts_used+1,u=o.mistakes_used+(c?0:1);c&&(i.add(c.key),a.push({key:c.key,label:c.label,members:[...c.members]}));let p=i.size>=r.groups.length,m=u>=n.mistakesAllowed,h=d>=n.attemptsAllowed,f=p||m||h,_=e.markAtSettlement?o.score:o.score+(c?r.pointsPerGroup:0)+(p?r.completionBonus:0),T={...o,server_time:e.now,attempts_used:d,attempts_allowed:n.attemptsAllowed,mistakes_used:u,mistakes_allowed:n.mistakesAllowed,progress:{...o.progress,solved:[...i],revealed:a},score:_,finished:f,outcome:e.markAtSettlement?"pending":p?"won":f?"lost":"incomplete"};if(e.markAtSettlement)return{outcome:"accepted",marked:!1,feedback:[],next:T};let A=s.reduce((j,X)=>Math.max(j,pO(t.picks,X)),0),w=!c&&t.picks.length>1&&A===t.picks.length-1,C=c?"correct":w?"close":"wrong";return{outcome:"accepted",marked:!0,feedback:t.picks.map(j=>({key:j,verdict:C,...c?{label:c.label}:{}})),next:T}}function fO(e){return{server_time:e.now,snapshot:"",player_id:e.playerId,round_id:e.roundId,attempts_used:0,attempts_allowed:e.limits.attemptsAllowed,mistakes_used:0,mistakes_allowed:e.limits.mistakesAllowed,progress:{solved:[],revealed:[]},score:0,score_revision:0,finished:!1,outcome:"incomplete"}}var uO,pO,Uk,Fk=v(()=>{"use strict";yn();uO=(e,t)=>e.length===t.length&&new Set([...e,...t]).size===e.length,pO=(e,t)=>new Set(e.filter(r=>t.members.includes(r))).size;Uk={archetype:"group",admissible:mO,mark(e){let t=Array.isArray(e.payload.picks)?e.payload.picks:[];return hO({...e,attempt:{picks:t}})},initialState:fO,auditDetail({secret:e,decision:t,payload:r}){let o=Array.isArray(r.picks)?r.picks:[],n=t.feedback[0]?.verdict;return{group_found:n==="correct"?t.next.progress.solved.at(-1):null,near_miss:n==="close",picks_submitted:o.length,groups_total:e.groups.length,points_per_group:e.pointsPerGroup}}}});function gO(e,t){if(t.answers)return t.answers;if(t.pick===void 0)return{};let r=e.questions[0];return r?{[r.id]:t.pick}:{}}function yO(e,t){return e.kind==="number"?!(typeof t!="number"||!Number.isFinite(t)||e.min!==void 0&&t<e.min||e.max!==void 0&&t>e.max):typeof t=="string"&&(e.options??[]).some(r=>r.key===t)}function vO(e){return e.accepting?e.playedVersion!==e.roundVersion?{ok:!1,reason:"round_version"}:e.challengeInstanceId!==null&&e.playedChallengeInstanceId!==e.challengeInstanceId?{ok:!1,reason:"challenge_instance_id"}:Zt(e)?{ok:!1,reason:Kt}:e.state.attempts_used>=e.limits.attemptsAllowed?{ok:!1,reason:"attempts_exhausted"}:{ok:!0}:{ok:!1,reason:"round_closed"}}function bO(e){let{attempt:t,secret:r,state:o,limits:n}=e,i=gO(r,t),a=o.attempts_used+1;if(r.questions.filter(u=>i[u.id]===void 0).length>0)return{outcome:"rejected",reason:"incomplete_prediction",marked:!1,feedback:[],next:o};let c=r.questions.find(u=>!yO(u,i[u.id]));if(c)return{outcome:"rejected",reason:c.kind==="number"?"out_of_range":"unknown_option",marked:!1,feedback:[],next:o};let d={...o,server_time:e.now,attempts_used:a,attempts_allowed:n.attemptsAllowed,progress:{...o.progress,answers:i},finished:a>=n.attemptsAllowed};return r.questions.some(u=>u.result===void 0)?{outcome:"accepted",marked:!1,feedback:[],next:{...d,outcome:"pending"}}:{outcome:"accepted",marked:!0,feedback:_O(r,i),next:Gk(r,d,i)}}function _O(e,t){return e.questions.map(r=>{let o=t[r.id],n=Ma(r,o,e.pointsForCorrect),i=r.kind==="number"?String(r.result):(r.options??[]).find(a=>a.key===r.result)?.label;return{key:r.id,verdict:n===e.pointsForCorrect||n>0&&r.kind!=="number"?"correct":n>0?"partial":"wrong",...i?{label:i}:{}}})}function Gk(e,t,r){let o=0,n=!0;for(let i of e.questions){let a=Ma(i,r[i.id],e.pointsForCorrect);o+=a,a!==Ma(i,i.result,e.pointsForCorrect)&&(n=!1)}return{...t,score:o,finished:!0,outcome:n?"won":o>0?"partial":"lost"}}function wO(e){let{secret:t,state:r}=e;if(t.questions.some(n=>n.result===void 0))return r;let o=kO(r);return Object.keys(o).length===0?{...r,server_time:e.now,finished:!0,outcome:"lost"}:{...Gk(t,r,o),server_time:e.now}}function kO(e){let t=e.progress.answers;if(t&&typeof t=="object"&&!Array.isArray(t))return t;let r=Array.isArray(e.progress.picks)?e.progress.picks:[];return r.length>0?{1:r[0]}:{}}function xO(e){return{server_time:e.now,snapshot:"",player_id:e.playerId,round_id:e.roundId,attempts_used:0,attempts_allowed:e.limits.attemptsAllowed,mistakes_used:0,mistakes_allowed:0,progress:{answers:{}},score:0,score_revision:0,finished:!1,outcome:"incomplete"}}var Bk,Wk=v(()=>{"use strict";ie();yn();Bk={archetype:"predict",admissible:vO,mark(e){let t=e.payload.answers,r=t&&typeof t=="object"&&!Array.isArray(t)?t:void 0,o=typeof e.payload.pick=="string"?e.payload.pick:Array.isArray(e.payload.picks)&&typeof e.payload.picks[0]=="string"?e.payload.picks[0]:void 0;return bO({...e,attempt:r?{answers:r}:{pick:o}})},initialState:xO,settle:wO,auditDetail({secret:e,decision:t,payload:r}){let o=r.answers;return{predicted:o&&typeof o=="object"&&!Array.isArray(o)?o:typeof r.pick=="string"&&e.questions[0]?{[e.questions[0].id]:r.pick}:null,settled_at_commit:e.questions.every(i=>i.result!==void 0),marked:t.marked,questions_asked:e.questions.length}}}});function SO(e){return Zk[He(e)]}function Kk(e){return SO(e.archetype??"hunt")}function Vk(e){return{server_time:"",snapshot:e.snapshot,game:e.game,api_version:"2.0",archetype:e.archetype,marking:e.marking??"at_commit",challenge_source:e.challengeSource??"shared",schedule:{kind:"local_midnight"},updates:{transport:"poll",freshness_seconds:30},display:{title:e.title??e.game},identity:{required:e.identityRequired??!1,provider:"jwt",anonymous_play:!e.identityRequired},archive:!0,capabilities:["plays","profile","leaderboard","rounds"]}}var Zk,vn,ds=v(()=>{"use strict";ie();Sh();Th();Fk();Wk();Zk={hunt:xh,push:Eh,group:Uk,predict:Bk},vn=Object.keys(Zk)});function Hk(e){let t=Kk(e.round);if(t)return zk({...e,rules:t})}var Jk=v(()=>{"use strict";yn();ds();Sh();Th();yn()});function Yk(e){let t=new Map,r=new Map,o=new Map,n=new Map,i=new Map,a=new Map,s=new Map,c=e.currentRoundId,d,u=e.now??Date.now;for(let p of e.rounds)t.set(p.round.id,p);for(let p of e.states??[])r.set(Me(e.tenant,p.round_id,p.player_id),{state:p,version:0});return{async getRound(p,m){let h=t.get(m);return h?structuredClone(h):void 0},async putRound(p,m,h){t.set(m.round.id,structuredClone(m)),h&&(c=m.round.id,d=void 0)},async setRotation(p,m,h){d={roundIds:[...m],windowSeconds:h}},async getCurrentRound(){let p=d?d.roundIds[Math.floor(u()/1e3/d.windowSeconds)%d.roundIds.length]:c,m=t.get(p);return m?structuredClone(m):void 0},async listRounds(){return[...t.values()].map(p=>structuredClone(p))},async listStatesForPlayer(p,m){return[...r.entries()].filter(([h,f])=>h.startsWith(`${p}#`)&&f.state.player_id===m).map(([,h])=>structuredClone(h.state))},async getState(p,m,h){let f=r.get(Me(p,m,h));return f?structuredClone(f):void 0},async putStateIfVersion(p,m,h){let f=Me(p,m.round_id,m.player_id),_=r.get(f);return h===void 0?_?!1:(r.set(f,{state:structuredClone(m),version:0}),!0):!_||_.version!==h?!1:(r.set(f,{state:structuredClone(m),version:_.version+1}),!0)},async getPlay(p,m,h){let f=o.get(Me(p,m,h));return f?structuredClone(f):void 0},async putPlayIfAbsent(p,m,h,f){let _=Me(p,m,h);return o.has(_)?!1:(o.set(_,structuredClone(f)),!0)},async getLeaderboard(p,m,h){if(e.leaderboard)return structuredClone(e.leaderboard);let f=[...n.entries()].filter(([T])=>T.startsWith(Me(p,m)+"#")).map(([T,A])=>({rank:0,player_id:T.slice(T.lastIndexOf("#")+1),display_name:ls(T.slice(T.lastIndexOf("#")+1)),score:A})).sort((T,A)=>A.score-T.score).map((T,A)=>({...T,rank:A+1})),_=h?.limit??f.length;return{server_time:"",snapshot:"",round_id:m,order:"high_first",tie_break:"earliest_play",entries:f.slice(0,_),total:f.length,truncated:!1,me:h?.viewerId?f.find(T=>T.player_id===h.viewerId):void 0}},async getProfile(p,m){let h=s.get(Me(p,m));return h?structuredClone(h):e.profile?structuredClone(e.profile):{server_time:"",snapshot:"",player_id:m,played:0,won:0,current_streak:0,max_streak:0,distribution:{},constraints:{}}},async countPlay(p,m,h,f){let _=Me(p,m,h,String(ss(f))),T=(i.get(_)??0)+1;return i.set(_,T),{inBucket:T,buckets:Ck}},async setFuse(p,m,h){let f=t.get(m);f&&(f.fusedUntil=h)},async setResult(p,m,h){let f=t.get(m);if(!f)return;let T=f.secret.questions??[];if(typeof h=="string")T[0]&&(T[0].result=h);else for(let w of T){let C=h[w.id];C!==void 0&&(w.result=C)}let A=T.every(w=>w.result!==void 0);f.round.challenge={...f.round.challenge,...A?{questions:T.map(w=>({...f.round.challenge.questions?.find(C=>C.id===w.id),id:w.id,result:w.result})),...typeof h=="string"?{result:h}:{}}:{}},f.round.can={...f.round.can,accepting_plays:!1,results_available:!0,solution_revealed:!0,closed:!0}},async recordScore(p,m,h,f){n.set(Me(p,m,h),f)},async appendAudit(p){if(a.has(p.id))throw Dk("audit_record_overwrite",{tenant:p.tenant,round_id:p.round_id,action:p.action,record_id:p.id}),new Error("audit_record_exists");a.set(p.id,structuredClone(p))},async commitPlay(p){let m=Me(p.tenant,p.playerId,p.idempotencyKey);if(o.has(m))return{ok:!1,reason:"play_exists"};let h=Me(p.tenant,p.state.round_id,p.state.player_id),f=r.get(h);if(p.expectedVersion===void 0){if(f)return{ok:!1,reason:"state_version"}}else if(!f||f.version!==p.expectedVersion)return{ok:!1,reason:"state_version"};for(let _ of p.audit)if(a.has(_.id))throw new Error("audit_record_exists");o.set(m,structuredClone(p.play)),r.set(h,{state:structuredClone(p.state),version:p.expectedVersion===void 0?0:p.expectedVersion+1});for(let _ of p.audit)a.set(_.id,structuredClone(_));return p.score&&n.set(Me(p.tenant,p.score.roundId,p.playerId),p.score.score),p.profile&&s.set(Me(p.tenant,p.playerId),structuredClone(p.profile)),{ok:!0}}}}var Me,qk=v(()=>{"use strict";wh();yh();cs();Me=(...e)=>e.join("#")});function $O(e,t){return{archetype:"hunt",round:{server_time:"",snapshot:t,id:ar(e),number:e.number,can:{accepting_plays:e.open,results_available:!1,solution_revealed:!1,closed:!e.open,optimistic_play:!1},challenge_instance_id:null,challenge:{board:e.board,pick:e.required??e.targets.length,prompt:e.prompt}},secret:{targets:e.targets,required:e.required??e.targets.length,pointsPerTarget:e.pointsPerTarget,completionBonus:e.completionBonus},limits:{attemptsAllowed:e.attemptsAllowed,mistakesAllowed:e.mistakesAllowed,...e.playsPerSecond===void 0?{}:{playsPerSecond:e.playsPerSecond}}}}function EO(e,t){return{archetype:"push",round:{server_time:"",snapshot:t,id:ar(e),number:e.number,can:{accepting_plays:e.open,results_available:!1,solution_revealed:!1,closed:!e.open,optimistic_play:!1},challenge_instance_id:null,challenge:{theme:e.theme,prompt:e.prompt,target:e.target,target_label:e.targetLabel,unit:e.unit,picks:e.slates.length,slates:e.slates.map(o=>({id:o.id,label:o.label,entries:o.entries.map(n=>({key:n.key,label:n.label}))})),tiers:e.tiers,floor_label:e.floorLabel,bust_label:e.bustLabel}},secret:{target:e.target,targetLabel:e.targetLabel,slates:e.slates,tiers:e.tiers,floorLabel:e.floorLabel,bustLabel:e.bustLabel},limits:{picksAllowed:e.slates.length,...e.playsPerSecond===void 0?{}:{playsPerSecond:e.playsPerSecond}}}}function TO(e,t){return{archetype:"group",round:{server_time:"",snapshot:t,id:ar(e),number:e.number,can:{accepting_plays:e.open,results_available:!1,solution_revealed:!1,closed:!e.open,optimistic_play:!1},challenge_instance_id:null,challenge:{board:e.board,prompt:e.prompt,groups:e.groups.length,group_size:e.groups[0]?.members.length??0}},secret:{groups:e.groups,pointsPerGroup:e.pointsPerGroup,completionBonus:e.completionBonus},limits:{attemptsAllowed:e.attemptsAllowed,mistakesAllowed:e.mistakesAllowed,...e.playsPerSecond===void 0?{}:{playsPerSecond:e.playsPerSecond}}}}function AO(e,t){let r=t_(e),o=r.every(i=>i.result!==void 0);return{archetype:"predict",round:{server_time:"",snapshot:t,id:ar(e),number:e.number,can:{accepting_plays:e.open&&!o,results_available:o,solution_revealed:o,closed:!e.open||o,optimistic_play:!1},challenge_instance_id:null,challenge:{prompt:e.prompt,questions:r.map(i=>({id:i.id,kind:i.kind,prompt:i.prompt,...i.options?{options:i.options.map(a=>({key:a.key,label:a.label}))}:{},...i.min!==void 0?{min:i.min}:{},...i.max!==void 0?{max:i.max}:{},...i.step!==void 0?{step:i.step}:{},...o&&i.result!==void 0?{result:i.result}:{}})),...e.options?{options:e.options.map(i=>({key:i.key,label:i.label}))}:{},...o&&e.result!==void 0?{result:e.result}:{}}},secret:{questions:r,pointsForCorrect:e.pointsForCorrect},limits:{attemptsAllowed:e.attemptsAllowed,...e.playsPerSecond===void 0?{}:{playsPerSecond:e.playsPerSecond}}}}function IO(e,t){let r=CO(e,t);return e.timerSeconds===void 0?r:{...r,round:{...r.round,timer_seconds:e.timerSeconds},limits:{...r.limits,timerSeconds:e.timerSeconds}}}function CO(e,t){switch(e.archetype){case"hunt":return $O(e,t);case"push":return EO(e,t);case"group":return TO(e,t);case"predict":return AO(e,t)}}function us(e){return e===null||typeof e!="object"?JSON.stringify(e):Array.isArray(e)?`[${e.map(us).join(",")}]`:`{${Object.entries(e).filter(([,r])=>r!==void 0).sort(([r],[o])=>r<o?-1:r>o?1:0).map(([r,o])=>`${JSON.stringify(r)}:${us(o)}`).join(",")}}`}function PO(e,t){let r=o=>{let{server_time:n,snapshot:i,...a}=o,{version:s,...c}=a;return c};return us({round:r(e.round),secret:e.secret,limits:e.limits,archetype:e.archetype})===us({round:r(t.round),secret:t.secret,limits:t.limits,archetype:t.archetype??"hunt"})}async function Ah(e,t,r,o,n=!0,i,a){let s=i??ar(r),c=await e.getRound(t,s),d=IO(r,o);if(d.round.id=s,a&&(d.round.origin=a),c&&PO(d,c)){let{fusedUntil:m,...h}=c;return await e.putRound(t,{...h,archetype:d.archetype},n),{roundId:s,version:c.round.version,changed:!1,current:n}}let u=c?c.round.version+1:1,p={round:{...d.round,version:u},secret:d.secret,limits:d.limits,archetype:d.archetype};return await e.putRound(t,p,n),await e.appendAudit({id:`round_${s}_v${u}`,at:new Date().toISOString(),tenant:t,round_id:s,player_id:null,action:c?"round.replaced":"round.provisioned",detail:{version:u,snapshot:o,number:r.number,archetype:r.archetype,accepting_plays:r.open}}),{roundId:s,version:u,changed:!0,current:n}}var Xk=v(()=>{"use strict";ie()});function Qe(e){let t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`^${t.replace(/\\\{[^}]+\\\}/g,"([^/]+)")}$`)}async function ex(e,t,r,o){let n=e.path.replace(/\/+$/,"")||e.path;if(e.method==="OPTIONS")return{status:204,headers:Ih,body:void 0};if(e.method==="GET"&&n===`${Ka}/health`)return ze(200,{status:"ok"});let i=et.session.exec(n);if(i){if(e.method!=="POST")return dt(405,"method_not_allowed","This route accepts POST.");let s=decodeURIComponent(i[1]),c=o?.check(rh(s,nh(e)));if(c&&!c.allowed)return Qk(c.retryAfterSeconds);let d=r?.issue(s);return d?ze(200,{server_time:"",snapshot:"",token:d.token,player_id:d.playerId,kind:"anonymous"}):dt(503,"unavailable","This deployment cannot issue a session.",!0)}let a=[["runtime",et.runtime],["currentRound",et.currentRound],["rounds",et.rounds],["roundsMine",et.roundsMine],["nextRound",et.nextRound],["plays",et.plays],["roundState",et.roundState],["profile",et.profile],["leaderboard",et.leaderboard],["round",et.round]];for(let[s,c]of a){let d=c.exec(n);if(!d)continue;let u=decodeURIComponent(d[1]),p=d[2]?decodeURIComponent(d[2]):void 0,m=o?.check(rh(u,nh(e)));if(m&&!m.allowed)return Qk(m.retryAfterSeconds);let h=s==="plays";if(h?e.method!=="POST":e.method!=="GET")return dt(405,"method_not_allowed",`This route accepts ${h?"POST":"GET"}.`);let f;try{f=await t.forPlayer(u,e)}catch(_){return Wt({path:e.path,method:e.method,game:u,stage:"resolve",name:gn(_)}),dt(503,"unavailable","The Engine is briefly unavailable.",!0)}if(!f)return dt(404,"not_found",`No game with id "${u}".`);try{switch(s){case"runtime":return ze(200,await f.getRuntime());case"currentRound":return ze(200,await f.getCurrentRound());case"rounds":return ze(200,await f.getRoundPool());case"roundsMine":return ze(200,await f.getPlayedRounds());case"nextRound":return ze(200,await f.getNextRound());case"round":{let _=await f.getRound(p);return _?ze(200,_):dt(404,"not_found","No such round.")}case"roundState":return ze(200,await f.getRoundState(p));case"profile":return ze(200,await f.getProfile());case"leaderboard":return ze(200,await f.getLeaderboard());case"plays":{let _=gw.safeParse(e.body);if(!_.success)return dt(422,"invalid_request",_.error.issues.map(w=>`${w.path.join(".")||"body"}: ${w.message}`).join("; "));let T=await f.play(p,_.data),A=ze(200,T);return T.outcome==="busy"&&T.retry_after_seconds&&(A.headers["retry-after"]=String(T.retry_after_seconds)),A}}}catch(_){return _ instanceof Error&&_.message==="round_not_found"?dt(404,"not_found","No such round."):(Wt({path:e.path,method:e.method,game:u,name:gn(_)}),dt(500,"internal","Something went wrong at our end.",!0))}}return OO}var Ih,ze,dt,et,OO,Qk,tx=v(()=>{"use strict";ie();cs();Ih={"access-control-allow-origin":"*","access-control-allow-methods":"GET, POST, OPTIONS","access-control-allow-headers":"authorization, content-type, x-gamestage-player","access-control-max-age":"600"},ze=(e,t)=>({status:e,headers:{"content-type":"application/json",...Ih},body:t}),dt=(e,t,r,o=!1)=>ze(e,{error:{code:t,message:r,retryable:o}});et={runtime:Qe(re.runtime),currentRound:Qe(re.currentRound),rounds:Qe(re.rounds),roundsMine:Qe(re.roundsMine),nextRound:Qe(re.nextRound),round:Qe(re.round),plays:Qe(re.plays),roundState:Qe(re.roundState),profile:Qe(re.profile),leaderboard:Qe(re.leaderboard),session:Qe(re.session)},OO=dt(404,"not_found","No such route on the player API."),Qk=e=>({status:429,headers:{"content-type":"application/json","retry-after":String(e),...Ih},body:{error:{code:"rate_limited",message:"Too many requests for this game from one caller. Slow down.",retryable:!0}}})});function ms(...e){let t=e.reduce((n,{length:i})=>n+i,0),r=new Uint8Array(t),o=0;for(let n of e)r.set(n,o),o+=n.length;return r}function _t(e){let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);if(o>127)throw new TypeError("non-ASCII string encountered in encode()");t[r]=o}return t}var bn,No,ps,I6,wr=v(()=>{bn=new TextEncoder,No=new TextDecoder,ps=new TextDecoder("utf-8",{fatal:!0}),I6=2**32});function NO(e,t){if(t&&!e.usages.includes(t))throw new TypeError(`CryptoKey does not support this operation, its usages must include ${t}.`)}function nx(e,t,r){let o=e.algorithm;if(o.name!==t.name)throw hs(t.name);if(t.hash&&o.hash?.name!==t.hash)throw hs(t.hash,"algorithm.hash");if(t.namedCurve&&o.namedCurve!==t.namedCurve)throw hs(t.namedCurve,"algorithm.namedCurve");if(t.length!==void 0&&o.length!==t.length)throw hs(t.length,"algorithm.length");NO(e,r)}var hs,rx=v(()=>{hs=(e,t="algorithm.name")=>new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)});function ox(e,t,...r){if(r=r.filter(Boolean),r.length>2){let o=r.pop();e+=`one of type ${r.join(", ")}, or ${o}.`}else r.length===2?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return t==null?e+=` Received ${t}`:typeof t=="function"&&t.name?e+=` Received function ${t.name}`:typeof t=="object"&&t!=null&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}var ix,Ch,Ph=v(()=>{ix=(e,...t)=>ox("Key must be ",e,...t),Ch=(e,t,...r)=>ox(`Key for the ${e} algorithm must be `,t,...r)});var ve,Ue,Ro,fs,ue,ee,Vt,Do,kr,gs,ys,vs,Ee=v(()=>{ve=class extends Error{static code="ERR_JOSE_GENERIC";code="ERR_JOSE_GENERIC";constructor(t,r){super(t,r),this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}},Ue=class extends ve{static code="ERR_JWT_CLAIM_VALIDATION_FAILED";code="ERR_JWT_CLAIM_VALIDATION_FAILED";claim;reason;payload;constructor(t,r,o="unspecified",n="unspecified"){super(t,{cause:{claim:o,reason:n,payload:r}}),this.claim=o,this.reason=n,this.payload=r}},Ro=class extends ve{static code="ERR_JWT_EXPIRED";code="ERR_JWT_EXPIRED";claim;reason;payload;constructor(t,r,o="unspecified",n="unspecified"){super(t,{cause:{claim:o,reason:n,payload:r}}),this.claim=o,this.reason=n,this.payload=r}},fs=class extends ve{static code="ERR_JOSE_ALG_NOT_ALLOWED";code="ERR_JOSE_ALG_NOT_ALLOWED"},ue=class extends ve{static code="ERR_JOSE_NOT_SUPPORTED";code="ERR_JOSE_NOT_SUPPORTED"},ee=class extends ve{static code="ERR_JWS_INVALID";code="ERR_JWS_INVALID"},Vt=class extends ve{static code="ERR_JWT_INVALID";code="ERR_JWT_INVALID"},Do=class extends ve{static code="ERR_JWKS_INVALID";code="ERR_JWKS_INVALID"},kr=class extends ve{static code="ERR_JWKS_NO_MATCHING_KEY";code="ERR_JWKS_NO_MATCHING_KEY";constructor(t="no applicable key found in the JSON Web Key Set",r){super(t,r)}},gs=class extends ve{[Symbol.asyncIterator]=async function*(){};static code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";constructor(t="multiple matching keys found in the JSON Web Key Set",r){super(t,r)}},ys=class extends ve{static code="ERR_JWKS_TIMEOUT";code="ERR_JWKS_TIMEOUT";constructor(t="request timed out",r){super(t,r)}},vs=class extends ve{static code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";constructor(t="signature verification failed",r){super(t,r)}}});var xr,Oh,Nh,Rh=v(()=>{xr=e=>{if(e?.[Symbol.toStringTag]==="CryptoKey")return!0;try{return e instanceof CryptoKey}catch{return!1}},Oh=e=>e?.[Symbol.toStringTag]==="KeyObject",Nh=e=>xr(e)||Oh(e)});function Dh(e){if(Uint8Array.prototype.toBase64)return e.toBase64();let t=32768,r=[];for(let o=0;o<e.length;o+=t)r.push(String.fromCharCode.apply(null,e.subarray(o,o+t)));return btoa(r.join(""))}function bs(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(e);let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r}var jh=v(()=>{});function jo(e){if(Uint8Array.fromBase64)try{return Uint8Array.fromBase64(typeof e=="string"?e:No.decode(e),{alphabet:"base64url"})}catch(r){throw new TypeError("The input to be decoded is not correctly encoded.",{cause:r})}let t=e;if(t instanceof Uint8Array&&(t=No.decode(t)),t.includes("+")||t.includes("/"))throw new TypeError("The input to be decoded is not correctly encoded.");t=t.replace(/-/g,"+").replace(/_/g,"/");try{return bs(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}}function Sr(e){let t=e;return typeof t=="string"&&(t=bn.encode(t)),Uint8Array.prototype.toBase64?t.toBase64({alphabet:"base64url",omitPadding:!0}):Dh(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var Lo=v(()=>{wr();jh()});function tt(e){if(!RO(e)||Object.prototype.toString.call(e)!=="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function _s(...e){let t=e.filter(Boolean);if(t.length===0||t.length===1)return!0;let r;for(let o of t){let n=Object.keys(o);if(!r||r.size===0){r=new Set(n);continue}for(let i of n){if(r.has(i))return!1;r.add(i)}}return!0}var RO,Lh,ax,sx,cx,Ht=v(()=>{RO=e=>typeof e=="object"&&e!==null;Lh=e=>tt(e)&&typeof e.kty=="string",ax=e=>e.kty!=="oct"&&(e.kty==="AKP"&&typeof e.priv=="string"||typeof e.d=="string"),sx=e=>e.kty!=="oct"&&e.d===void 0&&e.priv===void 0,cx=e=>e.kty==="oct"&&typeof e.k=="string"});function Mh(e,t){if(e)throw new TypeError(`${t} can only be called once`)}function zh(e,t,r){try{return jo(e)}catch{throw new r(`Failed to base64url decode the ${t}`)}}function lx(e,t,r){try{return _t(e)}catch{throw new r(`The ${t} is not a valid base64url string`)}}function dx(e,t,r){let o;try{o=JSON.parse(ps.decode(jo(e)))}catch{throw new t(r)}if(!tt(o))throw new t(r);return o}var Uh=v(()=>{Lo();wr();Ht()});function LO(e,t){if(!e.kty.includes(t.kty))throw new ue(jO);return e.subtleFor?.({kty:t.kty,crv:t.crv})??e.subtle}async function ws(e,t){if(t.kty==="RSA"&&"oth"in t&&t.oth!==void 0)throw new ue('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');let r=LO(e,t),o=!!(t.d||t.priv),n=o?e.usages.private:e.usages.public,i={...t};return i.kty!=="AKP"&&delete i.alg,delete i.use,crypto.subtle.importKey("jwk",i,r,t.ext??!o,t.key_ops??n)}var jO,Fh=v(()=>{Ee();jO='Invalid or unsupported JWK "alg" (Algorithm) Parameter value'});function UO(e,t,r){return e.symmetric?MO(e,t,r):zO(e,t,r)}function mx(e,t){return xs||=new WeakMap,xs.get(e)?.[t]}function hx(e,t,r){let o=xs.get(e);return o?o[t]=r:xs.set(e,{[t]:r}),r}async function Ss(e,t,r){let o=UO(e,t,r);switch(o.kind){case px:case Bh:return o.key;case ks:{if(o.key.k)return jo(o.key.k);if(!Object.isFrozen(o.key)){let{key_ops:n}=o.key;Array.isArray(n)&&Object.freeze(n),Object.freeze(o.key)}return ux(o.key,o.key,e)}case Wh:{let n=o.key;return n.type==="secret"?n.export():"toCryptoKey"in n&&typeof n.toCryptoKey=="function"?GO(n,e):ux(n,n.export({format:"jwk"}),e)}}}var $r,Gh,MO,zO,px,Bh,Wh,ks,xs,FO,ux,GO,Zh=v(()=>{Ph();Rh();Ht();Lo();Fh();$r=e=>e[Symbol.toStringTag],Gh=(e,t,r)=>{let{alg:o}=e;if(t.use!==void 0){let n;switch(r){case"sign":case"verify":n="sig";break;case"encrypt":case"decrypt":n="enc";break}if(t.use!==n)throw new TypeError(`Invalid key for this operation, its "use" must be "${n}" when present`)}if(t.alg!==void 0&&t.alg!==o)throw new TypeError(`Invalid key for this operation, its "alg" must be "${o}" when present`);if(Array.isArray(t.key_ops)){let n=r==="encrypt"||r==="decrypt"?e.keyOps?.[r]:r;if(n&&t.key_ops?.includes?.(n)===!1)throw new TypeError(`Invalid key for this operation, its "key_ops" must include "${n}" when present`)}return!0},MO=(e,t,r)=>{let{alg:o}=e;if(t instanceof Uint8Array)return{kind:px,key:t};if(Lh(t)){if(cx(t)&&Gh(e,t,r))return{kind:ks,key:t};throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!Nh(t))throw new TypeError(Ch(o,t,"CryptoKey","KeyObject","JSON Web Key","Uint8Array"));if(t.type!=="secret")throw new TypeError(`${$r(t)} instances for symmetric algorithms must be of type "secret"`);return xr(t)?{kind:Bh,key:t}:{kind:Wh,key:t}},zO=(e,t,r)=>{let{alg:o}=e;if(Lh(t))switch(r){case"decrypt":case"sign":if(ax(t)&&Gh(e,t,r))return{kind:ks,key:t};throw new TypeError("JSON Web Key for this operation must be a private JWK");case"encrypt":case"verify":if(sx(t)&&Gh(e,t,r))return{kind:ks,key:t};throw new TypeError("JSON Web Key for this operation must be a public JWK")}if(!Nh(t))throw new TypeError(Ch(o,t,"CryptoKey","KeyObject","JSON Web Key"));if(t.type==="secret")throw new TypeError(`${$r(t)} instances for asymmetric algorithms must not be of type "secret"`);if(t.type==="public")switch(r){case"sign":throw new TypeError(`${$r(t)} instances for asymmetric algorithm signing must be of type "private"`);case"decrypt":throw new TypeError(`${$r(t)} instances for asymmetric algorithm decryption must be of type "private"`)}if(t.type==="private")switch(r){case"verify":throw new TypeError(`${$r(t)} instances for asymmetric algorithm verifying must be of type "public"`);case"encrypt":throw new TypeError(`${$r(t)} instances for asymmetric algorithm encryption must be of type "public"`)}return xr(t)?{kind:Bh,key:t}:{kind:Wh,key:t}},px=Symbol(),Bh=Symbol(),Wh=Symbol(),ks=Symbol();FO={__proto__:null,prime256v1:"P-256",secp384r1:"P-384",secp521r1:"P-521"};ux=async(e,t,r)=>{let o=mx(e,r.alg);if(o)return o;let n=await ws(r,{...t,alg:r.alg});return hx(e,r.alg,n)},GO=(e,t)=>{let r=mx(e,t.alg);if(r)return r;let o=e.type==="public",n=o?t.usages.public:t.usages.private,{asymmetricKeyType:i}=e,a=FO[e.asymmetricKeyDetails?.namedCurve],s=t.subtleFor?.({crv:a,asymmetricKeyType:i})??t.subtle;return hx(e,t.alg,e.toCryptoKey(s,o,n))}});function Mo(e){let t={__proto__:null};for(let r of Object.keys(e))t[r]={...e[r],alg:r};return t}var Kh=v(()=>{});function $s(e){return{kty:["RSA"],subtle:{name:"RSA-OAEP",hash:`SHA-${e}`},usages:BO,minModulusLength:2048,keyOps:{encrypt:"wrapKey",decrypt:"unwrapKey"}}}function Es(e){return{kty:["EC","OKP"],subtle:{name:"ECDH"},subtleFor:({kty:t,crv:r,asymmetricKeyType:o})=>{if(r==="X25519"||o==="x25519")return{name:"X25519"};if(t==="OKP")throw new ue('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');return{name:"ECDH",namedCurve:r}},usages:WO,kwBits:e,keyOps:{decrypt:"deriveBits"}}}function Vh(e){return{kty:["oct"],symmetric:!0,subtle:{name:"AES-KW",length:e},usages:Ts,keyOps:{encrypt:"wrapKey",decrypt:"unwrapKey"}}}function Hh(e){return{kty:["oct"],symmetric:!0,subtle:{name:"AES-GCM",length:e},usages:Ts,gcmkw:`A${e}GCM`,keyOps:{encrypt:"encrypt",decrypt:"decrypt"}}}function Jh(e,t){return{kty:["oct"],symmetric:!0,subtle:{name:"PBKDF2"},usages:Ts,pbes2Hash:`SHA-${e}`,kwBits:t,keyOps:{encrypt:"deriveBits",decrypt:"deriveBits"}}}function Yh(e){return{kty:["oct"],symmetric:!0,subtle:{name:"AES-GCM",length:e},usages:fx,keyOps:gx,cekBits:e,ivBits:96,cbc:!1}}function qh(e){return{kty:["oct"],symmetric:!0,subtle:{name:"AES-CBC",length:e},usages:fx,keyOps:gx,cekBits:e,ivBits:128,cbc:!0}}function yx(e){return ZO[e]}var BO,WO,Ts,ZO,fx,gx,Q6,vx=v(()=>{Ee();Kh();BO={public:["encrypt","wrapKey"],private:["decrypt","unwrapKey"]},WO={public:[],private:["deriveBits"]},Ts={public:[],private:[]};ZO=Mo({dir:{kty:["oct"],symmetric:!0,subtle:{name:"AES-GCM"},usages:Ts,keyOps:{encrypt:"encrypt",decrypt:"decrypt"}},"RSA-OAEP":$s(1),"RSA-OAEP-256":$s(256),"RSA-OAEP-384":$s(384),"RSA-OAEP-512":$s(512),"ECDH-ES":Es(),"ECDH-ES+A128KW":Es(128),"ECDH-ES+A192KW":Es(192),"ECDH-ES+A256KW":Es(256),A128KW:Vh(128),A192KW:Vh(192),A256KW:Vh(256),A128GCMKW:Hh(128),A192GCMKW:Hh(192),A256GCMKW:Hh(256),"PBES2-HS256+A128KW":Jh(256,128),"PBES2-HS384+A192KW":Jh(384,192),"PBES2-HS512+A256KW":Jh(512,256)}),fx={public:[],private:[]},gx={encrypt:"encrypt",decrypt:"decrypt"};Q6=Mo({A128GCM:Yh(128),A192GCM:Yh(192),A256GCM:Yh(256),"A128CBC-HS256":qh(256),"A192CBC-HS384":qh(384),"A256CBC-HS512":qh(512)})});function KO(e,t){let{modulusLength:r}=t.algorithm;if(typeof r!="number"||r<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}function VO(e,t,r){nx(t,e.subtle,r),e.minModulusLength&&KO(e.alg,t)}async function bx(e,t,r){return t instanceof Uint8Array?crypto.subtle.importKey("raw",t,e.subtle,!1,[r]):(VO(e,t,r),t)}async function _x(e,t,r){let o=await bx(e,t,"sign"),n=await crypto.subtle.sign(e.operation,o,r);return new Uint8Array(n)}async function wx(e,t,r,o){let n=await bx(e,t,"verify");try{return await crypto.subtle.verify(e.operation,n,r,o)}catch{return!1}}var Xh=v(()=>{rx()});function kx(e,t){if(t!==void 0&&(!Array.isArray(t)||t.some(r=>typeof r!="string")))throw new TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)}function xx(e,t){let{crit:r}=t??{};if(Array.isArray(r)&&new Set(r).size!==r.length)throw new e('"crit" (Critical) Header Parameter MUST NOT contain duplicate values')}function Is(e,t,r,o,n){if(n.crit!==void 0&&o?.crit===void 0)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!o||o.crit===void 0)return new Set;if(!Array.isArray(o.crit)||o.crit.length===0||o.crit.some(a=>typeof a!="string"||a.length===0))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let i;r!==void 0?i=new Map([...Object.entries(r),...t.entries()]):i=t;for(let a of o.crit){if(!i.has(a))throw new ue(`Extension Header Parameter "${a}" is not recognized`);if(n[a]===void 0)throw new e(`Extension Header Parameter "${a}" is missing`);if(i.get(a)&&o[a]===void 0)throw new e(`Extension Header Parameter "${a}" MUST be integrity protected`)}return new Set(o.crit)}var As,Qh=v(()=>{Ee();As=new Map([["b64",!0]])});function ef(e){let t={name:"HMAC",hash:`SHA-${e}`};return{kty:["oct"],symmetric:!0,subtle:t,operation:t,usages:zo}}function Er(e,t,r){let o={name:e,hash:`SHA-${t}`};return{kty:["RSA"],subtle:o,operation:r?{...o,saltLength:r}:o,usages:zo,minModulusLength:2048}}function tf(e,t){return{kty:["EC"],crv:e,subtle:{name:"ECDSA",namedCurve:e},operation:{name:"ECDSA",hash:`SHA-${t}`},usages:zo}}function Sx(){let e={name:"Ed25519"};return{kty:["OKP"],crv:"Ed25519",subtle:e,operation:e,usages:zo}}function nf(e){let t={name:e};return{kty:["AKP"],subtle:t,operation:t,usages:zo}}function Cs(e){let t=$x[e];if(!t)throw new ue(`alg ${e} is not supported either by JOSE or your javascript runtime`);return t}function Ps(e){return $x[e]}var zo,$x,Uo=v(()=>{Ee();Kh();zo={public:["verify"],private:["sign"]};$x=Mo({HS256:ef(256),HS384:ef(384),HS512:ef(512),RS256:Er("RSASSA-PKCS1-v1_5",256),RS384:Er("RSASSA-PKCS1-v1_5",384),RS512:Er("RSASSA-PKCS1-v1_5",512),PS256:Er("RSA-PSS",256,32),PS384:Er("RSA-PSS",384,48),PS512:Er("RSA-PSS",512,64),ES256:tf("P-256",256),ES384:tf("P-384",384),ES512:tf("P-521",512),EdDSA:Sx(),Ed25519:Sx(),"ML-DSA-44":nf("ML-DSA-44"),"ML-DSA-65":nf("ML-DSA-65"),"ML-DSA-87":nf("ML-DSA-87")})});function Ex(e){return{algorithms:e&&kx("algorithms",e.algorithms),crit:e?.crit}}async function HO(e,t,r){let o={};e.protected&&(o=dx(e.protected,ee,"JWS Protected Header is invalid"));let n;if(e.header!==void 0){if(!_s(o,e.header))throw new ee("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");n={...o,...e.header}}else n=o;let i=Is(ee,As,t.crit,o,n),a=!0;if(i.has("b64")&&(a=o.b64,typeof a!="boolean"))throw new ee('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:s}=n;if(typeof s!="string"||!s)throw new ee('JWS "alg" (Algorithm) Header Parameter missing or invalid');if(t.algorithms&&!t.algorithms.has(s))throw new fs('"alg" (Algorithm) Header Parameter value not allowed');if(a){if(typeof e.payload!="string")throw new ee("JWS Payload must be a string")}else if(typeof e.payload!="string"&&!(e.payload instanceof Uint8Array))throw new ee("JWS Payload must be a string or an Uint8Array instance");let c=!1;typeof r=="function"&&(r=await r(o,e),c=!0);let d=Cs(s),u=ms(e.protected!==void 0?_t(e.protected):new Uint8Array,_t("."),typeof e.payload=="string"?a?t.b64p??=lx(e.payload,"payload",ee):bn.encode(e.payload):e.payload),p=zh(e.signature,"signature",ee),m=await Ss(d,r,"verify");if(!await wx(d,m,p,u))throw new vs;let f;return a?f=zh(e.payload,"payload",ee):typeof e.payload=="string"?f=bn.encode(e.payload):f=e.payload,{payload:f,parsedProt:o,b64:a,key:m,resolvedKey:c}}async function Tx(e,t,r){if(e instanceof Uint8Array&&(e=No.decode(e)),typeof e!="string")throw new ee("Compact JWS must be a string or Uint8Array");let{0:o,1:n,2:i,length:a}=e.split(".");if(a!==3)throw new ee("Invalid Compact JWS");return HO({payload:n,protected:o,signature:i},t,r)}var Ax=v(()=>{Xh();Uo();Ee();wr();Uh();Ht();Qh();Zh()});function Fo(e){let t=qO.exec(e);if(!t||t[4]&&t[1])throw new TypeError("Invalid time period format");let r=parseFloat(t[2]),o=t[3].toLowerCase(),n;switch(o){case"sec":case"secs":case"second":case"seconds":case"s":n=Math.round(r);break;case"minute":case"minutes":case"min":case"mins":case"m":n=Math.round(r*Cx);break;case"hour":case"hours":case"hr":case"hrs":case"h":n=Math.round(r*Px);break;case"day":case"days":case"d":n=Math.round(r*rf);break;case"week":case"weeks":case"w":n=Math.round(r*JO);break;default:n=Math.round(r*YO);break}return t[1]==="-"||t[4]==="ago"?-n:n}function wt(e,t){if(!Number.isFinite(t))throw new TypeError(`Invalid ${e} input`);return t}function Ox(e,t,r={}){let o;try{o=JSON.parse(ps.decode(t))}catch{}if(!tt(o))throw new Vt("JWT Claims Set must be a top-level JSON object");let{typ:n}=r;if(n&&(typeof e.typ!="string"||Ix(e.typ)!==Ix(n)))throw new Ue('unexpected "typ" JWT header value',o,"typ","check_failed");let{requiredClaims:i=[],issuer:a,subject:s,audience:c,maxTokenAge:d}=r,u=[...i];d!==void 0&&u.push("iat"),c!==void 0&&u.push("aud"),s!==void 0&&u.push("sub"),a!==void 0&&u.push("iss");for(let f of new Set(u.reverse()))if(!(f in o))throw new Ue(`missing required "${f}" claim`,o,f,"missing");if(a!==void 0&&!(Array.isArray(a)?a:[a]).includes(o.iss))throw new Ue('unexpected "iss" claim value',o,"iss","check_failed");if(s!==void 0&&o.sub!==s)throw new Ue('unexpected "sub" claim value',o,"sub","check_failed");if(c!==void 0&&!XO(o.aud,typeof c=="string"?[c]:c))throw new Ue('unexpected "aud" claim value',o,"aud","check_failed");let p;switch(typeof r.clockTolerance){case"string":p=Fo(r.clockTolerance);break;case"number":p=r.clockTolerance;break;case"undefined":p=0;break;default:throw new TypeError("Invalid clockTolerance option type")}wt("clockTolerance option",p);let{currentDate:m}=r,h=wt("currentDate option",Jt(m||new Date));if((o.iat!==void 0||d!==void 0)&&typeof o.iat!="number")throw new Ue('"iat" claim must be a number',o,"iat","invalid");if(o.nbf!==void 0){if(typeof o.nbf!="number")throw new Ue('"nbf" claim must be a number',o,"nbf","invalid");if(o.nbf>h+p)throw new Ue('"nbf" claim timestamp check failed',o,"nbf","check_failed")}if(o.exp!==void 0){if(typeof o.exp!="number")throw new Ue('"exp" claim must be a number',o,"exp","invalid");if(o.exp<=h-p)throw new Ro('"exp" claim timestamp check failed',o,"exp","check_failed")}if(d!==void 0){let f=h-o.iat,_=typeof d=="number"?d:Fo(d);if(f-p>_)throw new Ro('"iat" claim timestamp check failed (too far in the past)',o,"iat","check_failed");if(f<0-p)throw new Ue('"iat" claim timestamp check failed (it should be in the past)',o,"iat","check_failed")}return o}var Jt,Cx,Px,rf,JO,YO,qO,Ix,XO,Os,of=v(()=>{Ee();wr();Ht();Jt=e=>Math.floor(e.getTime()/1e3),Cx=60,Px=Cx*60,rf=Px*24,JO=rf*7,YO=rf*365.25,qO=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;Ix=e=>e.includes("/")?e.toLowerCase():`application/${e.toLowerCase()}`,XO=(e,t)=>typeof e=="string"?t.includes(e):Array.isArray(e)?t.some(Set.prototype.has.bind(new Set(e))):!1;Os=class{#e;constructor(t){if(!tt(t))throw new TypeError("JWT Claims Set MUST be an object");this.#e=structuredClone(t)}data(){return bn.encode(JSON.stringify(this.#e))}get iss(){return this.#e.iss}set iss(t){this.#e.iss=t}get sub(){return this.#e.sub}set sub(t){this.#e.sub=t}get aud(){return this.#e.aud}set aud(t){this.#e.aud=t}set jti(t){this.#e.jti=t}set nbf(t){typeof t=="number"?this.#e.nbf=wt("setNotBefore",t):t instanceof Date?this.#e.nbf=wt("setNotBefore",Jt(t)):this.#e.nbf=Jt(new Date)+Fo(t)}set exp(t){typeof t=="number"?this.#e.exp=wt("setExpirationTime",t):t instanceof Date?this.#e.exp=wt("setExpirationTime",Jt(t)):this.#e.exp=Jt(new Date)+Fo(t)}set iat(t){t===void 0?this.#e.iat=Jt(new Date):t instanceof Date?this.#e.iat=wt("setIssuedAt",Jt(t)):typeof t=="string"?this.#e.iat=wt("setIssuedAt",Jt(new Date)+Fo(t)):this.#e.iat=wt("setIssuedAt",t)}}});async function af(e,t,r){let o=await Tx(e,Ex(r),t);if(!o.b64)throw new Vt("JWTs MUST NOT use unencoded payload");let i={payload:Ox(o.parsedProt,o.payload,r),protectedHeader:o.parsedProt};return typeof t=="function"?{...i,key:o.key}:i}var Nx=v(()=>{Ax();of();Ee()});function Ns(e){return e?.b64===!1&&Array.isArray(e.crit)&&e.crit.includes("b64")}async function Rx(e,t){let{protectedHeader:r,unprotectedHeader:o}=e;if(!_s(r,o))throw new ee("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let n={...r,...o};xx(ee,r);let i=Is(ee,As,e.crit,r,n),a=!0;if(i.has("b64")&&(a=r.b64,typeof a!="boolean"))throw new ee('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:s}=n;if(typeof s!="string"||!s)throw new ee('JWS "alg" (Algorithm) Header Parameter missing or invalid');let c=Cs(s),d,u;if(a){let A=e.encoded??={};A.b64??=Sr(e.payload),A.raw??=_t(A.b64),d=A.b64,u=A.raw}else u=e.payload,d="";let p,m;r?(p=Sr(JSON.stringify(r)),m=_t(p)):(p="",m=new Uint8Array);let h=ms(m,_t("."),u),f=await Ss(c,t,"sign"),_=await _x(c,f,h),T={signature:Sr(_),payload:d};return r&&(T.protected=p),T}var Rs=v(()=>{Lo();Xh();Uo();Ht();Ee();wr();Qh();Zh()});var Ds,Dx=v(()=>{Ee();Rs();Uh();Ds=class{#e;#t;#n;constructor(t){if(!(t instanceof Uint8Array))throw new TypeError("payload must be an instance of Uint8Array");this.#e=t}setProtectedHeader(t){return Mh(this.#t,"setProtectedHeader"),this.#t=t,this}setUnprotectedHeader(t){return Mh(this.#n,"setUnprotectedHeader"),this.#n=t,this}async sign(t,r){if(!this.#t&&!this.#n)throw new ee("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");let o=await Rx({payload:this.#e,protectedHeader:this.#t,unprotectedHeader:this.#n,crit:r?.crit},t);return this.#n&&(o.header=this.#n),o}}});var js,jx=v(()=>{Dx();Rs();js=class{#e;#t;constructor(t){this.#e=new Ds(t)}setProtectedHeader(t){return this.#e.setProtectedHeader(t),this.#t=t,this}async sign(t,r){if(Ns(this.#t))throw new TypeError("use the flattened module for creating JWS with b64: false");let o=await this.#e.sign(t,r);return`${o.protected}.${o.payload}.${o.signature}`}}});var Go,Lx=v(()=>{jx();Rs();Ee();of();Go=class{#e;#t;constructor(t={}){this.#t=new Os(t)}setIssuer(t){return this.#t.iss=t,this}setSubject(t){return this.#t.sub=t,this}setAudience(t){return this.#t.aud=t,this}setJti(t){return this.#t.jti=t,this}setNotBefore(t){return this.#t.nbf=t,this}setExpirationTime(t){return this.#t.exp=t,this}setIssuedAt(t){return this.#t.iat=t,this}setProtectedHeader(t){return this.#e=t,this}async sign(t,r){let o=new js(this.#t.data());if(o.setProtectedHeader(this.#e),Ns(this.#e))throw new Vt("JWTs MUST NOT use unencoded payload");return o.sign(t,r)}}});function Mx(){return new ue('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}function zx(e){if(typeof e!="string")throw Mx();let t=Ps(e)??yx(e);if(!t)throw Mx();return t}var Ux=v(()=>{Ee();Uo();vx()});function tN(e){Wo(e,48,"Invalid PKCS#8 structure"),Bo(e),Wo(e,2,"Expected version field");let t=Bo(e);e.pos+=t,Wo(e,48,"Expected algorithm identifier");let r=Bo(e);return{algIdStart:e.pos,algIdLength:r}}var sf,QO,cf,Bo,Wo,Fx,eN,nN,rN,oN,Gx,Bx=v(()=>{jh();Ee();Ux();sf=(e,t)=>{if(e.byteLength!==t.length)return!1;for(let r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0},QO=e=>({data:e,pos:0}),cf=e=>{let t=e.data[e.pos++];if(t===void 0)throw new Error("Unexpected end of ASN.1 input");return t},Bo=e=>{let t=cf(e);if(t&128){let r=t&127,o=0;for(let n=0;n<r;n++)o=o<<8|cf(e);return o}return t},Wo=(e,t,r)=>{if(cf(e)!==t)throw new Error(r)},Fx=(e,t)=>{if(t<0||e.pos+t>e.data.length)throw new Error("Unexpected end of ASN.1 input");let r=e.data.subarray(e.pos,e.pos+t);return e.pos+=t,r},eN=e=>{Wo(e,6,"Expected algorithm OID");let t=Bo(e);return Fx(e,t)};nN=e=>{let t=eN(e);if(sf(t,[43,101,110]))return"X25519";if(!sf(t,[42,134,72,206,61,2,1]))throw new Error("Unsupported key algorithm");Wo(e,6,"Expected curve OID");let r=Bo(e),o=Fx(e,r);for(let{name:n,oid:i}of[{name:"P-256",oid:[42,134,72,206,61,3,1,7]},{name:"P-384",oid:[43,129,4,0,34]},{name:"P-521",oid:[43,129,4,0,35]}])if(sf(o,i))return n;throw new Error("Unsupported named curve")},rN=async(e,t,r,o)=>{let n=zx(r);if(n.symmetric)throw new ue('Invalid or unsupported "alg" (Algorithm) value');let i=e==="spki",a;if(n.subtleFor)try{a=n.subtleFor({crv:o.getNamedCurve(t)})}catch{throw new ue("Invalid or unsupported key format")}else a=n.subtle;return crypto.subtle.importKey(e,t,a,o?.extractable??!!i,i?n.usages.public:n.usages.private)},oN=(e,t)=>bs(e.replace(t,"")),Gx=(e,t,r)=>{let o=oN(e,/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g),n=r;return t?.startsWith?.("ECDH-ES")&&(n||={},n.getNamedCurve=i=>{let a=QO(i);return tN(a),nN(a)}),rN("pkcs8",o,t,n)}});function iN(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}async function aN(e){if(Oh(e))if(e.type==="secret")e=e.export();else return e.export({format:"jwk"});if(e instanceof Uint8Array)return{kty:"oct",k:Sr(e)};if(!xr(e))throw new TypeError(ix(e,"CryptoKey","KeyObject","Uint8Array"));if(!e.extractable)throw new TypeError("non-extractable CryptoKey cannot be exported as a JWK");let{ext:t,key_ops:r,alg:o,use:n,...i}=iN(await crypto.subtle.exportKey("jwk",e));return i.kty==="AKP"&&(i.alg=o),i}async function lf(e){return aN(e)}var Wx=v(()=>{Ph();Lo();Rh()});function sN(e){let t=typeof e=="string"?Ps(e):void 0;if(!t||t.symmetric)throw new ue('Unsupported "alg" value for a JSON Web Key Set');return t}function cN(e){if(!e||typeof e!="object")return!1;let{keys:t}=e;return Array.isArray(t)&&t.every(lN)}function lN(e){return tt(e)}async function Zx(e,t,r){let o=e.get(t)||e.set(t,{}).get(t);if(o[r.alg]===void 0){let n=await ws(r,{...t,alg:r.alg,ext:!0});if(n.type!=="public")throw new Do("JSON Web Key Set members must be public keys");o[r.alg]=n}return o[r.alg]}function uf(e){let t=new df(e),r=async(o,n)=>t.getKey(o,n);return Object.defineProperties(r,{jwks:{value:()=>structuredClone(t.jwks()),enumerable:!1,configurable:!1,writable:!1}}),r}var df,Kx=v(()=>{Fh();Uo();Ee();Ht();df=class{#e;#t=new WeakMap;constructor(t){if(!cN(t))throw new Do("JSON Web Key Set malformed");this.#e=structuredClone(t)}jwks(){return this.#e}async getKey(t,r){let{alg:o,kid:n}={...t,...r?.header},i=sN(o),a=this.#e.keys.filter(d=>{let u=i.kty.includes(d.kty);return u&&typeof n=="string"&&(u=n===d.kid),u&&(typeof d.alg=="string"||d.kty==="AKP")&&(u=o===d.alg),u&&typeof d.use=="string"&&(u=d.use==="sig"),u&&Array.isArray(d.key_ops)&&(u=d.key_ops.includes("verify")),u&&i.crv&&(u=d.crv===i.crv),u}),{0:s,length:c}=a;if(c===0)throw new kr;if(c!==1){let d=new gs,u=this.#t;throw d[Symbol.asyncIterator]=async function*(){for(let p of a)try{yield await Zx(u,p,i)}catch{}},d}return Zx(this.#t,s,i)}}});function dN(){return typeof WebSocketPair<"u"||typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"||typeof EdgeRuntime<"u"&&EdgeRuntime==="vercel"}async function uN(e,t,r,o=fetch){let n=await o(e,{method:"GET",signal:r,redirect:"manual",headers:t}).catch(i=>{throw i.name==="TimeoutError"?new ys:i});if(n.status!==200)throw new ve("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await n.json()}catch{throw new ve("Failed to parse the JSON Web Key Set HTTP response as JSON")}}function pN(e,t){return!(typeof e!="object"||e===null||!("uat"in e)||typeof e.uat!="number"||Date.now()-e.uat>=t||!("jwks"in e)||!tt(e.jwks)||!Array.isArray(e.jwks.keys)||!Array.prototype.every.call(e.jwks.keys,tt))}function hf(e,t){let r=new mf(e,t),o=async(n,i)=>r.getKey(n,i);return Object.defineProperties(o,{coolingDown:{get:()=>r.coolingDown(),enumerable:!0,configurable:!1},fresh:{get:()=>r.fresh(),enumerable:!0,configurable:!1},reload:{value:()=>r.reload(),enumerable:!0,configurable:!1,writable:!1},reloading:{get:()=>r.pendingFetch(),enumerable:!0,configurable:!1},jwks:{value:()=>r.jwks(),enumerable:!0,configurable:!1,writable:!1}}),o}var pf,Vx,Ls,mf,Hx=v(()=>{Ee();Kx();Ht();(typeof navigator>"u"||!navigator.userAgent?.startsWith?.("Mozilla/5.0 "))&&(pf="jose/v6.2.5");Vx=Symbol();Ls=Symbol();mf=class{#e;#t;#n;#c;#i;#r;#o;#l;#a;#s;constructor(t,r){if(!(t instanceof URL))throw new TypeError("url must be an instance of URL");this.#e=new URL(t.href),this.#t=typeof r?.timeoutDuration=="number"?r?.timeoutDuration:5e3,this.#n=typeof r?.cooldownDuration=="number"?r?.cooldownDuration:3e4,this.#c=typeof r?.cacheMaxAge=="number"?r?.cacheMaxAge:6e5,this.#o=new Headers(r?.headers),pf&&!this.#o.has("User-Agent")&&this.#o.set("User-Agent",pf),this.#o.has("accept")||(this.#o.set("accept","application/json"),this.#o.append("accept","application/jwk-set+json")),this.#l=r?.[Vx],r?.[Ls]!==void 0&&(this.#s=r?.[Ls],pN(r?.[Ls],this.#c)&&(this.#i=this.#s.uat,this.#a=uf(this.#s.jwks)))}pendingFetch(){return!!this.#r}coolingDown(){return typeof this.#i=="number"?Date.now()<this.#i+this.#n:!1}fresh(){return typeof this.#i=="number"?Date.now()<this.#i+this.#c:!1}jwks(){return this.#a?.jwks()}async getKey(t,r){(!this.#a||!this.fresh())&&await this.reload();try{return await this.#a(t,r)}catch(o){if(o instanceof kr&&this.coolingDown()===!1)return await this.reload(),this.#a(t,r);throw o}}async reload(){this.#r&&dN()&&(this.#r=void 0),this.#r||=uN(this.#e.href,this.#o,AbortSignal.timeout(this.#t),this.#l).then(t=>{this.#a=uf(t),this.#s&&(this.#s.uat=Date.now(),this.#s.jwks=t),this.#i=Date.now(),this.#r=void 0}).catch(t=>{throw this.#r=void 0,t}),await this.#r}}});async function ff(e,t,r){if(typeof e!="string"||e.indexOf("-----BEGIN PRIVATE KEY-----")!==0)throw new TypeError('"pkcs8" must be PKCS#8 formatted string');return Gx(e,t,r)}var Jx=v(()=>{Bx()});var gf=v(()=>{Nx();Lx();Hx();Wx();Jx()});function mN(e){let t=Yx.get(e);return t||(t=hf(new URL(e)),Yx.set(e,t)),t}function qx(e){let t;return{lastRefusal:()=>t,async resolve(r){t=void 0;try{let{payload:o}=await af(r,mN(e.jwksUri),{issuer:e.issuer,...e.audience?{audience:e.audience}:{}}),n=typeof o.sub=="string"?o.sub:"";if(!n){t="token_malformed";return}let i=typeof o.name=="string"?o.name:typeof o.preferred_username=="string"?o.preferred_username:void 0;return{playerId:`${hN}${n}`,...i?{alias:i}:{}}}catch(o){let n=o?.code;t=n==="ERR_JWT_EXPIRED"?"token_expired":n==="ERR_JWS_INVALID"||n==="ERR_JWT_INVALID"?"token_malformed":"token_untrusted";return}}}}var Yx,hN,Xx=v(()=>{"use strict";gf();Yx=new Map;hN="id:"});import{createPublicKey as fN,generateKeyPairSync as gN}from"node:crypto";async function yf(e){let t=e.replace(/\/+$/,""),r=t,o=`${t}${Ms}`,{privateKey:n,publicKey:i}=gN("rsa",{modulusLength:2048,privateKeyEncoding:{type:"pkcs8",format:"pem"},publicKeyEncoding:{type:"spki",format:"pem"}}),a=await ff(n,"RS256"),s=await lf(fN(i)),c="gamestage-dev",d={keys:[{...s,kid:c,alg:"RS256",use:"sig"}]};return{issuer:r,jwksUri:o,jwks:d,resolver:qx({issuer:r,jwksUri:o}),async mint(u,p={}){let m=Math.floor(Date.now()/1e3);return new Go({name:u}).setProtectedHeader({alg:"RS256",kid:c}).setIssuer(r).setSubject(u).setIssuedAt(m).setExpirationTime(m+(p.expiresInSeconds??3600)).sign(a)}}}var Ms,vf=v(()=>{"use strict";gf();Xx();Ms="/.well-known/jwks.json"});import{createServer as yN}from"node:http";import{randomBytes as vN}from"node:crypto";async function _N(e){let t=Yk({tenant:e.game,rounds:[],currentRoundId:""});await Ah(t,e.game,e.round,"local",!0,void 0,{source:"manifest"});for(let[o,n]of(e.alsoRounds??[]).entries())await Ah(t,e.game,n,`local-${o+2}`,!1,void 0,{source:"manifest"});let r=Vk({game:e.game,archetype:e.round.archetype,snapshot:"local",title:e.title,identityRequired:e.identityRequired});return{async forPlayer(o,n){if(o===e.game)return Hk({tenant:e.game,playerId:n.playerId??Oo(void 0),identityRefusal:n.identityRefusal,runtime:r,store:t,now:e.now,round:{archetype:e.round.archetype}})}}}async function wN(e){let t=[];for await(let r of e)t.push(Buffer.from(r));if(t.length!==0)try{return JSON.parse(Buffer.concat(t).toString("utf8"))}catch{return}}async function zs(e){let t=await _N(e),r=vN(32).toString("base64"),o={issue:()=>Nk(r)},n=e.devIdentity,i=yN((a,s)=>{(async()=>{let c=new URL(a.url??"/","http://localhost");if(n&&c.pathname===Ms){let m=JSON.stringify(n.jwks);s.writeHead(200,{"content-type":"application/jwk-set+json; charset=utf-8","access-control-allow-origin":"*","content-length":Buffer.byteLength(m)}),s.end(m);return}if(e.clientBundle&&a.method==="GET"&&/^\/(client\/[^/]+\/)?gamestage\.js$/.test(c.pathname)){let m=e.clientBundle;s.writeHead(200,{"content-type":"text/javascript; charset=utf-8","cache-control":"no-store","access-control-allow-origin":"*","content-length":Buffer.byteLength(m)}),s.end(m);return}let d=a.headers[bN],u=a.headers.authorization,p=await ex({method:a.method??"GET",path:c.pathname,body:await wN(a),...(({playerId:m,refused:h})=>({playerId:m,identityRefusal:h}))(await Pk({token:u?.replace(/^Bearer\s+/i,"")||void 0,anonymousId:Array.isArray(d)?d[0]:d,sessionSecret:r,resolver:n?.resolver}))},t,o);s.writeHead(p.status,p.headers),s.end(p.body===void 0?void 0:JSON.stringify(p.body))})().catch(()=>{s.headersSent?s.destroy():(s.writeHead(500,{"content-type":"application/json"}),s.end(JSON.stringify({error:{code:"internal",message:"The local Engine failed.",retryable:!0}})))})});return i.attachDevIdentity=a=>{n=a},i}var bN,bf=v(()=>{"use strict";Jk();ds();qk();Xk();tx();_h();vf();vf();ds();bN="x-gamestage-player"});import{spawn as kN}from"node:child_process";import{createHash as xN,randomBytes as eS}from"node:crypto";import{constants as SN}from"node:fs";import{access as $N,mkdtemp as EN,rm as tS}from"node:fs/promises";import{request as TN}from"node:http";import{homedir as Us,tmpdir as AN}from"node:os";import{join as Zo}from"node:path";function _f(e,t={}){let r=Buffer.isBuffer(e)?e:Buffer.from(e),o=t.maskingKey??eS(4);if(o.length!==4)throw new Error("A WebSocket masking key must be four bytes.");let n=r.length<126?0:r.length<=65535?2:8,i=Buffer.alloc(2+n+4+r.length);i[0]=(t.fin===!1?0:128)|(t.opcode??1),i[1]=128|(n===0?r.length:n===2?126:127);let a=2;n===2?(i.writeUInt16BE(r.length,a),a+=2):n===8&&(i.writeBigUInt64BE(BigInt(r.length),a),a+=8),o.copy(i,a),a+=4;for(let s=0;s<r.length;s++)i[a+s]=r[s]^o[s%4];return i}async function $f(e={}){let r=[(e.env??process.env).GAMESTAGE_CHROME,...e.locations??CN].filter(s=>!!s),o;for(let s of[...new Set(r)])try{await $N(s,SN.X_OK),o=s;break}catch{}if(!o)return{status:"skipped",detail:"No supported browser found. Install Chrome, Chromium, Brave or Edge, or set GAMESTAGE_CHROME to its executable path, then run verify again."};let n=await EN(Zo(AN(),"gamestage-chrome-")),i=kN(o,["--headless=new","--remote-debugging-port=0","--no-first-run","--no-default-browser-check",`--user-data-dir=${n}`,"about:blank"],{stdio:["ignore","ignore","pipe"]}),a;try{a=await ON(await PN(i,1e4));let{targetId:s}=await a.send("Target.createTarget",{url:"about:blank"}),{sessionId:c}=await a.send("Target.attachToTarget",{targetId:s,flatten:!0});return{status:"available",browser:await Sf.create(a,c,i,n)}}catch(s){throw a?.close(),await nS(i),await tS(n,{recursive:!0,force:!0}),s}}function PN(e,t){return new Promise((r,o)=>{let n="",i=u=>{clearTimeout(d),e.stderr?.off("data",a),e.off("error",s),e.off("close",c),u()},a=u=>{n=(n+u.toString("utf8")).slice(-4e3);let p=n.match(/DevTools listening on (ws:\/\/\S+)/);p&&i(()=>r(p[1]))},s=u=>i(()=>o(u)),c=u=>i(()=>o(new Error(`Chrome exited before DevTools was ready${u===null?"":` (code ${u})`}.`)));e.stderr?.on("data",a),e.on("error",s),e.on("close",c);let d=setTimeout(()=>i(()=>o(new Error("Chrome did not open DevTools within 10000ms."))),t)})}function ON(e){return new Promise((t,r)=>{let o=new URL(e),n=eS(16).toString("base64"),i=xN("sha1").update(n+IN).digest("base64"),a=TN({hostname:o.hostname,port:o.port,path:`${o.pathname}${o.search}`,headers:{Connection:"Upgrade",Upgrade:"websocket","Sec-WebSocket-Version":"13","Sec-WebSocket-Key":n}});a.on("upgrade",(s,c,d)=>{s.headers["sec-websocket-accept"]!==i?(c.destroy(),r(new Error("Chrome returned an invalid WebSocket handshake."))):t(new xf(c,d))}),a.on("response",s=>{s.resume(),r(new Error(`Chrome refused the WebSocket upgrade with status ${s.statusCode}.`))}),a.on("error",r),a.end()})}async function nS(e){e.exitCode===null&&(e.kill("SIGTERM"),!await Qx(e,1e3)&&(e.kill("SIGKILL"),await Qx(e,1e3)))}function Qx(e,t){return e.exitCode!==null?Promise.resolve(!0):new Promise(r=>{let o=a=>{clearTimeout(i),e.off("close",n),r(a)},n=()=>o(!0);e.once("close",n);let i=setTimeout(()=>o(!1),t)})}function wf(e){return new Promise(t=>setTimeout(t,e))}var IN,kf,xf,Sf,CN,rS=v(()=>{"use strict";IN="258EAFA5-E914-47DA-95CA-C5AB0DC85B11";kf=class{buffered=Buffer.alloc(0);fragments=[];fragmentedOpcode;push(t){this.buffered=this.buffered.length?Buffer.concat([this.buffered,t]):Buffer.from(t);let r=[];for(;this.buffered.length>=2;){let o=this.buffered[0],n=this.buffered[1],i=(o&128)!==0,a=o&15,s=(n&128)!==0,c=n&127,d=2;if(c===126){if(this.buffered.length<d+2)break;c=this.buffered.readUInt16BE(d),d+=2}else if(c===127){if(this.buffered.length<d+8)break;let m=this.buffered.readBigUInt64BE(d);if(m>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("WebSocket frame is too large to decode safely.");c=Number(m),d+=8}let u=d;if(s&&(d+=4),this.buffered.length<d+c)break;let p=Buffer.from(this.buffered.subarray(d,d+c));if(s)for(let m=0;m<p.length;m++)p[m]^=this.buffered[u+m%4];if(this.buffered=this.buffered.subarray(d+c),a===8||a===9||a===10)r.push({opcode:a,payload:p});else if(a===1){if(this.fragmentedOpcode!==void 0)throw new Error("A new WebSocket message arrived before its continuation finished.");i?r.push({opcode:a,payload:p}):(this.fragmentedOpcode=a,this.fragments=[p])}else if(a===0){if(this.fragmentedOpcode===void 0)throw new Error("A WebSocket continuation arrived without a first frame.");this.fragments.push(p),i&&(r.push({opcode:this.fragmentedOpcode,payload:Buffer.concat(this.fragments)}),this.fragmentedOpcode=void 0,this.fragments=[])}else throw new Error(`Unsupported WebSocket opcode ${a}.`)}return r}},xf=class{constructor(t,r){this.socket=t;t.on("data",o=>this.receive(o)),t.on("error",o=>this.fail(o)),t.on("close",()=>this.fail(new Error("Chrome closed the DevTools connection."))),r.length&&this.receive(r)}socket;decoder=new kf;pending=new Map;listeners=new Map;nextId=1;ended=!1;send(t,r={},o){if(this.ended)return Promise.reject(new Error("Chrome's DevTools connection is closed."));let n=this.nextId++;return new Promise((i,a)=>{this.pending.set(n,{resolve:s=>i(s),reject:a}),this.socket.write(_f(JSON.stringify({id:n,method:t,params:r,...o?{sessionId:o}:{}})),s=>{s&&(this.pending.delete(n),a(s))})})}on(t,r,o){let n=`${o??""}:${t}`,i=this.listeners.get(n)??new Set;return i.add(r),this.listeners.set(n,i),()=>i.delete(r)}close(){this.ended||(this.ended=!0,this.socket.end(_f(Buffer.alloc(0),{opcode:8})),this.rejectPending(new Error("Chrome's DevTools connection was closed.")))}receive(t){try{for(let r of this.decoder.push(t)){if(r.opcode===8){this.ended=!0,this.socket.end(),this.rejectPending(new Error("Chrome closed the DevTools connection."));continue}if(r.opcode===9){this.socket.write(_f(r.payload,{opcode:10}));continue}if(r.opcode===10)continue;let o=JSON.parse(r.payload.toString("utf8"));if(o.id!==void 0){let n=this.pending.get(o.id);if(!n)continue;this.pending.delete(o.id),o.error?n.reject(new Error(o.error.message??"Chrome rejected a CDP command.")):n.resolve(o.result)}else if(o.method){let n=`${o.sessionId??""}:${o.method}`;for(let i of this.listeners.get(n)??[])i(o.params??{})}}}catch(r){this.fail(r instanceof Error?r:new Error("Could not read Chrome's response."))}}fail(t){this.ended||(this.ended=!0,this.socket.destroy(),this.rejectPending(t))}rejectPending(t){for(let r of this.pending.values())r.reject(t);this.pending.clear()}},Sf=class e{constructor(t,r,o,n){this.cdp=t;this.sessionId=r;this.child=o;this.profile=n;this.on("Runtime.exceptionThrown",a=>{let s=a.exceptionDetails,c=s?.exception?.description??s?.text??"Unknown page error";this.pageErrors.push(c.split(`
7820
8107
  `)[0].replace(/^[A-Za-z]*Error:\s*/,""))}),this.on("Network.requestWillBeSent",a=>{let s=String(a.requestId);this.requests.set(s,a.request??{}),this.inflight.add(s),this.lastNetworkActivity=Date.now()});let i=a=>{this.inflight.delete(String(a.requestId)),this.lastNetworkActivity=Date.now()};this.on("Network.loadingFinished",i),this.on("Network.loadingFailed",i)}cdp;sessionId;child;profile;pageErrors=[];requests=new Map;inflight=new Set;lastNetworkActivity=Date.now();closed=!1;static async create(t,r,o,n){let i=new e(t,r,o,n);return await Promise.all([i.send("Page.enable"),i.send("Runtime.enable"),i.send("Network.enable")]),i}async addScriptToEvaluateOnNewDocument(t){await this.send("Page.addScriptToEvaluateOnNewDocument",{source:t})}async navigate(t,r=2e4){let o=Date.now()+r,n=this.waitForEvent("Page.loadEventFired",r,"page load"),i=await this.send("Page.navigate",{url:t});if(i.errorText)throw new Error(i.errorText);await n,await this.waitForNetworkIdle(Math.max(1,o-Date.now()))}query(t){return this.evaluate(`Array.from(document.querySelectorAll(${JSON.stringify(t)}), (_, index) => index)`)}isVisible(t,r){return this.evaluate(`(() => {
7821
8108
  const element = document.querySelectorAll(${JSON.stringify(t)})[${r}];
7822
8109
  if (!element) return false;
@@ -7834,64 +8121,63 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7834
8121
  if ("disabled" in element && element.disabled) return { ok: false, error: "Element is disabled." };
7835
8122
  element.click();
7836
8123
  return { ok: true };
7837
- })()`);if(!o.ok)throw new Error(o.error??"Element could not be clicked.")}async waitForSelector(t,r=5e3){let o=Date.now()+r;for(;Date.now()<o;){if((await this.query(t)).length)return;await tf(50)}throw new Error(`Timed out after ${r}ms waiting for ${t}.`)}async setOffline(t){await this.send("Network.emulateNetworkConditions",{offline:t,latency:0,downloadThroughput:-1,uploadThroughput:-1})}waitForResponse(t){let r=t.timeout??15e3;return new Promise((o,n)=>{let i=!1,a=l=>{i||(i=!0,clearTimeout(c),s(),l())},s=this.on("Network.responseReceived",l=>{let p=String(l.requestId),d=this.requests.get(p);d?.url?.includes(t.urlIncludes)&&d.method?.toUpperCase()===t.method.toUpperCase()&&a(()=>o({json:async()=>JSON.parse(await this.responseBody(p,r))}))}),c=setTimeout(()=>a(()=>n(new Error(`Timed out after ${r}ms waiting for a response.`))),r)})}html(){return this.evaluate("document.documentElement.outerHTML")}async close(){this.closed||(this.closed=!0,this.cdp.close(),await Ex(this.child),await $x(this.profile,{recursive:!0,force:!0}))}send(t,r={}){return this.cdp.send(t,r,this.sessionId)}on(t,r){return this.cdp.on(t,r,this.sessionId)}async evaluate(t){let r=await this.send("Runtime.evaluate",{expression:t,awaitPromise:!0,returnByValue:!0});if(r.exceptionDetails)throw new Error(r.exceptionDetails.exception?.description??r.exceptionDetails.text??"The page could not evaluate browser code.");return r.result.value}waitForEvent(t,r,o){return new Promise((n,i)=>{let a=l=>{clearTimeout(c),s(),l()},s=this.on(t,()=>a(n)),c=setTimeout(()=>a(()=>i(new Error(`Timed out after ${r}ms waiting for ${o}.`))),r)})}async waitForNetworkIdle(t){let r=Date.now()+t;for(;Date.now()<r;){if(this.inflight.size===0&&Date.now()-this.lastNetworkActivity>=500)return;await tf(50)}throw new Error("Timed out after 20000ms waiting for the network to settle.")}async responseBody(t,r){let o=Date.now()+r,n=new Error("The response body was not available.");for(;Date.now()<o;)try{let i=await this.send("Network.getResponseBody",{requestId:t});return i.base64Encoded?Buffer.from(i.body,"base64").toString("utf8"):i.body}catch(i){n=i instanceof Error?i:n,await tf(25)}throw n}},IO=["/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","/Applications/Chromium.app/Contents/MacOS/Chromium","/Applications/Brave Browser.app/Contents/MacOS/Brave Browser","/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge",Lo(Is(),"Applications/Google Chrome.app/Contents/MacOS/Google Chrome"),Lo(Is(),"Applications/Chromium.app/Contents/MacOS/Chromium"),Lo(Is(),"Applications/Brave Browser.app/Contents/MacOS/Brave Browser"),Lo(Is(),"Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge"),"/usr/bin/google-chrome","/usr/bin/google-chrome-stable","/opt/google/chrome/chrome","/usr/bin/chromium","/usr/bin/chromium-browser","/usr/lib/chromium/chromium","/snap/bin/chromium","/usr/bin/brave-browser","/usr/bin/brave-browser-stable","/opt/brave.com/brave/brave-browser","/usr/bin/microsoft-edge","/usr/bin/microsoft-edge-stable","/opt/microsoft/msedge/msedge"]});function sf(e){return e.replace(/^[\s,.;:)\]}\-+*/=&|]+/,"").replace(/[\s+*/=&|]+$/,"").trim()}function Ax(e){let t=sf(e);return!(t.length<2||t.length>160||!/[A-Za-z]/.test(t)||NO.test(t)||OO.some(r=>r.test(t))||!/\s/.test(t)&&t===t.toLowerCase())}function Ix(e){for(let t of RO)if(t.test.test(e))return{confidence:"likely",level:t.level,...t.setting?{setting:t.setting}:{},because:t.because};return{confidence:"possible",level:"project",because:"a fan reads it and nothing in the code says it changes per round or per edition"}}function DO(e){let t=[];return e.text.replace(/<script[\s\S]*?<\/script>/gi,n=>`
8124
+ })()`);if(!o.ok)throw new Error(o.error??"Element could not be clicked.")}async waitForSelector(t,r=5e3){let o=Date.now()+r;for(;Date.now()<o;){if((await this.query(t)).length)return;await wf(50)}throw new Error(`Timed out after ${r}ms waiting for ${t}.`)}async setOffline(t){await this.send("Network.emulateNetworkConditions",{offline:t,latency:0,downloadThroughput:-1,uploadThroughput:-1})}waitForResponse(t){let r=t.timeout??15e3;return new Promise((o,n)=>{let i=!1,a=d=>{i||(i=!0,clearTimeout(c),s(),d())},s=this.on("Network.responseReceived",d=>{let u=String(d.requestId),p=this.requests.get(u);p?.url?.includes(t.urlIncludes)&&p.method?.toUpperCase()===t.method.toUpperCase()&&a(()=>o({json:async()=>JSON.parse(await this.responseBody(u,r))}))}),c=setTimeout(()=>a(()=>n(new Error(`Timed out after ${r}ms waiting for a response.`))),r)})}html(){return this.evaluate("document.documentElement.outerHTML")}async close(){this.closed||(this.closed=!0,this.cdp.close(),await nS(this.child),await tS(this.profile,{recursive:!0,force:!0}))}send(t,r={}){return this.cdp.send(t,r,this.sessionId)}on(t,r){return this.cdp.on(t,r,this.sessionId)}async evaluate(t){let r=await this.send("Runtime.evaluate",{expression:t,awaitPromise:!0,returnByValue:!0});if(r.exceptionDetails)throw new Error(r.exceptionDetails.exception?.description??r.exceptionDetails.text??"The page could not evaluate browser code.");return r.result.value}waitForEvent(t,r,o){return new Promise((n,i)=>{let a=d=>{clearTimeout(c),s(),d()},s=this.on(t,()=>a(n)),c=setTimeout(()=>a(()=>i(new Error(`Timed out after ${r}ms waiting for ${o}.`))),r)})}async waitForNetworkIdle(t){let r=Date.now()+t;for(;Date.now()<r;){if(this.inflight.size===0&&Date.now()-this.lastNetworkActivity>=500)return;await wf(50)}throw new Error("Timed out after 20000ms waiting for the network to settle.")}async responseBody(t,r){let o=Date.now()+r,n=new Error("The response body was not available.");for(;Date.now()<o;)try{let i=await this.send("Network.getResponseBody",{requestId:t});return i.base64Encoded?Buffer.from(i.body,"base64").toString("utf8"):i.body}catch(i){n=i instanceof Error?i:n,await wf(25)}throw n}},CN=["/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","/Applications/Chromium.app/Contents/MacOS/Chromium","/Applications/Brave Browser.app/Contents/MacOS/Brave Browser","/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge",Zo(Us(),"Applications/Google Chrome.app/Contents/MacOS/Google Chrome"),Zo(Us(),"Applications/Chromium.app/Contents/MacOS/Chromium"),Zo(Us(),"Applications/Brave Browser.app/Contents/MacOS/Brave Browser"),Zo(Us(),"Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge"),"/usr/bin/google-chrome","/usr/bin/google-chrome-stable","/opt/google/chrome/chrome","/usr/bin/chromium","/usr/bin/chromium-browser","/usr/lib/chromium/chromium","/snap/bin/chromium","/usr/bin/brave-browser","/usr/bin/brave-browser-stable","/opt/brave.com/brave/brave-browser","/usr/bin/microsoft-edge","/usr/bin/microsoft-edge-stable","/opt/microsoft/msedge/msedge"]});function Ef(e){return e.replace(/^[\s,.;:)\]}\-+*/=&|]+/,"").replace(/[\s+*/=&|]+$/,"").trim()}function oS(e){let t=Ef(e);return!(t.length<2||t.length>160||!/[A-Za-z]/.test(t)||RN.test(t)||NN.some(r=>r.test(t))||!/\s/.test(t)&&t===t.toLowerCase())}function iS(e){for(let t of DN)if(t.test.test(e))return{confidence:"likely",level:t.level,...t.setting?{setting:t.setting}:{},because:t.because};return{confidence:"possible",level:"project",because:"a fan reads it and nothing in the code says it changes per round or per edition"}}function jN(e){let t=[];return e.text.replace(/<script[\s\S]*?<\/script>/gi,n=>`
7838
8125
  `.repeat(n.split(`
7839
8126
  `).length-1)).replace(/<style[\s\S]*?<\/style>/gi,n=>`
7840
8127
  `.repeat(n.split(`
7841
8128
  `).length-1)).split(`
7842
- `).forEach((n,i)=>{let a=[...[...n.matchAll(/>([^<>]{2,160})</g)].map(s=>s[1]),...[...n.matchAll(/\b(?:title|alt|placeholder|aria-label)="([^"]{2,160})"/gi)].map(s=>s[1])];for(let s of a){let c=s.replace(/\s+/g," ");if(!Ax(c))continue;let l=sf(c);t.push({text:l,...Ix(l),file:e.relative,line:i+1})}}),t}function jO(e){let t=[];return e.text.split(`
7843
- `).forEach((r,o)=>{if(!/^\s*(import|export|require\()/.test(r))for(let n of r.matchAll(/(['"`])((?:(?!\1)[^\\\r\n]|\\.){2,160})\1/g)){let i=n[2].replace(/\s+/g," ");if(!Ax(i))continue;let a=sf(i),s=r.slice((n.index??0)+n[0].length);/^\s*[:\]]/.test(s)||t.push({text:a,...Ix(a),file:e.relative,line:o+1})}}),t}function Cs(e){let t=[];for(let o of e)/\.(html?|svelte|vue)$/i.test(o.relative)&&t.push(...DO(o)),/\.(m?[jt]sx?|svelte|vue)$/i.test(o.relative)&&t.push(...jO(o));let r=new Map;for(let o of t){let n=o.text.toLowerCase();r.has(n)||r.set(n,o)}return[...r.values()].sort((o,n)=>o.level===n.level?o.text.localeCompare(n.text):o.level.localeCompare(n.level))}var OO,NO,RO,cf=y(()=>{"use strict";OO=[/^(loading|error|ok|yes|no|on|off|true|false|null|undefined)$/i,/^[\d\s.,:%+-]+$/,/^[a-z0-9_-]+$/,/^(#|\.|\/|https?:|data:|mailto:)/i,/^[A-Z_]{2,}$/,/^\s*$/],NO=/[{}<>|]|=>|\(\)|;\s*$|^\s*(function|const|let|var|import|export)\b/;RO=[{test:/^(play|start|go|begin|submit|share|try|see|next|done|finish)\b/i,level:"project",setting:"play_button_label",because:"reads as a button a fan presses, and a producer owns the words on it"},{test:/\b(how to play|the rules|instructions)\b/i,level:"project",setting:"how_to_play",because:"reads as the rules, which a producer rewrites without a deploy"},{test:/\b(hall of fame|all-?star|all-?nba|rookie|veteran|starter|busted|legend|champion|gold|silver|bronze)\b/i,level:"project",because:"reads as a rank a fan is given, which is the game's ladder and does not change between editions"},{test:/\b(today|tonight|this week|round \d|day \d|week \d)\b/i,level:"element",because:"names one round rather than the game, so it changes every time the round does"},{test:/\b(edition|season|fixture|matchday|gameweek|tournament|final|semi)\b/i,level:"event",because:"names a run of the game rather than the game, so it belongs to the edition"},{test:/\balready played\b|\bcome back\b|\bsee your result\b/i,level:"project",because:"a message a fan reads about their own state, and a producer's to word"}]});var Fx={};We(Fx,{browserCheck:()=>UO,browserChecks:()=>jx,connectionCheck:()=>Mx,runVerify:()=>hf,scanPublishSet:()=>Ux,verificationResult:()=>Dx});import{readFile as lf}from"node:fs/promises";import{dirname as Cx,resolve as uf}from"node:path";function LO(e){switch(e){case"hunt":return ze.parse({archetype:e,number:1,prompt:"Pick the two that belong",board:["alpha","beta","gamma","delta"],targets:["alpha","beta"],open:!0});case"push":return ze.parse({archetype:e,number:1,prompt:"Two picks. Get close to 100 without going over.",target:100,targetLabel:"Points",slates:[{id:"first",label:"First pick",entries:[{key:"alpha",label:"Alpha",value:40},{key:"beta",label:"Beta",value:70}]},{id:"second",label:"Second pick",entries:[{key:"gamma",label:"Gamma",value:25},{key:"delta",label:"Delta",value:55}]}],open:!0});case"group":return ze.parse({archetype:e,number:1,prompt:"Find the groups. Four at a time.",board:["alpha","beta","gamma","delta","epsilon","zeta","eta","theta"],groups:[{key:"first",label:"First four",members:["alpha","beta","gamma","delta"]},{key:"second",label:"Second four",members:["epsilon","zeta","eta","theta"]}],open:!0});case"predict":return ze.parse({archetype:e,number:1,prompt:"Who takes it?",options:[{key:"alpha",label:"Alpha"},{key:"beta",label:"Beta"},{key:"draw",label:"Neither, it ends level"}],open:!0});default:throw new Error(`No representative round exists for the ${e} archetype.`)}}function zO(e,t,r){return(vw({gameId:e.app.id,gameName:e.app.title,archetype:t,manifestRevision:e.manifest.revision,wording:r,urls:{baseAppsUrl:"",dashImage:"",embedUrl:""}})["project_settings.json"].sections??[]).flatMap(i=>i.properties??[]).flatMap(i=>{if(typeof i.key!="string")return[];let a=Nm[i.key];return a?[[i.key,a]]:[]})}function Dx(e){let t=e.filter(o=>o.status==="open").length,r=e.filter(o=>o.status==="skipped").length;return t>0?{outcome:"failed",exitCode:1,open:t,skipped:r}:r>0?{outcome:"unverified",exitCode:2,open:t,skipped:r}:{outcome:"verified",exitCode:0,open:t,skipped:r}}function df(e,t){if(t.archetype==="hunt"){let n=t.targets;if(n.length===0)return[];let i=n.filter(a=>new RegExp(`["'\`]${a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}["'\`]`,"i").test(e));return i.length===n.length?i:[]}if(t.archetype==="predict")return[];if(t.archetype==="group"){let n=[];for(let i of t.groups){if(new RegExp(`["\`']${i.label.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}["\`']`,"i").test(e)){n.push(i.label);continue}e.split(`
7844
- `).some(c=>i.members.every(l=>new RegExp(`["\`']${l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}["\`']`,"i").test(c)))&&n.push(i.label)}return n}let r=n=>n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=[];for(let n of t.slates)for(let i of n.entries){let a=`${r(i.key)}|${r(i.label)}`,s=new RegExp(`(?:${a})[^\\n]{0,120}?\\b${i.value}\\b`,"i"),c=new RegExp(`\\b${i.value}\\b[^\\n]{0,120}?(?:${a})`,"i");(s.test(e)||c.test(e))&&o.push(i.label)}return o}function pf(e,t){if(e.archetype==="hunt")return`Every target appears in the artefact: ${t.join(", ")}. A solution in the bundle can be read before anybody plays.`;if(e.archetype==="group")return`The page holds the grouping: ${t.join(", ")}. A player who reads it has the categories, which is the puzzle.`;let r=t.slice(0,5).join(", "),o=t.length>5?`, and ${t.length-5} more`:"";return`The page carries what each pick is worth: ${r}${o}. A game that is arithmetic is finished the moment the numbers ship, without a move being played.`}function mf(e){return MO.map(t=>({...t,status:"skipped",detail:e}))}async function jx(e,t,r){let o;try{o=await af()}catch(i){return mf("Chrome could not start. Check GAMESTAGE_CHROME points to a working browser, then "+`run verify again. ${i instanceof Error?i.message:""}`.trim())}if(o.status==="skipped")return mf(o.detail);let n=o.browser;try{return[await zx(n,e,t,r),await Mx(n,e)]}finally{await n.close().catch(()=>{})}}async function UO(e,t,r){let o;try{o=await af()}catch(i){return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"skipped",detail:"Chrome could not start. Check GAMESTAGE_CHROME points to a working browser, then "+`run verify again. ${i instanceof Error?i.message:""}`.trim()}}if(o.status==="skipped")return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"skipped",detail:o.detail};let n=o.browser;try{return await zx(n,e,t,r)}finally{await n.close().catch(()=>{})}}async function Lx(e){for(let t=0;t<3&&!((await e.query(Ps)).length>0);t++){let r=await e.query("[data-gamestage-start]:not([disabled])"),o;for(let n of r)if(await e.isVisible("[data-gamestage-start]:not([disabled])",n)){o=n;break}if(o===void 0)break;await e.click("[data-gamestage-start]:not([disabled])",o).catch(()=>{}),await e.waitForSelector(Ps,5e3).catch(()=>{})}}async function zx(e,t,r,o){try{await e.addScriptToEvaluateOnNewDocument(`window.GAMESTAGE_API = ${JSON.stringify(r)};window.GAMESTAGE_GAME = ${JSON.stringify(o)};`),await e.navigate(t,2e4);let n=e.waitForResponse({urlIncludes:"/plays",method:"POST",timeout:15e3}).catch(()=>{});await Lx(e);let i=await e.query(Ps);if(i.length===0){let h=e.pageErrors[0],f=await e.query("#prompt").then(()=>e.html()).then(_=>/id="prompt"[^>]*>([^<]{0,160})/.exec(_)?.[1]?.trim()).catch(()=>{});return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"open",detail:`Found nothing to pick. The page did not render a board from the round.${h?` The page threw: ${h}`:f?` The page says: ${f}`:""}`}}let a=0;for(let h of i)if(await e.click(Ps,h).catch(()=>{}),a+=1,(await e.query(Ox)).length>0)break;let s=await e.query(Px);if(s.length===0)return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"open",detail:"No way to submit a play was found on the page."};if((await e.query(Ox)).length===0)return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"open",detail:`Selected ${a} of ${i.length} on the board and the page never allowed a play: Submit stayed disabled throughout. The page decides when a guess is complete, so either it needs a combination this cannot reach by picking in order, or it is not enabling Submit when it should.`};await e.click(Px,s[0]);let c=await n;if(!c)return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"open",detail:"The page was played and never asked the Engine. Whatever it showed, it decided for itself."};let l=await c.json();if(e.pageErrors.length)return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"open",detail:`The page threw: ${e.pageErrors[0]}`};let p=await e.html(),d=l.round_state?.score,m=d===void 0||p.includes(String(d))||p.includes(d.toLocaleString("en-US"));return{id:"rendered-outcome",what:"the screen shows what the server decided",status:m?"verified":"open",detail:m?`The play went to the Engine and came back ${l.outcome}.`:`The Engine committed a score of ${d} and the page does not show it.`}}catch(n){return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"open",detail:n instanceof Error?n.message:"The page could not be played."}}}async function Mx(e,t){let r="connection-noticed",o="the page notices the connection going and coming back";try{await e.navigate(t,2e4),await Lx(e);let n=await e.html();await e.setOffline(!0);let i=await Nx(e,n,3e3);return i?(await e.setOffline(!1),await Nx(e,i,3e3)?{id:r,what:o,status:"verified",detail:"Taken offline the page said so, and it recovered when the network returned."}:{id:r,what:o,status:"open",detail:"The page noticed the connection going and not it coming back: it was still in its offline state three seconds after the network returned. Listen for `online` as well, take the message down, and re-read the round rather than trusting what is on the screen."}):{id:r,what:o,status:"open",detail:"The connection was taken away and the page did not change. A fan who loses their signal is shown a game that still looks playable, and every tap on it is a tap the Engine never sees. Listen for the window's `offline` event and say so on the screen."}}catch(n){return{id:r,what:o,status:"open",detail:n instanceof Error?n.message:"The page could not be taken offline and back."}}finally{await e.setOffline(!1).catch(()=>{})}}async function Nx(e,t,r){let o=Date.now()+r;for(;Date.now()<o;){let n=await e.html().catch(()=>t);if(n!==t)return n;await new Promise(i=>setTimeout(i,100))}}function GO(e){let t=e.split("/").slice(0,-1),r=t.findIndex(o=>FO.includes(o));return r===-1?void 0:t.slice(0,r+1).join("/")}function ZO(e){let t=(e.split("/").pop()??e).toLowerCase();return t===".env"||t.startsWith(".env.")||BO.has(t)||/^(credentials|secrets)\.(json|ya?ml|ini|toml|txt|env)$/.test(t)||/\.(pem|key|p12|pfx|keystore|jks)$/.test(t)}function Rx(e){let t=e.split("/").pop()??e;return t.endsWith("~")||t===".DS_Store"||/\.(bak|orig|swp|swo|rej|old)$/.test(t)||/\.old\.[^.]+$/.test(t)}async function Ux(e,t){let{files:r,skippedLinks:o}=Ym(e,{symlinks:"skip"}),n=[],i=new Set,a=0;for(let s of o)n.push({path:s,why:"a symlink, which a deploy would refuse to publish",fatal:!1});for(let s of r){let c=GO(s.relativePath);if(c){i.has(c)||(i.add(c),n.push({path:`${c}/`,why:"a build or history directory; `deploy --dir` would upload it whole",fatal:!1}));continue}if(ZO(s.relativePath)){n.push({path:s.relativePath,why:"environment or credential shaped",fatal:!0});continue}let l=await Hm(s.path);if(l===void 0)continue;a+=1;let p=pe(l);if(p.ok&&p.manifest.backend.round){n.push({path:s.relativePath,why:"an App Manifest, which carries the round's private half",fatal:!0});continue}let d=df(l,t);if(d.length){n.push({path:s.relativePath,why:pf(t,d),fatal:!0});continue}let m;try{let h=JSON.parse(l);h&&Array.isArray(h.sourcesContent)&&(m=h)}catch{}if(m){let h=m.sourcesContent.filter(w=>typeof w=="string").join(`
7845
- `),f=h?df(h,t):[];if(f.length){n.push({path:s.relativePath,why:`${pf(t,f)} It is inside the map's own copy of your sources.`,fatal:!0});continue}n.push({path:s.relativePath,why:"a source map, which publishes your sources",fatal:!1});continue}Rx(s.relativePath)&&n.push({path:s.relativePath,why:"an editor or merge leftover",fatal:!1})}for(let s of r)Rx(s.relativePath)&&!n.some(c=>c.path===s.relativePath)&&n.push({path:s.relativePath,why:"an editor or merge leftover",fatal:!1});return{files:r,read:a,findings:n}}async function hf(e){let t=e.manifest??"gamestage.yaml",r;try{let z=pe(await lf(t,"utf8"));if(!z.ok)return C(`${t} is not a valid App Manifest.`,z.issues.map(it=>`${S.cyan(it.path)} ${it.message}`));r=z.manifest}catch{return C(`Cannot read ${t}.`,["Run `gamestage inspect .` or `gamestage create` first."])}let o=r.backend.round??LO(r.backend.archetype),n=r.backend.round?{source:"manifest",archetype:o.archetype,detail:"The Engine used this game's own backend.round from the manifest."}:{source:"stand-in",archetype:o.archetype,detail:`The manifest carries no round, so the Engine used a representative ${o.archetype} stand-in supplied by Gamestage. It did not test the game's production content from Studio.`};if(!dn.includes(o.archetype))return C(`No Engine here serves the ${o.archetype} archetype yet.`,[`Built so far: ${dn.join(", ")}.`]);let i=uf(e.file??"index.html"),a;try{a=await lf(i,"utf8")}catch{return C(`Cannot read ${e.file??"index.html"}.`)}let s=[];s.push({id:"round-is-the-games-own",what:"the round played here was this game's own",status:n.source==="manifest"?"verified":"skipped",detail:n.source==="manifest"?void 0:"This game keeps its content in Studio, which is where it belongs, so there is no round here to play and this check cannot run. That is a limit of checking locally rather than anything wrong with the game. Play the deployed game to prove its round."});let c=uf(e.dir??Cx(i)),l;try{l=await Ux(c,o)}catch(z){return C(`Cannot read the publish set at ${e.dir??Cx(i)}.`,[z instanceof Error?z.message:"The directory could not be walked."])}let p=l.findings.filter(z=>z.fatal),d=df(a,o),m=d.length>0||p.length>0;s.push({id:"solution-absent",what:`the answers are not in what a deploy publishes (${l.files.length} file${l.files.length===1?"":"s"}, ${l.read} read)`,status:m?"open":"verified",detail:m?[d.length?pf(o,d):void 0,...p.map(z=>`${z.path}: ${z.why}`)].filter(Boolean).join(" "):void 0});let h=await Ya(l.files),f=h.map(z=>z.text).join(`
7846
- `),w=Ka(f),_=zO(r,o.archetype,w).filter(([,z])=>!Rm(f,z)).map(([z])=>z);s.push({id:"settings-read",what:"every producer setting the page offers is read by the game"+(w.length?`, and it offers ${w.length} more for controls it has (${w.join(", ")})`:""),status:_.length?"open":"verified",detail:_.length?`The page does not read: ${_.join(", ")}. Apply each setting from game.presentation before deploying.`:void 0});let A=Cs(h),U=l.files.some(z=>{let it=z.relativePath.split("/").pop();return it===ge||it===xe})||a.includes(ge)||a.includes(xe),B=a.includes("createPlayerClient")||/\bstart\s*\(/.test(a);s.push({id:"client-present",what:"the client the page imports is there",status:U||!B?"verified":"open",detail:B&&!U?"The page uses a Gamestage client but does not import the one we ship. Run `gamestage client`.":void 0});let Ke=["@monterosa/sdk-core","@monterosa/sdk-connect-kit","@monterosa/sdk-consent-kit","@monterosa/sdk-storage-kit","@monterosa/sdk-analytics-kit","@monterosa/sdk-interact-kit","@monterosa/sdk-identify-kit","@monterosa/sdk-util"].filter(z=>f.includes(z));s.push({id:"client-is-the-door",what:"the game reaches Monterosa through the client, not around it",status:Ke.length===0?"verified":"open",detail:Ke.length===0?void 0:`This game imports ${Ke.join(", ")} directly. The Gamestage client is the only supported way to reach Interaction Cloud: it holds the connection, the consent gate and the server clock, and a second one beside it has none of them. Use what \`start()\` returns instead, and say what is missing from it if something is.`});let rt=/\bDate\.now\s*\(|\bnew\s+Date\s*\(\s*\)/.test(f),q=/\blocks_at\b|\bopens_at\b|\bcountdown\b|\bdeadline\b|\btimeRemaining\b/i.test(f);s.push({id:"server-time",what:"a deadline comes from the server's clock",status:rt&&q?"open":"verified",detail:rt&&q?"This game reads the device clock and handles a round's timing. A lock or a countdown decided that way is a deadline the fan can move by changing their clock. Use `game.now()`, which is the server's time through the client. `Date.now()` is fine for anything that decides nothing, like an animation.":void 0});let fe=await As({game:r.app.id,round:o,title:r.app.title});await new Promise(z=>fe.listen(0,"127.0.0.1",()=>z()));let hn=fe.address(),zo=hn&&typeof hn!="string"?`http://127.0.0.1:${hn.port}`:"",fn=await import("node:http").then(({createServer:z})=>z(async(it,Ls)=>{let Sf=(it.url??"/").split("?")[0],$f=Sf==="/"?i:uf(i,"..",Sf.slice(1));try{let OS=await lf($f);Ls.writeHead(200,{"content-type":$f.endsWith(".js")?"text/javascript":"text/html"}),Ls.end(OS)}catch{Ls.writeHead(404).end()}}));await new Promise(z=>fn.listen(0,"127.0.0.1",()=>z()));let Gt=fn.address(),ot=Gt&&typeof Gt!="string"?`http://127.0.0.1:${Gt.port}/`:"";try{s.push(...e.noBrowser?mf("Asked not to open a browser."):await jx(ot,zo,r.app.id))}finally{fe.close(),fn.close()}let le=Dx(s),$r=l.findings.filter(z=>!z.fatal);if(j()){L({ok:le.outcome==="verified",outcome:le.outcome,exitCode:le.exitCode,checks:s,open:le.open,skipped:le.skipped,round:n,copy_candidates:A,publish_set:{directory:c,files:l.files.map(z=>z.relativePath),read:l.read,warnings:$r}}),le.exitCode!==0&&process.exit(le.exitCode);return}O(le.outcome==="verified"?"Verified":le.outcome==="failed"?"Verification failed":"Verification incomplete"),I("round used for verification",n.source),v(` ${S.dim(n.detail)}`);for(let z of s){let it=z.status==="verified"?S.green("ok"):z.status==="open"?S.yellow("open"):S.dim("skipped");I(z.what,it),z.detail&&v(` ${S.dim(z.detail)}`)}if($r.length){v(),v(S.dim(" Also in the publish set, and a deploy would upload it:"));for(let z of $r)v(` ${S.dim("\xB7")} ${S.cyan(z.path)} ${S.dim(z.why)}`)}if(A.length){v(),v(S.dim(" Copy a producer may need to own:"));for(let z of A)v(` ${S.dim("\xB7")} ${S.cyan(`${z.file}:${z.line}`)} ${z.text} ${S.dim(`(${z.confidence}, ${z.level})`)}`)}v(),le.outcome==="verified"?E("The Engine decided the outcome and the page showed it. That is the migration done."):le.outcome==="failed"?E("A check remains open, so the game failed verification. Read the open check and fix its cause."):E("No check is open, but the game could not be fully proved here. Run the skipped check before treating it as verified."),v(),le.exitCode!==0&&process.exit(le.exitCode)}var Ps,Px,Ox,MO,FO,BO,ff=y(()=>{"use strict";oe();Qh();Zt();Tx();Jm();cf();Xm();ne();Ps="button.pick, [data-pick]",Px="#submit, button[type=submit], .submit",Ox="#submit:not([disabled]), button[type=submit]:not([disabled]), .submit:not([disabled])",MO=[{id:"rendered-outcome",what:"the screen shows what the server decided"},{id:"connection-noticed",what:"the page notices the connection going and coming back"}];FO=[".git","node_modules",".next",".nuxt",".svelte-kit","dist","build"];BO=new Set([".envrc",".netrc",".npmrc",".pgpass","id_rsa","id_ed25519","credentials","secrets","env.local"])});var vt=class extends Error{constructor(t,r,o){super(o),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=t,this.nestedError=void 0}},Bt=class extends vt{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};var Er=class{constructor(t,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,t[0]){case"<":this.required=!0,this._name=t.slice(1,-1);break;case"[":this.required=!1,this._name=t.slice(1,-1);break;default:this.required=!0,this._name=t;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:(r.push(t),r)}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,o)=>{if(!this.argChoices.includes(r))throw new Bt(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,o):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Mo(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}import{EventEmitter as LS}from"node:events";import Ms from"node:child_process";import at from"node:path";import Fo from"node:fs";import K from"node:process";import{stripVTControlCharacters as zS}from"node:util";import{stripVTControlCharacters as RS}from"node:util";var Tr=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(t){this.helpWidth=this.helpWidth??t.helpWidth??80}visibleCommands(t){let r=t.commands.filter(n=>!n._hidden),o=t._getHelpCommand();return o&&!o._hidden&&r.push(o),this.sortSubcommands&&r.sort((n,i)=>n.name().localeCompare(i.name())),r}compareOptions(t,r){let o=n=>n.short?n.short.replace(/^-/,""):n.long.replace(/^--/,"");return o(t).localeCompare(o(r))}visibleOptions(t){let r=t.options.filter(n=>!n.hidden),o=t._getHelpOption();if(o&&!o.hidden){let n=o.short&&t._findOption(o.short),i=o.long&&t._findOption(o.long);!n&&!i?r.push(o):o.long&&!i?r.push(t.createOption(o.long,o.description)):o.short&&!n&&r.push(t.createOption(o.short,o.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];let r=[];for(let o=t.parent;o;o=o.parent){let n=o.options.filter(i=>!i.hidden);r.push(...n)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(t){return t._argsDescription&&t.registeredArguments.forEach(r=>{r.description=r.description||t._argsDescription[r.name()]||""}),t.registeredArguments.find(r=>r.description)?t.registeredArguments:[]}subcommandTerm(t){let r=t.registeredArguments.map(o=>Mo(o)).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,r){return r.visibleCommands(t).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(n)))),0)}longestOptionTermLength(t,r){return r.visibleOptions(t).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleOptionTerm(r.optionTerm(n)))),0)}longestGlobalOptionTermLength(t,r){return r.visibleGlobalOptions(t).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleOptionTerm(r.optionTerm(n)))),0)}longestArgumentTermLength(t,r){return r.visibleArguments(t).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(n)))),0)}commandUsage(t){let r=t._name;t._aliases[0]&&(r=r+"|"+t._aliases[0]);let o="";for(let n=t.parent;n;n=n.parent)o=n.name()+" "+o;return o+r+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(o=>JSON.stringify(o)).join(", ")}`),t.defaultValue!==void 0&&(t.required||t.optional||t.isBoolean()&&typeof t.defaultValue=="boolean")&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),t.presetArg!==void 0&&t.optional&&r.push(`preset: ${JSON.stringify(t.presetArg)}`),t.envVar!==void 0&&r.push(`env: ${t.envVar}`),r.length>0){let o=`(${r.join(", ")})`;return t.description?`${t.description} ${o}`:o}return t.description}argumentDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(o=>JSON.stringify(o)).join(", ")}`),t.defaultValue!==void 0&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),r.length>0){let o=`(${r.join(", ")})`;return t.description?`${t.description} ${o}`:o}return t.description}formatItemList(t,r,o){return r.length===0?[]:[o.styleTitle(t),...r,""]}groupItems(t,r,o){let n=new Map;return t.forEach(i=>{let a=o(i);n.has(a)||n.set(a,[])}),r.forEach(i=>{let a=o(i);n.has(a)||n.set(a,[]),n.get(a).push(i)}),n}formatHelp(t,r){let o=r.padWidth(t,r),n=r.helpWidth??80;function i(d,m){return r.formatItem(d,o,m,r)}let a=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(t))}`,""],s=r.commandDescription(t);s.length>0&&(a=a.concat([r.boxWrap(r.styleCommandDescription(s),n),""]));let c=r.visibleArguments(t).map(d=>i(r.styleArgumentTerm(r.argumentTerm(d)),r.styleArgumentDescription(r.argumentDescription(d))));if(a=a.concat(this.formatItemList("Arguments:",c,r)),this.groupItems(t.options,r.visibleOptions(t),d=>d.helpGroupHeading??"Options:").forEach((d,m)=>{let h=d.map(f=>i(r.styleOptionTerm(r.optionTerm(f)),r.styleOptionDescription(r.optionDescription(f))));a=a.concat(this.formatItemList(m,h,r))}),r.showGlobalOptions){let d=r.visibleGlobalOptions(t).map(m=>i(r.styleOptionTerm(r.optionTerm(m)),r.styleOptionDescription(r.optionDescription(m))));a=a.concat(this.formatItemList("Global Options:",d,r))}return this.groupItems(t.commands,r.visibleCommands(t),d=>d.helpGroup()||"Commands:").forEach((d,m)=>{let h=d.map(f=>i(r.styleSubcommandTerm(r.subcommandTerm(f)),r.styleSubcommandDescription(r.subcommandDescription(f))));a=a.concat(this.formatItemList(m,h,r))}),a.join(`
7847
- `)}displayWidth(t){return RS(t).length}styleTitle(t){return t}styleUsage(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r==="[command]"?this.styleSubcommandText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleCommandText(r)).join(" ")}styleCommandDescription(t){return this.styleDescriptionText(t)}styleOptionDescription(t){return this.styleDescriptionText(t)}styleSubcommandDescription(t){return this.styleDescriptionText(t)}styleArgumentDescription(t){return this.styleDescriptionText(t)}styleDescriptionText(t){return t}styleOptionTerm(t){return this.styleOptionText(t)}styleSubcommandTerm(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).join(" ")}styleArgumentTerm(t){return this.styleArgumentText(t)}styleOptionText(t){return t}styleArgumentText(t){return t}styleSubcommandText(t){return t}styleCommandText(t){return t}padWidth(t,r){return Math.max(r.longestOptionTermLength(t,r),r.longestGlobalOptionTermLength(t,r),r.longestSubcommandTermLength(t,r),r.longestArgumentTermLength(t,r))}preformatted(t){return/\n[^\S\r\n]/.test(t)}formatItem(t,r,o,n){let a=" ".repeat(2);if(!o)return a+t;let s=t.padEnd(r+t.length-n.displayWidth(t)),c=2,p=(this.helpWidth??80)-r-c-2,d;return p<this.minWidthToWrap||n.preformatted(o)?d=o:d=n.boxWrap(o,p).replace(/\n/g,`
7848
- `+" ".repeat(r+c)),a+s+" ".repeat(c)+d.replace(/\n/g,`
7849
- ${a}`)}boxWrap(t,r){if(r<this.minWidthToWrap)return t;let o=t.split(/\r\n|\n/),n=/[\s]*[^\s]+/g,i=[];return o.forEach(a=>{let s=a.match(n);if(s===null){i.push("");return}let c=[s.shift()],l=this.displayWidth(c[0]);s.forEach(p=>{let d=this.displayWidth(p);if(l+d<=r){c.push(p),l+=d;return}i.push(c.join(""));let m=p.trimStart();c=[m],l=this.displayWidth(m)}),i.push(c.join(""))}),i.join(`
7850
- `)}};var gn=class{constructor(t,r){this.flags=t,this.description=r||"",this.required=t.includes("<"),this.optional=t.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(t),this.mandatory=!1;let o=DS(t);this.short=o.shortFlag,this.long=o.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}preset(t){return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflictsWith.concat(t),this}implies(t){let r=t;return typeof t=="string"&&(r={[t]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(t){return this.envVar=t,this}argParser(t){return this.parseArg=t,this}makeOptionMandatory(t=!0){return this.mandatory=!!t,this}hideHelp(t=!0){return this.hidden=!!t,this}_collectValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:(r.push(t),r)}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,o)=>{if(!this.argChoices.includes(r))throw new Bt(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,o):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Ef(this.name().replace(/^no-/,"")):Ef(this.name())}helpGroup(t){return this.helpGroupHeading=t,this}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Uo=class{constructor(t){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,t.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,o)=>{this.positiveOptions.has(o)&&this.dualOptions.add(o)})}valueFromOption(t,r){let o=r.attributeName();if(!this.dualOptions.has(o))return!0;let n=this.negativeOptions.get(o).presetArg,i=n!==void 0?n:!1;return r.negate===(i===t)}};function Ef(e){return e.split("-").reduce((t,r)=>t+r[0].toUpperCase()+r.slice(1))}function DS(e){let t,r,o=/^-[^-]$/,n=/^--[^-]/,i=e.split(/[ |,]+/).concat("guard");if(o.test(i[0])&&(t=i.shift()),n.test(i[0])&&(r=i.shift()),!t&&o.test(i[0])&&(t=i.shift()),!t&&n.test(i[0])&&(t=r,r=i.shift()),i[0].startsWith("-")){let a=i[0],s=`option creation failed due to '${a}' in option flags '${e}'`;throw/^-[^-][^-]/.test(a)?new Error(`${s}
8129
+ `).forEach((n,i)=>{let a=[...[...n.matchAll(/>([^<>]{2,160})</g)].map(s=>s[1]),...[...n.matchAll(/\b(?:title|alt|placeholder|aria-label)="([^"]{2,160})"/gi)].map(s=>s[1])];for(let s of a){let c=s.replace(/\s+/g," ");if(!oS(c))continue;let d=Ef(c);t.push({text:d,...iS(d),file:e.relative,line:i+1})}}),t}function LN(e){let t=[];return e.text.split(`
8130
+ `).forEach((r,o)=>{if(!/^\s*(import|export|require\()/.test(r))for(let n of r.matchAll(/(['"`])((?:(?!\1)[^\\\r\n]|\\.){2,160})\1/g)){let i=n[2].replace(/\s+/g," ");if(!oS(i))continue;let a=Ef(i),s=r.slice((n.index??0)+n[0].length);/^\s*[:\]]/.test(s)||t.push({text:a,...iS(a),file:e.relative,line:o+1})}}),t}function Fs(e){let t=[];for(let o of e)/\.(html?|svelte|vue)$/i.test(o.relative)&&t.push(...jN(o)),/\.(m?[jt]sx?|svelte|vue)$/i.test(o.relative)&&t.push(...LN(o));let r=new Map;for(let o of t){let n=o.text.toLowerCase();r.has(n)||r.set(n,o)}return[...r.values()].sort((o,n)=>o.level===n.level?o.text.localeCompare(n.text):o.level.localeCompare(n.level))}var NN,RN,DN,Tf=v(()=>{"use strict";NN=[/^(loading|error|ok|yes|no|on|off|true|false|null|undefined)$/i,/^[\d\s.,:%+-]+$/,/^[a-z0-9_-]+$/,/^(#|\.|\/|https?:|data:|mailto:)/i,/^[A-Z_]{2,}$/,/^\s*$/],RN=/[{}<>|]|=>|\(\)|;\s*$|^\s*(function|const|let|var|import|export)\b/;DN=[{test:/^(play|start|go|begin|submit|share|try|see|next|done|finish)\b/i,level:"project",setting:"play_button_label",because:"reads as a button a fan presses, and a producer owns the words on it"},{test:/\b(how to play|the rules|instructions)\b/i,level:"project",setting:"how_to_play",because:"reads as the rules, which a producer rewrites without a deploy"},{test:/\b(hall of fame|all-?star|all-?nba|rookie|veteran|starter|busted|legend|champion|gold|silver|bronze)\b/i,level:"project",because:"reads as a rank a fan is given, which is the game's ladder and does not change between editions"},{test:/\b(today|tonight|this week|round \d|day \d|week \d)\b/i,level:"element",because:"names one round rather than the game, so it changes every time the round does"},{test:/\b(edition|season|fixture|matchday|gameweek|tournament|final|semi)\b/i,level:"event",because:"names a run of the game rather than the game, so it belongs to the edition"},{test:/\balready played\b|\bcome back\b|\bsee your result\b/i,level:"project",because:"a message a fan reads about their own state, and a producer's to word"}]});var yS={};nt(yS,{browserCheck:()=>FN,browserChecks:()=>pS,connectionCheck:()=>fS,runVerify:()=>Pf,scanPublishSet:()=>gS,verificationResult:()=>uS});import{readFile as Af}from"node:fs/promises";import{dirname as aS,resolve as If}from"node:path";function MN(e){switch(e){case"hunt":return Be.parse({archetype:e,number:1,prompt:"Pick the two that belong",board:["alpha","beta","gamma","delta"],targets:["alpha","beta"],open:!0});case"push":return Be.parse({archetype:e,number:1,prompt:"Two picks. Get close to 100 without going over.",target:100,targetLabel:"Points",slates:[{id:"first",label:"First pick",entries:[{key:"alpha",label:"Alpha",value:40},{key:"beta",label:"Beta",value:70}]},{id:"second",label:"Second pick",entries:[{key:"gamma",label:"Gamma",value:25},{key:"delta",label:"Delta",value:55}]}],open:!0});case"group":return Be.parse({archetype:e,number:1,prompt:"Find the groups. Four at a time.",board:["alpha","beta","gamma","delta","epsilon","zeta","eta","theta"],groups:[{key:"first",label:"First four",members:["alpha","beta","gamma","delta"]},{key:"second",label:"Second four",members:["epsilon","zeta","eta","theta"]}],open:!0});case"predict":return Be.parse({archetype:e,number:1,prompt:"Who takes it?",options:[{key:"alpha",label:"Alpha"},{key:"beta",label:"Beta"},{key:"draw",label:"Neither, it ends level"}],open:!0});default:throw new Error(`No representative round exists for the ${e} archetype.`)}}function zN(e,t,r){return(Uw({gameId:e.app.id,gameName:e.app.title,archetype:t,manifestRevision:e.manifest.revision,wording:r,urls:{baseAppsUrl:"",dashImage:"",embedUrl:""}})["project_settings.json"].sections??[]).flatMap(i=>i.properties??[]).flatMap(i=>{if(typeof i.key!="string")return[];let a=Jm[i.key];return a?[[i.key,a]]:[]})}function uS(e){let t=e.filter(o=>o.status==="open").length,r=e.filter(o=>o.status==="skipped").length;return t>0?{outcome:"failed",exitCode:1,open:t,skipped:r}:r>0?{outcome:"unverified",exitCode:2,open:t,skipped:r}:{outcome:"verified",exitCode:0,open:t,skipped:r}}function Cf(e){return UN.map(t=>({...t,status:"skipped",detail:e}))}async function pS(e,t,r){let o;try{o=await $f()}catch(i){return Cf("Chrome could not start. Check GAMESTAGE_CHROME points to a working browser, then "+`run verify again. ${i instanceof Error?i.message:""}`.trim())}if(o.status==="skipped")return Cf(o.detail);let n=o.browser;try{return[await hS(n,e,t,r),await fS(n,e)]}finally{await n.close().catch(()=>{})}}async function FN(e,t,r){let o;try{o=await $f()}catch(i){return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"skipped",detail:"Chrome could not start. Check GAMESTAGE_CHROME points to a working browser, then "+`run verify again. ${i instanceof Error?i.message:""}`.trim()}}if(o.status==="skipped")return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"skipped",detail:o.detail};let n=o.browser;try{return await hS(n,e,t,r)}finally{await n.close().catch(()=>{})}}async function WN(e){let t=Date.now()+GN;do{if((await e.query(Ko)).length>0)return;let r=await e.query("[data-gamestage-start]:not([disabled])");for(let o of r)if(await e.isVisible("[data-gamestage-start]:not([disabled])",o))return o;await new Promise(o=>setTimeout(o,BN))}while(Date.now()<t)}async function mS(e){for(let t=0;t<3&&!((await e.query(Ko)).length>0);t++){let r=await WN(e);if(r===void 0)break;await e.click("[data-gamestage-start]:not([disabled])",r).catch(()=>{}),await e.waitForSelector(Ko,5e3).catch(()=>{})}}async function hS(e,t,r,o){try{await e.addScriptToEvaluateOnNewDocument(`window.GAMESTAGE_API = ${JSON.stringify(r)};window.GAMESTAGE_GAME = ${JSON.stringify(o)};`),await e.navigate(t,2e4),await mS(e);let n=await e.query(Ko);if(n.length===0){let h=e.pageErrors[0],f=await e.query("#prompt").then(()=>e.html()).then(T=>/id="prompt"[^>]*>([^<]{0,160})/.exec(T)?.[1]?.trim()).catch(()=>{});return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"open",detail:`Found nothing to pick. The page did not render a board from the round.${h?` The page threw: ${h}`:f?` The page says: ${f}`:""}`}}let i=e.waitForResponse({urlIncludes:"/plays",method:"POST",timeout:15e3}).catch(()=>{}),a=0;for(let h of n)if(await e.click(Ko,h).catch(()=>{}),a+=1,(await e.query(cS)).length>0)break;let s=await e.query(sS);if(s.length===0)return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"open",detail:"No way to submit a play was found on the page."};if((await e.query(cS)).length===0)return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"open",detail:`Selected ${a} of ${n.length} on the board and the page never allowed a play: Submit stayed disabled throughout. The page decides when a guess is complete, so either it needs a combination this cannot reach by picking in order, or it is not enabling Submit when it should.`};await e.click(sS,s[0]);let c=await i;if(!c)return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"open",detail:"The page was played and never asked the Engine. Whatever it showed, it decided for itself."};let d=await c.json();if(e.pageErrors.length)return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"open",detail:`The page threw: ${e.pageErrors[0]}`};let u=await e.html(),p=d.round_state?.score,m=p===void 0||u.includes(String(p))||u.includes(p.toLocaleString("en-US"));return{id:"rendered-outcome",what:"the screen shows what the server decided",status:m?"verified":"open",detail:m?`The play went to the Engine and came back ${d.outcome}.`:`The Engine committed a score of ${p} and the page does not show it.`}}catch(n){return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"open",detail:n instanceof Error?n.message:"The page could not be played."}}}async function fS(e,t){let r="connection-noticed",o="the page notices the connection going and coming back";try{await e.navigate(t,2e4),await mS(e);let n=await e.html();await e.setOffline(!0);let i=await lS(e,n,3e3);return i?(await e.setOffline(!1),await lS(e,i,3e3)?{id:r,what:o,status:"verified",detail:"Taken offline the page said so, and it recovered when the network returned."}:{id:r,what:o,status:"open",detail:"The page noticed the connection going and not it coming back: it was still in its offline state three seconds after the network returned. Listen for `online` as well, take the message down, and re-read the round rather than trusting what is on the screen."}):{id:r,what:o,status:"open",detail:"The connection was taken away and the page did not change. A fan who loses their signal is shown a game that still looks playable, and every tap on it is a tap the Engine never sees. Listen for the window's `offline` event and say so on the screen."}}catch(n){return{id:r,what:o,status:"open",detail:n instanceof Error?n.message:"The page could not be taken offline and back."}}finally{await e.setOffline(!1).catch(()=>{})}}async function lS(e,t,r){let o=Date.now()+r;for(;Date.now()<o;){let n=await e.html().catch(()=>t);if(n!==t)return n;await new Promise(i=>setTimeout(i,100))}}function KN(e){let t=e.split("/").slice(0,-1),r=t.findIndex(o=>ZN.includes(o));return r===-1?void 0:t.slice(0,r+1).join("/")}function dS(e){let t=e.split("/").pop()??e;return t.endsWith("~")||t===".DS_Store"||/\.(bak|orig|swp|swo|rej|old)$/.test(t)||/\.old\.[^.]+$/.test(t)}async function gS(e,t){let{files:r,skippedLinks:o}=hh(e,{symlinks:"skip"}),n=[],i=new Set,a=0;for(let s of o)n.push({path:s,why:"a symlink, which a deploy would refuse to publish",fatal:!1});for(let s of r){let c=KN(s.relativePath);if(c){i.has(c)||(i.add(c),n.push({path:`${c}/`,why:"a build or history directory; `deploy --dir` would upload it whole",fatal:!1}));continue}if(uh(s.relativePath)){n.push({path:s.relativePath,why:"environment or credential shaped",fatal:!0});continue}let d=await Po(s.path);if(d===void 0)continue;a+=1;let u=ce(d);if(u.ok&&u.manifest.backend.round){n.push({path:s.relativePath,why:"an App Manifest, which carries the round's private half",fatal:!0});continue}let p=br(d,t);if(p.length){n.push({path:s.relativePath,why:_r(t,p),fatal:!0});continue}let m;try{let h=JSON.parse(d);h&&Array.isArray(h.sourcesContent)&&(m=h)}catch{}if(m){let h=m.sourcesContent.filter(_=>typeof _=="string").join(`
8131
+ `),f=h?br(h,t):[];if(f.length){n.push({path:s.relativePath,why:`${_r(t,f)} It is inside the map's own copy of your sources.`,fatal:!0});continue}n.push({path:s.relativePath,why:"a source map, which publishes your sources",fatal:!1});continue}dS(s.relativePath)&&n.push({path:s.relativePath,why:"an editor or merge leftover",fatal:!1})}for(let s of r)dS(s.relativePath)&&!n.some(c=>c.path===s.relativePath)&&n.push({path:s.relativePath,why:"an editor or merge leftover",fatal:!1});return{files:r,read:a,findings:n}}async function Pf(e){let t=e.manifest??"gamestage.yaml",r;try{let F=ce(await Af(t,"utf8"));if(!F.ok)return P(`${t} is not a valid App Manifest.`,F.issues.map(Ke=>`${$.cyan(Ke.path)} ${Ke.message}`));r=F.manifest}catch{return P(`Cannot read ${t}.`,["Run `gamestage inspect .` or `gamestage create` first."])}let o=r.backend.round??MN(r.backend.archetype),n=r.backend.round?{source:"manifest",archetype:o.archetype,detail:"The Engine used this game's own backend.round from the manifest."}:{source:"stand-in",archetype:o.archetype,detail:`The manifest carries no round, so the Engine used a representative ${o.archetype} stand-in supplied by Gamestage. It did not test the game's production content from Studio.`};if(!vn.includes(o.archetype))return P(`No Engine here serves the ${o.archetype} archetype yet.`,[`Built so far: ${vn.join(", ")}.`]);let i=If(e.file??"index.html"),a;try{a=await Af(i,"utf8")}catch{return P(`Cannot read ${e.file??"index.html"}.`)}let s=[];s.push({id:"round-is-the-games-own",what:"the round played here was this game's own",status:n.source==="manifest"?"verified":"skipped",detail:n.source==="manifest"?void 0:"This game keeps its content in Studio, which is where it belongs, so there is no round here to play and this check cannot run. That is a limit of checking locally rather than anything wrong with the game. Play the deployed game to prove its round."});let c=If(e.dir??aS(i)),d;try{d=await gS(c,o)}catch(F){return P(`Cannot read the publish set at ${e.dir??aS(i)}.`,[F instanceof Error?F.message:"The directory could not be walked."])}let u=d.findings.filter(F=>F.fatal),p=br(a,o),m=p.length>0||u.length>0;s.push({id:"solution-absent",what:`the answers are not in what a deploy publishes (${d.files.length} file${d.files.length===1?"":"s"}, ${d.read} read)`,status:m?"open":"verified",detail:m?[p.length?_r(o,p):void 0,...u.map(F=>`${F.path}: ${F.why}`)].filter(Boolean).join(" "):void 0});let h=await as(d.files),f=h.map(F=>F.text).join(`
8132
+ `),_=es(f),T=zN(r,o.archetype,_).filter(([,F])=>!Ym(f,F)).map(([F])=>F);s.push({id:"settings-read",what:"every producer setting the page offers is read by the game"+(_.length?`, and it offers ${_.length} more for controls it has (${_.join(", ")})`:""),status:T.length?"open":"verified",detail:T.length?`The page does not read: ${T.join(", ")}. Apply each setting from game.presentation before deploying.`:void 0});let A=Fs(h),C=d.files.some(F=>{let Ke=F.relativePath.split("/").pop();return Ke===ae||Ke===be})||a.includes(ae)||a.includes(be),D=a.includes("createPlayerClient")||/\bstart\s*\(/.test(a);s.push({id:"client-present",what:"the client the page imports is there",status:C||!D?"verified":"open",detail:D&&!C?"The page uses a Gamestage client but does not import the one we ship. Run `gamestage client`.":void 0});let X=["@monterosa/sdk-core","@monterosa/sdk-connect-kit","@monterosa/sdk-consent-kit","@monterosa/sdk-storage-kit","@monterosa/sdk-analytics-kit","@monterosa/sdk-interact-kit","@monterosa/sdk-identify-kit","@monterosa/sdk-util"].filter(F=>f.includes(F));s.push({id:"client-is-the-door",what:"the game reaches Monterosa through the client, not around it",status:X.length===0?"verified":"open",detail:X.length===0?void 0:`This game imports ${X.join(", ")} directly. The Gamestage client is the only supported way to reach Interaction Cloud: it holds the connection, the consent gate and the server clock, and a second one beside it has none of them. Use what \`start()\` returns instead, and say what is missing from it if something is.`});let V=/\bDate\.now\s*\(|\bnew\s+Date\s*\(\s*\)/.test(f),te=/\blocks_at\b|\bopens_at\b|\bcountdown\b|\bdeadline\b|\btimeRemaining\b/i.test(f);s.push({id:"server-time",what:"a deadline comes from the server's clock",status:V&&te?"open":"verified",detail:V&&te?"This game reads the device clock and handles a round's timing. A lock or a countdown decided that way is a deadline the fan can move by changing their clock. Use `game.now()`, which is the server's time through the client. `Date.now()` is fine for anything that decides nothing, like an animation.":void 0});let qt=await zs({game:r.app.id,round:o,title:r.app.title});await new Promise(F=>qt.listen(0,"127.0.0.1",()=>F()));let Q=qt.address(),Oe=Q&&typeof Q!="string"?`http://127.0.0.1:${Q.port}`:"",wn=await import("node:http").then(({createServer:F})=>F(async(Ke,Hs)=>{let Ff=(Ke.url??"/").split("?")[0],Gf=Ff==="/"?i:If(i,"..",Ff.slice(1));try{let c$=await Af(Gf);Hs.writeHead(200,{"content-type":Gf.endsWith(".js")?"text/javascript":"text/html"}),Hs.end(c$)}catch{Hs.writeHead(404).end()}}));await new Promise(F=>wn.listen(0,"127.0.0.1",()=>F()));let kn=wn.address(),Vo=kn&&typeof kn!="string"?`http://127.0.0.1:${kn.port}/`:"";try{s.push(...e.noBrowser?Cf("Asked not to open a browser."):await pS(Vo,Oe,r.app.id))}finally{qt.close(),wn.close()}let pe=uS(s),Ze=d.findings.filter(F=>!F.fatal);if(M()){U({ok:pe.outcome==="verified",outcome:pe.outcome,exitCode:pe.exitCode,checks:s,open:pe.open,skipped:pe.skipped,round:n,copy_candidates:A,publish_set:{directory:c,files:d.files.map(F=>F.relativePath),read:d.read,warnings:Ze}}),pe.exitCode!==0&&process.exit(pe.exitCode);return}R(pe.outcome==="verified"?"Verified":pe.outcome==="failed"?"Verification failed":"Verification incomplete"),O("round used for verification",n.source),y(` ${$.dim(n.detail)}`);for(let F of s){let Ke=F.status==="verified"?$.green("ok"):F.status==="open"?$.yellow("open"):$.dim("skipped");O(F.what,Ke),F.detail&&y(` ${$.dim(F.detail)}`)}if(Ze.length){y(),y($.dim(" Also in the publish set, and a deploy would upload it:"));for(let F of Ze)y(` ${$.dim("\xB7")} ${$.cyan(F.path)} ${$.dim(F.why)}`)}if(A.length){y(),y($.dim(" Copy a producer may need to own:"));for(let F of A)y(` ${$.dim("\xB7")} ${$.cyan(`${F.file}:${F.line}`)} ${F.text} ${$.dim(`(${F.confidence}, ${F.level})`)}`)}y(),pe.outcome==="verified"?k("The Engine decided the outcome and the page showed it. That is the migration done."):pe.outcome==="failed"?k("A check remains open, so the game failed verification. Read the open check and fix its cause."):k("No check is open, but the game could not be fully proved here. Run the skipped check before treating it as verified."),y(),pe.exitCode!==0&&process.exit(pe.exitCode)}var Ko,sS,cS,UN,GN,BN,ZN,Of=v(()=>{"use strict";ie();bf();Et();rS();mh();Tf();gh();is();le();Ko="button.pick, [data-pick]",sS="#submit, button[type=submit], .submit",cS="#submit:not([disabled]), button[type=submit]:not([disabled]), .submit:not([disabled])",UN=[{id:"rendered-outcome",what:"the screen shows what the server decided"},{id:"connection-noticed",what:"the page notices the connection going and coming back"}];GN=15e3,BN=250;ZN=[".git","node_modules",".next",".nuxt",".svelte-kit","dist","build"]});var St=class extends Error{constructor(t,r,o){super(o),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=t,this.nestedError=void 0}},Xt=class extends St{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};var Pr=class{constructor(t,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,t[0]){case"<":this.required=!0,this._name=t.slice(1,-1);break;case"[":this.required=!1,this._name=t.slice(1,-1);break;default:this.required=!0,this._name=t;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:(r.push(t),r)}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,o)=>{if(!this.argChoices.includes(r))throw new Xt(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,o):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Ho(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}import{EventEmitter as m$}from"node:events";import Ys from"node:child_process";import ut from"node:path";import Yo from"node:fs";import Z from"node:process";import{stripVTControlCharacters as h$}from"node:util";import{stripVTControlCharacters as d$}from"node:util";var Or=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(t){this.helpWidth=this.helpWidth??t.helpWidth??80}visibleCommands(t){let r=t.commands.filter(n=>!n._hidden),o=t._getHelpCommand();return o&&!o._hidden&&r.push(o),this.sortSubcommands&&r.sort((n,i)=>n.name().localeCompare(i.name())),r}compareOptions(t,r){let o=n=>n.short?n.short.replace(/^-/,""):n.long.replace(/^--/,"");return o(t).localeCompare(o(r))}visibleOptions(t){let r=t.options.filter(n=>!n.hidden),o=t._getHelpOption();if(o&&!o.hidden){let n=o.short&&t._findOption(o.short),i=o.long&&t._findOption(o.long);!n&&!i?r.push(o):o.long&&!i?r.push(t.createOption(o.long,o.description)):o.short&&!n&&r.push(t.createOption(o.short,o.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];let r=[];for(let o=t.parent;o;o=o.parent){let n=o.options.filter(i=>!i.hidden);r.push(...n)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(t){return t._argsDescription&&t.registeredArguments.forEach(r=>{r.description=r.description||t._argsDescription[r.name()]||""}),t.registeredArguments.find(r=>r.description)?t.registeredArguments:[]}subcommandTerm(t){let r=t.registeredArguments.map(o=>Ho(o)).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,r){return r.visibleCommands(t).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(n)))),0)}longestOptionTermLength(t,r){return r.visibleOptions(t).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleOptionTerm(r.optionTerm(n)))),0)}longestGlobalOptionTermLength(t,r){return r.visibleGlobalOptions(t).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleOptionTerm(r.optionTerm(n)))),0)}longestArgumentTermLength(t,r){return r.visibleArguments(t).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(n)))),0)}commandUsage(t){let r=t._name;t._aliases[0]&&(r=r+"|"+t._aliases[0]);let o="";for(let n=t.parent;n;n=n.parent)o=n.name()+" "+o;return o+r+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(o=>JSON.stringify(o)).join(", ")}`),t.defaultValue!==void 0&&(t.required||t.optional||t.isBoolean()&&typeof t.defaultValue=="boolean")&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),t.presetArg!==void 0&&t.optional&&r.push(`preset: ${JSON.stringify(t.presetArg)}`),t.envVar!==void 0&&r.push(`env: ${t.envVar}`),r.length>0){let o=`(${r.join(", ")})`;return t.description?`${t.description} ${o}`:o}return t.description}argumentDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(o=>JSON.stringify(o)).join(", ")}`),t.defaultValue!==void 0&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),r.length>0){let o=`(${r.join(", ")})`;return t.description?`${t.description} ${o}`:o}return t.description}formatItemList(t,r,o){return r.length===0?[]:[o.styleTitle(t),...r,""]}groupItems(t,r,o){let n=new Map;return t.forEach(i=>{let a=o(i);n.has(a)||n.set(a,[])}),r.forEach(i=>{let a=o(i);n.has(a)||n.set(a,[]),n.get(a).push(i)}),n}formatHelp(t,r){let o=r.padWidth(t,r),n=r.helpWidth??80;function i(p,m){return r.formatItem(p,o,m,r)}let a=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(t))}`,""],s=r.commandDescription(t);s.length>0&&(a=a.concat([r.boxWrap(r.styleCommandDescription(s),n),""]));let c=r.visibleArguments(t).map(p=>i(r.styleArgumentTerm(r.argumentTerm(p)),r.styleArgumentDescription(r.argumentDescription(p))));if(a=a.concat(this.formatItemList("Arguments:",c,r)),this.groupItems(t.options,r.visibleOptions(t),p=>p.helpGroupHeading??"Options:").forEach((p,m)=>{let h=p.map(f=>i(r.styleOptionTerm(r.optionTerm(f)),r.styleOptionDescription(r.optionDescription(f))));a=a.concat(this.formatItemList(m,h,r))}),r.showGlobalOptions){let p=r.visibleGlobalOptions(t).map(m=>i(r.styleOptionTerm(r.optionTerm(m)),r.styleOptionDescription(r.optionDescription(m))));a=a.concat(this.formatItemList("Global Options:",p,r))}return this.groupItems(t.commands,r.visibleCommands(t),p=>p.helpGroup()||"Commands:").forEach((p,m)=>{let h=p.map(f=>i(r.styleSubcommandTerm(r.subcommandTerm(f)),r.styleSubcommandDescription(r.subcommandDescription(f))));a=a.concat(this.formatItemList(m,h,r))}),a.join(`
8133
+ `)}displayWidth(t){return d$(t).length}styleTitle(t){return t}styleUsage(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r==="[command]"?this.styleSubcommandText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleCommandText(r)).join(" ")}styleCommandDescription(t){return this.styleDescriptionText(t)}styleOptionDescription(t){return this.styleDescriptionText(t)}styleSubcommandDescription(t){return this.styleDescriptionText(t)}styleArgumentDescription(t){return this.styleDescriptionText(t)}styleDescriptionText(t){return t}styleOptionTerm(t){return this.styleOptionText(t)}styleSubcommandTerm(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).join(" ")}styleArgumentTerm(t){return this.styleArgumentText(t)}styleOptionText(t){return t}styleArgumentText(t){return t}styleSubcommandText(t){return t}styleCommandText(t){return t}padWidth(t,r){return Math.max(r.longestOptionTermLength(t,r),r.longestGlobalOptionTermLength(t,r),r.longestSubcommandTermLength(t,r),r.longestArgumentTermLength(t,r))}preformatted(t){return/\n[^\S\r\n]/.test(t)}formatItem(t,r,o,n){let a=" ".repeat(2);if(!o)return a+t;let s=t.padEnd(r+t.length-n.displayWidth(t)),c=2,u=(this.helpWidth??80)-r-c-2,p;return u<this.minWidthToWrap||n.preformatted(o)?p=o:p=n.boxWrap(o,u).replace(/\n/g,`
8134
+ `+" ".repeat(r+c)),a+s+" ".repeat(c)+p.replace(/\n/g,`
8135
+ ${a}`)}boxWrap(t,r){if(r<this.minWidthToWrap)return t;let o=t.split(/\r\n|\n/),n=/[\s]*[^\s]+/g,i=[];return o.forEach(a=>{let s=a.match(n);if(s===null){i.push("");return}let c=[s.shift()],d=this.displayWidth(c[0]);s.forEach(u=>{let p=this.displayWidth(u);if(d+p<=r){c.push(u),d+=p;return}i.push(c.join(""));let m=u.trimStart();c=[m],d=this.displayWidth(m)}),i.push(c.join(""))}),i.join(`
8136
+ `)}};var xn=class{constructor(t,r){this.flags=t,this.description=r||"",this.required=t.includes("<"),this.optional=t.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(t),this.mandatory=!1;let o=u$(t);this.short=o.shortFlag,this.long=o.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}preset(t){return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflictsWith.concat(t),this}implies(t){let r=t;return typeof t=="string"&&(r={[t]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(t){return this.envVar=t,this}argParser(t){return this.parseArg=t,this}makeOptionMandatory(t=!0){return this.mandatory=!!t,this}hideHelp(t=!0){return this.hidden=!!t,this}_collectValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:(r.push(t),r)}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,o)=>{if(!this.argChoices.includes(r))throw new Xt(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,o):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Bf(this.name().replace(/^no-/,"")):Bf(this.name())}helpGroup(t){return this.helpGroupHeading=t,this}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Jo=class{constructor(t){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,t.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,o)=>{this.positiveOptions.has(o)&&this.dualOptions.add(o)})}valueFromOption(t,r){let o=r.attributeName();if(!this.dualOptions.has(o))return!0;let n=this.negativeOptions.get(o).presetArg,i=n!==void 0?n:!1;return r.negate===(i===t)}};function Bf(e){return e.split("-").reduce((t,r)=>t+r[0].toUpperCase()+r.slice(1))}function u$(e){let t,r,o=/^-[^-]$/,n=/^--[^-]/,i=e.split(/[ |,]+/).concat("guard");if(o.test(i[0])&&(t=i.shift()),n.test(i[0])&&(r=i.shift()),!t&&o.test(i[0])&&(t=i.shift()),!t&&n.test(i[0])&&(t=r,r=i.shift()),i[0].startsWith("-")){let a=i[0],s=`option creation failed due to '${a}' in option flags '${e}'`;throw/^-[^-][^-]/.test(a)?new Error(`${s}
7851
8137
  - a short flag is a single dash and a single character
7852
8138
  - either use a single dash and a single character (for a short flag)
7853
8139
  - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):o.test(a)?new Error(`${s}
7854
8140
  - too many short flags`):n.test(a)?new Error(`${s}
7855
8141
  - too many long flags`):new Error(`${s}
7856
- - unrecognised flag format`)}if(t===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:r}}function jS(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let r=[];for(let o=0;o<=e.length;o++)r[o]=[o];for(let o=0;o<=t.length;o++)r[0][o]=o;for(let o=1;o<=t.length;o++)for(let n=1;n<=e.length;n++){let i;e[n-1]===t[o-1]?i=0:i=1,r[n][o]=Math.min(r[n-1][o]+1,r[n][o-1]+1,r[n-1][o-1]+i),n>1&&o>1&&e[n-1]===t[o-2]&&e[n-2]===t[o-1]&&(r[n][o]=Math.min(r[n][o],r[n-2][o-2]+1))}return r[e.length][t.length]}function zs(e,t){if(!t||t.length===0)return"";t=Array.from(new Set(t));let r=e.startsWith("--");r&&(e=e.slice(2),t=t.map(a=>a.slice(2)));let o=[],n=3,i=.4;return t.forEach(a=>{if(a.length<=1)return;let s=jS(e,a),c=Math.max(e.length,a.length);(c-s)/c>i&&(s<n?(n=s,o=[a]):s===n&&o.push(a))}),o.sort((a,s)=>a.localeCompare(s)),r&&(o=o.map(a=>`--${a}`)),o.length>1?`
8142
+ - unrecognised flag format`)}if(t===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:r}}function p$(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let r=[];for(let o=0;o<=e.length;o++)r[o]=[o];for(let o=0;o<=t.length;o++)r[0][o]=o;for(let o=1;o<=t.length;o++)for(let n=1;n<=e.length;n++){let i;e[n-1]===t[o-1]?i=0:i=1,r[n][o]=Math.min(r[n-1][o]+1,r[n][o-1]+1,r[n-1][o-1]+i),n>1&&o>1&&e[n-1]===t[o-2]&&e[n-2]===t[o-1]&&(r[n][o]=Math.min(r[n][o],r[n-2][o-2]+1))}return r[e.length][t.length]}function Js(e,t){if(!t||t.length===0)return"";t=Array.from(new Set(t));let r=e.startsWith("--");r&&(e=e.slice(2),t=t.map(a=>a.slice(2)));let o=[],n=3,i=.4;return t.forEach(a=>{if(a.length<=1)return;let s=p$(e,a),c=Math.max(e.length,a.length);(c-s)/c>i&&(s<n?(n=s,o=[a]):s===n&&o.push(a))}),o.sort((a,s)=>a.localeCompare(s)),r&&(o=o.map(a=>`--${a}`)),o.length>1?`
7857
8143
  (Did you mean one of ${o.join(", ")}?)`:o.length===1?`
7858
- (Did you mean ${o[0]}?)`:""}var yn=class e extends LS{constructor(t){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=t||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:r=>K.stdout.write(r),writeErr:r=>K.stderr.write(r),outputError:(r,o)=>o(r),getOutHelpWidth:()=>K.stdout.isTTY?K.stdout.columns:void 0,getErrHelpWidth:()=>K.stderr.isTTY?K.stderr.columns:void 0,getOutHasColors:()=>Af()??(K.stdout.isTTY&&K.stdout.hasColors?.()),getErrHasColors:()=>Af()??(K.stderr.isTTY&&K.stderr.hasColors?.()),stripColor:r=>zS(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(t){return this._outputConfiguration=t._outputConfiguration,this._helpOption=t._helpOption,this._helpCommand=t._helpCommand,this._helpConfiguration=t._helpConfiguration,this._exitCallback=t._exitCallback,this._storeOptionsAsProperties=t._storeOptionsAsProperties,this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue,this._allowExcessArguments=t._allowExcessArguments,this._enablePositionalOptions=t._enablePositionalOptions,this._showHelpAfterError=t._showHelpAfterError,this._showSuggestionAfterError=t._showSuggestionAfterError,this}_getCommandAndAncestors(){let t=[];for(let r=this;r;r=r.parent)t.push(r);return t}command(t,r,o){let n=r,i=o;typeof n=="object"&&n!==null&&(i=n,n=null),i=i||{};let[,a,s]=t.match(/([^ ]+) *(.*)/),c=this.createCommand(a);return n&&(c.description(n),c._executableHandler=!0),i.isDefault&&(this._defaultCommandName=c._name),c._hidden=!!(i.noHelp||i.hidden),c._executableFile=i.executableFile||null,s&&c.arguments(s),this._registerCommand(c),c.parent=this,c.copyInheritedSettings(this),n?this:c}createCommand(t){return new e(t)}createHelp(){return Object.assign(new Tr,this.configureHelp())}configureHelp(t){return t===void 0?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return t===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...t},this)}showHelpAfterError(t=!0){return typeof t!="string"&&(t=!!t),this._showHelpAfterError=t,this}showSuggestionAfterError(t=!0){return this._showSuggestionAfterError=!!t,this}addCommand(t,r){if(!t._name)throw new Error(`Command passed to .addCommand() must have a name
7859
- - specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=t._name),(r.noHelp||r.hidden)&&(t._hidden=!0),this._registerCommand(t),t.parent=this,t._checkForBrokenPassThrough(),this}createArgument(t,r){return new Er(t,r)}argument(t,r,o,n){let i=this.createArgument(t,r);return typeof o=="function"?i.default(n).argParser(o):i.default(o),this.addArgument(i),this}arguments(t){return t.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(t){let r=this.registeredArguments.slice(-1)[0];if(r?.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(t.required&&t.defaultValue!==void 0&&t.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${t.name()}'`);return this.registeredArguments.push(t),this}helpCommand(t,r){if(typeof t=="boolean")return this._addImplicitHelpCommand=t,t&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let o=t??"help [command]",[,n,i]=o.match(/([^ ]+) *(.*)/),a=r??"display help for command",s=this.createCommand(n);return s.helpOption(!1),i&&s.arguments(i),a&&s.description(a),this._addImplicitHelpCommand=!0,this._helpCommand=s,(t||r)&&this._initCommandGroup(s),this}addHelpCommand(t,r){return typeof t!="object"?(this.helpCommand(t,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=t,this._initCommandGroup(t),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(t,r){let o=["preSubcommand","preAction","postAction"];if(!o.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.
7860
- Expecting one of '${o.join("', '")}'`);return this._lifeCycleHooks[t]?this._lifeCycleHooks[t].push(r):this._lifeCycleHooks[t]=[r],this}exitOverride(t){return t?this._exitCallback=t:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(t,r,o){this._exitCallback&&this._exitCallback(new vt(t,r,o)),K.exit(t)}action(t){let r=o=>{let n=this.registeredArguments.length,i=o.slice(0,n);return this._storeOptionsAsProperties?i[n]=this:i[n]=this.opts(),i.push(this),t.apply(this,i)};return this._actionHandler=r,this}createOption(t,r){return new gn(t,r)}_callParseArg(t,r,o,n){try{return t.parseArg(r,o)}catch(i){if(i.code==="commander.invalidArgument"){let a=`${n} ${i.message}`;this.error(a,{exitCode:i.exitCode,code:i.code})}throw i}}_registerOption(t){let r=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(r){let o=t.long&&this._findOption(t.long)?t.long:t.short;throw new Error(`Cannot add option '${t.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${o}'
7861
- - already used by option '${r.flags}'`)}this._initOptionGroup(t),this.options.push(t)}_registerCommand(t){let r=n=>[n.name()].concat(n.aliases()),o=r(t).find(n=>this._findCommand(n));if(o){let n=r(this._findCommand(o)).join("|"),i=r(t).join("|");throw new Error(`cannot add command '${i}' as already have command '${n}'`)}this._initCommandGroup(t),this.commands.push(t)}addOption(t){this._registerOption(t);let r=t.name(),o=t.attributeName();t.defaultValue!==void 0&&this.setOptionValueWithSource(o,t.defaultValue,"default");let n=(i,a,s)=>{i==null&&t.presetArg!==void 0&&(i=t.presetArg);let c=this.getOptionValue(o);i!==null&&t.parseArg?i=this._callParseArg(t,i,c,a):i!==null&&t.variadic&&(i=t._collectValue(i,c)),i==null&&(t.negate?i=!1:t.isBoolean()||t.optional?i=!0:i=""),this.setOptionValueWithSource(o,i,s)};return this.on("option:"+r,i=>{let a=`error: option '${t.flags}' argument '${i}' is invalid.`;n(i,a,"cli")}),t.envVar&&this.on("optionEnv:"+r,i=>{let a=`error: option '${t.flags}' value '${i}' from env '${t.envVar}' is invalid.`;n(i,a,"env")}),this}_optionEx(t,r,o,n,i){if(typeof r=="object"&&r instanceof gn)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let a=this.createOption(r,o);if(a.makeOptionMandatory(!!t.mandatory),typeof n=="function")a.default(i).argParser(n);else if(n instanceof RegExp){let s=n;n=(c,l)=>{let p=s.exec(c);return p?p[0]:l},a.default(i).argParser(n)}else a.default(n);return this.addOption(a)}option(t,r,o,n){return this._optionEx({},t,r,o,n)}requiredOption(t,r,o,n){return this._optionEx({mandatory:!0},t,r,o,n)}combineFlagAndOptionalValue(t=!0){return this._combineFlagAndOptionalValue=!!t,this}allowUnknownOption(t=!0){return this._allowUnknownOption=!!t,this}allowExcessArguments(t=!0){return this._allowExcessArguments=!!t,this}enablePositionalOptions(t=!0){return this._enablePositionalOptions=!!t,this}passThroughOptions(t=!0){return this._passThroughOptions=!!t,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(t=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!t,this}getOptionValue(t){return this._storeOptionsAsProperties?this[t]:this._optionValues[t]}setOptionValue(t,r){return this.setOptionValueWithSource(t,r,void 0)}setOptionValueWithSource(t,r,o){return this._storeOptionsAsProperties?this[t]=r:this._optionValues[t]=r,this._optionValueSources[t]=o,this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let r;return this._getCommandAndAncestors().forEach(o=>{o.getOptionValueSource(t)!==void 0&&(r=o.getOptionValueSource(t))}),r}_prepareUserArgs(t,r){if(t!==void 0&&!Array.isArray(t))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},t===void 0&&r.from===void 0){K.versions?.electron&&(r.from="electron");let n=K.execArgv??[];(n.includes("-e")||n.includes("--eval")||n.includes("-p")||n.includes("--print"))&&(r.from="eval")}t===void 0&&(t=K.argv),this.rawArgs=t.slice();let o;switch(r.from){case void 0:case"node":this._scriptPath=t[1],o=t.slice(2);break;case"electron":K.defaultApp?(this._scriptPath=t[1],o=t.slice(2)):o=t.slice(1);break;case"user":o=t.slice(0);break;case"eval":o=t.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",o}parse(t,r){this._prepareForParse();let o=this._prepareUserArgs(t,r);return this._parseCommand([],o),this}async parseAsync(t,r){this._prepareForParse();let o=this._prepareUserArgs(t,r);return await this._parseCommand([],o),this}_prepareForParse(){this._savedState===null?(this.options.filter(t=>t.negate&&t.defaultValue===void 0&&this.getOptionValue(t.attributeName())===void 0).forEach(t=>{let r=t.long.replace(/^--no-/,"--");this._findOption(r)||this.setOptionValueWithSource(t.attributeName(),!0,"default")}),this.saveStateBeforeParse()):this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
7862
- - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(t,r,o){if(Fo.existsSync(t))return;let n=r?`searched for local subcommand relative to directory '${r}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",i=`'${t}' does not exist
8144
+ (Did you mean ${o[0]}?)`:""}var Sn=class e extends m${constructor(t){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=t||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:r=>Z.stdout.write(r),writeErr:r=>Z.stderr.write(r),outputError:(r,o)=>o(r),getOutHelpWidth:()=>Z.stdout.isTTY?Z.stdout.columns:void 0,getErrHelpWidth:()=>Z.stderr.isTTY?Z.stderr.columns:void 0,getOutHasColors:()=>Zf()??(Z.stdout.isTTY&&Z.stdout.hasColors?.()),getErrHasColors:()=>Zf()??(Z.stderr.isTTY&&Z.stderr.hasColors?.()),stripColor:r=>h$(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(t){return this._outputConfiguration=t._outputConfiguration,this._helpOption=t._helpOption,this._helpCommand=t._helpCommand,this._helpConfiguration=t._helpConfiguration,this._exitCallback=t._exitCallback,this._storeOptionsAsProperties=t._storeOptionsAsProperties,this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue,this._allowExcessArguments=t._allowExcessArguments,this._enablePositionalOptions=t._enablePositionalOptions,this._showHelpAfterError=t._showHelpAfterError,this._showSuggestionAfterError=t._showSuggestionAfterError,this}_getCommandAndAncestors(){let t=[];for(let r=this;r;r=r.parent)t.push(r);return t}command(t,r,o){let n=r,i=o;typeof n=="object"&&n!==null&&(i=n,n=null),i=i||{};let[,a,s]=t.match(/([^ ]+) *(.*)/),c=this.createCommand(a);return n&&(c.description(n),c._executableHandler=!0),i.isDefault&&(this._defaultCommandName=c._name),c._hidden=!!(i.noHelp||i.hidden),c._executableFile=i.executableFile||null,s&&c.arguments(s),this._registerCommand(c),c.parent=this,c.copyInheritedSettings(this),n?this:c}createCommand(t){return new e(t)}createHelp(){return Object.assign(new Or,this.configureHelp())}configureHelp(t){return t===void 0?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return t===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...t},this)}showHelpAfterError(t=!0){return typeof t!="string"&&(t=!!t),this._showHelpAfterError=t,this}showSuggestionAfterError(t=!0){return this._showSuggestionAfterError=!!t,this}addCommand(t,r){if(!t._name)throw new Error(`Command passed to .addCommand() must have a name
8145
+ - specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=t._name),(r.noHelp||r.hidden)&&(t._hidden=!0),this._registerCommand(t),t.parent=this,t._checkForBrokenPassThrough(),this}createArgument(t,r){return new Pr(t,r)}argument(t,r,o,n){let i=this.createArgument(t,r);return typeof o=="function"?i.default(n).argParser(o):i.default(o),this.addArgument(i),this}arguments(t){return t.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(t){let r=this.registeredArguments.slice(-1)[0];if(r?.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(t.required&&t.defaultValue!==void 0&&t.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${t.name()}'`);return this.registeredArguments.push(t),this}helpCommand(t,r){if(typeof t=="boolean")return this._addImplicitHelpCommand=t,t&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let o=t??"help [command]",[,n,i]=o.match(/([^ ]+) *(.*)/),a=r??"display help for command",s=this.createCommand(n);return s.helpOption(!1),i&&s.arguments(i),a&&s.description(a),this._addImplicitHelpCommand=!0,this._helpCommand=s,(t||r)&&this._initCommandGroup(s),this}addHelpCommand(t,r){return typeof t!="object"?(this.helpCommand(t,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=t,this._initCommandGroup(t),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(t,r){let o=["preSubcommand","preAction","postAction"];if(!o.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.
8146
+ Expecting one of '${o.join("', '")}'`);return this._lifeCycleHooks[t]?this._lifeCycleHooks[t].push(r):this._lifeCycleHooks[t]=[r],this}exitOverride(t){return t?this._exitCallback=t:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(t,r,o){this._exitCallback&&this._exitCallback(new St(t,r,o)),Z.exit(t)}action(t){let r=o=>{let n=this.registeredArguments.length,i=o.slice(0,n);return this._storeOptionsAsProperties?i[n]=this:i[n]=this.opts(),i.push(this),t.apply(this,i)};return this._actionHandler=r,this}createOption(t,r){return new xn(t,r)}_callParseArg(t,r,o,n){try{return t.parseArg(r,o)}catch(i){if(i.code==="commander.invalidArgument"){let a=`${n} ${i.message}`;this.error(a,{exitCode:i.exitCode,code:i.code})}throw i}}_registerOption(t){let r=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(r){let o=t.long&&this._findOption(t.long)?t.long:t.short;throw new Error(`Cannot add option '${t.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${o}'
8147
+ - already used by option '${r.flags}'`)}this._initOptionGroup(t),this.options.push(t)}_registerCommand(t){let r=n=>[n.name()].concat(n.aliases()),o=r(t).find(n=>this._findCommand(n));if(o){let n=r(this._findCommand(o)).join("|"),i=r(t).join("|");throw new Error(`cannot add command '${i}' as already have command '${n}'`)}this._initCommandGroup(t),this.commands.push(t)}addOption(t){this._registerOption(t);let r=t.name(),o=t.attributeName();t.defaultValue!==void 0&&this.setOptionValueWithSource(o,t.defaultValue,"default");let n=(i,a,s)=>{i==null&&t.presetArg!==void 0&&(i=t.presetArg);let c=this.getOptionValue(o);i!==null&&t.parseArg?i=this._callParseArg(t,i,c,a):i!==null&&t.variadic&&(i=t._collectValue(i,c)),i==null&&(t.negate?i=!1:t.isBoolean()||t.optional?i=!0:i=""),this.setOptionValueWithSource(o,i,s)};return this.on("option:"+r,i=>{let a=`error: option '${t.flags}' argument '${i}' is invalid.`;n(i,a,"cli")}),t.envVar&&this.on("optionEnv:"+r,i=>{let a=`error: option '${t.flags}' value '${i}' from env '${t.envVar}' is invalid.`;n(i,a,"env")}),this}_optionEx(t,r,o,n,i){if(typeof r=="object"&&r instanceof xn)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let a=this.createOption(r,o);if(a.makeOptionMandatory(!!t.mandatory),typeof n=="function")a.default(i).argParser(n);else if(n instanceof RegExp){let s=n;n=(c,d)=>{let u=s.exec(c);return u?u[0]:d},a.default(i).argParser(n)}else a.default(n);return this.addOption(a)}option(t,r,o,n){return this._optionEx({},t,r,o,n)}requiredOption(t,r,o,n){return this._optionEx({mandatory:!0},t,r,o,n)}combineFlagAndOptionalValue(t=!0){return this._combineFlagAndOptionalValue=!!t,this}allowUnknownOption(t=!0){return this._allowUnknownOption=!!t,this}allowExcessArguments(t=!0){return this._allowExcessArguments=!!t,this}enablePositionalOptions(t=!0){return this._enablePositionalOptions=!!t,this}passThroughOptions(t=!0){return this._passThroughOptions=!!t,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(t=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!t,this}getOptionValue(t){return this._storeOptionsAsProperties?this[t]:this._optionValues[t]}setOptionValue(t,r){return this.setOptionValueWithSource(t,r,void 0)}setOptionValueWithSource(t,r,o){return this._storeOptionsAsProperties?this[t]=r:this._optionValues[t]=r,this._optionValueSources[t]=o,this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let r;return this._getCommandAndAncestors().forEach(o=>{o.getOptionValueSource(t)!==void 0&&(r=o.getOptionValueSource(t))}),r}_prepareUserArgs(t,r){if(t!==void 0&&!Array.isArray(t))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},t===void 0&&r.from===void 0){Z.versions?.electron&&(r.from="electron");let n=Z.execArgv??[];(n.includes("-e")||n.includes("--eval")||n.includes("-p")||n.includes("--print"))&&(r.from="eval")}t===void 0&&(t=Z.argv),this.rawArgs=t.slice();let o;switch(r.from){case void 0:case"node":this._scriptPath=t[1],o=t.slice(2);break;case"electron":Z.defaultApp?(this._scriptPath=t[1],o=t.slice(2)):o=t.slice(1);break;case"user":o=t.slice(0);break;case"eval":o=t.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",o}parse(t,r){this._prepareForParse();let o=this._prepareUserArgs(t,r);return this._parseCommand([],o),this}async parseAsync(t,r){this._prepareForParse();let o=this._prepareUserArgs(t,r);return await this._parseCommand([],o),this}_prepareForParse(){this._savedState===null?(this.options.filter(t=>t.negate&&t.defaultValue===void 0&&this.getOptionValue(t.attributeName())===void 0).forEach(t=>{let r=t.long.replace(/^--no-/,"--");this._findOption(r)||this.setOptionValueWithSource(t.attributeName(),!0,"default")}),this.saveStateBeforeParse()):this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
8148
+ - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(t,r,o){if(Yo.existsSync(t))return;let n=r?`searched for local subcommand relative to directory '${r}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",i=`'${t}' does not exist
7863
8149
  - if '${o}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
7864
8150
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
7865
- - ${n}`;throw new Error(i)}_executeSubCommand(t,r){r=r.slice();let o=[".js",".ts",".tsx",".mjs",".cjs"];function n(p,d){let m=at.resolve(p,d);if(Fo.existsSync(m))return m;if(o.includes(at.extname(d)))return;let h=o.find(f=>Fo.existsSync(`${m}${f}`));if(h)return`${m}${h}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=t._executableFile||`${this._name}-${t._name}`,a=this._executableDir||"";if(this._scriptPath){let p;try{p=Fo.realpathSync(this._scriptPath)}catch{p=this._scriptPath}a=at.resolve(at.dirname(p),a)}if(a){let p=n(a,i);if(!p&&!t._executableFile&&this._scriptPath){let d=at.basename(this._scriptPath,at.extname(this._scriptPath));d!==this._name&&(p=n(a,`${d}-${t._name}`))}i=p||i}let s=o.includes(at.extname(i)),c;K.platform!=="win32"?s?(r.unshift(i),r=Tf(K.execArgv).concat(r),c=Ms.spawn(K.argv[0],r,{stdio:"inherit"})):c=Ms.spawn(i,r,{stdio:"inherit"}):(this._checkForMissingExecutable(i,a,t._name),r.unshift(i),r=Tf(K.execArgv).concat(r),c=Ms.spawn(K.execPath,r,{stdio:"inherit"})),c.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(d=>{K.on(d,()=>{c.killed===!1&&c.exitCode===null&&c.kill(d)})});let l=this._exitCallback;c.on("close",p=>{p=p??1,l?l(new vt(p,"commander.executeSubCommandAsync","(close)")):K.exit(p)}),c.on("error",p=>{if(p.code==="ENOENT")this._checkForMissingExecutable(i,a,t._name);else if(p.code==="EACCES")throw new Error(`'${i}' not executable`);if(!l)K.exit(1);else{let d=new vt(1,"commander.executeSubCommandAsync","(error)");d.nestedError=p,l(d)}}),this.runningCommand=c}_dispatchSubcommand(t,r,o){let n=this._findCommand(t);n||this.help({error:!0}),n._prepareForParse();let i;return i=this._chainOrCallSubCommandHook(i,n,"preSubcommand"),i=this._chainOrCall(i,()=>{if(n._executableHandler)this._executeSubCommand(n,r.concat(o));else return n._parseCommand(r,o)}),i}_dispatchHelpCommand(t){t||this.help();let r=this._findCommand(t);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(t,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((t,r)=>{t.required&&this.args[r]==null&&this.missingArgument(t.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let t=(o,n,i)=>{let a=n;if(n!==null&&o.parseArg){let s=`error: command-argument value '${n}' is invalid for argument '${o.name()}'.`;a=this._callParseArg(o,n,i,s)}return a};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((o,n)=>{let i=o.defaultValue;o.variadic?n<this.args.length?(i=this.args.slice(n),o.parseArg&&(i=i.reduce((a,s)=>t(o,s,a),o.defaultValue))):i===void 0&&(i=[]):n<this.args.length&&(i=this.args[n],o.parseArg&&(i=t(o,i,o.defaultValue))),r[n]=i}),this.processedArgs=r}_chainOrCall(t,r){return t?.then&&typeof t.then=="function"?t.then(()=>r()):r()}_chainOrCallHooks(t,r){let o=t,n=[];return this._getCommandAndAncestors().reverse().filter(i=>i._lifeCycleHooks[r]!==void 0).forEach(i=>{i._lifeCycleHooks[r].forEach(a=>{n.push({hookedCommand:i,callback:a})})}),r==="postAction"&&n.reverse(),n.forEach(i=>{o=this._chainOrCall(o,()=>i.callback(i.hookedCommand,this))}),o}_chainOrCallSubCommandHook(t,r,o){let n=t;return this._lifeCycleHooks[o]!==void 0&&this._lifeCycleHooks[o].forEach(i=>{n=this._chainOrCall(n,()=>i(this,r))}),n}_parseCommand(t,r){let o=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(o.operands),r=o.unknown,this.args=t.concat(r),t&&this._findCommand(t[0]))return this._dispatchSubcommand(t[0],t.slice(1),r);if(this._getHelpCommand()&&t[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(t[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,t,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(o.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let n=()=>{o.unknown.length>0&&this.unknownOption(o.unknown[0])},i=`command:${this.name()}`;if(this._actionHandler){n(),this._processArguments();let a;return a=this._chainOrCallHooks(a,"preAction"),a=this._chainOrCall(a,()=>this._actionHandler(this.processedArgs)),this.parent&&(a=this._chainOrCall(a,()=>{this.parent.emit(i,t,r)})),a=this._chainOrCallHooks(a,"postAction"),a}if(this.parent?.listenerCount(i))n(),this._processArguments(),this.parent.emit(i,t,r);else if(t.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",t,r);this.listenerCount("command:*")?this.emit("command:*",t,r):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments())}_findCommand(t){if(t)return this.commands.find(r=>r._name===t||r._aliases.includes(t))}_findOption(t){return this.options.find(r=>r.is(t))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(t=>{t.options.forEach(r=>{r.mandatory&&t.getOptionValue(r.attributeName())===void 0&&t.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let t=this.options.filter(o=>{let n=o.attributeName();return this.getOptionValue(n)===void 0?!1:this.getOptionValueSource(n)!=="default"});t.filter(o=>o.conflictsWith.length>0).forEach(o=>{let n=t.find(i=>o.conflictsWith.includes(i.attributeName()));n&&this._conflictingOption(o,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(t=>{t._checkForConflictingLocalOptions()})}parseOptions(t){let r=[],o=[],n=r;function i(p){return p.length>1&&p[0]==="-"}let a=p=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(p)?!this._getCommandAndAncestors().some(d=>d.options.map(m=>m.short).some(m=>/^-\d$/.test(m))):!1,s=null,c=null,l=0;for(;l<t.length||c;){let p=c??t[l++];if(c=null,p==="--"){n===o&&n.push(p),n.push(...t.slice(l));break}if(s&&(!i(p)||a(p))){this.emit(`option:${s.name()}`,p);continue}if(s=null,i(p)){let d=this._findOption(p);if(d){if(d.required){let m=t[l++];m===void 0&&this.optionMissingArgument(d),this.emit(`option:${d.name()}`,m)}else if(d.optional){let m=null;l<t.length&&(!i(t[l])||a(t[l]))&&(m=t[l++]),this.emit(`option:${d.name()}`,m)}else this.emit(`option:${d.name()}`);s=d.variadic?d:null;continue}}if(p.length>2&&p[0]==="-"&&p[1]!=="-"){let d=this._findOption(`-${p[1]}`);if(d){d.required||d.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${d.name()}`,p.slice(2)):(this.emit(`option:${d.name()}`),c=`-${p.slice(2)}`);continue}}if(/^--[^=]+=/.test(p)){let d=p.indexOf("="),m=this._findOption(p.slice(0,d));if(m&&(m.required||m.optional)){this.emit(`option:${m.name()}`,p.slice(d+1));continue}}if(n===r&&i(p)&&!(this.commands.length===0&&a(p))&&(n=o),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&o.length===0){if(this._findCommand(p)){r.push(p),o.push(...t.slice(l));break}else if(this._getHelpCommand()&&p===this._getHelpCommand().name()){r.push(p,...t.slice(l));break}else if(this._defaultCommandName){o.push(p,...t.slice(l));break}}if(this._passThroughOptions){n.push(p,...t.slice(l));break}n.push(p)}return{operands:r,unknown:o}}opts(){if(this._storeOptionsAsProperties){let t={},r=this.options.length;for(let o=0;o<r;o++){let n=this.options[o].attributeName();t[n]=n===this._versionOptionName?this._version:this[n]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((t,r)=>Object.assign(t,r.opts()),{})}error(t,r){this._outputConfiguration.outputError(`${t}
8151
+ - ${n}`;throw new Error(i)}_executeSubCommand(t,r){r=r.slice();let o=[".js",".ts",".tsx",".mjs",".cjs"];function n(u,p){let m=ut.resolve(u,p);if(Yo.existsSync(m))return m;if(o.includes(ut.extname(p)))return;let h=o.find(f=>Yo.existsSync(`${m}${f}`));if(h)return`${m}${h}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=t._executableFile||`${this._name}-${t._name}`,a=this._executableDir||"";if(this._scriptPath){let u;try{u=Yo.realpathSync(this._scriptPath)}catch{u=this._scriptPath}a=ut.resolve(ut.dirname(u),a)}if(a){let u=n(a,i);if(!u&&!t._executableFile&&this._scriptPath){let p=ut.basename(this._scriptPath,ut.extname(this._scriptPath));p!==this._name&&(u=n(a,`${p}-${t._name}`))}i=u||i}let s=o.includes(ut.extname(i)),c;Z.platform!=="win32"?s?(r.unshift(i),r=Wf(Z.execArgv).concat(r),c=Ys.spawn(Z.argv[0],r,{stdio:"inherit"})):c=Ys.spawn(i,r,{stdio:"inherit"}):(this._checkForMissingExecutable(i,a,t._name),r.unshift(i),r=Wf(Z.execArgv).concat(r),c=Ys.spawn(Z.execPath,r,{stdio:"inherit"})),c.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(p=>{Z.on(p,()=>{c.killed===!1&&c.exitCode===null&&c.kill(p)})});let d=this._exitCallback;c.on("close",u=>{u=u??1,d?d(new St(u,"commander.executeSubCommandAsync","(close)")):Z.exit(u)}),c.on("error",u=>{if(u.code==="ENOENT")this._checkForMissingExecutable(i,a,t._name);else if(u.code==="EACCES")throw new Error(`'${i}' not executable`);if(!d)Z.exit(1);else{let p=new St(1,"commander.executeSubCommandAsync","(error)");p.nestedError=u,d(p)}}),this.runningCommand=c}_dispatchSubcommand(t,r,o){let n=this._findCommand(t);n||this.help({error:!0}),n._prepareForParse();let i;return i=this._chainOrCallSubCommandHook(i,n,"preSubcommand"),i=this._chainOrCall(i,()=>{if(n._executableHandler)this._executeSubCommand(n,r.concat(o));else return n._parseCommand(r,o)}),i}_dispatchHelpCommand(t){t||this.help();let r=this._findCommand(t);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(t,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((t,r)=>{t.required&&this.args[r]==null&&this.missingArgument(t.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let t=(o,n,i)=>{let a=n;if(n!==null&&o.parseArg){let s=`error: command-argument value '${n}' is invalid for argument '${o.name()}'.`;a=this._callParseArg(o,n,i,s)}return a};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((o,n)=>{let i=o.defaultValue;o.variadic?n<this.args.length?(i=this.args.slice(n),o.parseArg&&(i=i.reduce((a,s)=>t(o,s,a),o.defaultValue))):i===void 0&&(i=[]):n<this.args.length&&(i=this.args[n],o.parseArg&&(i=t(o,i,o.defaultValue))),r[n]=i}),this.processedArgs=r}_chainOrCall(t,r){return t?.then&&typeof t.then=="function"?t.then(()=>r()):r()}_chainOrCallHooks(t,r){let o=t,n=[];return this._getCommandAndAncestors().reverse().filter(i=>i._lifeCycleHooks[r]!==void 0).forEach(i=>{i._lifeCycleHooks[r].forEach(a=>{n.push({hookedCommand:i,callback:a})})}),r==="postAction"&&n.reverse(),n.forEach(i=>{o=this._chainOrCall(o,()=>i.callback(i.hookedCommand,this))}),o}_chainOrCallSubCommandHook(t,r,o){let n=t;return this._lifeCycleHooks[o]!==void 0&&this._lifeCycleHooks[o].forEach(i=>{n=this._chainOrCall(n,()=>i(this,r))}),n}_parseCommand(t,r){let o=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(o.operands),r=o.unknown,this.args=t.concat(r),t&&this._findCommand(t[0]))return this._dispatchSubcommand(t[0],t.slice(1),r);if(this._getHelpCommand()&&t[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(t[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,t,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(o.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let n=()=>{o.unknown.length>0&&this.unknownOption(o.unknown[0])},i=`command:${this.name()}`;if(this._actionHandler){n(),this._processArguments();let a;return a=this._chainOrCallHooks(a,"preAction"),a=this._chainOrCall(a,()=>this._actionHandler(this.processedArgs)),this.parent&&(a=this._chainOrCall(a,()=>{this.parent.emit(i,t,r)})),a=this._chainOrCallHooks(a,"postAction"),a}if(this.parent?.listenerCount(i))n(),this._processArguments(),this.parent.emit(i,t,r);else if(t.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",t,r);this.listenerCount("command:*")?this.emit("command:*",t,r):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments())}_findCommand(t){if(t)return this.commands.find(r=>r._name===t||r._aliases.includes(t))}_findOption(t){return this.options.find(r=>r.is(t))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(t=>{t.options.forEach(r=>{r.mandatory&&t.getOptionValue(r.attributeName())===void 0&&t.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let t=this.options.filter(o=>{let n=o.attributeName();return this.getOptionValue(n)===void 0?!1:this.getOptionValueSource(n)!=="default"});t.filter(o=>o.conflictsWith.length>0).forEach(o=>{let n=t.find(i=>o.conflictsWith.includes(i.attributeName()));n&&this._conflictingOption(o,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(t=>{t._checkForConflictingLocalOptions()})}parseOptions(t){let r=[],o=[],n=r;function i(u){return u.length>1&&u[0]==="-"}let a=u=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(u)?!this._getCommandAndAncestors().some(p=>p.options.map(m=>m.short).some(m=>/^-\d$/.test(m))):!1,s=null,c=null,d=0;for(;d<t.length||c;){let u=c??t[d++];if(c=null,u==="--"){n===o&&n.push(u),n.push(...t.slice(d));break}if(s&&(!i(u)||a(u))){this.emit(`option:${s.name()}`,u);continue}if(s=null,i(u)){let p=this._findOption(u);if(p){if(p.required){let m=t[d++];m===void 0&&this.optionMissingArgument(p),this.emit(`option:${p.name()}`,m)}else if(p.optional){let m=null;d<t.length&&(!i(t[d])||a(t[d]))&&(m=t[d++]),this.emit(`option:${p.name()}`,m)}else this.emit(`option:${p.name()}`);s=p.variadic?p:null;continue}}if(u.length>2&&u[0]==="-"&&u[1]!=="-"){let p=this._findOption(`-${u[1]}`);if(p){p.required||p.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${p.name()}`,u.slice(2)):(this.emit(`option:${p.name()}`),c=`-${u.slice(2)}`);continue}}if(/^--[^=]+=/.test(u)){let p=u.indexOf("="),m=this._findOption(u.slice(0,p));if(m&&(m.required||m.optional)){this.emit(`option:${m.name()}`,u.slice(p+1));continue}}if(n===r&&i(u)&&!(this.commands.length===0&&a(u))&&(n=o),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&o.length===0){if(this._findCommand(u)){r.push(u),o.push(...t.slice(d));break}else if(this._getHelpCommand()&&u===this._getHelpCommand().name()){r.push(u,...t.slice(d));break}else if(this._defaultCommandName){o.push(u,...t.slice(d));break}}if(this._passThroughOptions){n.push(u,...t.slice(d));break}n.push(u)}return{operands:r,unknown:o}}opts(){if(this._storeOptionsAsProperties){let t={},r=this.options.length;for(let o=0;o<r;o++){let n=this.options[o].attributeName();t[n]=n===this._versionOptionName?this._version:this[n]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((t,r)=>Object.assign(t,r.opts()),{})}error(t,r){this._outputConfiguration.outputError(`${t}
7866
8152
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
7867
8153
  `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
7868
- `),this.outputHelp({error:!0}));let o=r||{},n=o.exitCode||1,i=o.code||"commander.error";this._exit(n,i,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in K.env){let r=t.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,K.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new Uo(this.options),r=o=>this.getOptionValue(o)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(o));this.options.filter(o=>o.implied!==void 0&&r(o.attributeName())&&t.valueFromOption(this.getOptionValue(o.attributeName()),o)).forEach(o=>{Object.keys(o.implied).filter(n=>!r(n)).forEach(n=>{this.setOptionValueWithSource(n,o.implied[n],"implied")})})}missingArgument(t){let r=`error: missing required argument '${t}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(t){let r=`error: option '${t.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){let r=`error: required option '${t.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,r){let o=a=>{let s=a.attributeName(),c=this.getOptionValue(s),l=this.options.find(d=>d.negate&&s===d.attributeName()),p=this.options.find(d=>!d.negate&&s===d.attributeName());return l&&(l.presetArg===void 0&&c===!1||l.presetArg!==void 0&&c===l.presetArg)?l:p||a},n=a=>{let s=o(a),c=s.attributeName();return this.getOptionValueSource(c)==="env"?`environment variable '${s.envVar}'`:`option '${s.flags}'`},i=`error: ${n(t)} cannot be used with ${n(r)}`;this.error(i,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let r="";if(t.startsWith("--")&&this._showSuggestionAfterError){let n=[],i=this;do{let a=i.createHelp().visibleOptions(i).filter(s=>s.long).map(s=>s.long);n=n.concat(a),i=i.parent}while(i&&!i._enablePositionalOptions);r=zs(t,n)}let o=`error: unknown option '${t}'${r}`;this.error(o,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,o=r===1?"":"s",n=t.length,i=this.parent?` for '${this.name()}'`:"",a=t.join(", "),s=`error: too many arguments${i}. Expected ${r} argument${o} but got ${n}: ${a}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let t=this.args[0],r="";if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(i=>{n.push(i.name()),i.alias()&&n.push(i.alias())}),r=zs(t,n)}let o=`error: unknown command '${t}'${r}`;this.error(o,{code:"commander.unknownCommand"})}version(t,r,o){if(t===void 0)return this._version;this._version=t,r=r||"-V, --version",o=o||"output the version number";let n=this.createOption(r,o);return this._versionOptionName=n.attributeName(),this._registerOption(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${t}
7869
- `),this._exit(0,"commander.version",t)}),this}description(t,r){return t===void 0&&r===void 0?this._description:(this._description=t,r&&(this._argsDescription=r),this)}summary(t){return t===void 0?this._summary:(this._summary=t,this)}alias(t){if(t===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),t===r._name)throw new Error("Command alias can't be the same as its name");let o=this.parent?._findCommand(t);if(o){let n=[o.name()].concat(o.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${n}'`)}return r._aliases.push(t),this}aliases(t){return t===void 0?this._aliases:(t.forEach(r=>this.alias(r)),this)}usage(t){if(t===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(o=>Mo(o));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=t,this}name(t){return t===void 0?this._name:(this._name=t,this)}helpGroup(t){return t===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=t,this)}commandsGroup(t){return t===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=t,this)}optionsGroup(t){return t===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=t,this)}_initOptionGroup(t){this._defaultOptionGroup&&!t.helpGroupHeading&&t.helpGroup(this._defaultOptionGroup)}_initCommandGroup(t){this._defaultCommandGroup&&!t.helpGroup()&&t.helpGroup(this._defaultCommandGroup)}nameFromFilename(t){return this._name=at.basename(t,at.extname(t)),this}executableDir(t){return t===void 0?this._executableDir:(this._executableDir=t,this)}helpInformation(t){let r=this.createHelp(),o=this._getOutputContext(t);r.prepareContext({error:o.error,helpWidth:o.helpWidth,outputHasColors:o.hasColors});let n=r.formatHelp(this,r);return o.hasColors?n:this._outputConfiguration.stripColor(n)}_getOutputContext(t){t=t||{};let r=!!t.error,o,n,i;return r?(o=s=>this._outputConfiguration.writeErr(s),n=this._outputConfiguration.getErrHasColors(),i=this._outputConfiguration.getErrHelpWidth()):(o=s=>this._outputConfiguration.writeOut(s),n=this._outputConfiguration.getOutHasColors(),i=this._outputConfiguration.getOutHelpWidth()),{error:r,write:s=>(n||(s=this._outputConfiguration.stripColor(s)),o(s)),hasColors:n,helpWidth:i}}outputHelp(t){let r;typeof t=="function"&&(r=t,t=void 0);let o=this._getOutputContext(t),n={error:o.error,write:o.write,command:this};this._getCommandAndAncestors().reverse().forEach(a=>a.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let i=this.helpInformation({error:o.error});if(r&&(i=r(i),typeof i!="string"&&!Buffer.isBuffer(i)))throw new Error("outputHelp callback must return a string or a Buffer");o.write(i),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach(a=>a.emit("afterAllHelp",n))}helpOption(t,r){return typeof t=="boolean"?(t?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(t??"-h, --help",r??"display help for command"),(t||r)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(t){return this._helpOption=t,this._initOptionGroup(t),this}help(t){this.outputHelp(t);let r=Number(K.exitCode??0);r===0&&t&&typeof t!="function"&&t.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(t,r){let o=["beforeAll","before","after","afterAll"];if(!o.includes(t))throw new Error(`Unexpected value for position to addHelpText.
8154
+ `),this.outputHelp({error:!0}));let o=r||{},n=o.exitCode||1,i=o.code||"commander.error";this._exit(n,i,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in Z.env){let r=t.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,Z.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new Jo(this.options),r=o=>this.getOptionValue(o)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(o));this.options.filter(o=>o.implied!==void 0&&r(o.attributeName())&&t.valueFromOption(this.getOptionValue(o.attributeName()),o)).forEach(o=>{Object.keys(o.implied).filter(n=>!r(n)).forEach(n=>{this.setOptionValueWithSource(n,o.implied[n],"implied")})})}missingArgument(t){let r=`error: missing required argument '${t}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(t){let r=`error: option '${t.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){let r=`error: required option '${t.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,r){let o=a=>{let s=a.attributeName(),c=this.getOptionValue(s),d=this.options.find(p=>p.negate&&s===p.attributeName()),u=this.options.find(p=>!p.negate&&s===p.attributeName());return d&&(d.presetArg===void 0&&c===!1||d.presetArg!==void 0&&c===d.presetArg)?d:u||a},n=a=>{let s=o(a),c=s.attributeName();return this.getOptionValueSource(c)==="env"?`environment variable '${s.envVar}'`:`option '${s.flags}'`},i=`error: ${n(t)} cannot be used with ${n(r)}`;this.error(i,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let r="";if(t.startsWith("--")&&this._showSuggestionAfterError){let n=[],i=this;do{let a=i.createHelp().visibleOptions(i).filter(s=>s.long).map(s=>s.long);n=n.concat(a),i=i.parent}while(i&&!i._enablePositionalOptions);r=Js(t,n)}let o=`error: unknown option '${t}'${r}`;this.error(o,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,o=r===1?"":"s",n=t.length,i=this.parent?` for '${this.name()}'`:"",a=t.join(", "),s=`error: too many arguments${i}. Expected ${r} argument${o} but got ${n}: ${a}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let t=this.args[0],r="";if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(i=>{n.push(i.name()),i.alias()&&n.push(i.alias())}),r=Js(t,n)}let o=`error: unknown command '${t}'${r}`;this.error(o,{code:"commander.unknownCommand"})}version(t,r,o){if(t===void 0)return this._version;this._version=t,r=r||"-V, --version",o=o||"output the version number";let n=this.createOption(r,o);return this._versionOptionName=n.attributeName(),this._registerOption(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${t}
8155
+ `),this._exit(0,"commander.version",t)}),this}description(t,r){return t===void 0&&r===void 0?this._description:(this._description=t,r&&(this._argsDescription=r),this)}summary(t){return t===void 0?this._summary:(this._summary=t,this)}alias(t){if(t===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),t===r._name)throw new Error("Command alias can't be the same as its name");let o=this.parent?._findCommand(t);if(o){let n=[o.name()].concat(o.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${n}'`)}return r._aliases.push(t),this}aliases(t){return t===void 0?this._aliases:(t.forEach(r=>this.alias(r)),this)}usage(t){if(t===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(o=>Ho(o));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=t,this}name(t){return t===void 0?this._name:(this._name=t,this)}helpGroup(t){return t===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=t,this)}commandsGroup(t){return t===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=t,this)}optionsGroup(t){return t===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=t,this)}_initOptionGroup(t){this._defaultOptionGroup&&!t.helpGroupHeading&&t.helpGroup(this._defaultOptionGroup)}_initCommandGroup(t){this._defaultCommandGroup&&!t.helpGroup()&&t.helpGroup(this._defaultCommandGroup)}nameFromFilename(t){return this._name=ut.basename(t,ut.extname(t)),this}executableDir(t){return t===void 0?this._executableDir:(this._executableDir=t,this)}helpInformation(t){let r=this.createHelp(),o=this._getOutputContext(t);r.prepareContext({error:o.error,helpWidth:o.helpWidth,outputHasColors:o.hasColors});let n=r.formatHelp(this,r);return o.hasColors?n:this._outputConfiguration.stripColor(n)}_getOutputContext(t){t=t||{};let r=!!t.error,o,n,i;return r?(o=s=>this._outputConfiguration.writeErr(s),n=this._outputConfiguration.getErrHasColors(),i=this._outputConfiguration.getErrHelpWidth()):(o=s=>this._outputConfiguration.writeOut(s),n=this._outputConfiguration.getOutHasColors(),i=this._outputConfiguration.getOutHelpWidth()),{error:r,write:s=>(n||(s=this._outputConfiguration.stripColor(s)),o(s)),hasColors:n,helpWidth:i}}outputHelp(t){let r;typeof t=="function"&&(r=t,t=void 0);let o=this._getOutputContext(t),n={error:o.error,write:o.write,command:this};this._getCommandAndAncestors().reverse().forEach(a=>a.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let i=this.helpInformation({error:o.error});if(r&&(i=r(i),typeof i!="string"&&!Buffer.isBuffer(i)))throw new Error("outputHelp callback must return a string or a Buffer");o.write(i),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach(a=>a.emit("afterAllHelp",n))}helpOption(t,r){return typeof t=="boolean"?(t?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(t??"-h, --help",r??"display help for command"),(t||r)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(t){return this._helpOption=t,this._initOptionGroup(t),this}help(t){this.outputHelp(t);let r=Number(Z.exitCode??0);r===0&&t&&typeof t!="function"&&t.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(t,r){let o=["beforeAll","before","after","afterAll"];if(!o.includes(t))throw new Error(`Unexpected value for position to addHelpText.
7870
8156
  Expecting one of '${o.join("', '")}'`);let n=`${t}Help`;return this.on(n,i=>{let a;typeof r=="function"?a=r({error:i.error,command:i.command}):a=r,a&&i.write(`${a}
7871
- `)}),this}_outputHelpIfRequested(t){let r=this._getHelpOption();r&&t.find(n=>r.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Tf(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let r,o="127.0.0.1",n="9229",i;return(i=t.match(/^(--inspect(-brk)?)$/))!==null?r=i[1]:(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=i[1],/^\d+$/.test(i[3])?n=i[3]:o=i[3]):(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=i[1],o=i[3],n=i[4]),r&&n!=="0"?`${r}=${o}:${parseInt(n)+1}`:t})}function Af(){if(K.env.NO_COLOR||K.env.FORCE_COLOR==="0"||K.env.FORCE_COLOR==="false")return!1;if(K.env.FORCE_COLOR||K.env.CLICOLOR_FORCE!==void 0)return!0}var GR=new yn;Zt();ne();import{mkdir as ZS,readFile as KS,writeFile as WS}from"node:fs/promises";import{dirname as VS,join as HS,relative as JS,resolve as YS}from"node:path";async function qS(e,t){let r;try{r=await KS(e,"utf8")}catch{return"absent"}return r===t?"same":"different"}async function Cf(e,t,r){let o=HS(e,t),n=await qS(o,r);try{await ZS(VS(o),{recursive:!0}),await WS(o,r,"utf8")}catch{throw C(`Cannot write ${o}.`),new Error("unreachable")}return{where:JS(process.cwd(),o)||t,state:n}}async function Pf(e){let t=YS(e.out??"."),r=await Cf(t,ge,Me),o=await Cf(t,xe,vn),n=`import { start } from "./${ge}";`,i=`import { createPlayerClient, newIdempotencyKey } from "./${xe}";`,a=r.state==="same"&&o.state==="same";if(j())return L({ok:!0,status:a?"unchanged":"written",files:[{path:r.where,digest:bn,import:n},{path:o.where,digest:Ar,import:i}],path:r.where,digest:bn,import:n});O(a?"Already current":"Wrote the Gamestage client"),I("Facade",`${r.where} (${bn})`),I("Player client",`${o.where} (${Ar})`),v(),E(`Import it: ${S.cyan(n)}`),E(`The player API on its own: ${S.cyan(i)}`),(r.state==="different"||o.state==="different")&&E("An earlier copy was replaced. It is generated, so nothing of yours was in it."),v()}oe();Zt();import{stat as UC,writeFile as Ww}from"node:fs/promises";import{createHash as FC}from"node:crypto";import{spawn as Nw}from"node:child_process";import{chmod as $C,mkdir as EC,readFile as TC,rm as AC,writeFile as IC}from"node:fs/promises";import{homedir as CC,platform as ur}from"node:os";import{join as Rw}from"node:path";var Gm="https://api.workos.com",Bm=process.env.GAMESTAGE_CLIENT_ID??"client_01KYVPJ1MA6GA9EXTJ7GJ81YW4";async function Dw(){let e=await fetch(`${Gm}/user_management/authorize/device`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:Bm})});if(!e.ok)throw new Error(`Could not start sign-in (${e.status}). ${await e.text()}`);return await e.json()}async function jw(e){let t=await fetch(`${Gm}/user_management/authenticate`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({client_id:Bm,grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:e})}),r=await t.json();if(t.ok){let o=r.user;return{status:"ok",session:{accessToken:String(r.access_token??""),refreshToken:r.refresh_token?String(r.refresh_token):void 0,email:o?.email,userId:o?.id}}}switch(r.error){case"authorization_pending":return{status:"pending"};case"slow_down":return{status:"slow_down"};case"expired_token":return{status:"expired"};default:return{status:"denied",reason:String(r.error_description??r.error??"unknown error")}}}function Lw(e){let t=ur()==="darwin"?"open":ur()==="win32"?"cmd":"xdg-open",r=ur()==="win32"?["/c","start","",e]:[e];try{Nw(t,r,{stdio:"ignore",detached:!0}).unref()}catch{}}var dr="gamestage-cli",zw=Rw(CC(),".gamestage"),Wa=Rw(zw,"credentials.json");function Zm(e,t){return new Promise(r=>{let o=Nw("security",e,{stdio:["pipe","pipe","ignore"]}),n="";o.stdout.on("data",i=>n+=i),o.on("error",()=>r(null)),o.on("close",i=>r(i===0?n.trim():null)),t!==void 0?o.stdin.end(t):o.stdin.end()})}async function Km(e){let t=JSON.stringify(e);return ur()==="darwin"&&await Zm(["add-generic-password","-a",dr,"-s",dr,"-U","-w",t])!==null?"keychain":(await EC(zw,{recursive:!0,mode:448}),await IC(Wa,t,{mode:384}),await $C(Wa,384),"file")}function PC(e){try{let[,t]=e.split("."),{exp:r}=JSON.parse(Buffer.from(t,"base64url").toString());return typeof r!="number"?!0:r*1e3-Date.now()<3e4}catch{return!0}}async function OC(e){if(!e.refreshToken)return null;let t=await fetch(`${Gm}/user_management/authenticate`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({client_id:Bm,grant_type:"refresh_token",refresh_token:e.refreshToken})});if(!t.ok)return null;let r=await t.json();return r.access_token?{...e,accessToken:String(r.access_token),refreshToken:r.refresh_token?String(r.refresh_token):e.refreshToken}:null}async function NC(){if(ur()==="darwin"){let e=await Zm(["find-generic-password","-a",dr,"-s",dr,"-w"]);if(e)try{return JSON.parse(e)}catch{}}try{return JSON.parse(await TC(Wa,"utf8"))}catch{return null}}async function Mw(){ur()==="darwin"&&await Zm(["delete-generic-password","-a",dr,"-s",dr]),await AC(Wa,{force:!0})}async function Ne(){let e=await NC();if(!e)return null;if(!PC(e.accessToken)||!e.refreshToken)return e;let t=await OC(e);return t?(await Km(t),t):null}var Be="0.20.0";import{randomUUID as RC}from"node:crypto";var DC=/-[0-9a-f]{4}$/;function Va(e){return`${e}-${RC().replace(/-/g,"").slice(0,4)}`}function Uw(e){return DC.test(e)}oe();ne();var Dt=process.env.GAMESTAGE_SITE_URL??"https://gamestage.ai";function Fw(e){return`${Dt}/stage/games/${encodeURIComponent(e)}?tab=overview`}function Gw(e){return e&&new Set(["hunt","push","group","predict"]).has(e)?`${Dt}/docs/game-formats#${e}`:`${Dt}/docs`}var me=process.env.GAMESTAGE_CONTROL_URL??"https://api.gamestage.ai";function jC(e){try{let t=new URL(e).hostname.toLowerCase();return t==="localhost"||t.endsWith(".localhost")||t==="::1"||t.startsWith("127.")}catch{return!1}}function LC(e){return e.GAMESTAGE_TEST_RUN==="1"||e.NODE_TEST_CONTEXT!==void 0}function zC(e=me,t=process.env){if(LC(t)&&!jC(e)&&t.GAMESTAGE_ALLOW_REMOTE_TESTS!=="1")return`Refusing to register a test game against non-local control plane ${e}. Use the throwaway local control plane, or set GAMESTAGE_ALLOW_REMOTE_TESTS=1 for a deliberate real-plane run.`}function pr(e=me){let t=zC(e);t&&C(t)}async function ce(){let e=await Ne();return e||C("You are not signed in.",["Run `gamestage login`. It creates the account too if you do not have one.","Inspecting, scaffolding and local rounds keep working without one."]),{client:lr({baseUrl:me,token:async()=>(await Ne())?.accessToken??e.accessToken}),email:e.email??e.userId??"unknown"}}async function Bw(){let e=await Ne();return e||C("You are not signed in.",["Run `gamestage login`. Approving a creator needs an operator's own session."]),{admin:kw({baseUrl:me,token:async()=>(await Ne())?.accessToken??e.accessToken}),email:e.email??e.userId??"unknown"}}var Wm="access_pending";async function Ha(e){try{let t=await e.getWorkspace(),r=t?.access;return r==="approved"||r==="pending"||r==="refused"?{access:r,workspace:t}:{access:"unreported",workspace:t}}catch(t){let r=t.status,o=t.code;return o===Wm?{access:"pending"}:r===404||o==="not_found"?{access:"unknown",problem:"no_control_plane",reason:`Nothing is serving a control plane at ${me}.`,detail:["You are signed in, and deploying will fail until this is pointed somewhere real.","Set GAMESTAGE_CONTROL_URL to your control plane and run this again."]}:r===401||r===403?{access:"unknown",problem:"token_refused",reason:"The control plane refused this account's token.",detail:[`It is at ${me}.`,"A token from one environment is refused by another, so check which one you signed into."]}:{access:"unknown",problem:"unreachable",reason:`Could not reach the control plane at ${me}.`,detail:[String(t.message??t),"You are signed in. Deploying will fail until this answers."]}}}function wo(e){switch(e.access){case"approved":return{ok:!0,status:"approved",access:"approved",heading:"Approved",message:"Your account is approved, so every command works, including deploy.",next:["`gamestage status` shows the workspace, its games and what they are using."]};case"pending":return{ok:!0,status:"pending_approval",access:"pending",code:Wm,heading:"Registered, waiting for approval",message:"You are registered and your account is waiting for approval. That is the normal path for a new account, and approval is a person's decision today.",next:["Nothing is wrong and nothing is lost. There is no second form to fill in.","Inspecting a prototype, scaffolding a game and writing a round all work now and need no approval.","`gamestage status` re-checks approval. It never opens the browser again."]};case"refused":return{ok:!0,status:"access_refused",access:"refused",heading:"Access refused",message:"This account has been refused access. Signing in worked, so this is a decision about the account rather than a broken token.",next:["Nothing in the CLI changes this, and running `gamestage login` again will not.","Inspecting, scaffolding and writing a round still work and need no account.",`If you think this is wrong, say so where you registered: ${Dt}.`]};case"unreported":return{ok:!0,status:"access_not_reported",access:null,heading:"Signed in",message:"This control plane answered and does not report an access state, so whether this account is approved is not known here.",next:["It predates the access state rather than being broken, so carry on.","A deploy that is refused for approval will say so in its own words."]};default:return{ok:!1,status:e.problem==="no_control_plane"?"no_control_plane":e.problem==="token_refused"?"token_refused":"control_plane_unreachable",access:null,heading:"Signed in, and the control plane is not usable",message:e.reason,next:e.detail}}}function Zw(e){return e.changed?e.access==="approved"?{ok:!0,status:"approved",access:"approved",heading:"Approved",message:`${e.workspaceId} was ${e.previous} and is now approved.`,next:["Their next `gamestage status` says approved, and deploy works from then on."]}:{ok:!0,status:"refused",access:"refused",heading:"Refused",message:`${e.workspaceId} was ${e.previous} and is now refused.`,next:["Their next `gamestage status` says refused, and says how to argue with it."]}:{ok:!0,status:"unchanged",access:e.access,heading:"No change",message:`${e.workspaceId} was already ${e.previous}. Nothing was written.`,next:["No audit record either: the trail records transitions, and this was not one."]}}function mr(e){if(O(e.heading),v(` ${e.message}`),e.next.length){v();for(let t of e.next)E(t)}v()}function Ie(e){let t=[],r=e.status,o=e.code;if(o===Wm){let n=wo({access:"pending"});j()?L({ok:n.ok,status:n.status,access:n.access,code:n.code,message:n.message,next:n.next}):mr(n),process.exit(0)}r===401?t.push("Your session has expired. Run `gamestage login` again."):r===403?t.push("Either your session expired or that is not something this workspace is allowed to do. `gamestage login` rules out the first."):r===429?t.push("You are being rate limited. Wait a moment and try again."):e.retryable&&t.push("This one is worth retrying: the failure was at our end."),o&&t.push(`Code: ${o}`),t.push(`Control plane: ${me}`),C(e instanceof Error?e.message:"The control plane call failed.",t)}var mt="favicon.svg",ko=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
8157
+ `)}),this}_outputHelpIfRequested(t){let r=this._getHelpOption();r&&t.find(n=>r.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Wf(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let r,o="127.0.0.1",n="9229",i;return(i=t.match(/^(--inspect(-brk)?)$/))!==null?r=i[1]:(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=i[1],/^\d+$/.test(i[3])?n=i[3]:o=i[3]):(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=i[1],o=i[3],n=i[4]),r&&n!=="0"?`${r}=${o}:${parseInt(n)+1}`:t})}function Zf(){if(Z.env.NO_COLOR||Z.env.FORCE_COLOR==="0"||Z.env.FORCE_COLOR==="false")return!1;if(Z.env.FORCE_COLOR||Z.env.CLICOLOR_FORCE!==void 0)return!0}var VD=new Sn;Et();le();import{mkdir as _$,readFile as w$,writeFile as k$}from"node:fs/promises";import{dirname as x$,join as S$,relative as $$,resolve as E$}from"node:path";async function T$(e,t){let r;try{r=await w$(e,"utf8")}catch{return"absent"}return r===t?"same":"different"}async function Vf(e,t,r){let o=S$(e,t),n=await T$(o,r);try{await _$(x$(o),{recursive:!0}),await k$(o,r,"utf8")}catch{throw P(`Cannot write ${o}.`),new Error("unreachable")}return{where:$$(process.cwd(),o)||t,state:n}}async function Hf(e){let t=E$(e.out??"."),r=await Vf(t,ae,Ve),o=await Vf(t,be,$n),n=`import { start } from "./${ae}";`,i=`import { createPlayerClient, newIdempotencyKey } from "./${be}";`,a=r.state==="same"&&o.state==="same";if(M())return U({ok:!0,status:a?"unchanged":"written",files:[{path:r.where,digest:$t,import:n},{path:o.where,digest:Nr,import:i}],path:r.where,digest:$t,import:n});R(a?"Already current":"Wrote the Gamestage client"),O("Library",`${r.where} (${$t})`),O("Player client",`${o.where} (${Nr})`),y(),k(`Import it: ${$.cyan(n)}`),k(`The player API on its own: ${$.cyan(i)}`),(r.state==="different"||o.state==="different")&&k("An earlier copy was replaced. It is generated, so nothing of yours was in it."),y()}ie();Et();import{stat as wP,writeFile as wk}from"node:fs/promises";import{createHash as kP}from"node:crypto";import{spawn as ck}from"node:child_process";import{chmod as aP,mkdir as sP,readFile as cP,rm as lP,writeFile as dP}from"node:fs/promises";import{homedir as uP,platform as fr}from"node:os";import{join as lk}from"node:path";var oh="https://api.workos.com",ih=process.env.GAMESTAGE_CLIENT_ID??"client_01KYVPJ1MA6GA9EXTJ7GJ81YW4";async function dk(){let e=await fetch(`${oh}/user_management/authorize/device`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:ih})});if(!e.ok)throw new Error(`Could not start sign-in (${e.status}). ${await e.text()}`);return await e.json()}async function uk(e){let t=await fetch(`${oh}/user_management/authenticate`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({client_id:ih,grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:e})}),r=await t.json();if(t.ok){let o=r.user;return{status:"ok",session:{accessToken:String(r.access_token??""),refreshToken:r.refresh_token?String(r.refresh_token):void 0,email:o?.email,userId:o?.id}}}switch(r.error){case"authorization_pending":return{status:"pending"};case"slow_down":return{status:"slow_down"};case"expired_token":return{status:"expired"};default:return{status:"denied",reason:String(r.error_description??r.error??"unknown error")}}}function pk(e){let t=fr()==="darwin"?"open":fr()==="win32"?"cmd":"xdg-open",r=fr()==="win32"?["/c","start","",e]:[e];try{ck(t,r,{stdio:"ignore",detached:!0}).unref()}catch{}}var gr="gamestage-cli",mk=lk(uP(),".gamestage"),ts=lk(mk,"credentials.json");function ah(e,t){return new Promise(r=>{let o=ck("security",e,{stdio:["pipe","pipe","ignore"]}),n="";o.stdout.on("data",i=>n+=i),o.on("error",()=>r(null)),o.on("close",i=>r(i===0?n.trim():null)),t!==void 0?o.stdin.end(t):o.stdin.end()})}async function sh(e){let t=JSON.stringify(e);return fr()==="darwin"&&await ah(["add-generic-password","-a",gr,"-s",gr,"-U","-w",t])!==null?"keychain":(await sP(mk,{recursive:!0,mode:448}),await dP(ts,t,{mode:384}),await aP(ts,384),"file")}function pP(e){try{let[,t]=e.split("."),{exp:r}=JSON.parse(Buffer.from(t,"base64url").toString());return typeof r!="number"?!0:r*1e3-Date.now()<3e4}catch{return!0}}async function mP(e){if(!e.refreshToken)return null;let t=await fetch(`${oh}/user_management/authenticate`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({client_id:ih,grant_type:"refresh_token",refresh_token:e.refreshToken})});if(!t.ok)return null;let r=await t.json();return r.access_token?{...e,accessToken:String(r.access_token),refreshToken:r.refresh_token?String(r.refresh_token):e.refreshToken}:null}async function hP(){if(fr()==="darwin"){let e=await ah(["find-generic-password","-a",gr,"-s",gr,"-w"]);if(e)try{return JSON.parse(e)}catch{}}try{return JSON.parse(await cP(ts,"utf8"))}catch{return null}}async function hk(){fr()==="darwin"&&await ah(["delete-generic-password","-a",gr,"-s",gr]),await lP(ts,{force:!0})}async function Le(){let e=await hP();if(!e)return null;if(!pP(e.accessToken)||!e.refreshToken)return e;let t=await mP(e);return t?(await sh(t),t):null}var Xe="0.28.0";import{randomUUID as fP}from"node:crypto";var gP=/-[0-9a-f]{4}$/;function ns(e){return`${e}-${fP().replace(/-/g,"").slice(0,4)}`}function fk(e){return gP.test(e)}ie();le();var vt=process.env.GAMESTAGE_SITE_URL??"https://gamestage.ai";function gk(e){return`${vt}/stage/games/${encodeURIComponent(e)}?tab=overview`}function yk(e){return e&&new Set(["hunt","push","group","predict"]).has(e)?`${vt}/docs/game-formats#${e}`:`${vt}/docs`}var ye=process.env.GAMESTAGE_CONTROL_URL??"https://api.gamestage.ai";function yP(e){try{let t=new URL(e).hostname.toLowerCase();return t==="localhost"||t.endsWith(".localhost")||t==="::1"||t.startsWith("127.")}catch{return!1}}function vP(e){return e.GAMESTAGE_TEST_RUN==="1"||e.NODE_TEST_CONTEXT!==void 0}function bP(e=ye,t=process.env){if(vP(t)&&!yP(e)&&t.GAMESTAGE_ALLOW_REMOTE_TESTS!=="1")return`Refusing to register a test game against non-local control plane ${e}. Use the throwaway local control plane, or set GAMESTAGE_ALLOW_REMOTE_TESTS=1 for a deliberate real-plane run.`}function yr(e=ye){let t=bP(e);t&&P(t)}async function de(){let e=await Le();return e||P("You are not signed in.",["Run `gamestage login`. It creates the account too if you do not have one.","Inspecting, scaffolding and local rounds keep working without one."]),{client:hr({baseUrl:ye,token:async()=>(await Le())?.accessToken??e.accessToken}),email:e.email??e.userId??"unknown"}}async function vk(){let e=await Le();return e||P("You are not signed in.",["Run `gamestage login`. Approving a creator needs an operator's own session."]),{admin:Zw({baseUrl:ye,token:async()=>(await Le())?.accessToken??e.accessToken}),email:e.email??e.userId??"unknown"}}var ch="access_pending";async function rs(e){try{let t=await e.getWorkspace(),r=t?.access;return r==="approved"||r==="pending"||r==="refused"?{access:r,workspace:t}:{access:"unreported",workspace:t}}catch(t){let r=t.status,o=t.code;return o===ch?{access:"pending"}:r===404||o==="not_found"?{access:"unknown",problem:"no_control_plane",reason:`Nothing is serving a control plane at ${ye}.`,detail:["You are signed in, and deploying will fail until this is pointed somewhere real.","Set GAMESTAGE_CONTROL_URL to your control plane and run this again."]}:r===401||r===403?{access:"unknown",problem:"token_refused",reason:"The control plane refused this account's token.",detail:[`It is at ${ye}.`,"A token from one environment is refused by another, so check which one you signed into."]}:{access:"unknown",problem:"unreachable",reason:`Could not reach the control plane at ${ye}.`,detail:[String(t.message??t),"You are signed in. Deploying will fail until this answers."]}}}function Ao(e){switch(e.access){case"approved":return{ok:!0,status:"approved",access:"approved",heading:"Approved",message:"Your account is approved, so every command works, including deploy.",next:["`gamestage status` shows the workspace, its games and what they are using."]};case"pending":return{ok:!0,status:"pending_approval",access:"pending",code:ch,heading:"Registered, waiting for approval",message:"You are registered and your account is waiting for approval. That is the normal path for a new account, and approval is a person's decision today.",next:["Nothing is wrong and nothing is lost. There is no second form to fill in.","Inspecting a prototype, scaffolding a game and writing a round all work now and need no approval.","`gamestage status` re-checks approval. It never opens the browser again."]};case"refused":return{ok:!0,status:"access_refused",access:"refused",heading:"Access refused",message:"This account has been refused access. Signing in worked, so this is a decision about the account rather than a broken token.",next:["Nothing in the CLI changes this, and running `gamestage login` again will not.","Inspecting, scaffolding and writing a round still work and need no account.",`If you think this is wrong, say so where you registered: ${vt}.`]};case"unreported":return{ok:!0,status:"access_not_reported",access:null,heading:"Signed in",message:"This control plane answered and does not report an access state, so whether this account is approved is not known here.",next:["It predates the access state rather than being broken, so carry on.","A deploy that is refused for approval will say so in its own words."]};default:return{ok:!1,status:e.problem==="no_control_plane"?"no_control_plane":e.problem==="token_refused"?"token_refused":"control_plane_unreachable",access:null,heading:"Signed in, and the control plane is not usable",message:e.reason,next:e.detail}}}function bk(e){return e.changed?e.access==="approved"?{ok:!0,status:"approved",access:"approved",heading:"Approved",message:`${e.workspaceId} was ${e.previous} and is now approved.`,next:["Their next `gamestage status` says approved, and deploy works from then on."]}:{ok:!0,status:"refused",access:"refused",heading:"Refused",message:`${e.workspaceId} was ${e.previous} and is now refused.`,next:["Their next `gamestage status` says refused, and says how to argue with it."]}:{ok:!0,status:"unchanged",access:e.access,heading:"No change",message:`${e.workspaceId} was already ${e.previous}. Nothing was written.`,next:["No audit record either: the trail records transitions, and this was not one."]}}function vr(e){if(R(e.heading),y(` ${e.message}`),e.next.length){y();for(let t of e.next)k(t)}y()}function $e(e){let t=[],r=e.status,o=e.code;if(o===ch){let n=Ao({access:"pending"});M()?U({ok:n.ok,status:n.status,access:n.access,code:n.code,message:n.message,next:n.next}):vr(n),process.exit(0)}r===401?t.push("Your session has expired. Run `gamestage login` again."):r===403?t.push("Either your session expired or that is not something this workspace is allowed to do. `gamestage login` rules out the first."):r===429?t.push("You are being rate limited. Wait a moment and try again."):e.retryable&&t.push("This one is worth retrying: the failure was at our end."),o&&t.push(`Code: ${o}`),t.push(`Control plane: ${ye}`),P(e instanceof Error?e.message:"The control plane call failed.",t)}var bt="favicon.svg",Io=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
7872
8158
  <rect width="32" height="32" rx="7" fill="#1b1c1f"/>
7873
8159
  <path d="m12 8 12 8-12 8Z" fill="#fff"/>
7874
8160
  </svg>
7875
- `;function Vm(e){return/<link\b[^>]*\brel\s*=\s*(?:"[^"]*\bicon\b[^"]*"|'[^']*\bicon\b[^']*'|[^\s>]*\bicon\b[^\s>]*)[^>]*>/i.test(e)}function xo(e){if(Vm(e))return e;let t=`<link rel="icon" href="./${mt}" type="image/svg+xml">
7876
- `,r=e.search(/<\/head>/i);return r===-1?t+e:e.slice(0,r)+t+e.slice(r)}function MC(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Kw(e,t){let r=t.trim();if(!r)return e;let o=MC(r);return e.replace(/(<title[^>]*>)[\s\S]*?(<\/title>)/i,`$1${o}$2`).replace(/(<h1\b[^>]*\bid=["']game-name["'][^>]*>)[\s\S]*?(<\/h1>)/i,`$1${o}$2`)}ne();async function Vw(e){try{return await UC(e),!0}catch{return!1}}var Ja={hunt:"Find the marked few among many. A wrong pick costs an attempt.",push:"Picks add hidden value towards a limit. Going over is a bust.",group:"Form the hidden sets in a board. The whole guess is judged at once.",predict:"Call it before it happens. It settles when the result arrives.",trivia:"Question, answer, mark against a server answer set, score, close.",timed_round:"Open and close rounds on a schedule, using server time.",synchronous_event:"React to a real-world trigger: kick-off, goal, period change.",collection_ranking:"Accumulate verified actions and expose rank, progress and eligibility."};async function GC(e,t,r){let o=await Ne();return o?(pr(),await lr({baseUrl:me,token:o.accessToken}).registerGame({id:e.app.id,name:e.app.title,archetype:r,repository:e.app.source?.repository??null,manifestRevision:String(e.manifest.revision),contentHash:`sha256:${FC("sha256").update(t).digest("hex")}`,conformance:Ge(e).computed,offersPrize:e.operations.promotion.offers_prize,containerLabel:e.experience.container_label,sections:nr.map(i=>({section:i,status:e[i].status}))}),!0):!1}async function Hw(e){let t=(e.name??"new-game").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");if(!t)return C("Give the game a name with --name.");if(!e.archetype){j()&&(L({ok:!1,status:"archetype_required",message:"Choose an archetype before scaffolding. Authority is decided first, on purpose.",archetypes:Object.entries(Ja).map(([w,_])=>({archetype:w,summary:_})),example:`gamestage create --name "${e.name??t}" --archetype hunt`}),process.exit(1)),O("Choose the game's authority first"),v(S.dim(` The archetype decides what the server owns: answers, locks, scoring
8161
+ `;function lh(e){return/<link\b[^>]*\brel\s*=\s*(?:"[^"]*\bicon\b[^"]*"|'[^']*\bicon\b[^']*'|[^\s>]*\bicon\b[^\s>]*)[^>]*>/i.test(e)}function Co(e){if(lh(e))return e;let t=`<link rel="icon" href="./${bt}" type="image/svg+xml">
8162
+ `,r=e.search(/<\/head>/i);return r===-1?t+e:e.slice(0,r)+t+e.slice(r)}function _P(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function _k(e,t){let r=t.trim();if(!r)return e;let o=_P(r);return e.replace(/(<title[^>]*>)[\s\S]*?(<\/title>)/i,`$1${o}$2`).replace(/(<h1\b[^>]*\bid=["']game-name["'][^>]*>)[\s\S]*?(<\/h1>)/i,`$1${o}$2`)}le();async function kk(e){try{return await wP(e),!0}catch{return!1}}var os={hunt:"Find the marked few among many. A wrong pick costs an attempt.",push:"Picks add hidden value towards a limit. Going over is a bust.",group:"Form the hidden sets in a board. The whole guess is judged at once.",predict:"Call it before it happens. It settles when the result arrives.",trivia:"Question, answer, mark against a server answer set, score, close.",timed_round:"Open and close rounds on a schedule, using server time.",synchronous_event:"React to a real-world trigger: kick-off, goal, period change.",collection_ranking:"Accumulate verified actions and expose rank, progress and eligibility."};async function xP(e,t,r){let o=await Le();return o?(yr(),await hr({baseUrl:ye,token:o.accessToken}).registerGame({id:e.app.id,name:e.app.title,archetype:r,repository:e.app.source?.repository??null,manifestRevision:String(e.manifest.revision),contentHash:`sha256:${kP("sha256").update(t).digest("hex")}`,conformance:je(e).computed,offersPrize:e.operations.promotion.offers_prize,containerLabel:e.experience.container_label,sections:cr.map(i=>({section:i,status:e[i].status}))}),!0):!1}async function xk(e){let t=(e.name??"new-game").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");if(!t)return P("Give the game a name with --name.");if(!e.archetype){M()&&(U({ok:!1,status:"archetype_required",message:"Choose an archetype before scaffolding. Authority is decided first, on purpose.",archetypes:Object.entries(os).map(([_,T])=>({archetype:_,summary:T})),example:`gamestage create --name "${e.name??t}" --archetype hunt`}),process.exit(1)),R("Choose the game's authority first"),y($.dim(` The archetype decides what the server owns: answers, locks, scoring
7877
8163
  and settlement. Picking it before any client code is what keeps the
7878
- game trustworthy later.`)),v();for(let[w,_]of Object.entries(Ja))v(` ${S.cyan(w.padEnd(20))} ${S.dim(_)}`);v(),v(` ${S.dim("Then run:")} ${S.cyan(`gamestage create --name "${e.name??t}" --archetype <archetype>`)}`),v(),process.exit(1)}let r=Pt.safeParse(e.archetype);if(!r.success)return C(`Unknown archetype "${e.archetype}".`,[...Object.keys(Ja).map(w=>S.cyan(w)),"",`You are running gamestage ${Be}. If the name you used came from`,"the documentation, this CLI is probably older than it:",`${S.cyan("npx gamestage@latest create ...")} run the current one`]);let o=e.write===!1?null:typeof e.write=="string"?e.write:"gamestage.yaml";if(o&&!e.force&&await Vw(o))return C(`${o} already exists, and create would replace it.`,["That file holds a game: its id, its format and whatever has been done to it.","A new one minted here would be a second game in the same directory.","",`${S.cyan(`gamestage manifest validate ${o}`)} check what you have`,`${S.cyan("gamestage start")} find the next step for this directory`,"",S.dim("There is a --force, and it replaces your page and clients as well as the"),S.dim("manifest. Move the directory aside instead if you want a fresh start.")]);let n=Va(t),i=La(n,e.name??n);i.app.status="confirmed",i.app.provenance=[{kind:"human_decision",owner:"creator",date:new Date().toISOString().slice(0,10),note:"Created with gamestage create"}],i.experience.status="proposed",i.experience.surfaces=["web-embed"],i.backend.status="confirmed",i.backend.route="managed_runtime",i.backend.archetype=r.data,i.backend.provenance=[{kind:"human_decision",owner:"creator",date:new Date().toISOString().slice(0,10),note:`Archetype chosen at create time: ${r.data}`}],i.identity.status="proposed",i.identity.provider="identify";let a=rn.parse(i),s=ja(a),c=Ge(a),l=!1,p;try{l=await GC(a,s,r.data)}catch(w){p=w instanceof Error?w.message:"The control plane did not answer."}let d=null;o&&(d=o,await Ww(d,s,"utf8"));let m=Us[r.data],h=!!m&&e.write!==!1,f=[];if(h){let w=[["index.html",Kw(xo(m),a.app.title)],[mt,ko],[ge,Me],[xe,vn]];for(let[_,A]of w){if(!e.force&&await Vw(_)){f.push(_);continue}await Ww(_,A,"utf8")}}if(j()){L({ok:!0,manifest:a,manifest_yaml:s,written_to:d,conformance:{computed:c.computed,blockers:c.blockers},registered:l,...p?{registration_failed:p}:{},scaffolded:h,files:h?["index.html",mt,ge,xe].filter(w=>!f.includes(w)):[],kept:f,...m?{}:{scaffold_skipped:"no_engine",engines:Object.keys(Us)},next:"gamestage dev"});return}O(`Created ${a.app.title}`),I("Game id",a.app.id),I("Game format",r.data),h&&f.length===0?I("Files","index.html, with the Gamestage client beside it"):h&&I("Kept",`${f.join(", ")} (already here, left as they were)`),I("Authority","managed runtime (server-owned)"),I("Build stage",`${c.computed} ${c.computedName}`),d&&I("Manifest",d),v(l?" Registered in Studio as a draft.":p?` Not registered in Studio: ${p} (${me})`:" No account found, so registration was skipped."),O("What the server will own"),v(` ${S.dim(Ja[r.data])}`),O("Next"),f.includes("index.html")&&E(`${S.cyan("gamestage inspect .")} find what in your page has to move to the Engine`),E(`${S.cyan("gamestage dev")} run the game locally against the archetype`),E(`${S.cyan("gamestage manifest validate "+(d??"gamestage.yaml"))} check where it stands`),v()}oe();Zt();import{readFileSync as gf}from"node:fs";import{readFile as yf}from"node:fs/promises";import{extname as KO,resolve as WO}from"node:path";import{createHash as Zx}from"node:crypto";Jm();Xm();ne();function Ns(e,t){return e.refused?j()?(L({ok:!0,status:"refused",action:t,code:e.code,reason:e.refused,game:e.game}),!0):(O("Not done"),v(` ${e.refused}`),v(),!0):!1}function Kx(e,t=e.playgroundUrl){I("Game",`${e.name} (${e.id})`),I("State",e.state),I("Build stage",e.conformance),I("Revision",`${e.manifestRevision} (${e.contentHash})`),t&&I("Playground",t),e.playerEndpoint&&I("Player API",e.playerEndpoint),I("Manage",Fw(e.id)),e.studioUrl&&I("Studio",e.studioUrl),I("Docs",Gw(e.archetype))}async function Wx(e){let{client:t,email:r}=await ce(),o=await Ha(t),n=wo(o);if(n.ok||C(n.message,n.next),n.access==="pending"||n.access==="refused"){if(j())return L({ok:!0,status:n.status,access:n.access,...n.code?{code:n.code}:{},message:n.message,next:n.next,email:r});O("Your account"),I("Signed in as",r),I("Access",n.access),mr(n);return}try{if(e){let l=await t.getGame(e);if(l||C(...Xx(e)),j())return L({ok:!0,game:l});if(O(l.name),Kx(l),l.meters.length){v();for(let p of l.meters){let d=Math.round(sw(p)*100);I(p.label,`${p.used} of ${p.limit}${p.unit} (${d}%)`)}}v();return}let i="workspace"in o&&o.workspace?o.workspace:await t.getWorkspace(),a=i.games.length,s=typeof i.gamesTotal=="number"?i.gamesTotal:void 0;if(j())return L({ok:!0,status:n.status,access:n.access,games_total:s??null,games_shown:a,workspace:i});if(O(i.name),I("Signed in as",r),I("Access",n.access??"not reported by this control plane"),I("Tier",i.tier),I("Games",s===void 0?`${a} listed, and this control plane does not report a total`:`${s} ${s===1?"game":"games"}`),v(),s===0){E("No games yet. `gamestage create` or `gamestage inspect .` starts one."),v();return}for(let l of i.games)I(l.name,`${l.state}${l.playgroundUrl?"":" (never deployed)"}`);s!==void 0&&a<s&&(v(),E(`Showing ${a} of ${s} games.`));let c=aw(i.meters);if(c.length){v(),O("At a cap");for(let l of c)E(`${l.label}: ${l.used} of ${l.limit}${l.unit}`)}v()}catch(i){Ie(i)}}async function VO(e,t){let r;try{r=await yf(e,"utf8")}catch{t&&C(`Cannot read ${e}.`);return}let o=pe(r);if(!o.ok){C(`${e} is not a valid App Manifest, so its round cannot be provisioned.`,o.issues.map(n=>`${n.path} ${n.message}`));return}return o.manifest.backend.round}async function HO(e){try{let t=await Ya(qm(e));return Ka(t.map(r=>r.text).join(`
7879
- `))}catch{return}}async function JO(e){try{let t=await yf(e,"utf8");return`c${Zx("sha256").update(t).digest("hex").slice(0,8)}`}catch{return"local"}}async function Vx(e,t){t.file&&t.dir&&C("Choose either --file or --dir for a deploy, not both.");let{client:r}=await ce(),o=await VO(t.manifest??"gamestage.yaml",!!t.manifest);try{let n;t.file?n=await qO(r,e,t.file):t.dir&&(n=await eN(r,e,t.dir));let i=t.manifest??"gamestage.yaml",a=t.revision??await JO(i),s=await r.deploy(e,{manifestRevision:a,contentHash:t.hash??`sha256:${a}`,conformance:t.level??"L0",offersPrize:!!t.prize,round:o,...t.dir?{wording:await HO(t.dir)}:{}});if(Ns(s,"deploy"))return;let c=o?s.game.rounds.some(m=>m.id===`round-${o.number}`):null,l=c===!1?[...s.game.logs].reverse().find(m=>m.level==="error"):void 0;if(j())return L({ok:!0,status:"deployed",roundProvisioned:c,...l?{roundError:l.message}:{},game:n?{...s.game,playgroundUrl:n}:s.game});let p=Kt(s.game.containerLabel),d=Kt(s.game.containerLabel,{lower:!0});if(O("Deployed"),Kx(s.game,n),c&&I(p,`${o.number} is live`),v(),s.game.appSpec?.refusal&&(O("But Studio would not take the game's settings"),v(` ${s.game.appSpec.refusal.reason}`),v(),E("The game is live and playing. What is stale is what a producer sees in Studio, so they may be editing boxes that no longer match the game."),E("Deploy again once it is fixed; nothing else needs doing."),v()),await XO(n??s.game.playgroundUrl,s.game.playerEndpoint,e,t.check===!1),c===!1){O(`But there is no ${d}`),v(` ${l?.message??`The Engine did not accept the ${d}.`}`),v(),E("Anyone opening the game will find nothing on. Deploy again once it is fixed."),v();return}if(c===null){let m=s.game.rounds?.length??0;E(m?`No ${d} in the manifest, which is right: the game is playing ${m} from Studio.`:`No ${d} in the manifest and none in Studio, so the game has nothing on yet.`)}E("Share the playground URL. It sleeps when idle and wakes on a request."),v()}catch(n){Ie(n)}}async function Hx(e){let{client:t}=await ce();try{let r=await t.archiveGame(e);if(Ns(r,"archive"))return;if(j()){L({ok:!0,status:"archived",game:r.game});return}O("Archived"),I("Game",`${r.game.name} (${r.game.id})`),v(),E("Taken off the air. Its record and files are retained outside the served bundle."),v()}catch(r){Ie(r)}}async function Jx(e){let{client:t}=await ce();try{let{workspace:r,refused:o}=await t.setPlan(e);if(o){v(o);return}if(j())return L({ok:!0,workspace:r});O("Plan changed"),I("Plan",r.tier),I("Live games",String(r.liveGameAllowance||"Contracted")),v()}catch(r){Ie(r)}}async function vf(e,t){let{admin:r,email:o}=await Bw();try{let n=await r.setWorkspaceAccess(e,t),i=Zw(n);if(j())return L({ok:!0,status:i.status,changed:n.changed,workspace_id:n.workspaceId,access:n.access,previous:n.previous,message:i.message});mr(i),n.changed&&(I("Decided by",o),v())}catch(n){Ie(n)}}async function Yx(e){let t;try{t=await yf(e,"utf8")}catch{return C(`Cannot read ${e}`,["`gamestage inspect . --write` or `gamestage create` writes one."])}let r=pe(t);if(!r.ok)return C(`${e} is not a valid App Manifest.`,[...r.issues.map(a=>`${S.cyan(a.path)} ${a.message}`),"",`${S.cyan(`gamestage manifest validate ${e}`)} the full report`]);let o=r.manifest,n=o.backend.archetype;if(!n)return C(`${e} declares no archetype, so there is nothing to register.`,["Add `backend.archetype`, and the round that goes with it."]);let{client:i}=await ce();pr();try{let a=await i.registerGame({id:o.app.id,name:o.app.title,archetype:n,repository:o.app.source?.repository??null,manifestRevision:String(o.manifest.revision),contentHash:`sha256:${Zx("sha256").update(t).digest("hex")}`,conformance:Ge(o).computed,offersPrize:o.operations.promotion.offers_prize,containerLabel:o.experience.container_label,sections:nr.map(s=>({section:s,status:o[s].status}))});if(Ns(a,"register"))return;if(j()){L({ok:!0,status:"registered",game:a.game});return}O("Registered"),I("Game",`${a.game.name} (${a.game.id})`),I("State",a.game.state),I("Conformance",a.game.conformance),v(),E(`${S.cyan(`gamestage deploy ${a.game.id} --dir .`)} publish it`),v()}catch(a){Ie(a)}}async function bf(e,t){let{client:r}=await ce();try{let o=await r.setAwake(e,t);if(Ns(o,t?"wake":"suspend"))return;if(j()){L({ok:!0,status:o.game.state,game:o.game});return}O(t?"Awake":"Suspended"),I("Game",`${o.game.name} (${o.game.id})`),I("State",o.game.state),v(),E(t?"It is taking plays again.":"It is off the air and its live slot is free. `gamestage wake` puts it back."),v()}catch(o){Ie(o)}}async function qx(e,t){let{client:r}=await ce();try{let o=await r.getEndpoints(e);if(o||C(...Xx(e)),j())return L({ok:!0,endpoints:o});if(t==="player"||t==="control"||t==="playground"){let n=o[t];n||C(`No ${t} endpoint yet.`,["Deploy the game first: `gamestage deploy "+e+"`."]),v(n);return}O("Endpoints"),I("Player",o.player??"not deployed"),I("Control",o.control??"not deployed"),I("Playground",o.playground??"not deployed"),v()}catch(o){Ie(o)}}function Xx(e){let t=/[A-Z\s]/.test(e);return[`No game with the id "${e}" in this workspace.`,t?["That looks like a game's name. Every command takes the id, which is","the name in lower case plus four characters, e.g. my-game-a3c9.","`gamestage status` lists them, and `create` prints one when it makes it."]:["`gamestage status` lists the games in this workspace and their ids."]]}async function Qx(e,t){let{client:r}=await ce();try{let o=await r.getLogs(e,{limit:t.limit?Number(t.limit):100,since:t.since??null,level:t.level??null}),n=await r.getGame(e).catch(()=>{}),i=n?Q_(n):{state:"none"},a=ew(i);if(j())return L({ok:!0,lines:o,freshness:i});if(a&&(O("This game is serving a closed round"),v(),E(a),v()),o.length===0){O("No log lines"),v(),E("Nothing yet, or everything is older than the tier's retention."),v();return}for(let s of o){let c=s.roundId?` [${s.roundId}]`:"";v(`${s.at} ${s.level.padEnd(5)}${c} ${s.message}`)}}catch(o){Ie(o)}}function Gx(e=Be){return e==="0.0.0-dev"&&process.env.GAMESTAGE_TEST_RUN?"0.0.0-test":(e==="0.0.0-dev"&&C("This is a development build of the CLI, so it cannot pin a client version.",["A deployed page imports the Gamestage client from a published version, and","this build is not one. Deploying anyway would point the game at",`${Dt}/client/0.0.0-dev/gamestage.js, which does not exist.`,"",`${S.cyan("npm run build:cli")} build the bundle, then deploy with public/cli.mjs`,`${S.cyan("npx gamestage@latest deploy ...")} or use the published CLI`]),e)}function Bx(e,t,r=Dt){let o=`${r}/client/${t}/${ge}`;return e.replace(/(["'])\.?\/?gamestage\.js\1/g,(n,i)=>`${i}${o}${i}`)}function eS(e,t,r){let o=`<script>
8164
+ game trustworthy later.`)),y();for(let[_,T]of Object.entries(os))y(` ${$.cyan(_.padEnd(20))} ${$.dim(T)}`);y(),y(` ${$.dim("Then run:")} ${$.cyan(`gamestage create --name "${e.name??t}" --archetype <archetype>`)}`),y(),process.exit(1)}let r=zt.safeParse(e.archetype);if(!r.success)return P(`Unknown archetype "${e.archetype}".`,[...Object.keys(os).map(_=>$.cyan(_)),"",`You are running gamestage ${Xe}. If the name you used came from`,"the documentation, this CLI is probably older than it:",`${$.cyan("npx gamestage@latest create ...")} run the current one`]);let o=e.write===!1?null:typeof e.write=="string"?e.write:"gamestage.yaml";if(o&&!e.force&&await kk(o))return P(`${o} already exists, and create would replace it.`,["That file holds a game: its id, its format and whatever has been done to it.","A new one minted here would be a second game in the same directory.","",`${$.cyan(`gamestage manifest validate ${o}`)} check what you have`,`${$.cyan("gamestage start")} find the next step for this directory`,"",$.dim("There is a --force, and it replaces your page and clients as well as the"),$.dim("manifest. Move the directory aside instead if you want a fresh start.")]);let n=ns(t),i=Za(n,e.name??n);i.app.status="confirmed",i.app.provenance=[{kind:"human_decision",owner:"creator",date:new Date().toISOString().slice(0,10),note:"Created with gamestage create"}],i.experience.status="proposed",i.experience.surfaces=["web-embed"],i.backend.status="confirmed",i.backend.route="managed_runtime",i.backend.archetype=r.data,i.backend.provenance=[{kind:"human_decision",owner:"creator",date:new Date().toISOString().slice(0,10),note:`Archetype chosen at create time: ${r.data}`}],i.identity.status="proposed",i.identity.provider="identify";let a=Ut.parse(i),s=To(a),c=je(a),d=!1,u;try{d=await xP(a,s,r.data)}catch(_){u=_ instanceof Error?_.message:"The control plane did not answer."}let p=null;o&&(p=o,await wk(p,s,"utf8"));let m=qs[r.data],h=!!m&&e.write!==!1,f=[];if(h){let _=[["index.html",_k(Co(m),a.app.title)],[bt,Io],[ae,Ve],[be,$n]];for(let[T,A]of _){if(!e.force&&await kk(T)){f.push(T);continue}await wk(T,A,"utf8")}}if(M()){U({ok:!0,manifest:a,manifest_yaml:s,written_to:p,conformance:{computed:c.computed,blockers:c.blockers},registered:d,...u?{registration_failed:u}:{},scaffolded:h,files:h?["index.html",bt,ae,be].filter(_=>!f.includes(_)):[],kept:f,...m?{}:{scaffold_skipped:"no_engine",engines:Object.keys(qs)},next:"gamestage dev"});return}R(`Created ${a.app.title}`),O("Game id",a.app.id),O("Game format",r.data),h&&f.length===0?O("Files","index.html, with the Gamestage client beside it"):h&&O("Kept",`${f.join(", ")} (already here, left as they were)`),O("Authority","managed runtime (server-owned)"),O("Build stage",`${c.computed} ${c.computedName}`),p&&O("Manifest",p),y(d?" Registered in Studio as a draft.":u?` Not registered in Studio: ${u} (${ye})`:" No account found, so registration was skipped."),R("What the server will own"),y(` ${$.dim(os[r.data])}`),R("Next"),f.includes("index.html")&&k(`${$.cyan("gamestage inspect .")} find what in your page has to move to the Engine`),k(`${$.cyan("gamestage dev")} run the game locally against the archetype`),k(`${$.cyan("gamestage manifest validate "+(p??"gamestage.yaml"))} check where it stands`),y()}ie();Et();import{readFileSync as Rf}from"node:fs";import{readFile as Bs}from"node:fs/promises";import{createInterface as VN}from"node:readline/promises";import{extname as HN,resolve as JN}from"node:path";import{createHash as bS}from"node:crypto";mh();gh();is();le();function Ws(e,t){return e.refused?M()?(U({ok:!0,status:"refused",action:t,code:e.code,reason:e.refused,game:e.game}),!0):(R("Not done"),y(` ${e.refused}`),y(),!0):!1}function _S(e,t=e.playgroundUrl){O("Game",`${e.name} (${e.id})`),O("State",e.state),O("Build stage",e.conformance),O("Revision",`${e.manifestRevision} (${e.contentHash})`),t&&O("Playground",t),e.playerEndpoint&&O("Player API",e.playerEndpoint),O("Manage",gk(e.id)),e.studioUrl&&O("Studio",e.studioUrl),O("Docs",yk(e.archetype))}async function wS(e){let{client:t,email:r}=await de(),o=await rs(t),n=Ao(o);if(n.ok||P(n.message,n.next),n.access==="pending"||n.access==="refused"){if(M())return U({ok:!0,status:n.status,access:n.access,...n.code?{code:n.code}:{},message:n.message,next:n.next,email:r});R("Your account"),O("Signed in as",r),O("Access",n.access),vr(n);return}try{if(e){let d=await t.getGame(e);if(d||P(...AS(e)),M())return U({ok:!0,game:d});if(R(d.name),_S(d),d.meters.length){y();for(let u of d.meters){let p=Math.round(Tw(u)*100);O(u.label,`${u.used} of ${u.limit}${u.unit} (${p}%)`)}}y();return}let i="workspace"in o&&o.workspace?o.workspace:await t.getWorkspace(),a=i.games.length,s=typeof i.gamesTotal=="number"?i.gamesTotal:void 0;if(M())return U({ok:!0,status:n.status,access:n.access,games_total:s??null,games_shown:a,workspace:i});if(R(i.name),O("Signed in as",r),O("Access",n.access??"not reported by this control plane"),O("Tier",i.tier),O("Games",s===void 0?`${a} listed, and this control plane does not report a total`:`${s} ${s===1?"game":"games"}`),y(),s===0){k("No games yet. `gamestage create` or `gamestage inspect .` starts one."),y();return}for(let d of i.games)O(d.name,`${d.state}${d.playgroundUrl?"":" (never deployed)"}`);s!==void 0&&a<s&&(y(),k(`Showing ${a} of ${s} games.`));let c=Ew(i.meters);if(c.length){y(),R("At a cap");for(let d of c)k(`${d.label}: ${d.used} of ${d.limit}${d.unit}`)}y()}catch(i){$e(i)}}async function YN(e,t){let r;try{r=await Bs(e,"utf8")}catch{t&&P(`Cannot read ${e}.`);return}let o=ce(r);if(!o.ok){P(`${e} is not a valid App Manifest, so its round cannot be provisioned.`,o.issues.map(n=>`${n.path} ${n.message}`));return}return o.manifest.backend.round}async function qN(e){try{let t=await as(fh(e));return es(t.map(r=>r.text).join(`
8165
+ `))}catch{return}}async function XN(e){try{let t=await Bs(e,"utf8");return`c${bS("sha256").update(t).digest("hex").slice(0,8)}`}catch{return"local"}}async function QN(e){try{let t=ce(await Bs(e,"utf8"));return t.ok?je(t.manifest).computed:"L0"}catch{return"L0"}}async function kS(e,t){t.file&&t.dir&&P("Choose either --file or --dir for a deploy, not both.");let{client:r}=await de(),o=await YN(t.manifest??"gamestage.yaml",!!t.manifest);try{let n,i={...o?{round:o}:{},...t.allow?.length?{allow:t.allow}:{}};t.file?n=await tR(r,e,t.file,i):t.dir&&(n=await iR(r,e,t.dir,i));let a=t.manifest??"gamestage.yaml",s=t.revision??await XN(a),c=await r.deploy(e,{manifestRevision:s,contentHash:t.hash??`sha256:${s}`,conformance:t.level??await QN(a),offersPrize:!!t.prize,round:o,...t.dir?{wording:await qN(t.dir)}:{}});if(Ws(c,"deploy"))return;let d=o?c.game.rounds.some(h=>h.id===`round-${o.number}`):null,u=d===!1?[...c.game.logs].reverse().find(h=>h.level==="error"):void 0;if(M())return U({ok:!0,status:"deployed",roundProvisioned:d,...u?{roundError:u.message}:{},game:n?{...c.game,playgroundUrl:n}:c.game});let p=Qt(c.game.containerLabel),m=Qt(c.game.containerLabel,{lower:!0});if(R("Deployed"),_S(c.game,n),d&&O(p,`${o.number} is live`),y(),c.game.appSpec?.refusal&&(R("But Studio would not take the game's settings"),y(` ${c.game.appSpec.refusal.reason}`),y(),k("The game is live and playing. What is stale is what a producer sees in Studio, so they may be editing boxes that no longer match the game."),k("Deploy again once it is fixed; nothing else needs doing."),y()),await nR(n??c.game.playgroundUrl,c.game.playerEndpoint,e,t.check===!1),d===!1){R(`But there is no ${m}`),y(` ${u?.message??`The Engine did not accept the ${m}.`}`),y(),k("Anyone opening the game will find nothing on. Deploy again once it is fixed."),y();return}if(d===null){let h=c.game.rounds?.length??0;k(h?`No ${m} in the manifest, which is right: the game is playing ${h} from Studio.`:`No ${m} in the manifest and none in Studio, so the game has nothing on yet.`)}k("Share the playground URL. It sleeps when idle and wakes on a request."),y()}catch(n){$e(n)}}async function xS(e){let{client:t}=await de();try{let r=await t.archiveGame(e);if(Ws(r,"archive"))return;if(M()){U({ok:!0,status:"archived",game:r.game});return}R("Archived"),O("Game",`${r.game.name} (${r.game.id})`),y(),k("Taken off the air. Its record and files are retained outside the served bundle."),y()}catch(r){$e(r)}}async function SS(e){let{client:t}=await de();try{let o=(await t.getWorkspace()).games.filter(a=>a.state==="archived"&&!a.playgroundUrl&&!a.playerEndpoint&&!a.space);if(o.length===0){y("Nothing to remove. Every archived game here was deployed at some point.");return}if(!M()){R(`${o.length} archived games that never deployed`);let a=new Map;for(let s of o)a.set(s.name,(a.get(s.name)??0)+1);for(let[s,c]of[...a].sort((d,u)=>u[1]-d[1]))k(c>1?`${s} x${c}`:s);y(),k("A live game, or one that ever deployed, is refused by the server."),y()}if(!e.yes){process.stdin.isTTY||P("Refusing to delete without being asked.",["Nothing has changed. Re-run with `--yes` if you mean it."]);let a=VN({input:process.stdin,output:process.stdout});try{if((await a.question(`Delete ${o.length} records permanently? Type yes to go ahead: `)).trim().toLowerCase()!=="yes"){y("Nothing was deleted.");return}}finally{a.close()}}let n=0,i=[];for(let a of o){let s=await t.deleteGame(a.id);s.refused?i.push(`${a.name}: ${s.refused}`):n+=1}if(U({removed:n,refused:i.length}),!M()){R("Removed"),k(`${n} records gone.`);for(let a of i)k(a);y()}}catch(r){$e(r)}}async function $S(e){let{client:t}=await de();try{let{workspace:r,refused:o}=await t.setPlan(e);if(o){y(o);return}if(M())return U({ok:!0,workspace:r});R("Plan changed"),O("Plan",r.tier),O("Live games",String(r.liveGameAllowance||"Contracted")),y()}catch(r){$e(r)}}async function Df(e,t){let{admin:r,email:o}=await vk();try{let n=await r.setWorkspaceAccess(e,t),i=bk(n);if(M())return U({ok:!0,status:i.status,changed:n.changed,workspace_id:n.workspaceId,access:n.access,previous:n.previous,message:i.message});vr(i),n.changed&&(O("Decided by",o),y())}catch(n){$e(n)}}async function ES(e){let t;try{t=await Bs(e,"utf8")}catch{return P(`Cannot read ${e}`,["`gamestage inspect . --write` or `gamestage create` writes one."])}let r=ce(t);if(!r.ok)return P(`${e} is not a valid App Manifest.`,[...r.issues.map(a=>`${$.cyan(a.path)} ${a.message}`),"",`${$.cyan(`gamestage manifest validate ${e}`)} the full report`]);let o=r.manifest,n=dw(o);if(n.length)return P(`${e} cannot be registered.`,[...n,"","Add `backend.archetype`, and the round that goes with it."]);let{client:i}=await de();yr();try{let a=await i.registerGame(lw(o,`sha256:${bS("sha256").update(t).digest("hex")}`));if(Ws(a,"register"))return;if(M()){U({ok:!0,status:"registered",game:a.game});return}R("Registered"),O("Game",`${a.game.name} (${a.game.id})`),O("State",a.game.state),O("Conformance",a.game.conformance),y(),k(`${$.cyan(`gamestage deploy ${a.game.id} --dir .`)} publish it`),y()}catch(a){$e(a)}}async function jf(e,t){let{client:r}=await de();try{let o=await r.setAwake(e,t);if(Ws(o,t?"wake":"suspend"))return;if(M()){U({ok:!0,status:o.game.state,game:o.game});return}R(t?"Awake":"Suspended"),O("Game",`${o.game.name} (${o.game.id})`),O("State",o.game.state),y(),k(t?"It is taking plays again.":"It is off the air and its live slot is free. `gamestage wake` puts it back."),y()}catch(o){$e(o)}}async function TS(e,t){let{client:r}=await de();try{let o=await r.getEndpoints(e);if(o||P(...AS(e)),M())return U({ok:!0,endpoints:o});if(t==="player"||t==="control"||t==="playground"){let n=o[t];n||P(`No ${t} endpoint yet.`,["Deploy the game first: `gamestage deploy "+e+"`."]),y(n);return}R("Endpoints"),O("Player",o.player??"not deployed"),O("Control",o.control??"not deployed"),O("Playground",o.playground??"not deployed"),y()}catch(o){$e(o)}}function AS(e){let t=/[A-Z\s]/.test(e);return[`No game with the id "${e}" in this workspace.`,t?["That looks like a game's name. Every command takes the id, which is","the name in lower case plus four characters, e.g. my-game-a3c9.","`gamestage status` lists them, and `create` prints one when it makes it."]:["`gamestage status` lists the games in this workspace and their ids."]]}async function IS(e,t){let{client:r}=await de();try{let o=await r.getLogs(e,{limit:t.limit?Number(t.limit):100,since:t.since??null,level:t.level??null}),n=await r.getGame(e).catch(()=>{}),i=n?bw(n):{state:"none"},a=_w(i);if(M())return U({ok:!0,lines:o,freshness:i});if(a&&(R("This game is serving a closed round"),y(),k(a),y()),o.length===0){R("No log lines"),y(),k("Nothing yet, or everything is older than the tier's retention."),y();return}for(let s of o){let c=s.roundId?` [${s.roundId}]`:"";y(`${s.at} ${s.level.padEnd(5)}${c} ${s.message}`)}}catch(o){$e(o)}}function Nf(e=Xe){return e==="0.0.0-dev"&&process.env.GAMESTAGE_TEST_RUN?"0.0.0-test":(e==="0.0.0-dev"&&P("This is a development build of the CLI, so it cannot pin a client version.",["A deployed page imports the Gamestage client from a published version, and","this build is not one. Deploying anyway would point the game at",`${vt}/client/0.0.0-dev/gamestage.js, which does not exist.`,"",`${$.cyan("npm run build:cli")} build the bundle, then deploy with public/cli.mjs`,`${$.cyan("npx gamestage@latest deploy ...")} or use the published CLI`]),e)}function vS(e,t,r=vt){let o=`${r}/client/${t}/${ae}`;return e.replace(/(["'])\.?\/?gamestage\.js\1/g,(n,i)=>`${i}${o}${i}`)}function CS(e,t,r){let o=`<script>
7880
8166
  // Written by \`gamestage deploy\`. Where this game's Engine answers.
7881
8167
  window.GAMESTAGE_API = ${JSON.stringify(t)};
7882
8168
  window.GAMESTAGE_GAME = ${JSON.stringify(r)};
7883
8169
  // This page was deployed, so it may ask which Interaction Cloud project it is.
7884
8170
  window.GAMESTAGE_IC_LOOKUP = true;
7885
8171
  </script>
7886
- `,n=e.search(/<script\b/i);if(n===-1){let i=e.search(/<\/head>/i);return i===-1?o+e:e.slice(0,i)+o+e.slice(i)}return e.slice(0,n)+o+e.slice(n)}async function wr(e,t,r){let o=await fetch(e,{method:"PUT",body:typeof t=="string"?new Uint8Array(Buffer.from(t,"utf8")):t,headers:{"content-type":r}});o.ok||C(`Upload refused with ${o.status}. Ask for a fresh URL and retry.`)}function Os(e){let t=new URL(e.publicUrl);return t.pathname=`/${e.key.split("/").map(encodeURIComponent).join("/")}`,t.search="",t.hash="",t.toString()}function YO(e){switch(KO(e).toLowerCase()){case".html":return"text/html; charset=utf-8";case".css":return"text/css; charset=utf-8";case".js":case".mjs":return"text/javascript; charset=utf-8";case".json":return"application/json; charset=utf-8";case".svg":return"image/svg+xml";case".png":return"image/png";case".jpg":case".jpeg":return"image/jpeg";case".gif":return"image/gif";case".webp":return"image/webp";case".ico":return"image/x-icon";case".webmanifest":return"application/manifest+json; charset=utf-8";case".wasm":return"application/wasm";default:return"application/octet-stream"}}async function qO(e,t,r){let o=WO(r),n;try{n=gf(o)}catch{throw C(`Cannot read ${r}.`),new Error("unreachable")}let i=await e.uploadTarget(t,"index.html"),a=eS(xo(n.toString("utf8")),`${i.playerApiOrigin}`,t);await wr(i.uploadUrl,a,"text/html; charset=utf-8");let s=await e.uploadTarget(t,xe);await wr(s.uploadUrl,vn,"text/javascript; charset=utf-8");let c=await e.uploadTarget(t,ge);await wr(c.uploadUrl,Me,"text/javascript; charset=utf-8");let l=await e.uploadTarget(t,mt);return await wr(l.uploadUrl,ko,"image/svg+xml"),j()||(v(),E(`Uploaded ${r} to ${Os(i)}`),E(`Wired it to ${i.playerApiOrigin} as "${t}"`),E(`Shipped @monterosa/gamestage beside it (${bn})`),E(`Shipped the player client beside it (${Ar})`)),Os(i)}async function XO(e,t,r,o){if(o||!e||!t)return;let{browserCheck:n}=await Promise.resolve().then(()=>(ff(),Fx));QO(await n(e,t,r))}function QO(e){if(e.status==="verified"){I("Checked","the page loads and plays in a browser"),v();return}if(e.status==="skipped"){E(S.dim(`Not checked in a browser: ${e.detail??""}`.trim())),v();return}O("The published page did not start"),v(` ${e.detail??""}`),v(),E("The files are published, so the game is live and broken rather than unpublished."),E(`${S.cyan("gamestage verify")} the same check, with the rest of them`),v(),process.exitCode=1}async function eN(e,t,r){let o;try{o=qm(r)}catch(m){throw C(m instanceof Error?m.message:`Cannot read ${r}.`),new Error("unreachable")}let n=o.find(m=>m.relativePath==="index.html");n||C(`Directory ${r} must contain an index.html file.`);let i=gf(n.path,"utf8"),a=Vm(i),s=o.some(m=>m.relativePath==="favicon.ico"),c=o.some(m=>m.relativePath===mt),l=!a&&!s,p=l&&!c,d;for(let m of o){if(m.relativePath===ge||m.relativePath===xe)continue;let h=await e.uploadTarget(t,m.relativePath);m.relativePath==="index.html"&&(d=h);let f=gf(m.path),w=/\.(m?js)$/i.test(m.relativePath),_=m.relativePath==="index.html"?eS(Bx(l?xo(f.toString("utf8")):f.toString("utf8"),Gx()),h.playerApiOrigin,t):w?Bx(f.toString("utf8"),Gx()):f;await wr(h.uploadUrl,_,YO(m.relativePath))}if(p){let m=await e.uploadTarget(t,mt);await wr(m.uploadUrl,ko,"image/svg+xml")}if(await e.pruneBundle(t,[...o.map(m=>m.relativePath),...p?[mt]:[]]),!j()&&d&&(v(),E(`Uploaded ${o.length} files from ${r}`),E(`Playground: ${Os(d)}`),E(`Wired it to ${d.playerApiOrigin} as "${t}"`),p&&E("Added a replaceable starter favicon")),!d)throw new Error("The directory index was not uploaded.");return Os(d)}oe();import{readFile as fN}from"node:fs/promises";oe();var rS="player-conformance",_f="round-current",tN="sha256:emulator-conformance";function gt(e){return structuredClone(e)}function yt(){return{server_time:"2026-08-01T09:00:00.000Z",snapshot:tN}}function nN(e){let t=e==="per-player-challenge";return{...yt(),id:_f,number:412,version:2,can:{accepting_plays:!0,results_available:!1,solution_revealed:!1,closed:!1,optimistic_play:!1},challenge_instance_id:t?"challenge-player-conformance":null,challenge:{prompt:"alpha"}}}function tS(e,t){let r=t==="mistakes";return{...yt(),player_id:rS,round_id:e,attempts_used:r?6:0,attempts_allowed:10,mistakes_used:r?2:0,mistakes_allowed:4,progress:r?{solved:["group-1"]}:{},score:r?10:0,score_revision:0,finished:!1,outcome:r?"incomplete":void 0}}function rN(e){let t=nN(e),r=new Map([[t.id,t]]),o=new Map([[t.id,tS(t.id,e)]]);return e==="solution-disclosure"&&(r.set("round-revealed",{...t,id:"round-revealed",number:411,version:3,can:{accepting_plays:!1,results_available:!0,solution_revealed:!0,closed:!0,optimistic_play:!1},solution:{answer:"revealed-alpha"}}),o.set("round-revealed",tS("round-revealed",e))),{runtime:{...yt(),game:"conformance-game",api_version:"2.0",archetype:e==="at-settlement"?"predict":"group",marking:e==="at-settlement"?"at_settlement":"at_commit",challenge_source:e==="per-player-challenge"?"per_player":"shared",schedule:{kind:"continuous"},updates:{transport:"poll",freshness_seconds:30},display:{title:"Conformance game"},identity:{required:!1,provider:"identify",anonymous_play:!0},archive:!0,capabilities:["plays","profile","leaderboard"]},rounds:r,roundStates:o,leaderboard:{...yt(),round_id:_f,order:"high_first",tie_break:"earliest_play",entries:[{rank:1,player_id:"player-example",display_name:"Example",score:20}],total:1,truncated:!1},profile:{...yt(),player_id:rS,played:0,won:0,current_streak:0,max_streak:0,distribution:{},constraints:{}},plays:new Map,nextPlay:1}}function nS(e,t){return{...yt(),play_id:`rejected-${e.nextPlay++}`,outcome:"rejected",reason:t,round_version:2,marked:!1,feedback:[]}}function wf(e){let t=rN(e);return{async getRuntime(){return gt(t.runtime)},async getCurrentRound(){return gt(t.rounds.get(_f))},async getRound(r){let o=t.rounds.get(r);return o?gt(o):void 0},async play(r,o){let n=t.rounds.get(r);if(!n)return nS(t,"round_not_found");let i=t.plays.get(o.idempotency_key);if(i)return{...gt(i),outcome:"duplicate"};if(o.round_version!==n.version)return{...yt(),play_id:`stale-${t.nextPlay++}`,outcome:"stale",reason:"round_version",round_version:n.version,marked:!1,feedback:[]};if(n.challenge_instance_id!==null&&o.challenge_instance_id!==n.challenge_instance_id)return nS(t,"challenge_instance_id");let a=t.roundStates.get(r),s=t.runtime.marking==="at_settlement",c={...a,...yt(),attempts_used:a.attempts_used+1,score:a.score+(s?0:10),finished:!s,outcome:s?"pending":"won"},l={...yt(),play_id:`play-${t.nextPlay++}`,outcome:"accepted",round_version:n.version,marked:!s,feedback:s?[]:[{key:"answer",verdict:"correct"}],round_state:gt(c)};return t.roundStates.set(r,c),t.plays.set(o.idempotency_key,l),c.finished&&!a.finished&&(t.profile=Ma(t.profile,c.outcome)),gt(l)},async getRoundState(r){let o=t.roundStates.get(r);if(!o)throw new Error(`No such round: ${r}`);return gt(o)},async getProfile(){return gt(t.profile)},async getLeaderboard(){return gt(t.leaderboard)}}}function oN(){return e=>wf(e)}var IF=oN();oe();import{createServer as iN}from"node:http";function mn(e){let t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`^${t.replace(/\\\{[^}]+\\\}/g,"([^/]+)")}$`)}var aN=mn(re.runtime),sN=mn(re.currentRound),cN=mn(re.round),lN=mn(re.plays),uN=mn(re.roundState),dN=mn(re.profile),pN=mn(re.leaderboard);function Ft(e,t,r){let o=JSON.stringify(r);e.writeHead(t,{"content-type":"application/json; charset=utf-8","content-length":Buffer.byteLength(o)}),e.end(o)}function kr(e,t,r,o){Ft(e,t,{error:{code:r,message:o,retryable:!1}})}async function mN(e){let t=[];for await(let r of e)t.push(Buffer.from(r));if(t.length!==0)return JSON.parse(Buffer.concat(t).toString("utf8"))}async function hN(e,t,r,o){if(!e.url){kr(t,400,"invalid_request","The request URL is missing.");return}let i=new URL(e.url,"http://localhost").pathname;if(e.method==="GET"){if(o&&/^\/(client\/[^/]+\/)?gamestage\.js$/.test(i)){t.writeHead(200,{"content-type":"text/javascript; charset=utf-8","cache-control":"no-store","access-control-allow-origin":"*","content-length":Buffer.byteLength(o)}),t.end(o);return}if(aN.test(i)){Ft(t,200,await r.getRuntime());return}if(sN.test(i)){Ft(t,200,await r.getCurrentRound());return}let a=cN.exec(i);if(a){let c=await r.getRound(decodeURIComponent(a[2]));if(!c){kr(t,404,"round_not_found","The requested round was not found.");return}Ft(t,200,c);return}let s=uN.exec(i);if(s){let c=decodeURIComponent(s[2]);try{Ft(t,200,await r.getRoundState(c))}catch{kr(t,404,"round_not_found","The requested round was not found.")}return}if(dN.test(i)){Ft(t,200,await r.getProfile());return}if(pN.test(i)){Ft(t,200,await r.getLeaderboard());return}}if(e.method==="POST"){let a=lN.exec(i);if(a){try{let s=await mN(e);Ft(t,200,await r.play(decodeURIComponent(a[2]),s))}catch(s){kr(t,400,"invalid_request",s instanceof SyntaxError?"The request body must be valid JSON.":"The request body is invalid.")}return}}kr(t,404,"not_found","The requested player API route was not found.")}function Rs(e="default",t){let r=wf(e);return iN((o,n)=>{hN(o,n,r,t).catch(()=>{n.headersSent?n.destroy():kr(n,500,"internal_error","The emulator could not answer the request.")})})}Zt();Qh();ne();async function gN(e){let t;try{t=await fN(e,"utf8")}catch{return}let r=pe(t);if(!r.ok){C(`${e} is not a valid App Manifest.`,r.issues.map(o=>`${S.cyan(o.path)} ${o.message}`));return}return r.manifest}async function yN(e){let t=Number(e.port);if(!Number.isInteger(t)||t<0||t>65535)throw new Error("--port must be an integer between 0 and 65535");let r=e.scenario??"default";if(e.fixture)return{server:Rs(r,Me),what:"fixture",game:"conformance-game"};let o=await gN(e.manifest??"gamestage.yaml");if(!o)return{server:Rs(r,Me),what:"fixture",game:"conformance-game"};let n=o.backend.round;if(!n)return{server:Rs(r,Me),what:"fixture",game:o.app.id,title:o.app.title};let i=o.backend.archetype;return i&&i!==n.archetype&&C(`The manifest declares the ${i} archetype and a ${n.archetype} round.`,["One of the two is wrong. The round decides what the Engine marks."]),dn.includes(n.archetype)||C(`No Engine here serves the ${n.archetype} archetype yet.`,[`Built so far: ${dn.join(", ")}. \`gamestage dev --fixture\` serves`,"the contract fixture if you are working against the wire rather than the rules."]),{server:await As({game:o.app.id,round:n,title:o.app.title,identityRequired:!!e.as,clientBundle:Me}),what:"engine",game:o.app.id,round:n,title:o.app.title,containerLabel:o.experience.container_label,as:e.as}}async function oS(e){let t=await yN(e),{server:r}=t,o=()=>new Promise((l,p)=>{r.close(d=>d?p(d):l())}),n=new Promise(l=>{let p=async()=>{process.off("SIGINT",p),process.off("SIGTERM",p),await o(),l()};process.once("SIGINT",p),process.once("SIGTERM",p)});await new Promise((l,p)=>{r.once("error",p),r.listen(Number(e.port),"127.0.0.1",()=>l())});let i=r.address();if(!i||typeof i=="string")throw new Error("The local server did not report its listening address");let a=`http://127.0.0.1:${i.port}`,s,c;if(t.as&&(s=await qh(a),r.attachDevIdentity?.(s),c=await s.mint(t.as)),j())L({ok:!0,status:"listening",serving:t.what,baseUrl:a,game:t.game,round:t.round?{number:t.round.number,id:`round-${t.round.number}`}:null,...s&&c?{identity:{as:t.as,player_id:`id:${t.as}`,issuer:s.issuer,jwks_uri:s.jwksUri,token:c,required:!0}}:{}});else if(t.what==="engine"){O(t.title??t.game);let l=Kt(t.containerLabel);I("Serving",`your ${Kt(t.containerLabel,{lower:!0})}, through the real Engine`),I(l,`${t.round.number} (round-${t.round.number})`),I("API",a),I("Game id",t.game),v(),E(`<script src="${a}/gamestage.js"></script>`),E(`window.GAMESTAGE_API = "${a}"`),E(`window.GAMESTAGE_GAME = "${t.game}"`),c&&E(`window.GAMESTAGE_TOKEN = "${c}"`),v(),s&&c&&(I("Playing as",`${t.as} (${S.cyan(`id:${t.as}`)})`),I("Identity","required, so an anonymous play is refused here too"),I("Keys",s.jwksUri),v(),E("A real RS256 token, validated by the code that validates a customer's. The keypair lives for this run only."),E(`This harness cannot be deployed: its issuer is a loopback URL, and ${S.cyan("gamestage manifest validate")} refuses a manifest that names one.`),v()),E(`Edit the ${Kt(t.containerLabel,{lower:!0})} in your manifest and restart to see it change.`),v()}else O("Serving the contract fixture"),I("API",a),I("Game id",t.game),v(),E(`<script src="${a}/gamestage.js"></script>`),v(),E("There is no round here to serve, so this is the shell rather than your game."),E("`dev` reads a round from the manifest and is the one place that may: it is a local harness and deploys nothing. A game's real content lives in Studio, where a producer can change it without you."),v();await n}ff();oe();ne();import{stat as vN}from"node:fs/promises";async function iS(){let e=[],[t]=process.versions.node.split(".").map(Number);e.push({id:"node",label:"Node.js",ok:t>=20,detail:t>=20?`v${process.versions.node}`:`v${process.versions.node} - Gamestage needs Node 20 or newer`,blocking:!0}),e.push({id:"schema",label:"Manifest schema",ok:!0,detail:`v${Ia} bundled`,blocking:!1});let r=!1;try{await vN("gamestage.yaml"),r=!0}catch{}e.push({id:"manifest",label:"App Manifest",ok:r,detail:r?"gamestage.yaml found":"none here yet \u2014 `gamestage inspect .` or `gamestage create` makes one",blocking:!1}),e.push({id:"auth",label:"Signed in",ok:!1,detail:"not signed in \u2014 only needed to deploy",blocking:!1});let o=e.filter(n=>!n.ok&&n.blocking);j()&&(L({ok:o.length===0,checks:e}),process.exit(o.length===0?0:1)),O("Environment");for(let n of e){let i=n.ok?S.green("ok"):n.blocking?S.red("blocked"):S.dim("--");v(` ${i.padEnd(18)} ${n.label.padEnd(16)} ${S.dim(n.detail)}`)}v(),o.length&&(v(` ${S.red("Fix the blocked items above before continuing.")}`),v(),process.exit(1)),v(` ${S.green("Ready.")}`),v()}oe();import{readFile as NN,stat as RN,writeFile as DN}from"node:fs/promises";import{createHash as jN}from"node:crypto";import{basename as LN}from"node:path";cf();import{readdir as bN,readFile as Ds,stat as kf}from"node:fs/promises";import{basename as _N,extname as wN,join as xf,relative as kN}from"node:path";var xN=new Set(["node_modules",".git","dist","build",".next",".wrangler","coverage"]),SN=new Set([".html",".htm",".js",".mjs",".cjs",".jsx",".ts",".tsx",".vue",".svelte"]);async function $N(e,t=200){let r=await kf(e),o=[];if(r.isFile())return o.push({path:e,relative:_N(e),text:await Ds(e,"utf8")}),o;let n=async i=>{if(o.length>=t)return;let a=await bN(i,{withFileTypes:!0});for(let s of a){if(o.length>=t)return;if(s.name.startsWith(".")&&s.name!==".openai")continue;let c=xf(i,s.name);if(s.isDirectory()){if(xN.has(s.name))continue;await n(c)}else if(SN.has(wN(s.name)))try{o.push({path:c,relative:kN(e,c),text:await Ds(c,"utf8")})}catch{}}};return await n(e),o}function EN(e,t){let r=e.text.split(`
7887
- `);for(let o=0;o<r.length;o++)if(t.test(r[o]))return{file:e.relative,line:o+1,excerpt:r[o].trim().slice(0,120)};return null}async function TN(e,t){if(!(await kf(e)).isFile())try{let o=JSON.parse(await Ds(xf(e,"package.json"),"utf8"));if(o.name)return o.name.replace(/^@[^/]+\//,"")}catch{}for(let o of t){if(!/\.html?$/.test(o.relative))continue;let n=/<h1[^>]*>([^<]+)<\/h1>/i.exec(o.text);if(n){let a=aS(n[1]);if(a)return a}let i=/<title[^>]*>([^<]+)<\/title>/i.exec(o.text);if(i){let a=aS(i[1].split(/\s+[|\u2013\u2014-]\s+/)[0]);if(a)return a}}return null}function aS(e){let t=e.replace(/\s+/g," ").trim();return/[a-z0-9]/i.test(t)?t.slice(0,60):null}var AN=[{id:"client-scoring",title:"Scoring runs in the browser",detail:"Score is computed client-side, so a player can edit it. Scoring must move into the Game Engine and the client must render a server-returned result.",patterns:[/\b\w*(score|points|total)\s*\+=/i,/\b\w*(score|points|total)\w*\s*=\s*\w*\s*[+*]/i,/function\s+\w*(calculate|compute|get)\w*(score|points|total|tier)/i],remedy:{delete:"the score arithmetic in the browser, and the answer set it marks against",call:"const result = await client.play(round.id, { picks, roundVersion: round.version }, newIdempotencyKey())",render:"result.round_state?.score, and result.feedback[].verdict per pick. `round_state` is absent where a game marks at settlement, so read it optionally",move:"the answer set into `backend.round.targets` in gamestage.yaml, where a deploy provisions it into the Engine",keep:"every bit of the rendering, the animation and the copy",because:"a score the browser computes is a score a player can set"},remedies:{push:{delete:"the running total, the bust comparison and the tier table, and the dataset the values came from",call:"const result = await client.play(round.id, { picks: [key], roundVersion: round.version }, newIdempotencyKey())",render:"result.round_state?.progress.total for the running total, .bust for whether they went over, and .tier for the rank. The value each pick contributed comes back in result.feedback[0].label",move:"what each pick is worth into `backend.round.slates[].entries[].value` in gamestage.yaml, and the ceiling into `backend.round.target`",keep:"every bit of the rendering, the animation and the copy",because:"a game whose whole mechanic is arithmetic is finished the moment its numbers reach the browser, whatever the page does afterwards"}}},{id:"client-outcome",title:"The result is decided in the browser",detail:"Win, loss or result tier is determined client-side, so the outcome cannot be trusted. The Engine must decide the outcome and return it as a committed decision.",patterns:[/\b(bust|win|won|lost|passed|failed)\s*=\s*\w+\s*[<>=]/i,/\bgetTier\s*\(|\bdetermine(Result|Outcome|Winner)/i],remedy:{delete:"the local decision about winning, losing or a result tier",call:"const result = await client.play(round.id, input, newIdempotencyKey())",render:"result.round_state?.outcome, which is won, lost, incomplete or pending",keep:"how the outcome is presented, including the celebration",because:"an outcome the page decides is one it can be persuaded to decide differently"},remedies:{push:{delete:"the bust comparison and the function that turns a distance into a rank",call:"const result = await client.play(round.id, { picks: [key], roundVersion: round.version }, newIdempotencyKey())",render:"result.round_state?.progress.bust and .tier, which are decided on commit: the total only grows, so passing the target ends the round then rather than at the last pick",move:"the rank ladder into `backend.round.tiers`, as fractions of the target",keep:"how the result is presented, including the celebration",because:"a rank the page awards is one it can award itself"}}},{id:"client-answers",title:"Answers or targets are present in client code",detail:"The solution set ships to the browser, so it can be read before play. Answers must be held server-side and never cross the wire.",patterns:[/\b(answer|solution|correct)(Key|Set|s)?\s*[:=]/i,/\bisCorrect\s*[:=(]/i,/\b\w*(target|answer|solution)\w*\s*=\s*[[{](?!.*(fetch|await|response))/i,/\b(target|answer|solution)s?\s*:\s*[^,}\n]/i],remedy:{delete:"the array or object holding the correct answers",call:"const round = await client.getCurrentRound()",render:"round.challenge for what the player picks from. The Engine returns the verdict; the page never knows the answer until the round reveals it",move:"the answers into `backend.round.targets` in gamestage.yaml. Deleting them without moving them leaves the Engine nothing to mark against",keep:"the board, the layout and the interaction",because:"a solution in the bundle can be read before anybody plays"},remedies:{push:{delete:"the dataset the contributions are looked up in",call:"const round = await client.getCurrentRound()",render:"round.challenge.slates, which carry each pick's key and label and no value at all. What a pick was worth arrives as feedback once it has been committed",move:"the values into `backend.round.slates[].entries[].value` in gamestage.yaml. Deleting them without moving them leaves the Engine nothing to count",keep:"the board, the layout and the interaction",because:"knowing every contribution is knowing which picks land on the target, which is the whole game"}}},{id:"client-play-limit",title:"Play limiting relies on browser storage",detail:"Attempt limits enforced through localStorage or cookies reset when storage is cleared. Limits must be enforced against an identified player server-side.",patterns:[/localStorage\.(set|get)Item\s*\(\s*['"`][^'"`]*(play|attempt|tries|daily|limit)/i,/sessionStorage\.(set|get)Item/i],remedy:{delete:"the localStorage or cookie bookkeeping that counts attempts",call:"const state = await client.getRoundState(round.id)",render:"state.attempts_used against state.attempts_allowed, and the same pair for mistakes",move:"the limits into `backend.round.attemptsAllowed` and `mistakesAllowed`",keep:"how the remaining attempts are shown",because:"a limit in storage is a limit that clearing storage removes"},remedies:{push:{delete:"the localStorage bookkeeping that remembers today's game",call:"const state = await client.getRoundState(round.id)",render:"state.attempts_used against state.attempts_allowed for picks taken, and state.finished for whether today is done",move:"the number of picks into `backend.round.slates`: one slate is one pick",keep:"how the remaining picks are shown",because:"a game that remembers in the browser is one a cleared browser lets you play again"}}},{id:"client-randomness",title:"The daily challenge is chosen in the browser",detail:"Client-side randomness means players can reroll until they like the challenge, and no two players share a verifiable daily. Selection must be server-issued.",patterns:[/Math\.random\s*\(\)/,/\b(daily|today|challenge)\w*\s*=\s*.*Math\.random/i],remedy:{delete:"the Math.random() that chooses the challenge",call:"const round = await client.getCurrentRound()",render:"round.challenge, which is the same for everyone playing that round",keep:"randomness that is only decoration, such as confetti or shuffling how options are laid out",because:"a challenge the browser picks is one a player can reroll, and no two players share a daily worth comparing"},remedies:{push:{delete:"the Math.random() that chooses which team and season comes up",call:"const round = await client.getCurrentRound()",render:"round.challenge.slates in order: slate n is pick n. Keep the spin as an animation over a choice the round has already made",move:"the sequence into `backend.round.slates`, one per pick",keep:"the spin, the reveal and every bit of its timing",because:"a slate the browser draws is one a player can redraw, and it means no two players played the same day"}}},{id:"client-time",title:"Round timing uses client time",detail:"Device clocks can be changed. Open, lock and settle decisions must use authoritative server time.",patterns:[/new Date\(\)\.getTime\(\)/,/Date\.now\(\)\s*[<>]/],remedy:{delete:"the comparisons against Date.now() that decide whether the round is open",call:"const round = await client.getCurrentRound()",render:"round.can.accepting_plays, and round.server_time where a countdown needs an origin",keep:"the countdown itself, driven from the server's time rather than the device's",because:"a device clock is something a player can change"}}],IN=[{id:"sdk",title:"Monterosa JavaScript SDK 2",detail:"No SDK integration found. The SDK provides the EnMasse connection, live config and content updates, identity, consent, storage and experience hosting.",present:/@monterosa\/sdk-|sdk\.monterosa\.cloud/i},{id:"identity",title:"Player sign-in",detail:"No player identity found. Anonymous play is supported and the Engine's signed session carries it. To identify players, name your own issuer and its JWKS in `identity.jwt` and the Engine validates the token your login system already gives them.",present:/identify-kit|monterosa.*identity|\bIdentify\b|jwks|oidc|auth0|workos|firebase.*auth/i},{id:"consent",title:"Consent gating",detail:"No consent handling found. Analytics and storage must respect the player's consent choices.",present:/consent-kit|consent/i},{id:"analytics",title:"Analytics",detail:"No analytics found. Gamestage routes events to the destinations declared in the manifest, with Monterosa Analytics on by default.",present:/analytics-kit|gtag\(|posthog|analytics\.track/i}],CN=[{archetype:"hunt",signals:[{pattern:/\b(answer|solution|correct)(s|Set|Key)?\s*[:=]/i,because:"marks picks against a known answer set"},{pattern:/\bisCorrect\b|\bverdict\b/i,because:"judges a pick right or wrong"},{pattern:/\bpick(s|ed)?\b/i,because:"players make picks"},{pattern:/\broster|\bplayer(s)?\s*\[/i,because:"selects from a roster"}]},{archetype:"push",signals:[{pattern:/\b\w*(total|sum|running)\w*\s*\+=/i,because:"accumulates a running total from each pick"},{pattern:/\bbust\b/i,because:"has a bust condition for going over"},{pattern:/\b\w*total\w*\s*[><]=?\s*\w*target|\btarget\w*\s*-\s*\w*total/i,because:"compares the total against a target"},{pattern:/\bgetTier\b|\bwithout going over\b|\bclosest\b/i,because:"scores by how close the total came"}]},{archetype:"trivia",signals:[{pattern:/\bquestion\b/i,because:"presents questions"},{pattern:/\bchoice(s)?\b|\boption(s)?\b/i,because:"offers answer choices"},{pattern:/\bquiz\b/i,because:"describes itself as a quiz"}]},{archetype:"predict",signals:[{pattern:/\bpredict/i,because:"asks players to predict"},{pattern:/\bmarket\b|\bodds\b/i,because:"has market or odds language"},{pattern:/\bsettle(d|ment)?\b/i,because:"settles outcomes"}]},{archetype:"group",signals:[{pattern:/\bpuzzle\b/i,because:"describes itself as a puzzle"},{pattern:/\bguess(es)?\b/i,because:"players guess"},{pattern:/\bstreak\b/i,because:"tracks streaks"}]},{archetype:"timed_round",signals:[{pattern:/\bcountdown\b|\btimer\b/i,because:"runs a countdown"},{pattern:/\bround\b/i,because:"is organised into rounds"}]}];function PN(e){let t=e.map(s=>s.text).join(`
7888
- `),r=CN.map(s=>{let c=s.signals.filter(l=>l.pattern.test(t)).map(l=>l.because);return{archetype:s.archetype,hits:c.length,because:c}}).filter(s=>s.hits>0).sort((s,c)=>c.hits-s.hits),o=r[0];if(!o)return null;let n=r[1]?.hits??0,i=o.hits-n,a=o.hits>=3&&i>=2?"high":o.hits>=2?"medium":"low";return{archetype:o.archetype,confidence:a,because:o.because}}async function ON(e,t){let o=(await kf(e)).isFile()?null:e;if(o)try{let i=await Ds(xf(o,"package.json"),"utf8"),a=JSON.parse(i),s={...a.dependencies,...a.devDependencies},c=s.next?"Next.js":s.react?"React":s.vue?"Vue":s.svelte?"Svelte":void 0,l=s.vite?"Vite":s.webpack?"webpack":void 0;return{kind:"node_project",framework:c,build:l}}catch{}return t.length===1&&/\.html?$/.test(t[0].relative)||t.every(i=>/\.html?$/.test(i.relative))?{kind:"standalone_html"}:{kind:"unknown"}}async function sS(e){let t=await $N(e);if(t.length===0)throw new Error(`No inspectable source found at ${e}. Point inspect at a game file or a project directory.`);let r=await ON(e,t),o=PN(t),n=[];for(let d of AN){let m=[];for(let h of t){for(let f of d.patterns){let w=EN(h,f);if(w){m.push(w);break}}if(m.length>=3)break}if(m.length>0){let h=o?d.remedies?.[o.archetype]??d.remedy:d.remedy;n.push({...h?{remedy:h}:{},id:d.id,title:d.title,detail:d.detail,evidence:m})}}let i=t.map(d=>d.text).join(`
7889
- `),a=IN.filter(d=>!d.present.test(i)).map(d=>({id:d.id,title:d.title,detail:d.detail,evidence:[]})),s=[];t.some(d=>/<(div|section|main|canvas)/i.test(d.text))&&s.push({id:"presentation",title:"Player-facing presentation",detail:"Layout, styling and interaction feel can stay creator-owned. Gamestage replaces the authority beneath the interface, not the interface itself.",evidence:t.slice(0,2).map(d=>({file:d.relative}))});let l=Cs(t),p=[];return r.kind==="standalone_html"&&p.push("Where is this deployed today, and who owns that hosting?"),p.push("Which of the embedded datasets are licensed for production use, and at what refresh cadence?"),n.some(d=>d.id==="client-play-limit")&&p.push("Is the play limit per device or per person? That decides whether identity is required at launch."),{target:e,scanned_files:t.length,stack:r,keep:s,move_behind_authority:n,missing_integrations:a,copy_to_studio:l,unknowns:p,archetype:o,name:await TN(e,t)}}ne();var zN=e=>LN(e).replace(/\.[^.]+$/,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"inspected-game",MN=e=>e.split("-").filter(Boolean).map(t=>t[0].toUpperCase()+t.slice(1)).join(" ");function UN(e,t){let r=zN(e.name??e.target),o=t&&Uw(t)?t:Va(r),n=e.name??MN(r),i=La(o,n);return i.manifest.conformance="L0",i.app.status="proposed",i.app.provenance=[{kind:"repository_evidence",file:e.target},{kind:"generated_proposal",tool:"gamestage inspect",source_context:`${e.scanned_files} file(s) inspected`}],i.experience.status="proposed",i.experience.surfaces=["web-embed"],i.experience.provenance=[{kind:"repository_evidence",file:e.target}],e.archetype&&(i.backend.status="proposed",i.backend.route="managed_runtime",i.backend.archetype=e.archetype.archetype,i.backend.provenance=[{kind:"generated_proposal",tool:"gamestage inspect",source_context:e.archetype.because.join("; ")}]),e.move_behind_authority.some(s=>s.id==="client-play-limit"||s.id==="client-scoring")&&(i.identity.status="proposed",i.identity.provider="identify",i.identity.require_authenticated_writes=!0),rn.parse(i)}async function FN(e,t){let r=await Ne();if(!r)return!1;pr();let o=e.backend.archetype;return o?(await lr({baseUrl:me,token:r.accessToken}).registerGame({id:e.app.id,name:e.app.title,archetype:o,repository:e.app.source?.repository??null,manifestRevision:String(e.manifest.revision),contentHash:`sha256:${jN("sha256").update(t).digest("hex")}`,conformance:Ge(e).computed,offersPrize:e.operations.promotion.offers_prize,containerLabel:e.experience.container_label,sections:nr.map(i=>({section:i,status:e[i].status}))}),!0):!1}async function GN(e){try{let t=pe(await NN(e,"utf8"));return t.ok?t.manifest.app.id:void 0}catch{return}}async function BN(e){try{return await RN(e),!0}catch{return!1}}async function cS(e,t){let r;try{r=await sS(e)}catch(l){return C(l instanceof Error?l.message:"Inspection failed")}let o=UN(r,await GN(typeof t.write=="string"?t.write:"gamestage.yaml")),n=Ge(o),i=ja(o),a=!1,s;try{a=await FN(o,i)}catch(l){s=l instanceof Error?l.message:"The control plane did not answer."}let c=null;if(t.write){if(c=typeof t.write=="string"?t.write:"gamestage.yaml",!t.force&&await BN(c))return C(`${c} already exists, and inspect would replace it.`,["A manifest that has been worked on holds a round; this report cannot,","because a round is not visible in the code it read.","",`${S.cyan(`gamestage manifest validate ${c}`)} check what you have`,`${S.cyan("gamestage inspect . --force")} replace it anyway`]);await DN(c,i,"utf8")}if(j()){L({ok:!0,report:r,manifest:o,conformance:{computed:n.computed,blockers:n.blockers},manifest_yaml:i,written_to:c,registered:a,...s?{registration_failed:s}:{}});return}if(O(`Inspection report ${S.dim(r.target)}`),I("Files inspected",String(r.scanned_files)),I("Stack",r.stack.framework?`${r.stack.kind} (${r.stack.framework})`:r.stack.kind),r.archetype&&I("Archetype",`${r.archetype.archetype} ${S.dim(`(${r.archetype.confidence} confidence)`)}`),r.keep.length){O("Keep as yours");for(let l of r.keep)E(S.green(l.title)),v(` ${S.dim(l.detail)}`)}if(r.move_behind_authority.length){O("Must move behind an authoritative boundary");for(let l of r.move_behind_authority){E(S.yellow(l.title)),v(` ${S.dim(l.detail)}`);for(let p of l.evidence.slice(0,2)){let d=p.line?`${p.file}:${p.line}`:p.file;v(` ${S.dim("\u2192")} ${S.cyan(d)}${p.excerpt?S.dim(" "+p.excerpt):""}`)}l.remedy&&(v(` ${S.dim("delete")} ${l.remedy.delete}`),v(` ${S.dim("call")} ${S.cyan(l.remedy.call)}`),l.remedy.render&&v(` ${S.dim("render")} ${l.remedy.render}`),l.remedy.move&&v(` ${S.dim("move")} ${l.remedy.move}`),v(` ${S.dim("keep")} ${l.remedy.keep}`))}}if(r.missing_integrations.length){O("Platform integrations not present yet");for(let l of r.missing_integrations)E(l.title),v(` ${S.dim(l.detail)}`)}if(r.unknowns.length){O("Needs a human answer");for(let l of r.unknowns)E(l,"?")}if(O("App Manifest"),I("Conformance",`${n.computed} ${n.computedName}`),n.blockers.length){v(),v(S.dim(" To reach the next level:"));for(let l of n.blockers)v(` ${S.dim("\xB7")} ${l.requirement}`)}v(),c?v(` Written to ${S.cyan(c)}`):v(S.dim(" Re-run with --write to save this manifest.")),v(a?" Registered in Studio as a draft.":s?` Not registered in Studio: ${s} (${me})`:" No account found, so registration was skipped."),v()}var lS="https://github.com",ZN="https://api.github.com",js=process.env.GAMESTAGE_GITHUB_CLIENT_ID??"Ov23livKf8DOgOm2a383";async function uS(){let e=await fetch(`${lS}/login/device/code`,{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify({client_id:js,scope:""})});if(!e.ok)throw new Error(`GitHub refused the device request (${e.status}).`);return await e.json()}async function dS(e){let r=await(await fetch(`${lS}/login/oauth/access_token`,{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify({client_id:js,device_code:e,grant_type:"urn:ietf:params:oauth:grant-type:device_code"})})).json();if(r.access_token)return{status:"linked",login:await KN(r.access_token)};switch(r.error){case"authorization_pending":return{status:"pending"};case"slow_down":return{status:"slow_down",interval:r.interval??10};case"expired_token":return{status:"expired"};case"access_denied":return{status:"denied"};default:throw new Error(`GitHub returned an unexpected error (${r.error}).`)}}async function KN(e){let t=await fetch(`${ZN}/user`,{headers:{accept:"application/vnd.github+json",authorization:`Bearer ${e}`,"user-agent":"gamestage-cli"}});if(!t.ok)throw new Error(`GitHub would not identify the account (${t.status}).`);let r=await t.json();if(!r.login)throw new Error("GitHub returned an account with no login.");return r.login}ne();var WN=e=>new Promise(t=>setTimeout(t,e));async function pS(){let{client:e}=await ce();try{let t=await uS();j()?L({ok:!0,status:"awaiting_authorisation",userCode:t.user_code,verificationUri:t.verification_uri,clientId:js}):(O("Link GitHub"),I("Code",t.user_code),I("Open",t.verification_uri),v(),E("Enter the code on that page. This waits until you do."),v());let r=Date.now()+t.expires_in*1e3,o=Math.max(t.interval,5);for(;Date.now()<r;){await WN(o*1e3);let n=await dS(t.device_code);if(n.status==="pending")continue;if(n.status==="slow_down"){o=n.interval;continue}if(n.status==="denied")return C("You declined the request on GitHub.");if(n.status==="expired")return C("The code expired. Run `gamestage link github` again.");let{workspace:i}=await e.linkGitHub(n.login);if(j())return L({ok:!0,status:"linked",github:i.github});O("Linked"),I("Account",n.login),v(),E("Your first deploy is no longer gated. Run `gamestage deploy`."),v();return}C("The code expired before it was entered.")}catch(t){Ie(t)}}ne();var VN=e=>new Promise(t=>setTimeout(t,e));function HN(e){process.stderr.write(JSON.stringify({ok:!0,status:"awaiting_approval",user_code:e.user_code,verification_uri:e.verification_uri,verification_uri_complete:e.verification_uri_complete,expires_in:e.expires_in},null,2)+`
7890
- `)}async function mS(e,t){let{client:r}=await ce(),o=wo(await Ha(r));if(j()){L({ok:o.ok,status:o.status,access:o.access,...o.code?{code:o.code}:{},message:o.message,next:o.next,email:e.email,...t?{stored_in:t}:{},control_plane:me}),o.ok||process.exit(1);return}v(),O("Signed in"),I("Account",e.email??e.userId??"unknown"),t&&I("Token stored in",t==="keychain"?"your macOS keychain":"~/.gamestage (owner only)"),v(),E("Never written into the project, and never passed to your agent."),E("`gamestage logout` removes it."),mr(o),o.ok||process.exit(1)}async function hS(){let e=await Ne();if(e){await mS(e);return}let t;try{t=await Dw()}catch(a){C("Could not reach the sign-in service.",[String(a)])}j()?HN(t):(O("Sign in to Gamestage"),v(" This also creates your account if you do not have one. Google or email."),v(" A new account is approved by a person, so this may end in a wait."),v(),I("Open",t.verification_uri_complete),I("Or enter",`${t.user_code} at ${t.verification_uri}`),v(),v(" Waiting for you to confirm in the browser..."),Lw(t.verification_uri_complete));let r=Date.now()+t.expires_in*1e3,o=t.interval*1e3,n=null;for(;Date.now()<r;){await VN(o);let a=await jw(t.device_code);if(a.status==="ok"){n=a.session;break}if(a.status==="slow_down"){o+=5e3;continue}a.status!=="pending"&&(a.status==="expired"&&C("That code expired.",["Run `gamestage login` again."]),C("Sign-in was refused.",[a.reason]))}n||C("Timed out waiting for approval.",["Run `gamestage login` again."]);let i=await Km(n);await mS(n,i)}async function fS(){let e=await Ne();if(await Mw(),j()){L({ok:!0,status:e?"signed_out":"not_signed_in"});return}O(e?"Signed out":"Not signed in"),e&&I("Removed",e.email??"session"),v()}async function gS(){let e=await Ne();if(j()){L(e?{ok:!0,signed_in:!0,email:e.email,user_id:e.userId}:{ok:!0,signed_in:!1});return}if(!e){O("Not signed in"),v(),E("Inspecting, scaffolding and local rounds need no account."),E("Run `gamestage login` when you want to deploy a playground."),v();return}O("Signed in"),I("Account",e.email??"unknown"),e.userId&&I("User",e.userId),v(),E("`gamestage status` says whether this account is approved."),v()}oe();ne();import{readdir as JN,readFile as YN,stat as qN}from"node:fs/promises";async function XN(e){let t=[];try{t=await JN(e)}catch{}let r=t.filter(a=>!a.startsWith(".")),o=[];for(let a of r)/\.html?$/.test(a)&&o.push(a);let n=!1,i;for(let a of["gamestage.yaml","gamestage.yml"])try{await qN(`${e}/${a}`),n=!0;try{let s=pe(await YN(`${e}/${a}`,"utf8"));s.ok&&(i=!!s.manifest.backend.round)}catch{}break}catch{}return{has_manifest:n,has_package_json:r.includes("package.json"),html_files:o,is_empty:r.length===0,has_round:i}}async function yS(){let e=process.cwd(),t=await XN(e),r=t.has_manifest?t.has_round===!1?"round":t.has_round===!0?"play":"continue":t.has_package_json||t.html_files.length>0?"inspect":"create",o={continue:{command:je("manifest validate gamestage.yaml"),why:"This project already has an App Manifest. Check where it stands."},round:{command:"edit gamestage.yaml, add backend.round",why:`The manifest names an archetype but no round, so there is no game for the Engine to serve yet. The round is the content the server owns: the board a player sees and the answers they never do. Until it is there, \`${je("dev")}\` serves the contract fixture rather than your game, and \`${je("verify")}\` has nothing to verify.`},play:{command:je("dev"),why:"The manifest declares a round. Serve it locally, through the real Engine."},inspect:{command:je("inspect ."),why:"There is a game here already. Read it read-only and produce an inspection report."},create:{command:je("create"),why:"Nothing to inspect. Start a new game from a concept."}};if(j()){L({ok:!0,cwd:e,version:Be,detected:t,route:r,next:o[r],docs:{start:"https://gamestage.ai/start.md",schema:"https://gamestage.ai/schemas/app-manifest/1.0"},invocation:Fs(),authentication:`Not required for inspect, create, validate or local development. First needed at \`${je("deploy")}\`.`});return}if(O(`Gamestage ${Be}`),v(S.dim(" Take an agent-built game to production, on the platform behind the")),v(S.dim(" world's biggest fan experiences.")),O("Where you are"),t.has_manifest&&t.has_round===!1)v(" An App Manifest is present, and it declares no round.");else if(t.has_manifest&&t.has_round===!0)v(" An App Manifest is present, with a round the Engine can serve.");else if(t.has_manifest)v(" An App Manifest is already present.");else if(t.has_package_json||t.html_files.length){let n=[t.has_package_json?"a Node project":null,t.html_files.length?`${t.html_files.length} HTML file(s)`:null].filter(Boolean);v(` Found ${n.join(" and ")}. This looks like a game to inspect.`)}else v(" Nothing here yet. This looks like a fresh start.");O("Do this next"),v(` ${S.cyan(o[r].command)}`),v(` ${S.dim(o[r].why)}`),O("Good to know"),v(S.dim(` Nothing needs an account yet. Inspect, create, validate and local
8172
+ `,n=e.search(/<script\b/i);if(n===-1){let i=e.search(/<\/head>/i);return i===-1?o+e:e.slice(0,i)+o+e.slice(i)}return e.slice(0,n)+o+e.slice(n)}async function Tr(e,t,r){let o=await fetch(e,{method:"PUT",body:typeof t=="string"?new Uint8Array(Buffer.from(t,"utf8")):t,headers:{"content-type":r}});o.ok||P(`Upload refused with ${o.status}. Ask for a fresh URL and retry.`)}function Gs(e){let t=new URL(e.publicUrl);return t.pathname=`/${e.key.split("/").map(encodeURIComponent).join("/")}`,t.search="",t.hash="",t.toString()}function eR(e){switch(HN(e).toLowerCase()){case".html":return"text/html; charset=utf-8";case".css":return"text/css; charset=utf-8";case".js":case".mjs":return"text/javascript; charset=utf-8";case".json":return"application/json; charset=utf-8";case".svg":return"image/svg+xml";case".png":return"image/png";case".jpg":case".jpeg":return"image/jpeg";case".gif":return"image/gif";case".webp":return"image/webp";case".ico":return"image/x-icon";case".webmanifest":return"application/manifest+json; charset=utf-8";case".wasm":return"application/wasm";default:return"application/octet-stream"}}async function tR(e,t,r,o={}){let n=JN(r),i;try{i=Rf(n)}catch{throw P(`Cannot read ${r}.`),new Error("unreachable")}let a=await ph({path:n,relativePath:r},o.round);a&&P(`${r} ${a.why}`,["A deploy is a publishing act, and --file publishes this file as the game's","own page. Point --file at the game's HTML, or use --dir and let the gate","withhold what the page does not need."]);let s=await e.uploadTarget(t,"index.html"),c=CS(Co(i.toString("utf8")),`${s.playerApiOrigin}`,t);await Tr(s.uploadUrl,c,"text/html; charset=utf-8");let d=await e.uploadTarget(t,be);await Tr(d.uploadUrl,$n,"text/javascript; charset=utf-8");let u=await e.uploadTarget(t,ae);await Tr(u.uploadUrl,Ve,"text/javascript; charset=utf-8");let p=await e.uploadTarget(t,bt);return await Tr(p.uploadUrl,Io,"image/svg+xml"),M()||(y(),k(`Uploaded ${r} to ${Gs(s)}`),k(`Wired it to ${s.playerApiOrigin} as "${t}"`),k(`Shipped @monterosa/gamestage beside it (${$t})`),k(`Shipped the player client beside it (${Nr})`)),Gs(s)}async function nR(e,t,r,o){if(o||!e||!t)return;let{browserCheck:n}=await Promise.resolve().then(()=>(Of(),yS));rR(await n(e,t,r))}function rR(e){if(e.status==="verified"){O("Checked","the page loads and plays in a browser"),y();return}if(e.status==="skipped"){k($.dim(`Not checked in a browser: ${e.detail??""}`.trim())),y();return}R("The published page did not start"),y(` ${e.detail??""}`),y(),k("The files are published, so the game is live and broken rather than unpublished."),k(`${$.cyan("gamestage verify")} the same check, with the rest of them`),y(),process.exitCode=1}function oR(e){for(let t of e.walkedPast)k(`Walked past ${t}: it is a toolchain directory, not your game.`);for(let t of e.allowed)k(`Published ${t.path} because you allowed it.`);for(let t of e.withheld)k(`Withheld ${t.path} from the upload: it ${t.why}`);e.refuse&&P(`${e.refuse.path} ${e.refuse.why}`,["A deploy is a publishing act, so this file would sit at a public URL beside","your game. Remove it from the directory, or point --dir at a directory that","does not contain it, and deploy again."])}async function iR(e,t,r,o={}){let n;try{n=fh(r)}catch(A){throw P(A instanceof Error?A.message:`Cannot read ${r}.`),new Error("unreachable")}let i=await Tk(n,{...o,exempt:[ae,be]});oR(i);let a=i.publish,s=a.find(A=>A.relativePath==="index.html");s||P(`Directory ${r} must contain an index.html file.`);let c=Rf(s.path,"utf8"),d=lh(c),u=a.some(A=>A.relativePath==="favicon.ico"),p=a.some(A=>A.relativePath===bt),m=!d&&!u,h=m&&!p,f=Nf();if(f!=="0.0.0-test"){let A=`${vt}/client/${f}/${ae}`,w=!1;try{w=(await fetch(A,{method:"HEAD"})).ok}catch{w=!0}w||P(`The client this deploy would pin, ${f}, is not published yet.`,[`Every page uploaded here will import ${A},`,"which answers 404 today. The game would load, fetch nothing, and show a","blank screen with no error anywhere.","","Deploy the site first: it is what serves /client/<version>/.","",`${$.cyan("node scripts/deploy.mjs site")} then run this deploy again`])}let _;for(let A of a){if(A.relativePath===ae||A.relativePath===be)continue;let w=await e.uploadTarget(t,A.relativePath);A.relativePath==="index.html"&&(_=w);let C=Rf(A.path),D=/\.(m?js)$/i.test(A.relativePath),X=/\.html$/i.test(A.relativePath)?CS(vS(m&&A.relativePath==="index.html"?Co(C.toString("utf8")):C.toString("utf8"),Nf()),w.playerApiOrigin,t):D?vS(C.toString("utf8"),Nf()):C;await Tr(w.uploadUrl,X,eR(A.relativePath))}if(h){let A=await e.uploadTarget(t,bt);await Tr(A.uploadUrl,Io,"image/svg+xml")}let T=[...a.map(A=>A.relativePath),...h?[bt]:[]];try{await e.pruneBundle(t,T);for(let A of i.withheld)k(`Removed ${A.path} from the playground.`)}catch(A){let w=A instanceof Error?A.message:String(A),C=i.withheld.map(D=>D.path);R("The playground still holds files this deploy did not publish"),y(` ${w}`),y(),C.length?(k(`Could not remove ${C.join(", ")} from the playground: ${w}`),k("Anything an earlier deploy put there is still being served.")):k("Anything an earlier deploy put there is still being served."),y(),process.exitCode=1}if(!M()&&_&&(y(),k(`Uploaded ${a.length} files from ${r}`),k(`Playground: ${Gs(_)}`),k(`Wired it to ${_.playerApiOrigin} as "${t}"`),h&&k("Added a replaceable starter favicon")),!_)throw new Error("The directory index was not uploaded.");return Gs(_)}ie();import{readFile as _R}from"node:fs/promises";ie();var NS="player-conformance",Lf="round-current",aR="sha256:emulator-conformance";function kt(e){return structuredClone(e)}function xt(){return{server_time:"2026-08-01T09:00:00.000Z",snapshot:aR}}function sR(e){let t=e==="per-player-challenge";return{...xt(),id:Lf,number:412,version:2,can:{accepting_plays:!0,results_available:!1,solution_revealed:!1,closed:!1,optimistic_play:!1},challenge_instance_id:t?"challenge-player-conformance":null,challenge:{prompt:"alpha"}}}function PS(e,t){let r=t==="mistakes";return{...xt(),player_id:NS,round_id:e,attempts_used:r?6:0,attempts_allowed:10,mistakes_used:r?2:0,mistakes_allowed:4,progress:r?{solved:["group-1"]}:{},score:r?10:0,score_revision:0,finished:!1,outcome:r?"incomplete":void 0}}function cR(e){let t=sR(e),r=new Map([[t.id,t]]),o=new Map([[t.id,PS(t.id,e)]]);return e==="solution-disclosure"&&(r.set("round-revealed",{...t,id:"round-revealed",number:411,version:3,can:{accepting_plays:!1,results_available:!0,solution_revealed:!0,closed:!0,optimistic_play:!1},solution:{answer:"revealed-alpha"}}),o.set("round-revealed",PS("round-revealed",e))),{runtime:{...xt(),game:"conformance-game",api_version:"2.0",archetype:e==="at-settlement"?"predict":"group",marking:e==="at-settlement"?"at_settlement":"at_commit",challenge_source:e==="per-player-challenge"?"per_player":"shared",schedule:{kind:"continuous"},updates:{transport:"poll",freshness_seconds:30},display:{title:"Conformance game"},identity:{required:!1,provider:"identify",anonymous_play:!0},archive:!0,capabilities:["plays","profile","leaderboard"]},rounds:r,roundStates:o,leaderboard:{...xt(),round_id:Lf,order:"high_first",tie_break:"earliest_play",entries:[{rank:1,player_id:"player-example",display_name:"Example",score:20}],total:1,truncated:!1},profile:{...xt(),player_id:NS,display_name:"Example",played:0,won:0,current_streak:0,max_streak:0,distribution:{},constraints:{}},plays:new Map,nextPlay:1}}function OS(e,t){return{...xt(),play_id:`rejected-${e.nextPlay++}`,outcome:"rejected",reason:t,round_version:2,marked:!1,feedback:[]}}function Mf(e){let t=cR(e);return{async getRuntime(){return kt(t.runtime)},async getCurrentRound(){return kt(t.rounds.get(Lf))},async getRound(r){let o=t.rounds.get(r);return o?kt(o):void 0},async play(r,o){let n=t.rounds.get(r);if(!n)return OS(t,"round_not_found");let i=t.plays.get(o.idempotency_key);if(i)return{...kt(i),outcome:"duplicate"};if(o.round_version!==n.version)return{...xt(),play_id:`stale-${t.nextPlay++}`,outcome:"stale",reason:"round_version",round_version:n.version,marked:!1,feedback:[]};if(n.challenge_instance_id!==null&&o.challenge_instance_id!==n.challenge_instance_id)return OS(t,"challenge_instance_id");let a=t.roundStates.get(r),s=t.runtime.marking==="at_settlement",c={...a,...xt(),attempts_used:a.attempts_used+1,score:a.score+(s?0:10),finished:!s,outcome:s?"pending":"won"},d={...xt(),play_id:`play-${t.nextPlay++}`,outcome:"accepted",round_version:n.version,marked:!s,feedback:s?[]:[{key:"answer",verdict:"correct"}],round_state:kt(c)};return t.roundStates.set(r,c),t.plays.set(o.idempotency_key,d),c.finished&&!a.finished&&(t.profile=Va(t.profile,c.outcome)),kt(d)},async getRoundState(r){let o=t.roundStates.get(r);if(!o)throw new Error(`No such round: ${r}`);return kt(o)},async getProfile(){return kt(t.profile)},async getLeaderboard(){return kt(t.leaderboard)}}}function lR(){return e=>Mf(e)}var PB=lR();ie();import{createServer as dR}from"node:http";function _n(e){let t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`^${t.replace(/\\\{[^}]+\\\}/g,"([^/]+)")}$`)}var uR=_n(re.runtime),pR=_n(re.currentRound),mR=_n(re.round),hR=_n(re.plays),fR=_n(re.roundState),gR=_n(re.profile),yR=_n(re.leaderboard);function Yt(e,t,r){let o=JSON.stringify(r);e.writeHead(t,{"content-type":"application/json; charset=utf-8","content-length":Buffer.byteLength(o)}),e.end(o)}function Ar(e,t,r,o){Yt(e,t,{error:{code:r,message:o,retryable:!1}})}async function vR(e){let t=[];for await(let r of e)t.push(Buffer.from(r));if(t.length!==0)return JSON.parse(Buffer.concat(t).toString("utf8"))}async function bR(e,t,r,o){if(!e.url){Ar(t,400,"invalid_request","The request URL is missing.");return}let i=new URL(e.url,"http://localhost").pathname;if(e.method==="GET"){if(o&&/^\/(client\/[^/]+\/)?gamestage\.js$/.test(i)){t.writeHead(200,{"content-type":"text/javascript; charset=utf-8","cache-control":"no-store","access-control-allow-origin":"*","content-length":Buffer.byteLength(o)}),t.end(o);return}if(uR.test(i)){Yt(t,200,await r.getRuntime());return}if(pR.test(i)){Yt(t,200,await r.getCurrentRound());return}let a=mR.exec(i);if(a){let c=await r.getRound(decodeURIComponent(a[2]));if(!c){Ar(t,404,"round_not_found","The requested round was not found.");return}Yt(t,200,c);return}let s=fR.exec(i);if(s){let c=decodeURIComponent(s[2]);try{Yt(t,200,await r.getRoundState(c))}catch{Ar(t,404,"round_not_found","The requested round was not found.")}return}if(gR.test(i)){Yt(t,200,await r.getProfile());return}if(yR.test(i)){Yt(t,200,await r.getLeaderboard());return}}if(e.method==="POST"){let a=hR.exec(i);if(a){try{let s=await vR(e);Yt(t,200,await r.play(decodeURIComponent(a[2]),s))}catch(s){Ar(t,400,"invalid_request",s instanceof SyntaxError?"The request body must be valid JSON.":"The request body is invalid.")}return}}Ar(t,404,"not_found","The requested player API route was not found.")}function Zs(e="default",t){let r=Mf(e);return dR((o,n)=>{bR(o,n,r,t).catch(()=>{n.headersSent?n.destroy():Ar(n,500,"internal_error","The emulator could not answer the request.")})})}Et();bf();le();async function wR(e){let t;try{t=await _R(e,"utf8")}catch{return}let r=ce(t);if(!r.ok){P(`${e} is not a valid App Manifest.`,r.issues.map(o=>`${$.cyan(o.path)} ${o.message}`));return}return r.manifest}async function kR(e){let t=Number(e.port);if(!Number.isInteger(t)||t<0||t>65535)throw new Error("--port must be an integer between 0 and 65535");let r=e.scenario??"default";if(e.fixture)return{server:Zs(r,Ve),what:"fixture",fixtureReason:"requested",game:"conformance-game"};let o=await wR(e.manifest??"gamestage.yaml");if(!o)return{server:Zs(r,Ve),what:"fixture",fixtureReason:"no-manifest",game:"conformance-game"};let n=o.backend.round;if(!n){let a=o.interaction_cloud.elements.length?"studio-round":"unconfigured";return{server:Zs(r,Ve),what:"fixture",fixtureReason:a,game:o.app.id,title:o.app.title}}let i=o.backend.archetype;return i&&i!==n.archetype&&P(`The manifest declares the ${i} archetype and a ${n.archetype} round.`,["One of the two is wrong. The round decides what the Engine marks."]),vn.includes(n.archetype)||P(`No Engine here serves the ${n.archetype} archetype yet.`,[`Built so far: ${vn.join(", ")}. \`gamestage dev --fixture\` serves`,"the contract fixture if you are working against the wire rather than the rules."]),{server:await zs({game:o.app.id,round:n,title:o.app.title,identityRequired:!!e.as,clientBundle:Ve}),what:"engine",game:o.app.id,round:n,title:o.app.title,containerLabel:o.experience.container_label,as:e.as}}async function RS(e){let t=await kR(e),{server:r}=t,o=()=>new Promise((d,u)=>{r.close(p=>p?u(p):d())}),n=new Promise(d=>{let u=async()=>{process.off("SIGINT",u),process.off("SIGTERM",u),await o(),d()};process.once("SIGINT",u),process.once("SIGTERM",u)});await new Promise((d,u)=>{r.once("error",u),r.listen(Number(e.port),"127.0.0.1",()=>d())});let i=r.address();if(!i||typeof i=="string")throw new Error("The local server did not report its listening address");let a=`http://127.0.0.1:${i.port}`,s,c;if(t.as&&(s=await yf(a),r.attachDevIdentity?.(s),c=await s.mint(t.as)),M())U({ok:!0,status:"listening",serving:t.what,baseUrl:a,game:t.game,round:t.round?{number:t.round.number,id:`round-${t.round.number}`}:null,round_source:t.round?"manifest":"stand-in",...t.fixtureReason?{fixture_reason:t.fixtureReason}:{},...s&&c?{identity:{as:t.as,player_id:`id:${t.as}`,issuer:s.issuer,jwks_uri:s.jwksUri,token:c,required:!0}}:{}});else if(t.what==="engine"){R(t.title??t.game);let d=Qt(t.containerLabel);O("Serving",`your ${Qt(t.containerLabel,{lower:!0})}, through the real Engine`),O(d,`${t.round.number} (round-${t.round.number})`),O("API",a),O("Game id",t.game),y(),k(`<script src="${a}/gamestage.js"></script>`),k(`window.GAMESTAGE_API = "${a}"`),k(`window.GAMESTAGE_GAME = "${t.game}"`),c&&k(`window.GAMESTAGE_TOKEN = "${c}"`),y(),s&&c&&(O("Playing as",`${t.as} (${$.cyan(`id:${t.as}`)})`),O("Identity","required, so an anonymous play is refused here too"),O("Keys",s.jwksUri),y(),k("A real RS256 token, validated by the code that validates a customer's. The keypair lives for this run only."),k(`This harness cannot be deployed: its issuer is a loopback URL, and ${$.cyan("gamestage manifest validate")} refuses a manifest that names one.`),y()),k(`Edit the ${Qt(t.containerLabel,{lower:!0})} in your manifest and restart to see it change.`),y()}else R(t.fixtureReason==="studio-round"?"Studio round, unavailable locally":t.fixtureReason==="unconfigured"?"No round configured yet":"Serving the contract fixture"),O("API",a),O("Game id",t.game),y(),k(`<script src="${a}/gamestage.js"></script>`),y(),t.fixtureReason==="studio-round"?(k("A round is configured in Studio, but `gamestage dev` cannot reach it."),k("Play the deployed game to use the Studio round. This fixture is only local wiring.")):t.fixtureReason==="unconfigured"?(k("No round is configured in Studio yet. This local run is a Gamestage stand-in, not your game."),k("Set up the first round in Studio, then play the deployed game.")):(k("There is no round here to serve, so this is the shell rather than your game."),k("`dev` reads a round from the manifest and is the one place that may: it is a local harness and deploys nothing. A game's real content lives in Studio, where a producer can change it without you.")),y();await n}Of();ie();le();import{stat as xR}from"node:fs/promises";async function DS(){let e=[],[t]=process.versions.node.split(".").map(Number);e.push({id:"node",label:"Node.js",ok:t>=20,detail:t>=20?`v${process.versions.node}`:`v${process.versions.node} - Gamestage needs Node 20 or newer`,blocking:!0}),e.push({id:"schema",label:"Manifest schema",ok:!0,detail:`v${wo} bundled`,blocking:!1});let r=!1;try{await xR("gamestage.yaml"),r=!0}catch{}e.push({id:"manifest",label:"App Manifest",ok:r,detail:r?"gamestage.yaml found":"none here yet \u2014 `gamestage inspect .` or `gamestage create` makes one",blocking:!1}),e.push({id:"auth",label:"Signed in",ok:!1,detail:"not signed in \u2014 only needed to deploy",blocking:!1});let o=e.filter(n=>!n.ok&&n.blocking);M()&&(U({ok:o.length===0,checks:e}),process.exit(o.length===0?0:1)),R("Environment");for(let n of e){let i=n.ok?$.green("ok"):n.blocking?$.red("blocked"):$.dim("--");y(` ${i.padEnd(18)} ${n.label.padEnd(16)} ${$.dim(n.detail)}`)}y(),o.length&&(y(` ${$.red("Fix the blocked items above before continuing.")}`),y(),process.exit(1)),y(` ${$.green("Ready.")}`),y()}ie();import{readFile as MR,stat as zR,writeFile as UR}from"node:fs/promises";import{createHash as FR}from"node:crypto";import{basename as GR}from"node:path";Tf();import{readdir as SR,readFile as Ks,stat as zf}from"node:fs/promises";import{basename as $R,extname as ER,join as Uf,relative as TR}from"node:path";var AR=new Set(["node_modules",".git","dist","build",".next",".wrangler","coverage"]),IR=new Set([".html",".htm",".js",".mjs",".cjs",".jsx",".ts",".tsx",".vue",".svelte"]);async function CR(e,t=200){let r=await zf(e),o=[];if(r.isFile())return o.push({path:e,relative:$R(e),text:await Ks(e,"utf8")}),o;let n=async i=>{if(o.length>=t)return;let a=await SR(i,{withFileTypes:!0});for(let s of a){if(o.length>=t)return;if(s.name.startsWith(".")&&s.name!==".openai")continue;let c=Uf(i,s.name);if(s.isDirectory()){if(AR.has(s.name))continue;await n(c)}else if(IR.has(ER(s.name)))try{o.push({path:c,relative:TR(e,c),text:await Ks(c,"utf8")})}catch{}}};return await n(e),o}function PR(e,t){let r=e.text.split(`
8173
+ `);for(let o=0;o<r.length;o++)if(t.test(r[o]))return{file:e.relative,line:o+1,excerpt:r[o].trim().slice(0,120)};return null}async function OR(e,t){if(!(await zf(e)).isFile())try{let o=JSON.parse(await Ks(Uf(e,"package.json"),"utf8"));if(o.name)return o.name.replace(/^@[^/]+\//,"")}catch{}for(let o of t){if(!/\.html?$/.test(o.relative))continue;let n=/<h1[^>]*>([^<]+)<\/h1>/i.exec(o.text);if(n){let a=jS(n[1]);if(a)return a}let i=/<title[^>]*>([^<]+)<\/title>/i.exec(o.text);if(i){let a=jS(i[1].split(/\s+[|\u2013\u2014-]\s+/)[0]);if(a)return a}}return null}function jS(e){let t=e.replace(/\s+/g," ").trim();return/[a-z0-9]/i.test(t)?t.slice(0,60):null}var NR=[{id:"client-scoring",title:"Scoring runs in the browser",detail:"Score is computed client-side, so a player can edit it. Scoring must move into the Game Engine and the client must render a server-returned result.",patterns:[/\b\w*(score|points|total)\s*\+=/i,/\b\w*(score|points|total)\w*\s*=\s*\w*\s*[+*]/i,/function\s+\w*(calculate|compute|get)\w*(score|points|total|tier)/i],remedy:{delete:"the score arithmetic in the browser, and the answer set it marks against",call:"const result = await client.play(round.id, { picks, roundVersion: round.version }, newIdempotencyKey())",render:"result.round_state?.score, and result.feedback[].verdict per pick. `round_state` is absent where a game marks at settlement, so read it optionally",move:"the answer set into `backend.round.targets` in gamestage.yaml, where a deploy provisions it into the Engine",keep:"every bit of the rendering, the animation and the copy",because:"a score the browser computes is a score a player can set"},remedies:{push:{delete:"the running total, the bust comparison and the tier table, and the dataset the values came from",call:"const result = await client.play(round.id, { picks: [key], roundVersion: round.version }, newIdempotencyKey())",render:"result.round_state?.progress.total for the running total, .bust for whether they went over, and .tier for the rank. The value each pick contributed comes back in result.feedback[0].label",move:"what each pick is worth into `backend.round.slates[].entries[].value` in gamestage.yaml, and the ceiling into `backend.round.target`",keep:"every bit of the rendering, the animation and the copy",because:"a game whose whole mechanic is arithmetic is finished the moment its numbers reach the browser, whatever the page does afterwards"}}},{id:"client-outcome",title:"The result is decided in the browser",detail:"Win, loss or result tier is determined client-side, so the outcome cannot be trusted. The Engine must decide the outcome and return it as a committed decision.",patterns:[/\b(bust|win|won|lost|passed|failed)\s*=\s*\w+\s*[<>=]/i,/\bgetTier\s*\(|\bdetermine(Result|Outcome|Winner)/i],remedy:{delete:"the local decision about winning, losing or a result tier",call:"const result = await client.play(round.id, input, newIdempotencyKey())",render:"result.round_state?.outcome, which is won, lost, incomplete or pending",keep:"how the outcome is presented, including the celebration",because:"an outcome the page decides is one it can be persuaded to decide differently"},remedies:{push:{delete:"the bust comparison and the function that turns a distance into a rank",call:"const result = await client.play(round.id, { picks: [key], roundVersion: round.version }, newIdempotencyKey())",render:"result.round_state?.progress.bust and .tier, which are decided on commit: the total only grows, so passing the target ends the round then rather than at the last pick",move:"the rank ladder into `backend.round.tiers`, as fractions of the target",keep:"how the result is presented, including the celebration",because:"a rank the page awards is one it can award itself"}}},{id:"client-answers",title:"Answers or targets are present in client code",detail:"The solution set ships to the browser, so it can be read before play. Answers must be held server-side and never cross the wire.",patterns:[/\b(answer|solution|correct)(Key|Set|s)?\s*[:=]/i,/\bisCorrect\s*[:=(]/i,/\b\w*(target|answer|solution)\w*\s*=\s*[[{](?!.*(fetch|await|response))/i,/\b(target|answer|solution)s?\s*:\s*[^,}\n]/i],remedy:{delete:"the array or object holding the correct answers",call:"const round = await client.getCurrentRound()",render:"round.challenge for what the player picks from. The Engine returns the verdict; the page never knows the answer until the round reveals it",move:"the answers into `backend.round.targets` in gamestage.yaml. Deleting them without moving them leaves the Engine nothing to mark against",keep:"the board, the layout and the interaction",because:"a solution in the bundle can be read before anybody plays"},remedies:{push:{delete:"the dataset the contributions are looked up in",call:"const round = await client.getCurrentRound()",render:"round.challenge.slates, which carry each pick's key and label and no value at all. What a pick was worth arrives as feedback once it has been committed",move:"the values into `backend.round.slates[].entries[].value` in gamestage.yaml. Deleting them without moving them leaves the Engine nothing to count",keep:"the board, the layout and the interaction",because:"knowing every contribution is knowing which picks land on the target, which is the whole game"}}},{id:"client-play-limit",title:"Play limiting relies on browser storage",detail:"Attempt limits enforced through localStorage or cookies reset when storage is cleared. Limits must be enforced against an identified player server-side.",patterns:[/localStorage\.(set|get)Item\s*\(\s*['"`][^'"`]*(play|attempt|tries|daily|limit)/i,/sessionStorage\.(set|get)Item/i],remedy:{delete:"the localStorage or cookie bookkeeping that counts attempts",call:"const state = await client.getRoundState(round.id)",render:"state.attempts_used against state.attempts_allowed, and the same pair for mistakes",move:"the limits into `backend.round.attemptsAllowed` and `mistakesAllowed`",keep:"how the remaining attempts are shown",because:"a limit in storage is a limit that clearing storage removes"},remedies:{push:{delete:"the localStorage bookkeeping that remembers today's game",call:"const state = await client.getRoundState(round.id)",render:"state.attempts_used against state.attempts_allowed for picks taken, and state.finished for whether today is done",move:"the number of picks into `backend.round.slates`: one slate is one pick",keep:"how the remaining picks are shown",because:"a game that remembers in the browser is one a cleared browser lets you play again"}}},{id:"client-randomness",title:"The daily challenge is chosen in the browser",detail:"Client-side randomness means players can reroll until they like the challenge, and no two players share a verifiable daily. Selection must be server-issued.",patterns:[/Math\.random\s*\(\)/,/\b(daily|today|challenge)\w*\s*=\s*.*Math\.random/i],remedy:{delete:"the Math.random() that chooses the challenge",call:"const round = await client.getCurrentRound()",render:"round.challenge, which is the same for everyone playing that round",keep:"randomness that is only decoration, such as confetti or shuffling how options are laid out",because:"a challenge the browser picks is one a player can reroll, and no two players share a daily worth comparing"},remedies:{push:{delete:"the Math.random() that chooses which team and season comes up",call:"const round = await client.getCurrentRound()",render:"round.challenge.slates in order: slate n is pick n. Keep the spin as an animation over a choice the round has already made",move:"the sequence into `backend.round.slates`, one per pick",keep:"the spin, the reveal and every bit of its timing",because:"a slate the browser draws is one a player can redraw, and it means no two players played the same day"}}},{id:"client-time",title:"Round timing uses client time",detail:"Device clocks can be changed. Open, lock and settle decisions must use authoritative server time.",patterns:[/new Date\(\)\.getTime\(\)/,/Date\.now\(\)\s*[<>]/],remedy:{delete:"the comparisons against Date.now() that decide whether the round is open",call:"const round = await client.getCurrentRound()",render:"round.can.accepting_plays, and round.server_time where a countdown needs an origin",keep:"the countdown itself, driven from the server's time rather than the device's",because:"a device clock is something a player can change"}}],RR=[{id:"sdk",title:"Monterosa JavaScript SDK 2",detail:"No SDK integration found. The SDK provides the EnMasse connection, live config and content updates, identity, consent, storage and experience hosting.",present:/@monterosa\/sdk-|sdk\.monterosa\.cloud/i},{id:"identity",title:"Player sign-in",detail:"No player identity found. Anonymous play is supported and the Engine's signed session carries it. To identify players, name your own issuer and its JWKS in `identity.jwt` and the Engine validates the token your login system already gives them.",present:/identify-kit|monterosa.*identity|\bIdentify\b|jwks|oidc|auth0|workos|firebase.*auth/i},{id:"consent",title:"Consent gating",detail:"No consent handling found. Analytics and storage must respect the player's consent choices.",present:/consent-kit|consent/i},{id:"analytics",title:"Analytics",detail:"No analytics found. Gamestage routes events to the destinations declared in the manifest, with Monterosa Analytics on by default.",present:/analytics-kit|gtag\(|posthog|analytics\.track/i}],DR=[{archetype:"hunt",signals:[{pattern:/\b(answer|solution|correct)(s|Set|Key)?\s*[:=]/i,because:"marks picks against a known answer set"},{pattern:/\bisCorrect\b|\bverdict\b/i,because:"judges a pick right or wrong"},{pattern:/\bpick(s|ed)?\b/i,because:"players make picks"},{pattern:/\broster|\bplayer(s)?\s*\[/i,because:"selects from a roster"}]},{archetype:"push",signals:[{pattern:/\b\w*(total|sum|running)\w*\s*\+=/i,because:"accumulates a running total from each pick"},{pattern:/\bbust\b/i,because:"has a bust condition for going over"},{pattern:/\b\w*total\w*\s*[><]=?\s*\w*target|\btarget\w*\s*-\s*\w*total/i,because:"compares the total against a target"},{pattern:/\bgetTier\b|\bwithout going over\b|\bclosest\b/i,because:"scores by how close the total came"}]},{archetype:"trivia",signals:[{pattern:/\bquestion\b/i,because:"presents questions"},{pattern:/\bchoice(s)?\b|\boption(s)?\b/i,because:"offers answer choices"},{pattern:/\bquiz\b/i,because:"describes itself as a quiz"}]},{archetype:"predict",signals:[{pattern:/\bpredict/i,because:"asks players to predict"},{pattern:/\bmarket\b|\bodds\b/i,because:"has market or odds language"},{pattern:/\bsettle(d|ment)?\b/i,because:"settles outcomes"}]},{archetype:"group",signals:[{pattern:/\bpuzzle\b/i,because:"describes itself as a puzzle"},{pattern:/\bguess(es)?\b/i,because:"players guess"},{pattern:/\bstreak\b/i,because:"tracks streaks"}]},{archetype:"timed_round",signals:[{pattern:/\bcountdown\b|\btimer\b/i,because:"runs a countdown"},{pattern:/\bround\b/i,because:"is organised into rounds"}]}];function jR(e){let t=e.map(s=>s.text).join(`
8174
+ `),r=DR.map(s=>{let c=s.signals.filter(d=>d.pattern.test(t)).map(d=>d.because);return{archetype:s.archetype,hits:c.length,because:c}}).filter(s=>s.hits>0).sort((s,c)=>c.hits-s.hits),o=r[0];if(!o)return null;let n=r[1]?.hits??0,i=o.hits-n,a=o.hits>=3&&i>=2?"high":o.hits>=2?"medium":"low";return{archetype:o.archetype,confidence:a,because:o.because}}async function LR(e,t){let o=(await zf(e)).isFile()?null:e;if(o)try{let i=await Ks(Uf(o,"package.json"),"utf8"),a=JSON.parse(i),s={...a.dependencies,...a.devDependencies},c=s.next?"Next.js":s.react?"React":s.vue?"Vue":s.svelte?"Svelte":void 0,d=s.vite?"Vite":s.webpack?"webpack":void 0;return{kind:"node_project",framework:c,build:d}}catch{}return t.length===1&&/\.html?$/.test(t[0].relative)||t.every(i=>/\.html?$/.test(i.relative))?{kind:"standalone_html"}:{kind:"unknown"}}async function LS(e){let t=await CR(e);if(t.length===0)throw new Error(`No inspectable source found at ${e}. Point inspect at a game file or a project directory.`);let r=await LR(e,t),o=jR(t),n=[];for(let p of NR){let m=[];for(let h of t){for(let f of p.patterns){let _=PR(h,f);if(_){m.push(_);break}}if(m.length>=3)break}if(m.length>0){let h=o?p.remedies?.[o.archetype]??p.remedy:p.remedy;n.push({...h?{remedy:h}:{},id:p.id,title:p.title,detail:p.detail,evidence:m})}}let i=t.map(p=>p.text).join(`
8175
+ `),a=RR.filter(p=>!p.present.test(i)).map(p=>({id:p.id,title:p.title,detail:p.detail,evidence:[]})),s=[];t.some(p=>/<(div|section|main|canvas)/i.test(p.text))&&s.push({id:"presentation",title:"Player-facing presentation",detail:"Layout, styling and interaction feel can stay creator-owned. Gamestage replaces the authority beneath the interface, not the interface itself.",evidence:t.slice(0,2).map(p=>({file:p.relative}))});let d=Fs(t),u=[];return r.kind==="standalone_html"&&u.push("Where is this deployed today, and who owns that hosting?"),u.push("Which of the embedded datasets are licensed for production use, and at what refresh cadence?"),n.some(p=>p.id==="client-play-limit")&&u.push("Is the play limit per device or per person? That decides whether identity is required at launch."),{target:e,scanned_files:t.length,stack:r,keep:s,move_behind_authority:n,missing_integrations:a,copy_to_studio:d,unknowns:u,archetype:o,name:await OR(e,t)}}le();var BR=e=>GR(e).replace(/\.[^.]+$/,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"inspected-game",WR=e=>e.split("-").filter(Boolean).map(t=>t[0].toUpperCase()+t.slice(1)).join(" ");function ZR(e,t){let r=BR(e.name??e.target),o=t&&fk(t)?t:ns(r),n=e.name??WR(r),i=Za(o,n);return i.manifest.conformance="L0",i.app.status="proposed",i.app.provenance=[{kind:"repository_evidence",file:e.target},{kind:"generated_proposal",tool:"gamestage inspect",source_context:`${e.scanned_files} file(s) inspected`}],i.experience.status="proposed",i.experience.surfaces=["web-embed"],i.experience.provenance=[{kind:"repository_evidence",file:e.target}],e.archetype&&(i.backend.status="proposed",i.backend.route="managed_runtime",i.backend.archetype=e.archetype.archetype,i.backend.provenance=[{kind:"generated_proposal",tool:"gamestage inspect",source_context:e.archetype.because.join("; ")}]),e.move_behind_authority.some(s=>s.id==="client-play-limit"||s.id==="client-scoring")&&(i.identity.status="proposed",i.identity.provider="identify",i.identity.require_authenticated_writes=!0),Ut.parse(i)}async function KR(e,t){let r=await Le();if(!r)return!1;yr();let o=e.backend.archetype;return o?(await hr({baseUrl:ye,token:r.accessToken}).registerGame({id:e.app.id,name:e.app.title,archetype:o,repository:e.app.source?.repository??null,manifestRevision:String(e.manifest.revision),contentHash:`sha256:${FR("sha256").update(t).digest("hex")}`,conformance:je(e).computed,offersPrize:e.operations.promotion.offers_prize,containerLabel:e.experience.container_label,sections:cr.map(i=>({section:i,status:e[i].status}))}),!0):!1}async function VR(e){try{let t=ce(await MR(e,"utf8"));return t.ok?t.manifest.app.id:void 0}catch{return}}async function HR(e){try{return await zR(e),!0}catch{return!1}}async function MS(e,t){let r;try{r=await LS(e)}catch(d){return P(d instanceof Error?d.message:"Inspection failed")}let o=ZR(r,await VR(typeof t.write=="string"?t.write:"gamestage.yaml")),n=je(o),i=To(o),a=!1,s;try{a=await KR(o,i)}catch(d){s=d instanceof Error?d.message:"The control plane did not answer."}let c=null;if(t.write){if(c=typeof t.write=="string"?t.write:"gamestage.yaml",!t.force&&await HR(c))return P(`${c} already exists, and inspect would replace it.`,["A manifest that has been worked on holds a round; this report cannot,","because a round is not visible in the code it read.","",`${$.cyan(`gamestage manifest validate ${c}`)} check what you have`,`${$.cyan("gamestage inspect . --force")} replace it anyway`]);await UR(c,i,"utf8")}if(M()){U({ok:!0,report:r,manifest:o,conformance:{computed:n.computed,blockers:n.blockers},manifest_yaml:i,written_to:c,registered:a,...s?{registration_failed:s}:{}});return}if(R(`Inspection report ${$.dim(r.target)}`),O("Files inspected",String(r.scanned_files)),O("Stack",r.stack.framework?`${r.stack.kind} (${r.stack.framework})`:r.stack.kind),r.archetype&&O("Archetype",`${r.archetype.archetype} ${$.dim(`(${r.archetype.confidence} confidence)`)}`),r.keep.length){R("Keep as yours");for(let d of r.keep)k($.green(d.title)),y(` ${$.dim(d.detail)}`)}if(r.move_behind_authority.length){R("Must move behind an authoritative boundary");for(let d of r.move_behind_authority){k($.yellow(d.title)),y(` ${$.dim(d.detail)}`);for(let u of d.evidence.slice(0,2)){let p=u.line?`${u.file}:${u.line}`:u.file;y(` ${$.dim("\u2192")} ${$.cyan(p)}${u.excerpt?$.dim(" "+u.excerpt):""}`)}d.remedy&&(y(` ${$.dim("delete")} ${d.remedy.delete}`),y(` ${$.dim("call")} ${$.cyan(d.remedy.call)}`),d.remedy.render&&y(` ${$.dim("render")} ${d.remedy.render}`),d.remedy.move&&y(` ${$.dim("move")} ${d.remedy.move}`),y(` ${$.dim("keep")} ${d.remedy.keep}`))}}if(r.missing_integrations.length){R("Platform integrations not present yet");for(let d of r.missing_integrations)k(d.title),y(` ${$.dim(d.detail)}`)}if(r.unknowns.length){R("Needs a human answer");for(let d of r.unknowns)k(d,"?")}if(R("App Manifest"),O("Conformance",`${n.computed} ${n.computedName}`),n.blockers.length){y(),y($.dim(" To reach the next level:"));for(let d of n.blockers)y(` ${$.dim("\xB7")} ${d.requirement}`)}y(),c?y(` Written to ${$.cyan(c)}`):y($.dim(" Re-run with --write to save this manifest.")),y(a?" Registered in Studio as a draft.":s?` Not registered in Studio: ${s} (${ye})`:" No account found, so registration was skipped."),y()}var zS="https://github.com",JR="https://api.github.com",Vs=process.env.GAMESTAGE_GITHUB_CLIENT_ID??"Ov23livKf8DOgOm2a383";async function US(){let e=await fetch(`${zS}/login/device/code`,{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify({client_id:Vs,scope:""})});if(!e.ok)throw new Error(`GitHub refused the device request (${e.status}).`);return await e.json()}async function FS(e){let r=await(await fetch(`${zS}/login/oauth/access_token`,{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify({client_id:Vs,device_code:e,grant_type:"urn:ietf:params:oauth:grant-type:device_code"})})).json();if(r.access_token)return{status:"linked",login:await YR(r.access_token)};switch(r.error){case"authorization_pending":return{status:"pending"};case"slow_down":return{status:"slow_down",interval:r.interval??10};case"expired_token":return{status:"expired"};case"access_denied":return{status:"denied"};default:throw new Error(`GitHub returned an unexpected error (${r.error}).`)}}async function YR(e){let t=await fetch(`${JR}/user`,{headers:{accept:"application/vnd.github+json",authorization:`Bearer ${e}`,"user-agent":"gamestage-cli"}});if(!t.ok)throw new Error(`GitHub would not identify the account (${t.status}).`);let r=await t.json();if(!r.login)throw new Error("GitHub returned an account with no login.");return r.login}le();var qR=e=>new Promise(t=>setTimeout(t,e));async function GS(){let{client:e}=await de();try{let t=await US();M()?U({ok:!0,status:"awaiting_authorisation",userCode:t.user_code,verificationUri:t.verification_uri,clientId:Vs}):(R("Link GitHub"),O("Code",t.user_code),O("Open",t.verification_uri),y(),k("Enter the code on that page. This waits until you do."),y());let r=Date.now()+t.expires_in*1e3,o=Math.max(t.interval,5);for(;Date.now()<r;){await qR(o*1e3);let n=await FS(t.device_code);if(n.status==="pending")continue;if(n.status==="slow_down"){o=n.interval;continue}if(n.status==="denied")return P("You declined the request on GitHub.");if(n.status==="expired")return P("The code expired. Run `gamestage link github` again.");let{workspace:i}=await e.linkGitHub(n.login);if(M())return U({ok:!0,status:"linked",github:i.github});R("Linked"),O("Account",n.login),y(),k("Your first deploy is no longer gated. Run `gamestage deploy`."),y();return}P("The code expired before it was entered.")}catch(t){$e(t)}}le();var XR=e=>new Promise(t=>setTimeout(t,e));function QR(e){process.stderr.write(JSON.stringify({ok:!0,status:"awaiting_approval",user_code:e.user_code,verification_uri:e.verification_uri,verification_uri_complete:e.verification_uri_complete,expires_in:e.expires_in},null,2)+`
8176
+ `)}async function BS(e,t){let{client:r}=await de(),o=Ao(await rs(r));if(M()){U({ok:o.ok,status:o.status,access:o.access,...o.code?{code:o.code}:{},message:o.message,next:o.next,email:e.email,...t?{stored_in:t}:{},control_plane:ye}),o.ok||process.exit(1);return}y(),R("Signed in"),O("Account",e.email??e.userId??"unknown"),t&&O("Token stored in",t==="keychain"?"your macOS keychain":"~/.gamestage (owner only)"),y(),k("Never written into the project, and never passed to your agent."),k("`gamestage logout` removes it."),vr(o),o.ok||process.exit(1)}async function WS(){let e=await Le();if(e){await BS(e);return}let t;try{t=await dk()}catch(a){P("Could not reach the sign-in service.",[String(a)])}M()?QR(t):(R("Sign in to Gamestage"),y(" This also creates your account if you do not have one. Google or email."),y(" A new account is approved by a person, so this may end in a wait."),y(),O("Open",t.verification_uri_complete),O("Or enter",`${t.user_code} at ${t.verification_uri}`),y(),y(" Waiting for you to confirm in the browser..."),pk(t.verification_uri_complete));let r=Date.now()+t.expires_in*1e3,o=t.interval*1e3,n=null;for(;Date.now()<r;){await XR(o);let a=await uk(t.device_code);if(a.status==="ok"){n=a.session;break}if(a.status==="slow_down"){o+=5e3;continue}a.status!=="pending"&&(a.status==="expired"&&P("That code expired.",["Run `gamestage login` again."]),P("Sign-in was refused.",[a.reason]))}n||P("Timed out waiting for approval.",["Run `gamestage login` again."]);let i=await sh(n);await BS(n,i)}async function ZS(){let e=await Le();if(await hk(),M()){U({ok:!0,status:e?"signed_out":"not_signed_in"});return}R(e?"Signed out":"Not signed in"),e&&O("Removed",e.email??"session"),y()}async function KS(){let e=await Le();if(M()){U(e?{ok:!0,signed_in:!0,email:e.email,user_id:e.userId}:{ok:!0,signed_in:!1});return}if(!e){R("Not signed in"),y(),k("Inspecting, scaffolding and local rounds need no account."),k("Run `gamestage login` when you want to deploy a playground."),y();return}R("Signed in"),O("Account",e.email??"unknown"),e.userId&&O("User",e.userId),y(),k("`gamestage status` says whether this account is approved."),y()}ie();le();import{readdir as eD,readFile as tD,stat as nD}from"node:fs/promises";async function rD(e){let t=[];try{t=await eD(e)}catch{}let r=t.filter(a=>!a.startsWith(".")),o=[];for(let a of r)/\.html?$/.test(a)&&o.push(a);let n=!1,i;for(let a of["gamestage.yaml","gamestage.yml"])try{await nD(`${e}/${a}`),n=!0;try{let s=ce(await tD(`${e}/${a}`,"utf8"));s.ok&&(i=!!s.manifest.backend.round)}catch{}break}catch{}return{has_manifest:n,has_package_json:r.includes("package.json"),html_files:o,is_empty:r.length===0,has_round:i}}async function VS(){let e=process.cwd(),t=await rD(e),r=t.has_manifest?t.has_round===!1?"round":t.has_round===!0?"play":"continue":t.has_package_json||t.html_files.length>0?"inspect":"create",o={continue:{command:Fe("manifest validate gamestage.yaml"),why:"This project already has an App Manifest. Check where it stands."},round:{command:"edit gamestage.yaml, add backend.round",why:`The manifest names an archetype but no round, so there is no game for the Engine to serve yet. The round is the content the server owns: the board a player sees and the answers they never do. Until it is there, \`${Fe("dev")}\` serves the contract fixture rather than your game, and \`${Fe("verify")}\` has nothing to verify.`},play:{command:Fe("dev"),why:"The manifest declares a round. Serve it locally, through the real Engine."},inspect:{command:Fe("inspect ."),why:"There is a game here already. Read it read-only and produce an inspection report."},create:{command:Fe("create"),why:"Nothing to inspect. Start a new game from a concept."}};if(M()){U({ok:!0,cwd:e,version:Xe,detected:t,route:r,next:o[r],docs:{start:"https://gamestage.ai/start.md",schema:"https://gamestage.ai/schemas/app-manifest/1.0"},invocation:Xs(),authentication:`Not required for inspect, create, validate or local development. First needed at \`${Fe("deploy")}\`.`});return}if(R(`Gamestage ${Xe}`),y($.dim(" Take an agent-built game to production, on the platform behind the")),y($.dim(" world's biggest fan experiences.")),R("Where you are"),t.has_manifest&&t.has_round===!1)y(" An App Manifest is present, and it declares no round.");else if(t.has_manifest&&t.has_round===!0)y(" An App Manifest is present, with a round the Engine can serve.");else if(t.has_manifest)y(" An App Manifest is already present.");else if(t.has_package_json||t.html_files.length){let n=[t.has_package_json?"a Node project":null,t.html_files.length?`${t.html_files.length} HTML file(s)`:null].filter(Boolean);y(` Found ${n.join(" and ")}. This looks like a game to inspect.`)}else y(" Nothing here yet. This looks like a fresh start.");R("Do this next"),y(` ${$.cyan(o[r].command)}`),y(` ${$.dim(o[r].why)}`),R("Good to know"),y($.dim(` Nothing needs an account yet. Inspect, create, validate and local
7891
8177
  development all run anonymously. Sign-in arrives when you deploy,
7892
- which is what puts the game at a URL a fan can open.`)),v()}var xr=class extends Error{};function vS(e){let t=e.what.trim();if(!t)throw new xr("Say what you were trying to build.");if(t.length>2e3)throw new xr(`That is ${t.length} characters and the limit is 2000. Send the shape of the problem; we will ask for the rest.`);let r=(e.closest??"").trim();return{kind:"suggestion",what:t,closest:r||"none",cli_version:e.cliVersion}}function bS(e){return JSON.stringify(e,null,2)}ne();var QN=process.env.GAMESTAGE_SUGGEST_URL??"https://gamestage.ai/api/suggest";async function _S(e,t,r){let o;try{o=vS({what:e,closest:t.closest,cliVersion:r})}catch(a){throw a instanceof xr&&C(a.message),a}if(!t.send){if(j()){L({sent:!1,would_send:o});return}O("This is everything that would be sent"),v(),v(bS(o)),v(),E("No manifest, no round, no answers and no source. There is nowhere in that shape to put one."),E(`Send it with ${je('suggest "..." --send')}.`);return}let n;try{n=await fetch(QN,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(o)})}catch(a){C("Could not reach Gamestage to send that.",[a instanceof Error?a.message:String(a)])}let i=await n.json().catch(()=>({}));if(n.ok||C(`Gamestage refused that suggestion (${n.status}).`,[i.error?.message??"It said nothing more."]),j()){L({sent:!0,reference:i.reference??null});return}O("Sent"),i.reference&&E(`Reference ${i.reference}. Quote it if you follow up.`),E("Somebody at Monterosa reads these. A format that keeps arriving gets built.")}var Sr=class extends Error{};function wS(e){let t=e.what.trim();if(!t)throw new Sr("Say what went wrong.");if(t.length>2e3)throw new Sr(`That is ${t.length} characters and the limit is 2000. Send what broke and how to hit it; we will ask for the rest.`);let r=(e.game??"").trim();return{kind:"issue",what:t,game:r||"none",cli_version:e.cliVersion,node_version:e.nodeVersion,platform:e.platform}}function kS(e){return JSON.stringify(e,null,2)}ne();var eR=process.env.GAMESTAGE_ISSUE_URL??"https://gamestage.ai/api/issue";async function xS(e,t,r){let o;try{o=wS({what:e,game:t.game,cliVersion:r,nodeVersion:process.version,platform:process.platform})}catch(a){throw a instanceof Sr&&C(a.message),a}if(!t.send){if(j()){L({sent:!1,would_send:o});return}O("This is everything that would be sent"),v(),v(kS(o)),v(),E("No manifest, no round, no answers and no source. There is nowhere in that shape to put one."),E(`Send it with ${je('issue "..." --send')}.`);return}let n;try{n=await fetch(eR,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(o)})}catch(a){C("Could not reach Gamestage to send that.",[a instanceof Error?a.message:String(a)])}let i=await n.json().catch(()=>({}));if(n.ok||C(`Gamestage refused that report (${n.status}).`,[i.error?.message??"It said nothing more."]),j()){L({sent:!0,reference:i.reference??null});return}O("Reported"),i.reference&&E(`Reference ${i.reference}. Quote it if you follow up.`),E("It is in the backlog now. Somebody at Monterosa reads these.")}oe();import{readFile as tR}from"node:fs/promises";import{resolve as nR}from"node:path";ne();async function SS(e){let t=nR(e),r;try{r=await tR(t,"utf8")}catch{C(`No such file: ${e}`,["Give the path to a JSON file holding the reference data."])}let o;try{o=JSON.parse(r)}catch(i){C(`${e} is not JSON.`,[i instanceof Error?i.message:"Could not parse it."])}let n=Rt.safeParse(o);if(!n.success){let i=n.error.issues[0];C(`${e} is not valid reference data.`,[i?`${i.path.join(".")||"document"}: ${i.message}`:"No detail.",'It needs `{ "corpus": "1", "measures": [{ "key", "label", "values" }] }`.'])}return{body:r,measures:n.data.measures.map(i=>i.key)}}function rR(e){let t=Rt.parse(JSON.parse(e));return Object.fromEntries(t.measures.map(r=>[r.key,Object.keys(r.values).length]))}var oR={copy:"immutable copy",pointer:"reference data"};async function iR(e,t,r){let o=await fetch(e.uploadUrl,{method:"PUT",body:new Uint8Array(Buffer.from(t,"utf8")),headers:{"content-type":"application/json"}});o.ok||C(`The ${r} upload was refused with ${o.status}.`,["A signed URL lasts fifteen minutes. Run the push again for a fresh one."])}async function $S(e,t){let{client:r}=await ce(),{body:o}=await SS(t),n=Za(o),i=await r.referenceUploadTarget(e,n),a=await Aw(o,async(l,p)=>{await iR(l==="copy"?i.copy:i.pointer,p,oR[l])});a.ok||C(`${t} is not valid reference data.`,[a.detail??"No detail."]);let{measures:s,counts:c}=a.summary;if(j())return L({ok:!0,name:e,digest:n,measures:s,counts:c,key:i.pointer.key});O("Pushed"),E(`${e} is now the reference data for this workspace`);for(let l of s)E(`${l}: ${c[l].toLocaleString("en-GB")} values`);E(`Digest ${n}, kept so a round can say what it was scored on`),v(),E("A round provisioned from now on uses this. One already in play keeps"),E("the numbers it opened with, which is deliberate.")}async function ES(e,t){let{body:r,measures:o}=await SS(e),n=rR(r),i=Rt.parse(JSON.parse(r)),a={};for(let s of i.measures){let c=t.filter(l=>typeof s.values[l]!="number");c.length&&(a[s.key]=c)}if(j())return L({ok:Object.keys(a).length===0,measures:o,counts:n,missing:a});O("Reference data");for(let s of o)E(`${s}: ${n[s].toLocaleString("en-GB")} values`);if(!t.length){v(),E("Pass the keys a round uses to check them: `reference check <file> <key>...`");return}if(v(),!Object.keys(a).length){E(`All ${t.length} key(s) are present in every measure.`);return}for(let[s,c]of Object.entries(a))E(`${s} has no value for ${c.map(l=>`"${l}"`).join(", ")}`);C("A round using those keys would be refused rather than scoring them as nothing.")}oe();import{readFile as aR}from"node:fs/promises";import{resolve as sR}from"node:path";import{createInterface as cR}from"node:readline/promises";ne();async function lR(e){let t;try{t=await aR(sR(e),"utf8")}catch{C(`Cannot read ${e}.`,["Point at the manifest holding the round, e.g. `--manifest gamestage.yaml`."])}let r=pe(t);r.ok||C(`${e} is not a valid App Manifest.`,r.issues.map(n=>`${n.path} ${n.message}`));let o=r.ok?r.manifest.backend.round:void 0;return o||C(`${e} has no round in it.`,["There is nothing to push. A round lives under `backend.round` while a game is","still being built locally; once it is in Studio it lives there instead."]),o.archetype==="predict"&&C("A prediction's question and options are authored in Studio itself.",["They are the platform's own question and options rather than fields of ours,","which is what lets a producer reveal the answer once the world decides. There","is nothing here to write, and nothing to write it with."]),o}function uR(e){if(O("What goes into Studio"),E(`What a fan is told: ${e.prompt||"(nothing)"}`),e.archetype==="push"){E(`Target: ${e.target.toLocaleString()} ${e.targetLabel}`.trim());for(let t of e.slates)E(`${t.label||t.id}: ${t.entries.map(r=>r.label||r.key).join(", ")}`);v(),v("No point values go with it. They stay in your reference data, where only"),v("the Engine reads them.")}else{if(E(`Board: ${e.board.join(", ")}`),e.archetype==="hunt")E(`The answer: ${e.targets.join(", ")}`);else for(let t of e.groups)E(`${t.label}: ${t.members.join(", ")}`);v(),v("The answer goes with it, into a field Studio withholds from a fan's browser."),v("Only a producer signed into Studio can read it.")}v()}async function dR(e,t){if(t)return!0;process.stdin.isTTY||C("Refusing to overwrite Studio without being asked.",[`Nothing has changed on ${e}.`,"Re-run with `--yes` if you mean to replace whatever a producer has typed."]);let r=cR({input:process.stdin,output:process.stdout});try{return(await r.question(`This replaces the round a producer may have edited on ${e}. Type yes to go ahead: `)).trim().toLowerCase()==="yes"}finally{r.close()}}async function TS(e,t){let r=t.manifest??"gamestage.yaml",o=await lR(r),n=o.archetype==="push"?uw(o):o;if(j()||uR(n),!await dR(e,!!t.yes)){v("Nothing was written.");return}try{let{client:i}=await ce(),a=await i.seedRound(e,n);a.refused&&C("The round was not written into Studio.",[a.refused]);let s=n.archetype==="push"?{count:n.slates.length,noun:"groups of picks"}:{count:n.board.length,noun:"picks on the board"};L({game:e,seeded:!0,archetype:n.archetype,parts:s.count}),j()||(O("Written"),E(`${s.count} ${s.noun} are now on ${e}'s round in Studio.`),E("A producer can change every word of it without another deploy."),E("Take the round out of your manifest when you are ready: `gamestage dev` is the only thing that still reads it."),v())}catch(i){Ie(i)}}oe();ne();import{readFile as pR}from"node:fs/promises";async function AS(e,t){let r;try{r=await pR(e,"utf8")}catch{return C(`Cannot read ${e}`)}let o=pe(r);if(!o.ok)return j()&&(L({ok:!1,stage:"parse",issues:o.issues}),process.exit(1)),C(`${e} is not a valid App Manifest`,o.issues.map(l=>`${S.cyan(l.path)} ${l.message}`));let n=o.manifest,i=Ge(n),a=null;if(t.level){let l=Ct.safeParse(t.level.toUpperCase());if(!l.success)return C(`Unknown level "${t.level}". Use L0 through L5.`);a=l.data}let s=a?Ub(n,a):null,c=!i.overclaimed&&(s?.ok??!0);if(j()&&(L({ok:c,manifest_id:n.app.id,conformance:{claimed:i.claimed,computed:i.computed,overclaimed:i.overclaimed},required_level:a,missing:s?.missing??[],blockers:i.blockers,rules:i.results}),process.exit(c?0:1)),O(`${n.app.title} ${S.dim(n.app.id)}`),I("Schema",n.manifest.schema_version),I("Revision",String(n.manifest.revision)),I("Conformance",i.overclaimed?`${S.red(i.claimed)} claimed, ${S.bold(i.computed)} evidenced`:`${S.green(i.computed)} ${i.computedName}`),i.overclaimed){O("Overclaimed"),v(S.dim(" The manifest claims a level its evidence does not support. Lower the claim or supply the evidence."));for(let l of i.blockers)E(S.red(l.requirement))}if(a&&s&&!s.ok){O(`Not yet ${a}`);for(let l of s.missing)E(`${S.yellow(l.id)} ${l.requirement}`)}if(c&&(v(),v(` ${S.green("Valid")}${a?` at ${a}`:""}.`),i.blockers.length)){v(),v(S.dim(" Next level needs:"));for(let l of i.blockers)v(` ${S.dim("\xB7")} ${l.requirement}`)}v(),process.exit(c?0:1)}ne();for(let e of[process.stdout,process.stderr])e.on("error",t=>{throw t.code==="EPIPE"&&process.exit(0),t});var Y=new yn;Y.name("gamestage").description(`Take an agent-built game prototype to a production fan game.
8178
+ which is what puts the game at a URL a fan can open.`)),y()}var Ir=class extends Error{};function HS(e){let t=e.what.trim();if(!t)throw new Ir("Say what you were trying to build.");if(t.length>2e3)throw new Ir(`That is ${t.length} characters and the limit is 2000. Send the shape of the problem; we will ask for the rest.`);let r=(e.closest??"").trim();return{kind:"suggestion",what:t,closest:r||"none",cli_version:e.cliVersion}}function JS(e){return JSON.stringify(e,null,2)}le();var oD=process.env.GAMESTAGE_SUGGEST_URL??"https://gamestage.ai/api/suggest";async function YS(e,t,r){let o;try{o=HS({what:e,closest:t.closest,cliVersion:r})}catch(a){throw a instanceof Ir&&P(a.message),a}if(!t.send){if(M()){U({sent:!1,would_send:o});return}R("This is everything that would be sent"),y(),y(JS(o)),y(),k("No manifest, no round, no answers and no source. There is nowhere in that shape to put one."),k(`Send it with ${Fe('suggest "..." --send')}.`);return}let n;try{n=await fetch(oD,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(o)})}catch(a){P("Could not reach Gamestage to send that.",[a instanceof Error?a.message:String(a)])}let i=await n.json().catch(()=>({}));if(n.ok||P(`Gamestage refused that suggestion (${n.status}).`,[i.error?.message??"It said nothing more."]),M()){U({sent:!0,reference:i.reference??null});return}R("Sent"),i.reference&&k(`Reference ${i.reference}. Quote it if you follow up.`),k("Somebody at Monterosa reads these. A format that keeps arriving gets built.")}var Cr=class extends Error{};function qS(e){let t=e.what.trim();if(!t)throw new Cr("Say what went wrong.");if(t.length>2e3)throw new Cr(`That is ${t.length} characters and the limit is 2000. Send what broke and how to hit it; we will ask for the rest.`);let r=(e.game??"").trim();return{kind:"issue",what:t,game:r||"none",cli_version:e.cliVersion,node_version:e.nodeVersion,platform:e.platform}}function XS(e){return JSON.stringify(e,null,2)}le();var iD=process.env.GAMESTAGE_ISSUE_URL??"https://gamestage.ai/api/issue";async function QS(e,t,r){let o;try{o=qS({what:e,game:t.game,cliVersion:r,nodeVersion:process.version,platform:process.platform})}catch(a){throw a instanceof Cr&&P(a.message),a}if(!t.send){if(M()){U({sent:!1,would_send:o});return}R("This is everything that would be sent"),y(),y(XS(o)),y(),k("No manifest, no round, no answers and no source. There is nowhere in that shape to put one."),k(`Send it with ${Fe('issue "..." --send')}.`);return}let n;try{n=await fetch(iD,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(o)})}catch(a){P("Could not reach Gamestage to send that.",[a instanceof Error?a.message:String(a)])}let i=await n.json().catch(()=>({}));if(n.ok||P(`Gamestage refused that report (${n.status}).`,[i.error?.message??"It said nothing more."]),M()){U({sent:!0,reference:i.reference??null});return}R("Reported"),i.reference&&k(`Reference ${i.reference}. Quote it if you follow up.`),k("It is in the backlog now. Somebody at Monterosa reads these.")}ie();import{readFile as aD}from"node:fs/promises";import{resolve as sD}from"node:path";le();async function e$(e){let t=sD(e),r;try{r=await aD(t,"utf8")}catch{P(`No such file: ${e}`,["Give the path to a JSON file holding the reference data."])}let o;try{o=JSON.parse(r)}catch(i){P(`${e} is not JSON.`,[i instanceof Error?i.message:"Could not parse it."])}let n=Bt.safeParse(o);if(!n.success){let i=n.error.issues[0];P(`${e} is not valid reference data.`,[i?`${i.path.join(".")||"document"}: ${i.message}`:"No detail.",'It needs `{ "corpus": "1", "measures": [{ "key", "label", "values" }] }`.'])}return{body:r,measures:n.data.measures.map(i=>i.key)}}function cD(e){let t=Bt.parse(JSON.parse(e));return Object.fromEntries(t.measures.map(r=>[r.key,Object.keys(r.values).length]))}var lD={copy:"immutable copy",pointer:"reference data"};async function dD(e,t,r){let o=await fetch(e.uploadUrl,{method:"PUT",body:new Uint8Array(Buffer.from(t,"utf8")),headers:{"content-type":"application/json"}});o.ok||P(`The ${r} upload was refused with ${o.status}.`,["A signed URL lasts fifteen minutes. Run the push again for a fresh one."])}async function t$(e,t){let{client:r}=await de(),{body:o}=await e$(t),n=Qa(o),i=await r.referenceUploadTarget(e,n),a=await Qw(o,async(d,u)=>{await dD(d==="copy"?i.copy:i.pointer,u,lD[d])});a.ok||P(`${t} is not valid reference data.`,[a.detail??"No detail."]);let{measures:s,counts:c}=a.summary;if(M())return U({ok:!0,name:e,digest:n,measures:s,counts:c,key:i.pointer.key});R("Pushed"),k(`${e} is now the reference data for this workspace`);for(let d of s)k(`${d}: ${c[d].toLocaleString("en-GB")} values`);k(`Digest ${n}, kept so a round can say what it was scored on`),y(),k("A round provisioned from now on uses this. One already in play keeps"),k("the numbers it opened with, which is deliberate.")}async function n$(e,t){let{body:r,measures:o}=await e$(e),n=cD(r),i=Bt.parse(JSON.parse(r)),a={};for(let s of i.measures){let c=t.filter(d=>typeof s.values[d]!="number");c.length&&(a[s.key]=c)}if(M())return U({ok:Object.keys(a).length===0,measures:o,counts:n,missing:a});R("Reference data");for(let s of o)k(`${s}: ${n[s].toLocaleString("en-GB")} values`);if(!t.length){y(),k("Pass the keys a round uses to check them: `reference check <file> <key>...`");return}if(y(),!Object.keys(a).length){k(`All ${t.length} key(s) are present in every measure.`);return}for(let[s,c]of Object.entries(a))k(`${s} has no value for ${c.map(d=>`"${d}"`).join(", ")}`);P("A round using those keys would be refused rather than scoring them as nothing.")}ie();import{readFile as uD}from"node:fs/promises";import{resolve as pD}from"node:path";import{createInterface as mD}from"node:readline/promises";le();async function hD(e){let t;try{t=await uD(pD(e),"utf8")}catch{P(`Cannot read ${e}.`,["Point at the manifest holding the round, e.g. `--manifest gamestage.yaml`."])}let r=ce(t);r.ok||P(`${e} is not a valid App Manifest.`,r.issues.map(n=>`${n.path} ${n.message}`));let o=r.ok?r.manifest.backend.round:void 0;return o||P(`${e} has no round in it.`,["There is nothing to push. A round lives under `backend.round` while a game is","still being built locally; once it is in Studio it lives there instead."]),o.archetype==="predict"&&P("A prediction's question and options are authored in Studio itself.",["They are the platform's own question and options rather than fields of ours,","which is what lets a producer reveal the answer once the world decides. There","is nothing here to write, and nothing to write it with."]),o}function fD(e){if(R("What goes into Studio"),k(`What a fan is told: ${e.prompt||"(nothing)"}`),e.archetype==="push"){k(`Target: ${e.target.toLocaleString()} ${e.targetLabel}`.trim());for(let t of e.slates)k(`${t.label||t.id}: ${t.entries.map(r=>r.label||r.key).join(", ")}`);y(),y("No point values go with it. They stay in your reference data, where only"),y("the Engine reads them.")}else{if(k(`Board: ${e.board.join(", ")}`),e.archetype==="hunt")k(`The answer: ${e.targets.join(", ")}`);else for(let t of e.groups)k(`${t.label}: ${t.members.join(", ")}`);y(),y("The answer goes with it, into a field Studio withholds from a fan's browser."),y("Only a producer signed into Studio can read it.")}y()}async function gD(e,t){if(t)return!0;process.stdin.isTTY||P("Refusing to overwrite Studio without being asked.",[`Nothing has changed on ${e}.`,"Re-run with `--yes` if you mean to replace whatever a producer has typed."]);let r=mD({input:process.stdin,output:process.stdout});try{return(await r.question(`This replaces the round a producer may have edited on ${e}. Type yes to go ahead: `)).trim().toLowerCase()==="yes"}finally{r.close()}}async function r$(e,t){let r=t.manifest??"gamestage.yaml",o=await hD(r),n=o.archetype==="push"?Cw(o):o;if(M()||fD(n),!await gD(e,!!t.yes)){y("Nothing was written.");return}try{let{client:i}=await de(),a=await i.seedRound(e,n);a.refused&&P("The round was not written into Studio.",[a.refused]);let s=n.archetype==="push"?{count:n.slates.length,noun:"groups of picks"}:{count:n.board.length,noun:"picks on the board"};U({game:e,seeded:!0,archetype:n.archetype,parts:s.count}),M()||(R("Written"),k(`${s.count} ${s.noun} are now on ${e}'s round in Studio.`),k("A producer can change every word of it without another deploy."),k("Take the round out of your manifest when you are ready: `gamestage dev` is the only thing that still reads it."),y())}catch(i){$e(i)}}ie();le();import{readFile as yD}from"node:fs/promises";async function o$(e,t){let r;try{r=await yD(e,"utf8")}catch{return P(`Cannot read ${e}`)}let o=ce(r);if(!o.ok)return M()&&(U({ok:!1,stage:"parse",issues:o.issues}),process.exit(1)),P(`${e} is not a valid App Manifest`,o.issues.map(d=>`${$.cyan(d.path)} ${d.message}`));let n=o.manifest,i=je(n),a=null;if(t.level){let d=Mt.safeParse(t.level.toUpperCase());if(!d.success)return P(`Unknown level "${t.level}". Use L0 through L5.`);a=d.data}let s=a?i_(n,a):null,c=!i.overclaimed&&(s?.ok??!0);if(M()&&(U({ok:c,manifest_id:n.app.id,conformance:{claimed:i.claimed,computed:i.computed,overclaimed:i.overclaimed},required_level:a,missing:s?.missing??[],blockers:i.blockers,rules:i.results}),process.exit(c?0:1)),R(`${n.app.title} ${$.dim(n.app.id)}`),O("Schema",n.manifest.schema_version),O("Revision",String(n.manifest.revision)),O("Conformance",i.overclaimed?`${$.red(i.claimed)} claimed, ${$.bold(i.computed)} evidenced`:`${$.green(i.computed)} ${i.computedName}`),i.overclaimed){R("Overclaimed"),y($.dim(" The manifest claims a level its evidence does not support. Lower the claim or supply the evidence."));for(let d of i.blockers)k($.red(d.requirement))}if(a&&s&&!s.ok){R(`Not yet ${a}`);for(let d of s.missing)k(`${$.yellow(d.id)} ${d.requirement}`)}if(c&&(y(),y(` ${$.green("Valid")}${a?` at ${a}`:""}.`),i.blockers.length)){y(),y($.dim(" Next level needs:"));for(let d of i.blockers)y(` ${$.dim("\xB7")} ${d.requirement}`)}y(),process.exit(c?0:1)}le();for(let e of[process.stdout,process.stderr])e.on("error",t=>{throw t.code==="EPIPE"&&process.exit(0),t});var Y=new Sn;Y.name("gamestage").description(`Take an agent-built game prototype to a production fan game.
7893
8179
  Inspect, create and validate need no account. Running, proving and
7894
- publishing a game go through an approved account.`).version(Be).option("--json","machine-readable output for agents",!1).hook("preAction",e=>{If(!!e.opts().json)});Y.command("start").description("read the current directory and point at the right next step").action(yS);Y.command("doctor").description("check the local environment").action(iS);Y.command("inspect").alias("adopt").argument("[target]","game file or project directory",".").option("--write [path]","write the generated manifest (default gamestage.yaml)").option("--force","replace an existing manifest, losing whatever it holds",!1).description("read an existing game read-only and produce an inspection report").action(cS);Y.command("create").option("--name <name>","game name").option("--archetype <archetype>","authority model for the game").option("--write [path]","manifest path (default gamestage.yaml)").option("--force","replace files that are already here, losing what they hold",!1).description("start a new game, choosing its authority before scaffolding").action(Hw);Y.command("verify").option("--file <path>","the game to verify (index.html)").option("--manifest <path>","manifest the round is read from (gamestage.yaml)").option("--dir <path>","the directory a deploy would publish (defaults to the game's own)").option("--no-browser","skip the browser proof (exits 2 unless another check fails)").description("run the game against a real Engine and prove the migration is done").action(e=>hf({...e,noBrowser:e.browser===!1}));Y.command("client").option("--out <dir>","where to write it, defaulting to the current directory").description("write the player client into your project, as a browser can load it").action(Pf);var IS=Y.command("manifest").description("work with the App Manifest");IS.command("register").argument("[path]","manifest path","gamestage.yaml").description("register an existing manifest with the control plane (requires sign-in)").action(Yx);IS.command("validate").argument("[path]","manifest path","gamestage.yaml").option("--level <level>","require a conformance level (L0-L5)").description("validate a manifest and report its evidenced conformance").action(AS);Y.command("status").argument("[game]","one game, or the whole workspace when omitted").description("what is deployed, what state it is in, and what caps are near").action(Wx);Y.command("deploy").argument("<game>","game id").option("--revision <revision>","manifest revision being published").option("--hash <hash>","content hash of the snapshot").option("--level <level>","evidenced conformance level (L0-L5)").option("--prize","the game offers a prize (paid tiers only)",!1).option("--file <path>","the game's HTML, uploaded before the deploy gate runs").option("--dir <path>","the game's directory, uploaded with relative paths").option("--manifest <path>","manifest the round is read from (gamestage.yaml)").option("--no-check","skip loading the published page in a browser afterwards").description("publish a snapshot to a playground, and the round it puts on").action(Vx);var CS=Y.command("reference").description("the private data a round is scored against");CS.command("push").argument("<name>",'the name a producer types in Studio, e.g. "the-limit/careers.json"').argument("<file>","the JSON file holding it").description("upload reference data, and an immutable copy a round can be pinned to").action($S);CS.command("check").argument("<file>","the JSON file holding it").argument("[keys...]","the keys a round uses, to check they are all present").description("what a round would fail on, before a producer finds out").action(ES);var mR=Y.command("round").description("the round a fan plays, and getting it into Studio");mR.command("push").argument("<game>","game id").option("--manifest <path>","manifest the round is read from","gamestage.yaml").option("--yes","do not ask before replacing what a producer has typed",!1).description("write your round into Studio, where a producer owns it from then on").action(TS);Y.command("archive").argument("<game>","game id").description("take a game off the air while retaining its record and files").action(Hx);Y.command("plan").argument("<plan>","runtime, live or enterprise").description("change this workspace's plan and its limits").action(Jx);Y.command("suspend").argument("<game>","game id").description("take a game off the air and free its live slot").action(e=>bf(e,!1));Y.command("wake").argument("<game>","game id").description("put a suspended game back on the air").action(e=>bf(e,!0));Y.command("endpoint").argument("<game>","game id").argument("[which]","player, control or playground; all three when omitted").description("print where a deployed game answers").action(qx);Y.command("logs").argument("<game>","game id").option("--limit <n>","how many lines, newest kept","100").option("--since <iso>","only lines after this timestamp").option("--level <level>","info, warn or error").description("tail a game's runtime log").action(Qx);Y.command("dev").option("--port <port>","local HTTP port","4000").option("--manifest <path>","manifest the round is read from (gamestage.yaml)").option("--fixture","serve the contract fixture instead of your own round",!1).option("--scenario <name>","fixture scenario, for contract work").option("--as <player>","play as a named signed-in player, with a keypair minted for this run").description("serve your round locally, through the Engine that will serve it in the cloud").action(oS);Y.command("suggest").description("tell us about a format or feature we do not have (no account needed)").argument("<what>","what you were trying to build").option("--closest <format>","the format that came nearest, if one did").option("--send","actually send it, having seen what it says",!1).action((e,t)=>_S(e,t,Be));Y.command("issue").description("report something that went wrong (no account needed)").argument("<what>","what went wrong").option("--game <id>","the game it happened on, if it was about one").option("--send","actually send it, having seen what it says",!1).action((e,t)=>xS(e,t,Be));Y.command("login").description("sign in, or create an account (only needed to deploy)").action(hS);var hR=Y.command("link").description("connect an account Gamestage needs (requires sign-in)");hR.command("github").description("link your GitHub account, which a first deploy requires").action(pS);var PS=Y.command("admin").description("approve or refuse a creator's account (operators only)");PS.command("approve").argument("<workspace>","workspace id, from the registration alert").description("let this account use the runtime").action(e=>vf(e,"approved"));PS.command("refuse").argument("<workspace>","workspace id, from the registration alert").description("turn this account down, finally").action(e=>vf(e,"refused"));Y.command("logout").description("forget the stored session").action(fS);Y.command("whoami").description("show who the CLI is signed in as").action(gS);Y.parseAsync(process.argv).catch(e=>{process.stderr.write(`${e instanceof Error?e.message:String(e)}
8180
+ publishing a game go through an approved account.`).version(Xe).option("--json","machine-readable output for agents",!1).hook("preAction",e=>{Kf(!!e.opts().json)});Y.command("start").description("read the current directory and point at the right next step").action(VS);Y.command("doctor").description("check the local environment").action(DS);Y.command("inspect").alias("adopt").argument("[target]","game file or project directory",".").option("--write [path]","write the generated manifest (default gamestage.yaml)").option("--force","replace an existing manifest, losing whatever it holds",!1).description("read an existing game read-only and produce an inspection report").action(MS);Y.command("create").option("--name <name>","game name").option("--archetype <archetype>","authority model for the game").option("--write [path]","manifest path (default gamestage.yaml)").option("--force","replace files that are already here, losing what they hold",!1).description("start a new game, choosing its authority before scaffolding").action(xk);Y.command("verify").option("--file <path>","the game to verify (index.html)").option("--manifest <path>","manifest the round is read from (gamestage.yaml)").option("--dir <path>","the directory a deploy would publish (defaults to the game's own)").option("--no-browser","skip the browser proof (exits 2 unless another check fails)").description("run the game against a real Engine and prove the migration is done").action(e=>Pf({...e,noBrowser:e.browser===!1}));Y.command("client").option("--out <dir>","where to write it, defaulting to the current directory").description("write the player client into your project, as a browser can load it").action(Hf);var i$=Y.command("manifest").description("work with the App Manifest");i$.command("register").argument("[path]","manifest path","gamestage.yaml").description("register an existing manifest with the control plane (requires sign-in)").action(ES);i$.command("validate").argument("[path]","manifest path","gamestage.yaml").option("--level <level>","require a conformance level (L0-L5)").description("validate a manifest and report its evidenced conformance").action(o$);Y.command("status").argument("[game]","one game, or the whole workspace when omitted").description("what is deployed, what state it is in, and what caps are near").action(wS);Y.command("deploy").argument("<game>","game id").option("--revision <revision>","manifest revision being published").option("--hash <hash>","content hash of the snapshot").option("--level <level>","evidenced conformance level (L0-L5)").option("--prize","the game offers a prize (paid tiers only)",!1).option("--file <path>","the game's HTML, uploaded before the deploy gate runs").option("--dir <path>","the game's directory, uploaded with relative paths").option("--manifest <path>","manifest the round is read from (gamestage.yaml)").option("--no-check","skip loading the published page in a browser afterwards").option("--allow <path...>","publish a file the deploy gate suspects; it never clears a certain finding").description("publish a snapshot to a playground, and the round it puts on").action(kS);var a$=Y.command("reference").description("the private data a round is scored against");a$.command("push").argument("<name>",'the name a producer types in Studio, e.g. "the-limit/careers.json"').argument("<file>","the JSON file holding it").description("upload reference data, and an immutable copy a round can be pinned to").action(t$);a$.command("check").argument("<file>","the JSON file holding it").argument("[keys...]","the keys a round uses, to check they are all present").description("what a round would fail on, before a producer finds out").action(n$);var vD=Y.command("round").description("the round a fan plays, and getting it into Studio");vD.command("push").argument("<game>","game id").option("--manifest <path>","manifest the round is read from","gamestage.yaml").option("--yes","do not ask before replacing what a producer has typed",!1).description("write your round into Studio, where a producer owns it from then on").action(r$);Y.command("archive").argument("<game>","game id").description("take a game off the air while retaining its record and files").action(xS);Y.command("prune").option("--yes","do not ask before deleting",!1).description("remove archived games that never deployed").action(SS);Y.command("plan").argument("<plan>","runtime, live or enterprise").description("change this workspace's plan and its limits").action($S);Y.command("suspend").argument("<game>","game id").description("take a game off the air and free its live slot").action(e=>jf(e,!1));Y.command("wake").argument("<game>","game id").description("put a suspended game back on the air").action(e=>jf(e,!0));Y.command("endpoint").argument("<game>","game id").argument("[which]","player, control or playground; all three when omitted").description("print where a deployed game answers").action(TS);Y.command("logs").argument("<game>","game id").option("--limit <n>","how many lines, newest kept","100").option("--since <iso>","only lines after this timestamp").option("--level <level>","info, warn or error").description("tail a game's runtime log").action(IS);Y.command("dev").option("--port <port>","local HTTP port","4000").option("--manifest <path>","manifest the round is read from (gamestage.yaml)").option("--fixture","serve the contract fixture instead of your own round",!1).option("--scenario <name>","fixture scenario, for contract work").option("--as <player>","play as a named signed-in player, with a keypair minted for this run").description("serve your round locally, through the Engine that will serve it in the cloud").action(RS);Y.command("suggest").description("tell us about a format or feature we do not have (no account needed)").argument("<what>","what you were trying to build").option("--closest <format>","the format that came nearest, if one did").option("--send","actually send it, having seen what it says",!1).action((e,t)=>YS(e,t,Xe));Y.command("issue").description("report something that went wrong (no account needed)").argument("<what>","what went wrong").option("--game <id>","the game it happened on, if it was about one").option("--send","actually send it, having seen what it says",!1).action((e,t)=>QS(e,t,Xe));Y.command("login").description("sign in, or create an account (only needed to deploy)").action(WS);var bD=Y.command("link").description("connect an account Gamestage needs (requires sign-in)");bD.command("github").description("link your GitHub account, which a first deploy requires").action(GS);var s$=Y.command("admin").description("approve or refuse a creator's account (operators only)");s$.command("approve").argument("<workspace>","workspace id, from the registration alert").description("let this account use the runtime").action(e=>Df(e,"approved"));s$.command("refuse").argument("<workspace>","workspace id, from the registration alert").description("turn this account down, finally").action(e=>Df(e,"refused"));Y.command("logout").description("forget the stored session").action(ZS);Y.command("whoami").description("show who the CLI is signed in as").action(KS);Y.parseAsync(process.argv).catch(e=>{process.stderr.write(`${e instanceof Error?e.message:String(e)}
7895
8181
  `),process.exit(1)});
7896
8182
  /*! Bundled license information:
7897
8183