libphonenumber-js 1.12.43 → 1.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (310) hide show
  1. package/CHANGELOG.md +131 -104
  2. package/README.md +141 -81
  3. package/core/es6/index.d.cts +2 -0
  4. package/core/es6/index.d.ts +2 -0
  5. package/core/es6/index.js +39 -0
  6. package/core/es6/package.json +12 -0
  7. package/core/index.cjs +5 -0
  8. package/core/index.cjs.js +5 -0
  9. package/core/index.d.cts +3 -1
  10. package/core/index.d.ts +3 -1
  11. package/core/index.js +5 -0
  12. package/custom.d.ts +6 -4
  13. package/custom.js +5 -5
  14. package/es6-modern/AsYouType.js +445 -0
  15. package/es6-modern/AsYouType.js.map +1 -0
  16. package/es6-modern/AsYouType.test.js.map +1 -0
  17. package/es6-modern/AsYouTypeFormatter.PatternMatcher.js +195 -0
  18. package/es6-modern/AsYouTypeFormatter.PatternMatcher.js.map +1 -0
  19. package/es6-modern/AsYouTypeFormatter.PatternMatcher.test.js.map +1 -0
  20. package/es6-modern/AsYouTypeFormatter.PatternParser.js +184 -0
  21. package/es6-modern/AsYouTypeFormatter.PatternParser.js.map +1 -0
  22. package/es6-modern/AsYouTypeFormatter.PatternParser.test.js.map +1 -0
  23. package/es6-modern/AsYouTypeFormatter.complete.js +120 -0
  24. package/es6-modern/AsYouTypeFormatter.complete.js.map +1 -0
  25. package/es6-modern/AsYouTypeFormatter.js +659 -0
  26. package/es6-modern/AsYouTypeFormatter.js.map +1 -0
  27. package/es6-modern/AsYouTypeFormatter.util.js +96 -0
  28. package/es6-modern/AsYouTypeFormatter.util.js.map +1 -0
  29. package/es6-modern/AsYouTypeFormatter.util.test.js.map +1 -0
  30. package/es6-modern/AsYouTypeParser.js +435 -0
  31. package/es6-modern/AsYouTypeParser.js.map +1 -0
  32. package/es6-modern/AsYouTypeState.js +104 -0
  33. package/es6-modern/AsYouTypeState.js.map +1 -0
  34. package/es6-modern/ParseError.js +15 -0
  35. package/es6-modern/ParseError.js.map +1 -0
  36. package/es6-modern/PhoneNumber.js +166 -0
  37. package/es6-modern/PhoneNumber.js.map +1 -0
  38. package/es6-modern/PhoneNumber.test.js.map +1 -0
  39. package/es6-modern/PhoneNumberMatcher.js +330 -0
  40. package/es6-modern/PhoneNumberMatcher.js.map +1 -0
  41. package/es6-modern/PhoneNumberMatcher.test.js.map +1 -0
  42. package/es6-modern/constants.js +31 -0
  43. package/es6-modern/constants.js.map +1 -0
  44. package/es6-modern/findNumbers/LRUCache.js +98 -0
  45. package/es6-modern/findNumbers/LRUCache.js.map +1 -0
  46. package/es6-modern/findNumbers/Leniency.js +311 -0
  47. package/es6-modern/findNumbers/Leniency.js.map +1 -0
  48. package/es6-modern/findNumbers/RegExpCache.js +20 -0
  49. package/es6-modern/findNumbers/RegExpCache.js.map +1 -0
  50. package/es6-modern/findNumbers/isValidCandidate.js +66 -0
  51. package/es6-modern/findNumbers/isValidCandidate.js.map +1 -0
  52. package/es6-modern/findNumbers/isValidPreCandidate.js +26 -0
  53. package/es6-modern/findNumbers/isValidPreCandidate.js.map +1 -0
  54. package/es6-modern/findNumbers/matchPhoneNumberStringAgainstPhoneNumber.js +63 -0
  55. package/es6-modern/findNumbers/matchPhoneNumberStringAgainstPhoneNumber.js.map +1 -0
  56. package/es6-modern/findNumbers/parsePreCandidate.js +18 -0
  57. package/es6-modern/findNumbers/parsePreCandidate.js.map +1 -0
  58. package/es6-modern/findNumbers/utf-8.js +63 -0
  59. package/es6-modern/findNumbers/utf-8.js.map +1 -0
  60. package/es6-modern/findNumbers/util.js +26 -0
  61. package/es6-modern/findNumbers/util.js.map +1 -0
  62. package/es6-modern/findNumbers/util.test.js.map +1 -0
  63. package/es6-modern/findPhoneNumbersInText.js +19 -0
  64. package/es6-modern/findPhoneNumbersInText.js.map +1 -0
  65. package/es6-modern/findPhoneNumbersInText.test.js.map +1 -0
  66. package/es6-modern/format.js +204 -0
  67. package/es6-modern/format.js.map +1 -0
  68. package/es6-modern/format.test.js.map +1 -0
  69. package/es6-modern/formatIncompletePhoneNumber.js +18 -0
  70. package/es6-modern/formatIncompletePhoneNumber.js.map +1 -0
  71. package/es6-modern/formatIncompletePhoneNumber.test.js.map +1 -0
  72. package/es6-modern/formatPhoneNumberForMobileDialing.js +190 -0
  73. package/es6-modern/formatPhoneNumberForMobileDialing.js.map +1 -0
  74. package/es6-modern/getCountries.js +5 -0
  75. package/es6-modern/getCountries.js.map +1 -0
  76. package/es6-modern/getCountries.test.js.map +1 -0
  77. package/es6-modern/getCountryCallingCode.js +3 -0
  78. package/es6-modern/getCountryCallingCode.js.map +1 -0
  79. package/es6-modern/getCountryCallingCode.test.js.map +1 -0
  80. package/es6-modern/getExampleNumber.js +7 -0
  81. package/es6-modern/getExampleNumber.js.map +1 -0
  82. package/es6-modern/getExampleNumber.test.js.map +1 -0
  83. package/es6-modern/helpers/RFC3966.js +63 -0
  84. package/es6-modern/helpers/RFC3966.js.map +1 -0
  85. package/es6-modern/helpers/RFC3966.test.js.map +1 -0
  86. package/es6-modern/helpers/applyInternationalSeparatorStyle.js +36 -0
  87. package/es6-modern/helpers/applyInternationalSeparatorStyle.js.map +1 -0
  88. package/es6-modern/helpers/applyInternationalSeparatorStyle.test.js.map +1 -0
  89. package/es6-modern/helpers/checkNumberLength.js +112 -0
  90. package/es6-modern/helpers/checkNumberLength.js.map +1 -0
  91. package/es6-modern/helpers/checkNumberLength.test.js.map +1 -0
  92. package/es6-modern/helpers/extension/createExtensionPattern.js +93 -0
  93. package/es6-modern/helpers/extension/createExtensionPattern.js.map +1 -0
  94. package/es6-modern/helpers/extension/extractExtension.js +30 -0
  95. package/es6-modern/helpers/extension/extractExtension.js.map +1 -0
  96. package/es6-modern/helpers/extractCountryCallingCode.js +142 -0
  97. package/es6-modern/helpers/extractCountryCallingCode.js.map +1 -0
  98. package/es6-modern/helpers/extractCountryCallingCode.test.js.map +1 -0
  99. package/es6-modern/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +49 -0
  100. package/es6-modern/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js.map +1 -0
  101. package/es6-modern/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +66 -0
  102. package/es6-modern/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js.map +1 -0
  103. package/es6-modern/helpers/extractNationalNumber.js +117 -0
  104. package/es6-modern/helpers/extractNationalNumber.js.map +1 -0
  105. package/es6-modern/helpers/extractNationalNumber.test.js.map +1 -0
  106. package/es6-modern/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +102 -0
  107. package/es6-modern/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js.map +1 -0
  108. package/es6-modern/helpers/extractNationalNumberFromPossiblyIncompleteNumber.test.js.map +1 -0
  109. package/es6-modern/helpers/extractPhoneContext.js +82 -0
  110. package/es6-modern/helpers/extractPhoneContext.js.map +1 -0
  111. package/es6-modern/helpers/extractPhoneContext.test.js.map +1 -0
  112. package/es6-modern/helpers/formatNationalNumberUsingFormat.js +34 -0
  113. package/es6-modern/helpers/formatNationalNumberUsingFormat.js.map +1 -0
  114. package/es6-modern/helpers/getCountryByCallingCode.js +30 -0
  115. package/es6-modern/helpers/getCountryByCallingCode.js.map +1 -0
  116. package/es6-modern/helpers/getCountryByNationalNumber.js +76 -0
  117. package/es6-modern/helpers/getCountryByNationalNumber.js.map +1 -0
  118. package/es6-modern/helpers/getIddPrefix.js +26 -0
  119. package/es6-modern/helpers/getIddPrefix.js.map +1 -0
  120. package/es6-modern/helpers/getNumberType.js +81 -0
  121. package/es6-modern/helpers/getNumberType.js.map +1 -0
  122. package/es6-modern/helpers/getNumberType.test.js.map +1 -0
  123. package/es6-modern/helpers/getPossibleCountriesForNumber.js +28 -0
  124. package/es6-modern/helpers/getPossibleCountriesForNumber.js.map +1 -0
  125. package/es6-modern/helpers/isObject.js +5 -0
  126. package/es6-modern/helpers/isObject.js.map +1 -0
  127. package/es6-modern/helpers/isViablePhoneNumber.js +77 -0
  128. package/es6-modern/helpers/isViablePhoneNumber.js.map +1 -0
  129. package/es6-modern/helpers/matchesEntirely.js +12 -0
  130. package/es6-modern/helpers/matchesEntirely.js.map +1 -0
  131. package/es6-modern/helpers/matchesEntirely.test.js.map +1 -0
  132. package/es6-modern/helpers/mergeArrays.js +23 -0
  133. package/es6-modern/helpers/mergeArrays.js.map +1 -0
  134. package/es6-modern/helpers/mergeArrays.test.js.map +1 -0
  135. package/es6-modern/helpers/parseDigits.js +111 -0
  136. package/es6-modern/helpers/parseDigits.js.map +1 -0
  137. package/es6-modern/helpers/parseDigits.test.js.map +1 -0
  138. package/es6-modern/helpers/stripIddPrefix.js +29 -0
  139. package/es6-modern/helpers/stripIddPrefix.js.map +1 -0
  140. package/es6-modern/helpers/stripIddPrefix.test.js.map +1 -0
  141. package/es6-modern/isPossible.js +77 -0
  142. package/es6-modern/isPossible.js.map +1 -0
  143. package/es6-modern/isPossible.test.js.map +1 -0
  144. package/es6-modern/isPossiblePhoneNumber.js +16 -0
  145. package/es6-modern/isPossiblePhoneNumber.js.map +1 -0
  146. package/es6-modern/isPossiblePhoneNumber.test.js.map +1 -0
  147. package/es6-modern/isValid.js +57 -0
  148. package/es6-modern/isValid.js.map +1 -0
  149. package/es6-modern/isValid.test.js.map +1 -0
  150. package/es6-modern/isValidPhoneNumber.js +16 -0
  151. package/es6-modern/isValidPhoneNumber.js.map +1 -0
  152. package/es6-modern/isValidPhoneNumber.test.js.map +1 -0
  153. package/es6-modern/legacy/PhoneNumberSearch.js +109 -0
  154. package/es6-modern/legacy/PhoneNumberSearch.js.map +1 -0
  155. package/es6-modern/legacy/findNumbers.js +16 -0
  156. package/es6-modern/legacy/findNumbers.js.map +1 -0
  157. package/es6-modern/legacy/findNumbers.test.js.map +1 -0
  158. package/es6-modern/legacy/findPhoneNumbers.js +26 -0
  159. package/es6-modern/legacy/findPhoneNumbers.js.map +1 -0
  160. package/es6-modern/legacy/findPhoneNumbers.test.js.map +1 -0
  161. package/es6-modern/legacy/findPhoneNumbersInitialImplementation.js +79 -0
  162. package/es6-modern/legacy/findPhoneNumbersInitialImplementation.js.map +1 -0
  163. package/es6-modern/legacy/format.js +97 -0
  164. package/es6-modern/legacy/format.js.map +1 -0
  165. package/es6-modern/legacy/format.test.js.map +1 -0
  166. package/es6-modern/legacy/getNumberType.js +104 -0
  167. package/es6-modern/legacy/getNumberType.js.map +1 -0
  168. package/es6-modern/legacy/getNumberType.test.js.map +1 -0
  169. package/es6-modern/legacy/isPossibleNumber.js +30 -0
  170. package/es6-modern/legacy/isPossibleNumber.js.map +1 -0
  171. package/es6-modern/legacy/isPossibleNumber.test.js.map +1 -0
  172. package/es6-modern/legacy/isValidNumber.js +17 -0
  173. package/es6-modern/legacy/isValidNumber.js.map +1 -0
  174. package/es6-modern/legacy/isValidNumber.test.js.map +1 -0
  175. package/es6-modern/legacy/isValidNumberForRegion.js +65 -0
  176. package/es6-modern/legacy/isValidNumberForRegion.js.map +1 -0
  177. package/es6-modern/legacy/isValidNumberForRegion.test.js.map +1 -0
  178. package/es6-modern/legacy/isValidNumberForRegion_.js +14 -0
  179. package/es6-modern/legacy/isValidNumberForRegion_.js.map +1 -0
  180. package/es6-modern/legacy/parse.js +11 -0
  181. package/es6-modern/legacy/parse.js.map +1 -0
  182. package/es6-modern/legacy/parse.test.js.map +1 -0
  183. package/es6-modern/legacy/searchNumbers.js +32 -0
  184. package/es6-modern/legacy/searchNumbers.js.map +1 -0
  185. package/es6-modern/legacy/searchNumbers.test.js.map +1 -0
  186. package/es6-modern/metadata.js +494 -0
  187. package/es6-modern/metadata.js.map +1 -0
  188. package/es6-modern/metadata.test.js.map +1 -0
  189. package/es6-modern/normalizeArguments.js +52 -0
  190. package/es6-modern/normalizeArguments.js.map +1 -0
  191. package/es6-modern/parse.js +341 -0
  192. package/es6-modern/parse.js.map +1 -0
  193. package/es6-modern/parse.test.js.map +1 -0
  194. package/es6-modern/parseIncompletePhoneNumber.js +70 -0
  195. package/es6-modern/parseIncompletePhoneNumber.js.map +1 -0
  196. package/es6-modern/parseIncompletePhoneNumber.test.js.map +1 -0
  197. package/es6-modern/parsePhoneNumber.js +11 -0
  198. package/es6-modern/parsePhoneNumber.js.map +1 -0
  199. package/es6-modern/parsePhoneNumber.test.js.map +1 -0
  200. package/es6-modern/parsePhoneNumberWithError.js +11 -0
  201. package/es6-modern/parsePhoneNumberWithError.js.map +1 -0
  202. package/es6-modern/parsePhoneNumberWithError.test.js.map +1 -0
  203. package/es6-modern/parsePhoneNumberWithError_.js +8 -0
  204. package/es6-modern/parsePhoneNumberWithError_.js.map +1 -0
  205. package/es6-modern/parsePhoneNumber_.js +24 -0
  206. package/es6-modern/parsePhoneNumber_.js.map +1 -0
  207. package/es6-modern/searchPhoneNumbersInText.js +31 -0
  208. package/es6-modern/searchPhoneNumbersInText.js.map +1 -0
  209. package/es6-modern/searchPhoneNumbersInText.test.js.map +1 -0
  210. package/es6-modern/tools/semver-compare.js +27 -0
  211. package/es6-modern/tools/semver-compare.js.map +1 -0
  212. package/es6-modern/tools/semver-compare.test.js.map +1 -0
  213. package/es6-modern/validatePhoneNumberLength.js +35 -0
  214. package/es6-modern/validatePhoneNumberLength.js.map +1 -0
  215. package/es6-modern/validatePhoneNumberLength.test.js.map +1 -0
  216. package/index.cjs +4 -0
  217. package/index.cjs.js +4 -0
  218. package/index.d.cts +5 -3
  219. package/index.d.ts +5 -3
  220. package/index.js +5 -0
  221. package/max/es6/exports/AsYouType.js +11 -0
  222. package/max/es6/exports/Metadata.js +11 -0
  223. package/max/es6/exports/PhoneNumber.js +11 -0
  224. package/max/es6/exports/PhoneNumberMatcher.js +11 -0
  225. package/max/es6/exports/findNumbers.js +6 -0
  226. package/max/es6/exports/findPhoneNumbersInText.js +6 -0
  227. package/max/es6/exports/formatIncompletePhoneNumber.js +6 -0
  228. package/max/es6/exports/getCountries.js +6 -0
  229. package/max/es6/exports/getCountryCallingCode.js +6 -0
  230. package/max/es6/exports/getExampleNumber.js +6 -0
  231. package/max/es6/exports/getExtPrefix.js +6 -0
  232. package/max/es6/exports/isPossiblePhoneNumber.js +6 -0
  233. package/max/es6/exports/isSupportedCountry.js +6 -0
  234. package/max/es6/exports/isValidPhoneNumber.js +6 -0
  235. package/max/es6/exports/parsePhoneNumber.js +7 -0
  236. package/max/es6/exports/parsePhoneNumberWithError.js +7 -0
  237. package/max/es6/exports/searchNumbers.js +6 -0
  238. package/max/es6/exports/searchPhoneNumbersInText.js +6 -0
  239. package/max/es6/exports/validatePhoneNumberLength.js +6 -0
  240. package/max/es6/exports/withMetadataArgument.js +13 -0
  241. package/max/es6/index.d.cts +2 -0
  242. package/max/es6/index.d.ts +2 -0
  243. package/max/es6/index.js +44 -0
  244. package/max/es6/package.json +12 -0
  245. package/max/index.cjs +5 -0
  246. package/max/index.cjs.js +5 -0
  247. package/max/index.d.cts +3 -1
  248. package/max/index.d.ts +3 -1
  249. package/max/index.js +4 -0
  250. package/min/es6/exports/AsYouType.js +11 -0
  251. package/min/es6/exports/Metadata.js +11 -0
  252. package/min/es6/exports/PhoneNumber.js +11 -0
  253. package/min/es6/exports/PhoneNumberMatcher.js +11 -0
  254. package/min/es6/exports/findNumbers.js +6 -0
  255. package/min/es6/exports/findPhoneNumbersInText.js +6 -0
  256. package/min/es6/exports/formatIncompletePhoneNumber.js +6 -0
  257. package/min/es6/exports/getCountries.js +6 -0
  258. package/min/es6/exports/getCountryCallingCode.js +6 -0
  259. package/min/es6/exports/getExampleNumber.js +6 -0
  260. package/min/es6/exports/getExtPrefix.js +6 -0
  261. package/min/es6/exports/isPossiblePhoneNumber.js +6 -0
  262. package/min/es6/exports/isSupportedCountry.js +6 -0
  263. package/min/es6/exports/isValidPhoneNumber.js +6 -0
  264. package/min/es6/exports/parsePhoneNumber.js +7 -0
  265. package/min/es6/exports/parsePhoneNumberWithError.js +7 -0
  266. package/min/es6/exports/searchNumbers.js +6 -0
  267. package/min/es6/exports/searchPhoneNumbersInText.js +6 -0
  268. package/min/es6/exports/validatePhoneNumberLength.js +6 -0
  269. package/min/es6/exports/withMetadataArgument.js +13 -0
  270. package/min/es6/index.d.cts +2 -0
  271. package/min/es6/index.d.ts +2 -0
  272. package/min/es6/index.js +44 -0
  273. package/min/es6/package.json +12 -0
  274. package/min/index.cjs +5 -0
  275. package/min/index.cjs.js +5 -0
  276. package/min/index.d.cts +3 -1
  277. package/min/index.d.ts +3 -1
  278. package/min/index.js +3 -0
  279. package/mobile/es6/exports/AsYouType.js +11 -0
  280. package/mobile/es6/exports/Metadata.js +11 -0
  281. package/mobile/es6/exports/PhoneNumber.js +11 -0
  282. package/mobile/es6/exports/PhoneNumberMatcher.js +11 -0
  283. package/mobile/es6/exports/findNumbers.js +6 -0
  284. package/mobile/es6/exports/findPhoneNumbersInText.js +6 -0
  285. package/mobile/es6/exports/formatIncompletePhoneNumber.js +6 -0
  286. package/mobile/es6/exports/getCountries.js +6 -0
  287. package/mobile/es6/exports/getCountryCallingCode.js +6 -0
  288. package/mobile/es6/exports/getExampleNumber.js +6 -0
  289. package/mobile/es6/exports/getExtPrefix.js +6 -0
  290. package/mobile/es6/exports/isPossiblePhoneNumber.js +6 -0
  291. package/mobile/es6/exports/isSupportedCountry.js +6 -0
  292. package/mobile/es6/exports/isValidPhoneNumber.js +6 -0
  293. package/mobile/es6/exports/parsePhoneNumber.js +7 -0
  294. package/mobile/es6/exports/parsePhoneNumberWithError.js +7 -0
  295. package/mobile/es6/exports/searchNumbers.js +6 -0
  296. package/mobile/es6/exports/searchPhoneNumbersInText.js +6 -0
  297. package/mobile/es6/exports/validatePhoneNumberLength.js +6 -0
  298. package/mobile/es6/exports/withMetadataArgument.js +13 -0
  299. package/mobile/es6/index.d.cts +2 -0
  300. package/mobile/es6/index.d.ts +2 -0
  301. package/mobile/es6/index.js +44 -0
  302. package/mobile/es6/package.json +12 -0
  303. package/mobile/index.cjs +5 -0
  304. package/mobile/index.cjs.js +5 -0
  305. package/mobile/index.d.cts +3 -1
  306. package/mobile/index.d.ts +3 -1
  307. package/mobile/index.js +4 -0
  308. package/package.json +28 -9
  309. package/types.d.cts +54 -21
  310. package/types.d.ts +54 -21
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AsYouTypeFormatter.PatternMatcher.test.js","names":["describe","it","expect","PatternMatcher","to","throw","matcher","match","be","undefined","deep","equal","allowOverflow","overflow","partialMatch"],"sources":["../source/AsYouTypeFormatter.PatternMatcher.test.js"],"sourcesContent":["import { describe, it } from 'mocha'\r\nimport { expect } from 'chai'\r\n\r\nimport PatternMatcher from './AsYouTypeFormatter.PatternMatcher.js'\r\n\r\ndescribe('AsYouTypeFormatter.PatternMatcher', function() {\r\n\tit('should throw when no pattern is passed', function() {\r\n\t\texpect(() => new PatternMatcher()).to.throw('Pattern is required')\r\n\t})\r\n\r\n\tit('should throw when no string is passed', function() {\r\n\t\tconst matcher = new PatternMatcher('1')\r\n\t\texpect(() => matcher.match()).to.throw('String is required')\r\n\t})\r\n\r\n\tit('should throw on illegal characters', function() {\r\n\t\texpect(() => new PatternMatcher('4(5|6)7')).to.throw('Illegal characters')\r\n\t})\r\n\r\n\tit('should throw on an illegal ] operator', function() {\r\n\t\texpect(() => new PatternMatcher('4]7')).to.throw('\"]\" operator must be preceded by \"[\" operator')\r\n\t})\r\n\r\n\tit('should throw on an illegal - operator in a one-of set', function() {\r\n\t\texpect(() => new PatternMatcher('[-5]')).to.throw('Couldn\\'t parse a one-of set pattern: -5')\r\n\t})\r\n\r\n\tit('should throw on a non-finalized context', function() {\r\n\t\texpect(() => new PatternMatcher('4(?:5|7')).to.throw('Non-finalized contexts left when pattern parse ended')\r\n\t})\r\n\r\n\tit('should throw on an illegal (|) operator', function() {\r\n\t\texpect(() => new PatternMatcher('4(?:5|)7')).to.throw('No instructions found after \"|\" operator in an \"or\" group')\r\n\t})\r\n\r\n\tit('should throw on an illegal ) operator', function() {\r\n\t\texpect(() => new PatternMatcher('4[56)]7')).to.throw('\")\" operator must be preceded by \"(?:\" operator')\r\n\t})\r\n\r\n\tit('should throw on an illegal | operator', function() {\r\n\t\texpect(() => new PatternMatcher('4[5|6]7')).to.throw('operator can only be used inside \"or\" groups')\r\n\t})\r\n\r\n\tit('should match a one-digit pattern', function() {\r\n\t\tconst matcher = new PatternMatcher('4')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('4')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('44')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('44', { allowOverflow: true })).to.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match a two-digit pattern', function() {\r\n\t\tconst matcher = new PatternMatcher('44')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('4')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('44')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('444')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('444', { allowOverflow: true })).to.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('55')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match a one-digit one-of set (single digit)', function() {\r\n\t\tconst matcher = new PatternMatcher('[4]')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('4')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('44')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('44', { allowOverflow: true })).to.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match a one-digit one-of set (multiple digits)', function() {\r\n\t\tconst matcher = new PatternMatcher('[479]')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('4')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('44')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('44', { allowOverflow: true })).to.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match a one-digit one-of set using a dash notation (not inclusive)', function() {\r\n\t\tconst matcher = new PatternMatcher('[2-5]')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('4')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('44')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('44', { allowOverflow: true })).to.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match a one-digit one-of set using a dash notation (inclusive)', function() {\r\n\t\tconst matcher = new PatternMatcher('[3-4]')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('4')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('44')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('44', { allowOverflow: true })).to.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match a one-digit one-of set including a dash notation', function() {\r\n\t\tconst matcher = new PatternMatcher('[124-68]')\r\n\r\n\t\texpect(matcher.match('0')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('1')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('2')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('3')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('4')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('5')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('6')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('7')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('8')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('9')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('88')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('88', { allowOverflow: true })).to.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match a two-digit one-of set', function() {\r\n\t\tconst matcher = new PatternMatcher('[479][45]')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('4')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('5')).to.be.undefined\r\n\t\texpect(matcher.match('55')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('44')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('444')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('444', { allowOverflow: true })).to.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match a two-digit one-of set (regular digit and a one-of set)', function() {\r\n\t\tconst matcher = new PatternMatcher('1[45]')\r\n\r\n\t\texpect(matcher.match('0')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('1')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('15')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('16')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match a pattern with an or group', function() {\r\n\t\tconst matcher = new PatternMatcher('7(?:1[0-68]|2[1-9])')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('7')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('71')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('73')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('711')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('717')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('720')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('722')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('7222')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('7222', { allowOverflow: true })).to.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match an or pattern containing or groups', function() {\r\n\t\tconst matcher = new PatternMatcher('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])')\r\n\r\n\t\texpect(matcher.match('1')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('2')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('3')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('4')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('21')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('22')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('221')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('222')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('2222')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('2222', { allowOverflow: true })).to.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('3')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('33')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('332')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('333')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match an or pattern', function() {\r\n\t\tconst matcher = new PatternMatcher('6|8')\r\n\r\n\t\texpect(matcher.match('5')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('6')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('7')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('8')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match an or pattern (one-of sets)', function() {\r\n\t\tconst matcher = new PatternMatcher('[123]|[5-8]')\r\n\r\n\t\texpect(matcher.match('0')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('1')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('2')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('3')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('4')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('5')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('6')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('7')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('8')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('9')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('18')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('18', { allowOverflow: true })).to.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('should match an or pattern (different lengths)', function() {\r\n\t\tconst matcher = new PatternMatcher('60|8')\r\n\r\n\t\texpect(matcher.match('5')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('6')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('60')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('61')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('7')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('8')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('68')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match an or pattern (one-of sets) (different lengths)', function() {\r\n\t\tconst matcher = new PatternMatcher('[123]|[5-8][2-8]')\r\n\r\n\t\texpect(matcher.match('0')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match an or pattern (one-of sets and regular digits) (different lengths)', function() {\r\n\t\tconst matcher = new PatternMatcher('[2358][2-5]|4')\r\n\r\n\t\texpect(matcher.match('0')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('2')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('21')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('22')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('25')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('26')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('222')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('222', { allowOverflow: true })).to.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('3')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('4')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('6')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match an or pattern (one-of sets and regular digits mixed) (different lengths)', function() {\r\n\t\tconst matcher = new PatternMatcher('[2358]2|4')\r\n\r\n\t\texpect(matcher.match('0')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('2')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('21')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('22')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('222')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('222', { allowOverflow: true })).to.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('3')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('4')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('6')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match an or pattern (one-of sets groups and regular digits mixed) (different lengths)', function() {\r\n\t\tconst matcher = new PatternMatcher('1(?:11|[2-9])')\r\n\r\n\t\texpect(matcher.match('1')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('10')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('11')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('111')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('1111')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('1111', { allowOverflow: true })).to.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('12')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('122')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('19')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('5')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match nested or groups', function() {\r\n\t\tconst matcher = new PatternMatcher('1(?:2(?:3(?:4|5)|6)|7(?:8|9))0')\r\n\r\n\t\texpect(matcher.match('1')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('2')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('11')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('12')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('121')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('123')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('1231')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('1234')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('12340')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('123401')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('123401', { allowOverflow: true })).to.deep.equal({\r\n\t\t\toverflow: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('12350')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('12360')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('1260')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('1270')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('1770')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('1780')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('1790')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('18')).to.be.undefined\r\n\t})\r\n\r\n\tit('should match complex patterns', function() {\r\n\t\tconst matcher = new PatternMatcher('(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]')\r\n\r\n\t\texpect(matcher.match('0')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('3')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('31')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('32')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('316')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('315')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('4')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('46')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('47')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('5')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('50')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('51')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('6')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('64')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('65')).to.deep.equal({\r\n\t\t\tpartialMatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('650')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('654')).to.be.undefined\r\n\r\n\t\texpect(matcher.match('69')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('8')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\r\n\t\texpect(matcher.match('9')).to.deep.equal({\r\n\t\t\tmatch: true\r\n\t\t})\r\n\t})\r\n\r\n\tit('shouldn\\'t match things that shouldn\\'t match', function() {\r\n\t\t// There was a bug: \"leading digits\" `\"2\"` matched \"leading digits pattern\" `\"90\"`.\r\n\t\t// The incorrect `.match()` function result was `{ oveflow: true }`\r\n\t\t// while it should've been `undefined`.\r\n\t\t// https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/66\r\n\t\texpect(new PatternMatcher('2').match('90', { allowOverflow: true })).to.be.undefined\r\n\t})\r\n})"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,EAAE,QAAQ,OAAO;AACpC,SAASC,MAAM,QAAQ,MAAM;AAE7B,OAAOC,cAAc,MAAM,wCAAwC;AAEnEH,QAAQ,CAAC,mCAAmC,EAAE,YAAW;EACxDC,EAAE,CAAC,wCAAwC,EAAE,YAAW;IACvDC,MAAM,CAAC,MAAM,IAAIC,cAAc,CAAC,CAAC,CAAC,CAACC,EAAE,CAACC,KAAK,CAAC,qBAAqB,CAAC;EACnE,CAAC,CAAC;EAEFJ,EAAE,CAAC,uCAAuC,EAAE,YAAW;IACtD,MAAMK,OAAO,GAAG,IAAIH,cAAc,CAAC,GAAG,CAAC;IACvCD,MAAM,CAAC,MAAMI,OAAO,CAACC,KAAK,CAAC,CAAC,CAAC,CAACH,EAAE,CAACC,KAAK,CAAC,oBAAoB,CAAC;EAC7D,CAAC,CAAC;EAEFJ,EAAE,CAAC,oCAAoC,EAAE,YAAW;IACnDC,MAAM,CAAC,MAAM,IAAIC,cAAc,CAAC,SAAS,CAAC,CAAC,CAACC,EAAE,CAACC,KAAK,CAAC,oBAAoB,CAAC;EAC3E,CAAC,CAAC;EAEFJ,EAAE,CAAC,uCAAuC,EAAE,YAAW;IACtDC,MAAM,CAAC,MAAM,IAAIC,cAAc,CAAC,KAAK,CAAC,CAAC,CAACC,EAAE,CAACC,KAAK,CAAC,+CAA+C,CAAC;EAClG,CAAC,CAAC;EAEFJ,EAAE,C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CAACI,OAAO,CAACC,KAAK,CAAC,KAAK,CAAC,CAAC,CAACH,EAAE,CAACI,EAAE,CAACC,SAAS;IAE5CP,MAAM,CAACI,OAAO,CAACC,KAAK,CAAC,IAAI,CAAC,CAAC,CAACH,EAAE,CAACM,IAAI,CAACC,KAAK,CAAC;MACzCJ,KAAK,EAAE;IACR,CAAC,CAAC;IAEFL,MAAM,CAACI,OAAO,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAACH,EAAE,CAACM,IAAI,CAACC,KAAK,CAAC;MACxCJ,KAAK,EAAE;IACR,CAAC,CAAC;IAEFL,MAAM,CAACI,OAAO,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAACH,EAAE,CAACM,IAAI,CAACC,KAAK,CAAC;MACxCJ,KAAK,EAAE;IACR,CAAC,CAAC;EACH,CAAC,CAAC;EAEFN,EAAE,CAAC,+CAA+C,EAAE,YAAW;IAC9D;IACA;IACA;IACA;IACAC,MAAM,CAAC,IAAIC,cAAc,CAAC,GAAG,CAAC,CAACI,KAAK,CAAC,IAAI,EAAE;MAAEK,aAAa,EAAE;IAAK,CAAC,CAAC,CAAC,CAACR,EAAE,CAACI,EAAE,CAACC,SAAS;EACrF,CAAC,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,184 @@
1
+ export default class PatternParser {
2
+ parse(pattern) {
3
+ this.context = [{
4
+ or: true,
5
+ instructions: []
6
+ }];
7
+ this.parsePattern(pattern);
8
+ if (this.context.length !== 1) {
9
+ throw new Error('Non-finalized contexts left when pattern parse ended');
10
+ }
11
+ const {
12
+ branches,
13
+ instructions
14
+ } = this.context[0];
15
+ if (branches) {
16
+ return {
17
+ op: '|',
18
+ args: branches.concat([expandSingleElementArray(instructions)])
19
+ };
20
+ }
21
+
22
+ /* istanbul ignore if */
23
+ if (instructions.length === 0) {
24
+ throw new Error('Pattern is required');
25
+ }
26
+ if (instructions.length === 1) {
27
+ return instructions[0];
28
+ }
29
+ return instructions;
30
+ }
31
+ startContext(context) {
32
+ this.context.push(context);
33
+ }
34
+ endContext() {
35
+ this.context.pop();
36
+ }
37
+ getContext() {
38
+ return this.context[this.context.length - 1];
39
+ }
40
+ parsePattern(pattern) {
41
+ if (!pattern) {
42
+ throw new Error('Pattern is required');
43
+ }
44
+ const match = pattern.match(OPERATOR);
45
+ if (!match) {
46
+ if (ILLEGAL_CHARACTER_REGEXP.test(pattern)) {
47
+ throw new Error(`Illegal characters found in a pattern: ${pattern}`);
48
+ }
49
+ this.getContext().instructions = this.getContext().instructions.concat(pattern.split(''));
50
+ return;
51
+ }
52
+ const operator = match[1];
53
+ const before = pattern.slice(0, match.index);
54
+ const rightPart = pattern.slice(match.index + operator.length);
55
+ switch (operator) {
56
+ case '(?:':
57
+ if (before) {
58
+ this.parsePattern(before);
59
+ }
60
+ this.startContext({
61
+ or: true,
62
+ instructions: [],
63
+ branches: []
64
+ });
65
+ break;
66
+ case ')':
67
+ if (!this.getContext().or) {
68
+ throw new Error('")" operator must be preceded by "(?:" operator');
69
+ }
70
+ if (before) {
71
+ this.parsePattern(before);
72
+ }
73
+ if (this.getContext().instructions.length === 0) {
74
+ throw new Error('No instructions found after "|" operator in an "or" group');
75
+ }
76
+ const {
77
+ branches
78
+ } = this.getContext();
79
+ branches.push(expandSingleElementArray(this.getContext().instructions));
80
+ this.endContext();
81
+ this.getContext().instructions.push({
82
+ op: '|',
83
+ args: branches
84
+ });
85
+ break;
86
+ case '|':
87
+ if (!this.getContext().or) {
88
+ throw new Error('"|" operator can only be used inside "or" groups');
89
+ }
90
+ if (before) {
91
+ this.parsePattern(before);
92
+ }
93
+ // The top-level is an implicit "or" group, if required.
94
+ if (!this.getContext().branches) {
95
+ // `branches` are not defined only for the root implicit "or" operator.
96
+ /* istanbul ignore else */
97
+ if (this.context.length === 1) {
98
+ this.getContext().branches = [];
99
+ } else {
100
+ throw new Error('"branches" not found in an "or" group context');
101
+ }
102
+ }
103
+ this.getContext().branches.push(expandSingleElementArray(this.getContext().instructions));
104
+ this.getContext().instructions = [];
105
+ break;
106
+ case '[':
107
+ if (before) {
108
+ this.parsePattern(before);
109
+ }
110
+ this.startContext({
111
+ oneOfSet: true
112
+ });
113
+ break;
114
+ case ']':
115
+ if (!this.getContext().oneOfSet) {
116
+ throw new Error('"]" operator must be preceded by "[" operator');
117
+ }
118
+ this.endContext();
119
+ this.getContext().instructions.push({
120
+ op: '[]',
121
+ args: parseOneOfSet(before)
122
+ });
123
+ break;
124
+
125
+ /* istanbul ignore next */
126
+ default:
127
+ throw new Error(`Unknown operator: ${operator}`);
128
+ }
129
+ if (rightPart) {
130
+ this.parsePattern(rightPart);
131
+ }
132
+ }
133
+ }
134
+ function parseOneOfSet(pattern) {
135
+ const values = [];
136
+ let i = 0;
137
+ while (i < pattern.length) {
138
+ if (pattern[i] === '-') {
139
+ if (i === 0 || i === pattern.length - 1) {
140
+ throw new Error(`Couldn't parse a one-of set pattern: ${pattern}`);
141
+ }
142
+ const prevValue = pattern[i - 1].charCodeAt(0) + 1;
143
+ const nextValue = pattern[i + 1].charCodeAt(0) - 1;
144
+ let value = prevValue;
145
+ while (value <= nextValue) {
146
+ values.push(String.fromCharCode(value));
147
+ value++;
148
+ }
149
+ } else {
150
+ values.push(pattern[i]);
151
+ }
152
+ i++;
153
+ }
154
+ return values;
155
+ }
156
+ const ILLEGAL_CHARACTER_REGEXP = /[\(\)\[\]\?\:\|]/;
157
+ const OPERATOR = new RegExp(
158
+ // any of:
159
+ '(' +
160
+ // or operator
161
+ '\\|' +
162
+ // or
163
+ '|' +
164
+ // or group start
165
+ '\\(\\?\\:' +
166
+ // or
167
+ '|' +
168
+ // or group end
169
+ '\\)' +
170
+ // or
171
+ '|' +
172
+ // one-of set start
173
+ '\\[' +
174
+ // or
175
+ '|' +
176
+ // one-of set end
177
+ '\\]' + ')');
178
+ function expandSingleElementArray(array) {
179
+ if (array.length === 1) {
180
+ return array[0];
181
+ }
182
+ return array;
183
+ }
184
+ //# sourceMappingURL=AsYouTypeFormatter.PatternParser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AsYouTypeFormatter.PatternParser.js","names":["PatternParser","parse","pattern","context","or","instructions","parsePattern","length","Error","branches","op","args","concat","expandSingleElementArray","startContext","push","endContext","pop","getContext","match","OPERATOR","ILLEGAL_CHARACTER_REGEXP","test","split","operator","before","slice","index","rightPart","oneOfSet","parseOneOfSet","values","i","prevValue","charCodeAt","nextValue","value","String","fromCharCode","RegExp","array"],"sources":["../source/AsYouTypeFormatter.PatternParser.js"],"sourcesContent":["export default class PatternParser {\r\n\tparse(pattern) {\r\n\t\tthis.context = [{\r\n\t\t\tor: true,\r\n\t\t\tinstructions: []\r\n\t\t}]\r\n\r\n\t\tthis.parsePattern(pattern)\r\n\r\n\t\tif (this.context.length !== 1) {\r\n\t\t\tthrow new Error('Non-finalized contexts left when pattern parse ended')\r\n\t\t}\r\n\r\n\t\tconst { branches, instructions } = this.context[0]\r\n\r\n\t\tif (branches) {\r\n\t\t\treturn {\r\n\t\t\t\top: '|',\r\n\t\t\t\targs: branches.concat([\r\n\t\t\t\t\texpandSingleElementArray(instructions)\r\n\t\t\t\t])\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/* istanbul ignore if */\r\n\t\tif (instructions.length === 0) {\r\n\t\t\tthrow new Error('Pattern is required')\r\n\t\t}\r\n\r\n\t\tif (instructions.length === 1) {\r\n\t\t\treturn instructions[0]\r\n\t\t}\r\n\r\n\t\treturn instructions\r\n\t}\r\n\r\n\tstartContext(context) {\r\n\t\tthis.context.push(context)\r\n\t}\r\n\r\n\tendContext() {\r\n\t\tthis.context.pop()\r\n\t}\r\n\r\n\tgetContext() {\r\n\t\treturn this.context[this.context.length - 1]\r\n\t}\r\n\r\n\tparsePattern(pattern) {\r\n\t\tif (!pattern) {\r\n\t\t\tthrow new Error('Pattern is required')\r\n\t\t}\r\n\r\n\t\tconst match = pattern.match(OPERATOR)\r\n\t\tif (!match) {\r\n\t\t\tif (ILLEGAL_CHARACTER_REGEXP.test(pattern)) {\r\n\t\t\t\tthrow new Error(`Illegal characters found in a pattern: ${pattern}`)\r\n\t\t\t}\r\n\t\t\tthis.getContext().instructions = this.getContext().instructions.concat(\r\n\t\t\t\tpattern.split('')\r\n\t\t\t)\r\n\t\t\treturn\r\n\t\t}\r\n\r\n\t\tconst operator = match[1]\r\n\t\tconst before = pattern.slice(0, match.index)\r\n\t\tconst rightPart = pattern.slice(match.index + operator.length)\r\n\r\n\t\tswitch (operator) {\r\n\t\t\tcase '(?:':\r\n\t\t\t\tif (before) {\r\n\t\t\t\t\tthis.parsePattern(before)\r\n\t\t\t\t}\r\n\t\t\t\tthis.startContext({\r\n\t\t\t\t\tor: true,\r\n\t\t\t\t\tinstructions: [],\r\n\t\t\t\t\tbranches: []\r\n\t\t\t\t})\r\n\t\t\t\tbreak\r\n\r\n\t\t\tcase ')':\r\n\t\t\t\tif (!this.getContext().or) {\r\n\t\t\t\t\tthrow new Error('\")\" operator must be preceded by \"(?:\" operator')\r\n\t\t\t\t}\r\n\t\t\t\tif (before) {\r\n\t\t\t\t\tthis.parsePattern(before)\r\n\t\t\t\t}\r\n\t\t\t\tif (this.getContext().instructions.length === 0) {\r\n\t\t\t\t\tthrow new Error('No instructions found after \"|\" operator in an \"or\" group')\r\n\t\t\t\t}\r\n\t\t\t\tconst { branches } = this.getContext()\r\n\t\t\t\tbranches.push(\r\n\t\t\t\t\texpandSingleElementArray(\r\n\t\t\t\t\t\tthis.getContext().instructions\r\n\t\t\t\t\t)\r\n\t\t\t\t)\r\n\t\t\t\tthis.endContext()\r\n\t\t\t\tthis.getContext().instructions.push({\r\n\t\t\t\t\top: '|',\r\n\t\t\t\t\targs: branches\r\n\t\t\t\t})\r\n\t\t\t\tbreak\r\n\r\n\t\t\tcase '|':\r\n\t\t\t\tif (!this.getContext().or) {\r\n\t\t\t\t\tthrow new Error('\"|\" operator can only be used inside \"or\" groups')\r\n\t\t\t\t}\r\n\t\t\t\tif (before) {\r\n\t\t\t\t\tthis.parsePattern(before)\r\n\t\t\t\t}\r\n\t\t\t\t// The top-level is an implicit \"or\" group, if required.\r\n\t\t\t\tif (!this.getContext().branches) {\r\n\t\t\t\t\t// `branches` are not defined only for the root implicit \"or\" operator.\r\n\t\t\t\t\t/* istanbul ignore else */\r\n\t\t\t\t\tif (this.context.length === 1) {\r\n\t\t\t\t\t\tthis.getContext().branches = []\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthrow new Error('\"branches\" not found in an \"or\" group context')\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tthis.getContext().branches.push(\r\n\t\t\t\t\texpandSingleElementArray(\r\n\t\t\t\t\t\tthis.getContext().instructions\r\n\t\t\t\t\t)\r\n\t\t\t\t)\r\n\t\t\t\tthis.getContext().instructions = []\r\n\t\t\t\tbreak\r\n\r\n\t\t\tcase '[':\r\n\t\t\t\tif (before) {\r\n\t\t\t\t\tthis.parsePattern(before)\r\n\t\t\t\t}\r\n\t\t\t\tthis.startContext({\r\n\t\t\t\t\toneOfSet: true\r\n\t\t\t\t})\r\n\t\t\t\tbreak\r\n\r\n\t\t\tcase ']':\r\n\t\t\t\tif (!this.getContext().oneOfSet) {\r\n\t\t\t\t\tthrow new Error('\"]\" operator must be preceded by \"[\" operator')\r\n\t\t\t\t}\r\n\t\t\t\tthis.endContext()\r\n\t\t\t\tthis.getContext().instructions.push({\r\n\t\t\t\t\top: '[]',\r\n\t\t\t\t\targs: parseOneOfSet(before)\r\n\t\t\t\t})\r\n\t\t\t\tbreak\r\n\r\n\t\t\t/* istanbul ignore next */\r\n\t\t\tdefault:\r\n\t\t\t\tthrow new Error(`Unknown operator: ${operator}`)\r\n\t\t}\r\n\r\n\t\tif (rightPart) {\r\n\t\t\tthis.parsePattern(rightPart)\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction parseOneOfSet(pattern) {\r\n\tconst values = []\r\n\tlet i = 0\r\n\twhile (i < pattern.length) {\r\n\t\tif (pattern[i] === '-') {\r\n\t\t\tif (i === 0 || i === pattern.length - 1) {\r\n\t\t\t\tthrow new Error(`Couldn't parse a one-of set pattern: ${pattern}`)\r\n\t\t\t}\r\n\t\t\tconst prevValue = pattern[i - 1].charCodeAt(0) + 1\r\n\t\t\tconst nextValue = pattern[i + 1].charCodeAt(0) - 1\r\n\t\t\tlet value = prevValue\r\n\t\t\twhile (value <= nextValue) {\r\n\t\t\t\tvalues.push(String.fromCharCode(value))\r\n\t\t\t\tvalue++\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvalues.push(pattern[i])\r\n\t\t}\r\n\t\ti++\r\n\t}\r\n\treturn values\r\n}\r\n\r\nconst ILLEGAL_CHARACTER_REGEXP = /[\\(\\)\\[\\]\\?\\:\\|]/\r\n\r\nconst OPERATOR = new RegExp(\r\n\t// any of:\r\n\t'(' +\r\n\t\t// or operator\r\n\t\t'\\\\|' +\r\n\t\t// or\r\n\t\t'|' +\r\n\t\t// or group start\r\n\t\t'\\\\(\\\\?\\\\:' +\r\n\t\t// or\r\n\t\t'|' +\r\n\t\t// or group end\r\n\t\t'\\\\)' +\r\n\t\t// or\r\n\t\t'|' +\r\n\t\t// one-of set start\r\n\t\t'\\\\[' +\r\n\t\t// or\r\n\t\t'|' +\r\n\t\t// one-of set end\r\n\t\t'\\\\]' +\r\n\t')'\r\n)\r\n\r\nfunction expandSingleElementArray(array) {\r\n\tif (array.length === 1) {\r\n\t\treturn array[0]\r\n\t}\r\n\treturn array\r\n}"],"mappings":"AAAA,eAAe,MAAMA,aAAa,CAAC;EAClCC,KAAKA,CAACC,OAAO,EAAE;IACd,IAAI,CAACC,OAAO,GAAG,CAAC;MACfC,EAAE,EAAE,IAAI;MACRC,YAAY,EAAE;IACf,CAAC,CAAC;IAEF,IAAI,CAACC,YAAY,CAACJ,OAAO,CAAC;IAE1B,IAAI,IAAI,CAACC,OAAO,CAACI,MAAM,KAAK,CAAC,EAAE;MAC9B,MAAM,IAAIC,KAAK,CAAC,sDAAsD,CAAC;IACxE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1B,wBAAwBA,CAAC2B,KAAK,EAAE;EACxC,IAAIA,KAAK,CAACjC,MAAM,KAAK,CAAC,EAAE;IACvB,OAAOiC,KAAK,CAAC,CAAC,CAAC;EAChB;EACA,OAAOA,KAAK;AACb","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AsYouTypeFormatter.PatternParser.test.js","names":["describe","it","expect","PatternParser","parse","to","equal","deep","op","args"],"sources":["../source/AsYouTypeFormatter.PatternParser.test.js"],"sourcesContent":["import { describe, it } from 'mocha'\r\nimport { expect } from 'chai'\r\n\r\nimport PatternParser from './AsYouTypeFormatter.PatternParser.js'\r\n\r\ndescribe('PatternParser', function() {\r\n\tit('should parse single-character patterns', function() {\r\n\t\texpect(new PatternParser().parse('2')).to.equal('2')\r\n\t})\r\n\r\n\tit('should parse string patterns', function() {\r\n\t\texpect(new PatternParser().parse('123')).to.deep.equal(['1', '2', '3'])\r\n\t})\r\n\r\n\tit('should parse \"one of\" patterns', function() {\r\n\t\texpect(new PatternParser().parse('[5-9]')).to.deep.equal({\r\n\t\t\top: '[]',\r\n\t\t\targs: ['5', '6', '7', '8', '9']\r\n\t\t})\r\n\t})\r\n\r\n\tit('should parse \"or\" patterns', function() {\r\n\t\texpect(new PatternParser().parse('123|[5-9]')).to.deep.equal({\r\n\t\t\top: '|',\r\n\t\t\targs: [\r\n\t\t\t\t['1', '2', '3'],\r\n\t\t\t\t{\r\n\t\t\t\t\top: '[]',\r\n\t\t\t\t\targs: ['5', '6', '7', '8', '9']\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t})\r\n\r\n\t\texpect(new PatternParser().parse('123|[5-9]0')).to.deep.equal({\r\n\t\t\top: '|',\r\n\t\t\targs: [\r\n\t\t\t\t['1', '2', '3'],\r\n\t\t\t\t[\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\top: '[]',\r\n\t\t\t\t\t\targs: ['5', '6', '7', '8', '9']\r\n\t\t\t\t\t},\r\n\t\t\t\t\t'0'\r\n\t\t\t\t]\r\n\t\t\t]\r\n\t\t})\r\n\t})\r\n\r\n\tit('should parse nested \"or\" patterns', function() {\r\n\t\texpect(new PatternParser().parse('123|(?:2|34)[5-9]')).to.deep.equal({\r\n\t\t\top: '|',\r\n\t\t\targs: [\r\n\t\t\t\t['1', '2', '3'],\r\n\t\t\t\t[\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\top: '|',\r\n\t\t\t\t\t\targs: [\r\n\t\t\t\t\t\t\t'2',\r\n\t\t\t\t\t\t\t['3', '4']\r\n\t\t\t\t\t\t]\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\top: '[]',\r\n\t\t\t\t\t\targs: ['5', '6', '7', '8', '9']\r\n\t\t\t\t\t}\r\n\t\t\t\t]\r\n\t\t\t]\r\n\t\t})\r\n\t})\r\n})"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,EAAE,QAAQ,OAAO;AACpC,SAASC,MAAM,QAAQ,MAAM;AAE7B,OAAOC,aAAa,MAAM,uCAAuC;AAEjEH,QAAQ,CAAC,eAAe,EAAE,YAAW;EACpCC,EAAE,CAAC,wCAAwC,EAAE,YAAW;IACvDC,MAAM,CAAC,IAAIC,aAAa,CAAC,CAAC,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAACC,EAAE,CAACC,KAAK,CAAC,GAAG,CAAC;EACrD,CAAC,CAAC;EAEFL,EAAE,CAAC,8BAA8B,EAAE,YAAW;IAC7CC,MAAM,CAAC,IAAIC,aAAa,CAAC,CAAC,CAACC,KAAK,CAAC,KAAK,CAAC,CAAC,CAACC,EAAE,CAACE,IAAI,CAACD,KAAK,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;EACxE,CAAC,CAAC;EAEFL,EAAE,CAAC,gCAAgC,EAAE,YAAW;IAC/CC,MAAM,CAAC,IAAIC,aAAa,CAAC,CAAC,CAACC,KAAK,CAAC,OAAO,CAAC,CAAC,CAACC,EAAE,CAACE,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AG;QACPC,IAAI,EAAE,CACL,GAAG,EACH,CAAC,GAAG,EAAE,GAAG,CAAC;MAEZ,CAAC,EACD;QACCD,EAAE,EAAE,IAAI;QACRC,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;MAC/B,CAAC,CACD;IAEH,CAAC,CAAC;EACH,CAAC,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,120 @@
1
+ import checkNumberLength from './helpers/checkNumberLength.js';
2
+ import parseDigits from './helpers/parseDigits.js';
3
+ import formatNationalNumberUsingFormat from './helpers/formatNationalNumberUsingFormat.js';
4
+ export default function formatCompleteNumber(state, format, {
5
+ metadata,
6
+ shouldTryNationalPrefixFormattingRule,
7
+ getSeparatorAfterNationalPrefix
8
+ }) {
9
+ const matcher = new RegExp(`^(?:${format.pattern()})$`);
10
+ if (matcher.test(state.nationalSignificantNumber)) {
11
+ return formatNationalNumberWithAndWithoutNationalPrefixFormattingRule(state, format, {
12
+ metadata,
13
+ shouldTryNationalPrefixFormattingRule,
14
+ getSeparatorAfterNationalPrefix
15
+ });
16
+ }
17
+ }
18
+ export function canFormatCompleteNumber(nationalSignificantNumber, country, metadata) {
19
+ return checkNumberLength(nationalSignificantNumber, country, metadata) === 'IS_POSSIBLE';
20
+ }
21
+ function formatNationalNumberWithAndWithoutNationalPrefixFormattingRule(state, format, {
22
+ metadata,
23
+ shouldTryNationalPrefixFormattingRule,
24
+ getSeparatorAfterNationalPrefix
25
+ }) {
26
+ // `format` has already been checked for `nationalPrefix` requirement.
27
+
28
+ const {
29
+ nationalSignificantNumber,
30
+ international,
31
+ nationalPrefix,
32
+ carrierCode
33
+ } = state;
34
+
35
+ // Format the number with using `national_prefix_formatting_rule`.
36
+ // If the resulting formatted number is a valid formatted number, then return it.
37
+ //
38
+ // Google's AsYouType formatter is different in a way that it doesn't try
39
+ // to format using the "national prefix formatting rule", and instead it
40
+ // simply prepends a national prefix followed by a " " character.
41
+ // This code does that too, but as a fallback.
42
+ // The reason is that "national prefix formatting rule" may use parentheses,
43
+ // which wouldn't be included has it used the simpler Google's way.
44
+ //
45
+ if (shouldTryNationalPrefixFormattingRule(format)) {
46
+ const formattedNumber = formatNationalNumber(state, format, {
47
+ useNationalPrefixFormattingRule: true,
48
+ getSeparatorAfterNationalPrefix,
49
+ metadata
50
+ });
51
+ if (formattedNumber) {
52
+ return formattedNumber;
53
+ }
54
+ }
55
+
56
+ // Format the number without using `national_prefix_formatting_rule`.
57
+ return formatNationalNumber(state, format, {
58
+ useNationalPrefixFormattingRule: false,
59
+ getSeparatorAfterNationalPrefix,
60
+ metadata
61
+ });
62
+ }
63
+ function formatNationalNumber(state, format, {
64
+ metadata,
65
+ useNationalPrefixFormattingRule,
66
+ getSeparatorAfterNationalPrefix
67
+ }) {
68
+ let formattedNationalNumber = formatNationalNumberUsingFormat(state.nationalSignificantNumber, format, {
69
+ carrierCode: state.carrierCode,
70
+ useInternationalFormat: state.international,
71
+ withNationalPrefix: useNationalPrefixFormattingRule,
72
+ metadata
73
+ });
74
+ if (!useNationalPrefixFormattingRule) {
75
+ if (state.nationalPrefix) {
76
+ // If a national prefix was extracted, then just prepend it,
77
+ // followed by a " " character.
78
+ formattedNationalNumber = state.nationalPrefix + getSeparatorAfterNationalPrefix(format) + formattedNationalNumber;
79
+ } else if (state.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix) {
80
+ formattedNationalNumber = state.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix + ' ' + formattedNationalNumber;
81
+ }
82
+ }
83
+ if (isValidFormattedNationalNumber(formattedNationalNumber, state)) {
84
+ return formattedNationalNumber;
85
+ }
86
+ }
87
+
88
+ // Check that the formatted phone number contains exactly
89
+ // the same digits that have been input by the user.
90
+ // For example, when "0111523456789" is input for `AR` country,
91
+ // the extracted `this.nationalSignificantNumber` is "91123456789",
92
+ // which means that the national part of `this.digits` isn't simply equal to
93
+ // `this.nationalPrefix` + `this.nationalSignificantNumber`.
94
+ //
95
+ // Also, a `format` can add extra digits to the `this.nationalSignificantNumber`
96
+ // being formatted via `metadata[country].national_prefix_transform_rule`.
97
+ // For example, for `VI` country, it prepends `340` to the national number,
98
+ // and if this check hasn't been implemented, then there would be a bug
99
+ // when `340` "area coude" is "duplicated" during input for `VI` country:
100
+ // https://github.com/catamphetamine/libphonenumber-js/issues/318
101
+ //
102
+ // So, all these "gotchas" are filtered out.
103
+ //
104
+ // In the original Google's code, the comments say:
105
+ // "Check that we didn't remove nor add any extra digits when we matched
106
+ // this formatting pattern. This usually happens after we entered the last
107
+ // digit during AYTF. Eg: In case of MX, we swallow mobile token (1) when
108
+ // formatted but AYTF should retain all the number entered and not change
109
+ // in order to match a format (of same leading digits and length) display
110
+ // in that way."
111
+ // "If it's the same (i.e entered number and format is same), then it's
112
+ // safe to return this in formatted number as nothing is lost / added."
113
+ // Otherwise, don't use this format.
114
+ // https://github.com/google/libphonenumber/commit/3e7c1f04f5e7200f87fb131e6f85c6e99d60f510#diff-9149457fa9f5d608a11bb975c6ef4bc5
115
+ // https://github.com/google/libphonenumber/commit/3ac88c7106e7dcb553bcc794b15f19185928a1c6#diff-2dcb77e833422ee304da348b905cde0b
116
+ //
117
+ function isValidFormattedNationalNumber(formattedNationalNumber, state) {
118
+ return parseDigits(formattedNationalNumber) === state.getNationalDigits();
119
+ }
120
+ //# sourceMappingURL=AsYouTypeFormatter.complete.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AsYouTypeFormatter.complete.js","names":["checkNumberLength","parseDigits","formatNationalNumberUsingFormat","formatCompleteNumber","state","format","metadata","shouldTryNationalPrefixFormattingRule","getSeparatorAfterNationalPrefix","matcher","RegExp","pattern","test","nationalSignificantNumber","formatNationalNumberWithAndWithoutNationalPrefixFormattingRule","canFormatCompleteNumber","country","international","nationalPrefix","carrierCode","formattedNumber","formatNationalNumber","useNationalPrefixFormattingRule","formattedNationalNumber","useInternationalFormat","withNationalPrefix","prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix","isValidFormattedNationalNumber","getNationalDigits"],"sources":["../source/AsYouTypeFormatter.complete.js"],"sourcesContent":["import checkNumberLength from './helpers/checkNumberLength.js'\r\nimport parseDigits from './helpers/parseDigits.js'\r\nimport formatNationalNumberUsingFormat from './helpers/formatNationalNumberUsingFormat.js'\r\n\r\nexport default function formatCompleteNumber(state, format, {\r\n\tmetadata,\r\n\tshouldTryNationalPrefixFormattingRule,\r\n\tgetSeparatorAfterNationalPrefix\r\n}) {\r\n\tconst matcher = new RegExp(`^(?:${format.pattern()})$`)\r\n\tif (matcher.test(state.nationalSignificantNumber)) {\r\n\t\treturn formatNationalNumberWithAndWithoutNationalPrefixFormattingRule(\r\n\t\t\tstate,\r\n\t\t\tformat,\r\n\t\t\t{\r\n\t\t\t\tmetadata,\r\n\t\t\t\tshouldTryNationalPrefixFormattingRule,\r\n\t\t\t\tgetSeparatorAfterNationalPrefix\r\n\t\t\t}\r\n\t\t)\r\n\t}\r\n}\r\n\r\nexport function canFormatCompleteNumber(nationalSignificantNumber, country, metadata) {\r\n\treturn checkNumberLength(nationalSignificantNumber, country, metadata) === 'IS_POSSIBLE'\r\n}\r\n\r\nfunction formatNationalNumberWithAndWithoutNationalPrefixFormattingRule(state, format, {\r\n\tmetadata,\r\n\tshouldTryNationalPrefixFormattingRule,\r\n\tgetSeparatorAfterNationalPrefix\r\n}) {\r\n\t// `format` has already been checked for `nationalPrefix` requirement.\r\n\r\n\tconst {\r\n\t\tnationalSignificantNumber,\r\n\t\tinternational,\r\n\t\tnationalPrefix,\r\n\t\tcarrierCode\r\n\t} = state\r\n\r\n\t// Format the number with using `national_prefix_formatting_rule`.\r\n\t// If the resulting formatted number is a valid formatted number, then return it.\r\n\t//\r\n\t// Google's AsYouType formatter is different in a way that it doesn't try\r\n\t// to format using the \"national prefix formatting rule\", and instead it\r\n\t// simply prepends a national prefix followed by a \" \" character.\r\n\t// This code does that too, but as a fallback.\r\n\t// The reason is that \"national prefix formatting rule\" may use parentheses,\r\n\t// which wouldn't be included has it used the simpler Google's way.\r\n\t//\r\n\tif (shouldTryNationalPrefixFormattingRule(format)) {\r\n\t\tconst formattedNumber = formatNationalNumber(state, format, {\r\n\t\t\tuseNationalPrefixFormattingRule: true,\r\n\t\t\tgetSeparatorAfterNationalPrefix,\r\n\t\t\tmetadata\r\n\t\t})\r\n\t\tif (formattedNumber) {\r\n\t\t\treturn formattedNumber\r\n\t\t}\r\n\t}\r\n\r\n\t// Format the number without using `national_prefix_formatting_rule`.\r\n\treturn formatNationalNumber(state, format, {\r\n\t\tuseNationalPrefixFormattingRule: false,\r\n\t\tgetSeparatorAfterNationalPrefix,\r\n\t\tmetadata\r\n\t})\r\n}\r\n\r\nfunction formatNationalNumber(state, format, {\r\n\tmetadata,\r\n\tuseNationalPrefixFormattingRule,\r\n\tgetSeparatorAfterNationalPrefix\r\n}) {\r\n\tlet formattedNationalNumber = formatNationalNumberUsingFormat(\r\n\t\tstate.nationalSignificantNumber,\r\n\t\tformat,\r\n\t\t{\r\n\t\t\tcarrierCode: state.carrierCode,\r\n\t\t\tuseInternationalFormat: state.international,\r\n\t\t\twithNationalPrefix: useNationalPrefixFormattingRule,\r\n\t\t\tmetadata\r\n\t\t}\r\n\t)\r\n\tif (!useNationalPrefixFormattingRule) {\r\n\t\tif (state.nationalPrefix) {\r\n\t\t\t// If a national prefix was extracted, then just prepend it,\r\n\t\t\t// followed by a \" \" character.\r\n\t\t\tformattedNationalNumber = state.nationalPrefix +\r\n\t\t\t\tgetSeparatorAfterNationalPrefix(format) +\r\n\t\t\t\tformattedNationalNumber\r\n\t\t} else if (state.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix) {\r\n\t\t\tformattedNationalNumber = state.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix +\r\n\t\t\t\t' ' +\r\n\t\t\t\tformattedNationalNumber\r\n\t\t}\r\n\t}\r\n\tif (isValidFormattedNationalNumber(formattedNationalNumber, state)) {\r\n\t\treturn formattedNationalNumber\r\n\t}\r\n}\r\n\r\n// Check that the formatted phone number contains exactly\r\n// the same digits that have been input by the user.\r\n// For example, when \"0111523456789\" is input for `AR` country,\r\n// the extracted `this.nationalSignificantNumber` is \"91123456789\",\r\n// which means that the national part of `this.digits` isn't simply equal to\r\n// `this.nationalPrefix` + `this.nationalSignificantNumber`.\r\n//\r\n// Also, a `format` can add extra digits to the `this.nationalSignificantNumber`\r\n// being formatted via `metadata[country].national_prefix_transform_rule`.\r\n// For example, for `VI` country, it prepends `340` to the national number,\r\n// and if this check hasn't been implemented, then there would be a bug\r\n// when `340` \"area coude\" is \"duplicated\" during input for `VI` country:\r\n// https://github.com/catamphetamine/libphonenumber-js/issues/318\r\n//\r\n// So, all these \"gotchas\" are filtered out.\r\n//\r\n// In the original Google's code, the comments say:\r\n// \"Check that we didn't remove nor add any extra digits when we matched\r\n// this formatting pattern. This usually happens after we entered the last\r\n// digit during AYTF. Eg: In case of MX, we swallow mobile token (1) when\r\n// formatted but AYTF should retain all the number entered and not change\r\n// in order to match a format (of same leading digits and length) display\r\n// in that way.\"\r\n// \"If it's the same (i.e entered number and format is same), then it's\r\n// safe to return this in formatted number as nothing is lost / added.\"\r\n// Otherwise, don't use this format.\r\n// https://github.com/google/libphonenumber/commit/3e7c1f04f5e7200f87fb131e6f85c6e99d60f510#diff-9149457fa9f5d608a11bb975c6ef4bc5\r\n// https://github.com/google/libphonenumber/commit/3ac88c7106e7dcb553bcc794b15f19185928a1c6#diff-2dcb77e833422ee304da348b905cde0b\r\n//\r\nfunction isValidFormattedNationalNumber(formattedNationalNumber, state) {\r\n\treturn parseDigits(formattedNationalNumber) === state.getNationalDigits()\r\n}"],"mappings":"AAAA,OAAOA,iBAAiB,MAAM,gCAAgC;AAC9D,OAAOC,WAAW,MAAM,0BAA0B;AAClD,OAAOC,+BAA+B,MAAM,8CAA8C;AAE1F,eAAe,SAASC,oBAAoBA,CAACC,KAAK,EAAEC,MAAM,EAAE;EAC3DC,QAAQ;EACRC,qCAAq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