Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-international-phone

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-international-phone - npm Package Compare versions

Comparing version 1.8.2 to 1.8.3

2

build/hooks/usePhoneInput.d.ts

@@ -27,5 +27,5 @@ import { CountryIso2 } from '../types';

handlePhoneValueChange: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => string;
inputRef: import("react").RefObject<HTMLInputElement>;
inputRef: import("react").MutableRefObject<HTMLInputElement | null>;
country: CountryIso2;
setCountry: import("react").Dispatch<import("react").SetStateAction<CountryIso2>>;
};

@@ -1,1 +0,1 @@

!function(e,a){"object"==typeof exports&&"object"==typeof module?module.exports=a(require("react")):"function"==typeof define&&define.amd?define(["react"],a):"object"==typeof exports?exports["react-international-phone"]=a(require("react")):e["react-international-phone"]=a(e.react)}(this,(e=>(()=>{"use strict";var a={0:(e,a,r)=>{r.r(a)},374:(e,a,r)=>{r.r(a)},840:(e,a,r)=>{r.r(a)},481:(e,a,r)=>{r.r(a)},549:(e,a,r)=>{r.r(a)},153:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)},n=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:!0,value:a})}:function(e,a){e.default=a}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(a,e,r);return i(a,e),a},u=this&&this.__rest||function(e,a){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)a.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(r[t[n]]=e[t[n]])}return r};Object.defineProperty(a,"__esModule",{value:!0}),a.CountrySelector=void 0,r(0);var l=o(r(156)),s=r(946),c=r(515),d=r(332),f=r(425),p=r(60);a.CountrySelector=function(e){var a,r,n=e.selectedCountry,i=e.onSelect,o=e.disabled,y=e.hideDropdown,h=e.countries,v=void 0===h?s.defaultCountries:h,m=e.renderButtonWrapper,b=u(e,["selectedCountry","onSelect","disabled","hideDropdown","countries","renderButtonWrapper"]),C=(0,l.useState)(!1),g=C[0],P=C[1],_=(0,l.useMemo)((function(){if(n)return(0,d.getCountry)({value:n,field:"iso2",countries:v})}),[v,n]),O=(0,l.useRef)(null);return l.default.createElement("div",{className:(0,c.buildClassNames)({addPrefix:["country-selector"],rawClassNames:[b.className]}),style:b.style,ref:O},(a={title:null==_?void 0:_.name,onClick:function(){return P((function(e){return!e}))},onMouseDown:function(e){return e.preventDefault()},onKeyDown:function(e){e.key&&["ArrowUp","ArrowDown"].includes(e.key)&&(e.preventDefault(),P(!0))},disabled:y||o,role:"combobox","aria-label":"Country selector","aria-haspopup":"listbox","aria-expanded":g},r=l.default.createElement("div",{className:(0,c.buildClassNames)({addPrefix:["country-selector-button__button-content"],rawClassNames:[b.buttonContentWrapperClassName]}),style:b.buttonContentWrapperStyle},l.default.createElement(f.FlagEmoji,{iso2:n,className:(0,c.buildClassNames)({addPrefix:["country-selector-button__flag-emoji",o&&"country-selector-button__flag-emoji--disabled"],rawClassNames:[b.flagClassName]}),style:t({visibility:n?"visible":"hidden"},b.flagStyle)}),!y&&l.default.createElement("div",{className:(0,c.buildClassNames)({addPrefix:["country-selector-button__dropdown-arrow",o&&"country-selector-button__dropdown-arrow--disabled",g&&"country-selector-button__dropdown-arrow--active"],rawClassNames:[b.dropdownArrowClassName]}),style:b.dropdownArrowStyle})),m?m({children:r,rootProps:a}):l.default.createElement("button",t({},a,{type:"button",className:(0,c.buildClassNames)({addPrefix:["country-selector-button",g&&"country-selector-button--active",o&&"country-selector-button--disabled",y&&"country-selector-button--hide-dropdown"],rawClassNames:[b.buttonClassName]}),"data-country":n,style:b.buttonStyle}),r)),l.default.createElement(p.CountrySelectorDropdown,t({show:g,countries:v,onSelect:function(e){P(!1),null==i||i(e)},selectedCountry:n,onClose:function(){P(!1)}},b.dropdownStyleProps)))}},60:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)},n=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:!0,value:a})}:function(e,a){e.default=a}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(a,e,r);return i(a,e),a},u=this&&this.__rest||function(e,a){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)a.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(r[t[n]]=e[t[n]])}return r};Object.defineProperty(a,"__esModule",{value:!0}),a.CountrySelectorDropdown=void 0,r(374);var l=o(r(156)),s=r(946),c=r(515),d=r(332),f=r(425);a.CountrySelectorDropdown=function(e){var a=e.show,r=e.dialCodePrefix,n=void 0===r?"+":r,i=e.selectedCountry,o=e.countries,p=void 0===o?s.defaultCountries:o,y=e.onSelect,h=e.onClose,v=u(e,["show","dialCodePrefix","selectedCountry","countries","onSelect","onClose"]),m=(0,l.useRef)(null),b=(0,l.useRef)(),C=(0,l.useCallback)((function(e){return p.findIndex((function(a){return(0,d.parseCountry)(a).iso2===e}))}),[p]),g=(0,l.useState)(C(i)),P=g[0],_=g[1],O=function(){b.current!==i&&_(C(i))},w=(0,l.useCallback)((function(e){_(C(e.iso2)),null==y||y(e)}),[y,C]),j=function(e){var a=p.length-1;_((function(r){var t,n=(t=r,"prev"===e?t-1:"next"===e?t+1:"last"===e?a:0);return n<0?0:n>a?a:n}))},D=(0,l.useCallback)((function(){if(m.current&&void 0!==P){var e=(0,d.parseCountry)(p[P]).iso2;if(e!==b.current){var a=m.current.querySelector('[data-country="'.concat(e,'"]'));a&&((0,d.scrollToChild)(m.current,a),b.current=e)}}}),[P,p]);return(0,l.useEffect)((function(){D()}),[P,D]),(0,l.useEffect)((function(){m.current&&(a?m.current.focus():O())}),[a]),(0,l.useEffect)((function(){O()}),[i]),l.default.createElement("ul",{ref:m,role:"listbox",className:(0,c.buildClassNames)({addPrefix:["country-selector-dropdown"],rawClassNames:[v.className]}),style:t({display:a?"block":"none"},v.style),onKeyDown:function(e){if("Enter"!==e.key){if("Escape"!==e.key)return"ArrowUp"===e.key?(e.preventDefault(),void j("prev")):"ArrowDown"===e.key?(e.preventDefault(),void j("next")):"PageUp"===e.key?(e.preventDefault(),void j("first")):"PageDown"===e.key?(e.preventDefault(),void j("last")):void 0;null==h||h()}else{var a=(0,d.parseCountry)(p[P]);w(a)}},onBlur:h,tabIndex:-1,"aria-activedescendant":"".concat((0,d.parseCountry)(p[P]).iso2,"-option")},p.map((function(e,a){var r=(0,d.parseCountry)(e),t=r.iso2===i,o=a===P;return l.default.createElement("li",{key:r.iso2,"data-country":r.iso2,role:"option","aria-selected":t,"aria-label":"".concat(r.name," ").concat(n).concat(r.dialCode),id:"".concat(r.iso2,"-option"),className:(0,c.buildClassNames)({addPrefix:["country-selector-dropdown__list-item",t&&"country-selector-dropdown__list-item--selected",o&&"country-selector-dropdown__list-item--focused"],rawClassNames:[v.listItemClassName]}),onClick:function(){return w(r)},style:v.listItemStyle},l.default.createElement(f.FlagEmoji,{iso2:r.iso2,className:(0,c.buildClassNames)({addPrefix:["country-selector-dropdown__list-item-flag-emoji"],rawClassNames:[v.listItemFlagClassName]}),style:v.listItemFlagStyle}),l.default.createElement("span",{className:(0,c.buildClassNames)({addPrefix:["country-selector-dropdown__list-item-country-name"],rawClassNames:[v.listItemCountryNameClassName]}),style:v.listItemCountryNameStyle},r.name),l.default.createElement("span",{className:(0,c.buildClassNames)({addPrefix:["country-selector-dropdown__list-item-dial-code"],rawClassNames:[v.listItemDialCodeClassName]}),style:v.listItemDialCodeStyle},n,r.dialCode))})))}},7:function(e,a,r){var t=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.DialCodePreview=void 0,r(840);var n=t(r(156)),i=r(515);a.DialCodePreview=function(e){var a=e.dialCode,r=e.prefix,t=e.disabled,o=e.style,u=e.className;return n.default.createElement("div",{className:(0,i.buildClassNames)({addPrefix:["dial-code-preview",t&&"dial-code-preview--disabled"],rawClassNames:[u]}),style:o},"".concat(r).concat(a))}},425:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)},n=this&&this.__rest||function(e,a){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)a.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(r[t[n]]=e[t[n]])}return r},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.FlagEmoji=void 0,r(481);var o=i(r(156)),u=r(515),l="abcdefghijklmnopqrstuvwxyz".split("").reduce((function(e,a,r){var n,i,o;return t(t({},e),((n={})[a]=(i=r,o=parseInt("1f1e6",16),Number(o+i).toString(16)),n))}),{});a.FlagEmoji=function(e){var a=e.iso2,r=e.size,i=void 0===r?"24px":r,s=e.protocol,c=void 0===s?"https":s,d=e.disableLazyLoading,f=e.className,p=n(e,["iso2","size","protocol","disableLazyLoading","className"]);if(!a)return o.default.createElement("img",t({width:i,height:i},p));var y=function(e){return[l[e[0]],l[e[1]]].join("-")}(a),h="".concat(c,"://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/svg/").concat(y,".svg");return o.default.createElement("img",t({className:(0,u.buildClassNames)({addPrefix:["flag-emoji"],rawClassNames:[f]}),src:h,width:i,height:i,draggable:!1,"data-country":a,loading:d?void 0:"lazy"},p))}},28:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)},n=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:!0,value:a})}:function(e,a){e.default=a}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(a,e,r);return i(a,e),a},u=this&&this.__rest||function(e,a){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)a.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(r[t[n]]=e[t[n]])}return r};Object.defineProperty(a,"__esModule",{value:!0}),a.PhoneInput=void 0,r(549);var l=o(r(156)),s=r(946),c=r(882),d=r(515),f=r(332),p=r(153),y=r(7);a.PhoneInput=function(e){var a,r=e.hideDropdown,n=e.placeholder,i=e.disabled,o=e.showDisabledDialCodeAndPrefix,h=e.inputProps,v=e.onChange,m=e.style,b=e.className,C=e.inputStyle,g=e.inputClassName,P=e.countrySelectorStyleProps,_=e.dialCodePreviewStyleProps,O=e.countries,w=void 0===O?s.defaultCountries:O,j=u(e,["hideDropdown","placeholder","disabled","showDisabledDialCodeAndPrefix","inputProps","onChange","style","className","inputStyle","inputClassName","countrySelectorStyleProps","dialCodePreviewStyleProps","countries"]),D=(0,c.usePhoneInput)(t(t({},j),{countries:w,onCountryChange:function(e){null==v||v(e)}})),x=D.phone,M=D.inputRef,S=D.country,N=D.setCountry,k=D.handlePhoneValueChange,A=(0,l.useMemo)((function(){if(S)return(0,f.getCountry)({value:S,field:"iso2",countries:w})}),[w,S]),E=j.disableDialCodeAndPrefix&&o&&(null==A?void 0:A.dialCode);return l.default.createElement("div",{className:(0,d.buildClassNames)({addPrefix:["input-container"],rawClassNames:[b]}),style:m},l.default.createElement(p.CountrySelector,t({onSelect:function(e){return N(e.iso2)},selectedCountry:S,countries:w,disabled:i,hideDropdown:r},P)),E&&l.default.createElement(y.DialCodePreview,t({dialCode:A.dialCode,prefix:null!==(a=j.prefix)&&void 0!==a?a:"+",disabled:i},_)),l.default.createElement("input",t({onChange:function(e){var a=k(e);null==v||v(a)},value:x,type:"tel",ref:M,className:(0,d.buildClassNames)({addPrefix:["input",i&&"input--disabled"],rawClassNames:[g]}),placeholder:n,disabled:i,style:C},h)))}},946:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.defaultCountries=void 0,a.defaultCountries=[["Afghanistan",["asia"],"af","93"],["Albania",["europe"],"al","355"],["Algeria",["africa","north-africa"],"dz","213"],["Andorra",["europe"],"ad","376"],["Angola",["africa"],"ao","244"],["Antigua and Barbuda",["america","carribean"],"ag","1268"],["Argentina",["america","south-america"],"ar","54","(..) ........",0,["11","221","223","261","264","2652","280","2905","291","2920","2966","299","341","342","343","351","376","379","381","3833","385","387","388"]],["Armenia",["asia","ex-ussr"],"am","374",".. ......"],["Aruba",["america","carribean"],"aw","297"],["Australia",["oceania"],"au","61","(..) .... ....",0,["2","3","4","7","8","02","03","04","07","08"]],["Austria",["europe","eu-union"],"at","43"],["Azerbaijan",["asia","ex-ussr"],"az","994","(..) ... .. .."],["Bahamas",["america","carribean"],"bs","1242"],["Bahrain",["middle-east"],"bh","973"],["Bangladesh",["asia"],"bd","880"],["Barbados",["america","carribean"],"bb","1246"],["Belarus",["europe","ex-ussr"],"by","375","(..) ... .. .."],["Belgium",["europe","eu-union"],"be","32","... .. .. .."],["Belize",["america","central-america"],"bz","501"],["Benin",["africa"],"bj","229"],["Bhutan",["asia"],"bt","975"],["Bolivia",["america","south-america"],"bo","591"],["Bosnia and Herzegovina",["europe","ex-yugos"],"ba","387"],["Botswana",["africa"],"bw","267"],["Brazil",["america","south-america"],"br","55","(..) ........."],["British Indian Ocean Territory",["asia"],"io","246"],["Brunei",["asia"],"bn","673"],["Bulgaria",["europe","eu-union"],"bg","359"],["Burkina Faso",["africa"],"bf","226"],["Burundi",["africa"],"bi","257"],["Cambodia",["asia"],"kh","855"],["Cameroon",["africa"],"cm","237"],["Canada",["america","north-america"],"ca","1","(...) ...-....",1,["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde",["africa"],"cv","238"],["Caribbean Netherlands",["america","carribean"],"bq","599","",1],["Central African Republic",["africa"],"cf","236"],["Chad",["africa"],"td","235"],["Chile",["america","south-america"],"cl","56"],["China",["asia"],"cn","86","..-........."],["Colombia",["america","south-america"],"co","57","... ... ...."],["Comoros",["africa"],"km","269"],["Congo",["africa"],"cd","243"],["Congo",["africa"],"cg","242"],["Costa Rica",["america","central-america"],"cr","506","....-...."],["Côte d'Ivoire",["africa"],"ci","225",".. .. .. .."],["Croatia",["europe","eu-union","ex-yugos"],"hr","385"],["Cuba",["america","carribean"],"cu","53"],["Curaçao",["america","carribean"],"cw","599","",0],["Cyprus",["europe","eu-union"],"cy","357",".. ......"],["Czech Republic",["europe","eu-union"],"cz","420","... ... ..."],["Denmark",["europe","eu-union","baltic"],"dk","45",".. .. .. .."],["Djibouti",["africa"],"dj","253"],["Dominica",["america","carribean"],"dm","1767"],["Dominican Republic",["america","carribean"],"do","1","",2],["Ecuador",["america","south-america"],"ec","593"],["Egypt",["africa","north-africa"],"eg","20"],["El Salvador",["america","central-america"],"sv","503","....-...."],["Equatorial Guinea",["africa"],"gq","240"],["Eritrea",["africa"],"er","291"],["Estonia",["europe","eu-union","ex-ussr","baltic"],"ee","372",".... ......"],["Ethiopia",["africa"],"et","251"],["Fiji",["oceania"],"fj","679"],["Finland",["europe","eu-union","baltic"],"fi","358",".. ... .. .."],["France",["europe","eu-union"],"fr","33",". .. .. .. .."],["French Guiana",["america","south-america"],"gf","594"],["French Polynesia",["oceania"],"pf","689"],["Gabon",["africa"],"ga","241"],["Gambia",["africa"],"gm","220"],["Georgia",["asia","ex-ussr"],"ge","995"],["Germany",["europe","eu-union","baltic"],"de","49",".... ........"],["Ghana",["africa"],"gh","233"],["Greece",["europe","eu-union"],"gr","30"],["Grenada",["america","carribean"],"gd","1473"],["Guadeloupe",["america","carribean"],"gp","590","",0],["Guam",["oceania"],"gu","1671"],["Guatemala",["america","central-america"],"gt","502","....-...."],["Guinea",["africa"],"gn","224"],["Guinea-Bissau",["africa"],"gw","245"],["Guyana",["america","south-america"],"gy","592"],["Haiti",["america","carribean"],"ht","509","....-...."],["Honduras",["america","central-america"],"hn","504"],["Hong Kong",["asia"],"hk","852",".... ...."],["Hungary",["europe","eu-union"],"hu","36"],["Iceland",["europe"],"is","354","... ...."],["India",["asia"],"in","91",".....-....."],["Indonesia",["asia"],"id","62"],["Iran",["middle-east"],"ir","98","... ... ...."],["Iraq",["middle-east"],"iq","964"],["Ireland",["europe","eu-union"],"ie","353",".. ......."],["Israel",["middle-east"],"il","972","... ... ...."],["Italy",["europe","eu-union"],"it","39","... .......",0],["Jamaica",["america","carribean"],"jm","1876"],["Japan",["asia"],"jp","81",".. .... ...."],["Jordan",["middle-east"],"jo","962"],["Kazakhstan",["asia","ex-ussr"],"kz","7","... ...-..-..",1,["310","311","312","313","315","318","321","324","325","326","327","336","7172","73622"]],["Kenya",["africa"],"ke","254"],["Kiribati",["oceania"],"ki","686"],["Kosovo",["europe","ex-yugos"],"xk","383"],["Kuwait",["middle-east"],"kw","965"],["Kyrgyzstan",["asia","ex-ussr"],"kg","996","... ... ..."],["Laos",["asia"],"la","856"],["Latvia",["europe","eu-union","ex-ussr","baltic"],"lv","371",".. ... ..."],["Lebanon",["middle-east"],"lb","961"],["Lesotho",["africa"],"ls","266"],["Liberia",["africa"],"lr","231"],["Libya",["africa","north-africa"],"ly","218"],["Liechtenstein",["europe"],"li","423"],["Lithuania",["europe","eu-union","ex-ussr","baltic"],"lt","370"],["Luxembourg",["europe","eu-union"],"lu","352"],["Macau",["asia"],"mo","853"],["Macedonia",["europe","ex-yugos"],"mk","389"],["Madagascar",["africa"],"mg","261"],["Malawi",["africa"],"mw","265"],["Malaysia",["asia"],"my","60","..-....-...."],["Maldives",["asia"],"mv","960"],["Mali",["africa"],"ml","223"],["Malta",["europe","eu-union"],"mt","356"],["Marshall Islands",["oceania"],"mh","692"],["Martinique",["america","carribean"],"mq","596"],["Mauritania",["africa"],"mr","222"],["Mauritius",["africa"],"mu","230"],["Mexico",["america","central-america"],"mx","52","... ... ....",0,["33","55","81","229","656","664","774","998"]],["Micronesia",["oceania"],"fm","691"],["Moldova",["europe"],"md","373","(..) ..-..-.."],["Monaco",["europe"],"mc","377"],["Mongolia",["asia"],"mn","976"],["Montenegro",["europe","ex-yugos"],"me","382"],["Morocco",["africa","north-africa"],"ma","212"],["Mozambique",["africa"],"mz","258"],["Myanmar",["asia"],"mm","95"],["Namibia",["africa"],"na","264"],["Nauru",["africa"],"nr","674"],["Nepal",["asia"],"np","977"],["Netherlands",["europe","eu-union"],"nl","31",".. ........"],["New Caledonia",["oceania"],"nc","687"],["New Zealand",["oceania"],"nz","64","...-...-...."],["Nicaragua",["america","central-america"],"ni","505"],["Niger",["africa"],"ne","227"],["Nigeria",["africa"],"ng","234"],["North Korea",["asia"],"kp","850"],["Norway",["europe","baltic"],"no","47","... .. ..."],["Oman",["middle-east"],"om","968"],["Pakistan",["asia"],"pk","92","...-......."],["Palau",["oceania"],"pw","680"],["Palestine",["middle-east"],"ps","970"],["Panama",["america","central-america"],"pa","507"],["Papua New Guinea",["oceania"],"pg","675"],["Paraguay",["america","south-america"],"py","595"],["Peru",["america","south-america"],"pe","51"],["Philippines",["asia"],"ph","63",".... ......."],["Poland",["europe","eu-union","baltic"],"pl","48","...-...-..."],["Portugal",["europe","eu-union"],"pt","351"],["Puerto Rico",["america","carribean"],"pr","1","",3],["Qatar",["middle-east"],"qa","974"],["Réunion",["africa"],"re","262"],["Romania",["europe","eu-union"],"ro","40"],["Russia",["europe","asia","ex-ussr","baltic"],"ru","7","(...) ...-..-..",0],["Rwanda",["africa"],"rw","250"],["Saint Kitts and Nevis",["america","carribean"],"kn","1869"],["Saint Lucia",["america","carribean"],"lc","1758"],["Saint Vincent and the Grenadines",["america","carribean"],"vc","1784"],["Samoa",["oceania"],"ws","685"],["San Marino",["europe"],"sm","378"],["São Tomé and Príncipe",["africa"],"st","239"],["Saudi Arabia",["middle-east"],"sa","966"],["Senegal",["africa"],"sn","221"],["Serbia",["europe","ex-yugos"],"rs","381"],["Seychelles",["africa"],"sc","248"],["Sierra Leone",["africa"],"sl","232"],["Singapore",["asia"],"sg","65","....-...."],["Slovakia",["europe","eu-union"],"sk","421"],["Slovenia",["europe","eu-union","ex-yugos"],"si","386"],["Solomon Islands",["oceania"],"sb","677"],["Somalia",["africa"],"so","252"],["South Africa",["africa"],"za","27"],["South Korea",["asia"],"kr","82","... .... ...."],["South Sudan",["africa","north-africa"],"ss","211"],["Spain",["europe","eu-union"],"es","34","... ... ..."],["Sri Lanka",["asia"],"lk","94"],["Sudan",["africa"],"sd","249"],["Suriname",["america","south-america"],"sr","597"],["Swaziland",["africa"],"sz","268"],["Sweden",["europe","eu-union","baltic"],"se","46","(...) ...-..."],["Switzerland",["europe"],"ch","41",".. ... .. .."],["Syria",["middle-east"],"sy","963"],["Taiwan",["asia"],"tw","886"],["Tajikistan",["asia","ex-ussr"],"tj","992"],["Tanzania",["africa"],"tz","255"],["Thailand",["asia"],"th","66"],["Timor-Leste",["asia"],"tl","670"],["Togo",["africa"],"tg","228"],["Tonga",["oceania"],"to","676"],["Trinidad and Tobago",["america","carribean"],"tt","1868"],["Tunisia",["africa","north-africa"],"tn","216"],["Turkey",["europe"],"tr","90","... ... .. .."],["Turkmenistan",["asia","ex-ussr"],"tm","993"],["Tuvalu",["asia"],"tv","688"],["Uganda",["africa"],"ug","256"],["Ukraine",["europe","ex-ussr"],"ua","380","(..) ... .. .."],["United Arab Emirates",["middle-east"],"ae","971"],["United Kingdom",["europe","eu-union"],"gb","44",".... ......"],["United States",["america","north-america"],"us","1","(...) ...-....",0,["201","202","203","205","206","207","208","209","210","212","213","214","215","216","217","218","219","225","228","229","231","239","248","251","252","253","254","256","260","262","269","270","276","281","301","302","303","304","305","307","308","309","310","312","313","314","315","316","317","318","319","320","321","323","325","330","334","336","337","352","360","361","386","401","402","404","405","406","407","408","409","410","412","413","414","415","417","419","423","425","432","434","435","440","478","479","480","501","502","503","504","505","507","508","509","510","512","513","515","516","517","518","520","530","540","541","559","561","562","563","570","573","574","575","580","585","586","601","602","603","605","606","607","608","609","610","612","614","615","616","617","618","619","620","623","626","630","631","636","641","650","651","660","661","662","701","702","703","704","706","707","708","712","713","714","715","716","717","718","719","724","727","731","732","734","740","757","760","763","765","770","772","773","775","781","785","801","802","803","804","805","806","808","810","812","813","814","815","816","817","818","828","830","831","843","845","847","850","856","858","859","860","863","864","865","870","901","903","904","906","907","908","909","910","912","913","914","915","916","918","919","920","925","928","931","936","937","940","941","949","951","952","954","956","970","972","973","978","979","985","989"]],["Uruguay",["america","south-america"],"uy","598"],["Uzbekistan",["asia","ex-ussr"],"uz","998",".. ... .. .."],["Vanuatu",["oceania"],"vu","678"],["Vatican City",["europe"],"va","39",".. .... ....",1],["Venezuela",["america","south-america"],"ve","58"],["Vietnam",["asia"],"vn","84"],["Yemen",["middle-east"],"ye","967"],["Zambia",["africa"],"zm","260"],["Zimbabwe",["africa"],"zw","263"]]},11:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)},n=this&&this.__spreadArray||function(e,a,r){if(r||2===arguments.length)for(var t,n=0,i=a.length;n<i;n++)!t&&n in a||(t||(t=Array.prototype.slice.call(a,0,n)),t[n]=a[n]);return e.concat(t||Array.prototype.slice.call(a))};Object.defineProperty(a,"__esModule",{value:!0}),a.useHistoryState=void 0;var i=r(156),o={size:20};a.useHistoryState=function(e,a){var r=t(t({},o),a).size,u=(0,i.useState)(e),l=u[0],s=u[1],c=(0,i.useState)([e]),d=c[0],f=c[1],p=(0,i.useState)(0),y=p[0],h=p[1],v=(0,i.useCallback)((function(e,a){if(e!==l){if(null==a?void 0:a.overrideLastHistoryItem)f((function(a){return n(n([],a.slice(0,y),!0),[e],!1)}));else{var t=d.length>=r;f((function(a){return n(n([],a.slice(t?1:0,y+1),!0),[e],!1)})),t||h((function(e){return e+1}))}s(e)}}),[l,y,d.length,r]),m=(0,i.useCallback)((function(){return!(y<=0||(s(d[y-1]),h((function(e){return e-1})),0))}),[d,y]),b=(0,i.useCallback)((function(){return!(y+1>=d.length||(s(d[y+1]),h((function(e){return e+1})),0))}),[d,y]);return[l,v,m,b]}},452:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)};Object.defineProperty(a,"__esModule",{value:!0}),a.usePhone=a.defaultPhoneConfig=a.MASK_CHAR=void 0;var n=r(156),i=r(946),o=r(332),u=r(11),l=r(795);a.MASK_CHAR=".",a.defaultPhoneConfig={prefix:"+",defaultMask:"............",charAfterDialCode:" ",historySaveDebounceMS:200,disableCountryGuess:!1,disableDialCodePrefill:!1,forceDialCode:!1,disableDialCodeAndPrefix:!1,countries:i.defaultCountries},a.usePhone=function(e,r){var i=t(t({},a.defaultPhoneConfig),r),s=i.country,c=i.countries,d=i.prefix,f=i.defaultMask,p=i.charAfterDialCode,y=i.historySaveDebounceMS,h=i.disableCountryGuess,v=i.disableDialCodePrefill,m=i.forceDialCode,b=i.disableDialCodeAndPrefix,C=i.onCountryGuess,g=i.onPhoneUpdate,P=!b&&!h,_=(0,l.useTimer)(),O=(0,n.useMemo)((function(){if(s)return(0,o.getCountry)({value:s,field:"iso2",countries:c})}),[s,c]),w=(0,u.useHistoryState)(""),j=w[0],D=w[1],x=w[2],M=w[3],S=(0,n.useState)(!1),N=S[0],k=S[1],A=function(e,r){var t,n=void 0===r?{}:r,i=n.deletion,u=n.cursorPosition,l=n.insertDialCodeOnEmpty,h=n.inserted,w=e,x=u;m&&!b&&O&&!(0,o.removeNonDigits)(e).startsWith(O.dialCode)&&e&&(h&&e.startsWith(d)&&e.length-(null!=u?u:0)==0?w=e:(w=j,x=0));var M=function(e,r){var t,n,i=r.trimNonDigitsEnd,u=r.insertDialCodeOnEmpty,l=r.forceDisableCountryGuess,s=!l&&P?(0,o.guessCountryByPartialNumber)({phone:e,countries:c}):void 0,y=!l&&P&&null!==(t=null==s?void 0:s.country)&&void 0!==t?t:O;return{phone:y?(0,o.formatPhone)(e,{prefix:d,mask:null!==(n=y.format)&&void 0!==n?n:f,maskChar:a.MASK_CHAR,dialCode:y.dialCode,trimNonDigitsEnd:i,charAfterDialCode:p,forceDialCode:m,insertDialCodeOnEmpty:u,disableDialCodeAndPrefix:b}):e,countryGuessResult:s,formatCountry:y}}(w,{trimNonDigitsEnd:"backward"===i,insertDialCodeOnEmpty:l||!N&&!v,forceDisableCountryGuess:m&&!!i&&(0,o.removeNonDigits)(w).length<(null!==(t=null==O?void 0:O.dialCode.length)&&void 0!==t?t:0)}),S=M.phone,A=M.countryGuessResult,E=M.formatCountry,I=_.check();return D(S,{overrideLastHistoryItem:!(!I||I>y)}),null==g||g(S,{formatCountry:E,unformattedValue:w,cursorPosition:null!=x?x:0,deletion:i}),P&&(null==A?void 0:A.country)&&A.country.name!==s&&(null==C||C(A)),N||k(!0),S};return(0,n.useEffect)((function(){N&&e===j||A(e)}),[e]),{phone:j,initialized:N,undo:x,redo:M,handleValueChange:A}}},882:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)},n=this&&this.__rest||function(e,a){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)a.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(r[t[n]]=e[t[n]])}return r};Object.defineProperty(a,"__esModule",{value:!0}),a.usePhoneInput=void 0;var i=r(156),o=r(946),u=r(332),l=r(452);a.usePhoneInput=function(e){var a,r=e.initialCountry,s=e.value,c=void 0===s?"":s,d=e.prefix,f=void 0===d?"+":d,p=e.countries,y=void 0===p?o.defaultCountries:p,h=e.disableDialCodeAndPrefix,v=e.hideSpaceAfterDialCode,m=e.onCountryChange,b=n(e,["initialCountry","value","prefix","countries","disableDialCodeAndPrefix","hideSpaceAfterDialCode","onCountryChange"]),C=(0,i.useRef)(null),g=(0,i.useState)(r),P=g[0],_=g[1],O=(0,i.useMemo)((function(){if(P)return(0,u.getCountry)({value:P,field:"iso2",countries:y})}),[y,P]),w=v?"":" ",j=null!==(a=null==O?void 0:O.dialCode)&&void 0!==a?a:"",D=h?(0,u.removeDialCode)({phone:c,dialCode:j,charAfterDialCode:w,prefix:f}):c,x=(0,l.usePhone)(D,t({country:P,countries:y,prefix:f,disableDialCodeAndPrefix:h,charAfterDialCode:w,onCountryGuess:function(e){var a=e.country;e.fullDialCodeMatch&&_(a.iso2)},onPhoneUpdate:function(e,a){var r,t,n=a.formatCountry,i=a.unformattedValue,o=a.cursorPosition,l=a.deletion,s=(0,u.getCursorPosition)({cursorPositionAfterInput:o,phoneBeforeInput:M,phoneAfterInput:i,phoneAfterFormatted:e,leftOffset:b.forceDialCode?f.length+(null!==(t=null===(r=null==n?void 0:n.dialCode)||void 0===r?void 0:r.length)&&void 0!==t?t:0)+w.length:0,deletion:l});Promise.resolve().then((function(){var e;null===(e=C.current)||void 0===e||e.setSelectionRange(s,s)}))}},b)),M=x.phone,S=x.initialized,N=x.undo,k=x.redo,A=x.handleValueChange;return(0,i.useEffect)((function(){var e=null==C?void 0:C.current;if(e){var a=function(e){if(e.key){var a=e.ctrlKey,r=e.shiftKey,t="z"===e.key.toLowerCase();if(a&&t)return r?k():N()}};return null==e||e.addEventListener("keydown",a),function(){null==e||e.removeEventListener("keydown",a)}}}),[C,N,k]),(0,i.useEffect)((function(){var e;if(O&&S&&!(0,u.removeNonDigits)(M).startsWith(O.dialCode)){var a=A("",{insertDialCodeOnEmpty:!0});null===(e=C.current)||void 0===e||e.focus(),null==m||m(a)}}),[P]),{phone:M,handlePhoneValueChange:function(e){var a;e.preventDefault();var r=e.nativeEvent.inputType,t=null==r?void 0:r.startsWith("insertFrom"),n=A(e.target.value,{deletion:function(){var e;if(null!==(e=null==r?void 0:r.toLocaleLowerCase().includes("delete"))&&void 0!==e&&e)return(null==r?void 0:r.toLocaleLowerCase().includes("forward"))?"forward":"backward"}(),inserted:t,cursorPosition:null!==(a=e.target.selectionStart)&&void 0!==a?a:0});return h?(0,u.addDialCode)({phone:n,dialCode:j,charAfterDialCode:w,prefix:f}):n},inputRef:C,country:P,setCountry:_}}},393:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.usePhoneValidation=void 0;var t=r(332);a.usePhoneValidation=function(e,a){return(0,t.validatePhone)(e,a)}},795:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.useTimer=void 0;var t=r(156);a.useTimer=function(){var e=(0,t.useState)(),a=e[0],r=e[1],n=(0,t.useState)(Date.now()),i=n[0],o=n[1];return{check:function(){var e=Date.now(),t=a?e-i:void 0;return r(i),o(e),t}}}},515:function(e,a){var r=this&&this.__spreadArray||function(e,a,r){if(r||2===arguments.length)for(var t,n=0,i=a.length;n<i;n++)!t&&n in a||(t||(t=Array.prototype.slice.call(a,0,n)),t[n]=a[n]);return e.concat(t||Array.prototype.slice.call(a))};Object.defineProperty(a,"__esModule",{value:!0}),a.buildClassNames=a.classNamesWithPrefix=a.joinClasses=a.classPrefix=void 0,a.classPrefix="react-international-phone-",a.joinClasses=function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];return e.filter((function(e){return!!e})).join(" ").trim()},a.classNamesWithPrefix=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return a.joinClasses.apply(void 0,e).split(" ").map((function(e){return"".concat(a.classPrefix).concat(e)})).join(" ")},a.buildClassNames=function(e){var t=e.addPrefix,n=e.rawClassNames;return a.joinClasses.apply(void 0,r([a.classNamesWithPrefix.apply(void 0,t)],n,!1))}},62:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.applyMask=void 0,a.applyMask=function(e){var a=e.value,r=e.mask,t=e.maskSymbol,n=e.offset,i=void 0===n?0:n,o=e.trimNonMaskCharsLeftover,u=void 0!==o&&o;if(a.length<i)return a;for(var l=a.slice(0,i),s=a.slice(i),c=l,d=0,f=0,p=r.split("");f<p.length;f++){var y=p[f];if(d>=s.length){if(!u&&y!==t){c+=y;continue}break}y===t?(c+=s[d],d+=1):c+=y}return c}},239:function(e,a,r){var t=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),n=this&&this.__exportStar||function(e,a){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(a,r)||t(a,e,r)};Object.defineProperty(a,"__esModule",{value:!0}),n(r(62),a),n(r(939),a),n(r(222),a)},939:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.removeNonDigits=void 0,a.removeNonDigits=function(e){return e.replace(/\D/g,"")}},222:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.scrollToChild=void 0,a.scrollToChild=function(e,a){var r=e.style.display;"block"!==r&&(e.style.display="block");var t=e.getBoundingClientRect(),n=a.getBoundingClientRect(),i=n.top-t.top,o=t.bottom-n.bottom;i>=0&&o>=0||(Math.abs(i)<Math.abs(o)?e.scrollTop+=i:e.scrollTop-=o),e.style.display=r}},298:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.buildCountryData=void 0,a.buildCountryData=function(e){return[e.name,e.regions,e.iso2,e.dialCode,e.format,e.priority,e.areaCodes].filter(Boolean)}},891:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getCountry=void 0;var t=r(300);a.getCountry=function(e){var a=e.value,r=e.field,n=e.countries;if(["regions","priority"].includes(r))throw new Error(function(e){return'Field "'.concat(e,'" is not supported')}(r));var i=n.find((function(e){var n=(0,t.parseCountry)(e);return a===n[r]}));if(i)return(0,t.parseCountry)(i)}},4:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.guessCountryByPartialNumber=void 0;var t=r(239),n=r(300);a.guessCountryByPartialNumber=function(e){var a=e.phone,r=e.countries,i={country:void 0,fullDialCodeMatch:!1,areaCodeMatch:void 0};if(!a)return i;var o=(0,t.removeNonDigits)(a);if(!o)return i;for(var u=i,l=function(e){var a,r,t,n,i=e.country,o=e.fullDialCodeMatch,l=e.areaCodeMatch,s=i.dialCode===(null===(a=u.country)||void 0===a?void 0:a.dialCode),c=(null!==(r=i.priority)&&void 0!==r?r:0)<(null!==(n=null===(t=u.country)||void 0===t?void 0:t.priority)&&void 0!==n?n:0);s&&!c||(u={country:i,fullDialCodeMatch:o,areaCodeMatch:l})},s=0,c=r;s<c.length;s++){var d=c[s],f=(0,n.parseCountry)(d),p=f.dialCode,y=f.areaCodes;if(o.startsWith(p)){var h=!u.country||Number(p)>=Number(u.country.dialCode);if(y)for(var v=o.substring(p.length),m=0,b=y;m<b.length;m++){var C=b[m];if(v.startsWith(C))return{country:f,fullDialCodeMatch:!0,areaCodeMatch:!0}}!h&&p!==o&&u.fullDialCodeMatch||l({country:f,fullDialCodeMatch:!0,areaCodeMatch:y?!y:void 0})}u.fullDialCodeMatch||o.length<p.length&&p.startsWith(o)&&(!u.country||Number(p)<=Number(u.country.dialCode))&&l({country:f,fullDialCodeMatch:!1})}return u}},88:function(e,a,r){var t=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),n=this&&this.__exportStar||function(e,a){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(a,r)||t(a,e,r)};Object.defineProperty(a,"__esModule",{value:!0}),n(r(298),a),n(r(891),a),n(r(4),a),n(r(300),a)},300:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.parseCountry=void 0,a.parseCountry=function(e){return{name:e[0],regions:e[1],iso2:e[2],dialCode:e[3],format:e[4],priority:e[5],areaCodes:e[6]}}},332:function(e,a,r){var t=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),n=this&&this.__exportStar||function(e,a){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(a,r)||t(a,e,r)};Object.defineProperty(a,"__esModule",{value:!0}),n(r(239),a),n(r(88),a),n(r(165),a)},820:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDialCode=void 0;var t=r(214);a.addDialCode=function(e){var a=e.phone,r=e.dialCode,n=e.prefix,i=void 0===n?"+":n,o=e.charAfterDialCode,u=void 0===o?" ":o;return"".concat(i).concat(r).concat(u).concat((0,t.removeDialCode)({phone:a,dialCode:r,charAfterDialCode:u,prefix:i}))}},380:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.formatPhone=void 0;var t=r(239);a.formatPhone=function(e,a){var r=!a.disableDialCodeAndPrefix&&a.forceDialCode,n=!a.disableDialCodeAndPrefix&&a.insertDialCodeOnEmpty,i=e,o=function(e){return a.trimNonDigitsEnd?e.trim():e};if(!i)return n&&!i.length||r?o("".concat(a.prefix).concat(a.dialCode).concat(a.charAfterDialCode)):o(i);if((i=(0,t.removeNonDigits)(i))===a.dialCode&&!a.disableDialCodeAndPrefix)return o("".concat(a.prefix).concat(a.dialCode).concat(a.charAfterDialCode));if(a.dialCode.startsWith(i)&&!a.disableDialCodeAndPrefix)return o(r?"".concat(a.prefix).concat(a.dialCode).concat(a.charAfterDialCode):"".concat(a.prefix).concat(i));if(!i.startsWith(a.dialCode)&&!a.disableDialCodeAndPrefix){if(r)return o("".concat(a.prefix).concat(a.dialCode).concat(a.charAfterDialCode));if(i.length<a.dialCode.length)return o("".concat(a.prefix).concat(i))}var u,l=(u=a.dialCode.length,a.disableDialCodeAndPrefix&&(u=0),{phoneLeftSide:i.slice(0,u),phoneRightSide:i.slice(u)}),s=l.phoneLeftSide,c=l.phoneRightSide;return s="".concat(a.prefix).concat(s).concat(a.charAfterDialCode),c=(0,t.applyMask)({value:c,mask:a.mask,maskSymbol:a.maskChar,trimNonMaskCharsLeftover:a.trimNonDigitsEnd}),a.disableDialCodeAndPrefix&&(s=""),o("".concat(s).concat(c))}},775:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getCursorPosition=void 0;var r=function(e){return/\d/.test(e)};a.getCursorPosition=function(e){var a=e.phoneBeforeInput,t=e.phoneAfterInput,n=e.phoneAfterFormatted,i=e.cursorPositionAfterInput,o=e.leftOffset,u=void 0===o?0:o,l=e.deletion;if(i<u)return u;if(!a)return n.length;var s="backward"===l;if(0===i&&t.length>0&&n.length>0){if(s)return 0;for(var c=0;c<n.length;c+=1)if(r(n[c]))return c;return n.length}if(t.length<a.length&&1===t.length)return n.length;var d=null;for(c=i-1;c>=0;c-=1)if(r(t[c])){d=c;break}if(null===d)return 0!==i?i:n.length;var f=0;for(c=0;c<d;c+=1)r(t[c])&&(f+=1);s&&(f-=1);var p=0,y=0;for(c=0;c<n.length&&(p+=1,r(n[c])&&(y+=1),y!==f+1);c+=1);for(;!r(n[p])&&p<n.length;)p+=1;return s&&(p+=1),p}},165:function(e,a,r){var t=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),n=this&&this.__exportStar||function(e,a){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(a,r)||t(a,e,r)};Object.defineProperty(a,"__esModule",{value:!0}),n(r(820),a),n(r(380),a),n(r(775),a),n(r(214),a),n(r(684),a)},214:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.removeDialCode=void 0,a.removeDialCode=function(e){var a=e.phone,r=e.dialCode,t=e.prefix,n=void 0===t?"+":t,i=e.charAfterDialCode,o=void 0===i?" ":i;if(!a||!r)return a;var u=a;return u.startsWith(n)&&(u=u.replace(n,"")),u.startsWith(r)?((u=u.replace(r,"")).startsWith(o)&&(u=u.replace(o,"")),u):a}},684:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)};Object.defineProperty(a,"__esModule",{value:!0}),a.validatePhone=void 0;var n=r(452),i=r(239),o=r(88);a.validatePhone=function(e,a){var r=t(t({},n.defaultPhoneConfig),a),u=r.countries,l=r.defaultMask,s=r.defaultMaskMinPhoneLength,c=void 0===s?10:s,d=r.prefix,f=r.charAfterDialCode,p=(0,o.guessCountryByPartialNumber)({phone:e,countries:u}),y=p.country,h=p.fullDialCodeMatch,v=p.areaCodeMatch;if(!y||!h)return{country:void 0,lengthMatch:!1,areaCodeMatch:v,isValid:!1};var m="".concat(d).concat(y.dialCode).concat(f);if(!e.startsWith(m))return{country:y,lengthMatch:!1,areaCodeMatch:v,isValid:!1};var b=e.substring(m.length),C=!y.format,g=C?l:y.format;if(C&&(0,i.removeNonDigits)(e).length<c)return{country:y,lengthMatch:!1,areaCodeMatch:v,isValid:!1};if(!C&&b.length!==g.length)return{country:y,lengthMatch:!1,areaCodeMatch:v,isValid:!1};for(var P=0;P<b.length;P+=1)if(b[P]!==g[P]&&g[P]!==n.MASK_CHAR)return{country:y,lengthMatch:!1,areaCodeMatch:v,isValid:!1};return{country:y,lengthMatch:!0,areaCodeMatch:v,isValid:null==v||v}}},156:a=>{a.exports=e}},r={};function t(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={exports:{}};return a[e].call(i.exports,i,i.exports,t),i.exports}t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.validatePhone=e.parseCountry=e.buildCountryData=e.usePhoneValidation=e.usePhoneInput=e.usePhone=e.defaultCountries=e.PhoneInput=e.FlagEmoji=e.DialCodePreview=e.CountrySelectorDropdown=e.CountrySelector=void 0;var a=t(153);Object.defineProperty(e,"CountrySelector",{enumerable:!0,get:function(){return a.CountrySelector}});var r=t(60);Object.defineProperty(e,"CountrySelectorDropdown",{enumerable:!0,get:function(){return r.CountrySelectorDropdown}});var i=t(7);Object.defineProperty(e,"DialCodePreview",{enumerable:!0,get:function(){return i.DialCodePreview}});var o=t(425);Object.defineProperty(e,"FlagEmoji",{enumerable:!0,get:function(){return o.FlagEmoji}});var u=t(28);Object.defineProperty(e,"PhoneInput",{enumerable:!0,get:function(){return u.PhoneInput}});var l=t(946);Object.defineProperty(e,"defaultCountries",{enumerable:!0,get:function(){return l.defaultCountries}});var s=t(452);Object.defineProperty(e,"usePhone",{enumerable:!0,get:function(){return s.usePhone}});var c=t(882);Object.defineProperty(e,"usePhoneInput",{enumerable:!0,get:function(){return c.usePhoneInput}});var d=t(393);Object.defineProperty(e,"usePhoneValidation",{enumerable:!0,get:function(){return d.usePhoneValidation}});var f=t(332);Object.defineProperty(e,"buildCountryData",{enumerable:!0,get:function(){return f.buildCountryData}}),Object.defineProperty(e,"parseCountry",{enumerable:!0,get:function(){return f.parseCountry}}),Object.defineProperty(e,"validatePhone",{enumerable:!0,get:function(){return f.validatePhone}})})(),n})()));
!function(e,a){"object"==typeof exports&&"object"==typeof module?module.exports=a(require("react")):"function"==typeof define&&define.amd?define(["react"],a):"object"==typeof exports?exports["react-international-phone"]=a(require("react")):e["react-international-phone"]=a(e.react)}(this,(e=>(()=>{"use strict";var a={0:(e,a,r)=>{r.r(a)},374:(e,a,r)=>{r.r(a)},840:(e,a,r)=>{r.r(a)},481:(e,a,r)=>{r.r(a)},549:(e,a,r)=>{r.r(a)},153:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)},n=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:!0,value:a})}:function(e,a){e.default=a}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(a,e,r);return i(a,e),a},u=this&&this.__rest||function(e,a){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)a.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(r[t[n]]=e[t[n]])}return r};Object.defineProperty(a,"__esModule",{value:!0}),a.CountrySelector=void 0,r(0);var l=o(r(156)),s=r(946),c=r(515),d=r(332),f=r(425),p=r(60);a.CountrySelector=function(e){var a,r,n=e.selectedCountry,i=e.onSelect,o=e.disabled,y=e.hideDropdown,h=e.countries,v=void 0===h?s.defaultCountries:h,m=e.renderButtonWrapper,b=u(e,["selectedCountry","onSelect","disabled","hideDropdown","countries","renderButtonWrapper"]),C=(0,l.useState)(!1),g=C[0],P=C[1],_=(0,l.useMemo)((function(){if(n)return(0,d.getCountry)({value:n,field:"iso2",countries:v})}),[v,n]),O=(0,l.useRef)(null);return l.default.createElement("div",{className:(0,c.buildClassNames)({addPrefix:["country-selector"],rawClassNames:[b.className]}),style:b.style,ref:O},(a={title:null==_?void 0:_.name,onClick:function(){return P((function(e){return!e}))},onMouseDown:function(e){return e.preventDefault()},onKeyDown:function(e){e.key&&["ArrowUp","ArrowDown"].includes(e.key)&&(e.preventDefault(),P(!0))},disabled:y||o,role:"combobox","aria-label":"Country selector","aria-haspopup":"listbox","aria-expanded":g},r=l.default.createElement("div",{className:(0,c.buildClassNames)({addPrefix:["country-selector-button__button-content"],rawClassNames:[b.buttonContentWrapperClassName]}),style:b.buttonContentWrapperStyle},l.default.createElement(f.FlagEmoji,{iso2:n,className:(0,c.buildClassNames)({addPrefix:["country-selector-button__flag-emoji",o&&"country-selector-button__flag-emoji--disabled"],rawClassNames:[b.flagClassName]}),style:t({visibility:n?"visible":"hidden"},b.flagStyle)}),!y&&l.default.createElement("div",{className:(0,c.buildClassNames)({addPrefix:["country-selector-button__dropdown-arrow",o&&"country-selector-button__dropdown-arrow--disabled",g&&"country-selector-button__dropdown-arrow--active"],rawClassNames:[b.dropdownArrowClassName]}),style:b.dropdownArrowStyle})),m?m({children:r,rootProps:a}):l.default.createElement("button",t({},a,{type:"button",className:(0,c.buildClassNames)({addPrefix:["country-selector-button",g&&"country-selector-button--active",o&&"country-selector-button--disabled",y&&"country-selector-button--hide-dropdown"],rawClassNames:[b.buttonClassName]}),"data-country":n,style:b.buttonStyle}),r)),l.default.createElement(p.CountrySelectorDropdown,t({show:g,countries:v,onSelect:function(e){P(!1),null==i||i(e)},selectedCountry:n,onClose:function(){P(!1)}},b.dropdownStyleProps)))}},60:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)},n=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:!0,value:a})}:function(e,a){e.default=a}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(a,e,r);return i(a,e),a},u=this&&this.__rest||function(e,a){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)a.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(r[t[n]]=e[t[n]])}return r};Object.defineProperty(a,"__esModule",{value:!0}),a.CountrySelectorDropdown=void 0,r(374);var l=o(r(156)),s=r(946),c=r(515),d=r(332),f=r(425);a.CountrySelectorDropdown=function(e){var a=e.show,r=e.dialCodePrefix,n=void 0===r?"+":r,i=e.selectedCountry,o=e.countries,p=void 0===o?s.defaultCountries:o,y=e.onSelect,h=e.onClose,v=u(e,["show","dialCodePrefix","selectedCountry","countries","onSelect","onClose"]),m=(0,l.useRef)(null),b=(0,l.useRef)(),C=(0,l.useCallback)((function(e){return p.findIndex((function(a){return(0,d.parseCountry)(a).iso2===e}))}),[p]),g=(0,l.useState)(C(i)),P=g[0],_=g[1],O=function(){b.current!==i&&_(C(i))},w=(0,l.useCallback)((function(e){_(C(e.iso2)),null==y||y(e)}),[y,C]),j=function(e){var a=p.length-1;_((function(r){var t,n=(t=r,"prev"===e?t-1:"next"===e?t+1:"last"===e?a:0);return n<0?0:n>a?a:n}))},D=(0,l.useCallback)((function(){if(m.current&&void 0!==P){var e=(0,d.parseCountry)(p[P]).iso2;if(e!==b.current){var a=m.current.querySelector('[data-country="'.concat(e,'"]'));a&&((0,d.scrollToChild)(m.current,a),b.current=e)}}}),[P,p]);return(0,l.useEffect)((function(){D()}),[P,D]),(0,l.useEffect)((function(){m.current&&(a?m.current.focus():O())}),[a]),(0,l.useEffect)((function(){O()}),[i]),l.default.createElement("ul",{ref:m,role:"listbox",className:(0,c.buildClassNames)({addPrefix:["country-selector-dropdown"],rawClassNames:[v.className]}),style:t({display:a?"block":"none"},v.style),onKeyDown:function(e){if("Enter"!==e.key){if("Escape"!==e.key)return"ArrowUp"===e.key?(e.preventDefault(),void j("prev")):"ArrowDown"===e.key?(e.preventDefault(),void j("next")):"PageUp"===e.key?(e.preventDefault(),void j("first")):"PageDown"===e.key?(e.preventDefault(),void j("last")):void 0;null==h||h()}else{var a=(0,d.parseCountry)(p[P]);w(a)}},onBlur:h,tabIndex:-1,"aria-activedescendant":"".concat((0,d.parseCountry)(p[P]).iso2,"-option")},p.map((function(e,a){var r=(0,d.parseCountry)(e),t=r.iso2===i,o=a===P;return l.default.createElement("li",{key:r.iso2,"data-country":r.iso2,role:"option","aria-selected":t,"aria-label":"".concat(r.name," ").concat(n).concat(r.dialCode),id:"".concat(r.iso2,"-option"),className:(0,c.buildClassNames)({addPrefix:["country-selector-dropdown__list-item",t&&"country-selector-dropdown__list-item--selected",o&&"country-selector-dropdown__list-item--focused"],rawClassNames:[v.listItemClassName]}),onClick:function(){return w(r)},style:v.listItemStyle},l.default.createElement(f.FlagEmoji,{iso2:r.iso2,className:(0,c.buildClassNames)({addPrefix:["country-selector-dropdown__list-item-flag-emoji"],rawClassNames:[v.listItemFlagClassName]}),style:v.listItemFlagStyle}),l.default.createElement("span",{className:(0,c.buildClassNames)({addPrefix:["country-selector-dropdown__list-item-country-name"],rawClassNames:[v.listItemCountryNameClassName]}),style:v.listItemCountryNameStyle},r.name),l.default.createElement("span",{className:(0,c.buildClassNames)({addPrefix:["country-selector-dropdown__list-item-dial-code"],rawClassNames:[v.listItemDialCodeClassName]}),style:v.listItemDialCodeStyle},n,r.dialCode))})))}},7:function(e,a,r){var t=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.DialCodePreview=void 0,r(840);var n=t(r(156)),i=r(515);a.DialCodePreview=function(e){var a=e.dialCode,r=e.prefix,t=e.disabled,o=e.style,u=e.className;return n.default.createElement("div",{className:(0,i.buildClassNames)({addPrefix:["dial-code-preview",t&&"dial-code-preview--disabled"],rawClassNames:[u]}),style:o},"".concat(r).concat(a))}},425:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)},n=this&&this.__rest||function(e,a){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)a.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(r[t[n]]=e[t[n]])}return r},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.FlagEmoji=void 0,r(481);var o=i(r(156)),u=r(515),l="abcdefghijklmnopqrstuvwxyz".split("").reduce((function(e,a,r){var n,i,o;return t(t({},e),((n={})[a]=(i=r,o=parseInt("1f1e6",16),Number(o+i).toString(16)),n))}),{});a.FlagEmoji=function(e){var a=e.iso2,r=e.size,i=void 0===r?"24px":r,s=e.protocol,c=void 0===s?"https":s,d=e.disableLazyLoading,f=e.className,p=n(e,["iso2","size","protocol","disableLazyLoading","className"]);if(!a)return o.default.createElement("img",t({width:i,height:i},p));var y=function(e){return[l[e[0]],l[e[1]]].join("-")}(a),h="".concat(c,"://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/svg/").concat(y,".svg");return o.default.createElement("img",t({className:(0,u.buildClassNames)({addPrefix:["flag-emoji"],rawClassNames:[f]}),src:h,width:i,height:i,draggable:!1,"data-country":a,loading:d?void 0:"lazy"},p))}},28:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)},n=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:!0,value:a})}:function(e,a){e.default=a}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(a,e,r);return i(a,e),a},u=this&&this.__rest||function(e,a){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)a.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(r[t[n]]=e[t[n]])}return r};Object.defineProperty(a,"__esModule",{value:!0}),a.PhoneInput=void 0,r(549);var l=o(r(156)),s=r(946),c=r(882),d=r(515),f=r(332),p=r(153),y=r(7);a.PhoneInput=function(e){var a,r=e.hideDropdown,n=e.placeholder,i=e.disabled,o=e.showDisabledDialCodeAndPrefix,h=e.inputProps,v=e.onChange,m=e.style,b=e.className,C=e.inputStyle,g=e.inputClassName,P=e.countrySelectorStyleProps,_=e.dialCodePreviewStyleProps,O=e.countries,w=void 0===O?s.defaultCountries:O,j=u(e,["hideDropdown","placeholder","disabled","showDisabledDialCodeAndPrefix","inputProps","onChange","style","className","inputStyle","inputClassName","countrySelectorStyleProps","dialCodePreviewStyleProps","countries"]),D=(0,c.usePhoneInput)(t(t({},j),{countries:w,onCountryChange:function(e){null==v||v(e)}})),x=D.phone,S=D.inputRef,M=D.country,N=D.setCountry,k=D.handlePhoneValueChange,A=(0,l.useMemo)((function(){if(M)return(0,f.getCountry)({value:M,field:"iso2",countries:w})}),[w,M]),E=j.disableDialCodeAndPrefix&&o&&(null==A?void 0:A.dialCode);return l.default.createElement("div",{className:(0,d.buildClassNames)({addPrefix:["input-container"],rawClassNames:[b]}),style:m},l.default.createElement(p.CountrySelector,t({onSelect:function(e){return N(e.iso2)},selectedCountry:M,countries:w,disabled:i,hideDropdown:r},P)),E&&l.default.createElement(y.DialCodePreview,t({dialCode:A.dialCode,prefix:null!==(a=j.prefix)&&void 0!==a?a:"+",disabled:i},_)),l.default.createElement("input",t({onChange:function(e){var a=k(e);null==v||v(a)},value:x,type:"tel",ref:S,className:(0,d.buildClassNames)({addPrefix:["input",i&&"input--disabled"],rawClassNames:[g]}),placeholder:n,disabled:i,style:C},h)))}},946:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.defaultCountries=void 0,a.defaultCountries=[["Afghanistan",["asia"],"af","93"],["Albania",["europe"],"al","355"],["Algeria",["africa","north-africa"],"dz","213"],["Andorra",["europe"],"ad","376"],["Angola",["africa"],"ao","244"],["Antigua and Barbuda",["america","carribean"],"ag","1268"],["Argentina",["america","south-america"],"ar","54","(..) ........",0,["11","221","223","261","264","2652","280","2905","291","2920","2966","299","341","342","343","351","376","379","381","3833","385","387","388"]],["Armenia",["asia","ex-ussr"],"am","374",".. ......"],["Aruba",["america","carribean"],"aw","297"],["Australia",["oceania"],"au","61","(..) .... ....",0,["2","3","4","7","8","02","03","04","07","08"]],["Austria",["europe","eu-union"],"at","43"],["Azerbaijan",["asia","ex-ussr"],"az","994","(..) ... .. .."],["Bahamas",["america","carribean"],"bs","1242"],["Bahrain",["middle-east"],"bh","973"],["Bangladesh",["asia"],"bd","880"],["Barbados",["america","carribean"],"bb","1246"],["Belarus",["europe","ex-ussr"],"by","375","(..) ... .. .."],["Belgium",["europe","eu-union"],"be","32","... .. .. .."],["Belize",["america","central-america"],"bz","501"],["Benin",["africa"],"bj","229"],["Bhutan",["asia"],"bt","975"],["Bolivia",["america","south-america"],"bo","591"],["Bosnia and Herzegovina",["europe","ex-yugos"],"ba","387"],["Botswana",["africa"],"bw","267"],["Brazil",["america","south-america"],"br","55","(..) ........."],["British Indian Ocean Territory",["asia"],"io","246"],["Brunei",["asia"],"bn","673"],["Bulgaria",["europe","eu-union"],"bg","359"],["Burkina Faso",["africa"],"bf","226"],["Burundi",["africa"],"bi","257"],["Cambodia",["asia"],"kh","855"],["Cameroon",["africa"],"cm","237"],["Canada",["america","north-america"],"ca","1","(...) ...-....",1,["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde",["africa"],"cv","238"],["Caribbean Netherlands",["america","carribean"],"bq","599","",1],["Central African Republic",["africa"],"cf","236"],["Chad",["africa"],"td","235"],["Chile",["america","south-america"],"cl","56"],["China",["asia"],"cn","86","..-........."],["Colombia",["america","south-america"],"co","57","... ... ...."],["Comoros",["africa"],"km","269"],["Congo",["africa"],"cd","243"],["Congo",["africa"],"cg","242"],["Costa Rica",["america","central-america"],"cr","506","....-...."],["Côte d'Ivoire",["africa"],"ci","225",".. .. .. .."],["Croatia",["europe","eu-union","ex-yugos"],"hr","385"],["Cuba",["america","carribean"],"cu","53"],["Curaçao",["america","carribean"],"cw","599","",0],["Cyprus",["europe","eu-union"],"cy","357",".. ......"],["Czech Republic",["europe","eu-union"],"cz","420","... ... ..."],["Denmark",["europe","eu-union","baltic"],"dk","45",".. .. .. .."],["Djibouti",["africa"],"dj","253"],["Dominica",["america","carribean"],"dm","1767"],["Dominican Republic",["america","carribean"],"do","1","",2],["Ecuador",["america","south-america"],"ec","593"],["Egypt",["africa","north-africa"],"eg","20"],["El Salvador",["america","central-america"],"sv","503","....-...."],["Equatorial Guinea",["africa"],"gq","240"],["Eritrea",["africa"],"er","291"],["Estonia",["europe","eu-union","ex-ussr","baltic"],"ee","372",".... ......"],["Ethiopia",["africa"],"et","251"],["Fiji",["oceania"],"fj","679"],["Finland",["europe","eu-union","baltic"],"fi","358",".. ... .. .."],["France",["europe","eu-union"],"fr","33",". .. .. .. .."],["French Guiana",["america","south-america"],"gf","594"],["French Polynesia",["oceania"],"pf","689"],["Gabon",["africa"],"ga","241"],["Gambia",["africa"],"gm","220"],["Georgia",["asia","ex-ussr"],"ge","995"],["Germany",["europe","eu-union","baltic"],"de","49",".... ........"],["Ghana",["africa"],"gh","233"],["Greece",["europe","eu-union"],"gr","30"],["Grenada",["america","carribean"],"gd","1473"],["Guadeloupe",["america","carribean"],"gp","590","",0],["Guam",["oceania"],"gu","1671"],["Guatemala",["america","central-america"],"gt","502","....-...."],["Guinea",["africa"],"gn","224"],["Guinea-Bissau",["africa"],"gw","245"],["Guyana",["america","south-america"],"gy","592"],["Haiti",["america","carribean"],"ht","509","....-...."],["Honduras",["america","central-america"],"hn","504"],["Hong Kong",["asia"],"hk","852",".... ...."],["Hungary",["europe","eu-union"],"hu","36"],["Iceland",["europe"],"is","354","... ...."],["India",["asia"],"in","91",".....-....."],["Indonesia",["asia"],"id","62"],["Iran",["middle-east"],"ir","98","... ... ...."],["Iraq",["middle-east"],"iq","964"],["Ireland",["europe","eu-union"],"ie","353",".. ......."],["Israel",["middle-east"],"il","972","... ... ...."],["Italy",["europe","eu-union"],"it","39","... .......",0],["Jamaica",["america","carribean"],"jm","1876"],["Japan",["asia"],"jp","81",".. .... ...."],["Jordan",["middle-east"],"jo","962"],["Kazakhstan",["asia","ex-ussr"],"kz","7","... ...-..-..",1,["310","311","312","313","315","318","321","324","325","326","327","336","7172","73622"]],["Kenya",["africa"],"ke","254"],["Kiribati",["oceania"],"ki","686"],["Kosovo",["europe","ex-yugos"],"xk","383"],["Kuwait",["middle-east"],"kw","965"],["Kyrgyzstan",["asia","ex-ussr"],"kg","996","... ... ..."],["Laos",["asia"],"la","856"],["Latvia",["europe","eu-union","ex-ussr","baltic"],"lv","371",".. ... ..."],["Lebanon",["middle-east"],"lb","961"],["Lesotho",["africa"],"ls","266"],["Liberia",["africa"],"lr","231"],["Libya",["africa","north-africa"],"ly","218"],["Liechtenstein",["europe"],"li","423"],["Lithuania",["europe","eu-union","ex-ussr","baltic"],"lt","370"],["Luxembourg",["europe","eu-union"],"lu","352"],["Macau",["asia"],"mo","853"],["Macedonia",["europe","ex-yugos"],"mk","389"],["Madagascar",["africa"],"mg","261"],["Malawi",["africa"],"mw","265"],["Malaysia",["asia"],"my","60","..-....-...."],["Maldives",["asia"],"mv","960"],["Mali",["africa"],"ml","223"],["Malta",["europe","eu-union"],"mt","356"],["Marshall Islands",["oceania"],"mh","692"],["Martinique",["america","carribean"],"mq","596"],["Mauritania",["africa"],"mr","222"],["Mauritius",["africa"],"mu","230"],["Mexico",["america","central-america"],"mx","52","... ... ....",0,["33","55","81","229","656","664","774","998"]],["Micronesia",["oceania"],"fm","691"],["Moldova",["europe"],"md","373","(..) ..-..-.."],["Monaco",["europe"],"mc","377"],["Mongolia",["asia"],"mn","976"],["Montenegro",["europe","ex-yugos"],"me","382"],["Morocco",["africa","north-africa"],"ma","212"],["Mozambique",["africa"],"mz","258"],["Myanmar",["asia"],"mm","95"],["Namibia",["africa"],"na","264"],["Nauru",["africa"],"nr","674"],["Nepal",["asia"],"np","977"],["Netherlands",["europe","eu-union"],"nl","31",".. ........"],["New Caledonia",["oceania"],"nc","687"],["New Zealand",["oceania"],"nz","64","...-...-...."],["Nicaragua",["america","central-america"],"ni","505"],["Niger",["africa"],"ne","227"],["Nigeria",["africa"],"ng","234"],["North Korea",["asia"],"kp","850"],["Norway",["europe","baltic"],"no","47","... .. ..."],["Oman",["middle-east"],"om","968"],["Pakistan",["asia"],"pk","92","...-......."],["Palau",["oceania"],"pw","680"],["Palestine",["middle-east"],"ps","970"],["Panama",["america","central-america"],"pa","507"],["Papua New Guinea",["oceania"],"pg","675"],["Paraguay",["america","south-america"],"py","595"],["Peru",["america","south-america"],"pe","51"],["Philippines",["asia"],"ph","63",".... ......."],["Poland",["europe","eu-union","baltic"],"pl","48","...-...-..."],["Portugal",["europe","eu-union"],"pt","351"],["Puerto Rico",["america","carribean"],"pr","1","",3],["Qatar",["middle-east"],"qa","974"],["Réunion",["africa"],"re","262"],["Romania",["europe","eu-union"],"ro","40"],["Russia",["europe","asia","ex-ussr","baltic"],"ru","7","(...) ...-..-..",0],["Rwanda",["africa"],"rw","250"],["Saint Kitts and Nevis",["america","carribean"],"kn","1869"],["Saint Lucia",["america","carribean"],"lc","1758"],["Saint Vincent and the Grenadines",["america","carribean"],"vc","1784"],["Samoa",["oceania"],"ws","685"],["San Marino",["europe"],"sm","378"],["São Tomé and Príncipe",["africa"],"st","239"],["Saudi Arabia",["middle-east"],"sa","966"],["Senegal",["africa"],"sn","221"],["Serbia",["europe","ex-yugos"],"rs","381"],["Seychelles",["africa"],"sc","248"],["Sierra Leone",["africa"],"sl","232"],["Singapore",["asia"],"sg","65","....-...."],["Slovakia",["europe","eu-union"],"sk","421"],["Slovenia",["europe","eu-union","ex-yugos"],"si","386"],["Solomon Islands",["oceania"],"sb","677"],["Somalia",["africa"],"so","252"],["South Africa",["africa"],"za","27"],["South Korea",["asia"],"kr","82","... .... ...."],["South Sudan",["africa","north-africa"],"ss","211"],["Spain",["europe","eu-union"],"es","34","... ... ..."],["Sri Lanka",["asia"],"lk","94"],["Sudan",["africa"],"sd","249"],["Suriname",["america","south-america"],"sr","597"],["Swaziland",["africa"],"sz","268"],["Sweden",["europe","eu-union","baltic"],"se","46","(...) ...-..."],["Switzerland",["europe"],"ch","41",".. ... .. .."],["Syria",["middle-east"],"sy","963"],["Taiwan",["asia"],"tw","886"],["Tajikistan",["asia","ex-ussr"],"tj","992"],["Tanzania",["africa"],"tz","255"],["Thailand",["asia"],"th","66"],["Timor-Leste",["asia"],"tl","670"],["Togo",["africa"],"tg","228"],["Tonga",["oceania"],"to","676"],["Trinidad and Tobago",["america","carribean"],"tt","1868"],["Tunisia",["africa","north-africa"],"tn","216"],["Turkey",["europe"],"tr","90","... ... .. .."],["Turkmenistan",["asia","ex-ussr"],"tm","993"],["Tuvalu",["asia"],"tv","688"],["Uganda",["africa"],"ug","256"],["Ukraine",["europe","ex-ussr"],"ua","380","(..) ... .. .."],["United Arab Emirates",["middle-east"],"ae","971"],["United Kingdom",["europe","eu-union"],"gb","44",".... ......"],["United States",["america","north-america"],"us","1","(...) ...-....",0,["201","202","203","205","206","207","208","209","210","212","213","214","215","216","217","218","219","225","228","229","231","239","248","251","252","253","254","256","260","262","269","270","276","281","301","302","303","304","305","307","308","309","310","312","313","314","315","316","317","318","319","320","321","323","325","330","334","336","337","352","360","361","386","401","402","404","405","406","407","408","409","410","412","413","414","415","417","419","423","425","432","434","435","440","478","479","480","501","502","503","504","505","507","508","509","510","512","513","515","516","517","518","520","530","540","541","559","561","562","563","570","573","574","575","580","585","586","601","602","603","605","606","607","608","609","610","612","614","615","616","617","618","619","620","623","626","630","631","636","641","650","651","660","661","662","701","702","703","704","706","707","708","712","713","714","715","716","717","718","719","724","727","731","732","734","740","757","760","763","765","770","772","773","775","781","785","801","802","803","804","805","806","808","810","812","813","814","815","816","817","818","828","830","831","843","845","847","850","856","858","859","860","863","864","865","870","901","903","904","906","907","908","909","910","912","913","914","915","916","918","919","920","925","928","931","936","937","940","941","949","951","952","954","956","970","972","973","978","979","985","989"]],["Uruguay",["america","south-america"],"uy","598"],["Uzbekistan",["asia","ex-ussr"],"uz","998",".. ... .. .."],["Vanuatu",["oceania"],"vu","678"],["Vatican City",["europe"],"va","39",".. .... ....",1],["Venezuela",["america","south-america"],"ve","58"],["Vietnam",["asia"],"vn","84"],["Yemen",["middle-east"],"ye","967"],["Zambia",["africa"],"zm","260"],["Zimbabwe",["africa"],"zw","263"]]},11:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)},n=this&&this.__spreadArray||function(e,a,r){if(r||2===arguments.length)for(var t,n=0,i=a.length;n<i;n++)!t&&n in a||(t||(t=Array.prototype.slice.call(a,0,n)),t[n]=a[n]);return e.concat(t||Array.prototype.slice.call(a))};Object.defineProperty(a,"__esModule",{value:!0}),a.useHistoryState=void 0;var i=r(156),o={size:20};a.useHistoryState=function(e,a){var r=t(t({},o),a).size,u=(0,i.useState)(e),l=u[0],s=u[1],c=(0,i.useState)([e]),d=c[0],f=c[1],p=(0,i.useState)(0),y=p[0],h=p[1],v=(0,i.useCallback)((function(e,a){if(e!==l){if(null==a?void 0:a.overrideLastHistoryItem)f((function(a){return n(n([],a.slice(0,y),!0),[e],!1)}));else{var t=d.length>=r;f((function(a){return n(n([],a.slice(t?1:0,y+1),!0),[e],!1)})),t||h((function(e){return e+1}))}s(e)}}),[l,y,d.length,r]),m=(0,i.useCallback)((function(){return!(y<=0||(s(d[y-1]),h((function(e){return e-1})),0))}),[d,y]),b=(0,i.useCallback)((function(){return!(y+1>=d.length||(s(d[y+1]),h((function(e){return e+1})),0))}),[d,y]);return[l,v,m,b]}},452:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)};Object.defineProperty(a,"__esModule",{value:!0}),a.usePhone=a.defaultPhoneConfig=a.MASK_CHAR=void 0;var n=r(156),i=r(946),o=r(332),u=r(11),l=r(795);a.MASK_CHAR=".",a.defaultPhoneConfig={prefix:"+",defaultMask:"............",charAfterDialCode:" ",historySaveDebounceMS:200,disableCountryGuess:!1,disableDialCodePrefill:!1,forceDialCode:!1,disableDialCodeAndPrefix:!1,countries:i.defaultCountries},a.usePhone=function(e,r){var i=t(t({},a.defaultPhoneConfig),r),s=i.country,c=i.countries,d=i.prefix,f=i.defaultMask,p=i.charAfterDialCode,y=i.historySaveDebounceMS,h=i.disableCountryGuess,v=i.disableDialCodePrefill,m=i.forceDialCode,b=i.disableDialCodeAndPrefix,C=i.onCountryGuess,g=i.onPhoneUpdate,P=!b&&!h,_=(0,l.useTimer)(),O=(0,n.useMemo)((function(){if(s)return(0,o.getCountry)({value:s,field:"iso2",countries:c})}),[s,c]),w=(0,u.useHistoryState)(""),j=w[0],D=w[1],x=w[2],S=w[3],M=(0,n.useState)(!1),N=M[0],k=M[1],A=function(e,r){var t,n=void 0===r?{}:r,i=n.deletion,u=n.cursorPosition,l=n.insertDialCodeOnEmpty,h=n.inserted,w=e,x=u;m&&!b&&O&&!(0,o.removeNonDigits)(e).startsWith(O.dialCode)&&e&&(h&&e.startsWith(d)&&e.length-(null!=u?u:0)==0?w=e:(w=j,x=0));var S=function(e,r){var t,n,i=r.trimNonDigitsEnd,u=r.insertDialCodeOnEmpty,l=r.forceDisableCountryGuess,s=!l&&P?(0,o.guessCountryByPartialNumber)({phone:e,countries:c}):void 0,y=!l&&P&&null!==(t=null==s?void 0:s.country)&&void 0!==t?t:O;return{phone:y?(0,o.formatPhone)(e,{prefix:d,mask:null!==(n=y.format)&&void 0!==n?n:f,maskChar:a.MASK_CHAR,dialCode:y.dialCode,trimNonDigitsEnd:i,charAfterDialCode:p,forceDialCode:m,insertDialCodeOnEmpty:u,disableDialCodeAndPrefix:b}):e,countryGuessResult:s,formatCountry:y}}(w,{trimNonDigitsEnd:"backward"===i,insertDialCodeOnEmpty:l||!N&&!v,forceDisableCountryGuess:m&&!!i&&(0,o.removeNonDigits)(w).length<(null!==(t=null==O?void 0:O.dialCode.length)&&void 0!==t?t:0)}),M=S.phone,A=S.countryGuessResult,E=S.formatCountry,I=_.check();return D(M,{overrideLastHistoryItem:!(!I||I>y)}),null==g||g(M,{formatCountry:E,unformattedValue:w,cursorPosition:null!=x?x:0,deletion:i}),P&&(null==A?void 0:A.country)&&A.country.name!==s&&(null==C||C(A)),N||k(!0),M};return(0,n.useEffect)((function(){N&&e===j||A(e)}),[e]),{phone:j,initialized:N,undo:x,redo:S,handleValueChange:A}}},882:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)},n=this&&this.__rest||function(e,a){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)a.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(r[t[n]]=e[t[n]])}return r};Object.defineProperty(a,"__esModule",{value:!0}),a.usePhoneInput=void 0;var i=r(156),o=r(946),u=r(332),l=r(452);a.usePhoneInput=function(e){var a,r=e.initialCountry,s=e.value,c=void 0===s?"":s,d=e.prefix,f=void 0===d?"+":d,p=e.countries,y=void 0===p?o.defaultCountries:p,h=e.disableDialCodeAndPrefix,v=e.hideSpaceAfterDialCode,m=e.onCountryChange,b=n(e,["initialCountry","value","prefix","countries","disableDialCodeAndPrefix","hideSpaceAfterDialCode","onCountryChange"]),C=(0,i.useRef)(null),g=(0,i.useState)(r),P=g[0],_=g[1],O=(0,i.useMemo)((function(){if(P)return(0,u.getCountry)({value:P,field:"iso2",countries:y})}),[y,P]),w=v?"":" ",j=null!==(a=null==O?void 0:O.dialCode)&&void 0!==a?a:"",D=h?(0,u.removeDialCode)({phone:c,dialCode:j,charAfterDialCode:w,prefix:f}):c,x=(0,l.usePhone)(D,t({country:P,countries:y,prefix:f,disableDialCodeAndPrefix:h,charAfterDialCode:w,onCountryGuess:function(e){var a=e.country;e.fullDialCodeMatch&&_(a.iso2)},onPhoneUpdate:function(e,a){var r,t,n=a.formatCountry,i=a.unformattedValue,o=a.cursorPosition,l=a.deletion,s=(0,u.getCursorPosition)({cursorPositionAfterInput:o,phoneBeforeInput:S,phoneAfterInput:i,phoneAfterFormatted:e,leftOffset:b.forceDialCode?f.length+(null!==(t=null===(r=null==n?void 0:n.dialCode)||void 0===r?void 0:r.length)&&void 0!==t?t:0)+w.length:0,deletion:l});Promise.resolve().then((function(){var e;null===(e=C.current)||void 0===e||e.setSelectionRange(s,s)}))}},b)),S=x.phone,M=x.initialized,N=x.undo,k=x.redo,A=x.handleValueChange;return(0,i.useEffect)((function(){var e=C.current;if(e){var a=function(e){if(e.key){var a=e.ctrlKey,r=e.shiftKey,t="z"===e.key.toLowerCase();if(a&&t)return r?k():N()}};return e.addEventListener("keydown",a),function(){e.removeEventListener("keydown",a)}}}),[C,N,k]),(0,i.useEffect)((function(){var e;if(O&&M&&!(0,u.removeNonDigits)(S).startsWith(O.dialCode)){var a=A("",{insertDialCodeOnEmpty:!0});null===(e=C.current)||void 0===e||e.focus(),null==m||m(a)}}),[P]),{phone:S,handlePhoneValueChange:function(e){var a;e.preventDefault();var r=e.nativeEvent.inputType,t=null==r?void 0:r.startsWith("insertFrom"),n=A(e.target.value,{deletion:function(){var e;if(null!==(e=null==r?void 0:r.toLocaleLowerCase().includes("delete"))&&void 0!==e&&e)return(null==r?void 0:r.toLocaleLowerCase().includes("forward"))?"forward":"backward"}(),inserted:t,cursorPosition:null!==(a=e.target.selectionStart)&&void 0!==a?a:0});return h?(0,u.addDialCode)({phone:n,dialCode:j,charAfterDialCode:w,prefix:f}):n},inputRef:C,country:P,setCountry:_}}},393:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.usePhoneValidation=void 0;var t=r(332);a.usePhoneValidation=function(e,a){return(0,t.validatePhone)(e,a)}},795:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.useTimer=void 0;var t=r(156);a.useTimer=function(){var e=(0,t.useState)(),a=e[0],r=e[1],n=(0,t.useState)(Date.now()),i=n[0],o=n[1];return{check:function(){var e=Date.now(),t=a?e-i:void 0;return r(i),o(e),t}}}},515:function(e,a){var r=this&&this.__spreadArray||function(e,a,r){if(r||2===arguments.length)for(var t,n=0,i=a.length;n<i;n++)!t&&n in a||(t||(t=Array.prototype.slice.call(a,0,n)),t[n]=a[n]);return e.concat(t||Array.prototype.slice.call(a))};Object.defineProperty(a,"__esModule",{value:!0}),a.buildClassNames=a.classNamesWithPrefix=a.joinClasses=a.classPrefix=void 0,a.classPrefix="react-international-phone-",a.joinClasses=function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];return e.filter((function(e){return!!e})).join(" ").trim()},a.classNamesWithPrefix=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return a.joinClasses.apply(void 0,e).split(" ").map((function(e){return"".concat(a.classPrefix).concat(e)})).join(" ")},a.buildClassNames=function(e){var t=e.addPrefix,n=e.rawClassNames;return a.joinClasses.apply(void 0,r([a.classNamesWithPrefix.apply(void 0,t)],n,!1))}},62:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.applyMask=void 0,a.applyMask=function(e){var a=e.value,r=e.mask,t=e.maskSymbol,n=e.offset,i=void 0===n?0:n,o=e.trimNonMaskCharsLeftover,u=void 0!==o&&o;if(a.length<i)return a;for(var l=a.slice(0,i),s=a.slice(i),c=l,d=0,f=0,p=r.split("");f<p.length;f++){var y=p[f];if(d>=s.length){if(!u&&y!==t){c+=y;continue}break}y===t?(c+=s[d],d+=1):c+=y}return c}},239:function(e,a,r){var t=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),n=this&&this.__exportStar||function(e,a){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(a,r)||t(a,e,r)};Object.defineProperty(a,"__esModule",{value:!0}),n(r(62),a),n(r(939),a),n(r(222),a)},939:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.removeNonDigits=void 0,a.removeNonDigits=function(e){return e.replace(/\D/g,"")}},222:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.scrollToChild=void 0,a.scrollToChild=function(e,a){var r=e.style.display;"block"!==r&&(e.style.display="block"),a.scrollIntoView({block:"nearest"}),e.style.display=r}},298:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.buildCountryData=void 0,a.buildCountryData=function(e){return[e.name,e.regions,e.iso2,e.dialCode,e.format,e.priority,e.areaCodes].filter(Boolean)}},891:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getCountry=void 0;var t=r(300);a.getCountry=function(e){var a=e.value,r=e.field,n=e.countries;if(["regions","priority"].includes(r))throw new Error(function(e){return'Field "'.concat(e,'" is not supported')}(r));var i=n.find((function(e){var n=(0,t.parseCountry)(e);return a===n[r]}));if(i)return(0,t.parseCountry)(i)}},4:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.guessCountryByPartialNumber=void 0;var t=r(239),n=r(300);a.guessCountryByPartialNumber=function(e){var a=e.phone,r=e.countries,i={country:void 0,fullDialCodeMatch:!1,areaCodeMatch:void 0};if(!a)return i;var o=(0,t.removeNonDigits)(a);if(!o)return i;for(var u=i,l=function(e){var a,r,t,n,i=e.country,o=e.fullDialCodeMatch,l=e.areaCodeMatch,s=i.dialCode===(null===(a=u.country)||void 0===a?void 0:a.dialCode),c=(null!==(r=i.priority)&&void 0!==r?r:0)<(null!==(n=null===(t=u.country)||void 0===t?void 0:t.priority)&&void 0!==n?n:0);s&&!c||(u={country:i,fullDialCodeMatch:o,areaCodeMatch:l})},s=0,c=r;s<c.length;s++){var d=c[s],f=(0,n.parseCountry)(d),p=f.dialCode,y=f.areaCodes;if(o.startsWith(p)){var h=!u.country||Number(p)>=Number(u.country.dialCode);if(y)for(var v=o.substring(p.length),m=0,b=y;m<b.length;m++){var C=b[m];if(v.startsWith(C))return{country:f,fullDialCodeMatch:!0,areaCodeMatch:!0}}!h&&p!==o&&u.fullDialCodeMatch||l({country:f,fullDialCodeMatch:!0,areaCodeMatch:y?!y:void 0})}u.fullDialCodeMatch||o.length<p.length&&p.startsWith(o)&&(!u.country||Number(p)<=Number(u.country.dialCode))&&l({country:f,fullDialCodeMatch:!1})}return u}},88:function(e,a,r){var t=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),n=this&&this.__exportStar||function(e,a){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(a,r)||t(a,e,r)};Object.defineProperty(a,"__esModule",{value:!0}),n(r(298),a),n(r(891),a),n(r(4),a),n(r(300),a)},300:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.parseCountry=void 0,a.parseCountry=function(e){return{name:e[0],regions:e[1],iso2:e[2],dialCode:e[3],format:e[4],priority:e[5],areaCodes:e[6]}}},332:function(e,a,r){var t=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),n=this&&this.__exportStar||function(e,a){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(a,r)||t(a,e,r)};Object.defineProperty(a,"__esModule",{value:!0}),n(r(239),a),n(r(88),a),n(r(165),a)},820:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDialCode=void 0;var t=r(214);a.addDialCode=function(e){var a=e.phone,r=e.dialCode,n=e.prefix,i=void 0===n?"+":n,o=e.charAfterDialCode,u=void 0===o?" ":o;return"".concat(i).concat(r).concat(u).concat((0,t.removeDialCode)({phone:a,dialCode:r,charAfterDialCode:u,prefix:i}))}},380:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.formatPhone=void 0;var t=r(239);a.formatPhone=function(e,a){var r=!a.disableDialCodeAndPrefix&&a.forceDialCode,n=!a.disableDialCodeAndPrefix&&a.insertDialCodeOnEmpty,i=e,o=function(e){return a.trimNonDigitsEnd?e.trim():e};if(!i)return n&&!i.length||r?o("".concat(a.prefix).concat(a.dialCode).concat(a.charAfterDialCode)):o(i);if((i=(0,t.removeNonDigits)(i))===a.dialCode&&!a.disableDialCodeAndPrefix)return o("".concat(a.prefix).concat(a.dialCode).concat(a.charAfterDialCode));if(a.dialCode.startsWith(i)&&!a.disableDialCodeAndPrefix)return o(r?"".concat(a.prefix).concat(a.dialCode).concat(a.charAfterDialCode):"".concat(a.prefix).concat(i));if(!i.startsWith(a.dialCode)&&!a.disableDialCodeAndPrefix){if(r)return o("".concat(a.prefix).concat(a.dialCode).concat(a.charAfterDialCode));if(i.length<a.dialCode.length)return o("".concat(a.prefix).concat(i))}var u,l=(u=a.dialCode.length,a.disableDialCodeAndPrefix&&(u=0),{phoneLeftSide:i.slice(0,u),phoneRightSide:i.slice(u)}),s=l.phoneLeftSide,c=l.phoneRightSide;return s="".concat(a.prefix).concat(s).concat(a.charAfterDialCode),c=(0,t.applyMask)({value:c,mask:a.mask,maskSymbol:a.maskChar,trimNonMaskCharsLeftover:a.trimNonDigitsEnd}),a.disableDialCodeAndPrefix&&(s=""),o("".concat(s).concat(c))}},775:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getCursorPosition=void 0;var r=function(e){return/\d/.test(e)};a.getCursorPosition=function(e){var a=e.phoneBeforeInput,t=e.phoneAfterInput,n=e.phoneAfterFormatted,i=e.cursorPositionAfterInput,o=e.leftOffset,u=void 0===o?0:o,l=e.deletion;if(i<u)return u;if(!a)return n.length;var s="backward"===l;if(0===i&&t.length>0&&n.length>0){if(s)return 0;for(var c=0;c<n.length;c+=1)if(r(n[c]))return c;return n.length}if(t.length<a.length&&1===t.length)return n.length;var d=null;for(c=i-1;c>=0;c-=1)if(r(t[c])){d=c;break}if(null===d)return 0!==i?i:n.length;var f=0;for(c=0;c<d;c+=1)r(t[c])&&(f+=1);s&&(f-=1);var p=0,y=0;for(c=0;c<n.length&&(p+=1,r(n[c])&&(y+=1),y!==f+1);c+=1);for(;!r(n[p])&&p<n.length;)p+=1;return s&&(p+=1),p}},165:function(e,a,r){var t=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),n=this&&this.__exportStar||function(e,a){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(a,r)||t(a,e,r)};Object.defineProperty(a,"__esModule",{value:!0}),n(r(820),a),n(r(380),a),n(r(775),a),n(r(214),a),n(r(684),a)},214:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.removeDialCode=void 0,a.removeDialCode=function(e){var a=e.phone,r=e.dialCode,t=e.prefix,n=void 0===t?"+":t,i=e.charAfterDialCode,o=void 0===i?" ":i;if(!a||!r)return a;var u=a;return u.startsWith(n)&&(u=u.replace(n,"")),u.startsWith(r)?((u=u.replace(r,"")).startsWith(o)&&(u=u.replace(o,"")),u):a}},684:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)};Object.defineProperty(a,"__esModule",{value:!0}),a.validatePhone=void 0;var n=r(452),i=r(239),o=r(88);a.validatePhone=function(e,a){var r=t(t({},n.defaultPhoneConfig),a),u=r.countries,l=r.defaultMask,s=r.defaultMaskMinPhoneLength,c=void 0===s?10:s,d=r.prefix,f=r.charAfterDialCode,p=(0,o.guessCountryByPartialNumber)({phone:e,countries:u}),y=p.country,h=p.fullDialCodeMatch,v=p.areaCodeMatch;if(!y||!h)return{country:void 0,lengthMatch:!1,areaCodeMatch:v,isValid:!1};var m="".concat(d).concat(y.dialCode).concat(f);if(!e.startsWith(m))return{country:y,lengthMatch:!1,areaCodeMatch:v,isValid:!1};var b=e.substring(m.length),C=!y.format,g=C?l:y.format;if(C&&(0,i.removeNonDigits)(e).length<c)return{country:y,lengthMatch:!1,areaCodeMatch:v,isValid:!1};if(!C&&b.length!==g.length)return{country:y,lengthMatch:!1,areaCodeMatch:v,isValid:!1};for(var P=0;P<b.length;P+=1)if(b[P]!==g[P]&&g[P]!==n.MASK_CHAR)return{country:y,lengthMatch:!1,areaCodeMatch:v,isValid:!1};return{country:y,lengthMatch:!0,areaCodeMatch:v,isValid:null==v||v}}},156:a=>{a.exports=e}},r={};function t(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={exports:{}};return a[e].call(i.exports,i,i.exports,t),i.exports}t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.validatePhone=e.parseCountry=e.buildCountryData=e.usePhoneValidation=e.usePhoneInput=e.usePhone=e.defaultCountries=e.PhoneInput=e.FlagEmoji=e.DialCodePreview=e.CountrySelectorDropdown=e.CountrySelector=void 0;var a=t(153);Object.defineProperty(e,"CountrySelector",{enumerable:!0,get:function(){return a.CountrySelector}});var r=t(60);Object.defineProperty(e,"CountrySelectorDropdown",{enumerable:!0,get:function(){return r.CountrySelectorDropdown}});var i=t(7);Object.defineProperty(e,"DialCodePreview",{enumerable:!0,get:function(){return i.DialCodePreview}});var o=t(425);Object.defineProperty(e,"FlagEmoji",{enumerable:!0,get:function(){return o.FlagEmoji}});var u=t(28);Object.defineProperty(e,"PhoneInput",{enumerable:!0,get:function(){return u.PhoneInput}});var l=t(946);Object.defineProperty(e,"defaultCountries",{enumerable:!0,get:function(){return l.defaultCountries}});var s=t(452);Object.defineProperty(e,"usePhone",{enumerable:!0,get:function(){return s.usePhone}});var c=t(882);Object.defineProperty(e,"usePhoneInput",{enumerable:!0,get:function(){return c.usePhoneInput}});var d=t(393);Object.defineProperty(e,"usePhoneValidation",{enumerable:!0,get:function(){return d.usePhoneValidation}});var f=t(332);Object.defineProperty(e,"buildCountryData",{enumerable:!0,get:function(){return f.buildCountryData}}),Object.defineProperty(e,"parseCountry",{enumerable:!0,get:function(){return f.parseCountry}}),Object.defineProperty(e,"validatePhone",{enumerable:!0,get:function(){return f.validatePhone}})})(),n})()));

@@ -0,1 +1,2 @@

/// <reference types="jest" />
import { CountryIso2 } from '../types';

@@ -10,1 +11,2 @@ export declare const getInput: () => HTMLInputElement;

export declare const getCountryFlag: (country: CountryIso2) => HTMLLIElement;
export declare const mockScrollIntoView: () => jest.Mock<any, any, any>;
{
"name": "react-international-phone",
"version": "1.8.2",
"version": "1.8.3",
"description": "☎️ International phone input component for React",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc