@flickfyi/flkr 0.0.141 → 0.0.153

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 (494) hide show
  1. package/node_modules/@flickfyi/attestation/.turbo/turbo-build.log +7 -7
  2. package/node_modules/@flickfyi/biscuit/.turbo/turbo-build.log +7 -7
  3. package/node_modules/@flickfyi/core/.oxlintrc.json +2 -1
  4. package/node_modules/@flickfyi/core/.turbo/turbo-build.log +499 -92
  5. package/node_modules/@flickfyi/core/README.md +58 -4
  6. package/node_modules/@flickfyi/core/dist/index.cjs +1 -1
  7. package/node_modules/@flickfyi/core/dist/index.js +35 -24
  8. package/node_modules/@flickfyi/core/dist/kowalski/calculations.d.ts +17 -0
  9. package/node_modules/@flickfyi/core/dist/kowalski/calculator.d.ts +13 -0
  10. package/node_modules/@flickfyi/core/dist/kowalski/catalog.cjs +1 -0
  11. package/node_modules/@flickfyi/core/dist/kowalski/catalog.d.cts +962 -0
  12. package/node_modules/@flickfyi/core/dist/kowalski/catalog.d.ts +962 -0
  13. package/node_modules/@flickfyi/core/dist/kowalski/catalog.js +639 -0
  14. package/node_modules/@flickfyi/core/dist/kowalski/clocks.d.ts +4 -0
  15. package/node_modules/@flickfyi/core/dist/kowalski/date-time.d.ts +22 -0
  16. package/node_modules/@flickfyi/core/dist/kowalski/details.d.ts +7 -0
  17. package/node_modules/@flickfyi/core/dist/kowalski/everyday.d.ts +8 -0
  18. package/node_modules/@flickfyi/core/dist/kowalski/format.d.ts +4 -0
  19. package/node_modules/@flickfyi/core/dist/kowalski/frame.d.ts +161 -0
  20. package/node_modules/@flickfyi/core/dist/kowalski/index.cjs +21 -0
  21. package/node_modules/@flickfyi/core/dist/kowalski/index.d.cts +8 -0
  22. package/node_modules/@flickfyi/core/dist/kowalski/index.d.ts +8 -0
  23. package/node_modules/@flickfyi/core/dist/kowalski/index.js +7496 -0
  24. package/node_modules/@flickfyi/core/dist/kowalski/productivity.d.ts +5 -0
  25. package/node_modules/@flickfyi/core/dist/kowalski/recipe.d.ts +8 -0
  26. package/node_modules/@flickfyi/core/dist/kowalski/tools.d.ts +7 -0
  27. package/node_modules/@flickfyi/core/dist/kowalski/use-clock.d.ts +6 -0
  28. package/node_modules/@flickfyi/core/dist/kowalski/use-configured-feature.d.ts +19 -0
  29. package/node_modules/@flickfyi/core/dist/kowalski/use-feature-store.d.ts +15 -0
  30. package/node_modules/@flickfyi/core/dist/kowalski.css +506 -0
  31. package/node_modules/@flickfyi/core/dist/molecules/field/field.d.ts +8 -0
  32. package/node_modules/@flickfyi/core/dist/molecules/index.cjs +1 -1
  33. package/node_modules/@flickfyi/core/dist/molecules/index.d.cts +3 -0
  34. package/node_modules/@flickfyi/core/dist/molecules/index.d.ts +3 -0
  35. package/node_modules/@flickfyi/core/dist/molecules/index.js +88 -27
  36. package/node_modules/@flickfyi/core/dist/molecules/segmented/segmented.d.ts +10 -0
  37. package/node_modules/@flickfyi/core/dist/molecules/stepper/stepper.d.ts +10 -0
  38. package/node_modules/@flickfyi/core/dist/quantum/use-store.d.ts +7 -1
  39. package/node_modules/@flickfyi/core/dist/themes.css +2 -0
  40. package/node_modules/@flickfyi/core/examples/kowalski/bill-split/bill-split.stories.tsx +15 -0
  41. package/node_modules/@flickfyi/core/examples/kowalski/bill-split/bill-split.tsx +17 -0
  42. package/node_modules/@flickfyi/core/examples/kowalski/bookmark/bookmark.stories.tsx +15 -0
  43. package/node_modules/@flickfyi/core/examples/kowalski/bookmark/bookmark.tsx +23 -0
  44. package/node_modules/@flickfyi/core/examples/kowalski/budget/budget.stories.tsx +15 -0
  45. package/node_modules/@flickfyi/core/examples/kowalski/budget/budget.tsx +26 -0
  46. package/node_modules/@flickfyi/core/examples/kowalski/calculator/calculator.stories.tsx +15 -0
  47. package/node_modules/@flickfyi/core/examples/kowalski/calculator/calculator.tsx +24 -0
  48. package/node_modules/@flickfyi/core/examples/kowalski/checklist/checklist.stories.tsx +15 -0
  49. package/node_modules/@flickfyi/core/examples/kowalski/checklist/checklist.tsx +26 -0
  50. package/node_modules/@flickfyi/core/examples/kowalski/color-palette/color-palette.stories.tsx +15 -0
  51. package/node_modules/@flickfyi/core/examples/kowalski/color-palette/color-palette.tsx +22 -0
  52. package/node_modules/@flickfyi/core/examples/kowalski/contact/contact.stories.tsx +15 -0
  53. package/node_modules/@flickfyi/core/examples/kowalski/contact/contact.tsx +23 -0
  54. package/node_modules/@flickfyi/core/examples/kowalski/countdown/countdown.stories.tsx +15 -0
  55. package/node_modules/@flickfyi/core/examples/kowalski/countdown/countdown.tsx +23 -0
  56. package/node_modules/@flickfyi/core/examples/kowalski/event/event.stories.tsx +15 -0
  57. package/node_modules/@flickfyi/core/examples/kowalski/event/event.tsx +24 -0
  58. package/node_modules/@flickfyi/core/examples/kowalski/expense/expense.stories.tsx +15 -0
  59. package/node_modules/@flickfyi/core/examples/kowalski/expense/expense.tsx +23 -0
  60. package/node_modules/@flickfyi/core/examples/kowalski/goal/goal.stories.tsx +15 -0
  61. package/node_modules/@flickfyi/core/examples/kowalski/goal/goal.tsx +24 -0
  62. package/node_modules/@flickfyi/core/examples/kowalski/habit/habit.stories.tsx +15 -0
  63. package/node_modules/@flickfyi/core/examples/kowalski/habit/habit.tsx +23 -0
  64. package/node_modules/@flickfyi/core/examples/kowalski/ledger/ledger.stories.tsx +15 -0
  65. package/node_modules/@flickfyi/core/examples/kowalski/ledger/ledger.tsx +25 -0
  66. package/node_modules/@flickfyi/core/examples/kowalski/note/note.stories.tsx +15 -0
  67. package/node_modules/@flickfyi/core/examples/kowalski/note/note.tsx +22 -0
  68. package/node_modules/@flickfyi/core/examples/kowalski/poll/poll.stories.tsx +15 -0
  69. package/node_modules/@flickfyi/core/examples/kowalski/poll/poll.tsx +26 -0
  70. package/node_modules/@flickfyi/core/examples/kowalski/random-picker/random-picker.stories.tsx +15 -0
  71. package/node_modules/@flickfyi/core/examples/kowalski/random-picker/random-picker.tsx +23 -0
  72. package/node_modules/@flickfyi/core/examples/kowalski/rating/rating.stories.tsx +15 -0
  73. package/node_modules/@flickfyi/core/examples/kowalski/rating/rating.tsx +19 -0
  74. package/node_modules/@flickfyi/core/examples/kowalski/recipe/recipe.stories.tsx +15 -0
  75. package/node_modules/@flickfyi/core/examples/kowalski/recipe/recipe.tsx +120 -0
  76. package/node_modules/@flickfyi/core/examples/kowalski/reminder/reminder.stories.tsx +15 -0
  77. package/node_modules/@flickfyi/core/examples/kowalski/reminder/reminder.tsx +23 -0
  78. package/node_modules/@flickfyi/core/examples/kowalski/rotation/rotation.stories.tsx +15 -0
  79. package/node_modules/@flickfyi/core/examples/kowalski/rotation/rotation.tsx +27 -0
  80. package/node_modules/@flickfyi/core/examples/kowalski/scoreboard/scoreboard.stories.tsx +15 -0
  81. package/node_modules/@flickfyi/core/examples/kowalski/scoreboard/scoreboard.tsx +26 -0
  82. package/node_modules/@flickfyi/core/examples/kowalski/shopping-list/shopping-list.stories.tsx +15 -0
  83. package/node_modules/@flickfyi/core/examples/kowalski/shopping-list/shopping-list.tsx +27 -0
  84. package/node_modules/@flickfyi/core/examples/kowalski/task-board/task-board.stories.tsx +15 -0
  85. package/node_modules/@flickfyi/core/examples/kowalski/task-board/task-board.tsx +27 -0
  86. package/node_modules/@flickfyi/core/examples/kowalski/theme.ts +3 -0
  87. package/node_modules/@flickfyi/core/examples/kowalski/time-zone/time-zone.stories.tsx +15 -0
  88. package/node_modules/@flickfyi/core/examples/kowalski/time-zone/time-zone.tsx +22 -0
  89. package/node_modules/@flickfyi/core/examples/kowalski/timer/timer.stories.tsx +15 -0
  90. package/node_modules/@flickfyi/core/examples/kowalski/timer/timer.tsx +23 -0
  91. package/node_modules/@flickfyi/core/examples/kowalski/trip/trip.stories.tsx +15 -0
  92. package/node_modules/@flickfyi/core/examples/kowalski/trip/trip.tsx +26 -0
  93. package/node_modules/@flickfyi/core/examples/kowalski/unit-converter/unit-converter.stories.tsx +15 -0
  94. package/node_modules/@flickfyi/core/examples/kowalski/unit-converter/unit-converter.tsx +24 -0
  95. package/node_modules/@flickfyi/core/examples/parrott/calculator/calculator.stories.tsx +3 -1
  96. package/node_modules/@flickfyi/core/examples/parrott/checklist/checklist.stories.tsx +3 -1
  97. package/node_modules/@flickfyi/core/examples/parrott/countdown/countdown.stories.tsx +3 -1
  98. package/node_modules/@flickfyi/core/examples/parrott/counter/counter.stories.tsx +1 -0
  99. package/node_modules/@flickfyi/core/examples/parrott/fortune/fortune.stories.tsx +3 -1
  100. package/node_modules/@flickfyi/core/examples/parrott/grid/grid.stories.tsx +3 -1
  101. package/node_modules/@flickfyi/core/examples/parrott/kale-smoothie/kale-smoothie.stories.tsx +1 -0
  102. package/node_modules/@flickfyi/core/examples/parrott/list/list.stories.tsx +3 -1
  103. package/node_modules/@flickfyi/core/examples/parrott/log/log.stories.tsx +3 -1
  104. package/node_modules/@flickfyi/core/examples/parrott/timed-task/timed-task.stories.tsx +3 -1
  105. package/node_modules/@flickfyi/core/examples/parrott/timer/timer.stories.tsx +3 -1
  106. package/node_modules/@flickfyi/core/fixtures/native/host/project.yml +3 -0
  107. package/node_modules/@flickfyi/core/fixtures/native/src/catalog-features.tsx +88 -0
  108. package/node_modules/@flickfyi/core/package.json +35 -5
  109. package/node_modules/@flickfyi/core/package.tsgo.json +19 -1
  110. package/node_modules/@flickfyi/core/scripts/vite-globals.d.ts +2 -0
  111. package/node_modules/@flickfyi/core/src/generated-types.d.ts +1 -0
  112. package/node_modules/@flickfyi/core/src/kowalski/README.md +9 -0
  113. package/node_modules/@flickfyi/core/src/kowalski/calculations.ts +106 -0
  114. package/node_modules/@flickfyi/core/src/kowalski/calculator.ts +243 -0
  115. package/node_modules/@flickfyi/core/src/kowalski/catalog.ts +787 -0
  116. package/node_modules/@flickfyi/core/src/kowalski/clocks.tsx +464 -0
  117. package/node_modules/@flickfyi/core/src/kowalski/date-time.tsx +469 -0
  118. package/node_modules/@flickfyi/core/src/kowalski/details.tsx +1387 -0
  119. package/node_modules/@flickfyi/core/src/kowalski/everyday.tsx +652 -0
  120. package/node_modules/@flickfyi/core/src/kowalski/format.ts +48 -0
  121. package/node_modules/@flickfyi/core/src/kowalski/frame.tsx +351 -0
  122. package/node_modules/@flickfyi/core/src/kowalski/index.ts +23 -0
  123. package/node_modules/@flickfyi/core/src/kowalski/productivity.tsx +575 -0
  124. package/node_modules/@flickfyi/core/src/kowalski/recipe.tsx +555 -0
  125. package/node_modules/@flickfyi/core/src/kowalski/stories/composition.stories.tsx +47 -0
  126. package/node_modules/@flickfyi/core/src/kowalski/stories/composition.tsx +100 -0
  127. package/node_modules/@flickfyi/core/src/kowalski/tools.tsx +1213 -0
  128. package/node_modules/@flickfyi/core/src/kowalski/use-clock.ts +19 -0
  129. package/node_modules/@flickfyi/core/src/kowalski/use-configured-feature.ts +85 -0
  130. package/node_modules/@flickfyi/core/src/kowalski/use-feature-store.ts +119 -0
  131. package/node_modules/@flickfyi/core/src/molecules/field/field.tsx +34 -0
  132. package/node_modules/@flickfyi/core/src/molecules/index.ts +3 -0
  133. package/node_modules/@flickfyi/core/src/molecules/segmented/segmented.tsx +48 -0
  134. package/node_modules/@flickfyi/core/src/molecules/stepper/stepper.tsx +54 -0
  135. package/node_modules/@flickfyi/core/src/quantum/use-store.ts +41 -16
  136. package/node_modules/@flickfyi/core/tests/fly.test.ts +34 -7
  137. package/node_modules/@flickfyi/core/tests/kowalski-calculations.test.ts +60 -0
  138. package/node_modules/@flickfyi/core/tests/kowalski-calculator.test.ts +142 -0
  139. package/node_modules/@flickfyi/core/tests/kowalski-contracts.test.ts +223 -0
  140. package/node_modules/@flickfyi/core/tests/kowalski-date-time.test.tsx +462 -0
  141. package/node_modules/@flickfyi/core/tests/kowalski-features.test.tsx +2158 -0
  142. package/node_modules/@flickfyi/core/tests/kowalski-store.test.tsx +514 -0
  143. package/node_modules/@flickfyi/core/tests/preview-build.test.ts +1 -1
  144. package/node_modules/@flickfyi/core/tests/quantum-use-store.test.ts +53 -1
  145. package/node_modules/@flickfyi/core/tests/verify-tsgo-assets.test.ts +1 -1
  146. package/node_modules/@flickfyi/core/tsconfig.vite-dts.json +2 -1
  147. package/node_modules/@flickfyi/core/tsgo.bun.lock +111 -9
  148. package/node_modules/@flickfyi/core/tsgo.package.json +21 -3
  149. package/node_modules/@flickfyi/core/vite.config.ts +9 -5
  150. package/node_modules/@flickfyi/core/vitest.config.ts +1 -1
  151. package/node_modules/@flickfyi/http-message-sig/.turbo/turbo-build.log +7 -7
  152. package/node_modules/@flickfyi/identity/.turbo/turbo-build.log +8 -9
  153. package/node_modules/@flickfyi/lens/.turbo/turbo-build.log +7 -7
  154. package/node_modules/@flickfyi/photon/.turbo/turbo-build.log +4 -4
  155. package/node_modules/@flickfyi/photon/Sources/Photon/Components/Button.swift +29 -2
  156. package/node_modules/@flickfyi/photon/Sources/PhotonVersion/Resources/photon-version.json +1 -1
  157. package/node_modules/@flickfyi/photon/Tests/PhotonTests/Components/ButtonHostTests.swift +26 -0
  158. package/node_modules/@flickfyi/photon/Tests/PhotonTests/Fixtures/StyleX/catalog-features.styles.json +1 -0
  159. package/node_modules/@flickfyi/photon/Tests/PhotonTests/Fixtures/StyleX/catalog-native.styles.json +1 -1
  160. package/node_modules/@flickfyi/photon/Tests/PhotonTests/Fixtures/StyleX/catalog-scale.styles.json +1 -1
  161. package/node_modules/@flickfyi/photon/Tests/PhotonTests/Fixtures/StyleX/catalog-theme.styles.json +1 -1
  162. package/node_modules/@flickfyi/photon/Tests/PhotonTests/Fixtures/StyleX/catalog-typography.styles.json +1 -1
  163. package/node_modules/@flickfyi/photon/Tests/PhotonTests/Fixtures/StyleX/stylex-calculator.styles.json +1 -1
  164. package/node_modules/@flickfyi/photon/dist/globals.d.ts +5 -0
  165. package/node_modules/@flickfyi/photon/dist/version.cjs +1 -1
  166. package/node_modules/@flickfyi/photon/dist/version.js +1 -1
  167. package/node_modules/@flickfyi/photon/generated/react-swiftui.d.ts +1 -0
  168. package/node_modules/@flickfyi/photon/package.json +1 -1
  169. package/node_modules/@flickfyi/photon/src/globals.d.ts +5 -0
  170. package/node_modules/@flickfyi/rwsdk-extensions/.turbo/turbo-build.log +7 -7
  171. package/node_modules/@formatjs/fast-memoize/LICENSE.md +9 -0
  172. package/node_modules/@formatjs/fast-memoize/README.md +3 -0
  173. package/node_modules/@formatjs/fast-memoize/index.d.ts +35 -0
  174. package/node_modules/@formatjs/fast-memoize/index.js +69 -0
  175. package/node_modules/@formatjs/fast-memoize/index.js.map +1 -0
  176. package/node_modules/@formatjs/fast-memoize/package.json +25 -0
  177. package/node_modules/@formatjs/icu-messageformat-parser/LICENSE.md +9 -0
  178. package/node_modules/@formatjs/icu-messageformat-parser/README.md +38 -0
  179. package/node_modules/@formatjs/icu-messageformat-parser/index.d.ts +393 -0
  180. package/node_modules/@formatjs/icu-messageformat-parser/index.js +2187 -0
  181. package/node_modules/@formatjs/icu-messageformat-parser/index.js.map +1 -0
  182. package/node_modules/@formatjs/icu-messageformat-parser/manipulator.d.ts +175 -0
  183. package/node_modules/@formatjs/icu-messageformat-parser/manipulator.js +209 -0
  184. package/node_modules/@formatjs/icu-messageformat-parser/manipulator.js.map +1 -0
  185. package/node_modules/@formatjs/icu-messageformat-parser/no-parser.d.ts +183 -0
  186. package/node_modules/@formatjs/icu-messageformat-parser/no-parser.js +162 -0
  187. package/node_modules/@formatjs/icu-messageformat-parser/no-parser.js.map +1 -0
  188. package/node_modules/@formatjs/icu-messageformat-parser/package.json +21 -0
  189. package/node_modules/@formatjs/icu-messageformat-parser/printer.d.ts +154 -0
  190. package/node_modules/@formatjs/icu-messageformat-parser/printer.js +224 -0
  191. package/node_modules/@formatjs/icu-messageformat-parser/printer.js.map +1 -0
  192. package/node_modules/@formatjs/icu-skeleton-parser/LICENSE.md +9 -0
  193. package/node_modules/@formatjs/icu-skeleton-parser/README.md +1 -0
  194. package/node_modules/@formatjs/icu-skeleton-parser/index.d.ts +67 -0
  195. package/node_modules/@formatjs/icu-skeleton-parser/index.js +380 -0
  196. package/node_modules/@formatjs/icu-skeleton-parser/index.js.map +1 -0
  197. package/node_modules/@formatjs/icu-skeleton-parser/package.json +15 -0
  198. package/node_modules/@formatjs/intl/LICENSE.md +9 -0
  199. package/node_modules/@formatjs/intl/README.md +3 -0
  200. package/node_modules/@formatjs/intl/index.d.ts +499 -0
  201. package/node_modules/@formatjs/intl/index.js +595 -0
  202. package/node_modules/@formatjs/intl/index.js.map +1 -0
  203. package/node_modules/@formatjs/intl/package.json +37 -0
  204. package/node_modules/decimal.js/LICENCE.md +23 -0
  205. package/node_modules/decimal.js/README.md +246 -0
  206. package/node_modules/decimal.js/decimal.d.ts +301 -0
  207. package/node_modules/decimal.js/decimal.js +4951 -0
  208. package/node_modules/decimal.js/decimal.mjs +4914 -0
  209. package/node_modules/decimal.js/package.json +55 -0
  210. package/node_modules/format-quantity/LICENSE +21 -0
  211. package/node_modules/format-quantity/README.md +181 -0
  212. package/node_modules/format-quantity/dist/cjs/format-quantity.cjs.development.d.ts +131 -0
  213. package/node_modules/format-quantity/dist/cjs/format-quantity.cjs.development.js +214 -0
  214. package/node_modules/format-quantity/dist/cjs/format-quantity.cjs.development.js.map +1 -0
  215. package/node_modules/format-quantity/dist/cjs/format-quantity.cjs.production.d.ts +131 -0
  216. package/node_modules/format-quantity/dist/cjs/format-quantity.cjs.production.js +2 -0
  217. package/node_modules/format-quantity/dist/cjs/format-quantity.cjs.production.js.map +1 -0
  218. package/node_modules/format-quantity/dist/cjs/index.d.ts +1 -0
  219. package/node_modules/format-quantity/dist/cjs/index.js +6 -0
  220. package/node_modules/format-quantity/dist/format-quantity.d.mts +131 -0
  221. package/node_modules/format-quantity/dist/format-quantity.legacy-esm.d.ts +131 -0
  222. package/node_modules/format-quantity/dist/format-quantity.legacy-esm.js +268 -0
  223. package/node_modules/format-quantity/dist/format-quantity.legacy-esm.js.map +1 -0
  224. package/node_modules/format-quantity/dist/format-quantity.mjs +208 -0
  225. package/node_modules/format-quantity/dist/format-quantity.mjs.map +1 -0
  226. package/node_modules/format-quantity/dist/format-quantity.production.d.mts +131 -0
  227. package/node_modules/format-quantity/dist/format-quantity.production.mjs +2 -0
  228. package/node_modules/format-quantity/dist/format-quantity.production.mjs.map +1 -0
  229. package/node_modules/format-quantity/dist/format-quantity.umd.min.js +3 -0
  230. package/node_modules/format-quantity/dist/format-quantity.umd.min.js.map +1 -0
  231. package/node_modules/format-quantity/package.json +81 -0
  232. package/node_modules/intl-messageformat/LICENSE.md +33 -0
  233. package/node_modules/intl-messageformat/README.md +3 -0
  234. package/node_modules/intl-messageformat/index.d.ts +177 -0
  235. package/node_modules/intl-messageformat/index.js +327 -0
  236. package/node_modules/intl-messageformat/index.js.map +1 -0
  237. package/node_modules/intl-messageformat/intl-messageformat.iife.js +2819 -0
  238. package/node_modules/intl-messageformat/package.json +40 -0
  239. package/node_modules/numeric-quantity/LICENSE +21 -0
  240. package/node_modules/numeric-quantity/README.md +306 -0
  241. package/node_modules/numeric-quantity/dist/cjs/index.d.ts +1 -0
  242. package/node_modules/numeric-quantity/dist/cjs/index.js +6 -0
  243. package/node_modules/numeric-quantity/dist/cjs/numeric-quantity.cjs.development.d.ts +293 -0
  244. package/node_modules/numeric-quantity/dist/cjs/numeric-quantity.cjs.development.js +579 -0
  245. package/node_modules/numeric-quantity/dist/cjs/numeric-quantity.cjs.development.js.map +1 -0
  246. package/node_modules/numeric-quantity/dist/cjs/numeric-quantity.cjs.production.d.ts +293 -0
  247. package/node_modules/numeric-quantity/dist/cjs/numeric-quantity.cjs.production.js +2 -0
  248. package/node_modules/numeric-quantity/dist/cjs/numeric-quantity.cjs.production.js.map +1 -0
  249. package/node_modules/numeric-quantity/dist/numeric-quantity.d.mts +293 -0
  250. package/node_modules/numeric-quantity/dist/numeric-quantity.iife.umd.min.js +2 -0
  251. package/node_modules/numeric-quantity/dist/numeric-quantity.iife.umd.min.js.map +1 -0
  252. package/node_modules/numeric-quantity/dist/numeric-quantity.legacy-esm.d.ts +293 -0
  253. package/node_modules/numeric-quantity/dist/numeric-quantity.legacy-esm.js +622 -0
  254. package/node_modules/numeric-quantity/dist/numeric-quantity.legacy-esm.js.map +1 -0
  255. package/node_modules/numeric-quantity/dist/numeric-quantity.mjs +564 -0
  256. package/node_modules/numeric-quantity/dist/numeric-quantity.mjs.map +1 -0
  257. package/node_modules/numeric-quantity/dist/numeric-quantity.production.d.mts +293 -0
  258. package/node_modules/numeric-quantity/dist/numeric-quantity.production.mjs +2 -0
  259. package/node_modules/numeric-quantity/dist/numeric-quantity.production.mjs.map +1 -0
  260. package/node_modules/numeric-quantity/package.json +72 -0
  261. package/node_modules/validator/LICENSE +20 -0
  262. package/node_modules/validator/README.md +269 -0
  263. package/node_modules/validator/es/index.js +218 -0
  264. package/node_modules/validator/es/lib/alpha.js +151 -0
  265. package/node_modules/validator/es/lib/blacklist.js +5 -0
  266. package/node_modules/validator/es/lib/contains.js +15 -0
  267. package/node_modules/validator/es/lib/equals.js +5 -0
  268. package/node_modules/validator/es/lib/escape.js +5 -0
  269. package/node_modules/validator/es/lib/isAbaRouting.js +15 -0
  270. package/node_modules/validator/es/lib/isAfter.js +10 -0
  271. package/node_modules/validator/es/lib/isAlpha.js +23 -0
  272. package/node_modules/validator/es/lib/isAlphanumeric.js +23 -0
  273. package/node_modules/validator/es/lib/isAscii.js +10 -0
  274. package/node_modules/validator/es/lib/isBIC.js +16 -0
  275. package/node_modules/validator/es/lib/isBase32.js +15 -0
  276. package/node_modules/validator/es/lib/isBase58.js +8 -0
  277. package/node_modules/validator/es/lib/isBase64.js +23 -0
  278. package/node_modules/validator/es/lib/isBefore.js +10 -0
  279. package/node_modules/validator/es/lib/isBoolean.js +15 -0
  280. package/node_modules/validator/es/lib/isBtcAddress.js +7 -0
  281. package/node_modules/validator/es/lib/isByteLength.js +19 -0
  282. package/node_modules/validator/es/lib/isCreditCard.js +43 -0
  283. package/node_modules/validator/es/lib/isCurrency.js +74 -0
  284. package/node_modules/validator/es/lib/isDataURI.js +31 -0
  285. package/node_modules/validator/es/lib/isDate.js +93 -0
  286. package/node_modules/validator/es/lib/isDecimal.js +22 -0
  287. package/node_modules/validator/es/lib/isDivisibleBy.js +6 -0
  288. package/node_modules/validator/es/lib/isEAN.js +70 -0
  289. package/node_modules/validator/es/lib/isEmail.js +165 -0
  290. package/node_modules/validator/es/lib/isEmpty.js +10 -0
  291. package/node_modules/validator/es/lib/isEthereumAddress.js +6 -0
  292. package/node_modules/validator/es/lib/isFQDN.js +67 -0
  293. package/node_modules/validator/es/lib/isFloat.js +14 -0
  294. package/node_modules/validator/es/lib/isFullWidth.js +6 -0
  295. package/node_modules/validator/es/lib/isHSL.js +13 -0
  296. package/node_modules/validator/es/lib/isHalfWidth.js +6 -0
  297. package/node_modules/validator/es/lib/isHash.js +21 -0
  298. package/node_modules/validator/es/lib/isHexColor.js +13 -0
  299. package/node_modules/validator/es/lib/isHexadecimal.js +6 -0
  300. package/node_modules/validator/es/lib/isIBAN.js +171 -0
  301. package/node_modules/validator/es/lib/isIMEI.js +40 -0
  302. package/node_modules/validator/es/lib/isIP.js +58 -0
  303. package/node_modules/validator/es/lib/isIPRange.js +41 -0
  304. package/node_modules/validator/es/lib/isISBN.js +47 -0
  305. package/node_modules/validator/es/lib/isISIN.js +55 -0
  306. package/node_modules/validator/es/lib/isISO15924.js +9 -0
  307. package/node_modules/validator/es/lib/isISO31661Alpha2.js +21 -0
  308. package/node_modules/validator/es/lib/isISO31661Alpha3.js +20 -0
  309. package/node_modules/validator/es/lib/isISO31661Numeric.js +8 -0
  310. package/node_modules/validator/es/lib/isISO4217.js +9 -0
  311. package/node_modules/validator/es/lib/isISO6346.js +28 -0
  312. package/node_modules/validator/es/lib/isISO6391.js +6 -0
  313. package/node_modules/validator/es/lib/isISO8601.js +42 -0
  314. package/node_modules/validator/es/lib/isISRC.js +8 -0
  315. package/node_modules/validator/es/lib/isISSN.js +19 -0
  316. package/node_modules/validator/es/lib/isIdentityCard.js +407 -0
  317. package/node_modules/validator/es/lib/isIn.js +23 -0
  318. package/node_modules/validator/es/lib/isInt.js +19 -0
  319. package/node_modules/validator/es/lib/isJSON.js +26 -0
  320. package/node_modules/validator/es/lib/isJWT.js +15 -0
  321. package/node_modules/validator/es/lib/isLatLong.js +21 -0
  322. package/node_modules/validator/es/lib/isLength.js +27 -0
  323. package/node_modules/validator/es/lib/isLicensePlate.js +58 -0
  324. package/node_modules/validator/es/lib/isLocale.js +107 -0
  325. package/node_modules/validator/es/lib/isLowercase.js +5 -0
  326. package/node_modules/validator/es/lib/isLuhnNumber.js +25 -0
  327. package/node_modules/validator/es/lib/isMACAddress.js +36 -0
  328. package/node_modules/validator/es/lib/isMD5.js +6 -0
  329. package/node_modules/validator/es/lib/isMagnetURI.js +9 -0
  330. package/node_modules/validator/es/lib/isMailtoURI.js +75 -0
  331. package/node_modules/validator/es/lib/isMimeType.js +40 -0
  332. package/node_modules/validator/es/lib/isMobilePhone.js +212 -0
  333. package/node_modules/validator/es/lib/isMongoId.js +6 -0
  334. package/node_modules/validator/es/lib/isMultibyte.js +10 -0
  335. package/node_modules/validator/es/lib/isNumeric.js +10 -0
  336. package/node_modules/validator/es/lib/isOctal.js +6 -0
  337. package/node_modules/validator/es/lib/isPassportNumber.js +145 -0
  338. package/node_modules/validator/es/lib/isPort.js +8 -0
  339. package/node_modules/validator/es/lib/isPostalCode.js +100 -0
  340. package/node_modules/validator/es/lib/isRFC3339.js +21 -0
  341. package/node_modules/validator/es/lib/isRgbColor.js +34 -0
  342. package/node_modules/validator/es/lib/isSemVer.js +14 -0
  343. package/node_modules/validator/es/lib/isSlug.js +6 -0
  344. package/node_modules/validator/es/lib/isStrongPassword.js +90 -0
  345. package/node_modules/validator/es/lib/isSurrogatePair.js +6 -0
  346. package/node_modules/validator/es/lib/isTaxID.js +1407 -0
  347. package/node_modules/validator/es/lib/isTime.js +22 -0
  348. package/node_modules/validator/es/lib/isULID.js +5 -0
  349. package/node_modules/validator/es/lib/isURL.js +241 -0
  350. package/node_modules/validator/es/lib/isUUID.js +23 -0
  351. package/node_modules/validator/es/lib/isUppercase.js +5 -0
  352. package/node_modules/validator/es/lib/isVAT.js +264 -0
  353. package/node_modules/validator/es/lib/isVariableWidth.js +7 -0
  354. package/node_modules/validator/es/lib/isWhitelisted.js +10 -0
  355. package/node_modules/validator/es/lib/ltrim.js +7 -0
  356. package/node_modules/validator/es/lib/matches.js +8 -0
  357. package/node_modules/validator/es/lib/normalizeEmail.js +131 -0
  358. package/node_modules/validator/es/lib/rtrim.js +15 -0
  359. package/node_modules/validator/es/lib/stripLow.js +7 -0
  360. package/node_modules/validator/es/lib/toBoolean.js +8 -0
  361. package/node_modules/validator/es/lib/toDate.js +6 -0
  362. package/node_modules/validator/es/lib/toFloat.js +5 -0
  363. package/node_modules/validator/es/lib/toInt.js +5 -0
  364. package/node_modules/validator/es/lib/trim.js +5 -0
  365. package/node_modules/validator/es/lib/unescape.js +8 -0
  366. package/node_modules/validator/es/lib/util/algorithms.js +79 -0
  367. package/node_modules/validator/es/lib/util/assertString.js +4 -0
  368. package/node_modules/validator/es/lib/util/checkHost.js +12 -0
  369. package/node_modules/validator/es/lib/util/includesArray.js +6 -0
  370. package/node_modules/validator/es/lib/util/includesString.js +4 -0
  371. package/node_modules/validator/es/lib/util/merge.js +14 -0
  372. package/node_modules/validator/es/lib/util/multilineRegex.js +12 -0
  373. package/node_modules/validator/es/lib/util/nullUndefinedCheck.js +3 -0
  374. package/node_modules/validator/es/lib/util/toString.js +13 -0
  375. package/node_modules/validator/es/lib/util/typeOf.js +10 -0
  376. package/node_modules/validator/es/lib/whitelist.js +5 -0
  377. package/node_modules/validator/index.js +229 -0
  378. package/node_modules/validator/lib/alpha.js +157 -0
  379. package/node_modules/validator/lib/blacklist.js +14 -0
  380. package/node_modules/validator/lib/contains.js +24 -0
  381. package/node_modules/validator/lib/equals.js +14 -0
  382. package/node_modules/validator/lib/escape.js +14 -0
  383. package/node_modules/validator/lib/isAbaRouting.js +23 -0
  384. package/node_modules/validator/lib/isAfter.js +19 -0
  385. package/node_modules/validator/lib/isAlpha.js +31 -0
  386. package/node_modules/validator/lib/isAlphanumeric.js +31 -0
  387. package/node_modules/validator/lib/isAscii.js +18 -0
  388. package/node_modules/validator/lib/isBIC.js +24 -0
  389. package/node_modules/validator/lib/isBase32.js +24 -0
  390. package/node_modules/validator/lib/isBase58.js +16 -0
  391. package/node_modules/validator/lib/isBase64.js +32 -0
  392. package/node_modules/validator/lib/isBefore.js +19 -0
  393. package/node_modules/validator/lib/isBoolean.js +24 -0
  394. package/node_modules/validator/lib/isBtcAddress.js +16 -0
  395. package/node_modules/validator/lib/isByteLength.js +27 -0
  396. package/node_modules/validator/lib/isCreditCard.js +52 -0
  397. package/node_modules/validator/lib/isCurrency.js +83 -0
  398. package/node_modules/validator/lib/isDataURI.js +40 -0
  399. package/node_modules/validator/lib/isDate.js +102 -0
  400. package/node_modules/validator/lib/isDecimal.js +31 -0
  401. package/node_modules/validator/lib/isDivisibleBy.js +15 -0
  402. package/node_modules/validator/lib/isEAN.js +78 -0
  403. package/node_modules/validator/lib/isEmail.js +174 -0
  404. package/node_modules/validator/lib/isEmpty.js +19 -0
  405. package/node_modules/validator/lib/isEthereumAddress.js +15 -0
  406. package/node_modules/validator/lib/isFQDN.js +76 -0
  407. package/node_modules/validator/lib/isFloat.js +22 -0
  408. package/node_modules/validator/lib/isFullWidth.js +14 -0
  409. package/node_modules/validator/lib/isHSL.js +22 -0
  410. package/node_modules/validator/lib/isHalfWidth.js +14 -0
  411. package/node_modules/validator/lib/isHash.js +30 -0
  412. package/node_modules/validator/lib/isHexColor.js +22 -0
  413. package/node_modules/validator/lib/isHexadecimal.js +15 -0
  414. package/node_modules/validator/lib/isIBAN.js +178 -0
  415. package/node_modules/validator/lib/isIMEI.js +49 -0
  416. package/node_modules/validator/lib/isIP.js +67 -0
  417. package/node_modules/validator/lib/isIPRange.js +50 -0
  418. package/node_modules/validator/lib/isISBN.js +56 -0
  419. package/node_modules/validator/lib/isISIN.js +64 -0
  420. package/node_modules/validator/lib/isISO15924.js +16 -0
  421. package/node_modules/validator/lib/isISO31661Alpha2.js +28 -0
  422. package/node_modules/validator/lib/isISO31661Alpha3.js +28 -0
  423. package/node_modules/validator/lib/isISO31661Numeric.js +16 -0
  424. package/node_modules/validator/lib/isISO4217.js +16 -0
  425. package/node_modules/validator/lib/isISO6346.js +35 -0
  426. package/node_modules/validator/lib/isISO6391.js +15 -0
  427. package/node_modules/validator/lib/isISO8601.js +50 -0
  428. package/node_modules/validator/lib/isISRC.js +16 -0
  429. package/node_modules/validator/lib/isISSN.js +28 -0
  430. package/node_modules/validator/lib/isIdentityCard.js +416 -0
  431. package/node_modules/validator/lib/isIn.js +32 -0
  432. package/node_modules/validator/lib/isInt.js +28 -0
  433. package/node_modules/validator/lib/isJSON.js +35 -0
  434. package/node_modules/validator/lib/isJWT.js +24 -0
  435. package/node_modules/validator/lib/isLatLong.js +30 -0
  436. package/node_modules/validator/lib/isLength.js +35 -0
  437. package/node_modules/validator/lib/isLicensePlate.js +67 -0
  438. package/node_modules/validator/lib/isLocale.js +115 -0
  439. package/node_modules/validator/lib/isLowercase.js +14 -0
  440. package/node_modules/validator/lib/isLuhnNumber.js +34 -0
  441. package/node_modules/validator/lib/isMACAddress.js +45 -0
  442. package/node_modules/validator/lib/isMD5.js +15 -0
  443. package/node_modules/validator/lib/isMagnetURI.js +18 -0
  444. package/node_modules/validator/lib/isMailtoURI.js +84 -0
  445. package/node_modules/validator/lib/isMimeType.js +48 -0
  446. package/node_modules/validator/lib/isMobilePhone.js +219 -0
  447. package/node_modules/validator/lib/isMongoId.js +15 -0
  448. package/node_modules/validator/lib/isMultibyte.js +18 -0
  449. package/node_modules/validator/lib/isNumeric.js +19 -0
  450. package/node_modules/validator/lib/isOctal.js +15 -0
  451. package/node_modules/validator/lib/isPassportNumber.js +152 -0
  452. package/node_modules/validator/lib/isPort.js +17 -0
  453. package/node_modules/validator/lib/isPostalCode.js +107 -0
  454. package/node_modules/validator/lib/isRFC3339.js +29 -0
  455. package/node_modules/validator/lib/isRgbColor.js +42 -0
  456. package/node_modules/validator/lib/isSemVer.js +22 -0
  457. package/node_modules/validator/lib/isSlug.js +15 -0
  458. package/node_modules/validator/lib/isStrongPassword.js +99 -0
  459. package/node_modules/validator/lib/isSurrogatePair.js +15 -0
  460. package/node_modules/validator/lib/isTaxID.js +1417 -0
  461. package/node_modules/validator/lib/isTime.js +31 -0
  462. package/node_modules/validator/lib/isULID.js +14 -0
  463. package/node_modules/validator/lib/isURL.js +249 -0
  464. package/node_modules/validator/lib/isUUID.js +32 -0
  465. package/node_modules/validator/lib/isUppercase.js +14 -0
  466. package/node_modules/validator/lib/isVAT.js +274 -0
  467. package/node_modules/validator/lib/isVariableWidth.js +16 -0
  468. package/node_modules/validator/lib/isWhitelisted.js +19 -0
  469. package/node_modules/validator/lib/ltrim.js +16 -0
  470. package/node_modules/validator/lib/matches.js +17 -0
  471. package/node_modules/validator/lib/normalizeEmail.js +140 -0
  472. package/node_modules/validator/lib/rtrim.js +24 -0
  473. package/node_modules/validator/lib/stripLow.js +16 -0
  474. package/node_modules/validator/lib/toBoolean.js +17 -0
  475. package/node_modules/validator/lib/toDate.js +15 -0
  476. package/node_modules/validator/lib/toFloat.js +14 -0
  477. package/node_modules/validator/lib/toInt.js +14 -0
  478. package/node_modules/validator/lib/trim.js +14 -0
  479. package/node_modules/validator/lib/unescape.js +17 -0
  480. package/node_modules/validator/lib/util/algorithms.js +88 -0
  481. package/node_modules/validator/lib/util/assertString.js +12 -0
  482. package/node_modules/validator/lib/util/checkHost.js +20 -0
  483. package/node_modules/validator/lib/util/includesArray.js +14 -0
  484. package/node_modules/validator/lib/util/includesString.js +12 -0
  485. package/node_modules/validator/lib/util/merge.js +22 -0
  486. package/node_modules/validator/lib/util/multilineRegex.js +20 -0
  487. package/node_modules/validator/lib/util/nullUndefinedCheck.js +11 -0
  488. package/node_modules/validator/lib/util/toString.js +21 -0
  489. package/node_modules/validator/lib/util/typeOf.js +18 -0
  490. package/node_modules/validator/lib/whitelist.js +14 -0
  491. package/node_modules/validator/package.json +76 -0
  492. package/node_modules/validator/validator.js +5808 -0
  493. package/node_modules/validator/validator.min.js +23 -0
  494. package/package.json +3 -3
@@ -0,0 +1,595 @@
1
+ import { memoize, strategies } from "@formatjs/fast-memoize";
2
+ import { ErrorCode, FormatError, IntlMessageFormat } from "intl-messageformat";
3
+ import { TYPE } from "@formatjs/icu-messageformat-parser";
4
+ //#region packages/intl/typed-message.ts
5
+ function defineMessage(message, _options) {
6
+ return message;
7
+ }
8
+ function defineMessages(messages, _options) {
9
+ return messages;
10
+ }
11
+ //#endregion
12
+ //#region packages/intl/error.ts
13
+ let IntlErrorCode = /* @__PURE__ */ function(IntlErrorCode) {
14
+ IntlErrorCode["FORMAT_ERROR"] = "FORMAT_ERROR";
15
+ IntlErrorCode["UNSUPPORTED_FORMATTER"] = "UNSUPPORTED_FORMATTER";
16
+ IntlErrorCode["INVALID_CONFIG"] = "INVALID_CONFIG";
17
+ IntlErrorCode["MISSING_DATA"] = "MISSING_DATA";
18
+ IntlErrorCode["MISSING_TRANSLATION"] = "MISSING_TRANSLATION";
19
+ return IntlErrorCode;
20
+ }({});
21
+ var IntlError = class IntlError extends Error {
22
+ constructor(code, message, exception) {
23
+ const err = exception ? exception instanceof Error ? exception : new Error(String(exception)) : void 0;
24
+ super(`[@formatjs/intl Error ${code}] ${message}
25
+ ${err ? `\n${err.message}\n${err.stack}` : ""}`);
26
+ this.code = code;
27
+ if (typeof Error.captureStackTrace === "function") Error.captureStackTrace(this, IntlError);
28
+ }
29
+ };
30
+ var UnsupportedFormatterError = class extends IntlError {
31
+ constructor(message, exception) {
32
+ super("UNSUPPORTED_FORMATTER", message, exception);
33
+ }
34
+ };
35
+ var InvalidConfigError = class extends IntlError {
36
+ constructor(message, exception) {
37
+ super("INVALID_CONFIG", message, exception);
38
+ }
39
+ };
40
+ var MissingDataError = class extends IntlError {
41
+ constructor(message, exception) {
42
+ super("MISSING_DATA", message, exception);
43
+ }
44
+ };
45
+ var IntlFormatError = class extends IntlError {
46
+ constructor(message, locale, exception) {
47
+ super("FORMAT_ERROR", `${message}
48
+ Locale: ${locale}
49
+ `, exception);
50
+ this.locale = locale;
51
+ }
52
+ };
53
+ var MessageFormatError = class extends IntlFormatError {
54
+ constructor(message, locale, descriptor, exception) {
55
+ super(`${message}
56
+ MessageID: ${descriptor?.id}
57
+ Default Message: ${descriptor?.defaultMessage}
58
+ Description: ${descriptor?.description}
59
+ `, locale, exception);
60
+ this.descriptor = descriptor;
61
+ this.locale = locale;
62
+ }
63
+ };
64
+ var MissingTranslationError = class extends IntlError {
65
+ constructor(descriptor, locale) {
66
+ super("MISSING_TRANSLATION", `Missing message: "${descriptor.id}" for locale "${locale}", using ${descriptor.defaultMessage ? `default message (${typeof descriptor.defaultMessage === "string" ? descriptor.defaultMessage : descriptor.defaultMessage.map((e) => e.value ?? JSON.stringify(e)).join()})` : "id"} as fallback.`);
67
+ this.descriptor = descriptor;
68
+ }
69
+ };
70
+ //#endregion
71
+ //#region packages/intl/utils.ts
72
+ function invariant(condition, message, Err = Error) {
73
+ if (!condition) throw new Err(message);
74
+ }
75
+ function filterProps(props, allowlist, defaults = {}) {
76
+ return allowlist.reduce((filtered, name) => {
77
+ if (name in props) filtered[name] = props[name];
78
+ else if (name in defaults) filtered[name] = defaults[name];
79
+ return filtered;
80
+ }, {});
81
+ }
82
+ const defaultErrorHandler = (error) => {
83
+ if (process.env.NODE_ENV !== "production") console.error(error);
84
+ };
85
+ const defaultWarnHandler = (warning) => {
86
+ if (process.env.NODE_ENV !== "production") console.warn(warning);
87
+ };
88
+ const DEFAULT_INTL_CONFIG = {
89
+ formats: {},
90
+ messages: {},
91
+ timeZone: void 0,
92
+ defaultLocale: "en",
93
+ defaultFormats: {},
94
+ fallbackOnEmptyString: true,
95
+ onError: defaultErrorHandler,
96
+ onWarn: defaultWarnHandler
97
+ };
98
+ function createIntlCache() {
99
+ return {
100
+ dateTime: {},
101
+ number: {},
102
+ message: {},
103
+ duration: {},
104
+ relativeTime: {},
105
+ pluralRules: {},
106
+ list: {},
107
+ displayNames: {}
108
+ };
109
+ }
110
+ function createFastMemoizeCache(store) {
111
+ return { create() {
112
+ return {
113
+ get(key) {
114
+ return store[key];
115
+ },
116
+ set(key, value) {
117
+ store[key] = value;
118
+ }
119
+ };
120
+ } };
121
+ }
122
+ /**
123
+ * Create intl formatters and populate cache
124
+ * @param cache explicit cache to prevent leaking memory
125
+ */
126
+ function createFormatters(cache = createIntlCache()) {
127
+ const RelativeTimeFormat = Intl.RelativeTimeFormat;
128
+ const ListFormat = Intl.ListFormat;
129
+ const DisplayNames = Intl.DisplayNames;
130
+ const getDateTimeFormat = memoize((...args) => new Intl.DateTimeFormat(...args), {
131
+ cache: createFastMemoizeCache(cache.dateTime),
132
+ strategy: strategies.variadic
133
+ });
134
+ const getNumberFormat = memoize((...args) => new Intl.NumberFormat(...args), {
135
+ cache: createFastMemoizeCache(cache.number),
136
+ strategy: strategies.variadic
137
+ });
138
+ const getPluralRules = memoize((...args) => new Intl.PluralRules(...args), {
139
+ cache: createFastMemoizeCache(cache.pluralRules),
140
+ strategy: strategies.variadic
141
+ });
142
+ return {
143
+ getDateTimeFormat,
144
+ getNumberFormat,
145
+ getMessageFormat: memoize((message, locales, overrideFormats, opts) => new IntlMessageFormat(message, locales, overrideFormats, {
146
+ formatters: {
147
+ getNumberFormat,
148
+ getDateTimeFormat,
149
+ getPluralRules
150
+ },
151
+ ...opts
152
+ }), {
153
+ cache: createFastMemoizeCache(cache.message),
154
+ strategy: strategies.variadic
155
+ }),
156
+ getDurationFormat: memoize((...args) => new Intl.DurationFormat(...args), {
157
+ cache: createFastMemoizeCache(cache.duration),
158
+ strategy: strategies.variadic
159
+ }),
160
+ getRelativeTimeFormat: memoize((...args) => new RelativeTimeFormat(...args), {
161
+ cache: createFastMemoizeCache(cache.relativeTime),
162
+ strategy: strategies.variadic
163
+ }),
164
+ getPluralRules,
165
+ getListFormat: memoize((...args) => new ListFormat(...args), {
166
+ cache: createFastMemoizeCache(cache.list),
167
+ strategy: strategies.variadic
168
+ }),
169
+ getDisplayNames: memoize((...args) => new DisplayNames(...args), {
170
+ cache: createFastMemoizeCache(cache.displayNames),
171
+ strategy: strategies.variadic
172
+ })
173
+ };
174
+ }
175
+ function getNamedFormat(formats, type, name, onError) {
176
+ const formatType = formats && formats[type];
177
+ let format;
178
+ if (formatType) format = formatType[name];
179
+ if (format) return format;
180
+ onError(new UnsupportedFormatterError(`No ${type} format named: ${name}`));
181
+ }
182
+ //#endregion
183
+ //#region packages/intl/message.ts
184
+ function setTimeZoneInOptions(opts, timeZone) {
185
+ return Object.keys(opts).reduce((all, k) => {
186
+ all[k] = {
187
+ timeZone,
188
+ ...opts[k]
189
+ };
190
+ return all;
191
+ }, {});
192
+ }
193
+ function deepMergeOptions(opts1, opts2) {
194
+ return Object.keys({
195
+ ...opts1,
196
+ ...opts2
197
+ }).reduce((all, k) => {
198
+ all[k] = {
199
+ ...opts1[k],
200
+ ...opts2[k]
201
+ };
202
+ return all;
203
+ }, {});
204
+ }
205
+ function deepMergeFormatsAndSetTimeZone(f1, timeZone) {
206
+ if (!timeZone) return f1;
207
+ const mfFormats = IntlMessageFormat.formats;
208
+ return {
209
+ ...mfFormats,
210
+ ...f1,
211
+ date: deepMergeOptions(setTimeZoneInOptions(mfFormats.date, timeZone), setTimeZoneInOptions(f1.date || {}, timeZone)),
212
+ time: deepMergeOptions(setTimeZoneInOptions(mfFormats.time, timeZone), setTimeZoneInOptions(f1.time || {}, timeZone))
213
+ };
214
+ }
215
+ function getMessageDescriptorContext(messageDescriptor) {
216
+ const { defaultMessage } = messageDescriptor;
217
+ try {
218
+ return defaultMessage !== void 0 ? `\nDefault Message: ${typeof defaultMessage === "string" ? defaultMessage : JSON.stringify(defaultMessage)}` : `\nMessage Descriptor: ${JSON.stringify(messageDescriptor)}`;
219
+ } catch {
220
+ return "";
221
+ }
222
+ }
223
+ const formatMessage = ({ locale, formats, messages, defaultLocale, defaultFormats, fallbackOnEmptyString, onError, timeZone, defaultRichTextElements }, state, messageDescriptor = { id: "" }, values, opts) => {
224
+ const { id: msgId, defaultMessage } = messageDescriptor;
225
+ if (!msgId) invariant(false, `[@formatjs/intl] An \`id\` must be provided to format a message. You can either:
226
+ 1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.github.io/docs/tooling/babel-plugin)
227
+ or [@formatjs/ts-transformer](https://formatjs.github.io/docs/tooling/ts-transformer) OR
228
+ 2. Configure your \`eslint\` config to include [eslint-plugin-formatjs](https://formatjs.github.io/docs/tooling/linter#enforce-id)
229
+ to autofix this issue${getMessageDescriptorContext(messageDescriptor)}`);
230
+ const id = String(msgId);
231
+ const message = messages && Object.prototype.hasOwnProperty.call(messages, id) && messages[id];
232
+ if (Array.isArray(message) && message.length === 1 && message[0].type === TYPE.literal) return message[0].value;
233
+ values = {
234
+ ...defaultRichTextElements,
235
+ ...values
236
+ };
237
+ formats = deepMergeFormatsAndSetTimeZone(formats, timeZone);
238
+ defaultFormats = deepMergeFormatsAndSetTimeZone(defaultFormats, timeZone);
239
+ if (!message) {
240
+ if (fallbackOnEmptyString === false && message === "") return message;
241
+ if (!defaultMessage || locale && locale.toLowerCase() !== defaultLocale.toLowerCase()) onError(new MissingTranslationError(messageDescriptor, locale));
242
+ if (defaultMessage) try {
243
+ return state.getMessageFormat(defaultMessage, defaultLocale, defaultFormats, opts).format(values);
244
+ } catch (e) {
245
+ onError(new MessageFormatError(`Error formatting default message for: "${id}", rendering default message verbatim`, locale, messageDescriptor, e));
246
+ return typeof defaultMessage === "string" ? defaultMessage : id;
247
+ }
248
+ return id;
249
+ }
250
+ try {
251
+ return state.getMessageFormat(message, locale, formats, {
252
+ formatters: state,
253
+ ...opts
254
+ }).format(values);
255
+ } catch (e) {
256
+ onError(new MessageFormatError(`Error formatting message: "${id}", using ${defaultMessage ? "default message" : "id"} as fallback.`, locale, messageDescriptor, e));
257
+ }
258
+ if (defaultMessage) try {
259
+ return state.getMessageFormat(defaultMessage, defaultLocale, defaultFormats, opts).format(values);
260
+ } catch (e) {
261
+ onError(new MessageFormatError(`Error formatting the default message for: "${id}", rendering message verbatim`, locale, messageDescriptor, e));
262
+ }
263
+ if (typeof message === "string") return message;
264
+ if (typeof defaultMessage === "string") return defaultMessage;
265
+ return id;
266
+ };
267
+ //#endregion
268
+ //#region packages/intl/dateTime.ts
269
+ const DATE_TIME_FORMAT_OPTIONS = [
270
+ "formatMatcher",
271
+ "timeZone",
272
+ "hour12",
273
+ "weekday",
274
+ "era",
275
+ "year",
276
+ "month",
277
+ "day",
278
+ "hour",
279
+ "minute",
280
+ "second",
281
+ "timeZoneName",
282
+ "hourCycle",
283
+ "dateStyle",
284
+ "timeStyle",
285
+ "calendar",
286
+ "numberingSystem",
287
+ "fractionalSecondDigits"
288
+ ];
289
+ function getFormatter$3({ locale, formats, onError, timeZone }, type, getDateTimeFormat, options = {}) {
290
+ const { format } = options;
291
+ const defaults = {
292
+ ...timeZone && { timeZone },
293
+ ...format && getNamedFormat(formats, type, format, onError)
294
+ };
295
+ let filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, defaults);
296
+ if (type === "time" && !filteredOptions.hour && !filteredOptions.minute && !filteredOptions.second && !filteredOptions.timeStyle && !filteredOptions.dateStyle) filteredOptions = {
297
+ ...filteredOptions,
298
+ hour: "numeric",
299
+ minute: "numeric"
300
+ };
301
+ return getDateTimeFormat(locale, filteredOptions);
302
+ }
303
+ function formatDate(config, getDateTimeFormat, value, options = {}) {
304
+ const date = typeof value === "string" ? new Date(value || 0) : value;
305
+ try {
306
+ return getFormatter$3(config, "date", getDateTimeFormat, options).format(date);
307
+ } catch (e) {
308
+ config.onError(new IntlFormatError("Error formatting date.", config.locale, e));
309
+ }
310
+ return String(date);
311
+ }
312
+ function formatTime(config, getDateTimeFormat, value, options = {}) {
313
+ const date = typeof value === "string" ? new Date(value || 0) : value;
314
+ try {
315
+ return getFormatter$3(config, "time", getDateTimeFormat, options).format(date);
316
+ } catch (e) {
317
+ config.onError(new IntlFormatError("Error formatting time.", config.locale, e));
318
+ }
319
+ return String(date);
320
+ }
321
+ function formatDateTimeRange(config, getDateTimeFormat, from, to, options = {}) {
322
+ const fromDate = typeof from === "string" ? new Date(from || 0) : from;
323
+ const toDate = typeof to === "string" ? new Date(to || 0) : to;
324
+ try {
325
+ return getFormatter$3(config, "dateTimeRange", getDateTimeFormat, options).formatRange(fromDate, toDate);
326
+ } catch (e) {
327
+ config.onError(new IntlFormatError("Error formatting date time range.", config.locale, e));
328
+ }
329
+ return String(fromDate);
330
+ }
331
+ function formatDateToParts(config, getDateTimeFormat, value, options = {}) {
332
+ const date = typeof value === "string" ? new Date(value || 0) : value;
333
+ try {
334
+ return getFormatter$3(config, "date", getDateTimeFormat, options).formatToParts(date);
335
+ } catch (e) {
336
+ config.onError(new IntlFormatError("Error formatting date.", config.locale, e));
337
+ }
338
+ return [];
339
+ }
340
+ function formatTimeToParts(config, getDateTimeFormat, value, options = {}) {
341
+ const date = typeof value === "string" ? new Date(value || 0) : value;
342
+ try {
343
+ return getFormatter$3(config, "time", getDateTimeFormat, options).formatToParts(date);
344
+ } catch (e) {
345
+ config.onError(new IntlFormatError("Error formatting time.", config.locale, e));
346
+ }
347
+ return [];
348
+ }
349
+ //#endregion
350
+ //#region packages/intl/duration.ts
351
+ const DURATION_FORMAT_OPTIONS = [
352
+ "style",
353
+ "numberingSystem",
354
+ "years",
355
+ "yearsDisplay",
356
+ "months",
357
+ "monthsDisplay",
358
+ "weeks",
359
+ "weeksDisplay",
360
+ "days",
361
+ "daysDisplay",
362
+ "hours",
363
+ "hoursDisplay",
364
+ "minutes",
365
+ "minutesDisplay",
366
+ "seconds",
367
+ "secondsDisplay",
368
+ "milliseconds",
369
+ "millisecondsDisplay",
370
+ "microseconds",
371
+ "microsecondsDisplay",
372
+ "nanoseconds",
373
+ "nanosecondsDisplay",
374
+ "fractionalDigits"
375
+ ];
376
+ function getFormatter$2({ locale, formats, onError }, getDurationFormat, options) {
377
+ if (!Intl.DurationFormat) {
378
+ onError(new FormatError("Intl.DurationFormat is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-durationformat\"", ErrorCode.MISSING_INTL_API));
379
+ return;
380
+ }
381
+ const { format } = options;
382
+ const defaults = format && getNamedFormat(formats, "duration", format, onError) || {};
383
+ return getDurationFormat(locale, filterProps(options, DURATION_FORMAT_OPTIONS, defaults));
384
+ }
385
+ function formatDuration(config, getDurationFormat, value, options = {}) {
386
+ try {
387
+ return getFormatter$2(config, getDurationFormat, options)?.format(value) ?? "";
388
+ } catch (e) {
389
+ config.onError(new IntlFormatError("Error formatting duration.", config.locale, e));
390
+ }
391
+ return "";
392
+ }
393
+ function formatDurationToParts(config, getDurationFormat, value, options = {}) {
394
+ try {
395
+ return getFormatter$2(config, getDurationFormat, options)?.formatToParts(value) ?? [];
396
+ } catch (e) {
397
+ config.onError(new IntlFormatError("Error formatting duration.", config.locale, e));
398
+ }
399
+ return [];
400
+ }
401
+ //#endregion
402
+ //#region packages/intl/displayName.ts
403
+ const DISPLAY_NAMES_OPTONS = [
404
+ "style",
405
+ "type",
406
+ "fallback",
407
+ "languageDisplay"
408
+ ];
409
+ function formatDisplayName({ locale, onError }, getDisplayNames, value, options) {
410
+ if (!Intl.DisplayNames) onError(new FormatError(`Intl.DisplayNames is not available in this environment.
411
+ Try polyfilling it using "@formatjs/intl-displaynames"
412
+ `, ErrorCode.MISSING_INTL_API));
413
+ const filteredOptions = filterProps(options, DISPLAY_NAMES_OPTONS);
414
+ try {
415
+ return getDisplayNames(locale, filteredOptions).of(value);
416
+ } catch (e) {
417
+ onError(new IntlFormatError("Error formatting display name.", locale, e));
418
+ }
419
+ }
420
+ //#endregion
421
+ //#region packages/intl/list.ts
422
+ const LIST_FORMAT_OPTIONS = ["type", "style"];
423
+ const now = Date.now();
424
+ function generateToken(i) {
425
+ return `${now}_${i}_${now}`;
426
+ }
427
+ function formatList(opts, getListFormat, values, options = {}) {
428
+ const results = formatListToParts(opts, getListFormat, values, options).reduce((all, el) => {
429
+ const val = el.value;
430
+ if (typeof val !== "string") all.push(val);
431
+ else if (typeof all[all.length - 1] === "string") all[all.length - 1] += val;
432
+ else all.push(val);
433
+ return all;
434
+ }, []);
435
+ return results.length === 1 ? results[0] : results.length === 0 ? "" : results;
436
+ }
437
+ function formatListToParts({ locale, onError }, getListFormat, values, options = {}) {
438
+ if (!Intl.ListFormat) onError(new FormatError(`Intl.ListFormat is not available in this environment.
439
+ Try polyfilling it using "@formatjs/intl-listformat"
440
+ `, ErrorCode.MISSING_INTL_API));
441
+ const filteredOptions = filterProps(options, LIST_FORMAT_OPTIONS);
442
+ try {
443
+ const richValues = {};
444
+ const serializedValues = Array.from(values).map((v, i) => {
445
+ if (typeof v === "object" && v !== null) {
446
+ const id = generateToken(i);
447
+ richValues[id] = v;
448
+ return id;
449
+ }
450
+ return String(v);
451
+ });
452
+ return getListFormat(locale, filteredOptions).formatToParts(serializedValues).map((part) => part.type === "literal" ? part : {
453
+ ...part,
454
+ value: richValues[part.value] || part.value
455
+ });
456
+ } catch (e) {
457
+ onError(new IntlFormatError("Error formatting list.", locale, e));
458
+ }
459
+ return values;
460
+ }
461
+ //#endregion
462
+ //#region packages/intl/plural.ts
463
+ const PLURAL_FORMAT_OPTIONS = ["type"];
464
+ function formatPlural({ locale, onError }, getPluralRules, value, options = {}) {
465
+ if (!Intl.PluralRules) onError(new FormatError(`Intl.PluralRules is not available in this environment.
466
+ Try polyfilling it using "@formatjs/intl-pluralrules"
467
+ `, ErrorCode.MISSING_INTL_API));
468
+ const filteredOptions = filterProps(options, PLURAL_FORMAT_OPTIONS);
469
+ try {
470
+ return getPluralRules(locale, filteredOptions).select(value);
471
+ } catch (e) {
472
+ onError(new IntlFormatError("Error formatting plural.", locale, e));
473
+ }
474
+ return "other";
475
+ }
476
+ //#endregion
477
+ //#region packages/intl/relativeTime.ts
478
+ const RELATIVE_TIME_FORMAT_OPTIONS = ["numeric", "style"];
479
+ function getFormatter$1({ locale, formats, onError }, getRelativeTimeFormat, options = {}) {
480
+ const { format } = options;
481
+ const defaults = !!format && getNamedFormat(formats, "relative", format, onError) || {};
482
+ return getRelativeTimeFormat(locale, filterProps(options, RELATIVE_TIME_FORMAT_OPTIONS, defaults));
483
+ }
484
+ function formatRelativeTime(config, getRelativeTimeFormat, value, unit, options = {}) {
485
+ if (!unit) unit = "second";
486
+ if (!Intl.RelativeTimeFormat) config.onError(new FormatError(`Intl.RelativeTimeFormat is not available in this environment.
487
+ Try polyfilling it using "@formatjs/intl-relativetimeformat"
488
+ `, ErrorCode.MISSING_INTL_API));
489
+ try {
490
+ return getFormatter$1(config, getRelativeTimeFormat, options).format(value, unit);
491
+ } catch (e) {
492
+ config.onError(new IntlFormatError("Error formatting relative time.", config.locale, e));
493
+ }
494
+ return String(value);
495
+ }
496
+ //#endregion
497
+ //#region packages/intl/number.ts
498
+ const NUMBER_FORMAT_OPTIONS = [
499
+ "style",
500
+ "currency",
501
+ "unit",
502
+ "unitDisplay",
503
+ "useGrouping",
504
+ "minimumIntegerDigits",
505
+ "minimumFractionDigits",
506
+ "maximumFractionDigits",
507
+ "minimumSignificantDigits",
508
+ "maximumSignificantDigits",
509
+ "compactDisplay",
510
+ "currencyDisplay",
511
+ "currencySign",
512
+ "notation",
513
+ "signDisplay",
514
+ "unit",
515
+ "unitDisplay",
516
+ "numberingSystem",
517
+ "trailingZeroDisplay",
518
+ "roundingPriority",
519
+ "roundingIncrement",
520
+ "roundingMode"
521
+ ];
522
+ function getFormatter({ locale, formats, onError }, getNumberFormat, options = {}) {
523
+ const { format } = options;
524
+ const defaults = format && getNamedFormat(formats, "number", format, onError) || {};
525
+ return getNumberFormat(locale, filterProps(options, NUMBER_FORMAT_OPTIONS, defaults));
526
+ }
527
+ function formatNumber(config, getNumberFormat, value, options = {}) {
528
+ try {
529
+ return getFormatter(config, getNumberFormat, options).format(value);
530
+ } catch (e) {
531
+ config.onError(new IntlFormatError("Error formatting number.", config.locale, e));
532
+ }
533
+ return String(value);
534
+ }
535
+ function formatNumberToParts(config, getNumberFormat, value, options = {}) {
536
+ try {
537
+ return getFormatter(config, getNumberFormat, options).formatToParts(value);
538
+ } catch (e) {
539
+ config.onError(new IntlFormatError("Error formatting number.", config.locale, e));
540
+ }
541
+ return [];
542
+ }
543
+ //#endregion
544
+ //#region packages/intl/create-intl.ts
545
+ function messagesContainString(messages) {
546
+ return typeof (messages ? messages[Object.keys(messages)[0]] : void 0) === "string";
547
+ }
548
+ function verifyConfigMessages(config) {
549
+ if (config.onWarn && config.defaultRichTextElements && messagesContainString(config.messages || {})) config.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
550
+ Please consider using "@formatjs/cli" to pre-compile your messages for performance.
551
+ For more details see https://formatjs.github.io/docs/getting-started/message-distribution`);
552
+ }
553
+ /**
554
+ * Create intl object
555
+ * @param config intl config
556
+ * @param cache cache for formatter instances to prevent memory leak
557
+ */
558
+ function createIntl(config, cache) {
559
+ const formatters = createFormatters(cache);
560
+ const resolvedConfig = {
561
+ ...DEFAULT_INTL_CONFIG,
562
+ ...config
563
+ };
564
+ const { locale, defaultLocale, onError } = resolvedConfig;
565
+ if (!locale) {
566
+ if (onError) onError(new InvalidConfigError(`"locale" was not configured, using "${defaultLocale}" as fallback. See https://formatjs.github.io/docs/react-intl/api#intlshape for more details`));
567
+ resolvedConfig.locale = resolvedConfig.defaultLocale || "en";
568
+ } else if (!Intl.NumberFormat.supportedLocalesOf(locale).length && onError) onError(new MissingDataError(`Missing locale data for locale: "${locale}" in Intl.NumberFormat. Using default locale: "${defaultLocale}" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details`));
569
+ else if (!Intl.DateTimeFormat.supportedLocalesOf(locale).length && onError) onError(new MissingDataError(`Missing locale data for locale: "${locale}" in Intl.DateTimeFormat. Using default locale: "${defaultLocale}" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details`));
570
+ verifyConfigMessages(resolvedConfig);
571
+ return {
572
+ ...resolvedConfig,
573
+ formatters,
574
+ formatNumber: formatNumber.bind(null, resolvedConfig, formatters.getNumberFormat),
575
+ formatNumberToParts: formatNumberToParts.bind(null, resolvedConfig, formatters.getNumberFormat),
576
+ formatDuration: formatDuration.bind(null, resolvedConfig, formatters.getDurationFormat),
577
+ formatDurationToParts: formatDurationToParts.bind(null, resolvedConfig, formatters.getDurationFormat),
578
+ formatRelativeTime: formatRelativeTime.bind(null, resolvedConfig, formatters.getRelativeTimeFormat),
579
+ formatDate: formatDate.bind(null, resolvedConfig, formatters.getDateTimeFormat),
580
+ formatDateToParts: formatDateToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat),
581
+ formatTime: formatTime.bind(null, resolvedConfig, formatters.getDateTimeFormat),
582
+ formatDateTimeRange: formatDateTimeRange.bind(null, resolvedConfig, formatters.getDateTimeFormat),
583
+ formatTimeToParts: formatTimeToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat),
584
+ formatPlural: formatPlural.bind(null, resolvedConfig, formatters.getPluralRules),
585
+ formatMessage: formatMessage.bind(null, resolvedConfig, formatters),
586
+ $t: formatMessage.bind(null, resolvedConfig, formatters),
587
+ formatList: formatList.bind(null, resolvedConfig, formatters.getListFormat),
588
+ formatListToParts: formatListToParts.bind(null, resolvedConfig, formatters.getListFormat),
589
+ formatDisplayName: formatDisplayName.bind(null, resolvedConfig, formatters.getDisplayNames)
590
+ };
591
+ }
592
+ //#endregion
593
+ export { DEFAULT_INTL_CONFIG, IntlError, IntlErrorCode, IntlFormatError, InvalidConfigError, MessageFormatError, MissingDataError, MissingTranslationError, UnsupportedFormatterError, createFormatters, createIntl, createIntlCache, defineMessage, defineMessages, filterProps, formatDate, formatDateToParts, formatDisplayName, formatDuration, formatDurationToParts, formatList, formatMessage, formatNumber, formatNumberToParts, formatPlural, formatRelativeTime, formatTime, formatTimeToParts, getNamedFormat };
594
+
595
+ //# sourceMappingURL=index.js.map