(function(){/* Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ var aa=this||self;function ba(a){a.fa=void 0;a.ea=function(){return a.fa?a.fa:a.fa=new a}}function k(a,b){function c(){}c.prototype=b.prototype;a.ga=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.qa=function(d,e,f){for(var g=Array(arguments.length-2),h=2;hc?Math.max(0,a.length+c):c;if("string"===typeof a)return"string"!==typeof b||1!=b.length?-1:a.indexOf(b,c);for(;cb?1:aa.length?!1:M(bb,a)}function jb(a){return M(Za,a)?N(a,Sa):N(a,J)}function kb(a){var b=jb(a.toString());C(a);a.a(b)}function lb(a){return null!=a&&(1!=y(a,9)||-1!=w(a,9)[0])} function N(a,b){for(var c=new B,d,e=a.length,f=0;f=e?c=b:(d=d.substring(0,e),d=N(d,J),0==d.length?c=b:(g=g.clone(),Ga(g,4),d=[g],g=x(a,1),b=Q(a),g in I?(c=S(c,g,T(g)),e=vb(d,b),null!=e&&(d=e.clone(),e=x(e,4),0b?2:f[f.length-1]=e&&e<=d;++e)if(c=parseInt(a.substring(0,e),10),c in I)return b.a(a.substring(e)),c;return 0} function Gb(a,b,c,d,e,f){if(0==b.length)return 0;b=new B(b);var g;null!=c&&(g=t(c,11));null==g&&(g="NonMatch");var h=b.toString();if(0==h.length)g=20;else if(K.test(h))h=h.replace(K,""),C(b),b.a(jb(h)),g=1;else{h=new RegExp(g);kb(b);g=b.toString();if(0==g.search(h)){h=g.match(h)[0].length;var m=g.substring(h).match(Va);m&&null!=m[1]&&0=b.b.length)throw Error("Phone number too short after IDD"); a=Fb(b,d);if(0!=a)return v(f,1,a),a;throw Error("Invalid country calling code");}if(null!=c&&(g=x(c,10),h=""+g,m=b.toString(),0==m.lastIndexOf(h,0)&&(h=new B(m.substring(h.length)),m=t(c,1),m=new RegExp(x(m,2)),Hb(h,c,null),h=h.toString(),!M(m,b.toString())&&M(m,h)||3==Db(a,b.toString(),c,-1))))return d.a(h),e&&v(f,6,10),v(f,1,g),g;v(f,1,0);return 0} function Hb(a,b,c){var d=a.toString(),e=d.length,f=t(b,15);if(0!=e&&null!=f&&0!=f.length){var g=new RegExp("^(?:"+f+")");if(e=g.exec(d)){f=new RegExp(x(t(b,1),2));var h=M(f,d),m=e.length-1;b=t(b,16);if(null==b||0==b.length||null==e[m]||0==e[m].length){if(!h||M(f,d.substring(e[0].length)))null!=c&&0b.b.length)throw Error("The string supplied is too short to be a phone number");null!=g&&(c=new B,e=new B(b.toString()),Hb(e,g,c),a=Db(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