@movmo_app/react-common 0.12.1 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -112,4 +112,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
112
112
  Licensed under the MIT License (MIT), see
113
113
  http://jedwatson.github.io/classnames
114
114
  */(function(){var n={}.hasOwnProperty;function o(){for(var s=[],l=0;l<arguments.length;l++){var i=arguments[l];if(i){var u=typeof i;if(u==="string"||u==="number")s.push(i);else if(Array.isArray(i)&&i.length){var c=o.apply(null,i);c&&s.push(c)}else if(u==="object")for(var d in i)n.call(i,d)&&i[d]&&s.push(d)}}return s.join(" ")}e.exports?(o.default=o,e.exports=o):(a=(function(){return o}).apply(t,[]))===void 0||(e.exports=a)})()},function(e,t,r){(function(a){var n=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,i=parseInt,u=typeof a=="object"&&a&&a.Object===Object&&a,c=typeof self=="object"&&self&&self.Object===Object&&self,d=u||c||Function("return this")(),m=Object.prototype.toString,A=d.Symbol,y=A?A.prototype:void 0,C=y?y.toString:void 0;function p(E){if(typeof E=="string")return E;if(S(E))return C?C.call(E):"";var h=E+"";return h=="0"&&1/E==-1/0?"-0":h}function I(E){var h=typeof E;return!!E&&(h=="object"||h=="function")}function S(E){return typeof E=="symbol"||function(h){return!!h&&typeof h=="object"}(E)&&m.call(E)=="[object Symbol]"}function R(E){return E?(E=function(h){if(typeof h=="number")return h;if(S(h))return NaN;if(I(h)){var T=typeof h.valueOf=="function"?h.valueOf():h;h=I(T)?T+"":T}if(typeof h!="string")return h===0?h:+h;h=h.replace(n,"");var O=s.test(h);return O||l.test(h)?i(h.slice(2),O?2:8):o.test(h)?NaN:+h}(E))===1/0||E===-1/0?17976931348623157e292*(E<0?-1:1):E==E?E:0:E===0?E:0}e.exports=function(E,h,T){var O,F,Q,U;return E=(O=E)==null?"":p(O),F=function(ue){var Z=R(ue),pe=Z%1;return Z==Z?pe?Z-pe:Z:0}(T),Q=0,U=E.length,F==F&&(U!==void 0&&(F=F<=U?F:U),Q!==void 0&&(F=F>=Q?F:Q)),T=F,h=p(h),E.slice(T,T+h.length)==h}}).call(this,r(3))},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch{typeof window=="object"&&(r=window)}e.exports=r},function(e,t,r){(function(a){var n=/^\[object .+?Constructor\]$/,o=typeof a=="object"&&a&&a.Object===Object&&a,s=typeof self=="object"&&self&&self.Object===Object&&self,l=o||s||Function("return this")(),i,u=Array.prototype,c=Function.prototype,d=Object.prototype,m=l["__core-js_shared__"],A=(i=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"",y=c.toString,C=d.hasOwnProperty,p=d.toString,I=RegExp("^"+y.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=u.splice,R=ue(l,"Map"),E=ue(Object,"create");function h(N){var M=-1,j=N?N.length:0;for(this.clear();++M<j;){var Y=N[M];this.set(Y[0],Y[1])}}function T(N){var M=-1,j=N?N.length:0;for(this.clear();++M<j;){var Y=N[M];this.set(Y[0],Y[1])}}function O(N){var M=-1,j=N?N.length:0;for(this.clear();++M<j;){var Y=N[M];this.set(Y[0],Y[1])}}function F(N,M){for(var j,Y,de=N.length;de--;)if((j=N[de][0])===(Y=M)||j!=j&&Y!=Y)return de;return-1}function Q(N){return!(!pe(N)||(M=N,A&&A in M))&&(function(j){var Y=pe(j)?p.call(j):"";return Y=="[object Function]"||Y=="[object GeneratorFunction]"}(N)||function(j){var Y=!1;if(j!=null&&typeof j.toString!="function")try{Y=!!(j+"")}catch{}return Y}(N)?I:n).test(function(j){if(j!=null){try{return y.call(j)}catch{}try{return j+""}catch{}}return""}(N));var M}function U(N,M){var j,Y,de=N.__data__;return((Y=typeof(j=M))=="string"||Y=="number"||Y=="symbol"||Y=="boolean"?j!=="__proto__":j===null)?de[typeof M=="string"?"string":"hash"]:de.map}function ue(N,M){var j=function(Y,de){return Y==null?void 0:Y[de]}(N,M);return Q(j)?j:void 0}function Z(N,M){if(typeof N!="function"||M&&typeof M!="function")throw new TypeError("Expected a function");var j=function(){var Y=arguments,de=M?M.apply(this,Y):Y[0],Se=j.cache;if(Se.has(de))return Se.get(de);var D=N.apply(this,Y);return j.cache=Se.set(de,D),D};return j.cache=new(Z.Cache||O),j}function pe(N){var M=typeof N;return!!N&&(M=="object"||M=="function")}h.prototype.clear=function(){this.__data__=E?E(null):{}},h.prototype.delete=function(N){return this.has(N)&&delete this.__data__[N]},h.prototype.get=function(N){var M=this.__data__;if(E){var j=M[N];return j==="__lodash_hash_undefined__"?void 0:j}return C.call(M,N)?M[N]:void 0},h.prototype.has=function(N){var M=this.__data__;return E?M[N]!==void 0:C.call(M,N)},h.prototype.set=function(N,M){return this.__data__[N]=E&&M===void 0?"__lodash_hash_undefined__":M,this},T.prototype.clear=function(){this.__data__=[]},T.prototype.delete=function(N){var M=this.__data__,j=F(M,N);return!(j<0)&&(j==M.length-1?M.pop():S.call(M,j,1),!0)},T.prototype.get=function(N){var M=this.__data__,j=F(M,N);return j<0?void 0:M[j][1]},T.prototype.has=function(N){return F(this.__data__,N)>-1},T.prototype.set=function(N,M){var j=this.__data__,Y=F(j,N);return Y<0?j.push([N,M]):j[Y][1]=M,this},O.prototype.clear=function(){this.__data__={hash:new h,map:new(R||T),string:new h}},O.prototype.delete=function(N){return U(this,N).delete(N)},O.prototype.get=function(N){return U(this,N).get(N)},O.prototype.has=function(N){return U(this,N).has(N)},O.prototype.set=function(N,M){return U(this,N).set(N,M),this},Z.Cache=O,e.exports=Z}).call(this,r(3))},function(e,t,r){(function(a){var n=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,i=parseInt,u=typeof a=="object"&&a&&a.Object===Object&&a,c=typeof self=="object"&&self&&self.Object===Object&&self,d=u||c||Function("return this")(),m=Object.prototype.toString,A=Math.max,y=Math.min,C=function(){return d.Date.now()};function p(S){var R=typeof S;return!!S&&(R=="object"||R=="function")}function I(S){if(typeof S=="number")return S;if(function(h){return typeof h=="symbol"||function(T){return!!T&&typeof T=="object"}(h)&&m.call(h)=="[object Symbol]"}(S))return NaN;if(p(S)){var R=typeof S.valueOf=="function"?S.valueOf():S;S=p(R)?R+"":R}if(typeof S!="string")return S===0?S:+S;S=S.replace(n,"");var E=s.test(S);return E||l.test(S)?i(S.slice(2),E?2:8):o.test(S)?NaN:+S}e.exports=function(S,R,E){var h,T,O,F,Q,U,ue=0,Z=!1,pe=!1,N=!0;if(typeof S!="function")throw new TypeError("Expected a function");function M(W){var H=h,K=T;return h=T=void 0,ue=W,F=S.apply(K,H)}function j(W){return ue=W,Q=setTimeout(de,R),Z?M(W):F}function Y(W){var H=W-U;return U===void 0||H>=R||H<0||pe&&W-ue>=O}function de(){var W=C();if(Y(W))return Se(W);Q=setTimeout(de,function(H){var K=R-(H-U);return pe?y(K,O-(H-ue)):K}(W))}function Se(W){return Q=void 0,N&&h?M(W):(h=T=void 0,F)}function D(){var W=C(),H=Y(W);if(h=arguments,T=this,U=W,H){if(Q===void 0)return j(U);if(pe)return Q=setTimeout(de,R),M(U)}return Q===void 0&&(Q=setTimeout(de,R)),F}return R=I(R)||0,p(E)&&(Z=!!E.leading,O=(pe="maxWait"in E)?A(I(E.maxWait)||0,R):O,N="trailing"in E?!!E.trailing:N),D.cancel=function(){Q!==void 0&&clearTimeout(Q),ue=0,h=U=T=Q=void 0},D.flush=function(){return Q===void 0?F:Se(C())},D}}).call(this,r(3))},function(e,t,r){(function(a,n){var o="[object Arguments]",s="[object Map]",l="[object Object]",i="[object Set]",u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/,d=/^\./,m=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,A=/\\(\\)?/g,y=/^\[object .+?Constructor\]$/,C=/^(?:0|[1-9]\d*)$/,p={};p["[object Float32Array]"]=p["[object Float64Array]"]=p["[object Int8Array]"]=p["[object Int16Array]"]=p["[object Int32Array]"]=p["[object Uint8Array]"]=p["[object Uint8ClampedArray]"]=p["[object Uint16Array]"]=p["[object Uint32Array]"]=!0,p[o]=p["[object Array]"]=p["[object ArrayBuffer]"]=p["[object Boolean]"]=p["[object DataView]"]=p["[object Date]"]=p["[object Error]"]=p["[object Function]"]=p[s]=p["[object Number]"]=p[l]=p["[object RegExp]"]=p[i]=p["[object String]"]=p["[object WeakMap]"]=!1;var I=typeof a=="object"&&a&&a.Object===Object&&a,S=typeof self=="object"&&self&&self.Object===Object&&self,R=I||S||Function("return this")(),E=t&&!t.nodeType&&t,h=E&&typeof n=="object"&&n&&!n.nodeType&&n,T=h&&h.exports===E&&I.process,O=function(){try{return T&&T.binding("util")}catch{}}(),F=O&&O.isTypedArray;function Q(f,w,B,_){var $=-1,ae=f?f.length:0;for(_&&ae&&(B=f[++$]);++$<ae;)B=w(B,f[$],$,f);return B}function U(f,w){for(var B=-1,_=f?f.length:0;++B<_;)if(w(f[B],B,f))return!0;return!1}function ue(f,w,B,_,$){return $(f,function(ae,ve,Le){B=_?(_=!1,ae):w(B,ae,ve,Le)}),B}function Z(f){var w=!1;if(f!=null&&typeof f.toString!="function")try{w=!!(f+"")}catch{}return w}function pe(f){var w=-1,B=Array(f.size);return f.forEach(function(_,$){B[++w]=[$,_]}),B}function N(f){var w=-1,B=Array(f.size);return f.forEach(function(_){B[++w]=_}),B}var M,j,Y,de=Array.prototype,Se=Function.prototype,D=Object.prototype,W=R["__core-js_shared__"],H=(M=/[^.]+$/.exec(W&&W.keys&&W.keys.IE_PROTO||""))?"Symbol(src)_1."+M:"",K=Se.toString,k=D.hasOwnProperty,g=D.toString,ce=RegExp("^"+K.call(k).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),le=R.Symbol,oe=R.Uint8Array,ye=D.propertyIsEnumerable,Ee=de.splice,Ne=(j=Object.keys,Y=Object,function(f){return j(Y(f))}),X=yt(R,"DataView"),Be=yt(R,"Map"),we=yt(R,"Promise"),G=yt(R,"Set"),V=yt(R,"WeakMap"),z=yt(Object,"create"),q=Ct(X),ne=Ct(Be),me=Ct(we),he=Ct(G),Ge=Ct(V),ee=le?le.prototype:void 0,ie=ee?ee.valueOf:void 0,Ce=ee?ee.toString:void 0;function te(f){var w=-1,B=f?f.length:0;for(this.clear();++w<B;){var _=f[w];this.set(_[0],_[1])}}function re(f){var w=-1,B=f?f.length:0;for(this.clear();++w<B;){var _=f[w];this.set(_[0],_[1])}}function ke(f){var w=-1,B=f?f.length:0;for(this.clear();++w<B;){var _=f[w];this.set(_[0],_[1])}}function nt(f){var w=-1,B=f?f.length:0;for(this.__data__=new ke;++w<B;)this.add(f[w])}function Je(f){this.__data__=new re(f)}function at(f,w){var B=v(f)||Tn(f)?function(ve,Le){for(var Xe=-1,We=Array(ve);++Xe<ve;)We[Xe]=Le(Xe);return We}(f.length,String):[],_=B.length,$=!!_;for(var ae in f)!k.call(f,ae)||$&&(ae=="length"||ln(ae,_))||B.push(ae);return B}function lt(f,w){for(var B=f.length;B--;)if(Pn(f[B][0],w))return B;return-1}te.prototype.clear=function(){this.__data__=z?z(null):{}},te.prototype.delete=function(f){return this.has(f)&&delete this.__data__[f]},te.prototype.get=function(f){var w=this.__data__;if(z){var B=w[f];return B==="__lodash_hash_undefined__"?void 0:B}return k.call(w,f)?w[f]:void 0},te.prototype.has=function(f){var w=this.__data__;return z?w[f]!==void 0:k.call(w,f)},te.prototype.set=function(f,w){return this.__data__[f]=z&&w===void 0?"__lodash_hash_undefined__":w,this},re.prototype.clear=function(){this.__data__=[]},re.prototype.delete=function(f){var w=this.__data__,B=lt(w,f);return!(B<0)&&(B==w.length-1?w.pop():Ee.call(w,B,1),!0)},re.prototype.get=function(f){var w=this.__data__,B=lt(w,f);return B<0?void 0:w[B][1]},re.prototype.has=function(f){return lt(this.__data__,f)>-1},re.prototype.set=function(f,w){var B=this.__data__,_=lt(B,f);return _<0?B.push([f,w]):B[_][1]=w,this},ke.prototype.clear=function(){this.__data__={hash:new te,map:new(Be||re),string:new te}},ke.prototype.delete=function(f){return Jt(this,f).delete(f)},ke.prototype.get=function(f){return Jt(this,f).get(f)},ke.prototype.has=function(f){return Jt(this,f).has(f)},ke.prototype.set=function(f,w){return Jt(this,f).set(f,w),this},nt.prototype.add=nt.prototype.push=function(f){return this.__data__.set(f,"__lodash_hash_undefined__"),this},nt.prototype.has=function(f){return this.__data__.has(f)},Je.prototype.clear=function(){this.__data__=new re},Je.prototype.delete=function(f){return this.__data__.delete(f)},Je.prototype.get=function(f){return this.__data__.get(f)},Je.prototype.has=function(f){return this.__data__.has(f)},Je.prototype.set=function(f,w){var B=this.__data__;if(B instanceof re){var _=B.__data__;if(!Be||_.length<199)return _.push([f,w]),this;B=this.__data__=new ke(_)}return B.set(f,w),this};var vt,ze=(vt=function(f,w){return f&&Gt(f,w,Ue)},function(f,w){if(f==null)return f;if(!L(f))return vt(f,w);for(var B=f.length,_=-1,$=Object(f);++_<B&&w($[_],_,$)!==!1;);return f}),Gt=function(f){return function(w,B,_){for(var $=-1,ae=Object(w),ve=_(w),Le=ve.length;Le--;){var Xe=ve[++$];if(B(ae[Xe],Xe,ae)===!1)break}return w}}();function kt(f,w){for(var B=0,_=(w=Lt(w,f)?[w]:Yt(w)).length;f!=null&&B<_;)f=f[_t(w[B++])];return B&&B==_?f:void 0}function an(f,w){return f!=null&&w in Object(f)}function ht(f,w,B,_,$){return f===w||(f==null||w==null||!Re(f)&&!Pe(w)?f!=f&&w!=w:function(ae,ve,Le,Xe,We,Te){var ut=v(ae),qe=v(ve),Qe="[object Array]",Ke="[object Array]";ut||(Qe=(Qe=pt(ae))==o?l:Qe),qe||(Ke=(Ke=pt(ve))==o?l:Ke);var dt=Qe==l&&!Z(ae),Ut=Ke==l&&!Z(ve),Tt=Qe==Ke;if(Tt&&!dt)return Te||(Te=new Je),ut||Ae(ae)?sn(ae,ve,Le,Xe,We,Te):function(_e,De,hr,Xt,On,it,It){switch(hr){case"[object DataView]":if(_e.byteLength!=De.byteLength||_e.byteOffset!=De.byteOffset)return!1;_e=_e.buffer,De=De.buffer;case"[object ArrayBuffer]":return!(_e.byteLength!=De.byteLength||!Xt(new oe(_e),new oe(De)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Pn(+_e,+De);case"[object Error]":return _e.name==De.name&&_e.message==De.message;case"[object RegExp]":case"[object String]":return _e==De+"";case s:var Ot=pe;case i:var cn=2&it;if(Ot||(Ot=N),_e.size!=De.size&&!cn)return!1;var Mn=It.get(_e);if(Mn)return Mn==De;it|=1,It.set(_e,De);var $t=sn(Ot(_e),Ot(De),Xt,On,it,It);return It.delete(_e),$t;case"[object Symbol]":if(ie)return ie.call(_e)==ie.call(De)}return!1}(ae,ve,Qe,Le,Xe,We,Te);if(!(2&We)){var va=dt&&k.call(ae,"__wrapped__"),ha=Ut&&k.call(ve,"__wrapped__");if(va||ha){var Ds=va?ae.value():ae,Ws=ha?ve.value():ve;return Te||(Te=new Je),Le(Ds,Ws,Xe,We,Te)}}return Tt?(Te||(Te=new Je),function(_e,De,hr,Xt,On,it){var It=2&On,Ot=Ue(_e),cn=Ot.length,Mn=Ue(De).length;if(cn!=Mn&&!It)return!1;for(var $t=cn;$t--;){var Mt=Ot[$t];if(!(It?Mt in De:k.call(De,Mt)))return!1}var ya=it.get(_e);if(ya&&it.get(De))return ya==De;var Fn=!0;it.set(_e,De),it.set(De,_e);for(var yr=It;++$t<cn;){Mt=Ot[$t];var Bn=_e[Mt],Vn=De[Mt];if(Xt)var Ca=It?Xt(Vn,Bn,Mt,De,_e,it):Xt(Bn,Vn,Mt,_e,De,it);if(!(Ca===void 0?Bn===Vn||hr(Bn,Vn,Xt,On,it):Ca)){Fn=!1;break}yr||(yr=Mt=="constructor")}if(Fn&&!yr){var jn=_e.constructor,Dn=De.constructor;jn==Dn||!("constructor"in _e)||!("constructor"in De)||typeof jn=="function"&&jn instanceof jn&&typeof Dn=="function"&&Dn instanceof Dn||(Fn=!1)}return it.delete(_e),it.delete(De),Fn}(ae,ve,Le,Xe,We,Te)):!1}(f,w,ht,B,_,$))}function Nt(f){return!(!Re(f)||function(w){return!!H&&H in w}(f))&&(J(f)||Z(f)?ce:y).test(Ct(f))}function Pt(f){return typeof f=="function"?f:f==null?He:typeof f=="object"?v(f)?function(_,$){return Lt(_)&&Rn($)?Gn(_t(_),$):function(ae){var ve=function(Le,Xe,We){var Te=Le==null?void 0:kt(Le,Xe);return Te===void 0?We:Te}(ae,_);return ve===void 0&&ve===$?function(Le,Xe){return Le!=null&&function(We,Te,ut){Te=Lt(Te,We)?[Te]:Yt(Te);for(var qe,Qe=-1,Ke=Te.length;++Qe<Ke;){var dt=_t(Te[Qe]);if(!(qe=We!=null&&ut(We,dt)))break;We=We[dt]}return qe||!!(Ke=We?We.length:0)&&ge(Ke)&&ln(dt,Ke)&&(v(We)||Tn(We))}(Le,Xe,an)}(ae,_):ht($,ve,void 0,3)}}(f[0],f[1]):function(_){var $=function(ae){for(var ve=Ue(ae),Le=ve.length;Le--;){var Xe=ve[Le],We=ae[Xe];ve[Le]=[Xe,We,Rn(We)]}return ve}(_);return $.length==1&&$[0][2]?Gn($[0][0],$[0][1]):function(ae){return ae===_||function(ve,Le,Xe,We){var Te=Xe.length,ut=Te;if(ve==null)return!ut;for(ve=Object(ve);Te--;){var qe=Xe[Te];if(qe[2]?qe[1]!==ve[qe[0]]:!(qe[0]in ve))return!1}for(;++Te<ut;){var Qe=(qe=Xe[Te])[0],Ke=ve[Qe],dt=qe[1];if(qe[2]){if(Ke===void 0&&!(Qe in ve))return!1}else{var Ut=new Je,Tt;if(!(Tt===void 0?ht(dt,Ke,We,3,Ut):Tt))return!1}}return!0}(ae,_,$)}}(f):Lt(w=f)?(B=_t(w),function(_){return _==null?void 0:_[B]}):function(_){return function($){return kt($,_)}}(w);var w,B}function on(f){if(B=(w=f)&&w.constructor,_=typeof B=="function"&&B.prototype||D,w!==_)return Ne(f);var w,B,_,$=[];for(var ae in Object(f))k.call(f,ae)&&ae!="constructor"&&$.push(ae);return $}function Yt(f){return v(f)?f:Nn(f)}function sn(f,w,B,_,$,ae){var ve=2&$,Le=f.length,Xe=w.length;if(Le!=Xe&&!(ve&&Xe>Le))return!1;var We=ae.get(f);if(We&&ae.get(w))return We==w;var Te=-1,ut=!0,qe=1&$?new nt:void 0;for(ae.set(f,w),ae.set(w,f);++Te<Le;){var Qe=f[Te],Ke=w[Te];if(_)var dt=ve?_(Ke,Qe,Te,w,f,ae):_(Qe,Ke,Te,f,w,ae);if(dt!==void 0){if(dt)continue;ut=!1;break}if(qe){if(!U(w,function(Ut,Tt){if(!qe.has(Tt)&&(Qe===Ut||B(Qe,Ut,_,$,ae)))return qe.add(Tt)})){ut=!1;break}}else if(Qe!==Ke&&!B(Qe,Ke,_,$,ae)){ut=!1;break}}return ae.delete(f),ae.delete(w),ut}function Jt(f,w){var B,_,$=f.__data__;return((_=typeof(B=w))=="string"||_=="number"||_=="symbol"||_=="boolean"?B!=="__proto__":B===null)?$[typeof w=="string"?"string":"hash"]:$.map}function yt(f,w){var B=function(_,$){return _==null?void 0:_[$]}(f,w);return Nt(B)?B:void 0}var pt=function(f){return g.call(f)};function ln(f,w){return!!(w=w??9007199254740991)&&(typeof f=="number"||C.test(f))&&f>-1&&f%1==0&&f<w}function Lt(f,w){if(v(f))return!1;var B=typeof f;return!(B!="number"&&B!="symbol"&&B!="boolean"&&f!=null&&!xe(f))||c.test(f)||!u.test(f)||w!=null&&f in Object(w)}function Rn(f){return f==f&&!Re(f)}function Gn(f,w){return function(B){return B!=null&&B[f]===w&&(w!==void 0||f in Object(B))}}(X&&pt(new X(new ArrayBuffer(1)))!="[object DataView]"||Be&&pt(new Be)!=s||we&&pt(we.resolve())!="[object Promise]"||G&&pt(new G)!=i||V&&pt(new V)!="[object WeakMap]")&&(pt=function(f){var w=g.call(f),B=w==l?f.constructor:void 0,_=B?Ct(B):void 0;if(_)switch(_){case q:return"[object DataView]";case ne:return s;case me:return"[object Promise]";case he:return i;case Ge:return"[object WeakMap]"}return w});var Nn=un(function(f){var w;f=(w=f)==null?"":function(_){if(typeof _=="string")return _;if(xe(_))return Ce?Ce.call(_):"";var $=_+"";return $=="0"&&1/_==-1/0?"-0":$}(w);var B=[];return d.test(f)&&B.push(""),f.replace(m,function(_,$,ae,ve){B.push(ae?ve.replace(A,"$1"):$||_)}),B});function _t(f){if(typeof f=="string"||xe(f))return f;var w=f+"";return w=="0"&&1/f==-1/0?"-0":w}function Ct(f){if(f!=null){try{return K.call(f)}catch{}try{return f+""}catch{}}return""}function un(f,w){if(typeof f!="function"||w&&typeof w!="function")throw new TypeError("Expected a function");var B=function(){var _=arguments,$=w?w.apply(this,_):_[0],ae=B.cache;if(ae.has($))return ae.get($);var ve=f.apply(this,_);return B.cache=ae.set($,ve),ve};return B.cache=new(un.Cache||ke),B}function Pn(f,w){return f===w||f!=f&&w!=w}function Tn(f){return function(w){return Pe(w)&&L(w)}(f)&&k.call(f,"callee")&&(!ye.call(f,"callee")||g.call(f)==o)}un.Cache=ke;var v=Array.isArray;function L(f){return f!=null&&ge(f.length)&&!J(f)}function J(f){var w=Re(f)?g.call(f):"";return w=="[object Function]"||w=="[object GeneratorFunction]"}function ge(f){return typeof f=="number"&&f>-1&&f%1==0&&f<=9007199254740991}function Re(f){var w=typeof f;return!!f&&(w=="object"||w=="function")}function Pe(f){return!!f&&typeof f=="object"}function xe(f){return typeof f=="symbol"||Pe(f)&&g.call(f)=="[object Symbol]"}var Ae=F?function(f){return function(w){return f(w)}}(F):function(f){return Pe(f)&&ge(f.length)&&!!p[g.call(f)]};function Ue(f){return L(f)?at(f):on(f)}function He(f){return f}n.exports=function(f,w,B){var _=v(f)?Q:ue,$=arguments.length<3;return _(f,Pt(w),B,$,ze)}}).call(this,r(3),r(7)(e))},function(e,t){e.exports=function(r){return r.webpackPolyfill||(r.deprecate=function(){},r.paths=[],r.children||(r.children=[]),Object.defineProperty(r,"loaded",{enumerable:!0,get:function(){return r.l}}),Object.defineProperty(r,"id",{enumerable:!0,get:function(){return r.i}}),r.webpackPolyfill=1),r}},function(e,t){String.prototype.padEnd||(String.prototype.padEnd=function(r,a){return r>>=0,a=String(a!==void 0?a:" "),this.length>r?String(this):((r-=this.length)>a.length&&(a+=a.repeat(r/a.length)),String(this)+a.slice(0,r))})},function(e,t,r){function a(D,W,H){return W in D?Object.defineProperty(D,W,{value:H,enumerable:!0,configurable:!0,writable:!0}):D[W]=H,D}function n(D){if(Symbol.iterator in Object(D)||Object.prototype.toString.call(D)==="[object Arguments]")return Array.from(D)}function o(D){return function(W){if(Array.isArray(W)){for(var H=0,K=new Array(W.length);H<W.length;H++)K[H]=W[H];return K}}(D)||n(D)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function s(D){if(Array.isArray(D))return D}function l(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function i(D,W){if(!(D instanceof W))throw new TypeError("Cannot call a class as a function")}function u(D,W){for(var H=0;H<W.length;H++){var K=W[H];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(D,K.key,K)}}function c(D){return(c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(W){return typeof W}:function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W})(D)}function d(D){return(d=typeof Symbol=="function"&&c(Symbol.iterator)==="symbol"?function(W){return c(W)}:function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":c(W)})(D)}function m(D){if(D===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function A(D){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(W){return W.__proto__||Object.getPrototypeOf(W)})(D)}function y(D,W){return(y=Object.setPrototypeOf||function(H,K){return H.__proto__=K,H})(D,W)}r.r(t);var C=r(0),p=r.n(C),I=r(5),S=r.n(I),R=r(4),E=r.n(R),h=r(6),T=r.n(h),O=r(2),F=r.n(O),Q=r(1),U=r.n(Q);r(8);function ue(D,W){return s(D)||function(H,K){var k=[],g=!0,ce=!1,le=void 0;try{for(var oe,ye=H[Symbol.iterator]();!(g=(oe=ye.next()).done)&&(k.push(oe.value),!K||k.length!==K);g=!0);}catch(Ee){ce=!0,le=Ee}finally{try{g||ye.return==null||ye.return()}finally{if(ce)throw le}}return k}(D,W)||l()}var Z=[["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,["809","829","849"]],["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,["55","81","33","656","664","998","774","229"]],["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,["787","939"]],["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,["907","205","251","256","334","479","501","870","480","520","602","623","928","209","213","310","323","408","415","510","530","559","562","619","626","650","661","707","714","760","805","818","831","858","909","916","925","949","951","303","719","970","203","860","202","302","239","305","321","352","386","407","561","727","772","813","850","863","904","941","954","229","404","478","706","770","912","808","319","515","563","641","712","208","217","309","312","618","630","708","773","815","847","219","260","317","574","765","812","316","620","785","913","270","502","606","859","225","318","337","504","985","413","508","617","781","978","301","410","207","231","248","269","313","517","586","616","734","810","906","989","218","320","507","612","651","763","952","314","417","573","636","660","816","228","601","662","406","252","336","704","828","910","919","701","308","402","603","201","609","732","856","908","973","505","575","702","775","212","315","516","518","585","607","631","716","718","845","914","216","330","419","440","513","614","740","937","405","580","918","503","541","215","412","570","610","717","724","814","401","803","843","864","605","423","615","731","865","901","931","210","214","254","281","325","361","409","432","512","713","806","817","830","903","915","936","940","956","972","979","435","801","276","434","540","703","757","804","802","206","253","360","425","509","262","414","608","715","920","304","307"]],["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"]],pe=[["American Samoa",["oceania"],"as","1684"],["Anguilla",["america","carribean"],"ai","1264"],["Bermuda",["america","north-america"],"bm","1441"],["British Virgin Islands",["america","carribean"],"vg","1284"],["Cayman Islands",["america","carribean"],"ky","1345"],["Cook Islands",["oceania"],"ck","682"],["Falkland Islands",["america","south-america"],"fk","500"],["Faroe Islands",["europe"],"fo","298"],["Gibraltar",["europe"],"gi","350"],["Greenland",["america"],"gl","299"],["Jersey",["europe","eu-union"],"je","44",".... ......"],["Montserrat",["america","carribean"],"ms","1664"],["Niue",["asia"],"nu","683"],["Norfolk Island",["oceania"],"nf","672"],["Northern Mariana Islands",["oceania"],"mp","1670"],["Saint Barthélemy",["america","carribean"],"bl","590","",1],["Saint Helena",["africa"],"sh","290"],["Saint Martin",["america","carribean"],"mf","590","",2],["Saint Pierre and Miquelon",["america","north-america"],"pm","508"],["Sint Maarten",["america","carribean"],"sx","1721"],["Tokelau",["oceania"],"tk","690"],["Turks and Caicos Islands",["america","carribean"],"tc","1649"],["U.S. Virgin Islands",["america","carribean"],"vi","1340"],["Wallis and Futuna",["oceania"],"wf","681"]];function N(D,W,H,K,k){return!H||k?D+"".padEnd(W.length,".")+" "+K:D+"".padEnd(W.length,".")+" "+H}function M(D,W,H,K,k){var g,ce,le=[];return ce=W===!0,[(g=[]).concat.apply(g,o(D.map(function(oe){var ye={name:oe[0],regions:oe[1],iso2:oe[2],countryCode:oe[3],dialCode:oe[3],format:N(H,oe[3],oe[4],K,k),priority:oe[5]||0},Ee=[];return oe[6]&&oe[6].map(function(Ne){var X=function(Be){for(var we=1;we<arguments.length;we++){var G=arguments[we]!=null?arguments[we]:{},V=Object.keys(G);typeof Object.getOwnPropertySymbols=="function"&&(V=V.concat(Object.getOwnPropertySymbols(G).filter(function(z){return Object.getOwnPropertyDescriptor(G,z).enumerable}))),V.forEach(function(z){a(Be,z,G[z])})}return Be}({},ye);X.dialCode=oe[3]+Ne,X.isAreaCode=!0,X.areaCodeLength=Ne.length,Ee.push(X)}),Ee.length>0?(ye.mainCode=!0,ce||W.constructor.name==="Array"&&W.includes(oe[2])?(ye.hasAreaCodes=!0,[ye].concat(Ee)):(le=le.concat(Ee),[ye])):[ye]}))),le]}function j(D,W,H,K){if(H!==null){var k=Object.keys(H),g=Object.values(H);k.forEach(function(ce,le){if(K)return D.push([ce,g[le]]);var oe=D.findIndex(function(Ee){return Ee[0]===ce});if(oe===-1){var ye=[ce];ye[W]=g[le],D.push(ye)}else D[oe][W]=g[le]})}}function Y(D,W){return W.length===0?D:D.map(function(H){var K=W.findIndex(function(g){return g[0]===H[2]});if(K===-1)return H;var k=W[K];return k[1]&&(H[4]=k[1]),k[3]&&(H[5]=k[3]),k[2]&&(H[6]=k[2]),H})}var de=function D(W,H,K,k,g,ce,le,oe,ye,Ee,Ne,X,Be,we){i(this,D),this.filterRegions=function(ee,ie){if(typeof ee=="string"){var Ce=ee;return ie.filter(function(te){return te.regions.some(function(re){return re===Ce})})}return ie.filter(function(te){return ee.map(function(re){return te.regions.some(function(ke){return ke===re})}).some(function(re){return re})})},this.sortTerritories=function(ee,ie){var Ce=[].concat(o(ee),o(ie));return Ce.sort(function(te,re){return te.name<re.name?-1:te.name>re.name?1:0}),Ce},this.getFilteredCountryList=function(ee,ie,Ce){return ee.length===0?ie:Ce?ee.map(function(te){var re=ie.find(function(ke){return ke.iso2===te});if(re)return re}).filter(function(te){return te}):ie.filter(function(te){return ee.some(function(re){return re===te.iso2})})},this.localizeCountries=function(ee,ie,Ce){for(var te=0;te<ee.length;te++)ie[ee[te].iso2]!==void 0?ee[te].localName=ie[ee[te].iso2]:ie[ee[te].name]!==void 0&&(ee[te].localName=ie[ee[te].name]);return Ce||ee.sort(function(re,ke){return re.localName<ke.localName?-1:re.localName>ke.localName?1:0}),ee},this.getCustomAreas=function(ee,ie){for(var Ce=[],te=0;te<ie.length;te++){var re=JSON.parse(JSON.stringify(ee));re.dialCode+=ie[te],Ce.push(re)}return Ce},this.excludeCountries=function(ee,ie){return ie.length===0?ee:ee.filter(function(Ce){return!ie.includes(Ce.iso2)})};var G=function(ee,ie,Ce){var te=[];return j(te,1,ee,!0),j(te,3,ie),j(te,2,Ce),te}(oe,ye,Ee),V=Y(JSON.parse(JSON.stringify(Z)),G),z=Y(JSON.parse(JSON.stringify(pe)),G),q=ue(M(V,W,X,Be,we),2),ne=q[0],me=q[1];if(H){var he=ue(M(z,W,X,Be,we),2),Ge=he[0];he[1],ne=this.sortTerritories(Ge,ne)}K&&(ne=this.filterRegions(K,ne)),this.onlyCountries=this.localizeCountries(this.excludeCountries(this.getFilteredCountryList(k,ne,le.includes("onlyCountries")),ce),Ne,le.includes("onlyCountries")),this.preferredCountries=g.length===0?[]:this.localizeCountries(this.getFilteredCountryList(g,ne,le.includes("preferredCountries")),Ne,le.includes("preferredCountries")),this.hiddenAreaCodes=this.excludeCountries(this.getFilteredCountryList(k,me),ce)},Se=function(D){function W(k){var g;i(this,W),(g=function(G,V){return!V||d(V)!=="object"&&typeof V!="function"?m(G):V}(this,A(W).call(this,k))).getProbableCandidate=E()(function(G){return G&&G.length!==0?g.state.onlyCountries.filter(function(V){return F()(V.name.toLowerCase(),G.toLowerCase())},m(m(g)))[0]:null}),g.guessSelectedCountry=E()(function(G,V,z,q){var ne;if(g.props.enableAreaCodes===!1&&(q.some(function(Ge){if(F()(G,Ge.dialCode))return z.some(function(ee){if(Ge.iso2===ee.iso2&&ee.mainCode)return ne=ee,!0}),!0}),ne))return ne;var me=z.find(function(Ge){return Ge.iso2==V});if(G.trim()==="")return me;var he=z.reduce(function(Ge,ee){return F()(G,ee.dialCode)&&(ee.dialCode.length>Ge.dialCode.length||ee.dialCode.length===Ge.dialCode.length&&ee.priority<Ge.priority)?ee:Ge},{dialCode:"",priority:10001},m(m(g)));return he.name?he:me}),g.updateCountry=function(G){var V,z=g.state.onlyCountries;(V=G.indexOf(0)>="0"&&G.indexOf(0)<="9"?z.find(function(q){return q.dialCode==+G}):z.find(function(q){return q.iso2==G}))&&V.dialCode&&g.setState({selectedCountry:V,formattedNumber:g.props.disableCountryCode?"":g.formatNumber(V.dialCode,V)})},g.scrollTo=function(G,V){if(G){var z=g.dropdownRef;if(z&&document.body){var q=z.offsetHeight,ne=z.getBoundingClientRect().top+document.body.scrollTop,me=ne+q,he=G,Ge=he.getBoundingClientRect(),ee=he.offsetHeight,ie=Ge.top+document.body.scrollTop,Ce=ie+ee,te=ie-ne+z.scrollTop,re=q/2-ee/2;if(g.props.enableSearch?ie<ne+32:ie<ne)V&&(te-=re),z.scrollTop=te;else if(Ce>me){V&&(te+=re);var ke=q-ee;z.scrollTop=te-ke}}}},g.scrollToTop=function(){var G=g.dropdownRef;G&&document.body&&(G.scrollTop=0)},g.formatNumber=function(G,V){if(!V)return G;var z,q=V.format,ne=g.props,me=ne.disableCountryCode,he=ne.enableAreaCodeStretch,Ge=ne.enableLongNumbers,ee=ne.autoFormat;if(me?((z=q.split(" ")).shift(),z=z.join(" ")):he&&V.isAreaCode?((z=q.split(" "))[1]=z[1].replace(/\.+/,"".padEnd(V.areaCodeLength,".")),z=z.join(" ")):z=q,!G||G.length===0)return me?"":g.props.prefix;if(G&&G.length<2||!z||!ee)return me?G:g.props.prefix+G;var ie,Ce=T()(z,function(te,re){if(te.remainingText.length===0)return te;if(re!==".")return{formattedText:te.formattedText+re,remainingText:te.remainingText};var ke,nt=s(ke=te.remainingText)||n(ke)||l(),Je=nt[0],at=nt.slice(1);return{formattedText:te.formattedText+Je,remainingText:at}},{formattedText:"",remainingText:G.split("")});return(ie=Ge?Ce.formattedText+Ce.remainingText.join(""):Ce.formattedText).includes("(")&&!ie.includes(")")&&(ie+=")"),ie},g.cursorToEnd=function(){var G=g.numberInputRef;if(document.activeElement===G){G.focus();var V=G.value.length;G.value.charAt(V-1)===")"&&(V-=1),G.setSelectionRange(V,V)}},g.getElement=function(G){return g["flag_no_".concat(G)]},g.getCountryData=function(){return g.state.selectedCountry?{name:g.state.selectedCountry.name||"",dialCode:g.state.selectedCountry.dialCode||"",countryCode:g.state.selectedCountry.iso2||"",format:g.state.selectedCountry.format||""}:{}},g.handleFlagDropdownClick=function(G){if(G.preventDefault(),g.state.showDropdown||!g.props.disabled){var V=g.state,z=V.preferredCountries,q=V.onlyCountries,ne=V.selectedCountry,me=g.concatPreferredCountries(z,q).findIndex(function(he){return he.dialCode===ne.dialCode&&he.iso2===ne.iso2});g.setState({showDropdown:!g.state.showDropdown,highlightCountryIndex:me},function(){g.state.showDropdown&&g.scrollTo(g.getElement(g.state.highlightCountryIndex))})}},g.handleInput=function(G){var V=G.target.value,z=g.props,q=z.prefix,ne=z.onChange,me=g.props.disableCountryCode?"":q,he=g.state.selectedCountry,Ge=g.state.freezeSelection;if(!g.props.countryCodeEditable){var ee=q+(he.hasAreaCodes?g.state.onlyCountries.find(function(ze){return ze.iso2===he.iso2&&ze.mainCode}).dialCode:he.dialCode);if(V.slice(0,ee.length)!==ee)return}if(V===q)return ne&&ne("",g.getCountryData(),G,""),g.setState({formattedNumber:""});if(!(V.replace(/\D/g,"").length>15&&(g.props.enableLongNumbers===!1||typeof g.props.enableLongNumbers=="number"&&V.replace(/\D/g,"").length>g.props.enableLongNumbers))&&V!==g.state.formattedNumber){G.preventDefault?G.preventDefault():G.returnValue=!1;var ie=g.props.country,Ce=g.state,te=Ce.onlyCountries,re=Ce.selectedCountry,ke=Ce.hiddenAreaCodes;if(ne&&G.persist(),V.length>0){var nt=V.replace(/\D/g,"");(!g.state.freezeSelection||re&&re.dialCode.length>nt.length)&&(he=g.props.disableCountryGuess?re:g.guessSelectedCountry(nt.substring(0,6),ie,te,ke)||re,Ge=!1),me=g.formatNumber(nt,he),he=he.dialCode?he:re}var Je=G.target.selectionStart,at=G.target.selectionStart,lt=g.state.formattedNumber,vt=me.length-lt.length;g.setState({formattedNumber:me,freezeSelection:Ge,selectedCountry:he},function(){vt>0&&(at-=vt),me.charAt(me.length-1)==")"?g.numberInputRef.setSelectionRange(me.length-1,me.length-1):at>0&&lt.length>=me.length?g.numberInputRef.setSelectionRange(at,at):Je<lt.length&&g.numberInputRef.setSelectionRange(Je,Je),ne&&ne(me.replace(/[^0-9]+/g,""),g.getCountryData(),G,me)})}},g.handleInputClick=function(G){g.setState({showDropdown:!1}),g.props.onClick&&g.props.onClick(G,g.getCountryData())},g.handleDoubleClick=function(G){var V=G.target.value.length;G.target.setSelectionRange(0,V)},g.handleFlagItemClick=function(G,V){var z=g.state.selectedCountry,q=g.state.onlyCountries.find(function(Ge){return Ge==G});if(q){var ne=g.state.formattedNumber.replace(" ","").replace("(","").replace(")","").replace("-",""),me=ne.length>1?ne.replace(z.dialCode,q.dialCode):q.dialCode,he=g.formatNumber(me.replace(/\D/g,""),q);g.setState({showDropdown:!1,selectedCountry:q,freezeSelection:!0,formattedNumber:he,searchValue:""},function(){g.cursorToEnd(),g.props.onChange&&g.props.onChange(he.replace(/[^0-9]+/g,""),g.getCountryData(),V,he)})}},g.handleInputFocus=function(G){g.numberInputRef&&g.numberInputRef.value===g.props.prefix&&g.state.selectedCountry&&!g.props.disableCountryCode&&g.setState({formattedNumber:g.props.prefix+g.state.selectedCountry.dialCode},function(){g.props.jumpCursorToEnd&&setTimeout(g.cursorToEnd,0)}),g.setState({placeholder:""}),g.props.onFocus&&g.props.onFocus(G,g.getCountryData()),g.props.jumpCursorToEnd&&setTimeout(g.cursorToEnd,0)},g.handleInputBlur=function(G){G.target.value||g.setState({placeholder:g.props.placeholder}),g.props.onBlur&&g.props.onBlur(G,g.getCountryData())},g.handleInputCopy=function(G){if(g.props.copyNumbersOnly){var V=window.getSelection().toString().replace(/[^0-9]+/g,"");G.clipboardData.setData("text/plain",V),G.preventDefault()}},g.getHighlightCountryIndex=function(G){var V=g.state.highlightCountryIndex+G;return V<0||V>=g.state.onlyCountries.length+g.state.preferredCountries.length?V-G:g.props.enableSearch&&V>g.getSearchFilteredCountries().length?0:V},g.searchCountry=function(){var G=g.getProbableCandidate(g.state.queryString)||g.state.onlyCountries[0],V=g.state.onlyCountries.findIndex(function(z){return z==G})+g.state.preferredCountries.length;g.scrollTo(g.getElement(V),!0),g.setState({queryString:"",highlightCountryIndex:V})},g.handleKeydown=function(G){var V=g.props.keys,z=G.target.className;if(z.includes("selected-flag")&&G.which===V.ENTER&&!g.state.showDropdown)return g.handleFlagDropdownClick(G);if(z.includes("form-control")&&(G.which===V.ENTER||G.which===V.ESC))return G.target.blur();if(g.state.showDropdown&&!g.props.disabled&&(!z.includes("search-box")||G.which===V.UP||G.which===V.DOWN||G.which===V.ENTER||G.which===V.ESC&&G.target.value==="")){G.preventDefault?G.preventDefault():G.returnValue=!1;var q=function(ne){g.setState({highlightCountryIndex:g.getHighlightCountryIndex(ne)},function(){g.scrollTo(g.getElement(g.state.highlightCountryIndex),!0)})};switch(G.which){case V.DOWN:q(1);break;case V.UP:q(-1);break;case V.ENTER:g.props.enableSearch?g.handleFlagItemClick(g.getSearchFilteredCountries()[g.state.highlightCountryIndex]||g.getSearchFilteredCountries()[0],G):g.handleFlagItemClick([].concat(o(g.state.preferredCountries),o(g.state.onlyCountries))[g.state.highlightCountryIndex],G);break;case V.ESC:case V.TAB:g.setState({showDropdown:!1},g.cursorToEnd);break;default:(G.which>=V.A&&G.which<=V.Z||G.which===V.SPACE)&&g.setState({queryString:g.state.queryString+String.fromCharCode(G.which)},g.state.debouncedQueryStingSearcher)}}},g.handleInputKeyDown=function(G){var V=g.props,z=V.keys,q=V.onEnterKeyPress,ne=V.onKeyDown;G.which===z.ENTER&&q&&q(G),ne&&ne(G)},g.handleClickOutside=function(G){g.dropdownRef&&!g.dropdownContainerRef.contains(G.target)&&g.state.showDropdown&&g.setState({showDropdown:!1})},g.handleSearchChange=function(G){var V=G.currentTarget.value,z=g.state,q=z.preferredCountries,ne=z.selectedCountry,me=0;if(V===""&&ne){var he=g.state.onlyCountries;me=g.concatPreferredCountries(q,he).findIndex(function(Ge){return Ge==ne}),setTimeout(function(){return g.scrollTo(g.getElement(me))},100)}g.setState({searchValue:V,highlightCountryIndex:me})},g.concatPreferredCountries=function(G,V){return G.length>0?o(new Set(G.concat(V))):V},g.getDropdownCountryName=function(G){return G.localName||G.name},g.getSearchFilteredCountries=function(){var G=g.state,V=G.preferredCountries,z=G.onlyCountries,q=G.searchValue,ne=g.props.enableSearch,me=g.concatPreferredCountries(V,z),he=q.trim().toLowerCase().replace("+","");if(ne&&he){if(/^\d+$/.test(he))return me.filter(function(ie){var Ce=ie.dialCode;return["".concat(Ce)].some(function(te){return te.toLowerCase().includes(he)})});var Ge=me.filter(function(ie){var Ce=ie.iso2;return["".concat(Ce)].some(function(te){return te.toLowerCase().includes(he)})}),ee=me.filter(function(ie){var Ce=ie.name,te=ie.localName;return ie.iso2,["".concat(Ce),"".concat(te||"")].some(function(re){return re.toLowerCase().includes(he)})});return g.scrollToTop(),o(new Set([].concat(Ge,ee)))}return me},g.getCountryDropdownList=function(){var G=g.state,V=G.preferredCountries,z=G.highlightCountryIndex,q=G.showDropdown,ne=G.searchValue,me=g.props,he=me.disableDropdown,Ge=me.prefix,ee=g.props,ie=ee.enableSearch,Ce=ee.searchNotFound,te=ee.disableSearchIcon,re=ee.searchClass,ke=ee.searchStyle,nt=ee.searchPlaceholder,Je=ee.autocompleteSearch,at=g.getSearchFilteredCountries().map(function(ze,Gt){var kt=z===Gt,an=U()({country:!0,preferred:ze.iso2==="us"||ze.iso2==="gb",active:ze.iso2==="us",highlight:kt}),ht="flag ".concat(ze.iso2);return p.a.createElement("li",Object.assign({ref:function(Nt){return g["flag_no_".concat(Gt)]=Nt},key:"flag_no_".concat(Gt),"data-flag-key":"flag_no_".concat(Gt),className:an,"data-dial-code":"1",tabIndex:he?"-1":"0","data-country-code":ze.iso2,onClick:function(Nt){return g.handleFlagItemClick(ze,Nt)},role:"option"},kt?{"aria-selected":!0}:{}),p.a.createElement("div",{className:ht}),p.a.createElement("span",{className:"country-name"},g.getDropdownCountryName(ze)),p.a.createElement("span",{className:"dial-code"},ze.format?g.formatNumber(ze.dialCode,ze):Ge+ze.dialCode))}),lt=p.a.createElement("li",{key:"dashes",className:"divider"});V.length>0&&(!ie||ie&&!ne.trim())&&at.splice(V.length,0,lt);var vt=U()(a({"country-list":!0,hide:!q},g.props.dropdownClass,!0));return p.a.createElement("ul",{ref:function(ze){return!ie&&ze&&ze.focus(),g.dropdownRef=ze},className:vt,style:g.props.dropdownStyle,role:"listbox",tabIndex:"0"},ie&&p.a.createElement("li",{className:U()(a({search:!0},re,re))},!te&&p.a.createElement("span",{className:U()(a({"search-emoji":!0},"".concat(re,"-emoji"),re)),role:"img","aria-label":"Magnifying glass"},"🔎"),p.a.createElement("input",{className:U()(a({"search-box":!0},"".concat(re,"-box"),re)),style:ke,type:"search",placeholder:nt,autoFocus:!0,autoComplete:Je?"on":"off",value:ne,onChange:g.handleSearchChange})),at.length>0?at:p.a.createElement("li",{className:"no-entries-message"},p.a.createElement("span",null,Ce)))};var ce,le=new de(k.enableAreaCodes,k.enableTerritories,k.regions,k.onlyCountries,k.preferredCountries,k.excludeCountries,k.preserveOrder,k.masks,k.priority,k.areaCodes,k.localization,k.prefix,k.defaultMask,k.alwaysDefaultMask),oe=le.onlyCountries,ye=le.preferredCountries,Ee=le.hiddenAreaCodes,Ne=k.value?k.value.replace(/\D/g,""):"";ce=k.disableInitialCountryGuess?0:Ne.length>1?g.guessSelectedCountry(Ne.substring(0,6),k.country,oe,Ee)||0:k.country&&oe.find(function(G){return G.iso2==k.country})||0;var X,Be=Ne.length<2&&ce&&!F()(Ne,ce.dialCode)?ce.dialCode:"";X=Ne===""&&ce===0?"":g.formatNumber((k.disableCountryCode?"":Be)+Ne,ce.name?ce:void 0);var we=oe.findIndex(function(G){return G==ce});return g.state={showDropdown:k.showDropdown,formattedNumber:X,onlyCountries:oe,preferredCountries:ye,hiddenAreaCodes:Ee,selectedCountry:ce,highlightCountryIndex:we,queryString:"",freezeSelection:!1,debouncedQueryStingSearcher:S()(g.searchCountry,250),searchValue:""},g}var H,K;return function(k,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function");k.prototype=Object.create(g&&g.prototype,{constructor:{value:k,writable:!0,configurable:!0}}),g&&y(k,g)}(W,D),H=W,(K=[{key:"componentDidMount",value:function(){document.addEventListener&&this.props.enableClickOutside&&document.addEventListener("mousedown",this.handleClickOutside),this.props.onMount&&this.props.onMount(this.state.formattedNumber.replace(/[^0-9]+/g,""),this.getCountryData(),this.state.formattedNumber)}},{key:"componentWillUnmount",value:function(){document.removeEventListener&&this.props.enableClickOutside&&document.removeEventListener("mousedown",this.handleClickOutside)}},{key:"componentDidUpdate",value:function(k,g,ce){k.country!==this.props.country?this.updateCountry(this.props.country):k.value!==this.props.value&&this.updateFormattedNumber(this.props.value)}},{key:"updateFormattedNumber",value:function(k){if(k===null)return this.setState({selectedCountry:0,formattedNumber:""});var g=this.state,ce=g.onlyCountries,le=g.selectedCountry,oe=g.hiddenAreaCodes,ye=this.props,Ee=ye.country,Ne=ye.prefix;if(k==="")return this.setState({selectedCountry:le,formattedNumber:""});var X,Be,we=k.replace(/\D/g,"");if(le&&F()(k,Ne+le.dialCode))Be=this.formatNumber(we,le),this.setState({formattedNumber:Be});else{var G=(X=this.props.disableCountryGuess?le:this.guessSelectedCountry(we.substring(0,6),Ee,ce,oe)||le)&&F()(we,Ne+X.dialCode)?X.dialCode:"";Be=this.formatNumber((this.props.disableCountryCode?"":G)+we,X||void 0),this.setState({selectedCountry:X,formattedNumber:Be})}}},{key:"render",value:function(){var k,g,ce,le=this,oe=this.state,ye=oe.onlyCountries,Ee=oe.selectedCountry,Ne=oe.showDropdown,X=oe.formattedNumber,Be=oe.hiddenAreaCodes,we=this.props,G=we.disableDropdown,V=we.renderStringAsFlag,z=we.isValid,q=we.defaultErrorMessage,ne=we.specialLabel;if(typeof z=="boolean")g=z;else{var me=z(X.replace(/\D/g,""),Ee,ye,Be);typeof me=="boolean"?(g=me)===!1&&(ce=q):(g=!1,ce=me)}var he=U()((a(k={},this.props.containerClass,!0),a(k,"react-tel-input",!0),k)),Ge=U()({arrow:!0,up:Ne}),ee=U()(a({"form-control":!0,"invalid-number":!g,open:Ne},this.props.inputClass,!0)),ie=U()({"selected-flag":!0,open:Ne}),Ce=U()(a({"flag-dropdown":!0,"invalid-number":!g,open:Ne},this.props.buttonClass,!0)),te="flag ".concat(Ee&&Ee.iso2);return p.a.createElement("div",{className:"".concat(he," ").concat(this.props.className),style:this.props.style||this.props.containerStyle,onKeyDown:this.handleKeydown},ne&&p.a.createElement("div",{className:"special-label"},ne),ce&&p.a.createElement("div",{className:"invalid-number-message"},ce),p.a.createElement("input",Object.assign({className:ee,style:this.props.inputStyle,onChange:this.handleInput,onClick:this.handleInputClick,onDoubleClick:this.handleDoubleClick,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,onCopy:this.handleInputCopy,value:X,onKeyDown:this.handleInputKeyDown,placeholder:this.props.placeholder,disabled:this.props.disabled,type:"tel"},this.props.inputProps,{ref:function(re){le.numberInputRef=re,typeof le.props.inputProps.ref=="function"?le.props.inputProps.ref(re):typeof le.props.inputProps.ref=="object"&&(le.props.inputProps.ref.current=re)}})),p.a.createElement("div",{className:Ce,style:this.props.buttonStyle,ref:function(re){return le.dropdownContainerRef=re}},V?p.a.createElement("div",{className:ie},V):p.a.createElement("div",{onClick:G?void 0:this.handleFlagDropdownClick,className:ie,title:Ee?"".concat(Ee.localName||Ee.name,": + ").concat(Ee.dialCode):"",tabIndex:G?"-1":"0",role:"button","aria-haspopup":"listbox","aria-expanded":!!Ne||void 0},p.a.createElement("div",{className:te},!G&&p.a.createElement("div",{className:Ge}))),Ne&&this.getCountryDropdownList()))}}])&&u(H.prototype,K),W}(p.a.Component);Se.defaultProps={country:"",value:"",onlyCountries:[],preferredCountries:[],excludeCountries:[],placeholder:"1 (702) 123-4567",searchPlaceholder:"search",searchNotFound:"No entries to show",flagsImagePath:"./flags.png",disabled:!1,containerStyle:{},inputStyle:{},buttonStyle:{},dropdownStyle:{},searchStyle:{},containerClass:"",inputClass:"",buttonClass:"",dropdownClass:"",searchClass:"",className:"",autoFormat:!0,enableAreaCodes:!1,enableTerritories:!1,disableCountryCode:!1,disableDropdown:!1,enableLongNumbers:!1,countryCodeEditable:!0,enableSearch:!1,disableSearchIcon:!1,disableInitialCountryGuess:!1,disableCountryGuess:!1,regions:"",inputProps:{},localization:{},masks:null,priority:null,areaCodes:null,preserveOrder:[],defaultMask:"... ... ... ... ..",alwaysDefaultMask:!1,prefix:"+",copyNumbersOnly:!0,renderStringAsFlag:"",autocompleteSearch:!1,jumpCursorToEnd:!0,enableAreaCodeStretch:!1,enableClickOutside:!0,showDropdown:!1,isValid:!0,defaultErrorMessage:"",specialLabel:"Phone",onEnterKeyPress:null,keys:{UP:38,DOWN:40,RIGHT:39,LEFT:37,ENTER:13,ESC:27,PLUS:43,A:65,Z:90,SPACE:32,TAB:9}},t.default=Se}]);const Cg=_s(yg),Bs=({value:e,onChange:t,error:r,onBlur:a,id:n,name:o,required:s,defaultCountry:l="us",className:i,responsive:u=!1,enableSearch:c=!0,autoComplete:d})=>{const m=(A,y)=>{t("+"+A,y.countryCode)};return b.jsxs("div",{className:i,children:[b.jsx("div",{className:Oe("movmo-phone-input flex items-center px-3.5 py-0 h-10 rounded-lg border",u&&"movmo-phone-input-responsive",r?"border-error-500 focus:ring-error-500":"border-grayWarm-300 focus-within:ring-2 focus-within:ring-grayWarm-950"),children:b.jsx(Cg,{country:l,value:e.replace("+",""),onChange:m,inputProps:{onBlur:a,required:s,id:n,name:o,...d&&{autoComplete:d}},enableSearch:c,autoFormat:!0})}),r&&b.jsx("p",{className:"text-error-500 text-xs mt-1",children:r})]})};function Zt(e){if(e)try{e.focus()}catch(t){if(t instanceof DOMException&&t.name==="SecurityError")return;throw t}}const Vs=({email:e,phone:t,otpLength:r,otpAction:a,onVerify:n,onClose:o,externalError:s,externalErrorVariant:l="error",disabled:i=!1,title:u,description:c,onOtpChange:d})=>{const[m,A]=P.useState("".padStart(r,"")),[y,C]=P.useState(null),p=P.useRef(null),I=(h,T)=>{if(i||!/^\d*$/.test(h))return;const O=m.split("");O[T]=h.slice(-1);const F=O.join("");A(F),d==null||d(F),y&&C(null),h&&T<r-1&&Zt(document.getElementById(`otp-input-${T+1}`))},S=h=>{if(i)return;h.preventDefault();const O=h.clipboardData.getData("text/plain").replace(/\D/g,"");if(O.length>0){const F=m.split("");for(let Z=0;Z<Math.min(O.length,r);Z++)F[Z]=O[Z];const Q=F.join("");A(Q),d==null||d(Q),y&&C(null);const U=F.findIndex(Z=>Z===""),ue=U!==-1?U:r-1;Zt(document.getElementById(`otp-input-${ue}`))}},R=h=>{if(i)return;const T=m.split("");T[h]="";const O=T.join("");A(O),d==null||d(O),h>0&&Zt(document.getElementById(`otp-input-${h-1}`))};P.useEffect(()=>{if(i)return;if(!(m.length===r&&!m.includes(" ")&&m.trim().length===r)){p.current=null;return}p.current!==m&&(p.current=m,n(m))},[m,r,n,i]),P.useEffect(()=>{const h=T=>{T.key==="Escape"&&o()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[o]);const E=l==="warning"?"text-warning-700":"text-error-500";return b.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center z-[110] px-4",children:b.jsxs(Kr,{className:"w-full max-w-[400px] rounded-lg bg-white",children:[b.jsx(qr,{className:"p-4 border-b border-grayWarm-200",children:b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("button",{onClick:o,className:"w-8 h-8 flex items-center justify-center bg-grayWarm-100 hover:bg-grayWarm-200 rounded-lg transition-colors","aria-label":"Close modal",children:b.jsx("svg",{className:"w-4 h-4 text-grayWarm-600",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),b.jsx("h2",{className:"text-xl md:text-lg font-bold text-center flex-1",children:u||"Verify Account"}),b.jsx("div",{className:"w-8"})]})}),b.jsxs(ea,{className:"p-4 text-center",children:[b.jsxs("div",{className:"text-center mb-3",children:[b.jsx("p",{className:"text-sm md:text-md text-grayWarm-600",children:c||`Enter the ${r}-digit code we sent to`}),!c&&b.jsx("p",{className:"text-sm md:text-md text-grayWarm-600 mt-1",children:a===et.OTPAction.EMAILED?e:t})]}),b.jsx("div",{className:"flex justify-center gap-1.5 sm:gap-2 mb-6",children:Array.from({length:r}).map((h,T)=>b.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",maxLength:1,disabled:i,className:`w-full max-w-10 h-16 border border-grayWarm-300 shadow-xs rounded-md text-center text-lg focus:outline-none focus:ring-2 focus:ring-grayWarm-950${i?" bg-grayWarm-100 text-grayWarm-400 cursor-not-allowed":""}`,value:m[T]||"",onChange:O=>I(O.target.value,T),onPaste:S,id:`otp-input-${T}`,"data-testid":`otp-input-${T}`,onKeyDown:O=>{O.key==="Backspace"&&R(T)}},T))}),(y||s)&&b.jsx("p",{className:`${E} text-center text-sm mb-4`,children:s||y})]})]})})},js=e=>/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/.test(e),Ig={us:{dialCode:"1",lengths:[10]},ca:{dialCode:"1",lengths:[10]},gb:{dialCode:"44",lengths:[10]},au:{dialCode:"61",lengths:[9]},de:{dialCode:"49",lengths:[10,11]},fr:{dialCode:"33",lengths:[9]},it:{dialCode:"39",lengths:[9,10]},es:{dialCode:"34",lengths:[9]},jp:{dialCode:"81",lengths:[10,11]},kr:{dialCode:"82",lengths:[10,11]},in:{dialCode:"91",lengths:[10]},br:{dialCode:"55",lengths:[10,11]},mx:{dialCode:"52",lengths:[10]},cn:{dialCode:"86",lengths:[11]}};function Ur(e,t){if(!e||!e.startsWith("+"))return!1;const r=e.slice(1);if(!/^\d+$/.test(r))return!1;if(t){const a=Ig[t.toLowerCase()];if(a){if(!r.startsWith(a.dialCode))return!1;const n=r.slice(a.dialCode.length);return a.lengths.includes(n.length)}}return r.length>=7&&r.length<=15}const xg=e=>{var r;return typeof e!="object"||e===null?!1:((r=e.response)==null?void 0:r.status)===429},Ag=e=>{var r;if(typeof e!="object"||e===null)return"Something went wrong. Please try again.";const t=(r=e.response)==null?void 0:r.status;return t===400?"Invalid or expired code. Please check and try again, or close to request a new one.":t===401?"Your session has expired. Please close and try again.":"Something went wrong. Please try again."},Sg=({isOpen:e,onClose:t,loginUser:r,verifyOTP:a,getCurrentUser:n,onLoginSuccess:o,hideCloseButton:s=!1,showPhone:l=!1,isRateLimitError:i=xg})=>{const u=l,[c,d]=P.useState(""),[m,A]=P.useState(null),[y,C]=P.useState(""),[p,I]=P.useState(null),[S,R]=P.useState(!1),[E,h]=P.useState(null),[T,O]=P.useState(6),[F,Q]=P.useState(null),[U,ue]=P.useState(!1),[Z,pe]=P.useState(""),[N,M]=P.useState(et.OTPAction.EMAILED),[j,Y]=P.useState("us"),[de,Se]=P.useState(!1),[D,W]=P.useState(null),[H,K]=P.useState(null),[k,g]=P.useState(null),ce=P.useRef(null),le=P.useRef(null),oe=P.useRef(null),ye=P.useRef(!1);P.useEffect(()=>{de&&Zt(ce.current)},[de]),P.useEffect(()=>{k&&Zt(le.current)},[k]),P.useEffect(()=>{e&&!S&&Zt(oe.current)},[e,S]);const Ee=z=>{const q=z.target.value;d(q),m&&A(null),k&&g(null)},Ne=(z,q)=>{C(z),Y(q),p&&I(null),k&&g(null)},X=()=>{y&&!Ur(y,j)&&I("Please enter a valid phone number")},Be=async()=>{let z=!1;if((!c||!js(c))&&(A("Please enter a valid email address"),z=!0),u&&!Ur(y,j)&&(I("Please enter a valid phone number"),z=!0),!z){ue(!0);try{const q=await r(c,y,et.AuthenticationUsernameType.EMAIL);if(h(q.session),pe(q.username||c),q.challengeName){const ne=q.challengeName===et.AuthenticationChallengeName.SMS_OTP||q.challengeName===et.AuthenticationChallengeName.EMAIL_OTP;O(ne?8:6),Q(q.challengeName),M(q.challengeName===et.AuthenticationChallengeName.SMS_OTP?et.OTPAction.TEXTED:et.OTPAction.EMAILED)}R(!0),t()}catch(q){console.error("Error sending OTP:",q),i(q)?Se(!0):g("We couldn't reach our sign-in service. Please try again.")}finally{ue(!1)}}},we=async z=>{if(!E)return;ye.current=!1;try{await a(Z,z,E,F)}catch(ne){if(ye.current)return;console.error("Error verifying OTP:",ne),i(ne)?W("Too many attempts. Please close this and try again in a few minutes."):K(Ag(ne));return}if(ye.current)return;let q;try{q=await n()}catch(ne){if(ye.current)return;console.error("Error fetching current user after OTP verify:",ne),K("Verified, but we could not load your account. Please try again.");return}ye.current||(o(q),R(!1),d(""),pe(""),h(null),O(6),M(et.OTPAction.EMAILED),Q(null))},G=()=>{ye.current=!0,R(!1),d(""),pe(""),C(""),I(null),h(null),O(6),M(et.OTPAction.EMAILED),Q(null),W(null),K(null)},V=()=>{A(null),I(null),Se(!1),W(null),K(null),g(null),S||(d(""),C("")),t()};return b.jsxs(b.Fragment,{children:[b.jsx(br,{isOpen:e&&!S,onClose:V,title:"Sign in to Movmo",maxWidthPx:398,hideCloseButton:s,allowOverflow:!0,children:de?b.jsxs("div",{ref:ce,role:"alert","aria-live":"assertive",tabIndex:-1,className:"rounded-lg bg-warning-50 border border-warning-200 p-4 focus:outline-none",children:[b.jsxs("div",{className:"flex items-start gap-2",children:[b.jsxs("svg",{className:"w-5 h-5 text-warning-700 flex-shrink-0 mt-0.5",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[b.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),b.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),b.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),b.jsxs("div",{children:[b.jsx("p",{className:"text-sm font-semibold text-warning-700",children:"Too many attempts"}),b.jsx("p",{className:"text-sm text-grayWarm-600 mt-1",children:"You've hit a temporary limit. Please wait a few minutes and try again."})]})]}),b.jsx("button",{type:"button",onClick:V,className:"mt-4 w-full py-3 px-4 bg-grayWarm-100 hover:bg-grayWarm-200 text-grayWarm-950 font-semibold rounded-lg transition-all",children:"Got it"})]}):b.jsxs("form",{onSubmit:z=>{z.preventDefault(),Be()},className:"space-y-4",children:[b.jsxs("div",{children:[b.jsx(At,{id:"sign-in-email",type:"email",placeholder:"Email",required:!0,value:c,onChange:Ee,className:`w-full ${m?"border-error-500 focus:ring-error-500":""} autofill:bg-white autofill:shadow-[inset_0_0_0px_1000px_white]`,ref:oe}),m&&b.jsx("p",{className:"text-error-500 text-xs mt-1",children:m})]}),u&&b.jsx(Bs,{value:y,onChange:Ne,onBlur:X,error:p,required:!0,id:"sign-in-phone",name:"sign-in-phone"}),k&&b.jsxs("div",{ref:le,role:"alert","aria-live":"assertive",tabIndex:-1,className:"rounded-lg bg-error-50 border border-error-200 p-3 flex items-start gap-2 focus:outline-none",children:[b.jsxs("svg",{className:"w-4 h-4 text-error-700 mt-0.5 flex-shrink-0",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[b.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:2}),b.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),b.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),b.jsxs("div",{children:[b.jsx("p",{className:"text-sm font-semibold text-error-700",children:"Sign-in failed"}),b.jsx("p",{className:"text-sm text-grayWarm-600",children:k})]})]}),b.jsx("button",{type:"submit",disabled:U,className:"w-full py-3 px-4 bg-gradient-to-r from-[#E91E63] to-[#E91E63] hover:from-[#D81B60] hover:to-[#D81B60] text-white font-semibold rounded-lg transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:U?"Loading...":"Continue"})]})}),S&&b.jsx(Vs,{email:c,phone:y,otpLength:T,otpAction:N,onVerify:we,onClose:G,externalError:D??H??void 0,externalErrorVariant:D?"warning":"error",disabled:D!==null,onOtpChange:()=>K(null)})]})},Eg=new RegExp("^[\\p{L} '-]{2,100}$","u");function wg(e){return Eg.test(e)?{isValid:!0}:{isValid:!1,message:"must contain only letters, spaces, hyphens, and apostrophes (2-100 characters)"}}exports.Avatar=Hi;exports.AvatarFallback=Yi;exports.AvatarImage=zi;exports.Badge=Bi;exports.Button=wo;exports.COUNTRY_OPTIONS=Jr;exports.CURRENCY_OPTIONS=vr;exports.Card=Kr;exports.CardContent=ea;exports.CardDescription=Fo;exports.CardFooter=Bo;exports.CardHeader=qr;exports.CardTitle=Mo;exports.Checkbox=Fi;exports.Chip=Cs;exports.CurrencyModal=hg;exports.DEFAULT_LOCALE=Ms;exports.DateDropdowns=Yr;exports.IconButton=Vi;exports.Input=At;exports.LOCALE_OPTIONS=mr;exports.LOCALE_STORAGE_KEY=dg;exports.LocaleModal=bg;exports.Modal=br;exports.OTPModal=Vs;exports.Pagination=hs;exports.PassengerForm=sg;exports.PassengerFormSkeleton=cg;exports.PhoneInput=Bs;exports.SearchInput=ys;exports.SelectDropdown=In;exports.Separator=Oo;exports.SignInModal=Sg;exports.Textarea=vs;exports.Toggle=qi;exports.ToggleGroup=bs;exports.ToggleGroupItem=ms;exports.findCurrencyOption=vg;exports.findLocaleOption=fg;exports.getCurrencyDisplayText=Fs;exports.getLanguageDisplayName=pg;exports.safeFocus=Zt;exports.validateEmail=js;exports.validateName=wg;exports.validatePhoneNumber=Ur;
115
- //# sourceMappingURL=index.cjs.js.map
115
+ //# sourceMappingURL=index.cjs.map