@liip/liipgpt 3.9.0 → 3.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/LICENSE +88 -0
  2. package/button/liipgpt-button.iife.js +11 -71
  3. package/chat/liipgpt-chat.iife.js +16 -16
  4. package/config/index.cjs +947 -946
  5. package/config/index.d.ts +6 -0
  6. package/config/index.js +947 -946
  7. package/configurator/_app/env.js +1 -1
  8. package/configurator/_app/immutable/chunks/7mY4OJGU.js +1 -0
  9. package/configurator/_app/immutable/chunks/BDHUTFW9.js +2 -0
  10. package/configurator/_app/immutable/chunks/{BoSlghYU.js → BDbfujSm.js} +1 -1
  11. package/configurator/_app/immutable/chunks/{cE02ifhd.js → C6m1Wdl1.js} +1 -1
  12. package/configurator/_app/immutable/chunks/{DGbgqVw-.js → CA38AHEC.js} +2 -2
  13. package/configurator/_app/immutable/chunks/CFeIeoV1.js +1 -0
  14. package/configurator/_app/immutable/chunks/{kfKo0Lxm.js → CKhT1xS_.js} +1 -1
  15. package/configurator/_app/immutable/chunks/DAn_q4l-.js +16 -0
  16. package/configurator/_app/immutable/chunks/{CzlKx6Dn.js → DGQ954rx.js} +1 -1
  17. package/configurator/_app/immutable/chunks/DPni1rWl.js +1 -0
  18. package/configurator/_app/immutable/chunks/{BiMiaf32.js → DYa1ApbB.js} +1 -1
  19. package/configurator/_app/immutable/chunks/DfXcv-Ak.js +61 -0
  20. package/configurator/_app/immutable/chunks/Z70hfwyo.js +143 -0
  21. package/configurator/_app/immutable/chunks/hdHt6us6.js +1 -0
  22. package/configurator/_app/immutable/chunks/{CW8XT_f0.js → p7ChcveW.js} +1 -1
  23. package/configurator/_app/immutable/entry/{app.CwqfSUK4.js → app.ft0cgG-t.js} +2 -2
  24. package/configurator/_app/immutable/entry/start.BxzUuOt1.js +1 -0
  25. package/configurator/_app/immutable/nodes/{0.WsdkbKsV.js → 0.CXGLTbqu.js} +1 -1
  26. package/configurator/_app/immutable/nodes/{1.2qVIdLFb.js → 1.DJw369ut.js} +1 -1
  27. package/configurator/_app/immutable/nodes/{2.zFWWXwja.js → 2.Dx5eSBWM.js} +5 -5
  28. package/configurator/_app/immutable/nodes/{3.YVKriLPj.js → 3.CjC17y9u.js} +1 -1
  29. package/configurator/_app/version.json +1 -1
  30. package/configurator/index.html +6 -6
  31. package/configurator/sidebar.html +6 -6
  32. package/index.cjs +1201 -3510
  33. package/index.js +1168 -3479
  34. package/package.json +2 -2
  35. package/search-summary/liipgpt-search-summary.iife.js +3 -3
  36. package/configurator/_app/immutable/chunks/BKESH8zC.js +0 -1
  37. package/configurator/_app/immutable/chunks/BKZTsJMz.js +0 -1
  38. package/configurator/_app/immutable/chunks/C8BUw-Wc.js +0 -61
  39. package/configurator/_app/immutable/chunks/CWvh3_h0.js +0 -16
  40. package/configurator/_app/immutable/chunks/CqCdl07t.js +0 -1
  41. package/configurator/_app/immutable/chunks/DWxJNFvO.js +0 -143
  42. package/configurator/_app/immutable/chunks/Dn_5PWao.js +0 -2
  43. package/configurator/_app/immutable/chunks/IPBcm7Y9.js +0 -1
  44. package/configurator/_app/immutable/entry/start.C9g5qB7o.js +0 -1
  45. package/configurator/bs.png +0 -0
package/index.cjs CHANGED
@@ -19,12 +19,14 @@ var __toESM = (mod, isNodeMode, target) => {
19
19
  }
20
20
  target = mod != null ? __create(__getProtoOf(mod)) : {};
21
21
  const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
22
- for (let key of __getOwnPropNames(mod))
23
- if (!__hasOwnProp.call(to, key))
24
- __defProp(to, key, {
25
- get: __accessProp.bind(mod, key),
26
- enumerable: true
27
- });
22
+ if (mod && typeof mod === "object" || typeof mod === "function") {
23
+ for (let key of __getOwnPropNames(mod))
24
+ if (!__hasOwnProp.call(to, key))
25
+ __defProp(to, key, {
26
+ get: __accessProp.bind(mod, key),
27
+ enumerable: true
28
+ });
29
+ }
28
30
  if (canCache)
29
31
  cache.set(mod, to);
30
32
  return to;
@@ -63,31 +65,31 @@ var __export = (target, all) => {
63
65
  // src/lib/client/index.ts
64
66
  var exports_client = {};
65
67
  __export(exports_client, {
66
- userDataResponseSchema: () => userDataResponseSchema,
67
- selectedTopicSchema: () => selectedTopicSchema,
68
- routeSchema: () => routeSchema,
69
- predefinedQuestionsResponseSchema: () => predefinedQuestionsResponseSchema,
70
- predefinedQuestionSchema: () => predefinedQuestionSchema,
71
- pageStateSchema: () => pageStateSchema,
72
- menuItemSchema: () => menuItemSchema,
73
- fullTranslations: () => fullTranslations,
74
- conversationStateSchema: () => conversationStateSchema,
75
- conversationHistorySchema: () => conversationHistorySchema,
76
- completeChatConfigSchema: () => completeChatConfigSchema,
77
- classificationResponseSchema: () => classificationResponseSchema,
78
- classificationConfigSchema: () => classificationConfigSchema,
79
- chatMessageUserSchema: () => chatMessageUserSchema,
80
- chatMessageSchema: () => chatMessageSchema,
81
- chatMessageBotStreamingSchema: () => chatMessageBotStreamingSchema,
82
- chatMessageBotLoadingSchema: () => chatMessageBotLoadingSchema,
83
- chatContentSchema: () => chatContentSchema,
84
- chatConfigSchemaWithLegacyThemeName: () => chatConfigSchemaWithLegacyThemeName,
85
- chatConfigSchema: () => chatConfigSchema,
86
- answerFormSchema: () => answerFormSchema,
87
- answerFormFieldSchema: () => answerFormFieldSchema,
88
- MarkdownRenderer: () => MarkdownRenderer,
68
+ ChatResultBuilder: () => ChatResultBuilder,
89
69
  LiipGPTClient: () => LiipGPTClient,
90
- ChatResultBuilder: () => ChatResultBuilder
70
+ MarkdownRenderer: () => MarkdownRenderer,
71
+ answerFormFieldSchema: () => answerFormFieldSchema,
72
+ answerFormSchema: () => answerFormSchema,
73
+ chatConfigSchema: () => chatConfigSchema,
74
+ chatConfigSchemaWithLegacyThemeName: () => chatConfigSchemaWithLegacyThemeName,
75
+ chatContentSchema: () => chatContentSchema,
76
+ chatMessageBotLoadingSchema: () => chatMessageBotLoadingSchema,
77
+ chatMessageBotStreamingSchema: () => chatMessageBotStreamingSchema,
78
+ chatMessageSchema: () => chatMessageSchema,
79
+ chatMessageUserSchema: () => chatMessageUserSchema,
80
+ classificationConfigSchema: () => classificationConfigSchema,
81
+ classificationResponseSchema: () => classificationResponseSchema,
82
+ completeChatConfigSchema: () => completeChatConfigSchema,
83
+ conversationHistorySchema: () => conversationHistorySchema,
84
+ conversationStateSchema: () => conversationStateSchema,
85
+ fullTranslations: () => fullTranslations,
86
+ menuItemSchema: () => menuItemSchema,
87
+ pageStateSchema: () => pageStateSchema,
88
+ predefinedQuestionSchema: () => predefinedQuestionSchema,
89
+ predefinedQuestionsResponseSchema: () => predefinedQuestionsResponseSchema,
90
+ routeSchema: () => routeSchema,
91
+ selectedTopicSchema: () => selectedTopicSchema,
92
+ userDataResponseSchema: () => userDataResponseSchema
91
93
  });
92
94
  module.exports = __toCommonJS(exports_client);
93
95
 
@@ -3336,29 +3338,11 @@ class MarkdownRenderer {
3336
3338
  // node_modules/.bun/esm-env@1.2.2/node_modules/esm-env/true.js
3337
3339
  var true_default = true;
3338
3340
  // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/shared/utils.js
3339
- var is_array = Array.isArray;
3340
3341
  var index_of = Array.prototype.indexOf;
3341
3342
  var includes = Array.prototype.includes;
3342
- var define_property = Object.defineProperty;
3343
- var get_descriptor = Object.getOwnPropertyDescriptor;
3344
3343
  var object_prototype = Object.prototype;
3345
3344
  var array_prototype = Array.prototype;
3346
- var get_prototype_of = Object.getPrototypeOf;
3347
3345
  var noop = () => {};
3348
- function run_all(arr) {
3349
- for (var i = 0;i < arr.length; i++) {
3350
- arr[i]();
3351
- }
3352
- }
3353
- function deferred() {
3354
- var resolve;
3355
- var reject;
3356
- var promise = new Promise((res, rej) => {
3357
- resolve = res;
3358
- reject = rej;
3359
- });
3360
- return { promise, resolve, reject };
3361
- }
3362
3346
 
3363
3347
  // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/constants.js
3364
3348
  var DERIVED = 1 << 1;
@@ -3396,101 +3380,11 @@ var STALE_REACTION = new class StaleReactionError extends Error {
3396
3380
  message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
3397
3381
  };
3398
3382
  var IS_XHTML = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
3399
- var COMMENT_NODE = 8;
3400
3383
 
3401
3384
  // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/reactivity/equality.js
3402
- function equals(value) {
3403
- return value === this.v;
3404
- }
3405
3385
  function safe_not_equal(a, b) {
3406
3386
  return a != a ? b == b : a !== b || a !== null && typeof a === "object" || typeof a === "function";
3407
3387
  }
3408
-
3409
- // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/shared/errors.js
3410
- function invariant_violation(message) {
3411
- if (true_default) {
3412
- const error = new Error(`invariant_violation
3413
- An invariant violation occurred, meaning Svelte's internal assumptions were flawed. This is a bug in Svelte, not your app — please open an issue at https://github.com/sveltejs/svelte, citing the following message: "${message}"
3414
- https://svelte.dev/e/invariant_violation`);
3415
- error.name = "Svelte error";
3416
- throw error;
3417
- } else {
3418
- throw new Error(`https://svelte.dev/e/invariant_violation`);
3419
- }
3420
- }
3421
- // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/errors.js
3422
- function derived_references_self() {
3423
- if (true_default) {
3424
- const error = new Error(`derived_references_self
3425
- A derived value cannot reference itself recursively
3426
- https://svelte.dev/e/derived_references_self`);
3427
- error.name = "Svelte error";
3428
- throw error;
3429
- } else {
3430
- throw new Error(`https://svelte.dev/e/derived_references_self`);
3431
- }
3432
- }
3433
- function effect_update_depth_exceeded() {
3434
- if (true_default) {
3435
- const error = new Error(`effect_update_depth_exceeded
3436
- Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state
3437
- https://svelte.dev/e/effect_update_depth_exceeded`);
3438
- error.name = "Svelte error";
3439
- throw error;
3440
- } else {
3441
- throw new Error(`https://svelte.dev/e/effect_update_depth_exceeded`);
3442
- }
3443
- }
3444
- function state_descriptors_fixed() {
3445
- if (true_default) {
3446
- const error = new Error(`state_descriptors_fixed
3447
- Property descriptors defined on \`$state\` objects must contain \`value\` and always be \`enumerable\`, \`configurable\` and \`writable\`.
3448
- https://svelte.dev/e/state_descriptors_fixed`);
3449
- error.name = "Svelte error";
3450
- throw error;
3451
- } else {
3452
- throw new Error(`https://svelte.dev/e/state_descriptors_fixed`);
3453
- }
3454
- }
3455
- function state_prototype_fixed() {
3456
- if (true_default) {
3457
- const error = new Error(`state_prototype_fixed
3458
- Cannot set prototype of \`$state\` object
3459
- https://svelte.dev/e/state_prototype_fixed`);
3460
- error.name = "Svelte error";
3461
- throw error;
3462
- } else {
3463
- throw new Error(`https://svelte.dev/e/state_prototype_fixed`);
3464
- }
3465
- }
3466
- function state_unsafe_mutation() {
3467
- if (true_default) {
3468
- const error = new Error(`state_unsafe_mutation
3469
- Updating state inside \`$derived(...)\`, \`$inspect(...)\` or a template expression is forbidden. If the value should not be reactive, declare it without \`$state\`
3470
- https://svelte.dev/e/state_unsafe_mutation`);
3471
- error.name = "Svelte error";
3472
- throw error;
3473
- } else {
3474
- throw new Error(`https://svelte.dev/e/state_unsafe_mutation`);
3475
- }
3476
- }
3477
- function svelte_boundary_reset_onerror() {
3478
- if (true_default) {
3479
- const error = new Error(`svelte_boundary_reset_onerror
3480
- A \`<svelte:boundary>\` \`reset\` function cannot be called while an error is still being handled
3481
- https://svelte.dev/e/svelte_boundary_reset_onerror`);
3482
- error.name = "Svelte error";
3483
- throw error;
3484
- } else {
3485
- throw new Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`);
3486
- }
3487
- }
3488
-
3489
- // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/flags/index.js
3490
- var async_mode_flag = false;
3491
- var legacy_mode_flag = false;
3492
- var tracing_mode_flag = false;
3493
-
3494
3388
  // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/constants.js
3495
3389
  var EACH_INDEX_REACTIVE = 1 << 1;
3496
3390
  var EACH_IS_CONTROLLED = 1 << 2;
@@ -3505,418 +3399,13 @@ var TRANSITION_GLOBAL = 1 << 2;
3505
3399
  var TEMPLATE_USE_IMPORT_NODE = 1 << 1;
3506
3400
  var TEMPLATE_USE_SVG = 1 << 2;
3507
3401
  var TEMPLATE_USE_MATHML = 1 << 3;
3508
- var HYDRATION_START = "[";
3509
- var HYDRATION_START_ELSE = "[!";
3510
- var HYDRATION_START_FAILED = "[?";
3511
- var HYDRATION_END = "]";
3512
- var HYDRATION_ERROR = {};
3513
3402
  var ELEMENT_PRESERVE_ATTRIBUTE_CASE = 1 << 1;
3514
3403
  var ELEMENT_IS_INPUT = 1 << 2;
3515
3404
  var UNINITIALIZED = Symbol();
3516
3405
  var FILENAME = Symbol("filename");
3517
3406
  var HMR = Symbol("hmr");
3518
3407
 
3519
- // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/dev/tracing.js
3520
- var tracing_expressions = null;
3521
- function tag2(source, label) {
3522
- source.label = label;
3523
- tag_proxy(source.v, label);
3524
- return source;
3525
- }
3526
- function tag_proxy(value, label) {
3527
- value?.[PROXY_PATH_SYMBOL]?.(label);
3528
- return value;
3529
- }
3530
-
3531
- // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/shared/dev.js
3532
- function get_error(label) {
3533
- const error = new Error;
3534
- const stack = get_stack();
3535
- if (stack.length === 0) {
3536
- return null;
3537
- }
3538
- stack.unshift(`
3539
- `);
3540
- define_property(error, "stack", {
3541
- value: stack.join(`
3542
- `)
3543
- });
3544
- define_property(error, "name", {
3545
- value: label
3546
- });
3547
- return error;
3548
- }
3549
- function get_stack() {
3550
- const limit = Error.stackTraceLimit;
3551
- Error.stackTraceLimit = Infinity;
3552
- const stack = new Error().stack;
3553
- Error.stackTraceLimit = limit;
3554
- if (!stack)
3555
- return [];
3556
- const lines = stack.split(`
3557
- `);
3558
- const new_lines = [];
3559
- for (let i = 0;i < lines.length; i++) {
3560
- const line = lines[i];
3561
- const posixified = line.replaceAll("\\", "/");
3562
- if (line.trim() === "Error") {
3563
- continue;
3564
- }
3565
- if (line.includes("validate_each_keys")) {
3566
- return [];
3567
- }
3568
- if (posixified.includes("svelte/src/internal") || posixified.includes("node_modules/.vite")) {
3569
- continue;
3570
- }
3571
- new_lines.push(line);
3572
- }
3573
- return new_lines;
3574
- }
3575
- function invariant(condition, message) {
3576
- if (!true_default) {
3577
- throw new Error("invariant(...) was not guarded by if (DEV)");
3578
- }
3579
- if (!condition)
3580
- invariant_violation(message);
3581
- }
3582
-
3583
- // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/context.js
3584
- var component_context = null;
3585
- function set_component_context(context) {
3586
- component_context = context;
3587
- }
3588
- var dev_stack = null;
3589
- function set_dev_stack(stack) {
3590
- dev_stack = stack;
3591
- }
3592
- var dev_current_component_function = null;
3593
- function set_dev_current_component_function(fn) {
3594
- dev_current_component_function = fn;
3595
- }
3596
- function is_runes() {
3597
- return !legacy_mode_flag || component_context !== null && component_context.l === null;
3598
- }
3599
-
3600
- // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/dom/task.js
3601
- var micro_tasks = [];
3602
- function run_micro_tasks() {
3603
- var tasks = micro_tasks;
3604
- micro_tasks = [];
3605
- run_all(tasks);
3606
- }
3607
- function queue_micro_task(fn) {
3608
- if (micro_tasks.length === 0 && !is_flushing_sync) {
3609
- var tasks = micro_tasks;
3610
- queueMicrotask(() => {
3611
- if (tasks === micro_tasks)
3612
- run_micro_tasks();
3613
- });
3614
- }
3615
- micro_tasks.push(fn);
3616
- }
3617
-
3618
- // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/warnings.js
3619
- var bold = "font-weight: bold";
3620
- var normal = "font-weight: normal";
3621
- function await_reactivity_loss(name) {
3622
- if (true_default) {
3623
- console.warn(`%c[svelte] await_reactivity_loss
3624
- %cDetected reactivity loss when reading \`${name}\`. This happens when state is read in an async function after an earlier \`await\`
3625
- https://svelte.dev/e/await_reactivity_loss`, bold, normal);
3626
- } else {
3627
- console.warn(`https://svelte.dev/e/await_reactivity_loss`);
3628
- }
3629
- }
3630
- function hydration_mismatch(location) {
3631
- if (true_default) {
3632
- console.warn(`%c[svelte] hydration_mismatch
3633
- %c${location ? `Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${location}` : "Hydration failed because the initial UI does not match what was rendered on the server"}
3634
- https://svelte.dev/e/hydration_mismatch`, bold, normal);
3635
- } else {
3636
- console.warn(`https://svelte.dev/e/hydration_mismatch`);
3637
- }
3638
- }
3639
- function svelte_boundary_reset_noop() {
3640
- if (true_default) {
3641
- console.warn(`%c[svelte] svelte_boundary_reset_noop
3642
- %cA \`<svelte:boundary>\` \`reset\` function only resets the boundary the first time it is called
3643
- https://svelte.dev/e/svelte_boundary_reset_noop`, bold, normal);
3644
- } else {
3645
- console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`);
3646
- }
3647
- }
3648
-
3649
- // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/dom/hydration.js
3650
- var hydrating = false;
3651
- var hydrate_node;
3652
- function set_hydrate_node(node) {
3653
- if (node === null) {
3654
- hydration_mismatch();
3655
- throw HYDRATION_ERROR;
3656
- }
3657
- return hydrate_node = node;
3658
- }
3659
- function hydrate_next() {
3660
- return set_hydrate_node(get_next_sibling(hydrate_node));
3661
- }
3662
- function next(count = 1) {
3663
- if (hydrating) {
3664
- var i = count;
3665
- var node = hydrate_node;
3666
- while (i--) {
3667
- node = get_next_sibling(node);
3668
- }
3669
- hydrate_node = node;
3670
- }
3671
- }
3672
- function skip_nodes(remove = true) {
3673
- var depth = 0;
3674
- var node = hydrate_node;
3675
- while (true) {
3676
- if (node.nodeType === COMMENT_NODE) {
3677
- var data = node.data;
3678
- if (data === HYDRATION_END) {
3679
- if (depth === 0)
3680
- return node;
3681
- depth -= 1;
3682
- } else if (data === HYDRATION_START || data === HYDRATION_START_ELSE || data[0] === "[" && !isNaN(Number(data.slice(1)))) {
3683
- depth += 1;
3684
- }
3685
- }
3686
- var next2 = get_next_sibling(node);
3687
- if (remove)
3688
- node.remove();
3689
- node = next2;
3690
- }
3691
- }
3692
-
3693
3408
  // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/proxy.js
3694
- var regex_is_valid_identifier = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
3695
- function proxy(value) {
3696
- if (typeof value !== "object" || value === null || STATE_SYMBOL in value) {
3697
- return value;
3698
- }
3699
- const prototype = get_prototype_of(value);
3700
- if (prototype !== object_prototype && prototype !== array_prototype) {
3701
- return value;
3702
- }
3703
- var sources = new Map;
3704
- var is_proxied_array = is_array(value);
3705
- var version = state(0);
3706
- var stack = true_default && tracing_mode_flag ? get_error("created at") : null;
3707
- var parent_version = update_version;
3708
- var with_parent = (fn) => {
3709
- if (update_version === parent_version) {
3710
- return fn();
3711
- }
3712
- var reaction = active_reaction;
3713
- var version2 = update_version;
3714
- set_active_reaction(null);
3715
- set_update_version(parent_version);
3716
- var result = fn();
3717
- set_active_reaction(reaction);
3718
- set_update_version(version2);
3719
- return result;
3720
- };
3721
- if (is_proxied_array) {
3722
- sources.set("length", state(value.length, stack));
3723
- if (true_default) {
3724
- value = inspectable_array(value);
3725
- }
3726
- }
3727
- var path = "";
3728
- let updating = false;
3729
- function update_path(new_path) {
3730
- if (updating)
3731
- return;
3732
- updating = true;
3733
- path = new_path;
3734
- tag2(version, `${path} version`);
3735
- for (const [prop, source] of sources) {
3736
- tag2(source, get_label(path, prop));
3737
- }
3738
- updating = false;
3739
- }
3740
- return new Proxy(value, {
3741
- defineProperty(_, prop, descriptor) {
3742
- if (!("value" in descriptor) || descriptor.configurable === false || descriptor.enumerable === false || descriptor.writable === false) {
3743
- state_descriptors_fixed();
3744
- }
3745
- var s = sources.get(prop);
3746
- if (s === undefined) {
3747
- with_parent(() => {
3748
- var s2 = state(descriptor.value, stack);
3749
- sources.set(prop, s2);
3750
- if (true_default && typeof prop === "string") {
3751
- tag2(s2, get_label(path, prop));
3752
- }
3753
- return s2;
3754
- });
3755
- } else {
3756
- set(s, descriptor.value, true);
3757
- }
3758
- return true;
3759
- },
3760
- deleteProperty(target, prop) {
3761
- var s = sources.get(prop);
3762
- if (s === undefined) {
3763
- if (prop in target) {
3764
- const s2 = with_parent(() => state(UNINITIALIZED, stack));
3765
- sources.set(prop, s2);
3766
- increment(version);
3767
- if (true_default) {
3768
- tag2(s2, get_label(path, prop));
3769
- }
3770
- }
3771
- } else {
3772
- set(s, UNINITIALIZED);
3773
- increment(version);
3774
- }
3775
- return true;
3776
- },
3777
- get(target, prop, receiver) {
3778
- if (prop === STATE_SYMBOL) {
3779
- return value;
3780
- }
3781
- if (true_default && prop === PROXY_PATH_SYMBOL) {
3782
- return update_path;
3783
- }
3784
- var s = sources.get(prop);
3785
- var exists = prop in target;
3786
- if (s === undefined && (!exists || get_descriptor(target, prop)?.writable)) {
3787
- s = with_parent(() => {
3788
- var p = proxy(exists ? target[prop] : UNINITIALIZED);
3789
- var s2 = state(p, stack);
3790
- if (true_default) {
3791
- tag2(s2, get_label(path, prop));
3792
- }
3793
- return s2;
3794
- });
3795
- sources.set(prop, s);
3796
- }
3797
- if (s !== undefined) {
3798
- var v = get(s);
3799
- return v === UNINITIALIZED ? undefined : v;
3800
- }
3801
- return Reflect.get(target, prop, receiver);
3802
- },
3803
- getOwnPropertyDescriptor(target, prop) {
3804
- var descriptor = Reflect.getOwnPropertyDescriptor(target, prop);
3805
- if (descriptor && "value" in descriptor) {
3806
- var s = sources.get(prop);
3807
- if (s)
3808
- descriptor.value = get(s);
3809
- } else if (descriptor === undefined) {
3810
- var source = sources.get(prop);
3811
- var value2 = source?.v;
3812
- if (source !== undefined && value2 !== UNINITIALIZED) {
3813
- return {
3814
- enumerable: true,
3815
- configurable: true,
3816
- value: value2,
3817
- writable: true
3818
- };
3819
- }
3820
- }
3821
- return descriptor;
3822
- },
3823
- has(target, prop) {
3824
- if (prop === STATE_SYMBOL) {
3825
- return true;
3826
- }
3827
- var s = sources.get(prop);
3828
- var has = s !== undefined && s.v !== UNINITIALIZED || Reflect.has(target, prop);
3829
- if (s !== undefined || active_effect !== null && (!has || get_descriptor(target, prop)?.writable)) {
3830
- if (s === undefined) {
3831
- s = with_parent(() => {
3832
- var p = has ? proxy(target[prop]) : UNINITIALIZED;
3833
- var s2 = state(p, stack);
3834
- if (true_default) {
3835
- tag2(s2, get_label(path, prop));
3836
- }
3837
- return s2;
3838
- });
3839
- sources.set(prop, s);
3840
- }
3841
- var value2 = get(s);
3842
- if (value2 === UNINITIALIZED) {
3843
- return false;
3844
- }
3845
- }
3846
- return has;
3847
- },
3848
- set(target, prop, value2, receiver) {
3849
- var s = sources.get(prop);
3850
- var has = prop in target;
3851
- if (is_proxied_array && prop === "length") {
3852
- for (var i = value2;i < s.v; i += 1) {
3853
- var other_s = sources.get(i + "");
3854
- if (other_s !== undefined) {
3855
- set(other_s, UNINITIALIZED);
3856
- } else if (i in target) {
3857
- other_s = with_parent(() => state(UNINITIALIZED, stack));
3858
- sources.set(i + "", other_s);
3859
- if (true_default) {
3860
- tag2(other_s, get_label(path, i));
3861
- }
3862
- }
3863
- }
3864
- }
3865
- if (s === undefined) {
3866
- if (!has || get_descriptor(target, prop)?.writable) {
3867
- s = with_parent(() => state(undefined, stack));
3868
- if (true_default) {
3869
- tag2(s, get_label(path, prop));
3870
- }
3871
- set(s, proxy(value2));
3872
- sources.set(prop, s);
3873
- }
3874
- } else {
3875
- has = s.v !== UNINITIALIZED;
3876
- var p = with_parent(() => proxy(value2));
3877
- set(s, p);
3878
- }
3879
- var descriptor = Reflect.getOwnPropertyDescriptor(target, prop);
3880
- if (descriptor?.set) {
3881
- descriptor.set.call(receiver, value2);
3882
- }
3883
- if (!has) {
3884
- if (is_proxied_array && typeof prop === "string") {
3885
- var ls = sources.get("length");
3886
- var n = Number(prop);
3887
- if (Number.isInteger(n) && n >= ls.v) {
3888
- set(ls, n + 1);
3889
- }
3890
- }
3891
- increment(version);
3892
- }
3893
- return true;
3894
- },
3895
- ownKeys(target) {
3896
- get(version);
3897
- var own_keys = Reflect.ownKeys(target).filter((key2) => {
3898
- var source2 = sources.get(key2);
3899
- return source2 === undefined || source2.v !== UNINITIALIZED;
3900
- });
3901
- for (var [key, source] of sources) {
3902
- if (source.v !== UNINITIALIZED && !(key in target)) {
3903
- own_keys.push(key);
3904
- }
3905
- }
3906
- return own_keys;
3907
- },
3908
- setPrototypeOf() {
3909
- state_prototype_fixed();
3910
- }
3911
- });
3912
- }
3913
- function get_label(path, prop) {
3914
- if (typeof prop === "symbol")
3915
- return `${path}[Symbol(${prop.description ?? ""})]`;
3916
- if (regex_is_valid_identifier.test(prop))
3917
- return `${path}.${prop}`;
3918
- return /^\d+$/.test(prop) ? `${path}[${prop}]` : `${path}['${prop}']`;
3919
- }
3920
3409
  var ARRAY_MUTATING_METHODS = new Set([
3921
3410
  "copyWithin",
3922
3411
  "fill",
@@ -3928,140 +3417,12 @@ var ARRAY_MUTATING_METHODS = new Set([
3928
3417
  "splice",
3929
3418
  "unshift"
3930
3419
  ]);
3931
- function inspectable_array(array) {
3932
- return new Proxy(array, {
3933
- get(target, prop, receiver) {
3934
- var value = Reflect.get(target, prop, receiver);
3935
- if (!ARRAY_MUTATING_METHODS.has(prop)) {
3936
- return value;
3937
- }
3938
- return function(...args) {
3939
- set_eager_effects_deferred();
3940
- var result = value.apply(this, args);
3941
- flush_eager_effects();
3942
- return result;
3943
- };
3944
- }
3945
- });
3946
- }
3947
-
3948
- // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/dom/operations.js
3949
- var is_firefox;
3950
- var next_sibling_getter;
3951
- function create_text(value = "") {
3952
- return document.createTextNode(value);
3953
- }
3954
- function get_next_sibling(node) {
3955
- return next_sibling_getter.call(node);
3956
- }
3957
3420
 
3958
3421
  // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/error-handling.js
3959
3422
  var adjustments = new WeakMap;
3960
- function handle_error(error) {
3961
- var effect = active_effect;
3962
- if (effect === null) {
3963
- active_reaction.f |= ERROR_VALUE;
3964
- return error;
3965
- }
3966
- if (true_default && error instanceof Error && !adjustments.has(error)) {
3967
- adjustments.set(error, get_adjustments(error, effect));
3968
- }
3969
- if ((effect.f & REACTION_RAN) === 0 && (effect.f & EFFECT) === 0) {
3970
- if (true_default && !effect.parent && error instanceof Error) {
3971
- apply_adjustments(error);
3972
- }
3973
- throw error;
3974
- }
3975
- invoke_error_boundary(error, effect);
3976
- }
3977
- function invoke_error_boundary(error, effect) {
3978
- while (effect !== null) {
3979
- if ((effect.f & BOUNDARY_EFFECT) !== 0) {
3980
- if ((effect.f & REACTION_RAN) === 0) {
3981
- throw error;
3982
- }
3983
- try {
3984
- effect.b.error(error);
3985
- return;
3986
- } catch (e) {
3987
- error = e;
3988
- }
3989
- }
3990
- effect = effect.parent;
3991
- }
3992
- if (true_default && error instanceof Error) {
3993
- apply_adjustments(error);
3994
- }
3995
- throw error;
3996
- }
3997
- function get_adjustments(error, effect) {
3998
- const message_descriptor = get_descriptor(error, "message");
3999
- if (message_descriptor && !message_descriptor.configurable)
4000
- return;
4001
- var indent = is_firefox ? " " : "\t";
4002
- var component_stack = `
4003
- ${indent}in ${effect.fn?.name || "<unknown>"}`;
4004
- var context = effect.ctx;
4005
- while (context !== null) {
4006
- component_stack += `
4007
- ${indent}in ${context.function?.[FILENAME].split("/").pop()}`;
4008
- context = context.p;
4009
- }
4010
- return {
4011
- message: error.message + `
4012
- ${component_stack}
4013
- `,
4014
- stack: error.stack?.split(`
4015
- `).filter((line) => !line.includes("svelte/src/internal")).join(`
4016
- `)
4017
- };
4018
- }
4019
- function apply_adjustments(error) {
4020
- const adjusted = adjustments.get(error);
4021
- if (adjusted) {
4022
- define_property(error, "message", {
4023
- value: adjusted.message
4024
- });
4025
- define_property(error, "stack", {
4026
- value: adjusted.stack
4027
- });
4028
- }
4029
- }
4030
3423
 
4031
3424
  // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/reactivity/status.js
4032
3425
  var STATUS_MASK = ~(DIRTY | MAYBE_DIRTY | CLEAN);
4033
- function set_signal_status(signal, status) {
4034
- signal.f = signal.f & STATUS_MASK | status;
4035
- }
4036
- function update_derived_status(derived) {
4037
- if ((derived.f & CONNECTED) !== 0 || derived.deps === null) {
4038
- set_signal_status(derived, CLEAN);
4039
- } else {
4040
- set_signal_status(derived, MAYBE_DIRTY);
4041
- }
4042
- }
4043
-
4044
- // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/reactivity/utils.js
4045
- function clear_marked(deps) {
4046
- if (deps === null)
4047
- return;
4048
- for (const dep of deps) {
4049
- if ((dep.f & DERIVED) === 0 || (dep.f & WAS_MARKED) === 0) {
4050
- continue;
4051
- }
4052
- dep.f ^= WAS_MARKED;
4053
- clear_marked(dep.deps);
4054
- }
4055
- }
4056
- function defer_effect(effect, dirty_effects, maybe_dirty_effects) {
4057
- if ((effect.f & DIRTY) !== 0) {
4058
- dirty_effects.add(effect);
4059
- } else if ((effect.f & MAYBE_DIRTY) !== 0) {
4060
- maybe_dirty_effects.add(effect);
4061
- }
4062
- clear_marked(effect.deps);
4063
- set_signal_status(effect, CLEAN);
4064
- }
4065
3426
 
4066
3427
  // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/store/shared/index.js
4067
3428
  var subscriber_queue = [];
@@ -4108,2462 +3469,792 @@ function writable(value, start = noop) {
4108
3469
  }
4109
3470
 
4110
3471
  // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/reactivity/store.js
4111
- var legacy_is_updating_store = false;
4112
3472
  var IS_UNMOUNTED = Symbol();
4113
3473
 
4114
3474
  // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/reactivity/batch.js
4115
3475
  var batches = new Set;
4116
- var current_batch = null;
4117
- var previous_batch = null;
4118
- var batch_values = null;
4119
- var last_scheduled_effect = null;
4120
- var is_flushing_sync = false;
4121
- var is_processing = false;
4122
- var collected_effects = null;
4123
- var legacy_updates = null;
4124
- var flush_count = 0;
4125
3476
  var source_stacks = true_default ? new Set : null;
4126
- var uid = 1;
4127
3477
 
4128
- class Batch {
4129
- id = uid++;
4130
- current = new Map;
4131
- previous = new Map;
4132
- #commit_callbacks = new Set;
4133
- #discard_callbacks = new Set;
4134
- #pending = 0;
4135
- #blocking_pending = 0;
4136
- #deferred = null;
4137
- #roots = [];
4138
- #dirty_effects = new Set;
4139
- #maybe_dirty_effects = new Set;
4140
- #skipped_branches = new Map;
4141
- is_fork = false;
4142
- #decrement_queued = false;
4143
- #is_deferred() {
4144
- return this.is_fork || this.#blocking_pending > 0;
4145
- }
4146
- skip_effect(effect) {
4147
- if (!this.#skipped_branches.has(effect)) {
4148
- this.#skipped_branches.set(effect, { d: [], m: [] });
4149
- }
4150
- }
4151
- unskip_effect(effect) {
4152
- var tracked = this.#skipped_branches.get(effect);
4153
- if (tracked) {
4154
- this.#skipped_branches.delete(effect);
4155
- for (var e of tracked.d) {
4156
- set_signal_status(e, DIRTY);
4157
- this.schedule(e);
4158
- }
4159
- for (e of tracked.m) {
4160
- set_signal_status(e, MAYBE_DIRTY);
4161
- this.schedule(e);
4162
- }
4163
- }
4164
- }
4165
- #process() {
4166
- if (flush_count++ > 1000) {
4167
- batches.delete(this);
4168
- infinite_loop_guard();
4169
- }
4170
- if (!this.#is_deferred()) {
4171
- for (const e of this.#dirty_effects) {
4172
- this.#maybe_dirty_effects.delete(e);
4173
- set_signal_status(e, DIRTY);
4174
- this.schedule(e);
4175
- }
4176
- for (const e of this.#maybe_dirty_effects) {
4177
- set_signal_status(e, MAYBE_DIRTY);
4178
- this.schedule(e);
4179
- }
4180
- }
4181
- const roots = this.#roots;
4182
- this.#roots = [];
4183
- this.apply();
4184
- var effects = collected_effects = [];
4185
- var render_effects = [];
4186
- var updates = legacy_updates = [];
4187
- for (const root of roots) {
4188
- try {
4189
- this.#traverse(root, effects, render_effects);
4190
- } catch (e) {
4191
- reset_all(root);
4192
- throw e;
4193
- }
4194
- }
4195
- current_batch = null;
4196
- if (updates.length > 0) {
4197
- var batch = Batch.ensure();
4198
- for (const e of updates) {
4199
- batch.schedule(e);
4200
- }
4201
- }
4202
- collected_effects = null;
4203
- legacy_updates = null;
4204
- if (this.#is_deferred()) {
4205
- this.#defer_effects(render_effects);
4206
- this.#defer_effects(effects);
4207
- for (const [e, t] of this.#skipped_branches) {
4208
- reset_branch(e, t);
4209
- }
4210
- } else {
4211
- if (this.#pending === 0) {
4212
- batches.delete(this);
4213
- }
4214
- this.#dirty_effects.clear();
4215
- this.#maybe_dirty_effects.clear();
4216
- for (const fn of this.#commit_callbacks)
4217
- fn(this);
4218
- this.#commit_callbacks.clear();
4219
- previous_batch = this;
4220
- flush_queued_effects(render_effects);
4221
- flush_queued_effects(effects);
4222
- previous_batch = null;
4223
- this.#deferred?.resolve();
4224
- }
4225
- var next_batch = current_batch;
4226
- if (this.#roots.length > 0) {
4227
- const batch2 = next_batch ??= this;
4228
- batch2.#roots.push(...this.#roots.filter((r) => !batch2.#roots.includes(r)));
4229
- }
4230
- if (next_batch !== null) {
4231
- batches.add(next_batch);
4232
- if (true_default) {
4233
- for (const source2 of this.current.keys()) {
4234
- source_stacks.add(source2);
4235
- }
4236
- }
4237
- next_batch.#process();
4238
- }
4239
- if (!batches.has(this)) {
4240
- this.#commit();
4241
- }
4242
- }
4243
- #traverse(root, effects, render_effects) {
4244
- root.f ^= CLEAN;
4245
- var effect = root.first;
4246
- while (effect !== null) {
4247
- var flags = effect.f;
4248
- var is_branch = (flags & (BRANCH_EFFECT | ROOT_EFFECT)) !== 0;
4249
- var is_skippable_branch = is_branch && (flags & CLEAN) !== 0;
4250
- var skip = is_skippable_branch || (flags & INERT) !== 0 || this.#skipped_branches.has(effect);
4251
- if (!skip && effect.fn !== null) {
4252
- if (is_branch) {
4253
- effect.f ^= CLEAN;
4254
- } else if ((flags & EFFECT) !== 0) {
4255
- effects.push(effect);
4256
- } else if (async_mode_flag && (flags & (RENDER_EFFECT | MANAGED_EFFECT)) !== 0) {
4257
- render_effects.push(effect);
4258
- } else if (is_dirty(effect)) {
4259
- if ((flags & BLOCK_EFFECT) !== 0)
4260
- this.#maybe_dirty_effects.add(effect);
4261
- update_effect(effect);
4262
- }
4263
- var child = effect.first;
4264
- if (child !== null) {
4265
- effect = child;
4266
- continue;
4267
- }
4268
- }
4269
- while (effect !== null) {
4270
- var next2 = effect.next;
4271
- if (next2 !== null) {
4272
- effect = next2;
4273
- break;
4274
- }
4275
- effect = effect.parent;
4276
- }
4277
- }
4278
- }
4279
- #defer_effects(effects) {
4280
- for (var i = 0;i < effects.length; i += 1) {
4281
- defer_effect(effects[i], this.#dirty_effects, this.#maybe_dirty_effects);
4282
- }
4283
- }
4284
- capture(source2, old_value) {
4285
- if (old_value !== UNINITIALIZED && !this.previous.has(source2)) {
4286
- this.previous.set(source2, old_value);
4287
- }
4288
- if ((source2.f & ERROR_VALUE) === 0) {
4289
- this.current.set(source2, source2.v);
4290
- batch_values?.set(source2, source2.v);
4291
- }
4292
- }
4293
- activate() {
4294
- current_batch = this;
4295
- }
4296
- deactivate() {
4297
- current_batch = null;
4298
- batch_values = null;
4299
- }
4300
- flush() {
4301
- var source_stacks2 = true_default ? new Set : null;
4302
- try {
4303
- is_processing = true;
4304
- current_batch = this;
4305
- this.#process();
4306
- } finally {
4307
- flush_count = 0;
4308
- last_scheduled_effect = null;
4309
- collected_effects = null;
4310
- legacy_updates = null;
4311
- is_processing = false;
4312
- current_batch = null;
4313
- batch_values = null;
4314
- old_values.clear();
4315
- if (true_default) {
4316
- for (const source2 of source_stacks2) {
4317
- source2.updated = null;
4318
- }
4319
- }
4320
- }
4321
- }
4322
- discard() {
4323
- for (const fn of this.#discard_callbacks)
4324
- fn(this);
4325
- this.#discard_callbacks.clear();
4326
- batches.delete(this);
4327
- }
4328
- #commit() {
4329
- for (const batch of batches) {
4330
- var is_earlier = batch.id < this.id;
4331
- var sources = [];
4332
- for (const [source3, value] of this.current) {
4333
- if (batch.current.has(source3)) {
4334
- if (is_earlier && value !== batch.current.get(source3)) {
4335
- batch.current.set(source3, value);
4336
- } else {
4337
- continue;
4338
- }
4339
- }
4340
- sources.push(source3);
4341
- }
4342
- var others = [...batch.current.keys()].filter((s) => !this.current.has(s));
4343
- if (others.length === 0) {
4344
- if (is_earlier) {
4345
- batch.discard();
4346
- }
4347
- } else if (sources.length > 0) {
4348
- if (true_default) {
4349
- invariant(batch.#roots.length === 0, "Batch has scheduled roots");
4350
- }
4351
- batch.activate();
4352
- var marked2 = new Set;
4353
- var checked = new Map;
4354
- for (var source2 of sources) {
4355
- mark_effects(source2, others, marked2, checked);
4356
- }
4357
- if (batch.#roots.length > 0) {
4358
- batch.apply();
4359
- for (var root of batch.#roots) {
4360
- batch.#traverse(root, [], []);
4361
- }
4362
- batch.#roots = [];
4363
- }
4364
- batch.deactivate();
4365
- }
4366
- }
4367
- }
4368
- increment(blocking) {
4369
- this.#pending += 1;
4370
- if (blocking)
4371
- this.#blocking_pending += 1;
4372
- }
4373
- decrement(blocking, skip) {
4374
- this.#pending -= 1;
4375
- if (blocking)
4376
- this.#blocking_pending -= 1;
4377
- if (this.#decrement_queued || skip)
4378
- return;
4379
- this.#decrement_queued = true;
4380
- queue_micro_task(() => {
4381
- this.#decrement_queued = false;
4382
- this.flush();
4383
- });
4384
- }
4385
- transfer_effects(dirty_effects, maybe_dirty_effects) {
4386
- for (const e of dirty_effects) {
4387
- this.#dirty_effects.add(e);
4388
- }
4389
- for (const e of maybe_dirty_effects) {
4390
- this.#maybe_dirty_effects.add(e);
4391
- }
4392
- dirty_effects.clear();
4393
- maybe_dirty_effects.clear();
4394
- }
4395
- oncommit(fn) {
4396
- this.#commit_callbacks.add(fn);
4397
- }
4398
- ondiscard(fn) {
4399
- this.#discard_callbacks.add(fn);
3478
+ // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/dom/blocks/boundary.js
3479
+ var flags = EFFECT_TRANSPARENT | EFFECT_PRESERVED;
3480
+
3481
+ // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/reactivity/deriveds.js
3482
+ var recent_async_deriveds = new Set;
3483
+
3484
+ // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/reactivity/sources.js
3485
+ var eager_effects = new Set;
3486
+ var old_values = new Map;
3487
+ // node_modules/.bun/inside-out-async@2.0.2/node_modules/inside-out-async/dist/index.mjs
3488
+ function withResolvers() {
3489
+ let reject;
3490
+ let resolve;
3491
+ const promise = new Promise((resolveFunc, rejectFunc) => {
3492
+ resolve = resolveFunc;
3493
+ reject = rejectFunc;
3494
+ });
3495
+ return {
3496
+ promise,
3497
+ reject,
3498
+ resolve
3499
+ };
3500
+ }
3501
+
3502
+ // src/lib/client/utils/flag.ts
3503
+ class Flag {
3504
+ promise;
3505
+ resolve;
3506
+ reject;
3507
+ constructor() {
3508
+ const { promise, resolve, reject } = withResolvers();
3509
+ this.promise = promise;
3510
+ this.resolve = resolve;
3511
+ this.reject = reject;
4400
3512
  }
4401
- settled() {
4402
- return (this.#deferred ??= deferred()).promise;
3513
+ then(onfulfilled, onrejected) {
3514
+ return this.promise.then(onfulfilled, onrejected);
4403
3515
  }
4404
- static ensure() {
4405
- if (current_batch === null) {
4406
- const batch = current_batch = new Batch;
4407
- if (!is_processing) {
4408
- batches.add(current_batch);
4409
- if (!is_flushing_sync) {
4410
- queue_micro_task(() => {
4411
- if (current_batch !== batch) {
4412
- return;
4413
- }
4414
- batch.flush();
4415
- });
4416
- }
4417
- }
4418
- }
4419
- return current_batch;
3516
+ catch(onrejected) {
3517
+ return this.promise.catch(onrejected);
4420
3518
  }
4421
- apply() {
4422
- if (!async_mode_flag || !this.is_fork && batches.size === 1) {
4423
- batch_values = null;
4424
- return;
4425
- }
4426
- batch_values = new Map(this.current);
4427
- for (const batch of batches) {
4428
- if (batch === this || batch.is_fork)
4429
- continue;
4430
- for (const [source2, previous] of batch.previous) {
4431
- if (!batch_values.has(source2)) {
4432
- batch_values.set(source2, previous);
4433
- }
4434
- }
4435
- }
3519
+ finally(onfinally) {
3520
+ return this.promise.finally(onfinally);
4436
3521
  }
4437
- schedule(effect) {
4438
- last_scheduled_effect = effect;
4439
- if (effect.b?.is_pending && (effect.f & (EFFECT | RENDER_EFFECT | MANAGED_EFFECT)) !== 0 && (effect.f & REACTION_RAN) === 0) {
4440
- effect.b.defer_effect(effect);
4441
- return;
4442
- }
4443
- var e = effect;
4444
- while (e.parent !== null) {
4445
- e = e.parent;
4446
- var flags = e.f;
4447
- if (collected_effects !== null && e === active_effect) {
4448
- if (async_mode_flag)
4449
- return;
4450
- if ((active_reaction === null || (active_reaction.f & DERIVED) === 0) && !legacy_is_updating_store) {
4451
- return;
4452
- }
4453
- }
4454
- if ((flags & (ROOT_EFFECT | BRANCH_EFFECT)) !== 0) {
4455
- if ((flags & CLEAN) === 0) {
4456
- return;
4457
- }
4458
- e.f ^= CLEAN;
4459
- }
4460
- }
4461
- this.#roots.push(e);
3522
+ toPromise() {
3523
+ return this.promise;
4462
3524
  }
3525
+ [Symbol.toStringTag] = "Flag";
4463
3526
  }
4464
- function infinite_loop_guard() {
4465
- if (true_default) {
4466
- var updates = new Map;
4467
- for (const source2 of current_batch.current.keys()) {
4468
- for (const [stack, update2] of source2.updated ?? []) {
4469
- var entry = updates.get(stack);
4470
- if (!entry) {
4471
- entry = { error: update2.error, count: 0 };
4472
- updates.set(stack, entry);
4473
- }
4474
- entry.count += update2.count;
4475
- }
4476
- }
4477
- for (const update2 of updates.values()) {
4478
- if (update2.error) {
4479
- console.error(update2.error);
4480
- }
4481
- }
3527
+
3528
+ // src/lib/client/utils/future-value.ts
3529
+ class FutureValue {
3530
+ hasValue = new Flag;
3531
+ currentValue;
3532
+ setValue(value) {
3533
+ this.currentValue = value;
3534
+ this.hasValue.resolve();
4482
3535
  }
4483
- try {
4484
- effect_update_depth_exceeded();
4485
- } catch (error) {
4486
- if (true_default) {
4487
- define_property(error, "stack", { value: "" });
4488
- }
4489
- invoke_error_boundary(error, last_scheduled_effect);
3536
+ cleanup(reason) {
3537
+ this.hasValue.reject(reason);
4490
3538
  }
4491
- }
4492
- var eager_block_effects = null;
4493
- function flush_queued_effects(effects) {
4494
- var length = effects.length;
4495
- if (length === 0)
4496
- return;
4497
- var i = 0;
4498
- while (i < length) {
4499
- var effect = effects[i++];
4500
- if ((effect.f & (DESTROYED | INERT)) === 0 && is_dirty(effect)) {
4501
- eager_block_effects = new Set;
4502
- update_effect(effect);
4503
- if (effect.deps === null && effect.first === null && effect.nodes === null && effect.teardown === null && effect.ac === null) {
4504
- unlink_effect(effect);
4505
- }
4506
- if (eager_block_effects?.size > 0) {
4507
- old_values.clear();
4508
- for (const e of eager_block_effects) {
4509
- if ((e.f & (DESTROYED | INERT)) !== 0)
4510
- continue;
4511
- const ordered_effects = [e];
4512
- let ancestor = e.parent;
4513
- while (ancestor !== null) {
4514
- if (eager_block_effects.has(ancestor)) {
4515
- eager_block_effects.delete(ancestor);
4516
- ordered_effects.push(ancestor);
4517
- }
4518
- ancestor = ancestor.parent;
4519
- }
4520
- for (let j = ordered_effects.length - 1;j >= 0; j--) {
4521
- const e2 = ordered_effects[j];
4522
- if ((e2.f & (DESTROYED | INERT)) !== 0)
4523
- continue;
4524
- update_effect(e2);
4525
- }
4526
- }
4527
- eager_block_effects.clear();
4528
- }
4529
- }
3539
+ getCurrentValue() {
3540
+ return this.currentValue;
4530
3541
  }
4531
- eager_block_effects = null;
4532
- }
4533
- function mark_effects(value, sources, marked2, checked) {
4534
- if (marked2.has(value))
4535
- return;
4536
- marked2.add(value);
4537
- if (value.reactions !== null) {
4538
- for (const reaction of value.reactions) {
4539
- const flags = reaction.f;
4540
- if ((flags & DERIVED) !== 0) {
4541
- mark_effects(reaction, sources, marked2, checked);
4542
- } else if ((flags & (ASYNC | BLOCK_EFFECT)) !== 0 && (flags & DIRTY) === 0 && depends_on(reaction, sources, checked)) {
4543
- set_signal_status(reaction, DIRTY);
4544
- schedule_effect(reaction);
4545
- }
4546
- }
4547
- }
4548
- }
4549
- function depends_on(reaction, sources, checked) {
4550
- const depends = checked.get(reaction);
4551
- if (depends !== undefined)
4552
- return depends;
4553
- if (reaction.deps !== null) {
4554
- for (const dep of reaction.deps) {
4555
- if (includes.call(sources, dep)) {
4556
- return true;
4557
- }
4558
- if ((dep.f & DERIVED) !== 0 && depends_on(dep, sources, checked)) {
4559
- checked.set(dep, true);
4560
- return true;
4561
- }
4562
- }
3542
+ async toPromise() {
3543
+ await this.hasValue;
3544
+ return this.currentValue;
4563
3545
  }
4564
- checked.set(reaction, false);
4565
- return false;
4566
- }
4567
- function schedule_effect(effect) {
4568
- current_batch.schedule(effect);
4569
- }
4570
- function reset_branch(effect, tracked) {
4571
- if ((effect.f & BRANCH_EFFECT) !== 0 && (effect.f & CLEAN) !== 0) {
4572
- return;
3546
+ then(onfulfilled, onrejected) {
3547
+ return this.toPromise().then(onfulfilled, onrejected);
4573
3548
  }
4574
- if ((effect.f & DIRTY) !== 0) {
4575
- tracked.d.push(effect);
4576
- } else if ((effect.f & MAYBE_DIRTY) !== 0) {
4577
- tracked.m.push(effect);
3549
+ catch(onrejected) {
3550
+ return this.toPromise().catch(onrejected);
4578
3551
  }
4579
- set_signal_status(effect, CLEAN);
4580
- var e = effect.first;
4581
- while (e !== null) {
4582
- reset_branch(e, tracked);
4583
- e = e.next;
3552
+ finally(onfinally) {
3553
+ return this.toPromise().finally(onfinally);
4584
3554
  }
3555
+ [Symbol.toStringTag] = "FutureValue";
4585
3556
  }
4586
- function reset_all(effect) {
4587
- set_signal_status(effect, CLEAN);
4588
- var e = effect.first;
4589
- while (e !== null) {
4590
- reset_all(e);
4591
- e = e.next;
3557
+
3558
+ // src/lib/client/utils/get-domain-name.ts
3559
+ var getDomainName = (url) => {
3560
+ try {
3561
+ const urlObj = new URL(url);
3562
+ return urlObj.hostname;
3563
+ } catch {
3564
+ return url;
4592
3565
  }
4593
- }
3566
+ };
4594
3567
 
4595
- // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/reactivity/create-subscriber.js
4596
- function createSubscriber(start) {
4597
- let subscribers = 0;
4598
- let version = source(0);
4599
- let stop;
4600
- if (true_default) {
4601
- tag2(version, "createSubscriber version");
4602
- }
4603
- return () => {
4604
- if (effect_tracking()) {
4605
- get(version);
4606
- render_effect(() => {
4607
- if (subscribers === 0) {
4608
- stop = untrack(() => start(() => increment(version)));
4609
- }
4610
- subscribers += 1;
4611
- return () => {
4612
- queue_micro_task(() => {
4613
- subscribers -= 1;
4614
- if (subscribers === 0) {
4615
- stop?.();
4616
- stop = undefined;
4617
- increment(version);
4618
- }
4619
- });
4620
- };
4621
- });
4622
- }
4623
- };
3568
+ // src/lib/client/utils/html-to-text.ts
3569
+ function htmlToText(html3) {
3570
+ const text2 = html3.replace(/<[^>]*>/g, "").replace(/&nbsp;/g, " ").replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"');
3571
+ return text2;
4624
3572
  }
4625
3573
 
4626
- // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/dom/blocks/boundary.js
4627
- var flags = EFFECT_TRANSPARENT | EFFECT_PRESERVED;
4628
- class Boundary {
4629
- parent;
4630
- is_pending = false;
4631
- transform_error;
4632
- #anchor;
4633
- #hydrate_open = hydrating ? hydrate_node : null;
4634
- #props;
4635
- #children;
4636
- #effect;
4637
- #main_effect = null;
4638
- #pending_effect = null;
4639
- #failed_effect = null;
4640
- #offscreen_fragment = null;
4641
- #local_pending_count = 0;
4642
- #pending_count = 0;
4643
- #pending_count_update_queued = false;
4644
- #dirty_effects = new Set;
4645
- #maybe_dirty_effects = new Set;
4646
- #effect_pending = null;
4647
- #effect_pending_subscriber = createSubscriber(() => {
4648
- this.#effect_pending = source(this.#local_pending_count);
4649
- if (true_default) {
4650
- tag2(this.#effect_pending, "$effect.pending()");
4651
- }
4652
- return () => {
4653
- this.#effect_pending = null;
4654
- };
4655
- });
4656
- constructor(node, props, children, transform_error) {
4657
- this.#anchor = node;
4658
- this.#props = props;
4659
- this.#children = (anchor) => {
4660
- var effect = active_effect;
4661
- effect.b = this;
4662
- effect.f |= BOUNDARY_EFFECT;
4663
- children(anchor);
4664
- };
4665
- this.parent = active_effect.b;
4666
- this.transform_error = transform_error ?? this.parent?.transform_error ?? ((e) => e);
4667
- this.#effect = block2(() => {
4668
- if (hydrating) {
4669
- const comment = this.#hydrate_open;
4670
- hydrate_next();
4671
- const server_rendered_pending = comment.data === HYDRATION_START_ELSE;
4672
- const server_rendered_failed = comment.data.startsWith(HYDRATION_START_FAILED);
4673
- if (server_rendered_failed) {
4674
- const serialized_error = JSON.parse(comment.data.slice(HYDRATION_START_FAILED.length));
4675
- this.#hydrate_failed_content(serialized_error);
4676
- } else if (server_rendered_pending) {
4677
- this.#hydrate_pending_content();
4678
- } else {
4679
- this.#hydrate_resolved_content();
4680
- }
4681
- } else {
4682
- this.#render();
3574
+ // src/lib/client/chat-result-builder.ts
3575
+ var mapSseReference = ({
3576
+ url,
3577
+ considered,
3578
+ title,
3579
+ description,
3580
+ summary
3581
+ }) => {
3582
+ const domainName = getDomainName(url);
3583
+ const desc = description || summary;
3584
+ return {
3585
+ url,
3586
+ considered,
3587
+ referenceIndex: {},
3588
+ score: 0,
3589
+ metadata: {},
3590
+ display: {
3591
+ card: {
3592
+ title,
3593
+ description: desc,
3594
+ badge: url
3595
+ },
3596
+ listItem: {
3597
+ title,
3598
+ badge: domainName
4683
3599
  }
4684
- }, flags);
4685
- if (hydrating) {
4686
- this.#anchor = hydrate_node;
4687
3600
  }
3601
+ };
3602
+ };
3603
+
3604
+ class ChatResultBuilder {
3605
+ options;
3606
+ store;
3607
+ content = new FutureValue;
3608
+ backendSendsMappedRefs = false;
3609
+ constructor(options2) {
3610
+ this.options = options2;
3611
+ this.store = writable({
3612
+ id: options2.id,
3613
+ state: "loading",
3614
+ errors: [],
3615
+ type: "bot",
3616
+ time: new Date().toISOString(),
3617
+ message: { markdown: "", html: "", text: "" },
3618
+ references: { all: [], used: [], unused: [] },
3619
+ retrievalQuestion: options2.userQuestion
3620
+ });
4688
3621
  }
4689
- #hydrate_resolved_content() {
4690
- try {
4691
- this.#main_effect = branch(() => this.#children(this.#anchor));
4692
- } catch (error) {
4693
- this.error(error);
4694
- }
3622
+ pushError(error) {
3623
+ this.options.onError?.(error);
3624
+ this.store.update((current) => ({ ...current, errors: [...current.errors, error] }));
4695
3625
  }
4696
- #hydrate_failed_content(error) {
4697
- const failed = this.#props.failed;
4698
- if (!failed)
4699
- return;
4700
- this.#failed_effect = branch(() => {
4701
- failed(this.#anchor, () => error, () => () => {});
4702
- });
3626
+ updateRequestId(id) {
3627
+ this.store.update((current) => ({
3628
+ ...current,
3629
+ id
3630
+ }));
4703
3631
  }
4704
- #hydrate_pending_content() {
4705
- const pending = this.#props.pending;
4706
- if (!pending)
4707
- return;
4708
- this.is_pending = true;
4709
- this.#pending_effect = branch(() => pending(this.#anchor));
4710
- queue_micro_task(() => {
4711
- var fragment = this.#offscreen_fragment = document.createDocumentFragment();
4712
- var anchor = create_text();
4713
- fragment.append(anchor);
4714
- this.#main_effect = this.#run(() => {
4715
- return branch(() => this.#children(anchor));
4716
- });
4717
- if (this.#pending_count === 0) {
4718
- this.#anchor.before(fragment);
4719
- this.#offscreen_fragment = null;
4720
- pause_effect(this.#pending_effect, () => {
4721
- this.#pending_effect = null;
4722
- });
4723
- this.#resolve(current_batch);
4724
- }
3632
+ updateText(text2) {
3633
+ this.store.update((current) => {
3634
+ const nextMarkdown = current.message.markdown + text2;
3635
+ const html3 = this.options.markdownRenderer.toHTML(nextMarkdown, current.references);
3636
+ return {
3637
+ ...current,
3638
+ state: "streaming",
3639
+ message: { markdown: nextMarkdown, html: html3, text: "" }
3640
+ };
4725
3641
  });
4726
3642
  }
4727
- #render() {
4728
- try {
4729
- this.is_pending = this.has_pending_snippet();
4730
- this.#pending_count = 0;
4731
- this.#local_pending_count = 0;
4732
- this.#main_effect = branch(() => {
4733
- this.#children(this.#anchor);
4734
- });
4735
- if (this.#pending_count > 0) {
4736
- var fragment = this.#offscreen_fragment = document.createDocumentFragment();
4737
- move_effect(this.#main_effect, fragment);
4738
- const pending = this.#props.pending;
4739
- this.#pending_effect = branch(() => pending(this.#anchor));
4740
- } else {
4741
- this.#resolve(current_batch);
4742
- }
4743
- } catch (error) {
4744
- this.error(error);
4745
- }
4746
- }
4747
- #resolve(batch) {
4748
- this.is_pending = false;
4749
- batch.transfer_effects(this.#dirty_effects, this.#maybe_dirty_effects);
3643
+ finishMessage() {
3644
+ this.store.update((current) => {
3645
+ const message = {
3646
+ ...current,
3647
+ state: "done"
3648
+ };
3649
+ message.references.unused = message.references.all.filter((reference) => reference.referenceIndex.used === undefined);
3650
+ message.message.text = htmlToText(message.message.html);
3651
+ this.options?.onFinish?.(message);
3652
+ this.content.setValue(message);
3653
+ return message;
3654
+ });
4750
3655
  }
4751
- defer_effect(effect) {
4752
- defer_effect(effect, this.#dirty_effects, this.#maybe_dirty_effects);
4753
- }
4754
- is_rendered() {
4755
- return !this.is_pending && (!this.parent || this.parent.is_rendered());
4756
- }
4757
- has_pending_snippet() {
4758
- return !!this.#props.pending;
4759
- }
4760
- #run(fn) {
4761
- var previous_effect = active_effect;
4762
- var previous_reaction = active_reaction;
4763
- var previous_ctx = component_context;
4764
- set_active_effect(this.#effect);
4765
- set_active_reaction(this.#effect);
4766
- set_component_context(this.#effect.ctx);
4767
- try {
4768
- Batch.ensure();
4769
- return fn();
4770
- } catch (e) {
4771
- handle_error(e);
4772
- return null;
4773
- } finally {
4774
- set_active_effect(previous_effect);
4775
- set_active_reaction(previous_reaction);
4776
- set_component_context(previous_ctx);
4777
- }
4778
- }
4779
- #update_pending_count(d, batch) {
4780
- if (!this.has_pending_snippet()) {
4781
- if (this.parent) {
4782
- this.parent.#update_pending_count(d, batch);
4783
- }
4784
- return;
4785
- }
4786
- this.#pending_count += d;
4787
- if (this.#pending_count === 0) {
4788
- this.#resolve(batch);
4789
- if (this.#pending_effect) {
4790
- pause_effect(this.#pending_effect, () => {
4791
- this.#pending_effect = null;
4792
- });
4793
- }
4794
- if (this.#offscreen_fragment) {
4795
- this.#anchor.before(this.#offscreen_fragment);
4796
- this.#offscreen_fragment = null;
4797
- }
4798
- }
4799
- }
4800
- update_pending_count(d, batch) {
4801
- this.#update_pending_count(d, batch);
4802
- this.#local_pending_count += d;
4803
- if (!this.#effect_pending || this.#pending_count_update_queued)
4804
- return;
4805
- this.#pending_count_update_queued = true;
4806
- queue_micro_task(() => {
4807
- this.#pending_count_update_queued = false;
4808
- if (this.#effect_pending) {
4809
- internal_set(this.#effect_pending, this.#local_pending_count);
4810
- }
4811
- });
4812
- }
4813
- get_effect_pending() {
4814
- this.#effect_pending_subscriber();
4815
- return get(this.#effect_pending);
4816
- }
4817
- error(error) {
4818
- var onerror = this.#props.onerror;
4819
- let failed = this.#props.failed;
4820
- if (!onerror && !failed) {
4821
- throw error;
4822
- }
4823
- if (this.#main_effect) {
4824
- destroy_effect(this.#main_effect);
4825
- this.#main_effect = null;
4826
- }
4827
- if (this.#pending_effect) {
4828
- destroy_effect(this.#pending_effect);
4829
- this.#pending_effect = null;
4830
- }
4831
- if (this.#failed_effect) {
4832
- destroy_effect(this.#failed_effect);
4833
- this.#failed_effect = null;
4834
- }
4835
- if (hydrating) {
4836
- set_hydrate_node(this.#hydrate_open);
4837
- next();
4838
- set_hydrate_node(skip_nodes());
4839
- }
4840
- var did_reset = false;
4841
- var calling_on_error = false;
4842
- const reset = () => {
4843
- if (did_reset) {
4844
- svelte_boundary_reset_noop();
4845
- return;
4846
- }
4847
- did_reset = true;
4848
- if (calling_on_error) {
4849
- svelte_boundary_reset_onerror();
4850
- }
4851
- if (this.#failed_effect !== null) {
4852
- pause_effect(this.#failed_effect, () => {
4853
- this.#failed_effect = null;
4854
- });
4855
- }
4856
- this.#run(() => {
4857
- this.#render();
4858
- });
4859
- };
4860
- const handle_error_result = (transformed_error) => {
4861
- try {
4862
- calling_on_error = true;
4863
- onerror?.(transformed_error, reset);
4864
- calling_on_error = false;
4865
- } catch (error2) {
4866
- invoke_error_boundary(error2, this.#effect && this.#effect.parent);
4867
- }
4868
- if (failed) {
4869
- this.#failed_effect = this.#run(() => {
4870
- try {
4871
- return branch(() => {
4872
- var effect = active_effect;
4873
- effect.b = this;
4874
- effect.f |= BOUNDARY_EFFECT;
4875
- failed(this.#anchor, () => transformed_error, () => reset);
4876
- });
4877
- } catch (error2) {
4878
- invoke_error_boundary(error2, this.#effect.parent);
4879
- return null;
4880
- }
4881
- });
4882
- }
4883
- };
4884
- queue_micro_task(() => {
4885
- var result;
4886
- try {
4887
- result = this.transform_error(error);
4888
- } catch (e) {
4889
- invoke_error_boundary(e, this.#effect && this.#effect.parent);
4890
- return;
4891
- }
4892
- if (result !== null && typeof result === "object" && typeof result.then === "function") {
4893
- result.then(handle_error_result, (e) => invoke_error_boundary(e, this.#effect && this.#effect.parent));
4894
- } else {
4895
- handle_error_result(result);
4896
- }
4897
- });
4898
- }
4899
- }
4900
-
4901
- // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/reactivity/deriveds.js
4902
- var reactivity_loss_tracker = null;
4903
- var recent_async_deriveds = new Set;
4904
- function destroy_derived_effects(derived2) {
4905
- var effects = derived2.effects;
4906
- if (effects !== null) {
4907
- derived2.effects = null;
4908
- for (var i = 0;i < effects.length; i += 1) {
4909
- destroy_effect(effects[i]);
4910
- }
4911
- }
4912
- }
4913
- var stack = [];
4914
- function get_derived_parent_effect(derived2) {
4915
- var parent = derived2.parent;
4916
- while (parent !== null) {
4917
- if ((parent.f & DERIVED) === 0) {
4918
- return (parent.f & DESTROYED) === 0 ? parent : null;
4919
- }
4920
- parent = parent.parent;
4921
- }
4922
- return null;
4923
- }
4924
- function execute_derived(derived2) {
4925
- var value;
4926
- var prev_active_effect = active_effect;
4927
- set_active_effect(get_derived_parent_effect(derived2));
4928
- if (true_default) {
4929
- let prev_eager_effects = eager_effects;
4930
- set_eager_effects(new Set);
4931
- try {
4932
- if (includes.call(stack, derived2)) {
4933
- derived_references_self();
4934
- }
4935
- stack.push(derived2);
4936
- derived2.f &= ~WAS_MARKED;
4937
- destroy_derived_effects(derived2);
4938
- value = update_reaction(derived2);
4939
- } finally {
4940
- set_active_effect(prev_active_effect);
4941
- set_eager_effects(prev_eager_effects);
4942
- stack.pop();
4943
- }
4944
- } else {
4945
- try {
4946
- derived2.f &= ~WAS_MARKED;
4947
- destroy_derived_effects(derived2);
4948
- value = update_reaction(derived2);
4949
- } finally {
4950
- set_active_effect(prev_active_effect);
4951
- }
4952
- }
4953
- return value;
4954
- }
4955
- function update_derived(derived2) {
4956
- var old_value = derived2.v;
4957
- var value = execute_derived(derived2);
4958
- if (!derived2.equals(value)) {
4959
- derived2.wv = increment_write_version();
4960
- if (!current_batch?.is_fork || derived2.deps === null) {
4961
- derived2.v = value;
4962
- current_batch?.capture(derived2, old_value);
4963
- if (derived2.deps === null) {
4964
- set_signal_status(derived2, CLEAN);
4965
- return;
4966
- }
4967
- }
4968
- }
4969
- if (is_destroying_effect) {
4970
- return;
4971
- }
4972
- if (batch_values !== null) {
4973
- if (effect_tracking() || current_batch?.is_fork) {
4974
- batch_values.set(derived2, value);
4975
- }
4976
- } else {
4977
- update_derived_status(derived2);
4978
- }
4979
- }
4980
- function freeze_derived_effects(derived2) {
4981
- if (derived2.effects === null)
4982
- return;
4983
- for (const e of derived2.effects) {
4984
- if (e.teardown || e.ac) {
4985
- e.teardown?.();
4986
- e.ac?.abort(STALE_REACTION);
4987
- e.teardown = noop;
4988
- e.ac = null;
4989
- remove_reactions(e, 0);
4990
- destroy_effect_children(e);
4991
- }
4992
- }
4993
- }
4994
- function unfreeze_derived_effects(derived2) {
4995
- if (derived2.effects === null)
4996
- return;
4997
- for (const e of derived2.effects) {
4998
- if (e.teardown) {
4999
- update_effect(e);
5000
- }
5001
- }
5002
- }
5003
-
5004
- // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/reactivity/sources.js
5005
- var eager_effects = new Set;
5006
- var old_values = new Map;
5007
- function set_eager_effects(v) {
5008
- eager_effects = v;
5009
- }
5010
- var eager_effects_deferred = false;
5011
- function set_eager_effects_deferred() {
5012
- eager_effects_deferred = true;
5013
- }
5014
- function source(v, stack2) {
5015
- var signal = {
5016
- f: 0,
5017
- v,
5018
- reactions: null,
5019
- equals,
5020
- rv: 0,
5021
- wv: 0
5022
- };
5023
- if (true_default && tracing_mode_flag) {
5024
- signal.created = stack2 ?? get_error("created at");
5025
- signal.updated = null;
5026
- signal.set_during_effect = false;
5027
- signal.trace = null;
5028
- }
5029
- return signal;
5030
- }
5031
- function state(v, stack2) {
5032
- const s = source(v, stack2);
5033
- push_reaction_value(s);
5034
- return s;
5035
- }
5036
- function set(source2, value, should_proxy = false) {
5037
- if (active_reaction !== null && (!untracking || (active_reaction.f & EAGER_EFFECT) !== 0) && is_runes() && (active_reaction.f & (DERIVED | BLOCK_EFFECT | ASYNC | EAGER_EFFECT)) !== 0 && (current_sources === null || !includes.call(current_sources, source2))) {
5038
- state_unsafe_mutation();
5039
- }
5040
- let new_value = should_proxy ? proxy(value) : value;
5041
- if (true_default) {
5042
- tag_proxy(new_value, source2.label);
5043
- }
5044
- return internal_set(source2, new_value, legacy_updates);
5045
- }
5046
- function internal_set(source2, value, updated_during_traversal = null) {
5047
- if (!source2.equals(value)) {
5048
- var old_value = source2.v;
5049
- if (is_destroying_effect) {
5050
- old_values.set(source2, value);
5051
- } else {
5052
- old_values.set(source2, old_value);
5053
- }
5054
- source2.v = value;
5055
- var batch = Batch.ensure();
5056
- batch.capture(source2, old_value);
5057
- if (true_default) {
5058
- if (tracing_mode_flag || active_effect !== null) {
5059
- source2.updated ??= new Map;
5060
- const count = (source2.updated.get("")?.count ?? 0) + 1;
5061
- source2.updated.set("", { error: null, count });
5062
- if (tracing_mode_flag || count > 5) {
5063
- const error = get_error("updated at");
5064
- if (error !== null) {
5065
- let entry = source2.updated.get(error.stack);
5066
- if (!entry) {
5067
- entry = { error, count: 0 };
5068
- source2.updated.set(error.stack, entry);
5069
- }
5070
- entry.count++;
5071
- }
5072
- }
5073
- }
5074
- if (active_effect !== null) {
5075
- source2.set_during_effect = true;
5076
- }
5077
- }
5078
- if ((source2.f & DERIVED) !== 0) {
5079
- const derived2 = source2;
5080
- if ((source2.f & DIRTY) !== 0) {
5081
- execute_derived(derived2);
5082
- }
5083
- if (batch_values === null) {
5084
- update_derived_status(derived2);
5085
- }
5086
- }
5087
- source2.wv = increment_write_version();
5088
- mark_reactions(source2, DIRTY, updated_during_traversal);
5089
- if (is_runes() && active_effect !== null && (active_effect.f & CLEAN) !== 0 && (active_effect.f & (BRANCH_EFFECT | ROOT_EFFECT)) === 0) {
5090
- if (untracked_writes === null) {
5091
- set_untracked_writes([source2]);
5092
- } else {
5093
- untracked_writes.push(source2);
5094
- }
5095
- }
5096
- if (!batch.is_fork && eager_effects.size > 0 && !eager_effects_deferred) {
5097
- flush_eager_effects();
5098
- }
5099
- }
5100
- return value;
5101
- }
5102
- function flush_eager_effects() {
5103
- eager_effects_deferred = false;
5104
- for (const effect of eager_effects) {
5105
- if ((effect.f & CLEAN) !== 0) {
5106
- set_signal_status(effect, MAYBE_DIRTY);
5107
- }
5108
- if (is_dirty(effect)) {
5109
- update_effect(effect);
5110
- }
5111
- }
5112
- eager_effects.clear();
5113
- }
5114
- function increment(source2) {
5115
- set(source2, source2.v + 1);
5116
- }
5117
- function mark_reactions(signal, status, updated_during_traversal) {
5118
- var reactions = signal.reactions;
5119
- if (reactions === null)
5120
- return;
5121
- var runes = is_runes();
5122
- var length = reactions.length;
5123
- for (var i = 0;i < length; i++) {
5124
- var reaction = reactions[i];
5125
- var flags2 = reaction.f;
5126
- if (!runes && reaction === active_effect)
5127
- continue;
5128
- if (true_default && (flags2 & EAGER_EFFECT) !== 0) {
5129
- eager_effects.add(reaction);
5130
- continue;
5131
- }
5132
- var not_dirty = (flags2 & DIRTY) === 0;
5133
- if (not_dirty) {
5134
- set_signal_status(reaction, status);
5135
- }
5136
- if ((flags2 & DERIVED) !== 0) {
5137
- var derived2 = reaction;
5138
- batch_values?.delete(derived2);
5139
- if ((flags2 & WAS_MARKED) === 0) {
5140
- if (flags2 & CONNECTED) {
5141
- reaction.f |= WAS_MARKED;
3656
+ addReference(reference) {
3657
+ this.store.update((current) => {
3658
+ const allRefs = current.references.all;
3659
+ const nextIndex = allRefs.length;
3660
+ const nextAllRefs = [
3661
+ ...allRefs,
3662
+ {
3663
+ ...reference,
3664
+ referenceIndex: { all: nextIndex }
5142
3665
  }
5143
- mark_reactions(derived2, MAYBE_DIRTY, updated_during_traversal);
5144
- }
5145
- } else if (not_dirty) {
5146
- var effect = reaction;
5147
- if ((flags2 & BLOCK_EFFECT) !== 0 && eager_block_effects !== null) {
5148
- eager_block_effects.add(effect);
5149
- }
5150
- if (updated_during_traversal !== null) {
5151
- updated_during_traversal.push(effect);
5152
- } else {
5153
- schedule_effect(effect);
5154
- }
5155
- }
5156
- }
5157
- }
5158
-
5159
- // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/legacy.js
5160
- var captured_signals = null;
5161
-
5162
- // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js
5163
- function without_reactive_context(fn) {
5164
- var previous_reaction = active_reaction;
5165
- var previous_effect = active_effect;
5166
- set_active_reaction(null);
5167
- set_active_effect(null);
5168
- try {
5169
- return fn();
5170
- } finally {
5171
- set_active_reaction(previous_reaction);
5172
- set_active_effect(previous_effect);
5173
- }
5174
- }
5175
-
5176
- // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/runtime.js
5177
- var is_updating_effect = false;
5178
- var is_destroying_effect = false;
5179
- function set_is_destroying_effect(value) {
5180
- is_destroying_effect = value;
5181
- }
5182
- var active_reaction = null;
5183
- var untracking = false;
5184
- function set_active_reaction(reaction) {
5185
- active_reaction = reaction;
5186
- }
5187
- var active_effect = null;
5188
- function set_active_effect(effect) {
5189
- active_effect = effect;
5190
- }
5191
- var current_sources = null;
5192
- function push_reaction_value(value) {
5193
- if (active_reaction !== null && (!async_mode_flag || (active_reaction.f & DERIVED) !== 0)) {
5194
- if (current_sources === null) {
5195
- current_sources = [value];
5196
- } else {
5197
- current_sources.push(value);
5198
- }
5199
- }
5200
- }
5201
- var new_deps = null;
5202
- var skipped_deps = 0;
5203
- var untracked_writes = null;
5204
- function set_untracked_writes(value) {
5205
- untracked_writes = value;
5206
- }
5207
- var write_version = 1;
5208
- var read_version = 0;
5209
- var update_version = read_version;
5210
- function set_update_version(value) {
5211
- update_version = value;
5212
- }
5213
- function increment_write_version() {
5214
- return ++write_version;
5215
- }
5216
- function is_dirty(reaction) {
5217
- var flags2 = reaction.f;
5218
- if ((flags2 & DIRTY) !== 0) {
5219
- return true;
5220
- }
5221
- if (flags2 & DERIVED) {
5222
- reaction.f &= ~WAS_MARKED;
3666
+ ];
3667
+ return {
3668
+ ...current,
3669
+ references: { used: current.references.used, all: nextAllRefs }
3670
+ };
3671
+ });
5223
3672
  }
5224
- if ((flags2 & MAYBE_DIRTY) !== 0) {
5225
- var dependencies = reaction.deps;
5226
- var length = dependencies.length;
5227
- for (var i = 0;i < length; i++) {
5228
- var dependency = dependencies[i];
5229
- if (is_dirty(dependency)) {
5230
- update_derived(dependency);
5231
- }
5232
- if (dependency.wv > reaction.wv) {
5233
- return true;
5234
- }
5235
- }
5236
- if ((flags2 & CONNECTED) !== 0 && batch_values === null) {
5237
- set_signal_status(reaction, CLEAN);
5238
- }
3673
+ addMappedReference(reference) {
3674
+ this.backendSendsMappedRefs = true;
3675
+ this.addReference(reference);
5239
3676
  }
5240
- return false;
5241
- }
5242
- function schedule_possible_effect_self_invalidation(signal, effect, root = true) {
5243
- var reactions = signal.reactions;
5244
- if (reactions === null)
5245
- return;
5246
- if (!async_mode_flag && current_sources !== null && includes.call(current_sources, signal)) {
5247
- return;
3677
+ addOldReference(oldReference) {
3678
+ if (!this.backendSendsMappedRefs)
3679
+ this.addReference(mapSseReference(oldReference));
5248
3680
  }
5249
- for (var i = 0;i < reactions.length; i++) {
5250
- var reaction = reactions[i];
5251
- if ((reaction.f & DERIVED) !== 0) {
5252
- schedule_possible_effect_self_invalidation(reaction, effect, false);
5253
- } else if (effect === reaction) {
5254
- if (root) {
5255
- set_signal_status(reaction, DIRTY);
5256
- } else if ((reaction.f & CLEAN) !== 0) {
5257
- set_signal_status(reaction, MAYBE_DIRTY);
5258
- }
5259
- schedule_effect(reaction);
5260
- }
5261
- }
5262
- }
5263
- function update_reaction(reaction) {
5264
- var previous_deps = new_deps;
5265
- var previous_skipped_deps = skipped_deps;
5266
- var previous_untracked_writes = untracked_writes;
5267
- var previous_reaction = active_reaction;
5268
- var previous_sources = current_sources;
5269
- var previous_component_context = component_context;
5270
- var previous_untracking = untracking;
5271
- var previous_update_version = update_version;
5272
- var flags2 = reaction.f;
5273
- new_deps = null;
5274
- skipped_deps = 0;
5275
- untracked_writes = null;
5276
- active_reaction = (flags2 & (BRANCH_EFFECT | ROOT_EFFECT)) === 0 ? reaction : null;
5277
- current_sources = null;
5278
- set_component_context(reaction.ctx);
5279
- untracking = false;
5280
- update_version = ++read_version;
5281
- if (reaction.ac !== null) {
5282
- without_reactive_context(() => {
5283
- reaction.ac.abort(STALE_REACTION);
5284
- });
5285
- reaction.ac = null;
3681
+ updateRetrievalQuestion(question) {
3682
+ this.store.update((current) => ({
3683
+ ...current,
3684
+ retrievalQuestion: question
3685
+ }));
5286
3686
  }
5287
- try {
5288
- reaction.f |= REACTION_IS_UPDATING;
5289
- var fn = reaction.fn;
5290
- var result = fn();
5291
- reaction.f |= REACTION_RAN;
5292
- var deps = reaction.deps;
5293
- var is_fork = current_batch?.is_fork;
5294
- if (new_deps !== null) {
5295
- var i;
5296
- if (!is_fork) {
5297
- remove_reactions(reaction, skipped_deps);
5298
- }
5299
- if (deps !== null && skipped_deps > 0) {
5300
- deps.length = skipped_deps + new_deps.length;
5301
- for (i = 0;i < new_deps.length; i++) {
5302
- deps[skipped_deps + i] = new_deps[i];
5303
- }
5304
- } else {
5305
- reaction.deps = deps = new_deps;
5306
- }
5307
- if (effect_tracking() && (reaction.f & CONNECTED) !== 0) {
5308
- for (i = skipped_deps;i < deps.length; i++) {
5309
- (deps[i].reactions ??= []).push(reaction);
5310
- }
5311
- }
5312
- } else if (!is_fork && deps !== null && skipped_deps < deps.length) {
5313
- remove_reactions(reaction, skipped_deps);
5314
- deps.length = skipped_deps;
5315
- }
5316
- if (is_runes() && untracked_writes !== null && !untracking && deps !== null && (reaction.f & (DERIVED | MAYBE_DIRTY | DIRTY)) === 0) {
5317
- for (i = 0;i < untracked_writes.length; i++) {
5318
- schedule_possible_effect_self_invalidation(untracked_writes[i], reaction);
5319
- }
5320
- }
5321
- if (previous_reaction !== null && previous_reaction !== reaction) {
5322
- read_version++;
5323
- if (previous_reaction.deps !== null) {
5324
- for (let i2 = 0;i2 < previous_skipped_deps; i2 += 1) {
5325
- previous_reaction.deps[i2].rv = read_version;
5326
- }
5327
- }
5328
- if (previous_deps !== null) {
5329
- for (const dep of previous_deps) {
5330
- dep.rv = read_version;
5331
- }
5332
- }
5333
- if (untracked_writes !== null) {
5334
- if (previous_untracked_writes === null) {
5335
- previous_untracked_writes = untracked_writes;
5336
- } else {
5337
- previous_untracked_writes.push(...untracked_writes);
5338
- }
5339
- }
5340
- }
5341
- if ((reaction.f & ERROR_VALUE) !== 0) {
5342
- reaction.f ^= ERROR_VALUE;
5343
- }
5344
- return result;
5345
- } catch (error) {
5346
- return handle_error(error);
5347
- } finally {
5348
- reaction.f ^= REACTION_IS_UPDATING;
5349
- new_deps = previous_deps;
5350
- skipped_deps = previous_skipped_deps;
5351
- untracked_writes = previous_untracked_writes;
5352
- active_reaction = previous_reaction;
5353
- current_sources = previous_sources;
5354
- set_component_context(previous_component_context);
5355
- untracking = previous_untracking;
5356
- update_version = previous_update_version;
5357
- }
5358
- }
5359
- function remove_reaction(signal, dependency) {
5360
- let reactions = dependency.reactions;
5361
- if (reactions !== null) {
5362
- var index = index_of.call(reactions, signal);
5363
- if (index !== -1) {
5364
- var new_length = reactions.length - 1;
5365
- if (new_length === 0) {
5366
- reactions = dependency.reactions = null;
5367
- } else {
5368
- reactions[index] = reactions[new_length];
5369
- reactions.pop();
5370
- }
5371
- }
3687
+ setNoFeedback() {
3688
+ this.store.update((current) => ({
3689
+ ...current,
3690
+ noFeedback: true
3691
+ }));
5372
3692
  }
5373
- if (reactions === null && (dependency.f & DERIVED) !== 0 && (new_deps === null || !includes.call(new_deps, dependency))) {
5374
- var derived2 = dependency;
5375
- if ((derived2.f & CONNECTED) !== 0) {
5376
- derived2.f ^= CONNECTED;
5377
- derived2.f &= ~WAS_MARKED;
5378
- }
5379
- update_derived_status(derived2);
5380
- freeze_derived_effects(derived2);
5381
- remove_reactions(derived2, 0);
3693
+ getReadableStore() {
3694
+ return { subscribe: this.store.subscribe };
5382
3695
  }
5383
- }
5384
- function remove_reactions(signal, start_index) {
5385
- var dependencies = signal.deps;
5386
- if (dependencies === null)
5387
- return;
5388
- for (var i = start_index;i < dependencies.length; i++) {
5389
- remove_reaction(signal, dependencies[i]);
3696
+ getPromise() {
3697
+ return this.content.toPromise();
5390
3698
  }
5391
3699
  }
5392
- function update_effect(effect) {
5393
- var flags2 = effect.f;
5394
- if ((flags2 & DESTROYED) !== 0) {
5395
- return;
5396
- }
5397
- set_signal_status(effect, CLEAN);
5398
- var previous_effect = active_effect;
5399
- var was_updating_effect = is_updating_effect;
5400
- active_effect = effect;
5401
- is_updating_effect = true;
5402
- if (true_default) {
5403
- var previous_component_fn = dev_current_component_function;
5404
- set_dev_current_component_function(effect.component_function);
5405
- var previous_stack = dev_stack;
5406
- set_dev_stack(effect.dev_stack ?? dev_stack);
3700
+ // src/lib/client/conversation.ts
3701
+ class Conversation {
3702
+ clientPrimitive;
3703
+ latestRequest = new FutureValue;
3704
+ state = writable({ state: "idle" });
3705
+ id;
3706
+ history = [];
3707
+ constructor(clientPrimitive) {
3708
+ this.clientPrimitive = clientPrimitive;
3709
+ this.id = clientPrimitive.createConversationId();
5407
3710
  }
5408
- try {
5409
- if ((flags2 & (BLOCK_EFFECT | MANAGED_EFFECT)) !== 0) {
5410
- destroy_block_effect_children(effect);
5411
- } else {
5412
- destroy_effect_children(effect);
5413
- }
5414
- execute_effect_teardown(effect);
5415
- var teardown2 = update_reaction(effect);
5416
- effect.teardown = typeof teardown2 === "function" ? teardown2 : null;
5417
- effect.wv = write_version;
5418
- if (true_default && tracing_mode_flag && (effect.f & DIRTY) !== 0 && effect.deps !== null) {
5419
- for (var dep of effect.deps) {
5420
- if (dep.set_during_effect) {
5421
- dep.wv = increment_write_version();
5422
- dep.set_during_effect = false;
5423
- }
5424
- }
5425
- }
5426
- } finally {
5427
- is_updating_effect = was_updating_effect;
5428
- active_effect = previous_effect;
5429
- if (true_default) {
5430
- set_dev_current_component_function(previous_component_fn);
5431
- set_dev_stack(previous_stack);
5432
- }
5433
- }
5434
- }
5435
- function get(signal) {
5436
- var flags2 = signal.f;
5437
- var is_derived = (flags2 & DERIVED) !== 0;
5438
- captured_signals?.add(signal);
5439
- if (active_reaction !== null && !untracking) {
5440
- var destroyed = active_effect !== null && (active_effect.f & DESTROYED) !== 0;
5441
- if (!destroyed && (current_sources === null || !includes.call(current_sources, signal))) {
5442
- var deps = active_reaction.deps;
5443
- if ((active_reaction.f & REACTION_IS_UPDATING) !== 0) {
5444
- if (signal.rv < read_version) {
5445
- signal.rv = read_version;
5446
- if (new_deps === null && deps !== null && deps[skipped_deps] === signal) {
5447
- skipped_deps++;
5448
- } else if (new_deps === null) {
5449
- new_deps = [signal];
5450
- } else {
5451
- new_deps.push(signal);
5452
- }
5453
- }
5454
- } else {
5455
- (active_reaction.deps ??= []).push(signal);
5456
- var reactions = signal.reactions;
5457
- if (reactions === null) {
5458
- signal.reactions = [active_reaction];
5459
- } else if (!includes.call(reactions, active_reaction)) {
5460
- reactions.push(active_reaction);
5461
- }
5462
- }
5463
- }
3711
+ subscribe(callback) {
3712
+ return this.state.subscribe(callback);
5464
3713
  }
5465
- if (true_default) {
5466
- if (!untracking && reactivity_loss_tracker && !reactivity_loss_tracker.warned && (reactivity_loss_tracker.effect.f & REACTION_IS_UPDATING) === 0) {
5467
- reactivity_loss_tracker.warned = true;
5468
- await_reactivity_loss(signal.label);
5469
- var trace = get_error("traced at");
5470
- if (trace)
5471
- console.warn(trace);
5472
- }
5473
- recent_async_deriveds.delete(signal);
5474
- if (tracing_mode_flag && !untracking && tracing_expressions !== null && active_reaction !== null && tracing_expressions.reaction === active_reaction) {
5475
- if (signal.trace) {
5476
- signal.trace();
5477
- } else {
5478
- trace = get_error("traced at");
5479
- if (trace) {
5480
- var entry = tracing_expressions.entries.get(signal);
5481
- if (entry === undefined) {
5482
- entry = { traces: [] };
5483
- tracing_expressions.entries.set(signal, entry);
5484
- }
5485
- var last = entry.traces[entry.traces.length - 1];
5486
- if (trace.stack !== last?.stack) {
5487
- entry.traces.push(trace);
5488
- }
5489
- }
5490
- }
5491
- }
3714
+ chat(question, options2 = {}) {
3715
+ const chatResponse = this.clientPrimitive.chat(this.id, question, options2);
3716
+ this.history.push(chatResponse);
3717
+ this.latestRequest.setValue({ question, response: chatResponse });
3718
+ return chatResponse;
5492
3719
  }
5493
- if (is_destroying_effect && old_values.has(signal)) {
5494
- return old_values.get(signal);
3720
+ async abort() {
3721
+ const all = this.history.map((response) => response.abort());
3722
+ await Promise.all(all);
5495
3723
  }
5496
- if (is_derived) {
5497
- var derived2 = signal;
5498
- if (is_destroying_effect) {
5499
- var value = derived2.v;
5500
- if ((derived2.f & CLEAN) === 0 && derived2.reactions !== null || depends_on_old_values(derived2)) {
5501
- value = execute_derived(derived2);
5502
- }
5503
- old_values.set(derived2, value);
5504
- return value;
5505
- }
5506
- var should_connect = (derived2.f & CONNECTED) === 0 && !untracking && active_reaction !== null && (is_updating_effect || (active_reaction.f & CONNECTED) !== 0);
5507
- var is_new = (derived2.f & REACTION_RAN) === 0;
5508
- if (is_dirty(derived2)) {
5509
- if (should_connect) {
5510
- derived2.f |= CONNECTED;
5511
- }
5512
- update_derived(derived2);
5513
- }
5514
- if (should_connect && !is_new) {
5515
- unfreeze_derived_effects(derived2);
5516
- reconnect(derived2);
5517
- }
3724
+ async thumbsUp() {
3725
+ const { question, response } = await this.latestRequest;
3726
+ await response.isReadyForFeedback();
3727
+ await this.clientPrimitive.thumbsUp(response.id, question);
5518
3728
  }
5519
- if (batch_values?.has(signal)) {
5520
- return batch_values.get(signal);
3729
+ async thumbsDown() {
3730
+ const { question, response } = await this.latestRequest;
3731
+ await response.isReadyForFeedback();
3732
+ await this.clientPrimitive.thumbsDown(response.id, question);
5521
3733
  }
5522
- if ((signal.f & ERROR_VALUE) !== 0) {
5523
- throw signal.v;
3734
+ async feedback(feedback) {
3735
+ const { question, response } = await this.latestRequest;
3736
+ await response.isReadyForFeedback();
3737
+ await this.clientPrimitive.feedback(response.id, question, feedback);
5524
3738
  }
5525
- return signal.v;
5526
3739
  }
5527
- function reconnect(derived2) {
5528
- derived2.f |= CONNECTED;
5529
- if (derived2.deps === null)
5530
- return;
5531
- for (const dep of derived2.deps) {
5532
- (dep.reactions ??= []).push(derived2);
5533
- if ((dep.f & DERIVED) !== 0 && (dep.f & CONNECTED) === 0) {
5534
- unfreeze_derived_effects(dep);
5535
- reconnect(dep);
5536
- }
5537
- }
5538
- }
5539
- function depends_on_old_values(derived2) {
5540
- if (derived2.v === UNINITIALIZED)
5541
- return true;
5542
- if (derived2.deps === null)
5543
- return false;
5544
- for (const dep of derived2.deps) {
5545
- if (old_values.has(dep)) {
5546
- return true;
5547
- }
5548
- if ((dep.f & DERIVED) !== 0 && depends_on_old_values(dep)) {
5549
- return true;
5550
- }
5551
- }
5552
- return false;
5553
- }
5554
- function untrack(fn) {
5555
- var previous_untracking = untracking;
5556
- try {
5557
- untracking = true;
5558
- return fn();
5559
- } finally {
5560
- untracking = previous_untracking;
5561
- }
5562
- }
5563
-
5564
- // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/reactivity/effects.js
5565
- function push_effect(effect, parent_effect) {
5566
- var parent_last = parent_effect.last;
5567
- if (parent_last === null) {
5568
- parent_effect.last = parent_effect.first = effect;
5569
- } else {
5570
- parent_last.next = effect;
5571
- effect.prev = parent_last;
5572
- parent_effect.last = effect;
5573
- }
5574
- }
5575
- function create_effect(type, fn) {
5576
- var parent = active_effect;
5577
- if (true_default) {
5578
- while (parent !== null && (parent.f & EAGER_EFFECT) !== 0) {
5579
- parent = parent.parent;
5580
- }
5581
- }
5582
- if (parent !== null && (parent.f & INERT) !== 0) {
5583
- type |= INERT;
5584
- }
5585
- var effect = {
5586
- ctx: component_context,
5587
- deps: null,
5588
- nodes: null,
5589
- f: type | DIRTY | CONNECTED,
5590
- first: null,
5591
- fn,
5592
- last: null,
5593
- next: null,
5594
- parent,
5595
- b: parent && parent.b,
5596
- prev: null,
5597
- teardown: null,
5598
- wv: 0,
5599
- ac: null
5600
- };
5601
- if (true_default) {
5602
- effect.component_function = dev_current_component_function;
5603
- }
5604
- var e = effect;
5605
- if ((type & EFFECT) !== 0) {
5606
- if (collected_effects !== null) {
5607
- collected_effects.push(effect);
5608
- } else {
5609
- Batch.ensure().schedule(effect);
5610
- }
5611
- } else if (fn !== null) {
5612
- try {
5613
- update_effect(effect);
5614
- } catch (e2) {
5615
- destroy_effect(effect);
5616
- throw e2;
5617
- }
5618
- if (e.deps === null && e.teardown === null && e.nodes === null && e.first === e.last && (e.f & EFFECT_PRESERVED) === 0) {
5619
- e = e.first;
5620
- if ((type & BLOCK_EFFECT) !== 0 && (type & EFFECT_TRANSPARENT) !== 0 && e !== null) {
5621
- e.f |= EFFECT_TRANSPARENT;
5622
- }
5623
- }
5624
- }
5625
- if (e !== null) {
5626
- e.parent = parent;
5627
- if (parent !== null) {
5628
- push_effect(e, parent);
5629
- }
5630
- if (active_reaction !== null && (active_reaction.f & DERIVED) !== 0 && (type & ROOT_EFFECT) === 0) {
5631
- var derived2 = active_reaction;
5632
- (derived2.effects ??= []).push(e);
5633
- }
5634
- }
5635
- return effect;
5636
- }
5637
- function effect_tracking() {
5638
- return active_reaction !== null && !untracking;
5639
- }
5640
- function render_effect(fn, flags2 = 0) {
5641
- return create_effect(RENDER_EFFECT | flags2, fn);
5642
- }
5643
- function block2(fn, flags2 = 0) {
5644
- var effect = create_effect(BLOCK_EFFECT | flags2, fn);
5645
- if (true_default) {
5646
- effect.dev_stack = dev_stack;
5647
- }
5648
- return effect;
5649
- }
5650
- function branch(fn) {
5651
- return create_effect(BRANCH_EFFECT | EFFECT_PRESERVED, fn);
5652
- }
5653
- function execute_effect_teardown(effect) {
5654
- var teardown2 = effect.teardown;
5655
- if (teardown2 !== null) {
5656
- const previously_destroying_effect = is_destroying_effect;
5657
- const previous_reaction = active_reaction;
5658
- set_is_destroying_effect(true);
5659
- set_active_reaction(null);
5660
- try {
5661
- teardown2.call(null);
5662
- } finally {
5663
- set_is_destroying_effect(previously_destroying_effect);
5664
- set_active_reaction(previous_reaction);
5665
- }
5666
- }
5667
- }
5668
- function destroy_effect_children(signal, remove_dom = false) {
5669
- var effect = signal.first;
5670
- signal.first = signal.last = null;
5671
- while (effect !== null) {
5672
- const controller = effect.ac;
5673
- if (controller !== null) {
5674
- without_reactive_context(() => {
5675
- controller.abort(STALE_REACTION);
5676
- });
5677
- }
5678
- var next2 = effect.next;
5679
- if ((effect.f & ROOT_EFFECT) !== 0) {
5680
- effect.parent = null;
5681
- } else {
5682
- destroy_effect(effect, remove_dom);
5683
- }
5684
- effect = next2;
5685
- }
5686
- }
5687
- function destroy_block_effect_children(signal) {
5688
- var effect = signal.first;
5689
- while (effect !== null) {
5690
- var next2 = effect.next;
5691
- if ((effect.f & BRANCH_EFFECT) === 0) {
5692
- destroy_effect(effect);
5693
- }
5694
- effect = next2;
5695
- }
5696
- }
5697
- function destroy_effect(effect, remove_dom = true) {
5698
- var removed = false;
5699
- if ((remove_dom || (effect.f & HEAD_EFFECT) !== 0) && effect.nodes !== null && effect.nodes.end !== null) {
5700
- remove_effect_dom(effect.nodes.start, effect.nodes.end);
5701
- removed = true;
5702
- }
5703
- set_signal_status(effect, DESTROYING);
5704
- destroy_effect_children(effect, remove_dom && !removed);
5705
- remove_reactions(effect, 0);
5706
- var transitions = effect.nodes && effect.nodes.t;
5707
- if (transitions !== null) {
5708
- for (const transition of transitions) {
5709
- transition.stop();
5710
- }
5711
- }
5712
- execute_effect_teardown(effect);
5713
- effect.f ^= DESTROYING;
5714
- effect.f |= DESTROYED;
5715
- var parent = effect.parent;
5716
- if (parent !== null && parent.first !== null) {
5717
- unlink_effect(effect);
5718
- }
5719
- if (true_default) {
5720
- effect.component_function = null;
5721
- }
5722
- effect.next = effect.prev = effect.teardown = effect.ctx = effect.deps = effect.fn = effect.nodes = effect.ac = null;
5723
- }
5724
- function remove_effect_dom(node, end) {
5725
- while (node !== null) {
5726
- var next2 = node === end ? null : get_next_sibling(node);
5727
- node.remove();
5728
- node = next2;
5729
- }
5730
- }
5731
- function unlink_effect(effect) {
5732
- var parent = effect.parent;
5733
- var prev = effect.prev;
5734
- var next2 = effect.next;
5735
- if (prev !== null)
5736
- prev.next = next2;
5737
- if (next2 !== null)
5738
- next2.prev = prev;
5739
- if (parent !== null) {
5740
- if (parent.first === effect)
5741
- parent.first = next2;
5742
- if (parent.last === effect)
5743
- parent.last = prev;
5744
- }
5745
- }
5746
- function pause_effect(effect, callback, destroy = true) {
5747
- var transitions = [];
5748
- pause_children(effect, transitions, true);
5749
- var fn = () => {
5750
- if (destroy)
5751
- destroy_effect(effect);
5752
- if (callback)
5753
- callback();
5754
- };
5755
- var remaining = transitions.length;
5756
- if (remaining > 0) {
5757
- var check = () => --remaining || fn();
5758
- for (var transition of transitions) {
5759
- transition.out(check);
5760
- }
5761
- } else {
5762
- fn();
5763
- }
5764
- }
5765
- function pause_children(effect, transitions, local) {
5766
- if ((effect.f & INERT) !== 0)
5767
- return;
5768
- effect.f ^= INERT;
5769
- var t = effect.nodes && effect.nodes.t;
5770
- if (t !== null) {
5771
- for (const transition of t) {
5772
- if (transition.is_global || local) {
5773
- transitions.push(transition);
5774
- }
5775
- }
5776
- }
5777
- var child = effect.first;
5778
- while (child !== null) {
5779
- var sibling = child.next;
5780
- var transparent = (child.f & EFFECT_TRANSPARENT) !== 0 || (child.f & BRANCH_EFFECT) !== 0 && (effect.f & BLOCK_EFFECT) !== 0;
5781
- pause_children(child, transitions, transparent ? local : false);
5782
- child = sibling;
5783
- }
5784
- }
5785
- function move_effect(effect, fragment) {
5786
- if (!effect.nodes)
5787
- return;
5788
- var node = effect.nodes.start;
5789
- var end = effect.nodes.end;
5790
- while (node !== null) {
5791
- var next2 = node === end ? null : get_next_sibling(node);
5792
- fragment.append(node);
5793
- node = next2;
5794
- }
5795
- }
5796
- // node_modules/.bun/inside-out-async@2.0.2/node_modules/inside-out-async/dist/index.mjs
5797
- function withResolvers() {
5798
- let reject;
5799
- let resolve;
5800
- const promise = new Promise((resolveFunc, rejectFunc) => {
5801
- resolve = resolveFunc;
5802
- reject = rejectFunc;
5803
- });
5804
- return {
5805
- promise,
5806
- reject,
5807
- resolve
5808
- };
5809
- }
5810
-
5811
- // src/lib/client/utils/flag.ts
5812
- class Flag {
5813
- promise;
5814
- resolve;
5815
- reject;
5816
- constructor() {
5817
- const { promise, resolve, reject } = withResolvers();
5818
- this.promise = promise;
5819
- this.resolve = resolve;
5820
- this.reject = reject;
5821
- }
5822
- then(onfulfilled, onrejected) {
5823
- return this.promise.then(onfulfilled, onrejected);
5824
- }
5825
- catch(onrejected) {
5826
- return this.promise.catch(onrejected);
5827
- }
5828
- finally(onfinally) {
5829
- return this.promise.finally(onfinally);
5830
- }
5831
- toPromise() {
5832
- return this.promise;
5833
- }
5834
- [Symbol.toStringTag] = "Flag";
5835
- }
5836
-
5837
- // src/lib/client/utils/future-value.ts
5838
- class FutureValue {
5839
- hasValue = new Flag;
5840
- currentValue;
5841
- setValue(value) {
5842
- this.currentValue = value;
5843
- this.hasValue.resolve();
5844
- }
5845
- cleanup(reason) {
5846
- this.hasValue.reject(reason);
5847
- }
5848
- getCurrentValue() {
5849
- return this.currentValue;
5850
- }
5851
- async toPromise() {
5852
- await this.hasValue;
5853
- return this.currentValue;
5854
- }
5855
- then(onfulfilled, onrejected) {
5856
- return this.toPromise().then(onfulfilled, onrejected);
5857
- }
5858
- catch(onrejected) {
5859
- return this.toPromise().catch(onrejected);
5860
- }
5861
- finally(onfinally) {
5862
- return this.toPromise().finally(onfinally);
5863
- }
5864
- [Symbol.toStringTag] = "FutureValue";
5865
- }
5866
-
5867
- // src/lib/client/utils/get-domain-name.ts
5868
- var getDomainName = (url) => {
5869
- try {
5870
- const urlObj = new URL(url);
5871
- return urlObj.hostname;
5872
- } catch {
5873
- return url;
5874
- }
5875
- };
5876
-
5877
- // src/lib/client/utils/html-to-text.ts
5878
- function htmlToText(html3) {
5879
- const text2 = html3.replace(/<[^>]*>/g, "").replace(/&nbsp;/g, " ").replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"');
5880
- return text2;
5881
- }
5882
-
5883
- // src/lib/client/chat-result-builder.ts
5884
- var mapSseReference = ({
5885
- url,
5886
- considered,
5887
- title,
5888
- description,
5889
- summary
5890
- }) => {
5891
- const domainName = getDomainName(url);
5892
- const desc = description || summary;
5893
- return {
5894
- url,
5895
- considered,
5896
- referenceIndex: {},
5897
- score: 0,
5898
- metadata: {},
5899
- display: {
5900
- card: {
5901
- title,
5902
- description: desc,
5903
- badge: url
5904
- },
5905
- listItem: {
5906
- title,
5907
- badge: domainName
5908
- }
5909
- }
5910
- };
5911
- };
5912
-
5913
- class ChatResultBuilder {
5914
- options;
5915
- store;
5916
- content = new FutureValue;
5917
- backendSendsMappedRefs = false;
5918
- constructor(options2) {
5919
- this.options = options2;
5920
- this.store = writable({
5921
- id: options2.id,
5922
- state: "loading",
5923
- errors: [],
5924
- type: "bot",
5925
- time: new Date().toISOString(),
5926
- message: { markdown: "", html: "", text: "" },
5927
- references: { all: [], used: [], unused: [] },
5928
- retrievalQuestion: options2.userQuestion
5929
- });
5930
- }
5931
- pushError(error) {
5932
- this.options.onError?.(error);
5933
- this.store.update((current) => ({ ...current, errors: [...current.errors, error] }));
5934
- }
5935
- updateRequestId(id) {
5936
- this.store.update((current) => ({
5937
- ...current,
5938
- id
5939
- }));
5940
- }
5941
- updateText(text2) {
5942
- this.store.update((current) => {
5943
- const nextMarkdown = current.message.markdown + text2;
5944
- const html3 = this.options.markdownRenderer.toHTML(nextMarkdown, current.references);
5945
- return {
5946
- ...current,
5947
- state: "streaming",
5948
- message: { markdown: nextMarkdown, html: html3, text: "" }
5949
- };
5950
- });
5951
- }
5952
- finishMessage() {
5953
- this.store.update((current) => {
5954
- const message = {
5955
- ...current,
5956
- state: "done"
5957
- };
5958
- message.references.unused = message.references.all.filter((reference) => reference.referenceIndex.used === undefined);
5959
- message.message.text = htmlToText(message.message.html);
5960
- this.options?.onFinish?.(message);
5961
- this.content.setValue(message);
5962
- return message;
5963
- });
5964
- }
5965
- addReference(reference) {
5966
- this.store.update((current) => {
5967
- const allRefs = current.references.all;
5968
- const nextIndex = allRefs.length;
5969
- const nextAllRefs = [
5970
- ...allRefs,
5971
- {
5972
- ...reference,
5973
- referenceIndex: { all: nextIndex }
5974
- }
5975
- ];
5976
- return {
5977
- ...current,
5978
- references: { used: current.references.used, all: nextAllRefs }
5979
- };
5980
- });
5981
- }
5982
- addMappedReference(reference) {
5983
- this.backendSendsMappedRefs = true;
5984
- this.addReference(reference);
5985
- }
5986
- addOldReference(oldReference) {
5987
- if (!this.backendSendsMappedRefs)
5988
- this.addReference(mapSseReference(oldReference));
5989
- }
5990
- updateRetrievalQuestion(question) {
5991
- this.store.update((current) => ({
5992
- ...current,
5993
- retrievalQuestion: question
5994
- }));
5995
- }
5996
- setNoFeedback() {
5997
- this.store.update((current) => ({
5998
- ...current,
5999
- noFeedback: true
6000
- }));
6001
- }
6002
- getReadableStore() {
6003
- return { subscribe: this.store.subscribe };
6004
- }
6005
- getPromise() {
6006
- return this.content.toPromise();
6007
- }
6008
- }
6009
- // src/lib/client/conversation.ts
6010
- class Conversation {
6011
- clientPrimitive;
6012
- latestRequest = new FutureValue;
6013
- state = writable({ state: "idle" });
6014
- id;
6015
- history = [];
6016
- constructor(clientPrimitive) {
6017
- this.clientPrimitive = clientPrimitive;
6018
- this.id = clientPrimitive.createConversationId();
6019
- }
6020
- subscribe(callback) {
6021
- return this.state.subscribe(callback);
6022
- }
6023
- chat(question, options2 = {}) {
6024
- const chatResponse = this.clientPrimitive.chat(this.id, question, options2);
6025
- this.history.push(chatResponse);
6026
- this.latestRequest.setValue({ question, response: chatResponse });
6027
- return chatResponse;
6028
- }
6029
- async abort() {
6030
- const all = this.history.map((response) => response.abort());
6031
- await Promise.all(all);
6032
- }
6033
- async thumbsUp() {
6034
- const { question, response } = await this.latestRequest;
6035
- await response.isReadyForFeedback();
6036
- await this.clientPrimitive.thumbsUp(response.id, question);
6037
- }
6038
- async thumbsDown() {
6039
- const { question, response } = await this.latestRequest;
6040
- await response.isReadyForFeedback();
6041
- await this.clientPrimitive.thumbsDown(response.id, question);
6042
- }
6043
- async feedback(feedback) {
6044
- const { question, response } = await this.latestRequest;
6045
- await response.isReadyForFeedback();
6046
- await this.clientPrimitive.feedback(response.id, question, feedback);
6047
- }
6048
- }
6049
-
6050
- // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/external.js
6051
- var exports_external = {};
6052
- __export(exports_external, {
6053
- xor: () => xor,
6054
- xid: () => xid2,
6055
- void: () => _void2,
6056
- uuidv7: () => uuidv7,
6057
- uuidv6: () => uuidv6,
6058
- uuidv4: () => uuidv4,
6059
- uuid: () => uuid2,
6060
- util: () => exports_util,
6061
- url: () => url,
6062
- uppercase: () => _uppercase,
6063
- unknown: () => unknown,
6064
- union: () => union,
6065
- undefined: () => _undefined3,
6066
- ulid: () => ulid2,
6067
- uint64: () => uint64,
6068
- uint32: () => uint32,
6069
- tuple: () => tuple,
6070
- trim: () => _trim,
6071
- treeifyError: () => treeifyError,
6072
- transform: () => transform,
6073
- toUpperCase: () => _toUpperCase,
6074
- toLowerCase: () => _toLowerCase,
6075
- toJSONSchema: () => toJSONSchema,
6076
- templateLiteral: () => templateLiteral,
6077
- symbol: () => symbol,
6078
- superRefine: () => superRefine,
6079
- success: () => success,
6080
- stringbool: () => stringbool,
6081
- stringFormat: () => stringFormat,
6082
- string: () => string2,
6083
- strictObject: () => strictObject,
6084
- startsWith: () => _startsWith,
6085
- slugify: () => _slugify,
6086
- size: () => _size,
6087
- setErrorMap: () => setErrorMap,
6088
- set: () => set2,
6089
- safeParseAsync: () => safeParseAsync2,
6090
- safeParse: () => safeParse2,
6091
- safeEncodeAsync: () => safeEncodeAsync2,
6092
- safeEncode: () => safeEncode2,
6093
- safeDecodeAsync: () => safeDecodeAsync2,
6094
- safeDecode: () => safeDecode2,
6095
- registry: () => registry,
6096
- regexes: () => exports_regexes,
6097
- regex: () => _regex,
6098
- refine: () => refine,
6099
- record: () => record,
6100
- readonly: () => readonly2,
6101
- property: () => _property,
6102
- promise: () => promise,
6103
- prettifyError: () => prettifyError,
6104
- preprocess: () => preprocess,
6105
- prefault: () => prefault,
6106
- positive: () => _positive,
6107
- pipe: () => pipe,
6108
- partialRecord: () => partialRecord,
6109
- parseAsync: () => parseAsync2,
6110
- parse: () => parse3,
6111
- overwrite: () => _overwrite,
6112
- optional: () => optional,
6113
- object: () => object,
6114
- number: () => number2,
6115
- nullish: () => nullish2,
6116
- nullable: () => nullable,
6117
- null: () => _null3,
6118
- normalize: () => _normalize,
6119
- nonpositive: () => _nonpositive,
6120
- nonoptional: () => nonoptional,
6121
- nonnegative: () => _nonnegative,
6122
- never: () => never,
6123
- negative: () => _negative,
6124
- nativeEnum: () => nativeEnum,
6125
- nanoid: () => nanoid2,
6126
- nan: () => nan,
6127
- multipleOf: () => _multipleOf,
6128
- minSize: () => _minSize,
6129
- minLength: () => _minLength,
6130
- mime: () => _mime,
6131
- meta: () => meta2,
6132
- maxSize: () => _maxSize,
6133
- maxLength: () => _maxLength,
6134
- map: () => map,
6135
- mac: () => mac2,
6136
- lte: () => _lte,
6137
- lt: () => _lt,
6138
- lowercase: () => _lowercase,
6139
- looseRecord: () => looseRecord,
6140
- looseObject: () => looseObject,
6141
- locales: () => exports_locales,
6142
- literal: () => literal,
6143
- length: () => _length,
6144
- lazy: () => lazy,
6145
- ksuid: () => ksuid2,
6146
- keyof: () => keyof,
6147
- jwt: () => jwt,
6148
- json: () => json,
6149
- iso: () => exports_iso,
6150
- ipv6: () => ipv62,
6151
- ipv4: () => ipv42,
6152
- intersection: () => intersection,
6153
- int64: () => int64,
6154
- int32: () => int32,
6155
- int: () => int,
6156
- instanceof: () => _instanceof,
6157
- includes: () => _includes,
6158
- httpUrl: () => httpUrl,
6159
- hostname: () => hostname2,
6160
- hex: () => hex2,
6161
- hash: () => hash,
6162
- guid: () => guid2,
6163
- gte: () => _gte,
6164
- gt: () => _gt,
6165
- globalRegistry: () => globalRegistry,
6166
- getErrorMap: () => getErrorMap,
6167
- function: () => _function,
6168
- fromJSONSchema: () => fromJSONSchema,
6169
- formatError: () => formatError,
6170
- float64: () => float64,
6171
- float32: () => float32,
6172
- flattenError: () => flattenError,
6173
- file: () => file,
6174
- exactOptional: () => exactOptional,
6175
- enum: () => _enum2,
6176
- endsWith: () => _endsWith,
6177
- encodeAsync: () => encodeAsync2,
6178
- encode: () => encode2,
6179
- emoji: () => emoji2,
6180
- email: () => email2,
6181
- e164: () => e1642,
6182
- discriminatedUnion: () => discriminatedUnion,
6183
- describe: () => describe2,
6184
- decodeAsync: () => decodeAsync2,
6185
- decode: () => decode2,
6186
- date: () => date3,
6187
- custom: () => custom,
6188
- cuid2: () => cuid22,
6189
- cuid: () => cuid3,
6190
- core: () => exports_core2,
6191
- config: () => config,
6192
- coerce: () => exports_coerce,
6193
- codec: () => codec,
6194
- clone: () => clone2,
6195
- cidrv6: () => cidrv62,
6196
- cidrv4: () => cidrv42,
6197
- check: () => check,
6198
- catch: () => _catch2,
6199
- boolean: () => boolean2,
6200
- bigint: () => bigint2,
6201
- base64url: () => base64url2,
6202
- base64: () => base642,
6203
- array: () => array,
6204
- any: () => any,
6205
- _function: () => _function,
6206
- _default: () => _default2,
6207
- _ZodString: () => _ZodString,
6208
- ZodXor: () => ZodXor,
6209
- ZodXID: () => ZodXID,
6210
- ZodVoid: () => ZodVoid,
6211
- ZodUnknown: () => ZodUnknown,
6212
- ZodUnion: () => ZodUnion,
6213
- ZodUndefined: () => ZodUndefined,
6214
- ZodUUID: () => ZodUUID,
6215
- ZodURL: () => ZodURL,
6216
- ZodULID: () => ZodULID,
6217
- ZodType: () => ZodType,
6218
- ZodTuple: () => ZodTuple,
6219
- ZodTransform: () => ZodTransform,
6220
- ZodTemplateLiteral: () => ZodTemplateLiteral,
6221
- ZodSymbol: () => ZodSymbol,
6222
- ZodSuccess: () => ZodSuccess,
6223
- ZodStringFormat: () => ZodStringFormat,
6224
- ZodString: () => ZodString,
6225
- ZodSet: () => ZodSet,
6226
- ZodRecord: () => ZodRecord,
6227
- ZodRealError: () => ZodRealError,
6228
- ZodReadonly: () => ZodReadonly,
6229
- ZodPromise: () => ZodPromise,
6230
- ZodPrefault: () => ZodPrefault,
6231
- ZodPipe: () => ZodPipe,
6232
- ZodOptional: () => ZodOptional,
6233
- ZodObject: () => ZodObject,
6234
- ZodNumberFormat: () => ZodNumberFormat,
6235
- ZodNumber: () => ZodNumber,
6236
- ZodNullable: () => ZodNullable,
6237
- ZodNull: () => ZodNull,
6238
- ZodNonOptional: () => ZodNonOptional,
6239
- ZodNever: () => ZodNever,
6240
- ZodNanoID: () => ZodNanoID,
6241
- ZodNaN: () => ZodNaN,
6242
- ZodMap: () => ZodMap,
6243
- ZodMAC: () => ZodMAC,
6244
- ZodLiteral: () => ZodLiteral,
6245
- ZodLazy: () => ZodLazy,
6246
- ZodKSUID: () => ZodKSUID,
6247
- ZodJWT: () => ZodJWT,
6248
- ZodIssueCode: () => ZodIssueCode,
6249
- ZodIntersection: () => ZodIntersection,
6250
- ZodISOTime: () => ZodISOTime,
6251
- ZodISODuration: () => ZodISODuration,
6252
- ZodISODateTime: () => ZodISODateTime,
6253
- ZodISODate: () => ZodISODate,
6254
- ZodIPv6: () => ZodIPv6,
6255
- ZodIPv4: () => ZodIPv4,
6256
- ZodGUID: () => ZodGUID,
6257
- ZodFunction: () => ZodFunction,
6258
- ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
6259
- ZodFile: () => ZodFile,
6260
- ZodExactOptional: () => ZodExactOptional,
6261
- ZodError: () => ZodError,
6262
- ZodEnum: () => ZodEnum,
6263
- ZodEmoji: () => ZodEmoji,
6264
- ZodEmail: () => ZodEmail,
6265
- ZodE164: () => ZodE164,
6266
- ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
6267
- ZodDefault: () => ZodDefault,
6268
- ZodDate: () => ZodDate,
6269
- ZodCustomStringFormat: () => ZodCustomStringFormat,
6270
- ZodCustom: () => ZodCustom,
6271
- ZodCodec: () => ZodCodec,
6272
- ZodCatch: () => ZodCatch,
6273
- ZodCUID2: () => ZodCUID2,
6274
- ZodCUID: () => ZodCUID,
6275
- ZodCIDRv6: () => ZodCIDRv6,
6276
- ZodCIDRv4: () => ZodCIDRv4,
6277
- ZodBoolean: () => ZodBoolean,
6278
- ZodBigIntFormat: () => ZodBigIntFormat,
6279
- ZodBigInt: () => ZodBigInt,
6280
- ZodBase64URL: () => ZodBase64URL,
6281
- ZodBase64: () => ZodBase64,
6282
- ZodArray: () => ZodArray,
6283
- ZodAny: () => ZodAny,
6284
- TimePrecision: () => TimePrecision,
6285
- NEVER: () => NEVER,
6286
- $output: () => $output,
6287
- $input: () => $input,
6288
- $brand: () => $brand
6289
- });
6290
-
6291
- // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/index.js
6292
- var exports_core2 = {};
6293
- __export(exports_core2, {
6294
- version: () => version,
6295
- util: () => exports_util,
6296
- treeifyError: () => treeifyError,
6297
- toJSONSchema: () => toJSONSchema,
6298
- toDotPath: () => toDotPath,
6299
- safeParseAsync: () => safeParseAsync,
6300
- safeParse: () => safeParse,
6301
- safeEncodeAsync: () => safeEncodeAsync,
6302
- safeEncode: () => safeEncode,
6303
- safeDecodeAsync: () => safeDecodeAsync,
6304
- safeDecode: () => safeDecode,
6305
- registry: () => registry,
6306
- regexes: () => exports_regexes,
6307
- process: () => process,
6308
- prettifyError: () => prettifyError,
6309
- parseAsync: () => parseAsync,
6310
- parse: () => parse,
6311
- meta: () => meta,
6312
- locales: () => exports_locales,
6313
- isValidJWT: () => isValidJWT,
6314
- isValidBase64URL: () => isValidBase64URL,
6315
- isValidBase64: () => isValidBase64,
6316
- initializeContext: () => initializeContext,
6317
- globalRegistry: () => globalRegistry,
6318
- globalConfig: () => globalConfig,
6319
- formatError: () => formatError,
6320
- flattenError: () => flattenError,
6321
- finalize: () => finalize,
6322
- extractDefs: () => extractDefs,
6323
- encodeAsync: () => encodeAsync,
6324
- encode: () => encode,
6325
- describe: () => describe,
6326
- decodeAsync: () => decodeAsync,
6327
- decode: () => decode,
6328
- createToJSONSchemaMethod: () => createToJSONSchemaMethod,
6329
- createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod,
6330
- config: () => config,
6331
- clone: () => clone2,
6332
- _xor: () => _xor,
6333
- _xid: () => _xid,
6334
- _void: () => _void,
6335
- _uuidv7: () => _uuidv7,
6336
- _uuidv6: () => _uuidv6,
6337
- _uuidv4: () => _uuidv4,
6338
- _uuid: () => _uuid,
6339
- _url: () => _url,
6340
- _uppercase: () => _uppercase,
6341
- _unknown: () => _unknown,
6342
- _union: () => _union,
6343
- _undefined: () => _undefined2,
6344
- _ulid: () => _ulid,
6345
- _uint64: () => _uint64,
6346
- _uint32: () => _uint32,
6347
- _tuple: () => _tuple,
6348
- _trim: () => _trim,
6349
- _transform: () => _transform,
6350
- _toUpperCase: () => _toUpperCase,
6351
- _toLowerCase: () => _toLowerCase,
6352
- _templateLiteral: () => _templateLiteral,
6353
- _symbol: () => _symbol,
6354
- _superRefine: () => _superRefine,
6355
- _success: () => _success,
6356
- _stringbool: () => _stringbool,
6357
- _stringFormat: () => _stringFormat,
6358
- _string: () => _string,
6359
- _startsWith: () => _startsWith,
6360
- _slugify: () => _slugify,
6361
- _size: () => _size,
6362
- _set: () => _set,
6363
- _safeParseAsync: () => _safeParseAsync,
6364
- _safeParse: () => _safeParse,
6365
- _safeEncodeAsync: () => _safeEncodeAsync,
6366
- _safeEncode: () => _safeEncode,
6367
- _safeDecodeAsync: () => _safeDecodeAsync,
6368
- _safeDecode: () => _safeDecode,
6369
- _regex: () => _regex,
6370
- _refine: () => _refine,
6371
- _record: () => _record,
6372
- _readonly: () => _readonly,
6373
- _property: () => _property,
6374
- _promise: () => _promise,
6375
- _positive: () => _positive,
6376
- _pipe: () => _pipe,
6377
- _parseAsync: () => _parseAsync,
6378
- _parse: () => _parse,
6379
- _overwrite: () => _overwrite,
6380
- _optional: () => _optional,
6381
- _number: () => _number,
6382
- _nullable: () => _nullable,
6383
- _null: () => _null2,
6384
- _normalize: () => _normalize,
6385
- _nonpositive: () => _nonpositive,
6386
- _nonoptional: () => _nonoptional,
6387
- _nonnegative: () => _nonnegative,
6388
- _never: () => _never,
6389
- _negative: () => _negative,
6390
- _nativeEnum: () => _nativeEnum,
6391
- _nanoid: () => _nanoid,
6392
- _nan: () => _nan,
6393
- _multipleOf: () => _multipleOf,
6394
- _minSize: () => _minSize,
6395
- _minLength: () => _minLength,
6396
- _min: () => _gte,
6397
- _mime: () => _mime,
6398
- _maxSize: () => _maxSize,
6399
- _maxLength: () => _maxLength,
6400
- _max: () => _lte,
6401
- _map: () => _map,
6402
- _mac: () => _mac,
6403
- _lte: () => _lte,
6404
- _lt: () => _lt,
6405
- _lowercase: () => _lowercase,
6406
- _literal: () => _literal,
6407
- _length: () => _length,
6408
- _lazy: () => _lazy,
6409
- _ksuid: () => _ksuid,
6410
- _jwt: () => _jwt,
6411
- _isoTime: () => _isoTime,
6412
- _isoDuration: () => _isoDuration,
6413
- _isoDateTime: () => _isoDateTime,
6414
- _isoDate: () => _isoDate,
6415
- _ipv6: () => _ipv6,
6416
- _ipv4: () => _ipv4,
6417
- _intersection: () => _intersection,
6418
- _int64: () => _int64,
6419
- _int32: () => _int32,
6420
- _int: () => _int,
6421
- _includes: () => _includes,
6422
- _guid: () => _guid,
6423
- _gte: () => _gte,
6424
- _gt: () => _gt,
6425
- _float64: () => _float64,
6426
- _float32: () => _float32,
6427
- _file: () => _file,
6428
- _enum: () => _enum,
6429
- _endsWith: () => _endsWith,
6430
- _encodeAsync: () => _encodeAsync,
6431
- _encode: () => _encode,
6432
- _emoji: () => _emoji2,
6433
- _email: () => _email,
6434
- _e164: () => _e164,
6435
- _discriminatedUnion: () => _discriminatedUnion,
6436
- _default: () => _default,
6437
- _decodeAsync: () => _decodeAsync,
6438
- _decode: () => _decode,
6439
- _date: () => _date,
6440
- _custom: () => _custom,
6441
- _cuid2: () => _cuid2,
6442
- _cuid: () => _cuid,
6443
- _coercedString: () => _coercedString,
6444
- _coercedNumber: () => _coercedNumber,
6445
- _coercedDate: () => _coercedDate,
6446
- _coercedBoolean: () => _coercedBoolean,
6447
- _coercedBigint: () => _coercedBigint,
6448
- _cidrv6: () => _cidrv6,
6449
- _cidrv4: () => _cidrv4,
6450
- _check: () => _check,
6451
- _catch: () => _catch,
6452
- _boolean: () => _boolean,
6453
- _bigint: () => _bigint,
6454
- _base64url: () => _base64url,
6455
- _base64: () => _base64,
6456
- _array: () => _array,
6457
- _any: () => _any,
6458
- TimePrecision: () => TimePrecision,
6459
- NEVER: () => NEVER,
6460
- JSONSchemaGenerator: () => JSONSchemaGenerator,
6461
- JSONSchema: () => exports_json_schema,
6462
- Doc: () => Doc,
6463
- $output: () => $output,
6464
- $input: () => $input,
6465
- $constructor: () => $constructor,
3740
+
3741
+ // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/external.js
3742
+ var exports_external = {};
3743
+ __export(exports_external, {
6466
3744
  $brand: () => $brand,
6467
- $ZodXor: () => $ZodXor,
6468
- $ZodXID: () => $ZodXID,
6469
- $ZodVoid: () => $ZodVoid,
6470
- $ZodUnknown: () => $ZodUnknown,
6471
- $ZodUnion: () => $ZodUnion,
6472
- $ZodUndefined: () => $ZodUndefined,
6473
- $ZodUUID: () => $ZodUUID,
6474
- $ZodURL: () => $ZodURL,
6475
- $ZodULID: () => $ZodULID,
6476
- $ZodType: () => $ZodType,
6477
- $ZodTuple: () => $ZodTuple,
6478
- $ZodTransform: () => $ZodTransform,
6479
- $ZodTemplateLiteral: () => $ZodTemplateLiteral,
6480
- $ZodSymbol: () => $ZodSymbol,
6481
- $ZodSuccess: () => $ZodSuccess,
6482
- $ZodStringFormat: () => $ZodStringFormat,
6483
- $ZodString: () => $ZodString,
6484
- $ZodSet: () => $ZodSet,
6485
- $ZodRegistry: () => $ZodRegistry,
6486
- $ZodRecord: () => $ZodRecord,
6487
- $ZodRealError: () => $ZodRealError,
6488
- $ZodReadonly: () => $ZodReadonly,
6489
- $ZodPromise: () => $ZodPromise,
6490
- $ZodPrefault: () => $ZodPrefault,
6491
- $ZodPipe: () => $ZodPipe,
6492
- $ZodOptional: () => $ZodOptional,
6493
- $ZodObjectJIT: () => $ZodObjectJIT,
6494
- $ZodObject: () => $ZodObject,
6495
- $ZodNumberFormat: () => $ZodNumberFormat,
6496
- $ZodNumber: () => $ZodNumber,
6497
- $ZodNullable: () => $ZodNullable,
6498
- $ZodNull: () => $ZodNull,
6499
- $ZodNonOptional: () => $ZodNonOptional,
6500
- $ZodNever: () => $ZodNever,
6501
- $ZodNanoID: () => $ZodNanoID,
6502
- $ZodNaN: () => $ZodNaN,
6503
- $ZodMap: () => $ZodMap,
6504
- $ZodMAC: () => $ZodMAC,
6505
- $ZodLiteral: () => $ZodLiteral,
6506
- $ZodLazy: () => $ZodLazy,
6507
- $ZodKSUID: () => $ZodKSUID,
6508
- $ZodJWT: () => $ZodJWT,
6509
- $ZodIntersection: () => $ZodIntersection,
6510
- $ZodISOTime: () => $ZodISOTime,
6511
- $ZodISODuration: () => $ZodISODuration,
6512
- $ZodISODateTime: () => $ZodISODateTime,
6513
- $ZodISODate: () => $ZodISODate,
6514
- $ZodIPv6: () => $ZodIPv6,
6515
- $ZodIPv4: () => $ZodIPv4,
6516
- $ZodGUID: () => $ZodGUID,
6517
- $ZodFunction: () => $ZodFunction,
6518
- $ZodFile: () => $ZodFile,
6519
- $ZodExactOptional: () => $ZodExactOptional,
6520
- $ZodError: () => $ZodError,
6521
- $ZodEnum: () => $ZodEnum,
6522
- $ZodEncodeError: () => $ZodEncodeError,
6523
- $ZodEmoji: () => $ZodEmoji,
6524
- $ZodEmail: () => $ZodEmail,
6525
- $ZodE164: () => $ZodE164,
6526
- $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion,
6527
- $ZodDefault: () => $ZodDefault,
6528
- $ZodDate: () => $ZodDate,
6529
- $ZodCustomStringFormat: () => $ZodCustomStringFormat,
6530
- $ZodCustom: () => $ZodCustom,
6531
- $ZodCodec: () => $ZodCodec,
6532
- $ZodCheckUpperCase: () => $ZodCheckUpperCase,
6533
- $ZodCheckStringFormat: () => $ZodCheckStringFormat,
6534
- $ZodCheckStartsWith: () => $ZodCheckStartsWith,
6535
- $ZodCheckSizeEquals: () => $ZodCheckSizeEquals,
6536
- $ZodCheckRegex: () => $ZodCheckRegex,
6537
- $ZodCheckProperty: () => $ZodCheckProperty,
6538
- $ZodCheckOverwrite: () => $ZodCheckOverwrite,
6539
- $ZodCheckNumberFormat: () => $ZodCheckNumberFormat,
6540
- $ZodCheckMultipleOf: () => $ZodCheckMultipleOf,
6541
- $ZodCheckMinSize: () => $ZodCheckMinSize,
6542
- $ZodCheckMinLength: () => $ZodCheckMinLength,
6543
- $ZodCheckMimeType: () => $ZodCheckMimeType,
6544
- $ZodCheckMaxSize: () => $ZodCheckMaxSize,
6545
- $ZodCheckMaxLength: () => $ZodCheckMaxLength,
6546
- $ZodCheckLowerCase: () => $ZodCheckLowerCase,
6547
- $ZodCheckLessThan: () => $ZodCheckLessThan,
6548
- $ZodCheckLengthEquals: () => $ZodCheckLengthEquals,
6549
- $ZodCheckIncludes: () => $ZodCheckIncludes,
6550
- $ZodCheckGreaterThan: () => $ZodCheckGreaterThan,
6551
- $ZodCheckEndsWith: () => $ZodCheckEndsWith,
6552
- $ZodCheckBigIntFormat: () => $ZodCheckBigIntFormat,
6553
- $ZodCheck: () => $ZodCheck,
6554
- $ZodCatch: () => $ZodCatch,
6555
- $ZodCUID2: () => $ZodCUID2,
6556
- $ZodCUID: () => $ZodCUID,
6557
- $ZodCIDRv6: () => $ZodCIDRv6,
6558
- $ZodCIDRv4: () => $ZodCIDRv4,
6559
- $ZodBoolean: () => $ZodBoolean,
6560
- $ZodBigIntFormat: () => $ZodBigIntFormat,
6561
- $ZodBigInt: () => $ZodBigInt,
6562
- $ZodBase64URL: () => $ZodBase64URL,
6563
- $ZodBase64: () => $ZodBase64,
6564
- $ZodAsyncError: () => $ZodAsyncError,
3745
+ $input: () => $input,
3746
+ $output: () => $output,
3747
+ NEVER: () => NEVER,
3748
+ TimePrecision: () => TimePrecision,
3749
+ ZodAny: () => ZodAny,
3750
+ ZodArray: () => ZodArray,
3751
+ ZodBase64: () => ZodBase64,
3752
+ ZodBase64URL: () => ZodBase64URL,
3753
+ ZodBigInt: () => ZodBigInt,
3754
+ ZodBigIntFormat: () => ZodBigIntFormat,
3755
+ ZodBoolean: () => ZodBoolean,
3756
+ ZodCIDRv4: () => ZodCIDRv4,
3757
+ ZodCIDRv6: () => ZodCIDRv6,
3758
+ ZodCUID: () => ZodCUID,
3759
+ ZodCUID2: () => ZodCUID2,
3760
+ ZodCatch: () => ZodCatch,
3761
+ ZodCodec: () => ZodCodec,
3762
+ ZodCustom: () => ZodCustom,
3763
+ ZodCustomStringFormat: () => ZodCustomStringFormat,
3764
+ ZodDate: () => ZodDate,
3765
+ ZodDefault: () => ZodDefault,
3766
+ ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
3767
+ ZodE164: () => ZodE164,
3768
+ ZodEmail: () => ZodEmail,
3769
+ ZodEmoji: () => ZodEmoji,
3770
+ ZodEnum: () => ZodEnum,
3771
+ ZodError: () => ZodError,
3772
+ ZodExactOptional: () => ZodExactOptional,
3773
+ ZodFile: () => ZodFile,
3774
+ ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
3775
+ ZodFunction: () => ZodFunction,
3776
+ ZodGUID: () => ZodGUID,
3777
+ ZodIPv4: () => ZodIPv4,
3778
+ ZodIPv6: () => ZodIPv6,
3779
+ ZodISODate: () => ZodISODate,
3780
+ ZodISODateTime: () => ZodISODateTime,
3781
+ ZodISODuration: () => ZodISODuration,
3782
+ ZodISOTime: () => ZodISOTime,
3783
+ ZodIntersection: () => ZodIntersection,
3784
+ ZodIssueCode: () => ZodIssueCode,
3785
+ ZodJWT: () => ZodJWT,
3786
+ ZodKSUID: () => ZodKSUID,
3787
+ ZodLazy: () => ZodLazy,
3788
+ ZodLiteral: () => ZodLiteral,
3789
+ ZodMAC: () => ZodMAC,
3790
+ ZodMap: () => ZodMap,
3791
+ ZodNaN: () => ZodNaN,
3792
+ ZodNanoID: () => ZodNanoID,
3793
+ ZodNever: () => ZodNever,
3794
+ ZodNonOptional: () => ZodNonOptional,
3795
+ ZodNull: () => ZodNull,
3796
+ ZodNullable: () => ZodNullable,
3797
+ ZodNumber: () => ZodNumber,
3798
+ ZodNumberFormat: () => ZodNumberFormat,
3799
+ ZodObject: () => ZodObject,
3800
+ ZodOptional: () => ZodOptional,
3801
+ ZodPipe: () => ZodPipe,
3802
+ ZodPrefault: () => ZodPrefault,
3803
+ ZodPromise: () => ZodPromise,
3804
+ ZodReadonly: () => ZodReadonly,
3805
+ ZodRealError: () => ZodRealError,
3806
+ ZodRecord: () => ZodRecord,
3807
+ ZodSet: () => ZodSet,
3808
+ ZodString: () => ZodString,
3809
+ ZodStringFormat: () => ZodStringFormat,
3810
+ ZodSuccess: () => ZodSuccess,
3811
+ ZodSymbol: () => ZodSymbol,
3812
+ ZodTemplateLiteral: () => ZodTemplateLiteral,
3813
+ ZodTransform: () => ZodTransform,
3814
+ ZodTuple: () => ZodTuple,
3815
+ ZodType: () => ZodType,
3816
+ ZodULID: () => ZodULID,
3817
+ ZodURL: () => ZodURL,
3818
+ ZodUUID: () => ZodUUID,
3819
+ ZodUndefined: () => ZodUndefined,
3820
+ ZodUnion: () => ZodUnion,
3821
+ ZodUnknown: () => ZodUnknown,
3822
+ ZodVoid: () => ZodVoid,
3823
+ ZodXID: () => ZodXID,
3824
+ ZodXor: () => ZodXor,
3825
+ _ZodString: () => _ZodString,
3826
+ _default: () => _default2,
3827
+ _function: () => _function,
3828
+ any: () => any,
3829
+ array: () => array,
3830
+ base64: () => base642,
3831
+ base64url: () => base64url2,
3832
+ bigint: () => bigint2,
3833
+ boolean: () => boolean2,
3834
+ catch: () => _catch2,
3835
+ check: () => check,
3836
+ cidrv4: () => cidrv42,
3837
+ cidrv6: () => cidrv62,
3838
+ clone: () => clone2,
3839
+ codec: () => codec,
3840
+ coerce: () => exports_coerce,
3841
+ config: () => config,
3842
+ core: () => exports_core2,
3843
+ cuid: () => cuid3,
3844
+ cuid2: () => cuid22,
3845
+ custom: () => custom,
3846
+ date: () => date3,
3847
+ decode: () => decode2,
3848
+ decodeAsync: () => decodeAsync2,
3849
+ describe: () => describe2,
3850
+ discriminatedUnion: () => discriminatedUnion,
3851
+ e164: () => e1642,
3852
+ email: () => email2,
3853
+ emoji: () => emoji2,
3854
+ encode: () => encode2,
3855
+ encodeAsync: () => encodeAsync2,
3856
+ endsWith: () => _endsWith,
3857
+ enum: () => _enum2,
3858
+ exactOptional: () => exactOptional,
3859
+ file: () => file,
3860
+ flattenError: () => flattenError,
3861
+ float32: () => float32,
3862
+ float64: () => float64,
3863
+ formatError: () => formatError,
3864
+ fromJSONSchema: () => fromJSONSchema,
3865
+ function: () => _function,
3866
+ getErrorMap: () => getErrorMap,
3867
+ globalRegistry: () => globalRegistry,
3868
+ gt: () => _gt,
3869
+ gte: () => _gte,
3870
+ guid: () => guid2,
3871
+ hash: () => hash,
3872
+ hex: () => hex2,
3873
+ hostname: () => hostname2,
3874
+ httpUrl: () => httpUrl,
3875
+ includes: () => _includes,
3876
+ instanceof: () => _instanceof,
3877
+ int: () => int,
3878
+ int32: () => int32,
3879
+ int64: () => int64,
3880
+ intersection: () => intersection,
3881
+ ipv4: () => ipv42,
3882
+ ipv6: () => ipv62,
3883
+ iso: () => exports_iso,
3884
+ json: () => json,
3885
+ jwt: () => jwt,
3886
+ keyof: () => keyof,
3887
+ ksuid: () => ksuid2,
3888
+ lazy: () => lazy,
3889
+ length: () => _length,
3890
+ literal: () => literal,
3891
+ locales: () => exports_locales,
3892
+ looseObject: () => looseObject,
3893
+ looseRecord: () => looseRecord,
3894
+ lowercase: () => _lowercase,
3895
+ lt: () => _lt,
3896
+ lte: () => _lte,
3897
+ mac: () => mac2,
3898
+ map: () => map,
3899
+ maxLength: () => _maxLength,
3900
+ maxSize: () => _maxSize,
3901
+ meta: () => meta2,
3902
+ mime: () => _mime,
3903
+ minLength: () => _minLength,
3904
+ minSize: () => _minSize,
3905
+ multipleOf: () => _multipleOf,
3906
+ nan: () => nan,
3907
+ nanoid: () => nanoid2,
3908
+ nativeEnum: () => nativeEnum,
3909
+ negative: () => _negative,
3910
+ never: () => never,
3911
+ nonnegative: () => _nonnegative,
3912
+ nonoptional: () => nonoptional,
3913
+ nonpositive: () => _nonpositive,
3914
+ normalize: () => _normalize,
3915
+ null: () => _null3,
3916
+ nullable: () => nullable,
3917
+ nullish: () => nullish2,
3918
+ number: () => number2,
3919
+ object: () => object,
3920
+ optional: () => optional,
3921
+ overwrite: () => _overwrite,
3922
+ parse: () => parse3,
3923
+ parseAsync: () => parseAsync2,
3924
+ partialRecord: () => partialRecord,
3925
+ pipe: () => pipe,
3926
+ positive: () => _positive,
3927
+ prefault: () => prefault,
3928
+ preprocess: () => preprocess,
3929
+ prettifyError: () => prettifyError,
3930
+ promise: () => promise,
3931
+ property: () => _property,
3932
+ readonly: () => readonly2,
3933
+ record: () => record,
3934
+ refine: () => refine,
3935
+ regex: () => _regex,
3936
+ regexes: () => exports_regexes,
3937
+ registry: () => registry,
3938
+ safeDecode: () => safeDecode2,
3939
+ safeDecodeAsync: () => safeDecodeAsync2,
3940
+ safeEncode: () => safeEncode2,
3941
+ safeEncodeAsync: () => safeEncodeAsync2,
3942
+ safeParse: () => safeParse2,
3943
+ safeParseAsync: () => safeParseAsync2,
3944
+ set: () => set2,
3945
+ setErrorMap: () => setErrorMap,
3946
+ size: () => _size,
3947
+ slugify: () => _slugify,
3948
+ startsWith: () => _startsWith,
3949
+ strictObject: () => strictObject,
3950
+ string: () => string2,
3951
+ stringFormat: () => stringFormat,
3952
+ stringbool: () => stringbool,
3953
+ success: () => success,
3954
+ superRefine: () => superRefine,
3955
+ symbol: () => symbol,
3956
+ templateLiteral: () => templateLiteral,
3957
+ toJSONSchema: () => toJSONSchema,
3958
+ toLowerCase: () => _toLowerCase,
3959
+ toUpperCase: () => _toUpperCase,
3960
+ transform: () => transform,
3961
+ treeifyError: () => treeifyError,
3962
+ trim: () => _trim,
3963
+ tuple: () => tuple,
3964
+ uint32: () => uint32,
3965
+ uint64: () => uint64,
3966
+ ulid: () => ulid2,
3967
+ undefined: () => _undefined3,
3968
+ union: () => union,
3969
+ unknown: () => unknown,
3970
+ uppercase: () => _uppercase,
3971
+ url: () => url,
3972
+ util: () => exports_util,
3973
+ uuid: () => uuid2,
3974
+ uuidv4: () => uuidv4,
3975
+ uuidv6: () => uuidv6,
3976
+ uuidv7: () => uuidv7,
3977
+ void: () => _void2,
3978
+ xid: () => xid2,
3979
+ xor: () => xor
3980
+ });
3981
+
3982
+ // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/index.js
3983
+ var exports_core2 = {};
3984
+ __export(exports_core2, {
3985
+ $ZodAny: () => $ZodAny,
6565
3986
  $ZodArray: () => $ZodArray,
6566
- $ZodAny: () => $ZodAny
3987
+ $ZodAsyncError: () => $ZodAsyncError,
3988
+ $ZodBase64: () => $ZodBase64,
3989
+ $ZodBase64URL: () => $ZodBase64URL,
3990
+ $ZodBigInt: () => $ZodBigInt,
3991
+ $ZodBigIntFormat: () => $ZodBigIntFormat,
3992
+ $ZodBoolean: () => $ZodBoolean,
3993
+ $ZodCIDRv4: () => $ZodCIDRv4,
3994
+ $ZodCIDRv6: () => $ZodCIDRv6,
3995
+ $ZodCUID: () => $ZodCUID,
3996
+ $ZodCUID2: () => $ZodCUID2,
3997
+ $ZodCatch: () => $ZodCatch,
3998
+ $ZodCheck: () => $ZodCheck,
3999
+ $ZodCheckBigIntFormat: () => $ZodCheckBigIntFormat,
4000
+ $ZodCheckEndsWith: () => $ZodCheckEndsWith,
4001
+ $ZodCheckGreaterThan: () => $ZodCheckGreaterThan,
4002
+ $ZodCheckIncludes: () => $ZodCheckIncludes,
4003
+ $ZodCheckLengthEquals: () => $ZodCheckLengthEquals,
4004
+ $ZodCheckLessThan: () => $ZodCheckLessThan,
4005
+ $ZodCheckLowerCase: () => $ZodCheckLowerCase,
4006
+ $ZodCheckMaxLength: () => $ZodCheckMaxLength,
4007
+ $ZodCheckMaxSize: () => $ZodCheckMaxSize,
4008
+ $ZodCheckMimeType: () => $ZodCheckMimeType,
4009
+ $ZodCheckMinLength: () => $ZodCheckMinLength,
4010
+ $ZodCheckMinSize: () => $ZodCheckMinSize,
4011
+ $ZodCheckMultipleOf: () => $ZodCheckMultipleOf,
4012
+ $ZodCheckNumberFormat: () => $ZodCheckNumberFormat,
4013
+ $ZodCheckOverwrite: () => $ZodCheckOverwrite,
4014
+ $ZodCheckProperty: () => $ZodCheckProperty,
4015
+ $ZodCheckRegex: () => $ZodCheckRegex,
4016
+ $ZodCheckSizeEquals: () => $ZodCheckSizeEquals,
4017
+ $ZodCheckStartsWith: () => $ZodCheckStartsWith,
4018
+ $ZodCheckStringFormat: () => $ZodCheckStringFormat,
4019
+ $ZodCheckUpperCase: () => $ZodCheckUpperCase,
4020
+ $ZodCodec: () => $ZodCodec,
4021
+ $ZodCustom: () => $ZodCustom,
4022
+ $ZodCustomStringFormat: () => $ZodCustomStringFormat,
4023
+ $ZodDate: () => $ZodDate,
4024
+ $ZodDefault: () => $ZodDefault,
4025
+ $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion,
4026
+ $ZodE164: () => $ZodE164,
4027
+ $ZodEmail: () => $ZodEmail,
4028
+ $ZodEmoji: () => $ZodEmoji,
4029
+ $ZodEncodeError: () => $ZodEncodeError,
4030
+ $ZodEnum: () => $ZodEnum,
4031
+ $ZodError: () => $ZodError,
4032
+ $ZodExactOptional: () => $ZodExactOptional,
4033
+ $ZodFile: () => $ZodFile,
4034
+ $ZodFunction: () => $ZodFunction,
4035
+ $ZodGUID: () => $ZodGUID,
4036
+ $ZodIPv4: () => $ZodIPv4,
4037
+ $ZodIPv6: () => $ZodIPv6,
4038
+ $ZodISODate: () => $ZodISODate,
4039
+ $ZodISODateTime: () => $ZodISODateTime,
4040
+ $ZodISODuration: () => $ZodISODuration,
4041
+ $ZodISOTime: () => $ZodISOTime,
4042
+ $ZodIntersection: () => $ZodIntersection,
4043
+ $ZodJWT: () => $ZodJWT,
4044
+ $ZodKSUID: () => $ZodKSUID,
4045
+ $ZodLazy: () => $ZodLazy,
4046
+ $ZodLiteral: () => $ZodLiteral,
4047
+ $ZodMAC: () => $ZodMAC,
4048
+ $ZodMap: () => $ZodMap,
4049
+ $ZodNaN: () => $ZodNaN,
4050
+ $ZodNanoID: () => $ZodNanoID,
4051
+ $ZodNever: () => $ZodNever,
4052
+ $ZodNonOptional: () => $ZodNonOptional,
4053
+ $ZodNull: () => $ZodNull,
4054
+ $ZodNullable: () => $ZodNullable,
4055
+ $ZodNumber: () => $ZodNumber,
4056
+ $ZodNumberFormat: () => $ZodNumberFormat,
4057
+ $ZodObject: () => $ZodObject,
4058
+ $ZodObjectJIT: () => $ZodObjectJIT,
4059
+ $ZodOptional: () => $ZodOptional,
4060
+ $ZodPipe: () => $ZodPipe,
4061
+ $ZodPrefault: () => $ZodPrefault,
4062
+ $ZodPromise: () => $ZodPromise,
4063
+ $ZodReadonly: () => $ZodReadonly,
4064
+ $ZodRealError: () => $ZodRealError,
4065
+ $ZodRecord: () => $ZodRecord,
4066
+ $ZodRegistry: () => $ZodRegistry,
4067
+ $ZodSet: () => $ZodSet,
4068
+ $ZodString: () => $ZodString,
4069
+ $ZodStringFormat: () => $ZodStringFormat,
4070
+ $ZodSuccess: () => $ZodSuccess,
4071
+ $ZodSymbol: () => $ZodSymbol,
4072
+ $ZodTemplateLiteral: () => $ZodTemplateLiteral,
4073
+ $ZodTransform: () => $ZodTransform,
4074
+ $ZodTuple: () => $ZodTuple,
4075
+ $ZodType: () => $ZodType,
4076
+ $ZodULID: () => $ZodULID,
4077
+ $ZodURL: () => $ZodURL,
4078
+ $ZodUUID: () => $ZodUUID,
4079
+ $ZodUndefined: () => $ZodUndefined,
4080
+ $ZodUnion: () => $ZodUnion,
4081
+ $ZodUnknown: () => $ZodUnknown,
4082
+ $ZodVoid: () => $ZodVoid,
4083
+ $ZodXID: () => $ZodXID,
4084
+ $ZodXor: () => $ZodXor,
4085
+ $brand: () => $brand,
4086
+ $constructor: () => $constructor,
4087
+ $input: () => $input,
4088
+ $output: () => $output,
4089
+ Doc: () => Doc,
4090
+ JSONSchema: () => exports_json_schema,
4091
+ JSONSchemaGenerator: () => JSONSchemaGenerator,
4092
+ NEVER: () => NEVER,
4093
+ TimePrecision: () => TimePrecision,
4094
+ _any: () => _any,
4095
+ _array: () => _array,
4096
+ _base64: () => _base64,
4097
+ _base64url: () => _base64url,
4098
+ _bigint: () => _bigint,
4099
+ _boolean: () => _boolean,
4100
+ _catch: () => _catch,
4101
+ _check: () => _check,
4102
+ _cidrv4: () => _cidrv4,
4103
+ _cidrv6: () => _cidrv6,
4104
+ _coercedBigint: () => _coercedBigint,
4105
+ _coercedBoolean: () => _coercedBoolean,
4106
+ _coercedDate: () => _coercedDate,
4107
+ _coercedNumber: () => _coercedNumber,
4108
+ _coercedString: () => _coercedString,
4109
+ _cuid: () => _cuid,
4110
+ _cuid2: () => _cuid2,
4111
+ _custom: () => _custom,
4112
+ _date: () => _date,
4113
+ _decode: () => _decode,
4114
+ _decodeAsync: () => _decodeAsync,
4115
+ _default: () => _default,
4116
+ _discriminatedUnion: () => _discriminatedUnion,
4117
+ _e164: () => _e164,
4118
+ _email: () => _email,
4119
+ _emoji: () => _emoji2,
4120
+ _encode: () => _encode,
4121
+ _encodeAsync: () => _encodeAsync,
4122
+ _endsWith: () => _endsWith,
4123
+ _enum: () => _enum,
4124
+ _file: () => _file,
4125
+ _float32: () => _float32,
4126
+ _float64: () => _float64,
4127
+ _gt: () => _gt,
4128
+ _gte: () => _gte,
4129
+ _guid: () => _guid,
4130
+ _includes: () => _includes,
4131
+ _int: () => _int,
4132
+ _int32: () => _int32,
4133
+ _int64: () => _int64,
4134
+ _intersection: () => _intersection,
4135
+ _ipv4: () => _ipv4,
4136
+ _ipv6: () => _ipv6,
4137
+ _isoDate: () => _isoDate,
4138
+ _isoDateTime: () => _isoDateTime,
4139
+ _isoDuration: () => _isoDuration,
4140
+ _isoTime: () => _isoTime,
4141
+ _jwt: () => _jwt,
4142
+ _ksuid: () => _ksuid,
4143
+ _lazy: () => _lazy,
4144
+ _length: () => _length,
4145
+ _literal: () => _literal,
4146
+ _lowercase: () => _lowercase,
4147
+ _lt: () => _lt,
4148
+ _lte: () => _lte,
4149
+ _mac: () => _mac,
4150
+ _map: () => _map,
4151
+ _max: () => _lte,
4152
+ _maxLength: () => _maxLength,
4153
+ _maxSize: () => _maxSize,
4154
+ _mime: () => _mime,
4155
+ _min: () => _gte,
4156
+ _minLength: () => _minLength,
4157
+ _minSize: () => _minSize,
4158
+ _multipleOf: () => _multipleOf,
4159
+ _nan: () => _nan,
4160
+ _nanoid: () => _nanoid,
4161
+ _nativeEnum: () => _nativeEnum,
4162
+ _negative: () => _negative,
4163
+ _never: () => _never,
4164
+ _nonnegative: () => _nonnegative,
4165
+ _nonoptional: () => _nonoptional,
4166
+ _nonpositive: () => _nonpositive,
4167
+ _normalize: () => _normalize,
4168
+ _null: () => _null2,
4169
+ _nullable: () => _nullable,
4170
+ _number: () => _number,
4171
+ _optional: () => _optional,
4172
+ _overwrite: () => _overwrite,
4173
+ _parse: () => _parse,
4174
+ _parseAsync: () => _parseAsync,
4175
+ _pipe: () => _pipe,
4176
+ _positive: () => _positive,
4177
+ _promise: () => _promise,
4178
+ _property: () => _property,
4179
+ _readonly: () => _readonly,
4180
+ _record: () => _record,
4181
+ _refine: () => _refine,
4182
+ _regex: () => _regex,
4183
+ _safeDecode: () => _safeDecode,
4184
+ _safeDecodeAsync: () => _safeDecodeAsync,
4185
+ _safeEncode: () => _safeEncode,
4186
+ _safeEncodeAsync: () => _safeEncodeAsync,
4187
+ _safeParse: () => _safeParse,
4188
+ _safeParseAsync: () => _safeParseAsync,
4189
+ _set: () => _set,
4190
+ _size: () => _size,
4191
+ _slugify: () => _slugify,
4192
+ _startsWith: () => _startsWith,
4193
+ _string: () => _string,
4194
+ _stringFormat: () => _stringFormat,
4195
+ _stringbool: () => _stringbool,
4196
+ _success: () => _success,
4197
+ _superRefine: () => _superRefine,
4198
+ _symbol: () => _symbol,
4199
+ _templateLiteral: () => _templateLiteral,
4200
+ _toLowerCase: () => _toLowerCase,
4201
+ _toUpperCase: () => _toUpperCase,
4202
+ _transform: () => _transform,
4203
+ _trim: () => _trim,
4204
+ _tuple: () => _tuple,
4205
+ _uint32: () => _uint32,
4206
+ _uint64: () => _uint64,
4207
+ _ulid: () => _ulid,
4208
+ _undefined: () => _undefined2,
4209
+ _union: () => _union,
4210
+ _unknown: () => _unknown,
4211
+ _uppercase: () => _uppercase,
4212
+ _url: () => _url,
4213
+ _uuid: () => _uuid,
4214
+ _uuidv4: () => _uuidv4,
4215
+ _uuidv6: () => _uuidv6,
4216
+ _uuidv7: () => _uuidv7,
4217
+ _void: () => _void,
4218
+ _xid: () => _xid,
4219
+ _xor: () => _xor,
4220
+ clone: () => clone2,
4221
+ config: () => config,
4222
+ createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod,
4223
+ createToJSONSchemaMethod: () => createToJSONSchemaMethod,
4224
+ decode: () => decode,
4225
+ decodeAsync: () => decodeAsync,
4226
+ describe: () => describe,
4227
+ encode: () => encode,
4228
+ encodeAsync: () => encodeAsync,
4229
+ extractDefs: () => extractDefs,
4230
+ finalize: () => finalize,
4231
+ flattenError: () => flattenError,
4232
+ formatError: () => formatError,
4233
+ globalConfig: () => globalConfig,
4234
+ globalRegistry: () => globalRegistry,
4235
+ initializeContext: () => initializeContext,
4236
+ isValidBase64: () => isValidBase64,
4237
+ isValidBase64URL: () => isValidBase64URL,
4238
+ isValidJWT: () => isValidJWT,
4239
+ locales: () => exports_locales,
4240
+ meta: () => meta,
4241
+ parse: () => parse,
4242
+ parseAsync: () => parseAsync,
4243
+ prettifyError: () => prettifyError,
4244
+ process: () => process,
4245
+ regexes: () => exports_regexes,
4246
+ registry: () => registry,
4247
+ safeDecode: () => safeDecode,
4248
+ safeDecodeAsync: () => safeDecodeAsync,
4249
+ safeEncode: () => safeEncode,
4250
+ safeEncodeAsync: () => safeEncodeAsync,
4251
+ safeParse: () => safeParse,
4252
+ safeParseAsync: () => safeParseAsync,
4253
+ toDotPath: () => toDotPath,
4254
+ toJSONSchema: () => toJSONSchema,
4255
+ treeifyError: () => treeifyError,
4256
+ util: () => exports_util,
4257
+ version: () => version
6567
4258
  });
6568
4259
 
6569
4260
  // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/core.js
@@ -6628,85 +4319,85 @@ class $ZodAsyncError extends Error {
6628
4319
  constructor() {
6629
4320
  super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
6630
4321
  }
6631
- }
6632
-
6633
- class $ZodEncodeError extends Error {
6634
- constructor(name) {
6635
- super(`Encountered unidirectional transform during encode: ${name}`);
6636
- this.name = "ZodEncodeError";
6637
- }
6638
- }
6639
- var globalConfig = {};
6640
- function config(newConfig) {
6641
- if (newConfig)
6642
- Object.assign(globalConfig, newConfig);
6643
- return globalConfig;
6644
- }
6645
- // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/util.js
6646
- var exports_util = {};
6647
- __export(exports_util, {
6648
- unwrapMessage: () => unwrapMessage,
6649
- uint8ArrayToHex: () => uint8ArrayToHex,
6650
- uint8ArrayToBase64url: () => uint8ArrayToBase64url,
6651
- uint8ArrayToBase64: () => uint8ArrayToBase64,
6652
- stringifyPrimitive: () => stringifyPrimitive,
6653
- slugify: () => slugify,
6654
- shallowClone: () => shallowClone,
6655
- safeExtend: () => safeExtend,
6656
- required: () => required,
6657
- randomString: () => randomString,
6658
- propertyKeyTypes: () => propertyKeyTypes,
6659
- promiseAllObject: () => promiseAllObject,
6660
- primitiveTypes: () => primitiveTypes,
6661
- prefixIssues: () => prefixIssues,
6662
- pick: () => pick,
6663
- partial: () => partial,
6664
- parsedType: () => parsedType,
6665
- optionalKeys: () => optionalKeys,
6666
- omit: () => omit,
6667
- objectClone: () => objectClone,
6668
- numKeys: () => numKeys,
6669
- nullish: () => nullish,
6670
- normalizeParams: () => normalizeParams,
6671
- mergeDefs: () => mergeDefs,
6672
- merge: () => merge,
6673
- jsonStringifyReplacer: () => jsonStringifyReplacer,
6674
- joinValues: () => joinValues,
6675
- issue: () => issue,
6676
- isPlainObject: () => isPlainObject,
6677
- isObject: () => isObject,
6678
- hexToUint8Array: () => hexToUint8Array,
6679
- getSizableOrigin: () => getSizableOrigin,
6680
- getParsedType: () => getParsedType,
6681
- getLengthableOrigin: () => getLengthableOrigin,
6682
- getEnumValues: () => getEnumValues,
6683
- getElementAtPath: () => getElementAtPath,
6684
- floatSafeRemainder: () => floatSafeRemainder,
6685
- finalizeIssue: () => finalizeIssue,
6686
- extend: () => extend,
6687
- escapeRegex: () => escapeRegex,
6688
- esc: () => esc,
6689
- defineLazy: () => defineLazy,
6690
- createTransparentProxy: () => createTransparentProxy,
6691
- cloneDef: () => cloneDef,
6692
- clone: () => clone2,
6693
- cleanRegex: () => cleanRegex,
6694
- cleanEnum: () => cleanEnum,
6695
- captureStackTrace: () => captureStackTrace,
6696
- cached: () => cached,
6697
- base64urlToUint8Array: () => base64urlToUint8Array,
6698
- base64ToUint8Array: () => base64ToUint8Array,
6699
- assignProp: () => assignProp,
6700
- assertNotEqual: () => assertNotEqual,
6701
- assertNever: () => assertNever,
6702
- assertIs: () => assertIs,
6703
- assertEqual: () => assertEqual,
6704
- assert: () => assert,
6705
- allowsEval: () => allowsEval,
6706
- aborted: () => aborted2,
6707
- NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES,
4322
+ }
4323
+
4324
+ class $ZodEncodeError extends Error {
4325
+ constructor(name) {
4326
+ super(`Encountered unidirectional transform during encode: ${name}`);
4327
+ this.name = "ZodEncodeError";
4328
+ }
4329
+ }
4330
+ var globalConfig = {};
4331
+ function config(newConfig) {
4332
+ if (newConfig)
4333
+ Object.assign(globalConfig, newConfig);
4334
+ return globalConfig;
4335
+ }
4336
+ // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/util.js
4337
+ var exports_util = {};
4338
+ __export(exports_util, {
4339
+ BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
6708
4340
  Class: () => Class,
6709
- BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES
4341
+ NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES,
4342
+ aborted: () => aborted2,
4343
+ allowsEval: () => allowsEval,
4344
+ assert: () => assert,
4345
+ assertEqual: () => assertEqual,
4346
+ assertIs: () => assertIs,
4347
+ assertNever: () => assertNever,
4348
+ assertNotEqual: () => assertNotEqual,
4349
+ assignProp: () => assignProp,
4350
+ base64ToUint8Array: () => base64ToUint8Array,
4351
+ base64urlToUint8Array: () => base64urlToUint8Array,
4352
+ cached: () => cached,
4353
+ captureStackTrace: () => captureStackTrace,
4354
+ cleanEnum: () => cleanEnum,
4355
+ cleanRegex: () => cleanRegex,
4356
+ clone: () => clone2,
4357
+ cloneDef: () => cloneDef,
4358
+ createTransparentProxy: () => createTransparentProxy,
4359
+ defineLazy: () => defineLazy,
4360
+ esc: () => esc,
4361
+ escapeRegex: () => escapeRegex,
4362
+ extend: () => extend,
4363
+ finalizeIssue: () => finalizeIssue,
4364
+ floatSafeRemainder: () => floatSafeRemainder,
4365
+ getElementAtPath: () => getElementAtPath,
4366
+ getEnumValues: () => getEnumValues,
4367
+ getLengthableOrigin: () => getLengthableOrigin,
4368
+ getParsedType: () => getParsedType,
4369
+ getSizableOrigin: () => getSizableOrigin,
4370
+ hexToUint8Array: () => hexToUint8Array,
4371
+ isObject: () => isObject,
4372
+ isPlainObject: () => isPlainObject,
4373
+ issue: () => issue,
4374
+ joinValues: () => joinValues,
4375
+ jsonStringifyReplacer: () => jsonStringifyReplacer,
4376
+ merge: () => merge,
4377
+ mergeDefs: () => mergeDefs,
4378
+ normalizeParams: () => normalizeParams,
4379
+ nullish: () => nullish,
4380
+ numKeys: () => numKeys,
4381
+ objectClone: () => objectClone,
4382
+ omit: () => omit,
4383
+ optionalKeys: () => optionalKeys,
4384
+ parsedType: () => parsedType,
4385
+ partial: () => partial,
4386
+ pick: () => pick,
4387
+ prefixIssues: () => prefixIssues,
4388
+ primitiveTypes: () => primitiveTypes,
4389
+ promiseAllObject: () => promiseAllObject,
4390
+ propertyKeyTypes: () => propertyKeyTypes,
4391
+ randomString: () => randomString,
4392
+ required: () => required,
4393
+ safeExtend: () => safeExtend,
4394
+ shallowClone: () => shallowClone,
4395
+ slugify: () => slugify,
4396
+ stringifyPrimitive: () => stringifyPrimitive,
4397
+ uint8ArrayToBase64: () => uint8ArrayToBase64,
4398
+ uint8ArrayToBase64url: () => uint8ArrayToBase64url,
4399
+ uint8ArrayToHex: () => uint8ArrayToHex,
4400
+ unwrapMessage: () => unwrapMessage
6710
4401
  });
6711
4402
  function assertEqual(val) {
6712
4403
  return val;
@@ -7543,64 +5234,64 @@ var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
7543
5234
  // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/regexes.js
7544
5235
  var exports_regexes = {};
7545
5236
  __export(exports_regexes, {
7546
- xid: () => xid,
7547
- uuid7: () => uuid7,
7548
- uuid6: () => uuid6,
7549
- uuid4: () => uuid4,
7550
- uuid: () => uuid,
7551
- uppercase: () => uppercase,
7552
- unicodeEmail: () => unicodeEmail,
7553
- undefined: () => _undefined,
7554
- ulid: () => ulid,
7555
- time: () => time,
7556
- string: () => string,
7557
- sha512_hex: () => sha512_hex,
7558
- sha512_base64url: () => sha512_base64url,
7559
- sha512_base64: () => sha512_base64,
7560
- sha384_hex: () => sha384_hex,
7561
- sha384_base64url: () => sha384_base64url,
7562
- sha384_base64: () => sha384_base64,
7563
- sha256_hex: () => sha256_hex,
7564
- sha256_base64url: () => sha256_base64url,
7565
- sha256_base64: () => sha256_base64,
7566
- sha1_hex: () => sha1_hex,
7567
- sha1_base64url: () => sha1_base64url,
7568
- sha1_base64: () => sha1_base64,
7569
- rfc5322Email: () => rfc5322Email,
7570
- number: () => number,
7571
- null: () => _null,
7572
- nanoid: () => nanoid,
7573
- md5_hex: () => md5_hex,
7574
- md5_base64url: () => md5_base64url,
7575
- md5_base64: () => md5_base64,
7576
- mac: () => mac,
7577
- lowercase: () => lowercase,
7578
- ksuid: () => ksuid,
7579
- ipv6: () => ipv6,
7580
- ipv4: () => ipv4,
7581
- integer: () => integer,
7582
- idnEmail: () => idnEmail,
7583
- html5Email: () => html5Email,
7584
- hostname: () => hostname,
7585
- hex: () => hex,
7586
- guid: () => guid,
7587
- extendedDuration: () => extendedDuration,
7588
- emoji: () => emoji,
7589
- email: () => email,
7590
- e164: () => e164,
7591
- duration: () => duration,
7592
- domain: () => domain,
7593
- datetime: () => datetime,
7594
- date: () => date,
7595
- cuid2: () => cuid2,
7596
- cuid: () => cuid,
7597
- cidrv6: () => cidrv6,
7598
- cidrv4: () => cidrv4,
7599
- browserEmail: () => browserEmail,
7600
- boolean: () => boolean,
7601
- bigint: () => bigint,
5237
+ base64: () => base64,
7602
5238
  base64url: () => base64url,
7603
- base64: () => base64
5239
+ bigint: () => bigint,
5240
+ boolean: () => boolean,
5241
+ browserEmail: () => browserEmail,
5242
+ cidrv4: () => cidrv4,
5243
+ cidrv6: () => cidrv6,
5244
+ cuid: () => cuid,
5245
+ cuid2: () => cuid2,
5246
+ date: () => date,
5247
+ datetime: () => datetime,
5248
+ domain: () => domain,
5249
+ duration: () => duration,
5250
+ e164: () => e164,
5251
+ email: () => email,
5252
+ emoji: () => emoji,
5253
+ extendedDuration: () => extendedDuration,
5254
+ guid: () => guid,
5255
+ hex: () => hex,
5256
+ hostname: () => hostname,
5257
+ html5Email: () => html5Email,
5258
+ idnEmail: () => idnEmail,
5259
+ integer: () => integer,
5260
+ ipv4: () => ipv4,
5261
+ ipv6: () => ipv6,
5262
+ ksuid: () => ksuid,
5263
+ lowercase: () => lowercase,
5264
+ mac: () => mac,
5265
+ md5_base64: () => md5_base64,
5266
+ md5_base64url: () => md5_base64url,
5267
+ md5_hex: () => md5_hex,
5268
+ nanoid: () => nanoid,
5269
+ null: () => _null,
5270
+ number: () => number,
5271
+ rfc5322Email: () => rfc5322Email,
5272
+ sha1_base64: () => sha1_base64,
5273
+ sha1_base64url: () => sha1_base64url,
5274
+ sha1_hex: () => sha1_hex,
5275
+ sha256_base64: () => sha256_base64,
5276
+ sha256_base64url: () => sha256_base64url,
5277
+ sha256_hex: () => sha256_hex,
5278
+ sha384_base64: () => sha384_base64,
5279
+ sha384_base64url: () => sha384_base64url,
5280
+ sha384_hex: () => sha384_hex,
5281
+ sha512_base64: () => sha512_base64,
5282
+ sha512_base64url: () => sha512_base64url,
5283
+ sha512_hex: () => sha512_hex,
5284
+ string: () => string,
5285
+ time: () => time,
5286
+ ulid: () => ulid,
5287
+ undefined: () => _undefined,
5288
+ unicodeEmail: () => unicodeEmail,
5289
+ uppercase: () => uppercase,
5290
+ uuid: () => uuid,
5291
+ uuid4: () => uuid4,
5292
+ uuid6: () => uuid6,
5293
+ uuid7: () => uuid7,
5294
+ xid: () => xid
7604
5295
  });
7605
5296
  var cuid = /^[cC][^\s-]{8,}$/;
7606
5297
  var cuid2 = /^[0-9a-z]+$/;
@@ -10230,79 +7921,79 @@ var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def2) => {
10230
7921
  inst._zod.check = (payload) => {
10231
7922
  const input = payload.value;
10232
7923
  const r = def2.fn(input);
10233
- if (r instanceof Promise) {
10234
- return r.then((r2) => handleRefineResult(r2, payload, input, inst));
10235
- }
10236
- handleRefineResult(r, payload, input, inst);
10237
- return;
10238
- };
10239
- });
10240
- function handleRefineResult(result, payload, input, inst) {
10241
- if (!result) {
10242
- const _iss = {
10243
- code: "custom",
10244
- input,
10245
- inst,
10246
- path: [...inst._zod.def.path ?? []],
10247
- continue: !inst._zod.def.abort
10248
- };
10249
- if (inst._zod.def.params)
10250
- _iss.params = inst._zod.def.params;
10251
- payload.issues.push(issue(_iss));
10252
- }
10253
- }
10254
- // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/index.js
10255
- var exports_locales = {};
10256
- __export(exports_locales, {
10257
- zhTW: () => zh_TW_default,
10258
- zhCN: () => zh_CN_default,
10259
- yo: () => yo_default,
10260
- vi: () => vi_default,
10261
- uz: () => uz_default,
10262
- ur: () => ur_default,
10263
- uk: () => uk_default,
10264
- ua: () => ua_default,
10265
- tr: () => tr_default,
10266
- th: () => th_default,
10267
- ta: () => ta_default,
10268
- sv: () => sv_default,
10269
- sl: () => sl_default,
10270
- ru: () => ru_default,
10271
- pt: () => pt_default,
10272
- ps: () => ps_default,
10273
- pl: () => pl_default,
10274
- ota: () => ota_default,
10275
- no: () => no_default,
10276
- nl: () => nl_default,
10277
- ms: () => ms_default,
10278
- mk: () => mk_default,
10279
- lt: () => lt_default,
10280
- ko: () => ko_default,
10281
- km: () => km_default,
10282
- kh: () => kh_default,
10283
- ka: () => ka_default,
10284
- ja: () => ja_default,
10285
- it: () => it_default,
10286
- is: () => is_default,
10287
- id: () => id_default,
10288
- hy: () => hy_default,
10289
- hu: () => hu_default,
10290
- he: () => he_default,
10291
- frCA: () => fr_CA_default,
10292
- fr: () => fr_default,
10293
- fi: () => fi_default,
10294
- fa: () => fa_default,
10295
- es: () => es_default,
10296
- eo: () => eo_default,
10297
- en: () => en_default,
10298
- de: () => de_default,
10299
- da: () => da_default,
10300
- cs: () => cs_default,
10301
- ca: () => ca_default,
10302
- bg: () => bg_default,
10303
- be: () => be_default,
7924
+ if (r instanceof Promise) {
7925
+ return r.then((r2) => handleRefineResult(r2, payload, input, inst));
7926
+ }
7927
+ handleRefineResult(r, payload, input, inst);
7928
+ return;
7929
+ };
7930
+ });
7931
+ function handleRefineResult(result, payload, input, inst) {
7932
+ if (!result) {
7933
+ const _iss = {
7934
+ code: "custom",
7935
+ input,
7936
+ inst,
7937
+ path: [...inst._zod.def.path ?? []],
7938
+ continue: !inst._zod.def.abort
7939
+ };
7940
+ if (inst._zod.def.params)
7941
+ _iss.params = inst._zod.def.params;
7942
+ payload.issues.push(issue(_iss));
7943
+ }
7944
+ }
7945
+ // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/index.js
7946
+ var exports_locales = {};
7947
+ __export(exports_locales, {
7948
+ ar: () => ar_default,
10304
7949
  az: () => az_default,
10305
- ar: () => ar_default
7950
+ be: () => be_default,
7951
+ bg: () => bg_default,
7952
+ ca: () => ca_default,
7953
+ cs: () => cs_default,
7954
+ da: () => da_default,
7955
+ de: () => de_default,
7956
+ en: () => en_default,
7957
+ eo: () => eo_default,
7958
+ es: () => es_default,
7959
+ fa: () => fa_default,
7960
+ fi: () => fi_default,
7961
+ fr: () => fr_default,
7962
+ frCA: () => fr_CA_default,
7963
+ he: () => he_default,
7964
+ hu: () => hu_default,
7965
+ hy: () => hy_default,
7966
+ id: () => id_default,
7967
+ is: () => is_default,
7968
+ it: () => it_default,
7969
+ ja: () => ja_default,
7970
+ ka: () => ka_default,
7971
+ kh: () => kh_default,
7972
+ km: () => km_default,
7973
+ ko: () => ko_default,
7974
+ lt: () => lt_default,
7975
+ mk: () => mk_default,
7976
+ ms: () => ms_default,
7977
+ nl: () => nl_default,
7978
+ no: () => no_default,
7979
+ ota: () => ota_default,
7980
+ pl: () => pl_default,
7981
+ ps: () => ps_default,
7982
+ pt: () => pt_default,
7983
+ ru: () => ru_default,
7984
+ sl: () => sl_default,
7985
+ sv: () => sv_default,
7986
+ ta: () => ta_default,
7987
+ th: () => th_default,
7988
+ tr: () => tr_default,
7989
+ ua: () => ua_default,
7990
+ uk: () => uk_default,
7991
+ ur: () => ur_default,
7992
+ uz: () => uz_default,
7993
+ vi: () => vi_default,
7994
+ yo: () => yo_default,
7995
+ zhCN: () => zh_CN_default,
7996
+ zhTW: () => zh_TW_default
10306
7997
  });
10307
7998
 
10308
7999
  // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ar.js
@@ -17676,242 +15367,242 @@ class JSONSchemaGenerator {
17676
15367
  ...params?.unrepresentable && { unrepresentable: params.unrepresentable },
17677
15368
  ...params?.override && { override: params.override },
17678
15369
  ...params?.io && { io: params.io }
17679
- });
17680
- }
17681
- process(schema, _params = { path: [], schemaPath: [] }) {
17682
- return process(schema, this.ctx, _params);
17683
- }
17684
- emit(schema, _params) {
17685
- if (_params) {
17686
- if (_params.cycles)
17687
- this.ctx.cycles = _params.cycles;
17688
- if (_params.reused)
17689
- this.ctx.reused = _params.reused;
17690
- if (_params.external)
17691
- this.ctx.external = _params.external;
17692
- }
17693
- extractDefs(this.ctx, schema);
17694
- const result = finalize(this.ctx, schema);
17695
- const { "~standard": _, ...plainResult } = result;
17696
- return plainResult;
17697
- }
17698
- }
17699
- // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/json-schema.js
17700
- var exports_json_schema = {};
17701
- // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/schemas.js
17702
- var exports_schemas2 = {};
17703
- __export(exports_schemas2, {
17704
- xor: () => xor,
17705
- xid: () => xid2,
17706
- void: () => _void2,
17707
- uuidv7: () => uuidv7,
17708
- uuidv6: () => uuidv6,
17709
- uuidv4: () => uuidv4,
17710
- uuid: () => uuid2,
17711
- url: () => url,
17712
- unknown: () => unknown,
17713
- union: () => union,
17714
- undefined: () => _undefined3,
17715
- ulid: () => ulid2,
17716
- uint64: () => uint64,
17717
- uint32: () => uint32,
17718
- tuple: () => tuple,
17719
- transform: () => transform,
17720
- templateLiteral: () => templateLiteral,
17721
- symbol: () => symbol,
17722
- superRefine: () => superRefine,
17723
- success: () => success,
17724
- stringbool: () => stringbool,
17725
- stringFormat: () => stringFormat,
17726
- string: () => string2,
17727
- strictObject: () => strictObject,
17728
- set: () => set2,
17729
- refine: () => refine,
17730
- record: () => record,
17731
- readonly: () => readonly2,
17732
- promise: () => promise,
17733
- preprocess: () => preprocess,
17734
- prefault: () => prefault,
17735
- pipe: () => pipe,
17736
- partialRecord: () => partialRecord,
17737
- optional: () => optional,
17738
- object: () => object,
17739
- number: () => number2,
17740
- nullish: () => nullish2,
17741
- nullable: () => nullable,
17742
- null: () => _null3,
17743
- nonoptional: () => nonoptional,
17744
- never: () => never,
17745
- nativeEnum: () => nativeEnum,
17746
- nanoid: () => nanoid2,
17747
- nan: () => nan,
17748
- meta: () => meta2,
17749
- map: () => map,
17750
- mac: () => mac2,
17751
- looseRecord: () => looseRecord,
17752
- looseObject: () => looseObject,
17753
- literal: () => literal,
17754
- lazy: () => lazy,
17755
- ksuid: () => ksuid2,
17756
- keyof: () => keyof,
17757
- jwt: () => jwt,
17758
- json: () => json,
17759
- ipv6: () => ipv62,
17760
- ipv4: () => ipv42,
17761
- intersection: () => intersection,
17762
- int64: () => int64,
17763
- int32: () => int32,
17764
- int: () => int,
17765
- instanceof: () => _instanceof,
17766
- httpUrl: () => httpUrl,
17767
- hostname: () => hostname2,
17768
- hex: () => hex2,
17769
- hash: () => hash,
17770
- guid: () => guid2,
17771
- function: () => _function,
17772
- float64: () => float64,
17773
- float32: () => float32,
17774
- file: () => file,
17775
- exactOptional: () => exactOptional,
17776
- enum: () => _enum2,
17777
- emoji: () => emoji2,
17778
- email: () => email2,
17779
- e164: () => e1642,
17780
- discriminatedUnion: () => discriminatedUnion,
17781
- describe: () => describe2,
17782
- date: () => date3,
17783
- custom: () => custom,
17784
- cuid2: () => cuid22,
17785
- cuid: () => cuid3,
17786
- codec: () => codec,
17787
- cidrv6: () => cidrv62,
17788
- cidrv4: () => cidrv42,
17789
- check: () => check,
17790
- catch: () => _catch2,
17791
- boolean: () => boolean2,
17792
- bigint: () => bigint2,
17793
- base64url: () => base64url2,
17794
- base64: () => base642,
17795
- array: () => array,
17796
- any: () => any,
17797
- _function: () => _function,
17798
- _default: () => _default2,
17799
- _ZodString: () => _ZodString,
17800
- ZodXor: () => ZodXor,
17801
- ZodXID: () => ZodXID,
17802
- ZodVoid: () => ZodVoid,
17803
- ZodUnknown: () => ZodUnknown,
17804
- ZodUnion: () => ZodUnion,
17805
- ZodUndefined: () => ZodUndefined,
17806
- ZodUUID: () => ZodUUID,
17807
- ZodURL: () => ZodURL,
17808
- ZodULID: () => ZodULID,
17809
- ZodType: () => ZodType,
17810
- ZodTuple: () => ZodTuple,
17811
- ZodTransform: () => ZodTransform,
17812
- ZodTemplateLiteral: () => ZodTemplateLiteral,
17813
- ZodSymbol: () => ZodSymbol,
17814
- ZodSuccess: () => ZodSuccess,
17815
- ZodStringFormat: () => ZodStringFormat,
17816
- ZodString: () => ZodString,
17817
- ZodSet: () => ZodSet,
17818
- ZodRecord: () => ZodRecord,
17819
- ZodReadonly: () => ZodReadonly,
17820
- ZodPromise: () => ZodPromise,
17821
- ZodPrefault: () => ZodPrefault,
17822
- ZodPipe: () => ZodPipe,
17823
- ZodOptional: () => ZodOptional,
17824
- ZodObject: () => ZodObject,
17825
- ZodNumberFormat: () => ZodNumberFormat,
17826
- ZodNumber: () => ZodNumber,
17827
- ZodNullable: () => ZodNullable,
17828
- ZodNull: () => ZodNull,
17829
- ZodNonOptional: () => ZodNonOptional,
17830
- ZodNever: () => ZodNever,
17831
- ZodNanoID: () => ZodNanoID,
17832
- ZodNaN: () => ZodNaN,
17833
- ZodMap: () => ZodMap,
17834
- ZodMAC: () => ZodMAC,
17835
- ZodLiteral: () => ZodLiteral,
17836
- ZodLazy: () => ZodLazy,
17837
- ZodKSUID: () => ZodKSUID,
17838
- ZodJWT: () => ZodJWT,
17839
- ZodIntersection: () => ZodIntersection,
17840
- ZodIPv6: () => ZodIPv6,
17841
- ZodIPv4: () => ZodIPv4,
17842
- ZodGUID: () => ZodGUID,
17843
- ZodFunction: () => ZodFunction,
17844
- ZodFile: () => ZodFile,
17845
- ZodExactOptional: () => ZodExactOptional,
17846
- ZodEnum: () => ZodEnum,
17847
- ZodEmoji: () => ZodEmoji,
17848
- ZodEmail: () => ZodEmail,
17849
- ZodE164: () => ZodE164,
17850
- ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
17851
- ZodDefault: () => ZodDefault,
17852
- ZodDate: () => ZodDate,
17853
- ZodCustomStringFormat: () => ZodCustomStringFormat,
17854
- ZodCustom: () => ZodCustom,
17855
- ZodCodec: () => ZodCodec,
17856
- ZodCatch: () => ZodCatch,
17857
- ZodCUID2: () => ZodCUID2,
17858
- ZodCUID: () => ZodCUID,
17859
- ZodCIDRv6: () => ZodCIDRv6,
17860
- ZodCIDRv4: () => ZodCIDRv4,
17861
- ZodBoolean: () => ZodBoolean,
17862
- ZodBigIntFormat: () => ZodBigIntFormat,
17863
- ZodBigInt: () => ZodBigInt,
17864
- ZodBase64URL: () => ZodBase64URL,
17865
- ZodBase64: () => ZodBase64,
15370
+ });
15371
+ }
15372
+ process(schema, _params = { path: [], schemaPath: [] }) {
15373
+ return process(schema, this.ctx, _params);
15374
+ }
15375
+ emit(schema, _params) {
15376
+ if (_params) {
15377
+ if (_params.cycles)
15378
+ this.ctx.cycles = _params.cycles;
15379
+ if (_params.reused)
15380
+ this.ctx.reused = _params.reused;
15381
+ if (_params.external)
15382
+ this.ctx.external = _params.external;
15383
+ }
15384
+ extractDefs(this.ctx, schema);
15385
+ const result = finalize(this.ctx, schema);
15386
+ const { "~standard": _, ...plainResult } = result;
15387
+ return plainResult;
15388
+ }
15389
+ }
15390
+ // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/json-schema.js
15391
+ var exports_json_schema = {};
15392
+ // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/schemas.js
15393
+ var exports_schemas2 = {};
15394
+ __export(exports_schemas2, {
15395
+ ZodAny: () => ZodAny,
17866
15396
  ZodArray: () => ZodArray,
17867
- ZodAny: () => ZodAny
15397
+ ZodBase64: () => ZodBase64,
15398
+ ZodBase64URL: () => ZodBase64URL,
15399
+ ZodBigInt: () => ZodBigInt,
15400
+ ZodBigIntFormat: () => ZodBigIntFormat,
15401
+ ZodBoolean: () => ZodBoolean,
15402
+ ZodCIDRv4: () => ZodCIDRv4,
15403
+ ZodCIDRv6: () => ZodCIDRv6,
15404
+ ZodCUID: () => ZodCUID,
15405
+ ZodCUID2: () => ZodCUID2,
15406
+ ZodCatch: () => ZodCatch,
15407
+ ZodCodec: () => ZodCodec,
15408
+ ZodCustom: () => ZodCustom,
15409
+ ZodCustomStringFormat: () => ZodCustomStringFormat,
15410
+ ZodDate: () => ZodDate,
15411
+ ZodDefault: () => ZodDefault,
15412
+ ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
15413
+ ZodE164: () => ZodE164,
15414
+ ZodEmail: () => ZodEmail,
15415
+ ZodEmoji: () => ZodEmoji,
15416
+ ZodEnum: () => ZodEnum,
15417
+ ZodExactOptional: () => ZodExactOptional,
15418
+ ZodFile: () => ZodFile,
15419
+ ZodFunction: () => ZodFunction,
15420
+ ZodGUID: () => ZodGUID,
15421
+ ZodIPv4: () => ZodIPv4,
15422
+ ZodIPv6: () => ZodIPv6,
15423
+ ZodIntersection: () => ZodIntersection,
15424
+ ZodJWT: () => ZodJWT,
15425
+ ZodKSUID: () => ZodKSUID,
15426
+ ZodLazy: () => ZodLazy,
15427
+ ZodLiteral: () => ZodLiteral,
15428
+ ZodMAC: () => ZodMAC,
15429
+ ZodMap: () => ZodMap,
15430
+ ZodNaN: () => ZodNaN,
15431
+ ZodNanoID: () => ZodNanoID,
15432
+ ZodNever: () => ZodNever,
15433
+ ZodNonOptional: () => ZodNonOptional,
15434
+ ZodNull: () => ZodNull,
15435
+ ZodNullable: () => ZodNullable,
15436
+ ZodNumber: () => ZodNumber,
15437
+ ZodNumberFormat: () => ZodNumberFormat,
15438
+ ZodObject: () => ZodObject,
15439
+ ZodOptional: () => ZodOptional,
15440
+ ZodPipe: () => ZodPipe,
15441
+ ZodPrefault: () => ZodPrefault,
15442
+ ZodPromise: () => ZodPromise,
15443
+ ZodReadonly: () => ZodReadonly,
15444
+ ZodRecord: () => ZodRecord,
15445
+ ZodSet: () => ZodSet,
15446
+ ZodString: () => ZodString,
15447
+ ZodStringFormat: () => ZodStringFormat,
15448
+ ZodSuccess: () => ZodSuccess,
15449
+ ZodSymbol: () => ZodSymbol,
15450
+ ZodTemplateLiteral: () => ZodTemplateLiteral,
15451
+ ZodTransform: () => ZodTransform,
15452
+ ZodTuple: () => ZodTuple,
15453
+ ZodType: () => ZodType,
15454
+ ZodULID: () => ZodULID,
15455
+ ZodURL: () => ZodURL,
15456
+ ZodUUID: () => ZodUUID,
15457
+ ZodUndefined: () => ZodUndefined,
15458
+ ZodUnion: () => ZodUnion,
15459
+ ZodUnknown: () => ZodUnknown,
15460
+ ZodVoid: () => ZodVoid,
15461
+ ZodXID: () => ZodXID,
15462
+ ZodXor: () => ZodXor,
15463
+ _ZodString: () => _ZodString,
15464
+ _default: () => _default2,
15465
+ _function: () => _function,
15466
+ any: () => any,
15467
+ array: () => array,
15468
+ base64: () => base642,
15469
+ base64url: () => base64url2,
15470
+ bigint: () => bigint2,
15471
+ boolean: () => boolean2,
15472
+ catch: () => _catch2,
15473
+ check: () => check,
15474
+ cidrv4: () => cidrv42,
15475
+ cidrv6: () => cidrv62,
15476
+ codec: () => codec,
15477
+ cuid: () => cuid3,
15478
+ cuid2: () => cuid22,
15479
+ custom: () => custom,
15480
+ date: () => date3,
15481
+ describe: () => describe2,
15482
+ discriminatedUnion: () => discriminatedUnion,
15483
+ e164: () => e1642,
15484
+ email: () => email2,
15485
+ emoji: () => emoji2,
15486
+ enum: () => _enum2,
15487
+ exactOptional: () => exactOptional,
15488
+ file: () => file,
15489
+ float32: () => float32,
15490
+ float64: () => float64,
15491
+ function: () => _function,
15492
+ guid: () => guid2,
15493
+ hash: () => hash,
15494
+ hex: () => hex2,
15495
+ hostname: () => hostname2,
15496
+ httpUrl: () => httpUrl,
15497
+ instanceof: () => _instanceof,
15498
+ int: () => int,
15499
+ int32: () => int32,
15500
+ int64: () => int64,
15501
+ intersection: () => intersection,
15502
+ ipv4: () => ipv42,
15503
+ ipv6: () => ipv62,
15504
+ json: () => json,
15505
+ jwt: () => jwt,
15506
+ keyof: () => keyof,
15507
+ ksuid: () => ksuid2,
15508
+ lazy: () => lazy,
15509
+ literal: () => literal,
15510
+ looseObject: () => looseObject,
15511
+ looseRecord: () => looseRecord,
15512
+ mac: () => mac2,
15513
+ map: () => map,
15514
+ meta: () => meta2,
15515
+ nan: () => nan,
15516
+ nanoid: () => nanoid2,
15517
+ nativeEnum: () => nativeEnum,
15518
+ never: () => never,
15519
+ nonoptional: () => nonoptional,
15520
+ null: () => _null3,
15521
+ nullable: () => nullable,
15522
+ nullish: () => nullish2,
15523
+ number: () => number2,
15524
+ object: () => object,
15525
+ optional: () => optional,
15526
+ partialRecord: () => partialRecord,
15527
+ pipe: () => pipe,
15528
+ prefault: () => prefault,
15529
+ preprocess: () => preprocess,
15530
+ promise: () => promise,
15531
+ readonly: () => readonly2,
15532
+ record: () => record,
15533
+ refine: () => refine,
15534
+ set: () => set2,
15535
+ strictObject: () => strictObject,
15536
+ string: () => string2,
15537
+ stringFormat: () => stringFormat,
15538
+ stringbool: () => stringbool,
15539
+ success: () => success,
15540
+ superRefine: () => superRefine,
15541
+ symbol: () => symbol,
15542
+ templateLiteral: () => templateLiteral,
15543
+ transform: () => transform,
15544
+ tuple: () => tuple,
15545
+ uint32: () => uint32,
15546
+ uint64: () => uint64,
15547
+ ulid: () => ulid2,
15548
+ undefined: () => _undefined3,
15549
+ union: () => union,
15550
+ unknown: () => unknown,
15551
+ url: () => url,
15552
+ uuid: () => uuid2,
15553
+ uuidv4: () => uuidv4,
15554
+ uuidv6: () => uuidv6,
15555
+ uuidv7: () => uuidv7,
15556
+ void: () => _void2,
15557
+ xid: () => xid2,
15558
+ xor: () => xor
17868
15559
  });
17869
15560
 
17870
15561
  // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/checks.js
17871
15562
  var exports_checks2 = {};
17872
15563
  __export(exports_checks2, {
17873
- uppercase: () => _uppercase,
17874
- trim: () => _trim,
17875
- toUpperCase: () => _toUpperCase,
17876
- toLowerCase: () => _toLowerCase,
17877
- startsWith: () => _startsWith,
17878
- slugify: () => _slugify,
17879
- size: () => _size,
17880
- regex: () => _regex,
17881
- property: () => _property,
17882
- positive: () => _positive,
17883
- overwrite: () => _overwrite,
17884
- normalize: () => _normalize,
17885
- nonpositive: () => _nonpositive,
17886
- nonnegative: () => _nonnegative,
17887
- negative: () => _negative,
17888
- multipleOf: () => _multipleOf,
17889
- minSize: () => _minSize,
17890
- minLength: () => _minLength,
17891
- mime: () => _mime,
17892
- maxSize: () => _maxSize,
17893
- maxLength: () => _maxLength,
17894
- lte: () => _lte,
17895
- lt: () => _lt,
17896
- lowercase: () => _lowercase,
17897
- length: () => _length,
17898
- includes: () => _includes,
17899
- gte: () => _gte,
15564
+ endsWith: () => _endsWith,
17900
15565
  gt: () => _gt,
17901
- endsWith: () => _endsWith
15566
+ gte: () => _gte,
15567
+ includes: () => _includes,
15568
+ length: () => _length,
15569
+ lowercase: () => _lowercase,
15570
+ lt: () => _lt,
15571
+ lte: () => _lte,
15572
+ maxLength: () => _maxLength,
15573
+ maxSize: () => _maxSize,
15574
+ mime: () => _mime,
15575
+ minLength: () => _minLength,
15576
+ minSize: () => _minSize,
15577
+ multipleOf: () => _multipleOf,
15578
+ negative: () => _negative,
15579
+ nonnegative: () => _nonnegative,
15580
+ nonpositive: () => _nonpositive,
15581
+ normalize: () => _normalize,
15582
+ overwrite: () => _overwrite,
15583
+ positive: () => _positive,
15584
+ property: () => _property,
15585
+ regex: () => _regex,
15586
+ size: () => _size,
15587
+ slugify: () => _slugify,
15588
+ startsWith: () => _startsWith,
15589
+ toLowerCase: () => _toLowerCase,
15590
+ toUpperCase: () => _toUpperCase,
15591
+ trim: () => _trim,
15592
+ uppercase: () => _uppercase
17902
15593
  });
17903
15594
 
17904
15595
  // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/iso.js
17905
15596
  var exports_iso = {};
17906
15597
  __export(exports_iso, {
17907
- time: () => time2,
17908
- duration: () => duration2,
17909
- datetime: () => datetime2,
17910
- date: () => date2,
17911
- ZodISOTime: () => ZodISOTime,
17912
- ZodISODuration: () => ZodISODuration,
15598
+ ZodISODate: () => ZodISODate,
17913
15599
  ZodISODateTime: () => ZodISODateTime,
17914
- ZodISODate: () => ZodISODate
15600
+ ZodISODuration: () => ZodISODuration,
15601
+ ZodISOTime: () => ZodISOTime,
15602
+ date: () => date2,
15603
+ datetime: () => datetime2,
15604
+ duration: () => duration2,
15605
+ time: () => time2
17915
15606
  });
17916
15607
  var ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def2) => {
17917
15608
  $ZodISODateTime.init(inst, def2);
@@ -19555,11 +17246,11 @@ function fromJSONSchema(schema, params) {
19555
17246
  // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/coerce.js
19556
17247
  var exports_coerce = {};
19557
17248
  __export(exports_coerce, {
19558
- string: () => string3,
19559
- number: () => number3,
19560
- date: () => date4,
17249
+ bigint: () => bigint3,
19561
17250
  boolean: () => boolean3,
19562
- bigint: () => bigint3
17251
+ date: () => date4,
17252
+ number: () => number3,
17253
+ string: () => string3
19563
17254
  });
19564
17255
  function string3(params) {
19565
17256
  return _coercedString(ZodString, params);