intl-tel-input 19.5.4 → 19.5.6

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 CHANGED
@@ -62,16 +62,16 @@ _Note: We have now dropped support for all versions of Internet Explorer because
62
62
  ## Getting Started (Using a CDN)
63
63
  1. Add the CSS
64
64
  ```html
65
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/intl-tel-input@19.5.4/build/css/intlTelInput.css">
65
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/intl-tel-input@19.5.6/build/css/intlTelInput.css">
66
66
  ```
67
67
 
68
68
  2. Add the plugin script and initialise it on your input element
69
69
  ```html
70
- <script src="https://cdn.jsdelivr.net/npm/intl-tel-input@19.5.4/build/js/intlTelInput.min.js"></script>
70
+ <script src="https://cdn.jsdelivr.net/npm/intl-tel-input@19.5.6/build/js/intlTelInput.min.js"></script>
71
71
  <script>
72
72
  const input = document.querySelector("#phone");
73
73
  window.intlTelInput(input, {
74
- utilsScript: "https://cdn.jsdelivr.net/npm/intl-tel-input@19.5.4/build/js/utils.js",
74
+ utilsScript: "https://cdn.jsdelivr.net/npm/intl-tel-input@19.5.6/build/js/utils.js",
75
75
  });
76
76
  </script>
77
77
  ```
@@ -275,7 +275,7 @@ In the dropdown, display only the countries you specify - [see example](https://
275
275
 
276
276
  **placeholderNumberType**
277
277
  Type: `String` Default: `"MOBILE"`
278
- Specify [one of the keys](https://github.com/jackocnr/intl-tel-input/blob/master/src/js/utils.js#L119) from the global enum `intlTelInputUtils.numberType` e.g. `"FIXED_LINE"` to set the number type to use for the placeholder. Play with this option on [Storybook](https://intl-tel-input.com/storybook/?path=/docs/intltelinput--placeholdernumbertype) (using the React component).
278
+ Specify [one of the keys](https://github.com/jackocnr/intl-tel-input/blob/master/src/js/utils.js#L162) from the global enum `intlTelInputUtils.numberType` e.g. `"FIXED_LINE"` to set the number type to use for the placeholder. Play with this option on [Storybook](https://intl-tel-input.com/storybook/?path=/docs/intltelinput--placeholdernumbertype) (using the React component).
279
279
 
280
280
  **preferredCountries**
281
281
  Type: `Array` Default: `[]`
@@ -320,7 +320,7 @@ const extension = iti.getExtension();
320
320
  Returns a string e.g. if the input value was `"(702) 555-5555 ext. 1234"`, this would return `"1234"`
321
321
 
322
322
  **getNumber**
323
- Get the current number in the given format (defaults to [E.164 standard](https://en.wikipedia.org/wiki/E.164)). The different formats are available in the enum `intlTelInputUtils.numberFormat` - which you can see [here](https://github.com/jackocnr/intl-tel-input/blob/master/src/js/utils.js#L109). Requires the `utilsScript` option. _Note that even if `nationalMode` is enabled, this can still return a full international number. Also note that this method expects a valid number, and so should only be used after validation._
323
+ Get the current number in the given format (defaults to [E.164 standard](https://en.wikipedia.org/wiki/E.164)). The different formats are available in the enum `intlTelInputUtils.numberFormat` - which you can see [here](https://github.com/jackocnr/intl-tel-input/blob/master/src/js/utils.js#L153). Requires the `utilsScript` option. _Note that even if `nationalMode` is enabled, this can still return a full international number. Also note that this method expects a valid number, and so should only be used after validation._
324
324
  ```js
325
325
  const number = iti.getNumber();
326
326
  // or
@@ -333,7 +333,7 @@ Get the type (fixed-line/mobile/toll-free etc) of the current number. Requires t
333
333
  ```js
334
334
  const numberType = iti.getNumberType();
335
335
  ```
336
- Returns an integer, which you can match against the [various options](https://github.com/jackocnr/intl-tel-input/blob/master/src/js/utils.js#L119) in the global enum `intlTelInputUtils.numberType` e.g.
336
+ Returns an integer, which you can match against the [various options](https://github.com/jackocnr/intl-tel-input/blob/master/src/js/utils.js#L162) in the global enum `intlTelInputUtils.numberType` e.g.
337
337
  ```js
338
338
  if (numberType === intlTelInputUtils.numberType.MOBILE) {
339
339
  // is a mobile number
@@ -360,7 +360,7 @@ Get more information about a validation error. Requires the `utilsScript` option
360
360
  ```js
361
361
  const error = iti.getValidationError();
362
362
  ```
363
- Returns an integer, which you can match against the [various options](https://github.com/jackocnr/intl-tel-input/blob/master/src/js/utils.js#L153) in the global enum `intlTelInputUtils.validationError` e.g.
363
+ Returns an integer, which you can match against the [various options](https://github.com/jackocnr/intl-tel-input/blob/master/src/js/utils.js#L178) in the global enum `intlTelInputUtils.validationError` e.g.
364
364
  ```js
365
365
  if (error === intlTelInputUtils.validationError.TOO_SHORT) {
366
366
  // the number is too short
@@ -368,9 +368,11 @@ if (error === intlTelInputUtils.validationError.TOO_SHORT) {
368
368
  ```
369
369
 
370
370
  **isValidNumber**
371
- Check if the current number is valid based on its length - [see example](https://intl-tel-input.com/examples/validation-practical.html), which should be sufficient for most use cases. See `isValidNumberPrecise` for more precise validation, but the advantage of `isValidNumber` is that it is much more future-proof as while countries around the world regularly update their number rules, they very rarely change their number lengths. If it returns false, you can use `getValidationError` to get more information. Requires the `utilsScript` option.
371
+ Check if the current number is valid based on its length - [see example](https://intl-tel-input.com/examples/validation-practical.html), which should be sufficient for most use cases. See `isValidNumberPrecise` for more precise validation, but the advantage of `isValidNumber` is that it is much more future-proof as while countries around the world regularly update their number rules, they very rarely change their number lengths. If it returns false, you can use `getValidationError` to get more information. Requires the `utilsScript` option. Note that in some countries there are several different types of numbers which can be valid at various lengths. For example, in the UK, mobile numbers are always 11 digits long (in national format, e.g. "07400123456"), while other kinds of numbers can be valid at lengths of 8, 9 and 10, and so when the UK is selected, by default `isValidNumber` will return `true` for any number between 8-11 digits. If you're only dealing with mobile numbers, you can pass `true` as the first argument to `isValidNumber` to only validate using mobile number rules, so for the UK, it will only return `true` for numbers with 11 digits.
372
372
  ```js
373
373
  const isValid = iti.isValidNumber();
374
+ // or for mobile only:
375
+ const isValidMobile = iti.isValidNumber(true);
374
376
  ```
375
377
  Returns: `true`/`false`
376
378
 
package/build/js/data.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * International Telephone Input v19.5.4
2
+ * International Telephone Input v19.5.6
3
3
  * https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * International Telephone Input v19.5.4
2
+ * International Telephone Input v19.5.6
3
3
  * https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * International Telephone Input v19.5.4
2
+ * International Telephone Input v19.5.6
3
3
  * https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
@@ -1683,9 +1683,9 @@
1683
1683
  }
1684
1684
  }, {
1685
1685
  key: "isValidNumber",
1686
- value: function isValidNumber() {
1686
+ value: function isValidNumber(mobileOnly) {
1687
1687
  var val = this._getFullNumber();
1688
- return window.intlTelInputUtils ? intlTelInputUtils.isPossibleNumber(val, this.selectedCountryData.iso2) : null;
1688
+ return window.intlTelInputUtils ? intlTelInputUtils.isPossibleNumber(val, this.selectedCountryData.iso2, mobileOnly) : null;
1689
1689
  }
1690
1690
  }, {
1691
1691
  key: "isValidNumberPrecise",
@@ -1774,7 +1774,7 @@
1774
1774
  // default options
1775
1775
  intlTelInputGlobals.defaults = defaults;
1776
1776
  // version
1777
- intlTelInputGlobals.version = "19.5.4";
1777
+ intlTelInputGlobals.version = "19.5.6";
1778
1778
  var pluginName = "intlTelInput";
1779
1779
  // A really lightweight plugin wrapper around the constructor,
1780
1780
  // preventing against multiple instantiations
@@ -1,8 +1,8 @@
1
1
  /*
2
- * International Telephone Input v19.5.4
2
+ * International Telephone Input v19.5.6
3
3
  * https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
6
6
 
7
7
  !function(a){"object"==typeof module&&module.exports?module.exports=a(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],function(b){a(b)}):a(jQuery)}(function(a,b){"use strict";function c(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?Object(arguments[b]):{},e=Object.keys(c);"function"==typeof Object.getOwnPropertySymbols&&e.push.apply(e,Object.getOwnPropertySymbols(c).filter(function(a){return Object.getOwnPropertyDescriptor(c,a).enumerable})),e.forEach(function(b){d(a,b,c[b])})}return a}function d(a,b,c){return b=n(b),b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b){return j(a)||i(a,b)||g(a,b)||f()}function f(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function g(a,b){if(a){if("string"==typeof a)return h(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);return"Object"===c&&a.constructor&&(c=a.constructor.name),"Map"===c||"Set"===c?Array.from(a):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?h(a,b):void 0}}function h(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=new Array(b);c<b;c++)d[c]=a[c];return d}function i(a,b){var c=null==a?null:"undefined"!=typeof Symbol&&a[Symbol.iterator]||a["@@iterator"];if(null!=c){var d,e,f,g,h=[],i=!0,j=!1;try{if(f=(c=c.call(a)).next,0===b){if(Object(c)!==c)return;i=!1}else for(;!(i=(d=f.call(c)).done)&&(h.push(d.value),h.length!==b);i=!0);}catch(k){j=!0,e=k}finally{try{if(!i&&null!=c["return"]&&(g=c["return"](),Object(g)!==g))return}finally{if(j)throw e}}return h}}function j(a){if(Array.isArray(a))return a}function k(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function l(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,n(d.key),d)}}function m(a,b,c){return b&&l(a.prototype,b),c&&l(a,c),Object.defineProperty(a,"prototype",{writable:!1}),a}function n(a){var b=o(a,"string");return"symbol"==typeof b?b:String(b)}function o(a,c){if("object"!=typeof a||null===a)return a;var d=a[Symbol.toPrimitive];if(d!==b){var e=d.call(a,c||"default");if("object"!=typeof e)return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===c?String:Number)(a)}for(var p=[["Afghanistan","af","93"],["Albania","al","355"],["Algeria","dz","213"],["American Samoa","as","1",5,["684"]],["Andorra","ad","376"],["Angola","ao","244"],["Anguilla","ai","1",6,["264"]],["Antigua & Barbuda","ag","1",7,["268"]],["Argentina","ar","54"],["Armenia","am","374"],["Aruba","aw","297"],["Ascension Island","ac","247"],["Australia","au","61",0],["Austria","at","43"],["Azerbaijan","az","994"],["Bahamas","bs","1",8,["242"]],["Bahrain","bh","973"],["Bangladesh","bd","880"],["Barbados","bb","1",9,["246"]],["Belarus","by","375"],["Belgium","be","32"],["Belize","bz","501"],["Benin","bj","229"],["Bermuda","bm","1",10,["441"]],["Bhutan","bt","975"],["Bolivia","bo","591"],["Bosnia & Herzegovina","ba","387"],["Botswana","bw","267"],["Brazil","br","55"],["British Indian Ocean Territory","io","246"],["British Virgin Islands","vg","1",11,["284"]],["Brunei","bn","673"],["Bulgaria","bg","359"],["Burkina Faso","bf","226"],["Burundi","bi","257"],["Cambodia","kh","855"],["Cameroon","cm","237"],["Canada","ca","1",1,["204","226","236","249","250","263","289","306","343","354","365","367","368","382","387","403","416","418","428","431","437","438","450","584","468","474","506","514","519","548","579","581","584","587","604","613","639","647","672","683","705","709","742","753","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde","cv","238"],["Caribbean Netherlands","bq","599",1,["3","4","7"]],["Cayman Islands","ky","1",12,["345"]],["Central African Republic","cf","236"],["Chad","td","235"],["Chile","cl","56"],["China","cn","86"],["Christmas Island","cx","61",2,["89164"]],["Cocos (Keeling) Islands","cc","61",1,["89162"]],["Colombia","co","57"],["Comoros","km","269"],["Congo - Brazzaville","cg","242"],["Congo - Kinshasa","cd","243"],["Cook Islands","ck","682"],["Costa Rica","cr","506"],["Côte d’Ivoire","ci","225"],["Croatia","hr","385"],["Cuba","cu","53"],["Curaçao","cw","599",0],["Cyprus","cy","357"],["Czech Republic","cz","420"],["Denmark","dk","45"],["Djibouti","dj","253"],["Dominica","dm","1",13,["767"]],["Dominican Republic","do","1",2,["809","829","849"]],["Ecuador","ec","593"],["Egypt","eg","20"],["El Salvador","sv","503"],["Equatorial Guinea","gq","240"],["Eritrea","er","291"],["Estonia","ee","372"],["Eswatini","sz","268"],["Ethiopia","et","251"],["Falkland Islands","fk","500"],["Faroe Islands","fo","298"],["Fiji","fj","679"],["Finland","fi","358",0],["France","fr","33"],["French Guiana","gf","594"],["French Polynesia","pf","689"],["Gabon","ga","241"],["Gambia","gm","220"],["Georgia","ge","995"],["Germany","de","49"],["Ghana","gh","233"],["Gibraltar","gi","350"],["Greece","gr","30"],["Greenland","gl","299"],["Grenada","gd","1",14,["473"]],["Guadeloupe","gp","590",0],["Guam","gu","1",15,["671"]],["Guatemala","gt","502"],["Guernsey","gg","44",1,["1481","7781","7839","7911"]],["Guinea","gn","224"],["Guinea-Bissau","gw","245"],["Guyana","gy","592"],["Haiti","ht","509"],["Honduras","hn","504"],["Hong Kong","hk","852"],["Hungary","hu","36"],["Iceland","is","354"],["India","in","91"],["Indonesia","id","62"],["Iran","ir","98"],["Iraq","iq","964"],["Ireland","ie","353"],["Isle of Man","im","44",2,["1624","74576","7524","7924","7624"]],["Israel","il","972"],["Italy","it","39",0],["Jamaica","jm","1",4,["876","658"]],["Japan","jp","81"],["Jersey","je","44",3,["1534","7509","7700","7797","7829","7937"]],["Jordan","jo","962"],["Kazakhstan","kz","7",1,["33","7"]],["Kenya","ke","254"],["Kiribati","ki","686"],["Kosovo","xk","383"],["Kuwait","kw","965"],["Kyrgyzstan","kg","996"],["Laos","la","856"],["Latvia","lv","371"],["Lebanon","lb","961"],["Lesotho","ls","266"],["Liberia","lr","231"],["Libya","ly","218"],["Liechtenstein","li","423"],["Lithuania","lt","370"],["Luxembourg","lu","352"],["Macau","mo","853"],["Madagascar","mg","261"],["Malawi","mw","265"],["Malaysia","my","60"],["Maldives","mv","960"],["Mali","ml","223"],["Malta","mt","356"],["Marshall Islands","mh","692"],["Martinique","mq","596"],["Mauritania","mr","222"],["Mauritius","mu","230"],["Mayotte","yt","262",1,["269","639"]],["Mexico","mx","52"],["Micronesia","fm","691"],["Moldova","md","373"],["Monaco","mc","377"],["Mongolia","mn","976"],["Montenegro","me","382"],["Montserrat","ms","1",16,["664"]],["Morocco","ma","212",0],["Mozambique","mz","258"],["Myanmar (Burma)","mm","95"],["Namibia","na","264"],["Nauru","nr","674"],["Nepal","np","977"],["Netherlands","nl","31"],["New Caledonia","nc","687"],["New Zealand","nz","64"],["Nicaragua","ni","505"],["Niger","ne","227"],["Nigeria","ng","234"],["Niue","nu","683"],["Norfolk Island","nf","672"],["North Korea","kp","850"],["North Macedonia","mk","389"],["Northern Mariana Islands","mp","1",17,["670"]],["Norway","no","47",0],["Oman","om","968"],["Pakistan","pk","92"],["Palau","pw","680"],["Palestine","ps","970"],["Panama","pa","507"],["Papua New Guinea","pg","675"],["Paraguay","py","595"],["Peru","pe","51"],["Philippines","ph","63"],["Poland","pl","48"],["Portugal","pt","351"],["Puerto Rico","pr","1",3,["787","939"]],["Qatar","qa","974"],["Réunion","re","262",0],["Romania","ro","40"],["Russia","ru","7",0],["Rwanda","rw","250"],["Samoa","ws","685"],["San Marino","sm","378"],["São Tomé & Príncipe","st","239"],["Saudi Arabia","sa","966"],["Senegal","sn","221"],["Serbia","rs","381"],["Seychelles","sc","248"],["Sierra Leone","sl","232"],["Singapore","sg","65"],["Sint Maarten","sx","1",21,["721"]],["Slovakia","sk","421"],["Slovenia","si","386"],["Solomon Islands","sb","677"],["Somalia","so","252"],["South Africa","za","27"],["South Korea","kr","82"],["South Sudan","ss","211"],["Spain","es","34"],["Sri Lanka","lk","94"],["St Barthélemy","bl","590",1],["St Helena","sh","290"],["St Kitts & Nevis","kn","1",18,["869"]],["St Lucia","lc","1",19,["758"]],["St Martin","mf","590",2],["St Pierre & Miquelon","pm","508"],["St Vincent & Grenadines","vc","1",20,["784"]],["Sudan","sd","249"],["Suriname","sr","597"],["Svalbard & Jan Mayen","sj","47",1,["79"]],["Sweden","se","46"],["Switzerland","ch","41"],["Syria","sy","963"],["Taiwan","tw","886"],["Tajikistan","tj","992"],["Tanzania","tz","255"],["Thailand","th","66"],["Timor-Leste","tl","670"],["Togo","tg","228"],["Tokelau","tk","690"],["Tonga","to","676"],["Trinidad & Tobago","tt","1",22,["868"]],["Tunisia","tn","216"],["Turkey","tr","90"],["Turkmenistan","tm","993"],["Turks & Caicos Islands","tc","1",23,["649"]],["Tuvalu","tv","688"],["Uganda","ug","256"],["Ukraine","ua","380"],["United Arab Emirates","ae","971"],["United Kingdom","gb","44",0],["United States","us","1",0],["Uruguay","uy","598"],["US Virgin Islands","vi","1",24,["340"]],["Uzbekistan","uz","998"],["Vanuatu","vu","678"],["Vatican City","va","39",1,["06698"]],["Venezuela","ve","58"],["Vietnam","vn","84"],["Wallis & Futuna","wf","681"],["Western Sahara","eh","212",1,["5288","5289"]],["Yemen","ye","967"],["Zambia","zm","260"],["Zimbabwe","zw","263"],["Åland Islands","ax","358",1,["18"]]],q=0;q<p.length;q++){var r=p[q];p[q]={name:r[0],iso2:r[1],dialCode:r[2],priority:r[3]||0,areaCodes:r[4]||null,nodeById:{}}}var s={getInstance:function(a){var b=a.getAttribute("data-intl-tel-input-id");return window.intlTelInputGlobals.instances[b]},instances:{},documentReady:function(){return"complete"===document.readyState}};"object"==typeof window&&(window.intlTelInputGlobals=s);var t=0,u={allowDropdown:!0,autoInsertDialCode:!1,autoPlaceholder:"polite",countrySearch:!0,containerClass:"",customPlaceholder:null,defaultToFirstCountry:!0,dropdownContainer:null,excludeCountries:[],fixDropdownWidth:!0,formatAsYouType:!0,formatOnDisplay:!0,geoIpLookup:null,hiddenInput:null,i18n:{},initialCountry:"",nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",preferredCountries:[],showFlags:!0,showSelectedDialCode:!1,useFullscreenPopup:"undefined"!=typeof navigator&&"undefined"!=typeof window&&(/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||window.innerWidth<=500),utilsScript:""},v=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"],w=function(a){var b=window.intlTelInputGlobals.instances;Object.values(b).forEach(function(b){return b[a]()})},x=function(){function a(c){var d=arguments.length>1&&arguments[1]!==b?arguments[1]:{};k(this,a),this.id=t++,this.a=c,this.b=null,this.c=null,this.d=Object.assign({},u,d),this.e=Boolean(c.getAttribute("placeholder"))}return m(a,[{key:"_init",value:function(){var a=this;this.d.useFullscreenPopup&&(this.d.fixDropdownWidth=!1),this.d.countrySearch&&!this.d.useFullscreenPopup&&(this.d.fixDropdownWidth=!0),this.d.nationalMode&&(this.d.autoInsertDialCode=!1),this.d.showSelectedDialCode&&(this.d.autoInsertDialCode=!1);var b=this.d.allowDropdown&&!this.d.showSelectedDialCode;if(!this.d.showFlags&&b&&(this.d.showFlags=!0),this.d.useFullscreenPopup&&!this.d.dropdownContainer&&(this.d.dropdownContainer=document.body),this.isRTL=!!this.a.closest("[dir=rtl]"),"undefined"!=typeof Promise){var c=new Promise(function(b,c){a.h=b,a.i=c}),d=new Promise(function(b,c){a.i0=b,a.i1=c});this.promise=Promise.all([c,d])}else this.h=this.i=function(){},this.i0=this.i1=function(){};this.s={},this._b(),this._f(),this._h(),this._i(),this._i3()}},{key:"_b",value:function(){this._d(),this._d2(),this._e(),this._d0(),(this.d.onlyCountries.length||this.d.i18n)&&this.p.sort(this._d1)}},{key:"_c",value:function(a,c,d){c.length>this.dialCodeMaxLen&&(this.dialCodeMaxLen=c.length),this.q.hasOwnProperty(c)||(this.q[c]=[]);for(var e=0;e<this.q[c].length;e++)if(this.q[c][e]===a)return;var f=d!==b?d:this.q[c].length;this.q[c][f]=a}},{key:"_d",value:function(){if(this.d.onlyCountries.length){var a=this.d.onlyCountries.map(function(a){return a.toLowerCase()});this.p=p.filter(function(b){return a.indexOf(b.iso2)>-1})}else if(this.d.excludeCountries.length){var b=this.d.excludeCountries.map(function(a){return a.toLowerCase()});this.p=p.filter(function(a){return-1===b.indexOf(a.iso2)})}else this.p=p}},{key:"_d0",value:function(){for(var a=0;a<this.p.length;a++){var b=this.p[a].iso2.toLowerCase();this.d.i18n.hasOwnProperty(b)&&(this.p[a].name=this.d.i18n[b])}}},{key:"_d1",value:function(a,b){return a.name<b.name?-1:a.name>b.name?1:0}},{key:"_d2",value:function(){this.dialCodes={},this.dialCodeMaxLen=0,this.q={};for(var a=0;a<this.p.length;a++){var b=this.p[a];this.dialCodes[b.dialCode]||(this.dialCodes[b.dialCode]=!0),this._c(b.iso2,b.dialCode,b.priority)}for(var c=0;c<this.p.length;c++){var d=this.p[c];if(d.areaCodes)for(var e=this.q[d.dialCode][0],f=0;f<d.areaCodes.length;f++){for(var g=d.areaCodes[f],h=1;h<g.length;h++){var i=d.dialCode+g.substr(0,h);this._c(e,i),this._c(d.iso2,i)}this._c(d.iso2,d.dialCode+g)}}}},{key:"_e",value:function(){this.preferredCountries=[];for(var a=0;a<this.d.preferredCountries.length;a++){var b=this.d.preferredCountries[a].toLowerCase(),c=this._y(b,!0);c&&this.preferredCountries.push(c)}}},{key:"_e2",value:function(a,b,c){var d=document.createElement(a);return b&&Object.entries(b).forEach(function(a){var b=e(a,2),c=b[0],f=b[1];return d.setAttribute(c,f)}),c&&c.appendChild(d),d}},{key:"_f",value:function(){this.a.classList.add("iti__tel-input"),this.a.hasAttribute("autocomplete")||this.a.form&&this.a.form.hasAttribute("autocomplete")||this.a.setAttribute("autocomplete","off");var a=this.d,b=a.allowDropdown,d=a.showSelectedDialCode,e=a.showFlags,f=a.containerClass,g=a.hiddenInput,h=a.dropdownContainer,i=a.fixDropdownWidth,j=a.useFullscreenPopup,k=a.countrySearch,l="iti";b&&(l+=" iti--allow-dropdown"),d&&(l+=" iti--show-selected-dial-code"),e&&(l+=" iti--show-flags"),f&&(l+=" ".concat(f)),j||(l+=" iti--inline-dropdown");var m=this._e2("div",{"class":l});this.a.parentNode.insertBefore(m,this.a);var n=b||e||d;if(n&&(this.k=this._e2("div",{"class":"iti__flag-container"},m)),m.appendChild(this.a),n&&(this.selectedFlag=this._e2("div",c({"class":"iti__selected-flag"},b&&{role:"combobox","aria-haspopup":"listbox","aria-controls":"iti-".concat(this.id,"__country-listbox"),"aria-expanded":"false","aria-label":this.d.i18n.selectedCountryAriaLabel||"Selected country"}),this.k)),e&&(this.l=this._e2("div",{"class":"iti__flag"},this.selectedFlag)),this.selectedFlag&&this.a.disabled&&this.selectedFlag.setAttribute("aria-disabled","true"),d&&(this.t=this._e2("div",{"class":"iti__selected-dial-code"},this.selectedFlag)),b){this.a.disabled||this.selectedFlag.setAttribute("tabindex","0"),this.u=this._e2("div",{"class":"iti__arrow"},this.selectedFlag);var o=i?"":"iti--flexible-dropdown-width";if(this.dropdownContent=this._e2("div",{"class":"iti__dropdown-content iti__hide ".concat(o)}),k&&(this.searchInput=this._e2("input",{type:"text","class":"iti__search-input",placeholder:this.d.i18n.searchPlaceholder||"Search"},this.dropdownContent)),this.countryList=this._e2("ul",{"class":"iti__country-list",id:"iti-".concat(this.id,"__country-listbox"),role:"listbox","aria-label":this.d.i18n.countryListAriaLabel||"List of countries"},this.dropdownContent),this.preferredCountries.length&&!k&&(this._g(this.preferredCountries,"iti__preferred",!0),this._e2("li",{"class":"iti__divider","aria-hidden":"true"},this.countryList)),this._g(this.p,"iti__standard"),h){var p="iti iti--container";p+=j?" iti--fullscreen-popup":" iti--inline-dropdown",k&&(p+=" iti--country-search"),this.dropdown=this._e2("div",{"class":p}),this.dropdown.appendChild(this.dropdownContent)}else this.k.appendChild(this.dropdownContent)}if(g){var q,r,s=this.a.getAttribute("name"),t=g(s),u=null!==t&&"object"==typeof t;if(u?(q=t.phone||s,r=t.country||"".concat(q,"_country")):(q=t||s,r="".concat(q,"_country")),!q)return;this.hiddenInput=this._e2("input",{type:"hidden",name:q}),this.hiddenInputCountry=this._e2("input",{type:"hidden",name:r}),m.appendChild(this.hiddenInput),m.appendChild(this.hiddenInputCountry)}}},{key:"_g",value:function(a,b,c){for(var d=0;d<a.length;d++){var e=a[d],f=c?"-preferred":"",g=this._e2("li",{id:"iti-".concat(this.id,"__item-").concat(e.iso2).concat(f),"class":"iti__country ".concat(b),tabindex:"-1",role:"option","data-dial-code":e.dialCode,"data-country-code":e.iso2,"aria-selected":"false"},this.countryList);e.nodeById[this.id]=g;var h="";this.d.showFlags&&(h+="<div class='iti__flag-box'><div class='iti__flag iti__".concat(e.iso2,"'></div></div>")),h+="<span class='iti__country-name'>".concat(e.name,"</span>"),h+="<span class='iti__dial-code'>+".concat(e.dialCode,"</span>"),g.insertAdjacentHTML("beforeend",h)}}},{key:"_h",value:function(){var a=arguments.length>0&&arguments[0]!==b&&arguments[0],c=this.a.getAttribute("value"),d=this.a.value,e=c&&"+"===c.charAt(0)&&(!d||"+"!==d.charAt(0)),f=e?c:d,g=this._5(f),h=this._w(f),i=this.d,j=i.initialCountry,k=i.autoInsertDialCode,l=i.defaultToFirstCountry;if(g&&!h)this._v(f);else if("auto"!==j||a){var m=j?j.toLowerCase():"",n=m&&this._y(m,!0);n?this._z(m):g&&h?this._z("us"):l&&!f?(this.j=this.preferredCountries.length?this.preferredCountries[0].iso2:this.p[0].iso2,this._z(this.j)):this._z(),!f&&k&&(this.a.value="+".concat(this.s.dialCode))}f&&this._u(f)}},{key:"_i",value:function(){this._j(),this.d.autoInsertDialCode&&this._l(),this.d.allowDropdown&&this._i2(),this.hiddenInput&&this._i0()}},{key:"_i0",value:function(){var a=this;this._a14=function(){a.hiddenInput.value=a.getNumber(),a.hiddenInputCountry.value=a.getSelectedCountryData().iso2},this.a.form&&this.a.form.addEventListener("submit",this._a14)}},{key:"_i2",value:function(){var a=this;this._a9=function(b){a.dropdownContent.classList.contains("iti__hide")?a.a.focus():b.preventDefault()};var b=this.a.closest("label");b&&b.addEventListener("click",this._a9),this._a10=function(){!a.dropdownContent.classList.contains("iti__hide")||a.a.disabled||a.a.readOnly||a._n()},this.selectedFlag.addEventListener("click",this._a10),this._a11=function(b){a.dropdownContent.classList.contains("iti__hide")&&["ArrowUp","ArrowDown"," ","Enter"].includes(b.key)&&(b.preventDefault(),b.stopPropagation(),a._n()),"Tab"===b.key&&a._2()},this.k.addEventListener("keydown",this._a11)}},{key:"_i3",value:function(){var a=this;this.d.utilsScript&&!window.intlTelInputUtils?window.intlTelInputGlobals.documentReady()?window.intlTelInputGlobals.loadUtils(this.d.utilsScript):window.addEventListener("load",function(){window.intlTelInputGlobals.loadUtils(a.d.utilsScript)}):this.i0(),"auto"!==this.d.initialCountry||this.s.iso2?this.h():this._i4()}},{key:"_i4",value:function(){var a=this;window.intlTelInputGlobals.autoCountry?this.handleAutoCountry():window.intlTelInputGlobals.startedLoadingAutoCountry||(window.intlTelInputGlobals.startedLoadingAutoCountry=!0,"function"==typeof this.d.geoIpLookup&&this.d.geoIpLookup(function(){var c=arguments.length>0&&arguments[0]!==b?arguments[0]:"",d=c.toLowerCase();d&&a._y(d,!0)?(window.intlTelInputGlobals.autoCountry=d,setTimeout(function(){return w("handleAutoCountry")})):(a._h(!0),w("rejectAutoCountryPromise"))},function(){return w("rejectAutoCountryPromise")}))}},{key:"_j",value:function(){var a=this,b=!1;this._a12=function(c){if(a._v(a.a.value)&&a._m2CountryChange(),c&&c.data&&/[^+0-9]/.test(c.data)?b=!0:/[^+0-9]/.test(a.a.value)||(b=!1),a.d.formatAsYouType&&!b){var d=a.a.selectionStart,e=a.a.value.substring(0,d),f=e.replace(/[^+0-9]/g,"").length,g=c&&"deleteContentForward"===c.inputType,h=a._formatNumberAsYouType(),i=a._translateCursorPosition(f,h,d,g);a.a.value=h,a.a.setSelectionRange(i,i)}},this.a.addEventListener("input",this._a12),this._a13=function(){setTimeout(a._a12)},this.a.addEventListener("cut",this._a13),this.a.addEventListener("paste",this._a13)}},{key:"_translateCursorPosition",value:function(a,b,c,d){if(0===c&&!d)return 0;for(var e=0,f=0;f<b.length;f++){if(/[+0-9]/.test(b[f])&&e++,e===a&&!d)return f+1;if(d&&e===a+1)return f}return b.length}},{key:"_j2",value:function(a){var b=this.a.getAttribute("maxlength");return b&&a.length>b?a.substr(0,b):a}},{key:"_l",value:function(){var a=this;this._a8=function(){a._l2()},this.a.form&&this.a.form.addEventListener("submit",this._a8),this.a.addEventListener("blur",this._a8)}},{key:"_l2",value:function(){if("+"===this.a.value.charAt(0)){var a=this._m(this.a.value);a&&this.s.dialCode!==a||(this.a.value="")}}},{key:"_m",value:function(a){return a.replace(/\D/g,"")}},{key:"_m2",value:function(a){var b=new Event(a,{bubbles:!0,cancelable:!0});this.a.dispatchEvent(b)}},{key:"_n",value:function(){if(this.d.fixDropdownWidth&&(this.dropdownContent.style.width="".concat(this.a.offsetWidth,"px")),this.dropdownContent.classList.remove("iti__hide"),this.selectedFlag.setAttribute("aria-expanded","true"),this._o(),this.d.countrySearch){var a=this.countryList.firstElementChild;a&&this._x(a,!1),this.searchInput.focus()}else this.b&&(this._x(this.b,!1),this._3(this.b,!0));this._p(),this.u.classList.add("iti__arrow--up"),this._m2("open:countrydropdown")}},{key:"_n2",value:function(a,b,c){c&&!a.classList.contains(b)?a.classList.add(b):!c&&a.classList.contains(b)&&a.classList.remove(b)}},{key:"_o",value:function(){var a=this;if(this.d.dropdownContainer&&this.d.dropdownContainer.appendChild(this.dropdown),!this.d.useFullscreenPopup){var b=this.a.getBoundingClientRect(),c=document.documentElement.scrollTop,d=b.top+c,e=this.dropdownContent.offsetHeight,f=d+this.a.offsetHeight+e<c+window.innerHeight,g=d-e>c,h=!this.d.countrySearch&&!f&&g;if(this._n2(this.dropdownContent,"iti__dropdown-content--dropup",h),this.d.dropdownContainer){var i=h?0:this.a.offsetHeight;this.dropdown.style.top="".concat(d+i,"px"),this.dropdown.style.left="".concat(b.left+document.body.scrollLeft,"px"),this._a4=function(){return a._2()},window.addEventListener("scroll",this._a4)}}}},{key:"_p",value:function(){var a=this;this._a0=function(b){var c=b.target.closest(".iti__country");c&&a._x(c,!1)},this.countryList.addEventListener("mouseover",this._a0),this._a1=function(b){var c=b.target.closest(".iti__country");c&&a._1(c)},this.countryList.addEventListener("click",this._a1);var b=!0;this._a2=function(){b||a._2(),b=!1},document.documentElement.addEventListener("click",this._a2);var c="",d=null;if(this._a3=function(b){["ArrowUp","ArrowDown","Enter","Escape"].includes(b.key)&&(b.preventDefault(),b.stopPropagation(),"ArrowUp"===b.key||"ArrowDown"===b.key?a._q(b.key):"Enter"===b.key?a._r():"Escape"===b.key&&a._2()),!a.d.countrySearch&&/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(b.key)&&(b.stopPropagation(),d&&clearTimeout(d),c+=b.key.toLowerCase(),a._s(c),d=setTimeout(function(){c=""},1e3))},document.addEventListener("keydown",this._a3),this.d.countrySearch){var e=function(){var b=a.searchInput.value.trim();b?a._filterCountries(b):a._filterCountries("",!0)},f=null;this._handleSearchChange=function(){f&&clearTimeout(f),f=setTimeout(function(){e(),f=null},100)},this.searchInput.addEventListener("input",this._handleSearchChange),this.searchInput.addEventListener("click",function(a){return a.stopPropagation()})}}},{key:"_normaliseString",value:function(){return(arguments.length>0&&arguments[0]!==b?arguments[0]:"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}},{key:"_filterCountries",value:function(a){var c=arguments.length>1&&arguments[1]!==b&&arguments[1],d=!0;this.countryList.innerHTML="";for(var e=this._normaliseString(a),f=0;f<this.p.length;f++){var g=this.p[f],h=this._normaliseString(g.name),i="+".concat(g.dialCode);(c||h.includes(e)||i.includes(e)||g.iso2.includes(e))&&(this.countryList.appendChild(g.nodeById[this.id]),d&&(this._x(g.nodeById[this.id],!1),d=!1))}}},{key:"_q",value:function(a){var b="ArrowUp"===a?this.c.previousElementSibling:this.c.nextElementSibling;if(b?b.classList.contains("iti__divider")&&(b="ArrowUp"===a?b.previousElementSibling:b.nextElementSibling):this.countryList.childElementCount>1&&(b="ArrowUp"===a?this.countryList.lastElementChild:this.countryList.firstElementChild),b){var c=!this.d.countrySearch;this._x(b,c),this.d.countrySearch&&this._3(b,!1)}}},{key:"_r",value:function(){this.c&&this._1(this.c)}},{key:"_s",value:function(a){for(var b=0;b<this.p.length;b++)if(this._t(this.p[b].name,a)){var c=this.p[b].nodeById[this.id];this._x(c,!1),this._3(c,!0);break}}},{key:"_t",value:function(a,b){return a.substr(0,b.length).toLowerCase()===b}},{key:"_u",value:function(a){var b=a;if(this.d.formatOnDisplay&&window.intlTelInputUtils&&this.s){var c=this.d.nationalMode||"+"!==b.charAt(0)&&!this.d.showSelectedDialCode,d=intlTelInputUtils.numberFormat,e=d.NATIONAL,f=d.INTERNATIONAL,g=c?e:f;b=intlTelInputUtils.formatNumber(b,this.s.iso2,g)}b=this._7(b),this.a.value=b}},{key:"_v",value:function(a){var b=a.indexOf("+"),c=b?a.substring(b):a,d=this.s.dialCode,e="1"===d;c&&e&&"+"!==c.charAt(0)&&("1"!==c.charAt(0)&&(c="1".concat(c)),c="+".concat(c)),this.d.showSelectedDialCode&&d&&"+"!==c.charAt(0)&&(c="+".concat(d).concat(c));var f=this._5(c,!0),g=this._m(c),h=null;if(f){var i=this.q[this._m(f)],j=-1!==i.indexOf(this.s.iso2)&&g.length<=f.length-1;if(!("1"===d&&this._w(g))&&!j)for(var k=0;k<i.length;k++)if(i[k]){h=i[k];break}}else"+"===c.charAt(0)&&g.length?h="":c&&"+"!==c||this.s.iso2||(h=this.j);return null!==h&&this._z(h)}},{key:"_w",value:function(a){var b=this._m(a);if("1"===b.charAt(0)){var c=b.substr(1,3);return-1!==v.indexOf(c)}return!1}},{key:"_x",value:function(a,b){var c=this.c;c&&c.classList.remove("iti__highlight"),this.c=a,this.c.classList.add("iti__highlight"),this.selectedFlag.setAttribute("aria-activedescendant",a.getAttribute("id")),b&&this.c.focus()}},{key:"_y",value:function(a,b){for(var c=0;c<this.p.length;c++)if(this.p[c].iso2===a)return this.p[c];if(b)return null;throw new Error("No country data for '".concat(a,"'"))}},{key:"_z",value:function(a){var b=this.d,c=b.allowDropdown,d=b.showSelectedDialCode,e=b.showFlags,f=b.countrySearch,g=this.s.iso2?this.s:{};if(this.s=a?this._y(a,!1):{},this.s.iso2&&(this.j=this.s.iso2),e){var h=a?"iti__".concat(a):"iti__globe";this.l.setAttribute("class","iti__flag ".concat(h))}if(this._setSelectedCountryFlagTitleAttribute(a,d),d){var i=this.s.dialCode?"+".concat(this.s.dialCode):"";this.t.innerHTML=i;var j=this.selectedFlag.offsetWidth||this._z2();this.isRTL?this.a.style.paddingRight="".concat(j+6,"px"):this.a.style.paddingLeft="".concat(j+6,"px")}if(this._0(),c&&!f){var k=this.b;if(k&&(k.classList.remove("iti__active"),k.setAttribute("aria-selected","false")),a){var l=this.countryList.querySelector("#iti-".concat(this.id,"__item-").concat(a,"-preferred"))||this.countryList.querySelector("#iti-".concat(this.id,"__item-").concat(a));l.setAttribute("aria-selected","true"),l.classList.add("iti__active"),this.b=l}}return g.iso2!==a}},{key:"_setSelectedCountryFlagTitleAttribute",value:function(a,b){if(this.selectedFlag){var c;c=a&&!b?"".concat(this.s.name,": +").concat(this.s.dialCode):a?this.s.name:"Unknown",this.selectedFlag.setAttribute("title",c)}}},{key:"_z2",value:function(){var a=this.a.parentNode.cloneNode();a.style.visibility="hidden",document.body.appendChild(a);var b=this.k.cloneNode();a.appendChild(b);var c=this.selectedFlag.cloneNode(!0);b.appendChild(c);var d=c.offsetWidth;return a.parentNode.removeChild(a),d}},{key:"_0",value:function(){var a="aggressive"===this.d.autoPlaceholder||!this.e&&"polite"===this.d.autoPlaceholder;if(window.intlTelInputUtils&&a){var b=intlTelInputUtils.numberType[this.d.placeholderNumberType],c=this.s.iso2?intlTelInputUtils.getExampleNumber(this.s.iso2,this.d.nationalMode,b):"";c=this._7(c),
8
- "function"==typeof this.d.customPlaceholder&&(c=this.d.customPlaceholder(c,this.s)),this.a.setAttribute("placeholder",c)}}},{key:"_1",value:function(a){var b=this._z(a.getAttribute("data-country-code"));this._2(),this._4(a.getAttribute("data-dial-code")),this.a.focus(),b&&this._m2CountryChange()}},{key:"_2",value:function(){this.dropdownContent.classList.add("iti__hide"),this.selectedFlag.setAttribute("aria-expanded","false"),this.selectedFlag.removeAttribute("aria-activedescendant"),this.u.classList.remove("iti__arrow--up"),document.removeEventListener("keydown",this._a3),this.d.countrySearch&&this.searchInput.removeEventListener("input",this._handleSearchChange),document.documentElement.removeEventListener("click",this._a2),this.countryList.removeEventListener("mouseover",this._a0),this.countryList.removeEventListener("click",this._a1),this.d.dropdownContainer&&(this.d.useFullscreenPopup||window.removeEventListener("scroll",this._a4),this.dropdown.parentNode&&this.dropdown.parentNode.removeChild(this.dropdown)),this._m2("close:countrydropdown")}},{key:"_3",value:function(a,b){var c=this.countryList,d=document.documentElement.scrollTop,e=c.offsetHeight,f=c.getBoundingClientRect().top+d,g=f+e,h=a.offsetHeight,i=a.getBoundingClientRect().top+d,j=i+h,k=i-f+c.scrollTop,l=e/2-h/2;if(i<f)b&&(k-=l),c.scrollTop=k;else if(j>g){b&&(k+=l);var m=e-h;c.scrollTop=k-m}}},{key:"_4",value:function(a){var b,c=this.a.value,d="+".concat(a);if("+"===c.charAt(0)){var e=this._5(c);b=e?c.replace(e,d):d,this.a.value=b}else this.d.autoInsertDialCode&&(b=c?d+c:d,this.a.value=b)}},{key:"_5",value:function(a,b){var c="";if("+"===a.charAt(0))for(var d="",e=0;e<a.length;e++){var f=a.charAt(e);if(!isNaN(parseInt(f,10))){if(d+=f,b)this.q[d]&&(c=a.substr(0,e+1));else if(this.dialCodes[d]){c=a.substr(0,e+1);break}if(d.length===this.dialCodeMaxLen)break}}return c}},{key:"_6",value:function(){var a=this.a.value.trim(),b=this.s.dialCode,c=this._m(a);return(this.d.showSelectedDialCode&&!this.d.nationalMode&&"+"!==a.charAt(0)&&b&&c?"+".concat(b):"")+a}},{key:"_7",value:function(a){var b=a;if(this.d.showSelectedDialCode){var c=this._5(b);if(c){c="+".concat(this.s.dialCode);var d=" "===b[c.length]||"-"===b[c.length]?c.length+1:c.length;b=b.substr(d)}}return this._j2(b)}},{key:"_m2CountryChange",value:function(){this._m2("countrychange")}},{key:"_formatNumberAsYouType",value:function(){var a=this._6(),b=window.intlTelInputUtils?intlTelInputUtils.formatNumberAsYouType(a,this.s.iso2):a,c=this.s.dialCode;if(this.d.showSelectedDialCode&&!this.d.nationalMode&&"+"!==this.a.value.charAt(0)&&b.includes("+".concat(c))){return(b.split("+".concat(c))[1]||"").trim()}return b}},{key:"handleAutoCountry",value:function(){"auto"===this.d.initialCountry&&(this.j=window.intlTelInputGlobals.autoCountry,this.a.value||this.setCountry(this.j),this.h())}},{key:"handleUtils",value:function(){window.intlTelInputUtils&&(this.a.value&&this._u(this.a.value),this._0()),this.i0()}},{key:"destroy",value:function(){var a=this.a.form;if(this.d.allowDropdown){this._2(),this.selectedFlag.removeEventListener("click",this._a10),this.k.removeEventListener("keydown",this._a11);var b=this.a.closest("label");b&&b.removeEventListener("click",this._a9)}this.hiddenInput&&a&&a.removeEventListener("submit",this._a14),this.d.autoInsertDialCode&&(a&&a.removeEventListener("submit",this._a8),this.a.removeEventListener("blur",this._a8)),this.a.removeEventListener("input",this._a12),this.a.removeEventListener("cut",this._a13),this.a.removeEventListener("paste",this._a13),this.a.removeAttribute("data-intl-tel-input-id");var c=this.a.parentNode;c.parentNode.insertBefore(this.a,c),c.parentNode.removeChild(c),delete window.intlTelInputGlobals.instances[this.id]}},{key:"getExtension",value:function(){return window.intlTelInputUtils?intlTelInputUtils.getExtension(this._6(),this.s.iso2):""}},{key:"getNumber",value:function(a){if(window.intlTelInputUtils){var b=this.s.iso2;return intlTelInputUtils.formatNumber(this._6(),b,a)}return""}},{key:"getNumberType",value:function(){return window.intlTelInputUtils?intlTelInputUtils.getNumberType(this._6(),this.s.iso2):-99}},{key:"getSelectedCountryData",value:function(){return this.s}},{key:"getValidationError",value:function(){if(window.intlTelInputUtils){var a=this.s.iso2;return intlTelInputUtils.getValidationError(this._6(),a)}return-99}},{key:"isValidNumber",value:function(){var a=this._6();return window.intlTelInputUtils?intlTelInputUtils.isPossibleNumber(a,this.s.iso2):null}},{key:"isValidNumberPrecise",value:function(){var a=this._6();return window.intlTelInputUtils?intlTelInputUtils.isValidNumber(a,this.s.iso2):null}},{key:"setCountry",value:function(a){var b=a.toLowerCase();this.s.iso2!==b&&(this._z(b),this._4(this.s.dialCode),this._m2CountryChange())}},{key:"setNumber",value:function(a){var b=this._v(a);this._u(a),b&&this._m2CountryChange()}},{key:"setPlaceholderNumberType",value:function(a){this.d.placeholderNumberType=a,this._0()}}]),a}();s.getCountryData=function(){return p};var y=function(a,b,c){var d=document.createElement("script");d.onload=function(){w("handleUtils"),b&&b()},d.onerror=function(){w("rejectUtilsScriptPromise"),c&&c()},d.className="iti-load-utils",d.async=!0,d.src=a,document.body.appendChild(d)};s.loadUtils=function(a){if(!window.intlTelInputUtils&&!window.intlTelInputGlobals.startedLoadingUtilsScript){if(window.intlTelInputGlobals.startedLoadingUtilsScript=!0,"undefined"!=typeof Promise)return new Promise(function(b,c){return y(a,b,c)});y(a)}return null},s.defaults=u,s.version="19.5.4";a.fn.intlTelInput=function(c){var d=arguments;if(c===b||"object"==typeof c)return this.each(function(){if(!a.data(this,"plugin_intlTelInput")){var b=new x(this,c);b._init(),window.intlTelInputGlobals.instances[b.id]=b,a.data(this,"plugin_intlTelInput",b)}});if("string"==typeof c&&"_"!==c[0]){var e;return this.each(function(){var b=a.data(this,"plugin_intlTelInput");b instanceof x&&"function"==typeof b[c]&&(e=b[c].apply(b,Array.prototype.slice.call(d,1))),"destroy"===c&&a.data(this,"plugin_intlTelInput",null)}),e!==b?e:this}}});
8
+ "function"==typeof this.d.customPlaceholder&&(c=this.d.customPlaceholder(c,this.s)),this.a.setAttribute("placeholder",c)}}},{key:"_1",value:function(a){var b=this._z(a.getAttribute("data-country-code"));this._2(),this._4(a.getAttribute("data-dial-code")),this.a.focus(),b&&this._m2CountryChange()}},{key:"_2",value:function(){this.dropdownContent.classList.add("iti__hide"),this.selectedFlag.setAttribute("aria-expanded","false"),this.selectedFlag.removeAttribute("aria-activedescendant"),this.u.classList.remove("iti__arrow--up"),document.removeEventListener("keydown",this._a3),this.d.countrySearch&&this.searchInput.removeEventListener("input",this._handleSearchChange),document.documentElement.removeEventListener("click",this._a2),this.countryList.removeEventListener("mouseover",this._a0),this.countryList.removeEventListener("click",this._a1),this.d.dropdownContainer&&(this.d.useFullscreenPopup||window.removeEventListener("scroll",this._a4),this.dropdown.parentNode&&this.dropdown.parentNode.removeChild(this.dropdown)),this._m2("close:countrydropdown")}},{key:"_3",value:function(a,b){var c=this.countryList,d=document.documentElement.scrollTop,e=c.offsetHeight,f=c.getBoundingClientRect().top+d,g=f+e,h=a.offsetHeight,i=a.getBoundingClientRect().top+d,j=i+h,k=i-f+c.scrollTop,l=e/2-h/2;if(i<f)b&&(k-=l),c.scrollTop=k;else if(j>g){b&&(k+=l);var m=e-h;c.scrollTop=k-m}}},{key:"_4",value:function(a){var b,c=this.a.value,d="+".concat(a);if("+"===c.charAt(0)){var e=this._5(c);b=e?c.replace(e,d):d,this.a.value=b}else this.d.autoInsertDialCode&&(b=c?d+c:d,this.a.value=b)}},{key:"_5",value:function(a,b){var c="";if("+"===a.charAt(0))for(var d="",e=0;e<a.length;e++){var f=a.charAt(e);if(!isNaN(parseInt(f,10))){if(d+=f,b)this.q[d]&&(c=a.substr(0,e+1));else if(this.dialCodes[d]){c=a.substr(0,e+1);break}if(d.length===this.dialCodeMaxLen)break}}return c}},{key:"_6",value:function(){var a=this.a.value.trim(),b=this.s.dialCode,c=this._m(a);return(this.d.showSelectedDialCode&&!this.d.nationalMode&&"+"!==a.charAt(0)&&b&&c?"+".concat(b):"")+a}},{key:"_7",value:function(a){var b=a;if(this.d.showSelectedDialCode){var c=this._5(b);if(c){c="+".concat(this.s.dialCode);var d=" "===b[c.length]||"-"===b[c.length]?c.length+1:c.length;b=b.substr(d)}}return this._j2(b)}},{key:"_m2CountryChange",value:function(){this._m2("countrychange")}},{key:"_formatNumberAsYouType",value:function(){var a=this._6(),b=window.intlTelInputUtils?intlTelInputUtils.formatNumberAsYouType(a,this.s.iso2):a,c=this.s.dialCode;if(this.d.showSelectedDialCode&&!this.d.nationalMode&&"+"!==this.a.value.charAt(0)&&b.includes("+".concat(c))){return(b.split("+".concat(c))[1]||"").trim()}return b}},{key:"handleAutoCountry",value:function(){"auto"===this.d.initialCountry&&(this.j=window.intlTelInputGlobals.autoCountry,this.a.value||this.setCountry(this.j),this.h())}},{key:"handleUtils",value:function(){window.intlTelInputUtils&&(this.a.value&&this._u(this.a.value),this._0()),this.i0()}},{key:"destroy",value:function(){var a=this.a.form;if(this.d.allowDropdown){this._2(),this.selectedFlag.removeEventListener("click",this._a10),this.k.removeEventListener("keydown",this._a11);var b=this.a.closest("label");b&&b.removeEventListener("click",this._a9)}this.hiddenInput&&a&&a.removeEventListener("submit",this._a14),this.d.autoInsertDialCode&&(a&&a.removeEventListener("submit",this._a8),this.a.removeEventListener("blur",this._a8)),this.a.removeEventListener("input",this._a12),this.a.removeEventListener("cut",this._a13),this.a.removeEventListener("paste",this._a13),this.a.removeAttribute("data-intl-tel-input-id");var c=this.a.parentNode;c.parentNode.insertBefore(this.a,c),c.parentNode.removeChild(c),delete window.intlTelInputGlobals.instances[this.id]}},{key:"getExtension",value:function(){return window.intlTelInputUtils?intlTelInputUtils.getExtension(this._6(),this.s.iso2):""}},{key:"getNumber",value:function(a){if(window.intlTelInputUtils){var b=this.s.iso2;return intlTelInputUtils.formatNumber(this._6(),b,a)}return""}},{key:"getNumberType",value:function(){return window.intlTelInputUtils?intlTelInputUtils.getNumberType(this._6(),this.s.iso2):-99}},{key:"getSelectedCountryData",value:function(){return this.s}},{key:"getValidationError",value:function(){if(window.intlTelInputUtils){var a=this.s.iso2;return intlTelInputUtils.getValidationError(this._6(),a)}return-99}},{key:"isValidNumber",value:function(a){var b=this._6();return window.intlTelInputUtils?intlTelInputUtils.isPossibleNumber(b,this.s.iso2,a):null}},{key:"isValidNumberPrecise",value:function(){var a=this._6();return window.intlTelInputUtils?intlTelInputUtils.isValidNumber(a,this.s.iso2):null}},{key:"setCountry",value:function(a){var b=a.toLowerCase();this.s.iso2!==b&&(this._z(b),this._4(this.s.dialCode),this._m2CountryChange())}},{key:"setNumber",value:function(a){var b=this._v(a);this._u(a),b&&this._m2CountryChange()}},{key:"setPlaceholderNumberType",value:function(a){this.d.placeholderNumberType=a,this._0()}}]),a}();s.getCountryData=function(){return p};var y=function(a,b,c){var d=document.createElement("script");d.onload=function(){w("handleUtils"),b&&b()},d.onerror=function(){w("rejectUtilsScriptPromise"),c&&c()},d.className="iti-load-utils",d.async=!0,d.src=a,document.body.appendChild(d)};s.loadUtils=function(a){if(!window.intlTelInputUtils&&!window.intlTelInputGlobals.startedLoadingUtilsScript){if(window.intlTelInputGlobals.startedLoadingUtilsScript=!0,"undefined"!=typeof Promise)return new Promise(function(b,c){return y(a,b,c)});y(a)}return null},s.defaults=u,s.version="19.5.6";a.fn.intlTelInput=function(c){var d=arguments;if(c===b||"object"==typeof c)return this.each(function(){if(!a.data(this,"plugin_intlTelInput")){var b=new x(this,c);b._init(),window.intlTelInputGlobals.instances[b.id]=b,a.data(this,"plugin_intlTelInput",b)}});if("string"==typeof c&&"_"!==c[0]){var e;return this.each(function(){var b=a.data(this,"plugin_intlTelInput");b instanceof x&&"function"==typeof b[c]&&(e=b[c].apply(b,Array.prototype.slice.call(d,1))),"destroy"===c&&a.data(this,"plugin_intlTelInput",null)}),e!==b?e:this}}});
@@ -1,5 +1,5 @@
1
1
  /*
2
- * International Telephone Input v19.5.4
2
+ * International Telephone Input v19.5.6
3
3
  * https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
@@ -1678,9 +1678,9 @@
1678
1678
  }
1679
1679
  }, {
1680
1680
  key: "isValidNumber",
1681
- value: function isValidNumber() {
1681
+ value: function isValidNumber(mobileOnly) {
1682
1682
  var val = this._getFullNumber();
1683
- return window.intlTelInputUtils ? intlTelInputUtils.isPossibleNumber(val, this.selectedCountryData.iso2) : null;
1683
+ return window.intlTelInputUtils ? intlTelInputUtils.isPossibleNumber(val, this.selectedCountryData.iso2, mobileOnly) : null;
1684
1684
  }
1685
1685
  }, {
1686
1686
  key: "isValidNumberPrecise",
@@ -1769,7 +1769,7 @@
1769
1769
  // default options
1770
1770
  intlTelInputGlobals.defaults = defaults;
1771
1771
  // version
1772
- intlTelInputGlobals.version = "19.5.4";
1772
+ intlTelInputGlobals.version = "19.5.6";
1773
1773
  // convenience wrapper
1774
1774
  return function(input, options) {
1775
1775
  var iti = new Iti(input, options);
@@ -1,8 +1,8 @@
1
1
  /*
2
- * International Telephone Input v19.5.4
2
+ * International Telephone Input v19.5.6
3
3
  * https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
6
6
 
7
7
  !function(a){"object"==typeof module&&module.exports?module.exports=a():window.intlTelInput=a()}(function(a){"use strict";return function(){function b(a){for(var b=1;b<arguments.length;b++){var d=null!=arguments[b]?Object(arguments[b]):{},e=Object.keys(d);"function"==typeof Object.getOwnPropertySymbols&&e.push.apply(e,Object.getOwnPropertySymbols(d).filter(function(a){return Object.getOwnPropertyDescriptor(d,a).enumerable})),e.forEach(function(b){c(a,b,d[b])})}return a}function c(a,b,c){return b=m(b),b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function d(a,b){return i(a)||h(a,b)||f(a,b)||e()}function e(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(a,b){if(a){if("string"==typeof a)return g(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);return"Object"===c&&a.constructor&&(c=a.constructor.name),"Map"===c||"Set"===c?Array.from(a):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?g(a,b):void 0}}function g(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=new Array(b);c<b;c++)d[c]=a[c];return d}function h(a,b){var c=null==a?null:"undefined"!=typeof Symbol&&a[Symbol.iterator]||a["@@iterator"];if(null!=c){var d,e,f,g,h=[],i=!0,j=!1;try{if(f=(c=c.call(a)).next,0===b){if(Object(c)!==c)return;i=!1}else for(;!(i=(d=f.call(c)).done)&&(h.push(d.value),h.length!==b);i=!0);}catch(k){j=!0,e=k}finally{try{if(!i&&null!=c["return"]&&(g=c["return"](),Object(g)!==g))return}finally{if(j)throw e}}return h}}function i(a){if(Array.isArray(a))return a}function j(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function k(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,m(d.key),d)}}function l(a,b,c){return b&&k(a.prototype,b),c&&k(a,c),Object.defineProperty(a,"prototype",{writable:!1}),a}function m(a){var b=n(a,"string");return"symbol"==typeof b?b:String(b)}function n(b,c){if("object"!=typeof b||null===b)return b;var d=b[Symbol.toPrimitive];if(d!==a){var e=d.call(b,c||"default");if("object"!=typeof e)return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===c?String:Number)(b)}for(var o=[["Afghanistan","af","93"],["Albania","al","355"],["Algeria","dz","213"],["American Samoa","as","1",5,["684"]],["Andorra","ad","376"],["Angola","ao","244"],["Anguilla","ai","1",6,["264"]],["Antigua & Barbuda","ag","1",7,["268"]],["Argentina","ar","54"],["Armenia","am","374"],["Aruba","aw","297"],["Ascension Island","ac","247"],["Australia","au","61",0],["Austria","at","43"],["Azerbaijan","az","994"],["Bahamas","bs","1",8,["242"]],["Bahrain","bh","973"],["Bangladesh","bd","880"],["Barbados","bb","1",9,["246"]],["Belarus","by","375"],["Belgium","be","32"],["Belize","bz","501"],["Benin","bj","229"],["Bermuda","bm","1",10,["441"]],["Bhutan","bt","975"],["Bolivia","bo","591"],["Bosnia & Herzegovina","ba","387"],["Botswana","bw","267"],["Brazil","br","55"],["British Indian Ocean Territory","io","246"],["British Virgin Islands","vg","1",11,["284"]],["Brunei","bn","673"],["Bulgaria","bg","359"],["Burkina Faso","bf","226"],["Burundi","bi","257"],["Cambodia","kh","855"],["Cameroon","cm","237"],["Canada","ca","1",1,["204","226","236","249","250","263","289","306","343","354","365","367","368","382","387","403","416","418","428","431","437","438","450","584","468","474","506","514","519","548","579","581","584","587","604","613","639","647","672","683","705","709","742","753","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde","cv","238"],["Caribbean Netherlands","bq","599",1,["3","4","7"]],["Cayman Islands","ky","1",12,["345"]],["Central African Republic","cf","236"],["Chad","td","235"],["Chile","cl","56"],["China","cn","86"],["Christmas Island","cx","61",2,["89164"]],["Cocos (Keeling) Islands","cc","61",1,["89162"]],["Colombia","co","57"],["Comoros","km","269"],["Congo - Brazzaville","cg","242"],["Congo - Kinshasa","cd","243"],["Cook Islands","ck","682"],["Costa Rica","cr","506"],["Côte d’Ivoire","ci","225"],["Croatia","hr","385"],["Cuba","cu","53"],["Curaçao","cw","599",0],["Cyprus","cy","357"],["Czech Republic","cz","420"],["Denmark","dk","45"],["Djibouti","dj","253"],["Dominica","dm","1",13,["767"]],["Dominican Republic","do","1",2,["809","829","849"]],["Ecuador","ec","593"],["Egypt","eg","20"],["El Salvador","sv","503"],["Equatorial Guinea","gq","240"],["Eritrea","er","291"],["Estonia","ee","372"],["Eswatini","sz","268"],["Ethiopia","et","251"],["Falkland Islands","fk","500"],["Faroe Islands","fo","298"],["Fiji","fj","679"],["Finland","fi","358",0],["France","fr","33"],["French Guiana","gf","594"],["French Polynesia","pf","689"],["Gabon","ga","241"],["Gambia","gm","220"],["Georgia","ge","995"],["Germany","de","49"],["Ghana","gh","233"],["Gibraltar","gi","350"],["Greece","gr","30"],["Greenland","gl","299"],["Grenada","gd","1",14,["473"]],["Guadeloupe","gp","590",0],["Guam","gu","1",15,["671"]],["Guatemala","gt","502"],["Guernsey","gg","44",1,["1481","7781","7839","7911"]],["Guinea","gn","224"],["Guinea-Bissau","gw","245"],["Guyana","gy","592"],["Haiti","ht","509"],["Honduras","hn","504"],["Hong Kong","hk","852"],["Hungary","hu","36"],["Iceland","is","354"],["India","in","91"],["Indonesia","id","62"],["Iran","ir","98"],["Iraq","iq","964"],["Ireland","ie","353"],["Isle of Man","im","44",2,["1624","74576","7524","7924","7624"]],["Israel","il","972"],["Italy","it","39",0],["Jamaica","jm","1",4,["876","658"]],["Japan","jp","81"],["Jersey","je","44",3,["1534","7509","7700","7797","7829","7937"]],["Jordan","jo","962"],["Kazakhstan","kz","7",1,["33","7"]],["Kenya","ke","254"],["Kiribati","ki","686"],["Kosovo","xk","383"],["Kuwait","kw","965"],["Kyrgyzstan","kg","996"],["Laos","la","856"],["Latvia","lv","371"],["Lebanon","lb","961"],["Lesotho","ls","266"],["Liberia","lr","231"],["Libya","ly","218"],["Liechtenstein","li","423"],["Lithuania","lt","370"],["Luxembourg","lu","352"],["Macau","mo","853"],["Madagascar","mg","261"],["Malawi","mw","265"],["Malaysia","my","60"],["Maldives","mv","960"],["Mali","ml","223"],["Malta","mt","356"],["Marshall Islands","mh","692"],["Martinique","mq","596"],["Mauritania","mr","222"],["Mauritius","mu","230"],["Mayotte","yt","262",1,["269","639"]],["Mexico","mx","52"],["Micronesia","fm","691"],["Moldova","md","373"],["Monaco","mc","377"],["Mongolia","mn","976"],["Montenegro","me","382"],["Montserrat","ms","1",16,["664"]],["Morocco","ma","212",0],["Mozambique","mz","258"],["Myanmar (Burma)","mm","95"],["Namibia","na","264"],["Nauru","nr","674"],["Nepal","np","977"],["Netherlands","nl","31"],["New Caledonia","nc","687"],["New Zealand","nz","64"],["Nicaragua","ni","505"],["Niger","ne","227"],["Nigeria","ng","234"],["Niue","nu","683"],["Norfolk Island","nf","672"],["North Korea","kp","850"],["North Macedonia","mk","389"],["Northern Mariana Islands","mp","1",17,["670"]],["Norway","no","47",0],["Oman","om","968"],["Pakistan","pk","92"],["Palau","pw","680"],["Palestine","ps","970"],["Panama","pa","507"],["Papua New Guinea","pg","675"],["Paraguay","py","595"],["Peru","pe","51"],["Philippines","ph","63"],["Poland","pl","48"],["Portugal","pt","351"],["Puerto Rico","pr","1",3,["787","939"]],["Qatar","qa","974"],["Réunion","re","262",0],["Romania","ro","40"],["Russia","ru","7",0],["Rwanda","rw","250"],["Samoa","ws","685"],["San Marino","sm","378"],["São Tomé & Príncipe","st","239"],["Saudi Arabia","sa","966"],["Senegal","sn","221"],["Serbia","rs","381"],["Seychelles","sc","248"],["Sierra Leone","sl","232"],["Singapore","sg","65"],["Sint Maarten","sx","1",21,["721"]],["Slovakia","sk","421"],["Slovenia","si","386"],["Solomon Islands","sb","677"],["Somalia","so","252"],["South Africa","za","27"],["South Korea","kr","82"],["South Sudan","ss","211"],["Spain","es","34"],["Sri Lanka","lk","94"],["St Barthélemy","bl","590",1],["St Helena","sh","290"],["St Kitts & Nevis","kn","1",18,["869"]],["St Lucia","lc","1",19,["758"]],["St Martin","mf","590",2],["St Pierre & Miquelon","pm","508"],["St Vincent & Grenadines","vc","1",20,["784"]],["Sudan","sd","249"],["Suriname","sr","597"],["Svalbard & Jan Mayen","sj","47",1,["79"]],["Sweden","se","46"],["Switzerland","ch","41"],["Syria","sy","963"],["Taiwan","tw","886"],["Tajikistan","tj","992"],["Tanzania","tz","255"],["Thailand","th","66"],["Timor-Leste","tl","670"],["Togo","tg","228"],["Tokelau","tk","690"],["Tonga","to","676"],["Trinidad & Tobago","tt","1",22,["868"]],["Tunisia","tn","216"],["Turkey","tr","90"],["Turkmenistan","tm","993"],["Turks & Caicos Islands","tc","1",23,["649"]],["Tuvalu","tv","688"],["Uganda","ug","256"],["Ukraine","ua","380"],["United Arab Emirates","ae","971"],["United Kingdom","gb","44",0],["United States","us","1",0],["Uruguay","uy","598"],["US Virgin Islands","vi","1",24,["340"]],["Uzbekistan","uz","998"],["Vanuatu","vu","678"],["Vatican City","va","39",1,["06698"]],["Venezuela","ve","58"],["Vietnam","vn","84"],["Wallis & Futuna","wf","681"],["Western Sahara","eh","212",1,["5288","5289"]],["Yemen","ye","967"],["Zambia","zm","260"],["Zimbabwe","zw","263"],["Åland Islands","ax","358",1,["18"]]],p=0;p<o.length;p++){var q=o[p];o[p]={name:q[0],iso2:q[1],dialCode:q[2],priority:q[3]||0,areaCodes:q[4]||null,nodeById:{}}}var r={getInstance:function(a){var b=a.getAttribute("data-intl-tel-input-id");return window.intlTelInputGlobals.instances[b]},instances:{},documentReady:function(){return"complete"===document.readyState}};"object"==typeof window&&(window.intlTelInputGlobals=r);var s=0,t={allowDropdown:!0,autoInsertDialCode:!1,autoPlaceholder:"polite",countrySearch:!0,containerClass:"",customPlaceholder:null,defaultToFirstCountry:!0,dropdownContainer:null,excludeCountries:[],fixDropdownWidth:!0,formatAsYouType:!0,formatOnDisplay:!0,geoIpLookup:null,hiddenInput:null,i18n:{},initialCountry:"",nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",preferredCountries:[],showFlags:!0,showSelectedDialCode:!1,useFullscreenPopup:"undefined"!=typeof navigator&&"undefined"!=typeof window&&(/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||window.innerWidth<=500),utilsScript:""},u=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"],v=function(a){var b=window.intlTelInputGlobals.instances;Object.values(b).forEach(function(b){return b[a]()})},w=function(){function c(b){var d=arguments.length>1&&arguments[1]!==a?arguments[1]:{};j(this,c),this.id=s++,this.a=b,this.b=null,this.c=null,this.d=Object.assign({},t,d),this.e=Boolean(b.getAttribute("placeholder"))}return l(c,[{key:"_init",value:function(){var a=this;this.d.useFullscreenPopup&&(this.d.fixDropdownWidth=!1),this.d.countrySearch&&!this.d.useFullscreenPopup&&(this.d.fixDropdownWidth=!0),this.d.nationalMode&&(this.d.autoInsertDialCode=!1),this.d.showSelectedDialCode&&(this.d.autoInsertDialCode=!1);var b=this.d.allowDropdown&&!this.d.showSelectedDialCode;if(!this.d.showFlags&&b&&(this.d.showFlags=!0),this.d.useFullscreenPopup&&!this.d.dropdownContainer&&(this.d.dropdownContainer=document.body),this.isRTL=!!this.a.closest("[dir=rtl]"),"undefined"!=typeof Promise){var c=new Promise(function(b,c){a.h=b,a.i=c}),d=new Promise(function(b,c){a.i0=b,a.i1=c});this.promise=Promise.all([c,d])}else this.h=this.i=function(){},this.i0=this.i1=function(){};this.s={},this._b(),this._f(),this._h(),this._i(),this._i3()}},{key:"_b",value:function(){this._d(),this._d2(),this._e(),this._d0(),(this.d.onlyCountries.length||this.d.i18n)&&this.p.sort(this._d1)}},{key:"_c",value:function(b,c,d){c.length>this.dialCodeMaxLen&&(this.dialCodeMaxLen=c.length),this.q.hasOwnProperty(c)||(this.q[c]=[]);for(var e=0;e<this.q[c].length;e++)if(this.q[c][e]===b)return;var f=d!==a?d:this.q[c].length;this.q[c][f]=b}},{key:"_d",value:function(){if(this.d.onlyCountries.length){var a=this.d.onlyCountries.map(function(a){return a.toLowerCase()});this.p=o.filter(function(b){return a.indexOf(b.iso2)>-1})}else if(this.d.excludeCountries.length){var b=this.d.excludeCountries.map(function(a){return a.toLowerCase()});this.p=o.filter(function(a){return-1===b.indexOf(a.iso2)})}else this.p=o}},{key:"_d0",value:function(){for(var a=0;a<this.p.length;a++){var b=this.p[a].iso2.toLowerCase();this.d.i18n.hasOwnProperty(b)&&(this.p[a].name=this.d.i18n[b])}}},{key:"_d1",value:function(a,b){return a.name<b.name?-1:a.name>b.name?1:0}},{key:"_d2",value:function(){this.dialCodes={},this.dialCodeMaxLen=0,this.q={};for(var a=0;a<this.p.length;a++){var b=this.p[a];this.dialCodes[b.dialCode]||(this.dialCodes[b.dialCode]=!0),this._c(b.iso2,b.dialCode,b.priority)}for(var c=0;c<this.p.length;c++){var d=this.p[c];if(d.areaCodes)for(var e=this.q[d.dialCode][0],f=0;f<d.areaCodes.length;f++){for(var g=d.areaCodes[f],h=1;h<g.length;h++){var i=d.dialCode+g.substr(0,h);this._c(e,i),this._c(d.iso2,i)}this._c(d.iso2,d.dialCode+g)}}}},{key:"_e",value:function(){this.preferredCountries=[];for(var a=0;a<this.d.preferredCountries.length;a++){var b=this.d.preferredCountries[a].toLowerCase(),c=this._y(b,!0);c&&this.preferredCountries.push(c)}}},{key:"_e2",value:function(a,b,c){var e=document.createElement(a);return b&&Object.entries(b).forEach(function(a){var b=d(a,2),c=b[0],f=b[1];return e.setAttribute(c,f)}),c&&c.appendChild(e),e}},{key:"_f",value:function(){this.a.classList.add("iti__tel-input"),this.a.hasAttribute("autocomplete")||this.a.form&&this.a.form.hasAttribute("autocomplete")||this.a.setAttribute("autocomplete","off");var a=this.d,c=a.allowDropdown,d=a.showSelectedDialCode,e=a.showFlags,f=a.containerClass,g=a.hiddenInput,h=a.dropdownContainer,i=a.fixDropdownWidth,j=a.useFullscreenPopup,k=a.countrySearch,l="iti";c&&(l+=" iti--allow-dropdown"),d&&(l+=" iti--show-selected-dial-code"),e&&(l+=" iti--show-flags"),f&&(l+=" ".concat(f)),j||(l+=" iti--inline-dropdown");var m=this._e2("div",{"class":l});this.a.parentNode.insertBefore(m,this.a);var n=c||e||d;if(n&&(this.k=this._e2("div",{"class":"iti__flag-container"},m)),m.appendChild(this.a),n&&(this.selectedFlag=this._e2("div",b({"class":"iti__selected-flag"},c&&{role:"combobox","aria-haspopup":"listbox","aria-controls":"iti-".concat(this.id,"__country-listbox"),"aria-expanded":"false","aria-label":this.d.i18n.selectedCountryAriaLabel||"Selected country"}),this.k)),e&&(this.l=this._e2("div",{"class":"iti__flag"},this.selectedFlag)),this.selectedFlag&&this.a.disabled&&this.selectedFlag.setAttribute("aria-disabled","true"),d&&(this.t=this._e2("div",{"class":"iti__selected-dial-code"},this.selectedFlag)),c){this.a.disabled||this.selectedFlag.setAttribute("tabindex","0"),this.u=this._e2("div",{"class":"iti__arrow"},this.selectedFlag);var o=i?"":"iti--flexible-dropdown-width";if(this.dropdownContent=this._e2("div",{"class":"iti__dropdown-content iti__hide ".concat(o)}),k&&(this.searchInput=this._e2("input",{type:"text","class":"iti__search-input",placeholder:this.d.i18n.searchPlaceholder||"Search"},this.dropdownContent)),this.countryList=this._e2("ul",{"class":"iti__country-list",id:"iti-".concat(this.id,"__country-listbox"),role:"listbox","aria-label":this.d.i18n.countryListAriaLabel||"List of countries"},this.dropdownContent),this.preferredCountries.length&&!k&&(this._g(this.preferredCountries,"iti__preferred",!0),this._e2("li",{"class":"iti__divider","aria-hidden":"true"},this.countryList)),this._g(this.p,"iti__standard"),h){var p="iti iti--container";p+=j?" iti--fullscreen-popup":" iti--inline-dropdown",k&&(p+=" iti--country-search"),this.dropdown=this._e2("div",{"class":p}),this.dropdown.appendChild(this.dropdownContent)}else this.k.appendChild(this.dropdownContent)}if(g){var q,r,s=this.a.getAttribute("name"),t=g(s),u=null!==t&&"object"==typeof t;if(u?(q=t.phone||s,r=t.country||"".concat(q,"_country")):(q=t||s,r="".concat(q,"_country")),!q)return;this.hiddenInput=this._e2("input",{type:"hidden",name:q}),this.hiddenInputCountry=this._e2("input",{type:"hidden",name:r}),m.appendChild(this.hiddenInput),m.appendChild(this.hiddenInputCountry)}}},{key:"_g",value:function(a,b,c){for(var d=0;d<a.length;d++){var e=a[d],f=c?"-preferred":"",g=this._e2("li",{id:"iti-".concat(this.id,"__item-").concat(e.iso2).concat(f),"class":"iti__country ".concat(b),tabindex:"-1",role:"option","data-dial-code":e.dialCode,"data-country-code":e.iso2,"aria-selected":"false"},this.countryList);e.nodeById[this.id]=g;var h="";this.d.showFlags&&(h+="<div class='iti__flag-box'><div class='iti__flag iti__".concat(e.iso2,"'></div></div>")),h+="<span class='iti__country-name'>".concat(e.name,"</span>"),h+="<span class='iti__dial-code'>+".concat(e.dialCode,"</span>"),g.insertAdjacentHTML("beforeend",h)}}},{key:"_h",value:function(){var b=arguments.length>0&&arguments[0]!==a&&arguments[0],c=this.a.getAttribute("value"),d=this.a.value,e=c&&"+"===c.charAt(0)&&(!d||"+"!==d.charAt(0)),f=e?c:d,g=this._5(f),h=this._w(f),i=this.d,j=i.initialCountry,k=i.autoInsertDialCode,l=i.defaultToFirstCountry;if(g&&!h)this._v(f);else if("auto"!==j||b){var m=j?j.toLowerCase():"",n=m&&this._y(m,!0);n?this._z(m):g&&h?this._z("us"):l&&!f?(this.j=this.preferredCountries.length?this.preferredCountries[0].iso2:this.p[0].iso2,this._z(this.j)):this._z(),!f&&k&&(this.a.value="+".concat(this.s.dialCode))}f&&this._u(f)}},{key:"_i",value:function(){this._j(),this.d.autoInsertDialCode&&this._l(),this.d.allowDropdown&&this._i2(),this.hiddenInput&&this._i0()}},{key:"_i0",value:function(){var a=this;this._a14=function(){a.hiddenInput.value=a.getNumber(),a.hiddenInputCountry.value=a.getSelectedCountryData().iso2},this.a.form&&this.a.form.addEventListener("submit",this._a14)}},{key:"_i2",value:function(){var a=this;this._a9=function(b){a.dropdownContent.classList.contains("iti__hide")?a.a.focus():b.preventDefault()};var b=this.a.closest("label");b&&b.addEventListener("click",this._a9),this._a10=function(){!a.dropdownContent.classList.contains("iti__hide")||a.a.disabled||a.a.readOnly||a._n()},this.selectedFlag.addEventListener("click",this._a10),this._a11=function(b){a.dropdownContent.classList.contains("iti__hide")&&["ArrowUp","ArrowDown"," ","Enter"].includes(b.key)&&(b.preventDefault(),b.stopPropagation(),a._n()),"Tab"===b.key&&a._2()},this.k.addEventListener("keydown",this._a11)}},{key:"_i3",value:function(){var a=this;this.d.utilsScript&&!window.intlTelInputUtils?window.intlTelInputGlobals.documentReady()?window.intlTelInputGlobals.loadUtils(this.d.utilsScript):window.addEventListener("load",function(){window.intlTelInputGlobals.loadUtils(a.d.utilsScript)}):this.i0(),"auto"!==this.d.initialCountry||this.s.iso2?this.h():this._i4()}},{key:"_i4",value:function(){var b=this;window.intlTelInputGlobals.autoCountry?this.handleAutoCountry():window.intlTelInputGlobals.startedLoadingAutoCountry||(window.intlTelInputGlobals.startedLoadingAutoCountry=!0,"function"==typeof this.d.geoIpLookup&&this.d.geoIpLookup(function(){var c=arguments.length>0&&arguments[0]!==a?arguments[0]:"",d=c.toLowerCase();d&&b._y(d,!0)?(window.intlTelInputGlobals.autoCountry=d,setTimeout(function(){return v("handleAutoCountry")})):(b._h(!0),v("rejectAutoCountryPromise"))},function(){return v("rejectAutoCountryPromise")}))}},{key:"_j",value:function(){var a=this,b=!1;this._a12=function(c){if(a._v(a.a.value)&&a._m2CountryChange(),c&&c.data&&/[^+0-9]/.test(c.data)?b=!0:/[^+0-9]/.test(a.a.value)||(b=!1),a.d.formatAsYouType&&!b){var d=a.a.selectionStart,e=a.a.value.substring(0,d),f=e.replace(/[^+0-9]/g,"").length,g=c&&"deleteContentForward"===c.inputType,h=a._formatNumberAsYouType(),i=a._translateCursorPosition(f,h,d,g);a.a.value=h,a.a.setSelectionRange(i,i)}},this.a.addEventListener("input",this._a12),this._a13=function(){setTimeout(a._a12)},this.a.addEventListener("cut",this._a13),this.a.addEventListener("paste",this._a13)}},{key:"_translateCursorPosition",value:function(a,b,c,d){if(0===c&&!d)return 0;for(var e=0,f=0;f<b.length;f++){if(/[+0-9]/.test(b[f])&&e++,e===a&&!d)return f+1;if(d&&e===a+1)return f}return b.length}},{key:"_j2",value:function(a){var b=this.a.getAttribute("maxlength");return b&&a.length>b?a.substr(0,b):a}},{key:"_l",value:function(){var a=this;this._a8=function(){a._l2()},this.a.form&&this.a.form.addEventListener("submit",this._a8),this.a.addEventListener("blur",this._a8)}},{key:"_l2",value:function(){if("+"===this.a.value.charAt(0)){var a=this._m(this.a.value);a&&this.s.dialCode!==a||(this.a.value="")}}},{key:"_m",value:function(a){return a.replace(/\D/g,"")}},{key:"_m2",value:function(a){var b=new Event(a,{bubbles:!0,cancelable:!0});this.a.dispatchEvent(b)}},{key:"_n",value:function(){if(this.d.fixDropdownWidth&&(this.dropdownContent.style.width="".concat(this.a.offsetWidth,"px")),this.dropdownContent.classList.remove("iti__hide"),this.selectedFlag.setAttribute("aria-expanded","true"),this._o(),this.d.countrySearch){var a=this.countryList.firstElementChild;a&&this._x(a,!1),this.searchInput.focus()}else this.b&&(this._x(this.b,!1),this._3(this.b,!0));this._p(),this.u.classList.add("iti__arrow--up"),this._m2("open:countrydropdown")}},{key:"_n2",value:function(a,b,c){c&&!a.classList.contains(b)?a.classList.add(b):!c&&a.classList.contains(b)&&a.classList.remove(b)}},{key:"_o",value:function(){var a=this;if(this.d.dropdownContainer&&this.d.dropdownContainer.appendChild(this.dropdown),!this.d.useFullscreenPopup){var b=this.a.getBoundingClientRect(),c=document.documentElement.scrollTop,d=b.top+c,e=this.dropdownContent.offsetHeight,f=d+this.a.offsetHeight+e<c+window.innerHeight,g=d-e>c,h=!this.d.countrySearch&&!f&&g;if(this._n2(this.dropdownContent,"iti__dropdown-content--dropup",h),this.d.dropdownContainer){var i=h?0:this.a.offsetHeight;this.dropdown.style.top="".concat(d+i,"px"),this.dropdown.style.left="".concat(b.left+document.body.scrollLeft,"px"),this._a4=function(){return a._2()},window.addEventListener("scroll",this._a4)}}}},{key:"_p",value:function(){var a=this;this._a0=function(b){var c=b.target.closest(".iti__country");c&&a._x(c,!1)},this.countryList.addEventListener("mouseover",this._a0),this._a1=function(b){var c=b.target.closest(".iti__country");c&&a._1(c)},this.countryList.addEventListener("click",this._a1);var b=!0;this._a2=function(){b||a._2(),b=!1},document.documentElement.addEventListener("click",this._a2);var c="",d=null;if(this._a3=function(b){["ArrowUp","ArrowDown","Enter","Escape"].includes(b.key)&&(b.preventDefault(),b.stopPropagation(),"ArrowUp"===b.key||"ArrowDown"===b.key?a._q(b.key):"Enter"===b.key?a._r():"Escape"===b.key&&a._2()),!a.d.countrySearch&&/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(b.key)&&(b.stopPropagation(),d&&clearTimeout(d),c+=b.key.toLowerCase(),a._s(c),d=setTimeout(function(){c=""},1e3))},document.addEventListener("keydown",this._a3),this.d.countrySearch){var e=function(){var b=a.searchInput.value.trim();b?a._filterCountries(b):a._filterCountries("",!0)},f=null;this._handleSearchChange=function(){f&&clearTimeout(f),f=setTimeout(function(){e(),f=null},100)},this.searchInput.addEventListener("input",this._handleSearchChange),this.searchInput.addEventListener("click",function(a){return a.stopPropagation()})}}},{key:"_normaliseString",value:function(){return(arguments.length>0&&arguments[0]!==a?arguments[0]:"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}},{key:"_filterCountries",value:function(b){var c=arguments.length>1&&arguments[1]!==a&&arguments[1],d=!0;this.countryList.innerHTML="";for(var e=this._normaliseString(b),f=0;f<this.p.length;f++){var g=this.p[f],h=this._normaliseString(g.name),i="+".concat(g.dialCode);(c||h.includes(e)||i.includes(e)||g.iso2.includes(e))&&(this.countryList.appendChild(g.nodeById[this.id]),d&&(this._x(g.nodeById[this.id],!1),d=!1))}}},{key:"_q",value:function(a){var b="ArrowUp"===a?this.c.previousElementSibling:this.c.nextElementSibling;if(b?b.classList.contains("iti__divider")&&(b="ArrowUp"===a?b.previousElementSibling:b.nextElementSibling):this.countryList.childElementCount>1&&(b="ArrowUp"===a?this.countryList.lastElementChild:this.countryList.firstElementChild),b){var c=!this.d.countrySearch;this._x(b,c),this.d.countrySearch&&this._3(b,!1)}}},{key:"_r",value:function(){this.c&&this._1(this.c)}},{key:"_s",value:function(a){for(var b=0;b<this.p.length;b++)if(this._t(this.p[b].name,a)){var c=this.p[b].nodeById[this.id];this._x(c,!1),this._3(c,!0);break}}},{key:"_t",value:function(a,b){return a.substr(0,b.length).toLowerCase()===b}},{key:"_u",value:function(a){var b=a;if(this.d.formatOnDisplay&&window.intlTelInputUtils&&this.s){var c=this.d.nationalMode||"+"!==b.charAt(0)&&!this.d.showSelectedDialCode,d=intlTelInputUtils.numberFormat,e=d.NATIONAL,f=d.INTERNATIONAL,g=c?e:f;b=intlTelInputUtils.formatNumber(b,this.s.iso2,g)}b=this._7(b),this.a.value=b}},{key:"_v",value:function(a){var b=a.indexOf("+"),c=b?a.substring(b):a,d=this.s.dialCode,e="1"===d;c&&e&&"+"!==c.charAt(0)&&("1"!==c.charAt(0)&&(c="1".concat(c)),c="+".concat(c)),this.d.showSelectedDialCode&&d&&"+"!==c.charAt(0)&&(c="+".concat(d).concat(c));var f=this._5(c,!0),g=this._m(c),h=null;if(f){var i=this.q[this._m(f)],j=-1!==i.indexOf(this.s.iso2)&&g.length<=f.length-1;if(!("1"===d&&this._w(g))&&!j)for(var k=0;k<i.length;k++)if(i[k]){h=i[k];break}}else"+"===c.charAt(0)&&g.length?h="":c&&"+"!==c||this.s.iso2||(h=this.j);return null!==h&&this._z(h)}},{key:"_w",value:function(a){var b=this._m(a);if("1"===b.charAt(0)){var c=b.substr(1,3);return-1!==u.indexOf(c)}return!1}},{key:"_x",value:function(a,b){var c=this.c;c&&c.classList.remove("iti__highlight"),this.c=a,this.c.classList.add("iti__highlight"),this.selectedFlag.setAttribute("aria-activedescendant",a.getAttribute("id")),b&&this.c.focus()}},{key:"_y",value:function(a,b){for(var c=0;c<this.p.length;c++)if(this.p[c].iso2===a)return this.p[c];if(b)return null;throw new Error("No country data for '".concat(a,"'"))}},{key:"_z",value:function(a){var b=this.d,c=b.allowDropdown,d=b.showSelectedDialCode,e=b.showFlags,f=b.countrySearch,g=this.s.iso2?this.s:{};if(this.s=a?this._y(a,!1):{},this.s.iso2&&(this.j=this.s.iso2),e){var h=a?"iti__".concat(a):"iti__globe";this.l.setAttribute("class","iti__flag ".concat(h))}if(this._setSelectedCountryFlagTitleAttribute(a,d),d){var i=this.s.dialCode?"+".concat(this.s.dialCode):"";this.t.innerHTML=i;var j=this.selectedFlag.offsetWidth||this._z2();this.isRTL?this.a.style.paddingRight="".concat(j+6,"px"):this.a.style.paddingLeft="".concat(j+6,"px")}if(this._0(),c&&!f){var k=this.b;if(k&&(k.classList.remove("iti__active"),k.setAttribute("aria-selected","false")),a){var l=this.countryList.querySelector("#iti-".concat(this.id,"__item-").concat(a,"-preferred"))||this.countryList.querySelector("#iti-".concat(this.id,"__item-").concat(a));l.setAttribute("aria-selected","true"),l.classList.add("iti__active"),this.b=l}}return g.iso2!==a}},{key:"_setSelectedCountryFlagTitleAttribute",value:function(a,b){if(this.selectedFlag){var c;c=a&&!b?"".concat(this.s.name,": +").concat(this.s.dialCode):a?this.s.name:"Unknown",this.selectedFlag.setAttribute("title",c)}}},{key:"_z2",value:function(){var a=this.a.parentNode.cloneNode();a.style.visibility="hidden",document.body.appendChild(a);var b=this.k.cloneNode();a.appendChild(b);var c=this.selectedFlag.cloneNode(!0);b.appendChild(c);var d=c.offsetWidth;return a.parentNode.removeChild(a),d}},{key:"_0",value:function(){var a="aggressive"===this.d.autoPlaceholder||!this.e&&"polite"===this.d.autoPlaceholder;if(window.intlTelInputUtils&&a){var b=intlTelInputUtils.numberType[this.d.placeholderNumberType],c=this.s.iso2?intlTelInputUtils.getExampleNumber(this.s.iso2,this.d.nationalMode,b):"";c=this._7(c),"function"==typeof this.d.customPlaceholder&&(c=this.d.customPlaceholder(c,this.s)),this.a.setAttribute("placeholder",c)}}},{
8
- key:"_1",value:function(a){var b=this._z(a.getAttribute("data-country-code"));this._2(),this._4(a.getAttribute("data-dial-code")),this.a.focus(),b&&this._m2CountryChange()}},{key:"_2",value:function(){this.dropdownContent.classList.add("iti__hide"),this.selectedFlag.setAttribute("aria-expanded","false"),this.selectedFlag.removeAttribute("aria-activedescendant"),this.u.classList.remove("iti__arrow--up"),document.removeEventListener("keydown",this._a3),this.d.countrySearch&&this.searchInput.removeEventListener("input",this._handleSearchChange),document.documentElement.removeEventListener("click",this._a2),this.countryList.removeEventListener("mouseover",this._a0),this.countryList.removeEventListener("click",this._a1),this.d.dropdownContainer&&(this.d.useFullscreenPopup||window.removeEventListener("scroll",this._a4),this.dropdown.parentNode&&this.dropdown.parentNode.removeChild(this.dropdown)),this._m2("close:countrydropdown")}},{key:"_3",value:function(a,b){var c=this.countryList,d=document.documentElement.scrollTop,e=c.offsetHeight,f=c.getBoundingClientRect().top+d,g=f+e,h=a.offsetHeight,i=a.getBoundingClientRect().top+d,j=i+h,k=i-f+c.scrollTop,l=e/2-h/2;if(i<f)b&&(k-=l),c.scrollTop=k;else if(j>g){b&&(k+=l);var m=e-h;c.scrollTop=k-m}}},{key:"_4",value:function(a){var b,c=this.a.value,d="+".concat(a);if("+"===c.charAt(0)){var e=this._5(c);b=e?c.replace(e,d):d,this.a.value=b}else this.d.autoInsertDialCode&&(b=c?d+c:d,this.a.value=b)}},{key:"_5",value:function(a,b){var c="";if("+"===a.charAt(0))for(var d="",e=0;e<a.length;e++){var f=a.charAt(e);if(!isNaN(parseInt(f,10))){if(d+=f,b)this.q[d]&&(c=a.substr(0,e+1));else if(this.dialCodes[d]){c=a.substr(0,e+1);break}if(d.length===this.dialCodeMaxLen)break}}return c}},{key:"_6",value:function(){var a=this.a.value.trim(),b=this.s.dialCode,c=this._m(a);return(this.d.showSelectedDialCode&&!this.d.nationalMode&&"+"!==a.charAt(0)&&b&&c?"+".concat(b):"")+a}},{key:"_7",value:function(a){var b=a;if(this.d.showSelectedDialCode){var c=this._5(b);if(c){c="+".concat(this.s.dialCode);var d=" "===b[c.length]||"-"===b[c.length]?c.length+1:c.length;b=b.substr(d)}}return this._j2(b)}},{key:"_m2CountryChange",value:function(){this._m2("countrychange")}},{key:"_formatNumberAsYouType",value:function(){var a=this._6(),b=window.intlTelInputUtils?intlTelInputUtils.formatNumberAsYouType(a,this.s.iso2):a,c=this.s.dialCode;if(this.d.showSelectedDialCode&&!this.d.nationalMode&&"+"!==this.a.value.charAt(0)&&b.includes("+".concat(c))){return(b.split("+".concat(c))[1]||"").trim()}return b}},{key:"handleAutoCountry",value:function(){"auto"===this.d.initialCountry&&(this.j=window.intlTelInputGlobals.autoCountry,this.a.value||this.setCountry(this.j),this.h())}},{key:"handleUtils",value:function(){window.intlTelInputUtils&&(this.a.value&&this._u(this.a.value),this._0()),this.i0()}},{key:"destroy",value:function(){var a=this.a.form;if(this.d.allowDropdown){this._2(),this.selectedFlag.removeEventListener("click",this._a10),this.k.removeEventListener("keydown",this._a11);var b=this.a.closest("label");b&&b.removeEventListener("click",this._a9)}this.hiddenInput&&a&&a.removeEventListener("submit",this._a14),this.d.autoInsertDialCode&&(a&&a.removeEventListener("submit",this._a8),this.a.removeEventListener("blur",this._a8)),this.a.removeEventListener("input",this._a12),this.a.removeEventListener("cut",this._a13),this.a.removeEventListener("paste",this._a13),this.a.removeAttribute("data-intl-tel-input-id");var c=this.a.parentNode;c.parentNode.insertBefore(this.a,c),c.parentNode.removeChild(c),delete window.intlTelInputGlobals.instances[this.id]}},{key:"getExtension",value:function(){return window.intlTelInputUtils?intlTelInputUtils.getExtension(this._6(),this.s.iso2):""}},{key:"getNumber",value:function(a){if(window.intlTelInputUtils){var b=this.s.iso2;return intlTelInputUtils.formatNumber(this._6(),b,a)}return""}},{key:"getNumberType",value:function(){return window.intlTelInputUtils?intlTelInputUtils.getNumberType(this._6(),this.s.iso2):-99}},{key:"getSelectedCountryData",value:function(){return this.s}},{key:"getValidationError",value:function(){if(window.intlTelInputUtils){var a=this.s.iso2;return intlTelInputUtils.getValidationError(this._6(),a)}return-99}},{key:"isValidNumber",value:function(){var a=this._6();return window.intlTelInputUtils?intlTelInputUtils.isPossibleNumber(a,this.s.iso2):null}},{key:"isValidNumberPrecise",value:function(){var a=this._6();return window.intlTelInputUtils?intlTelInputUtils.isValidNumber(a,this.s.iso2):null}},{key:"setCountry",value:function(a){var b=a.toLowerCase();this.s.iso2!==b&&(this._z(b),this._4(this.s.dialCode),this._m2CountryChange())}},{key:"setNumber",value:function(a){var b=this._v(a);this._u(a),b&&this._m2CountryChange()}},{key:"setPlaceholderNumberType",value:function(a){this.d.placeholderNumberType=a,this._0()}}]),c}();r.getCountryData=function(){return o};var x=function(a,b,c){var d=document.createElement("script");d.onload=function(){v("handleUtils"),b&&b()},d.onerror=function(){v("rejectUtilsScriptPromise"),c&&c()},d.className="iti-load-utils",d.async=!0,d.src=a,document.body.appendChild(d)};return r.loadUtils=function(a){if(!window.intlTelInputUtils&&!window.intlTelInputGlobals.startedLoadingUtilsScript){if(window.intlTelInputGlobals.startedLoadingUtilsScript=!0,"undefined"!=typeof Promise)return new Promise(function(b,c){return x(a,b,c)});x(a)}return null},r.defaults=t,r.version="19.5.4",function(a,b){var c=new w(a,b);return c._init(),a.setAttribute("data-intl-tel-input-id",c.id),window.intlTelInputGlobals.instances[c.id]=c,c}}()});
8
+ key:"_1",value:function(a){var b=this._z(a.getAttribute("data-country-code"));this._2(),this._4(a.getAttribute("data-dial-code")),this.a.focus(),b&&this._m2CountryChange()}},{key:"_2",value:function(){this.dropdownContent.classList.add("iti__hide"),this.selectedFlag.setAttribute("aria-expanded","false"),this.selectedFlag.removeAttribute("aria-activedescendant"),this.u.classList.remove("iti__arrow--up"),document.removeEventListener("keydown",this._a3),this.d.countrySearch&&this.searchInput.removeEventListener("input",this._handleSearchChange),document.documentElement.removeEventListener("click",this._a2),this.countryList.removeEventListener("mouseover",this._a0),this.countryList.removeEventListener("click",this._a1),this.d.dropdownContainer&&(this.d.useFullscreenPopup||window.removeEventListener("scroll",this._a4),this.dropdown.parentNode&&this.dropdown.parentNode.removeChild(this.dropdown)),this._m2("close:countrydropdown")}},{key:"_3",value:function(a,b){var c=this.countryList,d=document.documentElement.scrollTop,e=c.offsetHeight,f=c.getBoundingClientRect().top+d,g=f+e,h=a.offsetHeight,i=a.getBoundingClientRect().top+d,j=i+h,k=i-f+c.scrollTop,l=e/2-h/2;if(i<f)b&&(k-=l),c.scrollTop=k;else if(j>g){b&&(k+=l);var m=e-h;c.scrollTop=k-m}}},{key:"_4",value:function(a){var b,c=this.a.value,d="+".concat(a);if("+"===c.charAt(0)){var e=this._5(c);b=e?c.replace(e,d):d,this.a.value=b}else this.d.autoInsertDialCode&&(b=c?d+c:d,this.a.value=b)}},{key:"_5",value:function(a,b){var c="";if("+"===a.charAt(0))for(var d="",e=0;e<a.length;e++){var f=a.charAt(e);if(!isNaN(parseInt(f,10))){if(d+=f,b)this.q[d]&&(c=a.substr(0,e+1));else if(this.dialCodes[d]){c=a.substr(0,e+1);break}if(d.length===this.dialCodeMaxLen)break}}return c}},{key:"_6",value:function(){var a=this.a.value.trim(),b=this.s.dialCode,c=this._m(a);return(this.d.showSelectedDialCode&&!this.d.nationalMode&&"+"!==a.charAt(0)&&b&&c?"+".concat(b):"")+a}},{key:"_7",value:function(a){var b=a;if(this.d.showSelectedDialCode){var c=this._5(b);if(c){c="+".concat(this.s.dialCode);var d=" "===b[c.length]||"-"===b[c.length]?c.length+1:c.length;b=b.substr(d)}}return this._j2(b)}},{key:"_m2CountryChange",value:function(){this._m2("countrychange")}},{key:"_formatNumberAsYouType",value:function(){var a=this._6(),b=window.intlTelInputUtils?intlTelInputUtils.formatNumberAsYouType(a,this.s.iso2):a,c=this.s.dialCode;if(this.d.showSelectedDialCode&&!this.d.nationalMode&&"+"!==this.a.value.charAt(0)&&b.includes("+".concat(c))){return(b.split("+".concat(c))[1]||"").trim()}return b}},{key:"handleAutoCountry",value:function(){"auto"===this.d.initialCountry&&(this.j=window.intlTelInputGlobals.autoCountry,this.a.value||this.setCountry(this.j),this.h())}},{key:"handleUtils",value:function(){window.intlTelInputUtils&&(this.a.value&&this._u(this.a.value),this._0()),this.i0()}},{key:"destroy",value:function(){var a=this.a.form;if(this.d.allowDropdown){this._2(),this.selectedFlag.removeEventListener("click",this._a10),this.k.removeEventListener("keydown",this._a11);var b=this.a.closest("label");b&&b.removeEventListener("click",this._a9)}this.hiddenInput&&a&&a.removeEventListener("submit",this._a14),this.d.autoInsertDialCode&&(a&&a.removeEventListener("submit",this._a8),this.a.removeEventListener("blur",this._a8)),this.a.removeEventListener("input",this._a12),this.a.removeEventListener("cut",this._a13),this.a.removeEventListener("paste",this._a13),this.a.removeAttribute("data-intl-tel-input-id");var c=this.a.parentNode;c.parentNode.insertBefore(this.a,c),c.parentNode.removeChild(c),delete window.intlTelInputGlobals.instances[this.id]}},{key:"getExtension",value:function(){return window.intlTelInputUtils?intlTelInputUtils.getExtension(this._6(),this.s.iso2):""}},{key:"getNumber",value:function(a){if(window.intlTelInputUtils){var b=this.s.iso2;return intlTelInputUtils.formatNumber(this._6(),b,a)}return""}},{key:"getNumberType",value:function(){return window.intlTelInputUtils?intlTelInputUtils.getNumberType(this._6(),this.s.iso2):-99}},{key:"getSelectedCountryData",value:function(){return this.s}},{key:"getValidationError",value:function(){if(window.intlTelInputUtils){var a=this.s.iso2;return intlTelInputUtils.getValidationError(this._6(),a)}return-99}},{key:"isValidNumber",value:function(a){var b=this._6();return window.intlTelInputUtils?intlTelInputUtils.isPossibleNumber(b,this.s.iso2,a):null}},{key:"isValidNumberPrecise",value:function(){var a=this._6();return window.intlTelInputUtils?intlTelInputUtils.isValidNumber(a,this.s.iso2):null}},{key:"setCountry",value:function(a){var b=a.toLowerCase();this.s.iso2!==b&&(this._z(b),this._4(this.s.dialCode),this._m2CountryChange())}},{key:"setNumber",value:function(a){var b=this._v(a);this._u(a),b&&this._m2CountryChange()}},{key:"setPlaceholderNumberType",value:function(a){this.d.placeholderNumberType=a,this._0()}}]),c}();r.getCountryData=function(){return o};var x=function(a,b,c){var d=document.createElement("script");d.onload=function(){v("handleUtils"),b&&b()},d.onerror=function(){v("rejectUtilsScriptPromise"),c&&c()},d.className="iti-load-utils",d.async=!0,d.src=a,document.body.appendChild(d)};return r.loadUtils=function(a){if(!window.intlTelInputUtils&&!window.intlTelInputGlobals.startedLoadingUtilsScript){if(window.intlTelInputGlobals.startedLoadingUtilsScript=!0,"undefined"!=typeof Promise)return new Promise(function(b,c){return x(a,b,c)});x(a)}return null},r.defaults=t,r.version="19.5.6",function(a,b){var c=new w(a,b);return c._init(),a.setAttribute("data-intl-tel-input-id",c.id),window.intlTelInputGlobals.instances[c.id]=c,c}}()});
package/build/js/utils.js CHANGED
@@ -3,9 +3,9 @@
3
3
  Copyright The Closure Library Authors.
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- var aa=this||self;function k(a,b){a=a.split(".");var c=aa;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b}function m(a,b){function c(){}c.prototype=b.prototype;a.ma=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.sa=function(d,f,e){for(var g=Array(arguments.length-2),h=2;h<arguments.length;h++)g[h-2]=arguments[h];return b.prototype[f].apply(d,g)}};function ca(a){const b=[];let c=0;for(const d in a)b[c++]=a[d];return b};function da(a,b){this.g=a;this.l=!!b.aa;this.h=b.i;this.s=b.type;this.o=!1;switch(this.h){case ea:case fa:case ha:case ia:case ja:case ka:case la:this.o=!0}this.j=b.defaultValue}var la=1,ka=2,ea=3,fa=4,ha=6,ia=16,ja=18;function ma(a,b){this.h=a;this.g={};for(a=0;a<b.length;a++){var c=b[a];this.g[c.g]=c}}function na(a){a=ca(a.g);a.sort(function(b,c){return b.g-c.g});return a};function n(){this.h={};this.j=this.m().g;this.g=this.l=null}n.prototype.has=function(a){return p(this,a.g)};n.prototype.get=function(a,b){return q(this,a.g,b)};n.prototype.set=function(a,b){r(this,a.g,b)};n.prototype.add=function(a,b){oa(this,a.g,b)};
7
- function pa(a,b){for(var c=na(a.m()),d=0;d<c.length;d++){var f=c[d],e=f.g;if(p(b,e)){a.g&&delete a.g[f.g];var g=11==f.h||10==f.h;if(f.l){f=t(b,e);for(var h=0;h<f.length;h++)oa(a,e,g?f[h].clone():f[h])}else f=u(b,e),g?(g=u(a,e))?pa(g,f):r(a,e,f.clone()):r(a,e,f)}}}n.prototype.clone=function(){var a=new this.constructor;a!=this&&(a.h={},a.g&&(a.g={}),pa(a,this));return a};function p(a,b){return null!=a.h[b]}
8
- function u(a,b){var c=a.h[b];if(null==c)return null;if(a.l){if(!(b in a.g)){var d=a.l,f=a.j[b];if(null!=c)if(f.l){for(var e=[],g=0;g<c.length;g++)e[g]=d.h(f,c[g]);c=e}else c=d.h(f,c);return a.g[b]=c}return a.g[b]}return c}function q(a,b,c){var d=u(a,b);return a.j[b].l?d[c||0]:d}function v(a,b){if(p(a,b))a=q(a,b);else a:{a=a.j[b];if(void 0===a.j)if(b=a.s,b===Boolean)a.j=!1;else if(b===Number)a.j=0;else if(b===String)a.j=a.o?"0":"";else{a=new b;break a}a=a.j}return a}
6
+ var aa=this||self;function k(a,b){a=a.split(".");var c=aa;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b}function m(a,b){function c(){}c.prototype=b.prototype;a.ma=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.sa=function(d,e,f){for(var g=Array(arguments.length-2),h=2;h<arguments.length;h++)g[h-2]=arguments[h];return b.prototype[e].apply(d,g)}};function ca(a){const b=[];let c=0;for(const d in a)b[c++]=a[d];return b};function da(a,b){this.g=a;this.l=!!b.aa;this.h=b.i;this.s=b.type;this.o=!1;switch(this.h){case ea:case fa:case ha:case ia:case ja:case ka:case la:this.o=!0}this.j=b.defaultValue}var la=1,ka=2,ea=3,fa=4,ha=6,ia=16,ja=18;function ma(a,b){this.h=a;this.g={};for(a=0;a<b.length;a++){var c=b[a];this.g[c.g]=c}}function na(a){a=ca(a.g);a.sort(function(b,c){return b.g-c.g});return a};function n(){this.h={};this.j=this.m().g;this.g=this.l=null}n.prototype.has=function(a){return p(this,a.g)};n.prototype.get=function(a,b){return q(this,a.g,b)};n.prototype.set=function(a,b){r(this,a.g,b)};n.prototype.add=function(a,b){oa(this,a.g,b)};
7
+ function pa(a,b){for(var c=na(a.m()),d=0;d<c.length;d++){var e=c[d],f=e.g;if(p(b,f)){a.g&&delete a.g[e.g];var g=11==e.h||10==e.h;if(e.l){e=t(b,f);for(var h=0;h<e.length;h++)oa(a,f,g?e[h].clone():e[h])}else e=u(b,f),g?(g=u(a,f))?pa(g,e):r(a,f,e.clone()):r(a,f,e)}}}n.prototype.clone=function(){var a=new this.constructor;a!=this&&(a.h={},a.g&&(a.g={}),pa(a,this));return a};function p(a,b){return null!=a.h[b]}
8
+ function u(a,b){var c=a.h[b];if(null==c)return null;if(a.l){if(!(b in a.g)){var d=a.l,e=a.j[b];if(null!=c)if(e.l){for(var f=[],g=0;g<c.length;g++)f[g]=d.h(e,c[g]);c=f}else c=d.h(e,c);return a.g[b]=c}return a.g[b]}return c}function q(a,b,c){var d=u(a,b);return a.j[b].l?d[c||0]:d}function v(a,b){if(p(a,b))a=q(a,b);else a:{a=a.j[b];if(void 0===a.j)if(b=a.s,b===Boolean)a.j=!1;else if(b===Number)a.j=0;else if(b===String)a.j=a.o?"0":"";else{a=new b;break a}a=a.j}return a}
9
9
  function t(a,b){return u(a,b)||[]}function w(a,b){return a.j[b].l?p(a,b)?a.h[b].length:0:p(a,b)?1:0}function r(a,b,c){a.h[b]=c;a.g&&(a.g[b]=c)}function oa(a,b,c){a.h[b]||(a.h[b]=[]);a.h[b].push(c);a.g&&delete a.g[b]}function x(a,b){var c=[],d;for(d in b)0!=d&&c.push(new da(d,b[d]));return new ma(a,c)};function y(){}y.prototype.g=function(a){new a.h;throw Error("Unimplemented");};y.prototype.h=function(a,b){if(11==a.h||10==a.h)return b instanceof n?b:this.g(a.s.prototype.m(),b);if(14==a.h)return"string"===typeof b&&qa.test(b)&&(a=Number(b),0<a)?a:b;if(!a.o)return b;a=a.s;if(a===String){if("number"===typeof b)return String(b)}else if(a===Number&&"string"===typeof b&&("Infinity"===b||"-Infinity"===b||"NaN"===b||qa.test(b)))return Number(b);return b};var qa=/^-?[0-9]+$/;function z(){}m(z,y);z.prototype.g=function(a,b){a=new a.h;a.l=this;a.h=b;a.g={};return a};function A(){}m(A,z);A.prototype.h=function(a,b){return 8==a.h?!!b:y.prototype.h.apply(this,arguments)};A.prototype.g=function(a,b){return A.ma.g.call(this,a,b)};function B(a,b){null!=a&&this.g.apply(this,arguments)}B.prototype.h="";B.prototype.set=function(a){this.h=""+a};B.prototype.g=function(a,b,c){this.h+=String(a);if(null!=b)for(let d=1;d<arguments.length;d++)this.h+=arguments[d];return this};function C(a){a.h=""}B.prototype.toString=function(){return this.h};/*
10
10
 
11
11
  Protocol Buffer 2 Copyright 2008 Google Inc.
@@ -486,35 +486,35 @@ B:"2",C:"2",D:"3",E:"3",F:"3",G:"4",H:"4",I:"4",J:"5",K:"5",L:"5",M:"6",N:"6",O:
486
486
  Ga=RegExp("^([A-Za-z0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]+((\\-)*[A-Za-z0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9])*\\.)*[A-Za-z]+((\\-)*[A-Za-z0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9])*\\.?$");function M(a){return"([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]{1,"+a+"})"}
487
487
  function Ha(){return";ext="+M("20")+"|[ \u00a0\\t,]*(?:e?xt(?:ensi(?:o\u0301?|\u00f3))?n?|\uff45?\uff58\uff54\uff4e?|\u0434\u043e\u0431|anexo)[:\\.\uff0e]?[ \u00a0\\t,-]*"+(M("20")+"#?|[ \u00a0\\t,]*(?:[x\uff58#\uff03~\uff5e]|int|\uff49\uff4e\uff54)[:\\.\uff0e]?[ \u00a0\\t,-]*")+(M("9")+"#?|[- ]+")+(M("6")+"#|[ \u00a0\\t]*(?:,{2}|;)[:\\.\uff0e]?[ \u00a0\\t,-]*")+(M("15")+"#?|[ \u00a0\\t]*(?:,)+[:\\.\uff0e]?[ \u00a0\\t,-]*")+(M("9")+"#?")}
488
488
  var Ia=new RegExp("(?:"+Ha()+")$","i"),Ja=new RegExp("^[0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]{2}$|^[+\uff0b]*(?:[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\\[\\]/~\u2053\u223c\uff5e*]*[0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]){3,}[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\\[\\]/~\u2053\u223c\uff5e*A-Za-z0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]*(?:"+Ha()+")?$","i"),Ka=/(\$\d)/,
489
- La=/^\(?\$1\)?$/;function Ma(a){return 2>a.length?!1:N(Ja,a)}function Na(a){return N(Ea,a)?O(a,ya):O(a,K)}function Oa(a){var b=Na(a.toString());C(a);a.g(b)}function Pa(a){return null!=a&&(1!=w(a,9)||-1!=t(a,9)[0])}function O(a,b){for(var c=new B,d,f=a.length,e=0;e<f;++e)d=a.charAt(e),d=b[d.toUpperCase()],null!=d&&c.g(d);return c.toString()}function Qa(a){return 0==a.length||La.test(a)}function P(a){return null!=a&&isNaN(a)&&a.toUpperCase()in wa}
490
- function Ra(a,b,c){if(0==q(b,2)&&p(b,5)){var d=v(b,5);if(0<d.length)return d}d=v(b,1);var f=Q(b);if(0==c)return Sa(d,0,f,"");if(!(d in I))return f;a=R(a,d,S(d));b=p(b,3)&&0!=q(b,3).length?3==c?";ext="+q(b,3):p(a,13)?q(a,13)+v(b,3):" ext. "+v(b,3):"";a:{a=0==t(a,20).length||2==c?t(a,19):t(a,20);for(var e,g=a.length,h=0;h<g;++h){e=a[h];var l=w(e,3);if(0==l||0==f.search(q(e,3,l-1)))if(l=new RegExp(q(e,1)),N(l,f)){a=e;break a}}a=null}null!=a&&(g=a,a=v(g,2),e=new RegExp(q(g,1)),v(g,5),g=v(g,4),f=2==c&&
491
- null!=g&&0<g.length?f.replace(e,a.replace(Ka,g)):f.replace(e,a),3==c&&(f=f.replace(RegExp("^[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\\[\\]/~\u2053\u223c\uff5e]+"),""),f=f.replace(RegExp("[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\\[\\]/~\u2053\u223c\uff5e]+","g"),"-")));return Sa(d,c,f,b)}function R(a,b,c){return"001"==c?T(a,""+b):T(a,c)}
489
+ La=/^\(?\$1\)?$/;function Ma(a){return 2>a.length?!1:N(Ja,a)}function Na(a){return N(Ea,a)?O(a,ya):O(a,K)}function Oa(a){var b=Na(a.toString());C(a);a.g(b)}function Pa(a){return null!=a&&(1!=w(a,9)||-1!=t(a,9)[0])}function O(a,b){for(var c=new B,d,e=a.length,f=0;f<e;++f)d=a.charAt(f),d=b[d.toUpperCase()],null!=d&&c.g(d);return c.toString()}function Qa(a){return 0==a.length||La.test(a)}function P(a){return null!=a&&isNaN(a)&&a.toUpperCase()in wa}
490
+ function Ra(a,b,c){if(0==q(b,2)&&p(b,5)){var d=v(b,5);if(0<d.length)return d}d=v(b,1);var e=Q(b);if(0==c)return Sa(d,0,e,"");if(!(d in I))return e;a=R(a,d,S(d));b=p(b,3)&&0!=q(b,3).length?3==c?";ext="+q(b,3):p(a,13)?q(a,13)+v(b,3):" ext. "+v(b,3):"";a:{a=0==t(a,20).length||2==c?t(a,19):t(a,20);for(var f,g=a.length,h=0;h<g;++h){f=a[h];var l=w(f,3);if(0==l||0==e.search(q(f,3,l-1)))if(l=new RegExp(q(f,1)),N(l,e)){a=f;break a}}a=null}null!=a&&(g=a,a=v(g,2),f=new RegExp(q(g,1)),v(g,5),g=v(g,4),e=2==c&&
491
+ null!=g&&0<g.length?e.replace(f,a.replace(Ka,g)):e.replace(f,a),3==c&&(e=e.replace(RegExp("^[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\\[\\]/~\u2053\u223c\uff5e]+"),""),e=e.replace(RegExp("[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\\[\\]/~\u2053\u223c\uff5e]+","g"),"-")));return Sa(d,c,e,b)}function R(a,b,c){return"001"==c?T(a,""+b):T(a,c)}
492
492
  function Q(a){if(!p(a,2))return"";var b=""+q(a,2);return p(a,4)&&q(a,4)&&0<v(a,8)?Array(v(a,8)+1).join("0")+b:b}function Sa(a,b,c,d){switch(b){case 0:return"+"+a+c+d;case 1:return"+"+a+" "+c+d;case 3:return"tel:+"+a+"-"+c+d;default:return c+d}}
493
- function U(a,b){switch(b){case 4:return q(a,5);case 3:return q(a,4);case 1:return q(a,3);case 0:case 2:return q(a,2);case 5:return q(a,6);case 6:return q(a,8);case 7:return q(a,7);case 8:return q(a,21);case 9:return q(a,25);case 10:return q(a,28);default:return q(a,1)}}function V(a,b){return W(a,q(b,1))?W(a,q(b,5))?4:W(a,q(b,4))?3:W(a,q(b,6))?5:W(a,q(b,8))?6:W(a,q(b,7))?7:W(a,q(b,21))?8:W(a,q(b,25))?9:W(a,q(b,28))?10:W(a,q(b,2))?q(b,18)||W(a,q(b,3))?2:0:!q(b,18)&&W(a,q(b,3))?1:-1:-1}
494
- function T(a,b){if(null==b)return null;b=b.toUpperCase();var c=a.g[b];if(null==c){c=wa[b];if(null==c)return null;c=(new A).g(G.m(),c);a.g[b]=c}return c}function W(a,b){var c=a.length;return 0<w(b,9)&&-1==t(b,9).indexOf(c)?!1:N(v(b,2),a)}
495
- function Ta(a,b){if(null==b)return null;var c=v(b,1);c=I[c];if(null==c)a=null;else if(1==c.length)a=c[0];else a:{b=Q(b);for(var d,f=c.length,e=0;e<f;e++){d=c[e];var g=T(a,d);if(p(g,23)){if(0==b.search(q(g,23))){a=d;break a}}else if(-1!=V(b,g)){a=d;break a}}a=null}return a}function S(a){a=I[a];return null==a?"ZZ":a[0]}function Ua(a,b){a=T(a,b);if(null==a)throw Error("Invalid region code: "+b);return v(a,10)}
496
- function X(a,b,c,d){var f=U(c,d),e=0==w(f,9)?t(q(c,1),9):t(f,9);f=t(f,10);if(2==d)if(Pa(U(c,0)))a=U(c,1),Pa(a)&&(e=e.concat(0==w(a,9)?t(q(c,1),9):t(a,9)),e.sort(),0==f.length?f=t(a,10):(f=f.concat(t(a,10)),f.sort()));else return X(a,b,c,1);if(-1==e[0])return 5;b=b.length;if(-1<f.indexOf(b))return 4;c=e[0];return c==b?0:c>b?2:e[e.length-1]<b?3:-1<e.indexOf(b,1)?0:5}function Va(a,b){var c=Q(b);b=v(b,1);if(!(b in I))return 1;b=R(a,b,S(b));return X(a,c,b,-1)}
497
- function Wa(a,b){a=a.toString();if(0==a.length||"0"==a.charAt(0))return 0;for(var c,d=a.length,f=1;3>=f&&f<=d;++f)if(c=parseInt(a.substring(0,f),10),c in I)return b.g(a.substring(f)),c;return 0}
498
- function Xa(a,b,c,d,f,e){if(0==b.length)return 0;b=new B(b);var g;null!=c&&(g=q(c,11));null==g&&(g="NonMatch");var h=b.toString();if(0==h.length)g=20;else if(L.test(h))h=h.replace(L,""),C(b),b.g(Na(h)),g=1;else{h=new RegExp(g);Oa(b);g=b.toString();if(0==g.search(h)){h=g.match(h)[0].length;var l=g.substring(h).match(Aa);l&&null!=l[1]&&0<l[1].length&&"0"==O(l[1],K)?g=!1:(C(b),b.g(g.substring(h)),g=!0)}else g=!1;g=g?5:20}f&&r(e,6,g);if(20!=g){if(2>=b.h.length)throw Error("Phone number too short after IDD");
499
- a=Wa(b,d);if(0!=a)return r(e,1,a),a;throw Error("Invalid country calling code");}if(null!=c&&(g=v(c,10),h=""+g,l=b.toString(),0==l.lastIndexOf(h,0)&&(h=new B(l.substring(h.length)),l=q(c,1),l=new RegExp(v(l,2)),Ya(h,c,null),h=h.toString(),!N(l,b.toString())&&N(l,h)||3==X(a,b.toString(),c,-1))))return d.g(h),f&&r(e,6,10),r(e,1,g),g;r(e,1,0);return 0}
500
- function Ya(a,b,c){var d=a.toString(),f=d.length,e=q(b,15);if(0!=f&&null!=e&&0!=e.length){var g=new RegExp("^(?:"+e+")");if(f=g.exec(d)){e=new RegExp(v(q(b,1),2));var h=N(e,d),l=f.length-1;b=q(b,16);if(null==b||0==b.length||null==f[l]||0==f[l].length){if(!h||N(e,d.substring(f[0].length)))null!=c&&0<l&&null!=f[l]&&c.g(f[1]),a.set(d.substring(f[0].length))}else if(d=d.replace(g,b),!h||N(e,d))null!=c&&0<l&&c.g(f[1]),a.set(d)}}}
493
+ function U(a,b){switch(b){case 4:return q(a,5);case 3:return q(a,4);case 1:return q(a,3);case 0:case 2:return q(a,2);case 5:return q(a,6);case 6:return q(a,8);case 7:return q(a,7);case 8:return q(a,21);case 9:return q(a,25);case 10:return q(a,28);default:return q(a,1)}}function Ta(a,b){return V(a,q(b,1))?V(a,q(b,5))?4:V(a,q(b,4))?3:V(a,q(b,6))?5:V(a,q(b,8))?6:V(a,q(b,7))?7:V(a,q(b,21))?8:V(a,q(b,25))?9:V(a,q(b,28))?10:V(a,q(b,2))?q(b,18)||V(a,q(b,3))?2:0:!q(b,18)&&V(a,q(b,3))?1:-1:-1}
494
+ function T(a,b){if(null==b)return null;b=b.toUpperCase();var c=a.g[b];if(null==c){c=wa[b];if(null==c)return null;c=(new A).g(G.m(),c);a.g[b]=c}return c}function V(a,b){var c=a.length;return 0<w(b,9)&&-1==t(b,9).indexOf(c)?!1:N(v(b,2),a)}
495
+ function Ua(a,b){if(null==b)return null;var c=v(b,1);c=I[c];if(null==c)a=null;else if(1==c.length)a=c[0];else a:{b=Q(b);for(var d,e=c.length,f=0;f<e;f++){d=c[f];var g=T(a,d);if(p(g,23)){if(0==b.search(q(g,23))){a=d;break a}}else if(-1!=Ta(b,g)){a=d;break a}}a=null}return a}function S(a){a=I[a];return null==a?"ZZ":a[0]}function Va(a,b){a=T(a,b);if(null==a)throw Error("Invalid region code: "+b);return v(a,10)}
496
+ function W(a,b,c,d){var e=U(c,d),f=0==w(e,9)?t(q(c,1),9):t(e,9);e=t(e,10);if(2==d)if(Pa(U(c,0)))a=U(c,1),Pa(a)&&(f=f.concat(0==w(a,9)?t(q(c,1),9):t(a,9)),f.sort(),0==e.length?e=t(a,10):(e=e.concat(t(a,10)),e.sort()));else return W(a,b,c,1);if(-1==f[0])return 5;b=b.length;if(-1<e.indexOf(b))return 4;c=f[0];return c==b?0:c>b?2:f[f.length-1]<b?3:-1<f.indexOf(b,1)?0:5}function X(a,b,c){var d=Q(b);b=v(b,1);if(!(b in I))return 1;b=R(a,b,S(b));return W(a,d,b,c)}
497
+ function Wa(a,b){a=a.toString();if(0==a.length||"0"==a.charAt(0))return 0;for(var c,d=a.length,e=1;3>=e&&e<=d;++e)if(c=parseInt(a.substring(0,e),10),c in I)return b.g(a.substring(e)),c;return 0}
498
+ function Xa(a,b,c,d,e,f){if(0==b.length)return 0;b=new B(b);var g;null!=c&&(g=q(c,11));null==g&&(g="NonMatch");var h=b.toString();if(0==h.length)g=20;else if(L.test(h))h=h.replace(L,""),C(b),b.g(Na(h)),g=1;else{h=new RegExp(g);Oa(b);g=b.toString();if(0==g.search(h)){h=g.match(h)[0].length;var l=g.substring(h).match(Aa);l&&null!=l[1]&&0<l[1].length&&"0"==O(l[1],K)?g=!1:(C(b),b.g(g.substring(h)),g=!0)}else g=!1;g=g?5:20}e&&r(f,6,g);if(20!=g){if(2>=b.h.length)throw Error("Phone number too short after IDD");
499
+ a=Wa(b,d);if(0!=a)return r(f,1,a),a;throw Error("Invalid country calling code");}if(null!=c&&(g=v(c,10),h=""+g,l=b.toString(),0==l.lastIndexOf(h,0)&&(h=new B(l.substring(h.length)),l=q(c,1),l=new RegExp(v(l,2)),Ya(h,c,null),h=h.toString(),!N(l,b.toString())&&N(l,h)||3==W(a,b.toString(),c,-1))))return d.g(h),e&&r(f,6,10),r(f,1,g),g;r(f,1,0);return 0}
500
+ function Ya(a,b,c){var d=a.toString(),e=d.length,f=q(b,15);if(0!=e&&null!=f&&0!=f.length){var g=new RegExp("^(?:"+f+")");if(e=g.exec(d)){f=new RegExp(v(q(b,1),2));var h=N(f,d),l=e.length-1;b=q(b,16);if(null==b||0==b.length||null==e[l]||0==e[l].length){if(!h||N(f,d.substring(e[0].length)))null!=c&&0<l&&null!=e[l]&&c.g(e[1]),a.set(d.substring(e[0].length))}else if(d=d.replace(g,b),!h||N(f,d))null!=c&&0<l&&c.g(e[1]),a.set(d)}}}
501
501
  function Y(a,b,c){if(!P(c)&&0<b.length&&"+"!=b.charAt(0))throw Error("Invalid country calling code");return Za(a,b,c,!0)}
502
- function Za(a,b,c,d){if(null==b)throw Error("The string supplied did not seem to be a phone number");if(250<b.length)throw Error("The string supplied is too long to be a phone number");var f=new B;var e=b.indexOf(";phone-context=");if(-1===e)e=null;else if(e+=15,e>=b.length)e="";else{var g=b.indexOf(";",e);e=-1!==g?b.substring(e,g):b.substring(e)}var h=e;null==h?g=!0:0===h.length?g=!1:(g=Fa.exec(h),h=Ga.exec(h),g=null!==g||null!==h);if(!g)throw Error("The string supplied did not seem to be a phone number");
503
- null!=e?("+"===e.charAt(0)&&f.g(e),e=b.indexOf("tel:"),f.g(b.substring(0<=e?e+4:0,b.indexOf(";phone-context=")))):(e=f.g,g=b??"",h=g.search(Ba),0<=h?(g=g.substring(h),g=g.replace(Da,""),h=g.search(Ca),0<=h&&(g=g.substring(0,h))):g="",e.call(f,g));e=f.toString();g=e.indexOf(";isub=");0<g&&(C(f),f.g(e.substring(0,g)));if(!Ma(f.toString()))throw Error("The string supplied did not seem to be a phone number");e=f.toString();if(!(P(c)||null!=e&&0<e.length&&L.test(e)))throw Error("Invalid country calling code");
504
- e=new H;d&&r(e,5,b);a:{b=f.toString();g=b.search(Ia);if(0<=g&&Ma(b.substring(0,g))){h=b.match(Ia);for(var l=h.length,D=1;D<l;++D)if(null!=h[D]&&0<h[D].length){C(f);f.g(b.substring(0,g));b=h[D];break a}}b=""}0<b.length&&r(e,3,b);g=T(a,c);b=new B;h=0;l=f.toString();try{h=Xa(a,l,g,b,d,e)}catch(ba){if("Invalid country calling code"==ba.message&&L.test(l)){if(l=l.replace(L,""),h=Xa(a,l,g,b,d,e),0==h)throw ba;}else throw ba;}0!=h?(f=S(h),f!=c&&(g=R(a,h,f))):(Oa(f),b.g(f.toString()),null!=c?(h=v(g,10),r(e,
505
- 1,h)):d&&(delete e.h[6],e.g&&delete e.g[6]));if(2>b.h.length)throw Error("The string supplied is too short to be a phone number");null!=g&&(c=new B,f=new B(b.toString()),Ya(f,g,c),a=X(a,f.toString(),g,-1),2!=a&&4!=a&&5!=a&&(b=f,d&&0<c.toString().length&&r(e,7,c.toString())));d=b.toString();a=d.length;if(2>a)throw Error("The string supplied is too short to be a phone number");if(17<a)throw Error("The string supplied is too long to be a phone number");if(1<d.length&&"0"==d.charAt(0)){r(e,4,!0);for(a=
506
- 1;a<d.length-1&&"0"==d.charAt(a);)a++;1!=a&&r(e,8,a)}r(e,2,parseInt(d,10));return e}function N(a,b){return(a="string"==typeof a?b.match("^(?:"+a+")$"):b.match(a))&&a[0].length==b.length?!0:!1};function $a(a){this.fa=RegExp("\u2008");this.ja="";this.v=new B;this.da="";this.s=new B;this.ba=new B;this.u=!0;this.ea=this.ca=this.la=!1;this.ga=J.g();this.$=0;this.h=new B;this.ha=!1;this.o="";this.g=new B;this.j=[];this.ka=a;this.l=ab(this,this.ka)}var bb=new G;r(bb,11,"NA");
502
+ function Za(a,b,c,d){if(null==b)throw Error("The string supplied did not seem to be a phone number");if(250<b.length)throw Error("The string supplied is too long to be a phone number");var e=new B;var f=b.indexOf(";phone-context=");if(-1===f)f=null;else if(f+=15,f>=b.length)f="";else{var g=b.indexOf(";",f);f=-1!==g?b.substring(f,g):b.substring(f)}var h=f;null==h?g=!0:0===h.length?g=!1:(g=Fa.exec(h),h=Ga.exec(h),g=null!==g||null!==h);if(!g)throw Error("The string supplied did not seem to be a phone number");
503
+ null!=f?("+"===f.charAt(0)&&e.g(f),f=b.indexOf("tel:"),e.g(b.substring(0<=f?f+4:0,b.indexOf(";phone-context=")))):(f=e.g,g=b??"",h=g.search(Ba),0<=h?(g=g.substring(h),g=g.replace(Da,""),h=g.search(Ca),0<=h&&(g=g.substring(0,h))):g="",f.call(e,g));f=e.toString();g=f.indexOf(";isub=");0<g&&(C(e),e.g(f.substring(0,g)));if(!Ma(e.toString()))throw Error("The string supplied did not seem to be a phone number");f=e.toString();if(!(P(c)||null!=f&&0<f.length&&L.test(f)))throw Error("Invalid country calling code");
504
+ f=new H;d&&r(f,5,b);a:{b=e.toString();g=b.search(Ia);if(0<=g&&Ma(b.substring(0,g))){h=b.match(Ia);for(var l=h.length,D=1;D<l;++D)if(null!=h[D]&&0<h[D].length){C(e);e.g(b.substring(0,g));b=h[D];break a}}b=""}0<b.length&&r(f,3,b);g=T(a,c);b=new B;h=0;l=e.toString();try{h=Xa(a,l,g,b,d,f)}catch(ba){if("Invalid country calling code"==ba.message&&L.test(l)){if(l=l.replace(L,""),h=Xa(a,l,g,b,d,f),0==h)throw ba;}else throw ba;}0!=h?(e=S(h),e!=c&&(g=R(a,h,e))):(Oa(e),b.g(e.toString()),null!=c?(h=v(g,10),r(f,
505
+ 1,h)):d&&(delete f.h[6],f.g&&delete f.g[6]));if(2>b.h.length)throw Error("The string supplied is too short to be a phone number");null!=g&&(c=new B,e=new B(b.toString()),Ya(e,g,c),a=W(a,e.toString(),g,-1),2!=a&&4!=a&&5!=a&&(b=e,d&&0<c.toString().length&&r(f,7,c.toString())));d=b.toString();a=d.length;if(2>a)throw Error("The string supplied is too short to be a phone number");if(17<a)throw Error("The string supplied is too long to be a phone number");if(1<d.length&&"0"==d.charAt(0)){r(f,4,!0);for(a=
506
+ 1;a<d.length-1&&"0"==d.charAt(a);)a++;1!=a&&r(f,8,a)}r(f,2,parseInt(d,10));return f}function N(a,b){return(a="string"==typeof a?b.match("^(?:"+a+")$"):b.match(a))&&a[0].length==b.length?!0:!1};function $a(a){this.fa=RegExp("\u2008");this.ja="";this.v=new B;this.da="";this.s=new B;this.ba=new B;this.u=!0;this.ea=this.ca=this.la=!1;this.ga=J.g();this.$=0;this.h=new B;this.ha=!1;this.o="";this.g=new B;this.j=[];this.ka=a;this.l=ab(this,this.ka)}var bb=new G;r(bb,11,"NA");
507
507
  var cb=RegExp("^[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\\[\\]/~\u2053\u223c\uff5e]*\\$1[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\\[\\]/~\u2053\u223c\uff5e]*(\\$\\d[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\\[\\]/~\u2053\u223c\uff5e]*)*$"),db=/[- ]/;
508
- function ab(a,b){var c=a.ga;b=P(b)?Ua(c,b):0;a=T(a.ga,S(b));return null!=a?a:bb}function eb(a){for(var b=a.j.length,c=0;c<b;++c){var d=a.j[c],f=v(d,1);if(a.da==f)return!1;var e=a;var g=d,h=v(g,1);C(e.v);var l=e;g=v(g,2);var D="999999999999999".match(h)[0];D.length<l.g.h.length?l="":(l=D.replace(new RegExp(h,"g"),g),l=l.replace(RegExp("9","g"),"\u2008"));0<l.length?(e.v.g(l),e=!0):e=!1;if(e)return a.da=f,a.ha=db.test(q(d,4)),a.$=0,!0}return a.u=!1}
509
- function fb(a,b){for(var c=[],d=b.length-3,f=a.j.length,e=0;e<f;++e){var g=a.j[e];0==w(g,3)?c.push(a.j[e]):(g=q(g,3,Math.min(d,w(g,3)-1)),0==b.search(g)&&c.push(a.j[e]))}a.j=c}
508
+ function ab(a,b){var c=a.ga;b=P(b)?Va(c,b):0;a=T(a.ga,S(b));return null!=a?a:bb}function eb(a){for(var b=a.j.length,c=0;c<b;++c){var d=a.j[c],e=v(d,1);if(a.da==e)return!1;var f=a;var g=d,h=v(g,1);C(f.v);var l=f;g=v(g,2);var D="999999999999999".match(h)[0];D.length<l.g.h.length?l="":(l=D.replace(new RegExp(h,"g"),g),l=l.replace(RegExp("9","g"),"\u2008"));0<l.length?(f.v.g(l),f=!0):f=!1;if(f)return a.da=e,a.ha=db.test(q(d,4)),a.$=0,!0}return a.u=!1}
509
+ function fb(a,b){for(var c=[],d=b.length-3,e=a.j.length,f=0;f<e;++f){var g=a.j[f];0==w(g,3)?c.push(a.j[f]):(g=q(g,3,Math.min(d,w(g,3)-1)),0==b.search(g)&&c.push(a.j[f]))}a.j=c}
510
510
  function gb(a,b){a.s.g(b);var c=b;Aa.test(c)||1==a.s.h.length&&za.test(c)?("+"==b?(c=b,a.ba.g(b)):(c=K[b],a.ba.g(c),a.g.g(c)),b=c):(a.u=!1,a.la=!0);if(!a.u){if(!a.la)if(hb(a)){if(ib(a))return jb(a)}else if(0<a.o.length&&(b=a.g.toString(),C(a.g),a.g.g(a.o),a.g.g(b),b=a.h.toString(),c=b.lastIndexOf(a.o),C(a.h),a.h.g(b.substring(0,c))),a.o!=kb(a))return a.h.g(" "),jb(a);return a.s.toString()}switch(a.ba.h.length){case 0:case 1:case 2:return a.s.toString();case 3:if(hb(a))a.ea=!0;else return a.o=kb(a),
511
511
  lb(a);default:if(a.ea)return ib(a)&&(a.ea=!1),a.h.toString()+a.g.toString();if(0<a.j.length){b=mb(a,b);c=nb(a);if(0<c.length)return c;fb(a,a.g.toString());return eb(a)?ob(a):a.u?Z(a,b):a.s.toString()}return lb(a)}}function jb(a){a.u=!0;a.ea=!1;a.j=[];a.$=0;C(a.v);a.da="";return lb(a)}
512
- function nb(a){for(var b=a.g.toString(),c=a.j.length,d=0;d<c;++d){var f=a.j[d],e=v(f,1);if((new RegExp("^(?:"+e+")$")).test(b)&&(a.ha=db.test(q(f,4)),f=b.replace(new RegExp(e,"g"),q(f,2)),f=Z(a,f),O(f,xa)==a.ba))return f}return""}function Z(a,b){var c=a.h.h.length;return a.ha&&0<c&&" "!=a.h.toString().charAt(c-1)?a.h+" "+b:a.h+b}
513
- function lb(a){var b=a.g.toString();if(3<=b.length){for(var c=a.ca&&0==a.o.length&&0<w(a.l,20)?t(a.l,20):t(a.l,19),d=c.length,f=0;f<d;++f){var e=c[f];0<a.o.length&&Qa(v(e,4))&&!q(e,6)&&!p(e,5)||(0!=a.o.length||a.ca||Qa(v(e,4))||q(e,6))&&cb.test(v(e,2))&&a.j.push(e)}fb(a,b);b=nb(a);return 0<b.length?b:eb(a)?ob(a):a.s.toString()}return Z(a,b)}function ob(a){var b=a.g.toString(),c=b.length;if(0<c){for(var d="",f=0;f<c;f++)d=mb(a,b.charAt(f));return a.u?Z(a,d):a.s.toString()}return a.h.toString()}
512
+ function nb(a){for(var b=a.g.toString(),c=a.j.length,d=0;d<c;++d){var e=a.j[d],f=v(e,1);if((new RegExp("^(?:"+f+")$")).test(b)&&(a.ha=db.test(q(e,4)),e=b.replace(new RegExp(f,"g"),q(e,2)),e=Z(a,e),O(e,xa)==a.ba))return e}return""}function Z(a,b){var c=a.h.h.length;return a.ha&&0<c&&" "!=a.h.toString().charAt(c-1)?a.h+" "+b:a.h+b}
513
+ function lb(a){var b=a.g.toString();if(3<=b.length){for(var c=a.ca&&0==a.o.length&&0<w(a.l,20)?t(a.l,20):t(a.l,19),d=c.length,e=0;e<d;++e){var f=c[e];0<a.o.length&&Qa(v(f,4))&&!q(f,6)&&!p(f,5)||(0!=a.o.length||a.ca||Qa(v(f,4))||q(f,6))&&cb.test(v(f,2))&&a.j.push(f)}fb(a,b);b=nb(a);return 0<b.length?b:eb(a)?ob(a):a.s.toString()}return Z(a,b)}function ob(a){var b=a.g.toString(),c=b.length;if(0<c){for(var d="",e=0;e<c;e++)d=mb(a,b.charAt(e));return a.u?Z(a,d):a.s.toString()}return a.h.toString()}
514
514
  function kb(a){var b=a.g.toString(),c=0;if(1!=q(a.l,10))var d=!1;else d=a.g.toString(),d="1"==d.charAt(0)&&"0"!=d.charAt(1)&&"1"!=d.charAt(1);d?(c=1,a.h.g("1").g(" "),a.ca=!0):p(a.l,15)&&(d=new RegExp("^(?:"+q(a.l,15)+")"),d=b.match(d),null!=d&&null!=d[0]&&0<d[0].length&&(a.ca=!0,c=d[0].length,a.h.g(b.substring(0,c))));C(a.g);a.g.g(b.substring(c));return b.substring(0,c)}
515
515
  function hb(a){var b=a.ba.toString(),c=new RegExp("^(?:\\+|"+q(a.l,11)+")");c=b.match(c);return null!=c&&null!=c[0]&&0<c[0].length?(a.ca=!0,c=c[0].length,C(a.g),a.g.g(b.substring(c)),C(a.h),a.h.g(b.substring(0,c)),"+"!=b.charAt(0)&&a.h.g(" "),!0):!1}function ib(a){if(0==a.g.h.length)return!1;var b=new B,c=Wa(a.g,b);if(0==c)return!1;C(a.g);a.g.g(b.toString());b=S(c);"001"==b?a.l=T(a.ga,""+c):b!=a.ka&&(a.l=ab(a,b));a.h.g(""+c).g(" ");a.o="";return!0}
516
- function mb(a,b){var c=a.v.toString();if(0<=c.substring(a.$).search(a.fa)){var d=c.search(a.fa);b=c.replace(a.fa,b);C(a.v);a.v.g(b);a.$=d;return b.substring(0,a.$+1)}1==a.j.length&&(a.u=!1);a.da="";return a.s.toString()};k("intlTelInputUtils",{});k("intlTelInputUtils.formatNumberAsYouType",(a,b)=>{try{const c=a.replace(/[^+0-9]/g,""),d=new $a(b);let f="";for(let e=0;e<c.length;e++)b=d,b.ja=gb(b,c.charAt(e)),f=b.ja;return f}catch(c){return a}});k("intlTelInputUtils.formatNumber",(a,b,c)=>{try{const f=J.g(),e=Y(f,a,b);var d=Va(f,e);return 0==d||4==d?Ra(f,e,"undefined"===typeof c?0:c):a}catch(f){return a}});
517
- k("intlTelInputUtils.getExampleNumber",(a,b,c)=>{try{const h=J.g();a:{var d=h;if(P(a)){var f=U(T(d,a),c);try{if(p(f,6)){var e=q(f,6);var g=Za(d,e,a,!1);break a}}catch(l){}}g=null}return Ra(h,g,b?2:1)}catch(h){return""}});k("intlTelInputUtils.getExtension",(a,b)=>{try{return q(Y(J.g(),a,b),3)}catch(c){return""}});k("intlTelInputUtils.getNumberType",(a,b)=>{try{const h=J.g();var c=Y(h,a,b);a=h;var d=Ta(a,c),f=R(a,v(c,1),d);if(null==f)var e=-1;else{var g=Q(c);e=V(g,f)}return e}catch(h){return-99}});
518
- k("intlTelInputUtils.getValidationError",(a,b)=>{try{const c=J.g(),d=Y(c,a,b);return Va(c,d)}catch(c){return"Invalid country calling code"===c.message?1:3>=a.length||"Phone number too short after IDD"===c.message||"The string supplied is too short to be a phone number"===c.message?2:"The string supplied is too long to be a phone number"===c.message?3:-99}});
519
- k("intlTelInputUtils.isValidNumber",(a,b)=>{try{const l=J.g();var c=Y(l,a,b);a=l;var d=Ta(a,c);var f=v(c,1),e=R(a,f,d);if(null==e||"001"!=d&&f!=Ua(a,d))var g=!1;else{var h=Q(c);g=-1!=V(h,e)}return g}catch(l){return!1}});k("intlTelInputUtils.isPossibleNumber",(a,b)=>{try{const c=J.g(),d=Y(c,a,b);return 0===Va(c,d)}catch(c){return!1}});k("intlTelInputUtils.numberFormat",{E164:0,INTERNATIONAL:1,NATIONAL:2,RFC3966:3});
520
- k("intlTelInputUtils.numberType",{FIXED_LINE:0,MOBILE:1,FIXED_LINE_OR_MOBILE:2,TOLL_FREE:3,PREMIUM_RATE:4,SHARED_COST:5,VOIP:6,PERSONAL_NUMBER:7,PAGER:8,UAN:9,VOICEMAIL:10,UNKNOWN:-1});k("intlTelInputUtils.validationError",{IS_POSSIBLE:0,INVALID_COUNTRY_CODE:1,TOO_SHORT:2,TOO_LONG:3,IS_POSSIBLE_LOCAL_ONLY:4,INVALID_LENGTH:5});})();
516
+ function mb(a,b){var c=a.v.toString();if(0<=c.substring(a.$).search(a.fa)){var d=c.search(a.fa);b=c.replace(a.fa,b);C(a.v);a.v.g(b);a.$=d;return b.substring(0,a.$+1)}1==a.j.length&&(a.u=!1);a.da="";return a.s.toString()};k("intlTelInputUtils",{});k("intlTelInputUtils.formatNumberAsYouType",(a,b)=>{try{const c=a.replace(/[^+0-9]/g,""),d=new $a(b);let e="";for(let f=0;f<c.length;f++)b=d,b.ja=gb(b,c.charAt(f)),e=b.ja;return e}catch(c){return a}});k("intlTelInputUtils.formatNumber",(a,b,c)=>{try{const e=J.g(),f=Y(e,a,b);var d=X(e,f,-1);return 0==d||4==d?Ra(e,f,"undefined"===typeof c?0:c):a}catch(e){return a}});
517
+ k("intlTelInputUtils.getExampleNumber",(a,b,c)=>{try{const h=J.g();a:{var d=h;if(P(a)){var e=U(T(d,a),c);try{if(p(e,6)){var f=q(e,6);var g=Za(d,f,a,!1);break a}}catch(l){}}g=null}return Ra(h,g,b?2:1)}catch(h){return""}});k("intlTelInputUtils.getExtension",(a,b)=>{try{return q(Y(J.g(),a,b),3)}catch(c){return""}});k("intlTelInputUtils.getNumberType",(a,b)=>{try{const h=J.g();var c=Y(h,a,b);a=h;var d=Ua(a,c),e=R(a,v(c,1),d);if(null==e)var f=-1;else{var g=Q(c);f=Ta(g,e)}return f}catch(h){return-99}});
518
+ k("intlTelInputUtils.getValidationError",(a,b)=>{try{const c=J.g(),d=Y(c,a,b);return X(c,d,-1)}catch(c){return"Invalid country calling code"===c.message?1:3>=a.length||"Phone number too short after IDD"===c.message||"The string supplied is too short to be a phone number"===c.message?2:"The string supplied is too long to be a phone number"===c.message?3:-99}});
519
+ k("intlTelInputUtils.isValidNumber",(a,b)=>{try{const l=J.g();var c=Y(l,a,b);a=l;var d=Ua(a,c);var e=v(c,1),f=R(a,e,d);if(null==f||"001"!=d&&e!=Va(a,d))var g=!1;else{var h=Q(c);g=-1!=Ta(h,f)}return g}catch(l){return!1}});k("intlTelInputUtils.isPossibleNumber",(a,b,c)=>{try{const d=J.g(),e=Y(d,a,b);if(c)return 0===X(d,e,1);const f=0===X(d,e,-1);a=!0;const g=q(e,2).toString();"gb"===b&&"7"===g.charAt(0)&&(a=10===g.length);return f&&a}catch(d){return!1}});
520
+ k("intlTelInputUtils.numberFormat",{E164:0,INTERNATIONAL:1,NATIONAL:2,RFC3966:3});k("intlTelInputUtils.numberType",{FIXED_LINE:0,MOBILE:1,FIXED_LINE_OR_MOBILE:2,TOLL_FREE:3,PREMIUM_RATE:4,SHARED_COST:5,VOIP:6,PERSONAL_NUMBER:7,PAGER:8,UAN:9,VOICEMAIL:10,UNKNOWN:-1});k("intlTelInputUtils.validationError",{IS_POSSIBLE:0,INVALID_COUNTRY_CODE:1,TOO_SHORT:2,TOO_LONG:3,IS_POSSIBLE_LOCAL_ONLY:4,INVALID_LENGTH:5});})();
package/composer.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jackocnr/intl-tel-input",
3
- "version": "19.5.4",
3
+ "version": "19.5.6",
4
4
  "description": "A JavaScript plugin for entering and validating international telephone numbers",
5
5
  "keywords": [
6
6
  "international",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intl-tel-input",
3
- "version": "19.5.4",
3
+ "version": "19.5.6",
4
4
  "description": "A JavaScript plugin for entering and validating international telephone numbers",
5
5
  "keywords": [
6
6
  "international",