(function(){/* Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ var k=this||self;function m(a,b){a=a.split(".");var c=k;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b}function n(a,b){function c(){}c.prototype=b.prototype;a.ma=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.sa=function(d,e,f){for(var g=Array(arguments.length-2),h=2;ha.length?!1:N(Ra,a)}function Va(a){return N(Ma,a)?O(a,Ga):O(a,Ea)}function Wa(a){var b=Va(a.toString());E(a);a.g(b)}function Xa(a){return null!=a&&(1!=x(a,9)||-1!=u(a,9)[0])}function O(a,b){for(var c=new D,d,e=a.length,f=0;fb?2:f[f.length-1]=e&&e<=d;++e)if(c=parseInt(a.substring(0,e),10),c in J)return b.g(a.substring(e)),c;return 0} function db(a,b,c,d,e,f){if(0==b.length)return 0;b=new D(b);var g;null!=c&&(g=r(c,11));null==g&&(g="NonMatch");var h=b.toString();if(0==h.length)g=20;else if(L.test(h))h=h.replace(L,""),E(b),b.g(Va(h)),g=1;else{h=new RegExp(g);Wa(b);g=b.toString();if(0==g.search(h)){h=g.match(h)[0].length;var l=g.substring(h).match(Ia);l&&null!=l[1]&&0=b.h.length)throw Error("Phone number too short after IDD"); a=cb(b,d);if(0!=a)return t(f,1,a),a;throw Error("Invalid country calling code");}if(null!=c&&(g=w(c,10),h=""+g,l=b.toString(),0==l.lastIndexOf(h,0)&&(h=new D(l.substring(h.length)),l=r(c,1),l=new RegExp(w(l,2)),eb(h,c,null),h=h.toString(),!N(l,b.toString())&&N(l,h)||3==W(a,b.toString(),c,-1))))return d.g(h),e&&t(f,6,10),t(f,1,g),g;t(f,1,0);return 0} function eb(a,b,c){var d=a.toString(),e=d.length,f=r(b,15);if(0!=e&&null!=f&&0!=f.length){var g=new RegExp("^(?:"+f+")");if(e=g.exec(d)){f=new RegExp(w(r(b,1),2));var h=N(f,d),l=e.length-1;b=r(b,16);if(null==b||0==b.length||null==e[l]||0==e[l].length){if(!h||N(f,d.substring(e[0].length)))null!=c&&0=b.length)f="";else{var g=b.indexOf(";",f);f=-1!==g?b.substring(f,g):b.substring(f)}var h=f;null==h?g=!0:0===h.length?g=!1:(g=Na.exec(h),h=Oa.exec(h),g=null!==g||null!==h);if(!g)throw Error("The string supplied did not seem to be a phone number"); null!=f?("+"===f.charAt(0)&&e.g(f),f=b.indexOf("tel:"),e.g(b.substring(0<=f?f+4:0,b.indexOf(";phone-context=")))):(f=e.g,g=b??"",h=g.search(Ja),0<=h?(g=g.substring(h),g=g.replace(La,""),h=g.search(Ka),0<=h&&(g=g.substring(0,h))):g="",f.call(e,g));f=e.toString();g=f.indexOf(";isub=");0b.h.length)throw Error("The string supplied is too short to be a phone number");null!=g&&(c=new D,e=new D(b.toString()),eb(e,g,c),a=W(a,e.toString(),g,-1),2!=a&&4!=a&&5!=a&&(b=e,d&&0a)throw Error("The string supplied is too short to be a phone number");if(17{try{const c=a.replace(/[^+0-9]/g,""),d=new gb(b);b="";for(let e=0;e{try{const e=K.g(),f=Y(e,a,b);var d=X(e,f,-1);return 0==d||4==d?e.format(f,"undefined"===typeof c?0:c):a}catch(e){return a}}); m("intlTelInputUtils.getExampleNumber",(a,b,c,d)=>{try{const l=K.g();a:{var e=l;if(P(a)){var f=U(T(e,a),c);try{if(q(f,6)){var g=r(f,6);var h=fb(e,g,a,!1);break a}}catch(A){}}h=null}return l.format(h,d?0:b?2:1)}catch(l){return""}});m("intlTelInputUtils.getExtension",(a,b)=>{try{return r(Y(K.g(),a,b),3)}catch(c){return""}});m("intlTelInputUtils.getNumberType",(a,b)=>{try{const g=K.g(),h=Y(g,a,b);var c=ab(g,h),d=R(g,w(h,1),c);if(null==d)var e=-1;else{var f=Q(h);e=$a(f,d)}return e}catch(g){return-99}}); m("intlTelInputUtils.getValidationError",(a,b)=>{try{const c=K.g(),d=Y(c,a,b);return X(c,d,-1)}catch(c){return"Invalid country calling code"===c.message?1:3>=a.length||"Phone number too short after IDD"===c.message||"The string supplied is too short to be a phone number"===c.message?2:"The string supplied is too long to be a phone number"===c.message?3:-99}}); m("intlTelInputUtils.isValidNumber",(a,b)=>{try{const l=K.g();var c=Y(l,a,b),d=ab(l,c);a=l;var e=w(c,1),f=R(a,e,d);if(null==f||"001"!=d&&e!=bb(a,d))var g=!1;else{var h=Q(c);g=-1!=$a(h,f)}return g}catch(l){return!1}});m("intlTelInputUtils.isPossibleNumber",(a,b,c)=>{try{const d=K.g(),e=Y(d,a,b);return c?0===X(d,e,1):0===X(d,e,-1)}catch(d){return!1}});m("intlTelInputUtils.getCoreNumber",(a,b)=>{try{return r(Y(K.g(),a,b),2).toString()}catch(c){return""}}); m("intlTelInputUtils.numberFormat",{E164:0,INTERNATIONAL:1,NATIONAL:2,RFC3966:3});m("intlTelInputUtils.numberType",{FIXED_LINE:0,MOBILE:1,FIXED_LINE_OR_MOBILE:2,TOLL_FREE:3,PREMIUM_RATE:4,SHARED_COST:5,VOIP:6,PERSONAL_NUMBER:7,PAGER:8,UAN:9,VOICEMAIL:10,UNKNOWN:-1});m("intlTelInputUtils.validationError",{IS_POSSIBLE:0,INVALID_COUNTRY_CODE:1,TOO_SHORT:2,TOO_LONG:3,IS_POSSIBLE_LOCAL_ONLY:4,INVALID_LENGTH:5});})();