@maroonedog/luq 0.1.2-alpha → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1319) hide show
  1. package/LICENSE +9 -9
  2. package/README.md +479 -215
  3. package/dist/async/async-context.d.ts +41 -0
  4. package/dist/async/async-context.js +84 -0
  5. package/dist/async/async-context.mjs +79 -0
  6. package/dist/async/async-validator.d.ts +20 -0
  7. package/dist/async/async-validator.js +52 -0
  8. package/dist/async/async-validator.mjs +47 -0
  9. package/dist/async/index.d.ts +4 -0
  10. package/dist/async/index.js +25 -0
  11. package/dist/async/index.mjs +16 -0
  12. package/dist/async.d.ts +1 -0
  13. package/dist/async.js +2 -0
  14. package/dist/async.mjs +1 -0
  15. package/dist/builder/builder-surface.types.d.ts +39 -0
  16. package/dist/builder/builder-surface.types.js +2 -0
  17. package/dist/builder/builder-surface.types.mjs +1 -0
  18. package/dist/builder/compile-declarations.d.ts +4 -0
  19. package/dist/builder/compile-declarations.js +40 -0
  20. package/dist/builder/compile-declarations.mjs +37 -0
  21. package/dist/builder/create-builder.d.ts +16 -0
  22. package/dist/builder/create-builder.js +98 -0
  23. package/dist/builder/create-builder.mjs +92 -0
  24. package/dist/builder/create-field-builder.d.ts +5 -0
  25. package/dist/builder/create-field-builder.js +47 -0
  26. package/dist/builder/create-field-builder.mjs +44 -0
  27. package/dist/builder/create-plan-validator.d.ts +3 -0
  28. package/dist/builder/create-plan-validator.js +15 -0
  29. package/dist/builder/create-plan-validator.mjs +12 -0
  30. package/dist/builder/create-projection-reader.d.ts +3 -0
  31. package/dist/builder/create-projection-reader.js +44 -0
  32. package/dist/builder/create-projection-reader.mjs +41 -0
  33. package/dist/builder/create-subset-validator.d.ts +3 -0
  34. package/dist/builder/create-subset-validator.js +40 -0
  35. package/dist/builder/create-subset-validator.mjs +37 -0
  36. package/dist/builder/field-builder.types.d.ts +43 -0
  37. package/dist/builder/field-builder.types.js +11 -0
  38. package/dist/builder/field-builder.types.mjs +8 -0
  39. package/dist/builder/field-entry.types.d.ts +10 -0
  40. package/dist/builder/field-entry.types.js +2 -0
  41. package/dist/builder/field-entry.types.mjs +1 -0
  42. package/dist/builder/field-options.types.d.ts +11 -0
  43. package/dist/builder/field-options.types.js +13 -0
  44. package/dist/builder/field-options.types.mjs +12 -0
  45. package/dist/builder/global-config-store.d.ts +4 -0
  46. package/dist/builder/global-config-store.js +29 -0
  47. package/dist/builder/global-config-store.mjs +24 -0
  48. package/dist/builder/index.d.ts +6 -0
  49. package/dist/builder/index.js +17 -0
  50. package/dist/builder/index.mjs +8 -0
  51. package/dist/builder/resolve-field-default.d.ts +14 -0
  52. package/dist/builder/resolve-field-default.js +50 -0
  53. package/dist/builder/resolve-field-default.mjs +47 -0
  54. package/dist/builder/validator.types.d.ts +28 -0
  55. package/dist/builder/validator.types.js +2 -0
  56. package/dist/builder/validator.types.mjs +1 -0
  57. package/dist/chain/attach-slot-methods.d.ts +17 -0
  58. package/dist/chain/attach-slot-methods.js +47 -0
  59. package/dist/chain/attach-slot-methods.mjs +42 -0
  60. package/dist/chain/chain-method.types.d.ts +16 -0
  61. package/dist/chain/chain-method.types.js +2 -0
  62. package/dist/chain/chain-method.types.mjs +1 -0
  63. package/dist/chain/chain-state.types.d.ts +47 -0
  64. package/dist/chain/chain-state.types.js +2 -0
  65. package/dist/chain/chain-state.types.mjs +1 -0
  66. package/dist/chain/collect-branch-rules.d.ts +18 -0
  67. package/dist/chain/collect-branch-rules.js +71 -0
  68. package/dist/chain/collect-branch-rules.mjs +65 -0
  69. package/dist/chain/collect-field-rules.d.ts +10 -0
  70. package/dist/chain/collect-field-rules.js +22 -0
  71. package/dist/chain/collect-field-rules.mjs +17 -0
  72. package/dist/chain/create-chain-node.d.ts +26 -0
  73. package/dist/chain/create-chain-node.js +103 -0
  74. package/dist/chain/create-chain-node.mjs +98 -0
  75. package/dist/chain/create-field-slots.d.ts +6 -0
  76. package/dist/chain/create-field-slots.js +37 -0
  77. package/dist/chain/create-field-slots.mjs +33 -0
  78. package/dist/chain/field-chain.types.d.ts +25 -0
  79. package/dist/chain/field-chain.types.js +2 -0
  80. package/dist/chain/field-chain.types.mjs +1 -0
  81. package/dist/chain/field-slots.types.d.ts +18 -0
  82. package/dist/chain/field-slots.types.js +2 -0
  83. package/dist/chain/field-slots.types.mjs +1 -0
  84. package/dist/chain/index.d.ts +13 -0
  85. package/dist/chain/index.js +26 -0
  86. package/dist/chain/index.mjs +9 -0
  87. package/dist/chain/marker-coverage.types.d.ts +56 -0
  88. package/dist/chain/marker-coverage.types.js +2 -0
  89. package/dist/chain/marker-coverage.types.mjs +1 -0
  90. package/dist/chain/plugin-bag.types.d.ts +9 -0
  91. package/dist/chain/plugin-bag.types.js +2 -0
  92. package/dist/chain/plugin-bag.types.mjs +1 -0
  93. package/dist/chain/refine-methods.types.d.ts +33 -0
  94. package/dist/chain/refine-methods.types.js +14 -0
  95. package/dist/chain/refine-methods.types.mjs +11 -0
  96. package/dist/chain/resolve-args.types.d.ts +28 -0
  97. package/dist/chain/resolve-args.types.js +2 -0
  98. package/dist/chain/resolve-args.types.mjs +1 -0
  99. package/dist/chain/slot-value.types.d.ts +14 -0
  100. package/dist/chain/slot-value.types.js +2 -0
  101. package/dist/chain/slot-value.types.mjs +1 -0
  102. package/dist/compile/branch-executor.port.d.ts +6 -0
  103. package/dist/compile/branch-executor.port.js +2 -0
  104. package/dist/compile/branch-executor.port.mjs +1 -0
  105. package/dist/compile/compile-array-node.d.ts +19 -0
  106. package/dist/compile/compile-array-node.js +50 -0
  107. package/dist/compile/compile-array-node.mjs +46 -0
  108. package/dist/compile/compile-composite.d.ts +18 -0
  109. package/dist/compile/compile-composite.js +30 -0
  110. package/dist/compile/compile-composite.mjs +27 -0
  111. package/dist/compile/compile-field.d.ts +31 -0
  112. package/dist/compile/compile-field.js +67 -0
  113. package/dist/compile/compile-field.mjs +62 -0
  114. package/dist/compile/compile-schema.d.ts +8 -0
  115. package/dist/compile/compile-schema.js +126 -0
  116. package/dist/compile/compile-schema.mjs +121 -0
  117. package/dist/compile/declared-child-keys.d.ts +15 -0
  118. package/dist/compile/declared-child-keys.js +70 -0
  119. package/dist/compile/declared-child-keys.mjs +66 -0
  120. package/dist/compile/group-array-fields.d.ts +39 -0
  121. package/dist/compile/group-array-fields.js +66 -0
  122. package/dist/compile/group-array-fields.mjs +63 -0
  123. package/dist/compile/index.d.ts +18 -0
  124. package/dist/compile/index.js +33 -0
  125. package/dist/compile/index.mjs +10 -0
  126. package/dist/compile/resolve-conditional-presence.d.ts +5 -0
  127. package/dist/compile/resolve-conditional-presence.js +42 -0
  128. package/dist/compile/resolve-conditional-presence.mjs +38 -0
  129. package/dist/compile/resolve-presence.d.ts +6 -0
  130. package/dist/compile/resolve-presence.js +63 -0
  131. package/dist/compile/resolve-presence.mjs +59 -0
  132. package/dist/compile/resolve-recursion.d.ts +10 -0
  133. package/dist/compile/resolve-recursion.js +33 -0
  134. package/dist/compile/resolve-recursion.mjs +28 -0
  135. package/dist/compile/split-rules-by-kind.d.ts +16 -0
  136. package/dist/compile/split-rules-by-kind.js +61 -0
  137. package/dist/compile/split-rules-by-kind.mjs +56 -0
  138. package/dist/compile/validation-plan.types.d.ts +123 -0
  139. package/dist/compile/validation-plan.types.js +2 -0
  140. package/dist/compile/validation-plan.types.mjs +1 -0
  141. package/dist/core/type-erasure.d.ts +42 -0
  142. package/dist/core/type-erasure.js +63 -0
  143. package/dist/core/type-erasure.mjs +57 -0
  144. package/dist/field-rule/create-field-rule.d.ts +11 -0
  145. package/dist/field-rule/create-field-rule.js +50 -0
  146. package/dist/field-rule/create-field-rule.mjs +46 -0
  147. package/dist/field-rule/create-plugin-registry.d.ts +2 -0
  148. package/dist/field-rule/create-plugin-registry.js +60 -0
  149. package/dist/field-rule/create-plugin-registry.mjs +57 -0
  150. package/dist/field-rule/field-rule.types.d.ts +38 -0
  151. package/dist/field-rule/field-rule.types.js +2 -0
  152. package/dist/field-rule/field-rule.types.mjs +1 -0
  153. package/dist/field-rule/index.d.ts +5 -0
  154. package/dist/field-rule/index.js +13 -0
  155. package/dist/field-rule/index.mjs +6 -0
  156. package/dist/field-rule/plugin-registry.types.d.ts +17 -0
  157. package/dist/field-rule/plugin-registry.types.js +2 -0
  158. package/dist/field-rule/plugin-registry.types.mjs +1 -0
  159. package/dist/field-rule/use-field.d.ts +6 -0
  160. package/dist/field-rule/use-field.js +6 -0
  161. package/dist/field-rule/use-field.mjs +3 -0
  162. package/dist/field-rule.d.ts +1 -0
  163. package/dist/field-rule.js +2 -0
  164. package/dist/field-rule.mjs +1 -0
  165. package/dist/index.d.ts +14 -72
  166. package/dist/index.js +48 -2
  167. package/dist/index.mjs +18 -2
  168. package/dist/json-schema/apply-keyword-binding.d.ts +20 -0
  169. package/dist/json-schema/apply-keyword-binding.js +7 -0
  170. package/dist/json-schema/apply-keyword-binding.mjs +4 -0
  171. package/dist/json-schema/bind-keyword.d.ts +7 -0
  172. package/dist/json-schema/bind-keyword.js +21 -0
  173. package/dist/json-schema/bind-keyword.mjs +16 -0
  174. package/dist/json-schema/build-from-schema.d.ts +23 -0
  175. package/dist/json-schema/build-from-schema.js +63 -0
  176. package/dist/json-schema/build-from-schema.mjs +56 -0
  177. package/dist/json-schema/collect-definitions.d.ts +51 -0
  178. package/dist/json-schema/collect-definitions.js +111 -0
  179. package/dist/json-schema/collect-definitions.mjs +101 -0
  180. package/dist/json-schema/collect-sub-schema-rules.d.ts +17 -0
  181. package/dist/json-schema/collect-sub-schema-rules.js +112 -0
  182. package/dist/json-schema/collect-sub-schema-rules.mjs +108 -0
  183. package/dist/json-schema/compose-conditional.d.ts +4 -0
  184. package/dist/json-schema/compose-conditional.js +17 -0
  185. package/dist/json-schema/compose-conditional.mjs +14 -0
  186. package/dist/json-schema/compose-keyword.d.ts +7 -0
  187. package/dist/json-schema/compose-keyword.js +127 -0
  188. package/dist/json-schema/compose-keyword.mjs +121 -0
  189. package/dist/json-schema/create-structural-context.d.ts +20 -0
  190. package/dist/json-schema/create-structural-context.js +117 -0
  191. package/dist/json-schema/create-structural-context.mjs +113 -0
  192. package/dist/json-schema/declare-additional-properties.d.ts +19 -0
  193. package/dist/json-schema/declare-additional-properties.js +42 -0
  194. package/dist/json-schema/declare-additional-properties.mjs +37 -0
  195. package/dist/json-schema/declare-object-keywords.d.ts +22 -0
  196. package/dist/json-schema/declare-object-keywords.js +133 -0
  197. package/dist/json-schema/declare-object-keywords.mjs +126 -0
  198. package/dist/json-schema/declare-presence.d.ts +18 -0
  199. package/dist/json-schema/declare-presence.js +52 -0
  200. package/dist/json-schema/declare-presence.mjs +49 -0
  201. package/dist/json-schema/declare-required-properties.d.ts +18 -0
  202. package/dist/json-schema/declare-required-properties.js +58 -0
  203. package/dist/json-schema/declare-required-properties.mjs +55 -0
  204. package/dist/json-schema/declare-scalar-keywords.d.ts +11 -0
  205. package/dist/json-schema/declare-scalar-keywords.js +110 -0
  206. package/dist/json-schema/declare-scalar-keywords.mjs +105 -0
  207. package/dist/json-schema/declare-value-keywords.d.ts +23 -0
  208. package/dist/json-schema/declare-value-keywords.js +120 -0
  209. package/dist/json-schema/declare-value-keywords.mjs +112 -0
  210. package/dist/json-schema/draft07-keyword-value.types.d.ts +61 -0
  211. package/dist/json-schema/draft07-keyword-value.types.js +2 -0
  212. package/dist/json-schema/draft07-keyword-value.types.mjs +1 -0
  213. package/dist/json-schema/draft07.types.d.ts +57 -0
  214. package/dist/json-schema/draft07.types.js +28 -0
  215. package/dist/json-schema/draft07.types.mjs +24 -0
  216. package/dist/json-schema/extensions/json-schema/index.d.ts +4 -0
  217. package/dist/json-schema/extensions/json-schema/index.js +27 -0
  218. package/dist/json-schema/extensions/json-schema/index.mjs +11 -0
  219. package/dist/json-schema/extensions/json-schema/json-schema.d.ts +33 -0
  220. package/dist/json-schema/extensions/json-schema/json-schema.js +108 -0
  221. package/dist/json-schema/extensions/json-schema/json-schema.mjs +104 -0
  222. package/dist/json-schema/extensions/json-schema-full-feature/bundle-coverage.d.ts +38 -0
  223. package/dist/json-schema/extensions/json-schema-full-feature/bundle-coverage.js +96 -0
  224. package/dist/json-schema/extensions/json-schema-full-feature/bundle-coverage.mjs +89 -0
  225. package/dist/json-schema/extensions/json-schema-full-feature/bundled-plugins.d.ts +7 -0
  226. package/dist/json-schema/extensions/json-schema-full-feature/bundled-plugins.js +107 -0
  227. package/dist/json-schema/extensions/json-schema-full-feature/bundled-plugins.mjs +104 -0
  228. package/dist/json-schema/extensions/json-schema-full-feature/index.d.ts +5 -0
  229. package/dist/json-schema/extensions/json-schema-full-feature/index.js +25 -0
  230. package/dist/json-schema/extensions/json-schema-full-feature/index.mjs +14 -0
  231. package/dist/json-schema/extensions/json-schema-full-feature/json-schema-full-feature.d.ts +24 -0
  232. package/dist/json-schema/extensions/json-schema-full-feature/json-schema-full-feature.js +66 -0
  233. package/dist/json-schema/extensions/json-schema-full-feature/json-schema-full-feature.mjs +62 -0
  234. package/dist/json-schema/flatten-array-schema.d.ts +25 -0
  235. package/dist/json-schema/flatten-array-schema.js +141 -0
  236. package/dist/json-schema/flatten-array-schema.mjs +134 -0
  237. package/dist/json-schema/flatten-schema.d.ts +20 -0
  238. package/dist/json-schema/flatten-schema.js +162 -0
  239. package/dist/json-schema/flatten-schema.mjs +157 -0
  240. package/dist/json-schema/follow-json-pointer.d.ts +23 -0
  241. package/dist/json-schema/follow-json-pointer.js +87 -0
  242. package/dist/json-schema/follow-json-pointer.mjs +82 -0
  243. package/dist/json-schema/format-map.d.ts +20 -0
  244. package/dist/json-schema/format-map.js +89 -0
  245. package/dist/json-schema/format-map.mjs +84 -0
  246. package/dist/json-schema/index.d.ts +24 -0
  247. package/dist/json-schema/index.js +65 -0
  248. package/dist/json-schema/index.mjs +22 -0
  249. package/dist/json-schema/json-schema-bag.types.d.ts +124 -0
  250. package/dist/json-schema/json-schema-bag.types.js +2 -0
  251. package/dist/json-schema/json-schema-bag.types.mjs +1 -0
  252. package/dist/json-schema/keyword-binding.types.d.ts +50 -0
  253. package/dist/json-schema/keyword-binding.types.js +2 -0
  254. package/dist/json-schema/keyword-binding.types.mjs +1 -0
  255. package/dist/json-schema/keyword-map-array.d.ts +13 -0
  256. package/dist/json-schema/keyword-map-array.js +37 -0
  257. package/dist/json-schema/keyword-map-array.mjs +34 -0
  258. package/dist/json-schema/keyword-map-core.d.ts +8 -0
  259. package/dist/json-schema/keyword-map-core.js +54 -0
  260. package/dist/json-schema/keyword-map-core.mjs +51 -0
  261. package/dist/json-schema/keyword-map-number.d.ts +13 -0
  262. package/dist/json-schema/keyword-map-number.js +33 -0
  263. package/dist/json-schema/keyword-map-number.mjs +30 -0
  264. package/dist/json-schema/keyword-map-object.d.ts +17 -0
  265. package/dist/json-schema/keyword-map-object.js +51 -0
  266. package/dist/json-schema/keyword-map-object.mjs +48 -0
  267. package/dist/json-schema/keyword-map-string.d.ts +20 -0
  268. package/dist/json-schema/keyword-map-string.js +44 -0
  269. package/dist/json-schema/keyword-map-string.mjs +41 -0
  270. package/dist/json-schema/keyword-map.d.ts +32 -0
  271. package/dist/json-schema/keyword-map.js +93 -0
  272. package/dist/json-schema/keyword-map.mjs +84 -0
  273. package/dist/json-schema/ref-resolution-error.d.ts +4 -0
  274. package/dist/json-schema/ref-resolution-error.js +20 -0
  275. package/dist/json-schema/ref-resolution-error.mjs +16 -0
  276. package/dist/json-schema/ref-scope.d.ts +18 -0
  277. package/dist/json-schema/ref-scope.js +37 -0
  278. package/dist/json-schema/ref-scope.mjs +33 -0
  279. package/dist/json-schema/resolve-ref.d.ts +21 -0
  280. package/dist/json-schema/resolve-ref.js +133 -0
  281. package/dist/json-schema/resolve-ref.mjs +128 -0
  282. package/dist/json-schema/schema-registry.d.ts +30 -0
  283. package/dist/json-schema/schema-registry.js +142 -0
  284. package/dist/json-schema/schema-registry.mjs +139 -0
  285. package/dist/json-schema/schema-to-declarations.d.ts +9 -0
  286. package/dist/json-schema/schema-to-declarations.js +123 -0
  287. package/dist/json-schema/schema-to-declarations.mjs +117 -0
  288. package/dist/json-schema/structural-expansion.types.d.ts +90 -0
  289. package/dist/json-schema/structural-expansion.types.js +22 -0
  290. package/dist/json-schema/structural-expansion.types.mjs +18 -0
  291. package/dist/json-schema/unsupported-keyword-error.d.ts +5 -0
  292. package/dist/json-schema/unsupported-keyword-error.js +24 -0
  293. package/dist/json-schema/unsupported-keyword-error.mjs +20 -0
  294. package/dist/json-schema/uri-reference.d.ts +29 -0
  295. package/dist/json-schema/uri-reference.js +118 -0
  296. package/dist/json-schema/uri-reference.mjs +111 -0
  297. package/dist/path/create-array-reader.d.ts +13 -0
  298. package/dist/path/create-array-reader.js +22 -0
  299. package/dist/path/create-array-reader.mjs +19 -0
  300. package/dist/path/create-value-reader.d.ts +26 -0
  301. package/dist/path/create-value-reader.js +71 -0
  302. package/dist/path/create-value-reader.mjs +65 -0
  303. package/dist/path/create-value-writer.d.ts +5 -0
  304. package/dist/path/create-value-writer.js +80 -0
  305. package/dist/path/create-value-writer.mjs +77 -0
  306. package/dist/path/element-of.types.d.ts +1 -0
  307. package/dist/path/element-of.types.js +2 -0
  308. package/dist/path/element-of.types.mjs +1 -0
  309. package/dist/path/field-path.types.d.ts +13 -0
  310. package/dist/path/field-path.types.js +2 -0
  311. package/dist/path/field-path.types.mjs +1 -0
  312. package/dist/path/format-issue-path.d.ts +15 -0
  313. package/dist/path/format-issue-path.js +34 -0
  314. package/dist/path/format-issue-path.mjs +31 -0
  315. package/dist/path/index.d.ts +18 -0
  316. package/dist/path/index.js +26 -0
  317. package/dist/path/index.mjs +7 -0
  318. package/dist/path/leaf-path.types.d.ts +16 -0
  319. package/dist/path/leaf-path.types.js +2 -0
  320. package/dist/path/leaf-path.types.mjs +1 -0
  321. package/dist/path/match-path-pattern.d.ts +9 -0
  322. package/dist/path/match-path-pattern.js +66 -0
  323. package/dist/path/match-path-pattern.mjs +63 -0
  324. package/dist/path/opaque-object.types.d.ts +5 -0
  325. package/dist/path/opaque-object.types.js +2 -0
  326. package/dist/path/opaque-object.types.mjs +1 -0
  327. package/dist/path/parse-field-path.d.ts +25 -0
  328. package/dist/path/parse-field-path.js +75 -0
  329. package/dist/path/parse-field-path.mjs +69 -0
  330. package/dist/path/path-depth.types.d.ts +4 -0
  331. package/dist/path/path-depth.types.js +2 -0
  332. package/dist/path/path-depth.types.mjs +1 -0
  333. package/dist/path/path-segment.types.d.ts +27 -0
  334. package/dist/path/path-segment.types.js +2 -0
  335. package/dist/path/path-segment.types.mjs +1 -0
  336. package/dist/path/property-value-of.types.d.ts +2 -0
  337. package/dist/path/property-value-of.types.js +2 -0
  338. package/dist/path/property-value-of.types.mjs +1 -0
  339. package/dist/path/reserved-segment.d.ts +46 -0
  340. package/dist/path/reserved-segment.js +88 -0
  341. package/dist/path/reserved-segment.mjs +82 -0
  342. package/dist/path/value-at-path.types.d.ts +25 -0
  343. package/dist/path/value-at-path.types.js +2 -0
  344. package/dist/path/value-at-path.types.mjs +1 -0
  345. package/dist/plugin-kit/compiled-rule.d.ts +112 -0
  346. package/dist/plugin-kit/compiled-rule.js +2 -0
  347. package/dist/plugin-kit/compiled-rule.mjs +1 -0
  348. package/dist/plugin-kit/create-conditional-presence.d.ts +25 -0
  349. package/dist/plugin-kit/create-conditional-presence.js +32 -0
  350. package/dist/plugin-kit/create-conditional-presence.mjs +28 -0
  351. package/dist/plugin-kit/create-rule.d.ts +59 -0
  352. package/dist/plugin-kit/create-rule.js +68 -0
  353. package/dist/plugin-kit/create-rule.mjs +58 -0
  354. package/dist/plugin-kit/external-context.d.ts +2 -0
  355. package/dist/plugin-kit/external-context.js +25 -0
  356. package/dist/plugin-kit/external-context.mjs +22 -0
  357. package/dist/plugin-kit/index.d.ts +11 -0
  358. package/dist/plugin-kit/index.js +39 -0
  359. package/dist/plugin-kit/index.mjs +23 -0
  360. package/dist/plugin-kit/is-json-value-equal.d.ts +10 -0
  361. package/dist/plugin-kit/is-json-value-equal.js +81 -0
  362. package/dist/plugin-kit/is-json-value-equal.mjs +77 -0
  363. package/dist/plugin-kit/marker.types.d.ts +114 -0
  364. package/dist/plugin-kit/marker.types.js +2 -0
  365. package/dist/plugin-kit/marker.types.mjs +1 -0
  366. package/dist/plugin-kit/plugin-definition.d.ts +55 -0
  367. package/dist/plugin-kit/plugin-definition.js +26 -0
  368. package/dist/plugin-kit/plugin-definition.mjs +21 -0
  369. package/dist/plugin-kit/rule-build-context.d.ts +27 -0
  370. package/dist/plugin-kit/rule-build-context.js +8 -0
  371. package/dist/plugin-kit/rule-build-context.mjs +5 -0
  372. package/dist/plugin-kit/runtime-args.types.d.ts +27 -0
  373. package/dist/plugin-kit/runtime-args.types.js +2 -0
  374. package/dist/plugin-kit/runtime-args.types.mjs +1 -0
  375. package/dist/plugin-kit.d.ts +1 -0
  376. package/dist/plugin-kit.js +2 -0
  377. package/dist/plugin-kit.mjs +1 -0
  378. package/dist/plugins/array-contains/array-contains.d.ts +22 -0
  379. package/dist/plugins/array-contains/array-contains.js +82 -0
  380. package/dist/plugins/array-contains/array-contains.mjs +79 -0
  381. package/dist/plugins/array-contains/index.d.ts +2 -0
  382. package/dist/plugins/array-contains/index.js +5 -0
  383. package/dist/plugins/array-contains/index.mjs +1 -0
  384. package/dist/plugins/array-each/array-each.d.ts +14 -0
  385. package/dist/plugins/array-each/array-each.js +51 -0
  386. package/dist/plugins/array-each/array-each.mjs +48 -0
  387. package/dist/plugins/array-each/index.d.ts +1 -0
  388. package/dist/plugins/array-each/index.js +5 -0
  389. package/dist/plugins/array-each/index.mjs +1 -0
  390. package/dist/plugins/array-includes/array-includes.d.ts +9 -0
  391. package/dist/plugins/array-includes/array-includes.js +26 -0
  392. package/dist/plugins/array-includes/array-includes.mjs +23 -0
  393. package/dist/plugins/array-includes/index.d.ts +2 -0
  394. package/dist/plugins/array-includes/index.js +5 -0
  395. package/dist/plugins/array-includes/index.mjs +1 -0
  396. package/dist/plugins/array-max-length/array-max-length.d.ts +10 -0
  397. package/dist/plugins/array-max-length/array-max-length.js +29 -0
  398. package/dist/plugins/array-max-length/array-max-length.mjs +26 -0
  399. package/dist/plugins/array-max-length/index.d.ts +2 -0
  400. package/dist/plugins/array-max-length/index.js +5 -0
  401. package/dist/plugins/array-max-length/index.mjs +1 -0
  402. package/dist/plugins/array-min-length/array-min-length.d.ts +10 -0
  403. package/dist/plugins/array-min-length/array-min-length.js +29 -0
  404. package/dist/plugins/array-min-length/array-min-length.mjs +26 -0
  405. package/dist/plugins/array-min-length/index.d.ts +2 -0
  406. package/dist/plugins/array-min-length/index.js +5 -0
  407. package/dist/plugins/array-min-length/index.mjs +1 -0
  408. package/dist/plugins/array-unique/array-unique.d.ts +7 -0
  409. package/dist/plugins/array-unique/array-unique.js +54 -0
  410. package/dist/plugins/array-unique/array-unique.mjs +51 -0
  411. package/dist/plugins/array-unique/index.d.ts +1 -0
  412. package/dist/plugins/array-unique/index.js +5 -0
  413. package/dist/plugins/array-unique/index.mjs +1 -0
  414. package/dist/plugins/arrayContains.d.ts +1 -37
  415. package/dist/plugins/arrayContains.js +2 -1
  416. package/dist/plugins/arrayContains.mjs +1 -1
  417. package/dist/plugins/arrayEach.d.ts +1 -0
  418. package/dist/plugins/arrayEach.js +2 -0
  419. package/dist/plugins/arrayEach.mjs +1 -0
  420. package/dist/plugins/arrayIncludes.d.ts +1 -42
  421. package/dist/plugins/arrayIncludes.js +2 -1
  422. package/dist/plugins/arrayIncludes.mjs +1 -1
  423. package/dist/plugins/arrayMaxLength.d.ts +1 -43
  424. package/dist/plugins/arrayMaxLength.js +2 -1
  425. package/dist/plugins/arrayMaxLength.mjs +1 -1
  426. package/dist/plugins/arrayMinLength.d.ts +1 -43
  427. package/dist/plugins/arrayMinLength.js +2 -1
  428. package/dist/plugins/arrayMinLength.mjs +1 -1
  429. package/dist/plugins/arrayUnique.d.ts +1 -41
  430. package/dist/plugins/arrayUnique.js +2 -1
  431. package/dist/plugins/arrayUnique.mjs +1 -1
  432. package/dist/plugins/boolean-falsy/boolean-falsy.d.ts +7 -0
  433. package/dist/plugins/boolean-falsy/boolean-falsy.js +24 -0
  434. package/dist/plugins/boolean-falsy/boolean-falsy.mjs +21 -0
  435. package/dist/plugins/boolean-falsy/index.d.ts +1 -0
  436. package/dist/plugins/boolean-falsy/index.js +5 -0
  437. package/dist/plugins/boolean-falsy/index.mjs +1 -0
  438. package/dist/plugins/boolean-truthy/boolean-truthy.d.ts +7 -0
  439. package/dist/plugins/boolean-truthy/boolean-truthy.js +24 -0
  440. package/dist/plugins/boolean-truthy/boolean-truthy.mjs +21 -0
  441. package/dist/plugins/boolean-truthy/index.d.ts +1 -0
  442. package/dist/plugins/boolean-truthy/index.js +5 -0
  443. package/dist/plugins/boolean-truthy/index.mjs +1 -0
  444. package/dist/plugins/booleanFalsy.d.ts +1 -41
  445. package/dist/plugins/booleanFalsy.js +2 -1
  446. package/dist/plugins/booleanFalsy.mjs +1 -1
  447. package/dist/plugins/booleanTruthy.d.ts +1 -38
  448. package/dist/plugins/booleanTruthy.js +2 -1
  449. package/dist/plugins/booleanTruthy.mjs +1 -1
  450. package/dist/plugins/compare-field/compare-field.d.ts +13 -0
  451. package/dist/plugins/compare-field/compare-field.js +57 -0
  452. package/dist/plugins/compare-field/compare-field.mjs +54 -0
  453. package/dist/plugins/compare-field/index.d.ts +2 -0
  454. package/dist/plugins/compare-field/index.js +5 -0
  455. package/dist/plugins/compare-field/index.mjs +1 -0
  456. package/dist/plugins/compareField.d.ts +1 -58
  457. package/dist/plugins/compareField.js +2 -1
  458. package/dist/plugins/compareField.mjs +1 -1
  459. package/dist/plugins/conditional-schema/conditional-schema.d.ts +17 -0
  460. package/dist/plugins/conditional-schema/conditional-schema.js +87 -0
  461. package/dist/plugins/conditional-schema/conditional-schema.mjs +84 -0
  462. package/dist/plugins/conditional-schema/index.d.ts +2 -0
  463. package/dist/plugins/conditional-schema/index.js +5 -0
  464. package/dist/plugins/conditional-schema/index.mjs +1 -0
  465. package/dist/plugins/conditionalSchema.d.ts +1 -0
  466. package/dist/plugins/conditionalSchema.js +2 -0
  467. package/dist/plugins/conditionalSchema.mjs +1 -0
  468. package/dist/plugins/custom/custom.d.ts +12 -0
  469. package/dist/plugins/custom/custom.js +82 -0
  470. package/dist/plugins/custom/custom.mjs +79 -0
  471. package/dist/plugins/custom/index.d.ts +1 -0
  472. package/dist/plugins/custom/index.js +5 -0
  473. package/dist/plugins/custom/index.mjs +1 -0
  474. package/dist/plugins/custom.d.ts +1 -60
  475. package/dist/plugins/custom.js +2 -1
  476. package/dist/plugins/custom.mjs +1 -1
  477. package/dist/plugins/from-context/from-context.d.ts +28 -0
  478. package/dist/plugins/from-context/from-context.js +84 -0
  479. package/dist/plugins/from-context/from-context.mjs +81 -0
  480. package/dist/plugins/from-context/index.d.ts +2 -0
  481. package/dist/plugins/from-context/index.js +5 -0
  482. package/dist/plugins/from-context/index.mjs +1 -0
  483. package/dist/plugins/fromContext.d.ts +1 -0
  484. package/dist/plugins/fromContext.js +2 -0
  485. package/dist/plugins/fromContext.mjs +1 -0
  486. package/dist/plugins/index.d.ts +1 -0
  487. package/dist/plugins/index.generated.d.ts +77 -0
  488. package/dist/plugins/index.generated.js +160 -0
  489. package/dist/plugins/index.generated.mjs +79 -0
  490. package/dist/plugins/index.js +2 -0
  491. package/dist/plugins/index.mjs +1 -0
  492. package/dist/plugins/jsonSchema.d.ts +1 -11
  493. package/dist/plugins/jsonSchema.js +2 -1
  494. package/dist/plugins/jsonSchema.mjs +1 -1
  495. package/dist/plugins/jsonSchemaFullFeature.d.ts +1 -31
  496. package/dist/plugins/jsonSchemaFullFeature.js +2 -1
  497. package/dist/plugins/jsonSchemaFullFeature.mjs +1 -1
  498. package/dist/plugins/literal/index.d.ts +1 -0
  499. package/dist/plugins/literal/index.js +5 -0
  500. package/dist/plugins/literal/index.mjs +1 -0
  501. package/dist/plugins/literal/literal.d.ts +10 -0
  502. package/dist/plugins/literal/literal.js +53 -0
  503. package/dist/plugins/literal/literal.mjs +50 -0
  504. package/dist/plugins/literal.d.ts +1 -40
  505. package/dist/plugins/literal.js +2 -1
  506. package/dist/plugins/literal.mjs +1 -1
  507. package/dist/plugins/manifest.generated.d.ts +8 -0
  508. package/dist/plugins/manifest.generated.js +83 -0
  509. package/dist/plugins/manifest.generated.mjs +80 -0
  510. package/dist/plugins/nullable/index.d.ts +1 -0
  511. package/dist/plugins/nullable/index.js +5 -0
  512. package/dist/plugins/nullable/index.mjs +1 -0
  513. package/dist/plugins/nullable/nullable.d.ts +7 -0
  514. package/dist/plugins/nullable/nullable.js +39 -0
  515. package/dist/plugins/nullable/nullable.mjs +36 -0
  516. package/dist/plugins/nullable.d.ts +1 -34
  517. package/dist/plugins/nullable.js +2 -1
  518. package/dist/plugins/nullable.mjs +1 -1
  519. package/dist/plugins/number-finite/index.d.ts +1 -0
  520. package/dist/plugins/number-finite/index.js +5 -0
  521. package/dist/plugins/number-finite/index.mjs +1 -0
  522. package/dist/plugins/number-finite/number-finite.d.ts +7 -0
  523. package/dist/plugins/number-finite/number-finite.js +21 -0
  524. package/dist/plugins/number-finite/number-finite.mjs +18 -0
  525. package/dist/plugins/number-integer/index.d.ts +1 -0
  526. package/dist/plugins/number-integer/index.js +5 -0
  527. package/dist/plugins/number-integer/index.mjs +1 -0
  528. package/dist/plugins/number-integer/number-integer.d.ts +7 -0
  529. package/dist/plugins/number-integer/number-integer.js +21 -0
  530. package/dist/plugins/number-integer/number-integer.mjs +18 -0
  531. package/dist/plugins/number-max/index.d.ts +2 -0
  532. package/dist/plugins/number-max/index.js +5 -0
  533. package/dist/plugins/number-max/index.mjs +1 -0
  534. package/dist/plugins/number-max/number-max.d.ts +11 -0
  535. package/dist/plugins/number-max/number-max.js +36 -0
  536. package/dist/plugins/number-max/number-max.mjs +33 -0
  537. package/dist/plugins/number-min/index.d.ts +2 -0
  538. package/dist/plugins/number-min/index.js +5 -0
  539. package/dist/plugins/number-min/index.mjs +1 -0
  540. package/dist/plugins/number-min/number-min.d.ts +11 -0
  541. package/dist/plugins/number-min/number-min.js +38 -0
  542. package/dist/plugins/number-min/number-min.mjs +35 -0
  543. package/dist/plugins/number-multiple-of/index.d.ts +2 -0
  544. package/dist/plugins/number-multiple-of/index.js +5 -0
  545. package/dist/plugins/number-multiple-of/index.mjs +1 -0
  546. package/dist/plugins/number-multiple-of/is-multiple-of.d.ts +7 -0
  547. package/dist/plugins/number-multiple-of/is-multiple-of.js +61 -0
  548. package/dist/plugins/number-multiple-of/is-multiple-of.mjs +57 -0
  549. package/dist/plugins/number-multiple-of/number-multiple-of.d.ts +9 -0
  550. package/dist/plugins/number-multiple-of/number-multiple-of.js +27 -0
  551. package/dist/plugins/number-multiple-of/number-multiple-of.mjs +24 -0
  552. package/dist/plugins/number-negative/index.d.ts +1 -0
  553. package/dist/plugins/number-negative/index.js +5 -0
  554. package/dist/plugins/number-negative/index.mjs +1 -0
  555. package/dist/plugins/number-negative/number-negative.d.ts +7 -0
  556. package/dist/plugins/number-negative/number-negative.js +21 -0
  557. package/dist/plugins/number-negative/number-negative.mjs +18 -0
  558. package/dist/plugins/number-positive/index.d.ts +1 -0
  559. package/dist/plugins/number-positive/index.js +5 -0
  560. package/dist/plugins/number-positive/index.mjs +1 -0
  561. package/dist/plugins/number-positive/number-positive.d.ts +7 -0
  562. package/dist/plugins/number-positive/number-positive.js +21 -0
  563. package/dist/plugins/number-positive/number-positive.mjs +18 -0
  564. package/dist/plugins/number-range/index.d.ts +2 -0
  565. package/dist/plugins/number-range/index.js +5 -0
  566. package/dist/plugins/number-range/index.mjs +1 -0
  567. package/dist/plugins/number-range/number-range.d.ts +11 -0
  568. package/dist/plugins/number-range/number-range.js +39 -0
  569. package/dist/plugins/number-range/number-range.mjs +36 -0
  570. package/dist/plugins/numberFinite.d.ts +1 -0
  571. package/dist/plugins/numberFinite.js +2 -0
  572. package/dist/plugins/numberFinite.mjs +1 -0
  573. package/dist/plugins/numberInteger.d.ts +1 -41
  574. package/dist/plugins/numberInteger.js +2 -1
  575. package/dist/plugins/numberInteger.mjs +1 -1
  576. package/dist/plugins/numberMax.d.ts +1 -49
  577. package/dist/plugins/numberMax.js +2 -1
  578. package/dist/plugins/numberMax.mjs +1 -1
  579. package/dist/plugins/numberMin.d.ts +1 -49
  580. package/dist/plugins/numberMin.js +2 -1
  581. package/dist/plugins/numberMin.mjs +1 -1
  582. package/dist/plugins/numberMultipleOf.d.ts +1 -42
  583. package/dist/plugins/numberMultipleOf.js +2 -1
  584. package/dist/plugins/numberMultipleOf.mjs +1 -1
  585. package/dist/plugins/numberNegative.d.ts +1 -41
  586. package/dist/plugins/numberNegative.js +2 -1
  587. package/dist/plugins/numberNegative.mjs +1 -1
  588. package/dist/plugins/numberPositive.d.ts +1 -41
  589. package/dist/plugins/numberPositive.js +2 -1
  590. package/dist/plugins/numberPositive.mjs +1 -1
  591. package/dist/plugins/numberRange.d.ts +1 -0
  592. package/dist/plugins/numberRange.js +2 -0
  593. package/dist/plugins/numberRange.mjs +1 -0
  594. package/dist/plugins/object/index.d.ts +2 -0
  595. package/dist/plugins/object/index.js +5 -0
  596. package/dist/plugins/object/index.mjs +1 -0
  597. package/dist/plugins/object/object.d.ts +9 -0
  598. package/dist/plugins/object/object.js +29 -0
  599. package/dist/plugins/object/object.mjs +26 -0
  600. package/dist/plugins/object-additional-properties/index.d.ts +3 -0
  601. package/dist/plugins/object-additional-properties/index.js +11 -0
  602. package/dist/plugins/object-additional-properties/index.mjs +6 -0
  603. package/dist/plugins/object-additional-properties/object-additional-properties-schema.d.ts +14 -0
  604. package/dist/plugins/object-additional-properties/object-additional-properties-schema.js +58 -0
  605. package/dist/plugins/object-additional-properties/object-additional-properties-schema.mjs +55 -0
  606. package/dist/plugins/object-additional-properties/object-additional-properties.d.ts +9 -0
  607. package/dist/plugins/object-additional-properties/object-additional-properties.js +42 -0
  608. package/dist/plugins/object-additional-properties/object-additional-properties.mjs +39 -0
  609. package/dist/plugins/object-additional-properties/select-additional-keys.d.ts +15 -0
  610. package/dist/plugins/object-additional-properties/select-additional-keys.js +51 -0
  611. package/dist/plugins/object-additional-properties/select-additional-keys.mjs +47 -0
  612. package/dist/plugins/object-dependent-required/dependent-required-violation.d.ts +7 -0
  613. package/dist/plugins/object-dependent-required/dependent-required-violation.js +45 -0
  614. package/dist/plugins/object-dependent-required/dependent-required-violation.mjs +40 -0
  615. package/dist/plugins/object-dependent-required/index.d.ts +3 -0
  616. package/dist/plugins/object-dependent-required/index.js +5 -0
  617. package/dist/plugins/object-dependent-required/index.mjs +1 -0
  618. package/dist/plugins/object-dependent-required/object-dependent-required.d.ts +10 -0
  619. package/dist/plugins/object-dependent-required/object-dependent-required.js +27 -0
  620. package/dist/plugins/object-dependent-required/object-dependent-required.mjs +24 -0
  621. package/dist/plugins/object-dependent-schemas/index.d.ts +2 -0
  622. package/dist/plugins/object-dependent-schemas/index.js +5 -0
  623. package/dist/plugins/object-dependent-schemas/index.mjs +1 -0
  624. package/dist/plugins/object-dependent-schemas/object-dependent-schemas.d.ts +16 -0
  625. package/dist/plugins/object-dependent-schemas/object-dependent-schemas.js +47 -0
  626. package/dist/plugins/object-dependent-schemas/object-dependent-schemas.mjs +44 -0
  627. package/dist/plugins/object-max-properties/index.d.ts +2 -0
  628. package/dist/plugins/object-max-properties/index.js +5 -0
  629. package/dist/plugins/object-max-properties/index.mjs +1 -0
  630. package/dist/plugins/object-max-properties/object-max-properties.d.ts +10 -0
  631. package/dist/plugins/object-max-properties/object-max-properties.js +32 -0
  632. package/dist/plugins/object-max-properties/object-max-properties.mjs +29 -0
  633. package/dist/plugins/object-min-properties/index.d.ts +2 -0
  634. package/dist/plugins/object-min-properties/index.js +5 -0
  635. package/dist/plugins/object-min-properties/index.mjs +1 -0
  636. package/dist/plugins/object-min-properties/object-min-properties.d.ts +10 -0
  637. package/dist/plugins/object-min-properties/object-min-properties.js +32 -0
  638. package/dist/plugins/object-min-properties/object-min-properties.mjs +29 -0
  639. package/dist/plugins/object-pattern-properties/index.d.ts +2 -0
  640. package/dist/plugins/object-pattern-properties/index.js +5 -0
  641. package/dist/plugins/object-pattern-properties/index.mjs +1 -0
  642. package/dist/plugins/object-pattern-properties/object-pattern-properties.d.ts +16 -0
  643. package/dist/plugins/object-pattern-properties/object-pattern-properties.js +57 -0
  644. package/dist/plugins/object-pattern-properties/object-pattern-properties.mjs +54 -0
  645. package/dist/plugins/object-property-names/index.d.ts +2 -0
  646. package/dist/plugins/object-property-names/index.js +5 -0
  647. package/dist/plugins/object-property-names/index.mjs +1 -0
  648. package/dist/plugins/object-property-names/object-property-names.d.ts +16 -0
  649. package/dist/plugins/object-property-names/object-property-names.js +47 -0
  650. package/dist/plugins/object-property-names/object-property-names.mjs +44 -0
  651. package/dist/plugins/object-recursively/index.d.ts +2 -0
  652. package/dist/plugins/object-recursively/index.js +5 -0
  653. package/dist/plugins/object-recursively/index.mjs +1 -0
  654. package/dist/plugins/object-recursively/object-recursively.d.ts +11 -0
  655. package/dist/plugins/object-recursively/object-recursively.js +26 -0
  656. package/dist/plugins/object-recursively/object-recursively.mjs +23 -0
  657. package/dist/plugins/object.d.ts +1 -43
  658. package/dist/plugins/object.js +2 -1
  659. package/dist/plugins/object.mjs +1 -1
  660. package/dist/plugins/objectAdditionalProperties.d.ts +1 -51
  661. package/dist/plugins/objectAdditionalProperties.js +2 -1
  662. package/dist/plugins/objectAdditionalProperties.mjs +1 -1
  663. package/dist/plugins/objectDependentRequired.d.ts +1 -42
  664. package/dist/plugins/objectDependentRequired.js +2 -1
  665. package/dist/plugins/objectDependentRequired.mjs +1 -1
  666. package/dist/plugins/objectDependentSchemas.d.ts +1 -40
  667. package/dist/plugins/objectDependentSchemas.js +2 -1
  668. package/dist/plugins/objectDependentSchemas.mjs +1 -1
  669. package/dist/plugins/objectMaxProperties.d.ts +1 -42
  670. package/dist/plugins/objectMaxProperties.js +2 -1
  671. package/dist/plugins/objectMaxProperties.mjs +1 -1
  672. package/dist/plugins/objectMinProperties.d.ts +1 -42
  673. package/dist/plugins/objectMinProperties.js +2 -1
  674. package/dist/plugins/objectMinProperties.mjs +1 -1
  675. package/dist/plugins/objectPatternProperties.d.ts +1 -46
  676. package/dist/plugins/objectPatternProperties.js +2 -1
  677. package/dist/plugins/objectPatternProperties.mjs +1 -1
  678. package/dist/plugins/objectPropertyNames.d.ts +1 -36
  679. package/dist/plugins/objectPropertyNames.js +2 -1
  680. package/dist/plugins/objectPropertyNames.mjs +1 -1
  681. package/dist/plugins/objectRecursively.d.ts +1 -0
  682. package/dist/plugins/objectRecursively.js +2 -0
  683. package/dist/plugins/objectRecursively.mjs +1 -0
  684. package/dist/plugins/one-of/index.d.ts +1 -0
  685. package/dist/plugins/one-of/index.js +5 -0
  686. package/dist/plugins/one-of/index.mjs +1 -0
  687. package/dist/plugins/one-of/one-of.d.ts +7 -0
  688. package/dist/plugins/one-of/one-of.js +67 -0
  689. package/dist/plugins/one-of/one-of.mjs +64 -0
  690. package/dist/plugins/oneOf.d.ts +1 -44
  691. package/dist/plugins/oneOf.js +2 -1
  692. package/dist/plugins/oneOf.mjs +1 -1
  693. package/dist/plugins/optional/index.d.ts +1 -0
  694. package/dist/plugins/optional/index.js +5 -0
  695. package/dist/plugins/optional/index.mjs +1 -0
  696. package/dist/plugins/optional/optional.d.ts +7 -0
  697. package/dist/plugins/optional/optional.js +42 -0
  698. package/dist/plugins/optional/optional.mjs +39 -0
  699. package/dist/plugins/optional-if/index.d.ts +1 -0
  700. package/dist/plugins/optional-if/index.js +5 -0
  701. package/dist/plugins/optional-if/index.mjs +1 -0
  702. package/dist/plugins/optional-if/optional-if.d.ts +11 -0
  703. package/dist/plugins/optional-if/optional-if.js +31 -0
  704. package/dist/plugins/optional-if/optional-if.mjs +28 -0
  705. package/dist/plugins/optional.d.ts +1 -35
  706. package/dist/plugins/optional.js +2 -1
  707. package/dist/plugins/optional.mjs +1 -1
  708. package/dist/plugins/optionalIf.d.ts +1 -0
  709. package/dist/plugins/optionalIf.js +2 -0
  710. package/dist/plugins/optionalIf.mjs +1 -0
  711. package/dist/plugins/or-fail/index.d.ts +1 -0
  712. package/dist/plugins/or-fail/index.js +5 -0
  713. package/dist/plugins/or-fail/index.mjs +1 -0
  714. package/dist/plugins/or-fail/or-fail.d.ts +7 -0
  715. package/dist/plugins/or-fail/or-fail.js +44 -0
  716. package/dist/plugins/or-fail/or-fail.mjs +41 -0
  717. package/dist/plugins/orFail.d.ts +1 -0
  718. package/dist/plugins/orFail.js +2 -0
  719. package/dist/plugins/orFail.mjs +1 -0
  720. package/dist/plugins/read-only/index.d.ts +1 -0
  721. package/dist/plugins/read-only/index.js +5 -0
  722. package/dist/plugins/read-only/index.mjs +1 -0
  723. package/dist/plugins/read-only/read-only.d.ts +7 -0
  724. package/dist/plugins/read-only/read-only.js +52 -0
  725. package/dist/plugins/read-only/read-only.mjs +49 -0
  726. package/dist/plugins/readOnly.d.ts +1 -0
  727. package/dist/plugins/readOnly.js +2 -0
  728. package/dist/plugins/readOnly.mjs +1 -0
  729. package/dist/plugins/readOnlyWriteOnly.d.ts +1 -48
  730. package/dist/plugins/readOnlyWriteOnly.js +2 -1
  731. package/dist/plugins/readOnlyWriteOnly.mjs +1 -1
  732. package/dist/plugins/required/index.d.ts +1 -0
  733. package/dist/plugins/required/index.js +5 -0
  734. package/dist/plugins/required/index.mjs +1 -0
  735. package/dist/plugins/required/required.d.ts +7 -0
  736. package/dist/plugins/required/required.js +42 -0
  737. package/dist/plugins/required/required.mjs +39 -0
  738. package/dist/plugins/required-if/index.d.ts +1 -0
  739. package/dist/plugins/required-if/index.js +5 -0
  740. package/dist/plugins/required-if/index.mjs +1 -0
  741. package/dist/plugins/required-if/required-if.d.ts +11 -0
  742. package/dist/plugins/required-if/required-if.js +34 -0
  743. package/dist/plugins/required-if/required-if.mjs +31 -0
  744. package/dist/plugins/required.d.ts +1 -45
  745. package/dist/plugins/required.js +2 -1
  746. package/dist/plugins/required.mjs +1 -1
  747. package/dist/plugins/requiredIf.d.ts +1 -66
  748. package/dist/plugins/requiredIf.js +2 -1
  749. package/dist/plugins/requiredIf.mjs +1 -1
  750. package/dist/plugins/skip/index.d.ts +1 -0
  751. package/dist/plugins/skip/index.js +5 -0
  752. package/dist/plugins/skip/index.mjs +1 -0
  753. package/dist/plugins/skip/skip.d.ts +7 -0
  754. package/dist/plugins/skip/skip.js +22 -0
  755. package/dist/plugins/skip/skip.mjs +19 -0
  756. package/dist/plugins/skip.d.ts +1 -57
  757. package/dist/plugins/skip.js +2 -1
  758. package/dist/plugins/skip.mjs +1 -1
  759. package/dist/plugins/stitch/index.d.ts +2 -0
  760. package/dist/plugins/stitch/index.js +5 -0
  761. package/dist/plugins/stitch/index.mjs +1 -0
  762. package/dist/plugins/stitch/stitch.d.ts +30 -0
  763. package/dist/plugins/stitch/stitch.js +72 -0
  764. package/dist/plugins/stitch/stitch.mjs +69 -0
  765. package/dist/plugins/stitch.d.ts +1 -0
  766. package/dist/plugins/stitch.js +2 -0
  767. package/dist/plugins/stitch.mjs +1 -0
  768. package/dist/plugins/string-alphanumeric/index.d.ts +1 -0
  769. package/dist/plugins/string-alphanumeric/index.js +5 -0
  770. package/dist/plugins/string-alphanumeric/index.mjs +1 -0
  771. package/dist/plugins/string-alphanumeric/string-alphanumeric.d.ts +8 -0
  772. package/dist/plugins/string-alphanumeric/string-alphanumeric.js +39 -0
  773. package/dist/plugins/string-alphanumeric/string-alphanumeric.mjs +36 -0
  774. package/dist/plugins/string-base64/index.d.ts +1 -0
  775. package/dist/plugins/string-base64/index.js +5 -0
  776. package/dist/plugins/string-base64/index.mjs +1 -0
  777. package/dist/plugins/string-base64/string-base64.d.ts +12 -0
  778. package/dist/plugins/string-base64/string-base64.js +40 -0
  779. package/dist/plugins/string-base64/string-base64.mjs +37 -0
  780. package/dist/plugins/string-content-encoding/content-encoding-checks.d.ts +4 -0
  781. package/dist/plugins/string-content-encoding/content-encoding-checks.js +67 -0
  782. package/dist/plugins/string-content-encoding/content-encoding-checks.mjs +64 -0
  783. package/dist/plugins/string-content-encoding/index.d.ts +2 -0
  784. package/dist/plugins/string-content-encoding/index.js +5 -0
  785. package/dist/plugins/string-content-encoding/index.mjs +1 -0
  786. package/dist/plugins/string-content-encoding/string-content-encoding.d.ts +10 -0
  787. package/dist/plugins/string-content-encoding/string-content-encoding.js +40 -0
  788. package/dist/plugins/string-content-encoding/string-content-encoding.mjs +37 -0
  789. package/dist/plugins/string-content-media-type/index.d.ts +1 -0
  790. package/dist/plugins/string-content-media-type/index.js +5 -0
  791. package/dist/plugins/string-content-media-type/index.mjs +1 -0
  792. package/dist/plugins/string-content-media-type/media-type-checks.d.ts +3 -0
  793. package/dist/plugins/string-content-media-type/media-type-checks.js +46 -0
  794. package/dist/plugins/string-content-media-type/media-type-checks.mjs +43 -0
  795. package/dist/plugins/string-content-media-type/string-content-media-type.d.ts +8 -0
  796. package/dist/plugins/string-content-media-type/string-content-media-type.js +41 -0
  797. package/dist/plugins/string-content-media-type/string-content-media-type.mjs +38 -0
  798. package/dist/plugins/string-date/calendar-date.d.ts +3 -0
  799. package/dist/plugins/string-date/calendar-date.js +24 -0
  800. package/dist/plugins/string-date/calendar-date.mjs +20 -0
  801. package/dist/plugins/string-date/index.d.ts +1 -0
  802. package/dist/plugins/string-date/index.js +5 -0
  803. package/dist/plugins/string-date/index.mjs +1 -0
  804. package/dist/plugins/string-date/string-date.d.ts +7 -0
  805. package/dist/plugins/string-date/string-date.js +42 -0
  806. package/dist/plugins/string-date/string-date.mjs +39 -0
  807. package/dist/plugins/string-datetime/calendar-date.d.ts +2 -0
  808. package/dist/plugins/string-datetime/calendar-date.js +24 -0
  809. package/dist/plugins/string-datetime/calendar-date.mjs +20 -0
  810. package/dist/plugins/string-datetime/index.d.ts +1 -0
  811. package/dist/plugins/string-datetime/index.js +5 -0
  812. package/dist/plugins/string-datetime/index.mjs +1 -0
  813. package/dist/plugins/string-datetime/string-datetime.d.ts +12 -0
  814. package/dist/plugins/string-datetime/string-datetime.js +67 -0
  815. package/dist/plugins/string-datetime/string-datetime.mjs +64 -0
  816. package/dist/plugins/string-duration/index.d.ts +1 -0
  817. package/dist/plugins/string-duration/index.js +5 -0
  818. package/dist/plugins/string-duration/index.mjs +1 -0
  819. package/dist/plugins/string-duration/string-duration.d.ts +7 -0
  820. package/dist/plugins/string-duration/string-duration.js +31 -0
  821. package/dist/plugins/string-duration/string-duration.mjs +28 -0
  822. package/dist/plugins/string-email/index.d.ts +1 -0
  823. package/dist/plugins/string-email/index.js +5 -0
  824. package/dist/plugins/string-email/index.mjs +1 -0
  825. package/dist/plugins/string-email/string-email.d.ts +14 -0
  826. package/dist/plugins/string-email/string-email.js +58 -0
  827. package/dist/plugins/string-email/string-email.mjs +55 -0
  828. package/dist/plugins/string-ends-with/index.d.ts +1 -0
  829. package/dist/plugins/string-ends-with/index.js +5 -0
  830. package/dist/plugins/string-ends-with/index.mjs +1 -0
  831. package/dist/plugins/string-ends-with/string-ends-with.d.ts +8 -0
  832. package/dist/plugins/string-ends-with/string-ends-with.js +30 -0
  833. package/dist/plugins/string-ends-with/string-ends-with.mjs +27 -0
  834. package/dist/plugins/string-exact-length/index.d.ts +1 -0
  835. package/dist/plugins/string-exact-length/index.js +5 -0
  836. package/dist/plugins/string-exact-length/index.mjs +1 -0
  837. package/dist/plugins/string-exact-length/string-exact-length.d.ts +11 -0
  838. package/dist/plugins/string-exact-length/string-exact-length.js +34 -0
  839. package/dist/plugins/string-exact-length/string-exact-length.mjs +31 -0
  840. package/dist/plugins/string-hostname/index.d.ts +1 -0
  841. package/dist/plugins/string-hostname/index.js +5 -0
  842. package/dist/plugins/string-hostname/index.mjs +1 -0
  843. package/dist/plugins/string-hostname/string-hostname.d.ts +7 -0
  844. package/dist/plugins/string-hostname/string-hostname.js +30 -0
  845. package/dist/plugins/string-hostname/string-hostname.mjs +27 -0
  846. package/dist/plugins/string-idn-email/idn-email.d.ts +1 -0
  847. package/dist/plugins/string-idn-email/idn-email.js +85 -0
  848. package/dist/plugins/string-idn-email/idn-email.mjs +82 -0
  849. package/dist/plugins/string-idn-email/index.d.ts +1 -0
  850. package/dist/plugins/string-idn-email/index.js +5 -0
  851. package/dist/plugins/string-idn-email/index.mjs +1 -0
  852. package/dist/plugins/string-idn-email/string-idn-email.d.ts +7 -0
  853. package/dist/plugins/string-idn-email/string-idn-email.js +29 -0
  854. package/dist/plugins/string-idn-email/string-idn-email.mjs +26 -0
  855. package/dist/plugins/string-idn-hostname/idn-hostname.d.ts +1 -0
  856. package/dist/plugins/string-idn-hostname/idn-hostname.js +72 -0
  857. package/dist/plugins/string-idn-hostname/idn-hostname.mjs +69 -0
  858. package/dist/plugins/string-idn-hostname/index.d.ts +1 -0
  859. package/dist/plugins/string-idn-hostname/index.js +5 -0
  860. package/dist/plugins/string-idn-hostname/index.mjs +1 -0
  861. package/dist/plugins/string-idn-hostname/string-idn-hostname.d.ts +7 -0
  862. package/dist/plugins/string-idn-hostname/string-idn-hostname.js +31 -0
  863. package/dist/plugins/string-idn-hostname/string-idn-hostname.mjs +28 -0
  864. package/dist/plugins/string-ipv4/index.d.ts +1 -0
  865. package/dist/plugins/string-ipv4/index.js +5 -0
  866. package/dist/plugins/string-ipv4/index.mjs +1 -0
  867. package/dist/plugins/string-ipv4/string-ipv4.d.ts +7 -0
  868. package/dist/plugins/string-ipv4/string-ipv4.js +32 -0
  869. package/dist/plugins/string-ipv4/string-ipv4.mjs +29 -0
  870. package/dist/plugins/string-ipv6/index.d.ts +1 -0
  871. package/dist/plugins/string-ipv6/index.js +5 -0
  872. package/dist/plugins/string-ipv6/index.mjs +1 -0
  873. package/dist/plugins/string-ipv6/ipv6-address.d.ts +2 -0
  874. package/dist/plugins/string-ipv6/ipv6-address.js +70 -0
  875. package/dist/plugins/string-ipv6/ipv6-address.mjs +67 -0
  876. package/dist/plugins/string-ipv6/string-ipv6.d.ts +7 -0
  877. package/dist/plugins/string-ipv6/string-ipv6.js +27 -0
  878. package/dist/plugins/string-ipv6/string-ipv6.mjs +24 -0
  879. package/dist/plugins/string-iri/control-character.d.ts +1 -0
  880. package/dist/plugins/string-iri/control-character.js +21 -0
  881. package/dist/plugins/string-iri/control-character.mjs +18 -0
  882. package/dist/plugins/string-iri/index.d.ts +1 -0
  883. package/dist/plugins/string-iri/index.js +5 -0
  884. package/dist/plugins/string-iri/index.mjs +1 -0
  885. package/dist/plugins/string-iri/string-iri.d.ts +7 -0
  886. package/dist/plugins/string-iri/string-iri.js +49 -0
  887. package/dist/plugins/string-iri/string-iri.mjs +46 -0
  888. package/dist/plugins/string-iri-reference/control-character.d.ts +1 -0
  889. package/dist/plugins/string-iri-reference/control-character.js +21 -0
  890. package/dist/plugins/string-iri-reference/control-character.mjs +18 -0
  891. package/dist/plugins/string-iri-reference/index.d.ts +1 -0
  892. package/dist/plugins/string-iri-reference/index.js +5 -0
  893. package/dist/plugins/string-iri-reference/index.mjs +1 -0
  894. package/dist/plugins/string-iri-reference/iri-reference.d.ts +1 -0
  895. package/dist/plugins/string-iri-reference/iri-reference.js +39 -0
  896. package/dist/plugins/string-iri-reference/iri-reference.mjs +36 -0
  897. package/dist/plugins/string-iri-reference/string-iri-reference.d.ts +7 -0
  898. package/dist/plugins/string-iri-reference/string-iri-reference.js +26 -0
  899. package/dist/plugins/string-iri-reference/string-iri-reference.mjs +23 -0
  900. package/dist/plugins/string-json-pointer/index.d.ts +1 -0
  901. package/dist/plugins/string-json-pointer/index.js +5 -0
  902. package/dist/plugins/string-json-pointer/index.mjs +1 -0
  903. package/dist/plugins/string-json-pointer/string-json-pointer.d.ts +7 -0
  904. package/dist/plugins/string-json-pointer/string-json-pointer.js +35 -0
  905. package/dist/plugins/string-json-pointer/string-json-pointer.mjs +32 -0
  906. package/dist/plugins/string-max/index.d.ts +1 -0
  907. package/dist/plugins/string-max/index.js +5 -0
  908. package/dist/plugins/string-max/index.mjs +1 -0
  909. package/dist/plugins/string-max/string-max.d.ts +11 -0
  910. package/dist/plugins/string-max/string-max.js +34 -0
  911. package/dist/plugins/string-max/string-max.mjs +31 -0
  912. package/dist/plugins/string-min/index.d.ts +1 -0
  913. package/dist/plugins/string-min/index.js +5 -0
  914. package/dist/plugins/string-min/index.mjs +1 -0
  915. package/dist/plugins/string-min/string-min.d.ts +11 -0
  916. package/dist/plugins/string-min/string-min.js +37 -0
  917. package/dist/plugins/string-min/string-min.mjs +34 -0
  918. package/dist/plugins/string-pattern/index.d.ts +1 -0
  919. package/dist/plugins/string-pattern/index.js +5 -0
  920. package/dist/plugins/string-pattern/index.mjs +1 -0
  921. package/dist/plugins/string-pattern/string-pattern.d.ts +8 -0
  922. package/dist/plugins/string-pattern/string-pattern.js +49 -0
  923. package/dist/plugins/string-pattern/string-pattern.mjs +46 -0
  924. package/dist/plugins/string-regex/index.d.ts +1 -0
  925. package/dist/plugins/string-regex/index.js +5 -0
  926. package/dist/plugins/string-regex/index.mjs +1 -0
  927. package/dist/plugins/string-regex/is-ecma262-regex.d.ts +2 -0
  928. package/dist/plugins/string-regex/is-ecma262-regex.js +25 -0
  929. package/dist/plugins/string-regex/is-ecma262-regex.mjs +22 -0
  930. package/dist/plugins/string-regex/string-regex.d.ts +7 -0
  931. package/dist/plugins/string-regex/string-regex.js +28 -0
  932. package/dist/plugins/string-regex/string-regex.mjs +25 -0
  933. package/dist/plugins/string-relative-json-pointer/index.d.ts +1 -0
  934. package/dist/plugins/string-relative-json-pointer/index.js +5 -0
  935. package/dist/plugins/string-relative-json-pointer/index.mjs +1 -0
  936. package/dist/plugins/string-relative-json-pointer/string-relative-json-pointer.d.ts +7 -0
  937. package/dist/plugins/string-relative-json-pointer/string-relative-json-pointer.js +42 -0
  938. package/dist/plugins/string-relative-json-pointer/string-relative-json-pointer.mjs +39 -0
  939. package/dist/plugins/string-starts-with/index.d.ts +1 -0
  940. package/dist/plugins/string-starts-with/index.js +5 -0
  941. package/dist/plugins/string-starts-with/index.mjs +1 -0
  942. package/dist/plugins/string-starts-with/string-starts-with.d.ts +8 -0
  943. package/dist/plugins/string-starts-with/string-starts-with.js +30 -0
  944. package/dist/plugins/string-starts-with/string-starts-with.mjs +27 -0
  945. package/dist/plugins/string-time/index.d.ts +1 -0
  946. package/dist/plugins/string-time/index.js +5 -0
  947. package/dist/plugins/string-time/index.mjs +1 -0
  948. package/dist/plugins/string-time/string-time.d.ts +12 -0
  949. package/dist/plugins/string-time/string-time.js +37 -0
  950. package/dist/plugins/string-time/string-time.mjs +34 -0
  951. package/dist/plugins/string-uri-reference/index.d.ts +1 -0
  952. package/dist/plugins/string-uri-reference/index.js +5 -0
  953. package/dist/plugins/string-uri-reference/index.mjs +1 -0
  954. package/dist/plugins/string-uri-reference/string-uri-reference.d.ts +7 -0
  955. package/dist/plugins/string-uri-reference/string-uri-reference.js +28 -0
  956. package/dist/plugins/string-uri-reference/string-uri-reference.mjs +25 -0
  957. package/dist/plugins/string-uri-reference/uri-reference.d.ts +1 -0
  958. package/dist/plugins/string-uri-reference/uri-reference.js +71 -0
  959. package/dist/plugins/string-uri-reference/uri-reference.mjs +68 -0
  960. package/dist/plugins/string-uri-template/index.d.ts +1 -0
  961. package/dist/plugins/string-uri-template/index.js +5 -0
  962. package/dist/plugins/string-uri-template/index.mjs +1 -0
  963. package/dist/plugins/string-uri-template/string-uri-template.d.ts +7 -0
  964. package/dist/plugins/string-uri-template/string-uri-template.js +26 -0
  965. package/dist/plugins/string-uri-template/string-uri-template.mjs +23 -0
  966. package/dist/plugins/string-uri-template/uri-template.d.ts +1 -0
  967. package/dist/plugins/string-uri-template/uri-template.js +59 -0
  968. package/dist/plugins/string-uri-template/uri-template.mjs +56 -0
  969. package/dist/plugins/string-url/index.d.ts +1 -0
  970. package/dist/plugins/string-url/index.js +5 -0
  971. package/dist/plugins/string-url/index.mjs +1 -0
  972. package/dist/plugins/string-url/string-url.d.ts +14 -0
  973. package/dist/plugins/string-url/string-url.js +55 -0
  974. package/dist/plugins/string-url/string-url.mjs +52 -0
  975. package/dist/plugins/stringAlphanumeric.d.ts +1 -0
  976. package/dist/plugins/stringAlphanumeric.js +2 -0
  977. package/dist/plugins/stringAlphanumeric.mjs +1 -0
  978. package/dist/plugins/stringBase64.d.ts +1 -119
  979. package/dist/plugins/stringBase64.js +2 -1
  980. package/dist/plugins/stringBase64.mjs +1 -1
  981. package/dist/plugins/stringContentEncoding.d.ts +1 -43
  982. package/dist/plugins/stringContentEncoding.js +2 -1
  983. package/dist/plugins/stringContentEncoding.mjs +1 -1
  984. package/dist/plugins/stringContentMediaType.d.ts +1 -47
  985. package/dist/plugins/stringContentMediaType.js +2 -1
  986. package/dist/plugins/stringContentMediaType.mjs +1 -1
  987. package/dist/plugins/stringDate.d.ts +1 -48
  988. package/dist/plugins/stringDate.js +2 -1
  989. package/dist/plugins/stringDate.mjs +1 -1
  990. package/dist/plugins/stringDatetime.d.ts +1 -108
  991. package/dist/plugins/stringDatetime.js +2 -1
  992. package/dist/plugins/stringDatetime.mjs +1 -1
  993. package/dist/plugins/stringDuration.d.ts +1 -41
  994. package/dist/plugins/stringDuration.js +2 -1
  995. package/dist/plugins/stringDuration.mjs +1 -1
  996. package/dist/plugins/stringEmail.d.ts +1 -81
  997. package/dist/plugins/stringEmail.js +2 -1
  998. package/dist/plugins/stringEmail.mjs +1 -1
  999. package/dist/plugins/stringEndsWith.d.ts +1 -0
  1000. package/dist/plugins/stringEndsWith.js +2 -0
  1001. package/dist/plugins/stringEndsWith.mjs +1 -0
  1002. package/dist/plugins/stringExactLength.d.ts +1 -0
  1003. package/dist/plugins/stringExactLength.js +2 -0
  1004. package/dist/plugins/stringExactLength.mjs +1 -0
  1005. package/dist/plugins/stringHostname.d.ts +1 -104
  1006. package/dist/plugins/stringHostname.js +2 -1
  1007. package/dist/plugins/stringHostname.mjs +1 -1
  1008. package/dist/plugins/stringIdnEmail.d.ts +1 -0
  1009. package/dist/plugins/stringIdnEmail.js +2 -0
  1010. package/dist/plugins/stringIdnEmail.mjs +1 -0
  1011. package/dist/plugins/stringIdnHostname.d.ts +1 -0
  1012. package/dist/plugins/stringIdnHostname.js +2 -0
  1013. package/dist/plugins/stringIdnHostname.mjs +1 -0
  1014. package/dist/plugins/stringIpv4.d.ts +1 -85
  1015. package/dist/plugins/stringIpv4.js +2 -1
  1016. package/dist/plugins/stringIpv4.mjs +1 -1
  1017. package/dist/plugins/stringIpv6.d.ts +1 -104
  1018. package/dist/plugins/stringIpv6.js +2 -1
  1019. package/dist/plugins/stringIpv6.mjs +1 -1
  1020. package/dist/plugins/stringIri.d.ts +1 -117
  1021. package/dist/plugins/stringIri.js +2 -1
  1022. package/dist/plugins/stringIri.mjs +1 -1
  1023. package/dist/plugins/stringIriReference.d.ts +1 -43
  1024. package/dist/plugins/stringIriReference.js +2 -1
  1025. package/dist/plugins/stringIriReference.mjs +1 -1
  1026. package/dist/plugins/stringJsonPointer.d.ts +1 -107
  1027. package/dist/plugins/stringJsonPointer.js +2 -1
  1028. package/dist/plugins/stringJsonPointer.mjs +1 -1
  1029. package/dist/plugins/stringMax.d.ts +1 -43
  1030. package/dist/plugins/stringMax.js +2 -1
  1031. package/dist/plugins/stringMax.mjs +1 -1
  1032. package/dist/plugins/stringMin.d.ts +1 -43
  1033. package/dist/plugins/stringMin.js +2 -1
  1034. package/dist/plugins/stringMin.mjs +1 -1
  1035. package/dist/plugins/stringPattern.d.ts +1 -40
  1036. package/dist/plugins/stringPattern.js +2 -1
  1037. package/dist/plugins/stringPattern.mjs +1 -1
  1038. package/dist/plugins/stringRegex.d.ts +1 -0
  1039. package/dist/plugins/stringRegex.js +2 -0
  1040. package/dist/plugins/stringRegex.mjs +1 -0
  1041. package/dist/plugins/stringRelativeJsonPointer.d.ts +1 -42
  1042. package/dist/plugins/stringRelativeJsonPointer.js +2 -1
  1043. package/dist/plugins/stringRelativeJsonPointer.mjs +1 -1
  1044. package/dist/plugins/stringStartsWith.d.ts +1 -0
  1045. package/dist/plugins/stringStartsWith.js +2 -0
  1046. package/dist/plugins/stringStartsWith.mjs +1 -0
  1047. package/dist/plugins/stringTime.d.ts +1 -39
  1048. package/dist/plugins/stringTime.js +2 -1
  1049. package/dist/plugins/stringTime.mjs +1 -1
  1050. package/dist/plugins/stringUriReference.d.ts +1 -0
  1051. package/dist/plugins/stringUriReference.js +2 -0
  1052. package/dist/plugins/stringUriReference.mjs +1 -0
  1053. package/dist/plugins/stringUriTemplate.d.ts +1 -43
  1054. package/dist/plugins/stringUriTemplate.js +2 -1
  1055. package/dist/plugins/stringUriTemplate.mjs +1 -1
  1056. package/dist/plugins/stringUrl.d.ts +1 -97
  1057. package/dist/plugins/stringUrl.js +2 -1
  1058. package/dist/plugins/stringUrl.mjs +1 -1
  1059. package/dist/plugins/transform/index.d.ts +1 -0
  1060. package/dist/plugins/transform/index.js +5 -0
  1061. package/dist/plugins/transform/index.mjs +1 -0
  1062. package/dist/plugins/transform/transform.d.ts +7 -0
  1063. package/dist/plugins/transform/transform.js +35 -0
  1064. package/dist/plugins/transform/transform.mjs +32 -0
  1065. package/dist/plugins/transform.d.ts +1 -35
  1066. package/dist/plugins/transform.js +2 -1
  1067. package/dist/plugins/transform.mjs +1 -1
  1068. package/dist/plugins/tuple-builder/index.d.ts +2 -0
  1069. package/dist/plugins/tuple-builder/index.js +5 -0
  1070. package/dist/plugins/tuple-builder/index.mjs +1 -0
  1071. package/dist/plugins/tuple-builder/tuple-builder.d.ts +21 -0
  1072. package/dist/plugins/tuple-builder/tuple-builder.js +128 -0
  1073. package/dist/plugins/tuple-builder/tuple-builder.mjs +125 -0
  1074. package/dist/plugins/tupleBuilder.d.ts +1 -66
  1075. package/dist/plugins/tupleBuilder.js +2 -1
  1076. package/dist/plugins/tupleBuilder.mjs +1 -1
  1077. package/dist/plugins/union-guard/index.d.ts +1 -0
  1078. package/dist/plugins/union-guard/index.js +5 -0
  1079. package/dist/plugins/union-guard/index.mjs +1 -0
  1080. package/dist/plugins/union-guard/union-guard.d.ts +14 -0
  1081. package/dist/plugins/union-guard/union-guard.js +56 -0
  1082. package/dist/plugins/union-guard/union-guard.mjs +53 -0
  1083. package/dist/plugins/unionGuard.d.ts +1 -0
  1084. package/dist/plugins/unionGuard.js +2 -0
  1085. package/dist/plugins/unionGuard.mjs +1 -0
  1086. package/dist/plugins/uuid/index.d.ts +1 -0
  1087. package/dist/plugins/uuid/index.js +5 -0
  1088. package/dist/plugins/uuid/index.mjs +1 -0
  1089. package/dist/plugins/uuid/uuid.d.ts +10 -0
  1090. package/dist/plugins/uuid/uuid.js +56 -0
  1091. package/dist/plugins/uuid/uuid.mjs +53 -0
  1092. package/dist/plugins/uuid.d.ts +1 -95
  1093. package/dist/plugins/uuid.js +2 -1
  1094. package/dist/plugins/uuid.mjs +1 -1
  1095. package/dist/plugins/validate-if/index.d.ts +1 -0
  1096. package/dist/plugins/validate-if/index.js +5 -0
  1097. package/dist/plugins/validate-if/index.mjs +1 -0
  1098. package/dist/plugins/validate-if/validate-if.d.ts +7 -0
  1099. package/dist/plugins/validate-if/validate-if.js +22 -0
  1100. package/dist/plugins/validate-if/validate-if.mjs +19 -0
  1101. package/dist/plugins/validateIf.d.ts +1 -57
  1102. package/dist/plugins/validateIf.js +2 -1
  1103. package/dist/plugins/validateIf.mjs +1 -1
  1104. package/dist/plugins/write-only/index.d.ts +1 -0
  1105. package/dist/plugins/write-only/index.js +5 -0
  1106. package/dist/plugins/write-only/index.mjs +1 -0
  1107. package/dist/plugins/write-only/write-only.d.ts +7 -0
  1108. package/dist/plugins/write-only/write-only.js +48 -0
  1109. package/dist/plugins/write-only/write-only.mjs +45 -0
  1110. package/dist/plugins/writeOnly.d.ts +1 -0
  1111. package/dist/plugins/writeOnly.js +2 -0
  1112. package/dist/plugins/writeOnly.mjs +1 -0
  1113. package/dist/result/index.d.ts +18 -0
  1114. package/dist/result/index.js +44 -0
  1115. package/dist/result/index.mjs +36 -0
  1116. package/dist/result.d.ts +1 -0
  1117. package/dist/result.js +2 -0
  1118. package/dist/result.mjs +1 -0
  1119. package/dist/runtime/create-field-validator.d.ts +12 -0
  1120. package/dist/runtime/create-field-validator.js +74 -0
  1121. package/dist/runtime/create-field-validator.mjs +71 -0
  1122. package/dist/runtime/create-issue.d.ts +24 -0
  1123. package/dist/runtime/create-issue.js +34 -0
  1124. package/dist/runtime/create-issue.mjs +30 -0
  1125. package/dist/runtime/create-validator.d.ts +19 -0
  1126. package/dist/runtime/create-validator.js +70 -0
  1127. package/dist/runtime/create-validator.mjs +65 -0
  1128. package/dist/runtime/decide-presence.d.ts +5 -0
  1129. package/dist/runtime/decide-presence.js +48 -0
  1130. package/dist/runtime/decide-presence.mjs +45 -0
  1131. package/dist/runtime/index-stack.d.ts +28 -0
  1132. package/dist/runtime/index-stack.js +68 -0
  1133. package/dist/runtime/index-stack.mjs +63 -0
  1134. package/dist/runtime/index.d.ts +19 -0
  1135. package/dist/runtime/index.js +48 -0
  1136. package/dist/runtime/index.mjs +16 -0
  1137. package/dist/runtime/issue-sink.d.ts +39 -0
  1138. package/dist/runtime/issue-sink.js +61 -0
  1139. package/dist/runtime/issue-sink.mjs +56 -0
  1140. package/dist/runtime/output-writer.d.ts +38 -0
  1141. package/dist/runtime/output-writer.js +59 -0
  1142. package/dist/runtime/output-writer.mjs +52 -0
  1143. package/dist/runtime/run-array-node.d.ts +9 -0
  1144. package/dist/runtime/run-array-node.js +98 -0
  1145. package/dist/runtime/run-array-node.mjs +95 -0
  1146. package/dist/runtime/run-branch.d.ts +14 -0
  1147. package/dist/runtime/run-branch.js +67 -0
  1148. package/dist/runtime/run-branch.mjs +63 -0
  1149. package/dist/runtime/run-field.d.ts +27 -0
  1150. package/dist/runtime/run-field.js +88 -0
  1151. package/dist/runtime/run-field.mjs +84 -0
  1152. package/dist/runtime/run-plan.d.ts +28 -0
  1153. package/dist/runtime/run-plan.js +50 -0
  1154. package/dist/runtime/run-plan.mjs +46 -0
  1155. package/dist/runtime/run-recursion.d.ts +17 -0
  1156. package/dist/runtime/run-recursion.js +119 -0
  1157. package/dist/runtime/run-recursion.mjs +115 -0
  1158. package/dist/standard-schema/index.d.ts +6 -0
  1159. package/dist/standard-schema/index.js +7 -0
  1160. package/dist/standard-schema/index.mjs +2 -0
  1161. package/dist/standard-schema/split-issue-path.d.ts +9 -0
  1162. package/dist/standard-schema/split-issue-path.js +66 -0
  1163. package/dist/standard-schema/split-issue-path.mjs +63 -0
  1164. package/dist/standard-schema/standard-schema.types.d.ts +46 -0
  1165. package/dist/standard-schema/standard-schema.types.js +13 -0
  1166. package/dist/standard-schema/standard-schema.types.mjs +12 -0
  1167. package/dist/standard-schema/to-standard-schema.d.ts +41 -0
  1168. package/dist/standard-schema/to-standard-schema.js +60 -0
  1169. package/dist/standard-schema/to-standard-schema.mjs +57 -0
  1170. package/dist/standard-schema.d.ts +1 -0
  1171. package/dist/standard-schema.js +2 -0
  1172. package/dist/standard-schema.mjs +1 -0
  1173. package/dist/subpath-aliases/read-only-write-only.d.ts +2 -0
  1174. package/dist/subpath-aliases/read-only-write-only.js +16 -0
  1175. package/dist/subpath-aliases/read-only-write-only.mjs +11 -0
  1176. package/dist/types/global-config.d.ts +31 -0
  1177. package/dist/types/global-config.js +36 -0
  1178. package/dist/types/global-config.mjs +32 -0
  1179. package/dist/types/index.d.ts +75 -69
  1180. package/dist/types/index.js +46 -0
  1181. package/dist/types/index.mjs +36 -0
  1182. package/dist/types/validation-result.types.d.ts +22 -0
  1183. package/dist/types/validation-result.types.js +2 -0
  1184. package/dist/types/validation-result.types.mjs +1 -0
  1185. package/package.json +523 -353
  1186. package/dist/constants.d.ts +0 -27
  1187. package/dist/core/async.experimental/async-context.d.ts +0 -60
  1188. package/dist/core/builder/array-batch-optimizer.d.ts +0 -66
  1189. package/dist/core/builder/context/field-context.d.ts +0 -31
  1190. package/dist/core/builder/context/field-type-detector.d.ts +0 -19
  1191. package/dist/core/builder/core/builder.d.ts +0 -10
  1192. package/dist/core/builder/core/field-builder.d.ts +0 -13
  1193. package/dist/core/builder/core/index.d.ts +0 -17
  1194. package/dist/core/builder/index.d.ts +0 -24
  1195. package/dist/core/builder/nested-array-processor.d.ts +0 -52
  1196. package/dist/core/builder/plugins/composable-conditional-plugin.d.ts +0 -32
  1197. package/dist/core/builder/plugins/composable-directly-plugin.d.ts +0 -32
  1198. package/dist/core/builder/plugins/composable-plugin.d.ts +0 -242
  1199. package/dist/core/builder/plugins/plugin-creator.d.ts +0 -38
  1200. package/dist/core/builder/plugins/plugin-interfaces.d.ts +0 -343
  1201. package/dist/core/builder/plugins/plugin-types.d.ts +0 -441
  1202. package/dist/core/builder/raw-validator.d.ts +0 -22
  1203. package/dist/core/builder/types/field-options.d.ts +0 -46
  1204. package/dist/core/builder/types/types.d.ts +0 -319
  1205. package/dist/core/builder/ultra-fast-validator.d.ts +0 -30
  1206. package/dist/core/builder/validator-factory.d.ts +0 -29
  1207. package/dist/core/global-config.d.ts +0 -27
  1208. package/dist/core/index.d.ts +0 -36
  1209. package/dist/core/optimization/array-batch-validator.d.ts +0 -68
  1210. package/dist/core/optimization/core/field-utils.d.ts +0 -103
  1211. package/dist/core/optimization/core/strategy-factory.d.ts +0 -84
  1212. package/dist/core/optimization/core/validation-engine.d.ts +0 -107
  1213. package/dist/core/optimization/execution-strategy-selector.d.ts +0 -23
  1214. package/dist/core/optimization/unified-validator.d.ts +0 -45
  1215. package/dist/core/plugin/__tests__/test-utils.d.ts +0 -1
  1216. package/dist/core/plugin/arrayContains.d.ts +0 -37
  1217. package/dist/core/plugin/arrayIncludes.d.ts +0 -42
  1218. package/dist/core/plugin/arrayMaxLength.d.ts +0 -43
  1219. package/dist/core/plugin/arrayMinLength.d.ts +0 -43
  1220. package/dist/core/plugin/arrayUnique.d.ts +0 -41
  1221. package/dist/core/plugin/booleanFalsy.d.ts +0 -41
  1222. package/dist/core/plugin/booleanTruthy.d.ts +0 -38
  1223. package/dist/core/plugin/compareField.d.ts +0 -58
  1224. package/dist/core/plugin/conditionalSchema.d.ts +0 -24
  1225. package/dist/core/plugin/custom.d.ts +0 -60
  1226. package/dist/core/plugin/fromContext.d.ts +0 -150
  1227. package/dist/core/plugin/index.d.ts +0 -71
  1228. package/dist/core/plugin/jsonSchema/dsl-converter.d.ts +0 -22
  1229. package/dist/core/plugin/jsonSchema/error-generation.d.ts +0 -14
  1230. package/dist/core/plugin/jsonSchema/format-validators.d.ts +0 -20
  1231. package/dist/core/plugin/jsonSchema/index.d.ts +0 -11
  1232. package/dist/core/plugin/jsonSchema/plugin.d.ts +0 -35
  1233. package/dist/core/plugin/jsonSchema/ref-resolver.d.ts +0 -14
  1234. package/dist/core/plugin/jsonSchema/types.d.ts +0 -69
  1235. package/dist/core/plugin/jsonSchema/validation-core.d.ts +0 -29
  1236. package/dist/core/plugin/jsonSchemaFullFeature.d.ts +0 -31
  1237. package/dist/core/plugin/literal.d.ts +0 -40
  1238. package/dist/core/plugin/message-factories.d.ts +0 -9
  1239. package/dist/core/plugin/nullable.d.ts +0 -34
  1240. package/dist/core/plugin/numberFinite.d.ts +0 -41
  1241. package/dist/core/plugin/numberInteger.d.ts +0 -41
  1242. package/dist/core/plugin/numberMax.d.ts +0 -49
  1243. package/dist/core/plugin/numberMin.d.ts +0 -49
  1244. package/dist/core/plugin/numberMultipleOf.d.ts +0 -42
  1245. package/dist/core/plugin/numberNegative.d.ts +0 -41
  1246. package/dist/core/plugin/numberPositive.d.ts +0 -41
  1247. package/dist/core/plugin/numberRange.d.ts +0 -48
  1248. package/dist/core/plugin/object.d.ts +0 -43
  1249. package/dist/core/plugin/objectAdditionalProperties.d.ts +0 -51
  1250. package/dist/core/plugin/objectDependentRequired.d.ts +0 -42
  1251. package/dist/core/plugin/objectDependentSchemas.d.ts +0 -40
  1252. package/dist/core/plugin/objectMaxProperties.d.ts +0 -42
  1253. package/dist/core/plugin/objectMinProperties.d.ts +0 -42
  1254. package/dist/core/plugin/objectPatternProperties.d.ts +0 -46
  1255. package/dist/core/plugin/objectPropertyNames.d.ts +0 -36
  1256. package/dist/core/plugin/objectRecursively.d.ts +0 -81
  1257. package/dist/core/plugin/oneOf.d.ts +0 -44
  1258. package/dist/core/plugin/optional.d.ts +0 -35
  1259. package/dist/core/plugin/optionalIf.d.ts +0 -42
  1260. package/dist/core/plugin/orFail.d.ts +0 -132
  1261. package/dist/core/plugin/readOnlyWriteOnly.d.ts +0 -48
  1262. package/dist/core/plugin/required.d.ts +0 -45
  1263. package/dist/core/plugin/requiredIf.d.ts +0 -66
  1264. package/dist/core/plugin/shared-constants.d.ts +0 -45
  1265. package/dist/core/plugin/shared.d.ts +0 -3
  1266. package/dist/core/plugin/skip.d.ts +0 -57
  1267. package/dist/core/plugin/stitch-typed.d.ts +0 -15
  1268. package/dist/core/plugin/stitch.d.ts +0 -1
  1269. package/dist/core/plugin/stitchSimple.d.ts +0 -4
  1270. package/dist/core/plugin/stringAlphanumeric.d.ts +0 -42
  1271. package/dist/core/plugin/stringBase64.d.ts +0 -119
  1272. package/dist/core/plugin/stringContentEncoding.d.ts +0 -43
  1273. package/dist/core/plugin/stringContentMediaType.d.ts +0 -47
  1274. package/dist/core/plugin/stringDate.d.ts +0 -48
  1275. package/dist/core/plugin/stringDatetime.d.ts +0 -108
  1276. package/dist/core/plugin/stringDuration.d.ts +0 -41
  1277. package/dist/core/plugin/stringEmail.d.ts +0 -81
  1278. package/dist/core/plugin/stringEndsWith.d.ts +0 -42
  1279. package/dist/core/plugin/stringExactLength.d.ts +0 -46
  1280. package/dist/core/plugin/stringHostname.d.ts +0 -104
  1281. package/dist/core/plugin/stringIpv4.d.ts +0 -85
  1282. package/dist/core/plugin/stringIpv6.d.ts +0 -104
  1283. package/dist/core/plugin/stringIri.d.ts +0 -117
  1284. package/dist/core/plugin/stringIriReference.d.ts +0 -43
  1285. package/dist/core/plugin/stringJsonPointer.d.ts +0 -107
  1286. package/dist/core/plugin/stringMax.d.ts +0 -43
  1287. package/dist/core/plugin/stringMin.d.ts +0 -43
  1288. package/dist/core/plugin/stringPattern.d.ts +0 -40
  1289. package/dist/core/plugin/stringRelativeJsonPointer.d.ts +0 -42
  1290. package/dist/core/plugin/stringStartsWith.d.ts +0 -42
  1291. package/dist/core/plugin/stringTime.d.ts +0 -39
  1292. package/dist/core/plugin/stringUriTemplate.d.ts +0 -43
  1293. package/dist/core/plugin/stringUrl.d.ts +0 -97
  1294. package/dist/core/plugin/testUtils.d.ts +0 -15
  1295. package/dist/core/plugin/transform-type-restrictions.d.ts +0 -61
  1296. package/dist/core/plugin/transform.d.ts +0 -35
  1297. package/dist/core/plugin/tupleBuilder.d.ts +0 -66
  1298. package/dist/core/plugin/types.d.ts +0 -143
  1299. package/dist/core/plugin/unionGuard.d.ts +0 -50
  1300. package/dist/core/plugin/utils/field-accessor-optimized.d.ts +0 -50
  1301. package/dist/core/plugin/utils/field-accessor.d.ts +0 -107
  1302. package/dist/core/plugin/uuid.d.ts +0 -95
  1303. package/dist/core/plugin/validateIf.d.ts +0 -57
  1304. package/dist/core/registry/plugin-registry.d.ts +0 -116
  1305. package/dist/core/registry.d.ts +0 -6
  1306. package/dist/core/transform/index.d.ts +0 -1
  1307. package/dist/core/transform/string/defaultValue.d.ts +0 -6
  1308. package/dist/core/transform/string/index.d.ts +0 -3
  1309. package/dist/core/transform/string/replace.d.ts +0 -14
  1310. package/dist/core/transform/string/sanitize.d.ts +0 -6
  1311. package/dist/core/utils/type-guards.d.ts +0 -68
  1312. package/dist/index.js.map +0 -7
  1313. package/dist/index.mjs.map +0 -7
  1314. package/dist/types/array-type-analysis.d.ts +0 -115
  1315. package/dist/types/indexed-result.d.ts +0 -44
  1316. package/dist/types/result.d.ts +0 -159
  1317. package/dist/types/stitch-types.d.ts +0 -118
  1318. package/dist/types/util.d.ts +0 -19
  1319. package/dist/types/valitator.d.ts +0 -10
@@ -0,0 +1,57 @@
1
+ // ===========================================================================
2
+ // src/field-rule/create-plugin-registry.ts — the IMMUTABLE plugin bag.
3
+ //
4
+ // A registry holds a THUNK that replays `use()` onto a fresh Builder, never a
5
+ // Builder it hands out. Builder.use() mutates its receiver, so a stored builder
6
+ // would make `base.use(a)` and `base.use(b)` land in the same object and every
7
+ // branch of a shared base would see every other branch's plugins. Replaying is
8
+ // O(n) per branch at BUILD time only, and it is the whole of the immutability
9
+ // guarantee (docs/legacy-spec/plugin-contract.md:114).
10
+ //
11
+ // The thunk also carries the type: `makeBuilder().use(plugin)` is already
12
+ // `Builder<B & BagEntry<P>>`, so the growing bag type is produced by the
13
+ // builder's own signature and this file holds no assertion.
14
+ // ===========================================================================
15
+ import { Builder } from "../builder/field-builder.types.mjs";
16
+ import { createFieldRule } from "./create-field-rule.mjs";
17
+ /** First-wins by name, the rule Builder.use() already follows. */
18
+ function appendPlugin(plugins, plugin) {
19
+ if (plugins.some((registered) => registered.name === plugin.name)) {
20
+ return plugins;
21
+ }
22
+ return Object.freeze([...plugins, plugin]);
23
+ }
24
+ /**
25
+ * defineProperty rather than assignment, for the same reason toPluginBag uses
26
+ * it: a plugin named `__proto__` must land in the record instead of reaching
27
+ * the prototype setter.
28
+ */
29
+ function indexPluginsByName(plugins) {
30
+ const indexed = {};
31
+ for (const plugin of plugins) {
32
+ Object.defineProperty(indexed, plugin.name, {
33
+ value: plugin,
34
+ enumerable: true,
35
+ });
36
+ }
37
+ return Object.freeze(indexed);
38
+ }
39
+ function createRegistry(makeBuilder, plugins) {
40
+ const registry = {
41
+ use(plugin) {
42
+ const grow = () => makeBuilder().use(plugin);
43
+ // Eagerly, so a nameless value throws NamelessPluginError HERE and not
44
+ // at the far-away call that first needed a builder.
45
+ grow();
46
+ return createRegistry(grow, appendPlugin(plugins, plugin));
47
+ },
48
+ createFieldRule: (define, options) => createFieldRule(makeBuilder(), define, options),
49
+ toBuilder: () => makeBuilder(),
50
+ getPlugins: () => indexPluginsByName(plugins),
51
+ };
52
+ return Object.freeze(registry);
53
+ }
54
+ const NO_PLUGINS = Object.freeze([]);
55
+ export function createPluginRegistry() {
56
+ return createRegistry(() => Builder(), NO_PLUGINS);
57
+ }
@@ -0,0 +1,38 @@
1
+ import type { FieldOptions } from "../builder/field-options.types";
2
+ import type { AnyChain } from "../chain/field-chain.types";
3
+ import type { FieldSlots } from "../chain/field-slots.types";
4
+ import type { PluginBag } from "../chain/plugin-bag.types";
5
+ import type { ValidateOptions, ValidationResult } from "../types/validation-result.types";
6
+ /** The one-key object a standalone rule is validated through. */
7
+ export interface FieldRuleSubject<TValue> {
8
+ readonly value: TValue;
9
+ }
10
+ /** The user's chain callback, stored unrun. */
11
+ export type FieldRuleDefine<TValue, B extends PluginBag> = (b: FieldSlots<unknown, B, TValue>) => AnyChain;
12
+ /**
13
+ * Legacy shape (docs/legacy-spec/documented-promises.md:238):
14
+ * createFieldRule(fn, { name, description?, fieldOptions? })
15
+ */
16
+ export interface FieldRuleOptions<TValue> {
17
+ readonly name?: string;
18
+ readonly description?: string;
19
+ /** Carried to `.v()`'s third argument, at useField() as well as standalone. */
20
+ readonly fieldOptions?: FieldOptions<TValue>;
21
+ }
22
+ /**
23
+ * `validate` is generic over the INPUT rather than returning
24
+ * `ValidationResult<TValue>`, because validate() hands back the very value it
25
+ * was given: typing the result as the argument is the honest description and it
26
+ * needs no assertion. `parse` may hand back a different object, so it is typed
27
+ * by the rule's value type, exactly as Validator<T>.parse is.
28
+ */
29
+ export interface FieldRule<TValue, B extends PluginBag = PluginBag> {
30
+ readonly name: string;
31
+ readonly description: string | undefined;
32
+ readonly define: FieldRuleDefine<TValue, B>;
33
+ readonly fieldOptions: FieldOptions<TValue> | undefined;
34
+ validate<TInput extends TValue | null | undefined>(value: TInput, options?: ValidateOptions): ValidationResult<TInput>;
35
+ parse(value: TValue | null | undefined, options?: ValidateOptions): ValidationResult<TValue>;
36
+ }
37
+ /** The legacy `ExtractFieldRuleType`, under a name that says what it reads. */
38
+ export type ExtractFieldRuleValue<R> = R extends FieldRule<infer TValue, PluginBag> ? TValue : never;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export { createFieldRule, FIELD_RULE_SUBJECT_KEY } from "./create-field-rule";
2
+ export { createPluginRegistry } from "./create-plugin-registry";
3
+ export { useField } from "./use-field";
4
+ export type { ExtractFieldRuleValue, FieldRule, FieldRuleDefine, FieldRuleOptions, FieldRuleSubject, } from "./field-rule.types";
5
+ export type { PluginRegistry } from "./plugin-registry.types";
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useField = exports.createPluginRegistry = exports.FIELD_RULE_SUBJECT_KEY = exports.createFieldRule = void 0;
4
+ // ===========================================================================
5
+ // src/field-rule/index.ts — re-exports only. Nothing is defined in this file.
6
+ // ===========================================================================
7
+ var create_field_rule_1 = require("./create-field-rule");
8
+ Object.defineProperty(exports, "createFieldRule", { enumerable: true, get: function () { return create_field_rule_1.createFieldRule; } });
9
+ Object.defineProperty(exports, "FIELD_RULE_SUBJECT_KEY", { enumerable: true, get: function () { return create_field_rule_1.FIELD_RULE_SUBJECT_KEY; } });
10
+ var create_plugin_registry_1 = require("./create-plugin-registry");
11
+ Object.defineProperty(exports, "createPluginRegistry", { enumerable: true, get: function () { return create_plugin_registry_1.createPluginRegistry; } });
12
+ var use_field_1 = require("./use-field");
13
+ Object.defineProperty(exports, "useField", { enumerable: true, get: function () { return use_field_1.useField; } });
@@ -0,0 +1,6 @@
1
+ // ===========================================================================
2
+ // src/field-rule/index.ts — re-exports only. Nothing is defined in this file.
3
+ // ===========================================================================
4
+ export { createFieldRule, FIELD_RULE_SUBJECT_KEY } from "./create-field-rule.mjs";
5
+ export { createPluginRegistry } from "./create-plugin-registry.mjs";
6
+ export { useField } from "./use-field.mjs";
@@ -0,0 +1,17 @@
1
+ import type { Builder } from "../builder/field-builder.types";
2
+ import type { BagEntry, PluginBag } from "../chain/plugin-bag.types";
3
+ import type { AnyPlugin } from "../plugin-kit/plugin-definition";
4
+ import type { FieldRule, FieldRuleDefine, FieldRuleOptions } from "./field-rule.types";
5
+ export interface PluginRegistry<B extends PluginBag> {
6
+ /** IMMUTABLE, unlike Builder.use(): the receiver is never touched. */
7
+ use<P extends AnyPlugin>(plugin: P): PluginRegistry<B & BagEntry<P>>;
8
+ /**
9
+ * TValue is written, not inferred — it names the type the rule is FOR, and
10
+ * `define`'s only mention of it is a callback parameter, which no inference
11
+ * can read. `registry.createFieldRule<string>((b) => b.string.required())`.
12
+ */
13
+ createFieldRule<TValue>(define: FieldRuleDefine<TValue, B>, options?: FieldRuleOptions<TValue>): FieldRule<TValue, B>;
14
+ /** A FRESH builder each call, carrying the same plugins. */
15
+ toBuilder(): Builder<B>;
16
+ getPlugins(): Readonly<Record<string, AnyPlugin>>;
17
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { FieldBuilder } from "../builder/field-builder.types";
2
+ import type { PluginBag } from "../chain/plugin-bag.types";
3
+ import type { FieldPath } from "../path/field-path.types";
4
+ import type { ValueAtPath } from "../path/value-at-path.types";
5
+ import type { FieldRule } from "./field-rule.types";
6
+ export declare function useField<T extends object, B extends PluginBag, TDeclared extends string, K extends FieldPath<T> & string>(builder: FieldBuilder<T, B, TDeclared>, path: K, rule: FieldRule<ValueAtPath<T, K>, B>): FieldBuilder<T, B, TDeclared | K>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useField = useField;
4
+ function useField(builder, path, rule) {
5
+ return builder.v(path, rule.define, rule.fieldOptions);
6
+ }
@@ -0,0 +1,3 @@
1
+ export function useField(builder, path, rule) {
2
+ return builder.v(path, rule.define, rule.fieldOptions);
3
+ }
@@ -0,0 +1 @@
1
+ export * from "./field-rule/index";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ module.exports = require("./field-rule/index");
@@ -0,0 +1 @@
1
+ export * from "./field-rule/index.mjs";
package/dist/index.d.ts CHANGED
@@ -1,72 +1,14 @@
1
- /**
2
- * Luq - TypeScript validation library
3
- *
4
- * Single entry point for all Luq functionality.
5
- * This file exports everything from the library.
6
- */
7
- export { Builder } from "./core/builder/core/builder";
8
- export { createPluginRegistry, type PluginRegistry, type FieldRule, type ExtractFieldRuleType, type FieldRuleDefinition } from "./core/registry/plugin-registry";
9
- export { type FieldBuilder, type TransformAwareValidator, type ApplyFieldTransforms, type ExtractFieldType, type TypedPlugin, type PluginType, type PluginCategory, type TypeName, type BuilderExtensionPlugin, type BuilderExtensionMethod, } from "./core/builder/plugins/plugin-types";
10
- export { ValidationResult } from "./core/builder/plugins/plugin-types";
11
- export { type ValidationOptions, type MessageContext, type SEVERITY, } from "./core/plugin/types";
12
- export { type PluginValidationResult as BasicValidationResult, type StandardPluginImplementation, type ConditionalPluginImplementation, type TransformPluginImplementation, type FieldReferencePluginImplementation, type ArrayElementPluginImplementation, } from "./core/builder/plugins/plugin-interfaces";
13
- export { plugin, type PluginImplementation, pluginPredefinedTransform, pluginConfigurableTransform, pluginBuilderExtension, } from "./core/builder/plugins/plugin-creator";
14
- export { Result } from "./types/result";
15
- export { GlobalConfig, globalConfig, setGlobalConfig, getGlobalConfig, resetGlobalConfig, } from "./core/global-config";
16
- export { requiredPlugin } from "./core/plugin/required";
17
- export { optionalPlugin } from "./core/plugin/optional";
18
- export { nullablePlugin } from "./core/plugin/nullable";
19
- export { stringMinPlugin } from "./core/plugin/stringMin";
20
- export { stringMaxPlugin } from "./core/plugin/stringMax";
21
- export { stringEmailPlugin } from "./core/plugin/stringEmail";
22
- export { stringPatternPlugin } from "./core/plugin/stringPattern";
23
- export { stringUrlPlugin } from "./core/plugin/stringUrl";
24
- export { stringDatePlugin } from "./core/plugin/stringDate";
25
- export { stringDatetimePlugin } from "./core/plugin/stringDatetime";
26
- export { stringTimePlugin } from "./core/plugin/stringTime";
27
- export { stringIpv4Plugin } from "./core/plugin/stringIpv4";
28
- export { stringIpv6Plugin } from "./core/plugin/stringIpv6";
29
- export { stringHostnamePlugin } from "./core/plugin/stringHostname";
30
- export { stringDurationPlugin } from "./core/plugin/stringDuration";
31
- export { stringBase64Plugin } from "./core/plugin/stringBase64";
32
- export { stringJsonPointerPlugin } from "./core/plugin/stringJsonPointer";
33
- export { stringRelativeJsonPointerPlugin } from "./core/plugin/stringRelativeJsonPointer";
34
- export { stringIriPlugin } from "./core/plugin/stringIri";
35
- export { stringIriReferencePlugin } from "./core/plugin/stringIriReference";
36
- export { stringUriTemplatePlugin } from "./core/plugin/stringUriTemplate";
37
- export { stringContentEncodingPlugin } from "./core/plugin/stringContentEncoding";
38
- export { stringContentMediaTypePlugin } from "./core/plugin/stringContentMediaType";
39
- export { uuidPlugin } from "./core/plugin/uuid";
40
- export { numberMinPlugin } from "./core/plugin/numberMin";
41
- export { numberMaxPlugin } from "./core/plugin/numberMax";
42
- export { numberPositivePlugin } from "./core/plugin/numberPositive";
43
- export { numberNegativePlugin } from "./core/plugin/numberNegative";
44
- export { numberIntegerPlugin } from "./core/plugin/numberInteger";
45
- export { numberMultipleOfPlugin } from "./core/plugin/numberMultipleOf";
46
- export { booleanTruthyPlugin } from "./core/plugin/booleanTruthy";
47
- export { booleanFalsyPlugin } from "./core/plugin/booleanFalsy";
48
- export { arrayMinLengthPlugin } from "./core/plugin/arrayMinLength";
49
- export { arrayMaxLengthPlugin } from "./core/plugin/arrayMaxLength";
50
- export { arrayUniquePlugin } from "./core/plugin/arrayUnique";
51
- export { arrayIncludesPlugin } from "./core/plugin/arrayIncludes";
52
- export { arrayContainsPlugin } from "./core/plugin/arrayContains";
53
- export { objectPlugin } from "./core/plugin/object";
54
- export { objectMinPropertiesPlugin } from "./core/plugin/objectMinProperties";
55
- export { objectMaxPropertiesPlugin } from "./core/plugin/objectMaxProperties";
56
- export { objectAdditionalPropertiesPlugin } from "./core/plugin/objectAdditionalProperties";
57
- export { objectPropertyNamesPlugin } from "./core/plugin/objectPropertyNames";
58
- export { objectPatternPropertiesPlugin } from "./core/plugin/objectPatternProperties";
59
- export { objectDependentRequiredPlugin } from "./core/plugin/objectDependentRequired";
60
- export { objectDependentSchemasPlugin } from "./core/plugin/objectDependentSchemas";
61
- export { oneOfPlugin } from "./core/plugin/oneOf";
62
- export { literalPlugin } from "./core/plugin/literal";
63
- export { compareFieldPlugin } from "./core/plugin/compareField";
64
- export { requiredIfPlugin } from "./core/plugin/requiredIf";
65
- export { validateIfPlugin } from "./core/plugin/validateIf";
66
- export { skipPlugin } from "./core/plugin/skip";
67
- export { transformPlugin } from "./core/plugin/transform";
68
- export { tupleBuilderPlugin } from "./core/plugin/tupleBuilder";
69
- export { readOnlyWriteOnlyPlugin } from "./core/plugin/readOnlyWriteOnly";
70
- export { customPlugin } from "./core/plugin/custom";
71
- export { jsonSchemaPlugin } from "./core/plugin/jsonSchema";
72
- export { jsonSchemaFullFeaturePlugin } from "./core/plugin/jsonSchemaFullFeature";
1
+ export { Builder, NamelessPluginError, createBuilder, getGlobalConfig, resetGlobalConfig, setGlobalConfig, } from "./builder/index";
2
+ export type { DefaultFactory, FieldBuilder, FieldOptions, FieldValidator, MissingFieldsError, SubsetValidator, UncoveredOf, Validator, } from "./builder/index";
3
+ export { PASS, fail, isArray, isNumber, isPlainObject, isString, isStringArray, } from "./types";
4
+ export type { ArrayItemContext, CheckOutcome, IssueDetail, IssueSeverity, MessageContext, MessageContextExtra, MessageFactory, Present, PresenceState, RuleContext, RuleOptions, TypeName, ValidationIssue, } from "./types";
5
+ export type { ValidateOptions, ValidationRejection, ValidationResult, ValidationSuccess, } from "./types/validation-result.types";
6
+ export { DEFAULT_GLOBAL_CONFIG, resolveGlobalConfig, } from "./types/global-config";
7
+ export type { GlobalConfig, NumberFormat, ResolvedGlobalConfig, ValueTransform, } from "./types/global-config";
8
+ export type { FieldPath, LeafPath, MissingLeafPaths, PickPaths, ValueAtPath, } from "./path/index";
9
+ export { PluginArgumentError, definePlugin, } from "./plugin-kit/plugin-definition";
10
+ export type { AnyPlugin, PluginArgs, PluginDefinition, PluginOut, PluginSignature, PluginSpec, } from "./plugin-kit/plugin-definition";
11
+ export { branch, check, composite, fieldsBranch, gate, presence, recursive, transform, } from "./plugin-kit/create-rule";
12
+ export { renderMessage } from "./plugin-kit/rule-build-context";
13
+ export type { RuleBuildContext } from "./plugin-kit/rule-build-context";
14
+ export { readExternalContext } from "./plugin-kit/external-context";
package/dist/index.js CHANGED
@@ -1,2 +1,48 @@
1
- "use strict";var le=Object.defineProperty;var Xe=Object.getOwnPropertyDescriptor;var et=Object.getOwnPropertyNames;var tt=Object.prototype.hasOwnProperty;var rt=(e,t)=>{for(var n in t)le(e,n,{get:t[n],enumerable:!0})},nt=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of et(t))!tt.call(e,r)&&r!==n&&le(e,r,{get:()=>t[r],enumerable:!(a=Xe(t,r))||a.enumerable});return e};var at=e=>nt(le({},"__esModule",{value:!0}),e);var Qt={};rt(Qt,{Builder:()=>oe,Result:()=>A,createPluginRegistry:()=>ze,getGlobalConfig:()=>Ze,globalConfig:()=>Q,plugin:()=>qe,pluginBuilderExtension:()=>Ye,pluginConfigurableTransform:()=>He,pluginPredefinedTransform:()=>Ge,resetGlobalConfig:()=>Je,setGlobalConfig:()=>Qe});module.exports=at(Qt);function Z(e){if(e!==void 0)return typeof e=="object"&&e!==null&&!Array.isArray(e)&&("default"in e||"description"in e||"deprecated"in e||"metadata"in e)?e:{default:e}}function K(e,t,n){if(!t||!("default"in t)||!(e===void 0||e===null&&t.applyDefaultToNull!==!1))return e;let r=t.default;return typeof r=="function"?r():r}function it(e,t){return{name:"LuqValidationException",message:e,errors:t,toString(){return`${this.name}: ${this.message}`}}}var st={isValid(){return!0},isError(){return!1},data(){return this._data},unwrap(){return this._data},unwrapOr(e){return this._data},unwrapOrElse(e){return this._data},map(e){return A.ok(e(this._data))},flatMap(e){return e(this._data)},tap(e){return e(this._data),this},tapError(e){return this},onSuccessPostProcess(e){return e(this._data),this},errors(){return[]},toPlainObject(){return{valid:!0,data:this._data,errors:[]}},get valid(){return!0},get value(){return this._data}},A={ok(e){let t=Object.create(st);return t._data=e,t},error(e){return ce({isValid:!1,data:void 0,errors:e})}};function ce(e){return{isValid(){return e.isValid},isError(){return!e.isValid},unwrap(){if(e.isValid)return e.data;throw it(`Validation failed with ${e.errors.length} error(s)`,e.errors)},unwrapOr(n){return e.isValid?e.data:n},unwrapOrElse(n){return e.isValid?e.data:n(e.errors)},map(n){return e.isValid?A.ok(n(e.data)):A.error(e.errors)},flatMap(n){return e.isValid?n(e.data):A.error(e.errors)},tap(n){return e.isValid&&n(e.data),ce(e)},tapError(n){return e.isValid||n(e.errors),ce(e)},data(){return e.isValid?e.data:void 0},toPlainObject(){return{valid:e.isValid,data:e.isValid?e.data:void 0,errors:e.isValid?[]:e.errors}},get valid(){return e.isValid},get errors(){return e.isValid?[]:e.errors}}}var Fe;(a=>{function e(r){let s=[],o=r.length;for(let i=0;i<o;i++){let c=r[i];if(c.isError())return A.error(c.errors);s.push(c.unwrap())}return A.ok(s)}a.all=e;function t(r){let s=[],o=r.length;for(let i=0;i<o;i++){let c=r[i];if(c.isValid())return c;s.push(...c.errors)}return A.error(s)}a.any=t;function n(r){let s=[],o=[],i=r.length;for(let c=0;c<i;c++){let l=r[c];l.isValid()?s.push(l.unwrap()):o.push(l.errors)}return{valid:s,invalid:o}}a.partition=n})(Fe||(Fe={}));var er=Object.freeze({valid:!0}),tr=Object.freeze({valid:!1});function Ve(e,t,n,a){let r=t.methodName,s=null,o=null;e[r]=function(...i){if(s||(s=t.createComposer(n,a)),s.add(i),e[r]=s[r],s){o=s.build();let c=e._executionPlan;if(!(c&&o&&typeof o.validate=="function")){if(o&&o._validators)for(let l of o._validators)c.addValidator(l.name,(h,g)=>{let b=l.check(h,h);return{valid:b,message:b?void 0:`Validation failed for ${l.name}`}})}}return e}}function ot(e){switch(e){case"string":return{check:t=>t==null?!0:typeof t=="string",name:"stringType",messageFactory:()=>"Expected string",inputType:"string",outputType:"string",metadata:{severity:"error",async:!1}};case"number":return{check:t=>t==null?!0:typeof t=="number"&&!isNaN(t),name:"numberType",messageFactory:()=>"Expected number",inputType:"number",outputType:"number",metadata:{severity:"error",async:!1}};case"boolean":return{check:t=>t==null?!0:typeof t=="boolean",name:"booleanType",messageFactory:()=>"Expected boolean",inputType:"boolean",outputType:"boolean",metadata:{severity:"error",async:!1}};case"array":return{check:t=>t==null?!0:Array.isArray(t),name:"arrayType",messageFactory:()=>"Expected array",inputType:"array",outputType:"array",metadata:{severity:"error",async:!1}};case"object":return{check:t=>t==null?!0:typeof t=="object"&&t!==null&&!Array.isArray(t),name:"objectType",messageFactory:()=>"Expected object",inputType:"object",outputType:"object",metadata:{severity:"error",async:!1}};case"date":return{check:t=>t==null?!0:t instanceof Date,name:"dateType",messageFactory:()=>"Expected Date",inputType:"date",outputType:"date",metadata:{severity:"error",async:!1}};case"null":return{check:t=>t===null,name:"nullType",messageFactory:()=>"Expected null",inputType:"null",outputType:"null",metadata:{severity:"error",async:!1}};case"any":return{check:()=>!0,name:"anyType",messageFactory:()=>"",inputType:"any",outputType:"any",metadata:{severity:"error",async:!1}};default:return null}}function S(e,t,n,a){let r=a?.validators?[...a.validators]:[];if(!a&&e!=="union"){let i=ot(e);i&&r.push(i)}let s=a?.transforms?[...a.transforms]:[],o={_type:e,_fieldPath:t,_validators:r,_transforms:s,build(){return e==="union"&&r.length===0&&r.push({check:()=>!1,name:"unionGuard",messageFactory:()=>"No union type guards defined",inputType:"union",outputType:"union",metadata:{severity:"error",async:!1}}),{_validators:r,_transforms:s}}};return lt(o,e,t,n,r,s),o.refineString=()=>S("string",t,n,{validators:r,transforms:s}),o.refineNumber=()=>S("number",t,n,{validators:r,transforms:s}),o.refineBoolean=()=>S("boolean",t,n,{validators:r,transforms:s}),o.refineArray=()=>S("array",t,n,{validators:r,transforms:s}),o.refineObject=()=>S("object",t,n,{validators:r,transforms:s}),o.refineTuple=()=>S("tuple",t,n,{validators:r,transforms:s}),o.refineUnion=()=>S("union",t,n,{validators:r,transforms:s}),o.refineDate=()=>S("date",t,n,{validators:r,transforms:s}),o.refineAny=()=>S("any",t,n,{validators:r,transforms:s}),o}function lt(e,t,n,a,r,s){let o=Object.entries(a),i=o.length;for(let c=0;c<i;c++){let[,l]=o[c];if(!l||typeof l!="object")continue;if(l.category?.startsWith("composable")){if(l.allowedTypes&&!l.allowedTypes.includes(t))continue;Ve(e,l,n,a);continue}if(typeof l.create!="function"||l.allowedTypes&&!l.allowedTypes.includes(t))continue;let{methodName:h,category:g="standard",name:b}=l,d=l.create();e[h]=function(...u){try{let f=d(...u);if(g==="transform"){let m=ct(f,u[0]);s.push(m)}else{let m=dt(f,n),y=ut(m,b||h,t,u,f);r.push(y)}}catch{}return e}}}function ct(e,t){return typeof e=="function"?t:e?.__isTransform?e.__transformFn:e?.__isCoerce?n=>e.coerce.coerceFn(n):e?.__isDefault?(n,a)=>e.default.applyDefault(n,a):e?.__isPreprocess?(n,a)=>e.preprocess.applyPreprocess(n,a):t||(n=>n)}function dt(e,t){return typeof e=="function"?(n,a)=>e(n,{path:t,allValues:a}).valid:e?.check?(n,a)=>e.check(n,a):()=>!1}function ut(e,t,n,a,r){let s={check:e,name:t,code:r?.code||t,pluginName:r?.pluginName||t,getErrorMessage:r?.getErrorMessage,messageFactory:a[a.length-1]?.messageFactory||r?.messageFactory||(()=>"Validation failed"),inputType:n,outputType:n,metadata:r?.metadata||{severity:"error",async:!1}};return r&&(r.shouldSkipAllValidation&&(s.shouldSkipAllValidation=r.shouldSkipAllValidation),r.shouldSkipValidation&&(s.shouldSkipValidation=r.shouldSkipValidation),r.shouldSkipFurtherValidation&&(s.shouldSkipFurtherValidation=r.shouldSkipFurtherValidation),r.skipForNull!==void 0&&(s.skipForNull=r.skipForNull),r.skipForUndefined!==void 0&&(s.skipForUndefined=r.skipForUndefined),r.__isRecursive&&(s.__isRecursive=r.__isRecursive),r.recursive&&(s.recursive=r.recursive)),s}function U(e,t){let n=S("string",e,t),a=S("number",e,t),r=S("boolean",e,t),s=S("array",e,t),o=S("object",e,t),i=S("union",e,t),c=S("tuple",e,t),l=S("date",e,t),h=S("any",e,t);return{string:n,number:a,boolean:r,date:l,array:s,tuple:c,union:i,object:o,any:h}}function J(e){let t=e.split(".");return{segments:t,isArrayElement:!1,arrayPath:void 0,elementKey:void 0,depth:t.length}}function z(e){let t=J(e),n;if(t.depth===1){let a=t.segments[0];n=r=>r?.[a]}else if(t.depth===2){let[a,r]=t.segments;n=s=>s?.[a]?.[r]}else if(t.depth===3){let[a,r,s]=t.segments;n=o=>o?.[a]?.[r]?.[s]}else n=a=>{let r=a;for(let s of t.segments){if(r==null)return;r=r[s]}return r};return n}function Pe(e){let t=J(e),n;if(t.depth===1){let a=t.segments[0];n=(r,s)=>{r!=null&&(r[a]=s)}}else if(t.depth===2){let[a,r]=t.segments;n=(s,o)=>{s!=null&&(s[a]||(s[a]={}),s[a][r]=o)}}else if(t.depth===3){let[a,r,s]=t.segments;n=(o,i)=>{o!=null&&(o[a]||(o[a]={}),o[a][r]||(o[a][r]={}),o[a][r][s]=i)}}else n=(a,r)=>{if(a==null)return;let s=a,o=t.segments;for(let i=0;i<o.length-1;i++){let c=o[i];s[c]||(s[c]={}),s=s[c]}s[o[o.length-1]]=r};return n}function ft(e,t){return z(t)(e)}function yt(e,t,n){Pe(t)(e,n)}function Ee(e){let t=J(e);return!t.isArrayElement||!t.arrayPath||!t.elementKey?null:{arrayPath:t.arrayPath,elementPath:t.elementKey,indexPattern:new RegExp(`${t.arrayPath.replace(/\./g,"\\.")}\\[(\\d+)\\]\\.${t.elementKey.replace(/\./g,"\\.")}`)}}function pt(e){let t=z(e);return n=>{let a=t(n);return Array.isArray(a)?a:[]}}function gt(e){let t=new Map;for(let n of e){let a=Ee(n);if(a){let{arrayPath:r,elementPath:s}=a;t.has(r)||t.set(r,{arrayPath:r,elementFields:[]}),t.get(r).elementFields.push(s)}}return t}function ht(e){return e.map(t=>({fieldName:t.split(".").pop()||t,path:t,accessor:z(t)}))}function mt(e){return!e||typeof e!="string"?!1:e.split(".").every(n=>n.length>0&&/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(n))}function Tt(e){return e.split(".").filter(t=>t.length>0).join(".")}function bt(e,t){let n=e.split("."),a=t.split(".");return n.length!==a.length?n.length-a.length:e.localeCompare(t)}function Ft(){}function Vt(){return{pathCacheSize:0,accessorCacheSize:0,setterCacheSize:0}}var Ae={parseFieldPath:J,createFieldAccessor:z,createFieldSetter:Pe,getNestedValue:ft,setNestedValue:yt,analyzeArrayField:Ee,createArrayAccessor:pt,groupArrayFields:gt,createBatchAccessors:ht,isValidFieldPath:mt,normalizeFieldPath:Tt,compareFieldPaths:bt,clearCache:Ft,getCacheStats:Vt};function Pt(e,t){let n=e.params||[];if(n.length>0){let a=n[0];if(typeof a=="number")return{expected:a,actual:typeof t=="string"?t.length:t};if(typeof a=="string")return{pattern:a,expected:a}}return{}}function X(e,t,n){let a=e.code||e.pluginName||"VALIDATION_ERROR",r="Validation failed";try{if(e.getErrorMessage)r=e.getErrorMessage(t,n.path,n.allValues,n.arrayContext);else if(e.messageFactory){let s={path:n.path,value:t,code:a,...Pt(e,t)};r=e.messageFactory(s)}}catch{r=`Validation failed for ${n.path}`}return{path:n.path,code:a,message:r}}function Et(e){if(typeof e=="function")return e;let t=e;if(t.apply&&typeof t.apply=="function")return t.apply;if(t.transformFn&&typeof t.transformFn=="function")return t.transformFn;throw new Error("Invalid transform function")}function Re(e,t){if(!t.includes("."))return e?.[t];let n=t.indexOf(".");if(n>0&&t.indexOf(".",n+1)===-1){let r=t.substring(0,n),s=t.substring(n+1);return e?.[r]?.[s]}return z(t)(e)}function ue(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e)){let r=e.length,s=new Array(r);for(let o=0;o<r;o++)s[o]=ue(e[o]);return s}let t={},n=Object.keys(e),a=n.length;for(let r=0;r<a;r++){let s=n[r];t[s]=ue(e[s])}return t}function fe(e,t,n,a={}){let{abortEarly:r=!0}=a,s=e.validators.length;if(s===0)return{valid:!0,errors:[]};if(s===1){let i=e.validators[0],c=i.check;if(typeof c!="function")throw new Error("Invalid validator: check function is not defined");try{return c(t,n.allValues,n.arrayContext)?{valid:!0,errors:[]}:{valid:!1,errors:[X(i,t,n)]}}catch{return{valid:!1,errors:[X(i,t,n)]}}}let o=[];for(let i=0;i<s;i++){let c=e.validators[i];if(c.metadata?.type==="conditional"&&c.metadata?.category==="skip"){let l=c.check;if(typeof l=="function")try{if(l(t,n.allValues,n.arrayContext))return{valid:!0,errors:[]}}catch{}}}for(let i=0;i<s;i++){let c=e.validators[i],l=c.check;if(typeof l!="function")throw new Error("Invalid validator: check function is not defined");let h=!1;try{h=l(t,n.allValues,n.arrayContext)}catch{h=!1}if(!h&&(o.push(X(c,t,n)),r))break}return{valid:o.length===0,errors:o}}function At(e,t,n={}){let{abortEarly:a=!1,abortEarlyOnEachField:r=!0}=n,s=[],o=e.length;for(let i=0;i<o;i++){let c=e[i],l=Re(t,c.path),h={originalValue:l,currentValue:l,allValues:t,path:c.path},g=fe(c,l,h,{abortEarly:r});if(!g.valid&&(s.push(...g.errors),a))break}return{valid:s.length===0,errors:s}}function Oe(e,t,n,a={}){let{abortEarly:r=!0}=a,s=fe(e,t,n,{abortEarly:r});if(!s.valid)return{valid:!1,errors:s.errors};let o=t;try{o=xe(e.transforms,t,n)}catch(i){return{valid:!1,errors:[{path:n.path,code:"TRANSFORM_ERROR",message:`Transform failed: ${i instanceof Error?i.message:"Unknown error"}`}]}}return{valid:!0,data:o,errors:[]}}function xe(e,t,n){let a=t,r=e.length;for(let s=0;s<r;s++)a=Et(e[s])(a,n);return a}function Ot(e,t,n,a=!0,r){let s=e.validators.length;if(s===0)return{valid:!0};if(s===1){let i=e.validators[0].check;if(typeof i!="function")return{valid:!1,errorIndices:[0]};try{return i(t,n,r)?{valid:!0}:{valid:!1,errorIndices:[0]}}catch{return{valid:!1,errorIndices:[0]}}}if(a){for(let i=0;i<s;i++){let c=e.validators[i].check;if(typeof c!="function")return{valid:!1,errorIndices:[i]};let l=!1;try{l=c(t,n,r)}catch{l=!1}if(!l)return{valid:!1,errorIndices:[i]}}return{valid:!0}}let o=[];for(let i=0;i<s;i++){let c=e.validators[i].check;if(typeof c!="function"){o.push(i);continue}let l=!1;try{l=c(t,n,r)}catch{l=!1}l||o.push(i)}return o.length===0?{valid:!0}:{valid:!1,errorIndices:o}}function Rt(e,t,n,a,r){let s={originalValue:n,currentValue:n,allValues:a,path:e.path,arrayContext:r};return t.filter(o=>o<e.validators.length).map(o=>{let i=e.validators[o];return X(i,n,s)})}function xt(){let e=new Map,t=r=>{let s=e.get(r);if(!s){if(!r.includes("."))s=(o,i)=>{o!=null&&(o[r]=i)};else{let o=r.split("."),i=o.length-1;s=(c,l)=>{let h=c;for(let g=0;g<i;g++){let b=o[g];h[b]||(h[b]={}),h=h[b]}h[o[i]]=l}}e.set(r,s)}return s},n=(r,s,o)=>{if(!s.includes(".")){r!=null&&(r[s]=o);return}t(s)(r,o)};return{validateField:fe,validateBatch:At,parseField:Oe,parseBatch:(r,s,o={})=>{let{abortEarly:i=!1,abortEarlyOnEachField:c=!0}=o,l=[],h=ue(s),g=r.length;for(let b=0;b<g;b++){let d=r[b],u=Re(s,d.path),f={originalValue:u,currentValue:u,allValues:s,path:d.path},m=Oe(d,u,f,{abortEarly:c});if(m.valid)m.data!==void 0&&n(h,d.path,m.data);else if(l.push(...m.errors),i)break}return{valid:l.length===0,data:l.length===0?h:void 0,errors:l}},applyTransforms:xe,validateHoisted:Ot,reconstructErrors:Rt}}var de=null;function ve(){return de||(de=xt()),de}var gr=ve();function ke(e,t){let n=e.length,a=!1,r=!1;for(let c of e)vt(c.builderFunction).some(h=>kt(h,t))&&(a=!0),Ae.parseFieldPath(c.path).isArrayElement&&(r=!0);let s,o,i;return r?(s="array_batch",o="Array fields detected - using batch processing",i=!0):a?(s="definition_order",o="Transforms detected - using definition order",i=!1):(s="fast_separated",o="No transforms or arrays - using fast separated execution",i=!0),{strategy:s,reason:o,canOptimize:i,hasTransforms:a,hasArrayFields:r,fieldCount:n}}function vt(e){let t=e.toString(),n=/\.(\w+)\(/g,a=[],r;for(;(r=n.exec(t))!==null;)a.push(r[1]);return a}function kt(e,t){return Object.values(t).find(a=>a?.methodName===e)?.category==="transform"||e==="transform"||e.startsWith("to")}function ye(e,t){let n=ke(e,t),a=new Map;for(let r of e)a.set(r.path,n);return a}function je(e){let t=[],n=[];return e.forEach((a,r)=>{a.strategy==="fast_separated"?t.push(r):n.push(r)}),{fastFields:t,slowFields:n}}var _=".",D="validate",k="parse";function G(e,t,n="fast_separated",a){let r=U(e.path,t),s=e.builderFunction(r);s&&typeof s.build=="function"&&(s=s.build());let o=s._validators||[],i=s._transforms||[],c=e.path,l=o.some(T=>T.shouldSkipAllValidation||T.shouldSkipValidation),h=i.length>0;if(!l&&!h&&o.length<=10&&n==="fast_separated")return jt(o,c);if(!l&&h&&o.length<=10&&i.length<=5&&n==="fast_separated")return Nt(o,i,c);let d=n==="definition_order"||l;return{validate:d?(T,p,P)=>{let E=P?.abortEarlyOnEachField!==!1,R=Ne(T,p,o,i,c,E,D);return{valid:R.valid,errors:R.errors}}:(T,p,P={})=>{let E=P.abortEarlyOnEachField!==!1;return we(T,p,o,i,c,E,D)},parse:d?(T,p,P)=>{let E=P?.abortEarlyOnEachField!==!1;return Ne(T,p,o,i,c,E,k)}:(T,p,P={})=>{let E=P.abortEarlyOnEachField!==!1;return we(T,p,o,i,c,E,k)},accessor:a}}function Ne(e,t,n,a,r,s,o=k){let i=[],c=e,l=n.some(b=>b.skipForNull===!0),h=n.some(b=>b.skipForUndefined===!0);if(e===null&&l||e===void 0&&h)return o===k?{valid:!0,data:e,errors:[]}:{valid:!0,data:void 0,errors:[]};let g=n.length;for(let b=0;b<g;b++){let d=n[b];if(d.shouldSkipAllValidation&&typeof d.shouldSkipAllValidation=="function"&&d.shouldSkipAllValidation(c,t))break;let u=d.check||d;if(typeof u=="function"&&!u(c,t)){let f={path:r,code:d.code||d.pluginName||"VALIDATION_ERROR",message:C(d,c,r,t)};if(s)return{valid:!1,data:void 0,errors:[f]};i.push(f)}}if(i.length>0)return{valid:!1,data:void 0,errors:i};if(o===k&&a.length>0){let b=[];for(let u=0;u<a.length;u++){let f=a[u];typeof f=="function"?b.push(f):f&&typeof f.apply=="function"&&b.push(f.apply)}let d=b.length;if(d===1)c=b[0](c);else if(d===2)c=b[0](c),c=b[1](c);else if(d>0)for(let u=0;u<d;u++)c=b[u](c)}return o===D?W:{valid:!0,data:c,errors:[]}}function we(e,t,n,a,r,s,o=k){let i=[],c=n.length,l=n.some(d=>d.skipForNull===!0),h=n.some(d=>d.skipForUndefined===!0);if(e===null&&l||e===void 0&&h)return o===k?{valid:!0,data:e,errors:[]}:{valid:!0,data:void 0,errors:[]};for(let d=0;d<c;d++){let u=n[d];if(u.shouldSkipAllValidation&&typeof u.shouldSkipAllValidation=="function"&&u.shouldSkipAllValidation(e,t))break;let f=u.check||u;if(typeof f=="function"&&!f(e,t)){if(s)return{valid:!1,data:void 0,errors:[{path:r,code:u.code||u.pluginName||"VALIDATION_ERROR",message:C(u,e,r,t)}]};i.push({path:r,code:u.code||u.pluginName||"VALIDATION_ERROR",message:C(u,e,r,t)})}}if(o===D)return i.length===0?W:{valid:!1,errors:i};if(i.length>0)return{valid:!1,data:void 0,errors:i};let g=e,b=a.length;if(b>0){let d=[];for(let f=0;f<b;f++){let m=a[f];typeof m=="function"?d.push(m):m&&typeof m.apply=="function"&&d.push(m.apply)}let u=d.length;if(u===1)g=d[0](g);else if(u===2)g=d[0](g),g=d[1](g);else if(u>0)for(let f=0;f<u;f++)g=d[f](g)}return{valid:!0,data:g,errors:[]}}function jt(e,t,n){let a=[],r=[],s=[],o=[],i=e.length;for(let b=0;b<i;b++){let d=e[b];a.push(d.check||d),r.push(d.code||d.pluginName||"VALIDATION_ERROR"),d.getErrorMessage&&typeof d.getErrorMessage=="function"||d.messageFactory?(s.push(""),o.push(!0)):(s.push(`Validation failed for ${t}`),o.push(!1))}let c=a.length,l={path:t,code:"",message:""},h;if(c===1){let b=a[0],d=r[0],u=s[0],f=o[0];h=(m,y,F)=>b(m,y)?W:(l.code=d,l.message=f?C(e[0],m,t,y):u,{valid:!1,errors:[{path:l.path,code:l.code,message:l.message}]})}else if(c===2){let b=a[0],d=a[1],u=r[0],f=r[1],m=s[0],y=s[1],F=o[0],V=o[1];h=(T,p,P)=>{if(!b(T,p)){if(P?.abortEarlyOnEachField!==!1)return l.code=u,l.message=F?C(e[0],T,t,p):m,{valid:!1,errors:[{path:l.path,code:l.code,message:l.message}]};let E=[{path:t,code:u,message:F?C(e[0],T,t,p):m}];return d(T,p)||E.push({path:t,code:f,message:V?C(e[1],T,t,p):y}),{valid:!1,errors:E}}return d(T,p)?W:(l.code=f,l.message=V?C(e[1],T,t,p):y,{valid:!1,errors:[{path:l.path,code:l.code,message:l.message}]})}}else h=(b,d,u)=>{for(let f=0;f<c;f++)if(!a[f](b,d)){if(u?.abortEarlyOnEachField!==!1)return l.code=r[f],l.message=o[f]?C(e[f],b,t,d):s[f],{valid:!1,errors:[{path:l.path,code:l.code,message:l.message}]};let m=[];m.push({path:t,code:r[f],message:o[f]?C(e[f],b,t,d):s[f]});for(let y=f+1;y<c;y++)a[y](b,d)||m.push({path:t,code:r[y],message:o[y]?C(e[y],b,t,d):s[y]});return{valid:!1,errors:m}}return W};return{validate:h,parse:(b,d,u={})=>{let f=h(b,d,u);return f.valid?{valid:!0,data:b,errors:[]}:{valid:!1,data:void 0,errors:f.errors}},accessor:n}}var W=Object.freeze({valid:!0,errors:[]});function C(e,t,n,a){if(e.getErrorMessage)try{return e.getErrorMessage(t,n,a)}catch{return`Validation failed for ${n}`}else if(e.messageFactory)try{let r={path:n,value:t,code:e.code||e.pluginName||"VALIDATION_ERROR"};return e.messageFactory(r)}catch{return`Validation failed for ${n}`}return`Validation failed for ${n}`}function Nt(e,t,n,a){let r=e.length,s=t.length,o=new Array(r),i=new Array(r);for(let d=0;d<r;d++){let u=e[d];o[d]=u.check||u,i[d]=u.code||u.pluginName||"VALIDATION_ERROR"}let c=new Array(s),l=0;for(let d=0;d<s;d++){let u=t[d];typeof u=="function"?c[l++]=u:u&&typeof u.apply=="function"&&(c[l++]=u.apply)}if(r===1&&l===1){let d=o[0],u=i[0],f=c[0],m=e[0],y={valid:!1,errors:[{path:n,code:u,message:""}]},F={valid:!1,data:void 0,errors:[{path:n,code:u,message:""}]},V={valid:!0,data:null,errors:[]};return{validate:(T,p,P)=>d(T,p)?W:(y.errors[0].message=C(m,T,n,p),y),parse:(T,p,P)=>d(T,p)?(V.data=f(T),V):(F.errors[0].message=C(m,T,n,p),F)}}if(r===2&&l===1){let d=o[0],u=o[1],f=i[0],m=i[1],y=c[0],F=e[0],V=e[1],T={valid:!1,errors:[{path:n,code:f,message:""}]},p={valid:!1,errors:[{path:n,code:m,message:""}]},P={valid:!1,data:void 0,errors:[{path:n,code:f,message:""}]},E={valid:!1,data:void 0,errors:[{path:n,code:m,message:""}]},R={valid:!0,data:null,errors:[]};return{validate:(x,O,v)=>d(x,O)?u(x,O)?W:(p.errors[0].message=C(V,x,n,O),p):(T.errors[0].message=C(F,x,n,O),T),parse:(x,O,v)=>d(x,O)?u(x,O)?(R.data=y(x),R):(E.errors[0].message=C(V,x,n,O),E):(P.errors[0].message=C(F,x,n,O),P)}}let h={path:n,code:"",message:""};return{validate:(d,u,f={})=>{for(let m=0;m<r;m++)if(!o[m](d,u)){if(f.abortEarlyOnEachField!==!1)return h.code=e[m].code||e[m].pluginName||"VALIDATION_ERROR",h.message=C(e[m],d,n,u),{valid:!1,errors:[{...h}]};let y=[];y.push({path:n,code:e[m].code||e[m].pluginName||"VALIDATION_ERROR",message:C(e[m],d,n,u)});for(let F=m+1;F<r;F++)o[F](d,u)||y.push({path:n,code:e[F].code||e[F].pluginName||"VALIDATION_ERROR",message:C(e[F],d,n,u)});return{valid:!1,errors:y}}return W},parse:(d,u,f={})=>{let m=e.some(V=>V.skipForNull===!0),y=e.some(V=>V.skipForUndefined===!0);if(d===null&&m||d===void 0&&y)return{valid:!0,data:d,errors:[]};for(let V=0;V<r;V++)if(!o[V](d,u)){if(f.abortEarlyOnEachField!==!1)return h.code=e[V].code||e[V].pluginName||"VALIDATION_ERROR",h.message=C(e[V],d,n,u),{valid:!1,data:void 0,errors:[{...h}]};let T=[];T.push({path:n,code:e[V].code||e[V].pluginName||"VALIDATION_ERROR",message:C(e[V],d,n,u)});for(let p=V+1;p<r;p++)o[p](d,u)||T.push({path:n,code:e[p].code||e[p].pluginName||"VALIDATION_ERROR",message:C(e[p],d,n,u)});return{valid:!1,data:void 0,errors:T}}let F=d;if(l===1)F=c[0](F);else if(l===2)F=c[0](F),F=c[1](F);else if(l>0)for(let V=0;V<l;V++)F=c[V](F);return{valid:!0,data:F,errors:[]}},accessor:a}}function ge(e){if(e.length===0)return t=>t;if(e.length===1){let t=e[0];return n=>n?.[t]}if(e.length===2){let[t,n]=e;return a=>a?.[t]?.[n]}if(e.length===3){let[t,n,a]=e;return r=>r?.[t]?.[n]?.[a]}if(e.length===4){let[t,n,a,r]=e;return s=>s?.[t]?.[n]?.[a]?.[r]}if(e.length===5){let[t,n,a,r,s]=e;return o=>o?.[t]?.[n]?.[a]?.[r]?.[s]}return t=>{let n=t,a=e.length;for(let r=0;r<a;r++){let s=e[r];if(n=n?.[s],n===void 0)return}return n}}function pe(e){return ge(e.split(_))}function he(e){let t=pe(e);return n=>t(n)!==void 0}function ee(e){let t=e.split(_);if(t.length===1){let n=t[0];return(a,r)=>{a[n]=r}}if(t.length===2){let[n,a]=t;return(r,s)=>{r[n]||(r[n]={}),r[n][a]=s}}if(t.length===3){let[n,a,r]=t;return(s,o)=>{s[n]||(s[n]={}),s[n][a]||(s[n][a]={}),s[n][a][r]=o}}return(n,a)=>{let r=n;for(let s=0;s<t.length-1;s++){let o=t[s];r[o]||(r[o]={}),r=r[o]}r[t[t.length-1]]=a}}function $(e){if(!e.includes(_))return a=>a[e];let t=e.split(_),n=t.length;if(n===2){let[a,r]=t;return s=>{let o=s[a];return Array.isArray(o)?o:o!=null&&typeof o=="object"?o[r]:void 0}}return a=>{let r=a;for(let s=0;s<n;s++){if(r==null||typeof r!="object")return;let o=t[s],i=r[o];if(Array.isArray(i)&&s<n-1){let c=t.slice(s+1).join(".");return{__isArrayElementField:!0,values:i.map(h=>{if(h==null||typeof h!="object")return;if(c.indexOf(".")===-1)return h[c];let g=h,b=t.slice(s+1),d=b.length;for(let u=0;u<d;u++){if(g==null||typeof g!="object")return;g=g[b[u]]}return g}),arrayPath:t.slice(0,s+1).join(".")}}r=i}return r}}function te(e){if(!e.includes("[*]"))return{hasArrayElements:!1,segments:e.split(_).map(s=>({name:s,isArrayElement:!1}))};let n=e.split(_),a=[];for(let s of n)if(s.endsWith("[*]")){let o=s.slice(0,-3);a.push({name:o,isArrayElement:!0})}else a.push({name:s,isArrayElement:!1});let r=a.findIndex(s=>s.isArrayElement);if(r!==-1){let s=a.slice(0,r+1).map(i=>i.name).join(_),o=a.slice(r+1).map(i=>i.name).join(_);return{hasArrayElements:!0,segments:a,baseArrayPath:s,elementPath:o||""}}return{hasArrayElements:!0,segments:a}}function me(e){let t=te(e);if(!t.hasArrayElements||!t.baseArrayPath)return()=>null;let n=pe(t.baseArrayPath),a=t.elementPath||"";return r=>{let s=n(r);if(!Array.isArray(s))return null;let o;if(a==="")o=s;else{let i=pe(a);o=s.map(c=>i(c))}return{elements:o,basePath:t.baseArrayPath,elementPath:a}}}function re(e){let t=e.match(/^(.+\[\*\])\[\*\]$/);if(t)return{isArrayElementPath:!0,arrayPath:t[1],elementField:""};if(e.match(/^(.+?)(\[\*\]\.(.+))?$/)&&e.includes("[*].")){let o=e.split(/\[\*\]\./);if(o.length>=2){let i=o[o.length-1];if(i.includes("[*]")){let c=i.replace(/\[\*\]$/,"");return{isArrayElementPath:!0,arrayPath:o.slice(0,-1).concat(c).join("."),elementField:""}}else return{isArrayElementPath:!0,arrayPath:o.slice(0,-1).join("."),elementField:i}}}let a=e.match(/^([^\[]+)\[\*\]\.(.+)$/);if(a)return{isArrayElementPath:!0,arrayPath:a[1],elementField:a[2]};let r=e.match(/^([^\[]+)\[\*\]$/);if(r)return{isArrayElementPath:!0,arrayPath:r[1],elementField:""};let s=e.match(/^([^\.]+)\.\*\.(.+)$/);return s?{isArrayElementPath:!0,arrayPath:s[1],elementField:s[2]}:{isArrayElementPath:!1}}function Ce(e){let t=[],n=new Set;for(let o of e){let i=re(o.path);if(i.isArrayElementPath&&i.arrayPath){if(n.add(i.arrayPath),i.elementField&&i.elementField.includes("[*]")){let c=`${i.arrayPath}.${i.elementField.split("[*]")[0]}`;n.add(c)}t.push({...o,originalPath:o.path})}else t.push(o)}for(let o of n)t.some(i=>i.path===o&&i.isArrayField)||t.push({path:o,isArrayField:!0});let a=new Set;for(let o of t)if(o.originalPath){let i=re(o.originalPath);if(i.isArrayElementPath&&i.elementField&&i.elementField.includes("[*]")){let c=i.elementField.split("[*]")[0],l=`${i.arrayPath}.${c}`;!a.has(l)&&!t.some(h=>h.path===l&&h.isArrayField)&&a.add(l)}}for(let o of a)t.push({path:o,isArrayField:!0});let r=t.filter(o=>o.isArrayField?o.path.includes("[*]")?!!o.path.match(/\[\*\]$/):!0:!1);r.sort((o,i)=>{let c=o.path.split(".").length,l=i.path.split(".").length;return c-l});let s=new Map;for(let o of r){let i=o.path,c=i.split(".").length-1,l;for(let f of s.keys())i.startsWith(f+".")?(!l||f.length>l.length)&&(l=f):i.startsWith(f+"[*]")&&f!==i&&(!l||f.length>l.length)&&(l=f);let h=t.filter(f=>{let m=f.originalPath||f.path,y=re(m);return y.isArrayElementPath&&y.arrayPath===i?!0:m.startsWith(i+".")});if(h.length===0)continue;let g=[],b=[];for(let f of h){let m=f.originalPath||f.path,y=re(m),F;y.isArrayElementPath&&y.arrayPath===i&&y.elementField!==void 0?F=y.elementField:F=m.substring(i.length+1),r.some(T=>T.path!==i&&T.path.startsWith(i+".")&&f.path.startsWith(T.path+"."))||g.push(F),f.isArrayField||b.push(f.originalPath||f.path)}let d=new Map;for(let f of g){let m=f.split(".");d.set(f,ge(m))}let u={arrayPath:i,elementFields:g,fullFieldPaths:b,validators:new Map,accessors:d,childArrays:new Map,depth:c,parentPath:l};s.set(i,u)}for(let[o,i]of s)if(i.parentPath){let c=s.get(i.parentPath);if(c){let l;o.startsWith(i.parentPath+".")?l=o.substring(i.parentPath.length+1):o.startsWith(i.parentPath+"[*]")?l=o.substring(i.parentPath.length):l=o.substring(i.parentPath.length+1),c.childArrays.set(l,i)}}return s}function Te(e,t){if(e.validators.size===0)for(let n of e.fullFieldPaths){let a=t.get(n);a&&e.validators.set(n,a)}return function(a,r,s,o=!0,i=D,c=""){let l=[],h=i===k?[...a]:void 0,g=!1;if(!Array.isArray(a))return{errors:l,transformedData:h};for(let b=0;b<a.length;b++){let d=a[b],u=i===k?typeof d=="object"&&d!==null?{...d}:d:void 0,f=!1,m=c?`${c}[${b}]`:`${e.arrayPath}[${b}]`;for(let y of e.elementFields){if(y===""){let O=null,v=`${e.arrayPath}[*]`;if(O=e.validators.get(v),!O)for(let M of e.fullFieldPaths){let q=e.validators.get(M);if(q){O=q;break}}if(!O)continue;let N=u||d,w=m,j;if(i===D)if(O.validate)j=O.validate(N,r,{abortEarlyOnEachField:g});else if(O.validateSlow)j=O.validateSlow(N,r,{abortEarlyOnEachField:g});else if(O.validateFast)j=O.validateFast(N,r);else continue;else if(i===k)if(O.parse)j=O.parse(N,r,{abortEarlyOnEachField:g});else if(O.parseSlow)j=O.parseSlow(N,r,{abortEarlyOnEachField:g});else if(O.parseFast)j=O.parseFast(N,r);else continue;else continue;if(j.valid)i===k&&j.data!==void 0&&h&&(h[b]=j.data);else{if(f=!0,j.errors&&j.errors.length>0)for(let M of j.errors)l.push({path:w,code:M.code||(i===k?"PARSE_ERROR":"VALIDATION_ERROR"),message:M.message||(i===k?"Parse failed":"Validation failed"),paths:()=>[w]});else l.push({path:w,code:i===k?"PARSE_ERROR":"VALIDATION_ERROR",message:i===k?"Parse failed":"Validation failed",paths:()=>[w]});if(g)break}continue}let F=`${e.arrayPath}.${y}`,V=`${e.arrayPath}[*].${y}`,T=`${e.arrayPath}.*.${y}`,p=e.validators.get(F);if(p||(p=e.validators.get(V)),p||(p=e.validators.get(T)),!p)for(let O of e.fullFieldPaths){let v=e.validators.get(O);if(v&&O.includes(y)){p=v;break}}if(!p)continue;let P=e.accessors.get(y),E=P?P(u||d):void 0,R=`${m}.${y}`,x;if(i===D)if(p.validate)x=p.validate(E,r,{abortEarlyOnEachField:g});else if(p.validateSlow)x=p.validateSlow(E,r,{abortEarlyOnEachField:g});else if(p.validateFast)x=p.validateFast(E,r);else continue;else if(i===k)if(p.parse)x=p.parse(E,r,{abortEarlyOnEachField:g});else if(p.parseSlow)x=p.parseSlow(E,r,{abortEarlyOnEachField:g});else if(p.parseFast)x=p.parseFast(E,r);else continue;else continue;if(x.valid)i===k&&x.data!==void 0&&u&&wt(u,y,x.data);else{if(f=!0,x.errors&&x.errors.length>0)for(let O of x.errors)l.push({path:R,code:O.code||(i===k?"PARSE_ERROR":"VALIDATION_ERROR"),message:O.message||(i===k?"Parse failed":"Validation failed"),paths:()=>[R]});else l.push({path:R,code:i===k?"PARSE_ERROR":"VALIDATION_ERROR",message:i===k?"Parse failed":"Validation failed",paths:()=>[R]});if(g)break}}for(let[y,F]of e.childArrays){let V,T;if(y.startsWith("[*]")?(V=u||d,T=m):(V=u?.[y]||d[y],T=`${m}.${y}`),Array.isArray(V)){let P=Te(F,t)(V,r,s,o,i,T);P.errors.length>0&&(l.push(...P.errors),f=!0),i===k&&P.transformedData&&u&&(u[y]=P.transformedData)}}if(i===k&&h&&u&&typeof u=="object"&&(h[b]=u),f&&s)return{errors:l,transformedData:h}}return{errors:l,transformedData:h}}}function wt(e,t,n){ee(t)(e,n)}function Ct(e){let t=Ce(e),n=new Map;for(let[a,r]of t)if(!r.parentPath){let s=Me(r,t),o={arrayPath:r.arrayPath,elementFields:r.elementFields,fullFieldPaths:s,validators:r.validators,accessors:r.accessors,_nestedInfo:r};n.set(a,o)}return n}function Me(e,t){let n=[];n.push(...e.fullFieldPaths);for(let[a,r]of e.childArrays){let s=Me(r,t);n.push(...s)}return n}function Ie(e){return Ct(e)}function ne(e,t){if(e._nestedInfo){for(let a of e.fullFieldPaths){let r=t.get(a);r&&e._nestedInfo.validators.set(a,r)}let n=Te(e._nestedInfo,t);return function(r,s,o,i=!0,c=D){let l=n(r,s,o,i,c);return{errors:l.errors,transformedData:l.transformedData}}}for(let n of e.fullFieldPaths){let a=t.get(n);a&&e.validators.set(n,a)}return function(a,r,s,o=!0,i=D){if(e.optimizedValidator&&(e.arrayStructure?.depth??0)>1){let g=e.optimizedValidator(a,r,{abortEarly:s,abortEarlyOnEachField:o,mode:i});return{errors:g.errors,transformedData:g.transformedData}}let l=[];if(!Array.isArray(a))return{errors:l};if(a.length===0)return{errors:l};let h=i===k?[...a]:void 0;for(let g=0;g<a.length;g++){let b=a[g],d=i===k?{...b}:void 0,u=!1;for(let f of e.elementFields){let m=`${e.arrayPath}.${f}`,y=e.validators.get(m);if(!y)continue;let F=e.accessors.get(f),V=F?F(d||b):void 0,T=`${e.arrayPath}[${g}].${f}`,p;if(i===D)p=y.validate(V,r,{abortEarlyOnEachField:!1});else if(i===k)p=y.parse(V,r,{abortEarlyOnEachField:!1});else continue;if(p.isValid())i===k&&p.data!==void 0&&d&&Mt(d,f,p.data);else if(u=!0,p.errors&&p.errors.length>0)for(let P of p.errors)l.push({path:T,code:P.code||(i===k?"PARSE_ERROR":"VALIDATION_ERROR"),message:P.message||(i===k?"Parse failed":"Validation failed"),paths:()=>[T]});else l.push({path:T,code:i===k?"PARSE_ERROR":"VALIDATION_ERROR",message:i===k?"Parse failed":"Validation failed",paths:()=>[T]})}if(i===k&&h&&d&&(h[g]=d),u&&s)return{errors:l,transformedData:h}}return{errors:l,transformedData:h}}}function Mt(e,t,n){ee(t)(e,n)}function Se(e){return Object.freeze(e.split(_))}function It(e){let t=e.length;switch(t){case 0:return y=>y;case 1:let n=e[0];return y=>y?.[n];case 2:let a=e[0],r=e[1];return y=>y?.[a]?.[r];case 3:let s=e[0],o=e[1],i=e[2];return y=>y?.[s]?.[o]?.[i];case 4:let c=e[0],l=e[1],h=e[2],g=e[3];return y=>y?.[c]?.[l]?.[h]?.[g];case 5:let b=e[0],d=e[1],u=e[2],f=e[3],m=e[4];return y=>y?.[b]?.[d]?.[u]?.[f]?.[m];default:return y=>{let F=y;for(let V=0;V<t;V++)if(F=F?.[e[V]],F===void 0)return;return F}}}function ae(e){let t=Se(e);return It(t)}function ie(e){let t=Se(e),n=t.length,a;switch(n){case 1:let r=t[0];a=(h,g)=>{h[r]=g};break;case 2:let s=t[0],o=t[1];a=(h,g)=>{h[s]||(h[s]={}),h[s][o]=g};break;case 3:let i=t[0],c=t[1],l=t[2];a=(h,g)=>{h[i]||(h[i]={}),h[i][c]||(h[i][c]={}),h[i][c][l]=g};break;default:a=(h,g)=>{let b=h;for(let d=0;d<n-1;d++){let u=t[d];b[u]||(b[u]={}),b=b[u]}b[t[n-1]]=g}}return a}function _e(e){let t=Array.from(e),n=t.length;if(n===0)return{validateRaw:()=>!0,parseRaw:a=>({valid:!0,data:a}),validate:a=>A.ok(a),parse:a=>A.ok(a)};if(n===1){let[a,r]=t[0],s=!a.includes("."),o=s?null:ae(a),i=s?null:ie(a);return{validateRaw:(c,l)=>{if(!c)return!1;let h=s?c[a]:o(c);return r.validate(h,c,l).valid},parseRaw:(c,l)=>{if(!c)return{valid:!1,error:"Value required"};let h=s?c[a]:o(c),g=r.parse(h,c,l);if(!g.valid)return{valid:!1,error:g.errors[0]};if(g.data!==void 0&&g.data!==h){let b={...c};return s?b[a]=g.data:i(b,g.data),{valid:!0,data:b}}return{valid:!0,data:c}},validate:(c,l)=>{if(!c)return A.error([{path:"",message:"Value required",code:"REQUIRED",paths:()=>[""]}]);let h=s?c[a]:o(c),g=r.validate(h,c,l);if(!g.valid){let b=g.errors.map(d=>({path:d.path,code:d.code,message:d.message,paths:()=>[d.path]}));return A.error(b)}return A.ok(c)},parse:function(c,l){let h=this.parseRaw(c,l);return h.valid?A.ok(h.data):A.error([h.error])}}}return n<=3?St(t):_t(t)}function St(e){let t=e.map(([n,a])=>({path:n,isSimple:!n.includes("."),accessor:n.includes(".")?ae(n):null,setter:n.includes(".")?ie(n):null,validator:a}));return t.sort((n,a)=>n.isSimple&&!a.isSimple?-1:!n.isSimple&&a.isSimple?1:0),{validateRaw:n=>{if(!n)return!1;if(t.length===2){let r=t[0],s=t[1],o=r.isSimple?n[r.path]:r.accessor(n);if(!r.validator.validate(o,n).valid)return!1;let i=s.isSimple?n[s.path]:s.accessor(n);return!!s.validator.validate(i,n).valid}else if(t.length===3){let r=t[0],s=t[1],o=t[2],i=r.isSimple?n[r.path]:r.accessor(n);if(!r.validator.validate(i,n).valid)return!1;let c=s.isSimple?n[s.path]:s.accessor(n);if(!s.validator.validate(c,n).valid)return!1;let l=o.isSimple?n[o.path]:o.accessor(n);return!!o.validator.validate(l,n).valid}let a=t.length;for(let r=0;r<a;r++){let s=t[r],o=s.isSimple?n[s.path]:s.accessor(n);if(!s.validator.validate(o,n).valid)return!1}return!0},parseRaw:n=>{if(!n)return{valid:!1,error:"Value required"};let a=!1,r=n;if(t.length===2){let s=t[0],o=t[1],i=s.isSimple?r[s.path]:s.accessor(r),c=s.validator.parse(i,r);if(!c.valid)return{valid:!1,error:c.errors[0]};c.data!==void 0&&c.data!==i&&(a||(r={...n},a=!0),s.isSimple?r[s.path]=c.data:s.setter(r,c.data));let l=o.isSimple?r[o.path]:o.accessor(r),h=o.validator.parse(l,r);if(!h.valid)return{valid:!1,error:h.errors[0]};h.data!==void 0&&h.data!==l&&(a||(r={...n},a=!0),o.isSimple?r[o.path]=h.data:o.setter(r,h.data))}else if(t.length===3){let s=t[0],o=t[1],i=t[2],c=s.isSimple?r[s.path]:s.accessor(r),l=s.validator.parse(c,r);if(!l.valid)return{valid:!1,error:l.errors[0]};l.data!==void 0&&l.data!==c&&(a||(r={...n},a=!0),s.isSimple?r[s.path]=l.data:s.setter(r,l.data));let h=o.isSimple?r[o.path]:o.accessor(r),g=o.validator.parse(h,r);if(!g.valid)return{valid:!1,error:g.errors[0]};g.data!==void 0&&g.data!==h&&(a||(r={...n},a=!0),o.isSimple?r[o.path]=g.data:o.setter(r,g.data));let b=i.isSimple?r[i.path]:i.accessor(r),d=i.validator.parse(b,r);if(!d.valid)return{valid:!1,error:d.errors[0]};d.data!==void 0&&d.data!==b&&(a||(r={...n},a=!0),i.isSimple?r[i.path]=d.data:i.setter(r,d.data))}else{let s=t.length;for(let o=0;o<s;o++){let i=t[o],c=i.isSimple?r[i.path]:i.accessor(r),l=i.validator.parse(c,r);if(!l.valid)return{valid:!1,error:l.errors[0]};l.data!==void 0&&l.data!==c&&(a||(r={...n},a=!0),i.isSimple?r[i.path]=l.data:i.setter(r,l.data))}}return{valid:!0,data:r}},validate:function(n){return this.validateRaw(n)?A.ok(n):A.error([{path:"",code:"VALIDATION_ERROR",message:"Validation failed",paths:()=>[""]}])},parse:function(n){let a=this.parseRaw(n);return a.valid?A.ok(a.data):A.error([a.error])}}}function _t(e){let t=e.map(([n,a])=>({path:n,isSimple:!n.includes("."),accessor:n.includes(".")?ae(n):null,setter:n.includes(".")?ie(n):null,validator:a}));return t.sort((n,a)=>n.isSimple&&!a.isSimple?-1:!n.isSimple&&a.isSimple?1:0),{validateRaw:n=>{if(!n)return!1;let a=t.length;for(let r=0;r<a;r++){let s=t[r],o=s.isSimple?n[s.path]:s.accessor(n);if(!s.validator.validate(o,n).valid)return!1}return!0},parseRaw:n=>{if(!n)return{valid:!1,error:"Value required"};let a=n,r=!1,s=t.length;for(let o=0;o<s;o++){let i=t[o],c=i.isSimple?a[i.path]:i.accessor(a),l=i.validator.parse(c,a);if(!l.valid)return{valid:!1,error:l.errors[0]};l.data!==void 0&&l.data!==c&&(r||(a={...n},r=!0),i.isSimple?a[i.path]=l.data:i.setter(a,l.data))}return{valid:!0,data:a}},validate:function(n){return this.validateRaw(n)?A.ok(n):A.error([{path:"",code:"VALIDATION_ERROR",message:"Validation failed",paths:()=>[""]}])},parse:function(n){let a=this.parseRaw(n);return a.valid?A.ok(a.data):A.error([a.error])}}}var Bt=[],tn=Object.freeze({valid:!0,value:null,errors:Bt});function Le(e){function t(n){if(n.length===0)return Dt(e);let a=n.map(p=>{let P=!1,E=!1;if(p.builderFunction)try{let R=U(p.path,e),x=p.builderFunction(R);x?._validators&&(P=x._validators.some(O=>O.name==="optional"),E=x._validators.some(O=>O.name==="required"))}catch{P=!1,E=!1}return{path:p.path,builderFunction:p.builderFunction||(()=>{throw new Error(`Field ${p.path} uses object definition form`)}),isOptional:P,hasRequired:E}}),r=ye(a,e),{fastFields:s,slowFields:o}=je(r),i=Ie(n),c=new Set,l=new Map,h=new Map;for(let[p,P]of i)if(P._nestedInfo){l.set(p,P);for(let E of P.fullFieldPaths)c.add(E);c.add(p)}else{h.set(p,P);for(let E of P.fullFieldPaths)c.add(E)}let g=s.filter(p=>!c.has(p)),b=o.filter(p=>!c.has(p)),d=be(b,n.filter(p=>!c.has(p.path)),e),u=be(g,n.filter(p=>!c.has(p.path)),e),f=new Map,m=n.map(p=>p.path),y=be(m,n,e);for(let[p,P]of y)f.set(p,P);let F=new Map,V=new Map,T=new Map;for(let p of a)p.isOptional&&F.set(p.path,!0),p.hasRequired&&V.set(p.path,!0);for(let p of n)p.metadata?.fieldOptions&&T.set(p.path,p.metadata.fieldOptions);for(let[p,P]of f)p.includes("[*]")&&(u.has(p)&&u.set(p,P),d.has(p)&&d.set(p,P));return $t(d,u,n,e,l,f,F,V,T)}return{buildOptimizedValidator:t}}function Dt(e){let t=se([],e);return{validate:()=>A.ok({}),parse:(n,a)=>A.ok(n),pick:n=>t.createPickedValidator(n)}}function be(e,t,n){let a=new Map,r=new Map,s=new Map;for(let o of e){let i=t.find(c=>c.path===o);if(i&&i.builderFunction){let c=$(o),l=U(o,n),h=i.builderFunction(l);if(h&&typeof h.build=="function"&&(h=h.build()),h._validators?.some?.(d=>d.__isRecursive===!0)){let d=h._validators.find(u=>u.__isRecursive===!0);if(d?.recursive){let u={targetFieldPath:d.recursive.targetFieldPath,maxDepth:d.recursive.maxDepth||10};o.includes("[*]")?s.set(o,u):r.set(o,u)}}let b=G({path:i.path,builderFunction:i.builderFunction||(()=>({}))},n,"fast_separated",c);a.set(o,b)}}for(let[o,i]of r){let c=a.get(o),l=null;if(i.targetFieldPath==="__Self")l=null;else if(i.targetFieldPath==="__Element")l=null;else{let g=t.find(b=>b.path===i.targetFieldPath);g&&g.builderFunction&&(l=a.get(i.targetFieldPath)||null)}let h=zt(c,l,o,i.targetFieldPath,i.maxDepth,t.filter(g=>g.builderFunction).map(g=>({path:g.path,builderFunction:g.builderFunction})),n,a);a.set(o,h)}for(let[o,i]of s){let c=a.get(o),h=te(o).baseArrayPath+"[*]";if(Array.from(a.keys()).filter(b=>b.startsWith(h)&&b!==o).length>0){let b=qt(c,o,i.targetFieldPath,i.maxDepth,t.filter(d=>d.builderFunction).map(d=>({path:d.path,builderFunction:d.builderFunction})),n,a);a.set(o,b)}}return a}function $t(e,t,n,a,r,s,o,i,c){let l=r.size>0,h=e.size>0,g=t.size+e.size,b=!l&&!h&&t.size<=10;if((process.env.LUQ_ULTRA_FAST==="true"||global.__LUQ_ULTRA_FAST__===!0)&&!l&&g<=50){let V=new Map([...t,...e]),T=_e(V),p=se(n.map(R=>({path:R.path,builderFunction:R.builderFunction||(()=>({})),fieldType:R.fieldType||"unknown"})),a);return{validate:(R,x)=>{if(R==null)return A.error([{path:"",message:"Value is required",code:"REQUIRED",paths:()=>[""]}]);let O=R;if(c&&c.size>0){let v={...O};for(let[N,w]of c){let j=I(v,N),M=K(j,w,{allValues:v});M!==j&&B(v,N,M)}O=v}return T.validate(O,x)},parse:(R,x)=>{if(R==null)return A.error([{path:"",message:"Value is required",code:"REQUIRED",paths:()=>[""]}]);let v={...R};if(c&&c.size>0)for(let[N,w]of c){let j=I(v,N),M=K(j,w,{allValues:v});M!==j&&B(v,N,M)}return T.parse(v,x)},pick:R=>p.createPickedValidator(R),validateRaw:T.validateRaw.bind(T),parseRaw:T.parseRaw.bind(T)}}if(b)return Lt(t,n.map(V=>({path:V.path,builderFunction:V.builderFunction||(()=>({}))})),a,c);let f=Kt(e,t,r,s,o,i,c),m=n.map(V=>({path:V.path,builderFunction:V.builderFunction||(()=>({})),fieldType:V.fieldType||"unknown"})),y={validate:(V,T)=>f.executeValidate(V,T),parse:(V,T)=>f.executeParse(V,T),pick:null},F=se(m,a,void 0,y);return y.pick=V=>F.createPickedValidator(V),y}function Lt(e,t,n,a){let r=Array.from(e),s=r.length,o=[];for(let g=0;g<s;g++){let[b,d]=r[g];o.push({path:b,accessor:d.accessor||$(b),validator:d})}let i=t.map(g=>({path:g.path,builderFunction:g.builderFunction||(()=>({})),fieldType:g.fieldType||"unknown"})),c=se(i,n),l=[],h=A.ok({});if(s===1){let{path:g,accessor:b,validator:d}=o[0];return{validate:(u,f)=>{if(u==null)return A.error([{path:"",message:"Value is required",code:"REQUIRED",paths:()=>[""]}]);let m=u;if(a&&a.size>0){let V={...m};for(let[T,p]of a){let P=I(V,T),E=K(P,p,{allValues:V});E!==P&&B(V,T,E)}m=V}let y=b(m),F=d.validate(y,m,f);if(!F.valid){let V=F.errors.map(T=>({path:T.path,code:T.code,message:T.message,paths:()=>[T.path]}));return A.error(V)}return A.ok(u)},parse:(u,f)=>{if(u==null)return A.error([{path:"",message:"Value is required",code:"REQUIRED",paths:()=>[""]}]);let m=u,y={...m};if(a&&a.size>0)for(let[T,p]of a){let P=I(y,T),E=K(P,p,{allValues:y});E!==P&&B(y,T,E)}let F=b(y),V=d.parse(F,m,f);if(!V.valid){let T=V.errors.map(p=>({path:p.path,code:p.code,message:p.message,paths:()=>[p.path]}));return A.error(T)}return V.data!==void 0&&V.data!==F?(B(y,g,V.data),A.ok(y)):A.ok(y)},pick:u=>c.createPickedValidator(u)}}return{validate:(g,b)=>{if(g==null)return A.error([{path:"",message:"Value is required",code:"REQUIRED",paths:()=>[""]}]);let d=g;if(a&&a.size>0){let m={...d};for(let[y,F]of a){let V=I(m,y),T=K(V,F,{allValues:m});T!==V&&B(m,y,T)}d=m}let u=b?.abortEarly!==!1,f=b?.abortEarlyOnEachField!==!1;l.length=0;for(let m=0;m<s;m++){let{path:y,accessor:F,validator:V}=o[m],T=F(d),p=V.validate(T,d,{abortEarlyOnEachField:f});if(!p.valid){let P=p.errors;for(let E=0;E<P.length;E++){let R=P[E];l.push({path:R.path,code:R.code,message:R.message,paths:()=>[R.path]})}if(u)return A.error(l.slice())}}return l.length>0?A.error(l.slice()):A.ok(g)},parse:(g,b)=>{if(g==null)return A.error([{path:"",message:"Value is required",code:"REQUIRED",paths:()=>[""]}]);let u={...g};if(a&&a.size>0)for(let[y,F]of a){let V=I(u,y),T=K(V,F,{allValues:u});T!==V&&B(u,y,T)}let f=b?.abortEarly!==!1,m=b?.abortEarlyOnEachField!==!1;l.length=0;for(let y=0;y<s;y++){let{path:F,accessor:V,validator:T}=o[y],p=V(u),P=T.parse(p,u,{abortEarlyOnEachField:m});if(P.valid)P.data!==void 0&&B(u,F,P.data);else{let E=P.errors;for(let R=0;R<E.length;R++){let x=E[R];l.push({path:x.path,code:x.code,message:x.message,paths:()=>[x.path]})}if(f)return A.error(l.slice())}}return l.length>0?A.error(l.slice()):A.ok(u)},pick:g=>c.createPickedValidator(g)}}function Kt(e,t,n,a,r,s,o){let i=new Map,c=new Map;for(let[g,b]of t)i.has(g)||(i.set(g,b.accessor||$(g)),c.set(g,he(g)));for(let[g,b]of e)i.has(g)||(i.set(g,b.accessor||$(g)),c.set(g,he(g)));function l(g,b){if(g==null)return A.error([{path:"",message:"Value is required",code:"REQUIRED",paths:()=>[""]}]);let d=[],u=g;if(o&&o.size>0){let y={...u};for(let[F,V]of o){let T=I(y,F),p=K(T,V,{allValues:y});p!==T&&B(y,F,p)}u=y}let f=b?.abortEarly!==!1,m=b?.abortEarlyOnEachField!==!1;for(let[y,F]of n){let V=i.get(y)||$(y);i.has(y)||i.set(y,V);let T=V(u),p=a.get(y);if(p){let P;if(p.validate?P=p.validate(T,u,{abortEarlyOnEachField:m}):p.validateSlow?P=p.validateSlow(T,u,{abortEarlyOnEachField:m}):p.validateFast&&(P=p.validateFast(T,u)),P&&!P.valid){if(P.errors&&P.errors.length>0?d.push(...P.errors):d.push({path:y,code:"VALIDATION_ERROR",message:"Array field validation failed",paths:()=>[y]}),f)return A.error(d);continue}}if(Array.isArray(T)){let E=ne(F,a)(T,u,f,m,D);if(E.errors.length>0&&(d.push(...E.errors),f))return A.error(d)}}for(let[y,F]of t){if(y.includes(".")&&!y.includes("[")&&!y.includes("*")){let V=y.split(".");if(V.length>1){let T=!1;for(let p=0;p<V.length-1;p++){let P=V.slice(0,p+1).join("."),E=I(u,P);if(Array.isArray(E)&&E.length===0){T=!0;break}}if(T)continue}}if(!y.includes("[")&&!y.includes("*")){let V=i.get(y),T=V?V(u):I(u,y),p=F.validate(T,u,{abortEarlyOnEachField:m});if(!p.valid){if(p.errors&&p.errors.length>0)for(let P=0;P<p.errors.length;P++)d.push(p.errors[P]);if(f)return A.error(d)}}else{if(y.includes("[*]")||y.includes(".*")){let E=De(y,F,u,u,f,m);if(E.length>0&&(d.push(...E),f))return A.error(d);continue}let T=i.get(y),p=T?T(u):I(u,y),P=F.validate(p,u,{abortEarlyOnEachField:m});if(!P.valid){if(P.errors&&P.errors.length>0)for(let E=0;E<P.errors.length;E++)d.push(P.errors[E]);if(f)return A.error(d)}}}for(let[y,F]of e){if(y.includes(".")&&!y.includes("[")&&!y.includes("*")){let v=y.split(".");if(v.length>1){let N=!1;for(let w=0;w<v.length-1;w++){let j=v.slice(0,w+1).join("."),M=I(u,j);if(Array.isArray(M)&&M.length===0){N=!0;break}}if(N)continue}}if(y.includes("[*]")||y.includes(".*")){let v=De(y,F,u,u,f,m);if(v.length>0&&(d.push(...v),f))return A.error(d);continue}let T=c.get(y),p=T?T(u):Be(u,y),P=r.get(y)||!1,E=s.get(y)||!1;if(!p&&P)continue;if(!p&&!P&&!E){if(d.push({path:y,code:"REQUIRED",message:`Field '${y}' is required`,paths:()=>[y]}),f)return A.error(d);continue}let R=i.get(y),x=R?R(u):I(u,y),O=F.validate(x,u,{abortEarlyOnEachField:m});if(!O.valid){if(O.errors&&O.errors.length>0)for(let v=0;v<O.errors.length;v++)d.push(O.errors[v]);if(f)return A.error(d)}}return d.length>0?A.error(d):A.ok(g)}function h(g,b){if(g==null)return A.error([{path:"",message:"Value is required",code:"REQUIRED",paths:()=>[""]}]);let d=[],f={...g};if(o&&o.size>0)for(let[F,V]of o){let T=I(f,F),p=K(T,V,{allValues:f});p!==T&&B(f,F,p)}let m=b?.abortEarly!==!1,y=b?.abortEarlyOnEachField!==!1;for(let[F,V]of n){let T=i.get(F)||$(F);i.has(F)||i.set(F,T);let p=T(f),P=a.get(F);if(P){let E;if(P.parse?E=P.parse(p,f,{abortEarlyOnEachField:y}):P.parseSlow?E=P.parseSlow(p,f,{abortEarlyOnEachField:y}):P.parseFast&&(E=P.parseFast(p,f)),E&&!E.valid){if(E.errors&&E.errors.length>0?d.push(...E.errors):d.push({path:F,code:"PARSE_ERROR",message:"Array field parsing failed",paths:()=>[F]}),m)return A.error(d);continue}else if(E&&E.data!==void 0){B(f,F,E.data);let R=T(f);if(Array.isArray(R)){let O=ne(V,a)(R,f,m,y,k);if(O.errors.length>0&&(d.push(...O.errors),m))return A.error(d);O.transformedData&&B(f,F,O.transformedData)}continue}}if(Array.isArray(p)){let R=ne(V,a)(p,f,m,y,k);if(R.errors.length>0&&(d.push(...R.errors),m))return A.error(d);R.transformedData&&B(f,F,R.transformedData)}}for(let[F,V]of t){let T=i.get(F),p=T?T(f):I(f,F),P=V.parse(p,f,{abortEarlyOnEachField:y});if(P.valid)P.data!==void 0&&B(f,F,P.data);else{if(P.errors&&P.errors.length>0)for(let E=0;E<P.errors.length;E++)d.push(P.errors[E]);if(m)return A.error(d)}}for(let[F,V]of e){let T=c.get(F),p=T?T(f):Be(f,F),P=r.get(F)||!1,E=s.get(F)||!1;if(!p&&P)continue;if(!p&&!P&&!E){if(d.push({path:F,code:"REQUIRED",message:`Field '${F}' is required`,paths:()=>[F]}),m)return A.error(d);continue}let R=i.get(F),x=R?R(f):I(f,F),O=V.parse(x,f,{abortEarlyOnEachField:y});if(O.valid)O.data!==void 0&&B(f,F,O.data);else{if(O.errors&&O.errors.length>0)for(let v=0;v<O.errors.length;v++)d.push(O.errors[v]);if(m)return A.error(d)}}return d.length>0?A.error(d):A.ok(f)}return{executeValidate:l,executeParse:h}}function I(e,t){return $(t)(e)}function Ut(e){if(e.includes(_)){let t=e.split(_),n=t.length-1;return a=>{let r=a;for(let o=0;o<n;o++){let i=t[o];if(!(i in r)||r[i]==null||typeof r[i]!="object")return!1;r=r[i]}return t[n]in r}}else return t=>e in t}function Be(e,t){return Ut(t)(e)}function Wt(e){if(e.includes(_)){let t=e.split(_),n=t.length-1;return(a,r)=>{let s=a;for(let o=0;o<n;o++){let i=t[o];(!(i in s)||typeof s[i]!="object")&&(s[i]={}),s=s[i]}s[t[n]]=r}}else return(t,n)=>{t[e]=n}}function B(e,t,n){Wt(t)(e,n)}function De(e,t,n,a,r,s){let o=[],i,c,l=e.match(/^([^\[]+)\[\*\]\.(.+)$/);if(l)i=l[1],c=l[2];else{let g=e.match(/^([^\.]+)\.\*\.(.+)$/);if(g)i=g[1],c=g[2];else{let b=e.match(/^([^\[]+)\[\*\]$/);if(b)i=b[1],c="";else return o}}let h=I(n,i);if(!Array.isArray(h))return o;if(c===""){for(let g=0;g<h.length;g++){let b=h[g],d=`${i}[${g}]`,u=t.validate(b,a,{abortEarlyOnEachField:s});if(!u.valid){if(u.errors&&u.errors.length>0)for(let f of u.errors)o.push({path:f.path?`${d}.${f.path}`:d,code:f.code||"VALIDATION_ERROR",message:f.message||"Validation failed",paths:()=>[f.path?`${d}.${f.path}`:d]});else o.push({path:d,code:"VALIDATION_ERROR",message:"Validation failed",paths:()=>[d]});if(r)break}}return o}if(h.length===0)return o;for(let g=0;g<h.length;g++){let b=h[g];if(!b||typeof b!="object")continue;let d=I(b,c),u=`${i}[${g}].${c}`,f=t.validate(d,a,{abortEarlyOnEachField:s});if(!f.valid){if(f.errors&&f.errors.length>0)for(let m of f.errors)o.push({path:m.path||u,code:m.code||"VALIDATION_ERROR",message:m.message||"Validation failed",paths:()=>[m.path||u]});else o.push({path:u,code:"VALIDATION_ERROR",message:"Validation failed",paths:()=>[u]});if(r)break}}return o}function zt(e,t,n,a,r,s,o,i){let c=(l,h,g,b,d,u)=>{if(g>r)return{valid:!0,errors:[]};if(l&&typeof l=="object"&&d.has(l))return{valid:!0,errors:[]};if(l&&typeof l=="object"&&d.add(l),l==null){let m=e.validate(l,h,u);return m.valid?{valid:!0,errors:[]}:{valid:!1,errors:m.errors.map(F=>({...F,path:b}))}}let f=e.validate(l,h,u);if(!f.valid)return{valid:!1,errors:f.errors.map(y=>({...y,path:b}))};if(a==="__Self"){if(l&&typeof l=="object"&&i){let m=[];for(let[y,F]of i){if(y===n)continue;if(y.includes("[*]")){let E=me(y)(l);if(E){let{elements:R,basePath:x,elementPath:O}=E;R.forEach((v,N)=>{let w=F.validate(v,h,u);if(!w.valid)for(let j of w.errors){let M=O?`${b}.${x}[${N}].${O}`:`${b}.${x}[${N}]`;m.push({...j,path:M})}})}continue}let T=$(y)(l),p=F.validate(T,h,u);if(!p.valid)for(let P of p.errors)m.push({...P,path:`${b}.${P.path}`})}for(let[y,F]of i){if(y===n)continue;if(y.includes("[*]")){let p=me(y)(l);if(p){let{elements:P,basePath:E,elementPath:R}=p;P.forEach((x,O)=>{if(x&&typeof x=="object"){let v=s.find(N=>N.path===y);if(v?.builderFunction){let N=U(y,o),w=v.builderFunction(N);if(w?.build&&(w=w.build()),w?._validators?.some?.(M=>M.__isRecursive===!0)){let M=R?`${b}.${E}[${O}].${R}`:`${b}.${E}[${O}]`,q=c(x,h,g+1,M,d,u);q.valid||m.push(...q.errors)}}}})}continue}let V=$(y)(l);if(V&&typeof V=="object"){let T=s.find(E=>E.path===y),p=null;if(T?.builderFunction){let E=U(y,o);p=T.builderFunction(E),p?.build&&(p=p.build())}if(p?._validators?.some?.(E=>E.__isRecursive===!0)){let E=c(V,h,g+1,`${b}.${y}`,d,u);E.valid||m.push(...E.errors)}}}if(m.length>0)return{valid:!1,errors:m}}}else if(a==="__Element"){if(Array.isArray(l)){let m=[];for(let y=0;y<l.length;y++){let F=l[y];if(F&&typeof F=="object"&&i)for(let[V,T]of i){if(V.includes("[*]"))continue;let P=$(V)(F),E=T.validate(P,h,u);if(!E.valid)for(let R of E.errors)m.push({...R,path:`${b}[${y}].${R.path}`})}}if(m.length>0)return{valid:!1,errors:m}}}else if(t&&l&&typeof l=="object"){let m=[],y=u?.abortEarlyOnEachField!==!1,F=a.split("."),V=F[F.length-1];if(Array.isArray(l))for(let T=0;T<l.length;T++){let p=l[T];if(p&&typeof p=="object"&&V in p){let P=p[V],E=`${b}[${T}].${V}`,R=c(P,h,g+1,E,d,u);if(!R.valid&&(m.push(...R.errors),y))return{valid:!1,errors:m}}}else if(V in l){let T=l[V],p=`${b}.${V}`,P=c(T,h,g+1,p,d,u);if(!P.valid&&(m.push(...P.errors),y))return{valid:!1,errors:m}}if(m.length>0)return{valid:!1,errors:m}}return l&&typeof l=="object"&&d.delete(l),{valid:!0,errors:[]}};return{validate:(l,h,g)=>c(l,h,0,n,new WeakSet,g),parse:(l,h,g)=>{let d=c(l,h,0,n,new WeakSet,g);return d.valid?{valid:!0,data:l,errors:[]}:{...d,data:void 0}},accessor:e.accessor}}function qt(e,t,n,a,r,s,o){let i=te(t);return{validate:(c,l,h)=>{if(c==null||!Array.isArray(c))return e.validate(c,l,h);let g=[],b=new WeakSet;return c.forEach((d,u)=>{if(d&&typeof d=="object"&&n==="__Self"&&o){for(let[f,m]of o)if(f.includes("[*]")){let y=i.baseArrayPath+"[*]";if(f.startsWith(y)){let F=f.slice(y.length),V,T,p;if(F==="")continue;if(F.startsWith("."))p=F.slice(1),V=$(p)(d),T=i.baseArrayPath?`${i.baseArrayPath}[${u}].${p}`:`[${u}].${p}`;else continue;let P=m.validate(V,l,h);if(!P.valid)for(let E of P.errors)g.push({...E,path:T})}continue}for(let[f,m]of o)if(f.includes("[*]")){let y=i.baseArrayPath+"[*]";if(f.startsWith(y)){let F=f.slice(y.length);if(F.startsWith(".")){let V=F.slice(1),T=$(V)(d);Array.isArray(T)&&T.forEach((p,P)=>{if(p&&typeof p=="object"){for(let[E,R]of o)if(E.includes("[*]")&&E.startsWith(y)){let x=E.slice(y.length);if(x.startsWith(".")&&x!=="."+V){let O=x.slice(1),v=$(O)(p),N=`${i.baseArrayPath}[${u}].${V}[${P}].${O}`,w=R.validate(v,l,h);if(!w.valid)for(let j of w.errors)g.push({...j,path:N})}}}})}}}}}),{valid:g.length===0,errors:g}},parse:(c,l,h)=>e.parse(c,l,h),accessor:e.accessor}}function $e(e,t){let n="^"+t.replace(/\[\*\]/g,"\\[\\d+\\]")+"$";return new RegExp(n).test(e)}function se(e,t,n,a){function r(s){let o=s,i=e.find(f=>f.path===o),c=e.filter(f=>!!(f.path===o||f.path.startsWith(o+"[*]")||f.path.startsWith(o+".*")||f.path.startsWith(o+".")));if(!i&&c.length===0)return{validate:()=>({valid:!0,value:void 0,errors:[]}),parse:()=>({valid:!0,value:void 0,errors:[]})};if(c.length>1){let f=new Set(c.map(m=>m.path));return{validate:(m,y,F)=>{if(a){let T={[o]:m},p=a.validate(T,F),P=p.valid?[]:(p.errors||[]).filter(E=>{for(let R of f)if($e(E.path,R))return!0;return!1});return{valid:P.length===0,value:P.length===0?m:null,errors:P}}let V=[];for(let T of c){let P=G(T,t).validate({[o]:m},{[o]:m},F);!P.valid&&P.errors&&V.push(...P.errors)}return{valid:V.length===0,value:V.length===0?m:null,errors:V}},parse:(m,y,F)=>{if(a){let T={[o]:m},p=a.parse(T,F);if(!p.valid){let R=(p.errors||[]).filter(x=>{for(let O of f)if($e(x.path,O))return!0;return!1});if(R.length>0)return{valid:!1,value:void 0,errors:R}}let P=p.valid?p.value:T;return{valid:!0,value:P&&P[o]!==void 0?P[o]:m,errors:[]}}let V=[];for(let T of c){let P=G(T,t).validate({[o]:m},{[o]:m},F);!P.valid&&P.errors&&V.push(...P.errors)}return{valid:V.length===0,value:V.length===0?m:null,errors:V}}}}if(!i)return{validate:()=>({valid:!0,value:void 0,errors:[]}),parse:()=>({valid:!0,value:void 0,errors:[]})};let l=U(i.path,t);if(!i.builderFunction)throw new Error(`Field definition for path '${i.path}' is missing builderFunction`);let h=i.builderFunction(l),g={path:i.path,builderFunction:i.builderFunction||(()=>{throw new Error(`Field ${i.path} uses object definition form`)})},d=ye([g],t).get(i.path),u;return u=G(i,t),{validate:(f,m,y)=>{let F={...m};B(F,s,f);let V=I(F,s),T=u.validate(V,F,y);return{valid:T.valid,value:T.valid?f??null:null,errors:T.errors||[]}},parse:(f,m,y)=>{let F={...m};B(F,s,f);let V=I(F,s),T=u.parse(V,F,y);return{valid:T.valid,value:T.valid?T.data!==void 0?T.data:f:null,errors:T.errors||[]}}}}return{createPickedValidator:r}}function H(e,t,n=[],a=!1){let r=[...n],s=a,o,i=u=>u.includes(_)?"nested":"scalar",c=(u,f,m)=>{let y=m!==void 0?Z(m):void 0,F={path:u,inferredType:i(u),builderFunction:f,fieldOptions:y,fieldType:{}};return H(e,t,[...r,F],s)},l=c,h=(u,f)=>{let m={path:u,inferredType:i(u),builderFunction:()=>f,fieldOptions:f.fieldOptions,fieldType:{}};return H(e,t,[...r,m],s)},g=()=>H(e,t,r,!0);return{field:c,v:l,useField:h,strict:g,strictOnEditor:g,build:()=>{o||(o=Le(e));let u=r.map(f=>{let m=U(f.path,e),y=f.builderFunction(m);return{path:f.path,builderFunction:f.builderFunction,rules:Array.isArray(y)?y:[y],metadata:{inferredType:f.inferredType,hasTransforms:!1,fieldOptions:f.fieldOptions},fieldType:f.inferredType||"unknown"}});return o.buildOptimizedValidator(u)}}}function Gt(){let e={},t={for(){return H(e,t,void 0,!1)},use(...n){if(n.length===0)return t;for(let a=0;a<n.length;a++){let r=n[a];if(!r)continue;if(typeof r!="object"||!r.name)throw console.error("Invalid plugin:",r),new Error(`Invalid plugin at index ${a}: plugin must be an object with a 'name' property`);let s=r.name;e[s]||(e[s]=r,r.category==="builder-extension"&&r.extendBuilder&&typeof r.extendBuilder=="function"&&(r.methodName&&r.impl&&(t[r.methodName]=r.impl),r.extendBuilder(t),r.methodName&&!t[r.methodName]&&console.warn(`BuilderExtensionPlugin ${r.name} did not add ${r.methodName} method`)))}return t}};return t}function Ht(){return Gt()}var oe=Ht;function Ke(e,t){let n={plugins:e?new Map(e):new Map,pluginsObject:t||{}},a={use(r){n.plugins.set(r.name,r);let s={...n.pluginsObject,[r.name]:r};return Ke(n.plugins,s)},createFieldRule(r,s){return We(a,n.pluginsObject,r,s)},toBuilder(){let r=oe(),s=Array.from(n.plugins.values()),o=s.length;for(let i=0;i<o;i++){let c=s[i];r=r.use(c)}return r},getPlugins(){let r={},s=Array.from(n.plugins.entries()),o=s.length;for(let i=0;i<o;i++){let[c,l]=s[i];r[c]=l}return r},for(){return Ue(n.plugins,n.pluginsObject,a)}};return a}function Ue(e,t,n){return{use:n.use,toBuilder:n.toBuilder,getPlugins:n.getPlugins,createFieldRule(r,s){return We(n,t,r,s)},for(){return Ue(e,t,n)}}}function We(e,t,n,a){let r={};a!==void 0&&(typeof a=="object"&&a!==null&&("name"in a||"description"in a||"fieldOptions"in a)?r=a:r={fieldOptions:Z(a)});let s=()=>{let i=`__standalone__${r?.name||Math.random()}`,c=U(i,t),h=n(c).build();return{validate:(g,b,d)=>{let u=g;r?.fieldOptions&&(u=K(g,r.fieldOptions,{allValues:b||{}}));let f=h._validators||[],m=h._transforms||[];for(let F of f)if(F.check&&!F.check(u,b||{})){let V=typeof F.messageFactory=="function"?F.messageFactory({path:i,value:u,context:b||{}}):"Validation failed";return{valid:!1,errors:[{path:i,message:V,code:F.name||"VALIDATION_ERROR",paths:()=>[i]}],data:u}}let y=u;for(let F of m)typeof F=="function"?y=F(y):F&&typeof F.transformFn=="function"&&(y=F.transformFn(y));return{valid:!0,data:y,errors:[]}},_executionPlan:h._executionPlan,_validators:h._validators,_transforms:h._transforms}};return{_phantomType:void 0,name:r?.name,description:r?.description,fieldOptions:r?.fieldOptions,_getInternalValidators:()=>{let i=s();return{validators:i._validators||[],transforms:i._transforms||[],executionPlan:i._executionPlan}},validate(i,c){try{let h=s().validate(i,{},c);return h.valid?A.ok(h.data):A.error(h.errors||[])}catch(l){return A.error([{path:"",message:l instanceof Error?l.message:"Validation failed",code:"FIELD_RULE_ERROR",paths:()=>[""]}])}},parse(i,c){try{let l=i;r?.fieldOptions&&(l=K(i,r.fieldOptions,{allValues:{}}));let h=s();if(h._executionPlan&&typeof h._executionPlan.execute=="function"){let g={originalValue:l,currentValue:l,allValues:{},path:r?.name||"field",reporter:{report:()=>{},getReports:()=>[]}},b=h._executionPlan.execute(l,g);return b.valid?A.ok(b.finalValue):A.error(b.errors||[])}else{let g=l;if(h._transforms)for(let u of h._transforms)typeof u=="function"&&(g=u(g));let b=h._validators||[],d=r?.name||"field";for(let u of b)if(u.check&&!u.check(g,{})){let f=typeof u.messageFactory=="function"?u.messageFactory({path:d,value:g,context:{}}):"Validation failed";return A.error([{path:d,message:f,code:u.name||"VALIDATION_ERROR",paths:()=>[d]}])}return A.ok(g)}}catch(l){return A.error([{path:"",message:l instanceof Error?l.message:"Parse failed",code:"FIELD_RULE_PARSE_ERROR",paths:()=>[""]}])}},getPluginRegistry(){return e}}}function ze(){return Ke()}var Yt=(e,t,n,a)=>{let s=(o=>(...i)=>{let c=o(...i);return c&&typeof c=="object"&&"check"in c?{...c,pluginName:a}:c})(n);switch(e){case"conditional":return(o,...i)=>s(o,...i);case"fieldReference":return(o,...i)=>s(o,...i);case"multiFieldReference":return s;case"transform":return o=>s(o);case"arrayElement":return(o,...i)=>s(o,...i);case"context":return o=>s(o);default:return s}};function qe(e){let{name:t,methodName:n,allowedTypes:a,category:r,impl:s}=e;return{name:t,methodName:n,allowedTypes:a,category:r,create:()=>Yt(r,n,s,t)}}function Ge(e){let{name:t,allowedTypes:n,impl:a}=e,r=()=>a();return{name:t,methodName:t,allowedTypes:n,category:"transform",create:()=>r}}function He(e){let{name:t,allowedTypes:n,impl:a}=e,r=(...s)=>a(...s);return{name:t,methodName:t,allowedTypes:n,category:"transform",create:()=>r}}function Ye(e){let{name:t,methodName:n,impl:a,extendBuilder:r}=e;return{name:t,methodName:n,category:"builder-extension",impl:a(),extendBuilder:r}}var Y={messageKeyPrefix:"",toBooleanTruthyValues:["true","1","yes","on"],numberFormat:{decimalSeparator:".",thousandSeparator:","},dateFormat:"YYYY-MM-DD",trimStrings:!1,caseSensitive:!0,customTransforms:{}},L={...Y},Q={setConfig(e){L={...L,...e,numberFormat:e.numberFormat?{...L.numberFormat,...e.numberFormat}:L.numberFormat}},getConfig(){return{...L}},get messageKeyPrefix(){return L.messageKeyPrefix||""},get toBooleanTruthyValues(){return[...L.toBooleanTruthyValues||[]]},get numberFormat(){return{...L.numberFormat}},get dateFormat(){return L.dateFormat||"YYYY-MM-DD"},get trimStrings(){return L.trimStrings||!1},get caseSensitive(){return L.caseSensitive!==!1},get customTransforms(){return{...L.customTransforms}},reset(){L={...Y,numberFormat:{...Y.numberFormat},toBooleanTruthyValues:[...Y.toBooleanTruthyValues],customTransforms:{...Y.customTransforms}}}};function Qe(e){Q.setConfig(e)}function Ze(){return Q.getConfig()}function Je(){Q.reset()}0&&(module.exports={Builder,Result,createPluginRegistry,getGlobalConfig,globalConfig,plugin,pluginBuilderExtension,pluginConfigurableTransform,pluginPredefinedTransform,resetGlobalConfig,setGlobalConfig});
2
- //# sourceMappingURL=index.js.map
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.readExternalContext = exports.renderMessage = exports.transform = exports.recursive = exports.presence = exports.gate = exports.fieldsBranch = exports.composite = exports.check = exports.branch = exports.definePlugin = exports.PluginArgumentError = exports.resolveGlobalConfig = exports.DEFAULT_GLOBAL_CONFIG = exports.isStringArray = exports.isString = exports.isPlainObject = exports.isNumber = exports.isArray = exports.PASS = exports.setGlobalConfig = exports.resetGlobalConfig = exports.getGlobalConfig = exports.createBuilder = exports.NamelessPluginError = exports.Builder = void 0;
4
+ // ===========================================================================
5
+ // src/index.ts — THE ROOT SUBPATH. Re-exports only; nothing is defined here.
6
+ //
7
+ // Deliberately absent: every plugin. A plugin reaches a consumer through its
8
+ // own subpath (`@maroonedog/luq/plugins/<name>`), because a barrel that names
9
+ // all of them makes every one of them statically reachable and ends
10
+ // per-plugin tree-shaking. What lives here is the entry point, the vocabulary
11
+ // a caller reads results with, and the surface a PLUGIN AUTHOR writes against.
12
+ // ===========================================================================
13
+ var index_1 = require("./builder/index");
14
+ Object.defineProperty(exports, "Builder", { enumerable: true, get: function () { return index_1.Builder; } });
15
+ Object.defineProperty(exports, "NamelessPluginError", { enumerable: true, get: function () { return index_1.NamelessPluginError; } });
16
+ Object.defineProperty(exports, "createBuilder", { enumerable: true, get: function () { return index_1.createBuilder; } });
17
+ Object.defineProperty(exports, "getGlobalConfig", { enumerable: true, get: function () { return index_1.getGlobalConfig; } });
18
+ Object.defineProperty(exports, "resetGlobalConfig", { enumerable: true, get: function () { return index_1.resetGlobalConfig; } });
19
+ Object.defineProperty(exports, "setGlobalConfig", { enumerable: true, get: function () { return index_1.setGlobalConfig; } });
20
+ // ---- L0 vocabulary --------------------------------------------------------
21
+ var types_1 = require("./types");
22
+ Object.defineProperty(exports, "PASS", { enumerable: true, get: function () { return types_1.PASS; } });
23
+ Object.defineProperty(exports, "fail", { enumerable: true, get: function () { return types_1.fail; } });
24
+ Object.defineProperty(exports, "isArray", { enumerable: true, get: function () { return types_1.isArray; } });
25
+ Object.defineProperty(exports, "isNumber", { enumerable: true, get: function () { return types_1.isNumber; } });
26
+ Object.defineProperty(exports, "isPlainObject", { enumerable: true, get: function () { return types_1.isPlainObject; } });
27
+ Object.defineProperty(exports, "isString", { enumerable: true, get: function () { return types_1.isString; } });
28
+ Object.defineProperty(exports, "isStringArray", { enumerable: true, get: function () { return types_1.isStringArray; } });
29
+ var global_config_1 = require("./types/global-config");
30
+ Object.defineProperty(exports, "DEFAULT_GLOBAL_CONFIG", { enumerable: true, get: function () { return global_config_1.DEFAULT_GLOBAL_CONFIG; } });
31
+ Object.defineProperty(exports, "resolveGlobalConfig", { enumerable: true, get: function () { return global_config_1.resolveGlobalConfig; } });
32
+ // ---- L2 the plugin-author surface -----------------------------------------
33
+ var plugin_definition_1 = require("./plugin-kit/plugin-definition");
34
+ Object.defineProperty(exports, "PluginArgumentError", { enumerable: true, get: function () { return plugin_definition_1.PluginArgumentError; } });
35
+ Object.defineProperty(exports, "definePlugin", { enumerable: true, get: function () { return plugin_definition_1.definePlugin; } });
36
+ var create_rule_1 = require("./plugin-kit/create-rule");
37
+ Object.defineProperty(exports, "branch", { enumerable: true, get: function () { return create_rule_1.branch; } });
38
+ Object.defineProperty(exports, "check", { enumerable: true, get: function () { return create_rule_1.check; } });
39
+ Object.defineProperty(exports, "composite", { enumerable: true, get: function () { return create_rule_1.composite; } });
40
+ Object.defineProperty(exports, "fieldsBranch", { enumerable: true, get: function () { return create_rule_1.fieldsBranch; } });
41
+ Object.defineProperty(exports, "gate", { enumerable: true, get: function () { return create_rule_1.gate; } });
42
+ Object.defineProperty(exports, "presence", { enumerable: true, get: function () { return create_rule_1.presence; } });
43
+ Object.defineProperty(exports, "recursive", { enumerable: true, get: function () { return create_rule_1.recursive; } });
44
+ Object.defineProperty(exports, "transform", { enumerable: true, get: function () { return create_rule_1.transform; } });
45
+ var rule_build_context_1 = require("./plugin-kit/rule-build-context");
46
+ Object.defineProperty(exports, "renderMessage", { enumerable: true, get: function () { return rule_build_context_1.renderMessage; } });
47
+ var external_context_1 = require("./plugin-kit/external-context");
48
+ Object.defineProperty(exports, "readExternalContext", { enumerable: true, get: function () { return external_context_1.readExternalContext; } });