pixel-react 1.15.13 → 1.15.15
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.
- package/README.md +75 -75
- package/lib/_virtual/index10.js +2 -2
- package/lib/_virtual/index11.js +2 -2
- package/lib/_virtual/index12.js +2 -2
- package/lib/_virtual/index9.js +2 -2
- package/lib/assets/icons/navigate_to_pages.svg.js +6 -0
- package/lib/assets/icons/navigate_to_pages.svg.js.map +1 -0
- package/lib/assets/icons/spinner.svg.js +1 -1
- package/lib/assets/icons/spinner.svg.js.map +1 -1
- package/lib/components/Accordion/Accordion.d.ts +1 -1
- package/lib/components/Accordion/Accordion.js +5 -3
- package/lib/components/Accordion/Accordion.js.map +1 -1
- package/lib/components/Accordion/types.d.ts +1 -0
- package/lib/components/Editor/VariableDropdown.js +2 -2
- package/lib/components/Icon/iconList.js +2 -0
- package/lib/components/Icon/iconList.js.map +1 -1
- package/lib/components/InputWithDropdown/InputWithDropdown.js +4 -3
- package/lib/components/InputWithDropdown/InputWithDropdown.js.map +1 -1
- package/lib/index.cjs +9901 -3778
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.ts +3 -2
- package/lib/node_modules/@date-fns/tz/date/index.js +1 -19
- package/lib/node_modules/@date-fns/tz/date/index.js.map +1 -1
- package/lib/node_modules/@date-fns/tz/date/mini.js +34 -6
- package/lib/node_modules/@date-fns/tz/date/mini.js.map +1 -1
- package/lib/node_modules/@date-fns/tz/tzName/index.js +40 -0
- package/lib/node_modules/@date-fns/tz/tzName/index.js.map +1 -0
- package/lib/node_modules/@date-fns/tz/tzOffset/index.js +6 -5
- package/lib/node_modules/@date-fns/tz/tzOffset/index.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js +93 -98
- package/lib/node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/config/index.js +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/config/index.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/loader/index.js +15 -13
- package/lib/node_modules/@monaco-editor/loader/lib/es/loader/index.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/utils/compose.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/utils/curry.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/utils/deepMerge.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/utils/isObject.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js +1 -0
- package/lib/node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/validators/index.js +1 -2
- package/lib/node_modules/@monaco-editor/loader/lib/es/validators/index.js.map +1 -1
- package/lib/node_modules/janus-gateway/npm/dist/janus.es.js +26 -57
- package/lib/node_modules/janus-gateway/npm/dist/janus.es.js.map +1 -1
- package/lib/node_modules/js-beautify/js/src/css/beautifier.js +1 -1
- package/lib/node_modules/js-beautify/js/src/css/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/css/options.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/options.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/tokenizer.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/beautifier.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/options.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/tokenizer.js +1 -1
- package/lib/node_modules/jsencrypt/lib/JSEncrypt.js +246 -0
- package/lib/node_modules/jsencrypt/lib/JSEncrypt.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/JSEncryptRSAKey.js +325 -0
- package/lib/node_modules/jsencrypt/lib/JSEncryptRSAKey.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/index.js +6 -0
- package/lib/node_modules/jsencrypt/lib/index.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/asn1.js +570 -0
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/asn1.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/base64.js +88 -0
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/base64.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/hex.js +66 -0
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/hex.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/int10.js +87 -0
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/int10.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/base64.js +65 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/base64.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/jsbn.js +1700 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/jsbn.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/prng4.js +48 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/prng4.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/rng.js +77 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/rng.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/rsa.js +415 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/rsa.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/sha256.js +307 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/sha256.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/util.js +61 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/util.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js +1559 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js.map +1 -0
- package/lib/node_modules/libphonenumber-js/es6/AsYouType.js +115 -82
- package/lib/node_modules/libphonenumber-js/es6/AsYouType.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternMatcher.js +68 -58
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternMatcher.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternParser.js +36 -23
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternParser.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.complete.js +13 -9
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.complete.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.js +226 -187
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.util.js +21 -27
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.util.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeParser.js +150 -117
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeParser.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeState.js +57 -38
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeState.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/ParseError.js +70 -109
- package/lib/node_modules/libphonenumber-js/es6/ParseError.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/PhoneNumber.js +72 -57
- package/lib/node_modules/libphonenumber-js/es6/PhoneNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/constants.js +15 -9
- package/lib/node_modules/libphonenumber-js/es6/constants.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/format.js +67 -93
- package/lib/node_modules/libphonenumber-js/es6/format.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/formatIncompletePhoneNumber.js +0 -1
- package/lib/node_modules/libphonenumber-js/es6/formatIncompletePhoneNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/getCountries.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/RFC3966.js +0 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/RFC3966.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js +49 -10
- package/lib/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js +20 -32
- package/lib/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js +5 -4
- package/lib/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js +25 -18
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +12 -11
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +13 -11
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js +21 -11
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +12 -11
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js +15 -12
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +4 -4
- package/lib/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +59 -35
- package/lib/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js +2 -2
- package/lib/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +38 -36
- package/lib/node_modules/libphonenumber-js/es6/helpers/getNumberType.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js +0 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/isObject.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js +14 -10
- package/lib/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js +4 -4
- package/lib/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/parseDigits.js +22 -27
- package/lib/node_modules/libphonenumber-js/es6/helpers/parseDigits.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js +6 -6
- package/lib/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/isPossible.js +6 -7
- package/lib/node_modules/libphonenumber-js/es6/isPossible.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/isValid.js +6 -5
- package/lib/node_modules/libphonenumber-js/es6/isValid.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/isValidPhoneNumber.js +44 -26
- package/lib/node_modules/libphonenumber-js/es6/isValidPhoneNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/metadata.js +120 -69
- package/lib/node_modules/libphonenumber-js/es6/metadata.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/normalizeArguments.js +87 -68
- package/lib/node_modules/libphonenumber-js/es6/normalizeArguments.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/parse.js +58 -40
- package/lib/node_modules/libphonenumber-js/es6/parse.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js +32 -36
- package/lib/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/parsePhoneNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js +44 -26
- package/lib/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/parsePhoneNumber_.js +46 -28
- package/lib/node_modules/libphonenumber-js/es6/parsePhoneNumber_.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/tools/semver-compare.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/metadata.min.json.js +19 -19
- package/lib/node_modules/libphonenumber-js/metadata.min.json.js.map +1 -1
- package/lib/node_modules/prop-types/index.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/DayPicker.js +88 -64
- package/lib/node_modules/react-day-picker/dist/esm/DayPicker.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/UI.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/classes/CalendarDay.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/classes/DateLib.js +71 -6
- package/lib/node_modules/react-day-picker/dist/esm/classes/DateLib.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Button.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/CaptionLabel.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Chevron.js +18 -14
- package/lib/node_modules/react-day-picker/dist/esm/components/Chevron.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Day.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/DayButton.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Dropdown.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/DropdownNav.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Footer.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Month.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/MonthCaption.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/MonthGrid.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Months.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Nav.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/NextMonthButton.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Option.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Root.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Select.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Week.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/WeekNumber.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Weekday.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Weekdays.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Weeks.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/YearsDropdown.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js +3 -2
- package/lib/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/formatters/formatDay.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/formatters/index.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getComponents.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getDates.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getDays.js +4 -4
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getDays.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getFormatters.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getMonths.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js +2 -2
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js +9 -11
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/index.js +2 -2
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelDayButton.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelGrid.js +3 -2
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelGrid.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelGridcell.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelNav.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelNext.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelNext.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelWeekday.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/selection/useMulti.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/selection/useRange.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/selection/useSingle.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/useAnimation.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/useAnimation.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/useCalendar.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/useCalendar.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/useDayPicker.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/useFocus.js +6 -0
- package/lib/node_modules/react-day-picker/dist/esm/useFocus.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/useSelection.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/utils/addToRange.js +6 -1
- package/lib/node_modules/react-day-picker/dist/esm/utils/addToRange.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/utils/typeguards.js.map +1 -1
- package/lib/node_modules/react-day-picker/node_modules/date-fns/eachYearOfInterval.js +64 -0
- package/lib/node_modules/react-day-picker/node_modules/date-fns/eachYearOfInterval.js.map +1 -0
- package/lib/node_modules/react-hook-form/dist/index.esm.js +67 -44
- package/lib/node_modules/react-hook-form/dist/index.esm.js.map +1 -1
- package/lib/node_modules/react-virtuoso/dist/index.js +1246 -1200
- package/lib/node_modules/react-virtuoso/dist/index.js.map +1 -1
- package/lib/node_modules/ua-parser-js/src/ua-parser.js +85 -71
- package/lib/node_modules/ua-parser-js/src/ua-parser.js.map +1 -1
- package/lib/styles.css +1 -1
- package/lib/styles.css.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils/getEncryptedData/getEncryptedData.d.ts +1 -1
- package/lib/utils/getEncryptedData/getEncryptedData.js +8 -17
- package/lib/utils/getEncryptedData/getEncryptedData.js.map +1 -1
- package/package.json +107 -106
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCountryByNationalNumber.js","sources":["../../../../../node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js"],"sourcesContent":["function _createForOfIteratorHelperLoose(
|
|
1
|
+
{"version":3,"file":"getCountryByNationalNumber.js","sources":["../../../../../node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js"],"sourcesContent":["function _createForOfIteratorHelperLoose(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError(\"Invalid attempt to iterate 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; }\nimport Metadata from '../metadata.js';\nimport getNumberType from './getNumberType.js';\n\n// Returns the exact country that the `nationalPhoneNumber` belongs to\n// in cases of ambiguity, i.e. when multiple countries share the same \"country calling code\".\nexport default function getCountryByNationalNumber(nationalPhoneNumber, _ref) {\n var countries = _ref.countries,\n metadata = _ref.metadata;\n // Re-create `metadata` because it will be selecting a `country`.\n metadata = new Metadata(metadata);\n\n // const matchingCountries = []\n\n for (var _iterator = _createForOfIteratorHelperLoose(countries), _step; !(_step = _iterator()).done;) {\n var country = _step.value;\n metadata.selectNumberingPlan(country);\n // \"Leading digits\" patterns are only defined for about 20% of all countries.\n // By definition, matching \"leading digits\" is a sufficient but not a necessary\n // condition for a phone number to belong to a country.\n // The point of \"leading digits\" check is that it's the fastest one to get a match.\n // https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/METADATA.md#leading_digits\n // I'd suppose that \"leading digits\" patterns are mutually exclusive for different countries\n // because of the intended use of that feature.\n if (metadata.leadingDigits()) {\n if (nationalPhoneNumber && nationalPhoneNumber.search(metadata.leadingDigits()) === 0) {\n return country;\n }\n }\n // Else perform full validation with all of those\n // fixed-line/mobile/etc regular expressions.\n else if (getNumberType({\n phone: nationalPhoneNumber,\n country: country\n }, undefined, metadata.metadata)) {\n // When multiple countries share the same \"country calling code\",\n // type patterns aren't guaranteed to be unique among them.\n // For example, both `US` and `CA` have the same pattern for `toll_free` numbers.\n // https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/103#note_1417147572\n //\n // That means that this `if` condition could be `true` for multiple countries from the list.\n // Currently, it just returns the first one, which is also the \"main\" country for the \"country calling code\".\n // In an example with `toll_free` numbers above, `\"US\"` would be returned even though\n // it could as well be `\"CA\"`.\n //\n // There was also a time when this attempted to be overly smart\n // and kept track of all such multiple matching countries\n // and then picked the one that matched the `defaultCountry`, if provided.\n // For example, with `toll_free` numbers above, and with `defaultCountry: \"CA\"`,\n // it would've returned `\"CA\"` instead of `\"US\"`.\n // Later it turned out that such \"overly smart\" behavior turned out to be just confusing,\n // so this \"overly smart\" country detection was reverted to returning the \"main\" country\n // for the \"country calling code\".\n // https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/154\n //\n return country;\n //\n // The \"overly smart\" behavior code:\n //\n // if (defaultCountry) {\n // \tif (country === defaultCountry) {\n // \t\treturn country\n // \t} else {\n // \t\tmatchingCountries.push(country)\n // \t}\n // } else {\n // \treturn country\n // }\n }\n }\n\n // // Return the first (\"main\") one of the `matchingCountries`.\n // if (matchingCountries.length > 0) {\n // \treturn matchingCountries[0]\n // }\n}\n//# sourceMappingURL=getCountryByNationalNumber.js.map"],"names":["getCountryByNationalNumber","nationalPhoneNumber","_ref","countries","metadata","Metadata","_iterator","_createForOfIteratorHelperLoose","_step","done","country","value","selectNumberingPlan","leadingDigits","search","getNumberType","phone","undefined"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;AACA;AACe,SAASA,0BAA0BA,CAACC,mBAAmB,EAAAC,IAAA,EAGnE;AAAA,EAAA,IAFFC,SAAS,GAAAD,IAAA,CAATC,SAAS;IACTC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;AAER;AACAA,EAAAA,QAAQ,GAAG,IAAIC,QAAQ,CAACD,QAAQ,CAAC;;AAEjC;;AAEA,EAAA,KAAA,IAAAE,SAAA,GAAAC,+BAAA,CAAsBJ,SAAS,CAAA,EAAAK,KAAA,EAAA,CAAA,CAAAA,KAAA,GAAAF,SAAA,EAAA,EAAAG,IAAA,GAAE;AAAA,IAAA,IAAtBC,OAAO,GAAAF,KAAA,CAAAG,KAAA;AACjBP,IAAAA,QAAQ,CAACQ,mBAAmB,CAACF,OAAO,CAAC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA,IAAIN,QAAQ,CAACS,aAAa,EAAE,EAAE;AAC7B,MAAA,IAAIZ,mBAAmB,IACtBA,mBAAmB,CAACa,MAAM,CAACV,QAAQ,CAACS,aAAa,EAAE,CAAC,KAAK,CAAC,EAAE;AAC5D,QAAA,OAAOH,OAAO;AACf,MAAA;AACD,IAAA;AACA;AACA;SACK,IAAIK,aAAa,CAAC;AAAEC,MAAAA,KAAK,EAAEf,mBAAmB;AAAES,MAAAA,OAAO,EAAPA;AAAQ,KAAC,EAAEO,SAAS,EAAEb,QAAQ,CAACA,QAAQ,CAAC,EAAE;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAA,OAAOM,OAAO;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACD,IAAA;AACD,EAAA;;AAEA;AACA;AACA;AACA;AACD;;;;","x_google_ignoreList":[0]}
|
|
@@ -9,10 +9,10 @@ import Metadata from '../metadata.js';
|
|
|
9
9
|
* region, they will be represented as a regex string that always contains one
|
|
10
10
|
* or more characters that are not ASCII digits or a tilde.
|
|
11
11
|
*/
|
|
12
|
+
var SINGLE_IDD_PREFIX_REG_EXP = /^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
// For regions that have multiple IDD prefixes
|
|
14
15
|
// a preferred IDD prefix is returned.
|
|
15
|
-
|
|
16
16
|
function getIddPrefix(country, callingCode, metadata) {
|
|
17
17
|
var countryMetadata = new Metadata(metadata);
|
|
18
18
|
countryMetadata.selectNumberingPlan(country, callingCode);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getIddPrefix.js","sources":["../../../../../node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js"],"sourcesContent":["import Metadata from '../metadata.js';\n/**\r\n * Pattern that makes it easy to distinguish whether a region has a single\r\n * international dialing prefix or not. If a region has a single international\r\n * prefix (e.g. 011 in USA), it will be represented as a string that contains\r\n * a sequence of ASCII digits, and possibly a tilde, which signals waiting for\r\n * the tone. If there are multiple available international prefixes in a\r\n * region, they will be represented as a regex string that always contains one\r\n * or more characters that are not ASCII digits or a tilde.\r\n */\
|
|
1
|
+
{"version":3,"file":"getIddPrefix.js","sources":["../../../../../node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js"],"sourcesContent":["import Metadata from '../metadata.js';\n\n/**\r\n * Pattern that makes it easy to distinguish whether a region has a single\r\n * international dialing prefix or not. If a region has a single international\r\n * prefix (e.g. 011 in USA), it will be represented as a string that contains\r\n * a sequence of ASCII digits, and possibly a tilde, which signals waiting for\r\n * the tone. If there are multiple available international prefixes in a\r\n * region, they will be represented as a regex string that always contains one\r\n * or more characters that are not ASCII digits or a tilde.\r\n */\nvar SINGLE_IDD_PREFIX_REG_EXP = /^[\\d]+(?:[~\\u2053\\u223C\\uFF5E][\\d]+)?$/;\n\n// For regions that have multiple IDD prefixes\n// a preferred IDD prefix is returned.\nexport default function getIddPrefix(country, callingCode, metadata) {\n var countryMetadata = new Metadata(metadata);\n countryMetadata.selectNumberingPlan(country, callingCode);\n if (countryMetadata.defaultIDDPrefix()) {\n return countryMetadata.defaultIDDPrefix();\n }\n if (SINGLE_IDD_PREFIX_REG_EXP.test(countryMetadata.IDDPrefix())) {\n return countryMetadata.IDDPrefix();\n }\n}\n//# sourceMappingURL=getIddPrefix.js.map"],"names":["SINGLE_IDD_PREFIX_REG_EXP","getIddPrefix","country","callingCode","metadata","countryMetadata","Metadata","selectNumberingPlan","defaultIDDPrefix","test","IDDPrefix"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMA,yBAAyB,GAAG,wCAAwC;;AAE1E;AACA;AACe,SAASC,YAAYA,CAACC,OAAO,EAAEC,WAAW,EAAEC,QAAQ,EAAE;AACpE,EAAA,IAAMC,eAAe,GAAG,IAAIC,QAAQ,CAACF,QAAQ,CAAC;AAC9CC,EAAAA,eAAe,CAACE,mBAAmB,CAACL,OAAO,EAAEC,WAAW,CAAC;AACzD,EAAA,IAAIE,eAAe,CAACG,gBAAgB,EAAE,EAAE;AACvC,IAAA,OAAOH,eAAe,CAACG,gBAAgB,EAAE;AAC1C,EAAA;EACA,IAAIR,yBAAyB,CAACS,IAAI,CAACJ,eAAe,CAACK,SAAS,EAAE,CAAC,EAAE;AAChE,IAAA,OAAOL,eAAe,CAACK,SAAS,EAAE;AACnC,EAAA;AACD;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,61 +1,62 @@
|
|
|
1
1
|
import Metadata from '../metadata.js';
|
|
2
2
|
import matchesEntirely from './matchesEntirely.js';
|
|
3
3
|
|
|
4
|
-
function _createForOfIteratorHelperLoose(
|
|
5
|
-
var
|
|
6
|
-
if (
|
|
7
|
-
if (Array.isArray(
|
|
8
|
-
|
|
9
|
-
var
|
|
4
|
+
function _createForOfIteratorHelperLoose(r, e) {
|
|
5
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
6
|
+
if (t) return (t = t.call(r)).next.bind(t);
|
|
7
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) {
|
|
8
|
+
t && (r = t);
|
|
9
|
+
var o = 0;
|
|
10
10
|
return function () {
|
|
11
|
-
|
|
11
|
+
return o >= r.length ? {
|
|
12
12
|
done: true
|
|
13
|
-
}
|
|
14
|
-
return {
|
|
13
|
+
} : {
|
|
15
14
|
done: false,
|
|
16
|
-
value: o
|
|
15
|
+
value: r[o++]
|
|
17
16
|
};
|
|
18
17
|
};
|
|
19
18
|
}
|
|
20
19
|
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
21
20
|
}
|
|
22
|
-
function _unsupportedIterableToArray(
|
|
23
|
-
if (
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
28
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
29
|
-
}
|
|
30
|
-
function _arrayLikeToArray(arr, len) {
|
|
31
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
32
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
33
|
-
arr2[i] = arr[i];
|
|
21
|
+
function _unsupportedIterableToArray(r, a) {
|
|
22
|
+
if (r) {
|
|
23
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
24
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
25
|
+
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;
|
|
34
26
|
}
|
|
35
|
-
return arr2;
|
|
36
27
|
}
|
|
37
|
-
|
|
28
|
+
function _arrayLikeToArray(r, a) {
|
|
29
|
+
(null == a || a > r.length) && (a = r.length);
|
|
30
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
31
|
+
return n;
|
|
32
|
+
}
|
|
33
|
+
var NON_FIXED_LINE_PHONE_TYPES = ['MOBILE', 'PREMIUM_RATE', 'TOLL_FREE', 'SHARED_COST', 'VOIP', 'PERSONAL_NUMBER', 'PAGER', 'UAN', 'VOICEMAIL'];
|
|
38
34
|
|
|
35
|
+
// Finds out national phone number type (fixed line, mobile, etc)
|
|
39
36
|
function getNumberType(input, options, metadata) {
|
|
40
37
|
// If assigning the `{}` default value is moved to the arguments above,
|
|
41
38
|
// code coverage would decrease for some weird reason.
|
|
42
|
-
options = options || {};
|
|
39
|
+
options = options || {};
|
|
40
|
+
|
|
41
|
+
// When `parse()` returns an empty object — `{}` —
|
|
43
42
|
// that means that the phone number is malformed,
|
|
44
43
|
// so it can't possibly be valid.
|
|
45
|
-
|
|
46
44
|
if (!input.country && !input.countryCallingCode) {
|
|
47
45
|
return;
|
|
48
46
|
}
|
|
49
47
|
metadata = new Metadata(metadata);
|
|
50
48
|
metadata.selectNumberingPlan(input.country, input.countryCallingCode);
|
|
51
|
-
var nationalNumber = options.v2 ? input.nationalNumber : input.phone;
|
|
49
|
+
var nationalNumber = options.v2 ? input.nationalNumber : input.phone;
|
|
50
|
+
|
|
51
|
+
// The following is copy-pasted from the original function:
|
|
52
52
|
// https://github.com/googlei18n/libphonenumber/blob/3ea547d4fbaa2d0b67588904dfa5d3f2557c27ff/javascript/i18n/phonenumbers/phonenumberutil.js#L2835
|
|
53
|
-
// Is this national number even valid for this country
|
|
54
53
|
|
|
54
|
+
// Is this national number even valid for this country
|
|
55
55
|
if (!matchesEntirely(nationalNumber, metadata.nationalNumberPattern())) {
|
|
56
56
|
return;
|
|
57
|
-
}
|
|
57
|
+
}
|
|
58
58
|
|
|
59
|
+
// Is it fixed line number
|
|
59
60
|
if (isNumberTypeEqualTo(nationalNumber, 'FIXED_LINE', metadata)) {
|
|
60
61
|
// Because duplicate regular expressions are removed
|
|
61
62
|
// to reduce metadata size, if "mobile" pattern is ""
|
|
@@ -63,21 +64,22 @@ function getNumberType(input, options, metadata) {
|
|
|
63
64
|
//
|
|
64
65
|
if (metadata.type('MOBILE') && metadata.type('MOBILE').pattern() === '') {
|
|
65
66
|
return 'FIXED_LINE_OR_MOBILE';
|
|
66
|
-
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// `MOBILE` type pattern isn't included if it matched `FIXED_LINE` one.
|
|
67
70
|
// For example, for "US" country.
|
|
68
71
|
// Old metadata (< `1.0.18`) had a specific "types" data structure
|
|
69
72
|
// that happened to be `undefined` for `MOBILE` in that case.
|
|
70
73
|
// Newer metadata (>= `1.0.18`) has another data structure that is
|
|
71
74
|
// not `undefined` for `MOBILE` in that case (it's just an empty array).
|
|
72
75
|
// So this `if` is just for backwards compatibility with old metadata.
|
|
73
|
-
|
|
74
76
|
if (!metadata.type('MOBILE')) {
|
|
75
77
|
return 'FIXED_LINE_OR_MOBILE';
|
|
76
|
-
}
|
|
77
|
-
// (no such country in the minimal metadata set)
|
|
78
|
+
}
|
|
78
79
|
|
|
80
|
+
// Check if the number happens to qualify as both fixed line and mobile.
|
|
81
|
+
// (no such country in the minimal metadata set)
|
|
79
82
|
/* istanbul ignore if */
|
|
80
|
-
|
|
81
83
|
if (isNumberTypeEqualTo(nationalNumber, 'MOBILE', metadata)) {
|
|
82
84
|
return 'FIXED_LINE_OR_MOBILE';
|
|
83
85
|
}
|
|
@@ -94,13 +96,13 @@ function isNumberTypeEqualTo(nationalNumber, type, metadata) {
|
|
|
94
96
|
type = metadata.type(type);
|
|
95
97
|
if (!type || !type.pattern()) {
|
|
96
98
|
return false;
|
|
97
|
-
}
|
|
99
|
+
}
|
|
100
|
+
// Check if any possible number lengths are present;
|
|
98
101
|
// if so, we use them to avoid checking
|
|
99
102
|
// the validation pattern if they don't match.
|
|
100
103
|
// If they are absent, this means they match
|
|
101
104
|
// the general description, which we have
|
|
102
105
|
// already checked before a specific number type.
|
|
103
|
-
|
|
104
106
|
if (type.possibleLengths() && type.possibleLengths().indexOf(nationalNumber.length) < 0) {
|
|
105
107
|
return false;
|
|
106
108
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getNumberType.js","sources":["../../../../../node_modules/libphonenumber-js/es6/helpers/getNumberType.js"],"sourcesContent":["function _createForOfIteratorHelperLoose(
|
|
1
|
+
{"version":3,"file":"getNumberType.js","sources":["../../../../../node_modules/libphonenumber-js/es6/helpers/getNumberType.js"],"sourcesContent":["function _createForOfIteratorHelperLoose(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError(\"Invalid attempt to iterate 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; }\nimport Metadata from '../metadata.js';\nimport matchesEntirely from './matchesEntirely.js';\nvar NON_FIXED_LINE_PHONE_TYPES = ['MOBILE', 'PREMIUM_RATE', 'TOLL_FREE', 'SHARED_COST', 'VOIP', 'PERSONAL_NUMBER', 'PAGER', 'UAN', 'VOICEMAIL'];\n\n// Finds out national phone number type (fixed line, mobile, etc)\nexport default function getNumberType(input, options, metadata) {\n // If assigning the `{}` default value is moved to the arguments above,\n // code coverage would decrease for some weird reason.\n options = options || {};\n\n // When `parse()` returns an empty object — `{}` —\n // that means that the phone number is malformed,\n // so it can't possibly be valid.\n if (!input.country && !input.countryCallingCode) {\n return;\n }\n metadata = new Metadata(metadata);\n metadata.selectNumberingPlan(input.country, input.countryCallingCode);\n var nationalNumber = options.v2 ? input.nationalNumber : input.phone;\n\n // The following is copy-pasted from the original function:\n // https://github.com/googlei18n/libphonenumber/blob/3ea547d4fbaa2d0b67588904dfa5d3f2557c27ff/javascript/i18n/phonenumbers/phonenumberutil.js#L2835\n\n // Is this national number even valid for this country\n if (!matchesEntirely(nationalNumber, metadata.nationalNumberPattern())) {\n return;\n }\n\n // Is it fixed line number\n if (isNumberTypeEqualTo(nationalNumber, 'FIXED_LINE', metadata)) {\n // Because duplicate regular expressions are removed\n // to reduce metadata size, if \"mobile\" pattern is \"\"\n // then it means it was removed due to being a duplicate of the fixed-line pattern.\n //\n if (metadata.type('MOBILE') && metadata.type('MOBILE').pattern() === '') {\n return 'FIXED_LINE_OR_MOBILE';\n }\n\n // `MOBILE` type pattern isn't included if it matched `FIXED_LINE` one.\n // For example, for \"US\" country.\n // Old metadata (< `1.0.18`) had a specific \"types\" data structure\n // that happened to be `undefined` for `MOBILE` in that case.\n // Newer metadata (>= `1.0.18`) has another data structure that is\n // not `undefined` for `MOBILE` in that case (it's just an empty array).\n // So this `if` is just for backwards compatibility with old metadata.\n if (!metadata.type('MOBILE')) {\n return 'FIXED_LINE_OR_MOBILE';\n }\n\n // Check if the number happens to qualify as both fixed line and mobile.\n // (no such country in the minimal metadata set)\n /* istanbul ignore if */\n if (isNumberTypeEqualTo(nationalNumber, 'MOBILE', metadata)) {\n return 'FIXED_LINE_OR_MOBILE';\n }\n return 'FIXED_LINE';\n }\n for (var _iterator = _createForOfIteratorHelperLoose(NON_FIXED_LINE_PHONE_TYPES), _step; !(_step = _iterator()).done;) {\n var type = _step.value;\n if (isNumberTypeEqualTo(nationalNumber, type, metadata)) {\n return type;\n }\n }\n}\nexport function isNumberTypeEqualTo(nationalNumber, type, metadata) {\n type = metadata.type(type);\n if (!type || !type.pattern()) {\n return false;\n }\n // Check if any possible number lengths are present;\n // if so, we use them to avoid checking\n // the validation pattern if they don't match.\n // If they are absent, this means they match\n // the general description, which we have\n // already checked before a specific number type.\n if (type.possibleLengths() && type.possibleLengths().indexOf(nationalNumber.length) < 0) {\n return false;\n }\n return matchesEntirely(nationalNumber, type.pattern());\n}\n//# sourceMappingURL=getNumberType.js.map"],"names":["NON_FIXED_LINE_PHONE_TYPES","getNumberType","input","options","metadata","country","countryCallingCode","Metadata","selectNumberingPlan","nationalNumber","v2","phone","matchesEntirely","nationalNumberPattern","isNumberTypeEqualTo","type","pattern","_iterator","_createForOfIteratorHelperLoose","_step","done","value","possibleLengths","indexOf","length"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAMA,0BAA0B,GAAG,CAClC,QAAQ,EACR,cAAc,EACd,WAAW,EACX,aAAa,EACb,MAAM,EACN,iBAAiB,EACjB,OAAO,EACP,KAAK,EACL,WAAW,CACX;;AAED;AACe,SAASC,aAAaA,CAACC,KAAK,EAAEC,OAAO,EAAEC,QAAQ,EAC9D;AACC;AACA;AACAD,EAAAA,OAAO,GAAGA,OAAO,IAAI,EAAE;;AAEvB;AACA;AACA;EACA,IAAI,CAACD,KAAK,CAACG,OAAO,IAAI,CAACH,KAAK,CAACI,kBAAkB,EAAE;AAChD,IAAA;AACD,EAAA;AAEAF,EAAAA,QAAQ,GAAG,IAAIG,QAAQ,CAACH,QAAQ,CAAC;EAEjCA,QAAQ,CAACI,mBAAmB,CAACN,KAAK,CAACG,OAAO,EAAEH,KAAK,CAACI,kBAAkB,CAAC;AAErE,EAAA,IAAMG,cAAc,GAAGN,OAAO,CAACO,EAAE,GAAGR,KAAK,CAACO,cAAc,GAAGP,KAAK,CAACS,KAAK;;AAEtE;AACA;;AAEA;EACA,IAAI,CAACC,eAAe,CAACH,cAAc,EAAEL,QAAQ,CAACS,qBAAqB,EAAE,CAAC,EAAE;AACvE,IAAA;AACD,EAAA;;AAEA;EACA,IAAIC,mBAAmB,CAACL,cAAc,EAAE,YAAY,EAAEL,QAAQ,CAAC,EAAE;AAChE;AACA;AACA;AACA;AACA,IAAA,IAAIA,QAAQ,CAACW,IAAI,CAAC,QAAQ,CAAC,IAAIX,QAAQ,CAACW,IAAI,CAAC,QAAQ,CAAC,CAACC,OAAO,EAAE,KAAK,EAAE,EAAE;AACxE,MAAA,OAAO,sBAAsB;AAC9B,IAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA,IAAI,CAACZ,QAAQ,CAACW,IAAI,CAAC,QAAQ,CAAC,EAAE;AAC7B,MAAA,OAAO,sBAAsB;AAC9B,IAAA;;AAEA;AACA;AACA;IACA,IAAID,mBAAmB,CAACL,cAAc,EAAE,QAAQ,EAAEL,QAAQ,CAAC,EAAE;AAC5D,MAAA,OAAO,sBAAsB;AAC9B,IAAA;AAEA,IAAA,OAAO,YAAY;AACpB,EAAA;AAEA,EAAA,KAAA,IAAAa,SAAA,GAAAC,+BAAA,CAAmBlB,0BAA0B,CAAA,EAAAmB,KAAA,EAAA,CAAA,CAAAA,KAAA,GAAAF,SAAA,EAAA,EAAAG,IAAA,GAAE;AAAA,IAAA,IAApCL,IAAI,GAAAI,KAAA,CAAAE,KAAA;IACd,IAAIP,mBAAmB,CAACL,cAAc,EAAEM,IAAI,EAAEX,QAAQ,CAAC,EAAE;AACxD,MAAA,OAAOW,IAAI;AACZ,IAAA;AACD,EAAA;AACD;AAEO,SAASD,mBAAmBA,CAACL,cAAc,EAAEM,IAAI,EAAEX,QAAQ,EAAE;AACnEW,EAAAA,IAAI,GAAGX,QAAQ,CAACW,IAAI,CAACA,IAAI,CAAC;EAC1B,IAAI,CAACA,IAAI,IAAI,CAACA,IAAI,CAACC,OAAO,EAAE,EAAE;AAC7B,IAAA,OAAO,KAAK;AACb,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;EACA,IAAID,IAAI,CAACO,eAAe,EAAE,IACzBP,IAAI,CAACO,eAAe,EAAE,CAACC,OAAO,CAACd,cAAc,CAACe,MAAM,CAAC,GAAG,CAAC,EAAE;AAC3D,IAAA,OAAO,KAAK;AACb,EAAA;EACA,OAAOZ,eAAe,CAACH,cAAc,EAAEM,IAAI,CAACC,OAAO,EAAE,CAAC;AACvD;;;;","x_google_ignoreList":[0]}
|
|
@@ -7,7 +7,6 @@ import Metadata from '../metadata.js';
|
|
|
7
7
|
* @param {object} metadata — Metadata.
|
|
8
8
|
* @return {string[]} A list of possible countries.
|
|
9
9
|
*/
|
|
10
|
-
|
|
11
10
|
function getPossibleCountriesForNumber(callingCode, nationalNumber, metadata) {
|
|
12
11
|
var _metadata = new Metadata(metadata);
|
|
13
12
|
var possibleCountries = _metadata.getCountryCodesForCallingCode(callingCode);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPossibleCountriesForNumber.js","sources":["../../../../../node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js"],"sourcesContent":["import Metadata from '../metadata.js';\n/**\r\n * Returns a list of countries that the phone number could potentially belong to.\r\n * @param {string} callingCode — Calling code.\r\n * @param {string} nationalNumber — National (significant) number.\r\n * @param {object} metadata — Metadata.\r\n * @return {string[]} A list of possible countries.\r\n */\
|
|
1
|
+
{"version":3,"file":"getPossibleCountriesForNumber.js","sources":["../../../../../node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js"],"sourcesContent":["import Metadata from '../metadata.js';\n\n/**\r\n * Returns a list of countries that the phone number could potentially belong to.\r\n * @param {string} callingCode — Calling code.\r\n * @param {string} nationalNumber — National (significant) number.\r\n * @param {object} metadata — Metadata.\r\n * @return {string[]} A list of possible countries.\r\n */\nexport default function getPossibleCountriesForNumber(callingCode, nationalNumber, metadata) {\n var _metadata = new Metadata(metadata);\n var possibleCountries = _metadata.getCountryCodesForCallingCode(callingCode);\n if (!possibleCountries) {\n return [];\n }\n return possibleCountries.filter(function (country) {\n return couldNationalNumberBelongToCountry(nationalNumber, country, metadata);\n });\n}\nfunction couldNationalNumberBelongToCountry(nationalNumber, country, metadata) {\n var _metadata = new Metadata(metadata);\n _metadata.selectNumberingPlan(country);\n if (_metadata.numberingPlan.possibleLengths().indexOf(nationalNumber.length) >= 0) {\n return true;\n }\n return false;\n}\n//# sourceMappingURL=getPossibleCountriesForNumber.js.map"],"names":["getPossibleCountriesForNumber","callingCode","nationalNumber","metadata","_metadata","Metadata","possibleCountries","getCountryCodesForCallingCode","filter","country","couldNationalNumberBelongToCountry","selectNumberingPlan","numberingPlan","possibleLengths","indexOf","length"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,6BAA6BA,CAACC,WAAW,EAAEC,cAAc,EAAEC,QAAQ,EAAE;AAC5F,EAAA,IAAMC,SAAS,GAAG,IAAIC,QAAQ,CAACF,QAAQ,CAAC;AACxC,EAAA,IAAIG,iBAAiB,GAAGF,SAAS,CAACG,6BAA6B,CAACN,WAAW,CAAC;EAC5E,IAAI,CAACK,iBAAiB,EAAE;AACvB,IAAA,OAAO,EAAE;AACV,EAAA;AACA,EAAA,OAAOA,iBAAiB,CAACE,MAAM,CAAC,UAACC,OAAO,EAAK;AAC5C,IAAA,OAAOC,kCAAkC,CAACR,cAAc,EAAEO,OAAO,EAAEN,QAAQ,CAAC;AAC7E,EAAA,CAAC,CAAC;AACH;AAEA,SAASO,kCAAkCA,CAACR,cAAc,EAAEO,OAAO,EAAEN,QAAQ,EAAE;AAC9E,EAAA,IAAMC,SAAS,GAAG,IAAIC,QAAQ,CAACF,QAAQ,CAAC;AACxCC,EAAAA,SAAS,CAACO,mBAAmB,CAACF,OAAO,CAAC;AACtC,EAAA,IAAIL,SAAS,CAACQ,aAAa,CAACC,eAAe,EAAE,CAACC,OAAO,CAACZ,cAAc,CAACa,MAAM,CAAC,IAAI,CAAC,EAAE;AAClF,IAAA,OAAO,IAAI;AACZ,EAAA;AACA,EAAA,OAAO,KAAK;AACb;;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isObject.js","sources":["../../../../../node_modules/libphonenumber-js/es6/helpers/isObject.js"],"sourcesContent":["var objectConstructor = {}.constructor;\nexport default function isObject(object) {\n return object !== undefined && object !== null && object.constructor === objectConstructor;\n}\n//# sourceMappingURL=isObject.js.map"],"names":["objectConstructor","constructor","isObject","object","undefined"],"mappings":"AAAA,IAAMA,iBAAiB,GAAG,
|
|
1
|
+
{"version":3,"file":"isObject.js","sources":["../../../../../node_modules/libphonenumber-js/es6/helpers/isObject.js"],"sourcesContent":["var objectConstructor = {}.constructor;\nexport default function isObject(object) {\n return object !== undefined && object !== null && object.constructor === objectConstructor;\n}\n//# sourceMappingURL=isObject.js.map"],"names":["objectConstructor","constructor","isObject","object","undefined"],"mappings":"AAAA,IAAMA,iBAAiB,GAAG,EAAE,CAACC,WAAW;AAEzB,SAASC,QAAQA,CAACC,MAAM,EAAE;AACvC,EAAA,OAAOA,MAAM,KAAKC,SAAS,IAAID,MAAM,KAAK,IAAI,IAAIA,MAAM,CAACF,WAAW,KAAKD,iBAAiB;AAC5F;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { MIN_LENGTH_FOR_NSN, VALID_DIGITS, PLUS_CHARS, VALID_PUNCTUATION } from '../constants.js';
|
|
2
2
|
import createExtensionPattern from './extension/createExtensionPattern.js';
|
|
3
3
|
|
|
4
|
+
// Regular expression of viable phone numbers. This is location independent.
|
|
4
5
|
// Checks we have at least three leading digits, and only valid punctuation,
|
|
5
6
|
// alpha characters and digits in the phone number. Does not include extension
|
|
6
7
|
// data. The symbol 'x' is allowed here as valid punctuation since it is often
|
|
@@ -24,13 +25,14 @@ import createExtensionPattern from './extension/createExtensionPattern.js';
|
|
|
24
25
|
// so must be the first in the range" (c) Google devs.
|
|
25
26
|
// (wtf did they mean by saying that; probably nothing)
|
|
26
27
|
//
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
var MIN_LENGTH_PHONE_NUMBER_PATTERN = '[' + VALID_DIGITS + ']{' + MIN_LENGTH_FOR_NSN + '}';
|
|
29
|
+
//
|
|
29
30
|
// And this is the second reg-exp:
|
|
30
31
|
// (see MIN_LENGTH_PHONE_NUMBER_PATTERN for a full description of this reg-exp)
|
|
31
32
|
//
|
|
33
|
+
var VALID_PHONE_NUMBER = '[' + PLUS_CHARS + ']{0,1}' + '(?:' + '[' + VALID_PUNCTUATION + ']*' + '[' + VALID_DIGITS + ']' + '){3,}' + '[' + VALID_PUNCTUATION + VALID_DIGITS + ']*';
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
// This regular expression isn't present in Google's `libphonenumber`
|
|
34
36
|
// and is only used to determine whether the phone number being input
|
|
35
37
|
// is too short for it to even consider it a "valid" number.
|
|
36
38
|
// This is just a way to differentiate between a really invalid phone
|
|
@@ -39,34 +41,36 @@ var VALID_PHONE_NUMBER = '[' + PLUS_CHARS + ']{0,1}' + '(?:' + '[' + VALID_PUNCT
|
|
|
39
41
|
// considered `NOT_A_NUMBER` by Google's `libphonenumber`, but this
|
|
40
42
|
// library can provide a more detailed error message — whether it's
|
|
41
43
|
// really "not a number", or is it just a start of a valid phone number.
|
|
42
|
-
|
|
43
44
|
var VALID_PHONE_NUMBER_START_REG_EXP = new RegExp('^' + '[' + PLUS_CHARS + ']{0,1}' + '(?:' + '[' + VALID_PUNCTUATION + ']*' + '[' + VALID_DIGITS + ']' + '){1,2}' + '$', 'i');
|
|
44
45
|
var VALID_PHONE_NUMBER_WITH_EXTENSION = VALID_PHONE_NUMBER +
|
|
45
46
|
// Phone number extensions
|
|
46
|
-
'(?:' + createExtensionPattern() + ')?';
|
|
47
|
-
//
|
|
47
|
+
'(?:' + createExtensionPattern() + ')?';
|
|
48
48
|
|
|
49
|
+
// The combined regular expression for valid phone numbers:
|
|
50
|
+
//
|
|
49
51
|
var VALID_PHONE_NUMBER_PATTERN = new RegExp(
|
|
50
52
|
// Either a short two-digit-only phone number
|
|
51
53
|
'^' + MIN_LENGTH_PHONE_NUMBER_PATTERN + '$' + '|' +
|
|
52
54
|
// Or a longer fully parsed phone number (min 3 characters)
|
|
53
|
-
'^' + VALID_PHONE_NUMBER_WITH_EXTENSION + '$', 'i');
|
|
55
|
+
'^' + VALID_PHONE_NUMBER_WITH_EXTENSION + '$', 'i');
|
|
56
|
+
|
|
57
|
+
// Checks to see if the string of characters could possibly be a phone number at
|
|
54
58
|
// all. At the moment, checks to see that the string begins with at least 2
|
|
55
59
|
// digits, ignoring any punctuation commonly found in phone numbers. This method
|
|
56
60
|
// does not require the number to be normalized in advance - but does assume
|
|
57
61
|
// that leading non-number symbols have been removed, such as by the method
|
|
58
62
|
// `extract_possible_number`.
|
|
59
63
|
//
|
|
60
|
-
|
|
61
64
|
function isViablePhoneNumber(number) {
|
|
62
65
|
return number.length >= MIN_LENGTH_FOR_NSN && VALID_PHONE_NUMBER_PATTERN.test(number);
|
|
63
|
-
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// This is just a way to differentiate between a really invalid phone
|
|
64
69
|
// number like "abcde" and a valid phone number that a user has just
|
|
65
70
|
// started inputting, like "+1" or "1": both these cases would be
|
|
66
71
|
// considered `NOT_A_NUMBER` by Google's `libphonenumber`, but this
|
|
67
72
|
// library can provide a more detailed error message — whether it's
|
|
68
73
|
// really "not a number", or is it just a start of a valid phone number.
|
|
69
|
-
|
|
70
74
|
function isViablePhoneNumberStart(number) {
|
|
71
75
|
return VALID_PHONE_NUMBER_START_REG_EXP.test(number);
|
|
72
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isViablePhoneNumber.js","sources":["../../../../../node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js"],"sourcesContent":["import { MIN_LENGTH_FOR_NSN, VALID_DIGITS, VALID_PUNCTUATION, PLUS_CHARS } from '../constants.js';\nimport createExtensionPattern from './extension/createExtensionPattern.js'
|
|
1
|
+
{"version":3,"file":"isViablePhoneNumber.js","sources":["../../../../../node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js"],"sourcesContent":["import { MIN_LENGTH_FOR_NSN, VALID_DIGITS, VALID_PUNCTUATION, PLUS_CHARS } from '../constants.js';\nimport createExtensionPattern from './extension/createExtensionPattern.js';\n\n// Regular expression of viable phone numbers. This is location independent.\n// Checks we have at least three leading digits, and only valid punctuation,\n// alpha characters and digits in the phone number. Does not include extension\n// data. The symbol 'x' is allowed here as valid punctuation since it is often\n// used as a placeholder for carrier codes, for example in Brazilian phone\n// numbers. We also allow multiple '+' characters at the start.\n//\n// Corresponds to the following:\n// [digits]{minLengthNsn}|\n// plus_sign*\n// (([punctuation]|[star])*[digits]){3,}([punctuation]|[star]|[digits]|[alpha])*\n//\n// The first reg-ex is to allow short numbers (two digits long) to be parsed if\n// they are entered as \"15\" etc, but only if there is no punctuation in them.\n// The second expression restricts the number of digits to three or more, but\n// then allows them to be in international form, and to have alpha-characters\n// and punctuation. We split up the two reg-exes here and combine them when\n// creating the reg-ex VALID_PHONE_NUMBER_PATTERN itself so we can prefix it\n// with ^ and append $ to each branch.\n//\n// \"Note VALID_PUNCTUATION starts with a -,\n// so must be the first in the range\" (c) Google devs.\n// (wtf did they mean by saying that; probably nothing)\n//\nvar MIN_LENGTH_PHONE_NUMBER_PATTERN = '[' + VALID_DIGITS + ']{' + MIN_LENGTH_FOR_NSN + '}';\n//\n// And this is the second reg-exp:\n// (see MIN_LENGTH_PHONE_NUMBER_PATTERN for a full description of this reg-exp)\n//\nexport var VALID_PHONE_NUMBER = '[' + PLUS_CHARS + ']{0,1}' + '(?:' + '[' + VALID_PUNCTUATION + ']*' + '[' + VALID_DIGITS + ']' + '){3,}' + '[' + VALID_PUNCTUATION + VALID_DIGITS + ']*';\n\n// This regular expression isn't present in Google's `libphonenumber`\n// and is only used to determine whether the phone number being input\n// is too short for it to even consider it a \"valid\" number.\n// This is just a way to differentiate between a really invalid phone\n// number like \"abcde\" and a valid phone number that a user has just\n// started inputting, like \"+1\" or \"1\": both these cases would be\n// considered `NOT_A_NUMBER` by Google's `libphonenumber`, but this\n// library can provide a more detailed error message — whether it's\n// really \"not a number\", or is it just a start of a valid phone number.\nvar VALID_PHONE_NUMBER_START_REG_EXP = new RegExp('^' + '[' + PLUS_CHARS + ']{0,1}' + '(?:' + '[' + VALID_PUNCTUATION + ']*' + '[' + VALID_DIGITS + ']' + '){1,2}' + '$', 'i');\nexport var VALID_PHONE_NUMBER_WITH_EXTENSION = VALID_PHONE_NUMBER +\n// Phone number extensions\n'(?:' + createExtensionPattern() + ')?';\n\n// The combined regular expression for valid phone numbers:\n//\nvar VALID_PHONE_NUMBER_PATTERN = new RegExp(\n// Either a short two-digit-only phone number\n'^' + MIN_LENGTH_PHONE_NUMBER_PATTERN + '$' + '|' +\n// Or a longer fully parsed phone number (min 3 characters)\n'^' + VALID_PHONE_NUMBER_WITH_EXTENSION + '$', 'i');\n\n// Checks to see if the string of characters could possibly be a phone number at\n// all. At the moment, checks to see that the string begins with at least 2\n// digits, ignoring any punctuation commonly found in phone numbers. This method\n// does not require the number to be normalized in advance - but does assume\n// that leading non-number symbols have been removed, such as by the method\n// `extract_possible_number`.\n//\nexport default function isViablePhoneNumber(number) {\n return number.length >= MIN_LENGTH_FOR_NSN && VALID_PHONE_NUMBER_PATTERN.test(number);\n}\n\n// This is just a way to differentiate between a really invalid phone\n// number like \"abcde\" and a valid phone number that a user has just\n// started inputting, like \"+1\" or \"1\": both these cases would be\n// considered `NOT_A_NUMBER` by Google's `libphonenumber`, but this\n// library can provide a more detailed error message — whether it's\n// really \"not a number\", or is it just a start of a valid phone number.\nexport function isViablePhoneNumberStart(number) {\n return VALID_PHONE_NUMBER_START_REG_EXP.test(number);\n}\n//# sourceMappingURL=isViablePhoneNumber.js.map"],"names":["MIN_LENGTH_PHONE_NUMBER_PATTERN","VALID_DIGITS","MIN_LENGTH_FOR_NSN","VALID_PHONE_NUMBER","PLUS_CHARS","VALID_PUNCTUATION","VALID_PHONE_NUMBER_START_REG_EXP","RegExp","VALID_PHONE_NUMBER_WITH_EXTENSION","createExtensionPattern","VALID_PHONE_NUMBER_PATTERN","isViablePhoneNumber","number","length","test","isViablePhoneNumberStart"],"mappings":";;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMA,+BAA+B,GAAG,GAAG,GAAGC,YAAY,GAAG,IAAI,GAAGC,kBAAkB,GAAG,GAAG;AAC5F;AACA;AACA;AACA;AACO,IAAMC,kBAAkB,GAC9B,GAAG,GAAGC,UAAU,GAAG,QAAQ,GAC3B,KAAK,GACJ,GAAG,GAAGC,iBAAiB,GAAG,IAAI,GAC9B,GAAG,GAAGJ,YAAY,GAAG,GAAG,GACzB,OAAO,GACP,GAAG,GACFI,iBAAiB,GACjBJ,YAAY,GACb;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMK,gCAAgC,GAAG,IAAIC,MAAM,CAClD,GAAG,GACH,GAAG,GAAGH,UAAU,GAAG,QAAQ,GAC3B,KAAK,GACJ,GAAG,GAAGC,iBAAiB,GAAG,IAAI,GAC9B,GAAG,GAAGJ,YAAY,GAAG,GAAG,GACzB,QAAQ,GACR,GAAG,EACF,GAAG,CAAC;AAEC,IAAMO,iCAAiC,GAC7CL,kBAAkB;AAClB;AACA,KAAK,GAAGM,sBAAsB,EAAE,GAAG;;AAEpC;AACA;AACA,IAAMC,0BAA0B,GAAG,IAAIH,MAAM;AAC5C;AACA,GAAG,GACFP,+BAA+B,GAChC,GAAG,GACH,GAAG;AACH;AACA,GAAG,GACFQ,iCAAiC,GAClC,GAAG,EACF,GAAG,CAAC;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASG,mBAAmBA,CAACC,MAAM,EAAE;EACnD,OAAOA,MAAM,CAACC,MAAM,IAAIX,kBAAkB,IACzCQ,0BAA0B,CAACI,IAAI,CAACF,MAAM,CAAC;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,wBAAwBA,CAACH,MAAM,EAAE;AAChD,EAAA,OAAON,gCAAgC,CAACQ,IAAI,CAACF,MAAM,CAAC;AACrD;;;;","x_google_ignoreList":[0]}
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* against the regular expression.
|
|
4
4
|
* @return {boolean}
|
|
5
5
|
*/
|
|
6
|
-
function matchesEntirely(text,
|
|
7
|
-
// If assigning the `''` default value is moved to the arguments above,
|
|
8
|
-
// code coverage would decrease for some weird reason.
|
|
6
|
+
function matchesEntirely(text, regularExpressionText) {
|
|
7
|
+
// If the assigning of the `''` default value is moved to the arguments above,
|
|
8
|
+
// the code coverage would decrease for some weird reason.
|
|
9
9
|
text = text || '';
|
|
10
|
-
return new RegExp('^(?:' +
|
|
10
|
+
return new RegExp('^(?:' + regularExpressionText + ')$').test(text);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export { matchesEntirely as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchesEntirely.js","sources":["../../../../../node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js"],"sourcesContent":["/**\r\n * Checks whether the entire input sequence can be matched\r\n * against the regular expression.\r\n * @return {boolean}\r\n */\nexport default function matchesEntirely(text,
|
|
1
|
+
{"version":3,"file":"matchesEntirely.js","sources":["../../../../../node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js"],"sourcesContent":["/**\r\n * Checks whether the entire input sequence can be matched\r\n * against the regular expression.\r\n * @return {boolean}\r\n */\nexport default function matchesEntirely(text, regularExpressionText) {\n // If the assigning of the `''` default value is moved to the arguments above,\n // the code coverage would decrease for some weird reason.\n text = text || '';\n return new RegExp('^(?:' + regularExpressionText + ')$').test(text);\n}\n//# sourceMappingURL=matchesEntirely.js.map"],"names":["matchesEntirely","text","regularExpressionText","RegExp","test"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACe,SAASA,eAAeA,CAACC,IAAI,EAAEC,qBAAqB,EAAE;AACpE;AACA;EACAD,IAAI,GAAGA,IAAI,IAAI,EAAE;AACjB,EAAA,OAAO,IAAIE,MAAM,CAAC,MAAM,GAAGD,qBAAqB,GAAG,IAAI,CAAC,CAACE,IAAI,CAACH,IAAI,CAAC;AACpE;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,37 +1,32 @@
|
|
|
1
|
-
function _createForOfIteratorHelperLoose(
|
|
2
|
-
var
|
|
3
|
-
if (
|
|
4
|
-
if (Array.isArray(
|
|
5
|
-
|
|
6
|
-
var
|
|
1
|
+
function _createForOfIteratorHelperLoose(r, e) {
|
|
2
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
3
|
+
if (t) return (t = t.call(r)).next.bind(t);
|
|
4
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) {
|
|
5
|
+
t && (r = t);
|
|
6
|
+
var o = 0;
|
|
7
7
|
return function () {
|
|
8
|
-
|
|
8
|
+
return o >= r.length ? {
|
|
9
9
|
done: true
|
|
10
|
-
}
|
|
11
|
-
return {
|
|
10
|
+
} : {
|
|
12
11
|
done: false,
|
|
13
|
-
value: o
|
|
12
|
+
value: r[o++]
|
|
14
13
|
};
|
|
15
14
|
};
|
|
16
15
|
}
|
|
17
16
|
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
18
17
|
}
|
|
19
|
-
function _unsupportedIterableToArray(
|
|
20
|
-
if (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
25
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
26
|
-
}
|
|
27
|
-
function _arrayLikeToArray(arr, len) {
|
|
28
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
29
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
30
|
-
arr2[i] = arr[i];
|
|
18
|
+
function _unsupportedIterableToArray(r, a) {
|
|
19
|
+
if (r) {
|
|
20
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
21
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
22
|
+
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;
|
|
31
23
|
}
|
|
32
|
-
return arr2;
|
|
33
24
|
}
|
|
34
|
-
|
|
25
|
+
function _arrayLikeToArray(r, a) {
|
|
26
|
+
(null == a || a > r.length) && (a = r.length);
|
|
27
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
28
|
+
return n;
|
|
29
|
+
}
|
|
35
30
|
// These mappings map a character (key) to a specific digit that should
|
|
36
31
|
// replace it for normalization purposes. Non-European digits that
|
|
37
32
|
// may be used in phone numbers are mapped to a European equivalent.
|
|
@@ -112,6 +107,7 @@ var DIGITS = {
|
|
|
112
107
|
function parseDigit(character) {
|
|
113
108
|
return DIGITS[character];
|
|
114
109
|
}
|
|
110
|
+
|
|
115
111
|
/**
|
|
116
112
|
* Parses phone number digits from a string.
|
|
117
113
|
* Drops all punctuation leaving only digits.
|
|
@@ -125,15 +121,14 @@ function parseDigit(character) {
|
|
|
125
121
|
* // Outputs '8800555'.
|
|
126
122
|
* ```
|
|
127
123
|
*/
|
|
128
|
-
|
|
129
124
|
function parseDigits(string) {
|
|
130
|
-
var result = '';
|
|
125
|
+
var result = '';
|
|
126
|
+
// Using `.split('')` here instead of normal `for ... of`
|
|
131
127
|
// because the importing application doesn't neccessarily include an ES6 polyfill.
|
|
132
128
|
// The `.split('')` approach discards "exotic" UTF-8 characters
|
|
133
129
|
// (the ones consisting of four bytes) but digits
|
|
134
130
|
// (including non-European ones) don't fall into that range
|
|
135
131
|
// so such "exotic" characters would be discarded anyway.
|
|
136
|
-
|
|
137
132
|
for (var _iterator = _createForOfIteratorHelperLoose(string.split('')), _step; !(_step = _iterator()).done;) {
|
|
138
133
|
var character = _step.value;
|
|
139
134
|
var digit = parseDigit(character);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseDigits.js","sources":["../../../../../node_modules/libphonenumber-js/es6/helpers/parseDigits.js"],"sourcesContent":["function _createForOfIteratorHelperLoose(
|
|
1
|
+
{"version":3,"file":"parseDigits.js","sources":["../../../../../node_modules/libphonenumber-js/es6/helpers/parseDigits.js"],"sourcesContent":["function _createForOfIteratorHelperLoose(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError(\"Invalid attempt to iterate 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; }\n// These mappings map a character (key) to a specific digit that should\n// replace it for normalization purposes. Non-European digits that\n// may be used in phone numbers are mapped to a European equivalent.\n//\n// E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.\n//\nexport var DIGITS = {\n '0': '0',\n '1': '1',\n '2': '2',\n '3': '3',\n '4': '4',\n '5': '5',\n '6': '6',\n '7': '7',\n '8': '8',\n '9': '9',\n \"\\uFF10\": '0',\n // Fullwidth digit 0\n \"\\uFF11\": '1',\n // Fullwidth digit 1\n \"\\uFF12\": '2',\n // Fullwidth digit 2\n \"\\uFF13\": '3',\n // Fullwidth digit 3\n \"\\uFF14\": '4',\n // Fullwidth digit 4\n \"\\uFF15\": '5',\n // Fullwidth digit 5\n \"\\uFF16\": '6',\n // Fullwidth digit 6\n \"\\uFF17\": '7',\n // Fullwidth digit 7\n \"\\uFF18\": '8',\n // Fullwidth digit 8\n \"\\uFF19\": '9',\n // Fullwidth digit 9\n \"\\u0660\": '0',\n // Arabic-indic digit 0\n \"\\u0661\": '1',\n // Arabic-indic digit 1\n \"\\u0662\": '2',\n // Arabic-indic digit 2\n \"\\u0663\": '3',\n // Arabic-indic digit 3\n \"\\u0664\": '4',\n // Arabic-indic digit 4\n \"\\u0665\": '5',\n // Arabic-indic digit 5\n \"\\u0666\": '6',\n // Arabic-indic digit 6\n \"\\u0667\": '7',\n // Arabic-indic digit 7\n \"\\u0668\": '8',\n // Arabic-indic digit 8\n \"\\u0669\": '9',\n // Arabic-indic digit 9\n \"\\u06F0\": '0',\n // Eastern-Arabic digit 0\n \"\\u06F1\": '1',\n // Eastern-Arabic digit 1\n \"\\u06F2\": '2',\n // Eastern-Arabic digit 2\n \"\\u06F3\": '3',\n // Eastern-Arabic digit 3\n \"\\u06F4\": '4',\n // Eastern-Arabic digit 4\n \"\\u06F5\": '5',\n // Eastern-Arabic digit 5\n \"\\u06F6\": '6',\n // Eastern-Arabic digit 6\n \"\\u06F7\": '7',\n // Eastern-Arabic digit 7\n \"\\u06F8\": '8',\n // Eastern-Arabic digit 8\n \"\\u06F9\": '9' // Eastern-Arabic digit 9\n};\nexport function parseDigit(character) {\n return DIGITS[character];\n}\n\n/**\r\n * Parses phone number digits from a string.\r\n * Drops all punctuation leaving only digits.\r\n * Also converts wide-ascii and arabic-indic numerals to conventional numerals.\r\n * E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.\r\n * @param {string} string\r\n * @return {string}\r\n * @example\r\n * ```js\r\n * parseDigits('8 (800) 555')\r\n * // Outputs '8800555'.\r\n * ```\r\n */\nexport default function parseDigits(string) {\n var result = '';\n // Using `.split('')` here instead of normal `for ... of`\n // because the importing application doesn't neccessarily include an ES6 polyfill.\n // The `.split('')` approach discards \"exotic\" UTF-8 characters\n // (the ones consisting of four bytes) but digits\n // (including non-European ones) don't fall into that range\n // so such \"exotic\" characters would be discarded anyway.\n for (var _iterator = _createForOfIteratorHelperLoose(string.split('')), _step; !(_step = _iterator()).done;) {\n var character = _step.value;\n var digit = parseDigit(character);\n if (digit) {\n result += digit;\n }\n }\n return result;\n}\n//# sourceMappingURL=parseDigits.js.map"],"names":["DIGITS","parseDigit","character","parseDigits","string","result","_iterator","_createForOfIteratorHelperLoose","split","_step","done","value","digit"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACO,IAAMA,MAAM,GAAG;AACrB,EAAA,GAAG,EAAE,GAAG;AACR,EAAA,GAAG,EAAE,GAAG;AACR,EAAA,GAAG,EAAE,GAAG;AACR,EAAA,GAAG,EAAE,GAAG;AACR,EAAA,GAAG,EAAE,GAAG;AACR,EAAA,GAAG,EAAE,GAAG;AACR,EAAA,GAAG,EAAE,GAAG;AACR,EAAA,GAAG,EAAE,GAAG;AACR,EAAA,GAAG,EAAE,GAAG;AACR,EAAA,GAAG,EAAE,GAAG;AACR,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;AACf,EAAA,QAAQ,EAAE,GAAG;AAAE;EACf,QAAQ,EAAE,GAAG;AACd;AAEO,SAASC,UAAUA,CAACC,SAAS,EAAE;EACrC,OAAOF,MAAM,CAACE,SAAS,CAAC;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,WAAWA,CAACC,MAAM,EAAE;EAC3C,IAAIC,MAAM,GAAG,EAAE;AACf;AACA;AACA;AACA;AACA;AACA;AACA,EAAA,KAAA,IAAAC,SAAA,GAAAC,+BAAA,CAAwBH,MAAM,CAACI,KAAK,CAAC,EAAE,CAAC,CAAA,EAAAC,KAAA,EAAA,CAAA,CAAAA,KAAA,GAAAH,SAAA,EAAA,EAAAI,IAAA,GAAE;AAAA,IAAA,IAA/BR,SAAS,GAAAO,KAAA,CAAAE,KAAA;AACnB,IAAA,IAAMC,KAAK,GAAGX,UAAU,CAACC,SAAS,CAAC;AACnC,IAAA,IAAIU,KAAK,EAAE;AACVP,MAAAA,MAAM,IAAIO,KAAK;AAChB,IAAA;AACD,EAAA;AACA,EAAA,OAAOP,MAAM;AACd;;;;","x_google_ignoreList":[0]}
|
|
@@ -5,20 +5,20 @@ var CAPTURING_DIGIT_PATTERN = new RegExp('([' + VALID_DIGITS + '])');
|
|
|
5
5
|
function stripIddPrefix(number, country, callingCode, metadata) {
|
|
6
6
|
if (!country) {
|
|
7
7
|
return;
|
|
8
|
-
}
|
|
9
|
-
|
|
8
|
+
}
|
|
9
|
+
// Check if the number is IDD-prefixed.
|
|
10
10
|
var countryMetadata = new Metadata(metadata);
|
|
11
11
|
countryMetadata.selectNumberingPlan(country, callingCode);
|
|
12
12
|
var IDDPrefixPattern = new RegExp(countryMetadata.IDDPrefix());
|
|
13
13
|
if (number.search(IDDPrefixPattern) !== 0) {
|
|
14
14
|
return;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
number = number.slice(number.match(IDDPrefixPattern)[0].length);
|
|
15
|
+
}
|
|
16
|
+
// Strip IDD prefix.
|
|
17
|
+
number = number.slice(number.match(IDDPrefixPattern)[0].length);
|
|
18
|
+
// If there're any digits after an IDD prefix,
|
|
18
19
|
// then those digits are a country calling code.
|
|
19
20
|
// Since no country code starts with a `0`,
|
|
20
21
|
// the code below validates that the next digit (if present) is not `0`.
|
|
21
|
-
|
|
22
22
|
var matchedGroups = number.match(CAPTURING_DIGIT_PATTERN);
|
|
23
23
|
if (matchedGroups && matchedGroups[1] != null && matchedGroups[1].length > 0) {
|
|
24
24
|
if (matchedGroups[1] === '0') {
|