@liip/liipgpt 3.9.0 → 3.9.2

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 (47) hide show
  1. package/LICENSE +88 -0
  2. package/button/liipgpt-button.iife.js +11 -71
  3. package/chat/liipgpt-chat.iife.js +12 -12
  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/B7iNpEKB.js +143 -0
  10. package/configurator/_app/immutable/chunks/B9Sj_kOF.js +2 -0
  11. package/configurator/_app/immutable/chunks/Bo_I9OnC.js +1 -0
  12. package/configurator/_app/immutable/chunks/C4jvtK34.js +1 -0
  13. package/configurator/_app/immutable/chunks/C5QUeOT4.js +16 -0
  14. package/configurator/_app/immutable/chunks/{DGbgqVw-.js → CA38AHEC.js} +2 -2
  15. package/configurator/_app/immutable/chunks/CFeIeoV1.js +1 -0
  16. package/configurator/_app/immutable/chunks/{CW8XT_f0.js → D1JxtiVt.js} +1 -1
  17. package/configurator/_app/immutable/chunks/{CzlKx6Dn.js → DGQ954rx.js} +1 -1
  18. package/configurator/_app/immutable/chunks/DY91rqbt.js +61 -0
  19. package/configurator/_app/immutable/chunks/{BiMiaf32.js → DYa1ApbB.js} +1 -1
  20. package/configurator/_app/immutable/chunks/{BoSlghYU.js → Qr3QoTpa.js} +1 -1
  21. package/configurator/_app/immutable/chunks/{kfKo0Lxm.js → ZVK8Dk3M.js} +1 -1
  22. package/configurator/_app/immutable/chunks/hdHt6us6.js +1 -0
  23. package/configurator/_app/immutable/entry/{app.CwqfSUK4.js → app.CNOaE4a-.js} +2 -2
  24. package/configurator/_app/immutable/entry/start.Dt2jlaUG.js +1 -0
  25. package/configurator/_app/immutable/nodes/{0.WsdkbKsV.js → 0.5_GG2VVz.js} +1 -1
  26. package/configurator/_app/immutable/nodes/{1.2qVIdLFb.js → 1.CC4YG4vs.js} +1 -1
  27. package/configurator/_app/immutable/nodes/{2.zFWWXwja.js → 2.Bsn6JT-r.js} +5 -5
  28. package/configurator/_app/immutable/nodes/{3.YVKriLPj.js → 3.BGFB6L4G.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 +1263 -3510
  33. package/index.d.ts +34 -0
  34. package/index.js +1230 -3479
  35. package/package.json +2 -2
  36. package/search-summary/liipgpt-search-summary.iife.js +6 -6
  37. package/configurator/_app/immutable/chunks/BKESH8zC.js +0 -1
  38. package/configurator/_app/immutable/chunks/BKZTsJMz.js +0 -1
  39. package/configurator/_app/immutable/chunks/C8BUw-Wc.js +0 -61
  40. package/configurator/_app/immutable/chunks/CWvh3_h0.js +0 -16
  41. package/configurator/_app/immutable/chunks/CqCdl07t.js +0 -1
  42. package/configurator/_app/immutable/chunks/DWxJNFvO.js +0 -143
  43. package/configurator/_app/immutable/chunks/Dn_5PWao.js +0 -2
  44. package/configurator/_app/immutable/chunks/IPBcm7Y9.js +0 -1
  45. package/configurator/_app/immutable/chunks/cE02ifhd.js +0 -1
  46. package/configurator/_app/immutable/entry/start.C9g5qB7o.js +0 -1
  47. 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,33 @@ 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
+ PiiChecks: () => PiiChecks,
72
+ answerFormFieldSchema: () => answerFormFieldSchema,
73
+ answerFormSchema: () => answerFormSchema,
74
+ chatConfigSchema: () => chatConfigSchema,
75
+ chatConfigSchemaWithLegacyThemeName: () => chatConfigSchemaWithLegacyThemeName,
76
+ chatContentSchema: () => chatContentSchema,
77
+ chatMessageBotLoadingSchema: () => chatMessageBotLoadingSchema,
78
+ chatMessageBotStreamingSchema: () => chatMessageBotStreamingSchema,
79
+ chatMessageSchema: () => chatMessageSchema,
80
+ chatMessageUserSchema: () => chatMessageUserSchema,
81
+ checkForPii: () => checkForPii,
82
+ classificationConfigSchema: () => classificationConfigSchema,
83
+ classificationResponseSchema: () => classificationResponseSchema,
84
+ completeChatConfigSchema: () => completeChatConfigSchema,
85
+ conversationHistorySchema: () => conversationHistorySchema,
86
+ conversationStateSchema: () => conversationStateSchema,
87
+ fullTranslations: () => fullTranslations,
88
+ menuItemSchema: () => menuItemSchema,
89
+ pageStateSchema: () => pageStateSchema,
90
+ predefinedQuestionSchema: () => predefinedQuestionSchema,
91
+ predefinedQuestionsResponseSchema: () => predefinedQuestionsResponseSchema,
92
+ routeSchema: () => routeSchema,
93
+ selectedTopicSchema: () => selectedTopicSchema,
94
+ userDataResponseSchema: () => userDataResponseSchema
91
95
  });
92
96
  module.exports = __toCommonJS(exports_client);
93
97
 
@@ -3336,29 +3340,11 @@ class MarkdownRenderer {
3336
3340
  // node_modules/.bun/esm-env@1.2.2/node_modules/esm-env/true.js
3337
3341
  var true_default = true;
3338
3342
  // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/shared/utils.js
3339
- var is_array = Array.isArray;
3340
3343
  var index_of = Array.prototype.indexOf;
3341
3344
  var includes = Array.prototype.includes;
3342
- var define_property = Object.defineProperty;
3343
- var get_descriptor = Object.getOwnPropertyDescriptor;
3344
3345
  var object_prototype = Object.prototype;
3345
3346
  var array_prototype = Array.prototype;
3346
- var get_prototype_of = Object.getPrototypeOf;
3347
3347
  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
3348
 
3363
3349
  // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/constants.js
3364
3350
  var DERIVED = 1 << 1;
@@ -3396,101 +3382,11 @@ var STALE_REACTION = new class StaleReactionError extends Error {
3396
3382
  message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
3397
3383
  };
3398
3384
  var IS_XHTML = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
3399
- var COMMENT_NODE = 8;
3400
3385
 
3401
3386
  // 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
3387
  function safe_not_equal(a, b) {
3406
3388
  return a != a ? b == b : a !== b || a !== null && typeof a === "object" || typeof a === "function";
3407
3389
  }
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
3390
  // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/constants.js
3495
3391
  var EACH_INDEX_REACTIVE = 1 << 1;
3496
3392
  var EACH_IS_CONTROLLED = 1 << 2;
@@ -3505,418 +3401,13 @@ var TRANSITION_GLOBAL = 1 << 2;
3505
3401
  var TEMPLATE_USE_IMPORT_NODE = 1 << 1;
3506
3402
  var TEMPLATE_USE_SVG = 1 << 2;
3507
3403
  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
3404
  var ELEMENT_PRESERVE_ATTRIBUTE_CASE = 1 << 1;
3514
3405
  var ELEMENT_IS_INPUT = 1 << 2;
3515
3406
  var UNINITIALIZED = Symbol();
3516
3407
  var FILENAME = Symbol("filename");
3517
3408
  var HMR = Symbol("hmr");
3518
3409
 
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
3410
  // 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
3411
  var ARRAY_MUTATING_METHODS = new Set([
3921
3412
  "copyWithin",
3922
3413
  "fill",
@@ -3928,140 +3419,12 @@ var ARRAY_MUTATING_METHODS = new Set([
3928
3419
  "splice",
3929
3420
  "unshift"
3930
3421
  ]);
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
3422
 
3958
3423
  // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/error-handling.js
3959
3424
  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
3425
 
4031
3426
  // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/reactivity/status.js
4032
3427
  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
3428
 
4066
3429
  // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/store/shared/index.js
4067
3430
  var subscriber_queue = [];
@@ -4108,2462 +3471,852 @@ function writable(value, start = noop) {
4108
3471
  }
4109
3472
 
4110
3473
  // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/reactivity/store.js
4111
- var legacy_is_updating_store = false;
4112
3474
  var IS_UNMOUNTED = Symbol();
4113
3475
 
4114
3476
  // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/reactivity/batch.js
4115
3477
  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
3478
  var source_stacks = true_default ? new Set : null;
4126
- var uid = 1;
4127
3479
 
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);
3480
+ // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/dom/blocks/boundary.js
3481
+ var flags = EFFECT_TRANSPARENT | EFFECT_PRESERVED;
3482
+
3483
+ // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/reactivity/deriveds.js
3484
+ var recent_async_deriveds = new Set;
3485
+
3486
+ // node_modules/.bun/svelte@5.54.0/node_modules/svelte/src/internal/client/reactivity/sources.js
3487
+ var eager_effects = new Set;
3488
+ var old_values = new Map;
3489
+ // node_modules/.bun/inside-out-async@2.0.2/node_modules/inside-out-async/dist/index.mjs
3490
+ function withResolvers() {
3491
+ let reject;
3492
+ let resolve;
3493
+ const promise = new Promise((resolveFunc, rejectFunc) => {
3494
+ resolve = resolveFunc;
3495
+ reject = rejectFunc;
3496
+ });
3497
+ return {
3498
+ promise,
3499
+ reject,
3500
+ resolve
3501
+ };
3502
+ }
3503
+
3504
+ // src/lib/client/utils/flag.ts
3505
+ class Flag {
3506
+ promise;
3507
+ resolve;
3508
+ reject;
3509
+ constructor() {
3510
+ const { promise, resolve, reject } = withResolvers();
3511
+ this.promise = promise;
3512
+ this.resolve = resolve;
3513
+ this.reject = reject;
4400
3514
  }
4401
- settled() {
4402
- return (this.#deferred ??= deferred()).promise;
3515
+ then(onfulfilled, onrejected) {
3516
+ return this.promise.then(onfulfilled, onrejected);
4403
3517
  }
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;
3518
+ catch(onrejected) {
3519
+ return this.promise.catch(onrejected);
4420
3520
  }
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
- }
3521
+ finally(onfinally) {
3522
+ return this.promise.finally(onfinally);
4436
3523
  }
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);
3524
+ toPromise() {
3525
+ return this.promise;
4462
3526
  }
3527
+ [Symbol.toStringTag] = "Flag";
4463
3528
  }
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
- }
3529
+
3530
+ // src/lib/client/utils/future-value.ts
3531
+ class FutureValue {
3532
+ hasValue = new Flag;
3533
+ currentValue;
3534
+ setValue(value) {
3535
+ this.currentValue = value;
3536
+ this.hasValue.resolve();
4482
3537
  }
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);
3538
+ cleanup(reason) {
3539
+ this.hasValue.reject(reason);
4490
3540
  }
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
- }
3541
+ getCurrentValue() {
3542
+ return this.currentValue;
4530
3543
  }
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
- }
3544
+ async toPromise() {
3545
+ await this.hasValue;
3546
+ return this.currentValue;
4563
3547
  }
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;
3548
+ then(onfulfilled, onrejected) {
3549
+ return this.toPromise().then(onfulfilled, onrejected);
4573
3550
  }
4574
- if ((effect.f & DIRTY) !== 0) {
4575
- tracked.d.push(effect);
4576
- } else if ((effect.f & MAYBE_DIRTY) !== 0) {
4577
- tracked.m.push(effect);
3551
+ catch(onrejected) {
3552
+ return this.toPromise().catch(onrejected);
4578
3553
  }
4579
- set_signal_status(effect, CLEAN);
4580
- var e = effect.first;
4581
- while (e !== null) {
4582
- reset_branch(e, tracked);
4583
- e = e.next;
3554
+ finally(onfinally) {
3555
+ return this.toPromise().finally(onfinally);
4584
3556
  }
3557
+ [Symbol.toStringTag] = "FutureValue";
4585
3558
  }
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;
3559
+
3560
+ // src/lib/client/utils/get-domain-name.ts
3561
+ var getDomainName = (url) => {
3562
+ try {
3563
+ const urlObj = new URL(url);
3564
+ return urlObj.hostname;
3565
+ } catch {
3566
+ return url;
4592
3567
  }
4593
- }
3568
+ };
4594
3569
 
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
- };
3570
+ // src/lib/client/utils/html-to-text.ts
3571
+ function htmlToText(html3) {
3572
+ const text2 = html3.replace(/<[^>]*>/g, "").replace(/&nbsp;/g, " ").replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"');
3573
+ return text2;
4624
3574
  }
4625
3575
 
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();
3576
+ // src/lib/client/chat-result-builder.ts
3577
+ var mapSseReference = ({
3578
+ url,
3579
+ considered,
3580
+ title,
3581
+ description,
3582
+ summary
3583
+ }) => {
3584
+ const domainName = getDomainName(url);
3585
+ const desc = description || summary;
3586
+ return {
3587
+ url,
3588
+ considered,
3589
+ referenceIndex: {},
3590
+ score: 0,
3591
+ metadata: {},
3592
+ display: {
3593
+ card: {
3594
+ title,
3595
+ description: desc,
3596
+ badge: url
3597
+ },
3598
+ listItem: {
3599
+ title,
3600
+ badge: domainName
4683
3601
  }
4684
- }, flags);
4685
- if (hydrating) {
4686
- this.#anchor = hydrate_node;
4687
3602
  }
3603
+ };
3604
+ };
3605
+
3606
+ class ChatResultBuilder {
3607
+ options;
3608
+ store;
3609
+ content = new FutureValue;
3610
+ backendSendsMappedRefs = false;
3611
+ constructor(options2) {
3612
+ this.options = options2;
3613
+ this.store = writable({
3614
+ id: options2.id,
3615
+ state: "loading",
3616
+ errors: [],
3617
+ type: "bot",
3618
+ time: new Date().toISOString(),
3619
+ message: { markdown: "", html: "", text: "" },
3620
+ references: { all: [], used: [], unused: [] },
3621
+ retrievalQuestion: options2.userQuestion
3622
+ });
4688
3623
  }
4689
- #hydrate_resolved_content() {
4690
- try {
4691
- this.#main_effect = branch(() => this.#children(this.#anchor));
4692
- } catch (error) {
4693
- this.error(error);
4694
- }
3624
+ pushError(error) {
3625
+ this.options.onError?.(error);
3626
+ this.store.update((current) => ({ ...current, errors: [...current.errors, error] }));
4695
3627
  }
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
- });
3628
+ updateRequestId(id) {
3629
+ this.store.update((current) => ({
3630
+ ...current,
3631
+ id
3632
+ }));
4703
3633
  }
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
- }
3634
+ updateText(text2) {
3635
+ this.store.update((current) => {
3636
+ const nextMarkdown = current.message.markdown + text2;
3637
+ const html3 = this.options.markdownRenderer.toHTML(nextMarkdown, current.references);
3638
+ return {
3639
+ ...current,
3640
+ state: "streaming",
3641
+ message: { markdown: nextMarkdown, html: html3, text: "" }
3642
+ };
4725
3643
  });
4726
3644
  }
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);
3645
+ finishMessage() {
3646
+ this.store.update((current) => {
3647
+ const message = {
3648
+ ...current,
3649
+ state: "done"
3650
+ };
3651
+ message.references.unused = message.references.all.filter((reference) => reference.referenceIndex.used === undefined);
3652
+ message.message.text = htmlToText(message.message.html);
3653
+ this.options?.onFinish?.(message);
3654
+ this.content.setValue(message);
3655
+ return message;
3656
+ });
4750
3657
  }
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;
3658
+ addReference(reference) {
3659
+ this.store.update((current) => {
3660
+ const allRefs = current.references.all;
3661
+ const nextIndex = allRefs.length;
3662
+ const nextAllRefs = [
3663
+ ...allRefs,
3664
+ {
3665
+ ...reference,
3666
+ referenceIndex: { all: nextIndex }
5142
3667
  }
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;
3668
+ ];
3669
+ return {
3670
+ ...current,
3671
+ references: { used: current.references.used, all: nextAllRefs }
3672
+ };
3673
+ });
5223
3674
  }
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
- }
3675
+ addMappedReference(reference) {
3676
+ this.backendSendsMappedRefs = true;
3677
+ this.addReference(reference);
5239
3678
  }
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;
3679
+ addOldReference(oldReference) {
3680
+ if (!this.backendSendsMappedRefs)
3681
+ this.addReference(mapSseReference(oldReference));
5248
3682
  }
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;
3683
+ updateRetrievalQuestion(question) {
3684
+ this.store.update((current) => ({
3685
+ ...current,
3686
+ retrievalQuestion: question
3687
+ }));
5286
3688
  }
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
- }
3689
+ setNoFeedback() {
3690
+ this.store.update((current) => ({
3691
+ ...current,
3692
+ noFeedback: true
3693
+ }));
5372
3694
  }
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);
3695
+ getReadableStore() {
3696
+ return { subscribe: this.store.subscribe };
5382
3697
  }
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]);
3698
+ getPromise() {
3699
+ return this.content.toPromise();
5390
3700
  }
5391
3701
  }
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);
3702
+ // src/chat/utils/pii-checks.ts
3703
+ var PiiChecks = [
3704
+ {
3705
+ type: "email",
3706
+ check: (input) => {
3707
+ const pattern = /\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}\b/;
3708
+ return pattern.test(input);
3709
+ }
3710
+ },
3711
+ {
3712
+ type: "creditCard",
3713
+ check: (input) => {
3714
+ const pattern = /\b(?:\d[ -]*?){13,16}\b/;
3715
+ return pattern.test(input);
3716
+ }
3717
+ },
3718
+ {
3719
+ type: "ahv",
3720
+ check: (input) => {
3721
+ const pattern = /\b756\.\d{4}\.\d{4}\.\d{2}\b/;
3722
+ return pattern.test(input);
3723
+ }
3724
+ },
3725
+ {
3726
+ type: "phoneSwiss",
3727
+ check: (input) => {
3728
+ const pattern = /\b0(?:\s*\d){2}(?:\s*\/\s*)?(?:\s*\d){7,}\b/;
3729
+ return pattern.test(input);
3730
+ }
3731
+ },
3732
+ {
3733
+ type: "phoneInternational",
3734
+ check: (input) => {
3735
+ const pattern = /(?:\+|00)(?:\s*\d){10,}\b/;
3736
+ return pattern.test(input);
3737
+ }
3738
+ },
3739
+ {
3740
+ type: "swissPassport",
3741
+ check: (input) => {
3742
+ const pattern = /\b[A-HJ-NP-Z](?=.*\d)[A-HJ-NP-Z0-9]{7}\b/;
3743
+ return pattern.test(input);
3744
+ }
3745
+ },
3746
+ {
3747
+ type: "longNumber",
3748
+ check: (input) => {
3749
+ const pattern = /\b\d{9,}\b/;
3750
+ return pattern.test(input);
3751
+ }
3752
+ }
3753
+ ];
3754
+ var checkForPii = (input) => {
3755
+ for (const check of PiiChecks) {
3756
+ if (check.check(input)) {
3757
+ return check.type;
3758
+ }
3759
+ }
3760
+ return;
3761
+ };
3762
+ // src/lib/client/conversation.ts
3763
+ class Conversation {
3764
+ clientPrimitive;
3765
+ latestRequest = new FutureValue;
3766
+ state = writable({ state: "idle" });
3767
+ id;
3768
+ history = [];
3769
+ constructor(clientPrimitive) {
3770
+ this.clientPrimitive = clientPrimitive;
3771
+ this.id = clientPrimitive.createConversationId();
5407
3772
  }
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
- }
3773
+ subscribe(callback) {
3774
+ return this.state.subscribe(callback);
5464
3775
  }
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
- }
3776
+ chat(question, options2 = {}) {
3777
+ const chatResponse = this.clientPrimitive.chat(this.id, question, options2);
3778
+ this.history.push(chatResponse);
3779
+ this.latestRequest.setValue({ question, response: chatResponse });
3780
+ return chatResponse;
5492
3781
  }
5493
- if (is_destroying_effect && old_values.has(signal)) {
5494
- return old_values.get(signal);
3782
+ async abort() {
3783
+ const all = this.history.map((response) => response.abort());
3784
+ await Promise.all(all);
5495
3785
  }
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
- }
3786
+ async thumbsUp() {
3787
+ const { question, response } = await this.latestRequest;
3788
+ await response.isReadyForFeedback();
3789
+ await this.clientPrimitive.thumbsUp(response.id, question);
5518
3790
  }
5519
- if (batch_values?.has(signal)) {
5520
- return batch_values.get(signal);
3791
+ async thumbsDown() {
3792
+ const { question, response } = await this.latestRequest;
3793
+ await response.isReadyForFeedback();
3794
+ await this.clientPrimitive.thumbsDown(response.id, question);
5521
3795
  }
5522
- if ((signal.f & ERROR_VALUE) !== 0) {
5523
- throw signal.v;
3796
+ async feedback(feedback) {
3797
+ const { question, response } = await this.latestRequest;
3798
+ await response.isReadyForFeedback();
3799
+ await this.clientPrimitive.feedback(response.id, question, feedback);
5524
3800
  }
5525
- return signal.v;
5526
3801
  }
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,
3802
+
3803
+ // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/external.js
3804
+ var exports_external = {};
3805
+ __export(exports_external, {
6466
3806
  $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,
3807
+ $input: () => $input,
3808
+ $output: () => $output,
3809
+ NEVER: () => NEVER,
3810
+ TimePrecision: () => TimePrecision,
3811
+ ZodAny: () => ZodAny,
3812
+ ZodArray: () => ZodArray,
3813
+ ZodBase64: () => ZodBase64,
3814
+ ZodBase64URL: () => ZodBase64URL,
3815
+ ZodBigInt: () => ZodBigInt,
3816
+ ZodBigIntFormat: () => ZodBigIntFormat,
3817
+ ZodBoolean: () => ZodBoolean,
3818
+ ZodCIDRv4: () => ZodCIDRv4,
3819
+ ZodCIDRv6: () => ZodCIDRv6,
3820
+ ZodCUID: () => ZodCUID,
3821
+ ZodCUID2: () => ZodCUID2,
3822
+ ZodCatch: () => ZodCatch,
3823
+ ZodCodec: () => ZodCodec,
3824
+ ZodCustom: () => ZodCustom,
3825
+ ZodCustomStringFormat: () => ZodCustomStringFormat,
3826
+ ZodDate: () => ZodDate,
3827
+ ZodDefault: () => ZodDefault,
3828
+ ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
3829
+ ZodE164: () => ZodE164,
3830
+ ZodEmail: () => ZodEmail,
3831
+ ZodEmoji: () => ZodEmoji,
3832
+ ZodEnum: () => ZodEnum,
3833
+ ZodError: () => ZodError,
3834
+ ZodExactOptional: () => ZodExactOptional,
3835
+ ZodFile: () => ZodFile,
3836
+ ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
3837
+ ZodFunction: () => ZodFunction,
3838
+ ZodGUID: () => ZodGUID,
3839
+ ZodIPv4: () => ZodIPv4,
3840
+ ZodIPv6: () => ZodIPv6,
3841
+ ZodISODate: () => ZodISODate,
3842
+ ZodISODateTime: () => ZodISODateTime,
3843
+ ZodISODuration: () => ZodISODuration,
3844
+ ZodISOTime: () => ZodISOTime,
3845
+ ZodIntersection: () => ZodIntersection,
3846
+ ZodIssueCode: () => ZodIssueCode,
3847
+ ZodJWT: () => ZodJWT,
3848
+ ZodKSUID: () => ZodKSUID,
3849
+ ZodLazy: () => ZodLazy,
3850
+ ZodLiteral: () => ZodLiteral,
3851
+ ZodMAC: () => ZodMAC,
3852
+ ZodMap: () => ZodMap,
3853
+ ZodNaN: () => ZodNaN,
3854
+ ZodNanoID: () => ZodNanoID,
3855
+ ZodNever: () => ZodNever,
3856
+ ZodNonOptional: () => ZodNonOptional,
3857
+ ZodNull: () => ZodNull,
3858
+ ZodNullable: () => ZodNullable,
3859
+ ZodNumber: () => ZodNumber,
3860
+ ZodNumberFormat: () => ZodNumberFormat,
3861
+ ZodObject: () => ZodObject,
3862
+ ZodOptional: () => ZodOptional,
3863
+ ZodPipe: () => ZodPipe,
3864
+ ZodPrefault: () => ZodPrefault,
3865
+ ZodPromise: () => ZodPromise,
3866
+ ZodReadonly: () => ZodReadonly,
3867
+ ZodRealError: () => ZodRealError,
3868
+ ZodRecord: () => ZodRecord,
3869
+ ZodSet: () => ZodSet,
3870
+ ZodString: () => ZodString,
3871
+ ZodStringFormat: () => ZodStringFormat,
3872
+ ZodSuccess: () => ZodSuccess,
3873
+ ZodSymbol: () => ZodSymbol,
3874
+ ZodTemplateLiteral: () => ZodTemplateLiteral,
3875
+ ZodTransform: () => ZodTransform,
3876
+ ZodTuple: () => ZodTuple,
3877
+ ZodType: () => ZodType,
3878
+ ZodULID: () => ZodULID,
3879
+ ZodURL: () => ZodURL,
3880
+ ZodUUID: () => ZodUUID,
3881
+ ZodUndefined: () => ZodUndefined,
3882
+ ZodUnion: () => ZodUnion,
3883
+ ZodUnknown: () => ZodUnknown,
3884
+ ZodVoid: () => ZodVoid,
3885
+ ZodXID: () => ZodXID,
3886
+ ZodXor: () => ZodXor,
3887
+ _ZodString: () => _ZodString,
3888
+ _default: () => _default2,
3889
+ _function: () => _function,
3890
+ any: () => any,
3891
+ array: () => array,
3892
+ base64: () => base642,
3893
+ base64url: () => base64url2,
3894
+ bigint: () => bigint2,
3895
+ boolean: () => boolean2,
3896
+ catch: () => _catch2,
3897
+ check: () => check,
3898
+ cidrv4: () => cidrv42,
3899
+ cidrv6: () => cidrv62,
3900
+ clone: () => clone2,
3901
+ codec: () => codec,
3902
+ coerce: () => exports_coerce,
3903
+ config: () => config,
3904
+ core: () => exports_core2,
3905
+ cuid: () => cuid3,
3906
+ cuid2: () => cuid22,
3907
+ custom: () => custom,
3908
+ date: () => date3,
3909
+ decode: () => decode2,
3910
+ decodeAsync: () => decodeAsync2,
3911
+ describe: () => describe2,
3912
+ discriminatedUnion: () => discriminatedUnion,
3913
+ e164: () => e1642,
3914
+ email: () => email2,
3915
+ emoji: () => emoji2,
3916
+ encode: () => encode2,
3917
+ encodeAsync: () => encodeAsync2,
3918
+ endsWith: () => _endsWith,
3919
+ enum: () => _enum2,
3920
+ exactOptional: () => exactOptional,
3921
+ file: () => file,
3922
+ flattenError: () => flattenError,
3923
+ float32: () => float32,
3924
+ float64: () => float64,
3925
+ formatError: () => formatError,
3926
+ fromJSONSchema: () => fromJSONSchema,
3927
+ function: () => _function,
3928
+ getErrorMap: () => getErrorMap,
3929
+ globalRegistry: () => globalRegistry,
3930
+ gt: () => _gt,
3931
+ gte: () => _gte,
3932
+ guid: () => guid2,
3933
+ hash: () => hash,
3934
+ hex: () => hex2,
3935
+ hostname: () => hostname2,
3936
+ httpUrl: () => httpUrl,
3937
+ includes: () => _includes,
3938
+ instanceof: () => _instanceof,
3939
+ int: () => int,
3940
+ int32: () => int32,
3941
+ int64: () => int64,
3942
+ intersection: () => intersection,
3943
+ ipv4: () => ipv42,
3944
+ ipv6: () => ipv62,
3945
+ iso: () => exports_iso,
3946
+ json: () => json,
3947
+ jwt: () => jwt,
3948
+ keyof: () => keyof,
3949
+ ksuid: () => ksuid2,
3950
+ lazy: () => lazy,
3951
+ length: () => _length,
3952
+ literal: () => literal,
3953
+ locales: () => exports_locales,
3954
+ looseObject: () => looseObject,
3955
+ looseRecord: () => looseRecord,
3956
+ lowercase: () => _lowercase,
3957
+ lt: () => _lt,
3958
+ lte: () => _lte,
3959
+ mac: () => mac2,
3960
+ map: () => map,
3961
+ maxLength: () => _maxLength,
3962
+ maxSize: () => _maxSize,
3963
+ meta: () => meta2,
3964
+ mime: () => _mime,
3965
+ minLength: () => _minLength,
3966
+ minSize: () => _minSize,
3967
+ multipleOf: () => _multipleOf,
3968
+ nan: () => nan,
3969
+ nanoid: () => nanoid2,
3970
+ nativeEnum: () => nativeEnum,
3971
+ negative: () => _negative,
3972
+ never: () => never,
3973
+ nonnegative: () => _nonnegative,
3974
+ nonoptional: () => nonoptional,
3975
+ nonpositive: () => _nonpositive,
3976
+ normalize: () => _normalize,
3977
+ null: () => _null3,
3978
+ nullable: () => nullable,
3979
+ nullish: () => nullish2,
3980
+ number: () => number2,
3981
+ object: () => object,
3982
+ optional: () => optional,
3983
+ overwrite: () => _overwrite,
3984
+ parse: () => parse3,
3985
+ parseAsync: () => parseAsync2,
3986
+ partialRecord: () => partialRecord,
3987
+ pipe: () => pipe,
3988
+ positive: () => _positive,
3989
+ prefault: () => prefault,
3990
+ preprocess: () => preprocess,
3991
+ prettifyError: () => prettifyError,
3992
+ promise: () => promise,
3993
+ property: () => _property,
3994
+ readonly: () => readonly2,
3995
+ record: () => record,
3996
+ refine: () => refine,
3997
+ regex: () => _regex,
3998
+ regexes: () => exports_regexes,
3999
+ registry: () => registry,
4000
+ safeDecode: () => safeDecode2,
4001
+ safeDecodeAsync: () => safeDecodeAsync2,
4002
+ safeEncode: () => safeEncode2,
4003
+ safeEncodeAsync: () => safeEncodeAsync2,
4004
+ safeParse: () => safeParse2,
4005
+ safeParseAsync: () => safeParseAsync2,
4006
+ set: () => set2,
4007
+ setErrorMap: () => setErrorMap,
4008
+ size: () => _size,
4009
+ slugify: () => _slugify,
4010
+ startsWith: () => _startsWith,
4011
+ strictObject: () => strictObject,
4012
+ string: () => string2,
4013
+ stringFormat: () => stringFormat,
4014
+ stringbool: () => stringbool,
4015
+ success: () => success,
4016
+ superRefine: () => superRefine,
4017
+ symbol: () => symbol,
4018
+ templateLiteral: () => templateLiteral,
4019
+ toJSONSchema: () => toJSONSchema,
4020
+ toLowerCase: () => _toLowerCase,
4021
+ toUpperCase: () => _toUpperCase,
4022
+ transform: () => transform,
4023
+ treeifyError: () => treeifyError,
4024
+ trim: () => _trim,
4025
+ tuple: () => tuple,
4026
+ uint32: () => uint32,
4027
+ uint64: () => uint64,
4028
+ ulid: () => ulid2,
4029
+ undefined: () => _undefined3,
4030
+ union: () => union,
4031
+ unknown: () => unknown,
4032
+ uppercase: () => _uppercase,
4033
+ url: () => url,
4034
+ util: () => exports_util,
4035
+ uuid: () => uuid2,
4036
+ uuidv4: () => uuidv4,
4037
+ uuidv6: () => uuidv6,
4038
+ uuidv7: () => uuidv7,
4039
+ void: () => _void2,
4040
+ xid: () => xid2,
4041
+ xor: () => xor
4042
+ });
4043
+
4044
+ // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/index.js
4045
+ var exports_core2 = {};
4046
+ __export(exports_core2, {
4047
+ $ZodAny: () => $ZodAny,
6565
4048
  $ZodArray: () => $ZodArray,
6566
- $ZodAny: () => $ZodAny
4049
+ $ZodAsyncError: () => $ZodAsyncError,
4050
+ $ZodBase64: () => $ZodBase64,
4051
+ $ZodBase64URL: () => $ZodBase64URL,
4052
+ $ZodBigInt: () => $ZodBigInt,
4053
+ $ZodBigIntFormat: () => $ZodBigIntFormat,
4054
+ $ZodBoolean: () => $ZodBoolean,
4055
+ $ZodCIDRv4: () => $ZodCIDRv4,
4056
+ $ZodCIDRv6: () => $ZodCIDRv6,
4057
+ $ZodCUID: () => $ZodCUID,
4058
+ $ZodCUID2: () => $ZodCUID2,
4059
+ $ZodCatch: () => $ZodCatch,
4060
+ $ZodCheck: () => $ZodCheck,
4061
+ $ZodCheckBigIntFormat: () => $ZodCheckBigIntFormat,
4062
+ $ZodCheckEndsWith: () => $ZodCheckEndsWith,
4063
+ $ZodCheckGreaterThan: () => $ZodCheckGreaterThan,
4064
+ $ZodCheckIncludes: () => $ZodCheckIncludes,
4065
+ $ZodCheckLengthEquals: () => $ZodCheckLengthEquals,
4066
+ $ZodCheckLessThan: () => $ZodCheckLessThan,
4067
+ $ZodCheckLowerCase: () => $ZodCheckLowerCase,
4068
+ $ZodCheckMaxLength: () => $ZodCheckMaxLength,
4069
+ $ZodCheckMaxSize: () => $ZodCheckMaxSize,
4070
+ $ZodCheckMimeType: () => $ZodCheckMimeType,
4071
+ $ZodCheckMinLength: () => $ZodCheckMinLength,
4072
+ $ZodCheckMinSize: () => $ZodCheckMinSize,
4073
+ $ZodCheckMultipleOf: () => $ZodCheckMultipleOf,
4074
+ $ZodCheckNumberFormat: () => $ZodCheckNumberFormat,
4075
+ $ZodCheckOverwrite: () => $ZodCheckOverwrite,
4076
+ $ZodCheckProperty: () => $ZodCheckProperty,
4077
+ $ZodCheckRegex: () => $ZodCheckRegex,
4078
+ $ZodCheckSizeEquals: () => $ZodCheckSizeEquals,
4079
+ $ZodCheckStartsWith: () => $ZodCheckStartsWith,
4080
+ $ZodCheckStringFormat: () => $ZodCheckStringFormat,
4081
+ $ZodCheckUpperCase: () => $ZodCheckUpperCase,
4082
+ $ZodCodec: () => $ZodCodec,
4083
+ $ZodCustom: () => $ZodCustom,
4084
+ $ZodCustomStringFormat: () => $ZodCustomStringFormat,
4085
+ $ZodDate: () => $ZodDate,
4086
+ $ZodDefault: () => $ZodDefault,
4087
+ $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion,
4088
+ $ZodE164: () => $ZodE164,
4089
+ $ZodEmail: () => $ZodEmail,
4090
+ $ZodEmoji: () => $ZodEmoji,
4091
+ $ZodEncodeError: () => $ZodEncodeError,
4092
+ $ZodEnum: () => $ZodEnum,
4093
+ $ZodError: () => $ZodError,
4094
+ $ZodExactOptional: () => $ZodExactOptional,
4095
+ $ZodFile: () => $ZodFile,
4096
+ $ZodFunction: () => $ZodFunction,
4097
+ $ZodGUID: () => $ZodGUID,
4098
+ $ZodIPv4: () => $ZodIPv4,
4099
+ $ZodIPv6: () => $ZodIPv6,
4100
+ $ZodISODate: () => $ZodISODate,
4101
+ $ZodISODateTime: () => $ZodISODateTime,
4102
+ $ZodISODuration: () => $ZodISODuration,
4103
+ $ZodISOTime: () => $ZodISOTime,
4104
+ $ZodIntersection: () => $ZodIntersection,
4105
+ $ZodJWT: () => $ZodJWT,
4106
+ $ZodKSUID: () => $ZodKSUID,
4107
+ $ZodLazy: () => $ZodLazy,
4108
+ $ZodLiteral: () => $ZodLiteral,
4109
+ $ZodMAC: () => $ZodMAC,
4110
+ $ZodMap: () => $ZodMap,
4111
+ $ZodNaN: () => $ZodNaN,
4112
+ $ZodNanoID: () => $ZodNanoID,
4113
+ $ZodNever: () => $ZodNever,
4114
+ $ZodNonOptional: () => $ZodNonOptional,
4115
+ $ZodNull: () => $ZodNull,
4116
+ $ZodNullable: () => $ZodNullable,
4117
+ $ZodNumber: () => $ZodNumber,
4118
+ $ZodNumberFormat: () => $ZodNumberFormat,
4119
+ $ZodObject: () => $ZodObject,
4120
+ $ZodObjectJIT: () => $ZodObjectJIT,
4121
+ $ZodOptional: () => $ZodOptional,
4122
+ $ZodPipe: () => $ZodPipe,
4123
+ $ZodPrefault: () => $ZodPrefault,
4124
+ $ZodPromise: () => $ZodPromise,
4125
+ $ZodReadonly: () => $ZodReadonly,
4126
+ $ZodRealError: () => $ZodRealError,
4127
+ $ZodRecord: () => $ZodRecord,
4128
+ $ZodRegistry: () => $ZodRegistry,
4129
+ $ZodSet: () => $ZodSet,
4130
+ $ZodString: () => $ZodString,
4131
+ $ZodStringFormat: () => $ZodStringFormat,
4132
+ $ZodSuccess: () => $ZodSuccess,
4133
+ $ZodSymbol: () => $ZodSymbol,
4134
+ $ZodTemplateLiteral: () => $ZodTemplateLiteral,
4135
+ $ZodTransform: () => $ZodTransform,
4136
+ $ZodTuple: () => $ZodTuple,
4137
+ $ZodType: () => $ZodType,
4138
+ $ZodULID: () => $ZodULID,
4139
+ $ZodURL: () => $ZodURL,
4140
+ $ZodUUID: () => $ZodUUID,
4141
+ $ZodUndefined: () => $ZodUndefined,
4142
+ $ZodUnion: () => $ZodUnion,
4143
+ $ZodUnknown: () => $ZodUnknown,
4144
+ $ZodVoid: () => $ZodVoid,
4145
+ $ZodXID: () => $ZodXID,
4146
+ $ZodXor: () => $ZodXor,
4147
+ $brand: () => $brand,
4148
+ $constructor: () => $constructor,
4149
+ $input: () => $input,
4150
+ $output: () => $output,
4151
+ Doc: () => Doc,
4152
+ JSONSchema: () => exports_json_schema,
4153
+ JSONSchemaGenerator: () => JSONSchemaGenerator,
4154
+ NEVER: () => NEVER,
4155
+ TimePrecision: () => TimePrecision,
4156
+ _any: () => _any,
4157
+ _array: () => _array,
4158
+ _base64: () => _base64,
4159
+ _base64url: () => _base64url,
4160
+ _bigint: () => _bigint,
4161
+ _boolean: () => _boolean,
4162
+ _catch: () => _catch,
4163
+ _check: () => _check,
4164
+ _cidrv4: () => _cidrv4,
4165
+ _cidrv6: () => _cidrv6,
4166
+ _coercedBigint: () => _coercedBigint,
4167
+ _coercedBoolean: () => _coercedBoolean,
4168
+ _coercedDate: () => _coercedDate,
4169
+ _coercedNumber: () => _coercedNumber,
4170
+ _coercedString: () => _coercedString,
4171
+ _cuid: () => _cuid,
4172
+ _cuid2: () => _cuid2,
4173
+ _custom: () => _custom,
4174
+ _date: () => _date,
4175
+ _decode: () => _decode,
4176
+ _decodeAsync: () => _decodeAsync,
4177
+ _default: () => _default,
4178
+ _discriminatedUnion: () => _discriminatedUnion,
4179
+ _e164: () => _e164,
4180
+ _email: () => _email,
4181
+ _emoji: () => _emoji2,
4182
+ _encode: () => _encode,
4183
+ _encodeAsync: () => _encodeAsync,
4184
+ _endsWith: () => _endsWith,
4185
+ _enum: () => _enum,
4186
+ _file: () => _file,
4187
+ _float32: () => _float32,
4188
+ _float64: () => _float64,
4189
+ _gt: () => _gt,
4190
+ _gte: () => _gte,
4191
+ _guid: () => _guid,
4192
+ _includes: () => _includes,
4193
+ _int: () => _int,
4194
+ _int32: () => _int32,
4195
+ _int64: () => _int64,
4196
+ _intersection: () => _intersection,
4197
+ _ipv4: () => _ipv4,
4198
+ _ipv6: () => _ipv6,
4199
+ _isoDate: () => _isoDate,
4200
+ _isoDateTime: () => _isoDateTime,
4201
+ _isoDuration: () => _isoDuration,
4202
+ _isoTime: () => _isoTime,
4203
+ _jwt: () => _jwt,
4204
+ _ksuid: () => _ksuid,
4205
+ _lazy: () => _lazy,
4206
+ _length: () => _length,
4207
+ _literal: () => _literal,
4208
+ _lowercase: () => _lowercase,
4209
+ _lt: () => _lt,
4210
+ _lte: () => _lte,
4211
+ _mac: () => _mac,
4212
+ _map: () => _map,
4213
+ _max: () => _lte,
4214
+ _maxLength: () => _maxLength,
4215
+ _maxSize: () => _maxSize,
4216
+ _mime: () => _mime,
4217
+ _min: () => _gte,
4218
+ _minLength: () => _minLength,
4219
+ _minSize: () => _minSize,
4220
+ _multipleOf: () => _multipleOf,
4221
+ _nan: () => _nan,
4222
+ _nanoid: () => _nanoid,
4223
+ _nativeEnum: () => _nativeEnum,
4224
+ _negative: () => _negative,
4225
+ _never: () => _never,
4226
+ _nonnegative: () => _nonnegative,
4227
+ _nonoptional: () => _nonoptional,
4228
+ _nonpositive: () => _nonpositive,
4229
+ _normalize: () => _normalize,
4230
+ _null: () => _null2,
4231
+ _nullable: () => _nullable,
4232
+ _number: () => _number,
4233
+ _optional: () => _optional,
4234
+ _overwrite: () => _overwrite,
4235
+ _parse: () => _parse,
4236
+ _parseAsync: () => _parseAsync,
4237
+ _pipe: () => _pipe,
4238
+ _positive: () => _positive,
4239
+ _promise: () => _promise,
4240
+ _property: () => _property,
4241
+ _readonly: () => _readonly,
4242
+ _record: () => _record,
4243
+ _refine: () => _refine,
4244
+ _regex: () => _regex,
4245
+ _safeDecode: () => _safeDecode,
4246
+ _safeDecodeAsync: () => _safeDecodeAsync,
4247
+ _safeEncode: () => _safeEncode,
4248
+ _safeEncodeAsync: () => _safeEncodeAsync,
4249
+ _safeParse: () => _safeParse,
4250
+ _safeParseAsync: () => _safeParseAsync,
4251
+ _set: () => _set,
4252
+ _size: () => _size,
4253
+ _slugify: () => _slugify,
4254
+ _startsWith: () => _startsWith,
4255
+ _string: () => _string,
4256
+ _stringFormat: () => _stringFormat,
4257
+ _stringbool: () => _stringbool,
4258
+ _success: () => _success,
4259
+ _superRefine: () => _superRefine,
4260
+ _symbol: () => _symbol,
4261
+ _templateLiteral: () => _templateLiteral,
4262
+ _toLowerCase: () => _toLowerCase,
4263
+ _toUpperCase: () => _toUpperCase,
4264
+ _transform: () => _transform,
4265
+ _trim: () => _trim,
4266
+ _tuple: () => _tuple,
4267
+ _uint32: () => _uint32,
4268
+ _uint64: () => _uint64,
4269
+ _ulid: () => _ulid,
4270
+ _undefined: () => _undefined2,
4271
+ _union: () => _union,
4272
+ _unknown: () => _unknown,
4273
+ _uppercase: () => _uppercase,
4274
+ _url: () => _url,
4275
+ _uuid: () => _uuid,
4276
+ _uuidv4: () => _uuidv4,
4277
+ _uuidv6: () => _uuidv6,
4278
+ _uuidv7: () => _uuidv7,
4279
+ _void: () => _void,
4280
+ _xid: () => _xid,
4281
+ _xor: () => _xor,
4282
+ clone: () => clone2,
4283
+ config: () => config,
4284
+ createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod,
4285
+ createToJSONSchemaMethod: () => createToJSONSchemaMethod,
4286
+ decode: () => decode,
4287
+ decodeAsync: () => decodeAsync,
4288
+ describe: () => describe,
4289
+ encode: () => encode,
4290
+ encodeAsync: () => encodeAsync,
4291
+ extractDefs: () => extractDefs,
4292
+ finalize: () => finalize,
4293
+ flattenError: () => flattenError,
4294
+ formatError: () => formatError,
4295
+ globalConfig: () => globalConfig,
4296
+ globalRegistry: () => globalRegistry,
4297
+ initializeContext: () => initializeContext,
4298
+ isValidBase64: () => isValidBase64,
4299
+ isValidBase64URL: () => isValidBase64URL,
4300
+ isValidJWT: () => isValidJWT,
4301
+ locales: () => exports_locales,
4302
+ meta: () => meta,
4303
+ parse: () => parse,
4304
+ parseAsync: () => parseAsync,
4305
+ prettifyError: () => prettifyError,
4306
+ process: () => process,
4307
+ regexes: () => exports_regexes,
4308
+ registry: () => registry,
4309
+ safeDecode: () => safeDecode,
4310
+ safeDecodeAsync: () => safeDecodeAsync,
4311
+ safeEncode: () => safeEncode,
4312
+ safeEncodeAsync: () => safeEncodeAsync,
4313
+ safeParse: () => safeParse,
4314
+ safeParseAsync: () => safeParseAsync,
4315
+ toDotPath: () => toDotPath,
4316
+ toJSONSchema: () => toJSONSchema,
4317
+ treeifyError: () => treeifyError,
4318
+ util: () => exports_util,
4319
+ version: () => version
6567
4320
  });
6568
4321
 
6569
4322
  // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/core.js
@@ -6628,85 +4381,85 @@ class $ZodAsyncError extends Error {
6628
4381
  constructor() {
6629
4382
  super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
6630
4383
  }
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,
4384
+ }
4385
+
4386
+ class $ZodEncodeError extends Error {
4387
+ constructor(name) {
4388
+ super(`Encountered unidirectional transform during encode: ${name}`);
4389
+ this.name = "ZodEncodeError";
4390
+ }
4391
+ }
4392
+ var globalConfig = {};
4393
+ function config(newConfig) {
4394
+ if (newConfig)
4395
+ Object.assign(globalConfig, newConfig);
4396
+ return globalConfig;
4397
+ }
4398
+ // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/util.js
4399
+ var exports_util = {};
4400
+ __export(exports_util, {
4401
+ BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
6708
4402
  Class: () => Class,
6709
- BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES
4403
+ NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES,
4404
+ aborted: () => aborted2,
4405
+ allowsEval: () => allowsEval,
4406
+ assert: () => assert,
4407
+ assertEqual: () => assertEqual,
4408
+ assertIs: () => assertIs,
4409
+ assertNever: () => assertNever,
4410
+ assertNotEqual: () => assertNotEqual,
4411
+ assignProp: () => assignProp,
4412
+ base64ToUint8Array: () => base64ToUint8Array,
4413
+ base64urlToUint8Array: () => base64urlToUint8Array,
4414
+ cached: () => cached,
4415
+ captureStackTrace: () => captureStackTrace,
4416
+ cleanEnum: () => cleanEnum,
4417
+ cleanRegex: () => cleanRegex,
4418
+ clone: () => clone2,
4419
+ cloneDef: () => cloneDef,
4420
+ createTransparentProxy: () => createTransparentProxy,
4421
+ defineLazy: () => defineLazy,
4422
+ esc: () => esc,
4423
+ escapeRegex: () => escapeRegex,
4424
+ extend: () => extend,
4425
+ finalizeIssue: () => finalizeIssue,
4426
+ floatSafeRemainder: () => floatSafeRemainder,
4427
+ getElementAtPath: () => getElementAtPath,
4428
+ getEnumValues: () => getEnumValues,
4429
+ getLengthableOrigin: () => getLengthableOrigin,
4430
+ getParsedType: () => getParsedType,
4431
+ getSizableOrigin: () => getSizableOrigin,
4432
+ hexToUint8Array: () => hexToUint8Array,
4433
+ isObject: () => isObject,
4434
+ isPlainObject: () => isPlainObject,
4435
+ issue: () => issue,
4436
+ joinValues: () => joinValues,
4437
+ jsonStringifyReplacer: () => jsonStringifyReplacer,
4438
+ merge: () => merge,
4439
+ mergeDefs: () => mergeDefs,
4440
+ normalizeParams: () => normalizeParams,
4441
+ nullish: () => nullish,
4442
+ numKeys: () => numKeys,
4443
+ objectClone: () => objectClone,
4444
+ omit: () => omit,
4445
+ optionalKeys: () => optionalKeys,
4446
+ parsedType: () => parsedType,
4447
+ partial: () => partial,
4448
+ pick: () => pick,
4449
+ prefixIssues: () => prefixIssues,
4450
+ primitiveTypes: () => primitiveTypes,
4451
+ promiseAllObject: () => promiseAllObject,
4452
+ propertyKeyTypes: () => propertyKeyTypes,
4453
+ randomString: () => randomString,
4454
+ required: () => required,
4455
+ safeExtend: () => safeExtend,
4456
+ shallowClone: () => shallowClone,
4457
+ slugify: () => slugify,
4458
+ stringifyPrimitive: () => stringifyPrimitive,
4459
+ uint8ArrayToBase64: () => uint8ArrayToBase64,
4460
+ uint8ArrayToBase64url: () => uint8ArrayToBase64url,
4461
+ uint8ArrayToHex: () => uint8ArrayToHex,
4462
+ unwrapMessage: () => unwrapMessage
6710
4463
  });
6711
4464
  function assertEqual(val) {
6712
4465
  return val;
@@ -7543,64 +5296,64 @@ var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
7543
5296
  // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/regexes.js
7544
5297
  var exports_regexes = {};
7545
5298
  __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,
5299
+ base64: () => base64,
7602
5300
  base64url: () => base64url,
7603
- base64: () => base64
5301
+ bigint: () => bigint,
5302
+ boolean: () => boolean,
5303
+ browserEmail: () => browserEmail,
5304
+ cidrv4: () => cidrv4,
5305
+ cidrv6: () => cidrv6,
5306
+ cuid: () => cuid,
5307
+ cuid2: () => cuid2,
5308
+ date: () => date,
5309
+ datetime: () => datetime,
5310
+ domain: () => domain,
5311
+ duration: () => duration,
5312
+ e164: () => e164,
5313
+ email: () => email,
5314
+ emoji: () => emoji,
5315
+ extendedDuration: () => extendedDuration,
5316
+ guid: () => guid,
5317
+ hex: () => hex,
5318
+ hostname: () => hostname,
5319
+ html5Email: () => html5Email,
5320
+ idnEmail: () => idnEmail,
5321
+ integer: () => integer,
5322
+ ipv4: () => ipv4,
5323
+ ipv6: () => ipv6,
5324
+ ksuid: () => ksuid,
5325
+ lowercase: () => lowercase,
5326
+ mac: () => mac,
5327
+ md5_base64: () => md5_base64,
5328
+ md5_base64url: () => md5_base64url,
5329
+ md5_hex: () => md5_hex,
5330
+ nanoid: () => nanoid,
5331
+ null: () => _null,
5332
+ number: () => number,
5333
+ rfc5322Email: () => rfc5322Email,
5334
+ sha1_base64: () => sha1_base64,
5335
+ sha1_base64url: () => sha1_base64url,
5336
+ sha1_hex: () => sha1_hex,
5337
+ sha256_base64: () => sha256_base64,
5338
+ sha256_base64url: () => sha256_base64url,
5339
+ sha256_hex: () => sha256_hex,
5340
+ sha384_base64: () => sha384_base64,
5341
+ sha384_base64url: () => sha384_base64url,
5342
+ sha384_hex: () => sha384_hex,
5343
+ sha512_base64: () => sha512_base64,
5344
+ sha512_base64url: () => sha512_base64url,
5345
+ sha512_hex: () => sha512_hex,
5346
+ string: () => string,
5347
+ time: () => time,
5348
+ ulid: () => ulid,
5349
+ undefined: () => _undefined,
5350
+ unicodeEmail: () => unicodeEmail,
5351
+ uppercase: () => uppercase,
5352
+ uuid: () => uuid,
5353
+ uuid4: () => uuid4,
5354
+ uuid6: () => uuid6,
5355
+ uuid7: () => uuid7,
5356
+ xid: () => xid
7604
5357
  });
7605
5358
  var cuid = /^[cC][^\s-]{8,}$/;
7606
5359
  var cuid2 = /^[0-9a-z]+$/;
@@ -10230,79 +7983,79 @@ var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def2) => {
10230
7983
  inst._zod.check = (payload) => {
10231
7984
  const input = payload.value;
10232
7985
  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,
7986
+ if (r instanceof Promise) {
7987
+ return r.then((r2) => handleRefineResult(r2, payload, input, inst));
7988
+ }
7989
+ handleRefineResult(r, payload, input, inst);
7990
+ return;
7991
+ };
7992
+ });
7993
+ function handleRefineResult(result, payload, input, inst) {
7994
+ if (!result) {
7995
+ const _iss = {
7996
+ code: "custom",
7997
+ input,
7998
+ inst,
7999
+ path: [...inst._zod.def.path ?? []],
8000
+ continue: !inst._zod.def.abort
8001
+ };
8002
+ if (inst._zod.def.params)
8003
+ _iss.params = inst._zod.def.params;
8004
+ payload.issues.push(issue(_iss));
8005
+ }
8006
+ }
8007
+ // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/index.js
8008
+ var exports_locales = {};
8009
+ __export(exports_locales, {
8010
+ ar: () => ar_default,
10304
8011
  az: () => az_default,
10305
- ar: () => ar_default
8012
+ be: () => be_default,
8013
+ bg: () => bg_default,
8014
+ ca: () => ca_default,
8015
+ cs: () => cs_default,
8016
+ da: () => da_default,
8017
+ de: () => de_default,
8018
+ en: () => en_default,
8019
+ eo: () => eo_default,
8020
+ es: () => es_default,
8021
+ fa: () => fa_default,
8022
+ fi: () => fi_default,
8023
+ fr: () => fr_default,
8024
+ frCA: () => fr_CA_default,
8025
+ he: () => he_default,
8026
+ hu: () => hu_default,
8027
+ hy: () => hy_default,
8028
+ id: () => id_default,
8029
+ is: () => is_default,
8030
+ it: () => it_default,
8031
+ ja: () => ja_default,
8032
+ ka: () => ka_default,
8033
+ kh: () => kh_default,
8034
+ km: () => km_default,
8035
+ ko: () => ko_default,
8036
+ lt: () => lt_default,
8037
+ mk: () => mk_default,
8038
+ ms: () => ms_default,
8039
+ nl: () => nl_default,
8040
+ no: () => no_default,
8041
+ ota: () => ota_default,
8042
+ pl: () => pl_default,
8043
+ ps: () => ps_default,
8044
+ pt: () => pt_default,
8045
+ ru: () => ru_default,
8046
+ sl: () => sl_default,
8047
+ sv: () => sv_default,
8048
+ ta: () => ta_default,
8049
+ th: () => th_default,
8050
+ tr: () => tr_default,
8051
+ ua: () => ua_default,
8052
+ uk: () => uk_default,
8053
+ ur: () => ur_default,
8054
+ uz: () => uz_default,
8055
+ vi: () => vi_default,
8056
+ yo: () => yo_default,
8057
+ zhCN: () => zh_CN_default,
8058
+ zhTW: () => zh_TW_default
10306
8059
  });
10307
8060
 
10308
8061
  // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ar.js
@@ -17676,242 +15429,242 @@ class JSONSchemaGenerator {
17676
15429
  ...params?.unrepresentable && { unrepresentable: params.unrepresentable },
17677
15430
  ...params?.override && { override: params.override },
17678
15431
  ...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,
15432
+ });
15433
+ }
15434
+ process(schema, _params = { path: [], schemaPath: [] }) {
15435
+ return process(schema, this.ctx, _params);
15436
+ }
15437
+ emit(schema, _params) {
15438
+ if (_params) {
15439
+ if (_params.cycles)
15440
+ this.ctx.cycles = _params.cycles;
15441
+ if (_params.reused)
15442
+ this.ctx.reused = _params.reused;
15443
+ if (_params.external)
15444
+ this.ctx.external = _params.external;
15445
+ }
15446
+ extractDefs(this.ctx, schema);
15447
+ const result = finalize(this.ctx, schema);
15448
+ const { "~standard": _, ...plainResult } = result;
15449
+ return plainResult;
15450
+ }
15451
+ }
15452
+ // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/json-schema.js
15453
+ var exports_json_schema = {};
15454
+ // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/schemas.js
15455
+ var exports_schemas2 = {};
15456
+ __export(exports_schemas2, {
15457
+ ZodAny: () => ZodAny,
17866
15458
  ZodArray: () => ZodArray,
17867
- ZodAny: () => ZodAny
15459
+ ZodBase64: () => ZodBase64,
15460
+ ZodBase64URL: () => ZodBase64URL,
15461
+ ZodBigInt: () => ZodBigInt,
15462
+ ZodBigIntFormat: () => ZodBigIntFormat,
15463
+ ZodBoolean: () => ZodBoolean,
15464
+ ZodCIDRv4: () => ZodCIDRv4,
15465
+ ZodCIDRv6: () => ZodCIDRv6,
15466
+ ZodCUID: () => ZodCUID,
15467
+ ZodCUID2: () => ZodCUID2,
15468
+ ZodCatch: () => ZodCatch,
15469
+ ZodCodec: () => ZodCodec,
15470
+ ZodCustom: () => ZodCustom,
15471
+ ZodCustomStringFormat: () => ZodCustomStringFormat,
15472
+ ZodDate: () => ZodDate,
15473
+ ZodDefault: () => ZodDefault,
15474
+ ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
15475
+ ZodE164: () => ZodE164,
15476
+ ZodEmail: () => ZodEmail,
15477
+ ZodEmoji: () => ZodEmoji,
15478
+ ZodEnum: () => ZodEnum,
15479
+ ZodExactOptional: () => ZodExactOptional,
15480
+ ZodFile: () => ZodFile,
15481
+ ZodFunction: () => ZodFunction,
15482
+ ZodGUID: () => ZodGUID,
15483
+ ZodIPv4: () => ZodIPv4,
15484
+ ZodIPv6: () => ZodIPv6,
15485
+ ZodIntersection: () => ZodIntersection,
15486
+ ZodJWT: () => ZodJWT,
15487
+ ZodKSUID: () => ZodKSUID,
15488
+ ZodLazy: () => ZodLazy,
15489
+ ZodLiteral: () => ZodLiteral,
15490
+ ZodMAC: () => ZodMAC,
15491
+ ZodMap: () => ZodMap,
15492
+ ZodNaN: () => ZodNaN,
15493
+ ZodNanoID: () => ZodNanoID,
15494
+ ZodNever: () => ZodNever,
15495
+ ZodNonOptional: () => ZodNonOptional,
15496
+ ZodNull: () => ZodNull,
15497
+ ZodNullable: () => ZodNullable,
15498
+ ZodNumber: () => ZodNumber,
15499
+ ZodNumberFormat: () => ZodNumberFormat,
15500
+ ZodObject: () => ZodObject,
15501
+ ZodOptional: () => ZodOptional,
15502
+ ZodPipe: () => ZodPipe,
15503
+ ZodPrefault: () => ZodPrefault,
15504
+ ZodPromise: () => ZodPromise,
15505
+ ZodReadonly: () => ZodReadonly,
15506
+ ZodRecord: () => ZodRecord,
15507
+ ZodSet: () => ZodSet,
15508
+ ZodString: () => ZodString,
15509
+ ZodStringFormat: () => ZodStringFormat,
15510
+ ZodSuccess: () => ZodSuccess,
15511
+ ZodSymbol: () => ZodSymbol,
15512
+ ZodTemplateLiteral: () => ZodTemplateLiteral,
15513
+ ZodTransform: () => ZodTransform,
15514
+ ZodTuple: () => ZodTuple,
15515
+ ZodType: () => ZodType,
15516
+ ZodULID: () => ZodULID,
15517
+ ZodURL: () => ZodURL,
15518
+ ZodUUID: () => ZodUUID,
15519
+ ZodUndefined: () => ZodUndefined,
15520
+ ZodUnion: () => ZodUnion,
15521
+ ZodUnknown: () => ZodUnknown,
15522
+ ZodVoid: () => ZodVoid,
15523
+ ZodXID: () => ZodXID,
15524
+ ZodXor: () => ZodXor,
15525
+ _ZodString: () => _ZodString,
15526
+ _default: () => _default2,
15527
+ _function: () => _function,
15528
+ any: () => any,
15529
+ array: () => array,
15530
+ base64: () => base642,
15531
+ base64url: () => base64url2,
15532
+ bigint: () => bigint2,
15533
+ boolean: () => boolean2,
15534
+ catch: () => _catch2,
15535
+ check: () => check,
15536
+ cidrv4: () => cidrv42,
15537
+ cidrv6: () => cidrv62,
15538
+ codec: () => codec,
15539
+ cuid: () => cuid3,
15540
+ cuid2: () => cuid22,
15541
+ custom: () => custom,
15542
+ date: () => date3,
15543
+ describe: () => describe2,
15544
+ discriminatedUnion: () => discriminatedUnion,
15545
+ e164: () => e1642,
15546
+ email: () => email2,
15547
+ emoji: () => emoji2,
15548
+ enum: () => _enum2,
15549
+ exactOptional: () => exactOptional,
15550
+ file: () => file,
15551
+ float32: () => float32,
15552
+ float64: () => float64,
15553
+ function: () => _function,
15554
+ guid: () => guid2,
15555
+ hash: () => hash,
15556
+ hex: () => hex2,
15557
+ hostname: () => hostname2,
15558
+ httpUrl: () => httpUrl,
15559
+ instanceof: () => _instanceof,
15560
+ int: () => int,
15561
+ int32: () => int32,
15562
+ int64: () => int64,
15563
+ intersection: () => intersection,
15564
+ ipv4: () => ipv42,
15565
+ ipv6: () => ipv62,
15566
+ json: () => json,
15567
+ jwt: () => jwt,
15568
+ keyof: () => keyof,
15569
+ ksuid: () => ksuid2,
15570
+ lazy: () => lazy,
15571
+ literal: () => literal,
15572
+ looseObject: () => looseObject,
15573
+ looseRecord: () => looseRecord,
15574
+ mac: () => mac2,
15575
+ map: () => map,
15576
+ meta: () => meta2,
15577
+ nan: () => nan,
15578
+ nanoid: () => nanoid2,
15579
+ nativeEnum: () => nativeEnum,
15580
+ never: () => never,
15581
+ nonoptional: () => nonoptional,
15582
+ null: () => _null3,
15583
+ nullable: () => nullable,
15584
+ nullish: () => nullish2,
15585
+ number: () => number2,
15586
+ object: () => object,
15587
+ optional: () => optional,
15588
+ partialRecord: () => partialRecord,
15589
+ pipe: () => pipe,
15590
+ prefault: () => prefault,
15591
+ preprocess: () => preprocess,
15592
+ promise: () => promise,
15593
+ readonly: () => readonly2,
15594
+ record: () => record,
15595
+ refine: () => refine,
15596
+ set: () => set2,
15597
+ strictObject: () => strictObject,
15598
+ string: () => string2,
15599
+ stringFormat: () => stringFormat,
15600
+ stringbool: () => stringbool,
15601
+ success: () => success,
15602
+ superRefine: () => superRefine,
15603
+ symbol: () => symbol,
15604
+ templateLiteral: () => templateLiteral,
15605
+ transform: () => transform,
15606
+ tuple: () => tuple,
15607
+ uint32: () => uint32,
15608
+ uint64: () => uint64,
15609
+ ulid: () => ulid2,
15610
+ undefined: () => _undefined3,
15611
+ union: () => union,
15612
+ unknown: () => unknown,
15613
+ url: () => url,
15614
+ uuid: () => uuid2,
15615
+ uuidv4: () => uuidv4,
15616
+ uuidv6: () => uuidv6,
15617
+ uuidv7: () => uuidv7,
15618
+ void: () => _void2,
15619
+ xid: () => xid2,
15620
+ xor: () => xor
17868
15621
  });
17869
15622
 
17870
15623
  // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/checks.js
17871
15624
  var exports_checks2 = {};
17872
15625
  __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,
15626
+ endsWith: () => _endsWith,
17900
15627
  gt: () => _gt,
17901
- endsWith: () => _endsWith
15628
+ gte: () => _gte,
15629
+ includes: () => _includes,
15630
+ length: () => _length,
15631
+ lowercase: () => _lowercase,
15632
+ lt: () => _lt,
15633
+ lte: () => _lte,
15634
+ maxLength: () => _maxLength,
15635
+ maxSize: () => _maxSize,
15636
+ mime: () => _mime,
15637
+ minLength: () => _minLength,
15638
+ minSize: () => _minSize,
15639
+ multipleOf: () => _multipleOf,
15640
+ negative: () => _negative,
15641
+ nonnegative: () => _nonnegative,
15642
+ nonpositive: () => _nonpositive,
15643
+ normalize: () => _normalize,
15644
+ overwrite: () => _overwrite,
15645
+ positive: () => _positive,
15646
+ property: () => _property,
15647
+ regex: () => _regex,
15648
+ size: () => _size,
15649
+ slugify: () => _slugify,
15650
+ startsWith: () => _startsWith,
15651
+ toLowerCase: () => _toLowerCase,
15652
+ toUpperCase: () => _toUpperCase,
15653
+ trim: () => _trim,
15654
+ uppercase: () => _uppercase
17902
15655
  });
17903
15656
 
17904
15657
  // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/iso.js
17905
15658
  var exports_iso = {};
17906
15659
  __export(exports_iso, {
17907
- time: () => time2,
17908
- duration: () => duration2,
17909
- datetime: () => datetime2,
17910
- date: () => date2,
17911
- ZodISOTime: () => ZodISOTime,
17912
- ZodISODuration: () => ZodISODuration,
15660
+ ZodISODate: () => ZodISODate,
17913
15661
  ZodISODateTime: () => ZodISODateTime,
17914
- ZodISODate: () => ZodISODate
15662
+ ZodISODuration: () => ZodISODuration,
15663
+ ZodISOTime: () => ZodISOTime,
15664
+ date: () => date2,
15665
+ datetime: () => datetime2,
15666
+ duration: () => duration2,
15667
+ time: () => time2
17915
15668
  });
17916
15669
  var ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def2) => {
17917
15670
  $ZodISODateTime.init(inst, def2);
@@ -19555,11 +17308,11 @@ function fromJSONSchema(schema, params) {
19555
17308
  // node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/coerce.js
19556
17309
  var exports_coerce = {};
19557
17310
  __export(exports_coerce, {
19558
- string: () => string3,
19559
- number: () => number3,
19560
- date: () => date4,
17311
+ bigint: () => bigint3,
19561
17312
  boolean: () => boolean3,
19562
- bigint: () => bigint3
17313
+ date: () => date4,
17314
+ number: () => number3,
17315
+ string: () => string3
19563
17316
  });
19564
17317
  function string3(params) {
19565
17318
  return _coercedString(ZodString, params);