pixel-react 1.15.11 → 1.15.12

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 (249) hide show
  1. package/README.md +75 -75
  2. package/lib/ThirdPartyPackages/JanusGateway.js +5 -2
  3. package/lib/ThirdPartyPackages/JanusGateway.js.map +1 -1
  4. package/lib/_virtual/index10.js +2 -2
  5. package/lib/_virtual/index11.js +2 -2
  6. package/lib/_virtual/index12.js +2 -2
  7. package/lib/_virtual/index9.js +2 -2
  8. package/lib/assets/icons/spinner.svg.js +1 -1
  9. package/lib/assets/icons/spinner.svg.js.map +1 -1
  10. package/lib/components/Editor/VariableDropdown.js +2 -2
  11. package/lib/index.cjs +7209 -4574
  12. package/lib/index.cjs.map +1 -1
  13. package/lib/index.js +1 -1
  14. package/lib/node_modules/@date-fns/tz/date/index.js +19 -1
  15. package/lib/node_modules/@date-fns/tz/date/index.js.map +1 -1
  16. package/lib/node_modules/@date-fns/tz/date/mini.js +6 -34
  17. package/lib/node_modules/@date-fns/tz/date/mini.js.map +1 -1
  18. package/lib/node_modules/@date-fns/tz/tzOffset/index.js +5 -6
  19. package/lib/node_modules/@date-fns/tz/tzOffset/index.js.map +1 -1
  20. package/lib/node_modules/janus-gateway/npm/dist/janus.es.js +3241 -0
  21. package/lib/node_modules/janus-gateway/npm/dist/janus.es.js.map +1 -0
  22. package/lib/node_modules/js-beautify/js/src/css/index.js +1 -1
  23. package/lib/node_modules/js-beautify/js/src/css/options.js +1 -1
  24. package/lib/node_modules/js-beautify/js/src/html/beautifier.js +1 -1
  25. package/lib/node_modules/js-beautify/js/src/html/index.js +1 -1
  26. package/lib/node_modules/js-beautify/js/src/html/options.js +1 -1
  27. package/lib/node_modules/js-beautify/js/src/html/tokenizer.js +1 -1
  28. package/lib/node_modules/js-beautify/js/src/javascript/beautifier.js +1 -1
  29. package/lib/node_modules/js-beautify/js/src/javascript/index.js +1 -1
  30. package/lib/node_modules/js-beautify/js/src/javascript/options.js +1 -1
  31. package/lib/node_modules/js-beautify/js/src/javascript/tokenizer.js +1 -1
  32. package/lib/node_modules/libphonenumber-js/es6/AsYouType.js +82 -115
  33. package/lib/node_modules/libphonenumber-js/es6/AsYouType.js.map +1 -1
  34. package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternMatcher.js +58 -68
  35. package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternMatcher.js.map +1 -1
  36. package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternParser.js +23 -36
  37. package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternParser.js.map +1 -1
  38. package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.complete.js +9 -13
  39. package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.complete.js.map +1 -1
  40. package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.js +187 -226
  41. package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.js.map +1 -1
  42. package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.util.js +27 -21
  43. package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.util.js.map +1 -1
  44. package/lib/node_modules/libphonenumber-js/es6/AsYouTypeParser.js +117 -150
  45. package/lib/node_modules/libphonenumber-js/es6/AsYouTypeParser.js.map +1 -1
  46. package/lib/node_modules/libphonenumber-js/es6/AsYouTypeState.js +38 -57
  47. package/lib/node_modules/libphonenumber-js/es6/AsYouTypeState.js.map +1 -1
  48. package/lib/node_modules/libphonenumber-js/es6/ParseError.js +109 -70
  49. package/lib/node_modules/libphonenumber-js/es6/ParseError.js.map +1 -1
  50. package/lib/node_modules/libphonenumber-js/es6/PhoneNumber.js +57 -72
  51. package/lib/node_modules/libphonenumber-js/es6/PhoneNumber.js.map +1 -1
  52. package/lib/node_modules/libphonenumber-js/es6/constants.js +9 -15
  53. package/lib/node_modules/libphonenumber-js/es6/constants.js.map +1 -1
  54. package/lib/node_modules/libphonenumber-js/es6/format.js +93 -67
  55. package/lib/node_modules/libphonenumber-js/es6/format.js.map +1 -1
  56. package/lib/node_modules/libphonenumber-js/es6/formatIncompletePhoneNumber.js +1 -0
  57. package/lib/node_modules/libphonenumber-js/es6/formatIncompletePhoneNumber.js.map +1 -1
  58. package/lib/node_modules/libphonenumber-js/es6/getCountries.js.map +1 -1
  59. package/lib/node_modules/libphonenumber-js/es6/helpers/RFC3966.js +1 -0
  60. package/lib/node_modules/libphonenumber-js/es6/helpers/RFC3966.js.map +1 -1
  61. package/lib/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js +1 -1
  62. package/lib/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js.map +1 -1
  63. package/lib/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js +10 -49
  64. package/lib/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js.map +1 -1
  65. package/lib/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js +32 -20
  66. package/lib/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js.map +1 -1
  67. package/lib/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js +4 -5
  68. package/lib/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js.map +1 -1
  69. package/lib/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js +18 -25
  70. package/lib/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js.map +1 -1
  71. package/lib/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +11 -12
  72. package/lib/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js.map +1 -1
  73. package/lib/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +11 -13
  74. package/lib/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js.map +1 -1
  75. package/lib/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js +11 -21
  76. package/lib/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js.map +1 -1
  77. package/lib/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +11 -12
  78. package/lib/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js.map +1 -1
  79. package/lib/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js +12 -15
  80. package/lib/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js.map +1 -1
  81. package/lib/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +1 -1
  82. package/lib/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js.map +1 -1
  83. package/lib/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +4 -4
  84. package/lib/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js.map +1 -1
  85. package/lib/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +35 -59
  86. package/lib/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js.map +1 -1
  87. package/lib/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js +2 -2
  88. package/lib/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js.map +1 -1
  89. package/lib/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +36 -38
  90. package/lib/node_modules/libphonenumber-js/es6/helpers/getNumberType.js.map +1 -1
  91. package/lib/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js +1 -0
  92. package/lib/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js.map +1 -1
  93. package/lib/node_modules/libphonenumber-js/es6/helpers/isObject.js.map +1 -1
  94. package/lib/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js +10 -14
  95. package/lib/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js.map +1 -1
  96. package/lib/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js +4 -4
  97. package/lib/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js.map +1 -1
  98. package/lib/node_modules/libphonenumber-js/es6/helpers/parseDigits.js +27 -22
  99. package/lib/node_modules/libphonenumber-js/es6/helpers/parseDigits.js.map +1 -1
  100. package/lib/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js +6 -6
  101. package/lib/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js.map +1 -1
  102. package/lib/node_modules/libphonenumber-js/es6/isPossible.js +7 -6
  103. package/lib/node_modules/libphonenumber-js/es6/isPossible.js.map +1 -1
  104. package/lib/node_modules/libphonenumber-js/es6/isValid.js +5 -6
  105. package/lib/node_modules/libphonenumber-js/es6/isValid.js.map +1 -1
  106. package/lib/node_modules/libphonenumber-js/es6/isValidPhoneNumber.js +26 -44
  107. package/lib/node_modules/libphonenumber-js/es6/isValidPhoneNumber.js.map +1 -1
  108. package/lib/node_modules/libphonenumber-js/es6/metadata.js +69 -120
  109. package/lib/node_modules/libphonenumber-js/es6/metadata.js.map +1 -1
  110. package/lib/node_modules/libphonenumber-js/es6/normalizeArguments.js +68 -87
  111. package/lib/node_modules/libphonenumber-js/es6/normalizeArguments.js.map +1 -1
  112. package/lib/node_modules/libphonenumber-js/es6/parse.js +40 -58
  113. package/lib/node_modules/libphonenumber-js/es6/parse.js.map +1 -1
  114. package/lib/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js +36 -32
  115. package/lib/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js.map +1 -1
  116. package/lib/node_modules/libphonenumber-js/es6/parsePhoneNumber.js.map +1 -1
  117. package/lib/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js +26 -44
  118. package/lib/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js.map +1 -1
  119. package/lib/node_modules/libphonenumber-js/es6/parsePhoneNumber_.js +28 -46
  120. package/lib/node_modules/libphonenumber-js/es6/parsePhoneNumber_.js.map +1 -1
  121. package/lib/node_modules/libphonenumber-js/es6/tools/semver-compare.js.map +1 -1
  122. package/lib/node_modules/libphonenumber-js/metadata.min.json.js +18 -18
  123. package/lib/node_modules/libphonenumber-js/metadata.min.json.js.map +1 -1
  124. package/lib/node_modules/prop-types/index.js +1 -1
  125. package/lib/node_modules/react-day-picker/dist/esm/DayPicker.js +64 -88
  126. package/lib/node_modules/react-day-picker/dist/esm/DayPicker.js.map +1 -1
  127. package/lib/node_modules/react-day-picker/dist/esm/UI.js.map +1 -1
  128. package/lib/node_modules/react-day-picker/dist/esm/classes/CalendarDay.js.map +1 -1
  129. package/lib/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js.map +1 -1
  130. package/lib/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js.map +1 -1
  131. package/lib/node_modules/react-day-picker/dist/esm/classes/DateLib.js +6 -71
  132. package/lib/node_modules/react-day-picker/dist/esm/classes/DateLib.js.map +1 -1
  133. package/lib/node_modules/react-day-picker/dist/esm/components/Button.js.map +1 -1
  134. package/lib/node_modules/react-day-picker/dist/esm/components/CaptionLabel.js.map +1 -1
  135. package/lib/node_modules/react-day-picker/dist/esm/components/Chevron.js +14 -18
  136. package/lib/node_modules/react-day-picker/dist/esm/components/Chevron.js.map +1 -1
  137. package/lib/node_modules/react-day-picker/dist/esm/components/Day.js.map +1 -1
  138. package/lib/node_modules/react-day-picker/dist/esm/components/DayButton.js.map +1 -1
  139. package/lib/node_modules/react-day-picker/dist/esm/components/Dropdown.js.map +1 -1
  140. package/lib/node_modules/react-day-picker/dist/esm/components/DropdownNav.js.map +1 -1
  141. package/lib/node_modules/react-day-picker/dist/esm/components/Footer.js.map +1 -1
  142. package/lib/node_modules/react-day-picker/dist/esm/components/Month.js.map +1 -1
  143. package/lib/node_modules/react-day-picker/dist/esm/components/MonthCaption.js.map +1 -1
  144. package/lib/node_modules/react-day-picker/dist/esm/components/MonthGrid.js.map +1 -1
  145. package/lib/node_modules/react-day-picker/dist/esm/components/Months.js.map +1 -1
  146. package/lib/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js.map +1 -1
  147. package/lib/node_modules/react-day-picker/dist/esm/components/Nav.js.map +1 -1
  148. package/lib/node_modules/react-day-picker/dist/esm/components/NextMonthButton.js.map +1 -1
  149. package/lib/node_modules/react-day-picker/dist/esm/components/Option.js.map +1 -1
  150. package/lib/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js.map +1 -1
  151. package/lib/node_modules/react-day-picker/dist/esm/components/Root.js.map +1 -1
  152. package/lib/node_modules/react-day-picker/dist/esm/components/Select.js.map +1 -1
  153. package/lib/node_modules/react-day-picker/dist/esm/components/Week.js.map +1 -1
  154. package/lib/node_modules/react-day-picker/dist/esm/components/WeekNumber.js.map +1 -1
  155. package/lib/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js.map +1 -1
  156. package/lib/node_modules/react-day-picker/dist/esm/components/Weekday.js.map +1 -1
  157. package/lib/node_modules/react-day-picker/dist/esm/components/Weekdays.js.map +1 -1
  158. package/lib/node_modules/react-day-picker/dist/esm/components/Weeks.js.map +1 -1
  159. package/lib/node_modules/react-day-picker/dist/esm/components/YearsDropdown.js.map +1 -1
  160. package/lib/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js +2 -3
  161. package/lib/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js.map +1 -1
  162. package/lib/node_modules/react-day-picker/dist/esm/formatters/formatDay.js.map +1 -1
  163. package/lib/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js.map +1 -1
  164. package/lib/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js.map +1 -1
  165. package/lib/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js.map +1 -1
  166. package/lib/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js.map +1 -1
  167. package/lib/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js.map +1 -1
  168. package/lib/node_modules/react-day-picker/dist/esm/formatters/index.js +1 -1
  169. package/lib/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js.map +1 -1
  170. package/lib/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js.map +1 -1
  171. package/lib/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js.map +1 -1
  172. package/lib/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js.map +1 -1
  173. package/lib/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js.map +1 -1
  174. package/lib/node_modules/react-day-picker/dist/esm/helpers/getComponents.js.map +1 -1
  175. package/lib/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js.map +1 -1
  176. package/lib/node_modules/react-day-picker/dist/esm/helpers/getDates.js.map +1 -1
  177. package/lib/node_modules/react-day-picker/dist/esm/helpers/getDays.js +4 -4
  178. package/lib/node_modules/react-day-picker/dist/esm/helpers/getDays.js.map +1 -1
  179. package/lib/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js.map +1 -1
  180. package/lib/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js.map +1 -1
  181. package/lib/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js.map +1 -1
  182. package/lib/node_modules/react-day-picker/dist/esm/helpers/getFormatters.js.map +1 -1
  183. package/lib/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js.map +1 -1
  184. package/lib/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js.map +1 -1
  185. package/lib/node_modules/react-day-picker/dist/esm/helpers/getMonths.js.map +1 -1
  186. package/lib/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js.map +1 -1
  187. package/lib/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js.map +1 -1
  188. package/lib/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js.map +1 -1
  189. package/lib/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js.map +1 -1
  190. package/lib/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js.map +1 -1
  191. package/lib/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js.map +1 -1
  192. package/lib/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js +2 -2
  193. package/lib/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js.map +1 -1
  194. package/lib/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js +11 -9
  195. package/lib/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js.map +1 -1
  196. package/lib/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js.map +1 -1
  197. package/lib/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js.map +1 -1
  198. package/lib/node_modules/react-day-picker/dist/esm/labels/index.js +2 -2
  199. package/lib/node_modules/react-day-picker/dist/esm/labels/labelDayButton.js.map +1 -1
  200. package/lib/node_modules/react-day-picker/dist/esm/labels/labelGrid.js +2 -3
  201. package/lib/node_modules/react-day-picker/dist/esm/labels/labelGrid.js.map +1 -1
  202. package/lib/node_modules/react-day-picker/dist/esm/labels/labelGridcell.js.map +1 -1
  203. package/lib/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js +1 -1
  204. package/lib/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js.map +1 -1
  205. package/lib/node_modules/react-day-picker/dist/esm/labels/labelNav.js.map +1 -1
  206. package/lib/node_modules/react-day-picker/dist/esm/labels/labelNext.js +1 -1
  207. package/lib/node_modules/react-day-picker/dist/esm/labels/labelNext.js.map +1 -1
  208. package/lib/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js +1 -1
  209. package/lib/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js.map +1 -1
  210. package/lib/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js +1 -1
  211. package/lib/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js.map +1 -1
  212. package/lib/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js +1 -1
  213. package/lib/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js.map +1 -1
  214. package/lib/node_modules/react-day-picker/dist/esm/labels/labelWeekday.js.map +1 -1
  215. package/lib/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js +1 -1
  216. package/lib/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js.map +1 -1
  217. package/lib/node_modules/react-day-picker/dist/esm/selection/useMulti.js.map +1 -1
  218. package/lib/node_modules/react-day-picker/dist/esm/selection/useRange.js.map +1 -1
  219. package/lib/node_modules/react-day-picker/dist/esm/selection/useSingle.js.map +1 -1
  220. package/lib/node_modules/react-day-picker/dist/esm/useAnimation.js +1 -1
  221. package/lib/node_modules/react-day-picker/dist/esm/useAnimation.js.map +1 -1
  222. package/lib/node_modules/react-day-picker/dist/esm/useCalendar.js +1 -1
  223. package/lib/node_modules/react-day-picker/dist/esm/useCalendar.js.map +1 -1
  224. package/lib/node_modules/react-day-picker/dist/esm/useDayPicker.js.map +1 -1
  225. package/lib/node_modules/react-day-picker/dist/esm/useFocus.js +0 -6
  226. package/lib/node_modules/react-day-picker/dist/esm/useFocus.js.map +1 -1
  227. package/lib/node_modules/react-day-picker/dist/esm/useSelection.js.map +1 -1
  228. package/lib/node_modules/react-day-picker/dist/esm/utils/addToRange.js +1 -6
  229. package/lib/node_modules/react-day-picker/dist/esm/utils/addToRange.js.map +1 -1
  230. package/lib/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js.map +1 -1
  231. package/lib/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js.map +1 -1
  232. package/lib/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js.map +1 -1
  233. package/lib/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js.map +1 -1
  234. package/lib/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js.map +1 -1
  235. package/lib/node_modules/react-day-picker/dist/esm/utils/typeguards.js.map +1 -1
  236. package/lib/node_modules/react-hook-form/dist/index.esm.js +44 -67
  237. package/lib/node_modules/react-hook-form/dist/index.esm.js.map +1 -1
  238. package/lib/node_modules/react-virtuoso/dist/index.js +1200 -1246
  239. package/lib/node_modules/react-virtuoso/dist/index.js.map +1 -1
  240. package/lib/node_modules/ua-parser-js/src/ua-parser.js +71 -85
  241. package/lib/node_modules/ua-parser-js/src/ua-parser.js.map +1 -1
  242. package/lib/styles.css +1 -1
  243. package/lib/styles.css.map +1 -1
  244. package/lib/tsconfig.tsbuildinfo +1 -1
  245. package/package.json +106 -106
  246. package/lib/node_modules/@date-fns/tz/tzName/index.js +0 -40
  247. package/lib/node_modules/@date-fns/tz/tzName/index.js.map +0 -1
  248. package/lib/node_modules/react-day-picker/node_modules/date-fns/eachYearOfInterval.js +0 -64
  249. package/lib/node_modules/react-day-picker/node_modules/date-fns/eachYearOfInterval.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"AsYouTypeParser.js","sources":["../../../../node_modules/libphonenumber-js/es6/AsYouTypeParser.js"],"sourcesContent":["function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(r) { if (Array.isArray(r)) return r; }\nfunction _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\"); }\nfunction _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }\nfunction _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", { writable: !1 }), e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport _extractCountryCallingCode from './helpers/extractCountryCallingCode.js';\nimport extractCountryCallingCodeFromInternationalNumberWithoutPlusSign from './helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js';\nimport extractNationalNumberFromPossiblyIncompleteNumber from './helpers/extractNationalNumberFromPossiblyIncompleteNumber.js';\nimport stripIddPrefix from './helpers/stripIddPrefix.js';\nimport parseDigits from './helpers/parseDigits.js';\nimport { VALID_DIGITS, VALID_PUNCTUATION, PLUS_CHARS } from './constants.js';\nvar VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART = '[' + VALID_PUNCTUATION + VALID_DIGITS + ']+';\nvar VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN = new RegExp('^' + VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART + '$', 'i');\nvar VALID_FORMATTED_PHONE_NUMBER_PART = '(?:' + '[' + PLUS_CHARS + ']' + '[' + VALID_PUNCTUATION + VALID_DIGITS + ']*' + '|' + '[' + VALID_PUNCTUATION + VALID_DIGITS + ']+' + ')';\nvar AFTER_PHONE_NUMBER_DIGITS_END_PATTERN = new RegExp('[^' + VALID_PUNCTUATION + VALID_DIGITS + ']+' + '.*' + '$');\n\n// Tests whether `national_prefix_for_parsing` could match\n// different national prefixes.\n// Matches anything that's not a digit or a square bracket.\nvar COMPLEX_NATIONAL_PREFIX = /[^\\d\\[\\]]/;\nvar AsYouTypeParser = /*#__PURE__*/function () {\n function AsYouTypeParser(_ref) {\n var defaultCountry = _ref.defaultCountry,\n defaultCallingCode = _ref.defaultCallingCode,\n metadata = _ref.metadata,\n onNationalSignificantNumberChange = _ref.onNationalSignificantNumberChange;\n _classCallCheck(this, AsYouTypeParser);\n this.defaultCountry = defaultCountry;\n this.defaultCallingCode = defaultCallingCode;\n this.metadata = metadata;\n this.onNationalSignificantNumberChange = onNationalSignificantNumberChange;\n }\n return _createClass(AsYouTypeParser, [{\n key: \"input\",\n value: function input(text, state) {\n var _extractFormattedDigi = extractFormattedDigitsAndPlus(text),\n _extractFormattedDigi2 = _slicedToArray(_extractFormattedDigi, 2),\n formattedDigits = _extractFormattedDigi2[0],\n hasPlus = _extractFormattedDigi2[1];\n var digits = parseDigits(formattedDigits);\n // Checks for a special case: just a leading `+` has been entered.\n var justLeadingPlus;\n if (hasPlus) {\n if (!state.digits) {\n state.startInternationalNumber(undefined, undefined);\n if (!digits) {\n justLeadingPlus = true;\n }\n }\n }\n if (digits) {\n this.inputDigits(digits, state);\n }\n return {\n digits: digits,\n justLeadingPlus: justLeadingPlus\n };\n }\n\n /**\r\n * Inputs \"next\" phone number digits.\r\n * @param {string} digits\r\n * @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\".\r\n */\n }, {\n key: \"inputDigits\",\n value: function inputDigits(nextDigits, state) {\n var digits = state.digits;\n var hasReceivedThreeLeadingDigits = digits.length < 3 && digits.length + nextDigits.length >= 3;\n\n // Append phone number digits.\n state.appendDigits(nextDigits);\n\n // Attempt to extract IDD prefix:\n // Some users input their phone number in international format,\n // but in an \"out-of-country\" dialing format instead of using the leading `+`.\n // https://github.com/catamphetamine/libphonenumber-js/issues/185\n // Detect such numbers as soon as there're at least 3 digits.\n // Google's library attempts to extract IDD prefix at 3 digits,\n // so this library just copies that behavior.\n // I guess that's because the most commot IDD prefixes are\n // `00` (Europe) and `011` (US).\n // There exist really long IDD prefixes too:\n // for example, in Australia the default IDD prefix is `0011`,\n // and it could even be as long as `14880011`.\n // An IDD prefix is extracted here, and then every time when\n // there's a new digit and the number couldn't be formatted.\n if (hasReceivedThreeLeadingDigits) {\n this.extractIddPrefix(state);\n }\n if (this.isWaitingForCountryCallingCode(state)) {\n if (!this.extractCountryCallingCode(state)) {\n return;\n }\n } else {\n state.appendNationalSignificantNumberDigits(nextDigits);\n }\n\n // If a phone number is being input in international format,\n // then it's not valid for it to have a national prefix.\n // Still, some people incorrectly input such numbers with a national prefix.\n // In such cases, only attempt to strip a national prefix if the number becomes too long.\n // (but that is done later, not here)\n if (!state.international) {\n if (!this.hasExtractedNationalSignificantNumber) {\n this.extractNationalSignificantNumber(state.getNationalDigits(), function (stateUpdate) {\n return state.update(stateUpdate);\n });\n }\n }\n }\n }, {\n key: \"isWaitingForCountryCallingCode\",\n value: function isWaitingForCountryCallingCode(_ref2) {\n var international = _ref2.international,\n callingCode = _ref2.callingCode;\n return international && !callingCode;\n }\n\n // Extracts a country calling code from a number\n // being entered in internatonal format.\n }, {\n key: \"extractCountryCallingCode\",\n value: function extractCountryCallingCode(state) {\n var _extractCountryCallin = _extractCountryCallingCode('+' + state.getDigitsWithoutInternationalPrefix(), state.country, this.defaultCountry, this.defaultCallingCode, this.metadata.metadata),\n countryCallingCode = _extractCountryCallin.countryCallingCode,\n number = _extractCountryCallin.number;\n if (countryCallingCode) {\n state.setCallingCode(countryCallingCode);\n state.update({\n nationalSignificantNumber: number\n });\n return true;\n }\n }\n }, {\n key: \"reset\",\n value: function reset(numberingPlan) {\n if (numberingPlan) {\n this.hasSelectedNumberingPlan = true;\n var nationalPrefixForParsing = numberingPlan._nationalPrefixForParsing();\n this.couldPossiblyExtractAnotherNationalSignificantNumber = nationalPrefixForParsing && COMPLEX_NATIONAL_PREFIX.test(nationalPrefixForParsing);\n } else {\n this.hasSelectedNumberingPlan = undefined;\n this.couldPossiblyExtractAnotherNationalSignificantNumber = undefined;\n }\n }\n\n /**\r\n * Extracts a national (significant) number from user input.\r\n * Google's library is different in that it only applies `national_prefix_for_parsing`\r\n * and doesn't apply `national_prefix_transform_rule` after that.\r\n * https://github.com/google/libphonenumber/blob/a3d70b0487875475e6ad659af404943211d26456/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java#L539\r\n * @return {boolean} [extracted]\r\n */\n }, {\n key: \"extractNationalSignificantNumber\",\n value: function extractNationalSignificantNumber(nationalDigits, setState) {\n if (!this.hasSelectedNumberingPlan) {\n return;\n }\n var _extractNationalNumbe = extractNationalNumberFromPossiblyIncompleteNumber(nationalDigits, this.metadata),\n nationalPrefix = _extractNationalNumbe.nationalPrefix,\n nationalNumber = _extractNationalNumbe.nationalNumber,\n carrierCode = _extractNationalNumbe.carrierCode;\n if (nationalNumber === nationalDigits) {\n return;\n }\n this.onExtractedNationalNumber(nationalPrefix, carrierCode, nationalNumber, nationalDigits, setState);\n return true;\n }\n\n /**\r\n * In Google's code this function is called \"attempt to extract longer NDD\".\r\n * \"Some national prefixes are a substring of others\", they say.\r\n * @return {boolean} [result] — Returns `true` if extracting a national prefix produced different results from what they were.\r\n */\n }, {\n key: \"extractAnotherNationalSignificantNumber\",\n value: function extractAnotherNationalSignificantNumber(nationalDigits, prevNationalSignificantNumber, setState) {\n if (!this.hasExtractedNationalSignificantNumber) {\n return this.extractNationalSignificantNumber(nationalDigits, setState);\n }\n if (!this.couldPossiblyExtractAnotherNationalSignificantNumber) {\n return;\n }\n var _extractNationalNumbe2 = extractNationalNumberFromPossiblyIncompleteNumber(nationalDigits, this.metadata),\n nationalPrefix = _extractNationalNumbe2.nationalPrefix,\n nationalNumber = _extractNationalNumbe2.nationalNumber,\n carrierCode = _extractNationalNumbe2.carrierCode;\n // If a national prefix has been extracted previously,\n // then it's always extracted as additional digits are added.\n // That's assuming `extractNationalNumberFromPossiblyIncompleteNumber()`\n // doesn't do anything different from what it currently does.\n // So, just in case, here's this check, though it doesn't occur.\n /* istanbul ignore if */\n if (nationalNumber === prevNationalSignificantNumber) {\n return;\n }\n this.onExtractedNationalNumber(nationalPrefix, carrierCode, nationalNumber, nationalDigits, setState);\n return true;\n }\n }, {\n key: \"onExtractedNationalNumber\",\n value: function onExtractedNationalNumber(nationalPrefix, carrierCode, nationalSignificantNumber, nationalDigits, setState) {\n // Tells if the parsed national (significant) number is present as-is in the input string.\n // For example, when inputting \"0343515551212999\" Argentinian mobile number,\n // the parsed national (significant) number is \"93435551212999\".\n // There, one can see how it stripped \"0\" national prefix and prepended a \"9\",\n // because that's how it is instructed to do in Argentina's metadata.\n // So in the described example, the parsed national (significant) number is not present\n // as-is in the input string. Instead, it's \"modified\" in the input string.\n // https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule\n var nationalSignificantNumberIsModified = false;\n\n // In some countries, a phone number could have a prefix that is not a \"national prefix\"\n // but rather some other type of \"utility\" prefix.\n // For example, when calling within Australia, one could prepend `1831` prefix to hide\n // caller's phone number.\n // https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule\n var prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix;\n\n // `nationalSignificantNumber` could be empty. In that case, `.lastIndexOf()` still works correctly.\n var nationalSignificantNumberIndex = nationalDigits.lastIndexOf(nationalSignificantNumber);\n\n // If the parsed national (significant) number is the last substring of the `nationalDigits`,\n // then it means that it's present as-is in the input string.\n // In any other case, the parsed national (significant) number is \"modified\" in the input string.\n if (nationalSignificantNumberIndex < 0 || nationalSignificantNumberIndex !== nationalDigits.length - nationalSignificantNumber.length) {\n nationalSignificantNumberIsModified = true;\n } else {\n var prefixBeforeNationalNumber = nationalDigits.slice(0, nationalSignificantNumberIndex);\n // When national (significant) number is equal to the `nationalDigits`,\n // this `onExtractedNationalNumber()` function simply doesn't get called.\n // This means that at this point, `prefixBeforeNationalNumber` is always non-empty.\n // Still, added this `if` check just to prevent potential silly bugs.\n // The `!prefixBeforeNationalNumber` case is not really testable\n // so this line is exluded from the code coverage.\n /* istanbul ignore if */\n if (prefixBeforeNationalNumber) {\n if (prefixBeforeNationalNumber !== nationalPrefix) {\n prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix = prefixBeforeNationalNumber;\n }\n }\n }\n setState({\n nationalPrefix: nationalPrefix,\n carrierCode: carrierCode,\n nationalSignificantNumber: nationalSignificantNumber,\n nationalSignificantNumberIsModified: nationalSignificantNumberIsModified,\n prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix: prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix\n });\n // `onExtractedNationalNumber()` is only called when\n // the national (significant) number actually did change.\n this.hasExtractedNationalSignificantNumber = true;\n this.onNationalSignificantNumberChange();\n }\n }, {\n key: \"reExtractNationalSignificantNumber\",\n value: function reExtractNationalSignificantNumber(state) {\n // Attempt to extract a national prefix.\n //\n // Some people incorrectly input national prefix\n // in an international phone number.\n // For example, some people write British phone numbers as `+44(0)...`.\n //\n // Also, in some rare cases, it is valid for a national prefix\n // to be a part of an international phone number.\n // For example, mobile phone numbers in Mexico are supposed to be\n // dialled internationally using a `1` national prefix,\n // so the national prefix will be part of an international number.\n //\n // Quote from:\n // https://www.mexperience.com/dialing-cell-phones-in-mexico/\n //\n // \"Dialing a Mexican cell phone from abroad\n // When you are calling a cell phone number in Mexico from outside Mexico,\n // it’s necessary to dial an additional “1” after Mexico’s country code\n // (which is “52”) and before the area code.\n // You also ignore the 045, and simply dial the area code and the\n // cell phone’s number.\n //\n // If you don’t add the “1”, you’ll receive a recorded announcement\n // asking you to redial using it.\n //\n // For example, if you are calling from the USA to a cell phone\n // in Mexico City, you would dial +52 – 1 – 55 – 1234 5678.\n // (Note that this is different to calling a land line in Mexico City\n // from abroad, where the number dialed would be +52 – 55 – 1234 5678)\".\n //\n // Google's demo output:\n // https://libphonenumber.appspot.com/phonenumberparser?number=%2b5215512345678&country=MX\n //\n if (this.extractAnotherNationalSignificantNumber(state.getNationalDigits(), state.nationalSignificantNumber, function (stateUpdate) {\n return state.update(stateUpdate);\n })) {\n return true;\n }\n // If no format matches the phone number, then it could be\n // \"a really long IDD\" (quote from a comment in Google's library).\n // An IDD prefix is first extracted when the user has entered at least 3 digits,\n // and then here — every time when there's a new digit and the number\n // couldn't be formatted.\n // For example, in Australia the default IDD prefix is `0011`,\n // and it could even be as long as `14880011`.\n //\n // Could also check `!hasReceivedThreeLeadingDigits` here\n // to filter out the case when this check duplicates the one\n // already performed when there're 3 leading digits,\n // but it's not a big deal, and in most cases there\n // will be a suitable `format` when there're 3 leading digits.\n //\n if (this.extractIddPrefix(state)) {\n this.extractCallingCodeAndNationalSignificantNumber(state);\n return true;\n }\n // Google's AsYouType formatter supports sort of an \"autocorrection\" feature\n // when it \"autocorrects\" numbers that have been input for a country\n // with that country's calling code.\n // Such \"autocorrection\" feature looks weird, but different people have been requesting it:\n // https://github.com/catamphetamine/libphonenumber-js/issues/376\n // https://github.com/catamphetamine/libphonenumber-js/issues/375\n // https://github.com/catamphetamine/libphonenumber-js/issues/316\n if (this.fixMissingPlus(state)) {\n this.extractCallingCodeAndNationalSignificantNumber(state);\n return true;\n }\n }\n }, {\n key: \"extractIddPrefix\",\n value: function extractIddPrefix(state) {\n // An IDD prefix can't be present in a number written with a `+`.\n // Also, don't re-extract an IDD prefix if has already been extracted.\n var international = state.international,\n IDDPrefix = state.IDDPrefix,\n digits = state.digits,\n nationalSignificantNumber = state.nationalSignificantNumber;\n if (international || IDDPrefix) {\n return;\n }\n // Some users input their phone number in \"out-of-country\"\n // dialing format instead of using the leading `+`.\n // https://github.com/catamphetamine/libphonenumber-js/issues/185\n // Detect such numbers.\n var numberWithoutIDD = stripIddPrefix(digits, this.defaultCountry, this.defaultCallingCode, this.metadata.metadata);\n if (numberWithoutIDD !== undefined && numberWithoutIDD !== digits) {\n // If an IDD prefix was stripped then convert the IDD-prefixed number\n // to international number for subsequent parsing.\n state.update({\n IDDPrefix: digits.slice(0, digits.length - numberWithoutIDD.length)\n });\n this.startInternationalNumber(state, {\n country: undefined,\n callingCode: undefined\n });\n return true;\n }\n }\n }, {\n key: \"fixMissingPlus\",\n value: function fixMissingPlus(state) {\n if (!state.international) {\n var _extractCountryCallin2 = extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(state.digits, state.country, this.defaultCountry, this.defaultCallingCode, this.metadata.metadata),\n newCallingCode = _extractCountryCallin2.countryCallingCode;\n if (newCallingCode) {\n state.update({\n missingPlus: true\n });\n this.startInternationalNumber(state, {\n country: state.country,\n callingCode: newCallingCode\n });\n return true;\n }\n }\n }\n }, {\n key: \"startInternationalNumber\",\n value: function startInternationalNumber(state, _ref3) {\n var country = _ref3.country,\n callingCode = _ref3.callingCode;\n state.startInternationalNumber(country, callingCode);\n // If a national (significant) number has been extracted before, reset it.\n if (state.nationalSignificantNumber) {\n state.resetNationalSignificantNumber();\n this.onNationalSignificantNumberChange();\n this.hasExtractedNationalSignificantNumber = undefined;\n }\n }\n }, {\n key: \"extractCallingCodeAndNationalSignificantNumber\",\n value: function extractCallingCodeAndNationalSignificantNumber(state) {\n if (this.extractCountryCallingCode(state)) {\n // `this.extractCallingCode()` is currently called when the number\n // couldn't be formatted during the standard procedure.\n // Normally, the national prefix would be re-extracted\n // for an international number if such number couldn't be formatted,\n // but since it's already not able to be formatted,\n // there won't be yet another retry, so also extract national prefix here.\n this.extractNationalSignificantNumber(state.getNationalDigits(), function (stateUpdate) {\n return state.update(stateUpdate);\n });\n }\n }\n }]);\n}();\n/**\r\n * Extracts formatted phone number from text (if there's any).\r\n * @param {string} text\r\n * @return {string} [formattedPhoneNumber]\r\n */\nexport { AsYouTypeParser as default };\nfunction extractFormattedPhoneNumber(text) {\n // Attempt to extract a possible number from the string passed in.\n var startsAt = text.search(VALID_FORMATTED_PHONE_NUMBER_PART);\n if (startsAt < 0) {\n return;\n }\n // Trim everything to the left of the phone number.\n text = text.slice(startsAt);\n // Trim the `+`.\n var hasPlus;\n if (text[0] === '+') {\n hasPlus = true;\n text = text.slice('+'.length);\n }\n // Trim everything to the right of the phone number.\n text = text.replace(AFTER_PHONE_NUMBER_DIGITS_END_PATTERN, '');\n // Re-add the previously trimmed `+`.\n if (hasPlus) {\n text = '+' + text;\n }\n return text;\n}\n\n/**\r\n * Extracts formatted phone number digits (and a `+`) from text (if there're any).\r\n * @param {string} text\r\n * @return {any[]}\r\n */\nfunction _extractFormattedDigitsAndPlus(text) {\n // Extract a formatted phone number part from text.\n var extractedNumber = extractFormattedPhoneNumber(text) || '';\n // Trim a `+`.\n if (extractedNumber[0] === '+') {\n return [extractedNumber.slice('+'.length), true];\n }\n return [extractedNumber];\n}\n\n/**\r\n * Extracts formatted phone number digits (and a `+`) from text (if there're any).\r\n * @param {string} text\r\n * @return {any[]}\r\n */\nexport function extractFormattedDigitsAndPlus(text) {\n var _extractFormattedDigi3 = _extractFormattedDigitsAndPlus(text),\n _extractFormattedDigi4 = _slicedToArray(_extractFormattedDigi3, 2),\n formattedDigits = _extractFormattedDigi4[0],\n hasPlus = _extractFormattedDigi4[1];\n // If the extracted phone number part\n // can possibly be a part of some valid phone number\n // then parse phone number characters from a formatted phone number.\n if (!VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN.test(formattedDigits)) {\n formattedDigits = '';\n }\n return [formattedDigits, hasPlus];\n}\n//# sourceMappingURL=AsYouTypeParser.js.map"],"names":["VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART","VALID_PUNCTUATION","VALID_DIGITS","VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN","RegExp","VALID_FORMATTED_PHONE_NUMBER_PART","PLUS_CHARS","AFTER_PHONE_NUMBER_DIGITS_END_PATTERN","COMPLEX_NATIONAL_PREFIX","AsYouTypeParser","_ref","defaultCountry","defaultCallingCode","metadata","onNationalSignificantNumberChange","_classCallCheck","_createClass","key","value","input","text","state","_extractFormattedDigi","extractFormattedDigitsAndPlus","_extractFormattedDigi2","_slicedToArray","formattedDigits","hasPlus","digits","parseDigits","justLeadingPlus","startInternationalNumber","undefined","inputDigits","nextDigits","hasReceivedThreeLeadingDigits","length","appendDigits","extractIddPrefix","isWaitingForCountryCallingCode","extractCountryCallingCode","appendNationalSignificantNumberDigits","international","hasExtractedNationalSignificantNumber","extractNationalSignificantNumber","getNationalDigits","stateUpdate","update","_ref2","callingCode","_extractCountryCallin","_extractCountryCallingCode","getDigitsWithoutInternationalPrefix","country","countryCallingCode","number","setCallingCode","nationalSignificantNumber","reset","numberingPlan","hasSelectedNumberingPlan","nationalPrefixForParsing","_nationalPrefixForParsing","couldPossiblyExtractAnotherNationalSignificantNumber","test","nationalDigits","setState","_extractNationalNumbe","extractNationalNumberFromPossiblyIncompleteNumber","nationalPrefix","nationalNumber","carrierCode","onExtractedNationalNumber","extractAnotherNationalSignificantNumber","prevNationalSignificantNumber","_extractNationalNumbe2","nationalSignificantNumberIsModified","prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix","nationalSignificantNumberIndex","lastIndexOf","prefixBeforeNationalNumber","slice","reExtractNationalSignificantNumber","extractCallingCodeAndNationalSignificantNumber","fixMissingPlus","IDDPrefix","numberWithoutIDD","stripIddPrefix","_extractCountryCallin2","extractCountryCallingCodeFromInternationalNumberWithoutPlusSign","newCallingCode","missingPlus","_ref3","resetNationalSignificantNumber","extractFormattedPhoneNumber","startsAt","search","replace","_extractFormattedDigitsAndPlus","extractedNumber","_extractFormattedDigi3","_extractFormattedDigi4"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,IAAMA,wCAAwC,GAC7C,GAAG,GACFC,iBAAiB,GACjBC,YAAY,GACb,IAAI;AAEL,IAAMC,gDAAgD,GAAG,IAAIC,MAAM,CAAC,GAAG,GAAGJ,wCAAwC,GAAG,GAAG,EAAE,GAAG,CAAC;AAE9H,IAAMK,iCAAiC,GACtC,KAAK,GACJ,GAAG,GAAGC,UAAU,GAAG,GAAG,GACtB,GAAG,GACFL,iBAAiB,GACjBC,YAAY,GACb,IAAI,GACJ,GAAG,GACH,GAAG,GACFD,iBAAiB,GACjBC,YAAY,GACb,IAAI,GACL,GAAG;AAEJ,IAAMK,qCAAqC,GAAG,IAAIH,MAAM,CACvD,IAAI,GACHH,iBAAiB,GACjBC,YAAY,GACb,IAAI,GACJ,IAAI,GACJ,GACD,CAAC;;AAED;AACA;AACA;AACA,IAAMM,uBAAuB,GAAG,WAAW;AAAA,IAEtBC,eAAe,gBAAA,YAAA;EACnC,SAAAA,eAAAA,CAAAC,IAAA,EAKG;AAAA,IAAA,IAJFC,cAAc,GAAAD,IAAA,CAAdC,cAAc;MACdC,kBAAkB,GAAAF,IAAA,CAAlBE,kBAAkB;MAClBC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;MACRC,iCAAiC,GAAAJ,IAAA,CAA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AAAA,eAAe,GAAG,EAAE;AACrB,EAAA;AACA,EAAA,OAAO,CAACA,eAAe,EAAEC,OAAO,CAAC;AAClC;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"AsYouTypeParser.js","sources":["../../../../node_modules/libphonenumber-js/es6/AsYouTypeParser.js"],"sourcesContent":["function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_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; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport _extractCountryCallingCode from './helpers/extractCountryCallingCode.js';\nimport extractCountryCallingCodeFromInternationalNumberWithoutPlusSign from './helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js';\nimport extractNationalNumberFromPossiblyIncompleteNumber from './helpers/extractNationalNumberFromPossiblyIncompleteNumber.js';\nimport stripIddPrefix from './helpers/stripIddPrefix.js';\nimport parseDigits from './helpers/parseDigits.js';\nimport { VALID_DIGITS, VALID_PUNCTUATION, PLUS_CHARS } from './constants.js';\nvar VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART = '[' + VALID_PUNCTUATION + VALID_DIGITS + ']+';\nvar VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN = new RegExp('^' + VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART + '$', 'i');\nvar VALID_FORMATTED_PHONE_NUMBER_PART = '(?:' + '[' + PLUS_CHARS + ']' + '[' + VALID_PUNCTUATION + VALID_DIGITS + ']*' + '|' + '[' + VALID_PUNCTUATION + VALID_DIGITS + ']+' + ')';\nvar AFTER_PHONE_NUMBER_DIGITS_END_PATTERN = new RegExp('[^' + VALID_PUNCTUATION + VALID_DIGITS + ']+' + '.*' + '$'); // Tests whether `national_prefix_for_parsing` could match\n// different national prefixes.\n// Matches anything that's not a digit or a square bracket.\n\nvar COMPLEX_NATIONAL_PREFIX = /[^\\d\\[\\]]/;\n\nvar AsYouTypeParser = /*#__PURE__*/function () {\n function AsYouTypeParser(_ref) {\n var defaultCountry = _ref.defaultCountry,\n defaultCallingCode = _ref.defaultCallingCode,\n metadata = _ref.metadata,\n onNationalSignificantNumberChange = _ref.onNationalSignificantNumberChange;\n\n _classCallCheck(this, AsYouTypeParser);\n\n this.defaultCountry = defaultCountry;\n this.defaultCallingCode = defaultCallingCode;\n this.metadata = metadata;\n this.onNationalSignificantNumberChange = onNationalSignificantNumberChange;\n }\n\n _createClass(AsYouTypeParser, [{\n key: \"input\",\n value: function input(text, state) {\n var _extractFormattedDigi = extractFormattedDigitsAndPlus(text),\n _extractFormattedDigi2 = _slicedToArray(_extractFormattedDigi, 2),\n formattedDigits = _extractFormattedDigi2[0],\n hasPlus = _extractFormattedDigi2[1];\n\n var digits = parseDigits(formattedDigits); // Checks for a special case: just a leading `+` has been entered.\n\n var justLeadingPlus;\n\n if (hasPlus) {\n if (!state.digits) {\n state.startInternationalNumber();\n\n if (!digits) {\n justLeadingPlus = true;\n }\n }\n }\n\n if (digits) {\n this.inputDigits(digits, state);\n }\n\n return {\n digits: digits,\n justLeadingPlus: justLeadingPlus\n };\n }\n /**\r\n * Inputs \"next\" phone number digits.\r\n * @param {string} digits\r\n * @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\".\r\n */\n\n }, {\n key: \"inputDigits\",\n value: function inputDigits(nextDigits, state) {\n var digits = state.digits;\n var hasReceivedThreeLeadingDigits = digits.length < 3 && digits.length + nextDigits.length >= 3; // Append phone number digits.\n\n state.appendDigits(nextDigits); // Attempt to extract IDD prefix:\n // Some users input their phone number in international format,\n // but in an \"out-of-country\" dialing format instead of using the leading `+`.\n // https://github.com/catamphetamine/libphonenumber-js/issues/185\n // Detect such numbers as soon as there're at least 3 digits.\n // Google's library attempts to extract IDD prefix at 3 digits,\n // so this library just copies that behavior.\n // I guess that's because the most commot IDD prefixes are\n // `00` (Europe) and `011` (US).\n // There exist really long IDD prefixes too:\n // for example, in Australia the default IDD prefix is `0011`,\n // and it could even be as long as `14880011`.\n // An IDD prefix is extracted here, and then every time when\n // there's a new digit and the number couldn't be formatted.\n\n if (hasReceivedThreeLeadingDigits) {\n this.extractIddPrefix(state);\n }\n\n if (this.isWaitingForCountryCallingCode(state)) {\n if (!this.extractCountryCallingCode(state)) {\n return;\n }\n } else {\n state.appendNationalSignificantNumberDigits(nextDigits);\n } // If a phone number is being input in international format,\n // then it's not valid for it to have a national prefix.\n // Still, some people incorrectly input such numbers with a national prefix.\n // In such cases, only attempt to strip a national prefix if the number becomes too long.\n // (but that is done later, not here)\n\n\n if (!state.international) {\n if (!this.hasExtractedNationalSignificantNumber) {\n this.extractNationalSignificantNumber(state.getNationalDigits(), function (stateUpdate) {\n return state.update(stateUpdate);\n });\n }\n }\n }\n }, {\n key: \"isWaitingForCountryCallingCode\",\n value: function isWaitingForCountryCallingCode(_ref2) {\n var international = _ref2.international,\n callingCode = _ref2.callingCode;\n return international && !callingCode;\n } // Extracts a country calling code from a number\n // being entered in internatonal format.\n\n }, {\n key: \"extractCountryCallingCode\",\n value: function extractCountryCallingCode(state) {\n var _extractCountryCallin = _extractCountryCallingCode('+' + state.getDigitsWithoutInternationalPrefix(), this.defaultCountry, this.defaultCallingCode, this.metadata.metadata),\n countryCallingCode = _extractCountryCallin.countryCallingCode,\n number = _extractCountryCallin.number;\n\n if (countryCallingCode) {\n state.setCallingCode(countryCallingCode);\n state.update({\n nationalSignificantNumber: number\n });\n return true;\n }\n }\n }, {\n key: \"reset\",\n value: function reset(numberingPlan) {\n if (numberingPlan) {\n this.hasSelectedNumberingPlan = true;\n\n var nationalPrefixForParsing = numberingPlan._nationalPrefixForParsing();\n\n this.couldPossiblyExtractAnotherNationalSignificantNumber = nationalPrefixForParsing && COMPLEX_NATIONAL_PREFIX.test(nationalPrefixForParsing);\n } else {\n this.hasSelectedNumberingPlan = undefined;\n this.couldPossiblyExtractAnotherNationalSignificantNumber = undefined;\n }\n }\n /**\r\n * Extracts a national (significant) number from user input.\r\n * Google's library is different in that it only applies `national_prefix_for_parsing`\r\n * and doesn't apply `national_prefix_transform_rule` after that.\r\n * https://github.com/google/libphonenumber/blob/a3d70b0487875475e6ad659af404943211d26456/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java#L539\r\n * @return {boolean} [extracted]\r\n */\n\n }, {\n key: \"extractNationalSignificantNumber\",\n value: function extractNationalSignificantNumber(nationalDigits, setState) {\n if (!this.hasSelectedNumberingPlan) {\n return;\n }\n\n var _extractNationalNumbe = extractNationalNumberFromPossiblyIncompleteNumber(nationalDigits, this.metadata),\n nationalPrefix = _extractNationalNumbe.nationalPrefix,\n nationalNumber = _extractNationalNumbe.nationalNumber,\n carrierCode = _extractNationalNumbe.carrierCode;\n\n if (nationalNumber === nationalDigits) {\n return;\n }\n\n this.onExtractedNationalNumber(nationalPrefix, carrierCode, nationalNumber, nationalDigits, setState);\n return true;\n }\n /**\r\n * In Google's code this function is called \"attempt to extract longer NDD\".\r\n * \"Some national prefixes are a substring of others\", they say.\r\n * @return {boolean} [result] — Returns `true` if extracting a national prefix produced different results from what they were.\r\n */\n\n }, {\n key: \"extractAnotherNationalSignificantNumber\",\n value: function extractAnotherNationalSignificantNumber(nationalDigits, prevNationalSignificantNumber, setState) {\n if (!this.hasExtractedNationalSignificantNumber) {\n return this.extractNationalSignificantNumber(nationalDigits, setState);\n }\n\n if (!this.couldPossiblyExtractAnotherNationalSignificantNumber) {\n return;\n }\n\n var _extractNationalNumbe2 = extractNationalNumberFromPossiblyIncompleteNumber(nationalDigits, this.metadata),\n nationalPrefix = _extractNationalNumbe2.nationalPrefix,\n nationalNumber = _extractNationalNumbe2.nationalNumber,\n carrierCode = _extractNationalNumbe2.carrierCode; // If a national prefix has been extracted previously,\n // then it's always extracted as additional digits are added.\n // That's assuming `extractNationalNumberFromPossiblyIncompleteNumber()`\n // doesn't do anything different from what it currently does.\n // So, just in case, here's this check, though it doesn't occur.\n\n /* istanbul ignore if */\n\n\n if (nationalNumber === prevNationalSignificantNumber) {\n return;\n }\n\n this.onExtractedNationalNumber(nationalPrefix, carrierCode, nationalNumber, nationalDigits, setState);\n return true;\n }\n }, {\n key: \"onExtractedNationalNumber\",\n value: function onExtractedNationalNumber(nationalPrefix, carrierCode, nationalSignificantNumber, nationalDigits, setState) {\n var complexPrefixBeforeNationalSignificantNumber;\n var nationalSignificantNumberMatchesInput; // This check also works with empty `this.nationalSignificantNumber`.\n\n var nationalSignificantNumberIndex = nationalDigits.lastIndexOf(nationalSignificantNumber); // If the extracted national (significant) number is the\n // last substring of the `digits`, then it means that it hasn't been altered:\n // no digits have been removed from the national (significant) number\n // while applying `national_prefix_transform_rule`.\n // https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule\n\n if (nationalSignificantNumberIndex >= 0 && nationalSignificantNumberIndex === nationalDigits.length - nationalSignificantNumber.length) {\n nationalSignificantNumberMatchesInput = true; // If a prefix of a national (significant) number is not as simple\n // as just a basic national prefix, then such prefix is stored in\n // `this.complexPrefixBeforeNationalSignificantNumber` property and will be\n // prepended \"as is\" to the national (significant) number to produce\n // a formatted result.\n\n var prefixBeforeNationalNumber = nationalDigits.slice(0, nationalSignificantNumberIndex); // `prefixBeforeNationalNumber` is always non-empty,\n // because `onExtractedNationalNumber()` isn't called\n // when a national (significant) number hasn't been actually \"extracted\":\n // when a national (significant) number is equal to the national part of `digits`,\n // then `onExtractedNationalNumber()` doesn't get called.\n\n if (prefixBeforeNationalNumber !== nationalPrefix) {\n complexPrefixBeforeNationalSignificantNumber = prefixBeforeNationalNumber;\n }\n }\n\n setState({\n nationalPrefix: nationalPrefix,\n carrierCode: carrierCode,\n nationalSignificantNumber: nationalSignificantNumber,\n nationalSignificantNumberMatchesInput: nationalSignificantNumberMatchesInput,\n complexPrefixBeforeNationalSignificantNumber: complexPrefixBeforeNationalSignificantNumber\n }); // `onExtractedNationalNumber()` is only called when\n // the national (significant) number actually did change.\n\n this.hasExtractedNationalSignificantNumber = true;\n this.onNationalSignificantNumberChange();\n }\n }, {\n key: \"reExtractNationalSignificantNumber\",\n value: function reExtractNationalSignificantNumber(state) {\n // Attempt to extract a national prefix.\n //\n // Some people incorrectly input national prefix\n // in an international phone number.\n // For example, some people write British phone numbers as `+44(0)...`.\n //\n // Also, in some rare cases, it is valid for a national prefix\n // to be a part of an international phone number.\n // For example, mobile phone numbers in Mexico are supposed to be\n // dialled internationally using a `1` national prefix,\n // so the national prefix will be part of an international number.\n //\n // Quote from:\n // https://www.mexperience.com/dialing-cell-phones-in-mexico/\n //\n // \"Dialing a Mexican cell phone from abroad\n // When you are calling a cell phone number in Mexico from outside Mexico,\n // it’s necessary to dial an additional “1” after Mexico’s country code\n // (which is “52”) and before the area code.\n // You also ignore the 045, and simply dial the area code and the\n // cell phone’s number.\n //\n // If you don’t add the “1”, you’ll receive a recorded announcement\n // asking you to redial using it.\n //\n // For example, if you are calling from the USA to a cell phone\n // in Mexico City, you would dial +52 – 1 – 55 – 1234 5678.\n // (Note that this is different to calling a land line in Mexico City\n // from abroad, where the number dialed would be +52 – 55 – 1234 5678)\".\n //\n // Google's demo output:\n // https://libphonenumber.appspot.com/phonenumberparser?number=%2b5215512345678&country=MX\n //\n if (this.extractAnotherNationalSignificantNumber(state.getNationalDigits(), state.nationalSignificantNumber, function (stateUpdate) {\n return state.update(stateUpdate);\n })) {\n return true;\n } // If no format matches the phone number, then it could be\n // \"a really long IDD\" (quote from a comment in Google's library).\n // An IDD prefix is first extracted when the user has entered at least 3 digits,\n // and then here — every time when there's a new digit and the number\n // couldn't be formatted.\n // For example, in Australia the default IDD prefix is `0011`,\n // and it could even be as long as `14880011`.\n //\n // Could also check `!hasReceivedThreeLeadingDigits` here\n // to filter out the case when this check duplicates the one\n // already performed when there're 3 leading digits,\n // but it's not a big deal, and in most cases there\n // will be a suitable `format` when there're 3 leading digits.\n //\n\n\n if (this.extractIddPrefix(state)) {\n this.extractCallingCodeAndNationalSignificantNumber(state);\n return true;\n } // Google's AsYouType formatter supports sort of an \"autocorrection\" feature\n // when it \"autocorrects\" numbers that have been input for a country\n // with that country's calling code.\n // Such \"autocorrection\" feature looks weird, but different people have been requesting it:\n // https://github.com/catamphetamine/libphonenumber-js/issues/376\n // https://github.com/catamphetamine/libphonenumber-js/issues/375\n // https://github.com/catamphetamine/libphonenumber-js/issues/316\n\n\n if (this.fixMissingPlus(state)) {\n this.extractCallingCodeAndNationalSignificantNumber(state);\n return true;\n }\n }\n }, {\n key: \"extractIddPrefix\",\n value: function extractIddPrefix(state) {\n // An IDD prefix can't be present in a number written with a `+`.\n // Also, don't re-extract an IDD prefix if has already been extracted.\n var international = state.international,\n IDDPrefix = state.IDDPrefix,\n digits = state.digits,\n nationalSignificantNumber = state.nationalSignificantNumber;\n\n if (international || IDDPrefix) {\n return;\n } // Some users input their phone number in \"out-of-country\"\n // dialing format instead of using the leading `+`.\n // https://github.com/catamphetamine/libphonenumber-js/issues/185\n // Detect such numbers.\n\n\n var numberWithoutIDD = stripIddPrefix(digits, this.defaultCountry, this.defaultCallingCode, this.metadata.metadata);\n\n if (numberWithoutIDD !== undefined && numberWithoutIDD !== digits) {\n // If an IDD prefix was stripped then convert the IDD-prefixed number\n // to international number for subsequent parsing.\n state.update({\n IDDPrefix: digits.slice(0, digits.length - numberWithoutIDD.length)\n });\n this.startInternationalNumber(state, {\n country: undefined,\n callingCode: undefined\n });\n return true;\n }\n }\n }, {\n key: \"fixMissingPlus\",\n value: function fixMissingPlus(state) {\n if (!state.international) {\n var _extractCountryCallin2 = extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(state.digits, this.defaultCountry, this.defaultCallingCode, this.metadata.metadata),\n newCallingCode = _extractCountryCallin2.countryCallingCode,\n number = _extractCountryCallin2.number;\n\n if (newCallingCode) {\n state.update({\n missingPlus: true\n });\n this.startInternationalNumber(state, {\n country: state.country,\n callingCode: newCallingCode\n });\n return true;\n }\n }\n }\n }, {\n key: \"startInternationalNumber\",\n value: function startInternationalNumber(state, _ref3) {\n var country = _ref3.country,\n callingCode = _ref3.callingCode;\n state.startInternationalNumber(country, callingCode); // If a national (significant) number has been extracted before, reset it.\n\n if (state.nationalSignificantNumber) {\n state.resetNationalSignificantNumber();\n this.onNationalSignificantNumberChange();\n this.hasExtractedNationalSignificantNumber = undefined;\n }\n }\n }, {\n key: \"extractCallingCodeAndNationalSignificantNumber\",\n value: function extractCallingCodeAndNationalSignificantNumber(state) {\n if (this.extractCountryCallingCode(state)) {\n // `this.extractCallingCode()` is currently called when the number\n // couldn't be formatted during the standard procedure.\n // Normally, the national prefix would be re-extracted\n // for an international number if such number couldn't be formatted,\n // but since it's already not able to be formatted,\n // there won't be yet another retry, so also extract national prefix here.\n this.extractNationalSignificantNumber(state.getNationalDigits(), function (stateUpdate) {\n return state.update(stateUpdate);\n });\n }\n }\n }]);\n\n return AsYouTypeParser;\n}();\n/**\r\n * Extracts formatted phone number from text (if there's any).\r\n * @param {string} text\r\n * @return {string} [formattedPhoneNumber]\r\n */\n\n\nexport { AsYouTypeParser as default };\n\nfunction extractFormattedPhoneNumber(text) {\n // Attempt to extract a possible number from the string passed in.\n var startsAt = text.search(VALID_FORMATTED_PHONE_NUMBER_PART);\n\n if (startsAt < 0) {\n return;\n } // Trim everything to the left of the phone number.\n\n\n text = text.slice(startsAt); // Trim the `+`.\n\n var hasPlus;\n\n if (text[0] === '+') {\n hasPlus = true;\n text = text.slice('+'.length);\n } // Trim everything to the right of the phone number.\n\n\n text = text.replace(AFTER_PHONE_NUMBER_DIGITS_END_PATTERN, ''); // Re-add the previously trimmed `+`.\n\n if (hasPlus) {\n text = '+' + text;\n }\n\n return text;\n}\n/**\r\n * Extracts formatted phone number digits (and a `+`) from text (if there're any).\r\n * @param {string} text\r\n * @return {any[]}\r\n */\n\n\nfunction _extractFormattedDigitsAndPlus(text) {\n // Extract a formatted phone number part from text.\n var extractedNumber = extractFormattedPhoneNumber(text) || ''; // Trim a `+`.\n\n if (extractedNumber[0] === '+') {\n return [extractedNumber.slice('+'.length), true];\n }\n\n return [extractedNumber];\n}\n/**\r\n * Extracts formatted phone number digits (and a `+`) from text (if there're any).\r\n * @param {string} text\r\n * @return {any[]}\r\n */\n\n\nexport function extractFormattedDigitsAndPlus(text) {\n var _extractFormattedDigi3 = _extractFormattedDigitsAndPlus(text),\n _extractFormattedDigi4 = _slicedToArray(_extractFormattedDigi3, 2),\n formattedDigits = _extractFormattedDigi4[0],\n hasPlus = _extractFormattedDigi4[1]; // If the extracted phone number part\n // can possibly be a part of some valid phone number\n // then parse phone number characters from a formatted phone number.\n\n\n if (!VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN.test(formattedDigits)) {\n formattedDigits = '';\n }\n\n return [formattedDigits, hasPlus];\n}\n//# sourceMappingURL=AsYouTypeParser.js.map"],"names":["VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART","VALID_PUNCTUATION","VALID_DIGITS","VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN","RegExp","VALID_FORMATTED_PHONE_NUMBER_PART","PLUS_CHARS","AFTER_PHONE_NUMBER_DIGITS_END_PATTERN","COMPLEX_NATIONAL_PREFIX","AsYouTypeParser","_ref","defaultCountry","defaultCallingCode","metadata","onNationalSignificantNumberChange","_classCallCheck","input","text","state","_extractFormattedDigi","extractFormattedDigitsAndPlus","_extractFormattedDigi2","_slicedToArray","formattedDigits","hasPlus","digits","parseDigits","justLeadingPlus","startInternationalNumber","inputDigits","nextDigits","hasReceivedThreeLeadingDigits","length","appendDigits","extractIddPrefix","isWaitingForCountryCallingCode","extractCountryCallingCode","appendNationalSignificantNumberDigits","international","hasExtractedNationalSignificantNumber","extractNationalSignificantNumber","getNationalDigits","stateUpdate","update","_ref2","callingCode","_extractCountryCallin","_extractCountryCallingCode","getDigitsWithoutInternationalPrefix","countryCallingCode","number","setCallingCode","nationalSignificantNumber","reset","numberingPlan","hasSelectedNumberingPlan","nationalPrefixForParsing","_nationalPrefixForParsing","couldPossiblyExtractAnotherNationalSignificantNumber","test","undefined","nationalDigits","setState","_extractNationalNumbe","extractNationalNumberFromPossiblyIncompleteNumber","nationalPrefix","nationalNumber","carrierCode","onExtractedNationalNumber","extractAnotherNationalSignificantNumber","prevNationalSignificantNumber","_extractNationalNumbe2","complexPrefixBeforeNationalSignificantNumber","nationalSignificantNumberMatchesInput","nationalSignificantNumberIndex","lastIndexOf","prefixBeforeNationalNumber","slice","reExtractNationalSignificantNumber","extractCallingCodeAndNationalSignificantNumber","fixMissingPlus","IDDPrefix","numberWithoutIDD","stripIddPrefix","country","_extractCountryCallin2","extractCountryCallingCodeFromInternationalNumberWithoutPlusSign","newCallingCode","missingPlus","_ref3","resetNationalSignificantNumber","extractFormattedPhoneNumber","startsAt","search","replace","_extractFormattedDigitsAndPlus","extractedNumber","_extractFormattedDigi3","_extractFormattedDigi4"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,IAAMA,wCAAwC,GAC7C,GAAA,GACCC,iBADD,GAECC,YAFD,GAGA,IAJD;AAMA,IAAMC,gDAAgD,GAAG,IAAIC,MAAJ,CAAW,GAAA,GAAMJ,wCAAN,GAAiD,GAA5D,EAAiE,GAAjE,CAAzD;AAEA,IAAMK,iCAAiC,GACtC,KAAA,GACC,GADD,GACOC,UADP,GACoB,GADpB,GAEC,GAFD,GAGEL,iBAHF,GAIEC,YAJF,GAKC,IALD,GAMC,GAND,GAOC,GAPD,GAQED,iBARF,GASEC,YATF,GAUC,IAVD,GAWA,GAZD;AAcA,IAAMK,qCAAqC,GAAG,IAAIH,MAAJ,CAC7C,OACCH,iBADD,GAECC,YAFD,GAGA,IAHA,GAIA,IAJA,GAKA,GAN6C,CAA9C;AAUA;AACA;;AACA,IAAMM,uBAAuB,GAAG,WAAhC;IAEqBC;EACpB,SAAAA,eAAAA,CAAAC,IAAA,EAKG;AAAA,IAAA,IAJFC,cAIE,GAAAD,IAAA,CAJFC,cAIE;MAHFC,kBAGE,GAAAF,IAAA,CAHFE,kBAGE;MAFFC,QAEE,GA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vC,EAA6C;AACnD,EAAA,IAAAgF,sBAAA,GAAiCF,8BAA8B,CAAC9E,IAAD,CAA/D;IAAAiF,sBAAA,GAAA5E,cAAA,CAAA2E,sBAAA,EAAA,CAAA,CAAA;AAAK1E,IAAAA,eAAL,GAAA2E,sBAAA,CAAA,CAAA,CAAA;IAAsB1E,OAAtB,GAAA0E,sBAAA,CAAA,CAAA,CAAA,CADmD;AAGnD;AACA;;AACA,EAAA,IAAI,CAAC/F,gDAAgD,CAACwD,IAAjD,CAAsDpC,eAAtD,CAAL,EAA6E;AAC5EA,IAAAA,eAAe,GAAG,EAAlB;AACA,EAAA;AACD,EAAA,OAAO,CAACA,eAAD,EAAkBC,OAAlB,CAAP;AACA;;;;","x_google_ignoreList":[0]}
@@ -1,61 +1,42 @@
1
- function _typeof(o) {
2
- "@babel/helpers - typeof";
3
-
4
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
5
- return typeof o;
6
- } : function (o) {
7
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
8
- }, _typeof(o);
9
- }
10
- function _classCallCheck(a, n) {
11
- if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
1
+ function _classCallCheck(instance, Constructor) {
2
+ if (!(instance instanceof Constructor)) {
3
+ throw new TypeError("Cannot call a class as a function");
4
+ }
12
5
  }
13
- function _defineProperties(e, r) {
14
- for (var t = 0; t < r.length; t++) {
15
- var o = r[t];
16
- o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o);
6
+ function _defineProperties(target, props) {
7
+ for (var i = 0; i < props.length; i++) {
8
+ var descriptor = props[i];
9
+ descriptor.enumerable = descriptor.enumerable || false;
10
+ descriptor.configurable = true;
11
+ if ("value" in descriptor) descriptor.writable = true;
12
+ Object.defineProperty(target, descriptor.key, descriptor);
17
13
  }
18
14
  }
19
- function _createClass(e, r, t) {
20
- return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", {
15
+ function _createClass(Constructor, protoProps, staticProps) {
16
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
17
+ Object.defineProperty(Constructor, "prototype", {
21
18
  writable: false
22
- }), e;
23
- }
24
- function _toPropertyKey(t) {
25
- var i = _toPrimitive(t, "string");
26
- return "symbol" == _typeof(i) ? i : i + "";
27
- }
28
- function _toPrimitive(t, r) {
29
- if ("object" != _typeof(t) || !t) return t;
30
- var e = t[Symbol.toPrimitive];
31
- if (void 0 !== e) {
32
- var i = e.call(t, r);
33
- if ("object" != _typeof(i)) return i;
34
- throw new TypeError("@@toPrimitive must return a primitive value.");
35
- }
36
- return (String )(t);
19
+ });
20
+ return Constructor;
37
21
  }
22
+
38
23
  // This "state" object simply holds the state of the "AsYouType" parser:
39
24
  //
40
- // * `country?: string` — The exact country of the phone number, if it could be determined.
41
- // When inputting a phone number in "international" format, it will derive the `country` from "country calling code" and the phone number digits.
42
- // When inputting a phone number in "national" format, it will derive the `country` from `defaultCountry` that was specified when creating the `AsYouType` formatter.
43
- // Sidenote: If `USE_NON_GEOGRAPHIC_COUNTRY_CODE` flag was `true`, then for "non-geographic phone numbers" `state.country` would've been "001".
44
- // * `callingCode?: string` — "Country calling code" that has been extracted from the input phone number.
45
- // When inputting a phone number in "international" format, it will extract the "country calling code" from the digits that follow the "+" character.
46
- // When inputting a phone number in "national" format, `callingCode` will be `undefined`.
47
- // Sidenote: `state.callingCode` is therefore independent from `state.country` and there could be situations when `state.country` is defined by `state.callingCode` is not — that would be when inputting a phone number not in "international" format.
48
- // * `digits: string` — Phone number digits that have been input so far, including the "+" character, if present. In case of inputting non-arabic digits, those will be converted to arabic ones.
49
- // * `international: boolean` — Whether the phone number is being input in "international" format, i.e. with a "+" character.
50
- // * `missingPlus: boolean` — Whether it's a phone number in "international" format that is missing the leading "+" character for some reason — apparently, Google thinks that it's a common mistake when inputting a phone number.
51
- // * `IDDPrefix?: string` — An "IDD prefix", when the phone number is being input in an "out-of-country dialing" format. https://wikitravel.org/en/International_dialling_prefix
52
- // * `carrierCode?: string` A "carrier code", if the phone number contains it. Normally, those can only be present in Colombia or Brazil, and only when calling from mobile phones to fixed-line numbers.
53
- // * `nationalPrefix?: string` "National prefix", if present in the phone number input.
54
- // * `nationalSignificantNumber?: string` National (significant) number digits that have been input so far.
55
- // * `nationalSignificantNumberIsModified: boolean` — Tells if the parsed national (significant) number is present as-is in the input string. For example, when inputting "0343515551212999" Argentinian mobile number, the parsed national (significant) number is "93435551212999". There, one can see how it stripped "0" national prefix and prepended a "9", because that's how it is instructed to do in Argentina's metadata. So in the described example, the parsed national (significant) number is not present as-is in the input string. Instead, it's "modified" in the input string. https://gitlab.com/caamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule
56
- // * `prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix?: string` — In some countries, a phone number could have a prefix that is not a "national prefix" but rather some other type of "utility" prefix.
57
- // For example, when calling within Australia, one could prepend `1831` prefix to hide caller's phone number.
58
- // https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule
25
+ // * `country?: string`
26
+ // * `callingCode?: string`
27
+ // * `digits: string`
28
+ // * `international: boolean`
29
+ // * `missingPlus: boolean`
30
+ // * `IDDPrefix?: string`
31
+ // * `carrierCode?: string`
32
+ // * `nationalPrefix?: string`
33
+ // * `nationalSignificantNumber?: string`
34
+ // * `nationalSignificantNumberMatchesInput: boolean`
35
+ // * `complexPrefixBeforeNationalSignificantNumber?: string`
36
+ //
37
+ // `state.country` and `state.callingCode` aren't required to be in sync.
38
+ // For example, `state.country` could be `"AR"` and `state.callingCode` could be `undefined`.
39
+ // So `state.country` and `state.callingCode` are totally independent.
59
40
  //
60
41
  var AsYouTypeState = /*#__PURE__*/function () {
61
42
  function AsYouTypeState(_ref) {
@@ -65,7 +46,7 @@ var AsYouTypeState = /*#__PURE__*/function () {
65
46
  this.onCountryChange = onCountryChange;
66
47
  this.onCallingCodeChange = onCallingCodeChange;
67
48
  }
68
- return _createClass(AsYouTypeState, [{
49
+ _createClass(AsYouTypeState, [{
69
50
  key: "reset",
70
51
  value: function reset(_ref2) {
71
52
  var country = _ref2.country,
@@ -82,10 +63,10 @@ var AsYouTypeState = /*#__PURE__*/function () {
82
63
  key: "resetNationalSignificantNumber",
83
64
  value: function resetNationalSignificantNumber() {
84
65
  this.nationalSignificantNumber = this.getNationalDigits();
85
- this.nationalSignificantNumberIsModified = false;
66
+ this.nationalSignificantNumberMatchesInput = true;
86
67
  this.nationalPrefix = undefined;
87
68
  this.carrierCode = undefined;
88
- this.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix = undefined;
69
+ this.complexPrefixBeforeNationalSignificantNumber = undefined;
89
70
  }
90
71
  }, {
91
72
  key: "update",
@@ -117,10 +98,10 @@ var AsYouTypeState = /*#__PURE__*/function () {
117
98
  key: "startInternationalNumber",
118
99
  value: function startInternationalNumber(country, callingCode) {
119
100
  // Prepend the `+` to parsed input.
120
- this.international = true;
121
- // If a default country was set then reset it
101
+ this.international = true; // If a default country was set then reset it
122
102
  // because an explicitly international phone
123
103
  // number is being entered.
104
+
124
105
  this.initCountryAndCallingCode(country, callingCode);
125
106
  }
126
107
  }, {
@@ -133,7 +114,6 @@ var AsYouTypeState = /*#__PURE__*/function () {
133
114
  value: function appendNationalSignificantNumberDigits(nextDigits) {
134
115
  this.nationalSignificantNumber += nextDigits;
135
116
  }
136
-
137
117
  /**
138
118
  * Returns the part of `this.digits` that corresponds to the national number.
139
119
  * Basically, all digits that have been input by the user, except for the
@@ -160,6 +140,7 @@ var AsYouTypeState = /*#__PURE__*/function () {
160
140
  return this.digits;
161
141
  }
162
142
  }]);
143
+ return AsYouTypeState;
163
144
  }();
164
145
 
165
146
  export { AsYouTypeState as default };
@@ -1 +1 @@
1
- {"version":3,"file":"AsYouTypeState.js","sources":["../../../../node_modules/libphonenumber-js/es6/AsYouTypeState.js"],"sourcesContent":["function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\"); }\nfunction _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }\nfunction _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", { writable: !1 }), e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n// This \"state\" object simply holds the state of the \"AsYouType\" parser:\n//\n// * `country?: string` — The exact country of the phone number, if it could be determined.\n// When inputting a phone number in \"international\" format, it will derive the `country` from \"country calling code\" and the phone number digits.\n// When inputting a phone number in \"national\" format, it will derive the `country` from `defaultCountry` that was specified when creating the `AsYouType` formatter.\n// Sidenote: If `USE_NON_GEOGRAPHIC_COUNTRY_CODE` flag was `true`, then for \"non-geographic phone numbers\" `state.country` would've been \"001\".\n// * `callingCode?: string` — \"Country calling code\" that has been extracted from the input phone number.\n// When inputting a phone number in \"international\" format, it will extract the \"country calling code\" from the digits that follow the \"+\" character.\n// When inputting a phone number in \"national\" format, `callingCode` will be `undefined`.\n// Sidenote: `state.callingCode` is therefore independent from `state.country` and there could be situations when `state.country` is defined by `state.callingCode` is not — that would be when inputting a phone number not in \"international\" format.\n// * `digits: string` — Phone number digits that have been input so far, including the \"+\" character, if present. In case of inputting non-arabic digits, those will be converted to arabic ones.\n// * `international: boolean` — Whether the phone number is being input in \"international\" format, i.e. with a \"+\" character.\n// * `missingPlus: boolean` — Whether it's a phone number in \"international\" format that is missing the leading \"+\" character for some reason — apparently, Google thinks that it's a common mistake when inputting a phone number.\n// * `IDDPrefix?: string` — An \"IDD prefix\", when the phone number is being input in an \"out-of-country dialing\" format. https://wikitravel.org/en/International_dialling_prefix\n// * `carrierCode?: string` — A \"carrier code\", if the phone number contains it. Normally, those can only be present in Colombia or Brazil, and only when calling from mobile phones to fixed-line numbers.\n// * `nationalPrefix?: string` — \"National prefix\", if present in the phone number input.\n// * `nationalSignificantNumber?: string` — National (significant) number digits that have been input so far.\n// * `nationalSignificantNumberIsModified: boolean` — Tells if the parsed national (significant) number is present as-is in the input string. For example, when inputting \"0343515551212999\" Argentinian mobile number, the parsed national (significant) number is \"93435551212999\". There, one can see how it stripped \"0\" national prefix and prepended a \"9\", because that's how it is instructed to do in Argentina's metadata. So in the described example, the parsed national (significant) number is not present as-is in the input string. Instead, it's \"modified\" in the input string. https://gitlab.com/caamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule\n// * `prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix?: string` — In some countries, a phone number could have a prefix that is not a \"national prefix\" but rather some other type of \"utility\" prefix.\n// For example, when calling within Australia, one could prepend `1831` prefix to hide caller's phone number.\n// https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule\n//\nvar AsYouTypeState = /*#__PURE__*/function () {\n function AsYouTypeState(_ref) {\n var onCountryChange = _ref.onCountryChange,\n onCallingCodeChange = _ref.onCallingCodeChange;\n _classCallCheck(this, AsYouTypeState);\n this.onCountryChange = onCountryChange;\n this.onCallingCodeChange = onCallingCodeChange;\n }\n return _createClass(AsYouTypeState, [{\n key: \"reset\",\n value: function reset(_ref2) {\n var country = _ref2.country,\n callingCode = _ref2.callingCode;\n this.international = false;\n this.missingPlus = false;\n this.IDDPrefix = undefined;\n this.callingCode = undefined;\n this.digits = '';\n this.resetNationalSignificantNumber();\n this.initCountryAndCallingCode(country, callingCode);\n }\n }, {\n key: \"resetNationalSignificantNumber\",\n value: function resetNationalSignificantNumber() {\n this.nationalSignificantNumber = this.getNationalDigits();\n this.nationalSignificantNumberIsModified = false;\n this.nationalPrefix = undefined;\n this.carrierCode = undefined;\n this.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix = undefined;\n }\n }, {\n key: \"update\",\n value: function update(properties) {\n for (var _i = 0, _Object$keys = Object.keys(properties); _i < _Object$keys.length; _i++) {\n var key = _Object$keys[_i];\n this[key] = properties[key];\n }\n }\n }, {\n key: \"initCountryAndCallingCode\",\n value: function initCountryAndCallingCode(country, callingCode) {\n this.setCountry(country);\n this.setCallingCode(callingCode);\n }\n }, {\n key: \"setCountry\",\n value: function setCountry(country) {\n this.country = country;\n this.onCountryChange(country);\n }\n }, {\n key: \"setCallingCode\",\n value: function setCallingCode(callingCode) {\n this.callingCode = callingCode;\n this.onCallingCodeChange(callingCode, this.country);\n }\n }, {\n key: \"startInternationalNumber\",\n value: function startInternationalNumber(country, callingCode) {\n // Prepend the `+` to parsed input.\n this.international = true;\n // If a default country was set then reset it\n // because an explicitly international phone\n // number is being entered.\n this.initCountryAndCallingCode(country, callingCode);\n }\n }, {\n key: \"appendDigits\",\n value: function appendDigits(nextDigits) {\n this.digits += nextDigits;\n }\n }, {\n key: \"appendNationalSignificantNumberDigits\",\n value: function appendNationalSignificantNumberDigits(nextDigits) {\n this.nationalSignificantNumber += nextDigits;\n }\n\n /**\r\n * Returns the part of `this.digits` that corresponds to the national number.\r\n * Basically, all digits that have been input by the user, except for the\r\n * international prefix and the country calling code part\r\n * (if the number is an international one).\r\n * @return {string}\r\n */\n }, {\n key: \"getNationalDigits\",\n value: function getNationalDigits() {\n if (this.international) {\n return this.digits.slice((this.IDDPrefix ? this.IDDPrefix.length : 0) + (this.callingCode ? this.callingCode.length : 0));\n }\n return this.digits;\n }\n }, {\n key: \"getDigitsWithoutInternationalPrefix\",\n value: function getDigitsWithoutInternationalPrefix() {\n if (this.international) {\n if (this.IDDPrefix) {\n return this.digits.slice(this.IDDPrefix.length);\n }\n }\n return this.digits;\n }\n }]);\n}();\nexport { AsYouTypeState as default };\n//# sourceMappingURL=AsYouTypeState.js.map"],"names":["AsYouTypeState","_ref","onCountryChange","onCallingCodeChange","_classCallCheck","_createClass","key","value","reset","_ref2","country","callingCode","international","missingPlus","IDDPrefix","undefined","digits","resetNationalSignificantNumber","initCountryAndCallingCode","nationalSignificantNumber","getNationalDigits","nationalSignificantNumberIsModified","nationalPrefix","carrierCode","prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix","update","properties","_i","_Object$keys","Object","keys","length","setCountry","setCallingCode","startInternationalNumber","appendDigits","nextDigits","appendNationalSignificantNumberDigits","slice","getDigitsWithoutInternationalPrefix"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA,IACqBA,cAAc,gBAAA,YAAA;EAClC,SAAAA,cAAAA,CAAAC,IAAA,EAAsD;AAAA,IAAA,IAAxCC,eAAe,GAAAD,IAAA,CAAfC,eAAe;MAAEC,mBAAmB,GAAAF,IAAA,CAAnBE,mBAAmB;AAAAC,IAAAA,eAAA,OAAAJ,cAAA,CAAA;IACjD,IAAI,CAACE,eAAe,GAAGA,eAAe;IACtC,IAAI,CAACC,mBAAmB,GAAGA,mBAAmB;AAC/C,EAAA;EAAC,OAAAE,YAAA,CAAAL,cAAA,EAAA,CAAA;IAAAM,GAAA,EAAA,OAAA;AAAAC,IAAAA,KAAA,EA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AA;IAAA9B,GAAA,EAAA,mBAAA;AAAAC,IAAAA,KAAA,EAOA,SAAAa,iBAAiBA,GAAG;MACnB,IAAI,IAAI,CAACR,aAAa,EAAE;AACvB,QAAA,OAAO,IAAI,CAACI,MAAM,CAACsB,KAAK,CACvB,CAAC,IAAI,CAACxB,SAAS,GAAG,IAAI,CAACA,SAAS,CAACiB,MAAM,GAAG,CAAC,KAC1C,IAAI,CAACpB,WAAW,GAAG,IAAI,CAACA,WAAW,CAACoB,MAAM,GAAG,CAAC,CAChD,CAAC;AACF,MAAA;MACA,OAAO,IAAI,CAACf,MAAM;AACnB,IAAA;AAAC,GAAA,EAAA;IAAAV,GAAA,EAAA,qCAAA;AAAAC,IAAAA,KAAA,EAED,SAAAgC,mCAAmCA,GAAG;MACrC,IAAI,IAAI,CAAC3B,aAAa,EAAE;QACvB,IAAI,IAAI,CAACE,SAAS,EAAE;UACnB,OAAO,IAAI,CAACE,MAAM,CAACsB,KAAK,CAAC,IAAI,CAACxB,SAAS,CAACiB,MAAM,CAAC;AAChD,QAAA;AACD,MAAA;MACA,OAAO,IAAI,CAACf,MAAM;AACnB,IAAA;AAAC,GAAA,CAAA,CAAA;AAAA,CAAA;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"AsYouTypeState.js","sources":["../../../../node_modules/libphonenumber-js/es6/AsYouTypeState.js"],"sourcesContent":["function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n// This \"state\" object simply holds the state of the \"AsYouType\" parser:\n//\n// * `country?: string`\n// * `callingCode?: string`\n// * `digits: string`\n// * `international: boolean`\n// * `missingPlus: boolean`\n// * `IDDPrefix?: string`\n// * `carrierCode?: string`\n// * `nationalPrefix?: string`\n// * `nationalSignificantNumber?: string`\n// * `nationalSignificantNumberMatchesInput: boolean`\n// * `complexPrefixBeforeNationalSignificantNumber?: string`\n//\n// `state.country` and `state.callingCode` aren't required to be in sync.\n// For example, `state.country` could be `\"AR\"` and `state.callingCode` could be `undefined`.\n// So `state.country` and `state.callingCode` are totally independent.\n//\nvar AsYouTypeState = /*#__PURE__*/function () {\n function AsYouTypeState(_ref) {\n var onCountryChange = _ref.onCountryChange,\n onCallingCodeChange = _ref.onCallingCodeChange;\n\n _classCallCheck(this, AsYouTypeState);\n\n this.onCountryChange = onCountryChange;\n this.onCallingCodeChange = onCallingCodeChange;\n }\n\n _createClass(AsYouTypeState, [{\n key: \"reset\",\n value: function reset(_ref2) {\n var country = _ref2.country,\n callingCode = _ref2.callingCode;\n this.international = false;\n this.missingPlus = false;\n this.IDDPrefix = undefined;\n this.callingCode = undefined;\n this.digits = '';\n this.resetNationalSignificantNumber();\n this.initCountryAndCallingCode(country, callingCode);\n }\n }, {\n key: \"resetNationalSignificantNumber\",\n value: function resetNationalSignificantNumber() {\n this.nationalSignificantNumber = this.getNationalDigits();\n this.nationalSignificantNumberMatchesInput = true;\n this.nationalPrefix = undefined;\n this.carrierCode = undefined;\n this.complexPrefixBeforeNationalSignificantNumber = undefined;\n }\n }, {\n key: \"update\",\n value: function update(properties) {\n for (var _i = 0, _Object$keys = Object.keys(properties); _i < _Object$keys.length; _i++) {\n var key = _Object$keys[_i];\n this[key] = properties[key];\n }\n }\n }, {\n key: \"initCountryAndCallingCode\",\n value: function initCountryAndCallingCode(country, callingCode) {\n this.setCountry(country);\n this.setCallingCode(callingCode);\n }\n }, {\n key: \"setCountry\",\n value: function setCountry(country) {\n this.country = country;\n this.onCountryChange(country);\n }\n }, {\n key: \"setCallingCode\",\n value: function setCallingCode(callingCode) {\n this.callingCode = callingCode;\n this.onCallingCodeChange(callingCode, this.country);\n }\n }, {\n key: \"startInternationalNumber\",\n value: function startInternationalNumber(country, callingCode) {\n // Prepend the `+` to parsed input.\n this.international = true; // If a default country was set then reset it\n // because an explicitly international phone\n // number is being entered.\n\n this.initCountryAndCallingCode(country, callingCode);\n }\n }, {\n key: \"appendDigits\",\n value: function appendDigits(nextDigits) {\n this.digits += nextDigits;\n }\n }, {\n key: \"appendNationalSignificantNumberDigits\",\n value: function appendNationalSignificantNumberDigits(nextDigits) {\n this.nationalSignificantNumber += nextDigits;\n }\n /**\r\n * Returns the part of `this.digits` that corresponds to the national number.\r\n * Basically, all digits that have been input by the user, except for the\r\n * international prefix and the country calling code part\r\n * (if the number is an international one).\r\n * @return {string}\r\n */\n\n }, {\n key: \"getNationalDigits\",\n value: function getNationalDigits() {\n if (this.international) {\n return this.digits.slice((this.IDDPrefix ? this.IDDPrefix.length : 0) + (this.callingCode ? this.callingCode.length : 0));\n }\n\n return this.digits;\n }\n }, {\n key: \"getDigitsWithoutInternationalPrefix\",\n value: function getDigitsWithoutInternationalPrefix() {\n if (this.international) {\n if (this.IDDPrefix) {\n return this.digits.slice(this.IDDPrefix.length);\n }\n }\n\n return this.digits;\n }\n }]);\n\n return AsYouTypeState;\n}();\n\nexport { AsYouTypeState as default };\n//# sourceMappingURL=AsYouTypeState.js.map"],"names":["AsYouTypeState","_ref","onCountryChange","onCallingCodeChange","_classCallCheck","reset","_ref2","country","callingCode","international","missingPlus","IDDPrefix","undefined","digits","resetNationalSignificantNumber","initCountryAndCallingCode","nationalSignificantNumber","getNationalDigits","nationalSignificantNumberMatchesInput","nationalPrefix","carrierCode","complexPrefixBeforeNationalSignificantNumber","update","properties","_i","_Object$keys","Object","keys","length","key","setCountry","setCallingCode","startInternationalNumber","appendDigits","nextDigits","appendNationalSignificantNumberDigits","slice","getDigitsWithoutInternationalPrefix"],"mappings":";;;;;;;;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,EAAA,SAAAjB,oBAAoB;MACnB,IAAI,IAAA,CAAKR,aAAT,EAAwB;QACvB,OAAO,IAAA,CAAKI,MAAL,CAAYuB,KAAZ,CACN,CAAC,IAAA,CAAKzB,SAAL,GAAiB,IAAA,CAAKA,SAAL,CAAeiB,MAAhC,GAAyC,CAA1C,KACC,IAAA,CAAKpB,WAAL,GAAmB,IAAA,CAAKA,WAAL,CAAiBoB,MAApC,GAA6C,CAD9C,CADM,CAAP;AAIA,MAAA;AACD,MAAA,OAAO,KAAKf,MAAZ;AACA,IAAA;;;AAED,IAAA,KAAA,EAAA,SAAAwB,sCAAsC;MACrC,IAAI,IAAA,CAAK5B,aAAT,EAAwB;QACvB,IAAI,IAAA,CAAKE,SAAT,EAAoB;UACnB,OAAO,IAAA,CAAKE,MAAL,CAAYuB,KAAZ,CAAkB,IAAA,CAAKzB,SAAL,CAAeiB,MAAjC,CAAP;AACA,QAAA;AACD,MAAA;AACD,MAAA,OAAO,KAAKf,MAAZ;AACA,IAAA;;;;;;;","x_google_ignoreList":[0]}
@@ -1,115 +1,154 @@
1
- function _typeof(o) {
1
+ function _typeof(obj) {
2
2
  "@babel/helpers - typeof";
3
3
 
4
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
5
- return typeof o;
6
- } : function (o) {
7
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
8
- }, _typeof(o);
4
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
5
+ return typeof obj;
6
+ } : function (obj) {
7
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
8
+ }, _typeof(obj);
9
9
  }
10
- function _createClass(e, r, t) {
11
- return Object.defineProperty(e, "prototype", {
10
+ function _createClass(Constructor, protoProps, staticProps) {
11
+ Object.defineProperty(Constructor, "prototype", {
12
12
  writable: false
13
- }), e;
13
+ });
14
+ return Constructor;
14
15
  }
15
- function _classCallCheck(a, n) {
16
- if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
17
- }
18
- function _callSuper(t, o, e) {
19
- return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
20
- }
21
- function _possibleConstructorReturn(t, e) {
22
- if (e && ("object" == _typeof(e) || "function" == typeof e)) return e;
23
- if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
24
- return _assertThisInitialized(t);
25
- }
26
- function _assertThisInitialized(e) {
27
- if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
28
- return e;
16
+ function _classCallCheck(instance, Constructor) {
17
+ if (!(instance instanceof Constructor)) {
18
+ throw new TypeError("Cannot call a class as a function");
19
+ }
29
20
  }
30
- function _inherits(t, e) {
31
- if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
32
- t.prototype = Object.create(e && e.prototype, {
21
+ function _inherits(subClass, superClass) {
22
+ if (typeof superClass !== "function" && superClass !== null) {
23
+ throw new TypeError("Super expression must either be null or a function");
24
+ }
25
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
33
26
  constructor: {
34
- value: t,
27
+ value: subClass,
35
28
  writable: true,
36
29
  configurable: true
37
30
  }
38
- }), Object.defineProperty(t, "prototype", {
31
+ });
32
+ Object.defineProperty(subClass, "prototype", {
39
33
  writable: false
40
- }), e && _setPrototypeOf(t, e);
34
+ });
35
+ if (superClass) _setPrototypeOf(subClass, superClass);
36
+ }
37
+ function _createSuper(Derived) {
38
+ var hasNativeReflectConstruct = _isNativeReflectConstruct();
39
+ return function _createSuperInternal() {
40
+ var Super = _getPrototypeOf(Derived),
41
+ result;
42
+ if (hasNativeReflectConstruct) {
43
+ var NewTarget = _getPrototypeOf(this).constructor;
44
+ result = Reflect.construct(Super, arguments, NewTarget);
45
+ } else {
46
+ result = Super.apply(this, arguments);
47
+ }
48
+ return _possibleConstructorReturn(this, result);
49
+ };
50
+ }
51
+ function _possibleConstructorReturn(self, call) {
52
+ if (call && (_typeof(call) === "object" || typeof call === "function")) {
53
+ return call;
54
+ } else if (call !== void 0) {
55
+ throw new TypeError("Derived constructors may only return object or undefined");
56
+ }
57
+ return _assertThisInitialized(self);
58
+ }
59
+ function _assertThisInitialized(self) {
60
+ if (self === void 0) {
61
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
62
+ }
63
+ return self;
41
64
  }
42
- function _wrapNativeSuper(t) {
43
- var r = "function" == typeof Map ? new Map() : void 0;
44
- return _wrapNativeSuper = function _wrapNativeSuper(t) {
45
- if (null === t || !_isNativeFunction(t)) return t;
46
- if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
47
- if (void 0 !== r) {
48
- if (r.has(t)) return r.get(t);
49
- r.set(t, Wrapper);
65
+ function _wrapNativeSuper(Class) {
66
+ var _cache = typeof Map === "function" ? new Map() : undefined;
67
+ _wrapNativeSuper = function _wrapNativeSuper(Class) {
68
+ if (Class === null || !_isNativeFunction(Class)) return Class;
69
+ if (typeof Class !== "function") {
70
+ throw new TypeError("Super expression must either be null or a function");
71
+ }
72
+ if (typeof _cache !== "undefined") {
73
+ if (_cache.has(Class)) return _cache.get(Class);
74
+ _cache.set(Class, Wrapper);
50
75
  }
51
76
  function Wrapper() {
52
- return _construct(t, arguments, _getPrototypeOf(this).constructor);
77
+ return _construct(Class, arguments, _getPrototypeOf(this).constructor);
53
78
  }
54
- return Wrapper.prototype = Object.create(t.prototype, {
79
+ Wrapper.prototype = Object.create(Class.prototype, {
55
80
  constructor: {
56
81
  value: Wrapper,
57
82
  enumerable: false,
58
83
  writable: true,
59
84
  configurable: true
60
85
  }
61
- }), _setPrototypeOf(Wrapper, t);
62
- }, _wrapNativeSuper(t);
86
+ });
87
+ return _setPrototypeOf(Wrapper, Class);
88
+ };
89
+ return _wrapNativeSuper(Class);
63
90
  }
64
- function _construct(t, e, r) {
65
- if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
66
- var o = [null];
67
- o.push.apply(o, e);
68
- var p = new (t.bind.apply(t, o))();
69
- return r && _setPrototypeOf(p, r.prototype), p;
91
+ function _construct(Parent, args, Class) {
92
+ if (_isNativeReflectConstruct()) {
93
+ _construct = Reflect.construct;
94
+ } else {
95
+ _construct = function _construct(Parent, args, Class) {
96
+ var a = [null];
97
+ a.push.apply(a, args);
98
+ var Constructor = Function.bind.apply(Parent, a);
99
+ var instance = new Constructor();
100
+ if (Class) _setPrototypeOf(instance, Class.prototype);
101
+ return instance;
102
+ };
103
+ }
104
+ return _construct.apply(null, arguments);
70
105
  }
71
106
  function _isNativeReflectConstruct() {
107
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
108
+ if (Reflect.construct.sham) return false;
109
+ if (typeof Proxy === "function") return true;
72
110
  try {
73
- var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
74
- } catch (t) {}
75
- return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {
76
- return !!t;
77
- })();
78
- }
79
- function _isNativeFunction(t) {
80
- try {
81
- return -1 !== Function.toString.call(t).indexOf("[native code]");
82
- } catch (n) {
83
- return "function" == typeof t;
111
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
112
+ return true;
113
+ } catch (e) {
114
+ return false;
84
115
  }
85
116
  }
86
- function _setPrototypeOf(t, e) {
87
- return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
88
- return t.__proto__ = e, t;
89
- }, _setPrototypeOf(t, e);
117
+ function _isNativeFunction(fn) {
118
+ return Function.toString.call(fn).indexOf("[native code]") !== -1;
90
119
  }
91
- function _getPrototypeOf(t) {
92
- return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
93
- return t.__proto__ || Object.getPrototypeOf(t);
94
- }, _getPrototypeOf(t);
120
+ function _setPrototypeOf(o, p) {
121
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
122
+ o.__proto__ = p;
123
+ return o;
124
+ };
125
+ return _setPrototypeOf(o, p);
95
126
  }
127
+ function _getPrototypeOf(o) {
128
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
129
+ return o.__proto__ || Object.getPrototypeOf(o);
130
+ };
131
+ return _getPrototypeOf(o);
132
+ }
133
+
96
134
  // https://stackoverflow.com/a/46971044/970769
97
135
  // "Breaking changes in Typescript 2.1"
98
136
  // "Extending built-ins like Error, Array, and Map may no longer work."
99
137
  // "As a recommendation, you can manually adjust the prototype immediately after any super(...) calls."
100
138
  // https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
101
139
  var ParseError = /*#__PURE__*/function (_Error) {
140
+ _inherits(ParseError, _Error);
141
+ var _super = _createSuper(ParseError);
102
142
  function ParseError(code) {
103
143
  var _this;
104
144
  _classCallCheck(this, ParseError);
105
- _this = _callSuper(this, ParseError, [code]);
106
- // Set the prototype explicitly.
145
+ _this = _super.call(this, code); // Set the prototype explicitly.
107
146
  // Any subclass of FooError will have to manually set the prototype as well.
108
- Object.setPrototypeOf(_this, ParseError.prototype);
147
+
148
+ Object.setPrototypeOf(_assertThisInitialized(_this), ParseError.prototype);
109
149
  _this.name = _this.constructor.name;
110
150
  return _this;
111
151
  }
112
- _inherits(ParseError, _Error);
113
152
  return _createClass(ParseError);
114
153
  }(/*#__PURE__*/_wrapNativeSuper(Error));
115
154