@oxog/vld 2.0.3 → 2.2.5

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 (452) hide show
  1. package/CHANGELOG.md +120 -1
  2. package/README.md +1296 -1171
  3. package/dist/chunks/errors-core-Cqi4-9ew.js +1 -0
  4. package/dist/chunks/index-CkbfQQ4n.js +1 -0
  5. package/dist/chunks/index-yjpbvFgw.js +1 -0
  6. package/dist/chunks/ip-validation-g5LWgy9t.js +1 -0
  7. package/dist/chunks/security-Dy24T8N7.js +1 -0
  8. package/dist/cjs/chunks/errors-core-DKPohm9I.cjs +1 -0
  9. package/dist/cjs/chunks/index-BEV9nG0N.cjs +1 -0
  10. package/dist/cjs/chunks/index-ZjHAxYdA.cjs +1 -0
  11. package/dist/cjs/chunks/ip-validation-BZqPamPC.cjs +1 -0
  12. package/dist/cjs/chunks/security-aXZVI7qW.cjs +1 -0
  13. package/dist/cjs/cli/bin.cjs +2 -0
  14. package/dist/cjs/cli/index.cjs +1 -0
  15. package/dist/cjs/codecs/index.cjs +1 -0
  16. package/dist/cjs/coercion/index.cjs +1 -0
  17. package/dist/cjs/compat/emitter.cjs +1 -0
  18. package/dist/cjs/compat/result.cjs +1 -0
  19. package/dist/cjs/errors.cjs +1 -387
  20. package/dist/cjs/index.cjs +1 -10759
  21. package/dist/cjs/kernel.cjs +1 -0
  22. package/dist/cjs/locales/af.cjs +1 -0
  23. package/dist/cjs/locales/ar.cjs +1 -0
  24. package/dist/cjs/locales/bn.cjs +1 -0
  25. package/dist/cjs/locales/da.cjs +1 -0
  26. package/dist/cjs/locales/de.cjs +1 -0
  27. package/dist/cjs/locales/en.cjs +1 -0
  28. package/dist/cjs/locales/es-MX.cjs +1 -0
  29. package/dist/cjs/locales/es.cjs +1 -0
  30. package/dist/cjs/locales/fi.cjs +1 -0
  31. package/dist/cjs/locales/fr.cjs +1 -0
  32. package/dist/cjs/locales/hi.cjs +1 -0
  33. package/dist/cjs/locales/id.cjs +1 -0
  34. package/dist/cjs/locales/index.cjs +1 -2877
  35. package/dist/cjs/locales/it.cjs +1 -0
  36. package/dist/cjs/locales/ja.cjs +1 -0
  37. package/dist/cjs/locales/ko.cjs +1 -0
  38. package/dist/cjs/locales/lazy.cjs +1 -3169
  39. package/dist/cjs/locales/nl.cjs +1 -0
  40. package/dist/cjs/locales/no.cjs +1 -0
  41. package/dist/cjs/locales/pl.cjs +1 -0
  42. package/dist/cjs/locales/pt-BR.cjs +1 -0
  43. package/dist/cjs/locales/pt.cjs +1 -0
  44. package/dist/cjs/locales/ru.cjs +1 -0
  45. package/dist/cjs/locales/runtime.cjs +1 -0
  46. package/dist/cjs/locales/sv.cjs +1 -0
  47. package/dist/cjs/locales/sw.cjs +1 -0
  48. package/dist/cjs/locales/th.cjs +1 -0
  49. package/dist/cjs/locales/tr.cjs +1 -0
  50. package/dist/cjs/locales/vi.cjs +1 -0
  51. package/dist/cjs/locales/zh.cjs +1 -0
  52. package/dist/cjs/mini.cjs +1 -7474
  53. package/dist/cjs/pigment.cjs +1 -0
  54. package/dist/cjs/plugins/index.cjs +1 -0
  55. package/dist/cjs/registry.cjs +1 -0
  56. package/dist/cjs/v3/index.cjs +1 -0
  57. package/dist/cjs/v4/core/index.cjs +1 -0
  58. package/dist/cjs/v4/index.cjs +1 -0
  59. package/dist/cjs/v4/locales/index.cjs +1 -0
  60. package/dist/cjs/v4/mini/index.cjs +1 -0
  61. package/dist/cjs/v4-mini/index.cjs +1 -0
  62. package/dist/cjs/validators/any.cjs +1 -0
  63. package/dist/cjs/validators/array.cjs +1 -0
  64. package/dist/cjs/validators/base.cjs +1 -0
  65. package/dist/cjs/validators/base64.cjs +1 -0
  66. package/dist/cjs/validators/bigint.cjs +1 -0
  67. package/dist/cjs/validators/boolean.cjs +1 -0
  68. package/dist/cjs/validators/codec.cjs +1 -0
  69. package/dist/cjs/validators/custom.cjs +1 -0
  70. package/dist/cjs/validators/date.cjs +1 -0
  71. package/dist/cjs/validators/discriminated-union.cjs +1 -0
  72. package/dist/cjs/validators/enum.cjs +1 -0
  73. package/dist/cjs/validators/file.cjs +1 -0
  74. package/dist/cjs/validators/function.cjs +1 -0
  75. package/dist/cjs/validators/hex.cjs +1 -0
  76. package/dist/cjs/validators/index.cjs +1 -0
  77. package/dist/cjs/validators/intersection.cjs +1 -0
  78. package/dist/cjs/validators/json.cjs +1 -0
  79. package/dist/cjs/validators/lazy.cjs +1 -0
  80. package/dist/cjs/validators/literal.cjs +1 -0
  81. package/dist/cjs/validators/map.cjs +1 -0
  82. package/dist/cjs/validators/nan.cjs +1 -0
  83. package/dist/cjs/validators/never.cjs +1 -0
  84. package/dist/cjs/validators/null.cjs +1 -0
  85. package/dist/cjs/validators/number.cjs +1 -0
  86. package/dist/cjs/validators/object.cjs +1 -0
  87. package/dist/cjs/validators/promise.cjs +1 -0
  88. package/dist/cjs/validators/record.cjs +1 -0
  89. package/dist/cjs/validators/set.cjs +1 -0
  90. package/dist/cjs/validators/string-bool.cjs +1 -0
  91. package/dist/cjs/validators/string-formats.cjs +1 -0
  92. package/dist/cjs/validators/string.cjs +1 -0
  93. package/dist/cjs/validators/symbol.cjs +1 -0
  94. package/dist/cjs/validators/template-literal.cjs +1 -0
  95. package/dist/cjs/validators/tuple.cjs +1 -0
  96. package/dist/cjs/validators/uint8array.cjs +1 -0
  97. package/dist/cjs/validators/undefined.cjs +1 -0
  98. package/dist/cjs/validators/union.cjs +1 -0
  99. package/dist/cjs/validators/unknown.cjs +1 -0
  100. package/dist/cjs/validators/void.cjs +1 -0
  101. package/dist/cjs/validators/xor.cjs +1 -0
  102. package/dist/cli/bin.d.ts +0 -1
  103. package/dist/cli/bin.js +2 -0
  104. package/dist/cli/commands/benchmark.d.ts +1 -2
  105. package/dist/cli/commands/validate.d.ts +1 -2
  106. package/dist/cli/index.d.ts +0 -1
  107. package/dist/cli/index.js +1 -0
  108. package/dist/codecs/index.d.ts +21 -4
  109. package/dist/codecs/index.js +1 -4
  110. package/dist/coercion/bigint.d.ts +2 -3
  111. package/dist/coercion/boolean.d.ts +3 -3
  112. package/dist/coercion/date.d.ts +3 -3
  113. package/dist/coercion/index.d.ts +5 -6
  114. package/dist/coercion/index.js +1 -111
  115. package/dist/coercion/number.d.ts +2 -3
  116. package/dist/coercion/string.d.ts +2 -3
  117. package/dist/compat/emitter.d.ts +0 -1
  118. package/dist/compat/emitter.js +1 -181
  119. package/dist/compat/index.d.ts +4 -5
  120. package/dist/compat/result.d.ts +1 -2
  121. package/dist/compat/result.js +1 -171
  122. package/dist/errors-core.d.ts +58 -0
  123. package/dist/errors.d.ts +4 -54
  124. package/dist/errors.js +1 -235
  125. package/dist/events.d.ts +3 -4
  126. package/dist/index.d.ts +1093 -851
  127. package/dist/index.js +1 -855
  128. package/dist/kernel.d.ts +2 -3
  129. package/dist/kernel.js +1 -405
  130. package/dist/locales/af.d.ts +1 -2
  131. package/dist/locales/af.js +1 -107
  132. package/dist/locales/ar.d.ts +1 -2
  133. package/dist/locales/ar.js +1 -107
  134. package/dist/locales/bn.d.ts +1 -2
  135. package/dist/locales/bn.js +1 -107
  136. package/dist/locales/da.d.ts +1 -2
  137. package/dist/locales/da.js +1 -107
  138. package/dist/locales/de.d.ts +1 -2
  139. package/dist/locales/de.js +1 -107
  140. package/dist/locales/en.d.ts +1 -2
  141. package/dist/locales/en.js +1 -107
  142. package/dist/locales/es-MX.d.ts +1 -2
  143. package/dist/locales/es-MX.js +1 -106
  144. package/dist/locales/es.d.ts +1 -2
  145. package/dist/locales/es.js +1 -95
  146. package/dist/locales/fi.d.ts +1 -2
  147. package/dist/locales/fi.js +1 -107
  148. package/dist/locales/fr.d.ts +1 -2
  149. package/dist/locales/fr.js +1 -95
  150. package/dist/locales/hi.d.ts +1 -2
  151. package/dist/locales/hi.js +1 -107
  152. package/dist/locales/id.d.ts +1 -2
  153. package/dist/locales/id.js +1 -107
  154. package/dist/locales/index.d.ts +10 -15
  155. package/dist/locales/index.js +1 -3
  156. package/dist/locales/it.d.ts +1 -2
  157. package/dist/locales/it.js +1 -107
  158. package/dist/locales/ja.d.ts +1 -2
  159. package/dist/locales/ja.js +1 -107
  160. package/dist/locales/ko.d.ts +1 -2
  161. package/dist/locales/ko.js +1 -107
  162. package/dist/locales/lazy.d.ts +4 -26
  163. package/dist/locales/lazy.js +1 -220
  164. package/dist/locales/nl.d.ts +1 -2
  165. package/dist/locales/nl.js +1 -107
  166. package/dist/locales/no.d.ts +1 -2
  167. package/dist/locales/no.js +1 -107
  168. package/dist/locales/pl.d.ts +1 -2
  169. package/dist/locales/pl.js +1 -107
  170. package/dist/locales/pt-BR.d.ts +1 -2
  171. package/dist/locales/pt-BR.js +1 -107
  172. package/dist/locales/pt.d.ts +1 -2
  173. package/dist/locales/pt.js +1 -107
  174. package/dist/locales/ru.d.ts +1 -2
  175. package/dist/locales/ru.js +1 -107
  176. package/dist/locales/runtime.d.ts +10 -0
  177. package/dist/locales/runtime.js +1 -0
  178. package/dist/locales/sv.d.ts +1 -2
  179. package/dist/locales/sv.js +1 -107
  180. package/dist/locales/sw.d.ts +1 -2
  181. package/dist/locales/sw.js +1 -107
  182. package/dist/locales/th.d.ts +1 -2
  183. package/dist/locales/th.js +1 -107
  184. package/dist/locales/tr.d.ts +1 -2
  185. package/dist/locales/tr.js +1 -107
  186. package/dist/locales/types.d.ts +0 -1
  187. package/dist/locales/vi.d.ts +1 -2
  188. package/dist/locales/vi.js +1 -107
  189. package/dist/locales/zh.d.ts +1 -2
  190. package/dist/locales/zh.js +1 -107
  191. package/dist/logger.d.ts +0 -1
  192. package/dist/mini.d.ts +67 -68
  193. package/dist/mini.js +1 -132
  194. package/dist/pigment.d.ts +0 -1
  195. package/dist/pigment.js +1 -178
  196. package/dist/plugins/index.d.ts +2 -3
  197. package/dist/plugins/index.js +1 -0
  198. package/dist/plugins/types.d.ts +4 -5
  199. package/dist/registry.d.ts +23 -0
  200. package/dist/registry.js +1 -0
  201. package/dist/utils/codec-utils.d.ts +0 -1
  202. package/dist/utils/deep-merge.d.ts +0 -1
  203. package/dist/utils/ip-validation.d.ts +0 -1
  204. package/dist/utils/json-schema.d.ts +26 -7
  205. package/dist/utils/security.d.ts +2 -6
  206. package/dist/v3/index.d.ts +2 -0
  207. package/dist/v3/index.js +1 -0
  208. package/dist/v4/core/index.d.ts +272 -0
  209. package/dist/v4/core/index.js +1 -0
  210. package/dist/v4/index.d.ts +4 -0
  211. package/dist/v4/index.js +1 -0
  212. package/dist/v4/locales/index.d.ts +57 -0
  213. package/dist/v4/locales/index.js +1 -0
  214. package/dist/v4/mini/index.d.ts +2 -0
  215. package/dist/v4/mini/index.js +1 -0
  216. package/dist/v4-mini/index.d.ts +22 -0
  217. package/dist/v4-mini/index.js +1 -0
  218. package/dist/validators/any.d.ts +7 -2
  219. package/dist/validators/any.js +1 -0
  220. package/dist/validators/array.d.ts +16 -2
  221. package/dist/validators/array.js +1 -0
  222. package/dist/validators/base.d.ts +213 -14
  223. package/dist/validators/base.js +1 -0
  224. package/dist/validators/base64.d.ts +1 -2
  225. package/dist/validators/base64.js +1 -0
  226. package/dist/validators/bigint.d.ts +21 -3
  227. package/dist/validators/bigint.js +1 -0
  228. package/dist/validators/boolean.d.ts +13 -4
  229. package/dist/validators/boolean.js +1 -0
  230. package/dist/validators/codec.d.ts +9 -2
  231. package/dist/validators/codec.js +1 -0
  232. package/dist/validators/custom.d.ts +15 -2
  233. package/dist/validators/custom.js +1 -0
  234. package/dist/validators/date.d.ts +19 -3
  235. package/dist/validators/date.js +1 -0
  236. package/dist/validators/discriminated-union.d.ts +6 -5
  237. package/dist/validators/discriminated-union.js +1 -0
  238. package/dist/validators/enum.d.ts +10 -7
  239. package/dist/validators/enum.js +1 -0
  240. package/dist/validators/file.d.ts +7 -2
  241. package/dist/validators/file.js +1 -0
  242. package/dist/validators/function.d.ts +11 -5
  243. package/dist/validators/function.js +1 -0
  244. package/dist/validators/hex.d.ts +1 -2
  245. package/dist/validators/hex.js +1 -0
  246. package/dist/validators/index.d.ts +38 -39
  247. package/dist/validators/index.js +1 -515
  248. package/dist/validators/intersection.d.ts +1 -2
  249. package/dist/validators/intersection.js +1 -0
  250. package/dist/validators/json.d.ts +1 -2
  251. package/dist/validators/json.js +1 -0
  252. package/dist/validators/lazy.d.ts +5 -9
  253. package/dist/validators/lazy.js +1 -0
  254. package/dist/validators/literal.d.ts +9 -5
  255. package/dist/validators/literal.js +1 -0
  256. package/dist/validators/map.d.ts +15 -2
  257. package/dist/validators/map.js +1 -0
  258. package/dist/validators/nan.d.ts +2 -3
  259. package/dist/validators/nan.js +1 -0
  260. package/dist/validators/never.d.ts +1 -2
  261. package/dist/validators/never.js +1 -0
  262. package/dist/validators/null.d.ts +3 -3
  263. package/dist/validators/null.js +1 -0
  264. package/dist/validators/number.d.ts +75 -27
  265. package/dist/validators/number.js +1 -0
  266. package/dist/validators/object.d.ts +42 -11
  267. package/dist/validators/object.js +1 -0
  268. package/dist/validators/promise.d.ts +15 -10
  269. package/dist/validators/promise.js +1 -0
  270. package/dist/validators/record.d.ts +21 -9
  271. package/dist/validators/record.js +1 -0
  272. package/dist/validators/set.d.ts +11 -2
  273. package/dist/validators/set.js +1 -0
  274. package/dist/validators/string-bool.d.ts +7 -10
  275. package/dist/validators/string-bool.js +1 -0
  276. package/dist/validators/string-formats.d.ts +64 -65
  277. package/dist/validators/string-formats.js +1 -0
  278. package/dist/validators/string.d.ts +84 -26
  279. package/dist/validators/string.js +1 -0
  280. package/dist/validators/symbol.d.ts +8 -3
  281. package/dist/validators/symbol.js +1 -0
  282. package/dist/validators/template-literal.d.ts +1 -2
  283. package/dist/validators/template-literal.js +1 -0
  284. package/dist/validators/tuple.d.ts +29 -12
  285. package/dist/validators/tuple.js +1 -0
  286. package/dist/validators/uint8array.d.ts +3 -4
  287. package/dist/validators/uint8array.js +1 -0
  288. package/dist/validators/undefined.d.ts +3 -3
  289. package/dist/validators/undefined.js +1 -0
  290. package/dist/validators/union.d.ts +7 -4
  291. package/dist/validators/union.js +1 -0
  292. package/dist/validators/unknown.d.ts +7 -2
  293. package/dist/validators/unknown.js +1 -0
  294. package/dist/validators/void.d.ts +3 -2
  295. package/dist/validators/void.js +1 -0
  296. package/dist/validators/xor.d.ts +4 -5
  297. package/dist/validators/xor.js +1 -0
  298. package/package.json +239 -154
  299. package/dist/chunks/bigint-CRS0QVsy.js +0 -1854
  300. package/dist/chunks/bigint-CRS0QVsy.js.map +0 -1
  301. package/dist/chunks/date-50JV_Mfj.js +0 -506
  302. package/dist/chunks/date-50JV_Mfj.js.map +0 -1
  303. package/dist/chunks/index-DO8CFMxD.js +0 -894
  304. package/dist/chunks/index-DO8CFMxD.js.map +0 -1
  305. package/dist/chunks/json-Cp4WO0M9.js +0 -2021
  306. package/dist/chunks/json-Cp4WO0M9.js.map +0 -1
  307. package/dist/chunks/unknown-Dhzri_T-.js +0 -28
  308. package/dist/chunks/unknown-Dhzri_T-.js.map +0 -1
  309. package/dist/cjs/errors.cjs.map +0 -1
  310. package/dist/cjs/index.cjs.map +0 -1
  311. package/dist/cjs/locales/index.cjs.map +0 -1
  312. package/dist/cjs/locales/lazy.cjs.map +0 -1
  313. package/dist/cjs/mini.cjs.map +0 -1
  314. package/dist/cli/bin.d.ts.map +0 -1
  315. package/dist/cli/commands/benchmark.d.ts.map +0 -1
  316. package/dist/cli/commands/validate.d.ts.map +0 -1
  317. package/dist/cli/index.d.ts.map +0 -1
  318. package/dist/codecs/index.d.ts.map +0 -1
  319. package/dist/codecs/index.js.map +0 -1
  320. package/dist/coercion/bigint.d.ts.map +0 -1
  321. package/dist/coercion/boolean.d.ts.map +0 -1
  322. package/dist/coercion/date.d.ts.map +0 -1
  323. package/dist/coercion/index.d.ts.map +0 -1
  324. package/dist/coercion/index.js.map +0 -1
  325. package/dist/coercion/number.d.ts.map +0 -1
  326. package/dist/coercion/string.d.ts.map +0 -1
  327. package/dist/compat/emitter.d.ts.map +0 -1
  328. package/dist/compat/emitter.js.map +0 -1
  329. package/dist/compat/index.d.ts.map +0 -1
  330. package/dist/compat/result.d.ts.map +0 -1
  331. package/dist/compat/result.js.map +0 -1
  332. package/dist/errors.d.ts.map +0 -1
  333. package/dist/errors.js.map +0 -1
  334. package/dist/events.d.ts.map +0 -1
  335. package/dist/index.d.ts.map +0 -1
  336. package/dist/index.js.map +0 -1
  337. package/dist/kernel.d.ts.map +0 -1
  338. package/dist/kernel.js.map +0 -1
  339. package/dist/locales/af.d.ts.map +0 -1
  340. package/dist/locales/af.js.map +0 -1
  341. package/dist/locales/ar.d.ts.map +0 -1
  342. package/dist/locales/ar.js.map +0 -1
  343. package/dist/locales/backup-en.d.ts +0 -3
  344. package/dist/locales/backup-en.d.ts.map +0 -1
  345. package/dist/locales/bn.d.ts.map +0 -1
  346. package/dist/locales/bn.js.map +0 -1
  347. package/dist/locales/da.d.ts.map +0 -1
  348. package/dist/locales/da.js.map +0 -1
  349. package/dist/locales/de.d.ts.map +0 -1
  350. package/dist/locales/de.js.map +0 -1
  351. package/dist/locales/en.d.ts.map +0 -1
  352. package/dist/locales/en.js.map +0 -1
  353. package/dist/locales/es-MX.d.ts.map +0 -1
  354. package/dist/locales/es-MX.js.map +0 -1
  355. package/dist/locales/es.d.ts.map +0 -1
  356. package/dist/locales/es.js.map +0 -1
  357. package/dist/locales/fi.d.ts.map +0 -1
  358. package/dist/locales/fi.js.map +0 -1
  359. package/dist/locales/fr.d.ts.map +0 -1
  360. package/dist/locales/fr.js.map +0 -1
  361. package/dist/locales/hi.d.ts.map +0 -1
  362. package/dist/locales/hi.js.map +0 -1
  363. package/dist/locales/id.d.ts.map +0 -1
  364. package/dist/locales/id.js.map +0 -1
  365. package/dist/locales/index.d.ts.map +0 -1
  366. package/dist/locales/index.js.map +0 -1
  367. package/dist/locales/it.d.ts.map +0 -1
  368. package/dist/locales/it.js.map +0 -1
  369. package/dist/locales/ja.d.ts.map +0 -1
  370. package/dist/locales/ja.js.map +0 -1
  371. package/dist/locales/ko.d.ts.map +0 -1
  372. package/dist/locales/ko.js.map +0 -1
  373. package/dist/locales/lazy.d.ts.map +0 -1
  374. package/dist/locales/lazy.js.map +0 -1
  375. package/dist/locales/nl.d.ts.map +0 -1
  376. package/dist/locales/nl.js.map +0 -1
  377. package/dist/locales/no.d.ts.map +0 -1
  378. package/dist/locales/no.js.map +0 -1
  379. package/dist/locales/pl.d.ts.map +0 -1
  380. package/dist/locales/pl.js.map +0 -1
  381. package/dist/locales/pt-BR.d.ts.map +0 -1
  382. package/dist/locales/pt-BR.js.map +0 -1
  383. package/dist/locales/pt.d.ts.map +0 -1
  384. package/dist/locales/pt.js.map +0 -1
  385. package/dist/locales/ru.d.ts.map +0 -1
  386. package/dist/locales/ru.js.map +0 -1
  387. package/dist/locales/sv.d.ts.map +0 -1
  388. package/dist/locales/sv.js.map +0 -1
  389. package/dist/locales/sw.d.ts.map +0 -1
  390. package/dist/locales/sw.js.map +0 -1
  391. package/dist/locales/th.d.ts.map +0 -1
  392. package/dist/locales/th.js.map +0 -1
  393. package/dist/locales/tr.d.ts.map +0 -1
  394. package/dist/locales/tr.js.map +0 -1
  395. package/dist/locales/types.d.ts.map +0 -1
  396. package/dist/locales/vi.d.ts.map +0 -1
  397. package/dist/locales/vi.js.map +0 -1
  398. package/dist/locales/zh.d.ts.map +0 -1
  399. package/dist/locales/zh.js.map +0 -1
  400. package/dist/logger.d.ts.map +0 -1
  401. package/dist/mini.d.ts.map +0 -1
  402. package/dist/mini.js.map +0 -1
  403. package/dist/pigment.d.ts.map +0 -1
  404. package/dist/pigment.js.map +0 -1
  405. package/dist/plugins/index.d.ts.map +0 -1
  406. package/dist/plugins/types.d.ts.map +0 -1
  407. package/dist/utils/codec-utils.d.ts.map +0 -1
  408. package/dist/utils/deep-merge.d.ts.map +0 -1
  409. package/dist/utils/ip-validation.d.ts.map +0 -1
  410. package/dist/utils/json-schema.d.ts.map +0 -1
  411. package/dist/utils/security.d.ts.map +0 -1
  412. package/dist/validators/any.d.ts.map +0 -1
  413. package/dist/validators/array.d.ts.map +0 -1
  414. package/dist/validators/base.d.ts.map +0 -1
  415. package/dist/validators/base64.d.ts.map +0 -1
  416. package/dist/validators/bigint.d.ts.map +0 -1
  417. package/dist/validators/boolean.d.ts.map +0 -1
  418. package/dist/validators/codec.d.ts.map +0 -1
  419. package/dist/validators/custom.d.ts.map +0 -1
  420. package/dist/validators/date.d.ts.map +0 -1
  421. package/dist/validators/discriminated-union.d.ts.map +0 -1
  422. package/dist/validators/enum.d.ts.map +0 -1
  423. package/dist/validators/file.d.ts.map +0 -1
  424. package/dist/validators/function.d.ts.map +0 -1
  425. package/dist/validators/hex.d.ts.map +0 -1
  426. package/dist/validators/index.d.ts.map +0 -1
  427. package/dist/validators/index.js.map +0 -1
  428. package/dist/validators/intersection.d.ts.map +0 -1
  429. package/dist/validators/json.d.ts.map +0 -1
  430. package/dist/validators/lazy.d.ts.map +0 -1
  431. package/dist/validators/literal.d.ts.map +0 -1
  432. package/dist/validators/map.d.ts.map +0 -1
  433. package/dist/validators/nan.d.ts.map +0 -1
  434. package/dist/validators/never.d.ts.map +0 -1
  435. package/dist/validators/null.d.ts.map +0 -1
  436. package/dist/validators/number.d.ts.map +0 -1
  437. package/dist/validators/object.d.ts.map +0 -1
  438. package/dist/validators/promise.d.ts.map +0 -1
  439. package/dist/validators/record.d.ts.map +0 -1
  440. package/dist/validators/set.d.ts.map +0 -1
  441. package/dist/validators/string-bool.d.ts.map +0 -1
  442. package/dist/validators/string-formats.d.ts.map +0 -1
  443. package/dist/validators/string.d.ts.map +0 -1
  444. package/dist/validators/symbol.d.ts.map +0 -1
  445. package/dist/validators/template-literal.d.ts.map +0 -1
  446. package/dist/validators/tuple.d.ts.map +0 -1
  447. package/dist/validators/uint8array.d.ts.map +0 -1
  448. package/dist/validators/undefined.d.ts.map +0 -1
  449. package/dist/validators/union.d.ts.map +0 -1
  450. package/dist/validators/unknown.d.ts.map +0 -1
  451. package/dist/validators/void.d.ts.map +0 -1
  452. package/dist/validators/xor.d.ts.map +0 -1
@@ -1,3 +1 @@
1
- import './en.js';
2
- export { getLocale, getMessages, getMessagesForLocale, getSupportedLocales, isLocaleLoaded, isLocaleSupported, preloadLocales, registerLocale, setLocale, setLocaleAsync } from './lazy.js';
3
- //# sourceMappingURL=index.js.map
1
+ export{getLocale,getMessages,getMessagesForLocale,getSupportedLocales,isLocaleLoaded,isLocaleSupported,registerLocale,setLocale}from"./runtime.js";import"./en.js";import"./tr.js";import"./es.js";import"./fr.js";import"./de.js";import"./it.js";import"./pt.js";import"./ru.js";import"./ja.js";import"./ko.js";import"./zh.js";import"./ar.js";import"./hi.js";import"./nl.js";import"./pl.js";import"./da.js";import"./sv.js";import"./no.js";import"./fi.js";import"./th.js";import"./vi.js";import"./id.js";import"./bn.js";import"./sw.js";import"./af.js";import"./pt-BR.js";import"./es-MX.js";export{s as setLocaleAsync}from"../chunks/index-yjpbvFgw.js";
@@ -1,3 +1,2 @@
1
- import { LocaleMessages } from './types';
1
+ import { LocaleMessages } from './types.js';
2
2
  export declare const it: LocaleMessages;
3
- //# sourceMappingURL=it.d.ts.map
@@ -1,107 +1 @@
1
- const it = {
2
- // String validation messages
3
- invalidString: 'Stringa non valida',
4
- stringMin: (min) => `La stringa deve avere almeno ${min} caratteri`,
5
- stringMax: (max) => `La stringa non può avere più di ${max} caratteri`,
6
- stringLength: (length) => `La stringa deve avere esattamente ${length} caratteri`,
7
- stringEmail: 'Indirizzo email non valido',
8
- stringUrl: 'URL non valido',
9
- stringUuid: 'UUID non valido',
10
- stringRegex: 'Formato non valido',
11
- stringStartsWith: (prefix) => `La stringa deve iniziare con "${prefix}"`,
12
- stringEndsWith: (suffix) => `La stringa deve finire con "${suffix}"`,
13
- stringIncludes: (substring) => `La stringa deve contenere "${substring}"`,
14
- stringIp: 'Indirizzo IP non valido',
15
- stringIpv4: 'Indirizzo IPv4 non valido',
16
- stringIpv6: 'Indirizzo IPv6 non valido',
17
- stringEmpty: 'La stringa non può essere vuota',
18
- // Number validation messages
19
- invalidNumber: 'Numero non valido',
20
- numberMin: (min) => `Il numero deve essere almeno ${min}`,
21
- numberMax: (max) => `Il numero non può essere maggiore di ${max}`,
22
- numberInt: 'Il numero deve essere intero',
23
- numberPositive: 'Il numero deve essere positivo',
24
- numberNegative: 'Il numero deve essere negativo',
25
- numberNonnegative: 'Il numero non può essere negativo',
26
- numberNonpositive: 'Il numero non può essere positivo',
27
- numberFinite: 'Il numero deve essere finito',
28
- numberSafe: 'Il numero deve essere un intero sicuro',
29
- numberMultipleOf: (value) => `Il numero deve essere multiplo di ${value}`,
30
- // Boolean validation messages
31
- invalidBoolean: 'Valore booleano non valido',
32
- // Date validation messages
33
- invalidDate: 'Data non valida',
34
- dateMin: (date) => `La data deve essere dopo ${date.toISOString()}`,
35
- dateMax: (date) => `La data deve essere prima di ${date.toISOString()}`,
36
- // Object validation messages
37
- invalidObject: 'Oggetto non valido',
38
- unexpectedKeys: (keys) => `Chiavi impreviste: ${keys.join(', ')}`,
39
- // Array validation messages
40
- invalidArray: 'Array non valido',
41
- arrayMin: (min) => `L'array deve avere almeno ${min} elementi`,
42
- arrayMax: (max) => `L'array non può avere più di ${max} elementi`,
43
- arrayLength: (length) => `L'array deve avere esattamente ${length} elementi`,
44
- arrayEmpty: 'L\'array non può essere vuoto',
45
- arrayItem: (index, error) => `Elemento non valido all'indice ${index}: ${error}`,
46
- // Object field validation
47
- objectField: (field, error) => `Campo non valido "${field}": ${error}`,
48
- // Union validation messages
49
- unionNoMatch: (errors) => `Nessun membro dell'unione corrisponde: ${errors.join(', ')}`,
50
- // Intersection validation messages
51
- intersectionError: (error) => `Validazione intersezione fallita: ${error}`,
52
- // Literal validation messages
53
- literalExpected: (expected, received) => `Previsto ${expected}, ricevuto ${received}`,
54
- // Enum validation messages
55
- enumExpected: (values, received) => `Previsto uno di [${values.join(', ')}], ricevuto ${received}`,
56
- // Special type validation messages
57
- expectedUndefined: 'Previsto undefined',
58
- neverType: 'Il tipo never non può essere analizzato',
59
- // New advanced type validation messages
60
- invalidBigint: 'Bigint non valido',
61
- invalidSymbol: 'Simbolo non valido',
62
- invalidTuple: 'Tupla non valida',
63
- tupleLength: (expected, received) => `La tupla deve avere esattamente ${expected} elementi, ricevuti ${received}`,
64
- invalidRecord: 'Record non valido',
65
- invalidSet: 'Set non valido',
66
- invalidMap: 'Map non valida',
67
- // Transformation and refinement messages
68
- transformError: (error) => `Trasformazione fallita: ${error}`,
69
- refinementError: (error) => `Raffinamento fallito: ${error}`,
70
- customValidationError: (error) => `Validazione personalizzata fallita: ${error}`,
71
- // Coercion messages
72
- coercionFailed: (type, value) => `Impossibile convertire ${JSON.stringify(value)} in ${type}`,
73
- // Codec messages
74
- codecDecodeFailed: 'Failed to decode value',
75
- codecEncodeFailed: 'Failed to encode value',
76
- codecAsyncNotSupported: 'Async codec operations require using parseAsync/encodeAsync methods',
77
- // Base64/Hex messages
78
- invalidBase64: 'Invalid base64 string',
79
- invalidHex: 'Invalid hexadecimal string',
80
- // Uint8Array messages
81
- expectedUint8Array: 'Expected Uint8Array',
82
- uint8ArrayMinLength: (min) => `Uint8Array must have at least ${min} bytes`,
83
- uint8ArrayMaxLength: (max) => `Uint8Array must have at most ${max} bytes`,
84
- uint8ArrayExactLength: (length) => `Uint8Array must have exactly ${length} bytes`,
85
- // Generic type error messages
86
- expectedString: 'Expected string',
87
- stringExpected: (received, expected) => `Previsto ${expected}, ricevuto ${received}`,
88
- stringBoolExpected: (validValues, received) => `Stringa booleana non valida. Previsto uno di: ${validValues}, ricevuto: "${received}"`,
89
- invalidJson: 'JSON non valido',
90
- stringPatternInvalid: 'La stringa non corrisponde al pattern richiesto',
91
- // File validation messages
92
- invalidFile: 'Expected a File object',
93
- fileNotSupported: 'File API not supported in this environment',
94
- fileMinSize: (min) => `File size must be at least ${min} bytes`,
95
- fileMaxSize: (max) => `File size must not exceed ${max} bytes`,
96
- fileMimeType: (allowed) => `Invalid file type. Expected: ${allowed.join(", ")}`,
97
- // Function validation messages
98
- invalidFunction: 'È prevista una funzione',
99
- // CIDR validation messages
100
- stringCidrv4: 'Blocco CIDR IPv4 non valido',
101
- stringCidrv6: 'Blocco CIDR IPv6 non valido',
102
- // Safe extend validation messages
103
- safeExtendOverlap: (keys) => `Impossibile sovrascrivere chiavi esistenti: ${keys.join(', ')}. Usa extend() per sovrascrivere.`
104
- };
105
-
106
- export { it };
107
- //# sourceMappingURL=it.js.map
1
+ const e={invalidString:"Stringa non valida",stringMin:e=>`La stringa deve avere almeno ${e} caratteri`,stringMax:e=>`La stringa non può avere più di ${e} caratteri`,stringLength:e=>`La stringa deve avere esattamente ${e} caratteri`,stringEmail:"Indirizzo email non valido",stringUrl:"URL non valido",stringUuid:"UUID non valido",stringRegex:"Formato non valido",stringStartsWith:e=>`La stringa deve iniziare con "${e}"`,stringEndsWith:e=>`La stringa deve finire con "${e}"`,stringIncludes:e=>`La stringa deve contenere "${e}"`,stringIp:"Indirizzo IP non valido",stringIpv4:"Indirizzo IPv4 non valido",stringIpv6:"Indirizzo IPv6 non valido",stringEmpty:"La stringa non può essere vuota",invalidNumber:"Numero non valido",numberMin:e=>`Il numero deve essere almeno ${e}`,numberMax:e=>`Il numero non può essere maggiore di ${e}`,numberInt:"Il numero deve essere intero",numberPositive:"Il numero deve essere positivo",numberNegative:"Il numero deve essere negativo",numberNonnegative:"Il numero non può essere negativo",numberNonpositive:"Il numero non può essere positivo",numberFinite:"Il numero deve essere finito",numberSafe:"Il numero deve essere un intero sicuro",numberMultipleOf:e=>`Il numero deve essere multiplo di ${e}`,invalidBoolean:"Valore booleano non valido",invalidDate:"Data non valida",dateMin:e=>`La data deve essere dopo ${e.toISOString()}`,dateMax:e=>`La data deve essere prima di ${e.toISOString()}`,invalidObject:"Oggetto non valido",unexpectedKeys:e=>`Chiavi impreviste: ${e.join(", ")}`,invalidArray:"Array non valido",arrayMin:e=>`L'array deve avere almeno ${e} elementi`,arrayMax:e=>`L'array non può avere più di ${e} elementi`,arrayLength:e=>`L'array deve avere esattamente ${e} elementi`,arrayEmpty:"L'array non può essere vuoto",arrayItem:(e,i)=>`Elemento non valido all'indice ${e}: ${i}`,objectField:(e,i)=>`Campo non valido "${e}": ${i}`,unionNoMatch:e=>`Nessun membro dell'unione corrisponde: ${e.join(", ")}`,intersectionError:e=>`Validazione intersezione fallita: ${e}`,literalExpected:(e,i)=>`Previsto ${e}, ricevuto ${i}`,enumExpected:(e,i)=>`Previsto uno di [${e.join(", ")}], ricevuto ${i}`,expectedUndefined:"Previsto undefined",neverType:"Il tipo never non può essere analizzato",invalidBigint:"Bigint non valido",invalidSymbol:"Simbolo non valido",invalidTuple:"Tupla non valida",tupleLength:(e,i)=>`La tupla deve avere esattamente ${e} elementi, ricevuti ${i}`,invalidRecord:"Record non valido",invalidSet:"Set non valido",invalidMap:"Map non valida",transformError:e=>`Trasformazione fallita: ${e}`,refinementError:e=>`Raffinamento fallito: ${e}`,customValidationError:e=>`Validazione personalizzata fallita: ${e}`,coercionFailed:(e,i)=>`Impossibile convertire ${JSON.stringify(i)} in ${e}`,codecDecodeFailed:"Failed to decode value",codecEncodeFailed:"Failed to encode value",codecAsyncNotSupported:"Async codec operations require using parseAsync/encodeAsync methods",invalidBase64:"Invalid base64 string",invalidHex:"Invalid hexadecimal string",expectedUint8Array:"Expected Uint8Array",uint8ArrayMinLength:e=>`Uint8Array must have at least ${e} bytes`,uint8ArrayMaxLength:e=>`Uint8Array must have at most ${e} bytes`,uint8ArrayExactLength:e=>`Uint8Array must have exactly ${e} bytes`,expectedString:"Expected string",stringExpected:(e,i)=>`Previsto ${i}, ricevuto ${e}`,stringBoolExpected:(e,i)=>`Stringa booleana non valida. Previsto uno di: ${e}, ricevuto: "${i}"`,invalidJson:"JSON non valido",stringPatternInvalid:"La stringa non corrisponde al pattern richiesto",invalidFile:"Expected a File object",fileNotSupported:"File API not supported in this environment",fileMinSize:e=>`File size must be at least ${e} bytes`,fileMaxSize:e=>`File size must not exceed ${e} bytes`,fileMimeType:e=>`Invalid file type. Expected: ${e.join(", ")}`,invalidFunction:"È prevista una funzione",stringCidrv4:"Blocco CIDR IPv4 non valido",stringCidrv6:"Blocco CIDR IPv6 non valido",safeExtendOverlap:e=>`Impossibile sovrascrivere chiavi esistenti: ${e.join(", ")}. Usa extend() per sovrascrivere.`};export{e as it};
@@ -1,3 +1,2 @@
1
- import { LocaleMessages } from './types';
1
+ import { LocaleMessages } from './types.js';
2
2
  export declare const ja: LocaleMessages;
3
- //# sourceMappingURL=ja.d.ts.map
@@ -1,107 +1 @@
1
- const ja = {
2
- // String validation messages
3
- invalidString: '無効な文字列',
4
- stringMin: (min) => `文字列は${min}文字以上である必要があります`,
5
- stringMax: (max) => `文字列は${max}文字以下である必要があります`,
6
- stringLength: (length) => `文字列はちょうど${length}文字である必要があります`,
7
- stringEmail: '無効なメールアドレス',
8
- stringUrl: '無効なURL',
9
- stringUuid: '無効なUUID',
10
- stringRegex: '無効なフォーマット',
11
- stringStartsWith: (prefix) => `文字列は「${prefix}」で始まる必要があります`,
12
- stringEndsWith: (suffix) => `文字列は「${suffix}」で終わる必要があります`,
13
- stringIncludes: (substring) => `文字列は「${substring}」を含む必要があります`,
14
- stringIp: '無効なIPアドレス',
15
- stringIpv4: '無効なIPv4アドレス',
16
- stringIpv6: '無効なIPv6アドレス',
17
- stringEmpty: '文字列は空にできません',
18
- // Number validation messages
19
- invalidNumber: '無効な数値',
20
- numberMin: (min) => `数値は${min}以上である必要があります`,
21
- numberMax: (max) => `数値は${max}以下である必要があります`,
22
- numberInt: '数値は整数である必要があります',
23
- numberPositive: '数値は正の値である必要があります',
24
- numberNegative: '数値は負の値である必要があります',
25
- numberNonnegative: '数値は負の値にできません',
26
- numberNonpositive: '数値は正の値にできません',
27
- numberFinite: '数値は有限である必要があります',
28
- numberSafe: '数値は安全な整数である必要があります',
29
- numberMultipleOf: (value) => `数値は${value}の倍数である必要があります`,
30
- // Boolean validation messages
31
- invalidBoolean: '無効なブール値',
32
- // Date validation messages
33
- invalidDate: '無効な日付',
34
- dateMin: (date) => `日付は${date.toISOString()}より後である必要があります`,
35
- dateMax: (date) => `日付は${date.toISOString()}より前である必要があります`,
36
- // Object validation messages
37
- invalidObject: '無効なオブジェクト',
38
- unexpectedKeys: (keys) => `予期しないキー: ${keys.join(', ')}`,
39
- // Array validation messages
40
- invalidArray: '無効な配列',
41
- arrayMin: (min) => `配列は${min}個以上の要素が必要です`,
42
- arrayMax: (max) => `配列は${max}個以下の要素でなければなりません`,
43
- arrayLength: (length) => `配列はちょうど${length}個の要素が必要です`,
44
- arrayEmpty: '配列は空にできません',
45
- arrayItem: (index, error) => `インデックス${index}の無効な要素: ${error}`,
46
- // Object field validation
47
- objectField: (field, error) => `無効なフィールド「${field}」: ${error}`,
48
- // Union validation messages
49
- unionNoMatch: (errors) => `どのユニオンメンバーもマッチしませんでした: ${errors.join(', ')}`,
50
- // Intersection validation messages
51
- intersectionError: (error) => `交差検証に失敗しました: ${error}`,
52
- // Literal validation messages
53
- literalExpected: (expected, received) => `${expected}が期待されましたが、${received}を受け取りました`,
54
- // Enum validation messages
55
- enumExpected: (values, received) => `[${values.join(', ')}]のいずれかが期待されましたが、${received}を受け取りました`,
56
- // Special type validation messages
57
- expectedUndefined: 'undefinedが期待されました',
58
- neverType: 'neverタイプは解析できません',
59
- // New advanced type validation messages
60
- invalidBigint: '無効なbigint',
61
- invalidSymbol: '無効なシンボル',
62
- invalidTuple: '無効なタプル',
63
- tupleLength: (expected, received) => `タプルはちょうど${expected}個の要素が必要ですが、${received}個を受け取りました`,
64
- invalidRecord: '無効なレコード',
65
- invalidSet: '無効なSet',
66
- invalidMap: '無効なMap',
67
- // Transformation and refinement messages
68
- transformError: (error) => `変換に失敗しました: ${error}`,
69
- refinementError: (error) => `リファインメントに失敗しました: ${error}`,
70
- customValidationError: (error) => `カスタム検証が失敗しました: ${error}`,
71
- // Coercion messages
72
- coercionFailed: (type, value) => `${JSON.stringify(value)}を${type}に変換できません`,
73
- // Codec messages
74
- codecDecodeFailed: 'Failed to decode value',
75
- codecEncodeFailed: 'Failed to encode value',
76
- codecAsyncNotSupported: 'Async codec operations require using parseAsync/encodeAsync methods',
77
- // Base64/Hex messages
78
- invalidBase64: 'Invalid base64 string',
79
- invalidHex: 'Invalid hexadecimal string',
80
- // Uint8Array messages
81
- expectedUint8Array: 'Expected Uint8Array',
82
- uint8ArrayMinLength: (min) => `Uint8Array must have at least ${min} bytes`,
83
- uint8ArrayMaxLength: (max) => `Uint8Array must have at most ${max} bytes`,
84
- uint8ArrayExactLength: (length) => `Uint8Array must have exactly ${length} bytes`,
85
- // Generic type error messages
86
- expectedString: 'Expected string',
87
- stringExpected: (received, expected) => `${expected}が期待されましたが、${received}を受け取りました`,
88
- stringBoolExpected: (validValues, received) => `無効なブール文字列です。次のいずれかである必要があります: ${validValues}、受け取りました: "${received}"`,
89
- invalidJson: '無効なJSON',
90
- stringPatternInvalid: '文字列が必要なパターンと一致しません',
91
- // File validation messages
92
- invalidFile: 'Expected a File object',
93
- fileNotSupported: 'File API not supported in this environment',
94
- fileMinSize: (min) => `File size must be at least ${min} bytes`,
95
- fileMaxSize: (max) => `File size must not exceed ${max} bytes`,
96
- fileMimeType: (allowed) => `Invalid file type. Expected: ${allowed.join(", ")}`,
97
- // Function validation messages
98
- invalidFunction: '関数が期待されました',
99
- // CIDR validation messages
100
- stringCidrv4: '無効なIPv4 CIDRブロック',
101
- stringCidrv6: '無効なIPv6 CIDRブロック',
102
- // Safe extend validation messages
103
- safeExtendOverlap: (keys) => `既存のキーを上書きできません: ${keys.join(', ')}。上書きしたい場合はextend()を使用してください。`
104
- };
105
-
106
- export { ja };
107
- //# sourceMappingURL=ja.js.map
1
+ const e={invalidString:"無効な文字列",stringMin:e=>`文字列は${e}文字以上である必要があります`,stringMax:e=>`文字列は${e}文字以下である必要があります`,stringLength:e=>`文字列はちょうど${e}文字である必要があります`,stringEmail:"無効なメールアドレス",stringUrl:"無効なURL",stringUuid:"無効なUUID",stringRegex:"無効なフォーマット",stringStartsWith:e=>`文字列は「${e}」で始まる必要があります`,stringEndsWith:e=>`文字列は「${e}」で終わる必要があります`,stringIncludes:e=>`文字列は「${e}」を含む必要があります`,stringIp:"無効なIPアドレス",stringIpv4:"無効なIPv4アドレス",stringIpv6:"無効なIPv6アドレス",stringEmpty:"文字列は空にできません",invalidNumber:"無効な数値",numberMin:e=>`数値は${e}以上である必要があります`,numberMax:e=>`数値は${e}以下である必要があります`,numberInt:"数値は整数である必要があります",numberPositive:"数値は正の値である必要があります",numberNegative:"数値は負の値である必要があります",numberNonnegative:"数値は負の値にできません",numberNonpositive:"数値は正の値にできません",numberFinite:"数値は有限である必要があります",numberSafe:"数値は安全な整数である必要があります",numberMultipleOf:e=>`数値は${e}の倍数である必要があります`,invalidBoolean:"無効なブール値",invalidDate:"無効な日付",dateMin:e=>`日付は${e.toISOString()}より後である必要があります`,dateMax:e=>`日付は${e.toISOString()}より前である必要があります`,invalidObject:"無効なオブジェクト",unexpectedKeys:e=>`予期しないキー: ${e.join(", ")}`,invalidArray:"無効な配列",arrayMin:e=>`配列は${e}個以上の要素が必要です`,arrayMax:e=>`配列は${e}個以下の要素でなければなりません`,arrayLength:e=>`配列はちょうど${e}個の要素が必要です`,arrayEmpty:"配列は空にできません",arrayItem:(e,i)=>`インデックス${e}の無効な要素: ${i}`,objectField:(e,i)=>`無効なフィールド「${e}」: ${i}`,unionNoMatch:e=>`どのユニオンメンバーもマッチしませんでした: ${e.join(", ")}`,intersectionError:e=>`交差検証に失敗しました: ${e}`,literalExpected:(e,i)=>`${e}が期待されましたが、${i}を受け取りました`,enumExpected:(e,i)=>`[${e.join(", ")}]のいずれかが期待されましたが、${i}を受け取りました`,expectedUndefined:"undefinedが期待されました",neverType:"neverタイプは解析できません",invalidBigint:"無効なbigint",invalidSymbol:"無効なシンボル",invalidTuple:"無効なタプル",tupleLength:(e,i)=>`タプルはちょうど${e}個の要素が必要ですが、${i}個を受け取りました`,invalidRecord:"無効なレコード",invalidSet:"無効なSet",invalidMap:"無効なMap",transformError:e=>`変換に失敗しました: ${e}`,refinementError:e=>`リファインメントに失敗しました: ${e}`,customValidationError:e=>`カスタム検証が失敗しました: ${e}`,coercionFailed:(e,i)=>`${JSON.stringify(i)}を${e}に変換できません`,codecDecodeFailed:"Failed to decode value",codecEncodeFailed:"Failed to encode value",codecAsyncNotSupported:"Async codec operations require using parseAsync/encodeAsync methods",invalidBase64:"Invalid base64 string",invalidHex:"Invalid hexadecimal string",expectedUint8Array:"Expected Uint8Array",uint8ArrayMinLength:e=>`Uint8Array must have at least ${e} bytes`,uint8ArrayMaxLength:e=>`Uint8Array must have at most ${e} bytes`,uint8ArrayExactLength:e=>`Uint8Array must have exactly ${e} bytes`,expectedString:"Expected string",stringExpected:(e,i)=>`${i}が期待されましたが、${e}を受け取りました`,stringBoolExpected:(e,i)=>`無効なブール文字列です。次のいずれかである必要があります: ${e}、受け取りました: "${i}"`,invalidJson:"無効なJSON",stringPatternInvalid:"文字列が必要なパターンと一致しません",invalidFile:"Expected a File object",fileNotSupported:"File API not supported in this environment",fileMinSize:e=>`File size must be at least ${e} bytes`,fileMaxSize:e=>`File size must not exceed ${e} bytes`,fileMimeType:e=>`Invalid file type. Expected: ${e.join(", ")}`,invalidFunction:"関数が期待されました",stringCidrv4:"無効なIPv4 CIDRブロック",stringCidrv6:"無効なIPv6 CIDRブロック",safeExtendOverlap:e=>`既存のキーを上書きできません: ${e.join(", ")}。上書きしたい場合はextend()を使用してください。`};export{e as ja};
@@ -1,3 +1,2 @@
1
- import { LocaleMessages } from './types';
1
+ import { LocaleMessages } from './types.js';
2
2
  export declare const ko: LocaleMessages;
3
- //# sourceMappingURL=ko.d.ts.map
@@ -1,107 +1 @@
1
- const ko = {
2
- // String validation messages
3
- invalidString: '유효하지 않은 문자열',
4
- stringMin: (min) => `문자열은 최소 ${min}자여야 합니다`,
5
- stringMax: (max) => `문자열은 최대 ${max}자여야 합니다`,
6
- stringLength: (length) => `문자열은 정확히 ${length}자여야 합니다`,
7
- stringEmail: '유효하지 않은 이메일 주소',
8
- stringUrl: '유효하지 않은 URL',
9
- stringUuid: '유효하지 않은 UUID',
10
- stringRegex: '유효하지 않은 형식',
11
- stringStartsWith: (prefix) => `문자열은 "${prefix}"로 시작해야 합니다`,
12
- stringEndsWith: (suffix) => `문자열은 "${suffix}"로 끝나야 합니다`,
13
- stringIncludes: (substring) => `문자열은 "${substring}"을 포함해야 합니다`,
14
- stringIp: '유효하지 않은 IP 주소',
15
- stringIpv4: '유효하지 않은 IPv4 주소',
16
- stringIpv6: '유효하지 않은 IPv6 주소',
17
- stringEmpty: '문자열은 비어있을 수 없습니다',
18
- // Number validation messages
19
- invalidNumber: '유효하지 않은 숫자',
20
- numberMin: (min) => `숫자는 최소 ${min}이어야 합니다`,
21
- numberMax: (max) => `숫자는 최대 ${max}이어야 합니다`,
22
- numberInt: '숫자는 정수여야 합니다',
23
- numberPositive: '숫자는 양수여야 합니다',
24
- numberNegative: '숫자는 음수여야 합니다',
25
- numberNonnegative: '숫자는 음수일 수 없습니다',
26
- numberNonpositive: '숫자는 양수일 수 없습니다',
27
- numberFinite: '숫자는 유한해야 합니다',
28
- numberSafe: '숫자는 안전한 정수여야 합니다',
29
- numberMultipleOf: (value) => `숫자는 ${value}의 배수여야 합니다`,
30
- // Boolean validation messages
31
- invalidBoolean: '유효하지 않은 불린 값',
32
- // Date validation messages
33
- invalidDate: '유효하지 않은 날짜',
34
- dateMin: (date) => `날짜는 ${date.toISOString()} 이후여야 합니다`,
35
- dateMax: (date) => `날짜는 ${date.toISOString()} 이전이어야 합니다`,
36
- // Object validation messages
37
- invalidObject: '유효하지 않은 객체',
38
- unexpectedKeys: (keys) => `예상치 못한 키: ${keys.join(', ')}`,
39
- // Array validation messages
40
- invalidArray: '유효하지 않은 배열',
41
- arrayMin: (min) => `배열은 최소 ${min}개의 요소가 있어야 합니다`,
42
- arrayMax: (max) => `배열은 최대 ${max}개의 요소가 있어야 합니다`,
43
- arrayLength: (length) => `배열은 정확히 ${length}개의 요소가 있어야 합니다`,
44
- arrayEmpty: '배열은 비어있을 수 없습니다',
45
- arrayItem: (index, error) => `인덱스 ${index}의 유효하지 않은 요소: ${error}`,
46
- // Object field validation
47
- objectField: (field, error) => `유효하지 않은 필드 "${field}": ${error}`,
48
- // Union validation messages
49
- unionNoMatch: (errors) => `어떤 유니온 멤버도 일치하지 않았습니다: ${errors.join(', ')}`,
50
- // Intersection validation messages
51
- intersectionError: (error) => `교집합 검증에 실패했습니다: ${error}`,
52
- // Literal validation messages
53
- literalExpected: (expected, received) => `${expected}가 예상되었지만 ${received}를 받았습니다`,
54
- // Enum validation messages
55
- enumExpected: (values, received) => `[${values.join(', ')}] 중 하나가 예상되었지만 ${received}를 받았습니다`,
56
- // Special type validation messages
57
- expectedUndefined: 'undefined가 예상되었습니다',
58
- neverType: 'never 타입은 파싱할 수 없습니다',
59
- // New advanced type validation messages
60
- invalidBigint: '유효하지 않은 bigint',
61
- invalidSymbol: '유효하지 않은 심볼',
62
- invalidTuple: '유효하지 않은 튜플',
63
- tupleLength: (expected, received) => `튜플은 정확히 ${expected}개의 요소가 있어야 하지만 ${received}개를 받았습니다`,
64
- invalidRecord: '유효하지 않은 레코드',
65
- invalidSet: '유효하지 않은 Set',
66
- invalidMap: '유효하지 않은 Map',
67
- // Transformation and refinement messages
68
- transformError: (error) => `변환 실패: ${error}`,
69
- refinementError: (error) => `정제 실패: ${error}`,
70
- customValidationError: (error) => `사용자 정의 유효성 검사 실패: ${error}`,
71
- // Coercion messages
72
- coercionFailed: (type, value) => `${JSON.stringify(value)}를 ${type}로 강제 변환할 수 없습니다`,
73
- // Codec messages
74
- codecDecodeFailed: 'Failed to decode value',
75
- codecEncodeFailed: 'Failed to encode value',
76
- codecAsyncNotSupported: 'Async codec operations require using parseAsync/encodeAsync methods',
77
- // Base64/Hex messages
78
- invalidBase64: 'Invalid base64 string',
79
- invalidHex: 'Invalid hexadecimal string',
80
- // Uint8Array messages
81
- expectedUint8Array: 'Expected Uint8Array',
82
- uint8ArrayMinLength: (min) => `Uint8Array must have at least ${min} bytes`,
83
- uint8ArrayMaxLength: (max) => `Uint8Array must have at most ${max} bytes`,
84
- uint8ArrayExactLength: (length) => `Uint8Array must have exactly ${length} bytes`,
85
- // Generic type error messages
86
- expectedString: 'Expected string',
87
- stringExpected: (received, expected) => `${expected}가 예상되었지만 ${received}를 받았습니다`,
88
- stringBoolExpected: (validValues, received) => `잘못된 불린 문자열입니다. 다음 중 하나여야 합니다: ${validValues}, 받은 값: "${received}"`,
89
- invalidJson: '잘못된 JSON',
90
- stringPatternInvalid: '문자열이 필요한 패턴과 일치하지 않습니다',
91
- // File validation messages
92
- invalidFile: 'Expected a File object',
93
- fileNotSupported: 'File API not supported in this environment',
94
- fileMinSize: (min) => `File size must be at least ${min} bytes`,
95
- fileMaxSize: (max) => `File size must not exceed ${max} bytes`,
96
- fileMimeType: (allowed) => `Invalid file type. Expected: ${allowed.join(", ")}`,
97
- // Function validation messages
98
- invalidFunction: '함수가 예상되었습니다',
99
- // CIDR validation messages
100
- stringCidrv4: '유효하지 않은 IPv4 CIDR 블록',
101
- stringCidrv6: '유효하지 않은 IPv6 CIDR 블록',
102
- // Safe extend validation messages
103
- safeExtendOverlap: (keys) => `기존 키를 덮어쓸 수 없습니다: ${keys.join(', ')}. 덮어쓰려면 extend()를 사용하세요.`
104
- };
105
-
106
- export { ko };
107
- //# sourceMappingURL=ko.js.map
1
+ const e={invalidString:"유효하지 않은 문자열",stringMin:e=>`문자열은 최소 ${e}자여야 합니다`,stringMax:e=>`문자열은 최대 ${e}자여야 합니다`,stringLength:e=>`문자열은 정확히 ${e}자여야 합니다`,stringEmail:"유효하지 않은 이메일 주소",stringUrl:"유효하지 않은 URL",stringUuid:"유효하지 않은 UUID",stringRegex:"유효하지 않은 형식",stringStartsWith:e=>`문자열은 "${e}"로 시작해야 합니다`,stringEndsWith:e=>`문자열은 "${e}"로 끝나야 합니다`,stringIncludes:e=>`문자열은 "${e}"을 포함해야 합니다`,stringIp:"유효하지 않은 IP 주소",stringIpv4:"유효하지 않은 IPv4 주소",stringIpv6:"유효하지 않은 IPv6 주소",stringEmpty:"문자열은 비어있을 수 없습니다",invalidNumber:"유효하지 않은 숫자",numberMin:e=>`숫자는 최소 ${e}이어야 합니다`,numberMax:e=>`숫자는 최대 ${e}이어야 합니다`,numberInt:"숫자는 정수여야 합니다",numberPositive:"숫자는 양수여야 합니다",numberNegative:"숫자는 음수여야 합니다",numberNonnegative:"숫자는 음수일 수 없습니다",numberNonpositive:"숫자는 양수일 수 없습니다",numberFinite:"숫자는 유한해야 합니다",numberSafe:"숫자는 안전한 정수여야 합니다",numberMultipleOf:e=>`숫자는 ${e}의 배수여야 합니다`,invalidBoolean:"유효하지 않은 불린 값",invalidDate:"유효하지 않은 날짜",dateMin:e=>`날짜는 ${e.toISOString()} 이후여야 합니다`,dateMax:e=>`날짜는 ${e.toISOString()} 이전이어야 합니다`,invalidObject:"유효하지 않은 객체",unexpectedKeys:e=>`예상치 못한 키: ${e.join(", ")}`,invalidArray:"유효하지 않은 배열",arrayMin:e=>`배열은 최소 ${e}개의 요소가 있어야 합니다`,arrayMax:e=>`배열은 최대 ${e}개의 요소가 있어야 합니다`,arrayLength:e=>`배열은 정확히 ${e}개의 요소가 있어야 합니다`,arrayEmpty:"배열은 비어있을 수 없습니다",arrayItem:(e,i)=>`인덱스 ${e}의 유효하지 않은 요소: ${i}`,objectField:(e,i)=>`유효하지 않은 필드 "${e}": ${i}`,unionNoMatch:e=>`어떤 유니온 멤버도 일치하지 않았습니다: ${e.join(", ")}`,intersectionError:e=>`교집합 검증에 실패했습니다: ${e}`,literalExpected:(e,i)=>`${e}가 예상되었지만 ${i}를 받았습니다`,enumExpected:(e,i)=>`[${e.join(", ")}] 중 하나가 예상되었지만 ${i}를 받았습니다`,expectedUndefined:"undefined가 예상되었습니다",neverType:"never 타입은 파싱할 수 없습니다",invalidBigint:"유효하지 않은 bigint",invalidSymbol:"유효하지 않은 심볼",invalidTuple:"유효하지 않은 튜플",tupleLength:(e,i)=>`튜플은 정확히 ${e}개의 요소가 있어야 하지만 ${i}개를 받았습니다`,invalidRecord:"유효하지 않은 레코드",invalidSet:"유효하지 않은 Set",invalidMap:"유효하지 않은 Map",transformError:e=>`변환 실패: ${e}`,refinementError:e=>`정제 실패: ${e}`,customValidationError:e=>`사용자 정의 유효성 검사 실패: ${e}`,coercionFailed:(e,i)=>`${JSON.stringify(i)}를 ${e}로 강제 변환할 수 없습니다`,codecDecodeFailed:"Failed to decode value",codecEncodeFailed:"Failed to encode value",codecAsyncNotSupported:"Async codec operations require using parseAsync/encodeAsync methods",invalidBase64:"Invalid base64 string",invalidHex:"Invalid hexadecimal string",expectedUint8Array:"Expected Uint8Array",uint8ArrayMinLength:e=>`Uint8Array must have at least ${e} bytes`,uint8ArrayMaxLength:e=>`Uint8Array must have at most ${e} bytes`,uint8ArrayExactLength:e=>`Uint8Array must have exactly ${e} bytes`,expectedString:"Expected string",stringExpected:(e,i)=>`${i}가 예상되었지만 ${e}를 받았습니다`,stringBoolExpected:(e,i)=>`잘못된 불린 문자열입니다. 다음 중 하나여야 합니다: ${e}, 받은 값: "${i}"`,invalidJson:"잘못된 JSON",stringPatternInvalid:"문자열이 필요한 패턴과 일치하지 않습니다",invalidFile:"Expected a File object",fileNotSupported:"File API not supported in this environment",fileMinSize:e=>`File size must be at least ${e} bytes`,fileMaxSize:e=>`File size must not exceed ${e} bytes`,fileMimeType:e=>`Invalid file type. Expected: ${e.join(", ")}`,invalidFunction:"함수가 예상되었습니다",stringCidrv4:"유효하지 않은 IPv4 CIDR 블록",stringCidrv6:"유효하지 않은 IPv6 CIDR 블록",safeExtendOverlap:e=>`기존 키를 덮어쓸 수 없습니다: ${e.join(", ")}. 덮어쓰려면 extend()를 사용하세요.`};export{e as ko};
@@ -16,7 +16,8 @@
16
16
  * registerLocale('tr', tr);
17
17
  * ```
18
18
  */
19
- import type { Locale, LocaleMessages } from './types';
19
+ import type { Locale } from './types.js';
20
+ import { getLocale, getMessages, getMessagesForLocale, isLocaleLoaded, registerLocale } from './runtime.js';
20
21
  /**
21
22
  * Set the current locale asynchronously (lazy loading)
22
23
  * This is the recommended way to load locales in web applications.
@@ -61,29 +62,6 @@ export declare function setLocale(locale: Locale): void;
61
62
  * registerLocale('tr', tr);
62
63
  * ```
63
64
  */
64
- export declare function registerLocale(locale: Locale, messages: LocaleMessages): void;
65
- /**
66
- * Get the current locale code
67
- */
68
- export declare function getLocale(): Locale;
69
- /**
70
- * Get messages for the current locale
71
- * This is used internally by validators to get error messages.
72
- */
73
- export declare function getMessages(): LocaleMessages;
74
- /**
75
- * Get messages for a specific locale
76
- * Returns English fallback if locale is not loaded.
77
- *
78
- * @param locale - The locale to get messages for
79
- */
80
- export declare function getMessagesForLocale(locale: Locale): LocaleMessages;
81
- /**
82
- * Check if a locale is loaded and available for synchronous use
83
- *
84
- * @param locale - The locale to check
85
- */
86
- export declare function isLocaleLoaded(locale: Locale): boolean;
87
65
  /**
88
66
  * Check if a locale is supported (can be lazy loaded)
89
67
  *
@@ -107,5 +85,5 @@ export declare function getSupportedLocales(): Locale[];
107
85
  * ```
108
86
  */
109
87
  export declare function preloadLocales(locales: Locale[]): Promise<void>;
110
- export type { Locale, LocaleMessages } from './types';
111
- //# sourceMappingURL=lazy.d.ts.map
88
+ export type { Locale, LocaleMessages } from './types.js';
89
+ export { getLocale, getMessages, getMessagesForLocale, isLocaleLoaded, registerLocale };
@@ -1,220 +1 @@
1
- import { en } from './en.js';
2
-
3
- /**
4
- * VLD Lazy Locale System
5
- *
6
- * This module provides lazy loading for locale files to reduce bundle size.
7
- * English is always bundled as a fallback; other languages are loaded on demand.
8
- *
9
- * @example
10
- * ```typescript
11
- * // Async loading (recommended for web apps)
12
- * import { setLocaleAsync, getMessages } from '@oxog/vld/locales';
13
- * await setLocaleAsync('tr');
14
- *
15
- * // Static import (for SSR or known locales)
16
- * import { tr } from '@oxog/vld/locales/tr';
17
- * import { registerLocale } from '@oxog/vld/locales';
18
- * registerLocale('tr', tr);
19
- * ```
20
- */
21
- // ============================================
22
- // State
23
- // ============================================
24
- let currentLocale = 'en';
25
- let currentMessages = en;
26
- const loadedLocales = new Map([['en', en]]);
27
- const localeLoaders = {
28
- // Base languages
29
- tr: () => import('./tr.js').then(m => m.tr),
30
- es: () => import('./es.js').then(m => m.es),
31
- fr: () => import('./fr.js').then(m => m.fr),
32
- de: () => import('./de.js').then(m => m.de),
33
- it: () => import('./it.js').then(m => m.it),
34
- pt: () => import('./pt.js').then(m => m.pt),
35
- ru: () => import('./ru.js').then(m => m.ru),
36
- ja: () => import('./ja.js').then(m => m.ja),
37
- ko: () => import('./ko.js').then(m => m.ko),
38
- zh: () => import('./zh.js').then(m => m.zh),
39
- ar: () => import('./ar.js').then(m => m.ar),
40
- hi: () => import('./hi.js').then(m => m.hi),
41
- nl: () => import('./nl.js').then(m => m.nl),
42
- pl: () => import('./pl.js').then(m => m.pl),
43
- // Major European Languages
44
- da: () => import('./da.js').then(m => m.da),
45
- sv: () => import('./sv.js').then(m => m.sv),
46
- no: () => import('./no.js').then(m => m.no),
47
- fi: () => import('./fi.js').then(m => m.fi),
48
- // Major Asian Languages
49
- th: () => import('./th.js').then(m => m.th),
50
- vi: () => import('./vi.js').then(m => m.vi),
51
- id: () => import('./id.js').then(m => m.id),
52
- bn: () => import('./bn.js').then(m => m.bn),
53
- // African Languages
54
- sw: () => import('./sw.js').then(m => m.sw),
55
- af: () => import('./af.js').then(m => m.af),
56
- // American Languages
57
- 'pt-BR': () => import('./pt-BR.js').then(m => m.ptBR),
58
- 'es-MX': () => import('./es-MX.js').then(m => m.esMX),
59
- };
60
- // ============================================
61
- // Public API
62
- // ============================================
63
- /**
64
- * Set the current locale asynchronously (lazy loading)
65
- * This is the recommended way to load locales in web applications.
66
- *
67
- * @param locale - The locale to set
68
- * @throws Error if the locale is not supported
69
- *
70
- * @example
71
- * ```typescript
72
- * await setLocaleAsync('tr');
73
- * // Now all validation errors will be in Turkish
74
- * ```
75
- */
76
- async function setLocaleAsync(locale) {
77
- // If already loaded, just switch
78
- if (loadedLocales.has(locale)) {
79
- currentLocale = locale;
80
- currentMessages = loadedLocales.get(locale);
81
- return;
82
- }
83
- // If English, it's already bundled
84
- if (locale === 'en') {
85
- currentLocale = 'en';
86
- currentMessages = en;
87
- return;
88
- }
89
- // Try to load dynamically
90
- const loader = localeLoaders[locale];
91
- if (!loader) {
92
- console.warn(`Locale "${locale}" not available. Falling back to English.`);
93
- return;
94
- }
95
- try {
96
- const messages = await loader();
97
- loadedLocales.set(locale, messages);
98
- currentLocale = locale;
99
- currentMessages = messages;
100
- }
101
- catch (error) {
102
- console.warn(`Failed to load locale "${locale}". Falling back to English.`, error);
103
- }
104
- }
105
- /**
106
- * Set the current locale synchronously
107
- * Only works if the locale has been pre-loaded or registered.
108
- *
109
- * @param locale - The locale to set
110
- * @throws Error if the locale is not preloaded
111
- *
112
- * @example
113
- * ```typescript
114
- * import { tr } from '@oxog/vld/locales/tr';
115
- * import { registerLocale, setLocale } from '@oxog/vld/locales';
116
- * registerLocale('tr', tr);
117
- * setLocale('tr'); // Now works synchronously
118
- * ```
119
- */
120
- function setLocale(locale) {
121
- if (loadedLocales.has(locale)) {
122
- currentLocale = locale;
123
- currentMessages = loadedLocales.get(locale);
124
- return;
125
- }
126
- throw new Error(`Locale "${locale}" not preloaded. Use setLocaleAsync() for lazy loading ` +
127
- `or import the locale directly: import { ${locale} } from '@oxog/vld/locales/${locale}'`);
128
- }
129
- /**
130
- * Register a locale for synchronous access
131
- * Use this after importing a locale file directly.
132
- *
133
- * @param locale - The locale code
134
- * @param messages - The locale messages object
135
- *
136
- * @example
137
- * ```typescript
138
- * import { tr } from '@oxog/vld/locales/tr';
139
- * import { registerLocale } from '@oxog/vld/locales';
140
- * registerLocale('tr', tr);
141
- * ```
142
- */
143
- function registerLocale(locale, messages) {
144
- loadedLocales.set(locale, messages);
145
- }
146
- /**
147
- * Get the current locale code
148
- */
149
- function getLocale() {
150
- return currentLocale;
151
- }
152
- /**
153
- * Get messages for the current locale
154
- * This is used internally by validators to get error messages.
155
- */
156
- function getMessages() {
157
- return currentMessages;
158
- }
159
- /**
160
- * Get messages for a specific locale
161
- * Returns English fallback if locale is not loaded.
162
- *
163
- * @param locale - The locale to get messages for
164
- */
165
- function getMessagesForLocale(locale) {
166
- return loadedLocales.get(locale) || en;
167
- }
168
- /**
169
- * Check if a locale is loaded and available for synchronous use
170
- *
171
- * @param locale - The locale to check
172
- */
173
- function isLocaleLoaded(locale) {
174
- return loadedLocales.has(locale);
175
- }
176
- /**
177
- * Check if a locale is supported (can be lazy loaded)
178
- *
179
- * @param locale - The locale to check
180
- */
181
- function isLocaleSupported(locale) {
182
- return locale === 'en' || locale in localeLoaders;
183
- }
184
- /**
185
- * Get list of all supported locales
186
- */
187
- function getSupportedLocales() {
188
- return ['en', ...Object.keys(localeLoaders)];
189
- }
190
- /**
191
- * Preload multiple locales in parallel
192
- * Useful for SSR or when you know which locales will be needed.
193
- *
194
- * @param locales - Array of locale codes to preload
195
- *
196
- * @example
197
- * ```typescript
198
- * // Preload Turkish, German, and French
199
- * await preloadLocales(['tr', 'de', 'fr']);
200
- * ```
201
- */
202
- async function preloadLocales(locales) {
203
- await Promise.all(locales.map(async (locale) => {
204
- if (!loadedLocales.has(locale) && locale !== 'en') {
205
- const loader = localeLoaders[locale];
206
- if (loader) {
207
- try {
208
- const messages = await loader();
209
- loadedLocales.set(locale, messages);
210
- }
211
- catch {
212
- // Silently ignore preload failures
213
- }
214
- }
215
- }
216
- }));
217
- }
218
-
219
- export { getLocale, getMessages, getMessagesForLocale, getSupportedLocales, isLocaleLoaded, isLocaleSupported, preloadLocales, registerLocale, setLocale, setLocaleAsync };
220
- //# sourceMappingURL=lazy.js.map
1
+ import{isLocaleLoaded as t,registerLocale as e,setLocale as o}from"./runtime.js";export{getLocale,getMessages,getMessagesForLocale}from"./runtime.js";const n={tr:()=>import("./tr.js").then(t=>t.tr),es:()=>import("./es.js").then(t=>t.es),fr:()=>import("./fr.js").then(t=>t.fr),de:()=>import("./de.js").then(t=>t.de),it:()=>import("./it.js").then(t=>t.it),pt:()=>import("./pt.js").then(t=>t.pt),ru:()=>import("./ru.js").then(t=>t.ru),ja:()=>import("./ja.js").then(t=>t.ja),ko:()=>import("./ko.js").then(t=>t.ko),zh:()=>import("./zh.js").then(t=>t.zh),ar:()=>import("./ar.js").then(t=>t.ar),hi:()=>import("./hi.js").then(t=>t.hi),nl:()=>import("./nl.js").then(t=>t.nl),pl:()=>import("./pl.js").then(t=>t.pl),da:()=>import("./da.js").then(t=>t.da),sv:()=>import("./sv.js").then(t=>t.sv),no:()=>import("./no.js").then(t=>t.no),fi:()=>import("./fi.js").then(t=>t.fi),th:()=>import("./th.js").then(t=>t.th),vi:()=>import("./vi.js").then(t=>t.vi),id:()=>import("./id.js").then(t=>t.id),bn:()=>import("./bn.js").then(t=>t.bn),sw:()=>import("./sw.js").then(t=>t.sw),af:()=>import("./af.js").then(t=>t.af),"pt-BR":()=>import("./pt-BR.js").then(t=>t.ptBR),"es-MX":()=>import("./es-MX.js").then(t=>t.esMX)};async function i(i){if(t(i))return void o(i);if("en"===i)return void o("en");const r=n[i];if(r)try{const t=await r();e(i,t),o(i)}catch(t){console.warn(`Failed to load locale "${i}". Falling back to English.`,t)}else console.warn(`Locale "${i}" not available. Falling back to English.`)}function r(e){if(!t(e))throw new Error(`Locale "${e}" not preloaded. Use setLocaleAsync() for lazy loading or import the locale directly: import { ${e} } from '@oxog/vld/locales/${e}'`);o(e)}function s(t){return"en"===t||t in n}function a(){return["en",...Object.keys(n)]}async function p(o){await Promise.all(o.map(async o=>{if(!t(o)&&"en"!==o){const t=n[o];if(t)try{const n=await t();e(o,n)}catch{}}}))}export{a as getSupportedLocales,t as isLocaleLoaded,s as isLocaleSupported,p as preloadLocales,e as registerLocale,r as setLocale,i as setLocaleAsync};