const require_rolldown_runtime = require('../../../../../../../../_virtual/rolldown_runtime.js');
const require_constants$1 = require('../../constants.js');

//#region ../../node_modules/.pnpm/libphonenumber-js@1.11.3/node_modules/libphonenumber-js/build/helpers/extension/createExtensionPattern.js
var require_createExtensionPattern = /* @__PURE__ */ require_rolldown_runtime.__commonJS({ "../../node_modules/.pnpm/libphonenumber-js@1.11.3/node_modules/libphonenumber-js/build/helpers/extension/createExtensionPattern.js": ((exports) => {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports["default"] = createExtensionPattern;
	var _constants = require_constants$1.require_constants();
	var RFC3966_EXTN_PREFIX = ";ext=";
	/**
	* Helper method for constructing regular expressions for parsing. Creates
	* an expression that captures up to max_length digits.
	* @return {string} RegEx pattern to capture extension digits.
	*/
	var getExtensionDigitsPattern = function getExtensionDigitsPattern$1(maxLength) {
		return "([".concat(_constants.VALID_DIGITS, "]{1,").concat(maxLength, "})");
	};
	/**
	* Helper initialiser method to create the regular-expression pattern to match
	* extensions.
	* Copy-pasted from Google's `libphonenumber`:
	* https://github.com/google/libphonenumber/blob/55b2646ec9393f4d3d6661b9c82ef9e258e8b829/javascript/i18n/phonenumbers/phonenumberutil.js#L759-L766
	* @return {string} RegEx pattern to capture extensions.
	*/
	function createExtensionPattern(purpose) {
		/** @type {string} */
		var extLimitAfterExplicitLabel = "20";
		/** @type {string} */
		var extLimitAfterLikelyLabel = "15";
		/** @type {string} */
		var extLimitAfterAmbiguousChar = "9";
		/** @type {string} */
		var extLimitWhenNotSure = "6";
		/** @type {string} */
		var possibleSeparatorsBetweenNumberAndExtLabel = "[ \xA0\\t,]*";
		/** @type {string} */
		var possibleCharsAfterExtLabel = "[:\\.．]?[ \xA0\\t,-]*";
		/** @type {string} */
		var optionalExtnSuffix = "#?";
		/** @type {string} */
		var explicitExtLabels = "(?:e?xt(?:ensi(?:ó?|ó))?n?|ｅ?ｘｔｎ?|доб|anexo)";
		/** @type {string} */
		var ambiguousExtLabels = "(?:[xｘ#＃~～]|int|ｉｎｔ)";
		/** @type {string} */
		var ambiguousSeparator = "[- ]+";
		/** @type {string} */
		var possibleSeparatorsNumberExtLabelNoComma = "[ \xA0\\t]*";
		/** @type {string} */
		var autoDiallingAndExtLabelsFound = "(?:,{2}|;)";
		/** @type {string} */
		var rfcExtn = RFC3966_EXTN_PREFIX + getExtensionDigitsPattern(extLimitAfterExplicitLabel);
		/** @type {string} */
		var explicitExtn = possibleSeparatorsBetweenNumberAndExtLabel + explicitExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterExplicitLabel) + optionalExtnSuffix;
		/** @type {string} */
		var ambiguousExtn = possibleSeparatorsBetweenNumberAndExtLabel + ambiguousExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix;
		/** @type {string} */
		var americanStyleExtnWithSuffix = ambiguousSeparator + getExtensionDigitsPattern(extLimitWhenNotSure) + "#";
		/** @type {string} */
		var autoDiallingExtn = possibleSeparatorsNumberExtLabelNoComma + autoDiallingAndExtLabelsFound + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterLikelyLabel) + optionalExtnSuffix;
		/** @type {string} */
		var onlyCommasExtn = possibleSeparatorsNumberExtLabelNoComma + "(?:,)+" + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix;
		return rfcExtn + "|" + explicitExtn + "|" + ambiguousExtn + "|" + americanStyleExtnWithSuffix + "|" + autoDiallingExtn + "|" + onlyCommasExtn;
	}
}) });

//#endregion
Object.defineProperty(exports, 'default', {
  enumerable: true,
  get: function () {
    return require_createExtensionPattern();
  }
});