@saasquatch/mint-components 2.5.5-1 → 2.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1068) hide show
  1. package/dist/cjs/AsYouType-5f15a922.js +4764 -0
  2. package/dist/cjs/{ErrorView-17578c10.js → ErrorView-8f6cf1cb.js} +1 -1
  3. package/dist/cjs/{GenericTableView-4c48c630.js → GenericTableView-12d35117.js} +17 -15
  4. package/dist/cjs/{JSS-8503a151.js → JSS-bf8078e9.js} +342 -338
  5. package/dist/cjs/{ShadowViewAddon-f57cb460.js → ShadowViewAddon-ee16ec1d.js} +312 -292
  6. package/dist/cjs/{copy-text-view-bb2c0ea7.js → copy-text-view-49517b2a.js} +2 -2
  7. package/dist/cjs/{data-ae38fa86.js → data-77273531.js} +5 -5
  8. package/dist/cjs/demoMerge-6f125494.js +203 -0
  9. package/dist/cjs/{dom-context-hooks.module-e7b6727c.js → dom-context-hooks.module-735c3942.js} +133 -76
  10. package/dist/cjs/{email-registration-view-306c8878.js → email-registration-view-36a74293.js} +10 -9
  11. package/dist/cjs/{global-3ba30270.js → global-973bc63c.js} +587 -583
  12. package/dist/cjs/{index.module-3221a469.js → index-8530c62f.js} +2911 -511
  13. package/dist/cjs/{index-8277cbb3.js → index-d41c2c94.js} +766 -340
  14. package/dist/cjs/{index-8c6255f5.js → index-f1dd6136.js} +47 -29
  15. package/dist/cjs/{jsonpointer-11327262.js → jsonpointer-0db21316.js} +8 -4
  16. package/dist/cjs/loader.cjs.js +6 -5
  17. package/dist/cjs/{luxon-c1ad356a.js → luxon-d3612a3d.js} +486 -299
  18. package/dist/cjs/mint-components.cjs.js +11 -7
  19. package/dist/cjs/{mockRewardData-ed603fca.js → mockRewardData-e6a0a048.js} +5 -3
  20. package/dist/cjs/{parseStates-d1effc19.js → parseStates-35013ba4.js} +3 -0
  21. package/dist/cjs/raisins-plop-target.cjs.entry.js +1 -1
  22. package/dist/cjs/{re-render-34b36aca.js → re-render-51c48d7c.js} +5 -5
  23. package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +399 -1395
  24. package/dist/cjs/sqm-big-stat_47.cjs.entry.js +818 -2891
  25. package/dist/cjs/{sqm-close-button-view-e9f2a454.js → sqm-close-button-view-74e5e1e9.js} +2 -2
  26. package/dist/cjs/sqm-close-button.cjs.entry.js +6 -11
  27. package/dist/cjs/sqm-code-verification.cjs.entry.js +20 -47
  28. package/dist/cjs/sqm-context-router.cjs.entry.js +9 -8
  29. package/dist/cjs/sqm-email-verification_2.cjs.entry.js +71 -182
  30. package/dist/cjs/sqm-empty_4.cjs.entry.js +21 -58
  31. package/dist/cjs/sqm-form-message_2.cjs.entry.js +7 -19
  32. package/dist/cjs/sqm-google-sign-in.cjs.entry.js +10 -9
  33. package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +11 -10
  34. package/dist/cjs/sqm-header-logo.cjs.entry.js +4 -19
  35. package/dist/cjs/sqm-instant-access-registration.cjs.entry.js +14 -89
  36. package/dist/cjs/sqm-invoice-table-data-cell_5.cjs.entry.js +6 -8
  37. package/dist/cjs/{sqm-lead-checkbox-field-view-d6df81c7.js → sqm-lead-checkbox-field-view-24ac7358.js} +12 -11
  38. package/dist/cjs/sqm-lead-checkbox-field.cjs.entry.js +14 -30
  39. package/dist/cjs/sqm-lead-input-field-view-7dfbc714.js +52 -0
  40. package/dist/cjs/sqm-lead-input-field.cjs.entry.js +15 -31
  41. package/dist/cjs/{sqm-leaderboard-rank-view-67fd7934.js → sqm-leaderboard-rank-view-e992762c.js} +1 -1
  42. package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +25 -22
  43. package/dist/cjs/{sqm-logout-current-user-view-f330d641.js → sqm-logout-current-user-view-ebee238e.js} +2 -2
  44. package/dist/cjs/sqm-logout-current-user.cjs.entry.js +17 -28
  45. package/dist/cjs/{sqm-navigation-sidebar-item-view-9134e64e.js → sqm-navigation-sidebar-item-view-a2cab80e.js} +4 -4
  46. package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +23 -18
  47. package/dist/cjs/{sqm-navigation-sidebar-view-6616e3e0.js → sqm-navigation-sidebar-view-873e0c44.js} +2 -2
  48. package/dist/cjs/sqm-navigation-sidebar.cjs.entry.js +12 -17
  49. package/dist/cjs/sqm-pagination_3.cjs.entry.js +40 -102
  50. package/dist/cjs/{sqm-partner-info-modal-view-6173c618.js → sqm-partner-info-modal-view-c8972001.js} +4 -4
  51. package/dist/cjs/sqm-password-field.cjs.entry.js +186 -86
  52. package/dist/cjs/sqm-popup-container.cjs.entry.js +12 -12
  53. package/dist/cjs/{sqm-portal-container-view-757f921b.js → sqm-portal-container-view-c0cf9af9.js} +2 -2
  54. package/dist/cjs/{sqm-portal-email-verification-view-38d8344c.js → sqm-portal-email-verification-view-92866725.js} +4 -4
  55. package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +22 -52
  56. package/dist/cjs/sqm-portal-forgot-password_6.cjs.entry.js +101 -429
  57. package/dist/cjs/sqm-portal-logout.cjs.entry.js +7 -13
  58. package/dist/cjs/{sqm-portal-profile-view-062eda68.js → sqm-portal-profile-view-60e78cdb.js} +20 -17
  59. package/dist/cjs/sqm-portal-profile.cjs.entry.js +20 -56
  60. package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +11 -24
  61. package/dist/cjs/{sqm-portal-registration-form-view-a45f7a52.js → sqm-portal-registration-form-view-5473e24d.js} +26 -21
  62. package/dist/cjs/{sqm-portal-reset-password-view-b2c546bd.js → sqm-portal-reset-password-view-7a6f55c5.js} +3 -3
  63. package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +21 -89
  64. package/dist/cjs/{sqm-portal-verify-email-view-2a120d0a.js → sqm-portal-verify-email-view-7efa70c9.js} +48 -45
  65. package/dist/cjs/{sqm-qr-code-view-0d43424e.js → sqm-qr-code-view-70da70f9.js} +3 -3
  66. package/dist/cjs/sqm-qr-code.cjs.entry.js +22 -48
  67. package/dist/cjs/sqm-referral-table_11.cjs.entry.js +37 -140
  68. package/dist/cjs/sqm-rewards-table-customer-note-cell.cjs.entry.js +5 -4
  69. package/dist/cjs/sqm-rewards-table-customer-note-column.cjs.entry.js +4 -7
  70. package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +98 -217
  71. package/dist/cjs/sqm-route.cjs.entry.js +2 -1
  72. package/dist/cjs/sqm-scroll.cjs.entry.js +12 -8
  73. package/dist/cjs/sqm-stencilbook.cjs.entry.js +2892 -2264
  74. package/dist/cjs/sqm-tab.cjs.entry.js +5 -4
  75. package/dist/cjs/sqm-tabs.cjs.entry.js +9 -8
  76. package/dist/cjs/{sqm-text-span-view-b9e10f5d.js → sqm-text-span-view-c6938acd.js} +2 -2
  77. package/dist/cjs/sqm-text-span.cjs.entry.js +8 -4
  78. package/dist/cjs/{sqm-user-info-form-view-aedca5fe.js → sqm-user-info-form-view-e878a9a3.js} +173 -163
  79. package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +6 -11
  80. package/dist/cjs/subregions-3dbacb18.js +1467 -0
  81. package/dist/cjs/{useChildElements-36f7e4bb.js → useChildElements-e5e26816.js} +3 -3
  82. package/dist/cjs/{useIndirectTaxForm-7656fc63.js → useIndirectTaxForm-691691c2.js} +42 -38
  83. package/dist/cjs/{useInstantAccessRegistration-43514e50.js → useInstantAccessRegistration-9201777d.js} +6 -6
  84. package/dist/cjs/{useLeadFormState-34f9834b.js → useLeadFormState-f5b768b9.js} +20 -20
  85. package/dist/cjs/{usePortalRegistrationForm-b18a1f6b.js → usePortalRegistrationForm-b3c0451b.js} +16 -13
  86. package/dist/cjs/{useReferralCodes-25d5320a.js → useReferralCodes-5794a177.js} +11 -11
  87. package/dist/cjs/{useReferralTable-ad86986b.js → useReferralTable-32b3541b.js} +19 -19
  88. package/dist/cjs/{useRegistrationFormState-ea81d55a.js → useRegistrationFormState-feccd2c8.js} +3 -3
  89. package/dist/cjs/{useVerificationEmail-70aad5f1.js → useVerificationEmail-f0807562.js} +17 -15
  90. package/dist/cjs/{utilities-dfc34bea.js → utilities-04345466.js} +3 -3
  91. package/dist/collection/ShadowViewAddon.js +1 -2
  92. package/dist/collection/collection-manifest.json +2 -2
  93. package/dist/collection/components/raisins-plop-target/raisins-plop-target.js +36 -34
  94. package/dist/collection/components/sqm-base-registration/BaseRegistrationForm.stories.js +3 -7
  95. package/dist/collection/components/sqm-base-registration/sqm-base-registration-form-view.js +11 -23
  96. package/dist/collection/components/sqm-big-stat/BigStat.stories.js +11 -27
  97. package/dist/collection/components/sqm-big-stat/UseBigStat.stories.js +2 -16
  98. package/dist/collection/components/sqm-big-stat/sqm-big-stat-view.js +1 -4
  99. package/dist/collection/components/sqm-big-stat/sqm-big-stat.js +294 -298
  100. package/dist/collection/components/sqm-big-stat/useDemoBigStat.js +3 -3
  101. package/dist/collection/components/sqm-brand/SqmBrand.stories.js +4 -72
  102. package/dist/collection/components/sqm-brand/sqm-brand.js +61 -58
  103. package/dist/collection/components/sqm-card-feed/CardFeed.stories.js +43 -120
  104. package/dist/collection/components/sqm-card-feed/sqm-card-feed-view.js +1 -5
  105. package/dist/collection/components/sqm-card-feed/sqm-card-feed.js +55 -59
  106. package/dist/collection/components/sqm-checkbox-field/CheckboxField.stories.js +17 -22
  107. package/dist/collection/components/sqm-checkbox-field/UseCheckboxField.stories.js +5 -19
  108. package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field-view.js +18 -21
  109. package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field.js +167 -179
  110. package/dist/collection/components/sqm-close-button/CloseButton.stories.js +3 -5
  111. package/dist/collection/components/sqm-close-button/sqm-close-button-view.js +1 -5
  112. package/dist/collection/components/sqm-close-button/sqm-close-button.js +32 -35
  113. package/dist/collection/components/sqm-context-router/ContextRouter.js +4 -33
  114. package/dist/collection/components/sqm-context-router/sqm-context-router.js +39 -33
  115. package/dist/collection/components/sqm-coupon-code/CouponCode.stories.js +13 -13
  116. package/dist/collection/components/sqm-coupon-code/sqm-coupon-code-view.js +1 -7
  117. package/dist/collection/components/sqm-coupon-code/sqm-coupon-code.js +601 -695
  118. package/dist/collection/components/sqm-coupon-code/useCouponCode.js +10 -5
  119. package/dist/collection/components/sqm-divided-layout/DividedLayout.stories.js +19 -36
  120. package/dist/collection/components/sqm-divided-layout/sqm-divided-layout-view.js +1 -5
  121. package/dist/collection/components/sqm-divided-layout/sqm-divided-layout.js +129 -135
  122. package/dist/collection/components/sqm-dropdown-field/DropdownField.stories.js +7 -7
  123. package/dist/collection/components/sqm-dropdown-field/UseDropdownField.stories.js +3 -15
  124. package/dist/collection/components/sqm-dropdown-field/sqm-dropdown-field-view.js +13 -15
  125. package/dist/collection/components/sqm-dropdown-field/sqm-dropdown-field.js +128 -133
  126. package/dist/collection/components/sqm-edit-profile/EditProfileForm.stories.js +2 -2
  127. package/dist/collection/components/sqm-edit-profile/UseEditProfile.stories.js +9 -9
  128. package/dist/collection/components/sqm-edit-profile/sqm-edit-profile-view.js +27 -45
  129. package/dist/collection/components/sqm-edit-profile/sqm-edit-profile.js +272 -264
  130. package/dist/collection/components/sqm-edit-profile/useEditProfile.js +4 -3
  131. package/dist/collection/components/sqm-empty/EmptyState.stories.js +4 -7
  132. package/dist/collection/components/sqm-empty/sqm-empty-view.js +6 -12
  133. package/dist/collection/components/sqm-empty/sqm-empty.js +102 -95
  134. package/dist/collection/components/sqm-form-message/FormMessage.stories.js +9 -27
  135. package/dist/collection/components/sqm-form-message/sqm-form-message.js +102 -108
  136. package/dist/collection/components/sqm-google-sign-in/sqm-google-sign-in.js +61 -56
  137. package/dist/collection/components/sqm-graphql-client-provider/sqm-graphql-client-provider.js +32 -28
  138. package/dist/collection/components/sqm-header-logo/sqm-header-logo.js +147 -161
  139. package/dist/collection/components/sqm-hero/Hero.stories.js +20 -54
  140. package/dist/collection/components/sqm-hero/sqm-hero-view.js +5 -11
  141. package/dist/collection/components/sqm-hero/sqm-hero.js +177 -202
  142. package/dist/collection/components/sqm-hero-image/sqm-hero-image-view.js +9 -26
  143. package/dist/collection/components/sqm-hero-image/sqm-hero-image.js +533 -590
  144. package/dist/collection/components/sqm-hook-story-container/sqm-hook-story-container.js +28 -23
  145. package/dist/collection/components/sqm-image/sqm-image-view.js +1 -6
  146. package/dist/collection/components/sqm-image/sqm-image.js +131 -131
  147. package/dist/collection/components/sqm-input-field/InputField.stories.js +17 -17
  148. package/dist/collection/components/sqm-input-field/UseInputField.stories.js +7 -22
  149. package/dist/collection/components/sqm-input-field/sqm-input-field-view.js +14 -15
  150. package/dist/collection/components/sqm-input-field/sqm-input-field.js +156 -162
  151. package/dist/collection/components/sqm-instant-access-registration/sqm-instant-access-registration.js +410 -481
  152. package/dist/collection/components/sqm-invoice-table/InvoiceTable.stories.js +2 -18
  153. package/dist/collection/components/sqm-invoice-table/UseInvoiceTable.stories.js +2 -14
  154. package/dist/collection/components/sqm-invoice-table/cells/sqm-invoice-table-data-cell.js +27 -23
  155. package/dist/collection/components/sqm-invoice-table/cells/sqm-invoice-table-date-cell.js +44 -40
  156. package/dist/collection/components/sqm-invoice-table/cells/sqm-invoice-table-download-cell.js +29 -29
  157. package/dist/collection/components/sqm-invoice-table/columns/sqm-invoice-table-data-column.js +85 -80
  158. package/dist/collection/components/sqm-invoice-table/columns/sqm-invoice-table-date-column.js +68 -64
  159. package/dist/collection/components/sqm-invoice-table/columns/sqm-invoice-table-download-column.js +40 -39
  160. package/dist/collection/components/sqm-invoice-table/sqm-invoice-table-view.js +1 -8
  161. package/dist/collection/components/sqm-invoice-table/sqm-invoice-table.js +287 -310
  162. package/dist/collection/components/sqm-invoice-table/useInvoiceTable.js +1 -3
  163. package/dist/collection/components/sqm-lead-form/LeadCheckboxField.stories.js +7 -7
  164. package/dist/collection/components/sqm-lead-form/LeadForm.stories.js +6 -10
  165. package/dist/collection/components/sqm-lead-form/LeadFormDropdownField.stories.js +10 -10
  166. package/dist/collection/components/sqm-lead-form/LeadInputField.stories.js +7 -7
  167. package/dist/collection/components/sqm-lead-form/sqm-lead-checkbox-field-view.js +20 -24
  168. package/dist/collection/components/sqm-lead-form/sqm-lead-checkbox-field.js +167 -179
  169. package/dist/collection/components/sqm-lead-form/sqm-lead-dropdown-field-view.js +13 -17
  170. package/dist/collection/components/sqm-lead-form/sqm-lead-dropdown-field.js +174 -189
  171. package/dist/collection/components/sqm-lead-form/sqm-lead-form-view.js +22 -48
  172. package/dist/collection/components/sqm-lead-form/sqm-lead-form.js +365 -420
  173. package/dist/collection/components/sqm-lead-form/sqm-lead-input-field-view.js +13 -16
  174. package/dist/collection/components/sqm-lead-form/sqm-lead-input-field.js +179 -191
  175. package/dist/collection/components/sqm-lead-form/useLeadForm.js +3 -1
  176. package/dist/collection/components/sqm-leaderboard/Leaderboard.stories.js +23 -29
  177. package/dist/collection/components/sqm-leaderboard/UseLeaderboard.stories.js +3 -15
  178. package/dist/collection/components/sqm-leaderboard/sqm-leaderboard-view.js +11 -35
  179. package/dist/collection/components/sqm-leaderboard/sqm-leaderboard.js +553 -563
  180. package/dist/collection/components/sqm-leaderboard-rank/LeaderboardRank.stories.js +3 -12
  181. package/dist/collection/components/sqm-leaderboard-rank/sqm-leaderboard-rank.js +200 -192
  182. package/dist/collection/components/sqm-leaderboard-rank/useLeaderboardRank.js +4 -3
  183. package/dist/collection/components/sqm-link-button/LinkButton.stories.js +2 -2
  184. package/dist/collection/components/sqm-link-button/sqm-link-button-view.js +1 -6
  185. package/dist/collection/components/sqm-link-button/sqm-link-button.js +73 -77
  186. package/dist/collection/components/sqm-logout-current-user/LogoutCurrentUser.stories.js +1 -1
  187. package/dist/collection/components/sqm-logout-current-user/sqm-logout-current-user-view.js +1 -9
  188. package/dist/collection/components/sqm-logout-current-user/sqm-logout-current-user.js +106 -115
  189. package/dist/collection/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.js +104 -109
  190. package/dist/collection/components/sqm-name-fields/NameFields.stories.js +2 -2
  191. package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +21 -20
  192. package/dist/collection/components/sqm-name-fields/sqm-name-fields.js +104 -109
  193. package/dist/collection/components/sqm-navigation-menu/sqm-navigation-menu-view.js +6 -9
  194. package/dist/collection/components/sqm-navigation-menu/sqm-navigation-menu.js +92 -82
  195. package/dist/collection/components/sqm-navigation-sidebar/NavigationSidebar.stories.js +1 -3
  196. package/dist/collection/components/sqm-navigation-sidebar/sqm-navigation-sidebar-view.js +1 -8
  197. package/dist/collection/components/sqm-navigation-sidebar/sqm-navigation-sidebar.js +71 -73
  198. package/dist/collection/components/sqm-navigation-sidebar-item/SidebarItem.stories.js +2 -2
  199. package/dist/collection/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item-view.js +1 -4
  200. package/dist/collection/components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item.js +315 -308
  201. package/dist/collection/components/sqm-pagination/sqm-pagination-view.js +1 -9
  202. package/dist/collection/components/sqm-pagination/sqm-pagination.js +94 -100
  203. package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +13 -13
  204. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +22 -54
  205. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +515 -603
  206. package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +3 -3
  207. package/dist/collection/components/sqm-password-field/passwordValidation.js +8 -20
  208. package/dist/collection/components/sqm-password-field/sqm-password-field-view.js +16 -18
  209. package/dist/collection/components/sqm-password-field/sqm-password-field.js +197 -219
  210. package/dist/collection/components/sqm-payout-button-scroll/PayoutButtonScroll.stories.js +1 -7
  211. package/dist/collection/components/sqm-payout-button-scroll/sqm-payout-button-scroll-view.js +1 -4
  212. package/dist/collection/components/sqm-payout-button-scroll/sqm-payout-button-scroll.js +82 -84
  213. package/dist/collection/components/sqm-popup-container/PopupContainer.stories.js +1 -2
  214. package/dist/collection/components/sqm-popup-container/sqm-popup-container-view.js +1 -5
  215. package/dist/collection/components/sqm-popup-container/sqm-popup-container.js +161 -155
  216. package/dist/collection/components/sqm-portal-change-marketing/ChangeMarketing.stories.js +5 -5
  217. package/dist/collection/components/sqm-portal-change-marketing/sqm-portal-change-marketing-view.js +8 -17
  218. package/dist/collection/components/sqm-portal-change-marketing/sqm-portal-change-marketing.js +142 -154
  219. package/dist/collection/components/sqm-portal-change-password/ChangePassword.stories.js +6 -6
  220. package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password-view.js +8 -24
  221. package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password.js +380 -436
  222. package/dist/collection/components/sqm-portal-change-password/usePortalChangePassword.js +5 -2
  223. package/dist/collection/components/sqm-portal-container/PortalContainer.stories.js +16 -119
  224. package/dist/collection/components/sqm-portal-container/sqm-portal-container-view.js +1 -5
  225. package/dist/collection/components/sqm-portal-container/sqm-portal-container.js +280 -299
  226. package/dist/collection/components/sqm-portal-email-verification/PortalEmailVerification.stories.js +5 -5
  227. package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification-view.js +13 -25
  228. package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification.js +216 -243
  229. package/dist/collection/components/sqm-portal-email-verification/usePortalEmailVerification.js +2 -1
  230. package/dist/collection/components/sqm-portal-footer/PortalFooter.stories.js +6 -6
  231. package/dist/collection/components/sqm-portal-footer/PoweredByImg.js +1 -12
  232. package/dist/collection/components/sqm-portal-footer/sqm-portal-footer-view.js +6 -16
  233. package/dist/collection/components/sqm-portal-footer/sqm-portal-footer.js +317 -351
  234. package/dist/collection/components/sqm-portal-forgot-password/PortalForgotPassword.stories.js +4 -4
  235. package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password-view.js +1 -14
  236. package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password.js +279 -316
  237. package/dist/collection/components/sqm-portal-forgot-password/usePortalForgotPassword.js +2 -1
  238. package/dist/collection/components/sqm-portal-frame/PortalFrame.stories.js +14 -55
  239. package/dist/collection/components/sqm-portal-frame/sqm-portal-frame-view.js +1 -7
  240. package/dist/collection/components/sqm-portal-frame/sqm-portal-frame.js +141 -158
  241. package/dist/collection/components/sqm-portal-google-login/sqm-portal-google-login.js +295 -342
  242. package/dist/collection/components/sqm-portal-google-registration-form/PortalGoogleRegistrationForm.stories.js +19 -26
  243. package/dist/collection/components/sqm-portal-google-registration-form/sqm-portal-google-registration-form.js +645 -749
  244. package/dist/collection/components/sqm-portal-login/PortalLogin.stories.js +2 -5
  245. package/dist/collection/components/sqm-portal-login/sqm-portal-login-view.js +1 -17
  246. package/dist/collection/components/sqm-portal-login/sqm-portal-login.js +255 -292
  247. package/dist/collection/components/sqm-portal-login/usePortalLogin.js +4 -2
  248. package/dist/collection/components/sqm-portal-logout/sqm-portal-logout.js +33 -36
  249. package/dist/collection/components/sqm-portal-profile/PortalProfile.stories.js +6 -6
  250. package/dist/collection/components/sqm-portal-profile/sqm-portal-profile-view.js +15 -26
  251. package/dist/collection/components/sqm-portal-profile/sqm-portal-profile.js +282 -314
  252. package/dist/collection/components/sqm-portal-protected-route/sqm-portal-protected-route.js +72 -82
  253. package/dist/collection/components/sqm-portal-register/PortalRegister.stories.js +8 -13
  254. package/dist/collection/components/sqm-portal-register/sqm-portal-register-view.js +15 -28
  255. package/dist/collection/components/sqm-portal-register/sqm-portal-register.js +525 -610
  256. package/dist/collection/components/sqm-portal-register/usePortalRegister.js +3 -1
  257. package/dist/collection/components/sqm-portal-registration-form/PortalRegistrationForm.stories.js +10 -15
  258. package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form-view.js +20 -33
  259. package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form.js +573 -663
  260. package/dist/collection/components/sqm-portal-registration-form/usePortalRegistrationForm.js +5 -2
  261. package/dist/collection/components/sqm-portal-reset-password/PortalResetPassword.stories.js +6 -6
  262. package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password-view.js +7 -29
  263. package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password.js +449 -514
  264. package/dist/collection/components/sqm-portal-reset-password/usePortalResetPassword.js +2 -1
  265. package/dist/collection/components/sqm-portal-verify-email/PortalVerifyEmail.stories.js +2 -2
  266. package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email-view.js +2 -14
  267. package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email.js +196 -222
  268. package/dist/collection/components/sqm-portal-verify-email/usePortalVerifyEmail.js +4 -2
  269. package/dist/collection/components/sqm-program-explainer/ProgramExplainer.stories.js +20 -32
  270. package/dist/collection/components/sqm-program-explainer/sqm-program-explainer-view.js +1 -7
  271. package/dist/collection/components/sqm-program-explainer/sqm-program-explainer.js +84 -78
  272. package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js +4 -10
  273. package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step.js +231 -220
  274. package/dist/collection/components/sqm-program-menu/ProgramMenu.stories.js +8 -25
  275. package/dist/collection/components/sqm-program-menu/sqm-program-menu.js +8 -9
  276. package/dist/collection/components/sqm-qr-code/QRCode.stories.js +8 -8
  277. package/dist/collection/components/sqm-qr-code/sqm-qr-code-view.js +2 -11
  278. package/dist/collection/components/sqm-qr-code/sqm-qr-code.js +206 -230
  279. package/dist/collection/components/sqm-radio-card/RadioCard.stories.js +2 -2
  280. package/dist/collection/components/sqm-radio-card/sqm-radio-card-view.js +1 -9
  281. package/dist/collection/components/sqm-referral-card/ReferralCard.stories.js +29 -86
  282. package/dist/collection/components/sqm-referral-card/sqm-referral-card-view.js +3 -11
  283. package/dist/collection/components/sqm-referral-card/sqm-referral-card.js +304 -335
  284. package/dist/collection/components/sqm-referral-code/ReferralCode.stories.js +14 -14
  285. package/dist/collection/components/sqm-referral-code/sqm-referral-code.js +369 -410
  286. package/dist/collection/components/sqm-referral-code/useReferralCode.js +3 -3
  287. package/dist/collection/components/sqm-referral-codes/ReferralCodes.stories.js +9 -36
  288. package/dist/collection/components/sqm-referral-codes/sqm-referral-codes-view.js +3 -14
  289. package/dist/collection/components/sqm-referral-codes/sqm-referral-codes.js +167 -175
  290. package/dist/collection/components/sqm-referral-iframe/ReferralIframe.stories.js +2 -4
  291. package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe-view.js +1 -3
  292. package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe.js +125 -132
  293. package/dist/collection/components/sqm-referral-table/ReferralTable.stories.js +9 -24
  294. package/dist/collection/components/sqm-referral-table/ReferralTableCell.stories.js +1 -1
  295. package/dist/collection/components/sqm-referral-table/ReferralTableRewardsCell.stories.js +5 -8
  296. package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTable.stories.js +1 -1
  297. package/dist/collection/components/sqm-referral-table/TaxAndCashReferralTableRewardsCell.stories.js +30 -30
  298. package/dist/collection/components/sqm-referral-table/UseReferralTable.stories.js +8 -30
  299. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-cell.js +28 -23
  300. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-date-cell.js +44 -40
  301. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-rewards-cell.js +219 -278
  302. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-status-cell.js +81 -76
  303. package/dist/collection/components/sqm-referral-table/cells/sqm-referral-table-user-cell.js +24 -20
  304. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-column.js +65 -61
  305. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-date-column.js +120 -139
  306. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-rewards-column.js +260 -300
  307. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-status-column.js +208 -225
  308. package/dist/collection/components/sqm-referral-table/columns/sqm-referral-table-user-column.js +124 -133
  309. package/dist/collection/components/sqm-referral-table/sqm-referral-table.js +229 -253
  310. package/dist/collection/components/sqm-referral-table/useReferralTable.js +1 -3
  311. package/dist/collection/components/sqm-referred-registration/sqm-referred-registration.js +479 -557
  312. package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeList.stories.js +1 -1
  313. package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeListData.js +1 -0
  314. package/dist/collection/components/sqm-reward-exchange-list/SVGs.js +5 -26
  315. package/dist/collection/components/sqm-reward-exchange-list/UseRewardExchangeList.stories.js +8 -18
  316. package/dist/collection/components/sqm-reward-exchange-list/progressBar.js +26 -28
  317. package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +96 -174
  318. package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list.js +618 -726
  319. package/dist/collection/components/sqm-rewards-table/RewardsTable.stories.js +16 -31
  320. package/dist/collection/components/sqm-rewards-table/RewardsTableCell.stories.js +12 -15
  321. package/dist/collection/components/sqm-rewards-table/TaxAndCashRewardsTable.stories.js +11 -11
  322. package/dist/collection/components/sqm-rewards-table/UseRewardsTable.stories.js +8 -30
  323. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-customer-note-cell.js +45 -40
  324. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-date-cell.js +44 -40
  325. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-reward-cell.js +97 -103
  326. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-source-cell.js +160 -156
  327. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-status-cell.js +336 -332
  328. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-date-column.js +96 -105
  329. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-note-column.js +67 -66
  330. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-reward-column.js +127 -135
  331. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-source-column.js +173 -197
  332. package/dist/collection/components/sqm-rewards-table/columns/sqm-rewards-table-status-column.js +390 -463
  333. package/dist/collection/components/sqm-rewards-table/mockRewardData.js +4 -2
  334. package/dist/collection/components/sqm-rewards-table/sqm-rewards-table.js +206 -219
  335. package/dist/collection/components/sqm-rewards-table/useRewardsTable.js +1 -3
  336. package/dist/collection/components/sqm-route/sqm-route.js +31 -26
  337. package/dist/collection/components/sqm-router/Router.stories.js +4 -33
  338. package/dist/collection/components/sqm-router/sqm-router.js +17 -14
  339. package/dist/collection/components/sqm-scroll/Scroll.stories.js +6 -89
  340. package/dist/collection/components/sqm-scroll/sqm-scroll.js +259 -255
  341. package/dist/collection/components/sqm-share-button/ShareButton.stories.js +12 -46
  342. package/dist/collection/components/sqm-share-button/UseShareButton.stories.js +2 -7
  343. package/dist/collection/components/sqm-share-button/sqm-share-button-view.js +1 -6
  344. package/dist/collection/components/sqm-share-button/sqm-share-button.js +509 -521
  345. package/dist/collection/components/sqm-share-code/ShareCode.stories.js +13 -13
  346. package/dist/collection/components/sqm-share-code/sqm-share-code.js +329 -360
  347. package/dist/collection/components/sqm-share-code/useShareCode.js +3 -3
  348. package/dist/collection/components/sqm-share-link/ShareLink.stories.js +85 -86
  349. package/dist/collection/components/sqm-share-link/UseShareLink.stories.js +17 -20
  350. package/dist/collection/components/sqm-share-link/sqm-share-link-view.js +21 -49
  351. package/dist/collection/components/sqm-share-link/sqm-share-link.js +987 -1192
  352. package/dist/collection/components/sqm-share-link/useShareLink.js +3 -3
  353. package/dist/collection/components/sqm-skeleton/sqm-skeleton.js +55 -59
  354. package/dist/collection/components/sqm-stat-container/sqm-stat-container-view.js +1 -5
  355. package/dist/collection/components/sqm-stat-container/sqm-stat-container.js +162 -185
  356. package/dist/collection/components/sqm-stencilbook/AutoColor.js +1 -1
  357. package/dist/collection/components/sqm-stencilbook/BrandSelector.js +12 -15
  358. package/dist/collection/components/sqm-stencilbook/CucumberAddon.js +1 -5
  359. package/dist/collection/components/sqm-stencilbook/HookStoryAddon.js +1 -2
  360. package/dist/collection/components/sqm-stencilbook/Matrix.js +4 -13
  361. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +8 -13
  362. package/dist/collection/components/sqm-tab/sqm-tab.js +27 -25
  363. package/dist/collection/components/sqm-table-cell/sqm-table-cell.js +47 -49
  364. package/dist/collection/components/sqm-table-row/sqm-table-row.js +27 -30
  365. package/dist/collection/components/sqm-tabs/sqm-tabs-view.js +10 -17
  366. package/dist/collection/components/sqm-tabs/sqm-tabs.js +62 -59
  367. package/dist/collection/components/sqm-tabs/useTabs.js +1 -2
  368. package/dist/collection/components/sqm-task-card/DetailsView.js +1 -7
  369. package/dist/collection/components/sqm-task-card/SVGs.js +3 -7
  370. package/dist/collection/components/sqm-task-card/TaskCard.stories.js +31 -277
  371. package/dist/collection/components/sqm-task-card/UseTaskCard.stories.js +1 -17
  372. package/dist/collection/components/sqm-task-card/progress-bar/ProgressBar.stories.js +1 -1
  373. package/dist/collection/components/sqm-task-card/progress-bar/SVGs.js +2 -10
  374. package/dist/collection/components/sqm-task-card/progress-bar/progress-bar-view.js +10 -13
  375. package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +56 -83
  376. package/dist/collection/components/sqm-task-card/sqm-task-card.js +780 -860
  377. package/dist/collection/components/sqm-text/Text.stories.js +2 -4
  378. package/dist/collection/components/sqm-text/sqm-text.js +61 -57
  379. package/dist/collection/components/sqm-text-span/sqm-text-span-view.js +1 -5
  380. package/dist/collection/components/sqm-text-span/sqm-text-span.js +109 -101
  381. package/dist/collection/components/sqm-timeline/SVGs.js +3 -9
  382. package/dist/collection/components/sqm-timeline/Timeline.stories.js +5 -57
  383. package/dist/collection/components/sqm-timeline/sqm-timeline-entry-view.js +1 -16
  384. package/dist/collection/components/sqm-timeline/sqm-timeline-entry.js +178 -166
  385. package/dist/collection/components/sqm-timeline/sqm-timeline.js +41 -45
  386. package/dist/collection/components/sqm-titled-section/TitledSection.stories.js +5 -206
  387. package/dist/collection/components/sqm-titled-section/sqm-portal-section-view.js +1 -4
  388. package/dist/collection/components/sqm-titled-section/sqm-titled-section.js +129 -148
  389. package/dist/collection/components/sqm-user-attribute/UserAttribute.stories.js +4 -7
  390. package/dist/collection/components/sqm-user-attribute/sqm-user-attribute-view.js +1 -3
  391. package/dist/collection/components/sqm-user-attribute/sqm-user-attribute.js +146 -137
  392. package/dist/collection/components/sqm-user-name/sqm-user-name.js +82 -84
  393. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.js +6 -26
  394. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.js +215 -240
  395. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/WidgetEmailVerification.stories.js +12 -22
  396. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.js +12 -30
  397. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification.js +177 -195
  398. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-controller.js +33 -41
  399. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +776 -921
  400. package/dist/collection/components/sqm-widget-verification/useVerificationEmail.js +4 -2
  401. package/dist/collection/components/tax-and-cash/SVGs.js +1 -4
  402. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +1 -3
  403. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/formDefinitions.js +188 -198
  404. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +34 -83
  405. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +1864 -2210
  406. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +8 -7
  407. package/dist/collection/components/tax-and-cash/sqm-docusign-form/docusign-iframe/DocusignIframe.js +13 -31
  408. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.js +26 -53
  409. package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form.js +565 -660
  410. package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +6 -3
  411. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.js +24 -63
  412. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +699 -816
  413. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +11 -7
  414. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/PayoutDetailsCard.stories.js +1 -4
  415. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card-view.js +5 -20
  416. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +130 -147
  417. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +12 -33
  418. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +910 -1035
  419. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/ErrorView.js +1 -3
  420. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/LoadingView.js +2 -19
  421. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +4760 -5686
  422. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +89 -176
  423. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +1857 -2159
  424. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +1 -0
  425. package/dist/collection/components/tax-and-cash/sqm-user-info-form/UserInfoFormView.stories.js +27 -27
  426. package/dist/collection/components/tax-and-cash/sqm-user-info-form/small-views/DocusignExpiredView.js +5 -9
  427. package/dist/collection/components/tax-and-cash/sqm-user-info-form/small-views/IndirectTaxDetailsView.js +24 -44
  428. package/dist/collection/components/tax-and-cash/sqm-user-info-form/small-views/SlotViews.stories.js +6 -6
  429. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +120 -157
  430. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +713 -823
  431. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +9 -7
  432. package/dist/collection/components/views/EmailRegistration.stories.js +60 -60
  433. package/dist/collection/components/views/copy-text-view.js +6 -17
  434. package/dist/collection/components/views/email-registration-view.js +14 -28
  435. package/dist/collection/global/styles.js +8 -4
  436. package/dist/collection/stories/NewPortal.stories.js +106 -178
  437. package/dist/collection/tables/GenericTableView.js +19 -27
  438. package/dist/collection/tables/TableSlots.js +5 -19
  439. package/dist/collection/utils/DefaultTemplateView.js +6 -24
  440. package/dist/collection/utils/RequiredPropsError.js +10 -24
  441. package/dist/collection/utils/TemplateView.js +1 -3
  442. package/dist/collection/utils/demoMerge.js +10 -0
  443. package/dist/esm/AsYouType-cc09fa68.js +4746 -0
  444. package/dist/esm/{ErrorView-c6fc1d9b.js → ErrorView-19af8137.js} +1 -1
  445. package/dist/esm/{GenericTableView-471a9386.js → GenericTableView-4f7ac63d.js} +17 -15
  446. package/dist/esm/{JSS-67b5cff8.js → JSS-e97b34f4.js} +341 -337
  447. package/dist/esm/{ShadowViewAddon-e1375e0d.js → ShadowViewAddon-0c8005bd.js} +284 -264
  448. package/dist/esm/{copy-text-view-87259b11.js → copy-text-view-e1c3f2cd.js} +2 -2
  449. package/dist/esm/{data-04d2da44.js → data-510cc9b7.js} +1 -1
  450. package/dist/esm/demoMerge-a0320a8e.js +201 -0
  451. package/dist/esm/{dom-context-hooks.module-50442785.js → dom-context-hooks.module-f88a3e54.js} +129 -72
  452. package/dist/esm/{email-registration-view-4cdb4129.js → email-registration-view-7a63a912.js} +10 -9
  453. package/dist/esm/{global-f019575d.js → global-cf0cc6b1.js} +586 -582
  454. package/dist/esm/{index-38ad4957.js → index-7a8b0c0b.js} +766 -341
  455. package/dist/esm/{index.module-cc08450c.js → index-b04013cc.js} +2873 -473
  456. package/dist/esm/{index-ffa26b43.js → index-e6f5153e.js} +47 -29
  457. package/dist/esm/{jsonpointer-388a7082.js → jsonpointer-c5423376.js} +8 -4
  458. package/dist/esm/loader.js +6 -5
  459. package/dist/esm/{luxon-1be92a8e.js → luxon-40b943cb.js} +486 -299
  460. package/dist/esm/mint-components.js +8 -7
  461. package/dist/esm/{mockRewardData-9b27d6f1.js → mockRewardData-2cceba7a.js} +5 -3
  462. package/dist/esm/{parseStates-ed75e224.js → parseStates-0c27f2de.js} +3 -1
  463. package/dist/esm/polyfills/css-shim.js +1 -1
  464. package/dist/esm/raisins-plop-target.entry.js +1 -1
  465. package/dist/esm/{re-render-380499f8.js → re-render-e911a0f7.js} +5 -5
  466. package/dist/esm/sqm-banking-info-form_10.entry.js +381 -1377
  467. package/dist/esm/sqm-big-stat_47.entry.js +767 -2840
  468. package/dist/esm/{sqm-close-button-view-fd9012e7.js → sqm-close-button-view-1deb12b1.js} +2 -2
  469. package/dist/esm/sqm-close-button.entry.js +5 -10
  470. package/dist/esm/sqm-code-verification.entry.js +19 -46
  471. package/dist/esm/sqm-context-router.entry.js +6 -5
  472. package/dist/esm/sqm-email-verification_2.entry.js +43 -154
  473. package/dist/esm/sqm-empty_4.entry.js +21 -58
  474. package/dist/esm/sqm-form-message_2.entry.js +7 -19
  475. package/dist/esm/sqm-google-sign-in.entry.js +4 -3
  476. package/dist/esm/sqm-graphql-client-provider.entry.js +9 -8
  477. package/dist/esm/sqm-header-logo.entry.js +4 -19
  478. package/dist/esm/sqm-instant-access-registration.entry.js +12 -87
  479. package/dist/esm/sqm-invoice-table-data-cell_5.entry.js +6 -8
  480. package/dist/esm/{sqm-lead-checkbox-field-view-04aa32a7.js → sqm-lead-checkbox-field-view-d055e7bd.js} +12 -11
  481. package/dist/esm/sqm-lead-checkbox-field.entry.js +12 -28
  482. package/dist/esm/sqm-lead-input-field-view-b0d62f1c.js +50 -0
  483. package/dist/esm/sqm-lead-input-field.entry.js +13 -29
  484. package/dist/esm/{sqm-leaderboard-rank-view-7a682cc3.js → sqm-leaderboard-rank-view-cd52cc80.js} +1 -1
  485. package/dist/esm/sqm-leaderboard-rank.entry.js +22 -19
  486. package/dist/esm/{sqm-logout-current-user-view-376c1bf6.js → sqm-logout-current-user-view-9bda187a.js} +2 -2
  487. package/dist/esm/sqm-logout-current-user.entry.js +12 -23
  488. package/dist/esm/{sqm-navigation-sidebar-item-view-40837457.js → sqm-navigation-sidebar-item-view-754b2484.js} +4 -4
  489. package/dist/esm/sqm-navigation-sidebar-item.entry.js +21 -16
  490. package/dist/esm/{sqm-navigation-sidebar-view-2b66457a.js → sqm-navigation-sidebar-view-e2094399.js} +2 -2
  491. package/dist/esm/sqm-navigation-sidebar.entry.js +11 -16
  492. package/dist/esm/sqm-pagination_3.entry.js +35 -97
  493. package/dist/esm/{sqm-partner-info-modal-view-e02fb63a.js → sqm-partner-info-modal-view-3b59be37.js} +4 -4
  494. package/dist/esm/sqm-password-field.entry.js +185 -85
  495. package/dist/esm/sqm-popup-container.entry.js +12 -12
  496. package/dist/esm/{sqm-portal-container-view-200c9df8.js → sqm-portal-container-view-fcd53673.js} +2 -2
  497. package/dist/esm/{sqm-portal-email-verification-view-3fa9587c.js → sqm-portal-email-verification-view-88fbf496.js} +4 -4
  498. package/dist/esm/sqm-portal-email-verification.entry.js +18 -48
  499. package/dist/esm/sqm-portal-forgot-password_6.entry.js +73 -401
  500. package/dist/esm/sqm-portal-logout.entry.js +5 -11
  501. package/dist/esm/{sqm-portal-profile-view-41894261.js → sqm-portal-profile-view-f27adfba.js} +20 -17
  502. package/dist/esm/sqm-portal-profile.entry.js +16 -52
  503. package/dist/esm/sqm-portal-protected-route.entry.js +8 -21
  504. package/dist/esm/{sqm-portal-registration-form-view-79265df5.js → sqm-portal-registration-form-view-113e1969.js} +26 -21
  505. package/dist/esm/{sqm-portal-reset-password-view-c7dd1c01.js → sqm-portal-reset-password-view-f9fb6355.js} +3 -3
  506. package/dist/esm/sqm-portal-reset-password.entry.js +18 -86
  507. package/dist/esm/{sqm-portal-verify-email-view-c102aa7c.js → sqm-portal-verify-email-view-ee40e3f2.js} +48 -45
  508. package/dist/esm/{sqm-qr-code-view-dd46daa3.js → sqm-qr-code-view-f8de4606.js} +3 -3
  509. package/dist/esm/sqm-qr-code.entry.js +18 -44
  510. package/dist/esm/sqm-referral-table_11.entry.js +36 -139
  511. package/dist/esm/sqm-rewards-table-customer-note-cell.entry.js +5 -4
  512. package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +4 -7
  513. package/dist/esm/sqm-rewards-table_9.entry.js +55 -174
  514. package/dist/esm/sqm-route.entry.js +2 -1
  515. package/dist/esm/sqm-scroll.entry.js +12 -8
  516. package/dist/esm/sqm-stencilbook.entry.js +4808 -4180
  517. package/dist/esm/sqm-tab.entry.js +5 -4
  518. package/dist/esm/sqm-tabs.entry.js +9 -8
  519. package/dist/esm/{sqm-text-span-view-72f43dff.js → sqm-text-span-view-ed92b3c6.js} +2 -2
  520. package/dist/esm/sqm-text-span.entry.js +8 -4
  521. package/dist/esm/{sqm-user-info-form-view-8a95c5eb.js → sqm-user-info-form-view-c044a385.js} +173 -163
  522. package/dist/esm/sqm-widget-verification-controller.entry.js +4 -9
  523. package/dist/esm/subregions-d9f177f6.js +1452 -0
  524. package/dist/esm/{useChildElements-aa9eb7c9.js → useChildElements-a69f208f.js} +3 -3
  525. package/dist/esm/{useIndirectTaxForm-8d2e873d.js → useIndirectTaxForm-64a3ca69.js} +32 -28
  526. package/dist/esm/{useInstantAccessRegistration-7b11eb02.js → useInstantAccessRegistration-8c678a5a.js} +6 -6
  527. package/dist/esm/{useLeadFormState-b67018f2.js → useLeadFormState-34e05463.js} +7 -7
  528. package/dist/esm/{usePortalRegistrationForm-91e5786d.js → usePortalRegistrationForm-c6519939.js} +14 -11
  529. package/dist/esm/{useReferralCodes-a0a271ca.js → useReferralCodes-d0a384e4.js} +9 -9
  530. package/dist/esm/{useReferralTable-670580ff.js → useReferralTable-214dff06.js} +11 -11
  531. package/dist/esm/{useRegistrationFormState-95a75c57.js → useRegistrationFormState-72b4786d.js} +3 -3
  532. package/dist/esm/{useVerificationEmail-99d9f705.js → useVerificationEmail-b2c349a3.js} +12 -10
  533. package/dist/esm/{utilities-23a276e0.js → utilities-ceab25cd.js} +2 -2
  534. package/dist/esm-es5/AsYouType-cc09fa68.js +1 -0
  535. package/dist/esm-es5/{ErrorView-c6fc1d9b.js → ErrorView-19af8137.js} +1 -1
  536. package/dist/esm-es5/GenericTableView-4f7ac63d.js +1 -0
  537. package/dist/esm-es5/JSS-e97b34f4.js +8 -0
  538. package/dist/esm-es5/ShadowViewAddon-0c8005bd.js +1 -0
  539. package/dist/esm-es5/copy-text-view-e1c3f2cd.js +1 -0
  540. package/dist/esm-es5/data-510cc9b7.js +1 -0
  541. package/dist/esm-es5/demoMerge-a0320a8e.js +1 -0
  542. package/dist/esm-es5/dom-context-hooks.module-f88a3e54.js +53 -0
  543. package/dist/esm-es5/email-registration-view-7a63a912.js +1 -0
  544. package/dist/esm-es5/global-cf0cc6b1.js +271 -0
  545. package/dist/esm-es5/imageUrl-4775f17b.js +1 -1
  546. package/dist/esm-es5/index-7a8b0c0b.js +2 -0
  547. package/dist/esm-es5/index-b04013cc.js +1 -0
  548. package/dist/esm-es5/index-e6f5153e.js +1 -0
  549. package/dist/esm-es5/jsonpointer-c5423376.js +1 -0
  550. package/dist/esm-es5/loader.js +1 -1
  551. package/dist/esm-es5/luxon-40b943cb.js +1 -0
  552. package/dist/esm-es5/mint-components.js +1 -1
  553. package/dist/esm-es5/mockRewardData-2cceba7a.js +1 -0
  554. package/dist/esm-es5/parseStates-0c27f2de.js +1 -0
  555. package/dist/esm-es5/raisins-plop-target.entry.js +1 -1
  556. package/dist/esm-es5/re-render-e911a0f7.js +1 -0
  557. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  558. package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
  559. package/dist/esm-es5/{sqm-close-button-view-fd9012e7.js → sqm-close-button-view-1deb12b1.js} +1 -1
  560. package/dist/esm-es5/sqm-close-button.entry.js +1 -1
  561. package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
  562. package/dist/esm-es5/sqm-context-router.entry.js +1 -1
  563. package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
  564. package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
  565. package/dist/esm-es5/sqm-form-message_2.entry.js +1 -1
  566. package/dist/esm-es5/sqm-google-sign-in.entry.js +1 -1
  567. package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
  568. package/dist/esm-es5/sqm-header-logo.entry.js +1 -1
  569. package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
  570. package/dist/esm-es5/sqm-invoice-table-data-cell_5.entry.js +1 -1
  571. package/dist/esm-es5/sqm-lead-checkbox-field-view-d055e7bd.js +1 -0
  572. package/dist/esm-es5/sqm-lead-checkbox-field.entry.js +1 -1
  573. package/dist/esm-es5/sqm-lead-input-field-view-b0d62f1c.js +1 -0
  574. package/dist/esm-es5/sqm-lead-input-field.entry.js +1 -1
  575. package/dist/esm-es5/{sqm-leaderboard-rank-view-7a682cc3.js → sqm-leaderboard-rank-view-cd52cc80.js} +1 -1
  576. package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
  577. package/dist/esm-es5/{sqm-logout-current-user-view-376c1bf6.js → sqm-logout-current-user-view-9bda187a.js} +1 -1
  578. package/dist/esm-es5/sqm-logout-current-user.entry.js +1 -1
  579. package/dist/esm-es5/sqm-navigation-sidebar-item-view-754b2484.js +1 -0
  580. package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
  581. package/dist/esm-es5/sqm-navigation-sidebar-view-e2094399.js +1 -0
  582. package/dist/esm-es5/sqm-navigation-sidebar.entry.js +1 -1
  583. package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
  584. package/dist/esm-es5/sqm-partner-info-modal-view-3b59be37.js +1 -0
  585. package/dist/esm-es5/sqm-password-field.entry.js +1 -1
  586. package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
  587. package/dist/esm-es5/sqm-portal-container-view-fcd53673.js +1 -0
  588. package/dist/esm-es5/{sqm-portal-email-verification-view-3fa9587c.js → sqm-portal-email-verification-view-88fbf496.js} +1 -1
  589. package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
  590. package/dist/esm-es5/sqm-portal-forgot-password_6.entry.js +1 -1
  591. package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
  592. package/dist/esm-es5/sqm-portal-profile-view-f27adfba.js +1 -0
  593. package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
  594. package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
  595. package/dist/esm-es5/sqm-portal-registration-form-view-113e1969.js +1 -0
  596. package/dist/esm-es5/sqm-portal-reset-password-view-f9fb6355.js +1 -0
  597. package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
  598. package/dist/esm-es5/sqm-portal-verify-email-view-ee40e3f2.js +1 -0
  599. package/dist/esm-es5/{sqm-qr-code-view-dd46daa3.js → sqm-qr-code-view-f8de4606.js} +1 -1
  600. package/dist/esm-es5/sqm-qr-code.entry.js +1 -1
  601. package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
  602. package/dist/esm-es5/sqm-rewards-table-customer-note-cell.entry.js +1 -1
  603. package/dist/esm-es5/sqm-rewards-table-customer-note-column.entry.js +1 -1
  604. package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
  605. package/dist/esm-es5/sqm-route.entry.js +1 -1
  606. package/dist/esm-es5/sqm-scroll.entry.js +1 -1
  607. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  608. package/dist/esm-es5/sqm-tab.entry.js +1 -1
  609. package/dist/esm-es5/sqm-tabs.entry.js +1 -1
  610. package/dist/esm-es5/sqm-text-span-view-ed92b3c6.js +1 -0
  611. package/dist/esm-es5/sqm-text-span.entry.js +1 -1
  612. package/dist/esm-es5/sqm-user-info-form-view-c044a385.js +1 -0
  613. package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
  614. package/dist/esm-es5/subregions-d9f177f6.js +1 -0
  615. package/dist/esm-es5/useChildElements-a69f208f.js +1 -0
  616. package/dist/esm-es5/useIndirectTaxForm-64a3ca69.js +6 -0
  617. package/dist/esm-es5/useInstantAccessRegistration-8c678a5a.js +1 -0
  618. package/dist/esm-es5/useLeadFormState-34e05463.js +1 -0
  619. package/dist/esm-es5/usePortalRegistrationForm-c6519939.js +1 -0
  620. package/dist/esm-es5/useReferralCodes-d0a384e4.js +1 -0
  621. package/dist/esm-es5/useReferralTable-214dff06.js +1 -0
  622. package/dist/esm-es5/useRegistrationFormState-72b4786d.js +1 -0
  623. package/dist/esm-es5/useVerificationEmail-b2c349a3.js +1 -0
  624. package/dist/esm-es5/utilities-ceab25cd.js +1 -0
  625. package/dist/esm-es5/utils-334c1e34.js +1 -1
  626. package/dist/loader/index.d.ts +9 -1
  627. package/dist/loader/package.json +1 -0
  628. package/dist/mint-components/mint-components.esm.js +1 -1
  629. package/dist/mint-components/mint-components.js +2 -1
  630. package/dist/mint-components/p-029ee766.system.js +1 -0
  631. package/dist/mint-components/p-04eaa3bb.system.js +1 -0
  632. package/dist/mint-components/p-056845fb.js +56 -0
  633. package/dist/mint-components/p-05715d8c.system.entry.js +1 -0
  634. package/dist/mint-components/p-0650e0f1.system.js +1 -0
  635. package/dist/mint-components/p-09a6ab1f.entry.js +1 -0
  636. package/dist/mint-components/p-0a8c9f35.system.entry.js +1 -0
  637. package/dist/mint-components/{p-11c127f5.js → p-0b77b3fe.js} +1 -1
  638. package/dist/mint-components/p-0bc61e27.system.entry.js +1 -0
  639. package/dist/mint-components/p-0bdacc2d.system.js +1 -0
  640. package/dist/mint-components/p-0c81f11f.system.entry.js +1 -0
  641. package/dist/mint-components/p-0c97293e.entry.js +1 -0
  642. package/dist/mint-components/p-0d69fc17.system.entry.js +1 -0
  643. package/dist/mint-components/p-0daa339e.entry.js +1 -0
  644. package/dist/mint-components/p-0f65e4ad.system.js +1 -0
  645. package/dist/mint-components/p-11028f98.system.js +1 -0
  646. package/dist/mint-components/p-119b9680.system.js +1 -0
  647. package/dist/mint-components/{p-ed741b3b.js → p-125c5bec.js} +6 -6
  648. package/dist/mint-components/p-12ae9c97.entry.js +1 -0
  649. package/dist/mint-components/p-139825b2.entry.js +1 -0
  650. package/dist/mint-components/p-14f0af4c.system.entry.js +1 -0
  651. package/dist/mint-components/{p-1a3a57c0.js → p-159a9368.js} +1 -1
  652. package/dist/mint-components/{p-78e98761.js → p-15f170d4.js} +4 -4
  653. package/dist/mint-components/p-162e5426.system.js +1 -0
  654. package/dist/mint-components/p-1933e4cc.system.entry.js +1 -0
  655. package/dist/mint-components/p-1aa5cdff.entry.js +1 -0
  656. package/dist/mint-components/p-1b673705.system.js +1 -0
  657. package/dist/mint-components/p-1e1543c7.entry.js +1 -0
  658. package/dist/mint-components/p-201ae45a.js +1 -0
  659. package/dist/mint-components/p-20b90db3.system.entry.js +1 -0
  660. package/dist/mint-components/p-2380b28e.system.entry.js +1 -0
  661. package/dist/mint-components/p-258152c8.system.entry.js +1 -0
  662. package/dist/mint-components/p-29be0454.system.entry.js +1 -0
  663. package/dist/mint-components/p-2af001d4.system.js +1 -0
  664. package/dist/mint-components/{p-88e16945.js → p-2b052eed.js} +1 -1
  665. package/dist/mint-components/p-2b5c577a.system.js +1 -0
  666. package/dist/mint-components/p-2ff39583.entry.js +33 -0
  667. package/dist/mint-components/p-3104b4ba.entry.js +1 -0
  668. package/dist/mint-components/p-324dd9c9.system.entry.js +1 -0
  669. package/dist/mint-components/p-32b3c92e.system.entry.js +1 -0
  670. package/dist/mint-components/{p-c813ec64.js → p-3595dbe3.js} +1 -1
  671. package/dist/mint-components/p-384d4366.system.entry.js +1 -0
  672. package/dist/mint-components/{p-a417a4c7.js → p-388fdcdc.js} +1 -1
  673. package/dist/mint-components/{p-acaf505d.entry.js → p-39e59497.entry.js} +1 -1
  674. package/dist/mint-components/p-3a8fa8df.system.entry.js +1 -0
  675. package/dist/mint-components/{p-456ccda6.system.js → p-3aab5e80.system.js} +1 -1
  676. package/dist/mint-components/p-3b7eac48.js +1 -0
  677. package/dist/mint-components/p-3f9d4025.js +254 -0
  678. package/dist/mint-components/p-4639a9ed.entry.js +1 -0
  679. package/dist/mint-components/p-483c2ce0.system.entry.js +1 -0
  680. package/dist/mint-components/p-487dac4b.system.js +271 -0
  681. package/dist/mint-components/p-49ca1533.system.entry.js +1 -0
  682. package/dist/mint-components/p-49d4188a.system.js +1 -0
  683. package/dist/mint-components/p-4be3689e.system.entry.js +1 -0
  684. package/dist/mint-components/p-4d690bf1.system.js +1 -0
  685. package/dist/mint-components/p-4ea630ba.system.js +1 -0
  686. package/dist/mint-components/p-5a1be3aa.entry.js +83 -0
  687. package/dist/mint-components/p-5a2c495f.js +1 -0
  688. package/dist/mint-components/p-5b043988.system.entry.js +1 -0
  689. package/dist/mint-components/p-5bacacba.entry.js +13 -0
  690. package/dist/mint-components/p-5e7e4e54.system.entry.js +1 -0
  691. package/dist/mint-components/p-6333265f.system.js +1 -1
  692. package/dist/mint-components/p-643a756b.system.js +53 -0
  693. package/dist/mint-components/p-647ca265.entry.js +1 -0
  694. package/dist/mint-components/p-647ffff2.entry.js +1 -0
  695. package/dist/mint-components/p-64c93b03.system.js +1 -0
  696. package/dist/mint-components/p-6708043c.entry.js +1 -0
  697. package/dist/mint-components/p-6a7c9ae4.system.entry.js +1 -0
  698. package/dist/mint-components/p-6a7cd966.system.js +1 -0
  699. package/dist/mint-components/p-6b9ff091.system.js +1 -0
  700. package/dist/mint-components/p-6be0e0a7.system.entry.js +1 -0
  701. package/dist/mint-components/p-6ccdf33a.js +1 -0
  702. package/dist/mint-components/p-6cdde5e8.system.js +1 -0
  703. package/dist/mint-components/p-6cfca206.js +1 -0
  704. package/dist/mint-components/{p-d276468c.js → p-6e00edce.js} +1 -1
  705. package/dist/mint-components/p-6eb14db9.system.entry.js +1 -0
  706. package/dist/mint-components/p-6f3ba1ad.system.js +1 -0
  707. package/dist/mint-components/p-6f66bb97.system.js +1 -0
  708. package/dist/mint-components/p-7127e360.system.entry.js +1 -0
  709. package/dist/mint-components/{p-d0559e66.js → p-71759064.js} +1 -1
  710. package/dist/mint-components/p-72f11f03.js +1 -0
  711. package/dist/mint-components/p-732ac03d.js +1 -0
  712. package/dist/mint-components/p-74f50554.js +1 -0
  713. package/dist/mint-components/p-7558fe46.js +499 -0
  714. package/dist/mint-components/{p-c43e1d3b.js → p-75b7496e.js} +1 -1
  715. package/dist/mint-components/p-76d36b05.js +1 -0
  716. package/dist/mint-components/p-7a8ed2f3.system.entry.js +1 -0
  717. package/dist/mint-components/{p-3390f1f2.system.js → p-7d992af1.system.js} +2 -2
  718. package/dist/mint-components/p-7f71b56b.system.entry.js +1 -0
  719. package/dist/mint-components/p-81b63e83.system.entry.js +1 -0
  720. package/dist/mint-components/p-83330731.system.js +1 -0
  721. package/dist/mint-components/p-834cd992.js +2 -0
  722. package/dist/mint-components/p-843c9997.system.js +1 -0
  723. package/dist/mint-components/{p-956f9479.system.js → p-8680e52b.system.js} +1 -1
  724. package/dist/mint-components/p-8740794e.system.js +2 -0
  725. package/dist/mint-components/p-885630e6.entry.js +1 -0
  726. package/dist/mint-components/p-8886a874.system.js +1 -0
  727. package/dist/mint-components/p-88b65807.system.js +1 -0
  728. package/dist/mint-components/p-89b410d5.system.entry.js +1 -0
  729. package/dist/mint-components/p-89eef397.entry.js +1 -0
  730. package/dist/mint-components/p-8aae5dba.system.entry.js +1 -0
  731. package/dist/mint-components/p-8ba39302.entry.js +1 -0
  732. package/dist/mint-components/{p-c2254b88.js → p-8d85f34c.js} +1 -1
  733. package/dist/mint-components/p-8f67c580.js +1 -0
  734. package/dist/mint-components/p-8fa1f8e3.entry.js +1 -0
  735. package/dist/mint-components/p-930cc94f.system.js +1 -0
  736. package/dist/mint-components/p-94f3e0a2.js +1 -0
  737. package/dist/mint-components/p-96e332db.entry.js +17 -0
  738. package/dist/mint-components/p-9755e82a.system.entry.js +1 -0
  739. package/dist/mint-components/p-9a7f186b.entry.js +1 -0
  740. package/dist/mint-components/p-9c2e286c.entry.js +11 -0
  741. package/dist/mint-components/{p-e30abc44.js → p-9cabd2d1.js} +1 -1
  742. package/dist/mint-components/p-9d06abb3.entry.js +13 -0
  743. package/dist/mint-components/p-9d1659c4.entry.js +308 -0
  744. package/dist/mint-components/p-9d6ef5ca.entry.js +11 -0
  745. package/dist/mint-components/p-a0e6ccbc.system.js +1 -0
  746. package/dist/mint-components/p-a35191ca.system.js +1 -0
  747. package/dist/mint-components/p-a3d1c665.system.entry.js +1 -0
  748. package/dist/mint-components/p-a43a9fa9.system.js +1 -1
  749. package/dist/mint-components/{p-04da3964.system.js → p-a6c96b8a.system.js} +1 -1
  750. package/dist/mint-components/p-a75748c4.js +13 -0
  751. package/dist/mint-components/{p-f9fcc772.js → p-a7a74002.js} +1 -1
  752. package/dist/mint-components/{p-3484f1c1.js → p-a8e2f45b.js} +1 -1
  753. package/dist/mint-components/p-a976d930.system.entry.js +1 -0
  754. package/dist/mint-components/p-aadbe44d.js +1 -0
  755. package/dist/mint-components/p-aaf15612.entry.js +1 -0
  756. package/dist/mint-components/p-ab1e96ea.system.js +1 -0
  757. package/dist/mint-components/p-abd9e52b.system.entry.js +1 -0
  758. package/dist/mint-components/{p-19aebd7d.js → p-ac32d96a.js} +1 -1
  759. package/dist/mint-components/{p-381af581.js → p-acd3e9e3.js} +1 -1
  760. package/dist/mint-components/{p-9a69f781.system.js → p-ae5f7df6.system.js} +1 -1
  761. package/dist/mint-components/p-af9d3491.js +1 -0
  762. package/dist/mint-components/p-b1f880ee.entry.js +1 -0
  763. package/dist/mint-components/p-b492fd4b.system.entry.js +1 -0
  764. package/dist/mint-components/p-b652d3b3.js +1 -0
  765. package/dist/mint-components/p-b6f5ab75.system.entry.js +1 -0
  766. package/dist/mint-components/p-b907384d.entry.js +1 -0
  767. package/dist/mint-components/p-bbb494a8.system.js +1 -0
  768. package/dist/mint-components/p-bd1a14ba.js +1 -0
  769. package/dist/mint-components/p-bd66c171.js +1 -0
  770. package/dist/mint-components/p-be38ae67.js +1 -0
  771. package/dist/mint-components/p-c30dfd5d.entry.js +92 -0
  772. package/dist/mint-components/p-c380988f.system.js +1 -0
  773. package/dist/mint-components/{p-104f6ced.entry.js → p-c3a07f51.entry.js} +1 -1
  774. package/dist/mint-components/p-c50c206e.system.js +1 -0
  775. package/dist/mint-components/p-c6d2a452.js +1 -0
  776. package/dist/mint-components/p-c7dd2eaa.system.entry.js +1 -0
  777. package/dist/mint-components/p-c8f697e4.system.js +1 -0
  778. package/dist/mint-components/p-c980e369.entry.js +1 -0
  779. package/dist/mint-components/p-cb714df1.system.js +1 -0
  780. package/dist/mint-components/p-cdf099fe.js +108 -0
  781. package/dist/mint-components/p-ce06d498.js +52 -0
  782. package/dist/mint-components/p-d08ebaa9.js +1 -0
  783. package/dist/mint-components/p-d8fac546.entry.js +1 -0
  784. package/dist/mint-components/p-d91a97d2.js +1 -0
  785. package/dist/mint-components/p-da6cb2c3.system.entry.js +1 -0
  786. package/dist/mint-components/p-dd7e8c95.system.js +8 -0
  787. package/dist/mint-components/p-dd82a675.system.entry.js +1 -0
  788. package/dist/mint-components/p-df1206f0.entry.js +1 -0
  789. package/dist/mint-components/p-df45273e.js +1 -0
  790. package/dist/mint-components/p-df531a5d.entry.js +1 -0
  791. package/dist/mint-components/p-e1c55f04.system.entry.js +1 -0
  792. package/dist/mint-components/p-e33839b3.system.js +1 -0
  793. package/dist/mint-components/p-e389aded.entry.js +1 -0
  794. package/dist/mint-components/p-e73e0fc4.system.js +1 -0
  795. package/dist/mint-components/p-e7f7b9c6.entry.js +1 -0
  796. package/dist/mint-components/{p-b47e3740.system.js → p-e9942aae.system.js} +1 -1
  797. package/dist/mint-components/p-eac100d1.system.js +1 -0
  798. package/dist/mint-components/p-eb47b174.entry.js +1 -0
  799. package/dist/mint-components/p-eba82926.js +1 -0
  800. package/dist/mint-components/p-ec00bb5f.js +1 -0
  801. package/dist/mint-components/p-edc8d9bc.system.js +1 -0
  802. package/dist/mint-components/p-f0e1d538.entry.js +147 -0
  803. package/dist/mint-components/{p-ff75998a.system.entry.js → p-f53c7a87.system.entry.js} +1 -1
  804. package/dist/mint-components/p-f686c142.system.js +1 -0
  805. package/dist/mint-components/{p-5b0de730.js → p-fa2edc58.js} +152 -152
  806. package/dist/mint-components/p-fab41ea8.system.entry.js +1 -0
  807. package/dist/mint-components/p-fd14377b.entry.js +1 -0
  808. package/dist/mint-components/p-ff1336b3.entry.js +148 -0
  809. package/dist/types/components/sqm-big-stat/useBigStat.d.ts +1 -1
  810. package/dist/types/components/sqm-context-router/useContextRouter.d.ts +1 -1
  811. package/dist/types/components/sqm-coupon-code/useCouponCode.d.ts +1 -1
  812. package/dist/types/components/sqm-divided-layout/sqm-divided-layout.d.ts +1 -1
  813. package/dist/types/components/sqm-lead-form/useLeadForm.d.ts +2 -2
  814. package/dist/types/components/sqm-lead-form/useLeadFormState.d.ts +3 -3
  815. package/dist/types/components/sqm-leaderboard/useLeaderboard.d.ts +2 -2
  816. package/dist/types/components/sqm-pagination/usePagination.d.ts +1 -1
  817. package/dist/types/components/sqm-partner-info-modal/usePartnerInfoModal.d.ts +3 -3
  818. package/dist/types/components/sqm-popup-container/sqm-popup-container-view.d.ts +1 -1
  819. package/dist/types/components/sqm-popup-container/usePopupContainer.d.ts +2 -2
  820. package/dist/types/components/sqm-portal-footer/PoweredByImg.d.ts +1 -1
  821. package/dist/types/components/sqm-portal-footer/sqm-portal-footer-view.d.ts +1 -1
  822. package/dist/types/components/sqm-portal-google-registration-form/usePortalGoogleRegistrationForm.d.ts +1 -1
  823. package/dist/types/components/sqm-portal-register/usePortalRegister.d.ts +1 -1
  824. package/dist/types/components/sqm-portal-registration-form/usePortalRegistrationForm.d.ts +1 -1
  825. package/dist/types/components/sqm-portal-registration-form/useRegistrationFormState.d.ts +3 -3
  826. package/dist/types/components/sqm-referral-codes/useReferralCodes.d.ts +2 -2
  827. package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe-view.d.ts +1 -1
  828. package/dist/types/components/sqm-referral-table/useReferralTable.d.ts +1 -1
  829. package/dist/types/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.d.ts +2 -2
  830. package/dist/types/components/sqm-reward-exchange-list/useRewardExchangeList.d.ts +5 -5
  831. package/dist/types/components/sqm-router/useRouter.d.ts +1 -1
  832. package/dist/types/components/sqm-share-link/sqm-share-link-view.d.ts +1 -1
  833. package/dist/types/components/sqm-stencilbook/Matrix.d.ts +1 -1
  834. package/dist/types/components/sqm-tab/sqm-tab-view.d.ts +1 -1
  835. package/dist/types/components/sqm-tabs/sqm-tabs-view.d.ts +1 -1
  836. package/dist/types/components/sqm-task-card/progress-bar/progress-bar-view.d.ts +1 -1
  837. package/dist/types/components/sqm-task-card/sqm-task-card-view.d.ts +1 -1
  838. package/dist/types/components/sqm-widget-verification/getVerificationStep.d.ts +2 -2
  839. package/dist/types/components/tax-and-cash/data.d.ts +13 -13
  840. package/dist/types/components/tax-and-cash/sqm-banking-info-form/mockData.d.ts +1 -1
  841. package/dist/types/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.d.ts +2 -2
  842. package/dist/types/components/tax-and-cash/sqm-docusign-form/docusign-iframe/DocusignIframe.d.ts +1 -1
  843. package/dist/types/components/tax-and-cash/sqm-docusign-form/useDocusignForm.d.ts +5 -5
  844. package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +6 -6
  845. package/dist/types/components/tax-and-cash/sqm-payout-details-card/usePayoutDetailsCard.d.ts +1 -1
  846. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +3 -3
  847. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/extractProps.d.ts +1 -1
  848. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.d.ts +1 -1
  849. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.d.ts +1 -1
  850. package/dist/types/components/tax-and-cash/sqm-user-info-form/small-views/IndirectTaxDetailsView.d.ts +1 -1
  851. package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +5 -5
  852. package/dist/types/components/tax-and-cash/subregions.d.ts +1 -1
  853. package/dist/types/components/tax-and-cash/utils.d.ts +1 -1
  854. package/dist/types/components.d.ts +3771 -3
  855. package/dist/types/global/mixins.d.ts +5 -5
  856. package/dist/types/stencil-public-runtime.d.ts +275 -193
  857. package/dist/types/utils/RequiredPropsError.d.ts +1 -1
  858. package/dist/types/utils/demoMerge.d.ts +8 -0
  859. package/dist/types/utils/utils.d.ts +1 -1
  860. package/docs/docs.docx +0 -0
  861. package/docs/stats.json +120116 -0
  862. package/grapesjs/grapesjs.js +1 -1
  863. package/package.json +34 -45
  864. package/dist/cjs/AsYouType-d15caac8.js +0 -4128
  865. package/dist/cjs/cjs-1066ec21.js +0 -135
  866. package/dist/cjs/eventKeys-7af4df4d.js +0 -5
  867. package/dist/cjs/sqm-lead-input-field-view-cd3f8076.js +0 -51
  868. package/dist/cjs/subregions-36662566.js +0 -1101
  869. package/dist/esm/AsYouType-2d56519e.js +0 -4108
  870. package/dist/esm/cjs-bdfb4486.js +0 -133
  871. package/dist/esm/eventKeys-f76b6a03.js +0 -3
  872. package/dist/esm/sqm-lead-input-field-view-919dc0a9.js +0 -49
  873. package/dist/esm/subregions-16dc47a9.js +0 -1086
  874. package/dist/esm-es5/AsYouType-2d56519e.js +0 -1
  875. package/dist/esm-es5/GenericTableView-471a9386.js +0 -1
  876. package/dist/esm-es5/JSS-67b5cff8.js +0 -8
  877. package/dist/esm-es5/ShadowViewAddon-e1375e0d.js +0 -1
  878. package/dist/esm-es5/cjs-bdfb4486.js +0 -1
  879. package/dist/esm-es5/copy-text-view-87259b11.js +0 -1
  880. package/dist/esm-es5/data-04d2da44.js +0 -1
  881. package/dist/esm-es5/dom-context-hooks.module-50442785.js +0 -53
  882. package/dist/esm-es5/email-registration-view-4cdb4129.js +0 -1
  883. package/dist/esm-es5/eventKeys-f76b6a03.js +0 -1
  884. package/dist/esm-es5/global-f019575d.js +0 -271
  885. package/dist/esm-es5/index-38ad4957.js +0 -1
  886. package/dist/esm-es5/index-ffa26b43.js +0 -1
  887. package/dist/esm-es5/index.module-cc08450c.js +0 -1
  888. package/dist/esm-es5/jsonpointer-388a7082.js +0 -1
  889. package/dist/esm-es5/luxon-1be92a8e.js +0 -1
  890. package/dist/esm-es5/mockRewardData-9b27d6f1.js +0 -1
  891. package/dist/esm-es5/parseStates-ed75e224.js +0 -1
  892. package/dist/esm-es5/re-render-380499f8.js +0 -1
  893. package/dist/esm-es5/sqm-lead-checkbox-field-view-04aa32a7.js +0 -1
  894. package/dist/esm-es5/sqm-lead-input-field-view-919dc0a9.js +0 -1
  895. package/dist/esm-es5/sqm-navigation-sidebar-item-view-40837457.js +0 -1
  896. package/dist/esm-es5/sqm-navigation-sidebar-view-2b66457a.js +0 -1
  897. package/dist/esm-es5/sqm-partner-info-modal-view-e02fb63a.js +0 -1
  898. package/dist/esm-es5/sqm-portal-container-view-200c9df8.js +0 -1
  899. package/dist/esm-es5/sqm-portal-profile-view-41894261.js +0 -1
  900. package/dist/esm-es5/sqm-portal-registration-form-view-79265df5.js +0 -1
  901. package/dist/esm-es5/sqm-portal-reset-password-view-c7dd1c01.js +0 -1
  902. package/dist/esm-es5/sqm-portal-verify-email-view-c102aa7c.js +0 -1
  903. package/dist/esm-es5/sqm-text-span-view-72f43dff.js +0 -1
  904. package/dist/esm-es5/sqm-user-info-form-view-8a95c5eb.js +0 -1
  905. package/dist/esm-es5/subregions-16dc47a9.js +0 -1
  906. package/dist/esm-es5/useChildElements-aa9eb7c9.js +0 -1
  907. package/dist/esm-es5/useIndirectTaxForm-8d2e873d.js +0 -6
  908. package/dist/esm-es5/useInstantAccessRegistration-7b11eb02.js +0 -1
  909. package/dist/esm-es5/useLeadFormState-b67018f2.js +0 -1
  910. package/dist/esm-es5/usePortalRegistrationForm-91e5786d.js +0 -1
  911. package/dist/esm-es5/useReferralCodes-a0a271ca.js +0 -1
  912. package/dist/esm-es5/useReferralTable-670580ff.js +0 -1
  913. package/dist/esm-es5/useRegistrationFormState-95a75c57.js +0 -1
  914. package/dist/esm-es5/useVerificationEmail-99d9f705.js +0 -1
  915. package/dist/esm-es5/utilities-23a276e0.js +0 -1
  916. package/dist/mint-components/p-0306ce68.js +0 -1
  917. package/dist/mint-components/p-03361685.system.entry.js +0 -1
  918. package/dist/mint-components/p-036b876f.system.js +0 -1
  919. package/dist/mint-components/p-083180bf.js +0 -1
  920. package/dist/mint-components/p-08f36275.entry.js +0 -92
  921. package/dist/mint-components/p-08f82f9e.system.entry.js +0 -1
  922. package/dist/mint-components/p-092305db.entry.js +0 -1
  923. package/dist/mint-components/p-0ac8d8f4.system.js +0 -1
  924. package/dist/mint-components/p-0b1e90fe.system.js +0 -1
  925. package/dist/mint-components/p-0dca7884.entry.js +0 -148
  926. package/dist/mint-components/p-0ec9eb9b.entry.js +0 -1
  927. package/dist/mint-components/p-115dfc03.system.js +0 -1
  928. package/dist/mint-components/p-128610fb.system.js +0 -1
  929. package/dist/mint-components/p-13d1b10d.entry.js +0 -1
  930. package/dist/mint-components/p-13f3a647.js +0 -1
  931. package/dist/mint-components/p-16bd4751.system.entry.js +0 -1
  932. package/dist/mint-components/p-1a673057.system.js +0 -8
  933. package/dist/mint-components/p-1cf59d96.system.js +0 -1
  934. package/dist/mint-components/p-1ee1dd9c.system.entry.js +0 -1
  935. package/dist/mint-components/p-1f292473.entry.js +0 -1
  936. package/dist/mint-components/p-220cd813.system.entry.js +0 -1
  937. package/dist/mint-components/p-2392aabe.entry.js +0 -1
  938. package/dist/mint-components/p-263ca1be.system.js +0 -1
  939. package/dist/mint-components/p-274816ae.entry.js +0 -1
  940. package/dist/mint-components/p-2786819c.js +0 -1
  941. package/dist/mint-components/p-28ed2ae9.js +0 -1
  942. package/dist/mint-components/p-28fa5159.entry.js +0 -1
  943. package/dist/mint-components/p-290314a6.js +0 -52
  944. package/dist/mint-components/p-2cc01e0a.system.js +0 -1
  945. package/dist/mint-components/p-319bf866.system.entry.js +0 -1
  946. package/dist/mint-components/p-31b7d861.entry.js +0 -1
  947. package/dist/mint-components/p-31c5f477.entry.js +0 -1
  948. package/dist/mint-components/p-31cfa118.system.entry.js +0 -1
  949. package/dist/mint-components/p-3268c98c.system.entry.js +0 -1
  950. package/dist/mint-components/p-34917ee4.system.js +0 -1
  951. package/dist/mint-components/p-34bea1be.system.js +0 -1
  952. package/dist/mint-components/p-3db7a3c0.system.entry.js +0 -1
  953. package/dist/mint-components/p-429fa431.js +0 -1
  954. package/dist/mint-components/p-44ce74b6.js +0 -1
  955. package/dist/mint-components/p-45be99ae.system.js +0 -1
  956. package/dist/mint-components/p-47dc2362.system.entry.js +0 -1
  957. package/dist/mint-components/p-48b25874.system.js +0 -1
  958. package/dist/mint-components/p-4bd679a7.system.js +0 -1
  959. package/dist/mint-components/p-4ca6cc3c.system.entry.js +0 -1
  960. package/dist/mint-components/p-51d06654.system.js +0 -1
  961. package/dist/mint-components/p-5218d9dd.system.entry.js +0 -1
  962. package/dist/mint-components/p-5264ea68.js +0 -1
  963. package/dist/mint-components/p-5300edb5.js +0 -1
  964. package/dist/mint-components/p-556338c3.system.js +0 -1
  965. package/dist/mint-components/p-573ea3fd.system.entry.js +0 -1
  966. package/dist/mint-components/p-57c693ef.system.entry.js +0 -1
  967. package/dist/mint-components/p-59d5f239.system.entry.js +0 -1
  968. package/dist/mint-components/p-5c3cdefe.entry.js +0 -1
  969. package/dist/mint-components/p-5cda271c.system.entry.js +0 -1
  970. package/dist/mint-components/p-5d99dbc9.js +0 -1
  971. package/dist/mint-components/p-641f968d.system.js +0 -1
  972. package/dist/mint-components/p-686dd5eb.system.js +0 -1
  973. package/dist/mint-components/p-6b5528b1.entry.js +0 -33
  974. package/dist/mint-components/p-6c3a1d86.js +0 -1
  975. package/dist/mint-components/p-6c8758ac.entry.js +0 -1
  976. package/dist/mint-components/p-6dffb326.entry.js +0 -13
  977. package/dist/mint-components/p-6e9738a4.js +0 -1
  978. package/dist/mint-components/p-6f8dde97.system.js +0 -1
  979. package/dist/mint-components/p-7010498f.js +0 -1
  980. package/dist/mint-components/p-7062154c.system.js +0 -1
  981. package/dist/mint-components/p-717fa601.js +0 -1
  982. package/dist/mint-components/p-732907b1.system.entry.js +0 -1
  983. package/dist/mint-components/p-7562cd98.system.js +0 -1
  984. package/dist/mint-components/p-7ae8fb53.system.js +0 -1
  985. package/dist/mint-components/p-808f7f22.entry.js +0 -1
  986. package/dist/mint-components/p-80cee817.system.js +0 -1
  987. package/dist/mint-components/p-8452837a.system.js +0 -1
  988. package/dist/mint-components/p-85996c52.system.entry.js +0 -1
  989. package/dist/mint-components/p-8629d0be.system.entry.js +0 -1
  990. package/dist/mint-components/p-86c430f8.system.entry.js +0 -1
  991. package/dist/mint-components/p-8707c7fb.entry.js +0 -1
  992. package/dist/mint-components/p-8899ff38.system.entry.js +0 -1
  993. package/dist/mint-components/p-88a5350b.entry.js +0 -11
  994. package/dist/mint-components/p-8d363802.js +0 -1
  995. package/dist/mint-components/p-93e4954e.entry.js +0 -308
  996. package/dist/mint-components/p-952eefec.system.js +0 -1
  997. package/dist/mint-components/p-95f82a6f.entry.js +0 -9
  998. package/dist/mint-components/p-9715be5b.entry.js +0 -1
  999. package/dist/mint-components/p-97b8073f.system.js +0 -1
  1000. package/dist/mint-components/p-99f7e6f1.js +0 -1
  1001. package/dist/mint-components/p-9f517f81.entry.js +0 -1
  1002. package/dist/mint-components/p-9f7d1197.system.entry.js +0 -1
  1003. package/dist/mint-components/p-a04be06d.system.entry.js +0 -1
  1004. package/dist/mint-components/p-a08157c4.js +0 -1
  1005. package/dist/mint-components/p-a495e3a5.entry.js +0 -1
  1006. package/dist/mint-components/p-a52a961e.entry.js +0 -1
  1007. package/dist/mint-components/p-a6920cc9.system.entry.js +0 -1
  1008. package/dist/mint-components/p-a7fc1e02.js +0 -42
  1009. package/dist/mint-components/p-ab8a551f.system.entry.js +0 -1
  1010. package/dist/mint-components/p-ac65d2c1.entry.js +0 -1
  1011. package/dist/mint-components/p-ad9ea625.system.entry.js +0 -1
  1012. package/dist/mint-components/p-b0aa9348.entry.js +0 -1
  1013. package/dist/mint-components/p-b2295bc5.system.js +0 -1
  1014. package/dist/mint-components/p-b56f3e55.js +0 -1
  1015. package/dist/mint-components/p-b61be711.entry.js +0 -1
  1016. package/dist/mint-components/p-b6504987.system.js +0 -53
  1017. package/dist/mint-components/p-b69dbed8.system.js +0 -1
  1018. package/dist/mint-components/p-b6b5fa4f.system.entry.js +0 -1
  1019. package/dist/mint-components/p-bc625793.system.js +0 -1
  1020. package/dist/mint-components/p-bee4af5d.js +0 -1
  1021. package/dist/mint-components/p-c03131dd.js +0 -1
  1022. package/dist/mint-components/p-c09ae087.system.js +0 -1
  1023. package/dist/mint-components/p-c1086930.js +0 -1
  1024. package/dist/mint-components/p-c50e77ad.entry.js +0 -1
  1025. package/dist/mint-components/p-c5698ef9.system.js +0 -1
  1026. package/dist/mint-components/p-ca872769.system.entry.js +0 -1
  1027. package/dist/mint-components/p-ca90ea64.js +0 -499
  1028. package/dist/mint-components/p-cdf5354f.entry.js +0 -1
  1029. package/dist/mint-components/p-cef45012.js +0 -1
  1030. package/dist/mint-components/p-d028db52.system.entry.js +0 -1
  1031. package/dist/mint-components/p-d0318b41.entry.js +0 -13
  1032. package/dist/mint-components/p-d0ce74bd.system.js +0 -1
  1033. package/dist/mint-components/p-d267f4bb.system.js +0 -1
  1034. package/dist/mint-components/p-d26df2da.entry.js +0 -1
  1035. package/dist/mint-components/p-d3b1ab20.system.entry.js +0 -1
  1036. package/dist/mint-components/p-d463fa82.system.js +0 -1
  1037. package/dist/mint-components/p-d46a048d.system.entry.js +0 -1
  1038. package/dist/mint-components/p-d533ff7b.system.js +0 -271
  1039. package/dist/mint-components/p-d6a7f402.entry.js +0 -1
  1040. package/dist/mint-components/p-d9dbbf22.system.entry.js +0 -1
  1041. package/dist/mint-components/p-db30fbd1.js +0 -13
  1042. package/dist/mint-components/p-de8d7e90.entry.js +0 -17
  1043. package/dist/mint-components/p-df28013f.system.entry.js +0 -1
  1044. package/dist/mint-components/p-dffad4a8.entry.js +0 -1
  1045. package/dist/mint-components/p-e006b6ad.entry.js +0 -1
  1046. package/dist/mint-components/p-e0578030.system.js +0 -1
  1047. package/dist/mint-components/p-e31c7242.system.entry.js +0 -1
  1048. package/dist/mint-components/p-e4eac70d.js +0 -108
  1049. package/dist/mint-components/p-e506bf7f.entry.js +0 -1
  1050. package/dist/mint-components/p-e66187b6.system.entry.js +0 -1
  1051. package/dist/mint-components/p-e7cf6632.js +0 -1
  1052. package/dist/mint-components/p-e7d6e1e0.entry.js +0 -11
  1053. package/dist/mint-components/p-e7e129ac.js +0 -1
  1054. package/dist/mint-components/p-eb992f94.js +0 -1
  1055. package/dist/mint-components/p-ec3e44c8.system.js +0 -1
  1056. package/dist/mint-components/p-ec58040a.system.js +0 -1
  1057. package/dist/mint-components/p-eedda43c.system.js +0 -1
  1058. package/dist/mint-components/p-f0b63c48.entry.js +0 -83
  1059. package/dist/mint-components/p-f1584abb.system.entry.js +0 -1
  1060. package/dist/mint-components/p-f381533a.js +0 -1
  1061. package/dist/mint-components/p-f45e076d.system.js +0 -1
  1062. package/dist/mint-components/p-f507b364.system.entry.js +0 -1
  1063. package/dist/mint-components/p-f69a4eb1.system.entry.js +0 -1
  1064. package/dist/mint-components/p-f89c6a57.system.js +0 -1
  1065. package/dist/mint-components/p-f982278b.entry.js +0 -1
  1066. package/dist/mint-components/p-fbdd8c2a.system.entry.js +0 -1
  1067. package/dist/mint-components/p-fdc4f293.system.entry.js +0 -1
  1068. package/dist/mint-components/p-ff1a5481.system.js +0 -1
@@ -1,4128 +0,0 @@
1
- 'use strict';
2
-
3
- // This file is a workaround for a bug in web browsers' "native"
4
- // ES6 importing system which is uncapable of importing "*.json" files.
5
- // https://github.com/catamphetamine/libphonenumber-js/issues/239
6
- const metadata = {"version":4,"country_calling_codes":{"1":["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],"7":["RU","KZ"],"20":["EG"],"27":["ZA"],"30":["GR"],"31":["NL"],"32":["BE"],"33":["FR"],"34":["ES"],"36":["HU"],"39":["IT","VA"],"40":["RO"],"41":["CH"],"43":["AT"],"44":["GB","GG","IM","JE"],"45":["DK"],"46":["SE"],"47":["NO","SJ"],"48":["PL"],"49":["DE"],"51":["PE"],"52":["MX"],"53":["CU"],"54":["AR"],"55":["BR"],"56":["CL"],"57":["CO"],"58":["VE"],"60":["MY"],"61":["AU","CC","CX"],"62":["ID"],"63":["PH"],"64":["NZ"],"65":["SG"],"66":["TH"],"81":["JP"],"82":["KR"],"84":["VN"],"86":["CN"],"90":["TR"],"91":["IN"],"92":["PK"],"93":["AF"],"94":["LK"],"95":["MM"],"98":["IR"],"211":["SS"],"212":["MA","EH"],"213":["DZ"],"216":["TN"],"218":["LY"],"220":["GM"],"221":["SN"],"222":["MR"],"223":["ML"],"224":["GN"],"225":["CI"],"226":["BF"],"227":["NE"],"228":["TG"],"229":["BJ"],"230":["MU"],"231":["LR"],"232":["SL"],"233":["GH"],"234":["NG"],"235":["TD"],"236":["CF"],"237":["CM"],"238":["CV"],"239":["ST"],"240":["GQ"],"241":["GA"],"242":["CG"],"243":["CD"],"244":["AO"],"245":["GW"],"246":["IO"],"247":["AC"],"248":["SC"],"249":["SD"],"250":["RW"],"251":["ET"],"252":["SO"],"253":["DJ"],"254":["KE"],"255":["TZ"],"256":["UG"],"257":["BI"],"258":["MZ"],"260":["ZM"],"261":["MG"],"262":["RE","YT"],"263":["ZW"],"264":["NA"],"265":["MW"],"266":["LS"],"267":["BW"],"268":["SZ"],"269":["KM"],"290":["SH","TA"],"291":["ER"],"297":["AW"],"298":["FO"],"299":["GL"],"350":["GI"],"351":["PT"],"352":["LU"],"353":["IE"],"354":["IS"],"355":["AL"],"356":["MT"],"357":["CY"],"358":["FI","AX"],"359":["BG"],"370":["LT"],"371":["LV"],"372":["EE"],"373":["MD"],"374":["AM"],"375":["BY"],"376":["AD"],"377":["MC"],"378":["SM"],"380":["UA"],"381":["RS"],"382":["ME"],"383":["XK"],"385":["HR"],"386":["SI"],"387":["BA"],"389":["MK"],"420":["CZ"],"421":["SK"],"423":["LI"],"500":["FK"],"501":["BZ"],"502":["GT"],"503":["SV"],"504":["HN"],"505":["NI"],"506":["CR"],"507":["PA"],"508":["PM"],"509":["HT"],"590":["GP","BL","MF"],"591":["BO"],"592":["GY"],"593":["EC"],"594":["GF"],"595":["PY"],"596":["MQ"],"597":["SR"],"598":["UY"],"599":["CW","BQ"],"670":["TL"],"672":["NF"],"673":["BN"],"674":["NR"],"675":["PG"],"676":["TO"],"677":["SB"],"678":["VU"],"679":["FJ"],"680":["PW"],"681":["WF"],"682":["CK"],"683":["NU"],"685":["WS"],"686":["KI"],"687":["NC"],"688":["TV"],"689":["PF"],"690":["TK"],"691":["FM"],"692":["MH"],"850":["KP"],"852":["HK"],"853":["MO"],"855":["KH"],"856":["LA"],"880":["BD"],"886":["TW"],"960":["MV"],"961":["LB"],"962":["JO"],"963":["SY"],"964":["IQ"],"965":["KW"],"966":["SA"],"967":["YE"],"968":["OM"],"970":["PS"],"971":["AE"],"972":["IL"],"973":["BH"],"974":["QA"],"975":["BT"],"976":["MN"],"977":["NP"],"992":["TJ"],"993":["TM"],"994":["AZ"],"995":["GE"],"996":["KG"],"998":["UZ"]},"countries":{"AC":["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],"AD":["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],"AE":["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],"AF":["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],"AG":["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([457]\\d{6})$","268$1",0,"268"],"AI":["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2457]\\d{6})$","264$1",0,"264"],"AL":["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],"AM":["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],"AO":["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],"AR":["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],"AS":["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"1|([267]\\d{6})$","684$1",0,"684"],"AT":["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],"AU":["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7,8}|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"0|(183[12])",0,0,0,[["(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8]))\\d{3}|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4]))|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",[9]],["4(?:83[0-38]|93[0-4])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[06-9]|7[02-9]|8[0-24-9]|9[0-27-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{3}|45[0-4])\\d{3}|13\\d{4}",[6,8,10]]],"0011"],"AW":["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],"AX":["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],"AZ":["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365|46","1[28]|2|365(?:[0-46-9]|5[0-35-9])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],"BA":["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],"BB":["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-9]\\d{6})$","246$1",0,"246"],"BD":["880","00","1\\d{9}|2\\d{7,8}|88\\d{4,6}|(?:8[0-79]|9\\d)\\d{4,8}|(?:[346]\\d|[57])\\d{5,8}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:28|4[14]|5)|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],"BE":["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],"BF":["226","00","[025-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[025-7]"]]]],"BG":["359","00","[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],"BH":["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[047]"]]]],"BI":["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],"BJ":["229","00","[25689]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[25689]"]]]],"BL":["590","00","(?:590|(?:69|80)\\d|976)\\d{6}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|5[12]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["976[01]\\d{5}"]]],"BM":["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-8]\\d{6})$","441$1",0,"441"],"BN":["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],"BO":["591","00(?:1\\d)?","(?:[2-467]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],"BQ":["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],"BR":["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-24679]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],"BS":["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([3-8]\\d{6})$","242$1",0,"242"],"BT":["975","00","[17]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]]]],"BW":["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-79]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],"BY":["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],"BZ":["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],"CA":["1","011","(?:[2-8]\\d|90)\\d{8}",[10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|50)|3(?:06|43|6[578])|4(?:03|1[68]|3[178]|50|74)|5(?:06|1[49]|48|79|8[17])|6(?:04|13|39|47|72)|7(?:0[59]|78|8[02])|8(?:[06]7|19|25|73)|90[25])[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:00|2[12]|33|44|66|77|88)|622)[2-9]\\d{6}"],0,0,0,["600[2-9]\\d{6}"]]],"CC":["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d|8[0-24-9])\\d{7}|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10],0,"0",0,"0|([59]\\d{7})$","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:83[0-38]|93[0-4])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[06-9]|7[02-9]|8[0-24-9]|9[0-27-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{3}|45[0-4])\\d{3}|13\\d{4}",[6,8,10]]],"0011"],"CD":["243","00","[189]\\d{8}|[1-68]\\d{6}",[7,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"]],"0"],"CF":["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],"CG":["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["801"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],"CH":["41","00","8\\d{11}|[2-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],"CI":["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],"CK":["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],"CL":["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-3]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],"CM":["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],"CN":["86","00|1(?:[12]\\d|79)\\d\\d00","1[127]\\d{8,9}|2\\d{9}(?:\\d{2})?|[12]\\d{6,7}|86\\d{6}|(?:1[03-689]\\d|6)\\d{7,9}|(?:[3-579]\\d|8[0-57-9])\\d{6,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]","(?:10|2[0-57-9])(?:10|9[56])","(?:10|2[0-57-9])(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"0|(1(?:[12]\\d|79)\\d\\d)",0,0,0,0,"00"],"CO":["57","00(?:4(?:[14]4|56)|[579])","(?:(?:1\\d|3)\\d{3}|9101)\\d{6}|[124-8]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1 $2",["[14][2-9]|[25-8]"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["[39]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],"CR":["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],"CU":["53","119","[27]\\d{6,7}|[34]\\d{5,7}|(?:5|8\\d\\d)\\d{7}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["5"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],"CV":["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],"CW":["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],"CX":["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d|8[0-24-9])\\d{7}|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10],0,"0",0,"0|([59]\\d{7})$","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:83[0-38]|93[0-4])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[06-9]|7[02-9]|8[0-24-9]|9[0-27-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{3}|45[0-4])\\d{3}|13\\d{4}",[6,8,10]]],"0011"],"CY":["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],"CZ":["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],"DE":["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:[12]\\d|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[05]\\d|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[0568]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],"DJ":["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],"DK":["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],"DM":["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"1|([2-7]\\d{6})$","767$1",0,"767"],"DO":["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],"DZ":["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],"EC":["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],"EE":["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],"EG":["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[189]"],"0$1"]],"0"],"EH":["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],"ER":["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],"ES":["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],"ET":["251","00","(?:11|[2-59]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-59]"],"0$1"]],"0"],"FI":["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d)(\\d{4,9})","$1 $2",["[2568][1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["[12]00|[368]|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[1245]|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],"FJ":["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],"FK":["500","00","[2-7]\\d{4}",[5]],"FM":["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],"FO":["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],"FR":["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],"GA":["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]]],0,0,"0(11\\d{6}|6[256]\\d{6}|7[47]\\d{6})","$1"],"GB":["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[023])|4(?:[0-5]\\d\\d|69[7-9]|70[059])|(?:5[0-26-9]|[78][0-49])\\d\\d|6(?:[0-4]\\d\\d|50[259]))|2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d\\d|1(?:[0-7]\\d\\d|8(?:[02]\\d|1[278])))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-2]|2[356]|34|4[01347]|5[49]|6[0-369]|77|81|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],"GD":["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-9]\\d{6})$","473$1",0,"473"],"GE":["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],"GF":["594","00","(?:[56]94|80\\d|976)\\d{6}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],"GG":["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"0|([25-9]\\d{5})$","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-2]|2[356]|34|4[01347]|5[49]|6[0-369]|77|81|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],"GH":["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],"GI":["350","00","(?:[25]\\d\\d|606)\\d{5}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],"GL":["299","00","(?:19|[2-689]\\d)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-689]"]]]],"GM":["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],"GN":["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],"GP":["590","00","(?:590|(?:69|80)\\d|976)\\d{6}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|1[0-2]|2[0-68]|3[1289]|4[0-24-9]|5[3-579]|6[0189]|7[08]|8[0-689]|9\\d)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["976[01]\\d{5}"]]],"GQ":["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],"GR":["30","00","5005000\\d{3}|8\\d{9,10}|(?:[269]\\d|70)\\d{8}",[10,11],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["8"]]]],"GT":["502","00","(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],"GU":["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"1|([3-9]\\d{6})$","671$1",0,"671"],"GW":["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],"GY":["592","001","(?:862\\d|9008)\\d{3}|(?:[2-46]\\d|77)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-46-9]"]]]],"HK":["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4}(?:\\d(?:\\d(?:\\d{4})?)?)?|(?:[235-79]\\d|46)\\d{6}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],"HN":["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],"HR":["385","00","(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}",[6,7,8,9],[["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-5]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],"HT":["509","00","[2-489]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-489]"]]]],"HU":["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],"ID":["62","00[89]","(?:(?:00[1-9]|8\\d)\\d{4}|[1-36])\\d{6}|00\\d{10}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],"IE":["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],"IL":["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],"IM":["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"0|([25-8]\\d{5})$","1624$1",0,"74576|(?:16|7[56])24"],"IN":["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],"IO":["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],"IQ":["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],"IR":["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],"IS":["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],"IT":["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[245])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1[4679]|[38]"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]]],0,0,0,0,0,0,[["0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[1-9]\\d{8}|3[2-9]\\d{7}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d\\d|89(?:2|4[5-9]\\d))\\d{3}|89[45][0-4]\\d\\d|(?:1(?:44|6[346])|89(?:5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],0,0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],"JE":["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"0|([0-24-8]\\d{5})$","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97[7-9]))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-2]|2[356]|34|4[01347]|5[49]|6[0-369]|77|81|9[139])\\d{6}"],["56\\d{8}"]]],"JM":["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],"JO":["962","00","(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],"JP":["81","010","00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51|63)|9(?:49|80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9]|636)|9(?:496|802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9]|636[457-9])|9(?:496|802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[045]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[27-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9])|5(?:2|3[045]|4[0-369]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|49|51|6(?:[0-24]|36|5[0-3589]|72|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:49|55|83)[29]|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3[045]|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[23]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|72|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|7[015-9]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17|3[015-9]))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3[045]|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9(?:[019]|4[1-3]|6(?:[0-47-9]|5[01346-9])))|3(?:[29]|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[23]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|72|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|829(?:2|66)|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[257-9]"],"0$1"]],"0"],"KE":["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],"KG":["996","00","8\\d{9}|(?:[235-8]\\d|99)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],"KH":["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],"KI":["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],"KM":["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],"KN":["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-7]\\d{6})$","869$1",0,"869"],"KP":["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],"KR":["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],"KW":["965","00","(?:18|[2569]\\d\\d)\\d{5}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[25]"]]]],"KY":["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-9]\\d{6})$","345$1",0,"345"],"KZ":["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33|7",0,"8~10"],"LA":["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["30[013-9]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],"LB":["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],"LC":["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"1|([2-8]\\d{6})$","758$1",0,"758"],"LI":["423","00","90\\d{5}|(?:[2378]|6\\d\\d)\\d{6}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[237-9]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"0|(1001)"],"LK":["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],"LR":["231","00","(?:2|33|5\\d|77|88)\\d{7}|[4-6]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[4-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3578]"],"0$1"]],"0"],"LS":["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],"LT":["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(8-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"8 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(8-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(8-$1)",1]],"8",0,"[08]"],"LU":["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],"LV":["371","00","(?:[268]\\d|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|8[01]"]]]],"LY":["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],"MA":["212","00","[5-8]\\d{8}",[9],[["(\\d{5})(\\d{4})","$1-$2",["5(?:29|38)","5(?:29|38)[89]","5(?:29|38)[89]0"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-489]|3[5-9]|9)|892","5(?:2(?:[2-49]|8[235-9])|3[5-9]|9)|892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:29(?:[189][05]|2[29]|3[01])|38[89][05])\\d{4}|5(?:2(?:[0-25-7]\\d|3[1-578]|4[02-46-8]|8[0235-7]|90)|3(?:[0-47]\\d|5[02-9]|6[02-8]|80|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:0\\d|1[0-3]|6[1267]|7[0-57]))\\d{6}"],["80\\d{7}"],["89\\d{7}"],0,0,0,0,["592(?:4[0-2]|93)\\d{4}"]]],"MC":["377","00","(?:[3489]|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],"0"],"MD":["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],"ME":["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],"MF":["590","00","(?:590|(?:69|80)\\d|976)\\d{6}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|30|5[0-268]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["976[01]\\d{5}"]]],"MG":["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"0|([24-9]\\d{6})$","20$1"],"MH":["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],"MK":["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],"ML":["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],"MM":["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],"MN":["976","001","[12]\\d{7,9}|[57-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[57-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],"MO":["853","00","08005\\d\\d|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],"MP":["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"1|([2-9]\\d{6})$","670$1",0,"670"],"MQ":["596","00","(?:69|80)\\d{7}|(?:59|97)6\\d{6}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],"MR":["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],"MS":["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"1|([34]\\d{6})$","664$1",0,"664"],"MT":["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],"MU":["230","0(?:0|[24-7]0|3[03])","(?:5|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["5"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],"MV":["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[3467]|9[13-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],"MW":["265","00","(?:[19]\\d|[23]1|77|88)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],"MX":["52","0[09]","199[1-9]\\d{7}|(?:1(?:[01467]\\d|[235][1-9]|8[1-79]|9[1-8])|[2-9]\\d)\\d{8}",[10,11],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"],0,1],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 $3 $4",["1(?:33|5[56]|81)"],0,1],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 $3 $4",["1"],0,1]],"01",0,"0(?:[12]|4[45])|1",0,0,0,0,"00"],"MY":["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9])|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1[36-8]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],"MZ":["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],"NA":["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],"NC":["687","00","[2-57-9]\\d{5}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[2-57-9]"]]]],"NE":["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[04]"]]]],"NF":["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],"NG":["234","009","(?:[124-7]|9\\d{3})\\d{6}|[1-9]\\d{7}|[78]\\d{9,13}",[7,8,10,11,12,13,14],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["78"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|9(?:0[3-9]|[1-9])"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[3-7]|8[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],"NI":["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],"NL":["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|[89]\\d{6,9}|1\\d{4,5}",[5,6,7,8,9,10],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-57-9]"],"0$1"]],"0"],"NO":["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[489]|59"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-7]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],"NP":["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-579]|6[2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],"NR":["674","00","(?:444|(?:55|8\\d)\\d|666)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[4-68]"]]]],"NU":["683","00","(?:[47]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],"NZ":["64","0(?:0|161)","[29]\\d{7,9}|50\\d{5}(?:\\d{2,3})?|6[0-35-9]\\d{6}|7\\d{7,8}|8\\d{4,9}|(?:11\\d|[34])\\d{7}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-579]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|[89]0","50(?:[0367]|88)|[89]0"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[59]|80"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7|86"],"0$1"]],"0",0,0,0,0,0,0,"00"],"OM":["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],"PA":["507","00","8\\d{9}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],"PE":["51","19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,0," Anexo "],"PF":["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],"PG":["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],"PH":["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],"PK":["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],"PL":["48","00","6\\d{5}(?:\\d{2})?|8\\d{9}|[1-9]\\d{6}(?:\\d{2})?",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],"PM":["508","00","(?:[45]|80\\d\\d)\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],"PR":["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],"PS":["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],"PT":["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],"PW":["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],"PY":["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-6])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],"QA":["974","00","[2-7]\\d{7}|(?:2\\d\\d|800)\\d{4}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["2[126]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]"]]]],"RE":["262","00","9769\\d{5}|(?:26|[68]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2689]"],"0$1"]],"0",0,0,0,0,"26[23]|69|[89]"],"RO":["40","00","(?:[237]\\d|[89]0)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[237-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],"RS":["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],"RU":["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-6]2|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-6]2|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"3[04-689]|[489]",0,"8~10"],"RW":["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]]],"0"],"SA":["966","00","92\\d{7}|(?:[15]|8\\d)\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["81"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],"SB":["677","0[01]","(?:[1-6]|[7-9]\\d\\d)\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],"SC":["248","010|0[0-2]","8000\\d{3}|(?:[249]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],"SD":["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],"SE":["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],"SG":["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-4]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],"SH":["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],"SI":["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],"SJ":["47","00","0\\d{4}|(?:[489]\\d|[57]9)\\d{6}",[5,8],0,0,0,0,0,0,"79"],"SK":["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],"SL":["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],"SM":["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],"SN":["221","00","(?:[378]\\d{4}|93330)\\d{4}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],"SO":["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["24|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[3478]|64|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[1-35-9]|9[2-9]"]]],"0"],"SR":["597","00","(?:[2-5]|68|[78]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-8]"]]]],"SS":["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],"ST":["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],"SV":["503","00","[267]\\d{7}|[89]00\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],"SX":["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|(5\\d{6})$","721$1",0,"721"],"SY":["963","00","[1-39]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1",1]],"0"],"SZ":["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],"TA":["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],"TC":["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"1|([2-479]\\d{6})$","649$1",0,"649"],"TD":["235","00|16","(?:22|[69]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2679]"]]],0,0,0,0,0,0,0,"00"],"TG":["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],"TH":["66","00[1-9]","1\\d{9}|[1689]\\d{8}|[1-57]\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],"TJ":["992","810","(?:00|11|[2-57-9]\\d)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"],0,1],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[34]7|91[78]"],0,1],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3[1-5]"],0,1],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02-57-9]|11"],0,1]],"8",0,0,0,0,0,0,"8~10"],"TK":["690","00","[2-47]\\d{3,6}",[4,5,6,7]],"TL":["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],"TM":["993","810","[1-6]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["6"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],"TN":["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],"TO":["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],"TR":["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|616)","5(?:[0-59]|6161)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],"TT":["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-46-8]\\d{6})$","868$1",0,"868"],"TV":["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],"TW":["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],"TZ":["255","00[056]","(?:[26-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],"UA":["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["4[45][0-5]|5(?:0|6[37])|6(?:[12][018]|[36-8])|7|89|9[1-9]|(?:48|57)[0137-9]","4[45][0-5]|5(?:0|6(?:3[14-7]|7))|6(?:[12][018]|[36-8])|7|89|9[1-9]|(?:48|57)[0137-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["[3-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],"UG":["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],"US":["1","011","[2-9]\\d{9}",[10],[["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:2(?:0[1-35-9]|1[02-9]|2[03-589]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[01356]|3[0-24679]|4[167]|5[12]|6[014]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[39]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[19]|6[1-47]|7[0-5]|8[056])|6(?:0[1-35-9]|1[024-9]|2[03689]|[34][016]|5[0179]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-7]|3[1247]|4[037]|5[47]|6[02359]|7[02-59]|8[156])|8(?:0[1-68]|1[02-8]|2[08]|3[0-289]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01579]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}"]]],"UY":["598","0(?:0|1[3-9]\\d)","4\\d{9}|[249]\\d{7}|(?:[49]\\d|80)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["405|8|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[24]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["4"],"0$1"]],"0",0,0,0,0,0,0,"00"," int. "],"UZ":["998","810","(?:33|55|[679]\\d|88)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[35-9]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],"VA":["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11],0,0,0,0,0,0,"06698"],"VC":["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"1|([2-7]\\d{6})$","784$1",0,"784"],"VE":["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],"VG":["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"1|([2-578]\\d{6})$","284$1",0,"284"],"VI":["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"1|([2-9]\\d{6})$","340$1",0,"340"],"VN":["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[69]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[3578]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],"VU":["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],"WF":["681","00","(?:40|72)\\d{4}|8\\d{5}(?:\\d{3})?",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[478]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],"WS":["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],"XK":["383","00","[23]\\d{7,8}|(?:4\\d\\d|[89]00)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[23]"],"0$1"]],"0"],"YE":["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7[24-68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],"YT":["262","00","80\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,"269|63"],"ZA":["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],"ZM":["260","00","(?:63|80)0\\d{6}|(?:21|[79]\\d)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[79]"],"0$1"]],"0"],"ZW":["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},"nonGeographic":{"800":["800",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,["[1-9]\\d{7}"]]],"808":["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],"870":["870",0,"7\\d{11}|[35-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[35-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]],"878":["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],"881":["881",0,"[0-36-9]\\d{8}",[9],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-36-9]"]]],0,0,0,0,0,0,[0,["[0-36-9]\\d{8}"]]],"882":["882",0,"[13]\\d{6}(?:\\d{2,5})?|285\\d{9}|(?:[19]\\d|49)\\d{6}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["4"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[19]"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["34[57]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-3]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|3(?:2|47|7\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,0,0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:(?:285\\d\\d|3(?:45|[69]\\d{3}))\\d|9[89])\\d{6}"]]],"883":["883",0,"210\\d{7}|51\\d{7}(?:\\d{3})?",[9,10,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["510"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["5"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:210|51[013]0\\d)\\d{7}|5100\\d{5}"]]],"888":["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],"979":["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};
7
-
8
- // The minimum length of the national significant number.
9
- var MIN_LENGTH_FOR_NSN = 2; // The ITU says the maximum length should be 15,
10
- // but one can find longer numbers in Germany.
11
-
12
- var MAX_LENGTH_FOR_NSN = 17; // The maximum length of the country calling code.
13
-
14
- var MAX_LENGTH_COUNTRY_CODE = 3; // Digits accepted in phone numbers
15
- // (ascii, fullwidth, arabic-indic, and eastern arabic digits).
16
-
17
- var VALID_DIGITS = "0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9"; // `DASHES` will be right after the opening square bracket of the "character class"
18
-
19
- var DASHES = "-\u2010-\u2015\u2212\u30FC\uFF0D";
20
- var SLASHES = "\uFF0F/";
21
- var DOTS = "\uFF0E.";
22
- var WHITESPACE = " \xA0\xAD\u200B\u2060\u3000";
23
- var BRACKETS = "()\uFF08\uFF09\uFF3B\uFF3D\\[\\]"; // export const OPENING_BRACKETS = '(\uFF08\uFF3B\\\['
24
-
25
- var TILDES = "~\u2053\u223C\uFF5E"; // Regular expression of acceptable punctuation found in phone numbers. This
26
- // excludes punctuation found as a leading character only. This consists of dash
27
- // characters, white space characters, full stops, slashes, square brackets,
28
- // parentheses and tildes. Full-width variants are also present.
29
-
30
- var VALID_PUNCTUATION = "".concat(DASHES).concat(SLASHES).concat(DOTS).concat(WHITESPACE).concat(BRACKETS).concat(TILDES);
31
- var PLUS_CHARS = "+\uFF0B"; // const LEADING_PLUS_CHARS_PATTERN = new RegExp('^[' + PLUS_CHARS + ']+')
32
-
33
- // Copy-pasted from:
34
- // https://github.com/substack/semver-compare/blob/master/index.js
35
- //
36
- // Inlining this function because some users reported issues with
37
- // importing from `semver-compare` in a browser with ES6 "native" modules.
38
- //
39
- // Fixes `semver-compare` not being able to compare versions with alpha/beta/etc "tags".
40
- // https://github.com/catamphetamine/libphonenumber-js/issues/381
41
- function compare (a, b) {
42
- a = a.split('-');
43
- b = b.split('-');
44
- var pa = a[0].split('.');
45
- var pb = b[0].split('.');
46
-
47
- for (var i = 0; i < 3; i++) {
48
- var na = Number(pa[i]);
49
- var nb = Number(pb[i]);
50
- if (na > nb) return 1;
51
- if (nb > na) return -1;
52
- if (!isNaN(na) && isNaN(nb)) return 1;
53
- if (isNaN(na) && !isNaN(nb)) return -1;
54
- }
55
-
56
- if (a[1] && b[1]) {
57
- return a[1] > b[1] ? 1 : a[1] < b[1] ? -1 : 0;
58
- }
59
-
60
- return !a[1] && b[1] ? 1 : a[1] && !b[1] ? -1 : 0;
61
- }
62
-
63
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
64
-
65
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
66
-
67
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
68
-
69
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
70
-
71
- var V3 = '1.2.0'; // Moved `001` country code to "nonGeographic" section of metadata.
72
-
73
- var V4 = '1.7.35';
74
- var DEFAULT_EXT_PREFIX = ' ext. ';
75
- var CALLING_CODE_REG_EXP = /^\d+$/;
76
- /**
77
- * See: https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/METADATA.md
78
- */
79
-
80
- var Metadata =
81
- /*#__PURE__*/
82
- function () {
83
- function Metadata(metadata) {
84
- _classCallCheck(this, Metadata);
85
-
86
- validateMetadata(metadata);
87
- this.metadata = metadata;
88
- setVersion.call(this, metadata);
89
- }
90
-
91
- _createClass(Metadata, [{
92
- key: "getCountries",
93
- value: function getCountries() {
94
- return Object.keys(this.metadata.countries).filter(function (_) {
95
- return _ !== '001';
96
- });
97
- }
98
- }, {
99
- key: "getCountryMetadata",
100
- value: function getCountryMetadata(countryCode) {
101
- return this.metadata.countries[countryCode];
102
- }
103
- }, {
104
- key: "nonGeographic",
105
- value: function nonGeographic() {
106
- if (this.v1 || this.v2 || this.v3) return; // `nonGeographical` was a typo.
107
- // It's present in metadata generated from `1.7.35` to `1.7.37`.
108
-
109
- return this.metadata.nonGeographic || this.metadata.nonGeographical;
110
- }
111
- }, {
112
- key: "hasCountry",
113
- value: function hasCountry(country) {
114
- return this.getCountryMetadata(country) !== undefined;
115
- }
116
- }, {
117
- key: "hasCallingCode",
118
- value: function hasCallingCode(callingCode) {
119
- if (this.getCountryCodesForCallingCode(callingCode)) {
120
- return true;
121
- }
122
-
123
- if (this.nonGeographic()) {
124
- if (this.nonGeographic()[callingCode]) {
125
- return true;
126
- }
127
- } else {
128
- // A hacky workaround for old custom metadata (generated before V4).
129
- var countryCodes = this.countryCallingCodes()[callingCode];
130
-
131
- if (countryCodes && countryCodes.length === 1 && countryCodes[0] === '001') {
132
- return true;
133
- }
134
- }
135
- }
136
- }, {
137
- key: "isNonGeographicCallingCode",
138
- value: function isNonGeographicCallingCode(callingCode) {
139
- if (this.nonGeographic()) {
140
- return this.nonGeographic()[callingCode] ? true : false;
141
- } else {
142
- return this.getCountryCodesForCallingCode(callingCode) ? false : true;
143
- }
144
- } // Deprecated.
145
-
146
- }, {
147
- key: "country",
148
- value: function country(countryCode) {
149
- return this.selectNumberingPlan(countryCode);
150
- }
151
- }, {
152
- key: "selectNumberingPlan",
153
- value: function selectNumberingPlan(countryCode, callingCode) {
154
- // Supports just passing `callingCode` as the first argument.
155
- if (countryCode && CALLING_CODE_REG_EXP.test(countryCode)) {
156
- callingCode = countryCode;
157
- countryCode = null;
158
- }
159
-
160
- if (countryCode && countryCode !== '001') {
161
- if (!this.hasCountry(countryCode)) {
162
- throw new Error("Unknown country: ".concat(countryCode));
163
- }
164
-
165
- this.numberingPlan = new NumberingPlan(this.getCountryMetadata(countryCode), this);
166
- } else if (callingCode) {
167
- if (!this.hasCallingCode(callingCode)) {
168
- throw new Error("Unknown calling code: ".concat(callingCode));
169
- }
170
-
171
- this.numberingPlan = new NumberingPlan(this.getNumberingPlanMetadata(callingCode), this);
172
- } else {
173
- this.numberingPlan = undefined;
174
- }
175
-
176
- return this;
177
- }
178
- }, {
179
- key: "getCountryCodesForCallingCode",
180
- value: function getCountryCodesForCallingCode(callingCode) {
181
- var countryCodes = this.countryCallingCodes()[callingCode];
182
-
183
- if (countryCodes) {
184
- // Metadata before V4 included "non-geographic entity" calling codes
185
- // inside `country_calling_codes` (for example, `"881":["001"]`).
186
- // Now the semantics of `country_calling_codes` has changed:
187
- // it's specifically for "countries" now.
188
- // Older versions of custom metadata will simply skip parsing
189
- // "non-geographic entity" phone numbers with new versions
190
- // of this library: it's not considered a bug,
191
- // because such numbers are extremely rare,
192
- // and developers extremely rarely use custom metadata.
193
- if (countryCodes.length === 1 && countryCodes[0].length === 3) {
194
- return;
195
- }
196
-
197
- return countryCodes;
198
- }
199
- }
200
- }, {
201
- key: "getCountryCodeForCallingCode",
202
- value: function getCountryCodeForCallingCode(callingCode) {
203
- var countryCodes = this.getCountryCodesForCallingCode(callingCode);
204
-
205
- if (countryCodes) {
206
- return countryCodes[0];
207
- }
208
- }
209
- }, {
210
- key: "getNumberingPlanMetadata",
211
- value: function getNumberingPlanMetadata(callingCode) {
212
- var countryCode = this.getCountryCodeForCallingCode(callingCode);
213
-
214
- if (countryCode) {
215
- return this.getCountryMetadata(countryCode);
216
- }
217
-
218
- if (this.nonGeographic()) {
219
- var metadata = this.nonGeographic()[callingCode];
220
-
221
- if (metadata) {
222
- return metadata;
223
- }
224
- } else {
225
- // A hacky workaround for old custom metadata (generated before V4).
226
- var countryCodes = this.countryCallingCodes()[callingCode];
227
-
228
- if (countryCodes && countryCodes.length === 1 && countryCodes[0] === '001') {
229
- return this.metadata.countries['001'];
230
- }
231
- }
232
- } // Deprecated.
233
-
234
- }, {
235
- key: "countryCallingCode",
236
- value: function countryCallingCode() {
237
- return this.numberingPlan.callingCode();
238
- } // Deprecated.
239
-
240
- }, {
241
- key: "IDDPrefix",
242
- value: function IDDPrefix() {
243
- return this.numberingPlan.IDDPrefix();
244
- } // Deprecated.
245
-
246
- }, {
247
- key: "defaultIDDPrefix",
248
- value: function defaultIDDPrefix() {
249
- return this.numberingPlan.defaultIDDPrefix();
250
- } // Deprecated.
251
-
252
- }, {
253
- key: "nationalNumberPattern",
254
- value: function nationalNumberPattern() {
255
- return this.numberingPlan.nationalNumberPattern();
256
- } // Deprecated.
257
-
258
- }, {
259
- key: "possibleLengths",
260
- value: function possibleLengths() {
261
- return this.numberingPlan.possibleLengths();
262
- } // Deprecated.
263
-
264
- }, {
265
- key: "formats",
266
- value: function formats() {
267
- return this.numberingPlan.formats();
268
- } // Deprecated.
269
-
270
- }, {
271
- key: "nationalPrefixForParsing",
272
- value: function nationalPrefixForParsing() {
273
- return this.numberingPlan.nationalPrefixForParsing();
274
- } // Deprecated.
275
-
276
- }, {
277
- key: "nationalPrefixTransformRule",
278
- value: function nationalPrefixTransformRule() {
279
- return this.numberingPlan.nationalPrefixTransformRule();
280
- } // Deprecated.
281
-
282
- }, {
283
- key: "leadingDigits",
284
- value: function leadingDigits() {
285
- return this.numberingPlan.leadingDigits();
286
- } // Deprecated.
287
-
288
- }, {
289
- key: "hasTypes",
290
- value: function hasTypes() {
291
- return this.numberingPlan.hasTypes();
292
- } // Deprecated.
293
-
294
- }, {
295
- key: "type",
296
- value: function type(_type) {
297
- return this.numberingPlan.type(_type);
298
- } // Deprecated.
299
-
300
- }, {
301
- key: "ext",
302
- value: function ext() {
303
- return this.numberingPlan.ext();
304
- }
305
- }, {
306
- key: "countryCallingCodes",
307
- value: function countryCallingCodes() {
308
- if (this.v1) return this.metadata.country_phone_code_to_countries;
309
- return this.metadata.country_calling_codes;
310
- } // Deprecated.
311
-
312
- }, {
313
- key: "chooseCountryByCountryCallingCode",
314
- value: function chooseCountryByCountryCallingCode(callingCode) {
315
- return this.selectNumberingPlan(callingCode);
316
- }
317
- }, {
318
- key: "hasSelectedNumberingPlan",
319
- value: function hasSelectedNumberingPlan() {
320
- return this.numberingPlan !== undefined;
321
- }
322
- }]);
323
-
324
- return Metadata;
325
- }();
326
-
327
- var NumberingPlan =
328
- /*#__PURE__*/
329
- function () {
330
- function NumberingPlan(metadata, globalMetadataObject) {
331
- _classCallCheck(this, NumberingPlan);
332
-
333
- this.globalMetadataObject = globalMetadataObject;
334
- this.metadata = metadata;
335
- setVersion.call(this, globalMetadataObject.metadata);
336
- }
337
-
338
- _createClass(NumberingPlan, [{
339
- key: "callingCode",
340
- value: function callingCode() {
341
- return this.metadata[0];
342
- } // Formatting information for regions which share
343
- // a country calling code is contained by only one region
344
- // for performance reasons. For example, for NANPA region
345
- // ("North American Numbering Plan Administration",
346
- // which includes USA, Canada, Cayman Islands, Bahamas, etc)
347
- // it will be contained in the metadata for `US`.
348
-
349
- }, {
350
- key: "getDefaultCountryMetadataForRegion",
351
- value: function getDefaultCountryMetadataForRegion() {
352
- return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode());
353
- }
354
- }, {
355
- key: "IDDPrefix",
356
- value: function IDDPrefix() {
357
- if (this.v1 || this.v2) return;
358
- return this.metadata[1];
359
- }
360
- }, {
361
- key: "defaultIDDPrefix",
362
- value: function defaultIDDPrefix() {
363
- if (this.v1 || this.v2) return;
364
- return this.metadata[12];
365
- }
366
- }, {
367
- key: "nationalNumberPattern",
368
- value: function nationalNumberPattern() {
369
- if (this.v1 || this.v2) return this.metadata[1];
370
- return this.metadata[2];
371
- }
372
- }, {
373
- key: "possibleLengths",
374
- value: function possibleLengths() {
375
- if (this.v1) return;
376
- return this.metadata[this.v2 ? 2 : 3];
377
- }
378
- }, {
379
- key: "_getFormats",
380
- value: function _getFormats(metadata) {
381
- return metadata[this.v1 ? 2 : this.v2 ? 3 : 4];
382
- } // For countries of the same region (e.g. NANPA)
383
- // formats are all stored in the "main" country for that region.
384
- // E.g. "RU" and "KZ", "US" and "CA".
385
-
386
- }, {
387
- key: "formats",
388
- value: function formats() {
389
- var _this = this;
390
-
391
- var formats = this._getFormats(this.metadata) || this._getFormats(this.getDefaultCountryMetadataForRegion()) || [];
392
- return formats.map(function (_) {
393
- return new Format(_, _this);
394
- });
395
- }
396
- }, {
397
- key: "nationalPrefix",
398
- value: function nationalPrefix() {
399
- return this.metadata[this.v1 ? 3 : this.v2 ? 4 : 5];
400
- }
401
- }, {
402
- key: "_getNationalPrefixFormattingRule",
403
- value: function _getNationalPrefixFormattingRule(metadata) {
404
- return metadata[this.v1 ? 4 : this.v2 ? 5 : 6];
405
- } // For countries of the same region (e.g. NANPA)
406
- // national prefix formatting rule is stored in the "main" country for that region.
407
- // E.g. "RU" and "KZ", "US" and "CA".
408
-
409
- }, {
410
- key: "nationalPrefixFormattingRule",
411
- value: function nationalPrefixFormattingRule() {
412
- return this._getNationalPrefixFormattingRule(this.metadata) || this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion());
413
- }
414
- }, {
415
- key: "_nationalPrefixForParsing",
416
- value: function _nationalPrefixForParsing() {
417
- return this.metadata[this.v1 ? 5 : this.v2 ? 6 : 7];
418
- }
419
- }, {
420
- key: "nationalPrefixForParsing",
421
- value: function nationalPrefixForParsing() {
422
- // If `national_prefix_for_parsing` is not set explicitly,
423
- // then infer it from `national_prefix` (if any)
424
- return this._nationalPrefixForParsing() || this.nationalPrefix();
425
- }
426
- }, {
427
- key: "nationalPrefixTransformRule",
428
- value: function nationalPrefixTransformRule() {
429
- return this.metadata[this.v1 ? 6 : this.v2 ? 7 : 8];
430
- }
431
- }, {
432
- key: "_getNationalPrefixIsOptionalWhenFormatting",
433
- value: function _getNationalPrefixIsOptionalWhenFormatting() {
434
- return !!this.metadata[this.v1 ? 7 : this.v2 ? 8 : 9];
435
- } // For countries of the same region (e.g. NANPA)
436
- // "national prefix is optional when formatting" flag is
437
- // stored in the "main" country for that region.
438
- // E.g. "RU" and "KZ", "US" and "CA".
439
-
440
- }, {
441
- key: "nationalPrefixIsOptionalWhenFormattingInNationalFormat",
442
- value: function nationalPrefixIsOptionalWhenFormattingInNationalFormat() {
443
- return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata) || this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion());
444
- }
445
- }, {
446
- key: "leadingDigits",
447
- value: function leadingDigits() {
448
- return this.metadata[this.v1 ? 8 : this.v2 ? 9 : 10];
449
- }
450
- }, {
451
- key: "types",
452
- value: function types() {
453
- return this.metadata[this.v1 ? 9 : this.v2 ? 10 : 11];
454
- }
455
- }, {
456
- key: "hasTypes",
457
- value: function hasTypes() {
458
- // Versions 1.2.0 - 1.2.4: can be `[]`.
459
-
460
- /* istanbul ignore next */
461
- if (this.types() && this.types().length === 0) {
462
- return false;
463
- } // Versions <= 1.2.4: can be `undefined`.
464
- // Version >= 1.2.5: can be `0`.
465
-
466
-
467
- return !!this.types();
468
- }
469
- }, {
470
- key: "type",
471
- value: function type(_type2) {
472
- if (this.hasTypes() && getType(this.types(), _type2)) {
473
- return new Type(getType(this.types(), _type2), this);
474
- }
475
- }
476
- }, {
477
- key: "ext",
478
- value: function ext() {
479
- if (this.v1 || this.v2) return DEFAULT_EXT_PREFIX;
480
- return this.metadata[13] || DEFAULT_EXT_PREFIX;
481
- }
482
- }]);
483
-
484
- return NumberingPlan;
485
- }();
486
-
487
- var Format =
488
- /*#__PURE__*/
489
- function () {
490
- function Format(format, metadata) {
491
- _classCallCheck(this, Format);
492
-
493
- this._format = format;
494
- this.metadata = metadata;
495
- }
496
-
497
- _createClass(Format, [{
498
- key: "pattern",
499
- value: function pattern() {
500
- return this._format[0];
501
- }
502
- }, {
503
- key: "format",
504
- value: function format() {
505
- return this._format[1];
506
- }
507
- }, {
508
- key: "leadingDigitsPatterns",
509
- value: function leadingDigitsPatterns() {
510
- return this._format[2] || [];
511
- }
512
- }, {
513
- key: "nationalPrefixFormattingRule",
514
- value: function nationalPrefixFormattingRule() {
515
- return this._format[3] || this.metadata.nationalPrefixFormattingRule();
516
- }
517
- }, {
518
- key: "nationalPrefixIsOptionalWhenFormattingInNationalFormat",
519
- value: function nationalPrefixIsOptionalWhenFormattingInNationalFormat() {
520
- return !!this._format[4] || this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat();
521
- }
522
- }, {
523
- key: "nationalPrefixIsMandatoryWhenFormattingInNationalFormat",
524
- value: function nationalPrefixIsMandatoryWhenFormattingInNationalFormat() {
525
- // National prefix is omitted if there's no national prefix formatting rule
526
- // set for this country, or when the national prefix formatting rule
527
- // contains no national prefix itself, or when this rule is set but
528
- // national prefix is optional for this phone number format
529
- // (and it is not enforced explicitly)
530
- return this.usesNationalPrefix() && !this.nationalPrefixIsOptionalWhenFormattingInNationalFormat();
531
- } // Checks whether national prefix formatting rule contains national prefix.
532
-
533
- }, {
534
- key: "usesNationalPrefix",
535
- value: function usesNationalPrefix() {
536
- return this.nationalPrefixFormattingRule() && // Check that national prefix formatting rule is not a "dummy" one.
537
- !FIRST_GROUP_ONLY_PREFIX_PATTERN.test(this.nationalPrefixFormattingRule()) // In compressed metadata, `this.nationalPrefixFormattingRule()` is `0`
538
- // when `national_prefix_formatting_rule` is not present.
539
- // So, `true` or `false` are returned explicitly here, so that
540
- // `0` number isn't returned.
541
- ? true : false;
542
- }
543
- }, {
544
- key: "internationalFormat",
545
- value: function internationalFormat() {
546
- return this._format[5] || this.format();
547
- }
548
- }]);
549
-
550
- return Format;
551
- }();
552
- /**
553
- * A pattern that is used to determine if the national prefix formatting rule
554
- * has the first group only, i.e., does not start with the national prefix.
555
- * Note that the pattern explicitly allows for unbalanced parentheses.
556
- */
557
-
558
-
559
- var FIRST_GROUP_ONLY_PREFIX_PATTERN = /^\(?\$1\)?$/;
560
-
561
- var Type =
562
- /*#__PURE__*/
563
- function () {
564
- function Type(type, metadata) {
565
- _classCallCheck(this, Type);
566
-
567
- this.type = type;
568
- this.metadata = metadata;
569
- }
570
-
571
- _createClass(Type, [{
572
- key: "pattern",
573
- value: function pattern() {
574
- if (this.metadata.v1) return this.type;
575
- return this.type[0];
576
- }
577
- }, {
578
- key: "possibleLengths",
579
- value: function possibleLengths() {
580
- if (this.metadata.v1) return;
581
- return this.type[1] || this.metadata.possibleLengths();
582
- }
583
- }]);
584
-
585
- return Type;
586
- }();
587
-
588
- function getType(types, type) {
589
- switch (type) {
590
- case 'FIXED_LINE':
591
- return types[0];
592
-
593
- case 'MOBILE':
594
- return types[1];
595
-
596
- case 'TOLL_FREE':
597
- return types[2];
598
-
599
- case 'PREMIUM_RATE':
600
- return types[3];
601
-
602
- case 'PERSONAL_NUMBER':
603
- return types[4];
604
-
605
- case 'VOICEMAIL':
606
- return types[5];
607
-
608
- case 'UAN':
609
- return types[6];
610
-
611
- case 'PAGER':
612
- return types[7];
613
-
614
- case 'VOIP':
615
- return types[8];
616
-
617
- case 'SHARED_COST':
618
- return types[9];
619
- }
620
- }
621
-
622
- function validateMetadata(metadata) {
623
- if (!metadata) {
624
- throw new Error('[libphonenumber-js] `metadata` argument not passed. Check your arguments.');
625
- } // `country_phone_code_to_countries` was renamed to
626
- // `country_calling_codes` in `1.0.18`.
627
-
628
-
629
- if (!is_object(metadata) || !is_object(metadata.countries)) {
630
- throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(is_object(metadata) ? 'an object of shape: { ' + Object.keys(metadata).join(', ') + ' }' : 'a ' + type_of(metadata) + ': ' + metadata, "."));
631
- }
632
- } // Babel transforms `typeof` into some "branches"
633
- // so istanbul will show this as "branch not covered".
634
-
635
- /* istanbul ignore next */
636
-
637
- var is_object = function is_object(_) {
638
- return _typeof(_) === 'object';
639
- }; // Babel transforms `typeof` into some "branches"
640
- // so istanbul will show this as "branch not covered".
641
-
642
- /* istanbul ignore next */
643
-
644
-
645
- var type_of = function type_of(_) {
646
- return _typeof(_);
647
- };
648
- /**
649
- * Returns "country calling code" for a country.
650
- * Throws an error if the country doesn't exist or isn't supported by this library.
651
- * @param {string} country
652
- * @param {object} metadata
653
- * @return {string}
654
- * @example
655
- * // Returns "44"
656
- * getCountryCallingCode("GB")
657
- */
658
-
659
- function getCountryCallingCode(country, metadata) {
660
- metadata = new Metadata(metadata);
661
-
662
- if (metadata.hasCountry(country)) {
663
- return metadata.country(country).countryCallingCode();
664
- }
665
-
666
- throw new Error("Unknown country: ".concat(country));
667
- }
668
- function isSupportedCountry(country, metadata) {
669
- // metadata = new Metadata(metadata)
670
- // return metadata.hasCountry(country)
671
- return metadata.countries[country] !== undefined;
672
- }
673
-
674
- function setVersion(metadata) {
675
- var version = metadata.version;
676
-
677
- if (typeof version === 'number') {
678
- this.v1 = version === 1;
679
- this.v2 = version === 2;
680
- this.v3 = version === 3;
681
- this.v4 = version === 4;
682
- } else {
683
- if (!version) {
684
- this.v1 = true;
685
- } else if (compare(version, V3) === -1) {
686
- this.v2 = true;
687
- } else if (compare(version, V4) === -1) {
688
- this.v3 = true;
689
- } else {
690
- this.v4 = true;
691
- }
692
- }
693
- } // const ISO_COUNTRY_CODE = /^[A-Z]{2}$/
694
- // function isCountryCode(countryCode) {
695
- // return ISO_COUNTRY_CODE.test(countryCodeOrCountryCallingCode)
696
- // }
697
-
698
- var RFC3966_EXTN_PREFIX = ';ext=';
699
- /**
700
- * Helper method for constructing regular expressions for parsing. Creates
701
- * an expression that captures up to max_length digits.
702
- * @return {string} RegEx pattern to capture extension digits.
703
- */
704
-
705
- var getExtensionDigitsPattern = function getExtensionDigitsPattern(maxLength) {
706
- return "([".concat(VALID_DIGITS, "]{1,").concat(maxLength, "})");
707
- };
708
- /**
709
- * Helper initialiser method to create the regular-expression pattern to match
710
- * extensions.
711
- * Copy-pasted from Google's `libphonenumber`:
712
- * https://github.com/google/libphonenumber/blob/55b2646ec9393f4d3d6661b9c82ef9e258e8b829/javascript/i18n/phonenumbers/phonenumberutil.js#L759-L766
713
- * @return {string} RegEx pattern to capture extensions.
714
- */
715
-
716
-
717
- function createExtensionPattern(purpose) {
718
- // We cap the maximum length of an extension based on the ambiguity of the way
719
- // the extension is prefixed. As per ITU, the officially allowed length for
720
- // extensions is actually 40, but we don't support this since we haven't seen real
721
- // examples and this introduces many false interpretations as the extension labels
722
- // are not standardized.
723
-
724
- /** @type {string} */
725
- var extLimitAfterExplicitLabel = '20';
726
- /** @type {string} */
727
-
728
- var extLimitAfterLikelyLabel = '15';
729
- /** @type {string} */
730
-
731
- var extLimitAfterAmbiguousChar = '9';
732
- /** @type {string} */
733
-
734
- var extLimitWhenNotSure = '6';
735
- /** @type {string} */
736
-
737
- var possibleSeparatorsBetweenNumberAndExtLabel = "[ \xA0\\t,]*"; // Optional full stop (.) or colon, followed by zero or more spaces/tabs/commas.
738
-
739
- /** @type {string} */
740
-
741
- var possibleCharsAfterExtLabel = "[:\\.\uFF0E]?[ \xA0\\t,-]*";
742
- /** @type {string} */
743
-
744
- var optionalExtnSuffix = "#?"; // Here the extension is called out in more explicit way, i.e mentioning it obvious
745
- // patterns like "ext.".
746
-
747
- /** @type {string} */
748
-
749
- var explicitExtLabels = "(?:e?xt(?:ensi(?:o\u0301?|\xF3))?n?|\uFF45?\uFF58\uFF54\uFF4E?|\u0434\u043E\u0431|anexo)"; // One-character symbols that can be used to indicate an extension, and less
750
- // commonly used or more ambiguous extension labels.
751
-
752
- /** @type {string} */
753
-
754
- var ambiguousExtLabels = "(?:[x\uFF58#\uFF03~\uFF5E]|int|\uFF49\uFF4E\uFF54)"; // When extension is not separated clearly.
755
-
756
- /** @type {string} */
757
-
758
- var ambiguousSeparator = "[- ]+"; // This is the same as possibleSeparatorsBetweenNumberAndExtLabel, but not matching
759
- // comma as extension label may have it.
760
-
761
- /** @type {string} */
762
-
763
- var possibleSeparatorsNumberExtLabelNoComma = "[ \xA0\\t]*"; // ",," is commonly used for auto dialling the extension when connected. First
764
- // comma is matched through possibleSeparatorsBetweenNumberAndExtLabel, so we do
765
- // not repeat it here. Semi-colon works in Iphone and Android also to pop up a
766
- // button with the extension number following.
767
-
768
- /** @type {string} */
769
-
770
- var autoDiallingAndExtLabelsFound = "(?:,{2}|;)";
771
- /** @type {string} */
772
-
773
- var rfcExtn = RFC3966_EXTN_PREFIX + getExtensionDigitsPattern(extLimitAfterExplicitLabel);
774
- /** @type {string} */
775
-
776
- var explicitExtn = possibleSeparatorsBetweenNumberAndExtLabel + explicitExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterExplicitLabel) + optionalExtnSuffix;
777
- /** @type {string} */
778
-
779
- var ambiguousExtn = possibleSeparatorsBetweenNumberAndExtLabel + ambiguousExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix;
780
- /** @type {string} */
781
-
782
- var americanStyleExtnWithSuffix = ambiguousSeparator + getExtensionDigitsPattern(extLimitWhenNotSure) + "#";
783
- /** @type {string} */
784
-
785
- var autoDiallingExtn = possibleSeparatorsNumberExtLabelNoComma + autoDiallingAndExtLabelsFound + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterLikelyLabel) + optionalExtnSuffix;
786
- /** @type {string} */
787
-
788
- var onlyCommasExtn = possibleSeparatorsNumberExtLabelNoComma + "(?:,)+" + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix; // The first regular expression covers RFC 3966 format, where the extension is added
789
- // using ";ext=". The second more generic where extension is mentioned with explicit
790
- // labels like "ext:". In both the above cases we allow more numbers in extension than
791
- // any other extension labels. The third one captures when single character extension
792
- // labels or less commonly used labels are used. In such cases we capture fewer
793
- // extension digits in order to reduce the chance of falsely interpreting two
794
- // numbers beside each other as a number + extension. The fourth one covers the
795
- // special case of American numbers where the extension is written with a hash
796
- // at the end, such as "- 503#". The fifth one is exclusively for extension
797
- // autodialling formats which are used when dialling and in this case we accept longer
798
- // extensions. The last one is more liberal on the number of commas that acts as
799
- // extension labels, so we have a strict cap on the number of digits in such extensions.
800
-
801
- return rfcExtn + "|" + explicitExtn + "|" + ambiguousExtn + "|" + americanStyleExtnWithSuffix + "|" + autoDiallingExtn + "|" + onlyCommasExtn;
802
- }
803
-
804
- // Checks we have at least three leading digits, and only valid punctuation,
805
- // alpha characters and digits in the phone number. Does not include extension
806
- // data. The symbol 'x' is allowed here as valid punctuation since it is often
807
- // used as a placeholder for carrier codes, for example in Brazilian phone
808
- // numbers. We also allow multiple '+' characters at the start.
809
- //
810
- // Corresponds to the following:
811
- // [digits]{minLengthNsn}|
812
- // plus_sign*
813
- // (([punctuation]|[star])*[digits]){3,}([punctuation]|[star]|[digits]|[alpha])*
814
- //
815
- // The first reg-ex is to allow short numbers (two digits long) to be parsed if
816
- // they are entered as "15" etc, but only if there is no punctuation in them.
817
- // The second expression restricts the number of digits to three or more, but
818
- // then allows them to be in international form, and to have alpha-characters
819
- // and punctuation. We split up the two reg-exes here and combine them when
820
- // creating the reg-ex VALID_PHONE_NUMBER_PATTERN itself so we can prefix it
821
- // with ^ and append $ to each branch.
822
- //
823
- // "Note VALID_PUNCTUATION starts with a -,
824
- // so must be the first in the range" (c) Google devs.
825
- // (wtf did they mean by saying that; probably nothing)
826
- //
827
-
828
- var MIN_LENGTH_PHONE_NUMBER_PATTERN = '[' + VALID_DIGITS + ']{' + MIN_LENGTH_FOR_NSN + '}'; //
829
- // And this is the second reg-exp:
830
- // (see MIN_LENGTH_PHONE_NUMBER_PATTERN for a full description of this reg-exp)
831
- //
832
-
833
- var VALID_PHONE_NUMBER = '[' + PLUS_CHARS + ']{0,1}' + '(?:' + '[' + VALID_PUNCTUATION + ']*' + '[' + VALID_DIGITS + ']' + '){3,}' + '[' + VALID_PUNCTUATION + VALID_DIGITS + ']*';
834
- var VALID_PHONE_NUMBER_WITH_EXTENSION = VALID_PHONE_NUMBER + // Phone number extensions
835
- '(?:' + createExtensionPattern() + ')?'; // The combined regular expression for valid phone numbers:
836
- //
837
-
838
- var VALID_PHONE_NUMBER_PATTERN = new RegExp( // Either a short two-digit-only phone number
839
- '^' + MIN_LENGTH_PHONE_NUMBER_PATTERN + '$' + '|' + // Or a longer fully parsed phone number (min 3 characters)
840
- '^' + VALID_PHONE_NUMBER_WITH_EXTENSION + '$', 'i'); // Checks to see if the string of characters could possibly be a phone number at
841
- // all. At the moment, checks to see that the string begins with at least 2
842
- // digits, ignoring any punctuation commonly found in phone numbers. This method
843
- // does not require the number to be normalized in advance - but does assume
844
- // that leading non-number symbols have been removed, such as by the method
845
- // `extract_possible_number`.
846
- //
847
-
848
- function isViablePhoneNumber(number) {
849
- return number.length >= MIN_LENGTH_FOR_NSN && VALID_PHONE_NUMBER_PATTERN.test(number);
850
- }
851
-
852
- // These mappings map a character (key) to a specific digit that should
853
- // replace it for normalization purposes. Non-European digits that
854
- // may be used in phone numbers are mapped to a European equivalent.
855
- //
856
- // E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.
857
- //
858
- var DIGITS = {
859
- '0': '0',
860
- '1': '1',
861
- '2': '2',
862
- '3': '3',
863
- '4': '4',
864
- '5': '5',
865
- '6': '6',
866
- '7': '7',
867
- '8': '8',
868
- '9': '9',
869
- "\uFF10": '0',
870
- // Fullwidth digit 0
871
- "\uFF11": '1',
872
- // Fullwidth digit 1
873
- "\uFF12": '2',
874
- // Fullwidth digit 2
875
- "\uFF13": '3',
876
- // Fullwidth digit 3
877
- "\uFF14": '4',
878
- // Fullwidth digit 4
879
- "\uFF15": '5',
880
- // Fullwidth digit 5
881
- "\uFF16": '6',
882
- // Fullwidth digit 6
883
- "\uFF17": '7',
884
- // Fullwidth digit 7
885
- "\uFF18": '8',
886
- // Fullwidth digit 8
887
- "\uFF19": '9',
888
- // Fullwidth digit 9
889
- "\u0660": '0',
890
- // Arabic-indic digit 0
891
- "\u0661": '1',
892
- // Arabic-indic digit 1
893
- "\u0662": '2',
894
- // Arabic-indic digit 2
895
- "\u0663": '3',
896
- // Arabic-indic digit 3
897
- "\u0664": '4',
898
- // Arabic-indic digit 4
899
- "\u0665": '5',
900
- // Arabic-indic digit 5
901
- "\u0666": '6',
902
- // Arabic-indic digit 6
903
- "\u0667": '7',
904
- // Arabic-indic digit 7
905
- "\u0668": '8',
906
- // Arabic-indic digit 8
907
- "\u0669": '9',
908
- // Arabic-indic digit 9
909
- "\u06F0": '0',
910
- // Eastern-Arabic digit 0
911
- "\u06F1": '1',
912
- // Eastern-Arabic digit 1
913
- "\u06F2": '2',
914
- // Eastern-Arabic digit 2
915
- "\u06F3": '3',
916
- // Eastern-Arabic digit 3
917
- "\u06F4": '4',
918
- // Eastern-Arabic digit 4
919
- "\u06F5": '5',
920
- // Eastern-Arabic digit 5
921
- "\u06F6": '6',
922
- // Eastern-Arabic digit 6
923
- "\u06F7": '7',
924
- // Eastern-Arabic digit 7
925
- "\u06F8": '8',
926
- // Eastern-Arabic digit 8
927
- "\u06F9": '9' // Eastern-Arabic digit 9
928
-
929
- };
930
- function parseDigit(character) {
931
- return DIGITS[character];
932
- }
933
- /**
934
- * Parses phone number digits from a string.
935
- * Drops all punctuation leaving only digits.
936
- * Also converts wide-ascii and arabic-indic numerals to conventional numerals.
937
- * E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.
938
- * @param {string} string
939
- * @return {string}
940
- * @example
941
- * ```js
942
- * parseDigits('8 (800) 555')
943
- * // Outputs '8800555'.
944
- * ```
945
- */
946
-
947
- function parseDigits(string) {
948
- var result = ''; // Using `.split('')` here instead of normal `for ... of`
949
- // because the importing application doesn't neccessarily include an ES6 polyfill.
950
- // The `.split('')` approach discards "exotic" UTF-8 characters
951
- // (the ones consisting of four bytes) but digits
952
- // (including non-European ones) don't fall into that range
953
- // so such "exotic" characters would be discarded anyway.
954
-
955
- for (var _iterator = string.split(''), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
956
- var _ref;
957
-
958
- if (_isArray) {
959
- if (_i >= _iterator.length) break;
960
- _ref = _iterator[_i++];
961
- } else {
962
- _i = _iterator.next();
963
- if (_i.done) break;
964
- _ref = _i.value;
965
- }
966
-
967
- var character = _ref;
968
- var digit = parseDigit(character);
969
-
970
- if (digit) {
971
- result += digit;
972
- }
973
- }
974
-
975
- return result;
976
- }
977
-
978
- /**
979
- * Merges two arrays.
980
- * @param {*} a
981
- * @param {*} b
982
- * @return {*}
983
- */
984
- function mergeArrays(a, b) {
985
- var merged = a.slice();
986
-
987
- for (var _iterator = b, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
988
- var _ref;
989
-
990
- if (_isArray) {
991
- if (_i >= _iterator.length) break;
992
- _ref = _iterator[_i++];
993
- } else {
994
- _i = _iterator.next();
995
- if (_i.done) break;
996
- _ref = _i.value;
997
- }
998
-
999
- var element = _ref;
1000
-
1001
- if (a.indexOf(element) < 0) {
1002
- merged.push(element);
1003
- }
1004
- }
1005
-
1006
- return merged.sort(function (a, b) {
1007
- return a - b;
1008
- }); // ES6 version, requires Set polyfill.
1009
- // let merged = new Set(a)
1010
- // for (const element of b) {
1011
- // merged.add(i)
1012
- // }
1013
- // return Array.from(merged).sort((a, b) => a - b)
1014
- }
1015
-
1016
- function checkNumberLength(nationalNumber, metadata) {
1017
- return checkNumberLengthForType(nationalNumber, undefined, metadata);
1018
- } // Checks whether a number is possible for the country based on its length.
1019
- // Should only be called for the "new" metadata which has "possible lengths".
1020
-
1021
- function checkNumberLengthForType(nationalNumber, type, metadata) {
1022
- var type_info = metadata.type(type); // There should always be "<possiblePengths/>" set for every type element.
1023
- // This is declared in the XML schema.
1024
- // For size efficiency, where a sub-description (e.g. fixed-line)
1025
- // has the same "<possiblePengths/>" as the "general description", this is missing,
1026
- // so we fall back to the "general description". Where no numbers of the type
1027
- // exist at all, there is one possible length (-1) which is guaranteed
1028
- // not to match the length of any real phone number.
1029
-
1030
- var possible_lengths = type_info && type_info.possibleLengths() || metadata.possibleLengths(); // let local_lengths = type_info && type.possibleLengthsLocal() || metadata.possibleLengthsLocal()
1031
- // Metadata before version `1.0.18` didn't contain `possible_lengths`.
1032
-
1033
- if (!possible_lengths) {
1034
- return 'IS_POSSIBLE';
1035
- }
1036
-
1037
- if (type === 'FIXED_LINE_OR_MOBILE') {
1038
- // No such country in metadata.
1039
-
1040
- /* istanbul ignore next */
1041
- if (!metadata.type('FIXED_LINE')) {
1042
- // The rare case has been encountered where no fixedLine data is available
1043
- // (true for some non-geographic entities), so we just check mobile.
1044
- return checkNumberLengthForType(nationalNumber, 'MOBILE', metadata);
1045
- }
1046
-
1047
- var mobile_type = metadata.type('MOBILE');
1048
-
1049
- if (mobile_type) {
1050
- // Merge the mobile data in if there was any. "Concat" creates a new
1051
- // array, it doesn't edit possible_lengths in place, so we don't need a copy.
1052
- // Note that when adding the possible lengths from mobile, we have
1053
- // to again check they aren't empty since if they are this indicates
1054
- // they are the same as the general desc and should be obtained from there.
1055
- possible_lengths = mergeArrays(possible_lengths, mobile_type.possibleLengths()); // The current list is sorted; we need to merge in the new list and
1056
- // re-sort (duplicates are okay). Sorting isn't so expensive because
1057
- // the lists are very small.
1058
- // if (local_lengths) {
1059
- // local_lengths = mergeArrays(local_lengths, mobile_type.possibleLengthsLocal())
1060
- // } else {
1061
- // local_lengths = mobile_type.possibleLengthsLocal()
1062
- // }
1063
- }
1064
- } // If the type doesn't exist then return 'INVALID_LENGTH'.
1065
- else if (type && !type_info) {
1066
- return 'INVALID_LENGTH';
1067
- }
1068
-
1069
- var actual_length = nationalNumber.length; // In `libphonenumber-js` all "local-only" formats are dropped for simplicity.
1070
- // // This is safe because there is never an overlap beween the possible lengths
1071
- // // and the local-only lengths; this is checked at build time.
1072
- // if (local_lengths && local_lengths.indexOf(nationalNumber.length) >= 0)
1073
- // {
1074
- // return 'IS_POSSIBLE_LOCAL_ONLY'
1075
- // }
1076
-
1077
- var minimum_length = possible_lengths[0];
1078
-
1079
- if (minimum_length === actual_length) {
1080
- return 'IS_POSSIBLE';
1081
- }
1082
-
1083
- if (minimum_length > actual_length) {
1084
- return 'TOO_SHORT';
1085
- }
1086
-
1087
- if (possible_lengths[possible_lengths.length - 1] < actual_length) {
1088
- return 'TOO_LONG';
1089
- } // We skip the first element since we've already checked it.
1090
-
1091
-
1092
- return possible_lengths.indexOf(actual_length, 1) >= 0 ? 'IS_POSSIBLE' : 'INVALID_LENGTH';
1093
- }
1094
-
1095
- function isPossiblePhoneNumber(input, options, metadata) {
1096
- /* istanbul ignore if */
1097
- if (options === undefined) {
1098
- options = {};
1099
- }
1100
-
1101
- metadata = new Metadata(metadata);
1102
-
1103
- if (options.v2) {
1104
- if (!input.countryCallingCode) {
1105
- throw new Error('Invalid phone number object passed');
1106
- }
1107
-
1108
- metadata.selectNumberingPlan(input.countryCallingCode);
1109
- } else {
1110
- if (!input.phone) {
1111
- return false;
1112
- }
1113
-
1114
- if (input.country) {
1115
- if (!metadata.hasCountry(input.country)) {
1116
- throw new Error("Unknown country: ".concat(input.country));
1117
- }
1118
-
1119
- metadata.country(input.country);
1120
- } else {
1121
- if (!input.countryCallingCode) {
1122
- throw new Error('Invalid phone number object passed');
1123
- }
1124
-
1125
- metadata.selectNumberingPlan(input.countryCallingCode);
1126
- }
1127
- }
1128
-
1129
- if (metadata.possibleLengths()) {
1130
- return isPossibleNumber(input.phone || input.nationalNumber, metadata);
1131
- } else {
1132
- // There was a bug between `1.7.35` and `1.7.37` where "possible_lengths"
1133
- // were missing for "non-geographical" numbering plans.
1134
- // Just assume the number is possible in such cases:
1135
- // it's unlikely that anyone generated their custom metadata
1136
- // in that short period of time (one day).
1137
- // This code can be removed in some future major version update.
1138
- if (input.countryCallingCode && metadata.isNonGeographicCallingCode(input.countryCallingCode)) {
1139
- // "Non-geographic entities" did't have `possibleLengths`
1140
- // due to a bug in metadata generation process.
1141
- return true;
1142
- } else {
1143
- throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.');
1144
- }
1145
- }
1146
- }
1147
- function isPossibleNumber(nationalNumber, metadata) {
1148
- //, isInternational) {
1149
- switch (checkNumberLength(nationalNumber, metadata)) {
1150
- case 'IS_POSSIBLE':
1151
- return true;
1152
- // This library ignores "local-only" phone numbers (for simplicity).
1153
- // See the readme for more info on what are "local-only" phone numbers.
1154
- // case 'IS_POSSIBLE_LOCAL_ONLY':
1155
- // return !isInternational
1156
-
1157
- default:
1158
- return false;
1159
- }
1160
- }
1161
-
1162
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
1163
-
1164
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
1165
-
1166
- function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
1167
-
1168
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1169
-
1170
- /**
1171
- * @param {string} text - Phone URI (RFC 3966).
1172
- * @return {object} `{ ?number, ?ext }`.
1173
- */
1174
-
1175
- function parseRFC3966(text) {
1176
- var number;
1177
- var ext; // Replace "tel:" with "tel=" for parsing convenience.
1178
-
1179
- text = text.replace(/^tel:/, 'tel=');
1180
-
1181
- for (var _iterator = text.split(';'), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
1182
- var _ref;
1183
-
1184
- if (_isArray) {
1185
- if (_i >= _iterator.length) break;
1186
- _ref = _iterator[_i++];
1187
- } else {
1188
- _i = _iterator.next();
1189
- if (_i.done) break;
1190
- _ref = _i.value;
1191
- }
1192
-
1193
- var part = _ref;
1194
-
1195
- var _part$split = part.split('='),
1196
- _part$split2 = _slicedToArray(_part$split, 2),
1197
- name = _part$split2[0],
1198
- value = _part$split2[1];
1199
-
1200
- switch (name) {
1201
- case 'tel':
1202
- number = value;
1203
- break;
1204
-
1205
- case 'ext':
1206
- ext = value;
1207
- break;
1208
-
1209
- case 'phone-context':
1210
- // Only "country contexts" are supported.
1211
- // "Domain contexts" are ignored.
1212
- if (value[0] === '+') {
1213
- number = value + number;
1214
- }
1215
-
1216
- break;
1217
- }
1218
- } // If the phone number is not viable, then abort.
1219
-
1220
-
1221
- if (!isViablePhoneNumber(number)) {
1222
- return {};
1223
- }
1224
-
1225
- var result = {
1226
- number: number
1227
- };
1228
-
1229
- if (ext) {
1230
- result.ext = ext;
1231
- }
1232
-
1233
- return result;
1234
- }
1235
- /**
1236
- * @param {object} - `{ ?number, ?extension }`.
1237
- * @return {string} Phone URI (RFC 3966).
1238
- */
1239
-
1240
- function formatRFC3966(_ref2) {
1241
- var number = _ref2.number,
1242
- ext = _ref2.ext;
1243
-
1244
- if (!number) {
1245
- return '';
1246
- }
1247
-
1248
- if (number[0] !== '+') {
1249
- throw new Error("\"formatRFC3966()\" expects \"number\" to be in E.164 format.");
1250
- }
1251
-
1252
- return "tel:".concat(number).concat(ext ? ';ext=' + ext : '');
1253
- }
1254
-
1255
- /**
1256
- * Checks whether the entire input sequence can be matched
1257
- * against the regular expression.
1258
- * @return {boolean}
1259
- */
1260
- function matchesEntirely(text, regular_expression) {
1261
- // If assigning the `''` default value is moved to the arguments above,
1262
- // code coverage would decrease for some weird reason.
1263
- text = text || '';
1264
- return new RegExp('^(?:' + regular_expression + ')$').test(text);
1265
- }
1266
-
1267
- var NON_FIXED_LINE_PHONE_TYPES = ['MOBILE', 'PREMIUM_RATE', 'TOLL_FREE', 'SHARED_COST', 'VOIP', 'PERSONAL_NUMBER', 'PAGER', 'UAN', 'VOICEMAIL']; // Finds out national phone number type (fixed line, mobile, etc)
1268
-
1269
- function getNumberType(input, options, metadata) {
1270
- // If assigning the `{}` default value is moved to the arguments above,
1271
- // code coverage would decrease for some weird reason.
1272
- options = options || {}; // When `parse()` returned `{}`
1273
- // meaning that the phone number is not a valid one.
1274
-
1275
- if (!input.country) {
1276
- return;
1277
- }
1278
-
1279
- metadata = new Metadata(metadata);
1280
- metadata.selectNumberingPlan(input.country, input.countryCallingCode);
1281
- var nationalNumber = options.v2 ? input.nationalNumber : input.phone; // The following is copy-pasted from the original function:
1282
- // https://github.com/googlei18n/libphonenumber/blob/3ea547d4fbaa2d0b67588904dfa5d3f2557c27ff/javascript/i18n/phonenumbers/phonenumberutil.js#L2835
1283
- // Is this national number even valid for this country
1284
-
1285
- if (!matchesEntirely(nationalNumber, metadata.nationalNumberPattern())) {
1286
- return;
1287
- } // Is it fixed line number
1288
-
1289
-
1290
- if (isNumberTypeEqualTo(nationalNumber, 'FIXED_LINE', metadata)) {
1291
- // Because duplicate regular expressions are removed
1292
- // to reduce metadata size, if "mobile" pattern is ""
1293
- // then it means it was removed due to being a duplicate of the fixed-line pattern.
1294
- //
1295
- if (metadata.type('MOBILE') && metadata.type('MOBILE').pattern() === '') {
1296
- return 'FIXED_LINE_OR_MOBILE';
1297
- } // v1 metadata.
1298
- // Legacy.
1299
- // Deprecated.
1300
-
1301
-
1302
- if (!metadata.type('MOBILE')) {
1303
- return 'FIXED_LINE_OR_MOBILE';
1304
- } // Check if the number happens to qualify as both fixed line and mobile.
1305
- // (no such country in the minimal metadata set)
1306
-
1307
- /* istanbul ignore if */
1308
-
1309
-
1310
- if (isNumberTypeEqualTo(nationalNumber, 'MOBILE', metadata)) {
1311
- return 'FIXED_LINE_OR_MOBILE';
1312
- }
1313
-
1314
- return 'FIXED_LINE';
1315
- }
1316
-
1317
- for (var _i = 0, _NON_FIXED_LINE_PHONE = NON_FIXED_LINE_PHONE_TYPES; _i < _NON_FIXED_LINE_PHONE.length; _i++) {
1318
- var type = _NON_FIXED_LINE_PHONE[_i];
1319
-
1320
- if (isNumberTypeEqualTo(nationalNumber, type, metadata)) {
1321
- return type;
1322
- }
1323
- }
1324
- }
1325
- function isNumberTypeEqualTo(nationalNumber, type, metadata) {
1326
- type = metadata.type(type);
1327
-
1328
- if (!type || !type.pattern()) {
1329
- return false;
1330
- } // Check if any possible number lengths are present;
1331
- // if so, we use them to avoid checking
1332
- // the validation pattern if they don't match.
1333
- // If they are absent, this means they match
1334
- // the general description, which we have
1335
- // already checked before a specific number type.
1336
-
1337
-
1338
- if (type.possibleLengths() && type.possibleLengths().indexOf(nationalNumber.length) < 0) {
1339
- return false;
1340
- }
1341
-
1342
- return matchesEntirely(nationalNumber, type.pattern());
1343
- }
1344
-
1345
- /**
1346
- * Checks if a given phone number is valid.
1347
- *
1348
- * If the `number` is a string, it will be parsed to an object,
1349
- * but only if it contains only valid phone number characters (including punctuation).
1350
- * If the `number` is an object, it is used as is.
1351
- *
1352
- * The optional `defaultCountry` argument is the default country.
1353
- * I.e. it does not restrict to just that country,
1354
- * e.g. in those cases where several countries share
1355
- * the same phone numbering rules (NANPA, Britain, etc).
1356
- * For example, even though the number `07624 369230`
1357
- * belongs to the Isle of Man ("IM" country code)
1358
- * calling `isValidNumber('07624369230', 'GB', metadata)`
1359
- * still returns `true` because the country is not restricted to `GB`,
1360
- * it's just that `GB` is the default one for the phone numbering rules.
1361
- * For restricting the country see `isValidNumberForRegion()`
1362
- * though restricting a country might not be a good idea.
1363
- * https://github.com/googlei18n/libphonenumber/blob/master/FAQ.md#when-should-i-use-isvalidnumberforregion
1364
- *
1365
- * Examples:
1366
- *
1367
- * ```js
1368
- * isValidNumber('+78005553535', metadata)
1369
- * isValidNumber('8005553535', 'RU', metadata)
1370
- * isValidNumber('88005553535', 'RU', metadata)
1371
- * isValidNumber({ phone: '8005553535', country: 'RU' }, metadata)
1372
- * ```
1373
- */
1374
-
1375
- function isValidNumber(input, options, metadata) {
1376
- // If assigning the `{}` default value is moved to the arguments above,
1377
- // code coverage would decrease for some weird reason.
1378
- options = options || {};
1379
- metadata = new Metadata(metadata); // This is just to support `isValidNumber({})`
1380
- // for cases when `parseNumber()` returns `{}`.
1381
-
1382
- if (!input.country) {
1383
- return false;
1384
- }
1385
-
1386
- metadata.selectNumberingPlan(input.country, input.countryCallingCode); // By default, countries only have type regexps when it's required for
1387
- // distinguishing different countries having the same `countryCallingCode`.
1388
-
1389
- if (metadata.hasTypes()) {
1390
- return getNumberType(input, options, metadata.metadata) !== undefined;
1391
- } // If there are no type regexps for this country in metadata then use
1392
- // `nationalNumberPattern` as a "better than nothing" replacement.
1393
-
1394
-
1395
- var national_number = options.v2 ? input.nationalNumber : input.phone;
1396
- return matchesEntirely(national_number, metadata.nationalNumberPattern());
1397
- }
1398
-
1399
- //
1400
- // E.g. "(999) 111-22-33" -> "999 111 22 33"
1401
- //
1402
- // For some reason Google's metadata contains `<intlFormat/>`s with brackets and dashes.
1403
- // Meanwhile, there's no single opinion about using punctuation in international phone numbers.
1404
- //
1405
- // For example, Google's `<intlFormat/>` for USA is `+1 213-373-4253`.
1406
- // And here's a quote from WikiPedia's "North American Numbering Plan" page:
1407
- // https://en.wikipedia.org/wiki/North_American_Numbering_Plan
1408
- //
1409
- // "The country calling code for all countries participating in the NANP is 1.
1410
- // In international format, an NANP number should be listed as +1 301 555 01 00,
1411
- // where 301 is an area code (Maryland)."
1412
- //
1413
- // I personally prefer the international format without any punctuation.
1414
- // For example, brackets are remnants of the old age, meaning that the
1415
- // phone number part in brackets (so called "area code") can be omitted
1416
- // if dialing within the same "area".
1417
- // And hyphens were clearly introduced for splitting local numbers into memorizable groups.
1418
- // For example, remembering "5553535" is difficult but "555-35-35" is much simpler.
1419
- // Imagine a man taking a bus from home to work and seeing an ad with a phone number.
1420
- // He has a couple of seconds to memorize that number until it passes by.
1421
- // If it were spaces instead of hyphens the man wouldn't necessarily get it,
1422
- // but with hyphens instead of spaces the grouping is more explicit.
1423
- // I personally think that hyphens introduce visual clutter,
1424
- // so I prefer replacing them with spaces in international numbers.
1425
- // In the modern age all output is done on displays where spaces are clearly distinguishable
1426
- // so hyphens can be safely replaced with spaces without losing any legibility.
1427
- //
1428
-
1429
- function applyInternationalSeparatorStyle(formattedNumber) {
1430
- return formattedNumber.replace(new RegExp("[".concat(VALID_PUNCTUATION, "]+"), 'g'), ' ').trim();
1431
- }
1432
-
1433
- // first group is not used in the national pattern (e.g. Argentina) so the $1
1434
- // group does not match correctly. Therefore, we use `\d`, so that the first
1435
- // group actually used in the pattern will be matched.
1436
-
1437
- var FIRST_GROUP_PATTERN = /(\$\d)/;
1438
- function formatNationalNumberUsingFormat(number, format, _ref) {
1439
- var useInternationalFormat = _ref.useInternationalFormat,
1440
- withNationalPrefix = _ref.withNationalPrefix;
1441
- var formattedNumber = number.replace(new RegExp(format.pattern()), useInternationalFormat ? format.internationalFormat() : // This library doesn't use `domestic_carrier_code_formatting_rule`,
1442
- // because that one is only used when formatting phone numbers
1443
- // for dialing from a mobile phone, and this is not a dialing library.
1444
- // carrierCode && format.domesticCarrierCodeFormattingRule()
1445
- // // First, replace the $CC in the formatting rule with the desired carrier code.
1446
- // // Then, replace the $FG in the formatting rule with the first group
1447
- // // and the carrier code combined in the appropriate way.
1448
- // ? format.format().replace(FIRST_GROUP_PATTERN, format.domesticCarrierCodeFormattingRule().replace('$CC', carrierCode))
1449
- // : (
1450
- // withNationalPrefix && format.nationalPrefixFormattingRule()
1451
- // ? format.format().replace(FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule())
1452
- // : format.format()
1453
- // )
1454
- withNationalPrefix && format.nationalPrefixFormattingRule() ? format.format().replace(FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule()) : format.format());
1455
-
1456
- if (useInternationalFormat) {
1457
- return applyInternationalSeparatorStyle(formattedNumber);
1458
- }
1459
-
1460
- return formattedNumber;
1461
- }
1462
-
1463
- /**
1464
- * Pattern that makes it easy to distinguish whether a region has a single
1465
- * international dialing prefix or not. If a region has a single international
1466
- * prefix (e.g. 011 in USA), it will be represented as a string that contains
1467
- * a sequence of ASCII digits, and possibly a tilde, which signals waiting for
1468
- * the tone. If there are multiple available international prefixes in a
1469
- * region, they will be represented as a regex string that always contains one
1470
- * or more characters that are not ASCII digits or a tilde.
1471
- */
1472
-
1473
- var SINGLE_IDD_PREFIX_REG_EXP = /^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/; // For regions that have multiple IDD prefixes
1474
- // a preferred IDD prefix is returned.
1475
-
1476
- function getIddPrefix(country, callingCode, metadata) {
1477
- var countryMetadata = new Metadata(metadata);
1478
- countryMetadata.selectNumberingPlan(country, callingCode);
1479
-
1480
- if (countryMetadata.defaultIDDPrefix()) {
1481
- return countryMetadata.defaultIDDPrefix();
1482
- }
1483
-
1484
- if (SINGLE_IDD_PREFIX_REG_EXP.test(countryMetadata.IDDPrefix())) {
1485
- return countryMetadata.IDDPrefix();
1486
- }
1487
- }
1488
-
1489
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
1490
-
1491
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1492
- var DEFAULT_OPTIONS = {
1493
- formatExtension: function formatExtension(formattedNumber, extension, metadata) {
1494
- return "".concat(formattedNumber).concat(metadata.ext()).concat(extension);
1495
- } // Formats a phone number
1496
- //
1497
- // Example use cases:
1498
- //
1499
- // ```js
1500
- // formatNumber('8005553535', 'RU', 'INTERNATIONAL')
1501
- // formatNumber('8005553535', 'RU', 'INTERNATIONAL', metadata)
1502
- // formatNumber({ phone: '8005553535', country: 'RU' }, 'INTERNATIONAL')
1503
- // formatNumber({ phone: '8005553535', country: 'RU' }, 'INTERNATIONAL', metadata)
1504
- // formatNumber('+78005553535', 'NATIONAL')
1505
- // formatNumber('+78005553535', 'NATIONAL', metadata)
1506
- // ```
1507
- //
1508
-
1509
- };
1510
- function formatNumber(input, format, options, metadata) {
1511
- // Apply default options.
1512
- if (options) {
1513
- options = _objectSpread({}, DEFAULT_OPTIONS, options);
1514
- } else {
1515
- options = DEFAULT_OPTIONS;
1516
- }
1517
-
1518
- metadata = new Metadata(metadata);
1519
-
1520
- if (input.country && input.country !== '001') {
1521
- // Validate `input.country`.
1522
- if (!metadata.hasCountry(input.country)) {
1523
- throw new Error("Unknown country: ".concat(input.country));
1524
- }
1525
-
1526
- metadata.country(input.country);
1527
- } else if (input.countryCallingCode) {
1528
- metadata.selectNumberingPlan(input.countryCallingCode);
1529
- } else return input.phone || '';
1530
-
1531
- var countryCallingCode = metadata.countryCallingCode();
1532
- var nationalNumber = options.v2 ? input.nationalNumber : input.phone; // This variable should have been declared inside `case`s
1533
- // but Babel has a bug and it says "duplicate variable declaration".
1534
-
1535
- var number;
1536
-
1537
- switch (format) {
1538
- case 'NATIONAL':
1539
- // Legacy argument support.
1540
- // (`{ country: ..., phone: '' }`)
1541
- if (!nationalNumber) {
1542
- return '';
1543
- }
1544
-
1545
- number = formatNationalNumber(nationalNumber, input.carrierCode, 'NATIONAL', metadata, options);
1546
- return addExtension(number, input.ext, metadata, options.formatExtension);
1547
-
1548
- case 'INTERNATIONAL':
1549
- // Legacy argument support.
1550
- // (`{ country: ..., phone: '' }`)
1551
- if (!nationalNumber) {
1552
- return "+".concat(countryCallingCode);
1553
- }
1554
-
1555
- number = formatNationalNumber(nationalNumber, null, 'INTERNATIONAL', metadata, options);
1556
- number = "+".concat(countryCallingCode, " ").concat(number);
1557
- return addExtension(number, input.ext, metadata, options.formatExtension);
1558
-
1559
- case 'E.164':
1560
- // `E.164` doesn't define "phone number extensions".
1561
- return "+".concat(countryCallingCode).concat(nationalNumber);
1562
-
1563
- case 'RFC3966':
1564
- return formatRFC3966({
1565
- number: "+".concat(countryCallingCode).concat(nationalNumber),
1566
- ext: input.ext
1567
- });
1568
- // For reference, here's Google's IDD formatter:
1569
- // https://github.com/google/libphonenumber/blob/32719cf74e68796788d1ca45abc85dcdc63ba5b9/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L1546
1570
- // Not saying that this IDD formatter replicates it 1:1, but it seems to work.
1571
- // Who would even need to format phone numbers in IDD format anyway?
1572
-
1573
- case 'IDD':
1574
- if (!options.fromCountry) {
1575
- return; // throw new Error('`fromCountry` option not passed for IDD-prefixed formatting.')
1576
- }
1577
-
1578
- var formattedNumber = formatIDD(nationalNumber, input.carrierCode, countryCallingCode, options.fromCountry, metadata);
1579
- return addExtension(formattedNumber, input.ext, metadata, options.formatExtension);
1580
-
1581
- default:
1582
- throw new Error("Unknown \"format\" argument passed to \"formatNumber()\": \"".concat(format, "\""));
1583
- }
1584
- }
1585
-
1586
- function formatNationalNumber(number, carrierCode, formatAs, metadata, options) {
1587
- var format = chooseFormatForNumber(metadata.formats(), number);
1588
-
1589
- if (!format) {
1590
- return number;
1591
- }
1592
-
1593
- return formatNationalNumberUsingFormat(number, format, {
1594
- useInternationalFormat: formatAs === 'INTERNATIONAL',
1595
- withNationalPrefix: format.nationalPrefixIsOptionalWhenFormattingInNationalFormat() && options && options.nationalPrefix === false ? false : true,
1596
- carrierCode: carrierCode,
1597
- metadata: metadata
1598
- });
1599
- }
1600
-
1601
- function chooseFormatForNumber(availableFormats, nationalNnumber) {
1602
- for (var _iterator = availableFormats, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
1603
- var _ref;
1604
-
1605
- if (_isArray) {
1606
- if (_i >= _iterator.length) break;
1607
- _ref = _iterator[_i++];
1608
- } else {
1609
- _i = _iterator.next();
1610
- if (_i.done) break;
1611
- _ref = _i.value;
1612
- }
1613
-
1614
- var format = _ref;
1615
-
1616
- // Validate leading digits
1617
- if (format.leadingDigitsPatterns().length > 0) {
1618
- // The last leading_digits_pattern is used here, as it is the most detailed
1619
- var lastLeadingDigitsPattern = format.leadingDigitsPatterns()[format.leadingDigitsPatterns().length - 1]; // If leading digits don't match then move on to the next phone number format
1620
-
1621
- if (nationalNnumber.search(lastLeadingDigitsPattern) !== 0) {
1622
- continue;
1623
- }
1624
- } // Check that the national number matches the phone number format regular expression
1625
-
1626
-
1627
- if (matchesEntirely(nationalNnumber, format.pattern())) {
1628
- return format;
1629
- }
1630
- }
1631
- }
1632
-
1633
- function addExtension(formattedNumber, ext, metadata, formatExtension) {
1634
- return ext ? formatExtension(formattedNumber, ext, metadata) : formattedNumber;
1635
- }
1636
-
1637
- function formatIDD(nationalNumber, carrierCode, countryCallingCode, fromCountry, metadata) {
1638
- var fromCountryCallingCode = getCountryCallingCode(fromCountry, metadata.metadata); // When calling within the same country calling code.
1639
-
1640
- if (fromCountryCallingCode === countryCallingCode) {
1641
- var formattedNumber = formatNationalNumber(nationalNumber, carrierCode, 'NATIONAL', metadata); // For NANPA regions, return the national format for these regions
1642
- // but prefix it with the country calling code.
1643
-
1644
- if (countryCallingCode === '1') {
1645
- return countryCallingCode + ' ' + formattedNumber;
1646
- } // If regions share a country calling code, the country calling code need
1647
- // not be dialled. This also applies when dialling within a region, so this
1648
- // if clause covers both these cases. Technically this is the case for
1649
- // dialling from La Reunion to other overseas departments of France (French
1650
- // Guiana, Martinique, Guadeloupe), but not vice versa - so we don't cover
1651
- // this edge case for now and for those cases return the version including
1652
- // country calling code. Details here:
1653
- // http://www.petitfute.com/voyage/225-info-pratiques-reunion
1654
- //
1655
-
1656
-
1657
- return formattedNumber;
1658
- }
1659
-
1660
- var iddPrefix = getIddPrefix(fromCountry, undefined, metadata.metadata);
1661
-
1662
- if (iddPrefix) {
1663
- return "".concat(iddPrefix, " ").concat(countryCallingCode, " ").concat(formatNationalNumber(nationalNumber, null, 'INTERNATIONAL', metadata));
1664
- }
1665
- }
1666
-
1667
- function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$1(target, key, source[key]); }); } return target; }
1668
-
1669
- function _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1670
-
1671
- function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1672
-
1673
- function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
1674
-
1675
- function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
1676
-
1677
- var PhoneNumber =
1678
- /*#__PURE__*/
1679
- function () {
1680
- function PhoneNumber(countryCallingCode, nationalNumber, metadata) {
1681
- _classCallCheck$1(this, PhoneNumber);
1682
-
1683
- if (!countryCallingCode) {
1684
- throw new TypeError('`country` or `countryCallingCode` not passed');
1685
- }
1686
-
1687
- if (!nationalNumber) {
1688
- throw new TypeError('`nationalNumber` not passed');
1689
- }
1690
-
1691
- if (!metadata) {
1692
- throw new TypeError('`metadata` not passed');
1693
- }
1694
-
1695
- var _metadata = new Metadata(metadata); // If country code is passed then derive `countryCallingCode` from it.
1696
- // Also store the country code as `.country`.
1697
-
1698
-
1699
- if (isCountryCode(countryCallingCode)) {
1700
- this.country = countryCallingCode;
1701
-
1702
- _metadata.country(countryCallingCode);
1703
-
1704
- countryCallingCode = _metadata.countryCallingCode();
1705
- }
1706
-
1707
- this.countryCallingCode = countryCallingCode;
1708
- this.nationalNumber = nationalNumber;
1709
- this.number = '+' + this.countryCallingCode + this.nationalNumber;
1710
- this.metadata = metadata;
1711
- }
1712
-
1713
- _createClass$1(PhoneNumber, [{
1714
- key: "isPossible",
1715
- value: function isPossible() {
1716
- return isPossiblePhoneNumber(this, {
1717
- v2: true
1718
- }, this.metadata);
1719
- }
1720
- }, {
1721
- key: "isValid",
1722
- value: function isValid() {
1723
- return isValidNumber(this, {
1724
- v2: true
1725
- }, this.metadata);
1726
- }
1727
- }, {
1728
- key: "isNonGeographic",
1729
- value: function isNonGeographic() {
1730
- var metadata = new Metadata(this.metadata);
1731
- return metadata.isNonGeographicCallingCode(this.countryCallingCode);
1732
- }
1733
- }, {
1734
- key: "isEqual",
1735
- value: function isEqual(phoneNumber) {
1736
- return this.number === phoneNumber.number && this.ext === phoneNumber.ext;
1737
- } // // Is just an alias for `this.isValid() && this.country === country`.
1738
- // // https://github.com/googlei18n/libphonenumber/blob/master/FAQ.md#when-should-i-use-isvalidnumberforregion
1739
- // isValidForRegion(country) {
1740
- // return isValidNumberForRegion(this, country, { v2: true }, this.metadata)
1741
- // }
1742
-
1743
- }, {
1744
- key: "getType",
1745
- value: function getType() {
1746
- return getNumberType(this, {
1747
- v2: true
1748
- }, this.metadata);
1749
- }
1750
- }, {
1751
- key: "format",
1752
- value: function format(_format, options) {
1753
- return formatNumber(this, _format, options ? _objectSpread$1({}, options, {
1754
- v2: true
1755
- }) : {
1756
- v2: true
1757
- }, this.metadata);
1758
- }
1759
- }, {
1760
- key: "formatNational",
1761
- value: function formatNational(options) {
1762
- return this.format('NATIONAL', options);
1763
- }
1764
- }, {
1765
- key: "formatInternational",
1766
- value: function formatInternational(options) {
1767
- return this.format('INTERNATIONAL', options);
1768
- }
1769
- }, {
1770
- key: "getURI",
1771
- value: function getURI(options) {
1772
- return this.format('RFC3966', options);
1773
- }
1774
- }]);
1775
-
1776
- return PhoneNumber;
1777
- }();
1778
-
1779
- var isCountryCode = function isCountryCode(value) {
1780
- return /^[A-Z]{2}$/.test(value);
1781
- };
1782
-
1783
- var CAPTURING_DIGIT_PATTERN = new RegExp('([' + VALID_DIGITS + '])');
1784
- function stripIddPrefix(number, country, callingCode, metadata) {
1785
- if (!country) {
1786
- return;
1787
- } // Check if the number is IDD-prefixed.
1788
-
1789
-
1790
- var countryMetadata = new Metadata(metadata);
1791
- countryMetadata.selectNumberingPlan(country, callingCode);
1792
- var IDDPrefixPattern = new RegExp(countryMetadata.IDDPrefix());
1793
-
1794
- if (number.search(IDDPrefixPattern) !== 0) {
1795
- return;
1796
- } // Strip IDD prefix.
1797
-
1798
-
1799
- number = number.slice(number.match(IDDPrefixPattern)[0].length); // If there're any digits after an IDD prefix,
1800
- // then those digits are a country calling code.
1801
- // Since no country code starts with a `0`,
1802
- // the code below validates that the next digit (if present) is not `0`.
1803
-
1804
- var matchedGroups = number.match(CAPTURING_DIGIT_PATTERN);
1805
-
1806
- if (matchedGroups && matchedGroups[1] != null && matchedGroups[1].length > 0) {
1807
- if (matchedGroups[1] === '0') {
1808
- return;
1809
- }
1810
- }
1811
-
1812
- return number;
1813
- }
1814
-
1815
- /**
1816
- * Strips any national prefix (such as 0, 1) present in a
1817
- * (possibly incomplete) number provided.
1818
- * "Carrier codes" are only used in Colombia and Brazil,
1819
- * and only when dialing within those countries from a mobile phone to a fixed line number.
1820
- * Sometimes it won't actually strip national prefix
1821
- * and will instead prepend some digits to the `number`:
1822
- * for example, when number `2345678` is passed with `VI` country selected,
1823
- * it will return `{ number: "3402345678" }`, because `340` area code is prepended.
1824
- * @param {string} number — National number digits.
1825
- * @param {object} metadata — Metadata with country selected.
1826
- * @return {object} `{ nationalNumber: string, nationalPrefix: string? carrierCode: string? }`.
1827
- */
1828
- function extractNationalNumberFromPossiblyIncompleteNumber(number, metadata) {
1829
- if (number && metadata.numberingPlan.nationalPrefixForParsing()) {
1830
- // See METADATA.md for the description of
1831
- // `national_prefix_for_parsing` and `national_prefix_transform_rule`.
1832
- // Attempt to parse the first digits as a national prefix.
1833
- var prefixPattern = new RegExp('^(?:' + metadata.numberingPlan.nationalPrefixForParsing() + ')');
1834
- var prefixMatch = prefixPattern.exec(number);
1835
-
1836
- if (prefixMatch) {
1837
- var nationalNumber;
1838
- var carrierCode; // https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule
1839
- // If a `national_prefix_for_parsing` has any "capturing groups"
1840
- // then it means that the national (significant) number is equal to
1841
- // those "capturing groups" transformed via `national_prefix_transform_rule`,
1842
- // and nothing could be said about the actual national prefix:
1843
- // what is it and was it even there.
1844
- // If a `national_prefix_for_parsing` doesn't have any "capturing groups",
1845
- // then everything it matches is a national prefix.
1846
- // To determine whether `national_prefix_for_parsing` matched any
1847
- // "capturing groups", the value of the result of calling `.exec()`
1848
- // is looked at, and if it has non-undefined values where there're
1849
- // "capturing groups" in the regular expression, then it means
1850
- // that "capturing groups" have been matched.
1851
- // It's not possible to tell whether there'll be any "capturing gropus"
1852
- // before the matching process, because a `national_prefix_for_parsing`
1853
- // could exhibit both behaviors.
1854
-
1855
- var capturedGroupsCount = prefixMatch.length - 1;
1856
- var hasCapturedGroups = capturedGroupsCount > 0 && prefixMatch[capturedGroupsCount];
1857
-
1858
- if (metadata.nationalPrefixTransformRule() && hasCapturedGroups) {
1859
- nationalNumber = number.replace(prefixPattern, metadata.nationalPrefixTransformRule()); // If there's more than one captured group,
1860
- // then carrier code is the second one.
1861
-
1862
- if (capturedGroupsCount > 1) {
1863
- carrierCode = prefixMatch[1];
1864
- }
1865
- } // If there're no "capturing groups",
1866
- // or if there're "capturing groups" but no
1867
- // `national_prefix_transform_rule`,
1868
- // then just strip the national prefix from the number,
1869
- // and possibly a carrier code.
1870
- // Seems like there could be more.
1871
- else {
1872
- // `prefixBeforeNationalNumber` is the whole substring matched by
1873
- // the `national_prefix_for_parsing` regular expression.
1874
- // There seem to be no guarantees that it's just a national prefix.
1875
- // For example, if there's a carrier code, it's gonna be a
1876
- // part of `prefixBeforeNationalNumber` too.
1877
- var prefixBeforeNationalNumber = prefixMatch[0];
1878
- nationalNumber = number.slice(prefixBeforeNationalNumber.length); // If there's at least one captured group,
1879
- // then carrier code is the first one.
1880
-
1881
- if (hasCapturedGroups) {
1882
- carrierCode = prefixMatch[1];
1883
- }
1884
- } // Tries to guess whether a national prefix was present in the input.
1885
- // This is not something copy-pasted from Google's library:
1886
- // they don't seem to have an equivalent for that.
1887
- // So this isn't an "officially approved" way of doing something like that.
1888
- // But since there seems no other existing method, this library uses it.
1889
-
1890
-
1891
- var nationalPrefix;
1892
-
1893
- if (hasCapturedGroups) {
1894
- var possiblePositionOfTheFirstCapturedGroup = number.indexOf(prefixMatch[1]);
1895
- var possibleNationalPrefix = number.slice(0, possiblePositionOfTheFirstCapturedGroup); // Example: an Argentinian (AR) phone number `0111523456789`.
1896
- // `prefixMatch[0]` is `01115`, and `$1` is `11`,
1897
- // and the rest of the phone number is `23456789`.
1898
- // The national number is transformed via `9$1` to `91123456789`.
1899
- // National prefix `0` is detected being present at the start.
1900
- // if (possibleNationalPrefix.indexOf(metadata.numberingPlan.nationalPrefix()) === 0) {
1901
-
1902
- if (possibleNationalPrefix === metadata.numberingPlan.nationalPrefix()) {
1903
- nationalPrefix = metadata.numberingPlan.nationalPrefix();
1904
- }
1905
- } else {
1906
- nationalPrefix = prefixMatch[0];
1907
- }
1908
-
1909
- return {
1910
- nationalNumber: nationalNumber,
1911
- nationalPrefix: nationalPrefix,
1912
- carrierCode: carrierCode
1913
- };
1914
- }
1915
- }
1916
-
1917
- return {
1918
- nationalNumber: number
1919
- };
1920
- }
1921
-
1922
- /**
1923
- * Strips national prefix and carrier code from a complete phone number.
1924
- * The difference from the non-"FromCompleteNumber" function is that
1925
- * it won't extract national prefix if the resultant number is too short
1926
- * to be a complete number for the selected phone numbering plan.
1927
- * @param {string} number — Complete phone number digits.
1928
- * @param {Metadata} metadata — Metadata with a phone numbering plan selected.
1929
- * @return {object} `{ nationalNumber: string, carrierCode: string? }`.
1930
- */
1931
-
1932
- function extractNationalNumber(number, metadata) {
1933
- // Parsing national prefixes and carrier codes
1934
- // is only required for local phone numbers
1935
- // but some people don't understand that
1936
- // and sometimes write international phone numbers
1937
- // with national prefixes (or maybe even carrier codes).
1938
- // http://ucken.blogspot.ru/2016/03/trunk-prefixes-in-skype4b.html
1939
- // Google's original library forgives such mistakes
1940
- // and so does this library, because it has been requested:
1941
- // https://github.com/catamphetamine/libphonenumber-js/issues/127
1942
- var _extractNationalNumbe = extractNationalNumberFromPossiblyIncompleteNumber(number, metadata),
1943
- nationalNumber = _extractNationalNumbe.nationalNumber,
1944
- carrierCode = _extractNationalNumbe.carrierCode;
1945
-
1946
- if (!shouldExtractNationalPrefix(number, nationalNumber, metadata)) {
1947
- // Don't strip the national prefix.
1948
- return {
1949
- nationalNumber: number
1950
- };
1951
- } // If a national prefix has been extracted, check to see
1952
- // if the resultant number isn't too short.
1953
- // Same code in Google's `libphonenumber`:
1954
- // https://github.com/google/libphonenumber/blob/e326fa1fc4283bb05eb35cb3c15c18f98a31af33/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L3291-L3302
1955
- // For some reason, they do this check right after the `national_number_pattern` check
1956
- // this library does in `shouldExtractNationalPrefix()` function.
1957
- // Why is there a second "resultant" number validity check?
1958
- // They don't provide an explanation.
1959
- // This library just copies the behavior.
1960
-
1961
-
1962
- if (number.length !== nationalNumber.length + (carrierCode ? carrierCode.length : 0)) {
1963
- // If not using legacy generated metadata (before version `1.0.18`)
1964
- // then it has "possible lengths", so use those to validate the number length.
1965
- if (metadata.possibleLengths()) {
1966
- // "We require that the NSN remaining after stripping the national prefix and
1967
- // carrier code be long enough to be a possible length for the region.
1968
- // Otherwise, we don't do the stripping, since the original number could be
1969
- // a valid short number."
1970
- // https://github.com/google/libphonenumber/blob/876268eb1ad6cdc1b7b5bef17fc5e43052702d57/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L3236-L3250
1971
- switch (checkNumberLength(nationalNumber, metadata)) {
1972
- case 'TOO_SHORT':
1973
- case 'INVALID_LENGTH':
1974
- // case 'IS_POSSIBLE_LOCAL_ONLY':
1975
- // Don't strip the national prefix.
1976
- return {
1977
- nationalNumber: number
1978
- };
1979
- }
1980
- }
1981
- }
1982
-
1983
- return {
1984
- nationalNumber: nationalNumber,
1985
- carrierCode: carrierCode
1986
- };
1987
- } // In some countries, the same digit could be a national prefix
1988
- // or a leading digit of a valid phone number.
1989
- // For example, in Russia, national prefix is `8`,
1990
- // and also `800 555 35 35` is a valid number
1991
- // in which `8` is not a national prefix, but the first digit
1992
- // of a national (significant) number.
1993
- // Same's with Belarus:
1994
- // `82004910060` is a valid national (significant) number,
1995
- // but `2004910060` is not.
1996
- // To support such cases (to prevent the code from always stripping
1997
- // national prefix), a condition is imposed: a national prefix
1998
- // is not extracted when the original number is "viable" and the
1999
- // resultant number is not, a "viable" national number being the one
2000
- // that matches `national_number_pattern`.
2001
-
2002
- function shouldExtractNationalPrefix(number, nationalSignificantNumber, metadata) {
2003
- // The equivalent in Google's code is:
2004
- // https://github.com/google/libphonenumber/blob/e326fa1fc4283bb05eb35cb3c15c18f98a31af33/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L2969-L3004
2005
- if (matchesEntirely(number, metadata.nationalNumberPattern()) && !matchesEntirely(nationalSignificantNumber, metadata.nationalNumberPattern())) {
2006
- return false;
2007
- } // Just "possible" number check would be more relaxed, so it's not used.
2008
- // if (isPossibleNumber(number, metadata) &&
2009
- // !isPossibleNumber(numberWithNationalPrefixExtracted, metadata)) {
2010
- // return false
2011
- // }
2012
-
2013
-
2014
- return true;
2015
- }
2016
-
2017
- /**
2018
- * Sometimes some people incorrectly input international phone numbers
2019
- * without the leading `+`. This function corrects such input.
2020
- * @param {string} number — Phone number digits.
2021
- * @param {string?} country
2022
- * @param {string?} callingCode
2023
- * @param {object} metadata
2024
- * @return {object} `{ countryCallingCode: string?, number: string }`.
2025
- */
2026
-
2027
- function extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number, country, callingCode, metadata) {
2028
- var countryCallingCode = country ? getCountryCallingCode(country, metadata) : callingCode;
2029
-
2030
- if (number.indexOf(countryCallingCode) === 0) {
2031
- metadata = new Metadata(metadata);
2032
- metadata.selectNumberingPlan(country, callingCode);
2033
- var possibleShorterNumber = number.slice(countryCallingCode.length);
2034
-
2035
- var _extractNationalNumbe = extractNationalNumber(possibleShorterNumber, metadata),
2036
- possibleShorterNationalNumber = _extractNationalNumbe.nationalNumber;
2037
-
2038
- var _extractNationalNumbe2 = extractNationalNumber(number, metadata),
2039
- nationalNumber = _extractNationalNumbe2.nationalNumber; // If the number was not valid before but is valid now,
2040
- // or if it was too long before, we consider the number
2041
- // with the country calling code stripped to be a better result
2042
- // and keep that instead.
2043
- // For example, in Germany (+49), `49` is a valid area code,
2044
- // so if a number starts with `49`, it could be both a valid
2045
- // national German number or an international number without
2046
- // a leading `+`.
2047
-
2048
-
2049
- if (!matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) && matchesEntirely(possibleShorterNationalNumber, metadata.nationalNumberPattern()) || checkNumberLength(nationalNumber, metadata) === 'TOO_LONG') {
2050
- return {
2051
- countryCallingCode: countryCallingCode,
2052
- number: possibleShorterNumber
2053
- };
2054
- }
2055
- }
2056
-
2057
- return {
2058
- number: number
2059
- };
2060
- }
2061
-
2062
- /**
2063
- * Converts a phone number digits (possibly with a `+`)
2064
- * into a calling code and the rest phone number digits.
2065
- * The "rest phone number digits" could include
2066
- * a national prefix, carrier code, and national
2067
- * (significant) number.
2068
- * @param {string} number — Phone number digits (possibly with a `+`).
2069
- * @param {string} [country] — Default country.
2070
- * @param {string} [callingCode] — Default calling code (some phone numbering plans are non-geographic).
2071
- * @param {object} metadata
2072
- * @return {object} `{ countryCallingCode: string?, number: string }`
2073
- * @example
2074
- * // Returns `{ countryCallingCode: "1", number: "2133734253" }`.
2075
- * extractCountryCallingCode('2133734253', 'US', null, metadata)
2076
- * extractCountryCallingCode('2133734253', null, '1', metadata)
2077
- * extractCountryCallingCode('+12133734253', null, null, metadata)
2078
- * extractCountryCallingCode('+12133734253', 'RU', null, metadata)
2079
- */
2080
-
2081
- function extractCountryCallingCode(number, country, callingCode, metadata) {
2082
- if (!number) {
2083
- return {};
2084
- } // If this is not an international phone number,
2085
- // then either extract an "IDD" prefix, or extract a
2086
- // country calling code from a number by autocorrecting it
2087
- // by prepending a leading `+` in cases when it starts
2088
- // with the country calling code.
2089
- // https://wikitravel.org/en/International_dialling_prefix
2090
- // https://github.com/catamphetamine/libphonenumber-js/issues/376
2091
-
2092
-
2093
- if (number[0] !== '+') {
2094
- // Convert an "out-of-country" dialing phone number
2095
- // to a proper international phone number.
2096
- var numberWithoutIDD = stripIddPrefix(number, country, callingCode, metadata); // If an IDD prefix was stripped then
2097
- // convert the number to international one
2098
- // for subsequent parsing.
2099
-
2100
- if (numberWithoutIDD && numberWithoutIDD !== number) {
2101
- number = '+' + numberWithoutIDD;
2102
- } else {
2103
- // Check to see if the number starts with the country calling code
2104
- // for the default country. If so, we remove the country calling code,
2105
- // and do some checks on the validity of the number before and after.
2106
- // https://github.com/catamphetamine/libphonenumber-js/issues/376
2107
- if (country || callingCode) {
2108
- var _extractCountryCallin = extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number, country, callingCode, metadata),
2109
- countryCallingCode = _extractCountryCallin.countryCallingCode,
2110
- shorterNumber = _extractCountryCallin.number;
2111
-
2112
- if (countryCallingCode) {
2113
- return {
2114
- countryCallingCode: countryCallingCode,
2115
- number: shorterNumber
2116
- };
2117
- }
2118
- }
2119
-
2120
- return {
2121
- number: number
2122
- };
2123
- }
2124
- } // Fast abortion: country codes do not begin with a '0'
2125
-
2126
-
2127
- if (number[1] === '0') {
2128
- return {};
2129
- }
2130
-
2131
- metadata = new Metadata(metadata); // The thing with country phone codes
2132
- // is that they are orthogonal to each other
2133
- // i.e. there's no such country phone code A
2134
- // for which country phone code B exists
2135
- // where B starts with A.
2136
- // Therefore, while scanning digits,
2137
- // if a valid country code is found,
2138
- // that means that it is the country code.
2139
- //
2140
-
2141
- var i = 2;
2142
-
2143
- while (i - 1 <= MAX_LENGTH_COUNTRY_CODE && i <= number.length) {
2144
- var _countryCallingCode = number.slice(1, i);
2145
-
2146
- if (metadata.hasCallingCode(_countryCallingCode)) {
2147
- metadata.selectNumberingPlan(_countryCallingCode);
2148
- return {
2149
- countryCallingCode: _countryCallingCode,
2150
- number: number.slice(i)
2151
- };
2152
- }
2153
-
2154
- i++;
2155
- }
2156
-
2157
- return {};
2158
- }
2159
-
2160
- function getCountryByCallingCode(callingCode, nationalPhoneNumber, metadata) {
2161
-
2162
-
2163
- var possibleCountries = metadata.getCountryCodesForCallingCode(callingCode);
2164
-
2165
- if (!possibleCountries) {
2166
- return;
2167
- } // If there's just one country corresponding to the country code,
2168
- // then just return it, without further phone number digits validation.
2169
-
2170
-
2171
- if (possibleCountries.length === 1) {
2172
- return possibleCountries[0];
2173
- }
2174
-
2175
- return selectCountryFromList(possibleCountries, nationalPhoneNumber, metadata.metadata);
2176
- }
2177
-
2178
- function selectCountryFromList(possibleCountries, nationalPhoneNumber, metadata) {
2179
- // Re-create `metadata` because it will be selecting a `country`.
2180
- metadata = new Metadata(metadata);
2181
-
2182
- for (var _iterator = possibleCountries, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
2183
- var _ref;
2184
-
2185
- if (_isArray) {
2186
- if (_i >= _iterator.length) break;
2187
- _ref = _iterator[_i++];
2188
- } else {
2189
- _i = _iterator.next();
2190
- if (_i.done) break;
2191
- _ref = _i.value;
2192
- }
2193
-
2194
- var country = _ref;
2195
- metadata.country(country); // Leading digits check would be the simplest one
2196
-
2197
- if (metadata.leadingDigits()) {
2198
- if (nationalPhoneNumber && nationalPhoneNumber.search(metadata.leadingDigits()) === 0) {
2199
- return country;
2200
- }
2201
- } // Else perform full validation with all of those
2202
- // fixed-line/mobile/etc regular expressions.
2203
- else if (getNumberType({
2204
- phone: nationalPhoneNumber,
2205
- country: country
2206
- }, undefined, metadata.metadata)) {
2207
- return country;
2208
- }
2209
- }
2210
- }
2211
-
2212
- function _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2213
-
2214
- function _defineProperties$2(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
2215
-
2216
- function _createClass$2(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$2(Constructor.prototype, protoProps); if (staticProps) _defineProperties$2(Constructor, staticProps); return Constructor; }
2217
-
2218
- function _defineProperty$2(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2219
-
2220
- var AsYouTypeState =
2221
- /*#__PURE__*/
2222
- function () {
2223
- function AsYouTypeState(_ref) {
2224
- var _this = this;
2225
-
2226
- var onCountryChange = _ref.onCountryChange,
2227
- onCallingCodeChange = _ref.onCallingCodeChange;
2228
-
2229
- _classCallCheck$2(this, AsYouTypeState);
2230
-
2231
- _defineProperty$2(this, "update", function (properties) {
2232
- for (var _i = 0, _Object$keys = Object.keys(properties); _i < _Object$keys.length; _i++) {
2233
- var key = _Object$keys[_i];
2234
- _this[key] = properties[key];
2235
- }
2236
- });
2237
-
2238
- this.onCountryChange = onCountryChange;
2239
- this.onCallingCodeChange = onCallingCodeChange;
2240
- }
2241
-
2242
- _createClass$2(AsYouTypeState, [{
2243
- key: "reset",
2244
- value: function reset(defaultCountry, defaultCallingCode) {
2245
- this.international = false;
2246
- this.IDDPrefix = undefined;
2247
- this.missingPlus = undefined;
2248
- this.callingCode = undefined;
2249
- this.digits = '';
2250
- this.resetNationalSignificantNumber();
2251
- this.initCountryAndCallingCode(defaultCountry, defaultCallingCode);
2252
- }
2253
- }, {
2254
- key: "resetNationalSignificantNumber",
2255
- value: function resetNationalSignificantNumber() {
2256
- this.nationalSignificantNumber = this.getNationalDigits();
2257
- this.nationalSignificantNumberMatchesInput = true;
2258
- this.nationalPrefix = undefined;
2259
- this.carrierCode = undefined;
2260
- this.complexPrefixBeforeNationalSignificantNumber = undefined;
2261
- }
2262
- }, {
2263
- key: "initCountryAndCallingCode",
2264
- value: function initCountryAndCallingCode(country, callingCode) {
2265
- this.setCountry(country);
2266
- this.setCallingCode(callingCode);
2267
- }
2268
- }, {
2269
- key: "setCountry",
2270
- value: function setCountry(country) {
2271
- this.country = country;
2272
- this.onCountryChange(country);
2273
- }
2274
- }, {
2275
- key: "setCallingCode",
2276
- value: function setCallingCode(callingCode) {
2277
- this.callingCode = callingCode;
2278
- return this.onCallingCodeChange(this.country, callingCode);
2279
- }
2280
- }, {
2281
- key: "startInternationalNumber",
2282
- value: function startInternationalNumber() {
2283
- // Prepend the `+` to parsed input.
2284
- this.international = true; // If a default country was set then reset it
2285
- // because an explicitly international phone
2286
- // number is being entered.
2287
-
2288
- this.initCountryAndCallingCode();
2289
- }
2290
- }, {
2291
- key: "appendDigits",
2292
- value: function appendDigits(nextDigits) {
2293
- this.digits += nextDigits;
2294
- }
2295
- }, {
2296
- key: "appendNationalSignificantNumberDigits",
2297
- value: function appendNationalSignificantNumberDigits(nextDigits) {
2298
- this.nationalSignificantNumber += nextDigits;
2299
- }
2300
- /**
2301
- * Returns the part of `this.digits` that corresponds to the national number.
2302
- * Basically, all digits that have been input by the user, except for the
2303
- * international prefix and the country calling code part
2304
- * (if the number is an international one).
2305
- * @return {string}
2306
- */
2307
-
2308
- }, {
2309
- key: "getNationalDigits",
2310
- value: function getNationalDigits() {
2311
- if (this.international) {
2312
- return this.digits.slice((this.IDDPrefix ? this.IDDPrefix.length : 0) + (this.callingCode ? this.callingCode.length : 0));
2313
- }
2314
-
2315
- return this.digits;
2316
- }
2317
- }, {
2318
- key: "getDigitsWithoutInternationalPrefix",
2319
- value: function getDigitsWithoutInternationalPrefix() {
2320
- if (this.international) {
2321
- if (this.IDDPrefix) {
2322
- return this.digits.slice(this.IDDPrefix.length);
2323
- }
2324
- }
2325
-
2326
- return this.digits;
2327
- }
2328
- }]);
2329
-
2330
- return AsYouTypeState;
2331
- }();
2332
-
2333
- // Should be the same as `DIGIT_PLACEHOLDER` in `libphonenumber-metadata-generator`.
2334
- var DIGIT_PLACEHOLDER = 'x'; // '\u2008' (punctuation space)
2335
-
2336
- var DIGIT_PLACEHOLDER_MATCHER = new RegExp(DIGIT_PLACEHOLDER); // Counts all occurences of a symbol in a string.
2337
- // http://stackoverflow.com/questions/202605/repeat-string-javascript
2338
-
2339
- function repeat(string, times) {
2340
- if (times < 1) {
2341
- return '';
2342
- }
2343
-
2344
- var result = '';
2345
-
2346
- while (times > 1) {
2347
- if (times & 1) {
2348
- result += string;
2349
- }
2350
-
2351
- times >>= 1;
2352
- string += string;
2353
- }
2354
-
2355
- return result + string;
2356
- }
2357
- function cutAndStripNonPairedParens(string, cutBeforeIndex) {
2358
- if (string[cutBeforeIndex] === ')') {
2359
- cutBeforeIndex++;
2360
- }
2361
-
2362
- return stripNonPairedParens(string.slice(0, cutBeforeIndex));
2363
- }
2364
- function stripNonPairedParens(string) {
2365
- var dangling_braces = [];
2366
- var i = 0;
2367
-
2368
- while (i < string.length) {
2369
- if (string[i] === '(') {
2370
- dangling_braces.push(i);
2371
- } else if (string[i] === ')') {
2372
- dangling_braces.pop();
2373
- }
2374
-
2375
- i++;
2376
- }
2377
-
2378
- var start = 0;
2379
- var cleared_string = '';
2380
- dangling_braces.push(string.length);
2381
-
2382
- for (var _i2 = 0, _dangling_braces = dangling_braces; _i2 < _dangling_braces.length; _i2++) {
2383
- var index = _dangling_braces[_i2];
2384
- cleared_string += string.slice(start, index);
2385
- start = index + 1;
2386
- }
2387
-
2388
- return cleared_string;
2389
- }
2390
- function populateTemplateWithDigits(template, position, digits) {
2391
- // Using `.split('')` to iterate through a string here
2392
- // to avoid requiring `Symbol.iterator` polyfill.
2393
- // `.split('')` is generally not safe for Unicode,
2394
- // but in this particular case for `digits` it is safe.
2395
- // for (const digit of digits)
2396
- for (var _iterator2 = digits.split(''), _isArray2 = Array.isArray(_iterator2), _i3 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
2397
- var _ref2;
2398
-
2399
- if (_isArray2) {
2400
- if (_i3 >= _iterator2.length) break;
2401
- _ref2 = _iterator2[_i3++];
2402
- } else {
2403
- _i3 = _iterator2.next();
2404
- if (_i3.done) break;
2405
- _ref2 = _i3.value;
2406
- }
2407
-
2408
- var digit = _ref2;
2409
-
2410
- // If there is room for more digits in current `template`,
2411
- // then set the next digit in the `template`,
2412
- // and return the formatted digits so far.
2413
- // If more digits are entered than the current format could handle.
2414
- if (template.slice(position + 1).search(DIGIT_PLACEHOLDER_MATCHER) < 0) {
2415
- return;
2416
- }
2417
-
2418
- position = template.search(DIGIT_PLACEHOLDER_MATCHER);
2419
- template = template.replace(DIGIT_PLACEHOLDER_MATCHER, digit);
2420
- }
2421
-
2422
- return [template, position];
2423
- }
2424
-
2425
- function formatCompleteNumber(state, format, _ref) {
2426
- var metadata = _ref.metadata,
2427
- shouldTryNationalPrefixFormattingRule = _ref.shouldTryNationalPrefixFormattingRule,
2428
- getSeparatorAfterNationalPrefix = _ref.getSeparatorAfterNationalPrefix;
2429
- var matcher = new RegExp("^(?:".concat(format.pattern(), ")$"));
2430
-
2431
- if (matcher.test(state.nationalSignificantNumber)) {
2432
- return formatNationalNumberWithAndWithoutNationalPrefixFormattingRule(state, format, {
2433
- metadata: metadata,
2434
- shouldTryNationalPrefixFormattingRule: shouldTryNationalPrefixFormattingRule,
2435
- getSeparatorAfterNationalPrefix: getSeparatorAfterNationalPrefix
2436
- });
2437
- }
2438
- }
2439
- function canFormatCompleteNumber(nationalSignificantNumber, metadata) {
2440
- return checkNumberLength(nationalSignificantNumber, metadata) === 'IS_POSSIBLE';
2441
- }
2442
-
2443
- function formatNationalNumberWithAndWithoutNationalPrefixFormattingRule(state, format, _ref2) {
2444
- var metadata = _ref2.metadata,
2445
- shouldTryNationalPrefixFormattingRule = _ref2.shouldTryNationalPrefixFormattingRule,
2446
- getSeparatorAfterNationalPrefix = _ref2.getSeparatorAfterNationalPrefix;
2447
- // If the resulting formatted number is a valid formatted number, then return it.
2448
- //
2449
- // Google's AsYouType formatter is different in a way that it doesn't try
2450
- // to format using the "national prefix formatting rule", and instead it
2451
- // simply prepends a national prefix followed by a " " character.
2452
- // This code does that too, but as a fallback.
2453
- // The reason is that "national prefix formatting rule" may use parentheses,
2454
- // which wouldn't be included has it used the simpler Google's way.
2455
- //
2456
-
2457
- if (shouldTryNationalPrefixFormattingRule(format)) {
2458
- var formattedNumber = formatNationalNumber$1(state, format, {
2459
- useNationalPrefixFormattingRule: true,
2460
- getSeparatorAfterNationalPrefix: getSeparatorAfterNationalPrefix,
2461
- metadata: metadata
2462
- });
2463
-
2464
- if (formattedNumber) {
2465
- return formattedNumber;
2466
- }
2467
- } // Format the number without using `national_prefix_formatting_rule`.
2468
-
2469
-
2470
- return formatNationalNumber$1(state, format, {
2471
- useNationalPrefixFormattingRule: false,
2472
- getSeparatorAfterNationalPrefix: getSeparatorAfterNationalPrefix,
2473
- metadata: metadata
2474
- });
2475
- }
2476
-
2477
- function formatNationalNumber$1(state, format, _ref3) {
2478
- var metadata = _ref3.metadata,
2479
- useNationalPrefixFormattingRule = _ref3.useNationalPrefixFormattingRule,
2480
- getSeparatorAfterNationalPrefix = _ref3.getSeparatorAfterNationalPrefix;
2481
- var formattedNationalNumber = formatNationalNumberUsingFormat(state.nationalSignificantNumber, format, {
2482
- carrierCode: state.carrierCode,
2483
- useInternationalFormat: state.international,
2484
- withNationalPrefix: useNationalPrefixFormattingRule,
2485
- metadata: metadata
2486
- });
2487
-
2488
- if (!useNationalPrefixFormattingRule) {
2489
- if (state.nationalPrefix) {
2490
- // If a national prefix was extracted, then just prepend it,
2491
- // followed by a " " character.
2492
- formattedNationalNumber = state.nationalPrefix + getSeparatorAfterNationalPrefix(format) + formattedNationalNumber;
2493
- } else if (state.complexPrefixBeforeNationalSignificantNumber) {
2494
- formattedNationalNumber = state.complexPrefixBeforeNationalSignificantNumber + ' ' + formattedNationalNumber;
2495
- }
2496
- }
2497
-
2498
- if (isValidFormattedNationalNumber(formattedNationalNumber, state)) {
2499
- return formattedNationalNumber;
2500
- }
2501
- } // Check that the formatted phone number contains exactly
2502
- // the same digits that have been input by the user.
2503
- // For example, when "0111523456789" is input for `AR` country,
2504
- // the extracted `this.nationalSignificantNumber` is "91123456789",
2505
- // which means that the national part of `this.digits` isn't simply equal to
2506
- // `this.nationalPrefix` + `this.nationalSignificantNumber`.
2507
- //
2508
- // Also, a `format` can add extra digits to the `this.nationalSignificantNumber`
2509
- // being formatted via `metadata[country].national_prefix_transform_rule`.
2510
- // For example, for `VI` country, it prepends `340` to the national number,
2511
- // and if this check hasn't been implemented, then there would be a bug
2512
- // when `340` "area coude" is "duplicated" during input for `VI` country:
2513
- // https://github.com/catamphetamine/libphonenumber-js/issues/318
2514
- //
2515
- // So, all these "gotchas" are filtered out.
2516
- //
2517
- // In the original Google's code, the comments say:
2518
- // "Check that we didn't remove nor add any extra digits when we matched
2519
- // this formatting pattern. This usually happens after we entered the last
2520
- // digit during AYTF. Eg: In case of MX, we swallow mobile token (1) when
2521
- // formatted but AYTF should retain all the number entered and not change
2522
- // in order to match a format (of same leading digits and length) display
2523
- // in that way."
2524
- // "If it's the same (i.e entered number and format is same), then it's
2525
- // safe to return this in formatted number as nothing is lost / added."
2526
- // Otherwise, don't use this format.
2527
- // https://github.com/google/libphonenumber/commit/3e7c1f04f5e7200f87fb131e6f85c6e99d60f510#diff-9149457fa9f5d608a11bb975c6ef4bc5
2528
- // https://github.com/google/libphonenumber/commit/3ac88c7106e7dcb553bcc794b15f19185928a1c6#diff-2dcb77e833422ee304da348b905cde0b
2529
- //
2530
-
2531
-
2532
- function isValidFormattedNationalNumber(formattedNationalNumber, state) {
2533
- return parseDigits(formattedNationalNumber) === state.getNationalDigits();
2534
- }
2535
-
2536
- function _classCallCheck$3(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2537
-
2538
- function _defineProperties$3(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
2539
-
2540
- function _createClass$3(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$3(Constructor.prototype, protoProps); if (staticProps) _defineProperties$3(Constructor, staticProps); return Constructor; }
2541
-
2542
- function _defineProperty$3(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2543
- // Could be any digit, I guess.
2544
-
2545
- var DUMMY_DIGIT = '9'; // I don't know why is it exactly `15`
2546
-
2547
- var LONGEST_NATIONAL_PHONE_NUMBER_LENGTH = 15; // Create a phone number consisting only of the digit 9 that matches the
2548
- // `number_pattern` by applying the pattern to the "longest phone number" string.
2549
-
2550
- var LONGEST_DUMMY_PHONE_NUMBER = repeat(DUMMY_DIGIT, LONGEST_NATIONAL_PHONE_NUMBER_LENGTH); // A set of characters that, if found in a national prefix formatting rules, are an indicator to
2551
- // us that we should separate the national prefix from the number when formatting.
2552
-
2553
- var NATIONAL_PREFIX_SEPARATORS_PATTERN = /[- ]/; // Deprecated: Google has removed some formatting pattern related code from their repo.
2554
- // An example of a character class is "[1-4]".
2555
-
2556
- var CREATE_CHARACTER_CLASS_PATTERN = function () {
2557
- return /\[([^\[\]])*\]/g;
2558
- }; // Any digit in a regular expression that actually denotes a digit. For
2559
- // example, in the regular expression "80[0-2]\d{6,10}", the first 2 digits
2560
- // (8 and 0) are standalone digits, but the rest are not.
2561
- // Two look-aheads are needed because the number following \\d could be a
2562
- // two-digit number, since the phone number can be as long as 15 digits.
2563
-
2564
-
2565
- var CREATE_STANDALONE_DIGIT_PATTERN = function () {
2566
- return /\d(?=[^,}][^,}])/g;
2567
- }; // A regular expression that is used to determine if a `format` is
2568
- // suitable to be used in the "as you type formatter".
2569
- // A `format` is suitable when the resulting formatted number has
2570
- // the same digits as the user has entered.
2571
- //
2572
- // In the simplest case, that would mean that the format
2573
- // doesn't add any additional digits when formatting a number.
2574
- // Google says that it also shouldn't add "star" (`*`) characters,
2575
- // like it does in some Israeli formats.
2576
- // Such basic format would only contain "valid punctuation"
2577
- // and "captured group" identifiers ($1, $2, etc).
2578
- //
2579
- // An example of a format that adds additional digits:
2580
- //
2581
- // Country: `AR` (Argentina).
2582
- // Format:
2583
- // {
2584
- // "pattern": "(\\d)(\\d{2})(\\d{4})(\\d{4})",
2585
- // "leading_digits_patterns": ["91"],
2586
- // "national_prefix_formatting_rule": "0$1",
2587
- // "format": "$2 15-$3-$4",
2588
- // "international_format": "$1 $2 $3-$4"
2589
- // }
2590
- //
2591
- // In the format above, the `format` adds `15` to the digits when formatting a number.
2592
- // A sidenote: this format actually is suitable because `national_prefix_for_parsing`
2593
- // has previously removed `15` from a national number, so re-adding `15` in `format`
2594
- // doesn't actually result in any extra digits added to user's input.
2595
- // But verifying that would be a complex procedure, so the code chooses a simpler path:
2596
- // it simply filters out all `format`s that contain anything but "captured group" ids.
2597
- //
2598
- // This regular expression is called `ELIGIBLE_FORMAT_PATTERN` in Google's
2599
- // `libphonenumber` code.
2600
- //
2601
-
2602
-
2603
- var NON_ALTERING_FORMAT_REG_EXP = new RegExp('^' + '[' + VALID_PUNCTUATION + ']*' + '(\\$\\d[' + VALID_PUNCTUATION + ']*)+' + '$'); // This is the minimum length of the leading digits of a phone number
2604
- // to guarantee the first "leading digits pattern" for a phone number format
2605
- // to be preemptive.
2606
-
2607
- var MIN_LEADING_DIGITS_LENGTH = 3;
2608
-
2609
- var AsYouTypeFormatter =
2610
- /*#__PURE__*/
2611
- function () {
2612
- function AsYouTypeFormatter(_ref) {
2613
- var _this = this;
2614
-
2615
- var metadata = _ref.metadata;
2616
-
2617
- _classCallCheck$3(this, AsYouTypeFormatter);
2618
-
2619
- _defineProperty$3(this, "getSeparatorAfterNationalPrefix", function (format) {
2620
- // `US` metadata doesn't have a `national_prefix_formatting_rule`,
2621
- // so the `if` condition below doesn't apply to `US`,
2622
- // but in reality there shoudl be a separator
2623
- // between a national prefix and a national (significant) number.
2624
- // So `US` national prefix separator is a "special" "hardcoded" case.
2625
- if (_this.isNANP) {
2626
- return ' ';
2627
- } // If a `format` has a `national_prefix_formatting_rule`
2628
- // and that rule has a separator after a national prefix,
2629
- // then it means that there should be a separator
2630
- // between a national prefix and a national (significant) number.
2631
-
2632
-
2633
- if (format && format.nationalPrefixFormattingRule() && NATIONAL_PREFIX_SEPARATORS_PATTERN.test(format.nationalPrefixFormattingRule())) {
2634
- return ' ';
2635
- } // At this point, there seems to be no clear evidence that
2636
- // there should be a separator between a national prefix
2637
- // and a national (significant) number. So don't insert one.
2638
-
2639
-
2640
- return '';
2641
- });
2642
-
2643
- _defineProperty$3(this, "shouldTryNationalPrefixFormattingRule", function (format, _ref2) {
2644
- var international = _ref2.international,
2645
- nationalPrefix = _ref2.nationalPrefix;
2646
-
2647
- if (format.nationalPrefixFormattingRule()) {
2648
- // In some countries, `national_prefix_formatting_rule` is `($1)`,
2649
- // so it applies even if the user hasn't input a national prefix.
2650
- // `format.usesNationalPrefix()` detects such cases.
2651
- var usesNationalPrefix = format.usesNationalPrefix();
2652
-
2653
- if (usesNationalPrefix && nationalPrefix || !usesNationalPrefix && !international) {
2654
- return true;
2655
- }
2656
- }
2657
- });
2658
-
2659
- this.metadata = metadata;
2660
- this.resetFormat();
2661
- }
2662
-
2663
- _createClass$3(AsYouTypeFormatter, [{
2664
- key: "resetFormat",
2665
- value: function resetFormat() {
2666
- this.chosenFormat = undefined;
2667
- this.template = undefined;
2668
- this.nationalNumberTemplate = undefined;
2669
- this.populatedNationalNumberTemplate = undefined;
2670
- this.populatedNationalNumberTemplatePosition = -1;
2671
- }
2672
- }, {
2673
- key: "reset",
2674
- value: function reset(numberingPlan, state) {
2675
- this.resetFormat();
2676
-
2677
- if (numberingPlan) {
2678
- this.isNANP = numberingPlan.callingCode() === '1';
2679
- this.matchingFormats = numberingPlan.formats();
2680
-
2681
- if (state.nationalSignificantNumber) {
2682
- this.narrowDownMatchingFormats(state);
2683
- }
2684
- } else {
2685
- this.isNANP = undefined;
2686
- this.matchingFormats = [];
2687
- }
2688
- }
2689
- }, {
2690
- key: "format",
2691
- value: function format(nextDigits, state) {
2692
- var _this2 = this;
2693
-
2694
- // See if the phone number digits can be formatted as a complete phone number.
2695
- // If not, use the results from `formatNationalNumberWithNextDigits()`,
2696
- // which formats based on the chosen formatting pattern.
2697
- //
2698
- // Attempting to format complete phone number first is how it's done
2699
- // in Google's `libphonenumber`, so this library just follows it.
2700
- // Google's `libphonenumber` code doesn't explain in detail why does it
2701
- // attempt to format digits as a complete phone number
2702
- // instead of just going with a previoulsy (or newly) chosen `format`:
2703
- //
2704
- // "Checks to see if there is an exact pattern match for these digits.
2705
- // If so, we should use this instead of any other formatting template
2706
- // whose leadingDigitsPattern also matches the input."
2707
- //
2708
- if (canFormatCompleteNumber(state.nationalSignificantNumber, this.metadata)) {
2709
- for (var _iterator = this.matchingFormats, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
2710
- var _ref3;
2711
-
2712
- if (_isArray) {
2713
- if (_i >= _iterator.length) break;
2714
- _ref3 = _iterator[_i++];
2715
- } else {
2716
- _i = _iterator.next();
2717
- if (_i.done) break;
2718
- _ref3 = _i.value;
2719
- }
2720
-
2721
- var format = _ref3;
2722
- var formattedCompleteNumber = formatCompleteNumber(state, format, {
2723
- metadata: this.metadata,
2724
- shouldTryNationalPrefixFormattingRule: function shouldTryNationalPrefixFormattingRule(format) {
2725
- return _this2.shouldTryNationalPrefixFormattingRule(format, {
2726
- international: state.international,
2727
- nationalPrefix: state.nationalPrefix
2728
- });
2729
- },
2730
- getSeparatorAfterNationalPrefix: this.getSeparatorAfterNationalPrefix
2731
- });
2732
-
2733
- if (formattedCompleteNumber) {
2734
- this.resetFormat();
2735
- this.chosenFormat = format;
2736
- this.setNationalNumberTemplate(formattedCompleteNumber.replace(/\d/g, DIGIT_PLACEHOLDER), state);
2737
- this.populatedNationalNumberTemplate = formattedCompleteNumber; // With a new formatting template, the matched position
2738
- // using the old template needs to be reset.
2739
-
2740
- this.populatedNationalNumberTemplatePosition = this.template.lastIndexOf(DIGIT_PLACEHOLDER);
2741
- return formattedCompleteNumber;
2742
- }
2743
- }
2744
- } // Format the digits as a partial (incomplete) phone number
2745
- // using the previously chosen formatting pattern (or a newly chosen one).
2746
-
2747
-
2748
- return this.formatNationalNumberWithNextDigits(nextDigits, state);
2749
- } // Formats the next phone number digits.
2750
-
2751
- }, {
2752
- key: "formatNationalNumberWithNextDigits",
2753
- value: function formatNationalNumberWithNextDigits(nextDigits, state) {
2754
- var previouslyChosenFormat = this.chosenFormat; // Choose a format from the list of matching ones.
2755
-
2756
- var newlyChosenFormat = this.chooseFormat(state);
2757
-
2758
- if (newlyChosenFormat) {
2759
- if (newlyChosenFormat === previouslyChosenFormat) {
2760
- // If it can format the next (current) digits
2761
- // using the previously chosen phone number format
2762
- // then return the updated formatted number.
2763
- return this.formatNextNationalNumberDigits(nextDigits);
2764
- } else {
2765
- // If a more appropriate phone number format
2766
- // has been chosen for these "leading digits",
2767
- // then re-format the national phone number part
2768
- // using the newly selected format.
2769
- return this.formatNextNationalNumberDigits(state.getNationalDigits());
2770
- }
2771
- }
2772
- }
2773
- }, {
2774
- key: "narrowDownMatchingFormats",
2775
- value: function narrowDownMatchingFormats(_ref4) {
2776
- var _this3 = this;
2777
-
2778
- var nationalSignificantNumber = _ref4.nationalSignificantNumber,
2779
- nationalPrefix = _ref4.nationalPrefix,
2780
- international = _ref4.international;
2781
- var leadingDigits = nationalSignificantNumber; // "leading digits" pattern list starts with a
2782
- // "leading digits" pattern fitting a maximum of 3 leading digits.
2783
- // So, after a user inputs 3 digits of a national (significant) phone number
2784
- // this national (significant) number can already be formatted.
2785
- // The next "leading digits" pattern is for 4 leading digits max,
2786
- // and the "leading digits" pattern after it is for 5 leading digits max, etc.
2787
- // This implementation is different from Google's
2788
- // in that it searches for a fitting format
2789
- // even if the user has entered less than
2790
- // `MIN_LEADING_DIGITS_LENGTH` digits of a national number.
2791
- // Because some leading digit patterns already match for a single first digit.
2792
-
2793
- var leadingDigitsPatternIndex = leadingDigits.length - MIN_LEADING_DIGITS_LENGTH;
2794
-
2795
- if (leadingDigitsPatternIndex < 0) {
2796
- leadingDigitsPatternIndex = 0;
2797
- }
2798
-
2799
- this.matchingFormats = this.matchingFormats.filter(function (format) {
2800
- return _this3.formatSuits(format, international, nationalPrefix) && _this3.formatMatches(format, leadingDigits, leadingDigitsPatternIndex);
2801
- }); // If there was a phone number format chosen
2802
- // and it no longer holds given the new leading digits then reset it.
2803
- // The test for this `if` condition is marked as:
2804
- // "Reset a chosen format when it no longer holds given the new leading digits".
2805
- // To construct a valid test case for this one can find a country
2806
- // in `PhoneNumberMetadata.xml` yielding one format for 3 `<leadingDigits>`
2807
- // and yielding another format for 4 `<leadingDigits>` (Australia in this case).
2808
-
2809
- if (this.chosenFormat && this.matchingFormats.indexOf(this.chosenFormat) === -1) {
2810
- this.resetFormat();
2811
- }
2812
- }
2813
- }, {
2814
- key: "formatSuits",
2815
- value: function formatSuits(format, international, nationalPrefix) {
2816
- // When a prefix before a national (significant) number is
2817
- // simply a national prefix, then it's parsed as `this.nationalPrefix`.
2818
- // In more complex cases, a prefix before national (significant) number
2819
- // could include a national prefix as well as some "capturing groups",
2820
- // and in that case there's no info whether a national prefix has been parsed.
2821
- // If national prefix is not used when formatting a phone number
2822
- // using this format, but a national prefix has been entered by the user,
2823
- // and was extracted, then discard such phone number format.
2824
- // In Google's "AsYouType" formatter code, the equivalent would be this part:
2825
- // https://github.com/google/libphonenumber/blob/0a45cfd96e71cad8edb0e162a70fcc8bd9728933/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java#L175-L184
2826
- if (nationalPrefix && !format.usesNationalPrefix() && // !format.domesticCarrierCodeFormattingRule() &&
2827
- !format.nationalPrefixIsOptionalWhenFormattingInNationalFormat()) {
2828
- return false;
2829
- } // If national prefix is mandatory for this phone number format
2830
- // and there're no guarantees that a national prefix is present in user input
2831
- // then discard this phone number format as not suitable.
2832
- // In Google's "AsYouType" formatter code, the equivalent would be this part:
2833
- // https://github.com/google/libphonenumber/blob/0a45cfd96e71cad8edb0e162a70fcc8bd9728933/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java#L185-L193
2834
-
2835
-
2836
- if (!international && !nationalPrefix && format.nationalPrefixIsMandatoryWhenFormattingInNationalFormat()) {
2837
- return false;
2838
- }
2839
-
2840
- return true;
2841
- }
2842
- }, {
2843
- key: "formatMatches",
2844
- value: function formatMatches(format, leadingDigits, leadingDigitsPatternIndex) {
2845
- var leadingDigitsPatternsCount = format.leadingDigitsPatterns().length; // If this format is not restricted to a certain
2846
- // leading digits pattern then it fits.
2847
-
2848
- if (leadingDigitsPatternsCount === 0) {
2849
- return true;
2850
- } // Start excluding any non-matching formats only when the
2851
- // national number entered so far is at least 3 digits long,
2852
- // otherwise format matching would give false negatives.
2853
- // For example, when the digits entered so far are `2`
2854
- // and the leading digits pattern is `21` –
2855
- // it's quite obvious in this case that the format could be the one
2856
- // but due to the absence of further digits it would give false negative.
2857
-
2858
-
2859
- if (leadingDigits.length < MIN_LEADING_DIGITS_LENGTH) {
2860
- return true;
2861
- } // If at least `MIN_LEADING_DIGITS_LENGTH` digits of a national number are available
2862
- // then format matching starts narrowing down the list of possible formats
2863
- // (only previously matched formats are considered for next digits).
2864
-
2865
-
2866
- leadingDigitsPatternIndex = Math.min(leadingDigitsPatternIndex, leadingDigitsPatternsCount - 1);
2867
- var leadingDigitsPattern = format.leadingDigitsPatterns()[leadingDigitsPatternIndex]; // Brackets are required for `^` to be applied to
2868
- // all or-ed (`|`) parts, not just the first one.
2869
-
2870
- return new RegExp("^(".concat(leadingDigitsPattern, ")")).test(leadingDigits);
2871
- }
2872
- }, {
2873
- key: "getFormatFormat",
2874
- value: function getFormatFormat(format, international) {
2875
- return international ? format.internationalFormat() : format.format();
2876
- }
2877
- }, {
2878
- key: "chooseFormat",
2879
- value: function chooseFormat(state) {
2880
- var _this4 = this;
2881
-
2882
- var _loop2 = function _loop2() {
2883
- if (_isArray2) {
2884
- if (_i2 >= _iterator2.length) return "break";
2885
- _ref5 = _iterator2[_i2++];
2886
- } else {
2887
- _i2 = _iterator2.next();
2888
- if (_i2.done) return "break";
2889
- _ref5 = _i2.value;
2890
- }
2891
-
2892
- var format = _ref5;
2893
-
2894
- // If this format is currently being used
2895
- // and is still suitable, then stick to it.
2896
- if (_this4.chosenFormat === format) {
2897
- return "break";
2898
- } // Sometimes, a formatting rule inserts additional digits in a phone number,
2899
- // and "as you type" formatter can't do that: it should only use the digits
2900
- // that the user has input.
2901
- //
2902
- // For example, in Argentina, there's a format for mobile phone numbers:
2903
- //
2904
- // {
2905
- // "pattern": "(\\d)(\\d{2})(\\d{4})(\\d{4})",
2906
- // "leading_digits_patterns": ["91"],
2907
- // "national_prefix_formatting_rule": "0$1",
2908
- // "format": "$2 15-$3-$4",
2909
- // "international_format": "$1 $2 $3-$4"
2910
- // }
2911
- //
2912
- // In that format, `international_format` is used instead of `format`
2913
- // because `format` inserts `15` in the formatted number,
2914
- // and `AsYouType` formatter should only use the digits
2915
- // the user has actually input, without adding any extra digits.
2916
- // In this case, it wouldn't make a difference, because the `15`
2917
- // is first stripped when applying `national_prefix_for_parsing`
2918
- // and then re-added when using `format`, so in reality it doesn't
2919
- // add any new digits to the number, but to detect that, the code
2920
- // would have to be more complex: it would have to try formatting
2921
- // the digits using the format and then see if any digits have
2922
- // actually been added or removed, and then, every time a new digit
2923
- // is input, it should re-check whether the chosen format doesn't
2924
- // alter the digits.
2925
- //
2926
- // Google's code doesn't go that far, and so does this library:
2927
- // it simply requires that a `format` doesn't add any additonal
2928
- // digits to user's input.
2929
- //
2930
- // Also, people in general should move from inputting phone numbers
2931
- // in national format (possibly with national prefixes)
2932
- // and use international phone number format instead:
2933
- // it's a logical thing in the modern age of mobile phones,
2934
- // globalization and the internet.
2935
- //
2936
-
2937
- /* istanbul ignore if */
2938
-
2939
-
2940
- if (!NON_ALTERING_FORMAT_REG_EXP.test(_this4.getFormatFormat(format, state.international))) {
2941
- return "continue";
2942
- }
2943
-
2944
- if (!_this4.createTemplateForFormat(format, state)) {
2945
- // Remove the format if it can't generate a template.
2946
- _this4.matchingFormats = _this4.matchingFormats.filter(function (_) {
2947
- return _ !== format;
2948
- });
2949
- return "continue";
2950
- }
2951
-
2952
- _this4.chosenFormat = format;
2953
- return "break";
2954
- };
2955
-
2956
- // When there are multiple available formats, the formatter uses the first
2957
- // format where a formatting template could be created.
2958
- _loop: for (var _iterator2 = this.matchingFormats.slice(), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
2959
- var _ref5;
2960
-
2961
- var _ret = _loop2();
2962
-
2963
- switch (_ret) {
2964
- case "break":
2965
- break _loop;
2966
-
2967
- case "continue":
2968
- continue;
2969
- }
2970
- }
2971
-
2972
- if (!this.chosenFormat) {
2973
- // No format matches the national (significant) phone number.
2974
- this.resetFormat();
2975
- }
2976
-
2977
- return this.chosenFormat;
2978
- }
2979
- }, {
2980
- key: "createTemplateForFormat",
2981
- value: function createTemplateForFormat(format, state) {
2982
- // The formatter doesn't format numbers when numberPattern contains '|', e.g.
2983
- // (20|3)\d{4}. In those cases we quickly return.
2984
- // (Though there's no such format in current metadata)
2985
-
2986
- /* istanbul ignore if */
2987
- if ( format.pattern().indexOf('|') >= 0) {
2988
- return;
2989
- } // Get formatting template for this phone number format
2990
-
2991
-
2992
- var template = this.getTemplateForFormat(format, state); // If the national number entered is too long
2993
- // for any phone number format, then abort.
2994
-
2995
- if (template) {
2996
- this.setNationalNumberTemplate(template, state);
2997
- return true;
2998
- }
2999
- }
3000
- }, {
3001
- key: "getInternationalPrefixBeforeCountryCallingCode",
3002
- value: function getInternationalPrefixBeforeCountryCallingCode(_ref6, options) {
3003
- var IDDPrefix = _ref6.IDDPrefix,
3004
- missingPlus = _ref6.missingPlus;
3005
-
3006
- if (IDDPrefix) {
3007
- return options && options.spacing === false ? IDDPrefix : IDDPrefix + ' ';
3008
- }
3009
-
3010
- if (missingPlus) {
3011
- return '';
3012
- }
3013
-
3014
- return '+';
3015
- }
3016
- }, {
3017
- key: "getTemplate",
3018
- value: function getTemplate(state) {
3019
- if (!this.template) {
3020
- return;
3021
- } // `this.template` holds the template for a "complete" phone number.
3022
- // The currently entered phone number is most likely not "complete",
3023
- // so trim all non-populated digits.
3024
-
3025
-
3026
- var index = -1;
3027
- var i = 0;
3028
- var internationalPrefix = state.international ? this.getInternationalPrefixBeforeCountryCallingCode(state, {
3029
- spacing: false
3030
- }) : '';
3031
-
3032
- while (i < internationalPrefix.length + state.getDigitsWithoutInternationalPrefix().length) {
3033
- index = this.template.indexOf(DIGIT_PLACEHOLDER, index + 1);
3034
- i++;
3035
- }
3036
-
3037
- return cutAndStripNonPairedParens(this.template, index + 1);
3038
- }
3039
- }, {
3040
- key: "setNationalNumberTemplate",
3041
- value: function setNationalNumberTemplate(template, state) {
3042
- this.nationalNumberTemplate = template;
3043
- this.populatedNationalNumberTemplate = template; // With a new formatting template, the matched position
3044
- // using the old template needs to be reset.
3045
-
3046
- this.populatedNationalNumberTemplatePosition = -1; // For convenience, the public `.template` property
3047
- // contains the whole international number
3048
- // if the phone number being input is international:
3049
- // 'x' for the '+' sign, 'x'es for the country phone code,
3050
- // a spacebar and then the template for the formatted national number.
3051
-
3052
- if (state.international) {
3053
- this.template = this.getInternationalPrefixBeforeCountryCallingCode(state).replace(/[\d\+]/g, DIGIT_PLACEHOLDER) + repeat(DIGIT_PLACEHOLDER, state.callingCode.length) + ' ' + template;
3054
- } else {
3055
- this.template = template;
3056
- }
3057
- }
3058
- /**
3059
- * Generates formatting template for a national phone number,
3060
- * optionally containing a national prefix, for a format.
3061
- * @param {Format} format
3062
- * @param {string} nationalPrefix
3063
- * @return {string}
3064
- */
3065
-
3066
- }, {
3067
- key: "getTemplateForFormat",
3068
- value: function getTemplateForFormat(format, _ref7) {
3069
- var nationalSignificantNumber = _ref7.nationalSignificantNumber,
3070
- international = _ref7.international,
3071
- nationalPrefix = _ref7.nationalPrefix,
3072
- complexPrefixBeforeNationalSignificantNumber = _ref7.complexPrefixBeforeNationalSignificantNumber;
3073
- var pattern = format.pattern();
3074
- /* istanbul ignore else */
3075
-
3076
- {
3077
- pattern = pattern // Replace anything in the form of [..] with \d
3078
- .replace(CREATE_CHARACTER_CLASS_PATTERN(), '\\d') // Replace any standalone digit (not the one in `{}`) with \d
3079
- .replace(CREATE_STANDALONE_DIGIT_PATTERN(), '\\d');
3080
- } // Generate a dummy national number (consisting of `9`s)
3081
- // that fits this format's `pattern`.
3082
- //
3083
- // This match will always succeed,
3084
- // because the "longest dummy phone number"
3085
- // has enough length to accomodate any possible
3086
- // national phone number format pattern.
3087
- //
3088
-
3089
-
3090
- var digits = LONGEST_DUMMY_PHONE_NUMBER.match(pattern)[0]; // If the national number entered is too long
3091
- // for any phone number format, then abort.
3092
-
3093
- if (nationalSignificantNumber.length > digits.length) {
3094
- return;
3095
- } // Get a formatting template which can be used to efficiently format
3096
- // a partial number where digits are added one by one.
3097
- // Below `strictPattern` is used for the
3098
- // regular expression (with `^` and `$`).
3099
- // This wasn't originally in Google's `libphonenumber`
3100
- // and I guess they don't really need it
3101
- // because they're not using "templates" to format phone numbers
3102
- // but I added `strictPattern` after encountering
3103
- // South Korean phone number formatting bug.
3104
- //
3105
- // Non-strict regular expression bug demonstration:
3106
- //
3107
- // this.nationalSignificantNumber : `111111111` (9 digits)
3108
- //
3109
- // pattern : (\d{2})(\d{3,4})(\d{4})
3110
- // format : `$1 $2 $3`
3111
- // digits : `9999999999` (10 digits)
3112
- //
3113
- // '9999999999'.replace(new RegExp(/(\d{2})(\d{3,4})(\d{4})/g), '$1 $2 $3') = "99 9999 9999"
3114
- //
3115
- // template : xx xxxx xxxx
3116
- //
3117
- // But the correct template in this case is `xx xxx xxxx`.
3118
- // The template was generated incorrectly because of the
3119
- // `{3,4}` variability in the `pattern`.
3120
- //
3121
- // The fix is, if `this.nationalSignificantNumber` has already sufficient length
3122
- // to satisfy the `pattern` completely then `this.nationalSignificantNumber`
3123
- // is used instead of `digits`.
3124
-
3125
-
3126
- var strictPattern = new RegExp('^' + pattern + '$');
3127
- var nationalNumberDummyDigits = nationalSignificantNumber.replace(/\d/g, DUMMY_DIGIT); // If `this.nationalSignificantNumber` has already sufficient length
3128
- // to satisfy the `pattern` completely then use it
3129
- // instead of `digits`.
3130
-
3131
- if (strictPattern.test(nationalNumberDummyDigits)) {
3132
- digits = nationalNumberDummyDigits;
3133
- }
3134
-
3135
- var numberFormat = this.getFormatFormat(format, international);
3136
- var nationalPrefixIncludedInTemplate; // If a user did input a national prefix (and that's guaranteed),
3137
- // and if a `format` does have a national prefix formatting rule,
3138
- // then see if that national prefix formatting rule
3139
- // prepends exactly the same national prefix the user has input.
3140
- // If that's the case, then use the `format` with the national prefix formatting rule.
3141
- // Otherwise, use the `format` without the national prefix formatting rule,
3142
- // and prepend a national prefix manually to it.
3143
-
3144
- if (this.shouldTryNationalPrefixFormattingRule(format, {
3145
- international: international,
3146
- nationalPrefix: nationalPrefix
3147
- })) {
3148
- var numberFormatWithNationalPrefix = numberFormat.replace(FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule()); // If `national_prefix_formatting_rule` of a `format` simply prepends
3149
- // national prefix at the start of a national (significant) number,
3150
- // then such formatting can be used with `AsYouType` formatter.
3151
- // There seems to be no `else` case: everywhere in metadata,
3152
- // national prefix formatting rule is national prefix + $1,
3153
- // or `($1)`, in which case such format isn't even considered
3154
- // when the user has input a national prefix.
3155
-
3156
- /* istanbul ignore else */
3157
-
3158
- if (parseDigits(format.nationalPrefixFormattingRule()) === (nationalPrefix || '') + parseDigits('$1')) {
3159
- numberFormat = numberFormatWithNationalPrefix;
3160
- nationalPrefixIncludedInTemplate = true; // Replace all digits of the national prefix in the formatting template
3161
- // with `DIGIT_PLACEHOLDER`s.
3162
-
3163
- if (nationalPrefix) {
3164
- var i = nationalPrefix.length;
3165
-
3166
- while (i > 0) {
3167
- numberFormat = numberFormat.replace(/\d/, DIGIT_PLACEHOLDER);
3168
- i--;
3169
- }
3170
- }
3171
- }
3172
- } // Generate formatting template for this phone number format.
3173
-
3174
-
3175
- var template = digits // Format the dummy phone number according to the format.
3176
- .replace(new RegExp(pattern), numberFormat) // Replace each dummy digit with a DIGIT_PLACEHOLDER.
3177
- .replace(new RegExp(DUMMY_DIGIT, 'g'), DIGIT_PLACEHOLDER); // If a prefix of a national (significant) number is not as simple
3178
- // as just a basic national prefix, then just prepend such prefix
3179
- // before the national (significant) number, optionally spacing
3180
- // the two with a whitespace.
3181
-
3182
- if (!nationalPrefixIncludedInTemplate) {
3183
- if (complexPrefixBeforeNationalSignificantNumber) {
3184
- // Prepend the prefix to the template manually.
3185
- template = repeat(DIGIT_PLACEHOLDER, complexPrefixBeforeNationalSignificantNumber.length) + ' ' + template;
3186
- } else if (nationalPrefix) {
3187
- // Prepend national prefix to the template manually.
3188
- template = repeat(DIGIT_PLACEHOLDER, nationalPrefix.length) + this.getSeparatorAfterNationalPrefix(format) + template;
3189
- }
3190
- }
3191
-
3192
- if (international) {
3193
- template = applyInternationalSeparatorStyle(template);
3194
- }
3195
-
3196
- return template;
3197
- }
3198
- }, {
3199
- key: "formatNextNationalNumberDigits",
3200
- value: function formatNextNationalNumberDigits(digits) {
3201
- var result = populateTemplateWithDigits(this.populatedNationalNumberTemplate, this.populatedNationalNumberTemplatePosition, digits);
3202
-
3203
- if (!result) {
3204
- // Reset the format.
3205
- this.resetFormat();
3206
- return;
3207
- }
3208
-
3209
- this.populatedNationalNumberTemplate = result[0];
3210
- this.populatedNationalNumberTemplatePosition = result[1]; // Return the formatted phone number so far.
3211
-
3212
- return cutAndStripNonPairedParens(this.populatedNationalNumberTemplate, this.populatedNationalNumberTemplatePosition + 1); // The old way which was good for `input-format` but is not so good
3213
- // for `react-phone-number-input`'s default input (`InputBasic`).
3214
- // return closeNonPairedParens(this.populatedNationalNumberTemplate, this.populatedNationalNumberTemplatePosition + 1)
3215
- // .replace(new RegExp(DIGIT_PLACEHOLDER, 'g'), ' ')
3216
- }
3217
- }]);
3218
-
3219
- return AsYouTypeFormatter;
3220
- }();
3221
-
3222
- function _slicedToArray$1(arr, i) { return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _nonIterableRest$1(); }
3223
-
3224
- function _nonIterableRest$1() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
3225
-
3226
- function _iterableToArrayLimit$1(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
3227
-
3228
- function _arrayWithHoles$1(arr) { if (Array.isArray(arr)) return arr; }
3229
-
3230
- function _classCallCheck$4(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3231
-
3232
- function _defineProperties$4(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
3233
-
3234
- function _createClass$4(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$4(Constructor.prototype, protoProps); if (staticProps) _defineProperties$4(Constructor, staticProps); return Constructor; }
3235
- var VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART = '[' + VALID_PUNCTUATION + VALID_DIGITS + ']+';
3236
- var VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN = new RegExp('^' + VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART + '$', 'i');
3237
- var VALID_FORMATTED_PHONE_NUMBER_PART = '(?:' + '[' + PLUS_CHARS + ']' + '[' + VALID_PUNCTUATION + VALID_DIGITS + ']*' + '|' + '[' + VALID_PUNCTUATION + VALID_DIGITS + ']+' + ')';
3238
- var AFTER_PHONE_NUMBER_DIGITS_END_PATTERN = new RegExp('[^' + VALID_PUNCTUATION + VALID_DIGITS + ']+' + '.*' + '$'); // Tests whether `national_prefix_for_parsing` could match
3239
- // different national prefixes.
3240
- // Matches anything that's not a digit or a square bracket.
3241
-
3242
- var COMPLEX_NATIONAL_PREFIX = /[^\d\[\]]/;
3243
-
3244
- var AsYouTypeParser =
3245
- /*#__PURE__*/
3246
- function () {
3247
- function AsYouTypeParser(_ref) {
3248
- var defaultCountry = _ref.defaultCountry,
3249
- defaultCallingCode = _ref.defaultCallingCode,
3250
- metadata = _ref.metadata,
3251
- onNationalSignificantNumberChange = _ref.onNationalSignificantNumberChange;
3252
-
3253
- _classCallCheck$4(this, AsYouTypeParser);
3254
-
3255
- this.defaultCountry = defaultCountry;
3256
- this.defaultCallingCode = defaultCallingCode;
3257
- this.metadata = metadata;
3258
- this.onNationalSignificantNumberChange = onNationalSignificantNumberChange;
3259
- }
3260
-
3261
- _createClass$4(AsYouTypeParser, [{
3262
- key: "input",
3263
- value: function input(text, state) {
3264
- var _extractFormattedDigi = extractFormattedDigitsAndPlus(text),
3265
- _extractFormattedDigi2 = _slicedToArray$1(_extractFormattedDigi, 2),
3266
- formattedDigits = _extractFormattedDigi2[0],
3267
- hasPlus = _extractFormattedDigi2[1];
3268
-
3269
- var digits = parseDigits(formattedDigits); // Checks for a special case: just a leading `+` has been entered.
3270
-
3271
- var justLeadingPlus;
3272
-
3273
- if (hasPlus) {
3274
- if (!state.digits) {
3275
- state.startInternationalNumber();
3276
-
3277
- if (!digits) {
3278
- justLeadingPlus = true;
3279
- }
3280
- }
3281
- }
3282
-
3283
- if (digits) {
3284
- this.inputDigits(digits, state);
3285
- }
3286
-
3287
- return {
3288
- digits: digits,
3289
- justLeadingPlus: justLeadingPlus
3290
- };
3291
- }
3292
- /**
3293
- * Inputs "next" phone number digits.
3294
- * @param {string} digits
3295
- * @return {string} [formattedNumber] Formatted national phone number (if it can be formatted at this stage). Returning `undefined` means "don't format the national phone number at this stage".
3296
- */
3297
-
3298
- }, {
3299
- key: "inputDigits",
3300
- value: function inputDigits(nextDigits, state) {
3301
- var digits = state.digits;
3302
- var hasReceivedThreeLeadingDigits = digits.length < 3 && digits.length + nextDigits.length >= 3; // Append phone number digits.
3303
-
3304
- state.appendDigits(nextDigits); // Attempt to extract IDD prefix:
3305
- // Some users input their phone number in international format,
3306
- // but in an "out-of-country" dialing format instead of using the leading `+`.
3307
- // https://github.com/catamphetamine/libphonenumber-js/issues/185
3308
- // Detect such numbers as soon as there're at least 3 digits.
3309
- // Google's library attempts to extract IDD prefix at 3 digits,
3310
- // so this library just copies that behavior.
3311
- // I guess that's because the most commot IDD prefixes are
3312
- // `00` (Europe) and `011` (US).
3313
- // There exist really long IDD prefixes too:
3314
- // for example, in Australia the default IDD prefix is `0011`,
3315
- // and it could even be as long as `14880011`.
3316
- // An IDD prefix is extracted here, and then every time when
3317
- // there's a new digit and the number couldn't be formatted.
3318
-
3319
- if (hasReceivedThreeLeadingDigits) {
3320
- this.extractIddPrefix(state);
3321
- }
3322
-
3323
- if (this.isWaitingForCountryCallingCode(state)) {
3324
- if (!this.extractCountryCallingCode(state)) {
3325
- return;
3326
- }
3327
- } else {
3328
- state.appendNationalSignificantNumberDigits(nextDigits);
3329
- } // If a phone number is being input in international format,
3330
- // then it's not valid for it to have a national prefix.
3331
- // Still, some people incorrectly input such numbers with a national prefix.
3332
- // In such cases, only attempt to strip a national prefix if the number becomes too long.
3333
- // (but that is done later, not here)
3334
-
3335
-
3336
- if (!state.international) {
3337
- if (!this.hasExtractedNationalSignificantNumber) {
3338
- this.extractNationalSignificantNumber(state.getNationalDigits(), state.update);
3339
- }
3340
- }
3341
- }
3342
- }, {
3343
- key: "isWaitingForCountryCallingCode",
3344
- value: function isWaitingForCountryCallingCode(_ref2) {
3345
- var international = _ref2.international,
3346
- callingCode = _ref2.callingCode;
3347
- return international && !callingCode;
3348
- } // Extracts a country calling code from a number
3349
- // being entered in internatonal format.
3350
-
3351
- }, {
3352
- key: "extractCountryCallingCode",
3353
- value: function extractCountryCallingCode$1(state) {
3354
- var _extractCountryCallin = extractCountryCallingCode('+' + state.getDigitsWithoutInternationalPrefix(), this.defaultCountry, this.defaultCallingCode, this.metadata.metadata),
3355
- countryCallingCode = _extractCountryCallin.countryCallingCode,
3356
- number = _extractCountryCallin.number;
3357
-
3358
- if (countryCallingCode) {
3359
- state.setCallingCode(countryCallingCode);
3360
- state.update({
3361
- nationalSignificantNumber: number
3362
- });
3363
- return true;
3364
- }
3365
- }
3366
- }, {
3367
- key: "reset",
3368
- value: function reset(numberingPlan) {
3369
- if (numberingPlan) {
3370
- this.hasSelectedNumberingPlan = true;
3371
-
3372
- var nationalPrefixForParsing = numberingPlan._nationalPrefixForParsing();
3373
-
3374
- this.couldPossiblyExtractAnotherNationalSignificantNumber = nationalPrefixForParsing && COMPLEX_NATIONAL_PREFIX.test(nationalPrefixForParsing);
3375
- } else {
3376
- this.hasSelectedNumberingPlan = undefined;
3377
- this.couldPossiblyExtractAnotherNationalSignificantNumber = undefined;
3378
- }
3379
- }
3380
- /**
3381
- * Extracts a national (significant) number from user input.
3382
- * Google's library is different in that it only applies `national_prefix_for_parsing`
3383
- * and doesn't apply `national_prefix_transform_rule` after that.
3384
- * https://github.com/google/libphonenumber/blob/a3d70b0487875475e6ad659af404943211d26456/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java#L539
3385
- * @return {boolean} [extracted]
3386
- */
3387
-
3388
- }, {
3389
- key: "extractNationalSignificantNumber",
3390
- value: function extractNationalSignificantNumber(nationalDigits, setState) {
3391
- if (!this.hasSelectedNumberingPlan) {
3392
- return;
3393
- }
3394
-
3395
- var _extractNationalNumbe = extractNationalNumberFromPossiblyIncompleteNumber(nationalDigits, this.metadata),
3396
- nationalPrefix = _extractNationalNumbe.nationalPrefix,
3397
- nationalNumber = _extractNationalNumbe.nationalNumber,
3398
- carrierCode = _extractNationalNumbe.carrierCode;
3399
-
3400
- if (nationalNumber === nationalDigits) {
3401
- return;
3402
- }
3403
-
3404
- this.onExtractedNationalNumber(nationalPrefix, carrierCode, nationalNumber, nationalDigits, setState);
3405
- return true;
3406
- }
3407
- /**
3408
- * In Google's code this function is called "attempt to extract longer NDD".
3409
- * "Some national prefixes are a substring of others", they say.
3410
- * @return {boolean} [result] — Returns `true` if extracting a national prefix produced different results from what they were.
3411
- */
3412
-
3413
- }, {
3414
- key: "extractAnotherNationalSignificantNumber",
3415
- value: function extractAnotherNationalSignificantNumber(nationalDigits, prevNationalSignificantNumber, setState) {
3416
- if (!this.hasExtractedNationalSignificantNumber) {
3417
- return this.extractNationalSignificantNumber(nationalDigits, setState);
3418
- }
3419
-
3420
- if (!this.couldPossiblyExtractAnotherNationalSignificantNumber) {
3421
- return;
3422
- }
3423
-
3424
- var _extractNationalNumbe2 = extractNationalNumberFromPossiblyIncompleteNumber(nationalDigits, this.metadata),
3425
- nationalPrefix = _extractNationalNumbe2.nationalPrefix,
3426
- nationalNumber = _extractNationalNumbe2.nationalNumber,
3427
- carrierCode = _extractNationalNumbe2.carrierCode; // If a national prefix has been extracted previously,
3428
- // then it's always extracted as additional digits are added.
3429
- // That's assuming `extractNationalNumberFromPossiblyIncompleteNumber()`
3430
- // doesn't do anything different from what it currently does.
3431
- // So, just in case, here's this check, though it doesn't occur.
3432
-
3433
- /* istanbul ignore if */
3434
-
3435
-
3436
- if (nationalNumber === prevNationalSignificantNumber) {
3437
- return;
3438
- }
3439
-
3440
- this.onExtractedNationalNumber(nationalPrefix, carrierCode, nationalNumber, nationalDigits, setState);
3441
- return true;
3442
- }
3443
- }, {
3444
- key: "onExtractedNationalNumber",
3445
- value: function onExtractedNationalNumber(nationalPrefix, carrierCode, nationalSignificantNumber, nationalDigits, setState) {
3446
- var complexPrefixBeforeNationalSignificantNumber;
3447
- var nationalSignificantNumberMatchesInput; // This check also works with empty `this.nationalSignificantNumber`.
3448
-
3449
- var nationalSignificantNumberIndex = nationalDigits.lastIndexOf(nationalSignificantNumber); // If the extracted national (significant) number is the
3450
- // last substring of the `digits`, then it means that it hasn't been altered:
3451
- // no digits have been removed from the national (significant) number
3452
- // while applying `national_prefix_transform_rule`.
3453
- // https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule
3454
-
3455
- if (nationalSignificantNumberIndex >= 0 && nationalSignificantNumberIndex === nationalDigits.length - nationalSignificantNumber.length) {
3456
- nationalSignificantNumberMatchesInput = true; // If a prefix of a national (significant) number is not as simple
3457
- // as just a basic national prefix, then such prefix is stored in
3458
- // `this.complexPrefixBeforeNationalSignificantNumber` property and will be
3459
- // prepended "as is" to the national (significant) number to produce
3460
- // a formatted result.
3461
-
3462
- var prefixBeforeNationalNumber = nationalDigits.slice(0, nationalSignificantNumberIndex); // `prefixBeforeNationalNumber` is always non-empty,
3463
- // because `onExtractedNationalNumber()` isn't called
3464
- // when a national (significant) number hasn't been actually "extracted":
3465
- // when a national (significant) number is equal to the national part of `digits`,
3466
- // then `onExtractedNationalNumber()` doesn't get called.
3467
-
3468
- if (prefixBeforeNationalNumber !== nationalPrefix) {
3469
- complexPrefixBeforeNationalSignificantNumber = prefixBeforeNationalNumber;
3470
- }
3471
- }
3472
-
3473
- setState({
3474
- nationalPrefix: nationalPrefix,
3475
- carrierCode: carrierCode,
3476
- nationalSignificantNumber: nationalSignificantNumber,
3477
- nationalSignificantNumberMatchesInput: nationalSignificantNumberMatchesInput,
3478
- complexPrefixBeforeNationalSignificantNumber: complexPrefixBeforeNationalSignificantNumber
3479
- }); // `onExtractedNationalNumber()` is only called when
3480
- // the national (significant) number actually did change.
3481
-
3482
- this.hasExtractedNationalSignificantNumber = true;
3483
- this.onNationalSignificantNumberChange();
3484
- }
3485
- }, {
3486
- key: "reExtractNationalSignificantNumber",
3487
- value: function reExtractNationalSignificantNumber(state) {
3488
- // Attempt to extract a national prefix.
3489
- //
3490
- // Some people incorrectly input national prefix
3491
- // in an international phone number.
3492
- // For example, some people write British phone numbers as `+44(0)...`.
3493
- //
3494
- // Also, in some rare cases, it is valid for a national prefix
3495
- // to be a part of an international phone number.
3496
- // For example, mobile phone numbers in Mexico are supposed to be
3497
- // dialled internationally using a `1` national prefix,
3498
- // so the national prefix will be part of an international number.
3499
- //
3500
- // Quote from:
3501
- // https://www.mexperience.com/dialing-cell-phones-in-mexico/
3502
- //
3503
- // "Dialing a Mexican cell phone from abroad
3504
- // When you are calling a cell phone number in Mexico from outside Mexico,
3505
- // it’s necessary to dial an additional “1” after Mexico’s country code
3506
- // (which is “52”) and before the area code.
3507
- // You also ignore the 045, and simply dial the area code and the
3508
- // cell phone’s number.
3509
- //
3510
- // If you don’t add the “1”, you’ll receive a recorded announcement
3511
- // asking you to redial using it.
3512
- //
3513
- // For example, if you are calling from the USA to a cell phone
3514
- // in Mexico City, you would dial +52 – 1 – 55 – 1234 5678.
3515
- // (Note that this is different to calling a land line in Mexico City
3516
- // from abroad, where the number dialed would be +52 – 55 – 1234 5678)".
3517
- //
3518
- // Google's demo output:
3519
- // https://libphonenumber.appspot.com/phonenumberparser?number=%2b5215512345678&country=MX
3520
- //
3521
- if (this.extractAnotherNationalSignificantNumber(state.getNationalDigits(), state.nationalSignificantNumber, state.update)) {
3522
- return true;
3523
- } // If no format matches the phone number, then it could be
3524
- // "a really long IDD" (quote from a comment in Google's library).
3525
- // An IDD prefix is first extracted when the user has entered at least 3 digits,
3526
- // and then here — every time when there's a new digit and the number
3527
- // couldn't be formatted.
3528
- // For example, in Australia the default IDD prefix is `0011`,
3529
- // and it could even be as long as `14880011`.
3530
- //
3531
- // Could also check `!hasReceivedThreeLeadingDigits` here
3532
- // to filter out the case when this check duplicates the one
3533
- // already performed when there're 3 leading digits,
3534
- // but it's not a big deal, and in most cases there
3535
- // will be a suitable `format` when there're 3 leading digits.
3536
- //
3537
-
3538
-
3539
- if (this.extractIddPrefix(state)) {
3540
- this.extractCallingCodeAndNationalSignificantNumber(state);
3541
- return true;
3542
- } // Google's AsYouType formatter supports sort of an "autocorrection" feature
3543
- // when it "autocorrects" numbers that have been input for a country
3544
- // with that country's calling code.
3545
- // Such "autocorrection" feature looks weird, but different people have been requesting it:
3546
- // https://github.com/catamphetamine/libphonenumber-js/issues/376
3547
- // https://github.com/catamphetamine/libphonenumber-js/issues/375
3548
- // https://github.com/catamphetamine/libphonenumber-js/issues/316
3549
-
3550
-
3551
- if (this.fixMissingPlus(state)) {
3552
- this.extractCallingCodeAndNationalSignificantNumber(state);
3553
- return true;
3554
- }
3555
- }
3556
- }, {
3557
- key: "extractIddPrefix",
3558
- value: function extractIddPrefix(state) {
3559
- // An IDD prefix can't be present in a number written with a `+`.
3560
- // Also, don't re-extract an IDD prefix if has already been extracted.
3561
- var international = state.international,
3562
- IDDPrefix = state.IDDPrefix,
3563
- digits = state.digits;
3564
-
3565
- if (international || IDDPrefix) {
3566
- return;
3567
- } // Some users input their phone number in "out-of-country"
3568
- // dialing format instead of using the leading `+`.
3569
- // https://github.com/catamphetamine/libphonenumber-js/issues/185
3570
- // Detect such numbers.
3571
-
3572
-
3573
- var numberWithoutIDD = stripIddPrefix(digits, this.defaultCountry, this.defaultCallingCode, this.metadata.metadata);
3574
-
3575
- if (numberWithoutIDD !== undefined && numberWithoutIDD !== digits) {
3576
- // If an IDD prefix was stripped then convert the IDD-prefixed number
3577
- // to international number for subsequent parsing.
3578
- state.update({
3579
- IDDPrefix: digits.slice(0, digits.length - numberWithoutIDD.length)
3580
- });
3581
- this.startInternationalNumber(state);
3582
- return true;
3583
- }
3584
- }
3585
- }, {
3586
- key: "fixMissingPlus",
3587
- value: function fixMissingPlus(state) {
3588
- if (!state.international) {
3589
- var _extractCountryCallin2 = extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(state.digits, this.defaultCountry, this.defaultCallingCode, this.metadata.metadata),
3590
- newCallingCode = _extractCountryCallin2.countryCallingCode;
3591
-
3592
- if (newCallingCode) {
3593
- state.update({
3594
- missingPlus: true
3595
- });
3596
- this.startInternationalNumber(state);
3597
- return true;
3598
- }
3599
- }
3600
- }
3601
- }, {
3602
- key: "startInternationalNumber",
3603
- value: function startInternationalNumber(state) {
3604
- state.startInternationalNumber(); // If a national (significant) number has been extracted before, reset it.
3605
-
3606
- if (state.nationalSignificantNumber) {
3607
- state.resetNationalSignificantNumber();
3608
- this.onNationalSignificantNumberChange();
3609
- this.hasExtractedNationalSignificantNumber = undefined;
3610
- }
3611
- }
3612
- }, {
3613
- key: "extractCallingCodeAndNationalSignificantNumber",
3614
- value: function extractCallingCodeAndNationalSignificantNumber(state) {
3615
- if (this.extractCountryCallingCode(state)) {
3616
- // `this.extractCallingCode()` is currently called when the number
3617
- // couldn't be formatted during the standard procedure.
3618
- // Normally, the national prefix would be re-extracted
3619
- // for an international number if such number couldn't be formatted,
3620
- // but since it's already not able to be formatted,
3621
- // there won't be yet another retry, so also extract national prefix here.
3622
- this.extractNationalSignificantNumber(state.getNationalDigits(), state.update);
3623
- }
3624
- }
3625
- }]);
3626
-
3627
- return AsYouTypeParser;
3628
- }();
3629
-
3630
- function extractFormattedPhoneNumber(text) {
3631
- // Attempt to extract a possible number from the string passed in.
3632
- var startsAt = text.search(VALID_FORMATTED_PHONE_NUMBER_PART);
3633
-
3634
- if (startsAt < 0) {
3635
- return;
3636
- } // Trim everything to the left of the phone number.
3637
-
3638
-
3639
- text = text.slice(startsAt); // Trim the `+`.
3640
-
3641
- var hasPlus;
3642
-
3643
- if (text[0] === '+') {
3644
- hasPlus = true;
3645
- text = text.slice('+'.length);
3646
- } // Trim everything to the right of the phone number.
3647
-
3648
-
3649
- text = text.replace(AFTER_PHONE_NUMBER_DIGITS_END_PATTERN, ''); // Re-add the previously trimmed `+`.
3650
-
3651
- if (hasPlus) {
3652
- text = '+' + text;
3653
- }
3654
-
3655
- return text;
3656
- }
3657
- /**
3658
- * Extracts formatted phone number digits (and a `+`) from text (if there're any).
3659
- * @param {string} text
3660
- * @return {any[]}
3661
- */
3662
-
3663
-
3664
- function _extractFormattedDigitsAndPlus(text) {
3665
- // Extract a formatted phone number part from text.
3666
- var extractedNumber = extractFormattedPhoneNumber(text) || ''; // Trim a `+`.
3667
-
3668
- if (extractedNumber[0] === '+') {
3669
- return [extractedNumber.slice('+'.length), true];
3670
- }
3671
-
3672
- return [extractedNumber];
3673
- }
3674
- /**
3675
- * Extracts formatted phone number digits (and a `+`) from text (if there're any).
3676
- * @param {string} text
3677
- * @return {any[]}
3678
- */
3679
-
3680
-
3681
- function extractFormattedDigitsAndPlus(text) {
3682
- var _extractFormattedDigi3 = _extractFormattedDigitsAndPlus(text),
3683
- _extractFormattedDigi4 = _slicedToArray$1(_extractFormattedDigi3, 2),
3684
- formattedDigits = _extractFormattedDigi4[0],
3685
- hasPlus = _extractFormattedDigi4[1]; // If the extracted phone number part
3686
- // can possibly be a part of some valid phone number
3687
- // then parse phone number characters from a formatted phone number.
3688
-
3689
-
3690
- if (!VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN.test(formattedDigits)) {
3691
- formattedDigits = '';
3692
- }
3693
-
3694
- return [formattedDigits, hasPlus];
3695
- }
3696
-
3697
- function _typeof$1(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
3698
-
3699
- function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _nonIterableRest$2(); }
3700
-
3701
- function _nonIterableRest$2() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
3702
-
3703
- function _iterableToArrayLimit$2(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
3704
-
3705
- function _arrayWithHoles$2(arr) { if (Array.isArray(arr)) return arr; }
3706
-
3707
- function _classCallCheck$5(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3708
-
3709
- function _defineProperties$5(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
3710
-
3711
- function _createClass$5(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$5(Constructor.prototype, protoProps); if (staticProps) _defineProperties$5(Constructor, staticProps); return Constructor; }
3712
-
3713
- var AsYouType =
3714
- /*#__PURE__*/
3715
- function () {
3716
- /**
3717
- * @param {(string|object)?} [optionsOrDefaultCountry] - The default country used for parsing non-international phone numbers. Can also be an `options` object.
3718
- * @param {Object} metadata
3719
- */
3720
- function AsYouType(optionsOrDefaultCountry, metadata) {
3721
- _classCallCheck$5(this, AsYouType);
3722
-
3723
- this.metadata = new Metadata(metadata);
3724
-
3725
- var _this$getCountryAndCa = this.getCountryAndCallingCode(optionsOrDefaultCountry),
3726
- _this$getCountryAndCa2 = _slicedToArray$2(_this$getCountryAndCa, 2),
3727
- defaultCountry = _this$getCountryAndCa2[0],
3728
- defaultCallingCode = _this$getCountryAndCa2[1];
3729
-
3730
- this.defaultCountry = defaultCountry;
3731
- this.defaultCallingCode = defaultCallingCode;
3732
- this.reset();
3733
- }
3734
-
3735
- _createClass$5(AsYouType, [{
3736
- key: "getCountryAndCallingCode",
3737
- value: function getCountryAndCallingCode(optionsOrDefaultCountry) {
3738
- // Set `defaultCountry` and `defaultCallingCode` options.
3739
- var defaultCountry;
3740
- var defaultCallingCode; // Turns out `null` also has type "object". Weird.
3741
-
3742
- if (optionsOrDefaultCountry) {
3743
- if (_typeof$1(optionsOrDefaultCountry) === 'object') {
3744
- defaultCountry = optionsOrDefaultCountry.defaultCountry;
3745
- defaultCallingCode = optionsOrDefaultCountry.defaultCallingCode;
3746
- } else {
3747
- defaultCountry = optionsOrDefaultCountry;
3748
- }
3749
- }
3750
-
3751
- if (defaultCountry && !this.metadata.hasCountry(defaultCountry)) {
3752
- defaultCountry = undefined;
3753
- }
3754
-
3755
- return [defaultCountry, defaultCallingCode];
3756
- }
3757
- /**
3758
- * Inputs "next" phone number characters.
3759
- * @param {string} text
3760
- * @return {string} Formatted phone number characters that have been input so far.
3761
- */
3762
-
3763
- }, {
3764
- key: "input",
3765
- value: function input(text) {
3766
- var _this$parser$input = this.parser.input(text, this.state),
3767
- digits = _this$parser$input.digits,
3768
- justLeadingPlus = _this$parser$input.justLeadingPlus;
3769
-
3770
- if (justLeadingPlus) {
3771
- this.formattedOutput = '+';
3772
- } else if (digits) {
3773
- this.determineTheCountryIfNeeded(); // Match the available formats by the currently available leading digits.
3774
-
3775
- if (this.state.nationalSignificantNumber) {
3776
- this.formatter.narrowDownMatchingFormats(this.state);
3777
- }
3778
-
3779
- var formattedNationalNumber;
3780
-
3781
- if (this.metadata.hasSelectedNumberingPlan()) {
3782
- formattedNationalNumber = this.formatter.format(digits, this.state);
3783
- }
3784
-
3785
- if (formattedNationalNumber === undefined) {
3786
- // See if another national (significant) number could be re-extracted.
3787
- if (this.parser.reExtractNationalSignificantNumber(this.state)) {
3788
- this.determineTheCountryIfNeeded(); // If it could, then re-try formatting the new national (significant) number.
3789
-
3790
- var nationalDigits = this.state.getNationalDigits();
3791
-
3792
- if (nationalDigits) {
3793
- formattedNationalNumber = this.formatter.format(nationalDigits, this.state);
3794
- }
3795
- }
3796
- }
3797
-
3798
- this.formattedOutput = formattedNationalNumber ? this.getFullNumber(formattedNationalNumber) : this.getNonFormattedNumber();
3799
- }
3800
-
3801
- return this.formattedOutput;
3802
- }
3803
- }, {
3804
- key: "reset",
3805
- value: function reset() {
3806
- var _this = this;
3807
-
3808
- this.state = new AsYouTypeState({
3809
- onCountryChange: function onCountryChange(country) {
3810
- // Before version `1.6.0`, the official `AsYouType` formatter API
3811
- // included the `.country` property of an `AsYouType` instance.
3812
- // Since that property (along with the others) have been moved to
3813
- // `this.state`, `this.country` property is emulated for compatibility
3814
- // with the old versions.
3815
- _this.country = country;
3816
- },
3817
- onCallingCodeChange: function onCallingCodeChange(country, callingCode) {
3818
- _this.metadata.selectNumberingPlan(country, callingCode);
3819
-
3820
- _this.formatter.reset(_this.metadata.numberingPlan, _this.state);
3821
-
3822
- _this.parser.reset(_this.metadata.numberingPlan);
3823
- }
3824
- });
3825
- this.formatter = new AsYouTypeFormatter({
3826
- state: this.state,
3827
- metadata: this.metadata
3828
- });
3829
- this.parser = new AsYouTypeParser({
3830
- defaultCountry: this.defaultCountry,
3831
- defaultCallingCode: this.defaultCallingCode,
3832
- metadata: this.metadata,
3833
- state: this.state,
3834
- onNationalSignificantNumberChange: function onNationalSignificantNumberChange() {
3835
- _this.determineTheCountryIfNeeded();
3836
-
3837
- _this.formatter.reset(_this.metadata.numberingPlan, _this.state);
3838
- }
3839
- });
3840
- this.state.reset(this.defaultCountry, this.defaultCallingCode);
3841
- this.formattedOutput = '';
3842
- return this;
3843
- }
3844
- /**
3845
- * Returns `true` if the phone number is being input in international format.
3846
- * In other words, returns `true` if and only if the parsed phone number starts with a `"+"`.
3847
- * @return {boolean}
3848
- */
3849
-
3850
- }, {
3851
- key: "isInternational",
3852
- value: function isInternational() {
3853
- return this.state.international;
3854
- }
3855
- /**
3856
- * Returns the "country calling code" part of the phone number.
3857
- * Returns `undefined` if the number is not being input in international format.
3858
- * Returns "country calling code" for "non-geographic" phone numbering plans too.
3859
- * @return {string} [callingCode]
3860
- */
3861
-
3862
- }, {
3863
- key: "getCallingCode",
3864
- value: function getCallingCode() {
3865
- return this.state.callingCode;
3866
- } // A legacy alias.
3867
-
3868
- }, {
3869
- key: "getCountryCallingCode",
3870
- value: function getCountryCallingCode() {
3871
- return this.getCallingCode();
3872
- }
3873
- /**
3874
- * Returns a two-letter country code of the phone number.
3875
- * Returns `undefined` for "non-geographic" phone numbering plans.
3876
- * Returns `undefined` if no phone number has been input yet.
3877
- * @return {string} [country]
3878
- */
3879
-
3880
- }, {
3881
- key: "getCountry",
3882
- value: function getCountry() {
3883
- var _this$state = this.state,
3884
- digits = _this$state.digits,
3885
- country = _this$state.country; // If no digits have been input yet,
3886
- // then `this.country` is the `defaultCountry`.
3887
- // Won't return the `defaultCountry` in such case.
3888
-
3889
- if (!digits) {
3890
- return;
3891
- }
3892
-
3893
- var countryCode = country;
3894
-
3895
- return countryCode;
3896
- }
3897
- }, {
3898
- key: "determineTheCountryIfNeeded",
3899
- value: function determineTheCountryIfNeeded() {
3900
- // Suppose a user enters a phone number in international format,
3901
- // and there're several countries corresponding to that country calling code,
3902
- // and a country has been derived from the number, and then
3903
- // a user enters one more digit and the number is no longer
3904
- // valid for the derived country, so the country should be re-derived
3905
- // on every new digit in those cases.
3906
- //
3907
- // If the phone number is being input in national format,
3908
- // then it could be a case when `defaultCountry` wasn't specified
3909
- // when creating `AsYouType` instance, and just `defaultCallingCode` was specified,
3910
- // and that "calling code" could correspond to a "non-geographic entity",
3911
- // or there could be several countries corresponding to that country calling code.
3912
- // In those cases, `this.country` is `undefined` and should be derived
3913
- // from the number. Again, if country calling code is ambiguous, then
3914
- // `this.country` should be re-derived with each new digit.
3915
- //
3916
- if (!this.state.country || this.isCountryCallingCodeAmbiguous()) {
3917
- this.determineTheCountry();
3918
- }
3919
- } // Prepends `+CountryCode ` in case of an international phone number
3920
-
3921
- }, {
3922
- key: "getFullNumber",
3923
- value: function getFullNumber(formattedNationalNumber) {
3924
- var _this2 = this;
3925
-
3926
- if (this.isInternational()) {
3927
- var prefix = function prefix(text) {
3928
- return _this2.formatter.getInternationalPrefixBeforeCountryCallingCode(_this2.state, {
3929
- spacing: text ? true : false
3930
- }) + text;
3931
- };
3932
-
3933
- var callingCode = this.state.callingCode;
3934
-
3935
- if (!callingCode) {
3936
- return prefix("".concat(this.state.getDigitsWithoutInternationalPrefix()));
3937
- }
3938
-
3939
- if (!formattedNationalNumber) {
3940
- return prefix(callingCode);
3941
- }
3942
-
3943
- return prefix("".concat(callingCode, " ").concat(formattedNationalNumber));
3944
- }
3945
-
3946
- return formattedNationalNumber;
3947
- }
3948
- }, {
3949
- key: "getNonFormattedNationalNumberWithPrefix",
3950
- value: function getNonFormattedNationalNumberWithPrefix() {
3951
- var _this$state2 = this.state,
3952
- nationalSignificantNumber = _this$state2.nationalSignificantNumber,
3953
- complexPrefixBeforeNationalSignificantNumber = _this$state2.complexPrefixBeforeNationalSignificantNumber,
3954
- nationalPrefix = _this$state2.nationalPrefix;
3955
- var number = nationalSignificantNumber;
3956
- var prefix = complexPrefixBeforeNationalSignificantNumber || nationalPrefix;
3957
-
3958
- if (prefix) {
3959
- number = prefix + number;
3960
- }
3961
-
3962
- return number;
3963
- }
3964
- }, {
3965
- key: "getNonFormattedNumber",
3966
- value: function getNonFormattedNumber() {
3967
- var nationalSignificantNumberMatchesInput = this.state.nationalSignificantNumberMatchesInput;
3968
- return this.getFullNumber(nationalSignificantNumberMatchesInput ? this.getNonFormattedNationalNumberWithPrefix() : this.state.getNationalDigits());
3969
- }
3970
- }, {
3971
- key: "getNonFormattedTemplate",
3972
- value: function getNonFormattedTemplate() {
3973
- var number = this.getNonFormattedNumber();
3974
-
3975
- if (number) {
3976
- return number.replace(/[\+\d]/g, DIGIT_PLACEHOLDER);
3977
- }
3978
- }
3979
- }, {
3980
- key: "isCountryCallingCodeAmbiguous",
3981
- value: function isCountryCallingCodeAmbiguous() {
3982
- var callingCode = this.state.callingCode;
3983
- var countryCodes = this.metadata.getCountryCodesForCallingCode(callingCode);
3984
- return countryCodes && countryCodes.length > 1;
3985
- } // Determines the country of the phone number
3986
- // entered so far based on the country phone code
3987
- // and the national phone number.
3988
-
3989
- }, {
3990
- key: "determineTheCountry",
3991
- value: function determineTheCountry() {
3992
- this.state.setCountry(getCountryByCallingCode(this.isInternational() ? this.state.callingCode : this.defaultCallingCode, this.state.nationalSignificantNumber, this.metadata));
3993
- }
3994
- /**
3995
- * Returns an instance of `PhoneNumber` class.
3996
- * Will return `undefined` if no national (significant) number
3997
- * digits have been entered so far, or if no `defaultCountry` has been
3998
- * set and the user enters a phone number not in international format.
3999
- */
4000
-
4001
- }, {
4002
- key: "getNumber",
4003
- value: function getNumber() {
4004
- var _this$state3 = this.state,
4005
- nationalSignificantNumber = _this$state3.nationalSignificantNumber,
4006
- carrierCode = _this$state3.carrierCode;
4007
-
4008
- if (this.isInternational()) {
4009
- if (!this.state.callingCode) {
4010
- return;
4011
- }
4012
- } else {
4013
- if (!this.state.country && !this.defaultCallingCode) {
4014
- return;
4015
- }
4016
- }
4017
-
4018
- if (!nationalSignificantNumber) {
4019
- return;
4020
- }
4021
-
4022
- var countryCode = this.getCountry();
4023
- var callingCode = this.getCountryCallingCode() || this.defaultCallingCode;
4024
- var phoneNumber = new PhoneNumber(countryCode || callingCode, nationalSignificantNumber, this.metadata.metadata);
4025
-
4026
- if (carrierCode) {
4027
- phoneNumber.carrierCode = carrierCode;
4028
- } // Phone number extensions are not supported by "As You Type" formatter.
4029
-
4030
-
4031
- return phoneNumber;
4032
- }
4033
- /**
4034
- * Returns `true` if the phone number is "possible".
4035
- * Is just a shortcut for `PhoneNumber.isPossible()`.
4036
- * @return {boolean}
4037
- */
4038
-
4039
- }, {
4040
- key: "isPossible",
4041
- value: function isPossible() {
4042
- var phoneNumber = this.getNumber();
4043
-
4044
- if (!phoneNumber) {
4045
- return false;
4046
- }
4047
-
4048
- return phoneNumber.isPossible();
4049
- }
4050
- /**
4051
- * Returns `true` if the phone number is "valid".
4052
- * Is just a shortcut for `PhoneNumber.isValid()`.
4053
- * @return {boolean}
4054
- */
4055
-
4056
- }, {
4057
- key: "isValid",
4058
- value: function isValid() {
4059
- var phoneNumber = this.getNumber();
4060
-
4061
- if (!phoneNumber) {
4062
- return false;
4063
- }
4064
-
4065
- return phoneNumber.isValid();
4066
- }
4067
- /**
4068
- * @deprecated
4069
- * This method is used in `react-phone-number-input/source/input-control.js`
4070
- * in versions before `3.0.16`.
4071
- */
4072
-
4073
- }, {
4074
- key: "getNationalNumber",
4075
- value: function getNationalNumber() {
4076
- return this.state.nationalSignificantNumber;
4077
- }
4078
- /**
4079
- * Returns the phone number characters entered by the user.
4080
- * @return {string}
4081
- */
4082
-
4083
- }, {
4084
- key: "getChars",
4085
- value: function getChars() {
4086
- return (this.state.international ? '+' : '') + this.state.digits;
4087
- }
4088
- /**
4089
- * Returns the template for the formatted phone number.
4090
- * @return {string}
4091
- */
4092
-
4093
- }, {
4094
- key: "getTemplate",
4095
- value: function getTemplate() {
4096
- return this.formatter.getTemplate(this.state) || this.getNonFormattedTemplate() || '';
4097
- }
4098
- }]);
4099
-
4100
- return AsYouType;
4101
- }();
4102
-
4103
- function AsYouType$1(country) {
4104
- return AsYouType.call(this, country, metadata)
4105
- }
4106
-
4107
- AsYouType$1.prototype = Object.create(AsYouType.prototype, {});
4108
- AsYouType$1.prototype.constructor = AsYouType$1;
4109
-
4110
- exports.AsYouType = AsYouType$1;
4111
- exports.MAX_LENGTH_FOR_NSN = MAX_LENGTH_FOR_NSN;
4112
- exports.MIN_LENGTH_FOR_NSN = MIN_LENGTH_FOR_NSN;
4113
- exports.Metadata = Metadata;
4114
- exports.PLUS_CHARS = PLUS_CHARS;
4115
- exports.PhoneNumber = PhoneNumber;
4116
- exports.VALID_DIGITS = VALID_DIGITS;
4117
- exports.createExtensionPattern = createExtensionPattern;
4118
- exports.extractCountryCallingCode = extractCountryCallingCode;
4119
- exports.extractNationalNumber = extractNationalNumber;
4120
- exports.getCountryByCallingCode = getCountryByCallingCode;
4121
- exports.getCountryCallingCode = getCountryCallingCode;
4122
- exports.isPossibleNumber = isPossibleNumber;
4123
- exports.isSupportedCountry = isSupportedCountry;
4124
- exports.isViablePhoneNumber = isViablePhoneNumber;
4125
- exports.matchesEntirely = matchesEntirely;
4126
- exports.metadata = metadata;
4127
- exports.parseDigit = parseDigit;
4128
- exports.parseRFC3966 = parseRFC3966;