"use strict";(()=>{var Ut=Object.create;var at=Object.defineProperty;var Ft=Object.getOwnPropertyDescriptor;var Wt=Object.getOwnPropertyNames;var $t=Object.getPrototypeOf,Gt=Object.prototype.hasOwnProperty;var Vt=(a,C)=>()=>(C||a((C={exports:{}}).exports,C),C.exports);var zt=(a,C,_,I)=>{if(C&&typeof C=="object"||typeof C=="function")for(let y of Wt(C))!Gt.call(a,y)&&y!==_&&at(a,y,{get:()=>C[y],enumerable:!(I=Ft(C,y))||I.enumerable});return a};var jt=(a,C,_)=>(_=a!=null?Ut($t(a)):{},zt(C||!a||!a.__esModule?at(_,"default",{value:a,enumerable:!0}):_,a));var pt=Vt((Zt,j)=>{(function(a){typeof j=="object"&&j.exports?j.exports=a():window.intlTelInput=a()})(()=>{var a=(()=>{var C=Object.defineProperty,_=Object.getOwnPropertyDescriptor,I=Object.getOwnPropertyNames,y=Object.prototype.hasOwnProperty,R=(s,t)=>{for(var e in t)C(s,e,{get:t[e],enumerable:!0})},U=(s,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of I(t))!y.call(s,n)&&n!==e&&C(s,n,{get:()=>t[n],enumerable:!(i=_(t,n))||i.enumerable});return s},F=s=>U(C({},"__esModule",{value:!0}),s),A={};R(A,{Iti:()=>lt,default:()=>Bt});var G=[["af","93",0,null,"0"],["ax","358",1,["18","4"],"0"],["al","355",0,null,"0"],["dz","213",0,null,"0"],["as","1",5,["684"],"1"],["ad","376"],["ao","244"],["ai","1",6,["264"],"1"],["ag","1",7,["268"],"1"],["ar","54",0,null,"0"],["am","374",0,null,"0"],["aw","297"],["ac","247"],["au","61",0,["4"],"0"],["at","43",0,null,"0"],["az","994",0,null,"0"],["bs","1",8,["242"],"1"],["bh","973"],["bd","880",0,null,"0"],["bb","1",9,["246"],"1"],["by","375",0,null,"8"],["be","32",0,null,"0"],["bz","501"],["bj","229"],["bm","1",10,["441"],"1"],["bt","975"],["bo","591",0,null,"0"],["ba","387",0,null,"0"],["bw","267"],["br","55",0,null,"0"],["io","246"],["vg","1",11,["284"],"1"],["bn","673"],["bg","359",0,null,"0"],["bf","226"],["bi","257"],["kh","855",0,null,"0"],["cm","237"],["ca","1",1,["204","226","236","249","250","257","263","289","306","343","354","365","367","368","382","403","416","418","428","431","437","438","450","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","879","902","905","942"],"1"],["cv","238"],["bq","599",1,["3","4","7"]],["ky","1",12,["345"],"1"],["cf","236"],["td","235"],["cl","56"],["cn","86",0,null,"0"],["cx","61",2,["4","89164"],"0"],["cc","61",1,["4","89162"],"0"],["co","57",0,null,"0"],["km","269"],["cg","242"],["cd","243",0,null,"0"],["ck","682"],["cr","506"],["ci","225"],["hr","385",0,null,"0"],["cu","53",0,null,"0"],["cw","599",0],["cy","357"],["cz","420"],["dk","45"],["dj","253"],["dm","1",13,["767"],"1"],["do","1",2,["809","829","849"],"1"],["ec","593",0,null,"0"],["eg","20",0,null,"0"],["sv","503"],["gq","240"],["er","291",0,null,"0"],["ee","372"],["sz","268"],["et","251",0,null,"0"],["fk","500"],["fo","298"],["fj","679"],["fi","358",0,["4"],"0"],["fr","33",0,null,"0"],["gf","594",0,null,"0"],["pf","689"],["ga","241"],["gm","220"],["ge","995",0,null,"0"],["de","49",0,null,"0"],["gh","233",0,null,"0"],["gi","350"],["gr","30"],["gl","299"],["gd","1",14,["473"],"1"],["gp","590",0,null,"0"],["gu","1",15,["671"],"1"],["gt","502"],["gg","44",1,["1481","7781","7839","7911"],"0"],["gn","224"],["gw","245"],["gy","592"],["ht","509"],["hn","504"],["hk","852"],["hu","36",0,null,"06"],["is","354"],["in","91",0,null,"0"],["id","62",0,null,"0"],["ir","98",0,null,"0"],["iq","964",0,null,"0"],["ie","353",0,null,"0"],["im","44",2,["1624","74576","7524","7624","7924"],"0"],["il","972",0,null,"0"],["it","39",0,["3"]],["jm","1",4,["658","876"],"1"],["jp","81",0,null,"0"],["je","44",3,["1534","7509","7700","7797","7829","7937"],"0"],["jo","962",0,null,"0"],["kz","7",1,["33","7"],"8"],["ke","254",0,null,"0"],["ki","686",0,null,"0"],["xk","383",0,null,"0"],["kw","965"],["kg","996",0,null,"0"],["la","856",0,null,"0"],["lv","371"],["lb","961",0,null,"0"],["ls","266"],["lr","231",0,null,"0"],["ly","218",0,null,"0"],["li","423",0,null,"0"],["lt","370",0,null,"0"],["lu","352"],["mo","853"],["mg","261",0,null,"0"],["mw","265",0,null,"0"],["my","60",0,null,"0"],["mv","960"],["ml","223"],["mt","356"],["mh","692",0,null,"1"],["mq","596",0,null,"0"],["mr","222"],["mu","230"],["yt","262",1,["269","639"],"0"],["mx","52"],["fm","691"],["md","373",0,null,"0"],["mc","377",0,null,"0"],["mn","976",0,null,"0"],["me","382",0,null,"0"],["ms","1",16,["664"],"1"],["ma","212",0,["6","7"],"0"],["mz","258"],["mm","95",0,null,"0"],["na","264",0,null,"0"],["nr","674"],["np","977",0,null,"0"],["nl","31",0,null,"0"],["nc","687"],["nz","64",0,null,"0"],["ni","505"],["ne","227"],["ng","234",0,null,"0"],["nu","683"],["nf","672"],["kp","850",0,null,"0"],["mk","389",0,null,"0"],["mp","1",17,["670"],"1"],["no","47",0,["4","9"]],["om","968"],["pk","92",0,null,"0"],["pw","680"],["ps","970",0,null,"0"],["pa","507"],["pg","675"],["py","595",0,null,"0"],["pe","51",0,null,"0"],["ph","63",0,null,"0"],["pl","48"],["pt","351"],["pr","1",3,["787","939"],"1"],["qa","974"],["re","262",0,null,"0"],["ro","40",0,null,"0"],["ru","7",0,["33"],"8"],["rw","250",0,null,"0"],["ws","685"],["sm","378"],["st","239"],["sa","966",0,null,"0"],["sn","221"],["rs","381",0,null,"0"],["sc","248"],["sl","232",0,null,"0"],["sg","65"],["sx","1",21,["721"],"1"],["sk","421",0,null,"0"],["si","386",0,null,"0"],["sb","677"],["so","252",0,null,"0"],["za","27",0,null,"0"],["kr","82",0,null,"0"],["ss","211",0,null,"0"],["es","34"],["lk","94",0,null,"0"],["bl","590",1,null,"0"],["sh","290"],["kn","1",18,["869"],"1"],["lc","1",19,["758"],"1"],["mf","590",2,null,"0"],["pm","508",0,null,"0"],["vc","1",20,["784"],"1"],["sd","249",0,null,"0"],["sr","597"],["sj","47",1,["4","79","9"]],["se","46",0,null,"0"],["ch","41",0,null,"0"],["sy","963",0,null,"0"],["tw","886",0,null,"0"],["tj","992"],["tz","255",0,null,"0"],["th","66",0,null,"0"],["tl","670"],["tg","228"],["tk","690"],["to","676"],["tt","1",22,["868"],"1"],["tn","216"],["tr","90",0,null,"0"],["tm","993",0,null,"8"],["tc","1",23,["649"],"1"],["tv","688"],["vi","1",24,["340"],"1"],["ug","256",0,null,"0"],["ua","380",0,null,"0"],["ae","971",0,null,"0"],["gb","44",0,null,"0"],["us","1",0,null,"1"],["uy","598",0,null,"0"],["uz","998"],["vu","678"],["va","39",1,["06698","3"]],["ve","58",0,null,"0"],["vn","84",0,null,"0"],["wf","681"],["eh","212",1,["5288","5289","6","7"],"0"],["ye","967",0,null,"0"],["zm","260",0,null,"0"],["zw","263",0,null,"0"]],B=[];for(let s of G)B.push({name:"",iso2:s[0],dialCode:s[1],priority:s[2]||0,areaCodes:s[3]||null,nodeById:{},nationalPrefix:s[4]||null,normalisedName:"",initials:"",dialCodePlus:""});var N=B,H={ad:"Andorra",ae:"United Arab Emirates",af:"Afghanistan",ag:"Antigua & Barbuda",ai:"Anguilla",al:"Albania",am:"Armenia",ao:"Angola",ar:"Argentina",as:"American Samoa",at:"Austria",au:"Australia",aw:"Aruba",ax:"\xC5land Islands",az:"Azerbaijan",ba:"Bosnia & Herzegovina",bb:"Barbados",bd:"Bangladesh",be:"Belgium",bf:"Burkina Faso",bg:"Bulgaria",bh:"Bahrain",bi:"Burundi",bj:"Benin",bl:"St. Barth\xE9lemy",bm:"Bermuda",bn:"Brunei",bo:"Bolivia",bq:"Caribbean Netherlands",br:"Brazil",bs:"Bahamas",bt:"Bhutan",bw:"Botswana",by:"Belarus",bz:"Belize",ca:"Canada",cc:"Cocos (Keeling) Islands",cd:"Congo - Kinshasa",cf:"Central African Republic",cg:"Congo - Brazzaville",ch:"Switzerland",ci:"C\xF4te d\u2019Ivoire",ck:"Cook Islands",cl:"Chile",cm:"Cameroon",cn:"China",co:"Colombia",cr:"Costa Rica",cu:"Cuba",cv:"Cape Verde",cw:"Cura\xE7ao",cx:"Christmas Island",cy:"Cyprus",cz:"Czechia",de:"Germany",dj:"Djibouti",dk:"Denmark",dm:"Dominica",do:"Dominican Republic",dz:"Algeria",ec:"Ecuador",ee:"Estonia",eg:"Egypt",eh:"Western Sahara",er:"Eritrea",es:"Spain",et:"Ethiopia",fi:"Finland",fj:"Fiji",fk:"Falkland Islands",fm:"Micronesia",fo:"Faroe Islands",fr:"France",ga:"Gabon",gb:"United Kingdom",gd:"Grenada",ge:"Georgia",gf:"French Guiana",gg:"Guernsey",gh:"Ghana",gi:"Gibraltar",gl:"Greenland",gm:"Gambia",gn:"Guinea",gp:"Guadeloupe",gq:"Equatorial Guinea",gr:"Greece",gt:"Guatemala",gu:"Guam",gw:"Guinea-Bissau",gy:"Guyana",hk:"Hong Kong SAR China",hn:"Honduras",hr:"Croatia",ht:"Haiti",hu:"Hungary",id:"Indonesia",ie:"Ireland",il:"Israel",im:"Isle of Man",in:"India",io:"British Indian Ocean Territory",iq:"Iraq",ir:"Iran",is:"Iceland",it:"Italy",je:"Jersey",jm:"Jamaica",jo:"Jordan",jp:"Japan",ke:"Kenya",kg:"Kyrgyzstan",kh:"Cambodia",ki:"Kiribati",km:"Comoros",kn:"St. Kitts & Nevis",kp:"North Korea",kr:"South Korea",kw:"Kuwait",ky:"Cayman Islands",kz:"Kazakhstan",la:"Laos",lb:"Lebanon",lc:"St. Lucia",li:"Liechtenstein",lk:"Sri Lanka",lr:"Liberia",ls:"Lesotho",lt:"Lithuania",lu:"Luxembourg",lv:"Latvia",ly:"Libya",ma:"Morocco",mc:"Monaco",md:"Moldova",me:"Montenegro",mf:"St. Martin",mg:"Madagascar",mh:"Marshall Islands",mk:"North Macedonia",ml:"Mali",mm:"Myanmar (Burma)",mn:"Mongolia",mo:"Macao SAR China",mp:"Northern Mariana Islands",mq:"Martinique",mr:"Mauritania",ms:"Montserrat",mt:"Malta",mu:"Mauritius",mv:"Maldives",mw:"Malawi",mx:"Mexico",my:"Malaysia",mz:"Mozambique",na:"Namibia",nc:"New Caledonia",ne:"Niger",nf:"Norfolk Island",ng:"Nigeria",ni:"Nicaragua",nl:"Netherlands",no:"Norway",np:"Nepal",nr:"Nauru",nu:"Niue",nz:"New Zealand",om:"Oman",pa:"Panama",pe:"Peru",pf:"French Polynesia",pg:"Papua New Guinea",ph:"Philippines",pk:"Pakistan",pl:"Poland",pm:"St. Pierre & Miquelon",pr:"Puerto Rico",ps:"Palestinian Territories",pt:"Portugal",pw:"Palau",py:"Paraguay",qa:"Qatar",re:"R\xE9union",ro:"Romania",rs:"Serbia",ru:"Russia",rw:"Rwanda",sa:"Saudi Arabia",sb:"Solomon Islands",sc:"Seychelles",sd:"Sudan",se:"Sweden",sg:"Singapore",sh:"St. Helena",si:"Slovenia",sj:"Svalbard & Jan Mayen",sk:"Slovakia",sl:"Sierra Leone",sm:"San Marino",sn:"Senegal",so:"Somalia",sr:"Suriname",ss:"South Sudan",st:"S\xE3o Tom\xE9 & Pr\xEDncipe",sv:"El Salvador",sx:"Sint Maarten",sy:"Syria",sz:"Eswatini",tc:"Turks & Caicos Islands",td:"Chad",tg:"Togo",th:"Thailand",tj:"Tajikistan",tk:"Tokelau",tl:"Timor-Leste",tm:"Turkmenistan",tn:"Tunisia",to:"Tonga",tr:"Turkey",tt:"Trinidad & Tobago",tv:"Tuvalu",tw:"Taiwan",tz:"Tanzania",ua:"Ukraine",ug:"Uganda",us:"United States",uy:"Uruguay",uz:"Uzbekistan",va:"Vatican City",vc:"St. Vincent & Grenadines",ve:"Venezuela",vg:"British Virgin Islands",vi:"U.S. Virgin Islands",vn:"Vietnam",vu:"Vanuatu",wf:"Wallis & Futuna",ws:"Samoa",ye:"Yemen",yt:"Mayotte",za:"South Africa",zm:"Zambia",zw:"Zimbabwe"},W=H,V={selectedCountryAriaLabel:"Change country, selected ${countryName} (${dialCode})",noCountrySelected:"Select country",countryListAriaLabel:"List of countries",searchPlaceholder:"Search",clearSearchAriaLabel:"Clear search",zeroSearchResults:"No results found",oneSearchResult:"1 result found",multipleSearchResults:"${count} results found",ac:"Ascension Island",xk:"Kosovo"},k=V,x={...W,...k},S=x,T={OPEN_COUNTRY_DROPDOWN:"open:countrydropdown",CLOSE_COUNTRY_DROPDOWN:"close:countrydropdown",COUNTRY_CHANGE:"countrychange",INPUT:"input"},p={HIDE:"iti__hide",V_HIDE:"iti__v-hide",ARROW_UP:"iti__arrow--up",GLOBE:"iti__globe",FLAG:"iti__flag",COUNTRY_ITEM:"iti__country",HIGHLIGHT:"iti__highlight"},b={ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",SPACE:" ",ENTER:"Enter",ESC:"Escape",TAB:"Tab"},tt={PASTE:"insertFromPaste",DELETE_FWD:"deleteContentForward"},M={ALPHA_UNICODE:/\p{L}/u,NON_PLUS_NUMERIC:/[^+0-9]/,NON_PLUS_NUMERIC_GLOBAL:/[^+0-9]/g,HIDDEN_SEARCH_CHAR:/^[a-zA-ZÀ-ÿа-яА-Я ]$/},ft={SEARCH_DEBOUNCE_MS:100,HIDDEN_SEARCH_RESET_MS:1e3,NEXT_TICK:0},et={UNKNOWN_NUMBER_TYPE:-99,UNKNOWN_VALIDATION_ERROR:-99},K={SANE_SELECTED_WITH_DIAL_WIDTH:78,SANE_SELECTED_NO_DIAL_WIDTH:42,INPUT_PADDING_EXTRA_LEFT:6},it={PLUS:"+",NANP:"1"},Y={ISO2:"gb",DIAL_CODE:"44",MOBILE_PREFIX:"7",MOBILE_CORE_LENGTH:10},yt={ISO2:"us",DIAL_CODE:"1"},q={AGGRESSIVE:"aggressive",POLITE:"polite",OFF:"off"},X={AUTO:"auto"},nt={COUNTRY_CODE:"countryCode",DIAL_CODE:"dialCode"},m={EXPANDED:"aria-expanded",LABEL:"aria-label",SELECTED:"aria-selected",ACTIVE_DESCENDANT:"aria-activedescendant",HASPOPUP:"aria-haspopup",CONTROLS:"aria-controls",HIDDEN:"aria-hidden",AUTOCOMPLETE:"aria-autocomplete",MODAL:"aria-modal"},Q=s=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(s).matches,gt=()=>{if(typeof navigator<"u"&&typeof window<"u"){let s=/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),t=Q("(max-width: 500px)"),e=Q("(max-height: 600px)"),i=Q("(pointer: coarse)");return s||t||i&&e}return!1},st={allowPhonewords:!1,allowDropdown:!0,autoPlaceholder:q.POLITE,containerClass:"",countryOrder:null,countrySearch:!0,customPlaceholder:null,dropdownContainer:null,excludeCountries:[],fixDropdownWidth:!0,formatAsYouType:!0,formatOnDisplay:!0,geoIpLookup:null,hiddenInput:null,i18n:{},initialCountry:"",loadUtils:null,nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",showFlags:!0,separateDialCode:!1,strictMode:!1,useFullscreenPopup:gt(),validationNumberTypes:["MOBILE"]},_t=(s,t)=>{s.useFullscreenPopup&&(s.fixDropdownWidth=!1),s.onlyCountries.length===1&&(s.initialCountry=s.onlyCountries[0]),s.separateDialCode&&(s.nationalMode=!1),s.allowDropdown&&!s.showFlags&&!s.separateDialCode&&(s.nationalMode=!1),s.useFullscreenPopup&&!s.dropdownContainer&&(s.dropdownContainer=document.body),s.i18n={...t,...s.i18n}},z=s=>s.replace(/\D/g,""),ot=(s="")=>s.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),bt=(s,t)=>{let e=ot(t),i=[],n=[],r=[],o=[],l=[],d=[];for(let h of s)h.iso2===e?i.push(h):h.normalisedName.startsWith(e)?n.push(h):h.normalisedName.includes(e)?r.push(h):e===h.dialCode||e===h.dialCodePlus?o.push(h):h.dialCodePlus.includes(e)?l.push(h):h.initials.includes(e)&&d.push(h);let c=(h,g)=>h.priority-g.priority;return[...i.sort(c),...n.sort(c),...r.sort(c),...o.sort(c),...l.sort(c),...d.sort(c)]},It=(s,t)=>{let e=t.toLowerCase();for(let i of s)if(i.name.toLowerCase().startsWith(e))return i;return null},J=s=>Object.keys(s).filter(t=>!!s[t]).join(" "),f=(s,t,e)=>{let i=document.createElement(s);return t&&Object.entries(t).forEach(([n,r])=>i.setAttribute(n,r)),e&&e.appendChild(i),i},wt=()=>` `,Et=s=>{let t=`iti-${s}-clear-mask`;return` `},Lt=class{constructor(s,t,e){this.highlightedItem=null,s.dataset.intlTelInputId=e.toString(),this.telInput=s,this.options=t,this.id=e,this.hadInitialPlaceholder=!!s.getAttribute("placeholder"),this.isRTL=!!this.telInput.closest("[dir=rtl]"),this.options.separateDialCode&&(this.originalPaddingLeft=this.telInput.style.paddingLeft)}generateMarkup(s){this.countries=s,this._prepareTelInput();let t=this._createWrapperAndInsert();this._maybeBuildCountryContainer(t),t.appendChild(this.telInput),this._maybeUpdateInputPaddingAndReveal(),this._maybeBuildHiddenInputs(t)}_prepareTelInput(){this.telInput.classList.add("iti__tel-input"),!this.telInput.hasAttribute("autocomplete")&&!this.telInput.form?.hasAttribute("autocomplete")&&this.telInput.setAttribute("autocomplete","off")}_createWrapperAndInsert(){let{allowDropdown:s,showFlags:t,containerClass:e,useFullscreenPopup:i}=this.options,n=J({iti:!0,"iti--allow-dropdown":s,"iti--show-flags":t,"iti--inline-dropdown":!i,[e]:!!e}),r=f("div",{class:n});return this.isRTL&&r.setAttribute("dir","ltr"),this.telInput.before(r),r}_maybeBuildCountryContainer(s){let{allowDropdown:t,separateDialCode:e,showFlags:i}=this.options;if(t||i||e){this.countryContainer=f("div",{class:`iti__country-container ${p.V_HIDE}`},s),t?(this.selectedCountry=f("button",{type:"button",class:"iti__selected-country",[m.EXPANDED]:"false",[m.LABEL]:this.options.i18n.noCountrySelected,[m.HASPOPUP]:"dialog",[m.CONTROLS]:`iti-${this.id}__dropdown-content`},this.countryContainer),this.telInput.disabled&&this.selectedCountry.setAttribute("disabled","true")):this.selectedCountry=f("div",{class:"iti__selected-country"},this.countryContainer);let n=f("div",{class:"iti__selected-country-primary"},this.selectedCountry);this.selectedCountryInner=f("div",{class:p.FLAG},n),t&&(this.dropdownArrow=f("div",{class:"iti__arrow",[m.HIDDEN]:"true"},n)),e&&(this.selectedDialCode=f("div",{class:"iti__selected-dial-code"},this.selectedCountry)),t&&this._buildDropdownContent()}}_buildDropdownContent(){let{fixDropdownWidth:s,useFullscreenPopup:t,countrySearch:e,i18n:i,dropdownContainer:n,containerClass:r}=this.options,o=s?"":"iti--flexible-dropdown-width";if(this.dropdownContent=f("div",{id:`iti-${this.id}__dropdown-content`,class:`iti__dropdown-content ${p.HIDE} ${o}`,role:"dialog",[m.MODAL]:"true"}),this.isRTL&&this.dropdownContent.setAttribute("dir","rtl"),e&&this._buildSearchUI(),this.countryList=f("ul",{class:"iti__country-list",id:`iti-${this.id}__country-listbox`,role:"listbox",[m.LABEL]:i.countryListAriaLabel},this.dropdownContent),this._appendListItems(),e&&this.updateSearchResultsA11yText(),n){let l=J({iti:!0,"iti--container":!0,"iti--fullscreen-popup":t,"iti--inline-dropdown":!t,[r]:!!r});this.dropdown=f("div",{class:l}),this.dropdown.appendChild(this.dropdownContent)}else this.countryContainer.appendChild(this.dropdownContent)}_buildSearchUI(){let{i18n:s}=this.options,t=f("div",{class:"iti__search-input-wrapper"},this.dropdownContent);this.searchIcon=f("span",{class:"iti__search-icon",[m.HIDDEN]:"true"},t),this.searchIcon.innerHTML=wt(),this.searchInput=f("input",{id:`iti-${this.id}__search-input`,type:"search",class:"iti__search-input",placeholder:s.searchPlaceholder,role:"combobox",[m.EXPANDED]:"true",[m.LABEL]:s.searchPlaceholder,[m.CONTROLS]:`iti-${this.id}__country-listbox`,[m.AUTOCOMPLETE]:"list",autocomplete:"off"},t),this.searchClearButton=f("button",{type:"button",class:`iti__search-clear ${p.HIDE}`,[m.LABEL]:s.clearSearchAriaLabel,tabindex:"-1"},t),this.searchClearButton.innerHTML=Et(this.id),this.searchResultsA11yText=f("span",{class:"iti__a11y-text"},this.dropdownContent),this.searchNoResults=f("div",{class:`iti__no-results ${p.HIDE}`,[m.HIDDEN]:"true"},this.dropdownContent),this.searchNoResults.textContent=s.zeroSearchResults}_maybeUpdateInputPaddingAndReveal(){this.countryContainer&&(this.updateInputPadding(),this.countryContainer.classList.remove(p.V_HIDE))}_maybeBuildHiddenInputs(s){let{hiddenInput:t}=this.options;if(t){let e=this.telInput.getAttribute("name")||"",i=t(e);if(i.phone){let n=this.telInput.form?.querySelector(`input[name="${i.phone}"]`);n?this.hiddenInput=n:(this.hiddenInput=f("input",{type:"hidden",name:i.phone}),s.appendChild(this.hiddenInput))}if(i.country){let n=this.telInput.form?.querySelector(`input[name="${i.country}"]`);n?this.hiddenInputCountry=n:(this.hiddenInputCountry=f("input",{type:"hidden",name:i.country}),s.appendChild(this.hiddenInputCountry))}}}_appendListItems(){let s=document.createDocumentFragment();for(let t=0;tr){let h=i-o;t.scrollTop=c-h}}highlightListItem(s,t){let e=this.highlightedItem;if(e&&(e.classList.remove(p.HIGHLIGHT),e.setAttribute(m.SELECTED,"false")),this.highlightedItem=s,this.highlightedItem&&(this.highlightedItem.classList.add(p.HIGHLIGHT),this.highlightedItem.setAttribute(m.SELECTED,"true"),this.options.countrySearch)){let i=this.highlightedItem.getAttribute("id")||"";this.searchInput.setAttribute(m.ACTIVE_DESCENDANT,i)}t&&this.highlightedItem.focus()}filterCountries(s){this.countryList.innerHTML="";let t=!0;for(let e of s){let i=e.nodeById[this.id];i&&(this.countryList.appendChild(i),t&&(this.highlightListItem(i,!1),t=!1))}t?(this.highlightListItem(null,!1),this.searchNoResults&&this.searchNoResults.classList.remove(p.HIDE)):this.searchNoResults&&this.searchNoResults.classList.add(p.HIDE),this.countryList.scrollTop=0,this.updateSearchResultsA11yText()}destroy(){this.telInput.iti=void 0,delete this.telInput.dataset.intlTelInputId,this.options.separateDialCode&&(this.telInput.style.paddingLeft=this.originalPaddingLeft);let s=this.telInput.parentNode;s.before(this.telInput),s.remove(),this.telInput=null,this.countryContainer=null,this.selectedCountry=null,this.selectedCountryInner=null,this.selectedDialCode=null,this.dropdownArrow=null,this.dropdownContent=null,this.searchInput=null,this.searchIcon=null,this.searchClearButton=null,this.searchNoResults=null,this.searchResultsA11yText=null,this.countryList=null,this.dropdown=null,this.hiddenInput=null,this.hiddenInputCountry=null,this.highlightedItem=null;for(let t of this.countries)delete t.nodeById[this.id];this.countries=null}},Dt=s=>{let{onlyCountries:t,excludeCountries:e}=s;if(t.length){let i=t.map(n=>n.toLowerCase());return N.filter(n=>i.includes(n.iso2))}else if(e.length){let i=e.map(n=>n.toLowerCase());return N.filter(n=>!i.includes(n.iso2))}return N},Nt=(s,t)=>{for(let e of s){let i=e.iso2.toLowerCase();t.i18n[i]&&(e.name=t.i18n[i])}},vt=(s,t)=>{let e=new Set,i=0,n={},r=(o,l,d)=>{if(!o||!l)return;l.length>i&&(i=l.length),n.hasOwnProperty(l)||(n[l]=[]);let c=n[l];if(c.includes(o))return;let h=d!==void 0?d:c.length;c[h]=o};for(let o of s){e.has(o.dialCode)||e.add(o.dialCode);for(let l=1;l{n[o]=n[o].filter(Boolean)});for(let o of s)if(o.areaCodes){let l=n[o.dialCode][0];for(let d of o.areaCodes){for(let c=1;c{t.countryOrder&&(t.countryOrder=t.countryOrder.map(e=>e.toLowerCase())),s.sort((e,i)=>{let{countryOrder:n}=t;if(n){let r=n.indexOf(e.iso2),o=n.indexOf(i.iso2),l=r>-1,d=o>-1;if(l||d)return l&&d?r-o:l?-1:1}return e.name.localeCompare(i.name)})},St=s=>{for(let t of s)t.normalisedName=ot(t.name),t.initials=t.normalisedName.split(/[^a-z]/).map(e=>e[0]).join(""),t.dialCodePlus=`+${t.dialCode}`},Tt=(s,t,e,i)=>{let n=s;if(e&&t){t=`+${i.dialCode}`;let r=n[t.length]===" "||n[t.length]==="-"?t.length+1:t.length;n=n.substring(r)}return n},Pt=(s,t,e,i,n)=>{let r=e?e.formatNumberAsYouType(s,i.iso2):s,{dialCode:o}=i;return n&&t.charAt(0)!=="+"&&r.includes(`+${o}`)?(r.split(`+${o}`)[1]||"").trim():r},Ot=(s,t,e,i)=>{if(e===0&&!i)return 0;let n=0;for(let r=0;r{let t=z(s);if(t.startsWith(it.NANP)&&t.length>=4){let e=t.substring(1,4);return Rt.includes(e)}return!1};for(let s of N)s.name=S[s.iso2];var kt=0,xt=new Set(N.map(s=>s.iso2)),Z=s=>xt.has(s),lt=class ht{constructor(t,e={}){this.id=kt++,this.options={...st,...e},_t(this.options,S),this.ui=new Lt(t,this.options,this.id),this.isAndroid=ht._getIsAndroid(),this.promise=this._createInitPromises(),this.countries=Dt(this.options);let{dialCodes:i,dialCodeMaxLen:n,dialCodeToIso2Map:r}=vt(this.countries,this.options);this.dialCodes=i,this.dialCodeMaxLen=n,this.dialCodeToIso2Map=r,this.countryByIso2=new Map(this.countries.map(o=>[o.iso2,o])),this._init()}static _getIsAndroid(){return typeof navigator<"u"?/Android/i.test(navigator.userAgent):!1}_createInitPromises(){let t=new Promise((i,n)=>{this.resolveAutoCountryPromise=i,this.rejectAutoCountryPromise=n}),e=new Promise((i,n)=>{this.resolveUtilsScriptPromise=i,this.rejectUtilsScriptPromise=n});return Promise.all([t,e])}_init(){this.selectedCountryData={},this.abortController=new AbortController,this._processCountryData(),this.ui.generateMarkup(this.countries),this._setInitialState(),this._initListeners(),this._initRequests()}_processCountryData(){Nt(this.countries,this.options),At(this.countries,this.options),St(this.countries)}_setInitialState(t=!1){let e=this.ui.telInput.getAttribute("value"),i=this.ui.telInput.value,r=e&&e.startsWith("+")&&(!i||!i.startsWith("+"))?e:i,o=this._getDialCode(r),l=rt(r),{initialCountry:d,geoIpLookup:c}=this.options,h=d===X.AUTO&&c;if(o&&!l)this._updateCountryFromNumber(r);else if(!h||t){let g=d?d.toLowerCase():"";Z(g)?this._setCountry(g):o&&l?this._setCountry(yt.ISO2):this._setCountry("")}r&&this._updateValFromNumber(r)}_initListeners(){this._initTelInputListeners(),this.options.allowDropdown&&this._initDropdownListeners(),(this.ui.hiddenInput||this.ui.hiddenInputCountry)&&this.ui.telInput.form&&this._initHiddenInputListener()}_initHiddenInputListener(){let t=()=>{this.ui.hiddenInput&&(this.ui.hiddenInput.value=this.getNumber()),this.ui.hiddenInputCountry&&(this.ui.hiddenInputCountry.value=this.selectedCountryData.iso2||"")};this.ui.telInput.form?.addEventListener("submit",t,{signal:this.abortController.signal})}_initDropdownListeners(){let t=this.abortController.signal,e=o=>{this.ui.dropdownContent.classList.contains(p.HIDE)?this.ui.telInput.focus():o.preventDefault()},i=this.ui.telInput.closest("label");i&&i.addEventListener("click",e,{signal:t});let n=()=>{this.ui.dropdownContent.classList.contains(p.HIDE)&&!this.ui.telInput.disabled&&!this.ui.telInput.readOnly&&this._openDropdown()};this.ui.selectedCountry.addEventListener("click",n,{signal:t});let r=o=>{this.ui.dropdownContent.classList.contains(p.HIDE)&&[b.ARROW_UP,b.ARROW_DOWN,b.SPACE,b.ENTER].includes(o.key)&&(o.preventDefault(),o.stopPropagation(),this._openDropdown()),o.key===b.TAB&&this._closeDropdown()};this.ui.countryContainer.addEventListener("keydown",r,{signal:t})}_initRequests(){let{loadUtils:t,initialCountry:e,geoIpLookup:i}=this.options;if(t&&!u.utils){let r=()=>{u.attachUtils(t)?.catch(()=>{})};if(u.documentReady())r();else{let o=()=>{r()};window.addEventListener("load",o,{signal:this.abortController.signal})}}else this.resolveUtilsScriptPromise();e===X.AUTO&&i&&!this.selectedCountryData.iso2?this._loadAutoCountry():this.resolveAutoCountryPromise()}_loadAutoCountry(){u.autoCountry?this.handleAutoCountry():u.startedLoadingAutoCountry||(u.startedLoadingAutoCountry=!0,typeof this.options.geoIpLookup=="function"&&this.options.geoIpLookup((t="")=>{let e=t.toLowerCase();Z(e)?(u.autoCountry=e,setTimeout(()=>$("handleAutoCountry"))):(this._setInitialState(!0),$("rejectAutoCountryPromise"))},()=>{this._setInitialState(!0),$("rejectAutoCountryPromise")}))}_openDropdownWithPlus(){this._openDropdown(),this.ui.searchInput.value="+",this._filterCountriesByQuery("")}_initTelInputListeners(){this._bindInputListener(),this._maybeBindKeydownListener(),this._maybeBindPasteListener()}_bindInputListener(){let{strictMode:t,formatAsYouType:e,separateDialCode:i,allowDropdown:n,countrySearch:r}=this.options,o=!1;M.ALPHA_UNICODE.test(this.ui.telInput.value)&&(o=!0);let l=d=>{if(this.isAndroid&&d?.data==="+"&&i&&n&&r){let E=this.ui.telInput.selectionStart||0,P=this.ui.telInput.value.substring(0,E-1),D=this.ui.telInput.value.substring(E);this.ui.telInput.value=P+D,this._openDropdownWithPlus();return}this._updateCountryFromNumber(this.ui.telInput.value)&&this._triggerCountryChange();let c=d?.data&&M.NON_PLUS_NUMERIC.test(d.data),h=d?.inputType===tt.PASTE&&this.ui.telInput.value;c||h&&!t?o=!0:M.NON_PLUS_NUMERIC.test(this.ui.telInput.value)||(o=!1);let g=d?.detail&&d.detail.isSetNumber;if(e&&!o&&!g){let E=this.ui.telInput.selectionStart||0,D=this.ui.telInput.value.substring(0,E).replace(M.NON_PLUS_NUMERIC_GLOBAL,"").length,O=d?.inputType===tt.DELETE_FWD,w=this._getFullNumber(),L=Pt(w,this.ui.telInput.value,u.utils,this.selectedCountryData,this.options.separateDialCode),v=Ot(D,L,E,O);this.ui.telInput.value=L,this.ui.telInput.setSelectionRange(v,v)}};this.ui.telInput.addEventListener("input",l,{signal:this.abortController.signal})}_maybeBindKeydownListener(){let{strictMode:t,separateDialCode:e,allowDropdown:i,countrySearch:n}=this.options;if(t||e){let r=o=>{if(o.key&&o.key.length===1&&!o.altKey&&!o.ctrlKey&&!o.metaKey){if(e&&i&&n&&o.key==="+"){o.preventDefault(),this._openDropdownWithPlus();return}if(t){let l=this.ui.telInput.value,c=!l.startsWith("+")&&this.ui.telInput.selectionStart===0&&o.key==="+",h=/^[0-9]$/.test(o.key),g=e?h:c||h,E=l.slice(0,this.ui.telInput.selectionStart)+o.key+l.slice(this.ui.telInput.selectionEnd),P=this._getFullNumber(E),D=u.utils.getCoreNumber(P,this.selectedCountryData.iso2),O=this.maxCoreNumberLength&&D.length>this.maxCoreNumberLength,L=this._getNewCountryFromNumber(P)!==null;(!g||O&&!L&&!c)&&o.preventDefault()}}};this.ui.telInput.addEventListener("keydown",r,{signal:this.abortController.signal})}}_maybeBindPasteListener(){if(this.options.strictMode){let t=e=>{e.preventDefault();let i=this.ui.telInput,n=i.selectionStart,r=i.selectionEnd,o=i.value.slice(0,n),l=i.value.slice(r),d=this.selectedCountryData.iso2,c=e.clipboardData.getData("text"),h=n===0&&r>0,g=!i.value.startsWith("+")||h,E=c.replace(M.NON_PLUS_NUMERIC_GLOBAL,""),P=E.startsWith("+"),D=E.replace(/\+/g,""),O=P&&g?`+${D}`:D,w=o+O+l,L=u.utils.getCoreNumber(w,d);for(;L.length===0&&w.length>0;)w=w.slice(0,-1),L=u.utils.getCoreNumber(w,d);if(!L)return;if(this.maxCoreNumberLength&&L.length>this.maxCoreNumberLength)if(i.selectionEnd===i.value.length){let Ht=L.length-this.maxCoreNumberLength;w=w.slice(0,w.length-Ht)}else return;i.value=w;let v=n+O.length;i.setSelectionRange(v,v),i.dispatchEvent(new InputEvent("input",{bubbles:!0}))};this.ui.telInput.addEventListener("paste",t,{signal:this.abortController.signal})}}_cap(t){let e=Number(this.ui.telInput.getAttribute("maxlength"));return e&&t.length>e?t.substring(0,e):t}_trigger(t,e={}){let i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:e});this.ui.telInput.dispatchEvent(i)}_openDropdown(){let{fixDropdownWidth:t,countrySearch:e}=this.options;if(this.dropdownAbortController=new AbortController,t&&(this.ui.dropdownContent.style.width=`${this.ui.telInput.offsetWidth}px`),this.ui.dropdownContent.classList.remove(p.HIDE),this.ui.selectedCountry.setAttribute(m.EXPANDED,"true"),this._setDropdownPosition(),e){let i=this.ui.countryList.firstElementChild;i&&(this.ui.highlightListItem(i,!1),this.ui.countryList.scrollTop=0),this.ui.searchInput.focus()}this._bindDropdownListeners(),this.ui.dropdownArrow.classList.add(p.ARROW_UP),this._trigger(T.OPEN_COUNTRY_DROPDOWN)}_setDropdownPosition(){if(this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.ui.dropdown),!this.options.useFullscreenPopup){let t=this.ui.telInput.getBoundingClientRect(),e=this.ui.telInput.offsetHeight;if(this.options.dropdownContainer){this.ui.dropdown.style.top=`${t.top+e}px`,this.ui.dropdown.style.left=`${t.left}px`;let i=()=>this._closeDropdown();window.addEventListener("scroll",i,{signal:this.dropdownAbortController.signal})}}}_bindDropdownListeners(){let t=this.dropdownAbortController.signal;this._bindDropdownMouseoverListener(t),this._bindDropdownCountryClickListener(t),this._bindDropdownClickOffListener(t),this._bindDropdownKeydownListener(t),this.options.countrySearch&&this._bindDropdownSearchListeners(t)}_bindDropdownMouseoverListener(t){let e=i=>{let n=i.target?.closest(`.${p.COUNTRY_ITEM}`);n&&this.ui.highlightListItem(n,!1)};this.ui.countryList.addEventListener("mouseover",e,{signal:t})}_bindDropdownCountryClickListener(t){let e=i=>{let n=i.target?.closest(`.${p.COUNTRY_ITEM}`);n&&this._selectListItem(n)};this.ui.countryList.addEventListener("click",e,{signal:t})}_bindDropdownClickOffListener(t){let e=i=>{!!i.target.closest(`#iti-${this.id}__dropdown-content`)||this._closeDropdown()};setTimeout(()=>{document.documentElement.addEventListener("click",e,{signal:t})},0)}_bindDropdownKeydownListener(t){let e="",i=null,n=r=>{[b.ARROW_UP,b.ARROW_DOWN,b.ENTER,b.ESC].includes(r.key)&&(r.preventDefault(),r.stopPropagation(),r.key===b.ARROW_UP||r.key===b.ARROW_DOWN?this._handleUpDownKey(r.key):r.key===b.ENTER?this._handleEnterKey():r.key===b.ESC&&this._closeDropdown()),!this.options.countrySearch&&M.HIDDEN_SEARCH_CHAR.test(r.key)&&(r.stopPropagation(),i&&clearTimeout(i),e+=r.key.toLowerCase(),this._searchForCountry(e),i=setTimeout(()=>{e=""},ft.HIDDEN_SEARCH_RESET_MS))};document.addEventListener("keydown",n,{signal:t})}_bindDropdownSearchListeners(t){let e=()=>{let o=this.ui.searchInput.value.trim();this._filterCountriesByQuery(o),this.ui.searchInput.value?this.ui.searchClearButton.classList.remove(p.HIDE):this.ui.searchClearButton.classList.add(p.HIDE)},i=null,n=()=>{i&&clearTimeout(i),i=setTimeout(()=>{e(),i=null},100)};this.ui.searchInput.addEventListener("input",n,{signal:t});let r=()=>{this.ui.searchInput.value="",this.ui.searchInput.focus(),e()};this.ui.searchClearButton.addEventListener("click",r,{signal:t})}_searchForCountry(t){let e=It(this.countries,t);if(e){let i=e.nodeById[this.id];this.ui.highlightListItem(i,!1),this.ui.scrollTo(i)}}_filterCountriesByQuery(t){let e;t===""?e=this.countries:e=bt(this.countries,t),this.ui.filterCountries(e)}_handleUpDownKey(t){let e=t===b.ARROW_UP?this.ui.highlightedItem?.previousElementSibling:this.ui.highlightedItem?.nextElementSibling;!e&&this.ui.countryList.childElementCount>1&&(e=t===b.ARROW_UP?this.ui.countryList.lastElementChild:this.ui.countryList.firstElementChild),e&&(this.ui.scrollTo(e),this.ui.highlightListItem(e,!1))}_handleEnterKey(){this.ui.highlightedItem&&this._selectListItem(this.ui.highlightedItem)}_updateValFromNumber(t){let e=t;if(this.options.formatOnDisplay&&u.utils&&this.selectedCountryData){let i=this.options.nationalMode||!e.startsWith("+")&&!this.options.separateDialCode,{NATIONAL:n,INTERNATIONAL:r}=u.utils.numberFormat,o=i?n:r;e=u.utils.formatNumber(e,this.selectedCountryData.iso2,o)}e=this._beforeSetNumber(e),this.ui.telInput.value=e}_updateCountryFromNumber(t){let e=this._getNewCountryFromNumber(t);return e!==null?this._setCountry(e):!1}_ensureHasDialCode(t){let{dialCode:e,nationalPrefix:i}=this.selectedCountryData;if(t.startsWith("+")||!e)return t;let o=i&&t.startsWith(i)&&!this.options.separateDialCode?t.substring(1):t;return`+${e}${o}`}_getNewCountryFromNumber(t){let e=t.indexOf("+"),i=e?t.substring(e):t,n=this.selectedCountryData.iso2,r=this.selectedCountryData.dialCode;i=this._ensureHasDialCode(i);let o=this._getDialCode(i,!0),l=z(i);if(o){let d=z(o),c=this.dialCodeToIso2Map[d];if(c.length===1)return c[0]===n?null:c[0];if(!n&&this.defaultCountry&&c.includes(this.defaultCountry))return this.defaultCountry;if(r===it.NANP&&rt(l))return null;let{areaCodes:g,priority:E}=this.selectedCountryData;if(g){let L=g.map(v=>`${r}${v}`);for(let v of L)if(l.startsWith(v))return null}let D=g&&!(E===0)&&l.length>d.length,O=n&&c.includes(n)&&!D,w=n===c[0];if(!O&&!w)return c[0]}else if(i.startsWith("+")&&l.length){let d=this.selectedCountryData.dialCode||"";return d&&d.startsWith(l)?null:""}else if((!i||i==="+")&&!n)return this.defaultCountry;return null}_setCountry(t){let{separateDialCode:e,showFlags:i,i18n:n}=this.options,r=this.selectedCountryData.iso2||"";if(this.selectedCountryData=t?this.countryByIso2.get(t):{},this.selectedCountryData.iso2&&(this.defaultCountry=this.selectedCountryData.iso2),this.ui.selectedCountry){let o=t&&i?`${p.FLAG} iti__${t}`:`${p.FLAG} ${p.GLOBE}`,l,d;if(t){let{name:c,dialCode:h}=this.selectedCountryData;d=c,l=n.selectedCountryAriaLabel.replace("${countryName}",c).replace("${dialCode}",`+${h}`)}else d=n.noCountrySelected,l=n.noCountrySelected;this.ui.selectedCountryInner.className=o,this.ui.selectedCountry.setAttribute("title",d),this.ui.selectedCountry.setAttribute(m.LABEL,l)}if(e){let o=this.selectedCountryData.dialCode?`+${this.selectedCountryData.dialCode}`:"";this.ui.selectedDialCode.textContent=o,this.ui.updateInputPadding()}return this._updatePlaceholder(),this._updateMaxLength(),r!==t}_updateMaxLength(){let{strictMode:t,placeholderNumberType:e,validationNumberTypes:i}=this.options,{iso2:n}=this.selectedCountryData;if(t&&u.utils)if(n){let r=u.utils.numberType[e],o=u.utils.getExampleNumber(n,!1,r,!0),l=o;for(;u.utils.isPossibleNumber(o,n,i);)l=o,o+="0";let d=u.utils.getCoreNumber(l,n);this.maxCoreNumberLength=d.length,n==="by"&&(this.maxCoreNumberLength=d.length+1)}else this.maxCoreNumberLength=null}_updatePlaceholder(){let{autoPlaceholder:t,placeholderNumberType:e,nationalMode:i,customPlaceholder:n}=this.options,r=t===q.AGGRESSIVE||!this.ui.hadInitialPlaceholder&&t===q.POLITE;if(u.utils&&r){let o=u.utils.numberType[e],l=this.selectedCountryData.iso2?u.utils.getExampleNumber(this.selectedCountryData.iso2,i,o):"";l=this._beforeSetNumber(l),typeof n=="function"&&(l=n(l,this.selectedCountryData)),this.ui.telInput.setAttribute("placeholder",l)}}_selectListItem(t){let e=t.dataset[nt.COUNTRY_CODE],i=this._setCountry(e);this._closeDropdown();let n=t.dataset[nt.DIAL_CODE];this._updateDialCode(n),this.options.formatOnDisplay&&this._updateValFromNumber(this.ui.telInput.value),this.ui.telInput.focus(),i&&this._triggerCountryChange()}_closeDropdown(){this.ui.dropdownContent.classList.contains(p.HIDE)||(this.ui.dropdownContent.classList.add(p.HIDE),this.ui.selectedCountry.setAttribute(m.EXPANDED,"false"),this.ui.highlightedItem&&this.ui.highlightedItem.setAttribute(m.SELECTED,"false"),this.options.countrySearch&&this.ui.searchInput.removeAttribute(m.ACTIVE_DESCENDANT),this.ui.dropdownArrow.classList.remove(p.ARROW_UP),this.dropdownAbortController.abort(),this.dropdownAbortController=null,this.options.dropdownContainer&&this.ui.dropdown.remove(),this._trigger(T.CLOSE_COUNTRY_DROPDOWN))}_updateDialCode(t){let e=this.ui.telInput.value,i=`+${t}`,n;if(e.startsWith("+")){let r=this._getDialCode(e);r?n=e.replace(r,i):n=i,this.ui.telInput.value=n}}_getDialCode(t,e){let i="";if(t.startsWith("+")){let n="",r=!1;for(let o=0;ot?this._utilsIsValidNumber(o):this._utilsIsPossibleNumber(o),i=this._getFullNumber(),n=i.search(M.ALPHA_UNICODE);if(n>-1&&!this.options.allowPhonewords){let o=i.substring(0,n),l=e(o),d=e(i);return l&&d}return e(i)}_utilsIsValidNumber(t){return u.utils?u.utils.isValidNumber(t,this.selectedCountryData.iso2,this.options.validationNumberTypes):null}setCountry(t){let e=t?.toLowerCase();if(!Z(e))throw new Error(`Invalid country code: '${e}'`);let i=this.selectedCountryData.iso2;(t&&e!==i||!t&&i)&&(this._setCountry(e),this._updateDialCode(this.selectedCountryData.dialCode),this.options.formatOnDisplay&&this._updateValFromNumber(this.ui.telInput.value),this._triggerCountryChange())}setNumber(t){let e=this._updateCountryFromNumber(t);this._updateValFromNumber(t),e&&this._triggerCountryChange(),this._trigger(T.INPUT,{isSetNumber:!0})}setPlaceholderNumberType(t){this.options.placeholderNumberType=t,this._updatePlaceholder()}setDisabled(t){this.ui.telInput.disabled=t,t?this.ui.selectedCountry.setAttribute("disabled","true"):this.ui.selectedCountry.removeAttribute("disabled")}},Mt=s=>{if(!u.utils&&!u.startedLoadingUtilsScript){let t;if(typeof s=="function")try{t=Promise.resolve(s())}catch(e){return Promise.reject(e)}else return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof s}`));return u.startedLoadingUtilsScript=!0,t.then(e=>{let i=e?.default;if(!i||typeof i!="object")throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return u.utils=i,$("handleUtils"),!0}).catch(e=>{throw $("rejectUtilsScriptPromise",e),e})}return null},$=(s,...t)=>{Object.values(u.instances).forEach(e=>{let i=e[s];typeof i=="function"&&i.apply(e,t)})},u=Object.assign((s,t)=>{let e=new lt(s,t);return u.instances[e.id]=e,s.iti=e,e},{defaults:st,documentReady:()=>document.readyState==="complete",getCountryData:()=>N,getInstance:s=>{let t=s.dataset.intlTelInputId;return t?u.instances[t]:null},instances:{},attachUtils:Mt,startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"25.12.5"}),Bt=u;return F(A)})();return a.default})});var ut=()=>{let a=document.querySelector("[el-menu-nav]"),C=document.querySelectorAll("[menu-dark]"),_=document.querySelectorAll("[menu-light]"),I=document.querySelector("[el-menu-logo-dark]"),y=document.querySelector("[el-menu-logo-light]");if(!a||C.length===0&&_.length===0)return;let R=a;R.style.transition="background-color 100ms ease",I&&(I.style.transition="opacity 100ms ease"),y&&(y.style.transition="opacity 100ms ease");let U=!1,F="default",A=()=>{let G=a.getBoundingClientRect(),B=G.top+window.scrollY,N=B+G.height,H=!1,W=!1;for(let k of C){let x=k.getBoundingClientRect(),S=x.top+window.scrollY,T=S+x.height;if(BS){H=!0,k.getAttribute("menu-dark")==="logo-light"&&(W=!0);break}}if(!H)for(let k of _){let x=k.getBoundingClientRect(),S=x.top+window.scrollY,T=S+x.height;if(BS){k.getAttribute("menu-light")==="logo-light"&&(W=!0);break}}H!==U&&(U=H,U?R.style.backgroundColor="rgba(2, 39, 31, 0.29)":R.style.backgroundColor="");let V=W?"light":"default";V!==F&&(F=V,I&&y&&(F==="light"?(I.style.opacity="0",y.style.opacity="1"):(I.style.opacity="",y.style.opacity="")))};return A(),window.addEventListener("scroll",A),window.addEventListener("resize",A),()=>{window.removeEventListener("scroll",A),window.removeEventListener("resize",A)}};var dt=()=>{let a=document.getElementById("current-year");if(!a)return;let C=new Date().getFullYear();a.textContent=C.toString()};var ct=()=>{let a=document.querySelector(".colored-cards-grid");if(!a)return;let C=a.querySelectorAll(".colored-cards-grid_item");if(!C.length)return;let _=["#E8E9EA","#FEFCE8","#E0F2FE","#FCE7F3","#E0F2E9","#D1D5DB"];C.forEach((I,y)=>{let R=y%_.length;I.style.backgroundColor=_[R]})};var Ct=jt(pt(),1),mt=()=>{let a=document.querySelector("#phone");if(!a)return;Yt();let C=(0,Ct.default)(a,{utilsScript:"https://cdn.jsdelivr.net/npm/intl-tel-input@25.12.5/build/js/utils.js",preferredCountries:["ua","us","gb","de"],nationalMode:!1,autoPlaceholder:"aggressive",separateDialCode:!0,showFlags:!0,i18n:{searchPlaceholder:"Search country"}});a.addEventListener("blur",()=>{a.value.trim()&&(C.isValidNumber()?(a.classList.remove("error"),a.classList.add("valid")):(a.classList.remove("valid"),a.classList.add("error")))}),a.addEventListener("focus",()=>{a.classList.remove("error","valid")});let _=a.closest("form");return _&&_.addEventListener("submit",I=>{let y=C.getNumber();a.dataset.fullNumber=y,C.isValidNumber()||(I.preventDefault(),a.classList.add("error"),console.warn("Invalid phone number"))}),()=>{C.destroy()}},Kt="https://cdn.jsdelivr.net/npm/intl-tel-input@25.12.5/build/css/intlTelInput.min.css";function Yt(){if(!document.getElementById("intl-tel-input-css")){let a=document.createElement("link");a.id="intl-tel-input-css",a.rel="stylesheet",a.href=Kt,a.media="all",document.head.appendChild(a)}if(!document.getElementById("phone-country-custom-style")){let a=document.createElement("style");a.id="phone-country-custom-style",a.textContent=` .iti { width: 100%; } .iti__tel-input { width: 100%; } .iti--allow-dropdown .iti__country-container { inset-inline-start: 8px; } .iti__selected-country { border-radius: 6px 0 0 6px; } `,document.head.appendChild(a)}}window.Webflow||(window.Webflow=[]);window.Webflow.push(()=>{ut(),dt(),ct(),mt()});})();