intl-tel-input 21.0.9 → 21.1.1

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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * International Telephone Input v21.0.9
2
+ * International Telephone Input v21.1.1
3
3
  * https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
@@ -13,7 +13,7 @@
13
13
  }
14
14
  }(() => {
15
15
 
16
- var factoryOutput=(()=>{var v=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var D=Object.prototype.hasOwnProperty;var A=(o,t)=>{for(var e in t)v(o,e,{get:t[e],enumerable:!0})},N=(o,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of S(t))!D.call(o,n)&&n!==e&&v(o,n,{get:()=>t[n],enumerable:!(i=E(t,n))||i.enumerable});return o};var M=o=>N(v({},"__esModule",{value:!0}),o);var z={};A(z,{Iti:()=>b,default:()=>B});var w=[["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\xF4te d\u2019Ivoire","ci","225"],["Croatia","hr","385"],["Cuba","cu","53"],["Cura\xE7ao","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\xE9union","re","262",0],["Romania","ro","40"],["Russia","ru","7",0],["Rwanda","rw","250"],["Samoa","ws","685"],["San Marino","sm","378"],["S\xE3o Tom\xE9 & Pr\xEDncipe","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\xE9lemy","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"],["\xC5land Islands","ax","358",1,["18"]]],I=[];for(let o=0;o<w.length;o++){let t=w[o];I[o]={name:t[0],iso2:t[1],dialCode:t[2],priority:t[3]||0,areaCodes:t[4]||null,nodeById:{}}}var C=I;var k=0,T={allowDropdown:!0,autoPlaceholder:"polite",countrySearch:!0,containerClass:"",customPlaceholder:null,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,strictMode:!1,useFullscreenPopup:typeof navigator<"u"&&typeof window<"u"?/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||window.innerWidth<=500:!1,utilsScript:""},x=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"],f=o=>o.replace(/\D/g,""),_=(o="")=>o.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),P=(o,t,e)=>{e&&!o.classList.contains(t)?o.classList.add(t):!e&&o.classList.contains(t)&&o.classList.remove(t)},L=o=>{let t=f(o);if(t.charAt(0)==="1"){let e=t.substr(1,3);return x.indexOf(e)!==-1}return!1},H=(o,t)=>o.name<t.name?-1:o.name>t.name?1:0,U=(o,t,e,i)=>{if(e===0&&!i)return 0;let n=0;for(let s=0;s<t.length;s++){if(/[+0-9]/.test(t[s])&&n++,n===o&&!i)return s+1;if(i&&n===o+1)return s}return t.length},h=(o,t,e)=>{let i=document.createElement(o);return t&&Object.entries(t).forEach(([n,s])=>i.setAttribute(n,s)),e&&e.appendChild(i),i},y=o=>{let{instances:t}=window.intlTelInputGlobals;Object.values(t).forEach(e=>e[o]())},b=class{id;promise;telInput;activeItem;highlightedItem;options;hadInitialPlaceholder;isRTL;selectedCountryData;countries;dialCodeMaxLen;dialCodeToIso2Map;dialCodes;preferredCountries;countryContainer;selectedCountry;selectedCountryInner;selectedCountryA11yText;selectedDialCode;dropdownArrow;dropdownContent;searchInput;searchResultsA11yText;countryList;dropdown;hiddenInput;hiddenInputCountry;maxCoreNumberLength;defaultCountry;_a14;_a9;_a10;_a11;_a12;_handleKeydownEvent;_a4;_a0;_a1;_a2;_a3;_a7;resolveAutoCountryPromise;rejectAutoCountryPromise;resolveUtilsScriptPromise;rejectUtilsScriptPromise;constructor(t,e={}){this.id=k++,this.a=t,this.b=null,this.c=null,this.d=Object.assign({},T,e),this.e=!!t.getAttribute("placeholder")}_init(){this.d.useFullscreenPopup&&(this.d.fixDropdownWidth=!1),this.d.countrySearch&&!this.d.useFullscreenPopup&&(this.d.fixDropdownWidth=!0);let t=this.d.allowDropdown&&!this.d.showSelectedDialCode;!this.d.showFlags&&t&&(this.d.showFlags=!0),this.d.useFullscreenPopup&&!this.d.dropdownContainer&&(this.d.dropdownContainer=document.body),this.isRTL=!!this.a.closest("[dir=rtl]");let e=new Promise((n,s)=>{this.h=n,this.i=s}),i=new Promise((n,s)=>{this.i0=n,this.i1=s});this.promise=Promise.all([e,i]),this.s={},this._b(),this._f(),this._h(),this._i(),this._i3()}_b(){this._d(),this._d2(),this._e(),this._d0(),(this.d.onlyCountries.length||this.d.i18n)&&this.p.sort(H)}_c(t,e,i){e.length>this.dialCodeMaxLen&&(this.dialCodeMaxLen=e.length),this.q.hasOwnProperty(e)||(this.q[e]=[]);for(let s=0;s<this.q[e].length;s++)if(this.q[e][s]===t)return;let n=i!==void 0?i:this.q[e].length;this.q[e][n]=t}_d(){let{onlyCountries:t,excludeCountries:e}=this.d;if(t.length){let i=t.map(n=>n.toLowerCase());this.p=C.filter(n=>i.indexOf(n.iso2)>-1)}else if(e.length){let i=e.map(n=>n.toLowerCase());this.p=C.filter(n=>i.indexOf(n.iso2)===-1)}else this.p=C}_d0(){for(let t=0;t<this.p.length;t++){let e=this.p[t].iso2.toLowerCase();this.d.i18n.hasOwnProperty(e)&&(this.p[t].name=this.d.i18n[e])}}_d2(){this.dialCodes={},this.dialCodeMaxLen=0,this.q={};for(let t=0;t<this.p.length;t++){let e=this.p[t];this.dialCodes[e.dialCode]||(this.dialCodes[e.dialCode]=!0),this._c(e.iso2,e.dialCode,e.priority)}for(let t=0;t<this.p.length;t++){let e=this.p[t];if(e.areaCodes){let i=this.q[e.dialCode][0];for(let n=0;n<e.areaCodes.length;n++){let s=e.areaCodes[n];for(let r=1;r<s.length;r++){let d=e.dialCode+s.substr(0,r);this._c(i,d),this._c(e.iso2,d)}this._c(e.iso2,e.dialCode+s)}}}}_e(){this.preferredCountries=[];for(let t=0;t<this.d.preferredCountries.length;t++){let e=this.d.preferredCountries[t].toLowerCase(),i=this._y(e,!0);i&&this.preferredCountries.push(i)}}_f(){this.a.classList.add("iti__tel-input"),!this.a.hasAttribute("autocomplete")&&!(this.a.form&&this.a.form.hasAttribute("autocomplete"))&&this.a.setAttribute("autocomplete","off");let{allowDropdown:t,showSelectedDialCode:e,showFlags:i,containerClass:n,hiddenInput:s,dropdownContainer:r,fixDropdownWidth:d,useFullscreenPopup:l,countrySearch:a,i18n:p}=this.d,c="iti";t&&(c+=" iti--allow-dropdown"),e&&(c+=" iti--show-selected-dial-code"),i&&(c+=" iti--show-flags"),n&&(c+=` ${n}`),l||(c+=" iti--inline-dropdown");let u=h("div",{class:c});if(this.a.parentNode?.insertBefore(u,this.a),(i||e)&&(this.k=h("div",{class:"iti__country-container"},u),this.selectedCountry=h("button",{type:"button",class:"iti__selected-country",...t&&{"aria-expanded":"false","aria-label":this.d.i18n.selectedCountryAriaLabel||"Selected country","aria-haspopup":a?"true":"listbox","aria-controls":a?`iti-${this.id}__dropdown-content`:`iti-${this.id}__country-listbox`,...a?{role:"combobox"}:{}}},this.k),this.l=h("div",null,this.selectedCountry),this.selectedCountryA11yText=h("span",{class:"iti__a11y-text"},this.l)),u.appendChild(this.a),this.selectedCountry&&this.a.disabled&&this.selectedCountry.setAttribute("aria-disabled","true"),e&&(this.t=h("div",{class:"iti__selected-dial-code"},this.selectedCountry)),t){this.a.disabled||this.selectedCountry.setAttribute("tabindex","0"),this.u=h("div",{class:"iti__arrow","aria-hidden":"true"},this.selectedCountry);let m=d?"":"iti--flexible-dropdown-width";if(this.dropdownContent=h("div",{id:`iti-${this.id}__dropdown-content`,class:`iti__dropdown-content iti__hide ${m}`}),a&&(this.searchInput=h("input",{type:"text",class:"iti__search-input",placeholder:p.searchPlaceholder||"Search",role:"combobox","aria-expanded":"true","aria-label":p.searchPlaceholder||"Search","aria-controls":`iti-${this.id}__country-listbox`,"aria-autocomplete":"list",autocomplete:"off"},this.dropdownContent),this.searchResultsA11yText=h("span",{class:"iti__a11y-text"},this.dropdownContent)),this.countryList=h("ul",{class:"iti__country-list",id:`iti-${this.id}__country-listbox`,role:"listbox","aria-label":p.countryListAriaLabel||"List of countries"},this.dropdownContent),this.preferredCountries.length&&!a&&(this._g(this.preferredCountries,"iti__preferred",!0),h("li",{class:"iti__divider","aria-hidden":"true"},this.countryList)),this._g(this.p,"iti__standard"),a&&this._p4(),r){let g="iti iti--container";l?g+=" iti--fullscreen-popup":g+=" iti--inline-dropdown",a&&(g+=" iti--country-search"),this.dropdown=h("div",{class:g}),this.dropdown.appendChild(this.dropdownContent)}else this.k.appendChild(this.dropdownContent)}if(s){let m=this.a.getAttribute("name")||"",g=s(m);g.phone&&(this.hiddenInput=h("input",{type:"hidden",name:g.phone}),u.appendChild(this.hiddenInput)),g.country&&(this.hiddenInputCountry=h("input",{type:"hidden",name:g.country}),u.appendChild(this.hiddenInputCountry))}}_g(t,e,i){for(let n=0;n<t.length;n++){let s=t[n],r=i?"-preferred":"",d=h("li",{id:`iti-${this.id}__item-${s.iso2}${r}`,class:`iti__country ${e}`,tabindex:"-1",role:"option","data-dial-code":s.dialCode,"data-country-code":s.iso2,"aria-selected":"false"},this.countryList);s.nodeById[this.id]=d;let l="";this.d.showFlags&&(l+=`<div class='iti__flag-box'><div class='iti__flag iti__${s.iso2}'></div></div>`),l+=`<span class='iti__country-name'>${s.name}</span>`,l+=`<span class='iti__dial-code'>+${s.dialCode}</span>`,d.insertAdjacentHTML("beforeend",l)}}_h(t=!1){let e=this.a.getAttribute("value"),i=this.a.value,s=e&&e.charAt(0)==="+"&&(!i||i.charAt(0)!=="+")?e:i,r=this._5(s),d=L(s),{initialCountry:l}=this.d;if(r&&!d)this._v(s);else if(l!=="auto"||t){let a=l?l.toLowerCase():"";a&&this._y(a,!0)?this._z(a):r&&d?this._z("us"):this._z()}s&&this._u(s)}_i(){this._j(),this.d.allowDropdown&&this._i2(),(this.hiddenInput||this.hiddenInputCountry)&&this.a.form&&this._i0()}_i0(){this._a14=()=>{this.hiddenInput&&(this.hiddenInput.value=this.getNumber()),this.hiddenInputCountry&&(this.hiddenInputCountry.value=this.getSelectedCountryData().iso2||"")},this.a.form?.addEventListener("submit",this._a14)}_i2(){this._a9=e=>{this.dropdownContent.classList.contains("iti__hide")?this.a.focus():e.preventDefault()};let t=this.a.closest("label");t&&t.addEventListener("click",this._a9),this._a10=()=>{this.dropdownContent.classList.contains("iti__hide")&&!this.a.disabled&&!this.a.readOnly&&this._n()},this.selectedCountry.addEventListener("click",this._a10),this._a11=e=>{this.dropdownContent.classList.contains("iti__hide")&&["ArrowUp","ArrowDown"," ","Enter"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),this._n()),e.key==="Tab"&&this._2()},this.k.addEventListener("keydown",this._a11)}_i3(){this.d.utilsScript&&!window.intlTelInputUtils?window.intlTelInputGlobals.documentReady()?window.intlTelInputGlobals.loadUtils(this.d.utilsScript):window.addEventListener("load",()=>{window.intlTelInputGlobals.loadUtils(this.d.utilsScript)}):this.i0(),this.d.initialCountry==="auto"&&!this.s.iso2?this._i4():this.h()}_i4(){window.intlTelInputGlobals.autoCountry?this.handleAutoCountry():window.intlTelInputGlobals.startedLoadingAutoCountry||(window.intlTelInputGlobals.startedLoadingAutoCountry=!0,typeof this.d.geoIpLookup=="function"&&this.d.geoIpLookup((t="")=>{let e=t.toLowerCase();e&&this._y(e,!0)?(window.intlTelInputGlobals.autoCountry=e,setTimeout(()=>y("handleAutoCountry"))):(this._h(!0),y("rejectAutoCountryPromise"))},()=>{this._h(!0),y("rejectAutoCountryPromise")}))}_j(){let{strictMode:t,formatAsYouType:e}=this.d,i=!1;this._a12=n=>{this._v(this.a.value)&&this._8();let s=n&&n.data&&/[^+0-9]/.test(n.data),r=n&&n.inputType==="insertFromPaste"&&this.a.value;if(s||r&&!t?i=!0:/[^+0-9]/.test(this.a.value)||(i=!1),e&&!i){let d=this.a.selectionStart||0,a=this.a.value.substring(0,d).replace(/[^+0-9]/g,"").length,p=n&&n.inputType==="deleteContentForward",c=this._9(),u=U(a,c,d,p);this.a.value=c,this.a.setSelectionRange(u,u)}},this.a.addEventListener("input",this._a12),t&&(this._handleKeydownEvent=n=>{if(n.key.length===1&&!n.altKey&&!n.ctrlKey&&!n.metaKey){let s=this.a.selectionStart===0&&n.key==="+",r=/^[0-9]$/.test(n.key),d=s||r,l=this._6(),a=window.intlTelInputUtils.getCoreNumber(l,this.s.iso2),p=this.maxCoreNumberLength&&a.length>=this.maxCoreNumberLength;(!d||p)&&n.preventDefault()}},this.a.addEventListener("keydown",this._handleKeydownEvent))}_j2(t){let e=parseInt(this.a.getAttribute("maxlength")||"",10);return e&&t.length>e?t.substr(0,e):t}_trigger(t){let e=new Event(t,{bubbles:!0,cancelable:!0});this.a.dispatchEvent(e)}_n(){let{fixDropdownWidth:t,countrySearch:e}=this.d;if(t&&(this.dropdownContent.style.width=`${this.a.offsetWidth}px`),this.dropdownContent.classList.remove("iti__hide"),this.selectedCountry.setAttribute("aria-expanded","true"),this._o(),this.b&&!e)this._x(this.b,!1),this._3(this.b,!0);else{let i=this.countryList.firstElementChild;i&&(this._x(i,!1),this.countryList.scrollTop=0),e&&this.searchInput.focus()}this._p(),this.u.classList.add("iti__arrow--up"),this._trigger("open:countrydropdown")}_o(){if(this.d.dropdownContainer&&this.d.dropdownContainer.appendChild(this.dropdown),!this.d.useFullscreenPopup){let t=this.a.getBoundingClientRect(),e=document.documentElement.scrollTop,i=t.top+e,n=this.dropdownContent.offsetHeight,s=i+this.a.offsetHeight+n<e+window.innerHeight,r=i-n>e,d=!this.d.countrySearch&&!s&&r;if(P(this.dropdownContent,"iti__dropdown-content--dropup",d),this.d.dropdownContainer){let l=d?0:this.a.offsetHeight;this.dropdown.style.top=`${i+l}px`,this.dropdown.style.left=`${t.left+document.body.scrollLeft}px`,this._a4=()=>this._2(),window.addEventListener("scroll",this._a4)}}}_p(){this._a0=n=>{let s=n.target?.closest(".iti__country");s&&this._x(s,!1)},this.countryList.addEventListener("mouseover",this._a0),this._a1=n=>{let s=n.target?.closest(".iti__country");s&&this._1(s)},this.countryList.addEventListener("click",this._a1);let t=!0;this._a2=()=>{t||this._2(),t=!1},document.documentElement.addEventListener("click",this._a2);let e="",i=null;if(this._a3=n=>{["ArrowUp","ArrowDown","Enter","Escape"].includes(n.key)&&(n.preventDefault(),n.stopPropagation(),n.key==="ArrowUp"||n.key==="ArrowDown"?this._q(n.key):n.key==="Enter"?this._r():n.key==="Escape"&&this._2()),!this.d.countrySearch&&/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(n.key)&&(n.stopPropagation(),i&&clearTimeout(i),e+=n.key.toLowerCase(),this._s(e),i=setTimeout(()=>{e=""},1e3))},document.addEventListener("keydown",this._a3),this.d.countrySearch){let n=()=>{let r=this.searchInput.value.trim();r?this._p3(r):this._p3("",!0)},s=null;this._a7=()=>{s&&clearTimeout(s),s=setTimeout(()=>{n(),s=null},100)},this.searchInput.addEventListener("input",this._a7),this.searchInput.addEventListener("click",r=>r.stopPropagation())}}_p3(t,e=!1){let i=!0;this.countryList.innerHTML="";let n=_(t);for(let s=0;s<this.p.length;s++){let r=this.p[s],d=_(r.name),l=`+${r.dialCode}`;if(e||d.includes(n)||l.includes(n)||r.iso2.includes(n)){let a=r.nodeById[this.id];a&&this.countryList.appendChild(a),i&&(this._x(a,!1),i=!1)}}this.countryList.scrollTop=0,this._p4()}_p4(){let{i18n:t}=this.d,e=this.countryList.childElementCount,i;e===0?i=t.zeroSearchResults||"No results found":e===1?i=t.oneSearchResult||"1 result found":i=t.multipleSearchResults?t.multipleSearchResults.replace("${count}",e.toString()):`${e} results found`,this.searchResultsA11yText.textContent=i}_q(t){let e=t==="ArrowUp"?this.c?.previousElementSibling:this.c?.nextElementSibling;if(e?e.classList.contains("iti__divider")&&(e=t==="ArrowUp"?e.previousElementSibling:e.nextElementSibling):this.countryList.childElementCount>1&&(e=t==="ArrowUp"?this.countryList.lastElementChild:this.countryList.firstElementChild),e){this._3(e,!1);let i=!this.d.countrySearch;this._x(e,i)}}_r(){this.c&&this._1(this.c)}_s(t){for(let e=0;e<this.p.length;e++){let i=this.p[e];if(i.name.substr(0,t.length).toLowerCase()===t){let s=i.nodeById[this.id];this._x(s,!1),this._3(s,!0);break}}}_u(t){let e=t;if(this.d.formatOnDisplay&&window.intlTelInputUtils&&this.s){let i=this.d.nationalMode||e.charAt(0)!=="+"&&!this.d.showSelectedDialCode,{NATIONAL:n,INTERNATIONAL:s}=window.intlTelInputUtils.numberFormat,r=i?n:s;e=window.intlTelInputUtils.formatNumber(e,this.s.iso2,r)}e=this._7(e),this.a.value=e}_v(t){let e=t.indexOf("+"),i=e?t.substring(e):t,n=this.s.dialCode;i&&n==="1"&&i.charAt(0)!=="+"&&(i.charAt(0)!=="1"&&(i=`1${i}`),i=`+${i}`),this.d.showSelectedDialCode&&n&&i.charAt(0)!=="+"&&(i=`+${n}${i}`);let r=this._5(i,!0),d=f(i),l=null;if(r){let a=this.q[f(r)],p=a.indexOf(this.s.iso2)!==-1&&d.length<=r.length-1;if(!(n==="1"&&L(d))&&!p){for(let u=0;u<a.length;u++)if(a[u]){l=a[u];break}}}else i.charAt(0)==="+"&&d.length?l="":(!i||i==="+")&&!this.s.iso2&&(l=this.j);return l!==null?this._z(l):!1}_x(t,e){let i=this.c;i&&(i.classList.remove("iti__highlight"),i.setAttribute("aria-selected","false")),this.c=t,this.c.classList.add("iti__highlight"),this.c.setAttribute("aria-selected","true"),this.selectedCountry.setAttribute("aria-activedescendant",t.getAttribute("id")||""),this.d.countrySearch&&this.searchInput.setAttribute("aria-activedescendant",t.getAttribute("id")||""),e&&this.c.focus()}_y(t,e){for(let i=0;i<this.p.length;i++)if(this.p[i].iso2===t)return this.p[i];if(e)return null;throw new Error(`No country data for '${t}'`)}_z(t){let{allowDropdown:e,showSelectedDialCode:i,showFlags:n,countrySearch:s,i18n:r}=this.d,d=this.s.iso2?this.s:{};if(this.s=t?this._y(t,!1)||{}:{},this.s.iso2&&(this.j=this.s.iso2),this.l){let l="",a="";t?n&&(l=`iti__flag iti__${t}`,a=`${this.s.name} +${this.s.dialCode}`):(l="iti__flag iti__globe",a=r.noCountrySelected||"No country selected"),this.l.className=l,this.selectedCountryA11yText.textContent=a}if(this._z3(t,i),i){let l=this.s.dialCode?`+${this.s.dialCode}`:"";this.t.innerHTML=l;let a=this.selectedCountry.offsetWidth||this._z2();this.isRTL?this.a.style.paddingRight=`${a+6}px`:this.a.style.paddingLeft=`${a+6}px`}if(this._0(),this._updateMaxLength(),e&&!s){let l=this.b;if(l&&(l.classList.remove("iti__active"),l.setAttribute("aria-selected","false")),t){let a=this.countryList.querySelector(`#iti-${this.id}__item-${t}-preferred`)||this.countryList.querySelector(`#iti-${this.id}__item-${t}`);a&&(a.setAttribute("aria-selected","true"),a.classList.add("iti__active"),this.b=a)}}return d.iso2!==t}_updateMaxLength(){if(this.d.strictMode&&window.intlTelInputUtils)if(this.s.iso2){let t=window.intlTelInputUtils.numberType[this.d.placeholderNumberType],e=window.intlTelInputUtils.getExampleNumber(this.s.iso2,!1,t,!0),i=e;for(;window.intlTelInputUtils.isPossibleNumber(e,this.s.iso2);)i=e,e+="0";let n=window.intlTelInputUtils.getCoreNumber(i,this.s.iso2);this.maxCoreNumberLength=n.length}else this.maxCoreNumberLength=null}_z3(t=null,e){if(!this.selectedCountry)return;let i;t&&!e?i=`${this.s.name}: +${this.s.dialCode}`:t?i=this.s.name:i="Unknown",this.selectedCountry.setAttribute("title",i)}_z2(){if(this.a.parentNode){let t=this.a.parentNode.cloneNode(!1);t.style.visibility="hidden",document.body.appendChild(t);let e=this.k.cloneNode();t.appendChild(e);let i=this.selectedCountry.cloneNode(!0);e.appendChild(i);let n=i.offsetWidth;return document.body.removeChild(t),n}return 0}_0(){let{autoPlaceholder:t,placeholderNumberType:e,nationalMode:i,customPlaceholder:n}=this.d,s=t==="aggressive"||!this.e&&t==="polite";if(window.intlTelInputUtils&&s){let r=window.intlTelInputUtils.numberType[e],d=this.s.iso2?window.intlTelInputUtils.getExampleNumber(this.s.iso2,i,r):"";d=this._7(d),typeof n=="function"&&(d=n(d,this.s)),this.a.setAttribute("placeholder",d)}}_1(t){let e=this._z(t.getAttribute("data-country-code"));this._2(),this._4(t.getAttribute("data-dial-code")),this.a.focus(),e&&this._8()}_2(){this.dropdownContent.classList.add("iti__hide"),this.selectedCountry.setAttribute("aria-expanded","false"),this.selectedCountry.removeAttribute("aria-activedescendant"),this.c&&this.c.setAttribute("aria-selected","false"),this.d.countrySearch&&this.searchInput.removeAttribute("aria-activedescendant"),this.u.classList.remove("iti__arrow--up"),document.removeEventListener("keydown",this._a3),this.d.countrySearch&&this.searchInput.removeEventListener("input",this._a7),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._trigger("close:countrydropdown")}_3(t,e){let i=this.countryList,n=document.documentElement.scrollTop,s=i.offsetHeight,r=i.getBoundingClientRect().top+n,d=r+s,l=t.offsetHeight,a=t.getBoundingClientRect().top+n,p=a+l,c=a-r+i.scrollTop,u=s/2-l/2;if(a<r)e&&(c-=u),i.scrollTop=c;else if(p>d){e&&(c+=u);let m=s-l;i.scrollTop=c-m}}_4(t){let e=this.a.value,i=`+${t}`,n;if(e.charAt(0)==="+"){let s=this._5(e);s?n=e.replace(s,i):n=i,this.a.value=n}}_5(t,e){let i="";if(t.charAt(0)==="+"){let n="";for(let s=0;s<t.length;s++){let r=t.charAt(s);if(!isNaN(parseInt(r,10))){if(n+=r,e)this.q[n]&&(i=t.substr(0,s+1));else if(this.dialCodes[n]){i=t.substr(0,s+1);break}if(n.length===this.dialCodeMaxLen)break}}}return i}_6(){let t=this.a.value.trim(),{dialCode:e}=this.s,i,n=f(t);return this.d.showSelectedDialCode&&!this.d.nationalMode&&t.charAt(0)!=="+"&&e&&n?i=`+${e}`:i="",i+t}_7(t){let e=t;if(this.d.showSelectedDialCode){let i=this._5(e);if(i){i=`+${this.s.dialCode}`;let n=e[i.length]===" "||e[i.length]==="-"?i.length+1:i.length;e=e.substr(n)}}return this._j2(e)}_8(){this._trigger("countrychange")}_9(){let t=this._6(),e=window.intlTelInputUtils?window.intlTelInputUtils.formatNumberAsYouType(t,this.s.iso2):t,{dialCode:i}=this.s;return this.d.showSelectedDialCode&&!this.d.nationalMode&&this.a.value.charAt(0)!=="+"&&e.includes(`+${i}`)?(e.split(`+${i}`)[1]||"").trim():e}handleAutoCountry(){this.d.initialCountry==="auto"&&window.intlTelInputGlobals.autoCountry&&(this.j=window.intlTelInputGlobals.autoCountry,this.a.value||this.setCountry(this.j),this.h())}handleUtils(){window.intlTelInputUtils&&(this.a.value&&this._u(this.a.value),this.s.iso2&&(this._0(),this._updateMaxLength())),this.i0()}destroy(){if(this.d.allowDropdown){this._2(),this.selectedCountry.removeEventListener("click",this._a10),this.k.removeEventListener("keydown",this._a11);let i=this.a.closest("label");i&&i.removeEventListener("click",this._a9)}let{form:t}=this.a;this._a14&&t&&t.removeEventListener("submit",this._a14),this.a.removeEventListener("input",this._a12),this._handleKeydownEvent&&this.a.removeEventListener("keydown",this._handleKeydownEvent),this.a.removeAttribute("data-intl-tel-input-id");let e=this.a.parentNode;e?.parentNode?.insertBefore(this.a,e),e?.parentNode?.removeChild(e),delete window.intlTelInputGlobals.instances[this.id]}getExtension(){return window.intlTelInputUtils?window.intlTelInputUtils.getExtension(this._6(),this.s.iso2):""}getNumber(t){if(window.intlTelInputUtils){let{iso2:e}=this.s;return window.intlTelInputUtils.formatNumber(this._6(),e,t)}return""}getNumberType(){return window.intlTelInputUtils?window.intlTelInputUtils.getNumberType(this._6(),this.s.iso2):-99}getSelectedCountryData(){return this.s}getValidationError(){if(window.intlTelInputUtils){let{iso2:t}=this.s;return window.intlTelInputUtils.getValidationError(this._6(),t)}return-99}isValidNumber(t=!0){let e=this._6();return/\p{L}/u.test(e)?!1:window.intlTelInputUtils?window.intlTelInputUtils.isPossibleNumber(e,this.s.iso2,t):null}isValidNumberPrecise(){let t=this._6();return/\p{L}/u.test(t)?!1:window.intlTelInputUtils?window.intlTelInputUtils.isValidNumber(t,this.s.iso2):null}setCountry(t){let e=t.toLowerCase();this.s.iso2!==e&&(this._z(e),this._4(this.s.dialCode),this._8())}setNumber(t){let e=this._v(t);this._u(t),e&&this._8()}setPlaceholderNumberType(t){this.d.placeholderNumberType=t,this._0()}},F=(o,t,e)=>{let i=document.createElement("script");i.onload=()=>{y("handleUtils"),t&&t()},i.onerror=()=>{y("rejectUtilsScriptPromise"),e&&e()},i.className="iti-load-utils",i.async=!0,i.src=o,document.body.appendChild(i)},O=o=>!window.intlTelInputUtils&&!window.intlTelInputGlobals.startedLoadingUtilsScript?(window.intlTelInputGlobals.startedLoadingUtilsScript=!0,new Promise((t,e)=>F(o,t,e))):null;if(typeof window=="object"){let o={defaults:T,documentReady:()=>document.readyState==="complete",getCountryData:()=>C,getInstance:t=>{let e=t.getAttribute("data-intl-tel-input-id");return e?o.instances[e]:null},instances:{},loadUtils:O,version:"21.0.9"};window.intlTelInputGlobals=o}var R=(o,t)=>{let e=new b(o,t);return e._init(),o.setAttribute("data-intl-tel-input-id",e.id.toString()),window.intlTelInputGlobals.instances[e.id]=e,e},B=R;return M(z);})();
16
+ var factoryOutput=(()=>{var v=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var D=Object.prototype.hasOwnProperty;var A=(o,t)=>{for(var e in t)v(o,e,{get:t[e],enumerable:!0})},N=(o,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of S(t))!D.call(o,n)&&n!==e&&v(o,n,{get:()=>t[n],enumerable:!(i=E(t,n))||i.enumerable});return o};var M=o=>N(v({},"__esModule",{value:!0}),o);var z={};A(z,{Iti:()=>b,default:()=>B});var w=[["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\xF4te d\u2019Ivoire","ci","225"],["Croatia","hr","385"],["Cuba","cu","53"],["Cura\xE7ao","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\xE9union","re","262",0],["Romania","ro","40"],["Russia","ru","7",0],["Rwanda","rw","250"],["Samoa","ws","685"],["San Marino","sm","378"],["S\xE3o Tom\xE9 & Pr\xEDncipe","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\xE9lemy","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"],["\xC5land Islands","ax","358",1,["18"]]],I=[];for(let o=0;o<w.length;o++){let t=w[o];I[o]={name:t[0],iso2:t[1],dialCode:t[2],priority:t[3]||0,areaCodes:t[4]||null,nodeById:{}}}var C=I;var k=0,T={allowDropdown:!0,autoPlaceholder:"polite",countrySearch:!0,containerClass:"",customPlaceholder:null,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,strictMode:!1,useFullscreenPopup:typeof navigator<"u"&&typeof window<"u"?/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||window.innerWidth<=500:!1,utilsScript:""},x=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"],f=o=>o.replace(/\D/g,""),_=(o="")=>o.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),P=(o,t,e)=>{e&&!o.classList.contains(t)?o.classList.add(t):!e&&o.classList.contains(t)&&o.classList.remove(t)},L=o=>{let t=f(o);if(t.charAt(0)==="1"){let e=t.substr(1,3);return x.indexOf(e)!==-1}return!1},H=(o,t)=>o.name<t.name?-1:o.name>t.name?1:0,U=(o,t,e,i)=>{if(e===0&&!i)return 0;let n=0;for(let s=0;s<t.length;s++){if(/[+0-9]/.test(t[s])&&n++,n===o&&!i)return s+1;if(i&&n===o+1)return s}return t.length},h=(o,t,e)=>{let i=document.createElement(o);return t&&Object.entries(t).forEach(([n,s])=>i.setAttribute(n,s)),e&&e.appendChild(i),i},y=o=>{let{instances:t}=window.intlTelInputGlobals;Object.values(t).forEach(e=>e[o]())},b=class{id;promise;telInput;activeItem;highlightedItem;options;hadInitialPlaceholder;isRTL;selectedCountryData;countries;dialCodeMaxLen;dialCodeToIso2Map;dialCodes;preferredCountries;countryContainer;selectedCountry;selectedCountryInner;selectedCountryA11yText;selectedDialCode;dropdownArrow;dropdownContent;searchInput;searchResultsA11yText;countryList;dropdown;hiddenInput;hiddenInputCountry;maxCoreNumberLength;defaultCountry;_a14;_a9;_a10;_a11;_a12;_handleKeydownEvent;_a4;_a0;_a1;_a2;_a3;_a7;resolveAutoCountryPromise;rejectAutoCountryPromise;resolveUtilsScriptPromise;rejectUtilsScriptPromise;constructor(t,e={}){this.id=k++,this.a=t,this.b=null,this.c=null,this.d=Object.assign({},T,e),this.e=!!t.getAttribute("placeholder")}_init(){this.d.useFullscreenPopup&&(this.d.fixDropdownWidth=!1),this.d.countrySearch&&!this.d.useFullscreenPopup&&(this.d.fixDropdownWidth=!0);let t=this.d.allowDropdown&&!this.d.showSelectedDialCode;!this.d.showFlags&&t&&(this.d.showFlags=!0),this.d.useFullscreenPopup&&!this.d.dropdownContainer&&(this.d.dropdownContainer=document.body),this.isRTL=!!this.a.closest("[dir=rtl]");let e=new Promise((n,s)=>{this.h=n,this.i=s}),i=new Promise((n,s)=>{this.i0=n,this.i1=s});this.promise=Promise.all([e,i]),this.s={},this._b(),this._f(),this._h(),this._i(),this._i3()}_b(){this._d(),this._d2(),this._e(),this._d0(),(this.d.onlyCountries.length||this.d.i18n)&&this.p.sort(H)}_c(t,e,i){e.length>this.dialCodeMaxLen&&(this.dialCodeMaxLen=e.length),this.q.hasOwnProperty(e)||(this.q[e]=[]);for(let s=0;s<this.q[e].length;s++)if(this.q[e][s]===t)return;let n=i!==void 0?i:this.q[e].length;this.q[e][n]=t}_d(){let{onlyCountries:t,excludeCountries:e}=this.d;if(t.length){let i=t.map(n=>n.toLowerCase());this.p=C.filter(n=>i.indexOf(n.iso2)>-1)}else if(e.length){let i=e.map(n=>n.toLowerCase());this.p=C.filter(n=>i.indexOf(n.iso2)===-1)}else this.p=C}_d0(){for(let t=0;t<this.p.length;t++){let e=this.p[t].iso2.toLowerCase();this.d.i18n.hasOwnProperty(e)&&(this.p[t].name=this.d.i18n[e])}}_d2(){this.dialCodes={},this.dialCodeMaxLen=0,this.q={};for(let t=0;t<this.p.length;t++){let e=this.p[t];this.dialCodes[e.dialCode]||(this.dialCodes[e.dialCode]=!0),this._c(e.iso2,e.dialCode,e.priority)}for(let t=0;t<this.p.length;t++){let e=this.p[t];if(e.areaCodes){let i=this.q[e.dialCode][0];for(let n=0;n<e.areaCodes.length;n++){let s=e.areaCodes[n];for(let r=1;r<s.length;r++){let d=e.dialCode+s.substr(0,r);this._c(i,d),this._c(e.iso2,d)}this._c(e.iso2,e.dialCode+s)}}}}_e(){this.preferredCountries=[];for(let t=0;t<this.d.preferredCountries.length;t++){let e=this.d.preferredCountries[t].toLowerCase(),i=this._y(e,!0);i&&this.preferredCountries.push(i)}}_f(){this.a.classList.add("iti__tel-input"),!this.a.hasAttribute("autocomplete")&&!(this.a.form&&this.a.form.hasAttribute("autocomplete"))&&this.a.setAttribute("autocomplete","off");let{allowDropdown:t,showSelectedDialCode:e,showFlags:i,containerClass:n,hiddenInput:s,dropdownContainer:r,fixDropdownWidth:d,useFullscreenPopup:l,countrySearch:a,i18n:p}=this.d,c="iti";t&&(c+=" iti--allow-dropdown"),e&&(c+=" iti--show-selected-dial-code"),i&&(c+=" iti--show-flags"),n&&(c+=` ${n}`),l||(c+=" iti--inline-dropdown");let u=h("div",{class:c});if(this.a.parentNode?.insertBefore(u,this.a),(i||e)&&(this.k=h("div",{class:"iti__country-container"},u),this.selectedCountry=h("button",{type:"button",class:"iti__selected-country",...t&&{"aria-expanded":"false","aria-label":this.d.i18n.selectedCountryAriaLabel||"Selected country","aria-haspopup":a?"true":"listbox","aria-controls":a?`iti-${this.id}__dropdown-content`:`iti-${this.id}__country-listbox`,...a?{role:"combobox"}:{}}},this.k),this.l=h("div",null,this.selectedCountry),this.selectedCountryA11yText=h("span",{class:"iti__a11y-text"},this.l)),u.appendChild(this.a),this.selectedCountry&&this.a.disabled&&this.selectedCountry.setAttribute("aria-disabled","true"),e&&(this.t=h("div",{class:"iti__selected-dial-code"},this.selectedCountry)),t){this.a.disabled||this.selectedCountry.setAttribute("tabindex","0"),this.u=h("div",{class:"iti__arrow","aria-hidden":"true"},this.selectedCountry);let m=d?"":"iti--flexible-dropdown-width";if(this.dropdownContent=h("div",{id:`iti-${this.id}__dropdown-content`,class:`iti__dropdown-content iti__hide ${m}`}),a&&(this.searchInput=h("input",{type:"text",class:"iti__search-input",placeholder:p.searchPlaceholder||"Search",role:"combobox","aria-expanded":"true","aria-label":p.searchPlaceholder||"Search","aria-controls":`iti-${this.id}__country-listbox`,"aria-autocomplete":"list",autocomplete:"off"},this.dropdownContent),this.searchResultsA11yText=h("span",{class:"iti__a11y-text"},this.dropdownContent)),this.countryList=h("ul",{class:"iti__country-list",id:`iti-${this.id}__country-listbox`,role:"listbox","aria-label":p.countryListAriaLabel||"List of countries"},this.dropdownContent),this.preferredCountries.length&&!a&&(this._g(this.preferredCountries,"iti__preferred",!0),h("li",{class:"iti__divider","aria-hidden":"true"},this.countryList)),this._g(this.p,"iti__standard"),a&&this._p4(),r){let g="iti iti--container";l?g+=" iti--fullscreen-popup":g+=" iti--inline-dropdown",a&&(g+=" iti--country-search"),this.dropdown=h("div",{class:g}),this.dropdown.appendChild(this.dropdownContent)}else this.k.appendChild(this.dropdownContent)}if(s){let m=this.a.getAttribute("name")||"",g=s(m);g.phone&&(this.hiddenInput=h("input",{type:"hidden",name:g.phone}),u.appendChild(this.hiddenInput)),g.country&&(this.hiddenInputCountry=h("input",{type:"hidden",name:g.country}),u.appendChild(this.hiddenInputCountry))}}_g(t,e,i){for(let n=0;n<t.length;n++){let s=t[n],r=i?"-preferred":"",d=h("li",{id:`iti-${this.id}__item-${s.iso2}${r}`,class:`iti__country ${e}`,tabindex:"-1",role:"option","data-dial-code":s.dialCode,"data-country-code":s.iso2,"aria-selected":"false"},this.countryList);s.nodeById[this.id]=d;let l="";this.d.showFlags&&(l+=`<div class='iti__flag-box'><div class='iti__flag iti__${s.iso2}'></div></div>`),l+=`<span class='iti__country-name'>${s.name}</span>`,l+=`<span class='iti__dial-code'>+${s.dialCode}</span>`,d.insertAdjacentHTML("beforeend",l)}}_h(t=!1){let e=this.a.getAttribute("value"),i=this.a.value,s=e&&e.charAt(0)==="+"&&(!i||i.charAt(0)!=="+")?e:i,r=this._5(s),d=L(s),{initialCountry:l}=this.d;if(r&&!d)this._v(s);else if(l!=="auto"||t){let a=l?l.toLowerCase():"";a&&this._y(a,!0)?this._z(a):r&&d?this._z("us"):this._z()}s&&this._u(s)}_i(){this._j(),this.d.allowDropdown&&this._i2(),(this.hiddenInput||this.hiddenInputCountry)&&this.a.form&&this._i0()}_i0(){this._a14=()=>{this.hiddenInput&&(this.hiddenInput.value=this.getNumber()),this.hiddenInputCountry&&(this.hiddenInputCountry.value=this.getSelectedCountryData().iso2||"")},this.a.form?.addEventListener("submit",this._a14)}_i2(){this._a9=e=>{this.dropdownContent.classList.contains("iti__hide")?this.a.focus():e.preventDefault()};let t=this.a.closest("label");t&&t.addEventListener("click",this._a9),this._a10=()=>{this.dropdownContent.classList.contains("iti__hide")&&!this.a.disabled&&!this.a.readOnly&&this._n()},this.selectedCountry.addEventListener("click",this._a10),this._a11=e=>{this.dropdownContent.classList.contains("iti__hide")&&["ArrowUp","ArrowDown"," ","Enter"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),this._n()),e.key==="Tab"&&this._2()},this.k.addEventListener("keydown",this._a11)}_i3(){this.d.utilsScript&&!window.intlTelInputUtils?window.intlTelInputGlobals.documentReady()?window.intlTelInputGlobals.loadUtils(this.d.utilsScript):window.addEventListener("load",()=>{window.intlTelInputGlobals.loadUtils(this.d.utilsScript)}):this.i0(),this.d.initialCountry==="auto"&&!this.s.iso2?this._i4():this.h()}_i4(){window.intlTelInputGlobals.autoCountry?this.handleAutoCountry():window.intlTelInputGlobals.startedLoadingAutoCountry||(window.intlTelInputGlobals.startedLoadingAutoCountry=!0,typeof this.d.geoIpLookup=="function"&&this.d.geoIpLookup((t="")=>{let e=t.toLowerCase();e&&this._y(e,!0)?(window.intlTelInputGlobals.autoCountry=e,setTimeout(()=>y("handleAutoCountry"))):(this._h(!0),y("rejectAutoCountryPromise"))},()=>{this._h(!0),y("rejectAutoCountryPromise")}))}_j(){let{strictMode:t,formatAsYouType:e}=this.d,i=!1;this._a12=n=>{this._v(this.a.value)&&this._8();let s=n&&n.data&&/[^+0-9]/.test(n.data),r=n&&n.inputType==="insertFromPaste"&&this.a.value;if(s||r&&!t?i=!0:/[^+0-9]/.test(this.a.value)||(i=!1),e&&!i){let d=this.a.selectionStart||0,a=this.a.value.substring(0,d).replace(/[^+0-9]/g,"").length,p=n&&n.inputType==="deleteContentForward",c=this._9(),u=U(a,c,d,p);this.a.value=c,this.a.setSelectionRange(u,u)}},this.a.addEventListener("input",this._a12),t&&(this._handleKeydownEvent=n=>{if(n.key.length===1&&!n.altKey&&!n.ctrlKey&&!n.metaKey){let s=this.a.selectionStart===0&&n.key==="+",r=/^[0-9]$/.test(n.key),d=s||r,l=this._6(),a=window.intlTelInputUtils.getCoreNumber(l,this.s.iso2),p=this.maxCoreNumberLength&&a.length>=this.maxCoreNumberLength;(!d||p)&&n.preventDefault()}},this.a.addEventListener("keydown",this._handleKeydownEvent))}_j2(t){let e=parseInt(this.a.getAttribute("maxlength")||"",10);return e&&t.length>e?t.substr(0,e):t}_trigger(t){let e=new Event(t,{bubbles:!0,cancelable:!0});this.a.dispatchEvent(e)}_n(){let{fixDropdownWidth:t,countrySearch:e}=this.d;if(t&&(this.dropdownContent.style.width=`${this.a.offsetWidth}px`),this.dropdownContent.classList.remove("iti__hide"),this.selectedCountry.setAttribute("aria-expanded","true"),this._o(),this.b&&!e)this._x(this.b,!1),this._3(this.b,!0);else{let i=this.countryList.firstElementChild;i&&(this._x(i,!1),this.countryList.scrollTop=0),e&&this.searchInput.focus()}this._p(),this.u.classList.add("iti__arrow--up"),this._trigger("open:countrydropdown")}_o(){if(this.d.dropdownContainer&&this.d.dropdownContainer.appendChild(this.dropdown),!this.d.useFullscreenPopup){let t=this.a.getBoundingClientRect(),e=document.documentElement.scrollTop,i=t.top+e,n=this.dropdownContent.offsetHeight,s=i+this.a.offsetHeight+n<e+window.innerHeight,r=i-n>e,d=!this.d.countrySearch&&!s&&r;if(P(this.dropdownContent,"iti__dropdown-content--dropup",d),this.d.dropdownContainer){let l=d?0:this.a.offsetHeight;this.dropdown.style.top=`${i+l}px`,this.dropdown.style.left=`${t.left+document.body.scrollLeft}px`,this._a4=()=>this._2(),window.addEventListener("scroll",this._a4)}}}_p(){this._a0=n=>{let s=n.target?.closest(".iti__country");s&&this._x(s,!1)},this.countryList.addEventListener("mouseover",this._a0),this._a1=n=>{let s=n.target?.closest(".iti__country");s&&this._1(s)},this.countryList.addEventListener("click",this._a1);let t=!0;this._a2=()=>{t||this._2(),t=!1},document.documentElement.addEventListener("click",this._a2);let e="",i=null;if(this._a3=n=>{["ArrowUp","ArrowDown","Enter","Escape"].includes(n.key)&&(n.preventDefault(),n.stopPropagation(),n.key==="ArrowUp"||n.key==="ArrowDown"?this._q(n.key):n.key==="Enter"?this._r():n.key==="Escape"&&this._2()),!this.d.countrySearch&&/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(n.key)&&(n.stopPropagation(),i&&clearTimeout(i),e+=n.key.toLowerCase(),this._s(e),i=setTimeout(()=>{e=""},1e3))},document.addEventListener("keydown",this._a3),this.d.countrySearch){let n=()=>{let r=this.searchInput.value.trim();r?this._p3(r):this._p3("",!0)},s=null;this._a7=()=>{s&&clearTimeout(s),s=setTimeout(()=>{n(),s=null},100)},this.searchInput.addEventListener("input",this._a7),this.searchInput.addEventListener("click",r=>r.stopPropagation())}}_p3(t,e=!1){let i=!0;this.countryList.innerHTML="";let n=_(t);for(let s=0;s<this.p.length;s++){let r=this.p[s],d=_(r.name),l=`+${r.dialCode}`;if(e||d.includes(n)||l.includes(n)||r.iso2.includes(n)){let a=r.nodeById[this.id];a&&this.countryList.appendChild(a),i&&(this._x(a,!1),i=!1)}}this.countryList.scrollTop=0,this._p4()}_p4(){let{i18n:t}=this.d,e=this.countryList.childElementCount,i;e===0?i=t.zeroSearchResults||"No results found":e===1?i=t.oneSearchResult||"1 result found":i=t.multipleSearchResults?t.multipleSearchResults.replace("${count}",e.toString()):`${e} results found`,this.searchResultsA11yText.textContent=i}_q(t){let e=t==="ArrowUp"?this.c?.previousElementSibling:this.c?.nextElementSibling;if(e?e.classList.contains("iti__divider")&&(e=t==="ArrowUp"?e.previousElementSibling:e.nextElementSibling):this.countryList.childElementCount>1&&(e=t==="ArrowUp"?this.countryList.lastElementChild:this.countryList.firstElementChild),e){this._3(e,!1);let i=!this.d.countrySearch;this._x(e,i)}}_r(){this.c&&this._1(this.c)}_s(t){for(let e=0;e<this.p.length;e++){let i=this.p[e];if(i.name.substr(0,t.length).toLowerCase()===t){let s=i.nodeById[this.id];this._x(s,!1),this._3(s,!0);break}}}_u(t){let e=t;if(this.d.formatOnDisplay&&window.intlTelInputUtils&&this.s){let i=this.d.nationalMode||e.charAt(0)!=="+"&&!this.d.showSelectedDialCode,{NATIONAL:n,INTERNATIONAL:s}=window.intlTelInputUtils.numberFormat,r=i?n:s;e=window.intlTelInputUtils.formatNumber(e,this.s.iso2,r)}e=this._7(e),this.a.value=e}_v(t){let e=t.indexOf("+"),i=e?t.substring(e):t,n=this.s.dialCode;i&&n==="1"&&i.charAt(0)!=="+"&&(i.charAt(0)!=="1"&&(i=`1${i}`),i=`+${i}`),this.d.showSelectedDialCode&&n&&i.charAt(0)!=="+"&&(i=`+${n}${i}`);let r=this._5(i,!0),d=f(i),l=null;if(r){let a=this.q[f(r)],p=a.indexOf(this.s.iso2)!==-1&&d.length<=r.length-1;if(!(n==="1"&&L(d))&&!p){for(let u=0;u<a.length;u++)if(a[u]){l=a[u];break}}}else i.charAt(0)==="+"&&d.length?l="":(!i||i==="+")&&!this.s.iso2&&(l=this.j);return l!==null?this._z(l):!1}_x(t,e){let i=this.c;i&&(i.classList.remove("iti__highlight"),i.setAttribute("aria-selected","false")),this.c=t,this.c.classList.add("iti__highlight"),this.c.setAttribute("aria-selected","true"),this.selectedCountry.setAttribute("aria-activedescendant",t.getAttribute("id")||""),this.d.countrySearch&&this.searchInput.setAttribute("aria-activedescendant",t.getAttribute("id")||""),e&&this.c.focus()}_y(t,e){for(let i=0;i<this.p.length;i++)if(this.p[i].iso2===t)return this.p[i];if(e)return null;throw new Error(`No country data for '${t}'`)}_z(t){let{allowDropdown:e,showSelectedDialCode:i,showFlags:n,countrySearch:s,i18n:r}=this.d,d=this.s.iso2?this.s:{};if(this.s=t?this._y(t,!1)||{}:{},this.s.iso2&&(this.j=this.s.iso2),this.l){let l="",a="";t?n&&(l=`iti__flag iti__${t}`,a=`${this.s.name} +${this.s.dialCode}`):(l="iti__flag iti__globe",a=r.noCountrySelected||"No country selected"),this.l.className=l,this.selectedCountryA11yText.textContent=a}if(this._z3(t,i),i){let l=this.s.dialCode?`+${this.s.dialCode}`:"";this.t.innerHTML=l;let a=this.selectedCountry.offsetWidth||this._z2();this.isRTL?this.a.style.paddingRight=`${a+6}px`:this.a.style.paddingLeft=`${a+6}px`}if(this._0(),this._updateMaxLength(),e&&!s){let l=this.b;if(l&&(l.classList.remove("iti__active"),l.setAttribute("aria-selected","false")),t){let a=this.countryList.querySelector(`#iti-${this.id}__item-${t}-preferred`)||this.countryList.querySelector(`#iti-${this.id}__item-${t}`);a&&(a.setAttribute("aria-selected","true"),a.classList.add("iti__active"),this.b=a)}}return d.iso2!==t}_updateMaxLength(){if(this.d.strictMode&&window.intlTelInputUtils)if(this.s.iso2){let t=window.intlTelInputUtils.numberType[this.d.placeholderNumberType],e=window.intlTelInputUtils.getExampleNumber(this.s.iso2,!1,t,!0),i=e;for(;window.intlTelInputUtils.isPossibleNumber(e,this.s.iso2);)i=e,e+="0";let n=window.intlTelInputUtils.getCoreNumber(i,this.s.iso2);this.maxCoreNumberLength=n.length}else this.maxCoreNumberLength=null}_z3(t=null,e){if(!this.selectedCountry)return;let i;t&&!e?i=`${this.s.name}: +${this.s.dialCode}`:t?i=this.s.name:i="Unknown",this.selectedCountry.setAttribute("title",i)}_z2(){if(this.a.parentNode){let t=this.a.parentNode.cloneNode(!1);t.style.visibility="hidden",document.body.appendChild(t);let e=this.k.cloneNode();t.appendChild(e);let i=this.selectedCountry.cloneNode(!0);e.appendChild(i);let n=i.offsetWidth;return document.body.removeChild(t),n}return 0}_0(){let{autoPlaceholder:t,placeholderNumberType:e,nationalMode:i,customPlaceholder:n}=this.d,s=t==="aggressive"||!this.e&&t==="polite";if(window.intlTelInputUtils&&s){let r=window.intlTelInputUtils.numberType[e],d=this.s.iso2?window.intlTelInputUtils.getExampleNumber(this.s.iso2,i,r):"";d=this._7(d),typeof n=="function"&&(d=n(d,this.s)),this.a.setAttribute("placeholder",d)}}_1(t){let e=this._z(t.getAttribute("data-country-code"));this._2(),this._4(t.getAttribute("data-dial-code")),this.a.focus(),e&&this._8()}_2(){this.dropdownContent.classList.add("iti__hide"),this.selectedCountry.setAttribute("aria-expanded","false"),this.selectedCountry.removeAttribute("aria-activedescendant"),this.c&&this.c.setAttribute("aria-selected","false"),this.d.countrySearch&&this.searchInput.removeAttribute("aria-activedescendant"),this.u.classList.remove("iti__arrow--up"),document.removeEventListener("keydown",this._a3),this.d.countrySearch&&this.searchInput.removeEventListener("input",this._a7),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._trigger("close:countrydropdown")}_3(t,e){let i=this.countryList,n=document.documentElement.scrollTop,s=i.offsetHeight,r=i.getBoundingClientRect().top+n,d=r+s,l=t.offsetHeight,a=t.getBoundingClientRect().top+n,p=a+l,c=a-r+i.scrollTop,u=s/2-l/2;if(a<r)e&&(c-=u),i.scrollTop=c;else if(p>d){e&&(c+=u);let m=s-l;i.scrollTop=c-m}}_4(t){let e=this.a.value,i=`+${t}`,n;if(e.charAt(0)==="+"){let s=this._5(e);s?n=e.replace(s,i):n=i,this.a.value=n}}_5(t,e){let i="";if(t.charAt(0)==="+"){let n="";for(let s=0;s<t.length;s++){let r=t.charAt(s);if(!isNaN(parseInt(r,10))){if(n+=r,e)this.q[n]&&(i=t.substr(0,s+1));else if(this.dialCodes[n]){i=t.substr(0,s+1);break}if(n.length===this.dialCodeMaxLen)break}}}return i}_6(){let t=this.a.value.trim(),{dialCode:e}=this.s,i,n=f(t);return this.d.showSelectedDialCode&&!this.d.nationalMode&&t.charAt(0)!=="+"&&e&&n?i=`+${e}`:i="",i+t}_7(t){let e=t;if(this.d.showSelectedDialCode){let i=this._5(e);if(i){i=`+${this.s.dialCode}`;let n=e[i.length]===" "||e[i.length]==="-"?i.length+1:i.length;e=e.substr(n)}}return this._j2(e)}_8(){this._trigger("countrychange")}_9(){let t=this._6(),e=window.intlTelInputUtils?window.intlTelInputUtils.formatNumberAsYouType(t,this.s.iso2):t,{dialCode:i}=this.s;return this.d.showSelectedDialCode&&!this.d.nationalMode&&this.a.value.charAt(0)!=="+"&&e.includes(`+${i}`)?(e.split(`+${i}`)[1]||"").trim():e}handleAutoCountry(){this.d.initialCountry==="auto"&&window.intlTelInputGlobals.autoCountry&&(this.j=window.intlTelInputGlobals.autoCountry,this.a.value||this.setCountry(this.j),this.h())}handleUtils(){window.intlTelInputUtils&&(this.a.value&&this._u(this.a.value),this.s.iso2&&(this._0(),this._updateMaxLength())),this.i0()}destroy(){if(this.d.allowDropdown){this._2(),this.selectedCountry.removeEventListener("click",this._a10),this.k.removeEventListener("keydown",this._a11);let i=this.a.closest("label");i&&i.removeEventListener("click",this._a9)}let{form:t}=this.a;this._a14&&t&&t.removeEventListener("submit",this._a14),this.a.removeEventListener("input",this._a12),this._handleKeydownEvent&&this.a.removeEventListener("keydown",this._handleKeydownEvent),this.a.removeAttribute("data-intl-tel-input-id");let e=this.a.parentNode;e?.parentNode?.insertBefore(this.a,e),e?.parentNode?.removeChild(e),delete window.intlTelInputGlobals.instances[this.id]}getExtension(){return window.intlTelInputUtils?window.intlTelInputUtils.getExtension(this._6(),this.s.iso2):""}getNumber(t){if(window.intlTelInputUtils){let{iso2:e}=this.s;return window.intlTelInputUtils.formatNumber(this._6(),e,t)}return""}getNumberType(){return window.intlTelInputUtils?window.intlTelInputUtils.getNumberType(this._6(),this.s.iso2):-99}getSelectedCountryData(){return this.s}getValidationError(){if(window.intlTelInputUtils){let{iso2:t}=this.s;return window.intlTelInputUtils.getValidationError(this._6(),t)}return-99}isValidNumber(t=!0){let e=this._6();return/\p{L}/u.test(e)?!1:window.intlTelInputUtils?window.intlTelInputUtils.isPossibleNumber(e,this.s.iso2,t):null}isValidNumberPrecise(){let t=this._6();return/\p{L}/u.test(t)?!1:window.intlTelInputUtils?window.intlTelInputUtils.isValidNumber(t,this.s.iso2):null}setCountry(t){let e=t.toLowerCase();this.s.iso2!==e&&(this._z(e),this._4(this.s.dialCode),this._8())}setNumber(t){let e=this._v(t);this._u(t),e&&this._8()}setPlaceholderNumberType(t){this.d.placeholderNumberType=t,this._0()}},F=(o,t,e)=>{let i=document.createElement("script");i.onload=()=>{y("handleUtils"),t&&t()},i.onerror=()=>{y("rejectUtilsScriptPromise"),e&&e()},i.className="iti-load-utils",i.async=!0,i.src=o,document.body.appendChild(i)},O=o=>!window.intlTelInputUtils&&!window.intlTelInputGlobals.startedLoadingUtilsScript?(window.intlTelInputGlobals.startedLoadingUtilsScript=!0,new Promise((t,e)=>F(o,t,e))):null;if(typeof window=="object"){let o={defaults:T,documentReady:()=>document.readyState==="complete",getCountryData:()=>C,getInstance:t=>{let e=t.getAttribute("data-intl-tel-input-id");return e?o.instances[e]:null},instances:{},loadUtils:O,version:"21.1.1"};window.intlTelInputGlobals=o}var R=(o,t)=>{let e=new b(o,t);return e._init(),o.setAttribute("data-intl-tel-input-id",e.id.toString()),window.intlTelInputGlobals.instances[e.id]=e,e},B=R;return M(z);})();
17
17
 
18
18
  // UMD
19
19
  return factoryOutput.default;
package/build/js/utils.js CHANGED
@@ -3,10 +3,10 @@
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,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
- 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 B(){}m(B,z);B.prototype.h=function(a,b){return 8==a.h?!!b:y.prototype.h.apply(this,arguments)};B.prototype.g=function(a,b){return B.ma.g.call(this,a,b)};function C(a,b){null!=a&&this.g.apply(this,arguments)}C.prototype.h="";C.prototype.set=function(a){this.h=""+a};C.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 D(a){a.h=""}C.prototype.toString=function(){return this.h};/*
6
+ var k=this||self;function m(a,b){a=a.split(".");var c=k;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 n(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 aa(a){const b=[];let c=0;for(const d in a)b[c++]=a[d];return b};var da=class{constructor(a){if(ba!==ba)throw Error("SafeUrl is not meant to be built directly");this.g=a}toString(){return this.g.toString()}},ba={};new da("about:invalid#zClosurez");new da("about:blank");const ea={};class fa{constructor(){if(ea!==ea)throw Error("SafeStyle is not meant to be built directly");}toString(){return"".toString()}}new fa;const ha={};class ia{constructor(){if(ha!==ha)throw Error("SafeStyleSheet is not meant to be built directly");}toString(){return"".toString()}}new ia;const ja={};class ka{constructor(){var a=k.trustedTypes&&k.trustedTypes.emptyHTML||"";if(ja!==ja)throw Error("SafeHtml is not meant to be built directly");this.g=a}toString(){return this.g.toString()}}new ka;function la(a,b){this.g=a;this.l=!!b.aa;this.h=b.i;this.s=b.type;this.o=!1;switch(this.h){case ma:case na:case oa:case pa:case qa:case ra:case sa:this.o=!0}this.j=b.defaultValue}var sa=1,ra=2,ma=3,na=4,oa=6,pa=16,qa=18;function ta(a,b){this.h=a;this.g={};for(a=0;a<b.length;a++){var c=b[a];this.g[c.g]=c}}function ua(a){a=aa(a.g);a.sort(function(b,c){return b.g-c.g});return a};function p(){this.h={};this.j=this.m().g;this.g=this.l=null}p.prototype.has=function(a){return q(this,a.g)};p.prototype.get=function(a,b){return r(this,a.g,b)};p.prototype.set=function(a,b){t(this,a.g,b)};p.prototype.add=function(a,b){va(this,a.g,b)};
7
+ function wa(a,b){for(var c=ua(a.m()),d=0;d<c.length;d++){var e=c[d],f=e.g;if(q(b,f)){a.g&&delete a.g[e.g];var g=11==e.h||10==e.h;if(e.l){e=u(b,f);for(var h=0;h<e.length;h++)va(a,f,g?e[h].clone():e[h])}else e=v(b,f),g?(g=v(a,f))?wa(g,e):t(a,f,e.clone()):t(a,f,e)}}}p.prototype.clone=function(){var a=new this.constructor;a!=this&&(a.h={},a.g&&(a.g={}),wa(a,this));return a};function q(a,b){return null!=a.h[b]}
8
+ function v(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 r(a,b,c){var d=v(a,b);return a.j[b].l?d[c||0]:d}function w(a,b){if(q(a,b))a=r(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
+ function u(a,b){return v(a,b)||[]}function x(a,b){return a.j[b].l?q(a,b)?a.h[b].length:0:q(a,b)?1:0}function t(a,b,c){a.h[b]=c;a.g&&(a.g[b]=c)}function va(a,b,c){a.h[b]||(a.h[b]=[]);a.h[b].push(c);a.g&&delete a.g[b]}function y(a,b){var c=[],d;for(d in b)0!=d&&c.push(new la(d,b[d]));return new ta(a,c)};function z(){}z.prototype.g=function(a){new a.h;throw Error("Unimplemented");};z.prototype.h=function(a,b){if(11==a.h||10==a.h)return b instanceof p?b:this.g(a.s.prototype.m(),b);if(14==a.h)return"string"===typeof b&&xa.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||xa.test(b)))return Number(b);return b};var xa=/^-?[0-9]+$/;function B(){}n(B,z);B.prototype.g=function(a,b){a=new a.h;a.l=this;a.h=b;a.g={};return a};function C(){}n(C,B);C.prototype.h=function(a,b){return 8==a.h?!!b:z.prototype.h.apply(this,arguments)};C.prototype.g=function(a,b){return C.ma.g.call(this,a,b)};function D(a,b){null!=a&&this.g.apply(this,arguments)}D.prototype.h="";D.prototype.set=function(a){this.h=""+a};D.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 E(a){a.h=""}D.prototype.toString=function(){return this.h};/*
10
10
 
11
11
  Protocol Buffer 2 Copyright 2008 Google Inc.
12
12
  All other code copyright its respective owners.
@@ -24,14 +24,14 @@ function t(a,b){return u(a,b)||[]}function w(a,b){return a.j[b].l?p(a,b)?a.h[b].
24
24
  See the License for the specific language governing permissions and
25
25
  limitations under the License.
26
26
  */
27
- function E(){n.call(this)}m(E,n);var ra=null;function F(){n.call(this)}m(F,n);var sa=null;function G(){n.call(this)}m(G,n);var ta=null;
28
- E.prototype.m=function(){var a=ra;a||(ra=a=x(E,{0:{name:"NumberFormat",ia:"i18n.phonenumbers.NumberFormat"},1:{name:"pattern",required:!0,i:9,type:String},2:{name:"format",required:!0,i:9,type:String},3:{name:"leading_digits_pattern",aa:!0,i:9,type:String},4:{name:"national_prefix_formatting_rule",i:9,type:String},6:{name:"national_prefix_optional_when_formatting",i:8,defaultValue:!1,type:Boolean},5:{name:"domestic_carrier_code_formatting_rule",i:9,type:String}}));return a};E.m=E.prototype.m;
29
- F.prototype.m=function(){var a=sa;a||(sa=a=x(F,{0:{name:"PhoneNumberDesc",ia:"i18n.phonenumbers.PhoneNumberDesc"},2:{name:"national_number_pattern",i:9,type:String},9:{name:"possible_length",aa:!0,i:5,type:Number},10:{name:"possible_length_local_only",aa:!0,i:5,type:Number},6:{name:"example_number",i:9,type:String}}));return a};F.m=F.prototype.m;
30
- G.prototype.m=function(){var a=ta;a||(ta=a=x(G,{0:{name:"PhoneMetadata",ia:"i18n.phonenumbers.PhoneMetadata"},1:{name:"general_desc",i:11,type:F},2:{name:"fixed_line",i:11,type:F},3:{name:"mobile",i:11,type:F},4:{name:"toll_free",i:11,type:F},5:{name:"premium_rate",i:11,type:F},6:{name:"shared_cost",i:11,type:F},7:{name:"personal_number",i:11,type:F},8:{name:"voip",i:11,type:F},21:{name:"pager",i:11,type:F},25:{name:"uan",i:11,type:F},27:{name:"emergency",i:11,type:F},28:{name:"voicemail",i:11,type:F},
31
- 29:{name:"short_code",i:11,type:F},30:{name:"standard_rate",i:11,type:F},31:{name:"carrier_specific",i:11,type:F},33:{name:"sms_services",i:11,type:F},24:{name:"no_international_dialling",i:11,type:F},9:{name:"id",required:!0,i:9,type:String},10:{name:"country_code",i:5,type:Number},11:{name:"international_prefix",i:9,type:String},17:{name:"preferred_international_prefix",i:9,type:String},12:{name:"national_prefix",i:9,type:String},13:{name:"preferred_extn_prefix",i:9,type:String},15:{name:"national_prefix_for_parsing",
32
- i:9,type:String},16:{name:"national_prefix_transform_rule",i:9,type:String},18:{name:"same_mobile_and_fixed_line_pattern",i:8,defaultValue:!1,type:Boolean},19:{name:"number_format",aa:!0,i:11,type:E},20:{name:"intl_number_format",aa:!0,i:11,type:E},22:{name:"main_country_for_code",i:8,defaultValue:!1,type:Boolean},23:{name:"leading_digits",i:9,type:String}}));return a};G.m=G.prototype.m;function H(){n.call(this)}m(H,n);var ua=null,va={ra:0,qa:1,pa:5,oa:10,na:20};
33
- H.prototype.m=function(){var a=ua;a||(ua=a=x(H,{0:{name:"PhoneNumber",ia:"i18n.phonenumbers.PhoneNumber"},1:{name:"country_code",required:!0,i:5,type:Number},2:{name:"national_number",required:!0,i:4,type:Number},3:{name:"extension",i:9,type:String},4:{name:"italian_leading_zero",i:8,type:Boolean},8:{name:"number_of_leading_zeros",i:5,defaultValue:1,type:Number},5:{name:"raw_input",i:9,type:String},6:{name:"country_code_source",i:14,defaultValue:0,type:va},7:{name:"preferred_domestic_carrier_code",
34
- i:9,type:String}}));return a};H.ctor=H;H.ctor.m=H.prototype.m;/*
27
+ function F(){p.call(this)}n(F,p);var ya=null;function G(){p.call(this)}n(G,p);var za=null;function H(){p.call(this)}n(H,p);var Aa=null;
28
+ F.prototype.m=function(){var a=ya;a||(ya=a=y(F,{0:{name:"NumberFormat",ia:"i18n.phonenumbers.NumberFormat"},1:{name:"pattern",required:!0,i:9,type:String},2:{name:"format",required:!0,i:9,type:String},3:{name:"leading_digits_pattern",aa:!0,i:9,type:String},4:{name:"national_prefix_formatting_rule",i:9,type:String},6:{name:"national_prefix_optional_when_formatting",i:8,defaultValue:!1,type:Boolean},5:{name:"domestic_carrier_code_formatting_rule",i:9,type:String}}));return a};F.m=F.prototype.m;
29
+ G.prototype.m=function(){var a=za;a||(za=a=y(G,{0:{name:"PhoneNumberDesc",ia:"i18n.phonenumbers.PhoneNumberDesc"},2:{name:"national_number_pattern",i:9,type:String},9:{name:"possible_length",aa:!0,i:5,type:Number},10:{name:"possible_length_local_only",aa:!0,i:5,type:Number},6:{name:"example_number",i:9,type:String}}));return a};G.m=G.prototype.m;
30
+ H.prototype.m=function(){var a=Aa;a||(Aa=a=y(H,{0:{name:"PhoneMetadata",ia:"i18n.phonenumbers.PhoneMetadata"},1:{name:"general_desc",i:11,type:G},2:{name:"fixed_line",i:11,type:G},3:{name:"mobile",i:11,type:G},4:{name:"toll_free",i:11,type:G},5:{name:"premium_rate",i:11,type:G},6:{name:"shared_cost",i:11,type:G},7:{name:"personal_number",i:11,type:G},8:{name:"voip",i:11,type:G},21:{name:"pager",i:11,type:G},25:{name:"uan",i:11,type:G},27:{name:"emergency",i:11,type:G},28:{name:"voicemail",i:11,type:G},
31
+ 29:{name:"short_code",i:11,type:G},30:{name:"standard_rate",i:11,type:G},31:{name:"carrier_specific",i:11,type:G},33:{name:"sms_services",i:11,type:G},24:{name:"no_international_dialling",i:11,type:G},9:{name:"id",required:!0,i:9,type:String},10:{name:"country_code",i:5,type:Number},11:{name:"international_prefix",i:9,type:String},17:{name:"preferred_international_prefix",i:9,type:String},12:{name:"national_prefix",i:9,type:String},13:{name:"preferred_extn_prefix",i:9,type:String},15:{name:"national_prefix_for_parsing",
32
+ i:9,type:String},16:{name:"national_prefix_transform_rule",i:9,type:String},18:{name:"same_mobile_and_fixed_line_pattern",i:8,defaultValue:!1,type:Boolean},19:{name:"number_format",aa:!0,i:11,type:F},20:{name:"intl_number_format",aa:!0,i:11,type:F},22:{name:"main_country_for_code",i:8,defaultValue:!1,type:Boolean},23:{name:"leading_digits",i:9,type:String}}));return a};H.m=H.prototype.m;function I(){p.call(this)}n(I,p);var Ba=null,Ca={ra:0,qa:1,pa:5,oa:10,na:20};
33
+ I.prototype.m=function(){var a=Ba;a||(Ba=a=y(I,{0:{name:"PhoneNumber",ia:"i18n.phonenumbers.PhoneNumber"},1:{name:"country_code",required:!0,i:5,type:Number},2:{name:"national_number",required:!0,i:4,type:Number},3:{name:"extension",i:9,type:String},4:{name:"italian_leading_zero",i:8,type:Boolean},8:{name:"number_of_leading_zeros",i:5,defaultValue:1,type:Number},5:{name:"raw_input",i:9,type:String},6:{name:"country_code_source",i:14,defaultValue:0,type:Ca},7:{name:"preferred_domestic_carrier_code",
34
+ i:9,type:String}}));return a};I.ctor=I;I.ctor.m=I.prototype.m;/*
35
35
 
36
36
  Copyright (C) 2010 The Libphonenumber Authors
37
37
 
@@ -47,11 +47,11 @@ i:9,type:String}}));return a};H.ctor=H;H.ctor.m=H.prototype.m;/*
47
47
  See the License for the specific language governing permissions and
48
48
  limitations under the License.
49
49
  */
50
- var I={1:"US AG AI AS BB BM BS CA DM DO GD GU JM KN KY LC MP MS PR SX TC TT VC VG VI".split(" "),7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],
50
+ var J={1:"US AG AI AS BB BM BS CA DM DO GD GU JM KN KY LC MP MS PR SX TC TT VC VG VI".split(" "),7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],
51
51
  86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],
52
52
  253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],
53
53
  386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],
54
- 691:["FM"],692:["MH"],800:["001"],808:["001"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],870:["001"],878:["001"],880:["BD"],881:["001"],882:["001"],883:["001"],886:["TW"],888:["001"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],979:["001"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},wa={AC:[,[,,"(?:[01589]\\d|[46])\\d{4}",
54
+ 691:["FM"],692:["MH"],800:["001"],808:["001"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],870:["001"],878:["001"],880:["BD"],881:["001"],882:["001"],883:["001"],886:["TW"],888:["001"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],979:["001"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},Da={AC:[,[,,"(?:[01589]\\d|[46])\\d{4}",
55
55
  ,,,,,,[5,6]],[,,"6[2-467]\\d{3}",,,,"62889",,,[5]],[,,"4\\d{4}",,,,"40123",,,[5]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"AC",247,"00",,,,,,,,,,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"(?:0[1-9]|[1589]\\d)\\d{4}",,,,"542011",,,[6]],,,[,,,,,,,,,[-1]]],AD:[,[,,"(?:1|6\\d)\\d{7}|[135-9]\\d{5}",,,,,,,[6,8,9]],[,,"[78]\\d{5}",,,,"712345",,,[6]],[,,"690\\d{6}|[356]\\d{5}",,,,"312345",,,[6,9]],[,,"180[02]\\d{4}",,,,"18001234",,,[8]],[,,"[19]\\d{5}",,,,"912345",,,[6]],
56
56
  [,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"AD",376,"00",,,,,,,,[[,"(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],[,"(\\d{4})(\\d{4})","$1 $2",["1"]],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],,[,,,,,,,,,[-1]],,,[,,"1800\\d{4}",,,,,,,[8]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],AE:[,[,,"(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",,,,,,,[5,6,7,8,9,10,11,12]],[,,"[2-4679][2-8]\\d{6}",,,,"22345678",,,[8],[7]],[,,"5[024-68]\\d{7}",,,,"501234567",,,[9]],[,,"400\\d{6}|800\\d{2,9}",,,,"800123456"],
57
57
  [,,"900[02]\\d{5}",,,,"900234567",,,[9]],[,,"700[05]\\d{5}",,,,"700012345",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"AE",971,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],[,"(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"600[25]\\d{5}",,,,"600212345",,,[9]],,,[,,,,,,,,,[-1]]],AF:[,[,,"[2-7]\\d{8}",,,,,,,[9],[7]],[,,"(?:[25][0-8]|[34][0-4]|6[0-5])[2-9]\\d{6}",
@@ -479,42 +479,42 @@ ZA:[,[,,"[1-79]\\d{8}|8\\d{4,9}",,,,,,,[5,6,7,8,9,10]],[,,"(?:2(?:0330|4302)|520
479
479
  See the License for the specific language governing permissions and
480
480
  limitations under the License.
481
481
  */
482
- function J(){this.g={}}J.h=void 0;J.g=function(){return J.h?J.h:J.h=new J};
483
- var K={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","\uff10":"0","\uff11":"1","\uff12":"2","\uff13":"3","\uff14":"4","\uff15":"5","\uff16":"6","\uff17":"7","\uff18":"8","\uff19":"9","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u06f0":"0","\u06f1":"1","\u06f2":"2","\u06f3":"3","\u06f4":"4","\u06f5":"5","\u06f6":"6","\u06f7":"7","\u06f8":"8","\u06f9":"9"},xa={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",
484
- 7:"7",8:"8",9:"9","+":"+","*":"*","#":"#"},ya={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","\uff10":"0","\uff11":"1","\uff12":"2","\uff13":"3","\uff14":"4","\uff15":"5","\uff16":"6","\uff17":"7","\uff18":"8","\uff19":"9","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u06f0":"0","\u06f1":"1","\u06f2":"2","\u06f3":"3","\u06f4":"4","\u06f5":"5","\u06f6":"6","\u06f7":"7","\u06f8":"8","\u06f9":"9",A:"2",
485
- 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:"6",P:"7",Q:"7",R:"7",S:"7",T:"8",U:"8",V:"8",W:"9",X:"9",Y:"9",Z:"9"},za=RegExp("[+\uff0b]+"),L=RegExp("^[+\uff0b]+"),Aa=RegExp("([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9])"),Ba=RegExp("[+\uff0b0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]"),Ca=/[\\\/] *x/,Da=RegExp("[^0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9A-Za-z#]+$"),Ea=/(?:.*?[A-Za-z]){3}.*/,Fa=RegExp("^\\+([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]|[\\-\\.\\(\\)]?)*[0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]|[\\-\\.\\(\\)]?)*$"),
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
- 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
- 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());D(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 C,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
- 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 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 B).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 C(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,""),D(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:(D(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 C(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
- 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 e=new C;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&&(D(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,A=1;A<l;++A)if(null!=h[A]&&0<h[A].length){D(e);e.g(b.substring(0,g));b=h[A];break a}}b=""}0<b.length&&r(f,3,b);g=T(a,c);b=new C;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 C,e=new C(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 C;this.da="";this.s=new C;this.ba=new C;this.u=!0;this.ea=this.ca=this.la=!1;this.ga=J.g();this.$=0;this.h=new C;this.ha=!1;this.o="";this.g=new C;this.j=[];this.ka=a;this.l=ab(this,this.ka)}var bb=new G;r(bb,11,"NA");
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)?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);D(f.v);var l=f;g=v(g,2);var A="999999999999999".match(h)[0];A.length<l.g.h.length?l="":(l=A.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
- 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(),D(a.g),a.g.g(a.o),a.g.g(b),b=a.h.toString(),c=b.lastIndexOf(a.o),D(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
- 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;D(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 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
- 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))));D(a.g);a.g.g(b.substring(c));return b.substring(0,c)}
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,D(a.g),a.g.g(b.substring(c)),D(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 C,c=Wa(a.g,b);if(0==c)return!1;D(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);D(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,d)=>{try{const l=J.g();a:{var e=l;if(P(a)){var f=U(T(e,a),c);try{if(p(f,6)){var g=q(f,6);var h=Za(e,g,a,!1);break a}}catch(A){}}h=null}return Ra(l,h,d?0:b?2:1)}catch(l){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);return c?0===X(d,e,1):0===X(d,e,-1)}catch(d){return!1}});k("intlTelInputUtils.getCoreNumber",(a,b)=>{try{return q(Y(J.g(),a,b),2).toString()}catch(c){return""}});
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});})();
482
+ function K(){this.g={}}K.h=void 0;K.g=function(){return K.h?K.h:K.h=new K};
483
+ var Ea={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","\uff10":"0","\uff11":"1","\uff12":"2","\uff13":"3","\uff14":"4","\uff15":"5","\uff16":"6","\uff17":"7","\uff18":"8","\uff19":"9","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u06f0":"0","\u06f1":"1","\u06f2":"2","\u06f3":"3","\u06f4":"4","\u06f5":"5","\u06f6":"6","\u06f7":"7","\u06f8":"8","\u06f9":"9"},Fa={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",
484
+ 7:"7",8:"8",9:"9","+":"+","*":"*","#":"#"},Ga={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","\uff10":"0","\uff11":"1","\uff12":"2","\uff13":"3","\uff14":"4","\uff15":"5","\uff16":"6","\uff17":"7","\uff18":"8","\uff19":"9","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u06f0":"0","\u06f1":"1","\u06f2":"2","\u06f3":"3","\u06f4":"4","\u06f5":"5","\u06f6":"6","\u06f7":"7","\u06f8":"8","\u06f9":"9",A:"2",
485
+ 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:"6",P:"7",Q:"7",R:"7",S:"7",T:"8",U:"8",V:"8",W:"9",X:"9",Y:"9",Z:"9"},Ha=RegExp("[+\uff0b]+"),L=RegExp("^[+\uff0b]+"),Ia=RegExp("([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9])"),Ja=RegExp("[+\uff0b0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]"),Ka=/[\\\/] *x/,La=RegExp("[^0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9A-Za-z#]+$"),Ma=/(?:.*?[A-Za-z]){3}.*/,Na=RegExp("^\\+([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]|[\\-\\.\\(\\)]?)*[0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]|[\\-\\.\\(\\)]?)*$"),
486
+ Oa=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
+ function Pa(){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
+ var Qa=new RegExp("(?:"+Pa()+")$","i"),Ra=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]*(?:"+Pa()+")?$","i"),Sa=/(\$\d)/,
489
+ Ta=/^\(?\$1\)?$/;function Ua(a){return 2>a.length?!1:N(Ra,a)}function Va(a){return N(Ma,a)?O(a,Ga):O(a,Ea)}function Wa(a){var b=Va(a.toString());E(a);a.g(b)}function Xa(a){return null!=a&&(1!=x(a,9)||-1!=u(a,9)[0])}function O(a,b){for(var c=new D,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 Ya(a){return 0==a.length||Ta.test(a)}function P(a){return null!=a&&isNaN(a)&&a.toUpperCase()in Da}
490
+ K.prototype.format=function(a,b){if(0==r(a,2)&&q(a,5)){var c=w(a,5);if(0<c.length)return c}c=w(a,1);var d=Q(a);if(0==b)return Za(c,0,d,"");if(!(c in J))return d;var e=R(this,c,S(c));a=q(a,3)&&0!=r(a,3).length?3==b?";ext="+r(a,3):q(e,13)?r(e,13)+w(a,3):" ext. "+w(a,3):"";a:{e=0==u(e,20).length||2==b?u(e,19):u(e,20);for(var f,g=e.length,h=0;h<g;++h){f=e[h];var l=x(f,3);if(0==l||0==d.search(r(f,3,l-1)))if(l=new RegExp(r(f,1)),N(l,d)){e=f;break a}}e=null}null!=e&&(g=e,e=w(g,2),f=new RegExp(r(g,1)),w(g,
491
+ 5),g=w(g,4),d=2==b&&null!=g&&0<g.length?d.replace(f,e.replace(Sa,g)):d.replace(f,e),3==b&&(d=d.replace(RegExp("^[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\\[\\]/~\u2053\u223c\uff5e]+"),""),d=d.replace(RegExp("[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\\[\\]/~\u2053\u223c\uff5e]+","g"),"-")));return Za(c,b,d,a)};function R(a,b,c){return"001"==c?T(a,""+b):T(a,c)}
492
+ function Q(a){if(!q(a,2))return"";var b=""+r(a,2);return q(a,4)&&r(a,4)&&0<w(a,8)?Array(w(a,8)+1).join("0")+b:b}function Za(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 r(a,5);case 3:return r(a,4);case 1:return r(a,3);case 0:case 2:return r(a,2);case 5:return r(a,6);case 6:return r(a,8);case 7:return r(a,7);case 8:return r(a,21);case 9:return r(a,25);case 10:return r(a,28);default:return r(a,1)}}function $a(a,b){return V(a,r(b,1))?V(a,r(b,5))?4:V(a,r(b,4))?3:V(a,r(b,6))?5:V(a,r(b,8))?6:V(a,r(b,7))?7:V(a,r(b,21))?8:V(a,r(b,25))?9:V(a,r(b,28))?10:V(a,r(b,2))?r(b,18)||V(a,r(b,3))?2:0:!r(b,18)&&V(a,r(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=Da[b];if(null==c)return null;c=(new C).g(H.m(),c);a.g[b]=c}return c}function V(a,b){var c=a.length;return 0<x(b,9)&&-1==u(b,9).indexOf(c)?!1:N(w(b,2),a)}
495
+ function ab(a,b){if(null==b)return null;var c=w(b,1);c=J[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(q(g,23)){if(0==b.search(r(g,23))){a=d;break a}}else if(-1!=$a(b,g)){a=d;break a}}a=null}return a}function S(a){a=J[a];return null==a?"ZZ":a[0]}function bb(a,b){a=T(a,b);if(null==a)throw Error("Invalid region code: "+b);return w(a,10)}
496
+ function W(a,b,c,d){var e=U(c,d),f=0==x(e,9)?u(r(c,1),9):u(e,9);e=u(e,10);if(2==d)if(Xa(U(c,0)))a=U(c,1),Xa(a)&&(f=f.concat(0==x(a,9)?u(r(c,1),9):u(a,9)),f.sort(),0==e.length?e=u(a,10):(e=e.concat(u(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=w(b,1);if(!(b in J))return 1;b=R(a,b,S(b));return W(a,d,b,c)}
497
+ function cb(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 J)return b.g(a.substring(e)),c;return 0}
498
+ function db(a,b,c,d,e,f){if(0==b.length)return 0;b=new D(b);var g;null!=c&&(g=r(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,""),E(b),b.g(Va(h)),g=1;else{h=new RegExp(g);Wa(b);g=b.toString();if(0==g.search(h)){h=g.match(h)[0].length;var l=g.substring(h).match(Ia);l&&null!=l[1]&&0<l[1].length&&"0"==O(l[1],Ea)?g=!1:(E(b),b.g(g.substring(h)),g=!0)}else g=!1;g=g?5:20}e&&t(f,6,g);if(20!=g){if(2>=b.h.length)throw Error("Phone number too short after IDD");
499
+ a=cb(b,d);if(0!=a)return t(f,1,a),a;throw Error("Invalid country calling code");}if(null!=c&&(g=w(c,10),h=""+g,l=b.toString(),0==l.lastIndexOf(h,0)&&(h=new D(l.substring(h.length)),l=r(c,1),l=new RegExp(w(l,2)),eb(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&&t(f,6,10),t(f,1,g),g;t(f,1,0);return 0}
500
+ function eb(a,b,c){var d=a.toString(),e=d.length,f=r(b,15);if(0!=e&&null!=f&&0!=f.length){var g=new RegExp("^(?:"+f+")");if(e=g.exec(d)){f=new RegExp(w(r(b,1),2));var h=N(f,d),l=e.length-1;b=r(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
+ function Y(a,b,c){if(!P(c)&&0<b.length&&"+"!=b.charAt(0))throw Error("Invalid country calling code");return fb(a,b,c,!0)}
502
+ function fb(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 D;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=Na.exec(h),h=Oa.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(Ja),0<=h?(g=g.substring(h),g=g.replace(La,""),h=g.search(Ka),0<=h&&(g=g.substring(0,h))):g="",f.call(e,g));f=e.toString();g=f.indexOf(";isub=");0<g&&(E(e),e.g(f.substring(0,g)));if(!Ua(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 I;d&&t(f,5,b);a:{b=e.toString();g=b.search(Qa);if(0<=g&&Ua(b.substring(0,g))){h=b.match(Qa);for(var l=h.length,A=1;A<l;++A)if(null!=h[A]&&0<h[A].length){E(e);e.g(b.substring(0,g));b=h[A];break a}}b=""}0<b.length&&t(f,3,b);g=T(a,c);b=new D;h=0;l=e.toString();try{h=db(a,l,g,b,d,f)}catch(ca){if("Invalid country calling code"==ca.message&&L.test(l)){if(l=l.replace(L,""),h=db(a,l,g,b,d,f),0==h)throw ca;}else throw ca;}0!=h?(e=S(h),e!=c&&(g=R(a,h,e))):(Wa(e),b.g(e.toString()),null!=c?(h=w(g,10),t(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 D,e=new D(b.toString()),eb(e,g,c),a=W(a,e.toString(),g,-1),2!=a&&4!=a&&5!=a&&(b=e,d&&0<c.toString().length&&t(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)){t(f,4,!0);for(a=
506
+ 1;a<d.length-1&&"0"==d.charAt(a);)a++;1!=a&&t(f,8,a)}t(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 gb(a){this.fa=RegExp("\u2008");this.ja="";this.v=new D;this.da="";this.s=new D;this.ba=new D;this.u=!0;this.ea=this.ca=this.la=!1;this.ga=K.g();this.$=0;this.h=new D;this.ha=!1;this.o="";this.g=new D;this.j=[];this.ka=a;this.l=hb(this,this.ka)}var ib=new H;t(ib,11,"NA");
507
+ var jb=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]*)*$"),kb=/[- ]/;
508
+ function hb(a,b){var c=a.ga;b=P(b)?bb(c,b):0;a=T(a.ga,S(b));return null!=a?a:ib}function lb(a){for(var b=a.j.length,c=0;c<b;++c){var d=a.j[c],e=w(d,1);if(a.da==e)return!1;var f=a;var g=d,h=w(g,1);E(f.v);var l=f;g=w(g,2);var A="999999999999999".match(h)[0];A.length<l.g.h.length?l="":(l=A.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=kb.test(r(d,4)),a.$=0,!0}return a.u=!1}
509
+ function mb(a,b){for(var c=[],d=b.length-3,e=a.j.length,f=0;f<e;++f){var g=a.j[f];0==x(g,3)?c.push(a.j[f]):(g=r(g,3,Math.min(d,x(g,3)-1)),0==b.search(g)&&c.push(a.j[f]))}a.j=c}
510
+ function nb(a,b){a.s.g(b);var c=b;Ia.test(c)||1==a.s.h.length&&Ha.test(c)?("+"==b?(c=b,a.ba.g(b)):(c=Ea[b],a.ba.g(c),a.g.g(c)),b=c):(a.u=!1,a.la=!0);if(!a.u){if(!a.la)if(ob(a)){if(pb(a))return qb(a)}else if(0<a.o.length&&(b=a.g.toString(),E(a.g),a.g.g(a.o),a.g.g(b),b=a.h.toString(),c=b.lastIndexOf(a.o),E(a.h),a.h.g(b.substring(0,c))),a.o!=rb(a))return a.h.g(" "),qb(a);return a.s.toString()}switch(a.ba.h.length){case 0:case 1:case 2:return a.s.toString();case 3:if(ob(a))a.ea=!0;else return a.o=rb(a),
511
+ sb(a);default:if(a.ea)return pb(a)&&(a.ea=!1),a.h.toString()+a.g.toString();if(0<a.j.length){b=tb(a,b);c=ub(a);if(0<c.length)return c;mb(a,a.g.toString());return lb(a)?vb(a):a.u?Z(a,b):a.s.toString()}return sb(a)}}function qb(a){a.u=!0;a.ea=!1;a.j=[];a.$=0;E(a.v);a.da="";return sb(a)}
512
+ function ub(a){for(var b=a.g.toString(),c=a.j.length,d=0;d<c;++d){var e=a.j[d],f=w(e,1);if((new RegExp("^(?:"+f+")$")).test(b)&&(a.ha=kb.test(r(e,4)),e=b.replace(new RegExp(f,"g"),r(e,2)),e=Z(a,e),O(e,Fa)==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 sb(a){var b=a.g.toString();if(3<=b.length){for(var c=a.ca&&0==a.o.length&&0<x(a.l,20)?u(a.l,20):u(a.l,19),d=c.length,e=0;e<d;++e){var f=c[e];0<a.o.length&&Ya(w(f,4))&&!r(f,6)&&!q(f,5)||(0!=a.o.length||a.ca||Ya(w(f,4))||r(f,6))&&jb.test(w(f,2))&&a.j.push(f)}mb(a,b);b=ub(a);return 0<b.length?b:lb(a)?vb(a):a.s.toString()}return Z(a,b)}function vb(a){var b=a.g.toString(),c=b.length;if(0<c){for(var d="",e=0;e<c;e++)d=tb(a,b.charAt(e));return a.u?Z(a,d):a.s.toString()}return a.h.toString()}
514
+ function rb(a){var b=a.g.toString(),c=0;if(1!=r(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):q(a.l,15)&&(d=new RegExp("^(?:"+r(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))));E(a.g);a.g.g(b.substring(c));return b.substring(0,c)}
515
+ function ob(a){var b=a.ba.toString(),c=new RegExp("^(?:\\+|"+r(a.l,11)+")");c=b.match(c);return null!=c&&null!=c[0]&&0<c[0].length?(a.ca=!0,c=c[0].length,E(a.g),a.g.g(b.substring(c)),E(a.h),a.h.g(b.substring(0,c)),"+"!=b.charAt(0)&&a.h.g(" "),!0):!1}function pb(a){if(0==a.g.h.length)return!1;var b=new D,c=cb(a.g,b);if(0==c)return!1;E(a.g);a.g.g(b.toString());b=S(c);"001"==b?a.l=T(a.ga,""+c):b!=a.ka&&(a.l=hb(a,b));a.h.g(""+c).g(" ");a.o="";return!0}
516
+ function tb(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);E(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()};m("intlTelInputUtils",{});m("intlTelInputUtils.formatNumberAsYouType",(a,b)=>{try{const c=a.replace(/[^+0-9]/g,""),d=new gb(b);b="";for(let e=0;e<c.length;e++)d.ja=nb(d,c.charAt(e)),b=d.ja;return b}catch(c){return a}});m("intlTelInputUtils.formatNumber",(a,b,c)=>{try{const e=K.g(),f=Y(e,a,b);var d=X(e,f,-1);return 0==d||4==d?e.format(f,"undefined"===typeof c?0:c):a}catch(e){return a}});
517
+ m("intlTelInputUtils.getExampleNumber",(a,b,c,d)=>{try{const l=K.g();a:{var e=l;if(P(a)){var f=U(T(e,a),c);try{if(q(f,6)){var g=r(f,6);var h=fb(e,g,a,!1);break a}}catch(A){}}h=null}return l.format(h,d?0:b?2:1)}catch(l){return""}});m("intlTelInputUtils.getExtension",(a,b)=>{try{return r(Y(K.g(),a,b),3)}catch(c){return""}});m("intlTelInputUtils.getNumberType",(a,b)=>{try{const g=K.g(),h=Y(g,a,b);var c=ab(g,h),d=R(g,w(h,1),c);if(null==d)var e=-1;else{var f=Q(h);e=$a(f,d)}return e}catch(g){return-99}});
518
+ m("intlTelInputUtils.getValidationError",(a,b)=>{try{const c=K.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
+ m("intlTelInputUtils.isValidNumber",(a,b)=>{try{const l=K.g();var c=Y(l,a,b),d=ab(l,c);a=l;var e=w(c,1),f=R(a,e,d);if(null==f||"001"!=d&&e!=bb(a,d))var g=!1;else{var h=Q(c);g=-1!=$a(h,f)}return g}catch(l){return!1}});m("intlTelInputUtils.isPossibleNumber",(a,b,c)=>{try{const d=K.g(),e=Y(d,a,b);return c?0===X(d,e,1):0===X(d,e,-1)}catch(d){return!1}});m("intlTelInputUtils.getCoreNumber",(a,b)=>{try{return r(Y(K.g(),a,b),2).toString()}catch(c){return""}});
520
+ m("intlTelInputUtils.numberFormat",{E164:0,INTERNATIONAL:1,NATIONAL:2,RFC3966:3});m("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});m("intlTelInputUtils.validationError",{IS_POSSIBLE:0,INVALID_COUNTRY_CODE:1,TOO_SHORT:2,TOO_LONG:3,IS_POSSIBLE_LOCAL_ONLY:4,INVALID_LENGTH:5});})();
package/index.js CHANGED
@@ -1 +1,2 @@
1
+ /* global module */
1
2
  module.exports = require("./build/js/intlTelInput");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intl-tel-input",
3
- "version": "21.0.9",
3
+ "version": "21.1.1",
4
4
  "description": "A JavaScript plugin for entering and validating international telephone numbers",
5
5
  "keywords": [
6
6
  "international",
@@ -24,40 +24,43 @@
24
24
  "license": "MIT",
25
25
  "author": "Jack O'Connor (http://jackocnr.com)",
26
26
  "devDependencies": {
27
- "@types/react": "^18.2.73",
28
- "@types/react-dom": "^18.2.23",
29
- "@typescript-eslint/eslint-plugin": "^7.4.0",
30
- "@typescript-eslint/parser": "^7.4.0",
31
- "esbuild": "^0.19.11",
27
+ "@types/react": "^18.2.74",
28
+ "@types/react-dom": "^18.2.24",
29
+ "@typescript-eslint/eslint-plugin": "^7.5.0",
30
+ "@typescript-eslint/parser": "^7.5.0",
31
+ "cspell": "^8.6.1",
32
+ "esbuild": "^0.20.2",
32
33
  "eslint": "^8.57.0",
33
34
  "eslint-import-resolver-typescript": "^3.6.1",
34
35
  "eslint-plugin-import": "^2.29.1",
36
+ "eslint-plugin-jasmine": "^4.1.3",
35
37
  "eslint-plugin-react": "^7.34.1",
36
38
  "evenizer": "^0.1.17",
37
- "google-closure-compiler": "^20230411.0.0",
38
- "google-closure-library": "^20230411.0.0",
39
+ "google-closure-compiler": "^20240317.0.0",
40
+ "google-closure-library": "^20230802.0.0",
39
41
  "grunt": "^1.6.1",
40
42
  "grunt-bump": "^0.8.0",
41
43
  "grunt-cli": "^1.2.0",
42
- "grunt-contrib-cssmin": "^2.2.1",
44
+ "grunt-contrib-cssmin": "^5.0.0",
43
45
  "grunt-contrib-imagemin": "^4.0.0",
44
46
  "grunt-contrib-jasmine": "^4.0.0",
45
47
  "grunt-contrib-watch": "^1.1.0",
46
- "grunt-exec": "^1.0.1",
47
- "grunt-replace": "^1.0.1",
48
+ "grunt-exec": "^3.0.0",
49
+ "grunt-replace": "^2.0.2",
48
50
  "grunt-responsive-images": "^1.10.1",
49
51
  "grunt-sass": "^3.0.0",
50
52
  "grunt-shell": "^4.0.0",
51
53
  "grunt-spritesmith": "^6.10.0",
54
+ "image-size": "^1.1.1",
52
55
  "jasmine-jquery": "^2.1.1",
53
56
  "jquery": "^3.1.1",
54
- "load-grunt-config": "^0.19.2",
55
- "prettier": "^2.8.7",
57
+ "load-grunt-config": "^4.0.1",
58
+ "prettier": "^3.2.5",
56
59
  "react": "^18.2.0",
57
60
  "react-dom": "^18.2.0",
58
61
  "region-flags": "https://github.com/fonttools/region-flags/archive/refs/tags/1.2.1.tar.gz",
59
- "sass": "^1.62.0",
60
- "time-grunt": "^1.4.0",
62
+ "sass": "^1.74.1",
63
+ "time-grunt": "^2.0.0",
61
64
  "typescript": "^5.4.3"
62
65
  },
63
66
  "files": [
@@ -77,12 +80,14 @@
77
80
  "homepage": "https://intl-tel-input.com",
78
81
  "scripts": {
79
82
  "test": "grunt travis",
83
+ "lint:js": "eslint .",
84
+ "lint:spelling": "cspell --dot --gitignore --no-progress '**'",
85
+ "watch": "grunt watch",
80
86
  "build": "grunt build",
81
87
  "build:js": "grunt js",
82
88
  "build:utils": "grunt build:utils",
83
89
  "build:css": "grunt css",
84
90
  "build:img": "grunt img",
85
- "watch": "grunt watch",
86
91
  "build:react": "node react/build.js"
87
92
  },
88
93
  "style": "build/css/intlTelInput.css",
@@ -90,13 +95,13 @@
90
95
  "types": "./build/js/intlTelInput.d.ts",
91
96
  "exports": {
92
97
  ".": {
93
- "default": "./build/js/intlTelInput.js",
94
- "types": "./build/js/intlTelInput.d.ts"
98
+ "types": "./build/js/intlTelInput.d.ts",
99
+ "default": "./build/js/intlTelInput.js"
95
100
  },
96
101
  "./data": "./build/js/data.js",
97
102
  "./react": {
98
- "default": "./react/build/IntlTelInput.js",
99
- "types": "./react/build/IntlTelInput.d.ts"
103
+ "types": "./react/build/IntlTelInput.d.ts",
104
+ "default": "./react/build/IntlTelInput.js"
100
105
  },
101
106
  "./*": "./*"
102
107
  },