@rolldown/browser 1.0.0-beta.51 → 1.0.0-beta.53

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 (34) hide show
  1. package/dist/cli.mjs +8 -10
  2. package/dist/config.d.mts +1 -3
  3. package/dist/config.mjs +6 -9
  4. package/dist/{constructors-DoUEJY6G.js → constructors-YnYYKXAq.js} +5 -8
  5. package/dist/experimental-index.browser.mjs +23 -11
  6. package/dist/experimental-index.d.mts +31 -9
  7. package/dist/experimental-index.mjs +25 -16
  8. package/dist/filter-index.d.mts +1 -3
  9. package/dist/index.browser.mjs +2 -2
  10. package/dist/index.d.mts +3 -3
  11. package/dist/index.mjs +6 -9
  12. package/dist/{normalize-string-or-regex-BXFT9GiS.js → normalize-string-or-regex-BVvsez4S.js} +41 -4
  13. package/dist/parallel-plugin-worker.mjs +3 -6
  14. package/dist/parallel-plugin.d.mts +2 -3
  15. package/dist/parse-ast-index.d.mts +1 -1
  16. package/dist/parse-ast-index.mjs +1 -2
  17. package/dist/plugins-index.browser.mjs +2 -2
  18. package/dist/plugins-index.d.mts +3 -3
  19. package/dist/plugins-index.mjs +2 -4
  20. package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
  21. package/dist/{rolldown-build-C0UB1WZy.js → rolldown-build-DdLgyfGg.js} +353 -191
  22. package/dist/shared/{binding-lSvYApx7.d.mts → binding-CY7Z709f.d.mts} +59 -12
  23. package/dist/shared/{bindingify-input-options-CSdAtTcQ.mjs → bindingify-input-options-DcGFRvkp.mjs} +7 -5
  24. package/dist/shared/{constructors-DF6M1PTb.mjs → constructors-Bi2whoYR.mjs} +5 -8
  25. package/dist/shared/{constructors-DgFF472b.d.mts → constructors-S9gqtBdT.d.mts} +4 -5
  26. package/dist/shared/{define-config-BKu-xa_0.d.mts → define-config-CPSppdHs.d.mts} +23 -10
  27. package/dist/shared/{load-config-Beo_LOwd.mjs → load-config-B09j7Dnd.mjs} +1 -1
  28. package/dist/shared/{normalize-string-or-regex-DvECZN2V.mjs → normalize-string-or-regex-Bsz_9HAl.mjs} +41 -4
  29. package/dist/shared/{parse-ast-index-C_M-Y4oC.mjs → parse-ast-index-BOAjpcDq.mjs} +19 -5
  30. package/dist/shared/{rolldown-build-DYR94CyF.mjs → rolldown-build-CyazSAHY.mjs} +334 -188
  31. package/dist/shared/{rolldown-BhV7L6Kg.mjs → rolldown-vJGs7rCs.mjs} +1 -1
  32. package/dist/shared/{utils-BJWI2OzT.d.mts → utils-m9n-gTFq.d.mts} +1 -1
  33. package/dist/shared/{watch-Cjxo-3u4.mjs → watch-Abdexkk9.mjs} +3 -3
  34. package/package.json +5 -1
@@ -1,5 +1,5 @@
1
- import { A as logCycleLoading, C as logLevelPriority, D as unsupported, E as unreachable, F as logPluginError, I as locate, L as getCodeFrame, N as logNoFileSystemInBrowser, O as augmentCodeLocation, P as logParseError, S as LOG_LEVEL_WARN, T as unimplemented, _ as VERSION, b as LOG_LEVEL_ERROR, c as transformToRollupOutput, d as __decorate, f as bindingAssetSource, g as MinimalPluginContextImpl, h as PlainObjectLike, i as bindingifyViteHtmlPlugin, j as logInputHookInOutputPlugin, k as error, l as bindingifySourcemap$1, m as lazyProp, n as BuiltinPlugin, o as collectChangedBundle, p as transformAssetSource, r as bindingifyBuiltInPlugin, s as transformToOutputBundle, t as normalizedStringOrRegex, u as transformRenderedChunk, v as normalizeLog, w as arraify, x as LOG_LEVEL_INFO, y as LOG_LEVEL_DEBUG } from "./normalize-string-or-regex-BXFT9GiS.js";
2
- import { BindingAttachDebugInfo, BindingBundler, BindingChunkModuleOrderBy, BindingLogLevel, BindingMagicString, BindingPluginOrder, BindingPropertyReadSideEffects, BindingPropertyWriteSideEffects, parseSync, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
1
+ import { A as augmentCodeLocation, C as LOG_LEVEL_INFO, D as unimplemented, E as arraify, F as logNoFileSystemInBrowser, I as logParseError, L as logPluginError, M as logCycleLoading, N as logInputHookInOutputPlugin, O as unreachable, R as locate, S as LOG_LEVEL_ERROR, T as logLevelPriority, _ as PlainObjectLike, a as bindingifyManifestPlugin, b as normalizeLog, c as collectChangedBundle, d as bindingifySourcemap$1, f as transformRenderedChunk, g as lazyProp, h as transformAssetSource, i as bindingifyCSSPostPlugin, j as error, k as unsupported, l as transformToOutputBundle, m as bindingAssetSource, n as BuiltinPlugin, o as bindingifyViteHtmlPlugin, p as __decorate, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex, u as transformToRollupOutput, v as MinimalPluginContextImpl, w as LOG_LEVEL_WARN, x as LOG_LEVEL_DEBUG, y as VERSION, z as getCodeFrame } from "./normalize-string-or-regex-BVvsez4S.js";
2
+ import { BindingAttachDebugInfo, BindingBundler, BindingChunkModuleOrderBy, BindingLogLevel, BindingMagicString, BindingPluginOrder, BindingPropertyReadSideEffects, BindingPropertyWriteSideEffects, parse, parseSync, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
3
3
 
4
4
  //#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
5
5
  let _lazyMatch = () => {
@@ -398,7 +398,7 @@ const basename = function(p, extension) {
398
398
  }
399
399
  return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
400
400
  };
401
- const parse$1 = function(p) {
401
+ const parse$2 = function(p) {
402
402
  const root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\/g, "/") || "";
403
403
  const base = basename(p);
404
404
  const extension = extname(base);
@@ -424,7 +424,7 @@ const _path = {
424
424
  matchesGlob,
425
425
  normalize,
426
426
  normalizeString,
427
- parse: parse$1,
427
+ parse: parse$2,
428
428
  relative,
429
429
  resolve,
430
430
  sep,
@@ -709,32 +709,70 @@ function getSortedPlugins(hookName, plugins) {
709
709
  }
710
710
 
711
711
  //#endregion
712
- //#region ../../node_modules/.pnpm/valibot@1.1.0_typescript@5.9.3/node_modules/valibot/dist/index.js
713
- var store;
712
+ //#region ../../node_modules/.pnpm/valibot@1.2.0_typescript@5.9.3/node_modules/valibot/dist/index.mjs
713
+ let store$4;
714
+ /**
715
+ * Returns the global configuration.
716
+ *
717
+ * @param config The config to merge.
718
+ *
719
+ * @returns The configuration.
720
+ */
714
721
  /* @__NO_SIDE_EFFECTS__ */
715
- function getGlobalConfig(config2) {
722
+ function getGlobalConfig(config$1) {
716
723
  return {
717
- lang: config2?.lang ?? store?.lang,
718
- message: config2?.message,
719
- abortEarly: config2?.abortEarly ?? store?.abortEarly,
720
- abortPipeEarly: config2?.abortPipeEarly ?? store?.abortPipeEarly
724
+ lang: config$1?.lang ?? store$4?.lang,
725
+ message: config$1?.message,
726
+ abortEarly: config$1?.abortEarly ?? store$4?.abortEarly,
727
+ abortPipeEarly: config$1?.abortPipeEarly ?? store$4?.abortPipeEarly
721
728
  };
722
729
  }
723
- var store2;
730
+ let store$3;
731
+ /**
732
+ * Returns a global error message.
733
+ *
734
+ * @param lang The language of the message.
735
+ *
736
+ * @returns The error message.
737
+ */
724
738
  /* @__NO_SIDE_EFFECTS__ */
725
739
  function getGlobalMessage(lang) {
726
- return store2?.get(lang);
740
+ return store$3?.get(lang);
727
741
  }
728
- var store3;
742
+ let store$2;
743
+ /**
744
+ * Returns a schema error message.
745
+ *
746
+ * @param lang The language of the message.
747
+ *
748
+ * @returns The error message.
749
+ */
729
750
  /* @__NO_SIDE_EFFECTS__ */
730
751
  function getSchemaMessage(lang) {
731
- return store3?.get(lang);
752
+ return store$2?.get(lang);
732
753
  }
733
- var store4;
754
+ let store$1;
755
+ /**
756
+ * Returns a specific error message.
757
+ *
758
+ * @param reference The identifier reference.
759
+ * @param lang The language of the message.
760
+ *
761
+ * @returns The error message.
762
+ */
734
763
  /* @__NO_SIDE_EFFECTS__ */
735
764
  function getSpecificMessage(reference, lang) {
736
- return store4?.get(reference)?.get(lang);
765
+ return store$1?.get(reference)?.get(lang);
737
766
  }
767
+ /**
768
+ * Stringifies an unknown input to a literal or type string.
769
+ *
770
+ * @param input The unknown input.
771
+ *
772
+ * @returns A literal or type string.
773
+ *
774
+ * @internal
775
+ */
738
776
  /* @__NO_SIDE_EFFECTS__ */
739
777
  function _stringify(input) {
740
778
  const type = typeof input;
@@ -743,7 +781,18 @@ function _stringify(input) {
743
781
  if (type === "object" || type === "function") return (input && Object.getPrototypeOf(input)?.constructor?.name) ?? "null";
744
782
  return type;
745
783
  }
746
- function _addIssue(context, label, dataset, config2, other) {
784
+ /**
785
+ * Adds an issue to the dataset.
786
+ *
787
+ * @param context The issue context.
788
+ * @param label The issue label.
789
+ * @param dataset The input dataset.
790
+ * @param config The configuration.
791
+ * @param other The optional props.
792
+ *
793
+ * @internal
794
+ */
795
+ function _addIssue(context, label, dataset, config$1, other) {
747
796
  const input = other && "input" in other ? other.input : dataset.value;
748
797
  const expected = other?.expected ?? context.expects ?? null;
749
798
  const received = other?.received ?? /* @__PURE__ */ _stringify(input);
@@ -757,37 +806,68 @@ function _addIssue(context, label, dataset, config2, other) {
757
806
  requirement: context.requirement,
758
807
  path: other?.path,
759
808
  issues: other?.issues,
760
- lang: config2.lang,
761
- abortEarly: config2.abortEarly,
762
- abortPipeEarly: config2.abortPipeEarly
809
+ lang: config$1.lang,
810
+ abortEarly: config$1.abortEarly,
811
+ abortPipeEarly: config$1.abortPipeEarly
763
812
  };
764
813
  const isSchema = context.kind === "schema";
765
- const message2 = other?.message ?? context.message ?? /* @__PURE__ */ getSpecificMessage(context.reference, issue.lang) ?? (isSchema ? /* @__PURE__ */ getSchemaMessage(issue.lang) : null) ?? config2.message ?? /* @__PURE__ */ getGlobalMessage(issue.lang);
766
- if (message2 !== void 0) issue.message = typeof message2 === "function" ? message2(issue) : message2;
814
+ const message$1 = other?.message ?? context.message ?? /* @__PURE__ */ getSpecificMessage(context.reference, issue.lang) ?? (isSchema ? /* @__PURE__ */ getSchemaMessage(issue.lang) : null) ?? config$1.message ?? /* @__PURE__ */ getGlobalMessage(issue.lang);
815
+ if (message$1 !== void 0) issue.message = typeof message$1 === "function" ? message$1(issue) : message$1;
767
816
  if (isSchema) dataset.typed = false;
768
817
  if (dataset.issues) dataset.issues.push(issue);
769
818
  else dataset.issues = [issue];
770
819
  }
820
+ /**
821
+ * Returns the Standard Schema properties.
822
+ *
823
+ * @param context The schema context.
824
+ *
825
+ * @returns The Standard Schema properties.
826
+ */
771
827
  /* @__NO_SIDE_EFFECTS__ */
772
828
  function _getStandardProps(context) {
773
829
  return {
774
830
  version: 1,
775
831
  vendor: "valibot",
776
- validate(value2) {
777
- return context["~run"]({ value: value2 }, /* @__PURE__ */ getGlobalConfig());
832
+ validate(value$1) {
833
+ return context["~run"]({ value: value$1 }, /* @__PURE__ */ getGlobalConfig());
778
834
  }
779
835
  };
780
836
  }
837
+ /**
838
+ * Disallows inherited object properties and prevents object prototype
839
+ * pollution by disallowing certain keys.
840
+ *
841
+ * @param object The object to check.
842
+ * @param key The key to check.
843
+ *
844
+ * @returns Whether the key is allowed.
845
+ *
846
+ * @internal
847
+ */
781
848
  /* @__NO_SIDE_EFFECTS__ */
782
- function _isValidObjectKey(object2, key) {
783
- return Object.hasOwn(object2, key) && key !== "__proto__" && key !== "prototype" && key !== "constructor";
849
+ function _isValidObjectKey(object$1, key) {
850
+ return Object.hasOwn(object$1, key) && key !== "__proto__" && key !== "prototype" && key !== "constructor";
784
851
  }
852
+ /**
853
+ * Joins multiple `expects` values with the given separator.
854
+ *
855
+ * @param values The `expects` values.
856
+ * @param separator The separator.
857
+ *
858
+ * @returns The joined `expects` property.
859
+ *
860
+ * @internal
861
+ */
785
862
  /* @__NO_SIDE_EFFECTS__ */
786
- function _joinExpects(values2, separator) {
787
- const list = [...new Set(values2)];
863
+ function _joinExpects(values$1, separator) {
864
+ const list = [...new Set(values$1)];
788
865
  if (list.length > 1) return `(${list.join(` ${separator} `)})`;
789
866
  return list[0] ?? "never";
790
867
  }
868
+ /**
869
+ * A Valibot error with useful information.
870
+ */
791
871
  var ValiError = class extends Error {
792
872
  /**
793
873
  * Creates a Valibot error with useful information.
@@ -808,10 +888,10 @@ function args(schema) {
808
888
  reference: args,
809
889
  async: false,
810
890
  schema,
811
- "~run"(dataset, config2) {
891
+ "~run"(dataset, config$1) {
812
892
  const func = dataset.value;
813
893
  dataset.value = (...args_) => {
814
- const argsDataset = this.schema["~run"]({ value: args_ }, config2);
894
+ const argsDataset = this.schema["~run"]({ value: args_ }, config$1);
815
895
  if (argsDataset.issues) throw new ValiError(argsDataset.issues);
816
896
  return func(...argsDataset.value);
817
897
  };
@@ -819,6 +899,11 @@ function args(schema) {
819
899
  }
820
900
  };
821
901
  }
902
+ /**
903
+ * Creates an await transformation action.
904
+ *
905
+ * @returns An await action.
906
+ */
822
907
  /* @__NO_SIDE_EFFECTS__ */
823
908
  function awaitAsync() {
824
909
  return {
@@ -832,6 +917,13 @@ function awaitAsync() {
832
917
  }
833
918
  };
834
919
  }
920
+ /**
921
+ * Creates a description metadata action.
922
+ *
923
+ * @param description_ The description text.
924
+ *
925
+ * @returns A description action.
926
+ */
835
927
  /* @__NO_SIDE_EFFECTS__ */
836
928
  function description(description_) {
837
929
  return {
@@ -849,10 +941,10 @@ function returns(schema) {
849
941
  reference: returns,
850
942
  async: false,
851
943
  schema,
852
- "~run"(dataset, config2) {
944
+ "~run"(dataset, config$1) {
853
945
  const func = dataset.value;
854
946
  dataset.value = (...args_) => {
855
- const returnsDataset = this.schema["~run"]({ value: func(...args_) }, config2);
947
+ const returnsDataset = this.schema["~run"]({ value: func(...args_) }, config$1);
856
948
  if (returnsDataset.issues) throw new ValiError(returnsDataset.issues);
857
949
  return returnsDataset.value;
858
950
  };
@@ -868,10 +960,10 @@ function returnsAsync(schema) {
868
960
  reference: returnsAsync,
869
961
  async: false,
870
962
  schema,
871
- "~run"(dataset, config2) {
963
+ "~run"(dataset, config$1) {
872
964
  const func = dataset.value;
873
965
  dataset.value = async (...args_) => {
874
- const returnsDataset = await this.schema["~run"]({ value: await func(...args_) }, config2);
966
+ const returnsDataset = await this.schema["~run"]({ value: await func(...args_) }, config$1);
875
967
  if (returnsDataset.issues) throw new ValiError(returnsDataset.issues);
876
968
  return returnsDataset.value;
877
969
  };
@@ -879,14 +971,41 @@ function returnsAsync(schema) {
879
971
  }
880
972
  };
881
973
  }
974
+ /**
975
+ * Returns the fallback value of the schema.
976
+ *
977
+ * @param schema The schema to get it from.
978
+ * @param dataset The output dataset if available.
979
+ * @param config The config if available.
980
+ *
981
+ * @returns The fallback value.
982
+ */
882
983
  /* @__NO_SIDE_EFFECTS__ */
883
- function getFallback(schema, dataset, config2) {
884
- return typeof schema.fallback === "function" ? schema.fallback(dataset, config2) : schema.fallback;
984
+ function getFallback(schema, dataset, config$1) {
985
+ return typeof schema.fallback === "function" ? schema.fallback(dataset, config$1) : schema.fallback;
885
986
  }
987
+ /**
988
+ * Returns the default value of the schema.
989
+ *
990
+ * @param schema The schema to get it from.
991
+ * @param dataset The input dataset if available.
992
+ * @param config The config if available.
993
+ *
994
+ * @returns The default value.
995
+ */
886
996
  /* @__NO_SIDE_EFFECTS__ */
887
- function getDefault(schema, dataset, config2) {
888
- return typeof schema.default === "function" ? schema.default(dataset, config2) : schema.default;
997
+ function getDefault(schema, dataset, config$1) {
998
+ return typeof schema.default === "function" ? schema.default(dataset, config$1) : schema.default;
889
999
  }
1000
+ /**
1001
+ * Creates an any schema.
1002
+ *
1003
+ * Hint: This schema function exists only for completeness and is not
1004
+ * recommended in practice. Instead, `unknown` should be used to accept
1005
+ * unknown data.
1006
+ *
1007
+ * @returns An any schema.
1008
+ */
890
1009
  /* @__NO_SIDE_EFFECTS__ */
891
1010
  function any() {
892
1011
  return {
@@ -905,7 +1024,7 @@ function any() {
905
1024
  };
906
1025
  }
907
1026
  /* @__NO_SIDE_EFFECTS__ */
908
- function array(item, message2) {
1027
+ function array(item, message$1) {
909
1028
  return {
910
1029
  kind: "schema",
911
1030
  type: "array",
@@ -913,25 +1032,25 @@ function array(item, message2) {
913
1032
  expects: "Array",
914
1033
  async: false,
915
1034
  item,
916
- message: message2,
1035
+ message: message$1,
917
1036
  get "~standard"() {
918
1037
  return /* @__PURE__ */ _getStandardProps(this);
919
1038
  },
920
- "~run"(dataset, config2) {
1039
+ "~run"(dataset, config$1) {
921
1040
  const input = dataset.value;
922
1041
  if (Array.isArray(input)) {
923
1042
  dataset.typed = true;
924
1043
  dataset.value = [];
925
1044
  for (let key = 0; key < input.length; key++) {
926
- const value2 = input[key];
927
- const itemDataset = this.item["~run"]({ value: value2 }, config2);
1045
+ const value$1 = input[key];
1046
+ const itemDataset = this.item["~run"]({ value: value$1 }, config$1);
928
1047
  if (itemDataset.issues) {
929
1048
  const pathItem = {
930
1049
  type: "array",
931
1050
  origin: "value",
932
1051
  input,
933
1052
  key,
934
- value: value2
1053
+ value: value$1
935
1054
  };
936
1055
  for (const issue of itemDataset.issues) {
937
1056
  if (issue.path) issue.path.unshift(pathItem);
@@ -939,7 +1058,7 @@ function array(item, message2) {
939
1058
  dataset.issues?.push(issue);
940
1059
  }
941
1060
  if (!dataset.issues) dataset.issues = itemDataset.issues;
942
- if (config2.abortEarly) {
1061
+ if (config$1.abortEarly) {
943
1062
  dataset.typed = false;
944
1063
  break;
945
1064
  }
@@ -947,71 +1066,71 @@ function array(item, message2) {
947
1066
  if (!itemDataset.typed) dataset.typed = false;
948
1067
  dataset.value.push(itemDataset.value);
949
1068
  }
950
- } else _addIssue(this, "type", dataset, config2);
1069
+ } else _addIssue(this, "type", dataset, config$1);
951
1070
  return dataset;
952
1071
  }
953
1072
  };
954
1073
  }
955
1074
  /* @__NO_SIDE_EFFECTS__ */
956
- function boolean(message2) {
1075
+ function boolean(message$1) {
957
1076
  return {
958
1077
  kind: "schema",
959
1078
  type: "boolean",
960
1079
  reference: boolean,
961
1080
  expects: "boolean",
962
1081
  async: false,
963
- message: message2,
1082
+ message: message$1,
964
1083
  get "~standard"() {
965
1084
  return /* @__PURE__ */ _getStandardProps(this);
966
1085
  },
967
- "~run"(dataset, config2) {
1086
+ "~run"(dataset, config$1) {
968
1087
  if (typeof dataset.value === "boolean") dataset.typed = true;
969
- else _addIssue(this, "type", dataset, config2);
1088
+ else _addIssue(this, "type", dataset, config$1);
970
1089
  return dataset;
971
1090
  }
972
1091
  };
973
1092
  }
974
1093
  /* @__NO_SIDE_EFFECTS__ */
975
- function custom(check2, message2) {
1094
+ function custom(check$1, message$1) {
976
1095
  return {
977
1096
  kind: "schema",
978
1097
  type: "custom",
979
1098
  reference: custom,
980
1099
  expects: "unknown",
981
1100
  async: false,
982
- check: check2,
983
- message: message2,
1101
+ check: check$1,
1102
+ message: message$1,
984
1103
  get "~standard"() {
985
1104
  return /* @__PURE__ */ _getStandardProps(this);
986
1105
  },
987
- "~run"(dataset, config2) {
1106
+ "~run"(dataset, config$1) {
988
1107
  if (this.check(dataset.value)) dataset.typed = true;
989
- else _addIssue(this, "type", dataset, config2);
1108
+ else _addIssue(this, "type", dataset, config$1);
990
1109
  return dataset;
991
1110
  }
992
1111
  };
993
1112
  }
994
1113
  /* @__NO_SIDE_EFFECTS__ */
995
- function function_(message2) {
1114
+ function function_(message$1) {
996
1115
  return {
997
1116
  kind: "schema",
998
1117
  type: "function",
999
1118
  reference: function_,
1000
1119
  expects: "Function",
1001
1120
  async: false,
1002
- message: message2,
1121
+ message: message$1,
1003
1122
  get "~standard"() {
1004
1123
  return /* @__PURE__ */ _getStandardProps(this);
1005
1124
  },
1006
- "~run"(dataset, config2) {
1125
+ "~run"(dataset, config$1) {
1007
1126
  if (typeof dataset.value === "function") dataset.typed = true;
1008
- else _addIssue(this, "type", dataset, config2);
1127
+ else _addIssue(this, "type", dataset, config$1);
1009
1128
  return dataset;
1010
1129
  }
1011
1130
  };
1012
1131
  }
1013
1132
  /* @__NO_SIDE_EFFECTS__ */
1014
- function instance(class_, message2) {
1133
+ function instance(class_, message$1) {
1015
1134
  return {
1016
1135
  kind: "schema",
1017
1136
  type: "instance",
@@ -1019,19 +1138,19 @@ function instance(class_, message2) {
1019
1138
  expects: class_.name,
1020
1139
  async: false,
1021
1140
  class: class_,
1022
- message: message2,
1141
+ message: message$1,
1023
1142
  get "~standard"() {
1024
1143
  return /* @__PURE__ */ _getStandardProps(this);
1025
1144
  },
1026
- "~run"(dataset, config2) {
1145
+ "~run"(dataset, config$1) {
1027
1146
  if (dataset.value instanceof this.class) dataset.typed = true;
1028
- else _addIssue(this, "type", dataset, config2);
1147
+ else _addIssue(this, "type", dataset, config$1);
1029
1148
  return dataset;
1030
1149
  }
1031
1150
  };
1032
1151
  }
1033
1152
  /* @__NO_SIDE_EFFECTS__ */
1034
- function literal(literal_, message2) {
1153
+ function literal(literal_, message$1) {
1035
1154
  return {
1036
1155
  kind: "schema",
1037
1156
  type: "literal",
@@ -1039,31 +1158,31 @@ function literal(literal_, message2) {
1039
1158
  expects: /* @__PURE__ */ _stringify(literal_),
1040
1159
  async: false,
1041
1160
  literal: literal_,
1042
- message: message2,
1161
+ message: message$1,
1043
1162
  get "~standard"() {
1044
1163
  return /* @__PURE__ */ _getStandardProps(this);
1045
1164
  },
1046
- "~run"(dataset, config2) {
1165
+ "~run"(dataset, config$1) {
1047
1166
  if (dataset.value === this.literal) dataset.typed = true;
1048
- else _addIssue(this, "type", dataset, config2);
1167
+ else _addIssue(this, "type", dataset, config$1);
1049
1168
  return dataset;
1050
1169
  }
1051
1170
  };
1052
1171
  }
1053
1172
  /* @__NO_SIDE_EFFECTS__ */
1054
- function looseObject(entries2, message2) {
1173
+ function looseObject(entries$1, message$1) {
1055
1174
  return {
1056
1175
  kind: "schema",
1057
1176
  type: "loose_object",
1058
1177
  reference: looseObject,
1059
1178
  expects: "Object",
1060
1179
  async: false,
1061
- entries: entries2,
1062
- message: message2,
1180
+ entries: entries$1,
1181
+ message: message$1,
1063
1182
  get "~standard"() {
1064
1183
  return /* @__PURE__ */ _getStandardProps(this);
1065
1184
  },
1066
- "~run"(dataset, config2) {
1185
+ "~run"(dataset, config$1) {
1067
1186
  const input = dataset.value;
1068
1187
  if (input && typeof input === "object") {
1069
1188
  dataset.typed = true;
@@ -1071,15 +1190,15 @@ function looseObject(entries2, message2) {
1071
1190
  for (const key in this.entries) {
1072
1191
  const valueSchema = this.entries[key];
1073
1192
  if (key in input || (valueSchema.type === "exact_optional" || valueSchema.type === "optional" || valueSchema.type === "nullish") && valueSchema.default !== void 0) {
1074
- const value2 = key in input ? input[key] : /* @__PURE__ */ getDefault(valueSchema);
1075
- const valueDataset = valueSchema["~run"]({ value: value2 }, config2);
1193
+ const value$1 = key in input ? input[key] : /* @__PURE__ */ getDefault(valueSchema);
1194
+ const valueDataset = valueSchema["~run"]({ value: value$1 }, config$1);
1076
1195
  if (valueDataset.issues) {
1077
1196
  const pathItem = {
1078
1197
  type: "object",
1079
1198
  origin: "value",
1080
1199
  input,
1081
1200
  key,
1082
- value: value2
1201
+ value: value$1
1083
1202
  };
1084
1203
  for (const issue of valueDataset.issues) {
1085
1204
  if (issue.path) issue.path.unshift(pathItem);
@@ -1087,7 +1206,7 @@ function looseObject(entries2, message2) {
1087
1206
  dataset.issues?.push(issue);
1088
1207
  }
1089
1208
  if (!dataset.issues) dataset.issues = valueDataset.issues;
1090
- if (config2.abortEarly) {
1209
+ if (config$1.abortEarly) {
1091
1210
  dataset.typed = false;
1092
1211
  break;
1093
1212
  }
@@ -1096,7 +1215,7 @@ function looseObject(entries2, message2) {
1096
1215
  dataset.value[key] = valueDataset.value;
1097
1216
  } else if (valueSchema.fallback !== void 0) dataset.value[key] = /* @__PURE__ */ getFallback(valueSchema);
1098
1217
  else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish") {
1099
- _addIssue(this, "key", dataset, config2, {
1218
+ _addIssue(this, "key", dataset, config$1, {
1100
1219
  input: void 0,
1101
1220
  expected: `"${key}"`,
1102
1221
  path: [{
@@ -1107,31 +1226,31 @@ function looseObject(entries2, message2) {
1107
1226
  value: input[key]
1108
1227
  }]
1109
1228
  });
1110
- if (config2.abortEarly) break;
1229
+ if (config$1.abortEarly) break;
1111
1230
  }
1112
1231
  }
1113
- if (!dataset.issues || !config2.abortEarly) {
1232
+ if (!dataset.issues || !config$1.abortEarly) {
1114
1233
  for (const key in input) if (/* @__PURE__ */ _isValidObjectKey(input, key) && !(key in this.entries)) dataset.value[key] = input[key];
1115
1234
  }
1116
- } else _addIssue(this, "type", dataset, config2);
1235
+ } else _addIssue(this, "type", dataset, config$1);
1117
1236
  return dataset;
1118
1237
  }
1119
1238
  };
1120
1239
  }
1121
1240
  /* @__NO_SIDE_EFFECTS__ */
1122
- function never(message2) {
1241
+ function never(message$1) {
1123
1242
  return {
1124
1243
  kind: "schema",
1125
1244
  type: "never",
1126
1245
  reference: never,
1127
1246
  expects: "never",
1128
1247
  async: false,
1129
- message: message2,
1248
+ message: message$1,
1130
1249
  get "~standard"() {
1131
1250
  return /* @__PURE__ */ _getStandardProps(this);
1132
1251
  },
1133
- "~run"(dataset, config2) {
1134
- _addIssue(this, "type", dataset, config2);
1252
+ "~run"(dataset, config$1) {
1253
+ _addIssue(this, "type", dataset, config$1);
1135
1254
  return dataset;
1136
1255
  }
1137
1256
  };
@@ -1149,51 +1268,51 @@ function nullish(wrapped, default_) {
1149
1268
  get "~standard"() {
1150
1269
  return /* @__PURE__ */ _getStandardProps(this);
1151
1270
  },
1152
- "~run"(dataset, config2) {
1271
+ "~run"(dataset, config$1) {
1153
1272
  if (dataset.value === null || dataset.value === void 0) {
1154
- if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config2);
1273
+ if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config$1);
1155
1274
  if (dataset.value === null || dataset.value === void 0) {
1156
1275
  dataset.typed = true;
1157
1276
  return dataset;
1158
1277
  }
1159
1278
  }
1160
- return this.wrapped["~run"](dataset, config2);
1279
+ return this.wrapped["~run"](dataset, config$1);
1161
1280
  }
1162
1281
  };
1163
1282
  }
1164
1283
  /* @__NO_SIDE_EFFECTS__ */
1165
- function number(message2) {
1284
+ function number(message$1) {
1166
1285
  return {
1167
1286
  kind: "schema",
1168
1287
  type: "number",
1169
1288
  reference: number,
1170
1289
  expects: "number",
1171
1290
  async: false,
1172
- message: message2,
1291
+ message: message$1,
1173
1292
  get "~standard"() {
1174
1293
  return /* @__PURE__ */ _getStandardProps(this);
1175
1294
  },
1176
- "~run"(dataset, config2) {
1295
+ "~run"(dataset, config$1) {
1177
1296
  if (typeof dataset.value === "number" && !isNaN(dataset.value)) dataset.typed = true;
1178
- else _addIssue(this, "type", dataset, config2);
1297
+ else _addIssue(this, "type", dataset, config$1);
1179
1298
  return dataset;
1180
1299
  }
1181
1300
  };
1182
1301
  }
1183
1302
  /* @__NO_SIDE_EFFECTS__ */
1184
- function object(entries2, message2) {
1303
+ function object(entries$1, message$1) {
1185
1304
  return {
1186
1305
  kind: "schema",
1187
1306
  type: "object",
1188
1307
  reference: object,
1189
1308
  expects: "Object",
1190
1309
  async: false,
1191
- entries: entries2,
1192
- message: message2,
1310
+ entries: entries$1,
1311
+ message: message$1,
1193
1312
  get "~standard"() {
1194
1313
  return /* @__PURE__ */ _getStandardProps(this);
1195
1314
  },
1196
- "~run"(dataset, config2) {
1315
+ "~run"(dataset, config$1) {
1197
1316
  const input = dataset.value;
1198
1317
  if (input && typeof input === "object") {
1199
1318
  dataset.typed = true;
@@ -1201,15 +1320,15 @@ function object(entries2, message2) {
1201
1320
  for (const key in this.entries) {
1202
1321
  const valueSchema = this.entries[key];
1203
1322
  if (key in input || (valueSchema.type === "exact_optional" || valueSchema.type === "optional" || valueSchema.type === "nullish") && valueSchema.default !== void 0) {
1204
- const value2 = key in input ? input[key] : /* @__PURE__ */ getDefault(valueSchema);
1205
- const valueDataset = valueSchema["~run"]({ value: value2 }, config2);
1323
+ const value$1 = key in input ? input[key] : /* @__PURE__ */ getDefault(valueSchema);
1324
+ const valueDataset = valueSchema["~run"]({ value: value$1 }, config$1);
1206
1325
  if (valueDataset.issues) {
1207
1326
  const pathItem = {
1208
1327
  type: "object",
1209
1328
  origin: "value",
1210
1329
  input,
1211
1330
  key,
1212
- value: value2
1331
+ value: value$1
1213
1332
  };
1214
1333
  for (const issue of valueDataset.issues) {
1215
1334
  if (issue.path) issue.path.unshift(pathItem);
@@ -1217,7 +1336,7 @@ function object(entries2, message2) {
1217
1336
  dataset.issues?.push(issue);
1218
1337
  }
1219
1338
  if (!dataset.issues) dataset.issues = valueDataset.issues;
1220
- if (config2.abortEarly) {
1339
+ if (config$1.abortEarly) {
1221
1340
  dataset.typed = false;
1222
1341
  break;
1223
1342
  }
@@ -1226,7 +1345,7 @@ function object(entries2, message2) {
1226
1345
  dataset.value[key] = valueDataset.value;
1227
1346
  } else if (valueSchema.fallback !== void 0) dataset.value[key] = /* @__PURE__ */ getFallback(valueSchema);
1228
1347
  else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish") {
1229
- _addIssue(this, "key", dataset, config2, {
1348
+ _addIssue(this, "key", dataset, config$1, {
1230
1349
  input: void 0,
1231
1350
  expected: `"${key}"`,
1232
1351
  path: [{
@@ -1237,10 +1356,10 @@ function object(entries2, message2) {
1237
1356
  value: input[key]
1238
1357
  }]
1239
1358
  });
1240
- if (config2.abortEarly) break;
1359
+ if (config$1.abortEarly) break;
1241
1360
  }
1242
1361
  }
1243
- } else _addIssue(this, "type", dataset, config2);
1362
+ } else _addIssue(this, "type", dataset, config$1);
1244
1363
  return dataset;
1245
1364
  }
1246
1365
  };
@@ -1258,39 +1377,39 @@ function optional(wrapped, default_) {
1258
1377
  get "~standard"() {
1259
1378
  return /* @__PURE__ */ _getStandardProps(this);
1260
1379
  },
1261
- "~run"(dataset, config2) {
1380
+ "~run"(dataset, config$1) {
1262
1381
  if (dataset.value === void 0) {
1263
- if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config2);
1382
+ if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config$1);
1264
1383
  if (dataset.value === void 0) {
1265
1384
  dataset.typed = true;
1266
1385
  return dataset;
1267
1386
  }
1268
1387
  }
1269
- return this.wrapped["~run"](dataset, config2);
1388
+ return this.wrapped["~run"](dataset, config$1);
1270
1389
  }
1271
1390
  };
1272
1391
  }
1273
1392
  /* @__NO_SIDE_EFFECTS__ */
1274
- function promise(message2) {
1393
+ function promise(message$1) {
1275
1394
  return {
1276
1395
  kind: "schema",
1277
1396
  type: "promise",
1278
1397
  reference: promise,
1279
1398
  expects: "Promise",
1280
1399
  async: false,
1281
- message: message2,
1400
+ message: message$1,
1282
1401
  get "~standard"() {
1283
1402
  return /* @__PURE__ */ _getStandardProps(this);
1284
1403
  },
1285
- "~run"(dataset, config2) {
1404
+ "~run"(dataset, config$1) {
1286
1405
  if (dataset.value instanceof Promise) dataset.typed = true;
1287
- else _addIssue(this, "type", dataset, config2);
1406
+ else _addIssue(this, "type", dataset, config$1);
1288
1407
  return dataset;
1289
1408
  }
1290
1409
  };
1291
1410
  }
1292
1411
  /* @__NO_SIDE_EFFECTS__ */
1293
- function record(key, value2, message2) {
1412
+ function record(key, value$1, message$1) {
1294
1413
  return {
1295
1414
  kind: "schema",
1296
1415
  type: "record",
@@ -1298,19 +1417,19 @@ function record(key, value2, message2) {
1298
1417
  expects: "Object",
1299
1418
  async: false,
1300
1419
  key,
1301
- value: value2,
1302
- message: message2,
1420
+ value: value$1,
1421
+ message: message$1,
1303
1422
  get "~standard"() {
1304
1423
  return /* @__PURE__ */ _getStandardProps(this);
1305
1424
  },
1306
- "~run"(dataset, config2) {
1425
+ "~run"(dataset, config$1) {
1307
1426
  const input = dataset.value;
1308
1427
  if (input && typeof input === "object") {
1309
1428
  dataset.typed = true;
1310
1429
  dataset.value = {};
1311
1430
  for (const entryKey in input) if (/* @__PURE__ */ _isValidObjectKey(input, entryKey)) {
1312
1431
  const entryValue = input[entryKey];
1313
- const keyDataset = this.key["~run"]({ value: entryKey }, config2);
1432
+ const keyDataset = this.key["~run"]({ value: entryKey }, config$1);
1314
1433
  if (keyDataset.issues) {
1315
1434
  const pathItem = {
1316
1435
  type: "object",
@@ -1324,12 +1443,12 @@ function record(key, value2, message2) {
1324
1443
  dataset.issues?.push(issue);
1325
1444
  }
1326
1445
  if (!dataset.issues) dataset.issues = keyDataset.issues;
1327
- if (config2.abortEarly) {
1446
+ if (config$1.abortEarly) {
1328
1447
  dataset.typed = false;
1329
1448
  break;
1330
1449
  }
1331
1450
  }
1332
- const valueDataset = this.value["~run"]({ value: entryValue }, config2);
1451
+ const valueDataset = this.value["~run"]({ value: entryValue }, config$1);
1333
1452
  if (valueDataset.issues) {
1334
1453
  const pathItem = {
1335
1454
  type: "object",
@@ -1344,7 +1463,7 @@ function record(key, value2, message2) {
1344
1463
  dataset.issues?.push(issue);
1345
1464
  }
1346
1465
  if (!dataset.issues) dataset.issues = valueDataset.issues;
1347
- if (config2.abortEarly) {
1466
+ if (config$1.abortEarly) {
1348
1467
  dataset.typed = false;
1349
1468
  break;
1350
1469
  }
@@ -1352,25 +1471,25 @@ function record(key, value2, message2) {
1352
1471
  if (!keyDataset.typed || !valueDataset.typed) dataset.typed = false;
1353
1472
  if (keyDataset.typed) dataset.value[keyDataset.value] = valueDataset.value;
1354
1473
  }
1355
- } else _addIssue(this, "type", dataset, config2);
1474
+ } else _addIssue(this, "type", dataset, config$1);
1356
1475
  return dataset;
1357
1476
  }
1358
1477
  };
1359
1478
  }
1360
1479
  /* @__NO_SIDE_EFFECTS__ */
1361
- function strictObject(entries2, message2) {
1480
+ function strictObject(entries$1, message$1) {
1362
1481
  return {
1363
1482
  kind: "schema",
1364
1483
  type: "strict_object",
1365
1484
  reference: strictObject,
1366
1485
  expects: "Object",
1367
1486
  async: false,
1368
- entries: entries2,
1369
- message: message2,
1487
+ entries: entries$1,
1488
+ message: message$1,
1370
1489
  get "~standard"() {
1371
1490
  return /* @__PURE__ */ _getStandardProps(this);
1372
1491
  },
1373
- "~run"(dataset, config2) {
1492
+ "~run"(dataset, config$1) {
1374
1493
  const input = dataset.value;
1375
1494
  if (input && typeof input === "object") {
1376
1495
  dataset.typed = true;
@@ -1378,15 +1497,15 @@ function strictObject(entries2, message2) {
1378
1497
  for (const key in this.entries) {
1379
1498
  const valueSchema = this.entries[key];
1380
1499
  if (key in input || (valueSchema.type === "exact_optional" || valueSchema.type === "optional" || valueSchema.type === "nullish") && valueSchema.default !== void 0) {
1381
- const value2 = key in input ? input[key] : /* @__PURE__ */ getDefault(valueSchema);
1382
- const valueDataset = valueSchema["~run"]({ value: value2 }, config2);
1500
+ const value$1 = key in input ? input[key] : /* @__PURE__ */ getDefault(valueSchema);
1501
+ const valueDataset = valueSchema["~run"]({ value: value$1 }, config$1);
1383
1502
  if (valueDataset.issues) {
1384
1503
  const pathItem = {
1385
1504
  type: "object",
1386
1505
  origin: "value",
1387
1506
  input,
1388
1507
  key,
1389
- value: value2
1508
+ value: value$1
1390
1509
  };
1391
1510
  for (const issue of valueDataset.issues) {
1392
1511
  if (issue.path) issue.path.unshift(pathItem);
@@ -1394,7 +1513,7 @@ function strictObject(entries2, message2) {
1394
1513
  dataset.issues?.push(issue);
1395
1514
  }
1396
1515
  if (!dataset.issues) dataset.issues = valueDataset.issues;
1397
- if (config2.abortEarly) {
1516
+ if (config$1.abortEarly) {
1398
1517
  dataset.typed = false;
1399
1518
  break;
1400
1519
  }
@@ -1403,7 +1522,7 @@ function strictObject(entries2, message2) {
1403
1522
  dataset.value[key] = valueDataset.value;
1404
1523
  } else if (valueSchema.fallback !== void 0) dataset.value[key] = /* @__PURE__ */ getFallback(valueSchema);
1405
1524
  else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish") {
1406
- _addIssue(this, "key", dataset, config2, {
1525
+ _addIssue(this, "key", dataset, config$1, {
1407
1526
  input: void 0,
1408
1527
  expected: `"${key}"`,
1409
1528
  path: [{
@@ -1414,12 +1533,12 @@ function strictObject(entries2, message2) {
1414
1533
  value: input[key]
1415
1534
  }]
1416
1535
  });
1417
- if (config2.abortEarly) break;
1536
+ if (config$1.abortEarly) break;
1418
1537
  }
1419
1538
  }
1420
- if (!dataset.issues || !config2.abortEarly) {
1539
+ if (!dataset.issues || !config$1.abortEarly) {
1421
1540
  for (const key in input) if (!(key in this.entries)) {
1422
- _addIssue(this, "key", dataset, config2, {
1541
+ _addIssue(this, "key", dataset, config$1, {
1423
1542
  input: key,
1424
1543
  expected: "never",
1425
1544
  path: [{
@@ -1433,32 +1552,32 @@ function strictObject(entries2, message2) {
1433
1552
  break;
1434
1553
  }
1435
1554
  }
1436
- } else _addIssue(this, "type", dataset, config2);
1555
+ } else _addIssue(this, "type", dataset, config$1);
1437
1556
  return dataset;
1438
1557
  }
1439
1558
  };
1440
1559
  }
1441
1560
  /* @__NO_SIDE_EFFECTS__ */
1442
- function string(message2) {
1561
+ function string(message$1) {
1443
1562
  return {
1444
1563
  kind: "schema",
1445
1564
  type: "string",
1446
1565
  reference: string,
1447
1566
  expects: "string",
1448
1567
  async: false,
1449
- message: message2,
1568
+ message: message$1,
1450
1569
  get "~standard"() {
1451
1570
  return /* @__PURE__ */ _getStandardProps(this);
1452
1571
  },
1453
- "~run"(dataset, config2) {
1572
+ "~run"(dataset, config$1) {
1454
1573
  if (typeof dataset.value === "string") dataset.typed = true;
1455
- else _addIssue(this, "type", dataset, config2);
1574
+ else _addIssue(this, "type", dataset, config$1);
1456
1575
  return dataset;
1457
1576
  }
1458
1577
  };
1459
1578
  }
1460
1579
  /* @__NO_SIDE_EFFECTS__ */
1461
- function tuple(items, message2) {
1580
+ function tuple(items, message$1) {
1462
1581
  return {
1463
1582
  kind: "schema",
1464
1583
  type: "tuple",
@@ -1466,25 +1585,25 @@ function tuple(items, message2) {
1466
1585
  expects: "Array",
1467
1586
  async: false,
1468
1587
  items,
1469
- message: message2,
1588
+ message: message$1,
1470
1589
  get "~standard"() {
1471
1590
  return /* @__PURE__ */ _getStandardProps(this);
1472
1591
  },
1473
- "~run"(dataset, config2) {
1592
+ "~run"(dataset, config$1) {
1474
1593
  const input = dataset.value;
1475
1594
  if (Array.isArray(input)) {
1476
1595
  dataset.typed = true;
1477
1596
  dataset.value = [];
1478
1597
  for (let key = 0; key < this.items.length; key++) {
1479
- const value2 = input[key];
1480
- const itemDataset = this.items[key]["~run"]({ value: value2 }, config2);
1598
+ const value$1 = input[key];
1599
+ const itemDataset = this.items[key]["~run"]({ value: value$1 }, config$1);
1481
1600
  if (itemDataset.issues) {
1482
1601
  const pathItem = {
1483
1602
  type: "array",
1484
1603
  origin: "value",
1485
1604
  input,
1486
1605
  key,
1487
- value: value2
1606
+ value: value$1
1488
1607
  };
1489
1608
  for (const issue of itemDataset.issues) {
1490
1609
  if (issue.path) issue.path.unshift(pathItem);
@@ -1492,7 +1611,7 @@ function tuple(items, message2) {
1492
1611
  dataset.issues?.push(issue);
1493
1612
  }
1494
1613
  if (!dataset.issues) dataset.issues = itemDataset.issues;
1495
- if (config2.abortEarly) {
1614
+ if (config$1.abortEarly) {
1496
1615
  dataset.typed = false;
1497
1616
  break;
1498
1617
  }
@@ -1500,30 +1619,39 @@ function tuple(items, message2) {
1500
1619
  if (!itemDataset.typed) dataset.typed = false;
1501
1620
  dataset.value.push(itemDataset.value);
1502
1621
  }
1503
- } else _addIssue(this, "type", dataset, config2);
1622
+ } else _addIssue(this, "type", dataset, config$1);
1504
1623
  return dataset;
1505
1624
  }
1506
1625
  };
1507
1626
  }
1508
1627
  /* @__NO_SIDE_EFFECTS__ */
1509
- function undefined_(message2) {
1628
+ function undefined_(message$1) {
1510
1629
  return {
1511
1630
  kind: "schema",
1512
1631
  type: "undefined",
1513
1632
  reference: undefined_,
1514
1633
  expects: "undefined",
1515
1634
  async: false,
1516
- message: message2,
1635
+ message: message$1,
1517
1636
  get "~standard"() {
1518
1637
  return /* @__PURE__ */ _getStandardProps(this);
1519
1638
  },
1520
- "~run"(dataset, config2) {
1639
+ "~run"(dataset, config$1) {
1521
1640
  if (dataset.value === void 0) dataset.typed = true;
1522
- else _addIssue(this, "type", dataset, config2);
1641
+ else _addIssue(this, "type", dataset, config$1);
1523
1642
  return dataset;
1524
1643
  }
1525
1644
  };
1526
1645
  }
1646
+ /**
1647
+ * Returns the sub issues of the provided datasets for the union issue.
1648
+ *
1649
+ * @param datasets The datasets.
1650
+ *
1651
+ * @returns The sub issues.
1652
+ *
1653
+ * @internal
1654
+ */
1527
1655
  /* @__NO_SIDE_EFFECTS__ */
1528
1656
  function _subIssues(datasets) {
1529
1657
  let issues;
@@ -1532,7 +1660,7 @@ function _subIssues(datasets) {
1532
1660
  return issues;
1533
1661
  }
1534
1662
  /* @__NO_SIDE_EFFECTS__ */
1535
- function union(options, message2) {
1663
+ function union(options, message$1) {
1536
1664
  return {
1537
1665
  kind: "schema",
1538
1666
  type: "union",
@@ -1540,16 +1668,16 @@ function union(options, message2) {
1540
1668
  expects: /* @__PURE__ */ _joinExpects(options.map((option) => option.expects), "|"),
1541
1669
  async: false,
1542
1670
  options,
1543
- message: message2,
1671
+ message: message$1,
1544
1672
  get "~standard"() {
1545
1673
  return /* @__PURE__ */ _getStandardProps(this);
1546
1674
  },
1547
- "~run"(dataset, config2) {
1675
+ "~run"(dataset, config$1) {
1548
1676
  let validDataset;
1549
1677
  let typedDatasets;
1550
1678
  let untypedDatasets;
1551
1679
  for (const schema of this.options) {
1552
- const optionDataset = schema["~run"]({ value: dataset.value }, config2);
1680
+ const optionDataset = schema["~run"]({ value: dataset.value }, config$1);
1553
1681
  if (optionDataset.typed) if (optionDataset.issues) if (typedDatasets) typedDatasets.push(optionDataset);
1554
1682
  else typedDatasets = [optionDataset];
1555
1683
  else {
@@ -1562,16 +1690,16 @@ function union(options, message2) {
1562
1690
  if (validDataset) return validDataset;
1563
1691
  if (typedDatasets) {
1564
1692
  if (typedDatasets.length === 1) return typedDatasets[0];
1565
- _addIssue(this, "type", dataset, config2, { issues: /* @__PURE__ */ _subIssues(typedDatasets) });
1693
+ _addIssue(this, "type", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(typedDatasets) });
1566
1694
  dataset.typed = true;
1567
1695
  } else if (untypedDatasets?.length === 1) return untypedDatasets[0];
1568
- else _addIssue(this, "type", dataset, config2, { issues: /* @__PURE__ */ _subIssues(untypedDatasets) });
1696
+ else _addIssue(this, "type", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(untypedDatasets) });
1569
1697
  return dataset;
1570
1698
  }
1571
1699
  };
1572
1700
  }
1573
1701
  /* @__NO_SIDE_EFFECTS__ */
1574
- function unionAsync(options, message2) {
1702
+ function unionAsync(options, message$1) {
1575
1703
  return {
1576
1704
  kind: "schema",
1577
1705
  type: "union",
@@ -1579,16 +1707,16 @@ function unionAsync(options, message2) {
1579
1707
  expects: /* @__PURE__ */ _joinExpects(options.map((option) => option.expects), "|"),
1580
1708
  async: true,
1581
1709
  options,
1582
- message: message2,
1710
+ message: message$1,
1583
1711
  get "~standard"() {
1584
1712
  return /* @__PURE__ */ _getStandardProps(this);
1585
1713
  },
1586
- async "~run"(dataset, config2) {
1714
+ async "~run"(dataset, config$1) {
1587
1715
  let validDataset;
1588
1716
  let typedDatasets;
1589
1717
  let untypedDatasets;
1590
1718
  for (const schema of this.options) {
1591
- const optionDataset = await schema["~run"]({ value: dataset.value }, config2);
1719
+ const optionDataset = await schema["~run"]({ value: dataset.value }, config$1);
1592
1720
  if (optionDataset.typed) if (optionDataset.issues) if (typedDatasets) typedDatasets.push(optionDataset);
1593
1721
  else typedDatasets = [optionDataset];
1594
1722
  else {
@@ -1601,40 +1729,49 @@ function unionAsync(options, message2) {
1601
1729
  if (validDataset) return validDataset;
1602
1730
  if (typedDatasets) {
1603
1731
  if (typedDatasets.length === 1) return typedDatasets[0];
1604
- _addIssue(this, "type", dataset, config2, { issues: /* @__PURE__ */ _subIssues(typedDatasets) });
1732
+ _addIssue(this, "type", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(typedDatasets) });
1605
1733
  dataset.typed = true;
1606
1734
  } else if (untypedDatasets?.length === 1) return untypedDatasets[0];
1607
- else _addIssue(this, "type", dataset, config2, { issues: /* @__PURE__ */ _subIssues(untypedDatasets) });
1735
+ else _addIssue(this, "type", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(untypedDatasets) });
1608
1736
  return dataset;
1609
1737
  }
1610
1738
  };
1611
1739
  }
1612
1740
  /* @__NO_SIDE_EFFECTS__ */
1613
- function void_(message2) {
1741
+ function void_(message$1) {
1614
1742
  return {
1615
1743
  kind: "schema",
1616
1744
  type: "void",
1617
1745
  reference: void_,
1618
1746
  expects: "void",
1619
1747
  async: false,
1620
- message: message2,
1748
+ message: message$1,
1621
1749
  get "~standard"() {
1622
1750
  return /* @__PURE__ */ _getStandardProps(this);
1623
1751
  },
1624
- "~run"(dataset, config2) {
1752
+ "~run"(dataset, config$1) {
1625
1753
  if (dataset.value === void 0) dataset.typed = true;
1626
- else _addIssue(this, "type", dataset, config2);
1754
+ else _addIssue(this, "type", dataset, config$1);
1627
1755
  return dataset;
1628
1756
  }
1629
1757
  };
1630
1758
  }
1759
+ /**
1760
+ * Creates a modified copy of an object schema that does not contain the
1761
+ * selected entries.
1762
+ *
1763
+ * @param schema The schema to omit from.
1764
+ * @param keys The selected entries.
1765
+ *
1766
+ * @returns An object schema.
1767
+ */
1631
1768
  /* @__NO_SIDE_EFFECTS__ */
1632
1769
  function omit(schema, keys) {
1633
- const entries2 = { ...schema.entries };
1634
- for (const key of keys) delete entries2[key];
1770
+ const entries$1 = { ...schema.entries };
1771
+ for (const key of keys) delete entries$1[key];
1635
1772
  return {
1636
1773
  ...schema,
1637
- entries: entries2,
1774
+ entries: entries$1,
1638
1775
  get "~standard"() {
1639
1776
  return /* @__PURE__ */ _getStandardProps(this);
1640
1777
  }
@@ -1642,60 +1779,69 @@ function omit(schema, keys) {
1642
1779
  }
1643
1780
  /* @__NO_SIDE_EFFECTS__ */
1644
1781
  function partial(schema, keys) {
1645
- const entries2 = {};
1646
- for (const key in schema.entries) entries2[key] = !keys || keys.includes(key) ? /* @__PURE__ */ optional(schema.entries[key]) : schema.entries[key];
1782
+ const entries$1 = {};
1783
+ for (const key in schema.entries) entries$1[key] = !keys || keys.includes(key) ? /* @__PURE__ */ optional(schema.entries[key]) : schema.entries[key];
1647
1784
  return {
1648
1785
  ...schema,
1649
- entries: entries2,
1786
+ entries: entries$1,
1650
1787
  get "~standard"() {
1651
1788
  return /* @__PURE__ */ _getStandardProps(this);
1652
1789
  }
1653
1790
  };
1654
1791
  }
1655
1792
  /* @__NO_SIDE_EFFECTS__ */
1656
- function pipe(...pipe2) {
1793
+ function pipe(...pipe$1) {
1657
1794
  return {
1658
- ...pipe2[0],
1659
- pipe: pipe2,
1795
+ ...pipe$1[0],
1796
+ pipe: pipe$1,
1660
1797
  get "~standard"() {
1661
1798
  return /* @__PURE__ */ _getStandardProps(this);
1662
1799
  },
1663
- "~run"(dataset, config2) {
1664
- for (const item of pipe2) if (item.kind !== "metadata") {
1800
+ "~run"(dataset, config$1) {
1801
+ for (const item of pipe$1) if (item.kind !== "metadata") {
1665
1802
  if (dataset.issues && (item.kind === "schema" || item.kind === "transformation")) {
1666
1803
  dataset.typed = false;
1667
1804
  break;
1668
1805
  }
1669
- if (!dataset.issues || !config2.abortEarly && !config2.abortPipeEarly) dataset = item["~run"](dataset, config2);
1806
+ if (!dataset.issues || !config$1.abortEarly && !config$1.abortPipeEarly) dataset = item["~run"](dataset, config$1);
1670
1807
  }
1671
1808
  return dataset;
1672
1809
  }
1673
1810
  };
1674
1811
  }
1675
1812
  /* @__NO_SIDE_EFFECTS__ */
1676
- function pipeAsync(...pipe2) {
1813
+ function pipeAsync(...pipe$1) {
1677
1814
  return {
1678
- ...pipe2[0],
1679
- pipe: pipe2,
1815
+ ...pipe$1[0],
1816
+ pipe: pipe$1,
1680
1817
  async: true,
1681
1818
  get "~standard"() {
1682
1819
  return /* @__PURE__ */ _getStandardProps(this);
1683
1820
  },
1684
- async "~run"(dataset, config2) {
1685
- for (const item of pipe2) if (item.kind !== "metadata") {
1821
+ async "~run"(dataset, config$1) {
1822
+ for (const item of pipe$1) if (item.kind !== "metadata") {
1686
1823
  if (dataset.issues && (item.kind === "schema" || item.kind === "transformation")) {
1687
1824
  dataset.typed = false;
1688
1825
  break;
1689
1826
  }
1690
- if (!dataset.issues || !config2.abortEarly && !config2.abortPipeEarly) dataset = await item["~run"](dataset, config2);
1827
+ if (!dataset.issues || !config$1.abortEarly && !config$1.abortPipeEarly) dataset = await item["~run"](dataset, config$1);
1691
1828
  }
1692
1829
  return dataset;
1693
1830
  }
1694
1831
  };
1695
1832
  }
1833
+ /**
1834
+ * Parses an unknown input based on a schema.
1835
+ *
1836
+ * @param schema The schema to be used.
1837
+ * @param input The input to be parsed.
1838
+ * @param config The parse configuration.
1839
+ *
1840
+ * @returns The parse result.
1841
+ */
1696
1842
  /* @__NO_SIDE_EFFECTS__ */
1697
- function safeParse(schema, input, config2) {
1698
- const dataset = schema["~run"]({ value: input }, /* @__PURE__ */ getGlobalConfig(config2));
1843
+ function safeParse(schema, input, config$1) {
1844
+ const dataset = schema["~run"]({ value: input }, /* @__PURE__ */ getGlobalConfig(config$1));
1699
1845
  return {
1700
1846
  typed: dataset.typed,
1701
1847
  success: !dataset.issues,
@@ -1972,7 +2118,7 @@ const InputOptionsSchema = strictObject({
1972
2118
  literal("exports-only"),
1973
2119
  literal(false)
1974
2120
  ]))),
1975
- tsconfig: pipe(optional(string()), description("Path to the tsconfig.json file."))
2121
+ tsconfig: pipe(optional(union([literal(true), string()])), description("Path to the tsconfig.json file."))
1976
2122
  });
1977
2123
  const InputCliOverrideSchema = strictObject({
1978
2124
  input: pipe(optional(array(string())), description("Entry file")),
@@ -2201,7 +2347,7 @@ var RolldownOutputImpl = class extends PlainObjectLike {
2201
2347
  __decorate([lazyProp], RolldownOutputImpl.prototype, "output", null);
2202
2348
 
2203
2349
  //#endregion
2204
- //#region ../../node_modules/.pnpm/oxc-parser@0.98.0/node_modules/oxc-parser/src-js/wrap.js
2350
+ //#region ../../node_modules/.pnpm/oxc-parser@0.101.0/node_modules/oxc-parser/src-js/wrap.js
2205
2351
  function wrap$1(result) {
2206
2352
  let program, module, comments, errors;
2207
2353
  return {
@@ -2237,10 +2383,24 @@ function applyFix(program, fixPath) {
2237
2383
  } catch {}
2238
2384
  }
2239
2385
 
2386
+ //#endregion
2387
+ //#region src/utils/parse.ts
2388
+ /**
2389
+ * Parse asynchronously.
2390
+ *
2391
+ * Note: This function can be slower than `parseSync` due to the overhead of spawning a thread.
2392
+ */
2393
+ async function parse$1(filename, sourceText, options) {
2394
+ return wrap$1(await parse(filename, sourceText, options));
2395
+ }
2396
+ /** Parse synchronously. */
2397
+ function parseSync$1(filename, sourceText, options) {
2398
+ return wrap$1(parseSync(filename, sourceText, options));
2399
+ }
2400
+
2240
2401
  //#endregion
2241
2402
  //#region src/parse-ast-index.ts
2242
2403
  function wrap(result, sourceText) {
2243
- result = wrap$1(result);
2244
2404
  if (result.errors.length > 0) return normalizeParseError(sourceText, result.errors);
2245
2405
  return result.program;
2246
2406
  }
@@ -2265,7 +2425,7 @@ const defaultParserOptions = {
2265
2425
  preserveParens: false
2266
2426
  };
2267
2427
  function parseAst(sourceText, options, filename) {
2268
- return wrap(parseSync(filename ?? "file.js", sourceText, {
2428
+ return wrap(parseSync$1(filename ?? "file.js", sourceText, {
2269
2429
  ...defaultParserOptions,
2270
2430
  ...options
2271
2431
  }), sourceText);
@@ -3677,9 +3837,11 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
3677
3837
  const pluginContextData = new PluginContextData(onLog, outputOptions, normalizedOutputPlugins);
3678
3838
  const plugins = rawPlugins.map((plugin) => {
3679
3839
  if ("_parallel" in plugin) return;
3680
- if (plugin instanceof BuiltinPlugin) {
3681
- if (plugin.name === "builtin:vite-html") return bindingifyViteHtmlPlugin(plugin, onLog, logLevel, watchMode);
3682
- return bindingifyBuiltInPlugin(plugin);
3840
+ if (plugin instanceof BuiltinPlugin) switch (plugin.name) {
3841
+ case "builtin:vite-css-post": return bindingifyCSSPostPlugin(plugin, pluginContextData);
3842
+ case "builtin:vite-html": return bindingifyViteHtmlPlugin(plugin, onLog, logLevel, watchMode, pluginContextData);
3843
+ case "builtin:vite-manifest": return bindingifyManifestPlugin(plugin, pluginContextData);
3844
+ default: return bindingifyBuiltInPlugin(plugin);
3683
3845
  }
3684
3846
  return bindingifyPlugin(plugin, inputOptions, outputOptions, pluginContextData, normalizedOutputPlugins, onLog, logLevel, watchMode);
3685
3847
  });
@@ -4107,4 +4269,4 @@ var RolldownBuild = class RolldownBuild {
4107
4269
  };
4108
4270
 
4109
4271
  //#endregion
4110
- export { unwrapBindingResult as a, normalizeBindingResult as i, createBundlerOptions as n, validateOption as o, aggregateBindingErrorsIntoJsError as r, PluginDriver as s, RolldownBuild as t };
4272
+ export { unwrapBindingResult as a, validateOption as c, normalizeBindingResult as i, PluginDriver as l, createBundlerOptions as n, parse$1 as o, aggregateBindingErrorsIntoJsError as r, parseSync$1 as s, RolldownBuild as t };