@ubnt/store.core 9.30.2 → 9.31.0-dts-fix.1

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 (1457) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/lib/apis/smartcat.js +17 -29
  3. package/lib/apis/smartcat.js.map +1 -1
  4. package/lib/apis/smartcat.mjs +17 -29
  5. package/lib/apis/smartcat.mjs.map +1 -1
  6. package/lib/assets/udmPro.jpg +0 -0
  7. package/lib/assets/udmPro2.jpg +0 -0
  8. package/lib/assets/udmProMax.jpg +0 -0
  9. package/lib/assets/udmProMax2.jpg +0 -0
  10. package/lib/assets/udmProSpecial.jpg +0 -0
  11. package/lib/assets/udmProSpecial2.jpg +0 -0
  12. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.js +5 -5
  13. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.mjs +2 -2
  14. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.js +5 -5
  15. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.mjs +2 -2
  16. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.js +5 -5
  17. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.mjs +2 -2
  18. package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.js +1 -1
  19. package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.mjs +2 -2
  20. package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.js +1 -1
  21. package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.mjs +2 -2
  22. package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.js +1 -1
  23. package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.mjs +2 -2
  24. package/lib/components/ModelCompareV3/data/CloudGateways.js +9 -9
  25. package/lib/components/ModelCompareV3/data/CloudGateways.mjs +6 -6
  26. package/lib/components/ModelCompareV3/data/products/udmPro.js +1 -1
  27. package/lib/components/ModelCompareV3/data/products/udmPro.mjs +1 -1
  28. package/lib/components/ModelCompareV3/data/products/udmProMax.js +1 -1
  29. package/lib/components/ModelCompareV3/data/products/udmProMax.mjs +1 -1
  30. package/lib/components/ModelCompareV3/data/products/udmProSpecial.js +1 -1
  31. package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs +1 -1
  32. package/lib/constants/address.js +3 -3
  33. package/lib/constants/address.js.map +1 -1
  34. package/lib/constants/address.mjs +3 -3
  35. package/lib/constants/address.mjs.map +1 -1
  36. package/lib/utils/money/constants.js +17 -1
  37. package/lib/utils/money/constants.js.map +1 -1
  38. package/lib/utils/money/constants.mjs +17 -2
  39. package/lib/utils/money/constants.mjs.map +1 -1
  40. package/lib/utils/money/format.js +17 -4
  41. package/lib/utils/money/format.js.map +1 -1
  42. package/lib/utils/money/format.mjs +18 -5
  43. package/lib/utils/money/format.mjs.map +1 -1
  44. package/lib/utils/money/index.js +1 -0
  45. package/lib/utils/money/index.js.map +1 -1
  46. package/lib/utils/money/index.mjs +1 -1
  47. package/package.json +2 -2
  48. package/lib/_virtual/_virtual_multi-entry.js +0 -203
  49. package/lib/_virtual/_virtual_multi-entry.js.map +0 -1
  50. package/lib/_virtual/_virtual_multi-entry.mjs +0 -176
  51. package/lib/_virtual/_virtual_multi-entry.mjs.map +0 -1
  52. package/lib/apis/index.d.ts +0 -1
  53. package/lib/apis/smartcat.d.ts +0 -199
  54. package/lib/apis/smartcat.test.d.ts +0 -1
  55. package/lib/assets/icons/wizard/index.d.ts +0 -6
  56. package/lib/components/Accordion/Accordion.d.ts +0 -2
  57. package/lib/components/Accordion/Accordion.styles.d.ts +0 -19
  58. package/lib/components/Accordion/Accordion.types.d.ts +0 -36
  59. package/lib/components/Accordion/index.d.ts +0 -2
  60. package/lib/components/AppDownloadBanner/AppDownloadBanner.d.ts +0 -2
  61. package/lib/components/AppDownloadBanner/AppDownloadBanner.styles.d.ts +0 -21
  62. package/lib/components/AppDownloadBanner/AppDownloadBanner.types.d.ts +0 -30
  63. package/lib/components/AppDownloadBanner/index.d.ts +0 -1
  64. package/lib/components/Avatar/Avatar.d.ts +0 -5
  65. package/lib/components/Avatar/Avatar.styles.d.ts +0 -3
  66. package/lib/components/Avatar/Avatar.types.d.ts +0 -10
  67. package/lib/components/Avatar/index.d.ts +0 -2
  68. package/lib/components/BackInStock/BackInStock.d.ts +0 -2
  69. package/lib/components/BackInStock/BackInStock.styles.d.ts +0 -8
  70. package/lib/components/BackInStock/BackInStock.types.d.ts +0 -26
  71. package/lib/components/BackInStock/index.d.ts +0 -1
  72. package/lib/components/Badge/Badge.d.ts +0 -10
  73. package/lib/components/Badge/Badge.styles.d.ts +0 -4
  74. package/lib/components/Badge/Badge.types.d.ts +0 -17
  75. package/lib/components/Badge/index.d.ts +0 -1
  76. package/lib/components/Banner/Banner.d.ts +0 -2
  77. package/lib/components/Banner/Banner.styles.d.ts +0 -19
  78. package/lib/components/Banner/Banner.types.d.ts +0 -22
  79. package/lib/components/Banner/index.d.ts +0 -1
  80. package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +0 -2
  81. package/lib/components/Breadcrumbs/Breadcrumbs.styles.d.ts +0 -2
  82. package/lib/components/Breadcrumbs/Breadcrumbs.types.d.ts +0 -16
  83. package/lib/components/Breadcrumbs/index.d.ts +0 -1
  84. package/lib/components/BuiltFeaturesSection/BuiltFeaturesSection.d.ts +0 -2
  85. package/lib/components/BuiltFeaturesSection/BuiltFeaturesSection.styles.d.ts +0 -9
  86. package/lib/components/BuiltFeaturesSection/BuiltFeaturesSection.types.d.ts +0 -10
  87. package/lib/components/BuiltFeaturesSection/index.d.ts +0 -1
  88. package/lib/components/Button/Button.d.ts +0 -5
  89. package/lib/components/Button/Button.styles.d.ts +0 -11
  90. package/lib/components/Button/Button.types.d.ts +0 -23
  91. package/lib/components/Button/CartButton.d.ts +0 -17
  92. package/lib/components/Button/index.d.ts +0 -2
  93. package/lib/components/ButtonGroup/ButtonGroup.d.ts +0 -2
  94. package/lib/components/ButtonGroup/ButtonGroup.styles.d.ts +0 -13
  95. package/lib/components/ButtonGroup/ButtonGroup.types.d.ts +0 -33
  96. package/lib/components/ButtonGroup/index.d.ts +0 -2
  97. package/lib/components/ButtonGroupBasic/ButtonGroupBasic.d.ts +0 -2
  98. package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.d.ts +0 -5
  99. package/lib/components/ButtonGroupBasic/ButtonGroupBasic.types.d.ts +0 -16
  100. package/lib/components/ButtonGroupBasic/index.d.ts +0 -2
  101. package/lib/components/CardSection/Card/Card.d.ts +0 -2
  102. package/lib/components/CardSection/Card/Card.styles.d.ts +0 -22
  103. package/lib/components/CardSection/Card/Card.types.d.ts +0 -40
  104. package/lib/components/CardSection/Card/index.d.ts +0 -2
  105. package/lib/components/CardSection/Card/translations/index.d.ts +0 -11
  106. package/lib/components/CardSection/CardSection.d.ts +0 -2
  107. package/lib/components/CardSection/CardSection.styles.d.ts +0 -4
  108. package/lib/components/CardSection/CardSection.types.d.ts +0 -13
  109. package/lib/components/CardSection/index.d.ts +0 -1
  110. package/lib/components/CarouselGallery/CarouselGallery.d.ts +0 -2
  111. package/lib/components/CarouselGallery/CarouselGallery.styles.d.ts +0 -17
  112. package/lib/components/CarouselGallery/CarouselGallery.types.d.ts +0 -12
  113. package/lib/components/CarouselGallery/index.d.ts +0 -1
  114. package/lib/components/CartIcon/CartIcon.d.ts +0 -2
  115. package/lib/components/CartIcon/CartIcon.styles.d.ts +0 -6
  116. package/lib/components/CartIcon/CartIcon.types.d.ts +0 -8
  117. package/lib/components/CartIcon/index.d.ts +0 -1
  118. package/lib/components/CartSummary/CartSummary.d.ts +0 -2
  119. package/lib/components/CartSummary/CartSummary.styles.d.ts +0 -15
  120. package/lib/components/CartSummary/CartSummary.types.d.ts +0 -11
  121. package/lib/components/CartSummary/index.d.ts +0 -1
  122. package/lib/components/CategoryTabs/CategoryTabs.d.ts +0 -2
  123. package/lib/components/CategoryTabs/CategoryTabs.styles.d.ts +0 -7
  124. package/lib/components/CategoryTabs/CategoryTabs.types.d.ts +0 -24
  125. package/lib/components/CategoryTabs/index.d.ts +0 -1
  126. package/lib/components/Checkbox/Checkbox.d.ts +0 -2
  127. package/lib/components/Checkbox/Checkbox.styles.d.ts +0 -3
  128. package/lib/components/Checkbox/Checkbox.types.d.ts +0 -8
  129. package/lib/components/Checkbox/index.d.ts +0 -1
  130. package/lib/components/CloserLookSection/CloserLookSection.constants.d.ts +0 -19
  131. package/lib/components/CloserLookSection/CloserLookSection.d.ts +0 -15
  132. package/lib/components/CloserLookSection/CloserLookSection.styles.d.ts +0 -14
  133. package/lib/components/CloserLookSection/CloserLookSection.types.d.ts +0 -35
  134. package/lib/components/CloserLookSection/RecommendedAddons/RecommendedAddons.constants.d.ts +0 -10
  135. package/lib/components/CloserLookSection/RecommendedAddons/RecommendedAddons.d.ts +0 -2
  136. package/lib/components/CloserLookSection/RecommendedAddons/RecommendedAddons.styles.d.ts +0 -5
  137. package/lib/components/CloserLookSection/RecommendedAddons/RecommendedAddons.types.d.ts +0 -10
  138. package/lib/components/CloserLookSection/RecommendedAddons/index.d.ts +0 -1
  139. package/lib/components/CloserLookSection/index.d.ts +0 -1
  140. package/lib/components/Compare/Compare.d.ts +0 -2
  141. package/lib/components/Compare/Compare.styles.d.ts +0 -36
  142. package/lib/components/Compare/Compare.types.d.ts +0 -34
  143. package/lib/components/Compare/CompareData.d.ts +0 -22
  144. package/lib/components/Compare/ProductTable.d.ts +0 -6
  145. package/lib/components/Compare/index.d.ts +0 -2
  146. package/lib/components/CompareChart/CompareChart.d.ts +0 -2
  147. package/lib/components/CompareChart/CompareChart.styles.d.ts +0 -37
  148. package/lib/components/CompareChart/CompareChart.types.d.ts +0 -17
  149. package/lib/components/CompareChart/CompareChartData.d.ts +0 -69
  150. package/lib/components/CompareChart/index.d.ts +0 -2
  151. package/lib/components/CompareSection/CompareSection.d.ts +0 -5
  152. package/lib/components/CompareSection/CompareSection.data.d.ts +0 -10
  153. package/lib/components/CompareSection/CompareSection.styles.d.ts +0 -17
  154. package/lib/components/CompareSection/CompareSection.types.d.ts +0 -20
  155. package/lib/components/CompareSection/index.d.ts +0 -1
  156. package/lib/components/Container/Container.d.ts +0 -2
  157. package/lib/components/Container/Container.styles.d.ts +0 -5
  158. package/lib/components/Container/Container.types.d.ts +0 -11
  159. package/lib/components/Container/index.d.ts +0 -1
  160. package/lib/components/CustomImage/CustomImage.d.ts +0 -13
  161. package/lib/components/CustomImage/CustomImage.styles.d.ts +0 -25
  162. package/lib/components/CustomImage/CustomImage.types.d.ts +0 -88
  163. package/lib/components/CustomImage/index.d.ts +0 -1
  164. package/lib/components/DeploymentGallery/DeploymentGallery.d.ts +0 -2
  165. package/lib/components/DeploymentGallery/DeploymentGallery.styles.d.ts +0 -4
  166. package/lib/components/DeploymentGallery/DeploymentGallery.types.d.ts +0 -6
  167. package/lib/components/DeploymentGallery/index.d.ts +0 -1
  168. package/lib/components/Explore/Explore.d.ts +0 -2
  169. package/lib/components/Explore/Explore.styles.d.ts +0 -35
  170. package/lib/components/Explore/Explore.test.d.ts +0 -1
  171. package/lib/components/Explore/Explore.types.d.ts +0 -11
  172. package/lib/components/Explore/ExploreData.d.ts +0 -53
  173. package/lib/components/Explore/index.d.ts +0 -1
  174. package/lib/components/Explore/translations/index.d.ts +0 -11
  175. package/lib/components/FeaturesSection_deprecated/AllFeaturesButton/AllFeaturesButton.d.ts +0 -2
  176. package/lib/components/FeaturesSection_deprecated/AllFeaturesButton/AllFeaturesButton.styles.d.ts +0 -4
  177. package/lib/components/FeaturesSection_deprecated/AllFeaturesButton/AllFeaturesButton.types.d.ts +0 -4
  178. package/lib/components/FeaturesSection_deprecated/AllFeaturesButton/index.d.ts +0 -1
  179. package/lib/components/FeaturesSection_deprecated/Features/Features.d.ts +0 -2
  180. package/lib/components/FeaturesSection_deprecated/Features/Features.styles.d.ts +0 -24
  181. package/lib/components/FeaturesSection_deprecated/Features/Features.types.d.ts +0 -18
  182. package/lib/components/FeaturesSection_deprecated/Features/index.d.ts +0 -1
  183. package/lib/components/FeaturesSection_deprecated/FeaturesSection.d.ts +0 -11
  184. package/lib/components/FeaturesSection_deprecated/FeaturesSection.styles.d.ts +0 -36
  185. package/lib/components/FeaturesSection_deprecated/FeaturesSection.types.d.ts +0 -89
  186. package/lib/components/FeaturesSection_deprecated/index.d.ts +0 -1
  187. package/lib/components/Footer/Footer.d.ts +0 -2
  188. package/lib/components/Footer/Footer.styles.d.ts +0 -41
  189. package/lib/components/Footer/Footer.types.d.ts +0 -46
  190. package/lib/components/Footer/hooks/useFooterContent.d.ts +0 -96
  191. package/lib/components/Footer/index.d.ts +0 -2
  192. package/lib/components/Gallery/Gallery.context.d.ts +0 -21
  193. package/lib/components/Gallery/Gallery.d.ts +0 -4
  194. package/lib/components/Gallery/Gallery.styles.d.ts +0 -12
  195. package/lib/components/Gallery/Gallery.types.d.ts +0 -69
  196. package/lib/components/Gallery/GalleryControls/GalleryControls.d.ts +0 -6
  197. package/lib/components/Gallery/GalleryControls/GalleryControls.styles.d.ts +0 -12
  198. package/lib/components/Gallery/GalleryControls/GalleryControls.types.d.ts +0 -16
  199. package/lib/components/Gallery/GalleryControls/index.d.ts +0 -1
  200. package/lib/components/Gallery/GalleryItem/GalleryItem.d.ts +0 -2
  201. package/lib/components/Gallery/GalleryItem/GalleryItem.styles.d.ts +0 -11
  202. package/lib/components/Gallery/GalleryItem/index.d.ts +0 -1
  203. package/lib/components/Gallery/GalleryThumbnails/GalleryThumbnails.d.ts +0 -2
  204. package/lib/components/Gallery/GalleryThumbnails/GalleryThumbnails.styles.d.ts +0 -19
  205. package/lib/components/Gallery/GalleryThumbnails/GalleryThumbnails.types.d.ts +0 -7
  206. package/lib/components/Gallery/GalleryThumbnails/index.d.ts +0 -1
  207. package/lib/components/Gallery/index.d.ts +0 -2
  208. package/lib/components/Gallery/utils.d.ts +0 -8
  209. package/lib/components/GradientButton/GradientButton.d.ts +0 -2
  210. package/lib/components/GradientButton/GradientButton.styles.d.ts +0 -5
  211. package/lib/components/GradientButton/GradientButton.types.d.ts +0 -4
  212. package/lib/components/GradientButton/index.d.ts +0 -1
  213. package/lib/components/GridGallery/GridGallery.d.ts +0 -2
  214. package/lib/components/GridGallery/GridGallery.styles.d.ts +0 -45
  215. package/lib/components/GridGallery/GridGallery.types.d.ts +0 -33
  216. package/lib/components/GridGallery/GridModal/GridModal.d.ts +0 -2
  217. package/lib/components/GridGallery/GridModal/GridModal.styles.d.ts +0 -8
  218. package/lib/components/GridGallery/GridModal/GridModal.types.d.ts +0 -8
  219. package/lib/components/GridGallery/index.d.ts +0 -1
  220. package/lib/components/Header/AccountFrame/AccountFrame.d.ts +0 -2
  221. package/lib/components/Header/AccountFrame/AccountFrame.styles.d.ts +0 -15
  222. package/lib/components/Header/AccountFrame/AccountFrame.types.d.ts +0 -8
  223. package/lib/components/Header/AccountFrame/Mobile/Mobile.d.ts +0 -3
  224. package/lib/components/Header/AccountFrame/Mobile/Mobile.styles.d.ts +0 -3
  225. package/lib/components/Header/AccountFrame/Mobile/index.d.ts +0 -1
  226. package/lib/components/Header/AccountFrame/index.d.ts +0 -1
  227. package/lib/components/Header/AccountFrame/translations/index.d.ts +0 -11
  228. package/lib/components/Header/AccountMenu/AccountMenu.d.ts +0 -2
  229. package/lib/components/Header/AccountMenu/AccountMenu.styles.d.ts +0 -23
  230. package/lib/components/Header/AccountMenu/AccountMenu.types.d.ts +0 -9
  231. package/lib/components/Header/AccountMenu/index.d.ts +0 -1
  232. package/lib/components/Header/AccountMenu/megaphone.http.service.d.ts +0 -27
  233. package/lib/components/Header/CartModal/CartModal.d.ts +0 -2
  234. package/lib/components/Header/CartModal/CartModal.styles.d.ts +0 -14
  235. package/lib/components/Header/CartModal/CartModal.types.d.ts +0 -9
  236. package/lib/components/Header/CartModal/Empty/Empty.d.ts +0 -2
  237. package/lib/components/Header/CartModal/Empty/Empty.styles.d.ts +0 -1
  238. package/lib/components/Header/CartModal/Empty/Empty.types.d.ts +0 -6
  239. package/lib/components/Header/CartModal/Empty/index.d.ts +0 -1
  240. package/lib/components/Header/CartModal/Item/Item.d.ts +0 -7
  241. package/lib/components/Header/CartModal/Item/Item.styles.d.ts +0 -12
  242. package/lib/components/Header/CartModal/Item/index.d.ts +0 -1
  243. package/lib/components/Header/CartModal/index.d.ts +0 -1
  244. package/lib/components/Header/CartModalV2/CartModal.d.ts +0 -2
  245. package/lib/components/Header/CartModalV2/CartModal.styles.d.ts +0 -26
  246. package/lib/components/Header/CartModalV2/CartModal.types.d.ts +0 -8
  247. package/lib/components/Header/CartModalV2/Item/Item.d.ts +0 -2
  248. package/lib/components/Header/CartModalV2/Item/Item.styles.d.ts +0 -15
  249. package/lib/components/Header/CartModalV2/Item/Item.types.d.ts +0 -7
  250. package/lib/components/Header/CartModalV2/Item/index.d.ts +0 -1
  251. package/lib/components/Header/CartModalV2/index.d.ts +0 -1
  252. package/lib/components/Header/Header.d.ts +0 -7
  253. package/lib/components/Header/Header.styles.d.ts +0 -76
  254. package/lib/components/Header/Header.types.d.ts +0 -239
  255. package/lib/components/Header/IsolatedHeader.d.ts +0 -13
  256. package/lib/components/Header/LanguageFrame/LanguageFrame.d.ts +0 -10
  257. package/lib/components/Header/LanguageFrame/LanguageFrame.styles.d.ts +0 -21
  258. package/lib/components/Header/LanguageFrame/LanguageFrame.types.d.ts +0 -6
  259. package/lib/components/Header/LanguageFrame/Mobile/Mobile.d.ts +0 -2
  260. package/lib/components/Header/LanguageFrame/Mobile/Mobile.styles.d.ts +0 -3
  261. package/lib/components/Header/LanguageFrame/Mobile/index.d.ts +0 -1
  262. package/lib/components/Header/LanguageFrame/index.d.ts +0 -1
  263. package/lib/components/Header/LanguageFrame/translations/index.d.ts +0 -1
  264. package/lib/components/Header/LanguageFrame/utils/buildLanguageLink.d.ts +0 -2
  265. package/lib/components/Header/LanguageFrame/utils/buildLanguageLink.test.d.ts +0 -1
  266. package/lib/components/Header/LinksModal/LinksModal.d.ts +0 -2
  267. package/lib/components/Header/LinksModal/LinksModal.styles.d.ts +0 -6
  268. package/lib/components/Header/LinksModal/LinksModal.types.d.ts +0 -11
  269. package/lib/components/Header/LinksModal/index.d.ts +0 -1
  270. package/lib/components/Header/LinksModal/mapping.d.ts +0 -6
  271. package/lib/components/Header/MenuItem/MenuItem.d.ts +0 -3
  272. package/lib/components/Header/MenuItem/MenuItem.styles.d.ts +0 -27
  273. package/lib/components/Header/MenuItem/MenuItem.types.d.ts +0 -31
  274. package/lib/components/Header/MenuItem/index.d.ts +0 -1
  275. package/lib/components/Header/Navigation/Carousel/Carousel.d.ts +0 -2
  276. package/lib/components/Header/Navigation/Carousel/Carousel.styles.d.ts +0 -34
  277. package/lib/components/Header/Navigation/Carousel/Carousel.types.d.ts +0 -16
  278. package/lib/components/Header/Navigation/Carousel/index.d.ts +0 -1
  279. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.d.ts +0 -2
  280. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.d.ts +0 -29
  281. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.types.d.ts +0 -35
  282. package/lib/components/Header/Navigation/MicrositeMenu/index.d.ts +0 -1
  283. package/lib/components/Header/Navigation/MicrositeMenu/mapping.d.ts +0 -6
  284. package/lib/components/Header/Navigation/MobileMenu/MobileMenu.d.ts +0 -3
  285. package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.d.ts +0 -50
  286. package/lib/components/Header/Navigation/MobileMenu/MobileMenu.types.d.ts +0 -11
  287. package/lib/components/Header/Navigation/MobileMenu/index.d.ts +0 -1
  288. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.d.ts +0 -2
  289. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.d.ts +0 -7
  290. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.types.d.ts +0 -40
  291. package/lib/components/Header/Navigation/ProMobileMenu/index.d.ts +0 -1
  292. package/lib/components/Header/Navigation/index.d.ts +0 -3
  293. package/lib/components/Header/Overlay/Overlay.d.ts +0 -2
  294. package/lib/components/Header/Overlay/Overlay.styles.d.ts +0 -4
  295. package/lib/components/Header/Overlay/Overlay.types.d.ts +0 -6
  296. package/lib/components/Header/Overlay/index.d.ts +0 -1
  297. package/lib/components/Header/ProHeader/ProHeader.d.ts +0 -22
  298. package/lib/components/Header/ProHeader/ProHeader.styles.d.ts +0 -56
  299. package/lib/components/Header/ProHeader/index.d.ts +0 -1
  300. package/lib/components/Header/SearchTab/SearchTab.d.ts +0 -2
  301. package/lib/components/Header/SearchTab/SearchTab.styles.d.ts +0 -4
  302. package/lib/components/Header/SearchTab/SearchTab.types.d.ts +0 -13
  303. package/lib/components/Header/SearchTab/index.d.ts +0 -1
  304. package/lib/components/Header/index.d.ts +0 -3
  305. package/lib/components/Header/translations/index.d.ts +0 -11
  306. package/lib/components/Hero/Hero.d.ts +0 -2
  307. package/lib/components/Hero/Hero.styles.d.ts +0 -44
  308. package/lib/components/Hero/Hero.types.d.ts +0 -31
  309. package/lib/components/Hero/index.d.ts +0 -1
  310. package/lib/components/HeroFadeGallery/HeroFadeGallery.d.ts +0 -2
  311. package/lib/components/HeroFadeGallery/HeroFadeGallery.styles.d.ts +0 -12
  312. package/lib/components/HeroFadeGallery/HeroFadeGallery.types.d.ts +0 -20
  313. package/lib/components/HeroFadeGallery/index.d.ts +0 -1
  314. package/lib/components/HeroVideo/HeroVideo.d.ts +0 -2
  315. package/lib/components/HeroVideo/HeroVideo.styles.d.ts +0 -9
  316. package/lib/components/HeroVideo/HeroVideo.types.d.ts +0 -9
  317. package/lib/components/HeroVideo/index.d.ts +0 -1
  318. package/lib/components/HowToUseSection/HowToUseSection.d.ts +0 -2
  319. package/lib/components/HowToUseSection/HowToUseSection.data.d.ts +0 -13
  320. package/lib/components/HowToUseSection/HowToUseSection.data.old.d.ts +0 -46
  321. package/lib/components/HowToUseSection/HowToUseSection.styles.d.ts +0 -15
  322. package/lib/components/HowToUseSection/HowToUseSection.types.d.ts +0 -11
  323. package/lib/components/HowToUseSection/index.d.ts +0 -1
  324. package/lib/components/ImageCarousel/ImageCarousel.d.ts +0 -2
  325. package/lib/components/ImageCarousel/ImageCarousel.styles.d.ts +0 -53
  326. package/lib/components/ImageCarousel/ImageCarousel.types.d.ts +0 -11
  327. package/lib/components/ImageCarousel/index.d.ts +0 -1
  328. package/lib/components/ImageModal/ImageModal.d.ts +0 -2
  329. package/lib/components/ImageModal/ImageModal.styles.d.ts +0 -7
  330. package/lib/components/ImageModal/ImageModal.types.d.ts +0 -10
  331. package/lib/components/ImageModal/index.d.ts +0 -1
  332. package/lib/components/ImageSequence/ImageSequence.d.ts +0 -7
  333. package/lib/components/ImageSequence/ImageSequence.styles.d.ts +0 -8
  334. package/lib/components/ImageSequence/ImageSequence.types.d.ts +0 -28
  335. package/lib/components/ImageSequence/index.d.ts +0 -2
  336. package/lib/components/InputSelect/InputSelect.d.ts +0 -9
  337. package/lib/components/InputSelect/InputSelect.styles.d.ts +0 -17
  338. package/lib/components/InputSelect/InputSelect.types.d.ts +0 -13
  339. package/lib/components/InputSelect/index.d.ts +0 -1
  340. package/lib/components/LandingPage/Block/Block.d.ts +0 -2
  341. package/lib/components/LandingPage/Block/Block.styles.d.ts +0 -4
  342. package/lib/components/LandingPage/Block/Block.types.d.ts +0 -11
  343. package/lib/components/LandingPage/Block/index.d.ts +0 -1
  344. package/lib/components/LandingPage/Cards/Card/Card.d.ts +0 -2
  345. package/lib/components/LandingPage/Cards/Card/Card.styles.d.ts +0 -26
  346. package/lib/components/LandingPage/Cards/Card/Card.types.d.ts +0 -19
  347. package/lib/components/LandingPage/Cards/Card/index.d.ts +0 -1
  348. package/lib/components/LandingPage/Cards/Cards.constants.d.ts +0 -2
  349. package/lib/components/LandingPage/Cards/Cards.d.ts +0 -2
  350. package/lib/components/LandingPage/Cards/Cards.styles.d.ts +0 -23
  351. package/lib/components/LandingPage/Cards/Cards.types.d.ts +0 -19
  352. package/lib/components/LandingPage/Cards/index.d.ts +0 -2
  353. package/lib/components/LandingPage/LandingPage.constants.d.ts +0 -35
  354. package/lib/components/LandingPage/LandingPage.d.ts +0 -2
  355. package/lib/components/LandingPage/LandingPage.styles.d.ts +0 -5
  356. package/lib/components/LandingPage/LandingPage.types.d.ts +0 -16
  357. package/lib/components/LandingPage/index.d.ts +0 -1
  358. package/lib/components/LandingPagePro/LandingPagePro.d.ts +0 -24
  359. package/lib/components/LandingPagePro/LandingPagePro.styles.d.ts +0 -3
  360. package/lib/components/LandingPagePro/LandingPagePro.types.d.ts +0 -39
  361. package/lib/components/LandingPagePro/index.d.ts +0 -1
  362. package/lib/components/LandingPagePro/utils.d.ts +0 -12
  363. package/lib/components/LandingPageSearch/LandingPageSearch.d.ts +0 -2
  364. package/lib/components/LandingPageSearch/LandingPageSearch.styles.d.ts +0 -2
  365. package/lib/components/LandingPageSearch/LandingPageSearch.types.d.ts +0 -49
  366. package/lib/components/LandingPageSearch/Modal/Modal.d.ts +0 -2
  367. package/lib/components/LandingPageSearch/Modal/Modal.styles.d.ts +0 -30
  368. package/lib/components/LandingPageSearch/Modal/Modal.types.d.ts +0 -20
  369. package/lib/components/LandingPageSearch/Modal/index.d.ts +0 -1
  370. package/lib/components/LandingPageSearch/index.d.ts +0 -1
  371. package/lib/components/LandingPageSidebar/LandingPageSidebar.d.ts +0 -2
  372. package/lib/components/LandingPageSidebar/LandingPageSidebar.styles.d.ts +0 -28
  373. package/lib/components/LandingPageSidebar/LandingPageSidebar.types.d.ts +0 -92
  374. package/lib/components/LandingPageSidebar/index.d.ts +0 -1
  375. package/lib/components/LayoutRenderer/LayoutRenderer.d.ts +0 -5
  376. package/lib/components/LayoutRenderer/LayoutRenderer.styles.d.ts +0 -26
  377. package/lib/components/LayoutRenderer/LayoutRenderer.types.d.ts +0 -263
  378. package/lib/components/LayoutRenderer/index.d.ts +0 -2
  379. package/lib/components/LayoutRendererV1/LayoutRenderer.d.ts +0 -9
  380. package/lib/components/LayoutRendererV1/LayoutRenderer.old.d.ts +0 -120
  381. package/lib/components/LayoutRendererV1/LayoutRenderer.styles.d.ts +0 -65
  382. package/lib/components/LayoutRendererV1/LayoutRenderer.types.d.ts +0 -91
  383. package/lib/components/LayoutRendererV1/index.d.ts +0 -1
  384. package/lib/components/LayoutRendererV2/LayoutRenderer.d.ts +0 -6
  385. package/lib/components/LayoutRendererV2/LayoutRenderer.styles.d.ts +0 -55
  386. package/lib/components/LayoutRendererV2/LayoutRenderer.types.d.ts +0 -93
  387. package/lib/components/LayoutRendererV2/index.d.ts +0 -1
  388. package/lib/components/LearnMoreLink/LearnMoreLink.d.ts +0 -11
  389. package/lib/components/LearnMoreLink/LearnMoreLink.styles.d.ts +0 -4
  390. package/lib/components/LearnMoreLink/index.d.ts +0 -1
  391. package/lib/components/LearnMoreLink/translations/index.d.ts +0 -11
  392. package/lib/components/Loader/Loader.d.ts +0 -2
  393. package/lib/components/Loader/Loader.styles.d.ts +0 -9
  394. package/lib/components/Loader/Loader.types.d.ts +0 -9
  395. package/lib/components/Loader/Spinner/Spinner.d.ts +0 -7
  396. package/lib/components/Loader/Spinner/Spinner.styles.d.ts +0 -4
  397. package/lib/components/Loader/Spinner/index.d.ts +0 -1
  398. package/lib/components/Loader/index.d.ts +0 -2
  399. package/lib/components/LoaderDots/LoaderDots.d.ts +0 -2
  400. package/lib/components/LoaderDots/LoaderDots.styles.d.ts +0 -8
  401. package/lib/components/LoaderDots/LoaderDots.types.d.ts +0 -4
  402. package/lib/components/LoaderDots/index.d.ts +0 -1
  403. package/lib/components/MeetUniFiVideoPlayer/EpisodeCard/EpisodeCard.d.ts +0 -2
  404. package/lib/components/MeetUniFiVideoPlayer/EpisodeCard/EpisodeCard.styles.d.ts +0 -13
  405. package/lib/components/MeetUniFiVideoPlayer/EpisodeCard/EpisodeCard.types.d.ts +0 -7
  406. package/lib/components/MeetUniFiVideoPlayer/EpisodeCard/index.d.ts +0 -1
  407. package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.d.ts +0 -2
  408. package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.helpers.d.ts +0 -4
  409. package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.styles.d.ts +0 -34
  410. package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.types.d.ts +0 -46
  411. package/lib/components/MeetUniFiVideoPlayer/index.d.ts +0 -1
  412. package/lib/components/MeetUniFiVideoPlayer/translations/index.d.ts +0 -11
  413. package/lib/components/MicrositeBuyButton/MicrositeBuyButton.d.ts +0 -13
  414. package/lib/components/MicrositeBuyButton/index.d.ts +0 -1
  415. package/lib/components/MicrositeBuyButton/translations/index.d.ts +0 -11
  416. package/lib/components/MicrositeColumnFeatureProgressBar/MicrositeColumnFeatureProgressBar.d.ts +0 -2
  417. package/lib/components/MicrositeColumnFeatureProgressBar/MicrositeColumnFeatureProgressBar.styles.d.ts +0 -7
  418. package/lib/components/MicrositeColumnFeatureProgressBar/MicrositeColumnFeatureProgressBar.types.d.ts +0 -12
  419. package/lib/components/MicrositeColumnFeatureProgressBar/index.d.ts +0 -1
  420. package/lib/components/MicrositeCustomContent/MicrositeCustomContent.d.ts +0 -2
  421. package/lib/components/MicrositeExploreCards/MicrositeExploreCards.d.ts +0 -2
  422. package/lib/components/MicrositeExploreCards/MicrositeExploreCards.styles.d.ts +0 -9
  423. package/lib/components/MicrositeExploreCards/MicrositeExploreCards.types.d.ts +0 -13
  424. package/lib/components/MicrositeExploreCards/index.d.ts +0 -3
  425. package/lib/components/MicrositeFeatureChecklist/MicrositeFeatureChecklist.d.ts +0 -2
  426. package/lib/components/MicrositeFeatureChecklist/MicrositeFeatureChecklist.styles.d.ts +0 -26
  427. package/lib/components/MicrositeFeatureChecklist/MicrositeFeatureChecklist.types.d.ts +0 -16
  428. package/lib/components/MicrositeFeatureChecklist/index.d.ts +0 -2
  429. package/lib/components/MicrositeFeatureIcons/MicrositeFeatureIcons.d.ts +0 -2
  430. package/lib/components/MicrositeFeatureIcons/MicrositeFeatureIcons.styles.d.ts +0 -15
  431. package/lib/components/MicrositeFeatureIcons/MicrositeFeatureIcons.types.d.ts +0 -26
  432. package/lib/components/MicrositeFeatureIcons/index.d.ts +0 -1
  433. package/lib/components/MicrositeFeatureList/MicrositeFeatureList.d.ts +0 -2
  434. package/lib/components/MicrositeFeatureList/MicrositeFeatureList.styles.d.ts +0 -16
  435. package/lib/components/MicrositeFeatureList/MicrositeFeatureList.types.d.ts +0 -14
  436. package/lib/components/MicrositeFeatureList/index.d.ts +0 -2
  437. package/lib/components/MicrositeFeatureProgressBar/MicrositeFeatureProgressBar.d.ts +0 -2
  438. package/lib/components/MicrositeFeatureProgressBar/MicrositeFeatureProgressBar.styles.d.ts +0 -37
  439. package/lib/components/MicrositeFeatureProgressBar/MicrositeFeatureProgressBar.types.d.ts +0 -29
  440. package/lib/components/MicrositeFeatureProgressBar/index.d.ts +0 -1
  441. package/lib/components/MicrositeHero/MicrositeHero.d.ts +0 -2
  442. package/lib/components/MicrositeHero/MicrositeHero.styles.d.ts +0 -62
  443. package/lib/components/MicrositeHero/MicrositeHero.types.d.ts +0 -93
  444. package/lib/components/MicrositeHero/index.d.ts +0 -1
  445. package/lib/components/MicrositeIntroductionBlock/MicrositeIntroductionBlock.d.ts +0 -2
  446. package/lib/components/MicrositeIntroductionBlock/MicrositeIntroductionBlock.styles.d.ts +0 -8
  447. package/lib/components/MicrositeIntroductionBlock/MicrositeIntroductionBlock.types.d.ts +0 -29
  448. package/lib/components/MicrositeIntroductionBlock/index.d.ts +0 -1
  449. package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.d.ts +0 -2
  450. package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.styles.d.ts +0 -32
  451. package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.types.d.ts +0 -70
  452. package/lib/components/MicrositeMediaGrid/index.d.ts +0 -1
  453. package/lib/components/MicrositeProductGrid/MicrositeProductGrid.d.ts +0 -2
  454. package/lib/components/MicrositeProductGrid/MicrositeProductGrid.styles.d.ts +0 -20
  455. package/lib/components/MicrositeProductGrid/MicrositeProductGrid.types.d.ts +0 -26
  456. package/lib/components/MicrositeProductGrid/index.d.ts +0 -3
  457. package/lib/components/MicrositeProductLearnMoreBlock/MicrositeProductLearnMoreBlock.d.ts +0 -2
  458. package/lib/components/MicrositeProductLearnMoreBlock/MicrositeProductLearnMoreBlock.styles.d.ts +0 -15
  459. package/lib/components/MicrositeProductLearnMoreBlock/MicrositeProductLearnMoreBlock.types.d.ts +0 -15
  460. package/lib/components/MicrositeProductLearnMoreBlock/MicrositeProductLearnMoreBlockWrap.d.ts +0 -4
  461. package/lib/components/MicrositeProductLearnMoreBlock/index.d.ts +0 -2
  462. package/lib/components/MicrositeSection/AllFeaturesButton/AllFeaturesButton.d.ts +0 -2
  463. package/lib/components/MicrositeSection/AllFeaturesButton/AllFeaturesButton.styles.d.ts +0 -4
  464. package/lib/components/MicrositeSection/AllFeaturesButton/AllFeaturesButton.types.d.ts +0 -4
  465. package/lib/components/MicrositeSection/AllFeaturesButton/index.d.ts +0 -1
  466. package/lib/components/MicrositeSection/Features/Features.d.ts +0 -2
  467. package/lib/components/MicrositeSection/Features/Features.styles.d.ts +0 -24
  468. package/lib/components/MicrositeSection/Features/Features.types.d.ts +0 -18
  469. package/lib/components/MicrositeSection/Features/index.d.ts +0 -1
  470. package/lib/components/MicrositeSection/MicrositeSection.d.ts +0 -11
  471. package/lib/components/MicrositeSection/MicrositeSection.styles.d.ts +0 -43
  472. package/lib/components/MicrositeSection/MicrositeSection.types.d.ts +0 -103
  473. package/lib/components/MicrositeSection/MicrositeSection.utils.d.ts +0 -32
  474. package/lib/components/MicrositeSection/index.d.ts +0 -1
  475. package/lib/components/MicrositeSectionWrap/MicrositeSectionWrap.d.ts +0 -2
  476. package/lib/components/MicrositeSectionWrap/MicrositeSectionWrap.styles.d.ts +0 -6
  477. package/lib/components/MicrositeSectionWrap/MicrositeSectionWrap.types.d.ts +0 -9
  478. package/lib/components/MicrositeSectionWrap/index.d.ts +0 -1
  479. package/lib/components/MicrositeSubSubNavigation/MicrositeSubSubNavigation.d.ts +0 -2
  480. package/lib/components/MicrositeSubSubNavigation/MicrositeSubSubNavigation.styles.d.ts +0 -4
  481. package/lib/components/MicrositeSubSubNavigation/MicrositeSubSubNavigation.types.d.ts +0 -5
  482. package/lib/components/MicrositeSubSubNavigation/index.d.ts +0 -1
  483. package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.d.ts +0 -2
  484. package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.styles.d.ts +0 -21
  485. package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.types.d.ts +0 -42
  486. package/lib/components/MicrositeVideoSlideshow/index.d.ts +0 -1
  487. package/lib/components/Microsites/MicrositePageContext.d.ts +0 -2
  488. package/lib/components/Microsites/MicrositeProductPage.d.ts +0 -2
  489. package/lib/components/Microsites/MicrositeProductPage.styles.d.ts +0 -9
  490. package/lib/components/Microsites/MicrositeProductPageSample.constants.d.ts +0 -9
  491. package/lib/components/Microsites/Microsites.types.d.ts +0 -126
  492. package/lib/components/Microsites/context/MicrositeProductPageContext.d.ts +0 -15
  493. package/lib/components/Microsites/index.d.ts +0 -2
  494. package/lib/components/MobileModal/MobileModal.d.ts +0 -2
  495. package/lib/components/MobileModal/MobileModal.styles.d.ts +0 -10
  496. package/lib/components/MobileModal/MobileModal.types.d.ts +0 -15
  497. package/lib/components/MobileModal/index.d.ts +0 -1
  498. package/lib/components/Modal/Modal.d.ts +0 -6
  499. package/lib/components/Modal/Modal.styles.d.ts +0 -1
  500. package/lib/components/Modal/index.d.ts +0 -1
  501. package/lib/components/ModelCompareV3/CheckWithNote.d.ts +0 -3
  502. package/lib/components/ModelCompareV3/HeaderShadow.d.ts +0 -6
  503. package/lib/components/ModelCompareV3/ModelCompareOverflowScrollButton.d.ts +0 -9
  504. package/lib/components/ModelCompareV3/ModelComparePropertyValueGridItem.d.ts +0 -6
  505. package/lib/components/ModelCompareV3/ModelCompareV3.d.ts +0 -18
  506. package/lib/components/ModelCompareV3/ModelCompareV3.styles.d.ts +0 -43
  507. package/lib/components/ModelCompareV3/ModelCompareV3.types.d.ts +0 -592
  508. package/lib/components/ModelCompareV3/ProductGroupsGrid.d.ts +0 -6
  509. package/lib/components/ModelCompareV3/ScrollGroup/ScrollGroup.d.ts +0 -15
  510. package/lib/components/ModelCompareV3/ScrollGroup/context.d.ts +0 -20
  511. package/lib/components/ModelCompareV3/ScrollGroup/index.d.ts +0 -4
  512. package/lib/components/ModelCompareV3/ScrollGroup/useScrollGroupItem.d.ts +0 -6
  513. package/lib/components/ModelCompareV3/ScrollGroup/useScrollGroupSetScroll.d.ts +0 -7
  514. package/lib/components/ModelCompareV3/ScrollGroup/useScrollGroupTo.d.ts +0 -9
  515. package/lib/components/ModelCompareV3/StickyGrid/StickyGrid.d.ts +0 -6
  516. package/lib/components/ModelCompareV3/StickyGrid/StickyGridBody.d.ts +0 -4
  517. package/lib/components/ModelCompareV3/StickyGrid/StickyGridHeader.d.ts +0 -10
  518. package/lib/components/ModelCompareV3/StickyGrid/StickyGridItem.d.ts +0 -9
  519. package/lib/components/ModelCompareV3/StickyGrid/StickyGridOverlay.d.ts +0 -8
  520. package/lib/components/ModelCompareV3/StickyGrid/context.d.ts +0 -18
  521. package/lib/components/ModelCompareV3/StickyGrid/index.d.ts +0 -5
  522. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/index.d.ts +0 -9
  523. package/lib/components/ModelCompareV3/data/AIThetaLenses.d.ts +0 -2
  524. package/lib/components/ModelCompareV3/data/AccessHubs.d.ts +0 -2
  525. package/lib/components/ModelCompareV3/data/AirFiber.d.ts +0 -2
  526. package/lib/components/ModelCompareV3/data/AirMax24.d.ts +0 -2
  527. package/lib/components/ModelCompareV3/data/Antenna.d.ts +0 -2
  528. package/lib/components/ModelCompareV3/data/BaseStation.d.ts +0 -2
  529. package/lib/components/ModelCompareV3/data/BuildingBridge.d.ts +0 -2
  530. package/lib/components/ModelCompareV3/data/Bullet.d.ts +0 -2
  531. package/lib/components/ModelCompareV3/data/CameraSecurity.d.ts +0 -2
  532. package/lib/components/ModelCompareV3/data/Client.d.ts +0 -2
  533. package/lib/components/ModelCompareV3/data/CloudGateways.d.ts +0 -2
  534. package/lib/components/ModelCompareV3/data/CloudGatewaysCompact.d.ts +0 -2
  535. package/lib/components/ModelCompareV3/data/CloudKey.d.ts +0 -2
  536. package/lib/components/ModelCompareV3/data/Compact.d.ts +0 -2
  537. package/lib/components/ModelCompareV3/data/DeviceBridge.d.ts +0 -2
  538. package/lib/components/ModelCompareV3/data/Dome.d.ts +0 -2
  539. package/lib/components/ModelCompareV3/data/DreamMachineConsole.d.ts +0 -2
  540. package/lib/components/ModelCompareV3/data/EdgeMaxRouting.d.ts +0 -2
  541. package/lib/components/ModelCompareV3/data/EdgeMaxSwitching.d.ts +0 -2
  542. package/lib/components/ModelCompareV3/data/EnterpriseSwitching.d.ts +0 -2
  543. package/lib/components/ModelCompareV3/data/EvStations.d.ts +0 -2
  544. package/lib/components/ModelCompareV3/data/Fiber.d.ts +0 -2
  545. package/lib/components/ModelCompareV3/data/Flagship.d.ts +0 -2
  546. package/lib/components/ModelCompareV3/data/Gateway.d.ts +0 -2
  547. package/lib/components/ModelCompareV3/data/Gpon.d.ts +0 -2
  548. package/lib/components/ModelCompareV3/data/InternetBackup.d.ts +0 -2
  549. package/lib/components/ModelCompareV3/data/LTU.d.ts +0 -2
  550. package/lib/components/ModelCompareV3/data/MobileRouters.d.ts +0 -2
  551. package/lib/components/ModelCompareV3/data/Nano.d.ts +0 -2
  552. package/lib/components/ModelCompareV3/data/OmniAntenna.d.ts +0 -2
  553. package/lib/components/ModelCompareV3/data/PhoneSystem.d.ts +0 -2
  554. package/lib/components/ModelCompareV3/data/Prism.d.ts +0 -2
  555. package/lib/components/ModelCompareV3/data/ProfessionalAV.d.ts +0 -2
  556. package/lib/components/ModelCompareV3/data/ProfessionalMaxSwitching.d.ts +0 -2
  557. package/lib/components/ModelCompareV3/data/ProfessionalSwitching.d.ts +0 -2
  558. package/lib/components/ModelCompareV3/data/Readers.d.ts +0 -2
  559. package/lib/components/ModelCompareV3/data/SectorAntenna.d.ts +0 -2
  560. package/lib/components/ModelCompareV3/data/StandardSwitching.d.ts +0 -2
  561. package/lib/components/ModelCompareV3/data/StarterKit.d.ts +0 -2
  562. package/lib/components/ModelCompareV3/data/Switching.d.ts +0 -2
  563. package/lib/components/ModelCompareV3/data/UispPower.d.ts +0 -2
  564. package/lib/components/ModelCompareV3/data/UispRouting.d.ts +0 -2
  565. package/lib/components/ModelCompareV3/data/UtilitySwitching.d.ts +0 -2
  566. package/lib/components/ModelCompareV3/data/VideoRecorders.d.ts +0 -2
  567. package/lib/components/ModelCompareV3/data/Wall.d.ts +0 -2
  568. package/lib/components/ModelCompareV3/data/WaveMLO.d.ts +0 -2
  569. package/lib/components/ModelCompareV3/data/WifiOutdoor.d.ts +0 -2
  570. package/lib/components/ModelCompareV3/data/Wired.d.ts +0 -2
  571. package/lib/components/ModelCompareV3/data/XgsPon.d.ts +0 -2
  572. package/lib/components/ModelCompareV3/data/index.d.ts +0 -53
  573. package/lib/components/ModelCompareV3/data/product-groups/Bullet.d.ts +0 -2
  574. package/lib/components/ModelCompareV3/data/product-groups/Compact.d.ts +0 -2
  575. package/lib/components/ModelCompareV3/data/product-groups/DomeTurret.d.ts +0 -2
  576. package/lib/components/ModelCompareV3/data/product-groups/InteriorDesign.d.ts +0 -2
  577. package/lib/components/ModelCompareV3/data/product-groups/Ptz.d.ts +0 -2
  578. package/lib/components/ModelCompareV3/data/products/8PoEGen1.d.ts +0 -2
  579. package/lib/components/ModelCompareV3/data/products/8PoESFPGen1.d.ts +0 -2
  580. package/lib/components/ModelCompareV3/data/products/Power.d.ts +0 -2
  581. package/lib/components/ModelCompareV3/data/products/PowerPro.d.ts +0 -2
  582. package/lib/components/ModelCompareV3/data/products/UispRouter.d.ts +0 -2
  583. package/lib/components/ModelCompareV3/data/products/UispRouterPro.d.ts +0 -2
  584. package/lib/components/ModelCompareV3/data/products/acInWall.d.ts +0 -2
  585. package/lib/components/ModelCompareV3/data/products/acMesh.d.ts +0 -2
  586. package/lib/components/ModelCompareV3/data/products/acMeshProfessional.d.ts +0 -2
  587. package/lib/components/ModelCompareV3/data/products/accessHub.d.ts +0 -2
  588. package/lib/components/ModelCompareV3/data/products/aggregation.d.ts +0 -2
  589. package/lib/components/ModelCompareV3/data/products/ai360.d.ts +0 -2
  590. package/lib/components/ModelCompareV3/data/products/aiBullet.d.ts +0 -2
  591. package/lib/components/ModelCompareV3/data/products/aiDslr.d.ts +0 -2
  592. package/lib/components/ModelCompareV3/data/products/aiPro.d.ts +0 -2
  593. package/lib/components/ModelCompareV3/data/products/airFiber11.d.ts +0 -2
  594. package/lib/components/ModelCompareV3/data/products/airFiber24.d.ts +0 -2
  595. package/lib/components/ModelCompareV3/data/products/airFiber24HiDensity.d.ts +0 -2
  596. package/lib/components/ModelCompareV3/data/products/airFiber2X.d.ts +0 -2
  597. package/lib/components/ModelCompareV3/data/products/airFiber37dBiMonsterDish.d.ts +0 -2
  598. package/lib/components/ModelCompareV3/data/products/airFiber5.d.ts +0 -2
  599. package/lib/components/ModelCompareV3/data/products/airFiber5XHD.d.ts +0 -2
  600. package/lib/components/ModelCompareV3/data/products/airFiber60HD.d.ts +0 -2
  601. package/lib/components/ModelCompareV3/data/products/airFiber60LongRange.d.ts +0 -2
  602. package/lib/components/ModelCompareV3/data/products/airFiber60XG.d.ts +0 -2
  603. package/lib/components/ModelCompareV3/data/products/airFiber60XTremeRange.d.ts +0 -2
  604. package/lib/components/ModelCompareV3/data/products/airFiberX23dBiSlant45.d.ts +0 -2
  605. package/lib/components/ModelCompareV3/data/products/airFiberX24dBiSlant45.d.ts +0 -2
  606. package/lib/components/ModelCompareV3/data/products/airFiberX30dBiSlant45.d.ts +0 -2
  607. package/lib/components/ModelCompareV3/data/products/airFiberX34dBiSlant45.d.ts +0 -2
  608. package/lib/components/ModelCompareV3/data/products/airMAX24GHz10dBiOmni.d.ts +0 -2
  609. package/lib/components/ModelCompareV3/data/products/airMAX24GHz13dBiOmni.d.ts +0 -2
  610. package/lib/components/ModelCompareV3/data/products/airMAX24GHz15dBi120Sector.d.ts +0 -2
  611. package/lib/components/ModelCompareV3/data/products/airMAX24GHz16dBi90Sector.d.ts +0 -2
  612. package/lib/components/ModelCompareV3/data/products/airMAX30dBiRocketDishLW.d.ts +0 -2
  613. package/lib/components/ModelCompareV3/data/products/airMAX5GHz10dBiOmni.d.ts +0 -2
  614. package/lib/components/ModelCompareV3/data/products/airMAX5GHz13dBiOmni.d.ts +0 -2
  615. package/lib/components/ModelCompareV3/data/products/airMAX5GHz16dBi120Sector.d.ts +0 -2
  616. package/lib/components/ModelCompareV3/data/products/airMAX5GHz17dBi90Sector.d.ts +0 -2
  617. package/lib/components/ModelCompareV3/data/products/airMAX5GHz19dBi120Sector.d.ts +0 -2
  618. package/lib/components/ModelCompareV3/data/products/airMAX5GHz20dBi90Sector.d.ts +0 -2
  619. package/lib/components/ModelCompareV3/data/products/airMAX900MHz13dBi120Sector.d.ts +0 -2
  620. package/lib/components/ModelCompareV3/data/products/airMAXAC30dBiRocketDish.d.ts +0 -2
  621. package/lib/components/ModelCompareV3/data/products/airMAXAC31dBiRocketDish.d.ts +0 -2
  622. package/lib/components/ModelCompareV3/data/products/airMAXAC34dBiRocketDish.d.ts +0 -2
  623. package/lib/components/ModelCompareV3/data/products/airMAXAC5GHz21dBi60Sector.d.ts +0 -2
  624. package/lib/components/ModelCompareV3/data/products/airMAXAC5GHz22dBi45Sector.d.ts +0 -2
  625. package/lib/components/ModelCompareV3/data/products/airMAXSector24GHzTitanium.d.ts +0 -2
  626. package/lib/components/ModelCompareV3/data/products/airMAXSector5GHzTitanium.d.ts +0 -11
  627. package/lib/components/ModelCompareV3/data/products/airMaxGigaBeam.d.ts +0 -2
  628. package/lib/components/ModelCompareV3/data/products/airMaxGigaBeamLongRange.d.ts +0 -2
  629. package/lib/components/ModelCompareV3/data/products/airMaxGigaBeamPlus.d.ts +0 -2
  630. package/lib/components/ModelCompareV3/data/products/airPRISM3x30HDSector.d.ts +0 -2
  631. package/lib/components/ModelCompareV3/data/products/buildingBridge.d.ts +0 -2
  632. package/lib/components/ModelCompareV3/data/products/buildingBridgeXG.d.ts +0 -2
  633. package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.d.ts +0 -2
  634. package/lib/components/ModelCompareV3/data/products/cloudKeyG2Plus.d.ts +0 -2
  635. package/lib/components/ModelCompareV3/data/products/cloudKeyG2PlusNvr.d.ts +0 -2
  636. package/lib/components/ModelCompareV3/data/products/connectDisplay.d.ts +0 -2
  637. package/lib/components/ModelCompareV3/data/products/edgePointR6.d.ts +0 -2
  638. package/lib/components/ModelCompareV3/data/products/edgePointR8.d.ts +0 -2
  639. package/lib/components/ModelCompareV3/data/products/edgePointS16.d.ts +0 -2
  640. package/lib/components/ModelCompareV3/data/products/edgePointS16Switch.d.ts +0 -2
  641. package/lib/components/ModelCompareV3/data/products/edgeRouter10x.d.ts +0 -2
  642. package/lib/components/ModelCompareV3/data/products/edgeRouter12.d.ts +0 -2
  643. package/lib/components/ModelCompareV3/data/products/edgeRouter12p.d.ts +0 -2
  644. package/lib/components/ModelCompareV3/data/products/edgeRouter4.d.ts +0 -2
  645. package/lib/components/ModelCompareV3/data/products/edgeRouter6Poe.d.ts +0 -2
  646. package/lib/components/ModelCompareV3/data/products/edgeRouterInfinity.d.ts +0 -2
  647. package/lib/components/ModelCompareV3/data/products/edgeRouterX.d.ts +0 -2
  648. package/lib/components/ModelCompareV3/data/products/edgeRouterXSfp.d.ts +0 -2
  649. package/lib/components/ModelCompareV3/data/products/edgeSwitch10x.d.ts +0 -2
  650. package/lib/components/ModelCompareV3/data/products/edgeSwitch10xp.d.ts +0 -2
  651. package/lib/components/ModelCompareV3/data/products/edgeSwitch12f.d.ts +0 -2
  652. package/lib/components/ModelCompareV3/data/products/edgeSwitch16xg.d.ts +0 -2
  653. package/lib/components/ModelCompareV3/data/products/edgeSwitch16xp.d.ts +0 -2
  654. package/lib/components/ModelCompareV3/data/products/edgeSwitch16xpoe150.d.ts +0 -2
  655. package/lib/components/ModelCompareV3/data/products/edgeSwitch18x.d.ts +0 -2
  656. package/lib/components/ModelCompareV3/data/products/edgeSwitch24lite.d.ts +0 -2
  657. package/lib/components/ModelCompareV3/data/products/edgeSwitch24poe-500.d.ts +0 -2
  658. package/lib/components/ModelCompareV3/data/products/edgeSwitch24poe.d.ts +0 -2
  659. package/lib/components/ModelCompareV3/data/products/edgeSwitch48lite.d.ts +0 -2
  660. package/lib/components/ModelCompareV3/data/products/edgeSwitch48poe.d.ts +0 -2
  661. package/lib/components/ModelCompareV3/data/products/edgeswitch48poe-750.d.ts +0 -2
  662. package/lib/components/ModelCompareV3/data/products/edgeswitch5xp.d.ts +0 -2
  663. package/lib/components/ModelCompareV3/data/products/edgeswitch8poe.d.ts +0 -2
  664. package/lib/components/ModelCompareV3/data/products/efg.d.ts +0 -2
  665. package/lib/components/ModelCompareV3/data/products/elevatorHub.d.ts +0 -2
  666. package/lib/components/ModelCompareV3/data/products/elevatorStarterKit.d.ts +0 -2
  667. package/lib/components/ModelCompareV3/data/products/enterprise24PoE.d.ts +0 -2
  668. package/lib/components/ModelCompareV3/data/products/enterprise48PoE.d.ts +0 -2
  669. package/lib/components/ModelCompareV3/data/products/enterprise8PoE.d.ts +0 -2
  670. package/lib/components/ModelCompareV3/data/products/enterpriseAccessHub.d.ts +0 -2
  671. package/lib/components/ModelCompareV3/data/products/enterpriseAggregation.d.ts +0 -2
  672. package/lib/components/ModelCompareV3/data/products/enterpriseCampus24.d.ts +0 -6
  673. package/lib/components/ModelCompareV3/data/products/enterpriseCampus24PoE.d.ts +0 -2
  674. package/lib/components/ModelCompareV3/data/products/enterpriseCampus48.d.ts +0 -6
  675. package/lib/components/ModelCompareV3/data/products/enterpriseCampus48PoE.d.ts +0 -2
  676. package/lib/components/ModelCompareV3/data/products/enterpriseXG24.d.ts +0 -2
  677. package/lib/components/ModelCompareV3/data/products/envr.d.ts +0 -2
  678. package/lib/components/ModelCompareV3/data/products/evStationLite.d.ts +0 -2
  679. package/lib/components/ModelCompareV3/data/products/evStationPro.d.ts +0 -2
  680. package/lib/components/ModelCompareV3/data/products/express.d.ts +0 -2
  681. package/lib/components/ModelCompareV3/data/products/fiberInstant.d.ts +0 -2
  682. package/lib/components/ModelCompareV3/data/products/fiberLoco.d.ts +0 -2
  683. package/lib/components/ModelCompareV3/data/products/fiberNanog.d.ts +0 -2
  684. package/lib/components/ModelCompareV3/data/products/fiberOltXgs.d.ts +0 -2
  685. package/lib/components/ModelCompareV3/data/products/fiberWifi.d.ts +0 -2
  686. package/lib/components/ModelCompareV3/data/products/fiberWifi6.d.ts +0 -2
  687. package/lib/components/ModelCompareV3/data/products/fiberXG.d.ts +0 -2
  688. package/lib/components/ModelCompareV3/data/products/fiberXGS.d.ts +0 -2
  689. package/lib/components/ModelCompareV3/data/products/flex.d.ts +0 -2
  690. package/lib/components/ModelCompareV3/data/products/flex10GbE.d.ts +0 -2
  691. package/lib/components/ModelCompareV3/data/products/flexMini.d.ts +0 -2
  692. package/lib/components/ModelCompareV3/data/products/flexMini2_5G.d.ts +0 -2
  693. package/lib/components/ModelCompareV3/data/products/g2Reader.d.ts +0 -2
  694. package/lib/components/ModelCompareV3/data/products/g2ReaderPro.d.ts +0 -2
  695. package/lib/components/ModelCompareV3/data/products/g2StarterKit.d.ts +0 -2
  696. package/lib/components/ModelCompareV3/data/products/g2StarterKitPro.d.ts +0 -2
  697. package/lib/components/ModelCompareV3/data/products/g4Instant.d.ts +0 -2
  698. package/lib/components/ModelCompareV3/data/products/g4Ptz.d.ts +0 -2
  699. package/lib/components/ModelCompareV3/data/products/g5Bullet.d.ts +0 -2
  700. package/lib/components/ModelCompareV3/data/products/g5Dome.d.ts +0 -2
  701. package/lib/components/ModelCompareV3/data/products/g5DomeUltra.d.ts +0 -2
  702. package/lib/components/ModelCompareV3/data/products/g5Flex.d.ts +0 -2
  703. package/lib/components/ModelCompareV3/data/products/g5Pro.d.ts +0 -2
  704. package/lib/components/ModelCompareV3/data/products/g5Ptz.d.ts +0 -2
  705. package/lib/components/ModelCompareV3/data/products/g5TurretUltra.d.ts +0 -2
  706. package/lib/components/ModelCompareV3/data/products/gateAccessStarterKit.d.ts +0 -2
  707. package/lib/components/ModelCompareV3/data/products/gateHub.d.ts +0 -2
  708. package/lib/components/ModelCompareV3/data/products/gatewayEnterprise.d.ts +0 -2
  709. package/lib/components/ModelCompareV3/data/products/gatewayLite.d.ts +0 -2
  710. package/lib/components/ModelCompareV3/data/products/gatewayMax.d.ts +0 -2
  711. package/lib/components/ModelCompareV3/data/products/gatewayProfessional.d.ts +0 -2
  712. package/lib/components/ModelCompareV3/data/products/gponOlt.d.ts +0 -2
  713. package/lib/components/ModelCompareV3/data/products/highCapacityAggregation.d.ts +0 -2
  714. package/lib/components/ModelCompareV3/data/products/industrial.d.ts +0 -2
  715. package/lib/components/ModelCompareV3/data/products/lite16PoE.d.ts +0 -2
  716. package/lib/components/ModelCompareV3/data/products/lite8PoE.d.ts +0 -2
  717. package/lib/components/ModelCompareV3/data/products/liteAPGPS.d.ts +0 -2
  718. package/lib/components/ModelCompareV3/data/products/liteBeam5AC.d.ts +0 -2
  719. package/lib/components/ModelCompareV3/data/products/liteBeam5ACExtremeRange.d.ts +0 -2
  720. package/lib/components/ModelCompareV3/data/products/liteBeam5ACLongRange.d.ts +0 -2
  721. package/lib/components/ModelCompareV3/data/products/liteBeamM5.d.ts +0 -2
  722. package/lib/components/ModelCompareV3/data/products/lteBackup.d.ts +0 -2
  723. package/lib/components/ModelCompareV3/data/products/lteBackupProfessional.d.ts +0 -2
  724. package/lib/components/ModelCompareV3/data/products/ltuExtremeRange.d.ts +0 -2
  725. package/lib/components/ModelCompareV3/data/products/ltuInstant.d.ts +0 -2
  726. package/lib/components/ModelCompareV3/data/products/ltuLite.d.ts +0 -2
  727. package/lib/components/ModelCompareV3/data/products/ltuLongRange.d.ts +0 -2
  728. package/lib/components/ModelCompareV3/data/products/ltuPro.d.ts +0 -2
  729. package/lib/components/ModelCompareV3/data/products/missionCritical.d.ts +0 -2
  730. package/lib/components/ModelCompareV3/data/products/nanoBeam2AC.d.ts +0 -2
  731. package/lib/components/ModelCompareV3/data/products/nanoBeam5AC.d.ts +0 -2
  732. package/lib/components/ModelCompareV3/data/products/nanoStation5AC.d.ts +0 -2
  733. package/lib/components/ModelCompareV3/data/products/nanoStation5ACLoco.d.ts +0 -2
  734. package/lib/components/ModelCompareV3/data/products/nvr.d.ts +0 -2
  735. package/lib/components/ModelCompareV3/data/products/nvrPro.d.ts +0 -2
  736. package/lib/components/ModelCompareV3/data/products/officialUniFiHosting.d.ts +0 -2
  737. package/lib/components/ModelCompareV3/data/products/phoneTouch.d.ts +0 -2
  738. package/lib/components/ModelCompareV3/data/products/phoneTouchMax.d.ts +0 -2
  739. package/lib/components/ModelCompareV3/data/products/powerBeam2AC400.d.ts +0 -2
  740. package/lib/components/ModelCompareV3/data/products/powerBeam5AC.d.ts +0 -2
  741. package/lib/components/ModelCompareV3/data/products/powerBeam5AC620.d.ts +0 -2
  742. package/lib/components/ModelCompareV3/data/products/powerBeam5ACISO.d.ts +0 -2
  743. package/lib/components/ModelCompareV3/data/products/prismStation5AC.d.ts +0 -2
  744. package/lib/components/ModelCompareV3/data/products/professional24.d.ts +0 -2
  745. package/lib/components/ModelCompareV3/data/products/professional24PoE.d.ts +0 -2
  746. package/lib/components/ModelCompareV3/data/products/professional48.d.ts +0 -2
  747. package/lib/components/ModelCompareV3/data/products/professional48PoE.d.ts +0 -2
  748. package/lib/components/ModelCompareV3/data/products/professional8PoE.d.ts +0 -2
  749. package/lib/components/ModelCompareV3/data/products/professionalMax16.d.ts +0 -2
  750. package/lib/components/ModelCompareV3/data/products/professionalMax16PoE.d.ts +0 -2
  751. package/lib/components/ModelCompareV3/data/products/professionalMax24.d.ts +0 -2
  752. package/lib/components/ModelCompareV3/data/products/professionalMax24PoE.d.ts +0 -2
  753. package/lib/components/ModelCompareV3/data/products/professionalMax48.d.ts +0 -2
  754. package/lib/components/ModelCompareV3/data/products/professionalMax48PoE.d.ts +0 -2
  755. package/lib/components/ModelCompareV3/data/products/readerLite.d.ts +0 -2
  756. package/lib/components/ModelCompareV3/data/products/rocketACLite.d.ts +0 -2
  757. package/lib/components/ModelCompareV3/data/products/rocketPrism5AC.d.ts +0 -2
  758. package/lib/components/ModelCompareV3/data/products/standard16PoE.d.ts +0 -2
  759. package/lib/components/ModelCompareV3/data/products/standard16PoEGen1.d.ts +0 -2
  760. package/lib/components/ModelCompareV3/data/products/standard24.d.ts +0 -2
  761. package/lib/components/ModelCompareV3/data/products/standard24PoE.d.ts +0 -2
  762. package/lib/components/ModelCompareV3/data/products/standard24PoEGen1.d.ts +0 -2
  763. package/lib/components/ModelCompareV3/data/products/standard48.d.ts +0 -2
  764. package/lib/components/ModelCompareV3/data/products/standard48PoE.d.ts +0 -2
  765. package/lib/components/ModelCompareV3/data/products/standard48PoEGen1.d.ts +0 -2
  766. package/lib/components/ModelCompareV3/data/products/swissArmyKnifeUltra.d.ts +0 -2
  767. package/lib/components/ModelCompareV3/data/products/switchUltra.d.ts +0 -2
  768. package/lib/components/ModelCompareV3/data/products/switchesEnterprise.d.ts +0 -2
  769. package/lib/components/ModelCompareV3/data/products/switchesProfessional.d.ts +0 -2
  770. package/lib/components/ModelCompareV3/data/products/switchesProfessionalMax.d.ts +0 -2
  771. package/lib/components/ModelCompareV3/data/products/switchesStandard.d.ts +0 -2
  772. package/lib/components/ModelCompareV3/data/products/switchesUtility.d.ts +0 -2
  773. package/lib/components/ModelCompareV3/data/products/theta.d.ts +0 -2
  774. package/lib/components/ModelCompareV3/data/products/theta360.d.ts +0 -2
  775. package/lib/components/ModelCompareV3/data/products/thetaAILongDistance.d.ts +0 -2
  776. package/lib/components/ModelCompareV3/data/products/thetaPro.d.ts +0 -2
  777. package/lib/components/ModelCompareV3/data/products/thetaPro360.d.ts +0 -2
  778. package/lib/components/ModelCompareV3/data/products/thetaProLongDistance.d.ts +0 -2
  779. package/lib/components/ModelCompareV3/data/products/thetaProWideAngle.d.ts +0 -2
  780. package/lib/components/ModelCompareV3/data/products/thetaWideAngle.d.ts +0 -2
  781. package/lib/components/ModelCompareV3/data/products/u6EnterpriseInWall.d.ts +0 -2
  782. package/lib/components/ModelCompareV3/data/products/u6Extender.d.ts +0 -2
  783. package/lib/components/ModelCompareV3/data/products/u6InWall.d.ts +0 -2
  784. package/lib/components/ModelCompareV3/data/products/u6Mesh.d.ts +0 -2
  785. package/lib/components/ModelCompareV3/data/products/u6MeshPro.d.ts +0 -2
  786. package/lib/components/ModelCompareV3/data/products/u6enterprise.d.ts +0 -2
  787. package/lib/components/ModelCompareV3/data/products/u6lite.d.ts +0 -2
  788. package/lib/components/ModelCompareV3/data/products/u6lr.d.ts +0 -2
  789. package/lib/components/ModelCompareV3/data/products/u6plus.d.ts +0 -2
  790. package/lib/components/ModelCompareV3/data/products/u6pro.d.ts +0 -2
  791. package/lib/components/ModelCompareV3/data/products/u7ProWall.d.ts +0 -2
  792. package/lib/components/ModelCompareV3/data/products/u7outdoor.d.ts +0 -2
  793. package/lib/components/ModelCompareV3/data/products/u7pro.d.ts +0 -2
  794. package/lib/components/ModelCompareV3/data/products/u7proMax.d.ts +0 -2
  795. package/lib/components/ModelCompareV3/data/products/uaUltra.d.ts +0 -2
  796. package/lib/components/ModelCompareV3/data/products/ucCast.d.ts +0 -2
  797. package/lib/components/ModelCompareV3/data/products/ucCastPro.d.ts +0 -2
  798. package/lib/components/ModelCompareV3/data/products/ucgMax.d.ts +0 -2
  799. package/lib/components/ModelCompareV3/data/products/ucgUltra.d.ts +0 -2
  800. package/lib/components/ModelCompareV3/data/products/udb.d.ts +0 -2
  801. package/lib/components/ModelCompareV3/data/products/udbPro.d.ts +0 -2
  802. package/lib/components/ModelCompareV3/data/products/udmPro.d.ts +0 -2
  803. package/lib/components/ModelCompareV3/data/products/udmProMax.d.ts +0 -2
  804. package/lib/components/ModelCompareV3/data/products/udmProSpecial.d.ts +0 -2
  805. package/lib/components/ModelCompareV3/data/products/udr.d.ts +0 -2
  806. package/lib/components/ModelCompareV3/data/products/udw.d.ts +0 -2
  807. package/lib/components/ModelCompareV3/data/products/uispDish.d.ts +0 -2
  808. package/lib/components/ModelCompareV3/data/products/uispHorn.d.ts +0 -2
  809. package/lib/components/ModelCompareV3/data/products/uispSwitch.d.ts +0 -2
  810. package/lib/components/ModelCompareV3/data/products/uispSwitchPlus.d.ts +0 -2
  811. package/lib/components/ModelCompareV3/data/products/uispSwitchPro.d.ts +0 -2
  812. package/lib/components/ModelCompareV3/data/products/umr.d.ts +0 -2
  813. package/lib/components/ModelCompareV3/data/products/umrIndustrial.d.ts +0 -2
  814. package/lib/components/ModelCompareV3/data/products/umrUltra.d.ts +0 -2
  815. package/lib/components/ModelCompareV3/data/products/waveAp.d.ts +0 -2
  816. package/lib/components/ModelCompareV3/data/products/waveApGen2.d.ts +0 -2
  817. package/lib/components/ModelCompareV3/data/products/waveApMicro.d.ts +0 -2
  818. package/lib/components/ModelCompareV3/data/products/waveFiberOlt.d.ts +0 -2
  819. package/lib/components/ModelCompareV3/data/products/waveFiberOnu.d.ts +0 -2
  820. package/lib/components/ModelCompareV3/data/products/waveLongRange.d.ts +0 -2
  821. package/lib/components/ModelCompareV3/data/products/waveMLO5.d.ts +0 -2
  822. package/lib/components/ModelCompareV3/data/products/waveMLO6.d.ts +0 -2
  823. package/lib/components/ModelCompareV3/data/products/waveNano.d.ts +0 -2
  824. package/lib/components/ModelCompareV3/data/products/wavePico.d.ts +0 -2
  825. package/lib/components/ModelCompareV3/data/products/wavePro.d.ts +0 -2
  826. package/lib/components/ModelCompareV3/data/products/xg6PoEGen1.d.ts +0 -2
  827. package/lib/components/ModelCompareV3/data/products/xgsxg.d.ts +0 -2
  828. package/lib/components/ModelCompareV3/data/properties/accessPowerMethod.d.ts +0 -2
  829. package/lib/components/ModelCompareV3/data/properties/alignment.d.ts +0 -2
  830. package/lib/components/ModelCompareV3/data/properties/androidAppMode.d.ts +0 -2
  831. package/lib/components/ModelCompareV3/data/properties/antennaGain.d.ts +0 -2
  832. package/lib/components/ModelCompareV3/data/properties/antennaType.d.ts +0 -2
  833. package/lib/components/ModelCompareV3/data/properties/aux.d.ts +0 -2
  834. package/lib/components/ModelCompareV3/data/properties/availability.d.ts +0 -2
  835. package/lib/components/ModelCompareV3/data/properties/backupRadio.d.ts +0 -2
  836. package/lib/components/ModelCompareV3/data/properties/batteryFull.d.ts +0 -2
  837. package/lib/components/ModelCompareV3/data/properties/bluetoothSupport.d.ts +0 -2
  838. package/lib/components/ModelCompareV3/data/properties/bridge.d.ts +0 -2
  839. package/lib/components/ModelCompareV3/data/properties/builtin128GbSsd.d.ts +0 -2
  840. package/lib/components/ModelCompareV3/data/properties/cameraAudio.d.ts +0 -2
  841. package/lib/components/ModelCompareV3/data/properties/cameraReader.d.ts +0 -2
  842. package/lib/components/ModelCompareV3/data/properties/cameraResolution.d.ts +0 -2
  843. package/lib/components/ModelCompareV3/data/properties/carrierSupport.d.ts +0 -2
  844. package/lib/components/ModelCompareV3/data/properties/cellular.d.ts +0 -2
  845. package/lib/components/ModelCompareV3/data/properties/chargingConnector.d.ts +0 -2
  846. package/lib/components/ModelCompareV3/data/properties/clientCapacity.d.ts +0 -2
  847. package/lib/components/ModelCompareV3/data/properties/clientDevices.d.ts +0 -2
  848. package/lib/components/ModelCompareV3/data/properties/connectedDevices.d.ts +0 -2
  849. package/lib/components/ModelCompareV3/data/properties/connectivity.d.ts +0 -2
  850. package/lib/components/ModelCompareV3/data/properties/coverage.d.ts +0 -2
  851. package/lib/components/ModelCompareV3/data/properties/customization.d.ts +0 -2
  852. package/lib/components/ModelCompareV3/data/properties/dataPlan.d.ts +0 -2
  853. package/lib/components/ModelCompareV3/data/properties/dataProtection.d.ts +0 -2
  854. package/lib/components/ModelCompareV3/data/properties/dcPowerOutput.d.ts +0 -2
  855. package/lib/components/ModelCompareV3/data/properties/dedicatedSpectral.d.ts +0 -2
  856. package/lib/components/ModelCompareV3/data/properties/dedicatedSpectralScanningEngine.d.ts +0 -2
  857. package/lib/components/ModelCompareV3/data/properties/dedicatedWiFi.d.ts +0 -2
  858. package/lib/components/ModelCompareV3/data/properties/deployment.d.ts +0 -2
  859. package/lib/components/ModelCompareV3/data/properties/digitalSignageMode.d.ts +0 -2
  860. package/lib/components/ModelCompareV3/data/properties/digitalSignageSupport.d.ts +0 -2
  861. package/lib/components/ModelCompareV3/data/properties/dimensions.d.ts +0 -2
  862. package/lib/components/ModelCompareV3/data/properties/display.d.ts +0 -2
  863. package/lib/components/ModelCompareV3/data/properties/doorAccessSupport.d.ts +0 -2
  864. package/lib/components/ModelCompareV3/data/properties/downlinkSpeed.d.ts +0 -2
  865. package/lib/components/ModelCompareV3/data/properties/driveHotSwap.d.ts +0 -2
  866. package/lib/components/ModelCompareV3/data/properties/dyingGaspSupport.d.ts +0 -2
  867. package/lib/components/ModelCompareV3/data/properties/elevationBeamwidth.d.ts +0 -2
  868. package/lib/components/ModelCompareV3/data/properties/enhancedDetection.d.ts +0 -2
  869. package/lib/components/ModelCompareV3/data/properties/ergonomicHandsetWithMuteButton.d.ts +0 -2
  870. package/lib/components/ModelCompareV3/data/properties/etherlighting.d.ts +0 -2
  871. package/lib/components/ModelCompareV3/data/properties/exit.d.ts +0 -2
  872. package/lib/components/ModelCompareV3/data/properties/externalAntennaSupport.d.ts +0 -2
  873. package/lib/components/ModelCompareV3/data/properties/externalBatterySupport.d.ts +0 -2
  874. package/lib/components/ModelCompareV3/data/properties/fieldOfView.d.ts +0 -2
  875. package/lib/components/ModelCompareV3/data/properties/firewall.d.ts +0 -2
  876. package/lib/components/ModelCompareV3/data/properties/focus.d.ts +0 -2
  877. package/lib/components/ModelCompareV3/data/properties/formFactor.d.ts +0 -2
  878. package/lib/components/ModelCompareV3/data/properties/frequency.d.ts +0 -2
  879. package/lib/components/ModelCompareV3/data/properties/gpsLocationTracking.d.ts +0 -2
  880. package/lib/components/ModelCompareV3/data/properties/greetingMessages.d.ts +0 -2
  881. package/lib/components/ModelCompareV3/data/properties/hand.d.ts +0 -2
  882. package/lib/components/ModelCompareV3/data/properties/hdmiCec.d.ts +0 -2
  883. package/lib/components/ModelCompareV3/data/properties/healthMonitoring.d.ts +0 -2
  884. package/lib/components/ModelCompareV3/data/properties/hubDoor.d.ts +0 -2
  885. package/lib/components/ModelCompareV3/data/properties/identityAppUnlock.d.ts +0 -2
  886. package/lib/components/ModelCompareV3/data/properties/idsIpsThroughput.d.ts +0 -2
  887. package/lib/components/ModelCompareV3/data/properties/includedAccessories.d.ts +0 -2
  888. package/lib/components/ModelCompareV3/data/properties/includedHub.d.ts +0 -2
  889. package/lib/components/ModelCompareV3/data/properties/includedReaders.d.ts +0 -2
  890. package/lib/components/ModelCompareV3/data/properties/index.d.ts +0 -167
  891. package/lib/components/ModelCompareV3/data/properties/inputTerminals.d.ts +0 -2
  892. package/lib/components/ModelCompareV3/data/properties/installation.d.ts +0 -2
  893. package/lib/components/ModelCompareV3/data/properties/integratedBluetooth.d.ts +0 -2
  894. package/lib/components/ModelCompareV3/data/properties/integratedGps.d.ts +0 -2
  895. package/lib/components/ModelCompareV3/data/properties/integratedPoeSwitch.d.ts +0 -2
  896. package/lib/components/ModelCompareV3/data/properties/integratedRadome.d.ts +0 -2
  897. package/lib/components/ModelCompareV3/data/properties/integratedSwitch.d.ts +0 -2
  898. package/lib/components/ModelCompareV3/data/properties/integratedWiFi6.d.ts +0 -2
  899. package/lib/components/ModelCompareV3/data/properties/intercom.d.ts +0 -2
  900. package/lib/components/ModelCompareV3/data/properties/internalBatterySupport.d.ts +0 -2
  901. package/lib/components/ModelCompareV3/data/properties/internalSwitch.d.ts +0 -2
  902. package/lib/components/ModelCompareV3/data/properties/lanPorts.d.ts +0 -2
  903. package/lib/components/ModelCompareV3/data/properties/layerTwoFunctionality.d.ts +0 -2
  904. package/lib/components/ModelCompareV3/data/properties/ledDisplay.d.ts +0 -2
  905. package/lib/components/ModelCompareV3/data/properties/licensePlateRecognition.d.ts +0 -2
  906. package/lib/components/ModelCompareV3/data/properties/linkPuncturing.d.ts +0 -2
  907. package/lib/components/ModelCompareV3/data/properties/linkRange.d.ts +0 -2
  908. package/lib/components/ModelCompareV3/data/properties/managedCameras.d.ts +0 -2
  909. package/lib/components/ModelCompareV3/data/properties/maxChargingOutput.d.ts +0 -2
  910. package/lib/components/ModelCompareV3/data/properties/maxLinkRange.d.ts +0 -2
  911. package/lib/components/ModelCompareV3/data/properties/maxThroughput.d.ts +0 -2
  912. package/lib/components/ModelCompareV3/data/properties/maxTotalThroughput.d.ts +0 -2
  913. package/lib/components/ModelCompareV3/data/properties/maximumRange.d.ts +0 -2
  914. package/lib/components/ModelCompareV3/data/properties/mobileAppAccess.d.ts +0 -2
  915. package/lib/components/ModelCompareV3/data/properties/mobileTap.d.ts +0 -2
  916. package/lib/components/ModelCompareV3/data/properties/mountType.d.ts +0 -2
  917. package/lib/components/ModelCompareV3/data/properties/mounting.d.ts +0 -2
  918. package/lib/components/ModelCompareV3/data/properties/natThroughput.d.ts +0 -2
  919. package/lib/components/ModelCompareV3/data/properties/networkInterface.d.ts +0 -2
  920. package/lib/components/ModelCompareV3/data/properties/networkingInterface.d.ts +0 -2
  921. package/lib/components/ModelCompareV3/data/properties/nextAiInspection.d.ts +0 -2
  922. package/lib/components/ModelCompareV3/data/properties/nfcCard.d.ts +0 -2
  923. package/lib/components/ModelCompareV3/data/properties/nightVision.d.ts +0 -2
  924. package/lib/components/ModelCompareV3/data/properties/nvrHdd35Bay.d.ts +0 -2
  925. package/lib/components/ModelCompareV3/data/properties/nvrPowerBackup.d.ts +0 -2
  926. package/lib/components/ModelCompareV3/data/properties/nvrStacking.d.ts +0 -2
  927. package/lib/components/ModelCompareV3/data/properties/opticalZoom.d.ts +0 -2
  928. package/lib/components/ModelCompareV3/data/properties/outdoorReady.d.ts +0 -2
  929. package/lib/components/ModelCompareV3/data/properties/outputRelays.d.ts +0 -2
  930. package/lib/components/ModelCompareV3/data/properties/paymentTerminalSupport.d.ts +0 -2
  931. package/lib/components/ModelCompareV3/data/properties/pinAccess.d.ts +0 -2
  932. package/lib/components/ModelCompareV3/data/properties/poeAvailability.d.ts +0 -2
  933. package/lib/components/ModelCompareV3/data/properties/poeInput.d.ts +0 -2
  934. package/lib/components/ModelCompareV3/data/properties/poeOutput.d.ts +0 -2
  935. package/lib/components/ModelCompareV3/data/properties/poePlus.d.ts +0 -2
  936. package/lib/components/ModelCompareV3/data/properties/poePlus2.d.ts +0 -2
  937. package/lib/components/ModelCompareV3/data/properties/poePorts.d.ts +0 -2
  938. package/lib/components/ModelCompareV3/data/properties/poeSwitch.d.ts +0 -2
  939. package/lib/components/ModelCompareV3/data/properties/portCount.d.ts +0 -2
  940. package/lib/components/ModelCompareV3/data/properties/ports.d.ts +0 -2
  941. package/lib/components/ModelCompareV3/data/properties/powerLoadBalancing.d.ts +0 -2
  942. package/lib/components/ModelCompareV3/data/properties/powerMethod.d.ts +0 -2
  943. package/lib/components/ModelCompareV3/data/properties/powerMethodPoe.d.ts +0 -2
  944. package/lib/components/ModelCompareV3/data/properties/powerRedundancy.d.ts +0 -2
  945. package/lib/components/ModelCompareV3/data/properties/powerTransportOutput.d.ts +0 -2
  946. package/lib/components/ModelCompareV3/data/properties/pps.d.ts +0 -2
  947. package/lib/components/ModelCompareV3/data/properties/precisionAlignmentMount.d.ts +0 -2
  948. package/lib/components/ModelCompareV3/data/properties/proAvSupport.d.ts +0 -2
  949. package/lib/components/ModelCompareV3/data/properties/radio6Ghz.d.ts +0 -2
  950. package/lib/components/ModelCompareV3/data/properties/radios.d.ts +0 -2
  951. package/lib/components/ModelCompareV3/data/properties/radiusCoverage.d.ts +0 -2
  952. package/lib/components/ModelCompareV3/data/properties/readerPowerMethod.d.ts +0 -2
  953. package/lib/components/ModelCompareV3/data/properties/redundancy.d.ts +0 -2
  954. package/lib/components/ModelCompareV3/data/properties/rejectRF.d.ts +0 -2
  955. package/lib/components/ModelCompareV3/data/properties/screen.d.ts +0 -2
  956. package/lib/components/ModelCompareV3/data/properties/simCard.d.ts +0 -2
  957. package/lib/components/ModelCompareV3/data/properties/smartDetections.d.ts +0 -2
  958. package/lib/components/ModelCompareV3/data/properties/smsLte.d.ts +0 -2
  959. package/lib/components/ModelCompareV3/data/properties/speakerphone.d.ts +0 -2
  960. package/lib/components/ModelCompareV3/data/properties/spectralEfficiency.d.ts +0 -2
  961. package/lib/components/ModelCompareV3/data/properties/stationSecurityModes.d.ts +0 -2
  962. package/lib/components/ModelCompareV3/data/properties/storage.d.ts +0 -2
  963. package/lib/components/ModelCompareV3/data/properties/storageCapacity.d.ts +0 -2
  964. package/lib/components/ModelCompareV3/data/properties/subscriptionLockedAndUnlockedModels.d.ts +0 -2
  965. package/lib/components/ModelCompareV3/data/properties/switchTechnology.d.ts +0 -2
  966. package/lib/components/ModelCompareV3/data/properties/swivelLatency.d.ts +0 -2
  967. package/lib/components/ModelCompareV3/data/properties/swivelPackets.d.ts +0 -2
  968. package/lib/components/ModelCompareV3/data/properties/swivelPowerMethod.d.ts +0 -2
  969. package/lib/components/ModelCompareV3/data/properties/swivelSpectralEfficiency.d.ts +0 -2
  970. package/lib/components/ModelCompareV3/data/properties/tamperResistance.d.ts +0 -2
  971. package/lib/components/ModelCompareV3/data/properties/technology.d.ts +0 -2
  972. package/lib/components/ModelCompareV3/data/properties/throughput.d.ts +0 -2
  973. package/lib/components/ModelCompareV3/data/properties/touchscreen.d.ts +0 -2
  974. package/lib/components/ModelCompareV3/data/properties/touchscreen13inch.d.ts +0 -2
  975. package/lib/components/ModelCompareV3/data/properties/trafficShaping.d.ts +0 -2
  976. package/lib/components/ModelCompareV3/data/properties/uispBox.d.ts +0 -2
  977. package/lib/components/ModelCompareV3/data/properties/uispCoverage.d.ts +0 -2
  978. package/lib/components/ModelCompareV3/data/properties/unifiAppSuite.d.ts +0 -2
  979. package/lib/components/ModelCompareV3/data/properties/unifiDevices.d.ts +0 -2
  980. package/lib/components/ModelCompareV3/data/properties/unifiPowerBackup.d.ts +0 -2
  981. package/lib/components/ModelCompareV3/data/properties/unlock.d.ts +0 -2
  982. package/lib/components/ModelCompareV3/data/properties/uplink.d.ts +0 -2
  983. package/lib/components/ModelCompareV3/data/properties/uplinkSpeed.d.ts +0 -2
  984. package/lib/components/ModelCompareV3/data/properties/upsFunctionality.d.ts +0 -2
  985. package/lib/components/ModelCompareV3/data/properties/usbCPeripheralSupport.d.ts +0 -2
  986. package/lib/components/ModelCompareV3/data/properties/vantagePoint.d.ts +0 -2
  987. package/lib/components/ModelCompareV3/data/properties/videoContentSupport.d.ts +0 -2
  988. package/lib/components/ModelCompareV3/data/properties/wanPorts.d.ts +0 -2
  989. package/lib/components/ModelCompareV3/data/properties/waveTechnology.d.ts +0 -2
  990. package/lib/components/ModelCompareV3/data/properties/webMode.d.ts +0 -2
  991. package/lib/components/ModelCompareV3/data/properties/weight.d.ts +0 -2
  992. package/lib/components/ModelCompareV3/data/properties/wifi.d.ts +0 -2
  993. package/lib/components/ModelCompareV3/data/properties/wifiIntegrated.d.ts +0 -2
  994. package/lib/components/ModelCompareV3/data/properties/wifiMounting.d.ts +0 -2
  995. package/lib/components/ModelCompareV3/data/properties/wifiPowerMethod.d.ts +0 -2
  996. package/lib/components/ModelCompareV3/data/properties/wifiTechnology.d.ts +0 -2
  997. package/lib/components/ModelCompareV3/data/properties/windLoading.d.ts +0 -2
  998. package/lib/components/ModelCompareV3/data/properties/youtubeMode.d.ts +0 -2
  999. package/lib/components/ModelCompareV3/data/property-sets/cameraSecurity.d.ts +0 -1
  1000. package/lib/components/ModelCompareV3/data/property-sets/phoneSystem.d.ts +0 -1
  1001. package/lib/components/ModelCompareV3/data/property-sets/switching.d.ts +0 -1
  1002. package/lib/components/ModelCompareV3/index.d.ts +0 -2
  1003. package/lib/components/ModelCompareV3/translations/index.d.ts +0 -11
  1004. package/lib/components/ModelCompareV3/translations/useModelCompareTranslation.d.ts +0 -6
  1005. package/lib/components/NewToUnifiBox/NewToUnifiBox.d.ts +0 -11
  1006. package/lib/components/NewToUnifiBox/NewToUnifiBox.styles.d.ts +0 -5
  1007. package/lib/components/NewToUnifiBox/index.d.ts +0 -1
  1008. package/lib/components/NormalisedImage/NormalisedImage.d.ts +0 -6
  1009. package/lib/components/NormalisedImage/NormalisedImage.types.d.ts +0 -15
  1010. package/lib/components/NormalisedImage/index.d.ts +0 -2
  1011. package/lib/components/Pagination/Pagination.d.ts +0 -2
  1012. package/lib/components/Pagination/Pagination.styles.d.ts +0 -5
  1013. package/lib/components/Pagination/Pagination.types.d.ts +0 -5
  1014. package/lib/components/Pagination/index.d.ts +0 -2
  1015. package/lib/components/Popover/Popover.d.ts +0 -20
  1016. package/lib/components/Popover/Popover.styles.d.ts +0 -11
  1017. package/lib/components/Popover/Popover.types.d.ts +0 -8
  1018. package/lib/components/Popover/index.d.ts +0 -1
  1019. package/lib/components/PriceRangeSlider/PriceRangeSlider.d.ts +0 -2
  1020. package/lib/components/PriceRangeSlider/PriceRangeSlider.styles.d.ts +0 -7
  1021. package/lib/components/PriceRangeSlider/PriceRangeSlider.types.d.ts +0 -23
  1022. package/lib/components/PriceRangeSlider/index.d.ts +0 -1
  1023. package/lib/components/ProductCard/ProductCard.constants.d.ts +0 -13
  1024. package/lib/components/ProductCard/ProductCard.d.ts +0 -2
  1025. package/lib/components/ProductCard/ProductCard.styles.d.ts +0 -20
  1026. package/lib/components/ProductCard/ProductCard.types.d.ts +0 -9
  1027. package/lib/components/ProductCard/index.d.ts +0 -1
  1028. package/lib/components/ProductCardPopup/ProductCardPopup.d.ts +0 -2
  1029. package/lib/components/ProductCardPopup/ProductCardPopup.styles.d.ts +0 -52
  1030. package/lib/components/ProductCardPopup/ProductCardPopup.types.d.ts +0 -36
  1031. package/lib/components/ProductCardPopup/index.d.ts +0 -1
  1032. package/lib/components/ProductCompare/ProductCompare.constants.d.ts +0 -9
  1033. package/lib/components/ProductCompare/ProductCompare.d.ts +0 -2
  1034. package/lib/components/ProductCompare/ProductCompare.styles.d.ts +0 -20
  1035. package/lib/components/ProductCompare/ProductCompare.types.d.ts +0 -17
  1036. package/lib/components/ProductCompare/ProductCompare.utils.d.ts +0 -2
  1037. package/lib/components/ProductCompare/index.d.ts +0 -1
  1038. package/lib/components/ProductCompare/mapping.d.ts +0 -62
  1039. package/lib/components/ProductCompare/mapping.test.d.ts +0 -1
  1040. package/lib/components/ProductDetails/ProductDetails.d.ts +0 -2
  1041. package/lib/components/ProductDetails/ProductDetails.styles.d.ts +0 -2
  1042. package/lib/components/ProductDetails/ProductDetails.types.d.ts +0 -6
  1043. package/lib/components/ProductDetails/index.d.ts +0 -2
  1044. package/lib/components/ProductGrid/ProductGrid.d.ts +0 -2
  1045. package/lib/components/ProductGrid/ProductGrid.styles.d.ts +0 -13
  1046. package/lib/components/ProductGrid/ProductGrid.types.d.ts +0 -100
  1047. package/lib/components/ProductGrid/index.d.ts +0 -1
  1048. package/lib/components/ProductKeyFeatures/ProductKeyFeatures.d.ts +0 -2
  1049. package/lib/components/ProductKeyFeatures/ProductKeyFeatures.styles.d.ts +0 -7
  1050. package/lib/components/ProductKeyFeatures/ProductKeyFeatures.types.d.ts +0 -19
  1051. package/lib/components/ProductKeyFeatures/index.d.ts +0 -1
  1052. package/lib/components/ProductRecommendedAccessories/ProductRecommendedAccessories.d.ts +0 -2
  1053. package/lib/components/ProductRecommendedAccessories/ProductRecommendedAccessories.styles.d.ts +0 -10
  1054. package/lib/components/ProductRecommendedAccessories/ProductRecommendedAccessories.types.d.ts +0 -17
  1055. package/lib/components/ProductRecommendedAccessories/index.d.ts +0 -1
  1056. package/lib/components/ProductSectionNavigation/ProductSectionNavigation.d.ts +0 -2
  1057. package/lib/components/ProductSectionNavigation/ProductSectionNavigation.styles.d.ts +0 -10
  1058. package/lib/components/ProductSectionNavigation/ProductSectionNavigation.types.d.ts +0 -25
  1059. package/lib/components/ProductSectionNavigation/index.d.ts +0 -1
  1060. package/lib/components/ProductSectionNavigationV2/ProductSectionNavigation.d.ts +0 -2
  1061. package/lib/components/ProductSectionNavigationV2/ProductSectionNavigation.styles.d.ts +0 -10
  1062. package/lib/components/ProductSectionNavigationV2/ProductSectionNavigation.types.d.ts +0 -21
  1063. package/lib/components/ProductSectionNavigationV2/index.d.ts +0 -2
  1064. package/lib/components/ProductSectionTabs/ProductSectionTabs.d.ts +0 -2
  1065. package/lib/components/ProductSectionTabs/ProductSectionTabs.styles.d.ts +0 -16
  1066. package/lib/components/ProductSectionTabs/ProductSectionTabs.types.d.ts +0 -25
  1067. package/lib/components/ProductSectionTabs/index.d.ts +0 -2
  1068. package/lib/components/ProductTechSpecs/ProductTechSpecs.d.ts +0 -6
  1069. package/lib/components/ProductTechSpecs/ProductTechSpecs.styles.d.ts +0 -17
  1070. package/lib/components/ProductTechSpecs/ProductTechSpecs.types.d.ts +0 -13
  1071. package/lib/components/ProductTechSpecs/index.d.ts +0 -2
  1072. package/lib/components/ProductUpsell/ProductUpsell.d.ts +0 -2
  1073. package/lib/components/ProductUpsell/ProductUpsell.styles.d.ts +0 -19
  1074. package/lib/components/ProductUpsell/ProductUpsell.types.d.ts +0 -38
  1075. package/lib/components/ProductUpsell/index.d.ts +0 -1
  1076. package/lib/components/ProductWizard/Options/Options.d.ts +0 -2
  1077. package/lib/components/ProductWizard/Options/Options.styles.d.ts +0 -2
  1078. package/lib/components/ProductWizard/Options/Options.types.d.ts +0 -8
  1079. package/lib/components/ProductWizard/Options/index.d.ts +0 -1
  1080. package/lib/components/ProductWizard/ProductWizard.d.ts +0 -5
  1081. package/lib/components/ProductWizard/ProductWizard.styles.d.ts +0 -23
  1082. package/lib/components/ProductWizard/ProductWizard.types.d.ts +0 -99
  1083. package/lib/components/ProductWizard/index.d.ts +0 -1
  1084. package/lib/components/ProductWizardFootnotes/ProductWizardFootnotes.d.ts +0 -2
  1085. package/lib/components/ProductWizardFootnotes/ProductWizardFootnotes.styles.d.ts +0 -9
  1086. package/lib/components/ProductWizardFootnotes/ProductWizardFootnotes.types.d.ts +0 -7
  1087. package/lib/components/ProductWizardFootnotes/index.d.ts +0 -1
  1088. package/lib/components/ProgressCircle/ProgressCircle.d.ts +0 -2
  1089. package/lib/components/ProgressCircle/ProgressCircle.types.d.ts +0 -9
  1090. package/lib/components/ProgressCircle/index.d.ts +0 -1
  1091. package/lib/components/QuantityControls/QuantityControls.d.ts +0 -2
  1092. package/lib/components/QuantityControls/QuantityControls.styles.d.ts +0 -2
  1093. package/lib/components/QuantityControls/QuantityControls.types.d.ts +0 -11
  1094. package/lib/components/QuantityControls/index.d.ts +0 -1
  1095. package/lib/components/QuantityInput/QuantityInput.d.ts +0 -5
  1096. package/lib/components/QuantityInput/QuantityInput.styles.d.ts +0 -17
  1097. package/lib/components/QuantityInput/QuantityInput.types.d.ts +0 -10
  1098. package/lib/components/QuantityInput/index.d.ts +0 -1
  1099. package/lib/components/RelatedProducts/RelatedProducts.d.ts +0 -10
  1100. package/lib/components/RelatedProducts/RelatedProducts.styles.d.ts +0 -15
  1101. package/lib/components/RelatedProducts/RelatedProducts.types.d.ts +0 -32
  1102. package/lib/components/RelatedProducts/index.d.ts +0 -1
  1103. package/lib/components/RelatedProductsVariantSelector/RelatedProductsVariantSelector.d.ts +0 -11
  1104. package/lib/components/RelatedProductsVariantSelector/RelatedProductsVariantSelector.styles.d.ts +0 -25
  1105. package/lib/components/RelatedProductsVariantSelector/RelatedProductsVariantSelector.types.d.ts +0 -32
  1106. package/lib/components/RelatedProductsVariantSelector/index.d.ts +0 -1
  1107. package/lib/components/RelatedProductsVariantSelectorV1/RelatedProductsVariantSelector.d.ts +0 -13
  1108. package/lib/components/RelatedProductsVariantSelectorV1/RelatedProductsVariantSelector.styles.d.ts +0 -20
  1109. package/lib/components/RelatedProductsVariantSelectorV1/RelatedProductsVariantSelector.types.d.ts +0 -30
  1110. package/lib/components/RelatedProductsVariantSelectorV1/index.d.ts +0 -1
  1111. package/lib/components/RelatedProductsVariantSelectorV2/RelatedProductsVariantSelector.d.ts +0 -13
  1112. package/lib/components/RelatedProductsVariantSelectorV2/RelatedProductsVariantSelector.styles.d.ts +0 -22
  1113. package/lib/components/RelatedProductsVariantSelectorV2/RelatedProductsVariantSelector.types.d.ts +0 -31
  1114. package/lib/components/RelatedProductsVariantSelectorV2/index.d.ts +0 -1
  1115. package/lib/components/RelatedProductsVariantSelectorsV1/RelatedProductsVariantSelectors.d.ts +0 -2
  1116. package/lib/components/RelatedProductsVariantSelectorsV1/RelatedProductsVariantSelectors.types.d.ts +0 -19
  1117. package/lib/components/RelatedProductsVariantSelectorsV1/index.d.ts +0 -1
  1118. package/lib/components/RelatedProductsVariantSelectorsV2/RelatedProductsVariantSelectors.d.ts +0 -2
  1119. package/lib/components/RelatedProductsVariantSelectorsV2/RelatedProductsVariantSelectors.styles.d.ts +0 -1
  1120. package/lib/components/RelatedProductsVariantSelectorsV2/RelatedProductsVariantSelectors.types.d.ts +0 -19
  1121. package/lib/components/RelatedProductsVariantSelectorsV2/index.d.ts +0 -1
  1122. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.d.ts +0 -2
  1123. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.d.ts +0 -2
  1124. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.styles.d.ts +0 -6
  1125. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.d.ts +0 -172
  1126. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.d.ts +0 -2
  1127. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.d.ts +0 -15
  1128. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.types.d.ts +0 -12
  1129. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/index.d.ts +0 -2
  1130. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/HddSlots/HddSlots.d.ts +0 -11
  1131. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/HddSlots/index.d.ts +0 -1
  1132. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.d.ts +0 -2
  1133. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.d.ts +0 -32
  1134. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.types.d.ts +0 -36
  1135. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CheckboxSection.d.ts +0 -9
  1136. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.d.ts +0 -12
  1137. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/Layout.styles.d.ts +0 -7
  1138. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/OptionSelectSection.d.ts +0 -15
  1139. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/SliderSection.d.ts +0 -11
  1140. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/index.d.ts +0 -4
  1141. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/index.d.ts +0 -1
  1142. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/Part.d.ts +0 -3
  1143. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.d.ts +0 -20
  1144. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.styles.d.ts +0 -17
  1145. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.types.d.ts +0 -7
  1146. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/index.d.ts +0 -1
  1147. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/index.d.ts +0 -4
  1148. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/index.d.ts +0 -3
  1149. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.d.ts +0 -7
  1150. package/lib/components/ResourceCalculatorV1/PoeCalculator/PoeCalculator.constants.d.ts +0 -602
  1151. package/lib/components/ResourceCalculatorV1/PoeCalculator/PoeCalculator.d.ts +0 -1
  1152. package/lib/components/ResourceCalculatorV1/PoeCalculator/PoeCalculator.styles.d.ts +0 -1
  1153. package/lib/components/ResourceCalculatorV1/PoeCalculator/PoeCalculator.types.d.ts +0 -119
  1154. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/DesignCenterBanner/DesignCenterBanner.d.ts +0 -1
  1155. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/DesignCenterBanner/DesignCenterBanner.styles.d.ts +0 -5
  1156. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/DesignCenterBanner/index.d.ts +0 -1
  1157. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerConfigurator.d.ts +0 -22
  1158. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerConfigurator.styles.d.ts +0 -13
  1159. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.d.ts +0 -17
  1160. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.styles.d.ts +0 -21
  1161. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/index.d.ts +0 -1
  1162. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PortItem/PortItem.d.ts +0 -8
  1163. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PortItem/index.d.ts +0 -1
  1164. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/index.d.ts +0 -1
  1165. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/RecommendedPoeSwitches.d.ts +0 -15
  1166. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/RecommendedPoeSwitches.styles.d.ts +0 -20
  1167. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/ValueTile.d.ts +0 -6
  1168. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/index.d.ts +0 -1
  1169. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/index.d.ts +0 -3
  1170. package/lib/components/ResourceCalculatorV1/PoeCalculator/index.d.ts +0 -1
  1171. package/lib/components/ResourceCalculatorV1/ResourceCalculator.constants.d.ts +0 -2
  1172. package/lib/components/ResourceCalculatorV1/ResourceCalculator.d.ts +0 -14
  1173. package/lib/components/ResourceCalculatorV1/ResourceCalculator.styles.d.ts +0 -3
  1174. package/lib/components/ResourceCalculatorV1/ResourceCalculator.types.d.ts +0 -20
  1175. package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.d.ts +0 -2
  1176. package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.d.ts +0 -4
  1177. package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.types.d.ts +0 -9
  1178. package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/index.d.ts +0 -2
  1179. package/lib/components/ResourceCalculatorV1/components/index.d.ts +0 -1
  1180. package/lib/components/ResourceCalculatorV1/index.d.ts +0 -2
  1181. package/lib/components/ResourceCalculatorV1/translations/index.d.ts +0 -11
  1182. package/lib/components/ResourceCalculatorV1/translations/useResourceCalculatorTranslation.d.ts +0 -6
  1183. package/lib/components/ReverseLoopingVideo/ReverseLoopingVideo.d.ts +0 -2
  1184. package/lib/components/ReverseLoopingVideo/ReverseLoopingVideo.styles.d.ts +0 -3
  1185. package/lib/components/ReverseLoopingVideo/ReverseLoopingVideo.types.d.ts +0 -5
  1186. package/lib/components/ReverseLoopingVideo/index.d.ts +0 -1
  1187. package/lib/components/ScrollWrapper/ScrollWrapper.d.ts +0 -2
  1188. package/lib/components/ScrollWrapper/ScrollWrapper.styles.d.ts +0 -55
  1189. package/lib/components/ScrollWrapper/ScrollWrapper.types.d.ts +0 -54
  1190. package/lib/components/ScrollWrapper/index.d.ts +0 -1
  1191. package/lib/components/Search/Input/Input.d.ts +0 -2
  1192. package/lib/components/Search/Input/Input.styles.d.ts +0 -24
  1193. package/lib/components/Search/Input/Input.types.d.ts +0 -19
  1194. package/lib/components/Search/Input/index.d.ts +0 -1
  1195. package/lib/components/Search/Modal/Modal.d.ts +0 -2
  1196. package/lib/components/Search/Modal/Modal.styles.d.ts +0 -24
  1197. package/lib/components/Search/Modal/Modal.types.d.ts +0 -15
  1198. package/lib/components/Search/Modal/index.d.ts +0 -1
  1199. package/lib/components/Search/index.d.ts +0 -2
  1200. package/lib/components/SearchInput/Input.styles.d.ts +0 -18
  1201. package/lib/components/SkeletonFootnote/SkeletonFootnote.d.ts +0 -6
  1202. package/lib/components/SkeletonFootnote/index.d.ts +0 -1
  1203. package/lib/components/SkeletonLoader/SkeletonCircleLoader/SkeletonCircleLoader.d.ts +0 -8
  1204. package/lib/components/SkeletonLoader/SkeletonCircleLoader/SkeletonCircleLoader.styles.d.ts +0 -4
  1205. package/lib/components/SkeletonLoader/SkeletonCircleLoader/index.d.ts +0 -1
  1206. package/lib/components/SkeletonLoader/SkeletonLinearLoader/SkeletonLinearLoader.d.ts +0 -9
  1207. package/lib/components/SkeletonLoader/SkeletonLinearLoader/SkeletonLinearLoader.styles.d.ts +0 -5
  1208. package/lib/components/SkeletonLoader/SkeletonLinearLoader/index.d.ts +0 -1
  1209. package/lib/components/SkeletonLoader/SkeletonLoaderTable/SkeletonLoaderTable.d.ts +0 -21
  1210. package/lib/components/SkeletonLoader/SkeletonLoaderTable/SkeletonLoaderTable.styles.d.ts +0 -13
  1211. package/lib/components/SkeletonLoader/SkeletonLoaderTable/index.d.ts +0 -1
  1212. package/lib/components/SkeletonLoader/index.d.ts +0 -3
  1213. package/lib/components/StaticModal/StaticModal.d.ts +0 -8
  1214. package/lib/components/StaticModal/StaticModal.styles.d.ts +0 -6
  1215. package/lib/components/StaticModal/StaticModal.types.d.ts +0 -10
  1216. package/lib/components/StaticModal/index.d.ts +0 -1
  1217. package/lib/components/StorageSliders/Slider/Slider.d.ts +0 -2
  1218. package/lib/components/StorageSliders/Slider/Slider.styles.d.ts +0 -10
  1219. package/lib/components/StorageSliders/Slider/Slider.types.d.ts +0 -5
  1220. package/lib/components/StorageSliders/Slider/index.d.ts +0 -1
  1221. package/lib/components/StorageSliders/StorageSliders.constants.d.ts +0 -19
  1222. package/lib/components/StorageSliders/StorageSliders.context.d.ts +0 -7
  1223. package/lib/components/StorageSliders/StorageSliders.d.ts +0 -2
  1224. package/lib/components/StorageSliders/StorageSliders.styles.d.ts +0 -16
  1225. package/lib/components/StorageSliders/StorageSliders.types.d.ts +0 -25
  1226. package/lib/components/StorageSliders/StorageSliders.utils.d.ts +0 -11
  1227. package/lib/components/StorageSliders/index.d.ts +0 -1
  1228. package/lib/components/StorybookUtils/StoryButtonColumn.d.ts +0 -4
  1229. package/lib/components/StorybookUtils/StoryButtonRow.d.ts +0 -4
  1230. package/lib/components/StorybookUtils/StoryFaker.d.ts +0 -8
  1231. package/lib/components/StorybookUtils/StorySection.d.ts +0 -6
  1232. package/lib/components/StorybookUtils/StoryVariants.d.ts +0 -10
  1233. package/lib/components/StorybookUtils/StoryWrapper.d.ts +0 -6
  1234. package/lib/components/StorybookUtils/index.d.ts +0 -6
  1235. package/lib/components/StyleableSvgImage/StyleableSvgImage.d.ts +0 -14
  1236. package/lib/components/StyleableSvgImage/StyleableSvgImage.types.d.ts +0 -26
  1237. package/lib/components/StyleableSvgImage/index.d.ts +0 -2
  1238. package/lib/components/TabinationButtons/TabinationButtons.d.ts +0 -2
  1239. package/lib/components/TabinationButtons/TabinationButtons.styles.d.ts +0 -13
  1240. package/lib/components/TabinationButtons/TabinationButtons.types.d.ts +0 -22
  1241. package/lib/components/TabinationButtons/index.d.ts +0 -1
  1242. package/lib/components/Toggle/Toggle.d.ts +0 -14
  1243. package/lib/components/Toggle/Toggle.styles.d.ts +0 -4
  1244. package/lib/components/Toggle/index.d.ts +0 -1
  1245. package/lib/components/Tooltip/Tooltip.d.ts +0 -2
  1246. package/lib/components/Tooltip/Tooltip.styles.d.ts +0 -32
  1247. package/lib/components/Tooltip/index.d.ts +0 -1
  1248. package/lib/components/TopologyScheme/TopologyScheme.d.ts +0 -2
  1249. package/lib/components/TopologyScheme/TopologyScheme.styles.d.ts +0 -20
  1250. package/lib/components/TopologyScheme/TopologyScheme.types.d.ts +0 -35
  1251. package/lib/components/TopologyScheme/index.d.ts +0 -2
  1252. package/lib/components/UICare/UICare.d.ts +0 -2
  1253. package/lib/components/UICare/UICare.styles.d.ts +0 -19
  1254. package/lib/components/UICare/UICare.types.d.ts +0 -52
  1255. package/lib/components/UICare/index.d.ts +0 -1
  1256. package/lib/components/VariantSelector/CheckBox/CheckBox.d.ts +0 -6
  1257. package/lib/components/VariantSelector/CheckBox/CheckBox.styles.d.ts +0 -10
  1258. package/lib/components/VariantSelector/CheckBox/index.d.ts +0 -1
  1259. package/lib/components/VariantSelector/Variant/BundleOffer/BundleOffer.d.ts +0 -5
  1260. package/lib/components/VariantSelector/Variant/BundleOffer/BundleOffer.styles.d.ts +0 -7
  1261. package/lib/components/VariantSelector/Variant/BundleOffer/BundleOffer.types.d.ts +0 -6
  1262. package/lib/components/VariantSelector/Variant/BundleOffer/index.d.ts +0 -1
  1263. package/lib/components/VariantSelector/Variant/BundleOffer/translations/index.d.ts +0 -11
  1264. package/lib/components/VariantSelector/Variant/BundleOffer/utils/getBundleOfferQuantity.d.ts +0 -2
  1265. package/lib/components/VariantSelector/Variant/BundleOffer/utils/getBundleOfferQuantity.test.d.ts +0 -1
  1266. package/lib/components/VariantSelector/Variant/Compatibility/Compatibility.d.ts +0 -2
  1267. package/lib/components/VariantSelector/Variant/Compatibility/Compatibility.styles.d.ts +0 -24
  1268. package/lib/components/VariantSelector/Variant/Compatibility/Compatibility.types.d.ts +0 -11
  1269. package/lib/components/VariantSelector/Variant/Compatibility/index.d.ts +0 -1
  1270. package/lib/components/VariantSelector/Variant/Variant.d.ts +0 -2
  1271. package/lib/components/VariantSelector/Variant/Variant.styles.d.ts +0 -77
  1272. package/lib/components/VariantSelector/Variant/Variant.types.d.ts +0 -18
  1273. package/lib/components/VariantSelector/Variant/index.d.ts +0 -1
  1274. package/lib/components/VariantSelector/VariantSelector.constants.d.ts +0 -50
  1275. package/lib/components/VariantSelector/VariantSelector.d.ts +0 -7
  1276. package/lib/components/VariantSelector/VariantSelector.styles.d.ts +0 -16
  1277. package/lib/components/VariantSelector/VariantSelector.types.d.ts +0 -38
  1278. package/lib/components/VariantSelector/index.d.ts +0 -1
  1279. package/lib/components/VariantSelector/utils.d.ts +0 -11
  1280. package/lib/components/VariantSelectorItem/VariantSelectorItem.d.ts +0 -3
  1281. package/lib/components/VariantSelectorItem/VariantSelectorItem.styles.d.ts +0 -4
  1282. package/lib/components/VariantSelectorItem/VariantSelectorItem.types.d.ts +0 -5
  1283. package/lib/components/VariantSelectorItem/index.d.ts +0 -1
  1284. package/lib/components/VariantSelectorV1/VariantSelector.d.ts +0 -2
  1285. package/lib/components/VariantSelectorV1/VariantSelector.styles.d.ts +0 -35
  1286. package/lib/components/VariantSelectorV1/VariantSelector.types.d.ts +0 -66
  1287. package/lib/components/VariantSelectorV1/index.d.ts +0 -1
  1288. package/lib/components/VariantSelectorV2/VariantSelector.d.ts +0 -2
  1289. package/lib/components/VariantSelectorV2/VariantSelector.styles.d.ts +0 -21
  1290. package/lib/components/VariantSelectorV2/VariantSelector.types.d.ts +0 -66
  1291. package/lib/components/VariantSelectorV2/index.d.ts +0 -1
  1292. package/lib/components/VideoCookiesConsent/VideoCookiesConsent.d.ts +0 -7
  1293. package/lib/components/VideoCookiesConsent/VideoCookiesConsent.styles.d.ts +0 -7
  1294. package/lib/components/VideoCookiesConsent/index.d.ts +0 -1
  1295. package/lib/components/VideoPlayer/VideoPlayer.d.ts +0 -8
  1296. package/lib/components/VideoPlayer/VideoPlayer.styles.d.ts +0 -7
  1297. package/lib/components/VideoPlayer/index.d.ts +0 -1
  1298. package/lib/components/VideoPlayerNew/VideoPlayer.d.ts +0 -2
  1299. package/lib/components/VideoPlayerNew/VideoPlayer.styles.d.ts +0 -35
  1300. package/lib/components/VideoPlayerNew/VideoPlayer.types.d.ts +0 -14
  1301. package/lib/components/VideoPlayerNew/index.d.ts +0 -1
  1302. package/lib/components/YouTubePlayer/YouTubePlayer.d.ts +0 -2
  1303. package/lib/components/YouTubePlayer/YouTubePlayer.types.d.ts +0 -18
  1304. package/lib/components/YouTubePlayer/index.d.ts +0 -1
  1305. package/lib/components/index.d.ts +0 -54
  1306. package/lib/constants/address.d.ts +0 -353
  1307. package/lib/constants/icons/generic/index.d.ts +0 -12
  1308. package/lib/constants/icons/header/index.d.ts +0 -5
  1309. package/lib/constants/icons/index.d.ts +0 -4
  1310. package/lib/constants/icons/menu/index.d.ts +0 -110
  1311. package/lib/constants/icons/options/colors/index.d.ts +0 -6
  1312. package/lib/constants/icons/options/index.d.ts +0 -2
  1313. package/lib/constants/icons/options/styles/index.d.ts +0 -6
  1314. package/lib/constants/index.d.ts +0 -2
  1315. package/lib/constants/keyFeatureIcons.d.ts +0 -176
  1316. package/lib/constants/layout.d.ts +0 -74
  1317. package/lib/constants/mixin.d.ts +0 -3
  1318. package/lib/constants/optionIcons.d.ts +0 -23
  1319. package/lib/constants/postalCode.d.ts +0 -55
  1320. package/lib/constants/postalCode.test.d.ts +0 -1
  1321. package/lib/constants/proStoreCategories/icons/amplifi/index.d.ts +0 -2
  1322. package/lib/constants/proStoreCategories/icons/uisp/index.d.ts +0 -5
  1323. package/lib/constants/proStoreCategories/icons/unifi/index.d.ts +0 -11
  1324. package/lib/constants/proStoreCategories/index.d.ts +0 -1
  1325. package/lib/constants/proStoreCategories/mapping/amplifi.d.ts +0 -12
  1326. package/lib/constants/proStoreCategories/mapping/filters.d.ts +0 -21
  1327. package/lib/constants/proStoreCategories/mapping/index.d.ts +0 -108
  1328. package/lib/constants/proStoreCategories/mapping/mapping.d.ts +0 -128
  1329. package/lib/constants/proStoreCategories/mapping/redirects.d.ts +0 -5
  1330. package/lib/constants/proStoreCategories/mapping/uisp.d.ts +0 -53
  1331. package/lib/constants/proStoreCategories/mapping/unifi.d.ts +0 -92
  1332. package/lib/constants/proStoreCategories/translations/index.d.ts +0 -11
  1333. package/lib/constants/proStoreFilters/index.d.ts +0 -1
  1334. package/lib/constants/proStoreFilters/mapping.d.ts +0 -195
  1335. package/lib/constants/shopify/keyFeatureIcons.d.ts +0 -7
  1336. package/lib/constants/storybook.d.ts +0 -11
  1337. package/lib/constants/theme.d.ts +0 -4
  1338. package/lib/constants/url.d.ts +0 -46
  1339. package/lib/contexts/MenuContext/context.d.ts +0 -49
  1340. package/lib/contexts/MenuContext/index.d.ts +0 -1
  1341. package/lib/contexts/MenuContext/mapping.d.ts +0 -241
  1342. package/lib/contexts/MenuContext/mapping.test.d.ts +0 -1
  1343. package/lib/contexts/MenuContext/presets.d.ts +0 -248
  1344. package/lib/contexts/MenuContext/types.d.ts +0 -116
  1345. package/lib/contexts/MenuContext/utils.d.ts +0 -44
  1346. package/lib/contexts/MenuContext/utils.test.d.ts +0 -1
  1347. package/lib/contexts/index.d.ts +0 -1
  1348. package/lib/helpers/index.d.ts +0 -1
  1349. package/lib/helpers/jsx.d.ts +0 -6
  1350. package/lib/helpers/proStoreCategories.d.ts +0 -23
  1351. package/lib/helpers/routes.d.ts +0 -1
  1352. package/lib/helpers/shopify/iconParsing.d.ts +0 -23
  1353. package/lib/helpers/shopify/product.d.ts +0 -5
  1354. package/lib/helpers/store.d.ts +0 -2
  1355. package/lib/helpers/time.d.ts +0 -6
  1356. package/lib/helpers/ux.d.ts +0 -30
  1357. package/lib/hooks/index.d.ts +0 -4
  1358. package/lib/hooks/useHasTouch.d.ts +0 -8
  1359. package/lib/hooks/useHddRetentionCalculator.d.ts +0 -37
  1360. package/lib/hooks/useHorizontalScroll.d.ts +0 -4
  1361. package/lib/hooks/useLockBodyScrollCustom.d.ts +0 -4
  1362. package/lib/hooks/useScrollToY.d.ts +0 -9
  1363. package/lib/hooks/useTestMediaElementVolumeSetter.d.ts +0 -5
  1364. package/lib/hooks/useTranslation.d.ts +0 -38
  1365. package/lib/types/array.d.ts +0 -48
  1366. package/lib/types/constants.d.ts +0 -57
  1367. package/lib/types/generated.d.ts +0 -920
  1368. package/lib/types/index.d.ts +0 -5
  1369. package/lib/types/object.d.ts +0 -218
  1370. package/lib/types/utils.d.ts +0 -89
  1371. package/lib/types/utils.test.d.ts +0 -1
  1372. package/lib/utils/address.d.ts +0 -1783
  1373. package/lib/utils/address.data.d.ts +0 -17
  1374. package/lib/utils/address.test.d.ts +0 -1
  1375. package/lib/utils/array.d.ts +0 -30
  1376. package/lib/utils/array.test.d.ts +0 -1
  1377. package/lib/utils/asset.d.ts +0 -2
  1378. package/lib/utils/canvas.d.ts +0 -8
  1379. package/lib/utils/cdn.d.ts +0 -5
  1380. package/lib/utils/collectionSlug.d.ts +0 -5
  1381. package/lib/utils/collectionSlug.test.d.ts +0 -1
  1382. package/lib/utils/countriesAndZones.d.ts +0 -29
  1383. package/lib/utils/countriesAndZones.test.d.ts +0 -1
  1384. package/lib/utils/country.d.ts +0 -5
  1385. package/lib/utils/errors.d.ts +0 -41
  1386. package/lib/utils/imageOptimizer.d.ts +0 -17
  1387. package/lib/utils/index.d.ts +0 -22
  1388. package/lib/utils/langauge.test.d.ts +0 -1
  1389. package/lib/utils/language.d.ts +0 -6
  1390. package/lib/utils/measures.d.ts +0 -35
  1391. package/lib/utils/measures.test.d.ts +0 -1
  1392. package/lib/utils/money/allocators/fixedAmount.d.ts +0 -26
  1393. package/lib/utils/money/allocators/fixedAmount.test.d.ts +0 -1
  1394. package/lib/utils/money/allocators/productAmount.d.ts +0 -13
  1395. package/lib/utils/money/allocators/productAmount.test.d.ts +0 -1
  1396. package/lib/utils/money/constants.d.ts +0 -75
  1397. package/lib/utils/money/constants.test.d.ts +0 -1
  1398. package/lib/utils/money/exchangeRate.d.ts +0 -31
  1399. package/lib/utils/money/exchangeRate.test.d.ts +0 -1
  1400. package/lib/utils/money/format.d.ts +0 -48
  1401. package/lib/utils/money/format.test.d.ts +0 -1
  1402. package/lib/utils/money/index.d.ts +0 -9
  1403. package/lib/utils/money/misc.d.ts +0 -131
  1404. package/lib/utils/money/misc.private.d.ts +0 -23
  1405. package/lib/utils/money/misc.test.d.ts +0 -1
  1406. package/lib/utils/money/shipping.d.ts +0 -5
  1407. package/lib/utils/money/shipping.test.d.ts +0 -1
  1408. package/lib/utils/money/tax.d.ts +0 -39
  1409. package/lib/utils/money/tax.private.d.ts +0 -17
  1410. package/lib/utils/money/tax.private.test.d.ts +0 -1
  1411. package/lib/utils/money/tax.test.d.ts +0 -1
  1412. package/lib/utils/money/types.d.ts +0 -85
  1413. package/lib/utils/nextjs/createInlineScript.d.ts +0 -24
  1414. package/lib/utils/nextjs/createInlineScript.test.d.ts +0 -1
  1415. package/lib/utils/nextjs/index.d.ts +0 -5
  1416. package/lib/utils/nextjs/mergeCspDirectives.d.ts +0 -19
  1417. package/lib/utils/nextjs/mergeCspDirectives.test.d.ts +0 -1
  1418. package/lib/utils/nextjs/navigationPresets.d.ts +0 -105
  1419. package/lib/utils/nextjs/sanitizeImageDomains.d.ts +0 -9
  1420. package/lib/utils/nextjs/sanitizeImageDomains.test.d.ts +0 -1
  1421. package/lib/utils/nextjs/stringifyForInject.d.ts +0 -5
  1422. package/lib/utils/nextjs/stringifyForInject.test.d.ts +0 -1
  1423. package/lib/utils/number.d.ts +0 -68
  1424. package/lib/utils/number.test.d.ts +0 -1
  1425. package/lib/utils/phoneNumber.d.ts +0 -4
  1426. package/lib/utils/product.d.ts +0 -26
  1427. package/lib/utils/shipping.d.ts +0 -6
  1428. package/lib/utils/storeId.d.ts +0 -10
  1429. package/lib/utils/storeId.test.d.ts +0 -1
  1430. package/lib/utils/string.d.ts +0 -1
  1431. package/lib/utils/string.test.d.ts +0 -1
  1432. package/lib/utils/styles.d.ts +0 -7
  1433. package/lib/utils/tags.d.ts +0 -1
  1434. package/lib/utils/tags.test.d.ts +0 -1
  1435. package/lib/utils/tax/brazil.d.ts +0 -5
  1436. package/lib/utils/tax/index.d.ts +0 -193
  1437. package/lib/utils/tax/index.test.d.ts +0 -1
  1438. package/lib/utils/tax/types.d.ts +0 -21
  1439. package/lib/utils/typeGuards.d.ts +0 -1
  1440. package/lib/utils/url.d.ts +0 -84
  1441. package/lib/utils/url.test.d.ts +0 -1
  1442. package/lib/utils/validations/address2SuperRefinement.d.ts +0 -7
  1443. package/lib/utils/validations/businessNameSuperRefinement.d.ts +0 -12
  1444. package/lib/utils/validations/index.d.ts +0 -5
  1445. package/lib/utils/validations/neighborhoodSuperRefinement.d.ts +0 -7
  1446. package/lib/utils/validations/phoneNumberSuperRefinement.d.ts +0 -10
  1447. package/lib/utils/validations/postalCodeSuperRefinement.d.ts +0 -15
  1448. package/lib/utils/validations/postalCodeSuperRefinement.test.d.ts +0 -1
  1449. package/lib/utils/validations/provinceSuperRefinement.d.ts +0 -13
  1450. package/lib/utils/validations/stateRegistrationNumberSuperRefinement.d.ts +0 -11
  1451. package/lib/utils/validations/taxIdSuperRefinement.d.ts +0 -18
  1452. package/lib/utils/variant.d.ts +0 -8
  1453. package/lib/utils/variant.test.d.ts +0 -1
  1454. package/lib/utils/wattage.d.ts +0 -11
  1455. package/lib/utils/wattage.test.d.ts +0 -1
  1456. package/lib/utils/zod.d.ts +0 -19
  1457. package/lib/utils/zod.test.d.ts +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"address.js","sources":["../../src/constants/address.ts"],"sourcesContent":["import { CountryCode, UserAssignedCountryCode } from \"../types\";\nimport { isCnpjValid, isCpfValid } from \"../utils/tax/brazil\";\n\n/**\n * Canada post code validation, we changed the regex from the url taken on by forcing a space in the middle (it's\n * optional there)\n * @see https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch04s15.html#:~:text=Aside%20from%20those%20two%20exceptions,for%20Canada%20Post's%20Ottawa%20headquarters.\n *\n * @deprecated with version 5.38.0 Use COUNTRY_CODE_POSTAL_CODE_REGEX\n */\nexport const CA_POSTAL_CODE_REGEX =\n /^(?!.*[DFIOQU])[A-VXY][0-9][A-Z] [0-9][A-Z][0-9]$/;\n\n/**\n * South Africa uses a simple 4-digit ZIP code pattern.\n * Unfortunately there doesn't seem have be pattern that some specific digits present a specific state/city that is\n * easily regex'able\n *\n * @deprecated with version 5.38.0 Use COUNTRY_CODE_POSTAL_CODE_REGEX\n */\nexport const ZA_POSTAL_CODE_REGEX = /^[0-9]{4}$/;\n\n/**\n * Mapping for postal code first letter to state province code.\n * Used for stricter postal code validation so zip code matches right state\n * Data taken from https://www12.statcan.gc.ca/census-recensement/2021/ref/dict/tab/index-eng.cfm?ID=t1_9\n * Related task: https://ubiquiti.atlassian.net/browse/NEP-1184?focusedCommentId=292248\n *\n * @deprecated use from packages/store.core/src/constants/postalCode.ts\n */\nexport const CA_POSTAL_CODE_PROVINCE_FIRST_CHARACTER = {\n A: [\"NL\"], // Newfoundland and Labrador\n B: [\"NS\"], // Nova Scotia\n C: [\"PE\"], // Prince Edward Island\n E: [\"NB\"], // New Brunswick\n G: [\"QC\"], // Eastern Quebec\n H: [\"QC\"], // Metropolitan Montréal\n J: [\"QC\"], // Western Quebec\n K: [\"ON\"], // Eastern Ontario\n L: [\"ON\"], // Central Ontario\n M: [\"ON\"], // Metropolitan Toronto\n N: [\"ON\"], // Southwestern Ontario\n P: [\"ON\"], // Northern Ontario\n R: [\"MB\"], // Manitoba\n S: [\"SK\"], // Saskatchewan\n T: [\"AB\"], // Alberta\n V: [\"BC\"], // British Columbia\n X: [\"NU\", \"NT\"], // Northwest Territories and Nunavut\n Y: [\"YT\"], // Yukon\n};\n\n/**\n * Static regex patterns to validate TAX number possibility\n * ! It does not guarantee that it's a registered TAX nubmer in the country it belongs in !\n */\nexport const BUSINESS_COUNTRY_CODE_MAPPING = {\n // #############################################################################\n // Europe VIES country patterns\n //\n // Links:\n // - Main source for pattens (see Question #11) - https://ec.europa.eu/taxation_customs/vies/#/faq\n // - Alternative source for patterns -\n // https://www.avalara.com/vatlive/en/eu-vat-rules/eu-vat-number-registration/eu-vat-number-formats.html\n // - General info about VAT numbers - https://en.wikipedia.org/wiki/VAT_identification_number\n //\n // HACK: For user convenience:\n // - Make the vat number country prefix optional (\"DE\" in \"DE999999999\") as we will normalise it inside of the VIES\n // service!\n // - Match result case-insensitive, we can easily uppercase it in the service\n // #############################################################################\n /**\n * Austria - 1 block of 9 characters and The 1st position following the prefix is always \"U\"\n */\n [CountryCode.At]: {\n validation: /^(AT)?U[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * Belgium - 1 block of 10 digits - First digit after prefix is either 0 or 1\n */\n [CountryCode.Be]: {\n validation: /^(BE)?[0,1]{1}[0-9]{9}$/i,\n isOptional: false,\n },\n /**\n * Bulgaria - 1 block of 9 digits or 1 block of 10 digits\n */\n [CountryCode.Bg]: {\n validation: /^(BG)?[0-9]{9,10}$/i,\n isOptional: false,\n },\n /**\n * Cyprus - 1 block of 8 digits and trailing letter\n */\n [CountryCode.Cy]: {\n validation: /^(CY)?[0-9]{8}[A-Z]$/i,\n isOptional: false,\n },\n /**\n * Czech Republic - 1 block of either 8, 9 or 10 digits\n */\n [CountryCode.Cz]: {\n validation: /^(CZ)?[0-9]{8,10}$/i,\n isOptional: false,\n },\n /**\n * Germany - 9 digits\n */\n [CountryCode.De]: {\n validation: /^(DE)?[0-9]{9}$/i,\n isOptional: false,\n },\n /**\n * Denmark - 8 digits\n */\n [CountryCode.Dk]: {\n validation: /^(DK)?[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * Estonia - 9 digits\n */\n [CountryCode.Ee]: {\n validation: /^(EE)?[0-9]{9}$/i,\n isOptional: false,\n },\n /**\n * Greece - 9 digits\n * Note: We are using \"EL\" instead of its country code \"GR\" for prefix as per European Commission requirements, this\n * only affects how we validate it against VIES\n * @see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Imperfect_implementations\n */\n [UserAssignedCountryCode.El]: {\n validation: /^(EL)?[0-9]{9}$/i,\n isOptional: false,\n },\n /**\n * Spain - 9 characters Includes 1 or 2 alphabetical characters (first or last or first and last)\n * Note: We can reduce the pattern 2 regex or-pattern where:\n * 1. Handles scenario with leading letter and optional trailing letter\n * 2. Handles scenario with just trailing letter\n */\n [CountryCode.Es]: {\n validation: /^(ES)?(([A-Z][0-9]{7}[0-9A-Z])|([0-9]{8}[A-Z]))$/i,\n isOptional: false,\n },\n /**\n * Finland - 1 block of 8 digits\n */\n [CountryCode.Fi]: {\n validation: /^(FI)?[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * France & Monaco - 11 characters May include alphabetical characters (any except O or I) as first or second or first and\n * second characters\n *\n * TODO: Maybe add stricter validation for the invalid \"O\" and \"I\" characters (need to find a source that validates it)\n *\n * Fun-fact: France has actual math behind how they calculate the first 2 digits as they are a validation key, but we\n * don't require such a strict pattern as we would just end up doing actual checking up against Europe VIES\n * @see https://stackoverflow.com/a/33627030\n * @see https://en.wikipedia.org/wiki/VAT_identification_number\n */\n [UserAssignedCountryCode.Fr]: {\n validation: /^(FR)?[0-9A-Z]{2}[0-9]{9}$/i,\n isOptional: false,\n },\n /**\n * Croatia - 1 block of 11 digits\n */\n [CountryCode.Hr]: {\n validation: /^(HR)?[0-9]{11}$/i,\n isOptional: false,\n },\n /**\n * Hungary - 1 block of 8 digits\n */\n [CountryCode.Hu]: {\n validation: /^(HU)?[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * Ireland - 8 or 9 characters. Includes one or two alphabetical characters (last, or second and last, or last 2)\n *\n * It kinda has 3 styles:\n * - IE9S99999L (legacy, afaik WIKI told it's being phased out)\n * - IE9999999L\n * - IE9999999WI\n * @see https://en.wikipedia.org/wiki/VAT_identification_number\n */\n [CountryCode.Ie]: {\n validation: /^(IE)?[0-9][0-9A-Z][0-9]{5}[A-Z]{1,2}$/i,\n isOptional: false,\n },\n /**\n * Italy - 1 block of 11 digits\n */\n [CountryCode.It]: {\n validation: /^(IT)?[0-9]{11}$/i,\n isOptional: false,\n },\n /**\n * Lithuania - 1 block of 9 digits, or 1 block of 12 digits\n */\n [CountryCode.Lt]: {\n validation: /^(LT)?([0-9]{9}|[0-9]{12})$/i,\n isOptional: false,\n },\n /**\n * Luxembourg - 1 block of 8 digits\n */\n [CountryCode.Lu]: {\n validation: /^(LU)?[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * Latvia - 1 block of 11 digits\n */\n [CountryCode.Lv]: {\n validation: /^(LV)?[0-9]{11}$/i,\n isOptional: false,\n },\n /**\n * Malta - 1 block of 8 digits\n */\n [CountryCode.Mt]: {\n validation: /^(MT)?[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * Netherlands - 9 digits, the letter \"B\" and 2 \"check\" digits\n * @see https://business.gov.nl/regulation/using-checking-vat-numbers/\n *\n * Fun-fact: Avatax VAT reference link has a mistake of using \"BO2\" instead of \"B02\" for VAT group companies e.g https://eriks.com/en/contact/thank-you/\n */\n [CountryCode.Nl]: {\n validation: /^(NL)?[0-9]{9}B[0-9]{2}$/i,\n isOptional: false,\n },\n /**\n * Poland - 1 block of 10 digits\n */\n [CountryCode.Pl]: {\n validation: /^(PL)?[0-9]{10}$/i,\n isOptional: false,\n },\n /**\n * Portugal - 1 block of 9 digits\n */\n [CountryCode.Pt]: {\n validation: /^(PT)?[0-9]{9}$/i,\n isOptional: false,\n },\n /**\n * Romania - 1 block of minimum 2 digits and maximum 10 digits\n *\n * Note: Wasn't able to find an official Romanian doc that validates this pattern as internet had mixed info about it,\n * but sticking with EU VIES recommended 2-10 digits\n */\n [CountryCode.Ro]: {\n validation: /^(RO)?[0-9]{2,10}$/i,\n isOptional: false,\n },\n /**\n * Sweden - 1 block of 12 digits\n */\n [CountryCode.Se]: {\n validation: /^(SE)?[0-9]{12}$/i,\n isOptional: false,\n },\n /**\n * Slovenia - 1 block of 8 digits\n */\n [CountryCode.Si]: {\n validation: /^(SI)?[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * Slovakia - 1 block of 10 digits\n */\n [CountryCode.Sk]: {\n validation: /^(SK)?[0-9]{10}$/i,\n isOptional: false,\n },\n /**\n * Northern Ireland - 1 block of 3 digits, 1 block of 4 digits and 1 block of 2 digits; or the above followed by a block of 3 digits; or 1 block of 5 characters\n */\n [UserAssignedCountryCode.Xi]: {\n validation: /^(XI)?([0-9]{9}([0-9]{3})?|[A-Z]{2}[0-9]{3})$/i,\n isOptional: false,\n },\n // #############################################################################\n // Eurozone\n // #############################################################################\n /**\n * United Kingdom except (Northern Ireland a.k.a Xi)\n * @see https://www.gov.uk/register-for-vat/selling-or-moving-goods-between-northern-ireland-and-the-eu\n */\n [CountryCode.Gb]: {\n validation: /^(GB)?([0-9]{9}([0-9]{3})?|[A-Z]{2}[0-9]{3})$/i,\n isOptional: false,\n },\n /**\n * Norway - \"NO\" optional prefix, 9 digits, \"MVA\" optional suffix\n * @see https://www.avalara.com/vatlive/en/eu-vat-rules/eu-vat-number-registration/eu-vat-number-formats.html\n * @see https://vatstack.com/articles/norway-vat-number-validation\n * @see https://en.wikipedia.org/wiki/VAT_identification_number#:~:text=e.g.%20MK4032013544513-,Norway,-Organisasjonsnummer%0AOrganization%20number\n */\n [CountryCode.No]: {\n validation: /^(NO)?[0-9]{9}(MVA)?$/i,\n isOptional: false,\n },\n // TODO: should we add Switzerland? see https://www.avalara.com/vatlive/en/eu-vat-rules/eu-vat-number-registration/eu-vat-number-formats.html\n // Switzerland\n // [CountryCode.Ch]: ...\n // #############################################################################\n // Other (one-of's)\n // #############################################################################\n /**\n * United Arab Emirates - 1 block of 15 digits\n *\n * Note: no source for this found, using format based on UI AE TRN\n * Note: AE TRN does not use a country prefix\n */\n [CountryCode.Ae]: {\n validation: /^[0-9]{15}$/i,\n isOptional: false,\n },\n /**\n * South Africa - as per links below, should accept input that starts with 4 and following 9 digits.\n * @see https://secure.sarsefiling.co.za/vatvendorsearch.aspx\n * @see https://secure.sarsefiling.co.za/VATVendorSearch/application/help.html\n */\n [CountryCode.Za]: {\n validation: /^4[0-9]{9}$/i,\n isOptional: false,\n },\n\n [CountryCode.Br]: {\n validation: isCnpjValid,\n isOptional: false,\n },\n\n [CountryCode.In]: {\n validation: /^[0-9A-Z]{15}$/,\n isOptional: false,\n },\n\n [CountryCode.Tw]: {\n validation: /^[0-9A-Z]{8}$/,\n isOptional: false,\n },\n\n /**\n * @see https://www.fonoa.com/blog/new-mandatory-rfc-validation-method-in-mexico\n * A businesses RFC consists of 12 digits with the following structure: xxxyyyyyyzzz\n * (x = letters, y = numbers, z = alphanumeric)\n */\n [CountryCode.Mx]: {\n validation: /^[A-Z]{3}[0-9]{6}[0-9A-Z]{3}$/i,\n isOptional: false,\n },\n} as const;\n// FIXME: once we upgrade to Next 13 which supports typescript satisfies we can use this to make th pattern stricter\n// FIXME: \"isOptional: false\" could be safely removed once we use the \"satisfies\" as we only care about cases when \"isOptional: true\". It was added just to make TS happy.\n// } satisfies CountryTaxValidationMapping;\n\nexport const RESIDENTIAL_COUNTRY_CODE_MAPPING = {\n // #############################################################################\n // Other (one-of's)\n // #############################################################################\n [CountryCode.Br]: {\n validation: isCpfValid,\n isOptional: false,\n },\n\n [CountryCode.In]: {\n validation: /^[0-9A-Z]{15}$/,\n isOptional: true,\n },\n} as const;\n// FIXME: once we upgrade to Next 13 which supports typescript satisfies we can use this to make th pattern stricter\n// FIXME: \"isOptional: false\" could be safely removed once we use the \"satisfies\" as we only care about cases when \"isOptional: true\". It was added just to make TS happy.\n// } satisfies CountryTaxValidationMapping;\n\n/**\n * Set of type-safe rules that we use in `getUserAssignedCountryCode` to determine UserAssignedCountryCode\n */\nexport const USER_ASSIGNED_COUNTRY_MAPPING_RULES = {\n [UserAssignedCountryCode.Xi]: [\n [CountryCode.Gb, \"NIR\"], // Northern Ireland\n ],\n [UserAssignedCountryCode.El]: [\n [CountryCode.Gr], // Greece\n ],\n [UserAssignedCountryCode.Fr]: [\n [CountryCode.Fr], // France\n [CountryCode.Mc], // Monaco\n ],\n // FIXME: once we upgrade to Next 13 which supports typescript satisfies we can use this to make th pattern stricter\n} as {\n [key in UserAssignedCountryCode]: [\n countryCode: CountryCode,\n province?: string,\n ][];\n};\n\n/**\n * List of found alternative province names that results\n * from Google Places API. This is used to map the alternative\n * province name to the correct province code for auto-fill.\n */\nexport const ALTERNATIVE_PROVINCE_NAMES: {\n [key in CountryCode]?: Record<string, string>;\n} = {\n // United Arab Emirates\n [CountryCode.Ae]: {\n \"Ras al Khaimah\": \"RK\",\n \"Umm Al Quawain\": \"UQ\",\n },\n // Ireland\n [CountryCode.Ie]: {\n \"County Kildare\": \"KE\",\n \"County Kilkenny\": \"KK\",\n },\n};\n"],"names":["CA_POSTAL_CODE_REGEX","ZA_POSTAL_CODE_REGEX","CA_POSTAL_CODE_PROVINCE_FIRST_CHARACTER","A","B","C","E","G","H","J","K","L","M","N","P","R","S","T","V","X","Y","BUSINESS_COUNTRY_CODE_MAPPING","CountryCode","At","validation","isOptional","Be","Bg","Cy","Cz","De","Dk","Ee","UserAssignedCountryCode","El","Es","Fi","Fr","Hr","Hu","Ie","It","Lt","Lu","Lv","Mt","Nl","Pl","Pt","Ro","Se","Si","Sk","Xi","Gb","No","Ae","Za","Br","isCnpjValid","In","Tw","Mx","RESID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AAY,EAAA,gBAAA;IACZC,UAAY,EAAA;EACd;AACF,CAAA;AAQO,MAAMwC,mCAAsC,GAAA;EACjD,CAAChC,SAAAA,CAAAA,uBAAwB,CAAAoB,EAAE,GAAG,CAC5B,CAAC/B,SAAY,CAAAA,WAAA,CAAAgC,EAAA,EAAI,KAAK;EAAA;EAAA,CACxB;EACA,CAACrB,SAAAA,CAAAA,uBAAwB,CAAAC,EAAE,GAAG,CAC5B,CAACZ,SAAAA,CAAAA,YAAY4C,EAAE;EAAA;EAAA,CACjB;EACA,CAACjC,SAAAA,CAAAA,uBAAwB,CAAAI,EAAE,GAAG,CAC5B,CAACf,SAAAA,CAAAA,YAAYe,EAAE,CAAA;EAAA;EACf,CAACf,SAAAA,CAAAA,YAAY6C,EAAE;EAAA;EAAA;EACjB;AAEF,CAAA;AAYO,MAAMC,0BAET,GAAA;EAAA;EAEF,CAAC9C,SAAAA,CAAAA,WAAY,CAAAkC,EAAE,GAAG;IAChB,gBAAkB,EAAA,IAAA;IAClB,gBAAkB,EAAA;EACpB,CAAA;EAAA;EAEA,CAAClC,SAAAA,CAAAA,WAAY,CAAAkB,EAAE,GAAG;IAChB,gBAAkB,EAAA,IAAA;IAClB,iBAAmB,EAAA;EACrB;AACF,CAAA;;;;;;;"}
1
+ {"version":3,"file":"address.js","sources":["../../src/constants/address.ts"],"sourcesContent":["import { CountryCode, UserAssignedCountryCode } from \"../types\";\nimport { isCnpjValid, isCpfValid } from \"../utils/tax/brazil\";\n\n/**\n * Canada post code validation, we changed the regex from the url taken on by forcing a space in the middle (it's\n * optional there)\n * @see https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch04s15.html#:~:text=Aside%20from%20those%20two%20exceptions,for%20Canada%20Post's%20Ottawa%20headquarters.\n *\n * @deprecated with version 5.38.0 Use COUNTRY_CODE_POSTAL_CODE_REGEX\n */\nexport const CA_POSTAL_CODE_REGEX =\n /^(?!.*[DFIOQU])[A-VXY][0-9][A-Z] [0-9][A-Z][0-9]$/;\n\n/**\n * South Africa uses a simple 4-digit ZIP code pattern.\n * Unfortunately there doesn't seem have be pattern that some specific digits present a specific state/city that is\n * easily regex'able\n *\n * @deprecated with version 5.38.0 Use COUNTRY_CODE_POSTAL_CODE_REGEX\n */\nexport const ZA_POSTAL_CODE_REGEX = /^[0-9]{4}$/;\n\n/**\n * Mapping for postal code first letter to state province code.\n * Used for stricter postal code validation so zip code matches right state\n * Data taken from https://www12.statcan.gc.ca/census-recensement/2021/ref/dict/tab/index-eng.cfm?ID=t1_9\n * Related task: https://ubiquiti.atlassian.net/browse/NEP-1184?focusedCommentId=292248\n *\n * @deprecated use from packages/store.core/src/constants/postalCode.ts\n */\nexport const CA_POSTAL_CODE_PROVINCE_FIRST_CHARACTER = {\n A: [\"NL\"], // Newfoundland and Labrador\n B: [\"NS\"], // Nova Scotia\n C: [\"PE\"], // Prince Edward Island\n E: [\"NB\"], // New Brunswick\n G: [\"QC\"], // Eastern Quebec\n H: [\"QC\"], // Metropolitan Montréal\n J: [\"QC\"], // Western Quebec\n K: [\"ON\"], // Eastern Ontario\n L: [\"ON\"], // Central Ontario\n M: [\"ON\"], // Metropolitan Toronto\n N: [\"ON\"], // Southwestern Ontario\n P: [\"ON\"], // Northern Ontario\n R: [\"MB\"], // Manitoba\n S: [\"SK\"], // Saskatchewan\n T: [\"AB\"], // Alberta\n V: [\"BC\"], // British Columbia\n X: [\"NU\", \"NT\"], // Northwest Territories and Nunavut\n Y: [\"YT\"], // Yukon\n};\n\n/**\n * Static regex patterns to validate TAX number possibility\n * ! It does not guarantee that it's a registered TAX nubmer in the country it belongs in !\n */\nexport const BUSINESS_COUNTRY_CODE_MAPPING = {\n // #############################################################################\n // Europe VIES country patterns\n //\n // Links:\n // - Main source for pattens (see Question #11) - https://ec.europa.eu/taxation_customs/vies/#/faq\n // - Alternative source for patterns -\n // https://www.avalara.com/vatlive/en/eu-vat-rules/eu-vat-number-registration/eu-vat-number-formats.html\n // - General info about VAT numbers - https://en.wikipedia.org/wiki/VAT_identification_number\n //\n // HACK: For user convenience:\n // - Make the vat number country prefix optional (\"DE\" in \"DE999999999\") as we will normalise it inside of the VIES\n // service!\n // - Match result case-insensitive, we can easily uppercase it in the service\n // #############################################################################\n /**\n * Austria - 1 block of 9 characters and The 1st position following the prefix is always \"U\"\n */\n [CountryCode.At]: {\n validation: /^(AT)?U[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * Belgium - 1 block of 10 digits - First digit after prefix is either 0 or 1\n */\n [CountryCode.Be]: {\n validation: /^(BE)?[0,1]{1}[0-9]{9}$/i,\n isOptional: false,\n },\n /**\n * Bulgaria - 1 block of 9 digits or 1 block of 10 digits\n */\n [CountryCode.Bg]: {\n validation: /^(BG)?[0-9]{9,10}$/i,\n isOptional: false,\n },\n /**\n * Cyprus - 1 block of 8 digits and trailing letter\n */\n [CountryCode.Cy]: {\n validation: /^(CY)?[0-9]{8}[A-Z]$/i,\n isOptional: false,\n },\n /**\n * Czech Republic - 1 block of either 8, 9 or 10 digits\n */\n [CountryCode.Cz]: {\n validation: /^(CZ)?[0-9]{8,10}$/i,\n isOptional: false,\n },\n /**\n * Germany - 9 digits\n */\n [CountryCode.De]: {\n validation: /^(DE)?[0-9]{9}$/i,\n isOptional: false,\n },\n /**\n * Denmark - 8 digits\n */\n [CountryCode.Dk]: {\n validation: /^(DK)?[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * Estonia - 9 digits\n */\n [CountryCode.Ee]: {\n validation: /^(EE)?[0-9]{9}$/i,\n isOptional: false,\n },\n /**\n * Greece - 9 digits\n * Note: We are using \"EL\" instead of its country code \"GR\" for prefix as per European Commission requirements, this\n * only affects how we validate it against VIES\n * @see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Imperfect_implementations\n */\n [UserAssignedCountryCode.El]: {\n validation: /^(EL)?[0-9]{9}$/i,\n isOptional: false,\n },\n /**\n * Spain - 9 characters Includes 1 or 2 alphabetical characters (first or last or first and last)\n * Note: We can reduce the pattern 2 regex or-pattern where:\n * 1. Handles scenario with leading letter and optional trailing letter\n * 2. Handles scenario with just trailing letter\n */\n [CountryCode.Es]: {\n validation: /^(ES)?(([A-Z][0-9]{7}[0-9A-Z])|([0-9]{8}[A-Z]))$/i,\n isOptional: false,\n },\n /**\n * Finland - 1 block of 8 digits\n */\n [CountryCode.Fi]: {\n validation: /^(FI)?[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * France & Monaco - 11 characters May include alphabetical characters (any except O or I) as first or second or first and\n * second characters\n *\n * TODO: Maybe add stricter validation for the invalid \"O\" and \"I\" characters (need to find a source that validates it)\n *\n * Fun-fact: France has actual math behind how they calculate the first 2 digits as they are a validation key, but we\n * don't require such a strict pattern as we would just end up doing actual checking up against Europe VIES\n * @see https://stackoverflow.com/a/33627030\n * @see https://en.wikipedia.org/wiki/VAT_identification_number\n */\n [UserAssignedCountryCode.Fr]: {\n validation: /^(FR)?[0-9A-Z]{2}[0-9]{9}$/i,\n isOptional: false,\n },\n /**\n * Croatia - 1 block of 11 digits\n */\n [CountryCode.Hr]: {\n validation: /^(HR)?[0-9]{11}$/i,\n isOptional: false,\n },\n /**\n * Hungary - 1 block of 8 digits\n */\n [CountryCode.Hu]: {\n validation: /^(HU)?[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * Ireland - 8 or 9 characters. Includes one or two alphabetical characters (last, or second and last, or last 2)\n *\n * It kinda has 3 styles:\n * - IE9S99999L (legacy, afaik WIKI told it's being phased out)\n * - IE9999999L\n * - IE9999999WI\n * @see https://en.wikipedia.org/wiki/VAT_identification_number\n */\n [CountryCode.Ie]: {\n validation: /^(IE)?[0-9][0-9A-Z][0-9]{5}[A-Z]{1,2}$/i,\n isOptional: false,\n },\n /**\n * Italy - 1 block of 11 digits\n */\n [CountryCode.It]: {\n validation: /^(IT)?[0-9]{11}$/i,\n isOptional: false,\n },\n /**\n * Lithuania - 1 block of 9 digits, or 1 block of 12 digits\n */\n [CountryCode.Lt]: {\n validation: /^(LT)?([0-9]{9}|[0-9]{12})$/i,\n isOptional: false,\n },\n /**\n * Luxembourg - 1 block of 8 digits\n */\n [CountryCode.Lu]: {\n validation: /^(LU)?[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * Latvia - 1 block of 11 digits\n */\n [CountryCode.Lv]: {\n validation: /^(LV)?[0-9]{11}$/i,\n isOptional: false,\n },\n /**\n * Malta - 1 block of 8 digits\n */\n [CountryCode.Mt]: {\n validation: /^(MT)?[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * Netherlands - 9 digits, the letter \"B\" and 2 \"check\" digits\n * @see https://business.gov.nl/regulation/using-checking-vat-numbers/\n *\n * Fun-fact: Avatax VAT reference link has a mistake of using \"BO2\" instead of \"B02\" for VAT group companies e.g https://eriks.com/en/contact/thank-you/\n */\n [CountryCode.Nl]: {\n validation: /^(NL)?[0-9]{9}B[0-9]{2}$/i,\n isOptional: false,\n },\n /**\n * Poland - 1 block of 10 digits\n */\n [CountryCode.Pl]: {\n validation: /^(PL)?[0-9]{10}$/i,\n isOptional: false,\n },\n /**\n * Portugal - 1 block of 9 digits\n */\n [CountryCode.Pt]: {\n validation: /^(PT)?[0-9]{9}$/i,\n isOptional: false,\n },\n /**\n * Romania - 1 block of minimum 2 digits and maximum 10 digits\n *\n * Note: Wasn't able to find an official Romanian doc that validates this pattern as internet had mixed info about it,\n * but sticking with EU VIES recommended 2-10 digits\n */\n [CountryCode.Ro]: {\n validation: /^(RO)?[0-9]{2,10}$/i,\n isOptional: false,\n },\n /**\n * Sweden - 1 block of 12 digits\n */\n [CountryCode.Se]: {\n validation: /^(SE)?[0-9]{12}$/i,\n isOptional: false,\n },\n /**\n * Slovenia - 1 block of 8 digits\n */\n [CountryCode.Si]: {\n validation: /^(SI)?[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * Slovakia - 1 block of 10 digits\n */\n [CountryCode.Sk]: {\n validation: /^(SK)?[0-9]{10}$/i,\n isOptional: false,\n },\n /**\n * Northern Ireland - 1 block of 3 digits, 1 block of 4 digits and 1 block of 2 digits; or the above followed by a block of 3 digits; or 1 block of 5 characters\n */\n [UserAssignedCountryCode.Xi]: {\n validation: /^(XI)?([0-9]{9}([0-9]{3})?|[A-Z]{2}[0-9]{3})$/i,\n isOptional: false,\n },\n // #############################################################################\n // Eurozone\n // #############################################################################\n /**\n * United Kingdom except (Northern Ireland a.k.a Xi)\n * @see https://www.gov.uk/register-for-vat/selling-or-moving-goods-between-northern-ireland-and-the-eu\n */\n [CountryCode.Gb]: {\n validation: /^(GB)?([0-9]{9}([0-9]{3})?|[A-Z]{2}[0-9]{3})$/i,\n isOptional: false,\n },\n /**\n * Norway - \"NO\" optional prefix, 9 digits, \"MVA\" optional suffix\n * @see https://www.avalara.com/vatlive/en/eu-vat-rules/eu-vat-number-registration/eu-vat-number-formats.html\n * @see https://vatstack.com/articles/norway-vat-number-validation\n * @see https://en.wikipedia.org/wiki/VAT_identification_number#:~:text=e.g.%20MK4032013544513-,Norway,-Organisasjonsnummer%0AOrganization%20number\n */\n [CountryCode.No]: {\n validation: /^(NO)?[0-9]{9}(MVA)?$/i,\n isOptional: false,\n },\n // TODO: should we add Switzerland? see https://www.avalara.com/vatlive/en/eu-vat-rules/eu-vat-number-registration/eu-vat-number-formats.html\n // Switzerland\n // [CountryCode.Ch]: ...\n // #############################################################################\n // Other (one-of's)\n // #############################################################################\n /**\n * United Arab Emirates - 1 block of 15 digits\n *\n * Note: no source for this found, using format based on UI AE TRN\n * Note: AE TRN does not use a country prefix\n */\n [CountryCode.Ae]: {\n validation: /^[0-9]{15}$/i,\n isOptional: false,\n },\n /**\n * South Africa - as per links below, should accept input that starts with 4 and following 9 digits.\n * @see https://secure.sarsefiling.co.za/vatvendorsearch.aspx\n * @see https://secure.sarsefiling.co.za/VATVendorSearch/application/help.html\n */\n [CountryCode.Za]: {\n validation: /^4[0-9]{9}$/i,\n isOptional: false,\n },\n\n [CountryCode.Br]: {\n validation: isCnpjValid,\n isOptional: false,\n },\n\n [CountryCode.In]: {\n validation: /^[0-9A-Z]{15}$/,\n isOptional: false,\n },\n\n [CountryCode.Tw]: {\n validation: /^[0-9A-Z]{8}$/,\n isOptional: false,\n },\n\n /**\n * @see https://www.fonoa.com/blog/new-mandatory-rfc-validation-method-in-mexico\n * A businesses RFC consists of 12 characters with the following structure: xxxyyyyyyzzz\n * (x = letters (including Ñ and &), y = numbers, z = alphanumeric)\n */\n [CountryCode.Mx]: {\n validation: /^[A-ZÑ&]{3}\\d{6}[A-Z0-9]{3}$/i,\n isOptional: false,\n },\n} as const;\n// FIXME: once we upgrade to Next 13 which supports typescript satisfies we can use this to make th pattern stricter\n// FIXME: \"isOptional: false\" could be safely removed once we use the \"satisfies\" as we only care about cases when \"isOptional: true\". It was added just to make TS happy.\n// } satisfies CountryTaxValidationMapping;\n\nexport const RESIDENTIAL_COUNTRY_CODE_MAPPING = {\n // #############################################################################\n // Other (one-of's)\n // #############################################################################\n [CountryCode.Br]: {\n validation: isCpfValid,\n isOptional: false,\n },\n\n [CountryCode.In]: {\n validation: /^[0-9A-Z]{15}$/,\n isOptional: true,\n },\n} as const;\n// FIXME: once we upgrade to Next 13 which supports typescript satisfies we can use this to make th pattern stricter\n// FIXME: \"isOptional: false\" could be safely removed once we use the \"satisfies\" as we only care about cases when \"isOptional: true\". It was added just to make TS happy.\n// } satisfies CountryTaxValidationMapping;\n\n/**\n * Set of type-safe rules that we use in `getUserAssignedCountryCode` to determine UserAssignedCountryCode\n */\nexport const USER_ASSIGNED_COUNTRY_MAPPING_RULES = {\n [UserAssignedCountryCode.Xi]: [\n [CountryCode.Gb, \"NIR\"], // Northern Ireland\n ],\n [UserAssignedCountryCode.El]: [\n [CountryCode.Gr], // Greece\n ],\n [UserAssignedCountryCode.Fr]: [\n [CountryCode.Fr], // France\n [CountryCode.Mc], // Monaco\n ],\n // FIXME: once we upgrade to Next 13 which supports typescript satisfies we can use this to make th pattern stricter\n} as {\n [key in UserAssignedCountryCode]: [\n countryCode: CountryCode,\n province?: string,\n ][];\n};\n\n/**\n * List of found alternative province names that results\n * from Google Places API. This is used to map the alternative\n * province name to the correct province code for auto-fill.\n */\nexport const ALTERNATIVE_PROVINCE_NAMES: {\n [key in CountryCode]?: Record<string, string>;\n} = {\n // United Arab Emirates\n [CountryCode.Ae]: {\n \"Ras al Khaimah\": \"RK\",\n \"Umm Al Quawain\": \"UQ\",\n },\n // Ireland\n [CountryCode.Ie]: {\n \"County Kildare\": \"KE\",\n \"County Kilkenny\": \"KK\",\n },\n};\n"],"names":["CA_POSTAL_CODE_REGEX","ZA_POSTAL_CODE_REGEX","CA_POSTAL_CODE_PROVINCE_FIRST_CHARACTER","A","B","C","E","G","H","J","K","L","M","N","P","R","S","T","V","X","Y","BUSINESS_COUNTRY_CODE_MAPPING","CountryCode","At","validation","isOptional","Be","Bg","Cy","Cz","De","Dk","Ee","UserAssignedCountryCode","El","Es","Fi","Fr","Hr","Hu","Ie","It","Lt","Lu","Lv","Mt","Nl","Pl","Pt","Ro","Se","Si","Sk","Xi","Gb","No","Ae","Za","Br","isCnpjValid","In","Tw","Mx","RESIDENTIAL_COUNTRY_CODE_MAPPING","isCpfValid","USER_ASSIGNED_COUNTRY_MAPPING_RULES","Gr","Mc","ALTERNATIVE_PROVINCE_NAMES"],"mappings":";;;;;;AAUO,MAAMA,oBACX,GAAA,mDAAA;AASK,MAAMC,oBAAuB,GAAA,YAAA;AAU7B,MAAMC,uCAA0C,GAAA;EACrDC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EA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A,WAAY,CAAAkC,EAAE,GAAG;IAChB,gBAAkB,EAAA,IAAA;IAClB,gBAAkB,EAAA;EACpB,CAAA;EAAA;EAEA,CAAClC,SAAAA,CAAAA,WAAY,CAAAkB,EAAE,GAAG;IAChB,gBAAkB,EAAA,IAAA;IAClB,iBAAmB,EAAA;EACrB;AACF,CAAA;;;;;;;"}
@@ -339,11 +339,11 @@ const BUSINESS_COUNTRY_CODE_MAPPING = {
339
339
  },
340
340
  /**
341
341
  * @see https://www.fonoa.com/blog/new-mandatory-rfc-validation-method-in-mexico
342
- * A businesses RFC consists of 12 digits with the following structure: xxxyyyyyyzzz
343
- * (x = letters, y = numbers, z = alphanumeric)
342
+ * A businesses RFC consists of 12 characters with the following structure: xxxyyyyyyzzz
343
+ * (x = letters (including Ñ and &), y = numbers, z = alphanumeric)
344
344
  */
345
345
  [CountryCode.Mx]: {
346
- validation: /^[A-Z]{3}[0-9]{6}[0-9A-Z]{3}$/i,
346
+ validation: /^[A-ZÑ&]{3}\d{6}[A-Z0-9]{3}$/i,
347
347
  isOptional: false
348
348
  }
349
349
  };
@@ -1 +1 @@
1
- {"version":3,"file":"address.mjs","sources":["../../src/constants/address.ts"],"sourcesContent":["import { CountryCode, UserAssignedCountryCode } from \"../types\";\nimport { isCnpjValid, isCpfValid } from \"../utils/tax/brazil\";\n\n/**\n * Canada post code validation, we changed the regex from the url taken on by forcing a space in the middle (it's\n * optional there)\n * @see https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch04s15.html#:~:text=Aside%20from%20those%20two%20exceptions,for%20Canada%20Post's%20Ottawa%20headquarters.\n *\n * @deprecated with version 5.38.0 Use COUNTRY_CODE_POSTAL_CODE_REGEX\n */\nexport const CA_POSTAL_CODE_REGEX =\n /^(?!.*[DFIOQU])[A-VXY][0-9][A-Z] [0-9][A-Z][0-9]$/;\n\n/**\n * South Africa uses a simple 4-digit ZIP code pattern.\n * Unfortunately there doesn't seem have be pattern that some specific digits present a specific state/city that is\n * easily regex'able\n *\n * @deprecated with version 5.38.0 Use COUNTRY_CODE_POSTAL_CODE_REGEX\n */\nexport const ZA_POSTAL_CODE_REGEX = /^[0-9]{4}$/;\n\n/**\n * Mapping for postal code first letter to state province code.\n * Used for stricter postal code validation so zip code matches right state\n * Data taken from https://www12.statcan.gc.ca/census-recensement/2021/ref/dict/tab/index-eng.cfm?ID=t1_9\n * Related task: https://ubiquiti.atlassian.net/browse/NEP-1184?focusedCommentId=292248\n *\n * @deprecated use from packages/store.core/src/constants/postalCode.ts\n */\nexport const CA_POSTAL_CODE_PROVINCE_FIRST_CHARACTER = {\n A: [\"NL\"], // Newfoundland and Labrador\n B: [\"NS\"], // Nova Scotia\n C: [\"PE\"], // Prince Edward Island\n E: [\"NB\"], // New Brunswick\n G: [\"QC\"], // Eastern Quebec\n H: [\"QC\"], // Metropolitan Montréal\n J: [\"QC\"], // Western Quebec\n K: [\"ON\"], // Eastern Ontario\n L: [\"ON\"], // Central Ontario\n M: [\"ON\"], // Metropolitan Toronto\n N: [\"ON\"], // Southwestern Ontario\n P: [\"ON\"], // Northern Ontario\n R: [\"MB\"], // Manitoba\n S: [\"SK\"], // Saskatchewan\n T: [\"AB\"], // Alberta\n V: [\"BC\"], // British Columbia\n X: [\"NU\", \"NT\"], // Northwest Territories and Nunavut\n Y: [\"YT\"], // Yukon\n};\n\n/**\n * Static regex patterns to validate TAX number possibility\n * ! It does not guarantee that it's a registered TAX nubmer in the country it belongs in !\n */\nexport const BUSINESS_COUNTRY_CODE_MAPPING = {\n // #############################################################################\n // Europe VIES country patterns\n //\n // Links:\n // - Main source for pattens (see Question #11) - https://ec.europa.eu/taxation_customs/vies/#/faq\n // - Alternative source for patterns -\n // https://www.avalara.com/vatlive/en/eu-vat-rules/eu-vat-number-registration/eu-vat-number-formats.html\n // - General info about VAT numbers - https://en.wikipedia.org/wiki/VAT_identification_number\n //\n // HACK: For user convenience:\n // - Make the vat number country prefix optional (\"DE\" in \"DE999999999\") as we will normalise it inside of the VIES\n // service!\n // - Match result case-insensitive, we can easily uppercase it in the service\n // #############################################################################\n /**\n * Austria - 1 block of 9 characters and The 1st position following the prefix is always \"U\"\n */\n [CountryCode.At]: {\n validation: /^(AT)?U[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * Belgium - 1 block of 10 digits - First digit after prefix is either 0 or 1\n */\n [CountryCode.Be]: {\n validation: /^(BE)?[0,1]{1}[0-9]{9}$/i,\n isOptional: false,\n },\n /**\n * Bulgaria - 1 block of 9 digits or 1 block of 10 digits\n */\n [CountryCode.Bg]: {\n validation: /^(BG)?[0-9]{9,10}$/i,\n isOptional: false,\n },\n /**\n * Cyprus - 1 block of 8 digits and trailing letter\n */\n [CountryCode.Cy]: {\n validation: /^(CY)?[0-9]{8}[A-Z]$/i,\n isOptional: false,\n },\n /**\n * Czech Republic - 1 block of either 8, 9 or 10 digits\n */\n [CountryCode.Cz]: {\n validation: /^(CZ)?[0-9]{8,10}$/i,\n isOptional: false,\n },\n /**\n * Germany - 9 digits\n */\n [CountryCode.De]: {\n validation: /^(DE)?[0-9]{9}$/i,\n isOptional: false,\n },\n /**\n * Denmark - 8 digits\n */\n [CountryCode.Dk]: {\n validation: /^(DK)?[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * Estonia - 9 digits\n */\n [CountryCode.Ee]: {\n validation: /^(EE)?[0-9]{9}$/i,\n isOptional: false,\n },\n /**\n * Greece - 9 digits\n * Note: We are using \"EL\" instead of its country code \"GR\" for prefix as per European Commission requirements, this\n * only affects how we validate it against VIES\n * @see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Imperfect_implementations\n */\n [UserAssignedCountryCode.El]: {\n validation: /^(EL)?[0-9]{9}$/i,\n isOptional: false,\n },\n /**\n * Spain - 9 characters Includes 1 or 2 alphabetical characters (first or last or first and last)\n * Note: We can reduce the pattern 2 regex or-pattern where:\n * 1. Handles scenario with leading letter and optional trailing letter\n * 2. Handles scenario with just trailing letter\n */\n [CountryCode.Es]: {\n validation: /^(ES)?(([A-Z][0-9]{7}[0-9A-Z])|([0-9]{8}[A-Z]))$/i,\n isOptional: false,\n },\n /**\n * Finland - 1 block of 8 digits\n */\n [CountryCode.Fi]: {\n validation: /^(FI)?[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * France & Monaco - 11 characters May include alphabetical characters (any except O or I) as first or second or first and\n * second characters\n *\n * TODO: Maybe add stricter validation for the invalid \"O\" and \"I\" characters (need to find a source that validates it)\n *\n * Fun-fact: France has actual math behind how they calculate the first 2 digits as they are a validation key, but we\n * don't require such a strict pattern as we would just end up doing actual checking up against Europe VIES\n * @see https://stackoverflow.com/a/33627030\n * @see https://en.wikipedia.org/wiki/VAT_identification_number\n */\n [UserAssignedCountryCode.Fr]: {\n validation: /^(FR)?[0-9A-Z]{2}[0-9]{9}$/i,\n isOptional: false,\n },\n /**\n * Croatia - 1 block of 11 digits\n */\n [CountryCode.Hr]: {\n validation: /^(HR)?[0-9]{11}$/i,\n isOptional: false,\n },\n /**\n * Hungary - 1 block of 8 digits\n */\n [CountryCode.Hu]: {\n validation: /^(HU)?[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * Ireland - 8 or 9 characters. Includes one or two alphabetical characters (last, or second and last, or last 2)\n *\n * It kinda has 3 styles:\n * - IE9S99999L (legacy, afaik WIKI told it's being phased out)\n * - IE9999999L\n * - IE9999999WI\n * @see https://en.wikipedia.org/wiki/VAT_identification_number\n */\n [CountryCode.Ie]: {\n validation: /^(IE)?[0-9][0-9A-Z][0-9]{5}[A-Z]{1,2}$/i,\n isOptional: false,\n },\n /**\n * Italy - 1 block of 11 digits\n */\n [CountryCode.It]: {\n validation: /^(IT)?[0-9]{11}$/i,\n isOptional: false,\n },\n /**\n * Lithuania - 1 block of 9 digits, or 1 block of 12 digits\n */\n [CountryCode.Lt]: {\n validation: /^(LT)?([0-9]{9}|[0-9]{12})$/i,\n isOptional: false,\n },\n /**\n * Luxembourg - 1 block of 8 digits\n */\n [CountryCode.Lu]: {\n validation: /^(LU)?[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * Latvia - 1 block of 11 digits\n */\n [CountryCode.Lv]: {\n validation: /^(LV)?[0-9]{11}$/i,\n isOptional: false,\n },\n /**\n * Malta - 1 block of 8 digits\n */\n [CountryCode.Mt]: {\n validation: /^(MT)?[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * Netherlands - 9 digits, the letter \"B\" and 2 \"check\" digits\n * @see https://business.gov.nl/regulation/using-checking-vat-numbers/\n *\n * Fun-fact: Avatax VAT reference link has a mistake of using \"BO2\" instead of \"B02\" for VAT group companies e.g https://eriks.com/en/contact/thank-you/\n */\n [CountryCode.Nl]: {\n validation: /^(NL)?[0-9]{9}B[0-9]{2}$/i,\n isOptional: false,\n },\n /**\n * Poland - 1 block of 10 digits\n */\n [CountryCode.Pl]: {\n validation: /^(PL)?[0-9]{10}$/i,\n isOptional: false,\n },\n /**\n * Portugal - 1 block of 9 digits\n */\n [CountryCode.Pt]: {\n validation: /^(PT)?[0-9]{9}$/i,\n isOptional: false,\n },\n /**\n * Romania - 1 block of minimum 2 digits and maximum 10 digits\n *\n * Note: Wasn't able to find an official Romanian doc that validates this pattern as internet had mixed info about it,\n * but sticking with EU VIES recommended 2-10 digits\n */\n [CountryCode.Ro]: {\n validation: /^(RO)?[0-9]{2,10}$/i,\n isOptional: false,\n },\n /**\n * Sweden - 1 block of 12 digits\n */\n [CountryCode.Se]: {\n validation: /^(SE)?[0-9]{12}$/i,\n isOptional: false,\n },\n /**\n * Slovenia - 1 block of 8 digits\n */\n [CountryCode.Si]: {\n validation: /^(SI)?[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * Slovakia - 1 block of 10 digits\n */\n [CountryCode.Sk]: {\n validation: /^(SK)?[0-9]{10}$/i,\n isOptional: false,\n },\n /**\n * Northern Ireland - 1 block of 3 digits, 1 block of 4 digits and 1 block of 2 digits; or the above followed by a block of 3 digits; or 1 block of 5 characters\n */\n [UserAssignedCountryCode.Xi]: {\n validation: /^(XI)?([0-9]{9}([0-9]{3})?|[A-Z]{2}[0-9]{3})$/i,\n isOptional: false,\n },\n // #############################################################################\n // Eurozone\n // #############################################################################\n /**\n * United Kingdom except (Northern Ireland a.k.a Xi)\n * @see https://www.gov.uk/register-for-vat/selling-or-moving-goods-between-northern-ireland-and-the-eu\n */\n [CountryCode.Gb]: {\n validation: /^(GB)?([0-9]{9}([0-9]{3})?|[A-Z]{2}[0-9]{3})$/i,\n isOptional: false,\n },\n /**\n * Norway - \"NO\" optional prefix, 9 digits, \"MVA\" optional suffix\n * @see https://www.avalara.com/vatlive/en/eu-vat-rules/eu-vat-number-registration/eu-vat-number-formats.html\n * @see https://vatstack.com/articles/norway-vat-number-validation\n * @see https://en.wikipedia.org/wiki/VAT_identification_number#:~:text=e.g.%20MK4032013544513-,Norway,-Organisasjonsnummer%0AOrganization%20number\n */\n [CountryCode.No]: {\n validation: /^(NO)?[0-9]{9}(MVA)?$/i,\n isOptional: false,\n },\n // TODO: should we add Switzerland? see https://www.avalara.com/vatlive/en/eu-vat-rules/eu-vat-number-registration/eu-vat-number-formats.html\n // Switzerland\n // [CountryCode.Ch]: ...\n // #############################################################################\n // Other (one-of's)\n // #############################################################################\n /**\n * United Arab Emirates - 1 block of 15 digits\n *\n * Note: no source for this found, using format based on UI AE TRN\n * Note: AE TRN does not use a country prefix\n */\n [CountryCode.Ae]: {\n validation: /^[0-9]{15}$/i,\n isOptional: false,\n },\n /**\n * South Africa - as per links below, should accept input that starts with 4 and following 9 digits.\n * @see https://secure.sarsefiling.co.za/vatvendorsearch.aspx\n * @see https://secure.sarsefiling.co.za/VATVendorSearch/application/help.html\n */\n [CountryCode.Za]: {\n validation: /^4[0-9]{9}$/i,\n isOptional: false,\n },\n\n [CountryCode.Br]: {\n validation: isCnpjValid,\n isOptional: false,\n },\n\n [CountryCode.In]: {\n validation: /^[0-9A-Z]{15}$/,\n isOptional: false,\n },\n\n [CountryCode.Tw]: {\n validation: /^[0-9A-Z]{8}$/,\n isOptional: false,\n },\n\n /**\n * @see https://www.fonoa.com/blog/new-mandatory-rfc-validation-method-in-mexico\n * A businesses RFC consists of 12 digits with the following structure: xxxyyyyyyzzz\n * (x = letters, y = numbers, z = alphanumeric)\n */\n [CountryCode.Mx]: {\n validation: /^[A-Z]{3}[0-9]{6}[0-9A-Z]{3}$/i,\n isOptional: false,\n },\n} as const;\n// FIXME: once we upgrade to Next 13 which supports typescript satisfies we can use this to make th pattern stricter\n// FIXME: \"isOptional: false\" could be safely removed once we use the \"satisfies\" as we only care about cases when \"isOptional: true\". It was added just to make TS happy.\n// } satisfies CountryTaxValidationMapping;\n\nexport const RESIDENTIAL_COUNTRY_CODE_MAPPING = {\n // #############################################################################\n // Other (one-of's)\n // #############################################################################\n [CountryCode.Br]: {\n validation: isCpfValid,\n isOptional: false,\n },\n\n [CountryCode.In]: {\n validation: /^[0-9A-Z]{15}$/,\n isOptional: true,\n },\n} as const;\n// FIXME: once we upgrade to Next 13 which supports typescript satisfies we can use this to make th pattern stricter\n// FIXME: \"isOptional: false\" could be safely removed once we use the \"satisfies\" as we only care about cases when \"isOptional: true\". It was added just to make TS happy.\n// } satisfies CountryTaxValidationMapping;\n\n/**\n * Set of type-safe rules that we use in `getUserAssignedCountryCode` to determine UserAssignedCountryCode\n */\nexport const USER_ASSIGNED_COUNTRY_MAPPING_RULES = {\n [UserAssignedCountryCode.Xi]: [\n [CountryCode.Gb, \"NIR\"], // Northern Ireland\n ],\n [UserAssignedCountryCode.El]: [\n [CountryCode.Gr], // Greece\n ],\n [UserAssignedCountryCode.Fr]: [\n [CountryCode.Fr], // France\n [CountryCode.Mc], // Monaco\n ],\n // FIXME: once we upgrade to Next 13 which supports typescript satisfies we can use this to make th pattern stricter\n} as {\n [key in UserAssignedCountryCode]: [\n countryCode: CountryCode,\n province?: string,\n ][];\n};\n\n/**\n * List of found alternative province names that results\n * from Google Places API. This is used to map the alternative\n * province name to the correct province code for auto-fill.\n */\nexport const ALTERNATIVE_PROVINCE_NAMES: {\n [key in CountryCode]?: Record<string, string>;\n} = {\n // United Arab Emirates\n [CountryCode.Ae]: {\n \"Ras al Khaimah\": \"RK\",\n \"Umm Al Quawain\": \"UQ\",\n },\n // Ireland\n [CountryCode.Ie]: {\n \"County Kildare\": \"KE\",\n \"County Kilkenny\": \"KK\",\n },\n};\n"],"names":["CA_POSTAL_CODE_REGEX","ZA_POSTAL_CODE_REGEX","CA_POSTAL_CODE_PROVINCE_FIRST_CHARACTER","A","B","C","E","G","H","J","K","L","M","N","P","R","S","T","V","X","Y","BUSINESS_COUNTRY_CODE_MAPPING","CountryCode","At","validation","isOptional","Be","Bg","Cy","Cz","De","Dk","Ee","UserAssignedCountryCode","El","Es","Fi","Fr","Hr","Hu","Ie","It","Lt","Lu","Lv","Mt","Nl","Pl","Pt","Ro","Se","Si","Sk","Xi","Gb","No","Ae","Za","Br","isCnpjValid","In","Tw","Mx","RESIDENTIAL_COUNTRY_CODE_MAPPING","isCpfValid","USER_ASSIGNED_COUNTRY_MAPPING_RULES","Gr","Mc","ALTERNATIVE_PROVINCE_NAMES"],"mappings":";;;;AAUO,MAAMA,oBACX,GAAA,mDAAA;AASK,MAAMC,oBAAuB,GAAA,YAAA;AAU7B,MAAMC,uCAA0C,GAAA;EACrDC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA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ZC,UAAY,EAAA;EACd;AACF,CAAA;AAQO,MAAMwC,mCAAsC,GAAA;EACjD,CAAChC,uBAAwB,CAAAoB,EAAE,GAAG,CAC5B,CAAC/B,WAAY,CAAAgC,EAAA,EAAI,KAAK;EAAA;EAAA,CACxB;EACA,CAACrB,uBAAwB,CAAAC,EAAE,GAAG,CAC5B,CAACZ,YAAY4C,EAAE;EAAA;EAAA,CACjB;EACA,CAACjC,uBAAwB,CAAAI,EAAE,GAAG,CAC5B,CAACf,YAAYe,EAAE,CAAA;EAAA;EACf,CAACf,YAAY6C,EAAE;EAAA;EAAA;EACjB;AAEF,CAAA;AAYO,MAAMC,0BAET,GAAA;EAAA;EAEF,CAAC9C,WAAY,CAAAkC,EAAE,GAAG;IAChB,gBAAkB,EAAA,IAAA;IAClB,gBAAkB,EAAA;EACpB,CAAA;EAAA;EAEA,CAAClC,WAAY,CAAAkB,EAAE,GAAG;IAChB,gBAAkB,EAAA,IAAA;IAClB,iBAAmB,EAAA;EACrB;AACF,CAAA;"}
1
+ {"version":3,"file":"address.mjs","sources":["../../src/constants/address.ts"],"sourcesContent":["import { CountryCode, UserAssignedCountryCode } from \"../types\";\nimport { isCnpjValid, isCpfValid } from \"../utils/tax/brazil\";\n\n/**\n * Canada post code validation, we changed the regex from the url taken on by forcing a space in the middle (it's\n * optional there)\n * @see https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch04s15.html#:~:text=Aside%20from%20those%20two%20exceptions,for%20Canada%20Post's%20Ottawa%20headquarters.\n *\n * @deprecated with version 5.38.0 Use COUNTRY_CODE_POSTAL_CODE_REGEX\n */\nexport const CA_POSTAL_CODE_REGEX =\n /^(?!.*[DFIOQU])[A-VXY][0-9][A-Z] [0-9][A-Z][0-9]$/;\n\n/**\n * South Africa uses a simple 4-digit ZIP code pattern.\n * Unfortunately there doesn't seem have be pattern that some specific digits present a specific state/city that is\n * easily regex'able\n *\n * @deprecated with version 5.38.0 Use COUNTRY_CODE_POSTAL_CODE_REGEX\n */\nexport const ZA_POSTAL_CODE_REGEX = /^[0-9]{4}$/;\n\n/**\n * Mapping for postal code first letter to state province code.\n * Used for stricter postal code validation so zip code matches right state\n * Data taken from https://www12.statcan.gc.ca/census-recensement/2021/ref/dict/tab/index-eng.cfm?ID=t1_9\n * Related task: https://ubiquiti.atlassian.net/browse/NEP-1184?focusedCommentId=292248\n *\n * @deprecated use from packages/store.core/src/constants/postalCode.ts\n */\nexport const CA_POSTAL_CODE_PROVINCE_FIRST_CHARACTER = {\n A: [\"NL\"], // Newfoundland and Labrador\n B: [\"NS\"], // Nova Scotia\n C: [\"PE\"], // Prince Edward Island\n E: [\"NB\"], // New Brunswick\n G: [\"QC\"], // Eastern Quebec\n H: [\"QC\"], // Metropolitan Montréal\n J: [\"QC\"], // Western Quebec\n K: [\"ON\"], // Eastern Ontario\n L: [\"ON\"], // Central Ontario\n M: [\"ON\"], // Metropolitan Toronto\n N: [\"ON\"], // Southwestern Ontario\n P: [\"ON\"], // Northern Ontario\n R: [\"MB\"], // Manitoba\n S: [\"SK\"], // Saskatchewan\n T: [\"AB\"], // Alberta\n V: [\"BC\"], // British Columbia\n X: [\"NU\", \"NT\"], // Northwest Territories and Nunavut\n Y: [\"YT\"], // Yukon\n};\n\n/**\n * Static regex patterns to validate TAX number possibility\n * ! It does not guarantee that it's a registered TAX nubmer in the country it belongs in !\n */\nexport const BUSINESS_COUNTRY_CODE_MAPPING = {\n // #############################################################################\n // Europe VIES country patterns\n //\n // Links:\n // - Main source for pattens (see Question #11) - https://ec.europa.eu/taxation_customs/vies/#/faq\n // - Alternative source for patterns -\n // https://www.avalara.com/vatlive/en/eu-vat-rules/eu-vat-number-registration/eu-vat-number-formats.html\n // - General info about VAT numbers - https://en.wikipedia.org/wiki/VAT_identification_number\n //\n // HACK: For user convenience:\n // - Make the vat number country prefix optional (\"DE\" in \"DE999999999\") as we will normalise it inside of the VIES\n // service!\n // - Match result case-insensitive, we can easily uppercase it in the service\n // #############################################################################\n /**\n * Austria - 1 block of 9 characters and The 1st position following the prefix is always \"U\"\n */\n [CountryCode.At]: {\n validation: /^(AT)?U[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * Belgium - 1 block of 10 digits - First digit after prefix is either 0 or 1\n */\n [CountryCode.Be]: {\n validation: /^(BE)?[0,1]{1}[0-9]{9}$/i,\n isOptional: false,\n },\n /**\n * Bulgaria - 1 block of 9 digits or 1 block of 10 digits\n */\n [CountryCode.Bg]: {\n validation: /^(BG)?[0-9]{9,10}$/i,\n isOptional: false,\n },\n /**\n * Cyprus - 1 block of 8 digits and trailing letter\n */\n [CountryCode.Cy]: {\n validation: /^(CY)?[0-9]{8}[A-Z]$/i,\n isOptional: false,\n },\n /**\n * Czech Republic - 1 block of either 8, 9 or 10 digits\n */\n [CountryCode.Cz]: {\n validation: /^(CZ)?[0-9]{8,10}$/i,\n isOptional: false,\n },\n /**\n * Germany - 9 digits\n */\n [CountryCode.De]: {\n validation: /^(DE)?[0-9]{9}$/i,\n isOptional: false,\n },\n /**\n * Denmark - 8 digits\n */\n [CountryCode.Dk]: {\n validation: /^(DK)?[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * Estonia - 9 digits\n */\n [CountryCode.Ee]: {\n validation: /^(EE)?[0-9]{9}$/i,\n isOptional: false,\n },\n /**\n * Greece - 9 digits\n * Note: We are using \"EL\" instead of its country code \"GR\" for prefix as per European Commission requirements, this\n * only affects how we validate it against VIES\n * @see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Imperfect_implementations\n */\n [UserAssignedCountryCode.El]: {\n validation: /^(EL)?[0-9]{9}$/i,\n isOptional: false,\n },\n /**\n * Spain - 9 characters Includes 1 or 2 alphabetical characters (first or last or first and last)\n * Note: We can reduce the pattern 2 regex or-pattern where:\n * 1. Handles scenario with leading letter and optional trailing letter\n * 2. Handles scenario with just trailing letter\n */\n [CountryCode.Es]: {\n validation: /^(ES)?(([A-Z][0-9]{7}[0-9A-Z])|([0-9]{8}[A-Z]))$/i,\n isOptional: false,\n },\n /**\n * Finland - 1 block of 8 digits\n */\n [CountryCode.Fi]: {\n validation: /^(FI)?[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * France & Monaco - 11 characters May include alphabetical characters (any except O or I) as first or second or first and\n * second characters\n *\n * TODO: Maybe add stricter validation for the invalid \"O\" and \"I\" characters (need to find a source that validates it)\n *\n * Fun-fact: France has actual math behind how they calculate the first 2 digits as they are a validation key, but we\n * don't require such a strict pattern as we would just end up doing actual checking up against Europe VIES\n * @see https://stackoverflow.com/a/33627030\n * @see https://en.wikipedia.org/wiki/VAT_identification_number\n */\n [UserAssignedCountryCode.Fr]: {\n validation: /^(FR)?[0-9A-Z]{2}[0-9]{9}$/i,\n isOptional: false,\n },\n /**\n * Croatia - 1 block of 11 digits\n */\n [CountryCode.Hr]: {\n validation: /^(HR)?[0-9]{11}$/i,\n isOptional: false,\n },\n /**\n * Hungary - 1 block of 8 digits\n */\n [CountryCode.Hu]: {\n validation: /^(HU)?[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * Ireland - 8 or 9 characters. Includes one or two alphabetical characters (last, or second and last, or last 2)\n *\n * It kinda has 3 styles:\n * - IE9S99999L (legacy, afaik WIKI told it's being phased out)\n * - IE9999999L\n * - IE9999999WI\n * @see https://en.wikipedia.org/wiki/VAT_identification_number\n */\n [CountryCode.Ie]: {\n validation: /^(IE)?[0-9][0-9A-Z][0-9]{5}[A-Z]{1,2}$/i,\n isOptional: false,\n },\n /**\n * Italy - 1 block of 11 digits\n */\n [CountryCode.It]: {\n validation: /^(IT)?[0-9]{11}$/i,\n isOptional: false,\n },\n /**\n * Lithuania - 1 block of 9 digits, or 1 block of 12 digits\n */\n [CountryCode.Lt]: {\n validation: /^(LT)?([0-9]{9}|[0-9]{12})$/i,\n isOptional: false,\n },\n /**\n * Luxembourg - 1 block of 8 digits\n */\n [CountryCode.Lu]: {\n validation: /^(LU)?[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * Latvia - 1 block of 11 digits\n */\n [CountryCode.Lv]: {\n validation: /^(LV)?[0-9]{11}$/i,\n isOptional: false,\n },\n /**\n * Malta - 1 block of 8 digits\n */\n [CountryCode.Mt]: {\n validation: /^(MT)?[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * Netherlands - 9 digits, the letter \"B\" and 2 \"check\" digits\n * @see https://business.gov.nl/regulation/using-checking-vat-numbers/\n *\n * Fun-fact: Avatax VAT reference link has a mistake of using \"BO2\" instead of \"B02\" for VAT group companies e.g https://eriks.com/en/contact/thank-you/\n */\n [CountryCode.Nl]: {\n validation: /^(NL)?[0-9]{9}B[0-9]{2}$/i,\n isOptional: false,\n },\n /**\n * Poland - 1 block of 10 digits\n */\n [CountryCode.Pl]: {\n validation: /^(PL)?[0-9]{10}$/i,\n isOptional: false,\n },\n /**\n * Portugal - 1 block of 9 digits\n */\n [CountryCode.Pt]: {\n validation: /^(PT)?[0-9]{9}$/i,\n isOptional: false,\n },\n /**\n * Romania - 1 block of minimum 2 digits and maximum 10 digits\n *\n * Note: Wasn't able to find an official Romanian doc that validates this pattern as internet had mixed info about it,\n * but sticking with EU VIES recommended 2-10 digits\n */\n [CountryCode.Ro]: {\n validation: /^(RO)?[0-9]{2,10}$/i,\n isOptional: false,\n },\n /**\n * Sweden - 1 block of 12 digits\n */\n [CountryCode.Se]: {\n validation: /^(SE)?[0-9]{12}$/i,\n isOptional: false,\n },\n /**\n * Slovenia - 1 block of 8 digits\n */\n [CountryCode.Si]: {\n validation: /^(SI)?[0-9]{8}$/i,\n isOptional: false,\n },\n /**\n * Slovakia - 1 block of 10 digits\n */\n [CountryCode.Sk]: {\n validation: /^(SK)?[0-9]{10}$/i,\n isOptional: false,\n },\n /**\n * Northern Ireland - 1 block of 3 digits, 1 block of 4 digits and 1 block of 2 digits; or the above followed by a block of 3 digits; or 1 block of 5 characters\n */\n [UserAssignedCountryCode.Xi]: {\n validation: /^(XI)?([0-9]{9}([0-9]{3})?|[A-Z]{2}[0-9]{3})$/i,\n isOptional: false,\n },\n // #############################################################################\n // Eurozone\n // #############################################################################\n /**\n * United Kingdom except (Northern Ireland a.k.a Xi)\n * @see https://www.gov.uk/register-for-vat/selling-or-moving-goods-between-northern-ireland-and-the-eu\n */\n [CountryCode.Gb]: {\n validation: /^(GB)?([0-9]{9}([0-9]{3})?|[A-Z]{2}[0-9]{3})$/i,\n isOptional: false,\n },\n /**\n * Norway - \"NO\" optional prefix, 9 digits, \"MVA\" optional suffix\n * @see https://www.avalara.com/vatlive/en/eu-vat-rules/eu-vat-number-registration/eu-vat-number-formats.html\n * @see https://vatstack.com/articles/norway-vat-number-validation\n * @see https://en.wikipedia.org/wiki/VAT_identification_number#:~:text=e.g.%20MK4032013544513-,Norway,-Organisasjonsnummer%0AOrganization%20number\n */\n [CountryCode.No]: {\n validation: /^(NO)?[0-9]{9}(MVA)?$/i,\n isOptional: false,\n },\n // TODO: should we add Switzerland? see https://www.avalara.com/vatlive/en/eu-vat-rules/eu-vat-number-registration/eu-vat-number-formats.html\n // Switzerland\n // [CountryCode.Ch]: ...\n // #############################################################################\n // Other (one-of's)\n // #############################################################################\n /**\n * United Arab Emirates - 1 block of 15 digits\n *\n * Note: no source for this found, using format based on UI AE TRN\n * Note: AE TRN does not use a country prefix\n */\n [CountryCode.Ae]: {\n validation: /^[0-9]{15}$/i,\n isOptional: false,\n },\n /**\n * South Africa - as per links below, should accept input that starts with 4 and following 9 digits.\n * @see https://secure.sarsefiling.co.za/vatvendorsearch.aspx\n * @see https://secure.sarsefiling.co.za/VATVendorSearch/application/help.html\n */\n [CountryCode.Za]: {\n validation: /^4[0-9]{9}$/i,\n isOptional: false,\n },\n\n [CountryCode.Br]: {\n validation: isCnpjValid,\n isOptional: false,\n },\n\n [CountryCode.In]: {\n validation: /^[0-9A-Z]{15}$/,\n isOptional: false,\n },\n\n [CountryCode.Tw]: {\n validation: /^[0-9A-Z]{8}$/,\n isOptional: false,\n },\n\n /**\n * @see https://www.fonoa.com/blog/new-mandatory-rfc-validation-method-in-mexico\n * A businesses RFC consists of 12 characters with the following structure: xxxyyyyyyzzz\n * (x = letters (including Ñ and &), y = numbers, z = alphanumeric)\n */\n [CountryCode.Mx]: {\n validation: /^[A-ZÑ&]{3}\\d{6}[A-Z0-9]{3}$/i,\n isOptional: false,\n },\n} as const;\n// FIXME: once we upgrade to Next 13 which supports typescript satisfies we can use this to make th pattern stricter\n// FIXME: \"isOptional: false\" could be safely removed once we use the \"satisfies\" as we only care about cases when \"isOptional: true\". It was added just to make TS happy.\n// } satisfies CountryTaxValidationMapping;\n\nexport const RESIDENTIAL_COUNTRY_CODE_MAPPING = {\n // #############################################################################\n // Other (one-of's)\n // #############################################################################\n [CountryCode.Br]: {\n validation: isCpfValid,\n isOptional: false,\n },\n\n [CountryCode.In]: {\n validation: /^[0-9A-Z]{15}$/,\n isOptional: true,\n },\n} as const;\n// FIXME: once we upgrade to Next 13 which supports typescript satisfies we can use this to make th pattern stricter\n// FIXME: \"isOptional: false\" could be safely removed once we use the \"satisfies\" as we only care about cases when \"isOptional: true\". It was added just to make TS happy.\n// } satisfies CountryTaxValidationMapping;\n\n/**\n * Set of type-safe rules that we use in `getUserAssignedCountryCode` to determine UserAssignedCountryCode\n */\nexport const USER_ASSIGNED_COUNTRY_MAPPING_RULES = {\n [UserAssignedCountryCode.Xi]: [\n [CountryCode.Gb, \"NIR\"], // Northern Ireland\n ],\n [UserAssignedCountryCode.El]: [\n [CountryCode.Gr], // Greece\n ],\n [UserAssignedCountryCode.Fr]: [\n [CountryCode.Fr], // France\n [CountryCode.Mc], // Monaco\n ],\n // FIXME: once we upgrade to Next 13 which supports typescript satisfies we can use this to make th pattern stricter\n} as {\n [key in UserAssignedCountryCode]: [\n countryCode: CountryCode,\n province?: string,\n ][];\n};\n\n/**\n * List of found alternative province names that results\n * from Google Places API. This is used to map the alternative\n * province name to the correct province code for auto-fill.\n */\nexport const ALTERNATIVE_PROVINCE_NAMES: {\n [key in CountryCode]?: Record<string, string>;\n} = {\n // United Arab Emirates\n [CountryCode.Ae]: {\n \"Ras al Khaimah\": \"RK\",\n \"Umm Al Quawain\": \"UQ\",\n },\n // Ireland\n [CountryCode.Ie]: {\n \"County Kildare\": \"KE\",\n \"County Kilkenny\": \"KK\",\n },\n};\n"],"names":["CA_POSTAL_CODE_REGEX","ZA_POSTAL_CODE_REGEX","CA_POSTAL_CODE_PROVINCE_FIRST_CHARACTER","A","B","C","E","G","H","J","K","L","M","N","P","R","S","T","V","X","Y","BUSINESS_COUNTRY_CODE_MAPPING","CountryCode","At","validation","isOptional","Be","Bg","Cy","Cz","De","Dk","Ee","UserAssignedCountryCode","El","Es","Fi","Fr","Hr","Hu","Ie","It","Lt","Lu","Lv","Mt","Nl","Pl","Pt","Ro","Se","Si","Sk","Xi","Gb","No","Ae","Za","Br","isCnpjValid","In","Tw","Mx","RESIDENTIAL_COUNTRY_CODE_MAPPING","isCpfValid","USER_ASSIGNED_COUNTRY_MAPPING_RULES","Gr","Mc","ALTERNATIVE_PROVINCE_NAMES"],"mappings":";;;;AAUO,MAAMA,oBACX,GAAA,mDAAA;AASK,MAAMC,oBAAuB,GAAA,YAAA;AAU7B,MAAMC,uCAA0C,GAAA;EACrDC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EACRC,CAAA,EAAG,CAAC,IAAI,CAAA;EAAA;EAC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mCAAsC,GAAA;EACjD,CAAChC,uBAAwB,CAAAoB,EAAE,GAAG,CAC5B,CAAC/B,WAAY,CAAAgC,EAAA,EAAI,KAAK;EAAA;EAAA,CACxB;EACA,CAACrB,uBAAwB,CAAAC,EAAE,GAAG,CAC5B,CAACZ,YAAY4C,EAAE;EAAA;EAAA,CACjB;EACA,CAACjC,uBAAwB,CAAAI,EAAE,GAAG,CAC5B,CAACf,YAAYe,EAAE,CAAA;EAAA;EACf,CAACf,YAAY6C,EAAE;EAAA;EAAA;EACjB;AAEF,CAAA;AAYO,MAAMC,0BAET,GAAA;EAAA;EAEF,CAAC9C,WAAY,CAAAkC,EAAE,GAAG;IAChB,gBAAkB,EAAA,IAAA;IAClB,gBAAkB,EAAA;EACpB,CAAA;EAAA;EAEA,CAAClC,WAAY,CAAAkB,EAAE,GAAG;IAChB,gBAAkB,EAAA,IAAA;IAClB,iBAAmB,EAAA;EACrB;AACF,CAAA;"}
@@ -5,6 +5,17 @@ var dinero_js = require('dinero.js');
5
5
  require('../../types/index.js');
6
6
  var generated = require('../../types/generated.js');
7
7
  "use strict";
8
+ const roundToNearestFull059Fn = input => {
9
+ const roundedNumber = Math.round(input);
10
+ const remainder = roundedNumber % 10;
11
+ if (remainder <= 2) {
12
+ return roundedNumber - remainder;
13
+ } else if (remainder <= 7) {
14
+ return roundedNumber - remainder + 5;
15
+ } else {
16
+ return roundedNumber - remainder + 9;
17
+ }
18
+ };
8
19
  const Round = {
9
20
  /**
10
21
  * ⚠️ Instead of using Math.round, we HAVE to use this method to round the financial numbers everywhere where we CAN'T
@@ -30,9 +41,13 @@ const Round = {
30
41
  // financialRound = Math.round;
31
42
  Shipping: dinero_js.down,
32
43
  Prettify: dinero_js.down,
44
+ /**
45
+ * ! Disclaimer may not work for "weird" currencies as expected
46
+ */
47
+ PrettifyFull059: roundToNearestFull059Fn,
33
48
  Subunit: dinero_js.halfUp
34
49
  };
35
- const prettifyPriceLookup = /* @__PURE__ */new Map([[currencies.USD.code, 20], [currencies.CAD.code, 20], [currencies.EUR.code, 20], [currencies.GBP.code, 20], [currencies.AED.code, 50],
50
+ const prettifyPriceLookup = /* @__PURE__ */new Map([[currencies.USD.code, 20], [currencies.CAD.code, 50], [currencies.EUR.code, 50], [currencies.GBP.code, 50], [currencies.AED.code, 50],
36
51
  // Approximately every price above ~1.1 usd will be rounded in ZAR
37
52
  [currencies.ZAR.code, 20]]);
38
53
  const smallestSubunitLookup = /* @__PURE__ */new Map([
@@ -153,6 +168,7 @@ exports.Round = Round;
153
168
  exports.TAX_RATE_DINERO_CURRENCY = TAX_RATE_DINERO_CURRENCY;
154
169
  exports.localizedCurrencyLookup = localizedCurrencyLookup;
155
170
  exports.prettifyPriceLookup = prettifyPriceLookup;
171
+ exports.roundToNearestFull059Fn = roundToNearestFull059Fn;
156
172
  exports.smallestSubunitLookup = smallestSubunitLookup;
157
173
  exports.storesWithPerItemTaxRate = storesWithPerItemTaxRate;
158
174
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../src/utils/money/constants.ts"],"sourcesContent":["import {\n AED,\n BGN,\n BRL,\n CAD,\n CHF,\n CZK,\n DKK,\n EUR,\n GBP,\n HRK,\n HUF,\n INR,\n JPY,\n MXN,\n NOK,\n PLN,\n RON,\n SEK,\n SGD,\n TWD,\n USD,\n ZAR,\n} from \"@dinero.js/currencies\";\nimport { down, halfEven, halfUp } from \"dinero.js\";\n\nimport type { StoreId } from \"../../types\";\nimport { Currency } from \"../../types\";\nimport type {\n Cents,\n DinoCurrency,\n LocalizedCurrency,\n RoundingFn,\n} from \"./types\";\n\n// #############################################################################\n// Constants\n// #############################################################################\n\nexport const Round = {\n /**\n * ⚠️ Instead of using Math.round, we HAVE to use this method to round the financial numbers everywhere where we CAN'T\n * deal with dinero.js (Dinero.js should be the priority). But often for converting from API requests we have to\n * normalise the values so we use this method.\n *\n * It just a re-export of the dinero.js halfEven (a.k.a bankers rounding) method which is the default rounding method.\n * @see https://github.com/dinerojs/dinero.js/blob/main/packages/core/src/round/halfEven.ts\n * @see\n *\n * Compared to Math.round (arithmetic rounding) it differentiates that it changes the `.5` round up or down behaviour based on if the rounded\n * number would be an even number. So 1.5 would round to 2 while 2.5 would round to 2.\n * See the youtube link below for a brief exclamation on why it's important to use this method over regular rounding (half-up):\n * https://youtu.be/yuRdYlZvs1E\n *\n * If you really want to get knee-deep in the rounding subject, you can read the following:\n * https://en.wikipedia.org/wiki/Rounding#Round_half_toward_zero\n */\n Financial: halfEven,\n // TODO: maybe we should have separate rounding functions depending on the input value?\n // Reading from wiki \"Round half toward zero\" is better if the value is already \"normalized to cents\"\n // But the \"Round half to even\" seems better for when working with float like values\n // financialRound = Math.round;\n Shipping: down,\n Prettify: down,\n Subunit: halfUp,\n} satisfies Record<string, RoundingFn>;\n\n/**\n * Mapping of how prices should be rounded down to \"whole numbers\" after certain threshold\n */\nexport const prettifyPriceLookup = new Map([\n [USD.code, 20],\n [CAD.code, 20],\n [EUR.code, 20],\n [GBP.code, 20],\n [AED.code, 50],\n // Approximately every price above ~1.1 usd will be rounded in ZAR\n [ZAR.code, 20],\n]);\n\n/**\n * Map of dinero code to subunit digit count.\n */\nexport const smallestSubunitLookup = new Map<string, [Cents, RoundingFn]>([\n /**\n * TWD does not use subunits at all in day to day transactions.\n */\n [TWD.code, [0, Round.Subunit]],\n]);\n\n/**\n * Precompiled list for faster currency and locale lookups\n */\nexport const localizedCurrencyLookup = new Map<Currency, LocalizedCurrency>([\n [Currency.Aed, { currency: AED, locale: \"ar-AE\" }],\n [Currency.Bgn, { currency: BGN, locale: \"bg-BG\" }],\n [Currency.Cad, { currency: CAD, locale: \"en-CA\" }],\n [Currency.Chf, { currency: CHF, locale: \"it-CH\" }],\n [Currency.Czk, { currency: CZK, locale: \"cs-CZ\" }],\n [Currency.Dkk, { currency: DKK, locale: \"da-DK\" }],\n [Currency.Eur, { currency: EUR, locale: \"de-DE\" }],\n [Currency.Gbp, { currency: GBP, locale: \"en-GB\" }],\n [Currency.Hrk, { currency: HRK, locale: \"hr-HR\" }],\n [Currency.Huf, { currency: HUF, locale: \"hu-HU\" }],\n [Currency.Nok, { currency: NOK, locale: \"no-NO\" }],\n [Currency.Pln, { currency: PLN, locale: \"pl-PL\" }],\n [Currency.Ron, { currency: RON, locale: \"ro-RO\" }],\n [Currency.Sek, { currency: SEK, locale: \"sv-SE\" }],\n [Currency.Usd, { currency: USD, locale: \"en-US\" }],\n [Currency.Zar, { currency: ZAR, locale: \"en-ZA\" }],\n [Currency.Inr, { currency: INR, locale: \"en-IN\" }],\n [Currency.Sgd, { currency: SGD, locale: \"en-SG\" }],\n [Currency.Brl, { currency: BRL, locale: \"pt-BR\" }],\n // NOTE: en-JP Doesn't exist\n [Currency.Jpy, { currency: JPY, locale: \"en-JP\" }],\n // NOTE: en-TW Doesn't exist\n [Currency.Twd, { currency: TWD, locale: \"en-TW\" }],\n [Currency.Mxn, { currency: MXN, locale: \"es-MX\" }],\n]);\n\n// #############################################################################\n// Tax Rate\n// #############################################################################\n/**\n * List of stores that require calculating per single item qty and then combining them to get the total tax amount for a\n * single line. Rest of the stores inherit default behavior that tax calculated on whole line item\n *\n * ! IMPORTANT: When changing need to sync that store.backend `AVATAX_CUSTOM_COMPANY_CODES` is updated to reflect the change\n *\n * FIXME: as PR for the change as unfinished currently disabled to enable the functionality that calculates tax per single item as requires\n * specific testing both for our custom tax and Avalara stores that use custom company codes. So the groundwork for\n * different tax calculations is there just need to enable on the share side and test if it works\n */\nexport const storesWithPerItemTaxRate = new Set([\n // #############################################################################\n // Stores with custom tax rates\n // #############################################################################\n // StoreId.Br,\n // StoreId.Tw,\n // #############################################################################\n // Stores with Avalara, but will have custom company codes to handle per-item tax rate\n // #############################################################################\n // StoreId.Jp,\n // StoreId.Sg,\n] as StoreId[]);\n\n/**\n * Dinero currency option block for working with tax rates within dinero\n */\nexport const TAX_RATE_DINERO_CURRENCY = {\n base: 10,\n /**\n * We expect the tax rate to be in the range of 0..1\n * 0 --> 0%\n * 1 --> 100%\n * 0.21 --> 21%\n * 0.2169 --> 21.69%\n * 0.12345678 --> 12.345678%\n * !!! Don't change as this value is tied to store.backend DB schema !!!\n */\n exponent: 8,\n code: \"\", // Not important\n} satisfies DinoCurrency;\n\n// #############################################################################\n// Exchange Rate\n// #############################################################################\n\nexport const EXCHANGE_RATE_DINERO_CURRENCY = {\n base: 10,\n /**\n * We support having certain decimal places for exchange rates\n * !!! Don't change as this value is tied to store.backend DB schema !!!\n */\n exponent: 6,\n code: \"\", // Not important\n} satisfies DinoCurrency;\n"],"names":["Round","Financial","halfEven","Shipping","down","Prettify","Subunit","halfUp","prettifyPriceLookup","Map","USD","code","CAD","EUR","GBP","AED","ZAR","smallestSubunitLookup","TWD","localizedCurrencyLookup","Currency","Aed","currency","locale","Bgn","BGN","Cad","Chf","CHF","Czk","CZK","Dkk","DKK","Eur","Gbp","Hrk","HRK","Huf","HUF","Nok","NOK","Pln","PLN","Ron","RON","Sek","SEK","Usd","Zar","Inr","INR","Sgd","SGD","Brl","BRL","Jpy","JPY","Twd","Mxn","MXN","storesWithPerItemTaxRate","Set","TAX_RATE_DINERO_CURRENCY","base","exponent","EXCHANGE_RATE_DINERO_CURRENCY"],"mappings":";;;;;;;AAuCO,MAAMA,KAAQ,GAAA;EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAkBnBC,SAAW,EAAAC,SAAA,CAAAA,QAAA;EAAA;EAAA;EAAA;EAAA;EAKXC,QAAU,EAAAC,SAAA,CAAAA,IAAA;EACVC,QAAU,EAAAD,SAAA,CAAAA,IAAA;EACVE,OAAS,EAAAC,SAAA,CAAAA;AACX,CAAA;AAKa,MAAAC,mBAAA,GAAA,mBAA0BC,GAAI,CAAA,CACzC,CAACC,UAAI,CAAAA,GAAA,CAAAC,IAAA,EAAM,EAAE,CAAA,EACb,CAACC,UAAI,CAAAA,GAAA,C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PLN,\n RON,\n SEK,\n SGD,\n TWD,\n USD,\n ZAR,\n} from \"@dinero.js/currencies\";\nimport { down, halfEven, halfUp } from \"dinero.js\";\n\nimport type { StoreId } from \"../../types\";\nimport { Currency } from \"../../types\";\nimport type {\n Cents,\n DinoCurrency,\n LocalizedCurrency,\n RoundingFn,\n} from \"./types\";\n\n// #############################################################################\n// Constants\n// #############################################################################\n\n/**\n * Custom rounding method to be used with dinero.js\n * This rounding method will round to nearest FULL 0/5/9 (and strip cents)\n * (moved here to mitigate ReferenceError: Cannot access 'roundToNearestFull059Fn' before initialization)\n *\n * @see: https://ubiquiti.atlassian.net/browse/NEP-3846\n */\nexport const roundToNearestFull059Fn: RoundingFn = (input: number) => {\n /**\n * Input comes as float, for this rounding we don't need cents, so round\n * to nearest full number\n */\n const roundedNumber = Math.round(input);\n\n // Determine nearest rounding value\n const remainder = roundedNumber % 10;\n if (remainder <= 2) {\n // Round down to nearest 0\n return roundedNumber - remainder;\n } else if (remainder <= 7) {\n // Round to nearest 5\n return roundedNumber - remainder + 5;\n } else {\n // Round up to nearest 9\n return roundedNumber - remainder + 9;\n }\n};\n\nexport const Round = {\n /**\n * ⚠️ Instead of using Math.round, we HAVE to use this method to round the financial numbers everywhere where we CAN'T\n * deal with dinero.js (Dinero.js should be the priority). But often for converting from API requests we have to\n * normalise the values so we use this method.\n *\n * It just a re-export of the dinero.js halfEven (a.k.a bankers rounding) method which is the default rounding method.\n * @see https://github.com/dinerojs/dinero.js/blob/main/packages/core/src/round/halfEven.ts\n * @see\n *\n * Compared to Math.round (arithmetic rounding) it differentiates that it changes the `.5` round up or down behaviour based on if the rounded\n * number would be an even number. So 1.5 would round to 2 while 2.5 would round to 2.\n * See the youtube link below for a brief exclamation on why it's important to use this method over regular rounding (half-up):\n * https://youtu.be/yuRdYlZvs1E\n *\n * If you really want to get knee-deep in the rounding subject, you can read the following:\n * https://en.wikipedia.org/wiki/Rounding#Round_half_toward_zero\n */\n Financial: halfEven,\n // TODO: maybe we should have separate rounding functions depending on the input value?\n // Reading from wiki \"Round half toward zero\" is better if the value is already \"normalized to cents\"\n // But the \"Round half to even\" seems better for when working with float like values\n // financialRound = Math.round;\n Shipping: down,\n Prettify: down,\n /**\n * ! Disclaimer may not work for \"weird\" currencies as expected\n */\n PrettifyFull059: roundToNearestFull059Fn,\n Subunit: halfUp,\n} satisfies Record<string, RoundingFn>;\n\n/**\n * Mapping of how prices should be rounded down to \"whole numbers\" after certain threshold\n */\nexport const prettifyPriceLookup = new Map([\n [USD.code, 20],\n [CAD.code, 50],\n [EUR.code, 50],\n [GBP.code, 50],\n [AED.code, 50],\n // Approximately every price above ~1.1 usd will be rounded in ZAR\n [ZAR.code, 20],\n]);\n\n/**\n * Map of dinero code to subunit digit count.\n */\nexport const smallestSubunitLookup = new Map<string, [Cents, RoundingFn]>([\n /**\n * TWD does not use subunits at all in day to day transactions.\n */\n [TWD.code, [0, Round.Subunit]],\n]);\n\n/**\n * Precompiled list for faster currency and locale lookups\n */\nexport const localizedCurrencyLookup = new Map<Currency, LocalizedCurrency>([\n [Currency.Aed, { currency: AED, locale: \"ar-AE\" }],\n [Currency.Bgn, { currency: BGN, locale: \"bg-BG\" }],\n [Currency.Cad, { currency: CAD, locale: \"en-CA\" }],\n [Currency.Chf, { currency: CHF, locale: \"it-CH\" }],\n [Currency.Czk, { currency: CZK, locale: \"cs-CZ\" }],\n [Currency.Dkk, { currency: DKK, locale: \"da-DK\" }],\n [Currency.Eur, { currency: EUR, locale: \"de-DE\" }],\n [Currency.Gbp, { currency: GBP, locale: \"en-GB\" }],\n [Currency.Hrk, { currency: HRK, locale: \"hr-HR\" }],\n [Currency.Huf, { currency: HUF, locale: \"hu-HU\" }],\n [Currency.Nok, { currency: NOK, locale: \"no-NO\" }],\n [Currency.Pln, { currency: PLN, locale: \"pl-PL\" }],\n [Currency.Ron, { currency: RON, locale: \"ro-RO\" }],\n [Currency.Sek, { currency: SEK, locale: \"sv-SE\" }],\n [Currency.Usd, { currency: USD, locale: \"en-US\" }],\n [Currency.Zar, { currency: ZAR, locale: \"en-ZA\" }],\n [Currency.Inr, { currency: INR, locale: \"en-IN\" }],\n [Currency.Sgd, { currency: SGD, locale: \"en-SG\" }],\n [Currency.Brl, { currency: BRL, locale: \"pt-BR\" }],\n // NOTE: en-JP Doesn't exist\n [Currency.Jpy, { currency: JPY, locale: \"en-JP\" }],\n // NOTE: en-TW Doesn't exist\n [Currency.Twd, { currency: TWD, locale: \"en-TW\" }],\n [Currency.Mxn, { currency: MXN, locale: \"es-MX\" }],\n]);\n\n// #############################################################################\n// Tax Rate\n// #############################################################################\n/**\n * List of stores that require calculating per single item qty and then combining them to get the total tax amount for a\n * single line. Rest of the stores inherit default behavior that tax calculated on whole line item\n *\n * ! IMPORTANT: When changing need to sync that store.backend `AVATAX_CUSTOM_COMPANY_CODES` is updated to reflect the change\n *\n * FIXME: as PR for the change as unfinished currently disabled to enable the functionality that calculates tax per single item as requires\n * specific testing both for our custom tax and Avalara stores that use custom company codes. So the groundwork for\n * different tax calculations is there just need to enable on the share side and test if it works\n */\nexport const storesWithPerItemTaxRate = new Set([\n // #############################################################################\n // Stores with custom tax rates\n // #############################################################################\n // StoreId.Br,\n // StoreId.Tw,\n // #############################################################################\n // Stores with Avalara, but will have custom company codes to handle per-item tax rate\n // #############################################################################\n // StoreId.Jp,\n // StoreId.Sg,\n] as StoreId[]);\n\n/**\n * Dinero currency option block for working with tax rates within dinero\n */\nexport const TAX_RATE_DINERO_CURRENCY = {\n base: 10,\n /**\n * We expect the tax rate to be in the range of 0..1\n * 0 --> 0%\n * 1 --> 100%\n * 0.21 --> 21%\n * 0.2169 --> 21.69%\n * 0.12345678 --> 12.345678%\n * !!! Don't change as this value is tied to store.backend DB schema !!!\n */\n exponent: 8,\n code: \"\", // Not important\n} satisfies DinoCurrency;\n\n// #############################################################################\n// Exchange Rate\n// #############################################################################\n\nexport const EXCHANGE_RATE_DINERO_CURRENCY = {\n base: 10,\n /**\n * We support having certain decimal places for exchange rates\n * !!! Don't change as this value is tied to store.backend DB schema !!!\n */\n exponent: 6,\n code: \"\", // Not important\n} satisfies DinoCurrency;\n"],"names":["roundToNearestFull059Fn","input","roundedNumber","Math","round","remainder","Round","Financial","halfEven","Shipping","down","Prettify","PrettifyFull059","Subunit","halfUp","prettifyPriceLookup","Map","USD","code","CAD","EUR","GBP","AED","ZAR","smallestSubunitLookup","TWD","localizedCurrencyLookup","Currency","Aed","currency","locale","Bgn","BGN","Cad","Chf","CHF","Czk","CZK","Dkk","DKK","Eur","Gbp","Hrk","HRK","Huf","HUF","Nok","NOK","Pln","PLN","Ron","RON","Sek","SEK","Usd","Zar","Inr","INR","Sgd","SGD","Brl","BRL","Jpy","JPY","Twd","Mxn","MXN","storesWithPerItemTaxRate","Set","TAX_RATE_DINERO_CURRENCY","base","exponent","EXCHANGE_RATE_DINERO_CURRENCY"],"mappings":";;;;;;;AA8Ca,MAAAA,uBAAA,GAAuCC,KAAkB,IAAA;EAK9D,MAAAC,aAAA,GAAgBC,IAAK,CAAAC,KAAA,CAAMH,KAAK,CAAA;EAGtC,MAAMI,YAAYH,aAAgB,GAAA,EAAA;EAClC,IAAIG,aAAa,CAAG,EAAA;IAElB,OAAOH,aAAgB,GAAAG,SAAA;EAAA,CACzB,MAAA,IAAWA,aAAa,CAAG,EAAA;IAEzB,OAAOH,gBAAgBG,SAAY,GAAA,CAAA;EAAA,CAC9B,MAAA;IAEL,OAAOH,gBAAgBG,SAAY,GAAA,CAAA;EACrC;AACF,CAAA;AAEO,MAAMC,KAAQ,GAAA;EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAkBnBC,SAAW,EAAAC,SAAA,CAAAA,QAAA;EAAA;EAAA;EAAA;EAAA;EAKXC,QAAU,EAAAC,SAAA,CAAAA,IAAA;EACVC,QAAU,EAAAD,SAAA,CAAAA,IAAA;EAAA;AAAA;AAAA;EAIVE,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,IAAM,EAAA;EAAA;AACR,CAAA;;;;;;;;"}
@@ -3,6 +3,17 @@ import { halfEven, down, halfUp } from 'dinero.js';
3
3
  import '../../types/index.mjs';
4
4
  import { Currency } from '../../types/generated.mjs';
5
5
  "use strict";
6
+ const roundToNearestFull059Fn = input => {
7
+ const roundedNumber = Math.round(input);
8
+ const remainder = roundedNumber % 10;
9
+ if (remainder <= 2) {
10
+ return roundedNumber - remainder;
11
+ } else if (remainder <= 7) {
12
+ return roundedNumber - remainder + 5;
13
+ } else {
14
+ return roundedNumber - remainder + 9;
15
+ }
16
+ };
6
17
  const Round = {
7
18
  /**
8
19
  * ⚠️ Instead of using Math.round, we HAVE to use this method to round the financial numbers everywhere where we CAN'T
@@ -28,9 +39,13 @@ const Round = {
28
39
  // financialRound = Math.round;
29
40
  Shipping: down,
30
41
  Prettify: down,
42
+ /**
43
+ * ! Disclaimer may not work for "weird" currencies as expected
44
+ */
45
+ PrettifyFull059: roundToNearestFull059Fn,
31
46
  Subunit: halfUp
32
47
  };
33
- const prettifyPriceLookup = /* @__PURE__ */new Map([[USD.code, 20], [CAD.code, 20], [EUR.code, 20], [GBP.code, 20], [AED.code, 50],
48
+ const prettifyPriceLookup = /* @__PURE__ */new Map([[USD.code, 20], [CAD.code, 50], [EUR.code, 50], [GBP.code, 50], [AED.code, 50],
34
49
  // Approximately every price above ~1.1 usd will be rounded in ZAR
35
50
  [ZAR.code, 20]]);
36
51
  const smallestSubunitLookup = /* @__PURE__ */new Map([
@@ -146,5 +161,5 @@ const EXCHANGE_RATE_DINERO_CURRENCY = {
146
161
  code: ""
147
162
  // Not important
148
163
  };
149
- export { EXCHANGE_RATE_DINERO_CURRENCY, Round, TAX_RATE_DINERO_CURRENCY, localizedCurrencyLookup, prettifyPriceLookup, smallestSubunitLookup, storesWithPerItemTaxRate };
164
+ export { EXCHANGE_RATE_DINERO_CURRENCY, Round, TAX_RATE_DINERO_CURRENCY, localizedCurrencyLookup, prettifyPriceLookup, roundToNearestFull059Fn, smallestSubunitLookup, storesWithPerItemTaxRate };
150
165
  //# sourceMappingURL=constants.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.mjs","sources":["../../../src/utils/money/constants.ts"],"sourcesContent":["import {\n AED,\n BGN,\n BRL,\n CAD,\n CHF,\n CZK,\n DKK,\n EUR,\n GBP,\n HRK,\n HUF,\n INR,\n JPY,\n MXN,\n NOK,\n PLN,\n RON,\n SEK,\n SGD,\n TWD,\n USD,\n ZAR,\n} from \"@dinero.js/currencies\";\nimport { down, halfEven, halfUp } from \"dinero.js\";\n\nimport type { StoreId } from \"../../types\";\nimport { Currency } from \"../../types\";\nimport type {\n Cents,\n DinoCurrency,\n LocalizedCurrency,\n RoundingFn,\n} from \"./types\";\n\n// #############################################################################\n// Constants\n// #############################################################################\n\nexport const Round = {\n /**\n * ⚠️ Instead of using Math.round, we HAVE to use this method to round the financial numbers everywhere where we CAN'T\n * deal with dinero.js (Dinero.js should be the priority). But often for converting from API requests we have to\n * normalise the values so we use this method.\n *\n * It just a re-export of the dinero.js halfEven (a.k.a bankers rounding) method which is the default rounding method.\n * @see https://github.com/dinerojs/dinero.js/blob/main/packages/core/src/round/halfEven.ts\n * @see\n *\n * Compared to Math.round (arithmetic rounding) it differentiates that it changes the `.5` round up or down behaviour based on if the rounded\n * number would be an even number. So 1.5 would round to 2 while 2.5 would round to 2.\n * See the youtube link below for a brief exclamation on why it's important to use this method over regular rounding (half-up):\n * https://youtu.be/yuRdYlZvs1E\n *\n * If you really want to get knee-deep in the rounding subject, you can read the following:\n * https://en.wikipedia.org/wiki/Rounding#Round_half_toward_zero\n */\n Financial: halfEven,\n // TODO: maybe we should have separate rounding functions depending on the input value?\n // Reading from wiki \"Round half toward zero\" is better if the value is already \"normalized to cents\"\n // But the \"Round half to even\" seems better for when working with float like values\n // financialRound = Math.round;\n Shipping: down,\n Prettify: down,\n Subunit: halfUp,\n} satisfies Record<string, RoundingFn>;\n\n/**\n * Mapping of how prices should be rounded down to \"whole numbers\" after certain threshold\n */\nexport const prettifyPriceLookup = new Map([\n [USD.code, 20],\n [CAD.code, 20],\n [EUR.code, 20],\n [GBP.code, 20],\n [AED.code, 50],\n // Approximately every price above ~1.1 usd will be rounded in ZAR\n [ZAR.code, 20],\n]);\n\n/**\n * Map of dinero code to subunit digit count.\n */\nexport const smallestSubunitLookup = new Map<string, [Cents, RoundingFn]>([\n /**\n * TWD does not use subunits at all in day to day transactions.\n */\n [TWD.code, [0, Round.Subunit]],\n]);\n\n/**\n * Precompiled list for faster currency and locale lookups\n */\nexport const localizedCurrencyLookup = new Map<Currency, LocalizedCurrency>([\n [Currency.Aed, { currency: AED, locale: \"ar-AE\" }],\n [Currency.Bgn, { currency: BGN, locale: \"bg-BG\" }],\n [Currency.Cad, { currency: CAD, locale: \"en-CA\" }],\n [Currency.Chf, { currency: CHF, locale: \"it-CH\" }],\n [Currency.Czk, { currency: CZK, locale: \"cs-CZ\" }],\n [Currency.Dkk, { currency: DKK, locale: \"da-DK\" }],\n [Currency.Eur, { currency: EUR, locale: \"de-DE\" }],\n [Currency.Gbp, { currency: GBP, locale: \"en-GB\" }],\n [Currency.Hrk, { currency: HRK, locale: \"hr-HR\" }],\n [Currency.Huf, { currency: HUF, locale: \"hu-HU\" }],\n [Currency.Nok, { currency: NOK, locale: \"no-NO\" }],\n [Currency.Pln, { currency: PLN, locale: \"pl-PL\" }],\n [Currency.Ron, { currency: RON, locale: \"ro-RO\" }],\n [Currency.Sek, { currency: SEK, locale: \"sv-SE\" }],\n [Currency.Usd, { currency: USD, locale: \"en-US\" }],\n [Currency.Zar, { currency: ZAR, locale: \"en-ZA\" }],\n [Currency.Inr, { currency: INR, locale: \"en-IN\" }],\n [Currency.Sgd, { currency: SGD, locale: \"en-SG\" }],\n [Currency.Brl, { currency: BRL, locale: \"pt-BR\" }],\n // NOTE: en-JP Doesn't exist\n [Currency.Jpy, { currency: JPY, locale: \"en-JP\" }],\n // NOTE: en-TW Doesn't exist\n [Currency.Twd, { currency: TWD, locale: \"en-TW\" }],\n [Currency.Mxn, { currency: MXN, locale: \"es-MX\" }],\n]);\n\n// #############################################################################\n// Tax Rate\n// #############################################################################\n/**\n * List of stores that require calculating per single item qty and then combining them to get the total tax amount for a\n * single line. Rest of the stores inherit default behavior that tax calculated on whole line item\n *\n * ! IMPORTANT: When changing need to sync that store.backend `AVATAX_CUSTOM_COMPANY_CODES` is updated to reflect the change\n *\n * FIXME: as PR for the change as unfinished currently disabled to enable the functionality that calculates tax per single item as requires\n * specific testing both for our custom tax and Avalara stores that use custom company codes. So the groundwork for\n * different tax calculations is there just need to enable on the share side and test if it works\n */\nexport const storesWithPerItemTaxRate = new Set([\n // #############################################################################\n // Stores with custom tax rates\n // #############################################################################\n // StoreId.Br,\n // StoreId.Tw,\n // #############################################################################\n // Stores with Avalara, but will have custom company codes to handle per-item tax rate\n // #############################################################################\n // StoreId.Jp,\n // StoreId.Sg,\n] as StoreId[]);\n\n/**\n * Dinero currency option block for working with tax rates within dinero\n */\nexport const TAX_RATE_DINERO_CURRENCY = {\n base: 10,\n /**\n * We expect the tax rate to be in the range of 0..1\n * 0 --> 0%\n * 1 --> 100%\n * 0.21 --> 21%\n * 0.2169 --> 21.69%\n * 0.12345678 --> 12.345678%\n * !!! Don't change as this value is tied to store.backend DB schema !!!\n */\n exponent: 8,\n code: \"\", // Not important\n} satisfies DinoCurrency;\n\n// #############################################################################\n// Exchange Rate\n// #############################################################################\n\nexport const EXCHANGE_RATE_DINERO_CURRENCY = {\n base: 10,\n /**\n * We support having certain decimal places for exchange rates\n * !!! Don't change as this value is tied to store.backend DB schema !!!\n */\n exponent: 6,\n code: \"\", // Not important\n} satisfies DinoCurrency;\n"],"names":["Round","Financial","halfEven","Shipping","down","Prettify","Subunit","halfUp","prettifyPriceLookup","Map","USD","code","CAD","EUR","GBP","AED","ZAR","smallestSubunitLookup","TWD","localizedCurrencyLookup","Currency","Aed","currency","locale","Bgn","BGN","Cad","Chf","CHF","Czk","CZK","Dkk","DKK","Eur","Gbp","Hrk","HRK","Huf","HUF","Nok","NOK","Pln","PLN","Ron","RON","Sek","SEK","Usd","Zar","Inr","INR","Sgd","SGD","Brl","BRL","Jpy","JPY","Twd","Mxn","MXN","storesWithPerItemTaxRate","Set","TAX_RATE_DINERO_CURRENCY","base","exponent","EXCHANGE_RATE_DINERO_CURRENCY"],"mappings":";;;;;AAuCO,MAAMA,KAAQ,GAAA;EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAkBnBC,SAAW,EAAAC,QAAA;EAAA;EAAA;EAAA;EAAA;EAKXC,QAAU,EAAAC,IAAA;EACVC,QAAU,EAAAD,IAAA;EACVE,OAAS,EAAAC;AACX,CAAA;AAKa,MAAAC,mBAAA,GAAA,mBAA0BC,GAAI,CAAA,CACzC,CAACC,GAAI,CAAAC,IAAA,EAAM,EAAE,CAAA,EACb,CAACC,GAAI,CAAAD,IAAA,EAAM,EAAE,CAAA,EACb,CAACE,GAAI,CAAAF,IAAA,EAAM,EAAE,CAAA,EACb,CAACG,GAAI,CAAAH,IAAA,EAAM,EAAE,CAAA,EACb,CAACI,GAAI,CAAAJ,IAAA,EAAM,EAAE,CAAA;AAAA;AAEb,CAACK,GAAI,CAAAL,IAAA,EAAM,EAAE,CAAA,CACd,CAAA;AAKY,MAAAM,qBAAA,GAAA,mBAA4BR,GAAiC,CAAA;AAAA;AAAA;AAAA;AAIxE,CAACS,GAAI,CAAAP,IAAA,EAAM,CAAC,CAAG,EAAAX,KAAA,CAAMM,OAAO,CAAC,CAAA,CAC9B,CAAA;AAKY,MAAAa,uBAAA,GAAA,mBAA8BV,GAAiC,CAAA,CAC1E,CAACW,SAASC,GAAK,EAAA;EAAEC,UAAUP,GAAK;EAAAQ,MAAA,EAAQ;CAAS,CAAA,EACjD,CAACH,SAASI,GAAK,EAAA;EAAEF,UAAUG,GAAK;EAAAF,MAAA,EAAQ;CAAS,CA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E3B,UAAU4B,GAAK;EAAA3B,MAAA,EAAQ;CAAS,CAAA,EACjD,CAACH,SAAS+B,GAAK,EAAA;EAAE7B,UAAU8B,GAAK;EAAA7B,MAAA,EAAQ;CAAS,CAAA,EACjD,CAACH,SAASiC,GAAK,EAAA;EAAE/B,UAAUgC,GAAK;EAAA/B,MAAA,EAAQ;CAAS,CAAA;AAAA;AAEjD,CAACH,SAASmC,GAAK,EAAA;EAAEjC,UAAUkC,GAAK;EAAAjC,MAAA,EAAQ;CAAS,CAAA;AAAA;AAEjD,CAACH,SAASqC,GAAK,EAAA;EAAEnC,UAAUJ,GAAK;EAAAK,MAAA,EAAQ;CAAS,CAAA,EACjD,CAACH,SAASsC,GAAK,EAAA;EAAEpC,UAAUqC,GAAK;EAAApC,MAAA,EAAQ;CAAS,CAAA,CAClD,CAAA;AAeY,MAAAqC,wBAAA,GAAA,mBAA+BC,GAAI,CAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA,CAWlC,CAAA;AAKP,MAAMC,wBAA2B,GAAA;EACtCC,IAAM,EAAA,EAAA;EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAUNC,QAAU,EAAA,CAAA;EACVrD,IAAM,EAAA;EAAA;AACR,CAAA;AAMO,MAAMsD,6BAAgC,GAAA;EAC3CF,IAAM,EAAA,EAAA;EAAA;AAAA;AAAA;AAAA;EAKNC,QAAU,EAAA,CAAA;EACVrD,IAAM,EAAA;EAAA;AACR,CAAA;"}
1
+ {"version":3,"file":"constants.mjs","sources":["../../../src/utils/money/constants.ts"],"sourcesContent":["import {\n AED,\n BGN,\n BRL,\n CAD,\n CHF,\n CZK,\n DKK,\n EUR,\n GBP,\n HRK,\n HUF,\n INR,\n JPY,\n MXN,\n NOK,\n PLN,\n RON,\n SEK,\n SGD,\n TWD,\n USD,\n ZAR,\n} from \"@dinero.js/currencies\";\nimport { down, halfEven, halfUp } from \"dinero.js\";\n\nimport type { StoreId } from \"../../types\";\nimport { Currency } from \"../../types\";\nimport type {\n Cents,\n DinoCurrency,\n LocalizedCurrency,\n RoundingFn,\n} from \"./types\";\n\n// #############################################################################\n// Constants\n// #############################################################################\n\n/**\n * Custom rounding method to be used with dinero.js\n * This rounding method will round to nearest FULL 0/5/9 (and strip cents)\n * (moved here to mitigate ReferenceError: Cannot access 'roundToNearestFull059Fn' before initialization)\n *\n * @see: https://ubiquiti.atlassian.net/browse/NEP-3846\n */\nexport const roundToNearestFull059Fn: RoundingFn = (input: number) => {\n /**\n * Input comes as float, for this rounding we don't need cents, so round\n * to nearest full number\n */\n const roundedNumber = Math.round(input);\n\n // Determine nearest rounding value\n const remainder = roundedNumber % 10;\n if (remainder <= 2) {\n // Round down to nearest 0\n return roundedNumber - remainder;\n } else if (remainder <= 7) {\n // Round to nearest 5\n return roundedNumber - remainder + 5;\n } else {\n // Round up to nearest 9\n return roundedNumber - remainder + 9;\n }\n};\n\nexport const Round = {\n /**\n * ⚠️ Instead of using Math.round, we HAVE to use this method to round the financial numbers everywhere where we CAN'T\n * deal with dinero.js (Dinero.js should be the priority). But often for converting from API requests we have to\n * normalise the values so we use this method.\n *\n * It just a re-export of the dinero.js halfEven (a.k.a bankers rounding) method which is the default rounding method.\n * @see https://github.com/dinerojs/dinero.js/blob/main/packages/core/src/round/halfEven.ts\n * @see\n *\n * Compared to Math.round (arithmetic rounding) it differentiates that it changes the `.5` round up or down behaviour based on if the rounded\n * number would be an even number. So 1.5 would round to 2 while 2.5 would round to 2.\n * See the youtube link below for a brief exclamation on why it's important to use this method over regular rounding (half-up):\n * https://youtu.be/yuRdYlZvs1E\n *\n * If you really want to get knee-deep in the rounding subject, you can read the following:\n * https://en.wikipedia.org/wiki/Rounding#Round_half_toward_zero\n */\n Financial: halfEven,\n // TODO: maybe we should have separate rounding functions depending on the input value?\n // Reading from wiki \"Round half toward zero\" is better if the value is already \"normalized to cents\"\n // But the \"Round half to even\" seems better for when working with float like values\n // financialRound = Math.round;\n Shipping: down,\n Prettify: down,\n /**\n * ! Disclaimer may not work for \"weird\" currencies as expected\n */\n PrettifyFull059: roundToNearestFull059Fn,\n Subunit: halfUp,\n} satisfies Record<string, RoundingFn>;\n\n/**\n * Mapping of how prices should be rounded down to \"whole numbers\" after certain threshold\n */\nexport const prettifyPriceLookup = new Map([\n [USD.code, 20],\n [CAD.code, 50],\n [EUR.code, 50],\n [GBP.code, 50],\n [AED.code, 50],\n // Approximately every price above ~1.1 usd will be rounded in ZAR\n [ZAR.code, 20],\n]);\n\n/**\n * Map of dinero code to subunit digit count.\n */\nexport const smallestSubunitLookup = new Map<string, [Cents, RoundingFn]>([\n /**\n * TWD does not use subunits at all in day to day transactions.\n */\n [TWD.code, [0, Round.Subunit]],\n]);\n\n/**\n * Precompiled list for faster currency and locale lookups\n */\nexport const localizedCurrencyLookup = new Map<Currency, LocalizedCurrency>([\n [Currency.Aed, { currency: AED, locale: \"ar-AE\" }],\n [Currency.Bgn, { currency: BGN, locale: \"bg-BG\" }],\n [Currency.Cad, { currency: CAD, locale: \"en-CA\" }],\n [Currency.Chf, { currency: CHF, locale: \"it-CH\" }],\n [Currency.Czk, { currency: CZK, locale: \"cs-CZ\" }],\n [Currency.Dkk, { currency: DKK, locale: \"da-DK\" }],\n [Currency.Eur, { currency: EUR, locale: \"de-DE\" }],\n [Currency.Gbp, { currency: GBP, locale: \"en-GB\" }],\n [Currency.Hrk, { currency: HRK, locale: \"hr-HR\" }],\n [Currency.Huf, { currency: HUF, locale: \"hu-HU\" }],\n [Currency.Nok, { currency: NOK, locale: \"no-NO\" }],\n [Currency.Pln, { currency: PLN, locale: \"pl-PL\" }],\n [Currency.Ron, { currency: RON, locale: \"ro-RO\" }],\n [Currency.Sek, { currency: SEK, locale: \"sv-SE\" }],\n [Currency.Usd, { currency: USD, locale: \"en-US\" }],\n [Currency.Zar, { currency: ZAR, locale: \"en-ZA\" }],\n [Currency.Inr, { currency: INR, locale: \"en-IN\" }],\n [Currency.Sgd, { currency: SGD, locale: \"en-SG\" }],\n [Currency.Brl, { currency: BRL, locale: \"pt-BR\" }],\n // NOTE: en-JP Doesn't exist\n [Currency.Jpy, { currency: JPY, locale: \"en-JP\" }],\n // NOTE: en-TW Doesn't exist\n [Currency.Twd, { currency: TWD, locale: \"en-TW\" }],\n [Currency.Mxn, { currency: MXN, locale: \"es-MX\" }],\n]);\n\n// #############################################################################\n// Tax Rate\n// #############################################################################\n/**\n * List of stores that require calculating per single item qty and then combining them to get the total tax amount for a\n * single line. Rest of the stores inherit default behavior that tax calculated on whole line item\n *\n * ! IMPORTANT: When changing need to sync that store.backend `AVATAX_CUSTOM_COMPANY_CODES` is updated to reflect the change\n *\n * FIXME: as PR for the change as unfinished currently disabled to enable the functionality that calculates tax per single item as requires\n * specific testing both for our custom tax and Avalara stores that use custom company codes. So the groundwork for\n * different tax calculations is there just need to enable on the share side and test if it works\n */\nexport const storesWithPerItemTaxRate = new Set([\n // #############################################################################\n // Stores with custom tax rates\n // #############################################################################\n // StoreId.Br,\n // StoreId.Tw,\n // #############################################################################\n // Stores with Avalara, but will have custom company codes to handle per-item tax rate\n // #############################################################################\n // StoreId.Jp,\n // StoreId.Sg,\n] as StoreId[]);\n\n/**\n * Dinero currency option block for working with tax rates within dinero\n */\nexport const TAX_RATE_DINERO_CURRENCY = {\n base: 10,\n /**\n * We expect the tax rate to be in the range of 0..1\n * 0 --> 0%\n * 1 --> 100%\n * 0.21 --> 21%\n * 0.2169 --> 21.69%\n * 0.12345678 --> 12.345678%\n * !!! Don't change as this value is tied to store.backend DB schema !!!\n */\n exponent: 8,\n code: \"\", // Not important\n} satisfies DinoCurrency;\n\n// #############################################################################\n// Exchange Rate\n// #############################################################################\n\nexport const EXCHANGE_RATE_DINERO_CURRENCY = {\n base: 10,\n /**\n * We support having certain decimal places for exchange rates\n * !!! Don't change as this value is tied to store.backend DB schema !!!\n */\n exponent: 6,\n code: \"\", // Not important\n} satisfies DinoCurrency;\n"],"names":["roundToNearestFull059Fn","input","roundedNumber","Math","round","remainder","Round","Financial","halfEven","Shipping","down","Prettify","PrettifyFull059","Subunit","halfUp","prettifyPriceLookup","Map","USD","code","CAD","EUR","GBP","AED","ZAR","smallestSubunitLookup","TWD","localizedCurrencyLookup","Currency","Aed","currency","locale","Bgn","BGN","Cad","Chf","CHF","Czk","CZK","Dkk","DKK","Eur","Gbp","Hrk","HRK","Huf","HUF","Nok","NOK","Pln","PLN","Ron","RON","Sek","SEK","Usd","Zar","Inr","INR","Sgd","SGD","Brl","BRL","Jpy","JPY","Twd","Mxn","MXN","storesWithPerItemTaxRate","Set","TAX_RATE_DINERO_CURRENCY","base","exponent","EXCHANGE_RATE_DINERO_CURRENCY"],"mappings":";;;;;AA8Ca,MAAAA,uBAAA,GAAuCC,KAAkB,IAAA;EAK9D,MAAAC,aAAA,GAAgBC,IAAK,CAAAC,KAAA,CAAMH,KAAK,CAAA;EAGtC,MAAMI,YAAYH,aAAgB,GAAA,EAAA;EAClC,IAAIG,aAAa,CAAG,EAAA;IAElB,OAAOH,aAAgB,GAAAG,SAAA;EAAA,CACzB,MAAA,IAAWA,aAAa,CAAG,EAAA;IAEzB,OAAOH,gBAAgBG,SAAY,GAAA,CAAA;EAAA,CAC9B,MAAA;IAEL,OAAOH,gBAAgBG,SAAY,GAAA,CAAA;EACrC;AACF,CAAA;AAEO,MAAMC,KAAQ,GAAA;EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAkBnBC,SAAW,EAAAC,QAAA;EAAA;EAAA;EAAA;EAAA;EAKXC,QAAU,EAAAC,IAAA;EACVC,QAAU,EAAAD,IAAA;EAAA;AAAA;AAAA;EAIVE,eAAiB,EAAAZ,uBAAA;EACjBa,OAAS,EAAAC;AACX,CAAA;AAKa,MAAAC,mBAAA,GAAA,mBAA0BC,GAAI,CAAA,CACzC,CAACC,GAAI,CAAAC,IAAA,EAAM,EAA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EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA,CAWlC,CAAA;AAKP,MAAMC,wBAA2B,GAAA;EACtCC,IAAM,EAAA,EAAA;EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAUNC,QAAU,EAAA,CAAA;EACVrD,IAAM,EAAA;EAAA;AACR,CAAA;AAMO,MAAMsD,6BAAgC,GAAA;EAC3CF,IAAM,EAAA,EAAA;EAAA;AAAA;AAAA;AAAA;EAKNC,QAAU,EAAA,CAAA;EACVrD,IAAM,EAAA;EAAA;AACR,CAAA;"}
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
+ var currencies = require('@dinero.js/currencies');
3
4
  var dinero_js = require('dinero.js');
4
5
  var errors = require('../errors.js');
5
6
  var constants = require('./constants.js');
@@ -58,15 +59,27 @@ const formatPrice = (money, options) => {
58
59
  return formatPriceRaw(misc.getDinero(money.amount, money.currency), localizedCurrency.locale, options);
59
60
  };
60
61
  const prettifyTotal = total => {
61
- if (!dinero_js.hasSubUnits(total)) {
62
- return total;
63
- }
64
62
  const totalJson = total.toJSON();
65
63
  const minValueInclusiveToRoundDownFrom = constants.prettifyPriceLookup.get(totalJson.currency.code);
66
64
  if (minValueInclusiveToRoundDownFrom == null || dinero_js.toUnit(total) < minValueInclusiveToRoundDownFrom) {
67
65
  return total;
68
66
  }
69
- return misc.roundDinero(total, constants.Round.Prettify);
67
+ switch (totalJson.currency.code) {
68
+ // @see: https://ubiquiti.atlassian.net/browse/NEP-3846
69
+ case currencies.EUR.code:
70
+ case currencies.GBP.code:
71
+ case currencies.CAD.code:
72
+ {
73
+ return misc.roundDinero(total, constants.Round.PrettifyFull059);
74
+ }
75
+ default:
76
+ {
77
+ if (!dinero_js.hasSubUnits(total)) {
78
+ return total;
79
+ }
80
+ return misc.roundDinero(total, constants.Round.Prettify);
81
+ }
82
+ }
70
83
  };
71
84
  exports.formatPrice = formatPrice;
72
85
  exports.formatPriceRaw = formatPriceRaw;
@@ -1 +1 @@
1
- {"version":3,"file":"format.js","sources":["../../../src/utils/money/format.ts"],"sourcesContent":["import { hasSubUnits, toFormat, toUnit } from \"dinero.js\";\n\nimport type { Currency, Nullish } from \"../../types\";\nimport { assert } from \"../errors\";\nimport {\n localizedCurrencyLookup,\n prettifyPriceLookup,\n Round,\n} from \"./constants\";\nimport { getDinero, roundDinero } from \"./misc\";\nimport type { Dino, LocalizedCurrency, Money } from \"./types\";\n\nexport const getLocalizedCurrency = (\n currencyCode: Nullish<Currency>,\n): LocalizedCurrency | undefined => {\n return currencyCode ? localizedCurrencyLookup.get(currencyCode) : undefined;\n};\n\n// #############################################################################\n// Formatter\n// #############################################################################\nconst currencyFormatterCache = new Map<string, Intl.NumberFormat>();\n/**\n * Function to get a Int.NumberFormat instance that can be reused to format currency over using\n * `Number.toLocaleString(...)` function, which makes more sense to use as we usually just display 1 or 2 currencies\n * MAX, so reusing the formatted makes a lot of sense\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString#performance\n */\nconst getCurrencyFormatter = (\n locale: string,\n currencyCode: string,\n): Intl.NumberFormat => {\n const cacheKey = `${locale}_${currencyCode}`;\n\n let formatter = currencyFormatterCache.get(cacheKey);\n if (formatter) {\n return formatter;\n }\n\n formatter = new Intl.NumberFormat(locale, {\n style: \"currency\",\n currency: currencyCode,\n /**\n * Explicitly define default behavior - just in case some runtime overrides it\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#currencysign\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#currencydisplay\n */\n currencySign: \"standard\",\n currencyDisplay: \"symbol\",\n });\n currencyFormatterCache.set(cacheKey, formatter);\n\n return formatter;\n};\n\nexport type FormatPriceOptions = {\n /**\n * Optionally remove trailing zeroes (only if all of them are 0)\n * @default false\n * @example\n * \"420,66 €\" => \"420,66 €\"\n * \"420,60 €\" => \"420,60 €\"\n * \"420,00 €\" => \"420 €\"\n */\n removeTrailingZeros?: boolean;\n /**\n * Optionally return currency rounded down to the nearest dollar-equivalent of a the given currency. Doesn't apply any\n * rounding just \"trims\" end decimal values\n *\n * ! Only use for display purposes where monetary precision is not required!\n *\n * @default false\n * @example\n * \"420,66 €\" => \"420 €\"\n * \"420,60 €\" => \"420 €\"\n * \"420,00 €\" => \"420 €\"\n */\n removeFractions?: boolean;\n};\n\n/**\n * Currency formatter based on dinero currency types and browser internationalizing functions\n *\n * Based on:\n * @see https://v2.dinerojs.com/docs/guides/formatting-in-a-multilingual-site#building-a-custom-internationalization-formatter\n * @protected\n * @deprecated Use `formatPrice` instead as this functions is for INTERNAL USE ONLY! (function not actual deprecated,\n * just marked so it discourages usage of it)\n */\nexport function formatPriceRaw(\n dinero: Dino,\n locale: string,\n options?: FormatPriceOptions,\n): string {\n return toFormat(dinero, ({ amount, currency }) => {\n const formatter = getCurrencyFormatter(locale, currency.code);\n const formatted = formatter.format(amount);\n\n return options?.removeFractions || options?.removeTrailingZeros\n ? /**\n * Regex to handle complex removing trailing zeros from currency\n * - Dynamically create regex based on currency as their exponent changes\n * - Also handles some currencies (e.g. EUR) having trailing currency symbol\n *\n * TODO: improve how we detect \"decimal separator\" for formatted currency, at least right now we have tests for it and doesn't seem like an issue\n */\n formatted.replace(\n // For some reason `\\.` need to be double-escaped `\\\\` when creating the regex from template string\n new RegExp(\n `(\\\\.|,)${\n // Depending options remove all trailing digits or just zeros, this way we don't need to do any rounding\n options?.removeFractions ? \"\\\\d\" : 0\n }{0,${currency.exponent}}(\\\\s\\\\D)?$`,\n ),\n // In the replaced using \"last capture group\" (if-exists) so we restore the trailing currency sign\n \"$2\",\n )\n : formatted;\n });\n}\n\n/**\n * Currency formatter based on dinero currency types and browser internationalizing functions\n *\n * In reality just a wrapper around `formatPriceRaw` that does the real formatting\n */\nexport const formatPrice = (\n money: Money,\n options?: FormatPriceOptions,\n): string => {\n const localizedCurrency = getLocalizedCurrency(money.currency);\n assert(!!localizedCurrency, `Currency ${money.currency} not supported`);\n\n return formatPriceRaw(\n getDinero(money.amount, money.currency),\n localizedCurrency.locale,\n options,\n );\n};\n\n/**\n * Prettify numbers depending on the currency using rounding down.\n * ! Should only be used to prettify storefront product prices after currency conversion but nothing else !\n */\nexport const prettifyTotal = (total: Dino): Dino => {\n // Nothing to round\n if (!hasSubUnits(total)) {\n return total;\n }\n\n const totalJson = total.toJSON();\n\n const minValueInclusiveToRoundDownFrom = prettifyPriceLookup.get(\n totalJson.currency.code,\n );\n\n // Don't round if currency unsupported or value is below min threshold\n if (\n minValueInclusiveToRoundDownFrom == null ||\n toUnit(total) < minValueInclusiveToRoundDownFrom\n ) {\n return total;\n }\n\n return roundDinero(total, Round.Prettify);\n};\n"],"names":["getLocalizedCurrency","currencyCode","localizedCurrencyLookup","get","currencyFormatterCache","Map","getCurrencyFormatter","locale","cacheKey","formatter","Intl","NumberFormat","style","currency","currencySign","currencyDisplay","set","formatPriceRaw","dinero","options","toFormat","amount","code","formatted","format","removeFractions","removeTrailingZeros","replace","RegExp","exponent","formatPrice","money","localizedCurrency","assert","getDinero","prettifyTotal","total","hasSubUnits","totalJson","toJSON","minValueInclusiveToRoundDownFrom","prettifyPriceLookup","toUnit","roundDinero","Round","Prettify"],"mappings":";;;;;;;AAYa,MAAAA,oBAAA,GACXC,YACkC,IAAA;EAClC,OAAOA,YAAe,GAAAC,SAAAA,CAAAA,uBAAA,CAAwBC,GAAI,CAAAF,YAAY,CAAI,GAAA,KAAA,CAAA;AACpE,CAAA;AAKA,MAAMG,sBAAA,GAAA,mBAA6BC,GAA+B,EAAA;AAOlE,MAAMC,oBAAA,GAAuBA,CAC3BC,MAAA,EACAN,YACsB,KAAA;EACtB,MAAMO,QAAW,GAAA,GAAGD,MAAM,IAAIN,YAAY,EAAA;EAEtC,IAAAQ,SAAA,GAAYL,sBAAuB,CAAAD,GAAA,CAAIK,QAAQ,CAA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KAAA,CAAMlB,QAAQ,CAAA,EACtCmB,iBAAkB,CAAAzB,MAAA,EAClBY,OAAA,CACF;AACF,CAAA;AAMa,MAAAgB,aAAA,GAAiBC,KAAsB,IAAA;EAE9C,IAAA,CAACC,SAAAA,CAAAA,WAAY,CAAAD,KAAK,CAAG,EAAA;IAChB,OAAAA,KAAA;EACT;EAEM,MAAAE,SAAA,GAAYF,MAAMG,MAAO,EAAA;EAE/B,MAAMC,mCAAmCC,SAAAA,CAAAA,mBAAoB,CAAAtC,GAAA,CAC3DmC,UAAUzB,QAAS,CAAAS,IAAA,CACrB;EAGA,IACEkB,gCAAoC,IAAA,IAAA,IACpCE,SAAO,CAAAA,MAAA,CAAAN,KAAK,IAAII,gCAChB,EAAA;IACO,OAAAJ,KAAA;EACT;EAEO,OAAAO,gBAAA,CAAYP,KAAO,EAAAQ,SAAA,CAAAA,KAAA,CAAMC,QAAQ,CAAA;AAC1C,CAAA;;;;"}
1
+ {"version":3,"file":"format.js","sources":["../../../src/utils/money/format.ts"],"sourcesContent":["import { CAD, EUR, GBP } from \"@dinero.js/currencies\";\nimport { hasSubUnits, toFormat, toUnit } from \"dinero.js\";\n\nimport type { Currency, Nullish } from \"../../types\";\nimport { assert } from \"../errors\";\nimport {\n localizedCurrencyLookup,\n prettifyPriceLookup,\n Round,\n} from \"./constants\";\nimport { getDinero, roundDinero } from \"./misc\";\nimport type { Dino, LocalizedCurrency, Money } from \"./types\";\n\nexport const getLocalizedCurrency = (\n currencyCode: Nullish<Currency>,\n): LocalizedCurrency | undefined => {\n return currencyCode ? localizedCurrencyLookup.get(currencyCode) : undefined;\n};\n\n// #############################################################################\n// Formatter\n// #############################################################################\nconst currencyFormatterCache = new Map<string, Intl.NumberFormat>();\n/**\n * Function to get a Int.NumberFormat instance that can be reused to format currency over using\n * `Number.toLocaleString(...)` function, which makes more sense to use as we usually just display 1 or 2 currencies\n * MAX, so reusing the formatted makes a lot of sense\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString#performance\n */\nconst getCurrencyFormatter = (\n locale: string,\n currencyCode: string,\n): Intl.NumberFormat => {\n const cacheKey = `${locale}_${currencyCode}`;\n\n let formatter = currencyFormatterCache.get(cacheKey);\n if (formatter) {\n return formatter;\n }\n\n formatter = new Intl.NumberFormat(locale, {\n style: \"currency\",\n currency: currencyCode,\n /**\n * Explicitly define default behavior - just in case some runtime overrides it\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#currencysign\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#currencydisplay\n */\n currencySign: \"standard\",\n currencyDisplay: \"symbol\",\n });\n currencyFormatterCache.set(cacheKey, formatter);\n\n return formatter;\n};\n\nexport type FormatPriceOptions = {\n /**\n * Optionally remove trailing zeroes (only if all of them are 0)\n * @default false\n * @example\n * \"420,66 €\" => \"420,66 €\"\n * \"420,60 €\" => \"420,60 €\"\n * \"420,00 €\" => \"420 €\"\n */\n removeTrailingZeros?: boolean;\n /**\n * Optionally return currency rounded down to the nearest dollar-equivalent of a the given currency. Doesn't apply any\n * rounding just \"trims\" end decimal values\n *\n * ! Only use for display purposes where monetary precision is not required!\n *\n * @default false\n * @example\n * \"420,66 €\" => \"420 €\"\n * \"420,60 €\" => \"420 €\"\n * \"420,00 €\" => \"420 €\"\n */\n removeFractions?: boolean;\n};\n\n/**\n * Currency formatter based on dinero currency types and browser internationalizing functions\n *\n * Based on:\n * @see https://v2.dinerojs.com/docs/guides/formatting-in-a-multilingual-site#building-a-custom-internationalization-formatter\n * @protected\n * @deprecated Use `formatPrice` instead as this functions is for INTERNAL USE ONLY! (function not actual deprecated,\n * just marked so it discourages usage of it)\n */\nexport function formatPriceRaw(\n dinero: Dino,\n locale: string,\n options?: FormatPriceOptions,\n): string {\n return toFormat(dinero, ({ amount, currency }) => {\n const formatter = getCurrencyFormatter(locale, currency.code);\n const formatted = formatter.format(amount);\n\n return options?.removeFractions || options?.removeTrailingZeros\n ? /**\n * Regex to handle complex removing trailing zeros from currency\n * - Dynamically create regex based on currency as their exponent changes\n * - Also handles some currencies (e.g. EUR) having trailing currency symbol\n *\n * TODO: improve how we detect \"decimal separator\" for formatted currency, at least right now we have tests for it and doesn't seem like an issue\n */\n formatted.replace(\n // For some reason `\\.` need to be double-escaped `\\\\` when creating the regex from template string\n new RegExp(\n `(\\\\.|,)${\n // Depending options remove all trailing digits or just zeros, this way we don't need to do any rounding\n options?.removeFractions ? \"\\\\d\" : 0\n }{0,${currency.exponent}}(\\\\s\\\\D)?$`,\n ),\n // In the replaced using \"last capture group\" (if-exists) so we restore the trailing currency sign\n \"$2\",\n )\n : formatted;\n });\n}\n\n/**\n * Currency formatter based on dinero currency types and browser internationalizing functions\n *\n * In reality just a wrapper around `formatPriceRaw` that does the real formatting\n */\nexport const formatPrice = (\n money: Money,\n options?: FormatPriceOptions,\n): string => {\n const localizedCurrency = getLocalizedCurrency(money.currency);\n assert(!!localizedCurrency, `Currency ${money.currency} not supported`);\n\n return formatPriceRaw(\n getDinero(money.amount, money.currency),\n localizedCurrency.locale,\n options,\n );\n};\n\n/**\n * Prettify numbers depending on the currency using rounding down.\n * ! Should only be used to prettify storefront product prices after currency conversion but nothing else !\n */\nexport const prettifyTotal = (total: Dino): Dino => {\n const totalJson = total.toJSON();\n const minValueInclusiveToRoundDownFrom = prettifyPriceLookup.get(\n totalJson.currency.code,\n );\n\n // Don't round if currency unsupported or value is below min threshold\n if (\n minValueInclusiveToRoundDownFrom == null ||\n toUnit(total) < minValueInclusiveToRoundDownFrom\n ) {\n return total;\n }\n\n switch (totalJson.currency.code) {\n // @see: https://ubiquiti.atlassian.net/browse/NEP-3846\n case EUR.code:\n case GBP.code:\n case CAD.code: {\n return roundDinero(total, Round.PrettifyFull059);\n }\n default: {\n // Nothing to round\n if (!hasSubUnits(total)) {\n return total;\n }\n\n return roundDinero(total, Round.Prettify);\n }\n }\n};\n"],"names":["getLocalizedCurrency","currencyCode","localizedCurrencyLookup","get","currencyFormatterCache","Map","getCurrencyFormatter","locale","cacheKey","formatter","Intl","NumberFormat","style","currency","currencySign","currencyDisplay","set","formatPriceRaw","dinero","options","toFormat","amount","code","formatted","format","removeFractions","removeTrailingZeros","replace","RegExp","exponent","formatPrice","money","localizedCurrency","assert","getDinero","prettifyTotal","total","totalJson","toJSON","minValueInclusiveToRoundDownFrom","prettifyPriceLookup","toUnit","EUR","GBP","CAD","roundDinero","Round","PrettifyFull059","hasSubUnits","Prettify"],"mappings":";;;;;;;;AAaa,MAAAA,oBAAA,GACXC,YACkC,IAAA;EAClC,OAAOA,YAAe,GAAAC,SAAAA,CAAAA,uBAAA,CAAwBC,GAAI,CAAAF,YAAY,CAAI,GAAA,KAAA,CAAA;AACpE,CAAA;AAKA,MAAMG,sBAAA,GAAA,mBAA6BC,GAA+B,EAAA;AAOlE,MAAMC,oBAAA,GAAuBA,CAC3BC,MAAA,EACAN,YACsB,KAAA;EACtB,MAAMO,QAAW,GAAA,GAAGD,MAAM,IAAIN,YAAY,EAAA;EAEtC,IAAAQ,SAAA,GAAYL,sBAAuB,CAAAD,GAAA,CAAIK,QAAQ,CAAA;EACnD,IAAIC,SAAW,EAAA;IACN,OAAAA,SAAA;EACT;EAEYA,SAAA,GAAA,IAAIC,IAAK,CAAAC,YAAA,CAAaJ,MAAQ,EAAA;IACxCK,KAAO,EAAA,UAAA;IACPC,QAAU,EAAAZ,YAAA;IAAA;AAAA;AAAA;AAAA;AAAA;IAMVa,YAAc,EAAA,UAAA;IACdC,eAAiB,EAAA;EAAA,CAClB,CAAA;EACsBX,sBAAA,CAAAY,GAAA,CAAIR,UAAUC,SAAS,CAAA;EAEvC,OAAAA,SAAA;AACT,CAAA;AAoCgB,SAAAQ,cAAAA,CACdC,MACA,EAAAX,MAAA,EACAY,OACQ,EAAA;EACR,OAAOC,mBAASF,MAAQ,EAAA,CAAC;IAAEG,MAAA;IAAQR;G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AAI,CAAApB,IAAA;IACT,KAAKqB,UAAAA,CAAAA,GAAI,CAAArB,IAAA;IACT,KAAKsB,UAAAA,CAAAA,IAAItB,IAAM;MAAA;QACN,OAAAuB,gBAAA,CAAYT,KAAO,EAAAU,SAAA,CAAAA,KAAA,CAAMC,eAAe,CAAA;MACjD;IACA;MAAS;QAEH,IAAA,CAACC,SAAAA,CAAAA,WAAY,CAAAZ,KAAK,CAAG,EAAA;UAChB,OAAAA,KAAA;QACT;QAEO,OAAAS,gBAAA,CAAYT,KAAO,EAAAU,SAAA,CAAAA,KAAA,CAAMG,QAAQ,CAAA;MAC1C;EACF;AACF,CAAA;;;;"}
@@ -1,4 +1,5 @@
1
- import { toFormat, hasSubUnits, toUnit } from 'dinero.js';
1
+ import { CAD, GBP, EUR } from '@dinero.js/currencies';
2
+ import { toFormat, toUnit, hasSubUnits } from 'dinero.js';
2
3
  import { assert } from '../errors.mjs';
3
4
  import { localizedCurrencyLookup, prettifyPriceLookup, Round } from './constants.mjs';
4
5
  import { getDinero, roundDinero } from './misc.mjs';
@@ -56,15 +57,27 @@ const formatPrice = (money, options) => {
56
57
  return formatPriceRaw(getDinero(money.amount, money.currency), localizedCurrency.locale, options);
57
58
  };
58
59
  const prettifyTotal = total => {
59
- if (!hasSubUnits(total)) {
60
- return total;
61
- }
62
60
  const totalJson = total.toJSON();
63
61
  const minValueInclusiveToRoundDownFrom = prettifyPriceLookup.get(totalJson.currency.code);
64
62
  if (minValueInclusiveToRoundDownFrom == null || toUnit(total) < minValueInclusiveToRoundDownFrom) {
65
63
  return total;
66
64
  }
67
- return roundDinero(total, Round.Prettify);
65
+ switch (totalJson.currency.code) {
66
+ // @see: https://ubiquiti.atlassian.net/browse/NEP-3846
67
+ case EUR.code:
68
+ case GBP.code:
69
+ case CAD.code:
70
+ {
71
+ return roundDinero(total, Round.PrettifyFull059);
72
+ }
73
+ default:
74
+ {
75
+ if (!hasSubUnits(total)) {
76
+ return total;
77
+ }
78
+ return roundDinero(total, Round.Prettify);
79
+ }
80
+ }
68
81
  };
69
82
  export { formatPrice, formatPriceRaw, getLocalizedCurrency, prettifyTotal };
70
83
  //# sourceMappingURL=format.mjs.map