@kingteza/crud-component 1.22.2 → 1.23.0

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 (209) hide show
  1. package/dist/_virtual/_commonjsHelpers.cjs.js +1 -0
  2. package/dist/_virtual/_commonjsHelpers.es.js +6 -0
  3. package/dist/_virtual/index.cjs.js +1 -0
  4. package/dist/_virtual/index.cjs2.js +1 -0
  5. package/dist/_virtual/index.cjs3.js +1 -0
  6. package/dist/_virtual/index.cjs4.js +1 -0
  7. package/dist/_virtual/index.cjs5.js +1 -0
  8. package/dist/_virtual/index.es.js +7 -0
  9. package/dist/_virtual/index.es2.js +7 -0
  10. package/dist/_virtual/index.es3.js +4 -0
  11. package/dist/_virtual/index.es4.js +4 -0
  12. package/dist/_virtual/index.es5.js +4 -0
  13. package/dist/_virtual/react-is.development.cjs.js +1 -0
  14. package/dist/_virtual/react-is.development.es.js +4 -0
  15. package/dist/_virtual/react-is.production.min.cjs.js +1 -0
  16. package/dist/_virtual/react-is.production.min.es.js +4 -0
  17. package/dist/common/text-field/PhoneNumberField.cjs.js +1 -1
  18. package/dist/common/text-field/PhoneNumberField.d.ts +9 -1
  19. package/dist/common/text-field/PhoneNumberField.es.js +70 -15
  20. package/dist/common/text-field/index.d.ts +1 -0
  21. package/dist/crud/CrudComponent.d.ts +5 -0
  22. package/dist/crud/CrudField.cjs.js +1 -1
  23. package/dist/crud/CrudField.es.js +238 -213
  24. package/dist/crud/import/CrudImportComponent.cjs.js +2 -2
  25. package/dist/crud/import/CrudImportComponent.es.js +14 -15
  26. package/dist/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.cjs.js +5 -0
  27. package/dist/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.es.js +42 -0
  28. package/dist/node_modules/.pnpm/country-flag-icons@1.6.12/node_modules/country-flag-icons/modules/react/3x2/index.cjs.js +1 -0
  29. package/dist/node_modules/.pnpm/country-flag-icons@1.6.12/node_modules/country-flag-icons/modules/react/3x2/index.es.js +6214 -0
  30. package/dist/node_modules/.pnpm/country-flag-icons@1.6.12/node_modules/country-flag-icons/modules/unicode.cjs.js +1 -0
  31. package/dist/node_modules/.pnpm/country-flag-icons@1.6.12/node_modules/country-flag-icons/modules/unicode.es.js +9 -0
  32. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/closeBraces.cjs.js +1 -0
  33. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/closeBraces.es.js +9 -0
  34. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/dom.cjs.js +1 -0
  35. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/dom.es.js +43 -0
  36. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/edit.cjs.js +1 -0
  37. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/edit.es.js +17 -0
  38. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/format.cjs.js +1 -0
  39. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/format.es.js +28 -0
  40. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/helpers.cjs.js +2 -0
  41. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/helpers.es.js +37 -0
  42. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/inputControl.cjs.js +1 -0
  43. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/inputControl.es.js +36 -0
  44. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/parse.cjs.js +1 -0
  45. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/parse.es.js +15 -0
  46. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/react/Input.cjs.js +1 -0
  47. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/react/Input.es.js +86 -0
  48. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/react/useInput.cjs.js +1 -0
  49. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/react/useInput.es.js +69 -0
  50. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/templateFormatter.cjs.js +2 -0
  51. package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/templateFormatter.es.js +62 -0
  52. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouType.cjs.js +2 -0
  53. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouType.es.js +366 -0
  54. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternMatcher.cjs.js +4 -0
  55. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternMatcher.es.js +172 -0
  56. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternParser.cjs.js +1 -0
  57. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternParser.es.js +157 -0
  58. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.cjs.js +2 -0
  59. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.complete.cjs.js +1 -0
  60. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.complete.es.js +49 -0
  61. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.es.js +264 -0
  62. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.util.cjs.js +2 -0
  63. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.util.es.js +63 -0
  64. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeParser.cjs.js +2 -0
  65. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeParser.es.js +265 -0
  66. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeState.cjs.js +1 -0
  67. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeState.es.js +110 -0
  68. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/ParseError.cjs.js +1 -0
  69. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/ParseError.es.js +89 -0
  70. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/PhoneNumber.cjs.js +1 -0
  71. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/PhoneNumber.es.js +188 -0
  72. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/constants.cjs.js +1 -0
  73. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/constants.es.js +10 -0
  74. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/format.cjs.js +1 -0
  75. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/format.es.js +98 -0
  76. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/formatIncompletePhoneNumber.cjs.js +1 -0
  77. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/formatIncompletePhoneNumber.es.js +7 -0
  78. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/getCountries.cjs.js +1 -0
  79. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/getCountries.es.js +7 -0
  80. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/RFC3966.cjs.js +1 -0
  81. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/RFC3966.es.js +11 -0
  82. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.cjs.js +1 -0
  83. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.es.js +7 -0
  84. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.cjs.js +1 -0
  85. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.es.js +16 -0
  86. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.cjs.js +1 -0
  87. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.es.js +11 -0
  88. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.cjs.js +1 -0
  89. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.es.js +18 -0
  90. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.cjs.js +1 -0
  91. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.es.js +47 -0
  92. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.cjs.js +1 -0
  93. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.es.js +22 -0
  94. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.cjs.js +1 -0
  95. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.es.js +23 -0
  96. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.cjs.js +1 -0
  97. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.es.js +39 -0
  98. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.cjs.js +1 -0
  99. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.es.js +31 -0
  100. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.cjs.js +1 -0
  101. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.es.js +23 -0
  102. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.cjs.js +1 -0
  103. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.es.js +27 -0
  104. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.cjs.js +1 -0
  105. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.es.js +12 -0
  106. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.cjs.js +2 -0
  107. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.es.js +45 -0
  108. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.cjs.js +1 -0
  109. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.es.js +12 -0
  110. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getNumberType.cjs.js +2 -0
  111. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getNumberType.es.js +50 -0
  112. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.cjs.js +1 -0
  113. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.es.js +14 -0
  114. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/isObject.cjs.js +1 -0
  115. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/isObject.es.js +7 -0
  116. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.cjs.js +1 -0
  117. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.es.js +20 -0
  118. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.cjs.js +1 -0
  119. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.es.js +6 -0
  120. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/parseDigits.cjs.js +2 -0
  121. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/parseDigits.es.js +112 -0
  122. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.cjs.js +1 -0
  123. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.es.js +19 -0
  124. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/isPossible.cjs.js +1 -0
  125. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/isPossible.es.js +42 -0
  126. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/isValid.cjs.js +1 -0
  127. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/isValid.es.js +12 -0
  128. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/isValidPhoneNumber.cjs.js +1 -0
  129. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/isValidPhoneNumber.es.js +59 -0
  130. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/metadata.cjs.js +1 -0
  131. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/metadata.es.js +473 -0
  132. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/normalizeArguments.cjs.js +2 -0
  133. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/normalizeArguments.es.js +108 -0
  134. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parse.cjs.js +1 -0
  135. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parse.es.js +119 -0
  136. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.cjs.js +2 -0
  137. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.es.js +47 -0
  138. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parsePhoneNumber.cjs.js +1 -0
  139. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parsePhoneNumber.es.js +9 -0
  140. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.cjs.js +1 -0
  141. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.es.js +55 -0
  142. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parsePhoneNumber_.cjs.js +1 -0
  143. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parsePhoneNumber_.es.js +62 -0
  144. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/tools/semver-compare.cjs.js +1 -0
  145. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/tools/semver-compare.es.js +14 -0
  146. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/metadata.min.json.cjs.js +1 -0
  147. package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/metadata.min.json.es.js +4 -0
  148. package/dist/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.cjs.js +5 -0
  149. package/dist/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.es.js +54 -0
  150. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.cjs.js +1 -0
  151. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.es.js +54 -0
  152. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.cjs.js +1 -0
  153. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.es.js +52 -0
  154. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.cjs.js +2 -0
  155. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.es.js +329 -0
  156. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.cjs.js +1 -0
  157. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.es.js +17 -0
  158. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.cjs.js +1 -0
  159. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.es.js +10 -0
  160. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.cjs.js +1 -0
  161. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.es.js +7 -0
  162. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.cjs.js +8 -0
  163. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.es.js +95 -0
  164. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.cjs.js +8 -0
  165. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.es.js +78 -0
  166. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.cjs.js +1 -0
  167. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.es.js +10 -0
  168. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/locale/en.json.cjs.js +1 -0
  169. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/locale/en.json.es.js +263 -0
  170. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/min/index.cjs.js +1 -0
  171. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/min/index.es.js +20 -0
  172. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/CountryIcon.cjs.js +1 -0
  173. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/CountryIcon.es.js +69 -0
  174. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/CountrySelect.cjs.js +2 -0
  175. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/CountrySelect.es.js +158 -0
  176. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/Flag.cjs.js +1 -0
  177. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/Flag.es.js +62 -0
  178. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/InputBasic.cjs.js +1 -0
  179. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/InputBasic.es.js +113 -0
  180. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/InputSmart.cjs.js +1 -0
  181. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/InputSmart.es.js +106 -0
  182. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/InternationalIcon.cjs.js +1 -0
  183. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/InternationalIcon.es.js +122 -0
  184. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/PhoneInputWithCountry.cjs.js +1 -0
  185. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/PhoneInputWithCountry.es.js +830 -0
  186. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/PhoneInputWithCountryDefault.cjs.js +1 -0
  187. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/PhoneInputWithCountryDefault.es.js +50 -0
  188. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/PropTypes.cjs.js +1 -0
  189. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/PropTypes.es.js +9 -0
  190. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/countries.cjs.js +2 -0
  191. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/countries.es.js +78 -0
  192. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/getInternationalPhoneNumberPrefix.cjs.js +1 -0
  193. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/getInternationalPhoneNumberPrefix.es.js +8 -0
  194. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/getPhoneInputWithCountryStateUpdateFromNewProps.cjs.js +1 -0
  195. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/getPhoneInputWithCountryStateUpdateFromNewProps.es.js +141 -0
  196. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/inputValuePrefix.cjs.js +1 -0
  197. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/inputValuePrefix.es.js +12 -0
  198. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/isE164Number.cjs.js +1 -0
  199. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/isE164Number.es.js +17 -0
  200. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/parsePhoneNumberCharacter.cjs.js +1 -0
  201. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/parsePhoneNumberCharacter.es.js +17 -0
  202. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/phoneInputHelpers.cjs.js +1 -0
  203. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/phoneInputHelpers.es.js +203 -0
  204. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/useExternalRef.cjs.js +2 -0
  205. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/useExternalRef.es.js +39 -0
  206. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/useInputKeyDownHandler.cjs.js +1 -0
  207. package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/useInputKeyDownHandler.es.js +18 -0
  208. package/dist/style.css +1 -1
  209. package/package.json +5 -4
@@ -0,0 +1,157 @@
1
+ function s(t) {
2
+ "@babel/helpers - typeof";
3
+ return s = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
4
+ return typeof e;
5
+ } : function(e) {
6
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
7
+ }, s(t);
8
+ }
9
+ function f(t, e) {
10
+ if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
11
+ }
12
+ function l(t, e) {
13
+ for (var r = 0; r < e.length; r++) {
14
+ var n = e[r];
15
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, g(n.key), n);
16
+ }
17
+ }
18
+ function p(t, e, r) {
19
+ return e && l(t.prototype, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
20
+ }
21
+ function g(t) {
22
+ var e = x(t, "string");
23
+ return s(e) == "symbol" ? e : e + "";
24
+ }
25
+ function x(t, e) {
26
+ if (s(t) != "object" || !t) return t;
27
+ var r = t[Symbol.toPrimitive];
28
+ if (r !== void 0) {
29
+ var n = r.call(t, e);
30
+ if (s(n) != "object") return n;
31
+ throw new TypeError("@@toPrimitive must return a primitive value.");
32
+ }
33
+ return String(t);
34
+ }
35
+ var y = /* @__PURE__ */ (function() {
36
+ function t() {
37
+ f(this, t);
38
+ }
39
+ return p(t, [{
40
+ key: "parse",
41
+ value: function(r) {
42
+ if (this.context = [{
43
+ or: !0,
44
+ instructions: []
45
+ }], this.parsePattern(r), this.context.length !== 1)
46
+ throw new Error("Non-finalized contexts left when pattern parse ended");
47
+ var n = this.context[0], i = n.branches, o = n.instructions;
48
+ if (i)
49
+ return {
50
+ op: "|",
51
+ args: i.concat([a(o)])
52
+ };
53
+ if (o.length === 0)
54
+ throw new Error("Pattern is required");
55
+ return o.length === 1 ? o[0] : o;
56
+ }
57
+ }, {
58
+ key: "startContext",
59
+ value: function(r) {
60
+ this.context.push(r);
61
+ }
62
+ }, {
63
+ key: "endContext",
64
+ value: function() {
65
+ this.context.pop();
66
+ }
67
+ }, {
68
+ key: "getContext",
69
+ value: function() {
70
+ return this.context[this.context.length - 1];
71
+ }
72
+ }, {
73
+ key: "parsePattern",
74
+ value: function(r) {
75
+ if (!r)
76
+ throw new Error("Pattern is required");
77
+ var n = r.match(w);
78
+ if (!n) {
79
+ if (C.test(r))
80
+ throw new Error("Illegal characters found in a pattern: ".concat(r));
81
+ this.getContext().instructions = this.getContext().instructions.concat(r.split(""));
82
+ return;
83
+ }
84
+ var i = n[1], o = r.slice(0, n.index), c = r.slice(n.index + i.length);
85
+ switch (i) {
86
+ case "(?:":
87
+ o && this.parsePattern(o), this.startContext({
88
+ or: !0,
89
+ instructions: [],
90
+ branches: []
91
+ });
92
+ break;
93
+ case ")":
94
+ if (!this.getContext().or)
95
+ throw new Error('")" operator must be preceded by "(?:" operator');
96
+ if (o && this.parsePattern(o), this.getContext().instructions.length === 0)
97
+ throw new Error('No instructions found after "|" operator in an "or" group');
98
+ var h = this.getContext(), u = h.branches;
99
+ u.push(a(this.getContext().instructions)), this.endContext(), this.getContext().instructions.push({
100
+ op: "|",
101
+ args: u
102
+ });
103
+ break;
104
+ case "|":
105
+ if (!this.getContext().or)
106
+ throw new Error('"|" operator can only be used inside "or" groups');
107
+ if (o && this.parsePattern(o), !this.getContext().branches)
108
+ if (this.context.length === 1)
109
+ this.getContext().branches = [];
110
+ else
111
+ throw new Error('"branches" not found in an "or" group context');
112
+ this.getContext().branches.push(a(this.getContext().instructions)), this.getContext().instructions = [];
113
+ break;
114
+ case "[":
115
+ o && this.parsePattern(o), this.startContext({
116
+ oneOfSet: !0
117
+ });
118
+ break;
119
+ case "]":
120
+ if (!this.getContext().oneOfSet)
121
+ throw new Error('"]" operator must be preceded by "[" operator');
122
+ this.endContext(), this.getContext().instructions.push({
123
+ op: "[]",
124
+ args: b(o)
125
+ });
126
+ break;
127
+ /* istanbul ignore next */
128
+ default:
129
+ throw new Error("Unknown operator: ".concat(i));
130
+ }
131
+ c && this.parsePattern(c);
132
+ }
133
+ }]);
134
+ })();
135
+ function b(t) {
136
+ for (var e = [], r = 0; r < t.length; ) {
137
+ if (t[r] === "-") {
138
+ if (r === 0 || r === t.length - 1)
139
+ throw new Error("Couldn't parse a one-of set pattern: ".concat(t));
140
+ for (var n = t[r - 1].charCodeAt(0) + 1, i = t[r + 1].charCodeAt(0) - 1, o = n; o <= i; )
141
+ e.push(String.fromCharCode(o)), o++;
142
+ } else
143
+ e.push(t[r]);
144
+ r++;
145
+ }
146
+ return e;
147
+ }
148
+ var C = /[\(\)\[\]\?\:\|]/, w = new RegExp(
149
+ // any of:
150
+ "(\\||\\(\\?\\:|\\)|\\[|\\])"
151
+ );
152
+ function a(t) {
153
+ return t.length === 1 ? t[0] : t;
154
+ }
155
+ export {
156
+ y as default
157
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("./AsYouTypeFormatter.util.cjs.js"),d=require("./AsYouTypeFormatter.complete.cjs.js"),x=require("./AsYouTypeFormatter.PatternMatcher.cjs.js"),y=require("./helpers/parseDigits.cjs.js"),D=require("./helpers/formatNationalNumberUsingFormat.cjs.js"),N=require("./constants.cjs.js"),E=require("./helpers/applyInternationalSeparatorStyle.cjs.js");function p(r){"@babel/helpers - typeof";return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},p(r)}function F(r,a){var t=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t)return(t=t.call(r)).next.bind(t);if(Array.isArray(r)||(t=_(r))||a){t&&(r=t);var e=0;return function(){return e>=r.length?{done:!0}:{done:!1,value:r[e++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _(r,a){if(r){if(typeof r=="string")return b(r,a);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?b(r,a):void 0}}function b(r,a){(a==null||a>r.length)&&(a=r.length);for(var t=0,e=Array(a);t<a;t++)e[t]=r[t];return e}function R(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")}function S(r,a){for(var t=0;t<a.length;t++){var e=a[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,L(e.key),e)}}function C(r,a,t){return a&&S(r.prototype,a),Object.defineProperty(r,"prototype",{writable:!1}),r}function L(r){var a=O(r,"string");return p(a)=="symbol"?a:a+""}function O(r,a){if(p(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var e=t.call(r,a);if(p(e)!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var g="9",w=15,G=l.repeat(g,w),k=/[- ]/,M=function(){return/\[([^\[\]])*\]/g},H=function(){return/\d(?=[^,}][^,}])/g},U=new RegExp("["+N.VALID_PUNCTUATION+"]*\\$1["+N.VALID_PUNCTUATION+"]*(\\$\\d["+N.VALID_PUNCTUATION+"]*)*$"),I=3,B=(function(){function r(a){a.state;var t=a.metadata;R(this,r),this.metadata=t,this.resetFormat()}return C(r,[{key:"resetFormat",value:function(){this.chosenFormat=void 0,this.template=void 0,this.nationalNumberTemplate=void 0,this.populatedNationalNumberTemplate=void 0,this.populatedNationalNumberTemplatePosition=-1}},{key:"reset",value:function(t,e){this.resetFormat(),t?(this.isNANP=t.callingCode()==="1",this.matchingFormats=t.formats(),e.nationalSignificantNumber&&this.narrowDownMatchingFormats(e)):(this.isNANP=void 0,this.matchingFormats=[])}},{key:"format",value:function(t,e){var i=this;if(d.canFormatCompleteNumber(e.nationalSignificantNumber,e.country,this.metadata))for(var n=F(this.matchingFormats),o;!(o=n()).done;){var f=o.value,u=d.default(e,f,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function(m){return i.shouldTryNationalPrefixFormattingRule(m,{international:e.international,nationalPrefix:e.nationalPrefix})},getSeparatorAfterNationalPrefix:function(m){return i.getSeparatorAfterNationalPrefix(m)}});if(u)return this.resetFormat(),this.chosenFormat=f,this.setNationalNumberTemplate(u.replace(/\d/g,l.DIGIT_PLACEHOLDER),e),this.populatedNationalNumberTemplate=u,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf(l.DIGIT_PLACEHOLDER),u}return this.formatNationalNumberWithNextDigits(t,e)}},{key:"formatNationalNumberWithNextDigits",value:function(t,e){var i=this.chosenFormat,n=this.chooseFormat(e);if(n)return n===i?this.formatNextNationalNumberDigits(t):this.formatNextNationalNumberDigits(e.getNationalDigits())}},{key:"narrowDownMatchingFormats",value:function(t){var e=this,i=t.nationalSignificantNumber,n=t.nationalPrefix,o=t.international,f=i,u=f.length-I;u<0&&(u=0),this.matchingFormats=this.matchingFormats.filter(function(s){return e.formatSuits(s,o,n)&&e.formatMatches(s,f,u)}),this.chosenFormat&&this.matchingFormats.indexOf(this.chosenFormat)===-1&&this.resetFormat()}},{key:"formatSuits",value:function(t,e,i){return!(i&&!t.usesNationalPrefix()&&!t.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!e&&!i&&t.nationalPrefixIsMandatoryWhenFormattingInNationalFormat())}},{key:"formatMatches",value:function(t,e,i){var n=t.leadingDigitsPatterns().length;if(n===0)return!0;i=Math.min(i,n-1);var o=t.leadingDigitsPatterns()[i];if(e.length<I)try{return new x(o).match(e,{allowOverflow:!0})!==void 0}catch(f){return console.error(f),!0}return new RegExp("^(".concat(o,")")).test(e)}},{key:"getFormatFormat",value:function(t,e){return e?t.internationalFormat():t.format()}},{key:"chooseFormat",value:function(t){for(var e=this,i=function(){var s=f.value;return e.chosenFormat===s?0:U.test(e.getFormatFormat(s,t.international))?e.createTemplateForFormat(s,t)?(e.chosenFormat=s,0):(e.matchingFormats=e.matchingFormats.filter(function(m){return m!==s}),1):1},n,o=F(this.matchingFormats.slice()),f;!(f=o()).done&&(n=i(),n!==0););return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:"createTemplateForFormat",value:function(t,e){if(!(t.pattern().indexOf("|")>=0)){var i=this.getTemplateForFormat(t,e);if(i)return this.setNationalNumberTemplate(i,e),!0}}},{key:"getSeparatorAfterNationalPrefix",value:function(t){return this.isNANP||t&&t.nationalPrefixFormattingRule()&&k.test(t.nationalPrefixFormattingRule())?" ":""}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function(t,e){var i=t.IDDPrefix,n=t.missingPlus;return i?e&&e.spacing===!1?i:i+" ":n?"":"+"}},{key:"getTemplate",value:function(t){if(this.template){for(var e=-1,i=0,n=t.international?this.getInternationalPrefixBeforeCountryCallingCode(t,{spacing:!1}):"";i<n.length+t.getDigitsWithoutInternationalPrefix().length;)e=this.template.indexOf(l.DIGIT_PLACEHOLDER,e+1),i++;return l.cutAndStripNonPairedParens(this.template,e+1)}}},{key:"setNationalNumberTemplate",value:function(t,e){this.nationalNumberTemplate=t,this.populatedNationalNumberTemplate=t,this.populatedNationalNumberTemplatePosition=-1,e.international?this.template=this.getInternationalPrefixBeforeCountryCallingCode(e).replace(/[\d\+]/g,l.DIGIT_PLACEHOLDER)+l.repeat(l.DIGIT_PLACEHOLDER,e.callingCode.length)+" "+t:this.template=t}},{key:"getTemplateForFormat",value:function(t,e){var i=e.nationalSignificantNumber,n=e.international,o=e.nationalPrefix,f=e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,u=t.pattern();u=u.replace(M(),"\\d").replace(H(),"\\d");var s=G.match(u)[0];if(!(i.length>s.length)){var m=new RegExp("^"+u+"$"),P=i.replace(/\d/g,g);m.test(P)&&(s=P);var h=this.getFormatFormat(t,n),T;if(this.shouldTryNationalPrefixFormattingRule(t,{international:n,nationalPrefix:o})){var A=h.replace(D.FIRST_GROUP_PATTERN,t.nationalPrefixFormattingRule());if(y.default(t.nationalPrefixFormattingRule())===(o||"")+y.default("$1")&&(h=A,T=!0,o))for(var v=o.length;v>0;)h=h.replace(/\d/,l.DIGIT_PLACEHOLDER),v--}var c=s.replace(new RegExp(u),h).replace(new RegExp(g,"g"),l.DIGIT_PLACEHOLDER);return T||(f?c=l.repeat(l.DIGIT_PLACEHOLDER,f.length)+" "+c:o&&(c=l.repeat(l.DIGIT_PLACEHOLDER,o.length)+this.getSeparatorAfterNationalPrefix(t)+c)),n&&(c=E(c)),c}}},{key:"formatNextNationalNumberDigits",value:function(t){var e=l.populateTemplateWithDigits(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,t);if(!e){this.resetFormat();return}return this.populatedNationalNumberTemplate=e[0],this.populatedNationalNumberTemplatePosition=e[1],l.cutAndStripNonPairedParens(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1)}},{key:"shouldTryNationalPrefixFormattingRule",value:function(t,e){var i=e.international,n=e.nationalPrefix;if(t.nationalPrefixFormattingRule()){var o=t.usesNationalPrefix();if(o&&n||!o&&!i)return!0}}}])})();exports.DIGIT_PLACEHOLDER=l.DIGIT_PLACEHOLDER;exports.default=B;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("./helpers/checkNumberLength.cjs.js"),f=require("./helpers/parseDigits.cjs.js"),N=require("./helpers/formatNationalNumberUsingFormat.cjs.js");function m(a,t,e){var i=e.metadata,n=e.shouldTryNationalPrefixFormattingRule,o=e.getSeparatorAfterNationalPrefix,r=new RegExp("^(?:".concat(t.pattern(),")$"));if(r.test(a.nationalSignificantNumber))return d(a,t,{metadata:i,shouldTryNationalPrefixFormattingRule:n,getSeparatorAfterNationalPrefix:o})}function g(a,t,e){return u.default(a,t,e)==="IS_POSSIBLE"}function d(a,t,e){var i=e.metadata,n=e.shouldTryNationalPrefixFormattingRule,o=e.getSeparatorAfterNationalPrefix;if(a.nationalSignificantNumber,a.international,a.nationalPrefix,a.carrierCode,n(t)){var r=l(a,t,{useNationalPrefixFormattingRule:!0,getSeparatorAfterNationalPrefix:o,metadata:i});if(r)return r}return l(a,t,{useNationalPrefixFormattingRule:!1,getSeparatorAfterNationalPrefix:o,metadata:i})}function l(a,t,e){var i=e.metadata,n=e.useNationalPrefixFormattingRule,o=e.getSeparatorAfterNationalPrefix,r=N.default(a.nationalSignificantNumber,t,{carrierCode:a.carrierCode,useInternationalFormat:a.international,withNationalPrefix:n,metadata:i});if(n||(a.nationalPrefix?r=a.nationalPrefix+o(t)+r:a.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix&&(r=a.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix+" "+r)),x(r,a))return r}function x(a,t){return f.default(a)===t.getNationalDigits()}exports.canFormatCompleteNumber=g;exports.default=m;
@@ -0,0 +1,49 @@
1
+ import f from "./helpers/checkNumberLength.es.js";
2
+ import u from "./helpers/parseDigits.es.js";
3
+ import m from "./helpers/formatNationalNumberUsingFormat.es.js";
4
+ function p(a, t, r) {
5
+ var e = r.metadata, n = r.shouldTryNationalPrefixFormattingRule, o = r.getSeparatorAfterNationalPrefix, i = new RegExp("^(?:".concat(t.pattern(), ")$"));
6
+ if (i.test(a.nationalSignificantNumber))
7
+ return N(a, t, {
8
+ metadata: e,
9
+ shouldTryNationalPrefixFormattingRule: n,
10
+ getSeparatorAfterNationalPrefix: o
11
+ });
12
+ }
13
+ function c(a, t, r) {
14
+ return f(a, t, r) === "IS_POSSIBLE";
15
+ }
16
+ function N(a, t, r) {
17
+ var e = r.metadata, n = r.shouldTryNationalPrefixFormattingRule, o = r.getSeparatorAfterNationalPrefix;
18
+ if (a.nationalSignificantNumber, a.international, a.nationalPrefix, a.carrierCode, n(t)) {
19
+ var i = l(a, t, {
20
+ useNationalPrefixFormattingRule: !0,
21
+ getSeparatorAfterNationalPrefix: o,
22
+ metadata: e
23
+ });
24
+ if (i)
25
+ return i;
26
+ }
27
+ return l(a, t, {
28
+ useNationalPrefixFormattingRule: !1,
29
+ getSeparatorAfterNationalPrefix: o,
30
+ metadata: e
31
+ });
32
+ }
33
+ function l(a, t, r) {
34
+ var e = r.metadata, n = r.useNationalPrefixFormattingRule, o = r.getSeparatorAfterNationalPrefix, i = m(a.nationalSignificantNumber, t, {
35
+ carrierCode: a.carrierCode,
36
+ useInternationalFormat: a.international,
37
+ withNationalPrefix: n,
38
+ metadata: e
39
+ });
40
+ if (n || (a.nationalPrefix ? i = a.nationalPrefix + o(t) + i : a.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix && (i = a.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix + " " + i)), g(i, a))
41
+ return i;
42
+ }
43
+ function g(a, t) {
44
+ return u(a) === t.getNationalDigits();
45
+ }
46
+ export {
47
+ c as canFormatCompleteNumber,
48
+ p as default
49
+ };
@@ -0,0 +1,264 @@
1
+ import { DIGIT_PLACEHOLDER as m, cutAndStripNonPairedParens as P, repeat as N, populateTemplateWithDigits as I } from "./AsYouTypeFormatter.util.es.js";
2
+ import R, { canFormatCompleteNumber as E } from "./AsYouTypeFormatter.complete.es.js";
3
+ import D from "./AsYouTypeFormatter.PatternMatcher.es.js";
4
+ import T from "./helpers/parseDigits.es.js";
5
+ import { FIRST_GROUP_PATTERN as _ } from "./helpers/formatNationalNumberUsingFormat.es.js";
6
+ import { VALID_PUNCTUATION as g } from "./constants.es.js";
7
+ import C from "./helpers/applyInternationalSeparatorStyle.es.js";
8
+ function c(r) {
9
+ "@babel/helpers - typeof";
10
+ return c = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(a) {
11
+ return typeof a;
12
+ } : function(a) {
13
+ return a && typeof Symbol == "function" && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a;
14
+ }, c(r);
15
+ }
16
+ function b(r, a) {
17
+ var t = typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
18
+ if (t) return (t = t.call(r)).next.bind(t);
19
+ if (Array.isArray(r) || (t = w(r)) || a) {
20
+ t && (r = t);
21
+ var e = 0;
22
+ return function() {
23
+ return e >= r.length ? { done: !0 } : { done: !1, value: r[e++] };
24
+ };
25
+ }
26
+ throw new TypeError(`Invalid attempt to iterate non-iterable instance.
27
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
28
+ }
29
+ function w(r, a) {
30
+ if (r) {
31
+ if (typeof r == "string") return x(r, a);
32
+ var t = {}.toString.call(r).slice(8, -1);
33
+ return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? x(r, a) : void 0;
34
+ }
35
+ }
36
+ function x(r, a) {
37
+ (a == null || a > r.length) && (a = r.length);
38
+ for (var t = 0, e = Array(a); t < a; t++) e[t] = r[t];
39
+ return e;
40
+ }
41
+ function O(r, a) {
42
+ if (!(r instanceof a)) throw new TypeError("Cannot call a class as a function");
43
+ }
44
+ function k(r, a) {
45
+ for (var t = 0; t < a.length; t++) {
46
+ var e = a[t];
47
+ e.enumerable = e.enumerable || !1, e.configurable = !0, "value" in e && (e.writable = !0), Object.defineProperty(r, L(e.key), e);
48
+ }
49
+ }
50
+ function M(r, a, t) {
51
+ return a && k(r.prototype, a), Object.defineProperty(r, "prototype", { writable: !1 }), r;
52
+ }
53
+ function L(r) {
54
+ var a = G(r, "string");
55
+ return c(a) == "symbol" ? a : a + "";
56
+ }
57
+ function G(r, a) {
58
+ if (c(r) != "object" || !r) return r;
59
+ var t = r[Symbol.toPrimitive];
60
+ if (t !== void 0) {
61
+ var e = t.call(r, a);
62
+ if (c(e) != "object") return e;
63
+ throw new TypeError("@@toPrimitive must return a primitive value.");
64
+ }
65
+ return String(r);
66
+ }
67
+ var v = "9", B = 15, U = N(v, B), H = /[- ]/, W = function() {
68
+ return /\[([^\[\]])*\]/g;
69
+ }, j = function() {
70
+ return /\d(?=[^,}][^,}])/g;
71
+ }, $ = new RegExp("[" + g + "]*\\$1[" + g + "]*(\\$\\d[" + g + "]*)*$"), A = 3, Q = /* @__PURE__ */ (function() {
72
+ function r(a) {
73
+ a.state;
74
+ var t = a.metadata;
75
+ O(this, r), this.metadata = t, this.resetFormat();
76
+ }
77
+ return M(r, [{
78
+ key: "resetFormat",
79
+ value: function() {
80
+ this.chosenFormat = void 0, this.template = void 0, this.nationalNumberTemplate = void 0, this.populatedNationalNumberTemplate = void 0, this.populatedNationalNumberTemplatePosition = -1;
81
+ }
82
+ }, {
83
+ key: "reset",
84
+ value: function(t, e) {
85
+ this.resetFormat(), t ? (this.isNANP = t.callingCode() === "1", this.matchingFormats = t.formats(), e.nationalSignificantNumber && this.narrowDownMatchingFormats(e)) : (this.isNANP = void 0, this.matchingFormats = []);
86
+ }
87
+ /**
88
+ * Formats an updated phone number.
89
+ * @param {string} nextDigits — Additional phone number digits.
90
+ * @param {object} state — `AsYouType` state.
91
+ * @return {[string]} Returns undefined if the updated phone number can't be formatted using any of the available formats.
92
+ */
93
+ }, {
94
+ key: "format",
95
+ value: function(t, e) {
96
+ var i = this;
97
+ if (E(e.nationalSignificantNumber, e.country, this.metadata))
98
+ for (var n = b(this.matchingFormats), o; !(o = n()).done; ) {
99
+ var s = o.value, l = R(e, s, {
100
+ metadata: this.metadata,
101
+ shouldTryNationalPrefixFormattingRule: function(f) {
102
+ return i.shouldTryNationalPrefixFormattingRule(f, {
103
+ international: e.international,
104
+ nationalPrefix: e.nationalPrefix
105
+ });
106
+ },
107
+ getSeparatorAfterNationalPrefix: function(f) {
108
+ return i.getSeparatorAfterNationalPrefix(f);
109
+ }
110
+ });
111
+ if (l)
112
+ return this.resetFormat(), this.chosenFormat = s, this.setNationalNumberTemplate(l.replace(/\d/g, m), e), this.populatedNationalNumberTemplate = l, this.populatedNationalNumberTemplatePosition = this.template.lastIndexOf(m), l;
113
+ }
114
+ return this.formatNationalNumberWithNextDigits(t, e);
115
+ }
116
+ // Formats the next phone number digits.
117
+ }, {
118
+ key: "formatNationalNumberWithNextDigits",
119
+ value: function(t, e) {
120
+ var i = this.chosenFormat, n = this.chooseFormat(e);
121
+ if (n)
122
+ return n === i ? this.formatNextNationalNumberDigits(t) : this.formatNextNationalNumberDigits(e.getNationalDigits());
123
+ }
124
+ }, {
125
+ key: "narrowDownMatchingFormats",
126
+ value: function(t) {
127
+ var e = this, i = t.nationalSignificantNumber, n = t.nationalPrefix, o = t.international, s = i, l = s.length - A;
128
+ l < 0 && (l = 0), this.matchingFormats = this.matchingFormats.filter(function(u) {
129
+ return e.formatSuits(u, o, n) && e.formatMatches(u, s, l);
130
+ }), this.chosenFormat && this.matchingFormats.indexOf(this.chosenFormat) === -1 && this.resetFormat();
131
+ }
132
+ }, {
133
+ key: "formatSuits",
134
+ value: function(t, e, i) {
135
+ return !(i && !t.usesNationalPrefix() && // !format.domesticCarrierCodeFormattingRule() &&
136
+ !t.nationalPrefixIsOptionalWhenFormattingInNationalFormat() || !e && !i && t.nationalPrefixIsMandatoryWhenFormattingInNationalFormat());
137
+ }
138
+ }, {
139
+ key: "formatMatches",
140
+ value: function(t, e, i) {
141
+ var n = t.leadingDigitsPatterns().length;
142
+ if (n === 0)
143
+ return !0;
144
+ i = Math.min(i, n - 1);
145
+ var o = t.leadingDigitsPatterns()[i];
146
+ if (e.length < A)
147
+ try {
148
+ return new D(o).match(e, {
149
+ allowOverflow: !0
150
+ }) !== void 0;
151
+ } catch (s) {
152
+ return console.error(s), !0;
153
+ }
154
+ return new RegExp("^(".concat(o, ")")).test(e);
155
+ }
156
+ }, {
157
+ key: "getFormatFormat",
158
+ value: function(t, e) {
159
+ return e ? t.internationalFormat() : t.format();
160
+ }
161
+ }, {
162
+ key: "chooseFormat",
163
+ value: function(t) {
164
+ for (var e = this, i = function() {
165
+ var u = s.value;
166
+ return e.chosenFormat === u ? 0 : $.test(e.getFormatFormat(u, t.international)) ? e.createTemplateForFormat(u, t) ? (e.chosenFormat = u, 0) : (e.matchingFormats = e.matchingFormats.filter(function(f) {
167
+ return f !== u;
168
+ }), 1) : 1;
169
+ }, n, o = b(this.matchingFormats.slice()), s; !(s = o()).done && (n = i(), n !== 0); )
170
+ ;
171
+ return this.chosenFormat || this.resetFormat(), this.chosenFormat;
172
+ }
173
+ }, {
174
+ key: "createTemplateForFormat",
175
+ value: function(t, e) {
176
+ if (!(t.pattern().indexOf("|") >= 0)) {
177
+ var i = this.getTemplateForFormat(t, e);
178
+ if (i)
179
+ return this.setNationalNumberTemplate(i, e), !0;
180
+ }
181
+ }
182
+ }, {
183
+ key: "getSeparatorAfterNationalPrefix",
184
+ value: function(t) {
185
+ return this.isNANP || t && t.nationalPrefixFormattingRule() && H.test(t.nationalPrefixFormattingRule()) ? " " : "";
186
+ }
187
+ }, {
188
+ key: "getInternationalPrefixBeforeCountryCallingCode",
189
+ value: function(t, e) {
190
+ var i = t.IDDPrefix, n = t.missingPlus;
191
+ return i ? e && e.spacing === !1 ? i : i + " " : n ? "" : "+";
192
+ }
193
+ }, {
194
+ key: "getTemplate",
195
+ value: function(t) {
196
+ if (this.template) {
197
+ for (var e = -1, i = 0, n = t.international ? this.getInternationalPrefixBeforeCountryCallingCode(t, {
198
+ spacing: !1
199
+ }) : ""; i < n.length + t.getDigitsWithoutInternationalPrefix().length; )
200
+ e = this.template.indexOf(m, e + 1), i++;
201
+ return P(this.template, e + 1);
202
+ }
203
+ }
204
+ }, {
205
+ key: "setNationalNumberTemplate",
206
+ value: function(t, e) {
207
+ this.nationalNumberTemplate = t, this.populatedNationalNumberTemplate = t, this.populatedNationalNumberTemplatePosition = -1, e.international ? this.template = this.getInternationalPrefixBeforeCountryCallingCode(e).replace(/[\d\+]/g, m) + N(m, e.callingCode.length) + " " + t : this.template = t;
208
+ }
209
+ /**
210
+ * Generates formatting template for a national phone number,
211
+ * optionally containing a national prefix, for a format.
212
+ * @param {Format} format
213
+ * @param {string} nationalPrefix
214
+ * @return {string}
215
+ */
216
+ }, {
217
+ key: "getTemplateForFormat",
218
+ value: function(t, e) {
219
+ var i = e.nationalSignificantNumber, n = e.international, o = e.nationalPrefix, s = e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix, l = t.pattern();
220
+ l = l.replace(W(), "\\d").replace(j(), "\\d");
221
+ var u = U.match(l)[0];
222
+ if (!(i.length > u.length)) {
223
+ var f = new RegExp("^" + l + "$"), y = i.replace(/\d/g, v);
224
+ f.test(y) && (u = y);
225
+ var p = this.getFormatFormat(t, n), F;
226
+ if (this.shouldTryNationalPrefixFormattingRule(t, {
227
+ international: n,
228
+ nationalPrefix: o
229
+ })) {
230
+ var S = p.replace(_, t.nationalPrefixFormattingRule());
231
+ if (T(t.nationalPrefixFormattingRule()) === (o || "") + T("$1") && (p = S, F = !0, o))
232
+ for (var d = o.length; d > 0; )
233
+ p = p.replace(/\d/, m), d--;
234
+ }
235
+ var h = u.replace(new RegExp(l), p).replace(new RegExp(v, "g"), m);
236
+ return F || (s ? h = N(m, s.length) + " " + h : o && (h = N(m, o.length) + this.getSeparatorAfterNationalPrefix(t) + h)), n && (h = C(h)), h;
237
+ }
238
+ }
239
+ }, {
240
+ key: "formatNextNationalNumberDigits",
241
+ value: function(t) {
242
+ var e = I(this.populatedNationalNumberTemplate, this.populatedNationalNumberTemplatePosition, t);
243
+ if (!e) {
244
+ this.resetFormat();
245
+ return;
246
+ }
247
+ return this.populatedNationalNumberTemplate = e[0], this.populatedNationalNumberTemplatePosition = e[1], P(this.populatedNationalNumberTemplate, this.populatedNationalNumberTemplatePosition + 1);
248
+ }
249
+ }, {
250
+ key: "shouldTryNationalPrefixFormattingRule",
251
+ value: function(t, e) {
252
+ var i = e.international, n = e.nationalPrefix;
253
+ if (t.nationalPrefixFormattingRule()) {
254
+ var o = t.usesNationalPrefix();
255
+ if (o && n || !o && !i)
256
+ return !0;
257
+ }
258
+ }
259
+ }]);
260
+ })();
261
+ export {
262
+ m as DIGIT_PLACEHOLDER,
263
+ Q as default
264
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function s(r,t){var e=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(e)return(e=e.call(r)).next.bind(e);if(Array.isArray(r)||(e=v(r))||t){e&&(r=e);var a=0;return function(){return a>=r.length?{done:!0}:{done:!1,value:r[a++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v(r,t){if(r){if(typeof r=="string")return c(r,t);var e={}.toString.call(r).slice(8,-1);return e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set"?Array.from(r):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?c(r,t):void 0}}function c(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,a=Array(t);e<t;e++)a[e]=r[e];return a}var f="x",i=new RegExp(f);function d(r,t){if(t<1)return"";for(var e="";t>1;)t&1&&(e+=r),t>>=1,r+=r;return e+r}function h(r,t){return r[t]===")"&&t++,p(r.slice(0,t))}function p(r){for(var t=[],e=0;e<r.length;)r[e]==="("?t.push(e):r[e]===")"&&t.pop(),e++;var a=0,n="";t.push(r.length);for(var o=0,u=t;o<u.length;o++){var l=u[o];n+=r.slice(a,l),a=l+1}return n}function y(r,t,e){for(var a=s(e.split("")),n;!(n=a()).done;){var o=n.value;if(r.slice(t+1).search(i)<0)return;t=r.search(i),r=r.replace(i,o)}return[r,t]}exports.DIGIT_PLACEHOLDER=f;exports.cutAndStripNonPairedParens=h;exports.populateTemplateWithDigits=y;exports.repeat=d;exports.stripNonPairedParens=p;
@@ -0,0 +1,63 @@
1
+ function f(r, t) {
2
+ var e = typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
3
+ if (e) return (e = e.call(r)).next.bind(e);
4
+ if (Array.isArray(r) || (e = v(r)) || t) {
5
+ e && (r = e);
6
+ var n = 0;
7
+ return function() {
8
+ return n >= r.length ? { done: !0 } : { done: !1, value: r[n++] };
9
+ };
10
+ }
11
+ throw new TypeError(`Invalid attempt to iterate non-iterable instance.
12
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
13
+ }
14
+ function v(r, t) {
15
+ if (r) {
16
+ if (typeof r == "string") return c(r, t);
17
+ var e = {}.toString.call(r).slice(8, -1);
18
+ return e === "Object" && r.constructor && (e = r.constructor.name), e === "Map" || e === "Set" ? Array.from(r) : e === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e) ? c(r, t) : void 0;
19
+ }
20
+ }
21
+ function c(r, t) {
22
+ (t == null || t > r.length) && (t = r.length);
23
+ for (var e = 0, n = Array(t); e < t; e++) n[e] = r[e];
24
+ return n;
25
+ }
26
+ var h = "x", u = new RegExp(h);
27
+ function s(r, t) {
28
+ if (t < 1)
29
+ return "";
30
+ for (var e = ""; t > 1; )
31
+ t & 1 && (e += r), t >>= 1, r += r;
32
+ return e + r;
33
+ }
34
+ function y(r, t) {
35
+ return r[t] === ")" && t++, p(r.slice(0, t));
36
+ }
37
+ function p(r) {
38
+ for (var t = [], e = 0; e < r.length; )
39
+ r[e] === "(" ? t.push(e) : r[e] === ")" && t.pop(), e++;
40
+ var n = 0, a = "";
41
+ t.push(r.length);
42
+ for (var o = 0, l = t; o < l.length; o++) {
43
+ var i = l[o];
44
+ a += r.slice(n, i), n = i + 1;
45
+ }
46
+ return a;
47
+ }
48
+ function d(r, t, e) {
49
+ for (var n = f(e.split("")), a; !(a = n()).done; ) {
50
+ var o = a.value;
51
+ if (r.slice(t + 1).search(u) < 0)
52
+ return;
53
+ t = r.search(u), r = r.replace(u, o);
54
+ }
55
+ return [r, t];
56
+ }
57
+ export {
58
+ h as DIGIT_PLACEHOLDER,
59
+ y as cutAndStripNonPairedParens,
60
+ d as populateTemplateWithDigits,
61
+ s as repeat,
62
+ p as stripNonPairedParens
63
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const b=require("./helpers/extractCountryCallingCode.cjs.js"),y=require("./helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.cjs.js"),g=require("./helpers/extractNationalNumberFromPossiblyIncompleteNumber.cjs.js"),C=require("./helpers/stripIddPrefix.cjs.js"),v=require("./helpers/parseDigits.cjs.js"),f=require("./constants.cjs.js");function s(i){"@babel/helpers - typeof";return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},s(i)}function m(i,n){return x(i)||I(i,n)||P(i,n)||S()}function S(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P(i,n){if(i){if(typeof i=="string")return N(i,n);var t={}.toString.call(i).slice(8,-1);return t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set"?Array.from(i):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?N(i,n):void 0}}function N(i,n){(n==null||n>i.length)&&(n=i.length);for(var t=0,e=Array(n);t<n;t++)e[t]=i[t];return e}function I(i,n){var t=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(t!=null){var e,r,a,u,o=[],l=!0,c=!1;try{if(a=(t=t.call(i)).next,n!==0)for(;!(l=(e=a.call(t)).done)&&(o.push(e.value),o.length!==n);l=!0);}catch(d){c=!0,r=d}finally{try{if(!l&&t.return!=null&&(u=t.return(),Object(u)!==u))return}finally{if(c)throw r}}return o}}function x(i){if(Array.isArray(i))return i}function p(i,n){if(!(i instanceof n))throw new TypeError("Cannot call a class as a function")}function A(i,n){for(var t=0;t<n.length;t++){var e=n[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(i,T(e.key),e)}}function _(i,n,t){return n&&A(i.prototype,n),Object.defineProperty(i,"prototype",{writable:!1}),i}function T(i){var n=D(i,"string");return s(n)=="symbol"?n:n+""}function D(i,n){if(s(i)!="object"||!i)return i;var t=i[Symbol.toPrimitive];if(t!==void 0){var e=t.call(i,n);if(s(e)!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}var E="["+f.VALID_PUNCTUATION+f.VALID_DIGITS+"]+",L=new RegExp("^"+E+"$","i"),O="(?:["+f.PLUS_CHARS+"]["+f.VALID_PUNCTUATION+f.VALID_DIGITS+"]*|["+f.VALID_PUNCTUATION+f.VALID_DIGITS+"]+)",R=new RegExp("[^"+f.VALID_PUNCTUATION+f.VALID_DIGITS+"]+.*$"),F=/[^\d\[\]]/,k=(function(){function i(n){var t=n.defaultCountry,e=n.defaultCallingCode,r=n.metadata,a=n.onNationalSignificantNumberChange;p(this,i),this.defaultCountry=t,this.defaultCallingCode=e,this.metadata=r,this.onNationalSignificantNumberChange=a}return _(i,[{key:"input",value:function(t,e){var r=h(t),a=m(r,2),u=a[0],o=a[1],l=v.default(u),c;return o&&(e.digits||(e.startInternationalNumber(void 0,void 0),l||(c=!0))),l&&this.inputDigits(l,e),{digits:l,justLeadingPlus:c}}},{key:"inputDigits",value:function(t,e){var r=e.digits,a=r.length<3&&r.length+t.length>=3;if(e.appendDigits(t),a&&this.extractIddPrefix(e),this.isWaitingForCountryCallingCode(e)){if(!this.extractCountryCallingCode(e))return}else e.appendNationalSignificantNumberDigits(t);e.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(e.getNationalDigits(),function(u){return e.update(u)})}},{key:"isWaitingForCountryCallingCode",value:function(t){var e=t.international,r=t.callingCode;return e&&!r}},{key:"extractCountryCallingCode",value:function(t){var e=b("+"+t.getDigitsWithoutInternationalPrefix(),t.country,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),r=e.countryCallingCode,a=e.number;if(r)return t.setCallingCode(r),t.update({nationalSignificantNumber:a}),!0}},{key:"reset",value:function(t){if(t){this.hasSelectedNumberingPlan=!0;var e=t._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=e&&F.test(e)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(t,e){if(this.hasSelectedNumberingPlan){var r=g(t,this.metadata),a=r.nationalPrefix,u=r.nationalNumber,o=r.carrierCode;if(u!==t)return this.onExtractedNationalNumber(a,o,u,t,e),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(t,e,r){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(t,r);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var a=g(t,this.metadata),u=a.nationalPrefix,o=a.nationalNumber,l=a.carrierCode;if(o!==e)return this.onExtractedNationalNumber(u,l,o,t,r),!0}}},{key:"onExtractedNationalNumber",value:function(t,e,r,a,u){var o=!1,l,c=a.lastIndexOf(r);if(c<0||c!==a.length-r.length)o=!0;else{var d=a.slice(0,c);d&&d!==t&&(l=d)}u({nationalPrefix:t,carrierCode:e,nationalSignificantNumber:r,nationalSignificantNumberIsModified:o,prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix:l}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function(t){if(this.extractAnotherNationalSignificantNumber(t.getNationalDigits(),t.nationalSignificantNumber,function(e){return t.update(e)}))return!0;if(this.extractIddPrefix(t))return this.extractCallingCodeAndNationalSignificantNumber(t),!0;if(this.fixMissingPlus(t))return this.extractCallingCodeAndNationalSignificantNumber(t),!0}},{key:"extractIddPrefix",value:function(t){var e=t.international,r=t.IDDPrefix,a=t.digits;if(t.nationalSignificantNumber,!(e||r)){var u=C(a,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);if(u!==void 0&&u!==a)return t.update({IDDPrefix:a.slice(0,a.length-u.length)}),this.startInternationalNumber(t,{country:void 0,callingCode:void 0}),!0}}},{key:"fixMissingPlus",value:function(t){if(!t.international){var e=y(t.digits,t.country,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),r=e.countryCallingCode;if(r)return t.update({missingPlus:!0}),this.startInternationalNumber(t,{country:t.country,callingCode:r}),!0}}},{key:"startInternationalNumber",value:function(t,e){var r=e.country,a=e.callingCode;t.startInternationalNumber(r,a),t.nationalSignificantNumber&&(t.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function(t){this.extractCountryCallingCode(t)&&this.extractNationalSignificantNumber(t.getNationalDigits(),function(e){return t.update(e)})}}])})();function M(i){var n=i.search(O);if(!(n<0)){i=i.slice(n);var t;return i[0]==="+"&&(t=!0,i=i.slice(1)),i=i.replace(R,""),t&&(i="+"+i),i}}function U(i){var n=M(i)||"";return n[0]==="+"?[n.slice(1),!0]:[n]}function h(i){var n=U(i),t=m(n,2),e=t[0],r=t[1];return L.test(e)||(e=""),[e,r]}exports.default=k;exports.extractFormattedDigitsAndPlus=h;