@ozdao/prometheus-framework 0.0.92 → 0.0.93
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Feed-530e40ab.mjs +428 -0
- package/dist/Feed-c25dc839.js +1 -0
- package/dist/Product-a23f852f.js +7 -0
- package/dist/Product-c085f00f.mjs +838 -0
- package/dist/ProductEdit-171c9923.js +1 -0
- package/dist/ProductEdit-23d35d67.mjs +350 -0
- package/dist/ProfileBlogposts-5382274b.mjs +64 -0
- package/dist/ProfileBlogposts-a2d04221.js +1 -0
- package/dist/ProfileComments-06985576.mjs +44 -0
- package/dist/ProfileComments-db4b6fbc.js +1 -0
- package/dist/ProfileLikes-3c5c02be.mjs +44 -0
- package/dist/ProfileLikes-553c52df.js +1 -0
- package/dist/auth.client.cjs +1 -1
- package/dist/auth.client.js +86 -91
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +2 -2
- package/dist/organizations.client-21cfcf36.mjs +3038 -0
- package/dist/organizations.client-6947e530.js +3 -0
- package/dist/organizations.client.cjs +1 -1
- package/dist/organizations.client.js +2 -2
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +3 -3
- package/package.json +1 -1
- package/src/modules/auth/components/pages/SignIn.vue +3 -3
- package/src/modules/community/components/sections/Feed.vue +1 -1
package/dist/auth.client.cjs
CHANGED
@@ -5,4 +5,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
5
5
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sn(e,n){if(e){if(typeof e=="string")return be(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return be(e,n)}}function be(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,d=new Array(n);t<n;t++)d[t]=e[t];return d}function _e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(e);n&&(d=d.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,d)}return t}function Ce(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?_e(Object(t),!0).forEach(function(d){ln(e,d,t[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_e(Object(t)).forEach(function(d){Object.defineProperty(e,d,Object.getOwnPropertyDescriptor(t,d))})}return e}function ln(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var we={formatExtension:function(n,t,d){return"".concat(n).concat(d.ext()).concat(t)}};function un(e,n,t,d){if(t?t=Ce(Ce({},we),t):t=we,d=new v(d),e.country&&e.country!=="001"){if(!d.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));d.country(e.country)}else if(e.countryCallingCode)d.selectNumberingPlan(e.countryCallingCode);else return e.phone||"";var o=d.countryCallingCode(),i=t.v2?e.nationalNumber:e.phone,a;switch(n){case"NATIONAL":return i?(a=x(i,e.carrierCode,"NATIONAL",d,t),j(a,e.ext,d,t.formatExtension)):"";case"INTERNATIONAL":return i?(a=x(i,null,"INTERNATIONAL",d,t),a="+".concat(o," ").concat(a),j(a,e.ext,d,t.formatExtension)):"+".concat(o);case"E.164":return"+".concat(o).concat(i);case"RFC3966":return on({number:"+".concat(o).concat(i),ext:e.ext});case"IDD":if(!t.fromCountry)return;var s=cn(i,e.carrierCode,o,t.fromCountry,d);return j(s,e.ext,d,t.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(n,'"'))}}function x(e,n,t,d,o){var i=$n(d.formats(),e);return i?nn(e,i,{useInternationalFormat:t==="INTERNATIONAL",withNationalPrefix:!(i.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&o&&o.nationalPrefix===!1),carrierCode:n,metadata:d}):e}function $n(e,n){for(var t=an(e),d;!(d=t()).done;){var o=d.value;if(o.leadingDigitsPatterns().length>0){var i=o.leadingDigitsPatterns()[o.leadingDigitsPatterns().length-1];if(n.search(i)!==0)continue}if(N(n,o.pattern()))return o}}function j(e,n,t,d){return n?d(e,n,t):e}function cn(e,n,t,d,o){var i=Q(d,o.metadata);if(i===t){var a=x(e,n,"NATIONAL",o);return t==="1"?t+" "+a:a}var s=rn(d,void 0,o.metadata);if(s)return"".concat(s," ").concat(t," ").concat(x(e,null,"INTERNATIONAL",o))}function Pe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(e);n&&(d=d.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,d)}return t}function Ne(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?Pe(Object(t),!0).forEach(function(d){fn(e,d,t[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Pe(Object(t)).forEach(function(d){Object.defineProperty(e,d,Object.getOwnPropertyDescriptor(t,d))})}return e}function fn(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function pn(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Oe(e,n){for(var t=0;t<n.length;t++){var d=n[t];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(e,d.key,d)}}function mn(e,n,t){return n&&Oe(e.prototype,n),t&&Oe(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var hn=function(){function e(n,t,d){if(pn(this,e),!n)throw new TypeError("`country` or `countryCallingCode` not passed");if(!t)throw new TypeError("`nationalNumber` not passed");if(!d)throw new TypeError("`metadata` not passed");var o=gn(n,d),i=o.country,a=o.countryCallingCode;this.country=i,this.countryCallingCode=a,this.nationalNumber=t,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return d}}return mn(e,[{key:"setExt",value:function(t){this.ext=t}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:Jt(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return Wt(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return Zt(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){var t=new v(this.getMetadata());return t.isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(t){return this.number===t.number&&this.ext===t.ext}},{key:"getType",value:function(){return te(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(t,d){return un(this,t,d?Ne(Ne({},d),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(t){return this.format("NATIONAL",t)}},{key:"formatInternational",value:function(t){return this.format("INTERNATIONAL",t)}},{key:"getURI",value:function(t){return this.format("RFC3966",t)}}]),e}(),yn=function(n){return/^[A-Z]{2}$/.test(n)};function gn(e,n){var t,d,o=new v(n);return yn(e)?(t=e,o.selectNumberingPlan(t),d=o.countryCallingCode()):d=e,{country:t,countryCallingCode:d}}var vn=new RegExp("(["+_+"])");function bn(e,n,t,d){if(n){var o=new v(d);o.selectNumberingPlan(n,t);var i=new RegExp(o.IDDPrefix());if(e.search(i)===0){e=e.slice(e.match(i)[0].length);var a=e.match(vn);if(!(a&&a[1]!=null&&a[1].length>0&&a[1]==="0"))return e}}}function _n(e,n){if(e&&n.numberingPlan.nationalPrefixForParsing()){var t=new RegExp("^(?:"+n.numberingPlan.nationalPrefixForParsing()+")"),d=t.exec(e);if(d){var o,i,a=d.length-1,s=a>0&&d[a];if(n.nationalPrefixTransformRule()&&s)o=e.replace(t,n.nationalPrefixTransformRule()),a>1&&(i=d[1]);else{var $=d[0];o=e.slice($.length),s&&(i=d[1])}var l;if(s){var p=e.indexOf(d[1]),m=e.slice(0,p);m===n.numberingPlan.nationalPrefix()&&(l=n.numberingPlan.nationalPrefix())}else l=d[0];return{nationalNumber:o,nationalPrefix:l,carrierCode:i}}}return{nationalNumber:e}}function K(e,n){var t=_n(e,n),d=t.carrierCode,o=t.nationalNumber;if(o!==e){if(!Cn(e,o,n))return{nationalNumber:e};if(n.possibleLengths()&&!wn(o,n))return{nationalNumber:e}}return{nationalNumber:o,carrierCode:d}}function Cn(e,n,t){return!(N(e,t.nationalNumberPattern())&&!N(n,t.nationalNumberPattern()))}function wn(e,n){switch(ee(e,n)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}function Pn(e,n,t,d){var o=n?Q(n,d):t;if(e.indexOf(o)===0){d=new v(d),d.selectNumberingPlan(n,t);var i=e.slice(o.length),a=K(i,d),s=a.nationalNumber,$=K(e,d),l=$.nationalNumber;if(!N(l,d.nationalNumberPattern())&&N(s,d.nationalNumberPattern())||ee(l,d)==="TOO_LONG")return{countryCallingCode:o,number:i}}return{number:e}}function Nn(e,n,t,d){if(!e)return{};var o;if(e[0]!=="+"){var i=bn(e,n,t,d);if(i&&i!==e)o=!0,e="+"+i;else{if(n||t){var a=Pn(e,n,t,d),s=a.countryCallingCode,$=a.number;if(s)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:s,number:$}}return{number:e}}}if(e[1]==="0")return{};d=new v(d);for(var l=2;l-1<=pt&&l<=e.length;){var p=e.slice(1,l);if(d.hasCallingCode(p))return d.selectNumberingPlan(p),{countryCallingCodeSource:o?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:p,number:e.slice(l)};l++}return{}}function On(e,n){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=En(e))||n&&e&&typeof e.length=="number"){t&&(e=t);var d=0;return function(){return d>=e.length?{done:!0}:{done:!1,value:e[d++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
6
6
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function En(e,n){if(e){if(typeof e=="string")return Ee(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ee(e,n)}}function Ee(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,d=new Array(n);t<n;t++)d[t]=e[t];return d}function Sn(e,n){var t=n.countries,d=n.defaultCountry,o=n.metadata;o=new v(o);for(var i=[],a=On(t),s;!(s=a()).done;){var $=s.value;if(o.country($),o.leadingDigits()){if(e&&e.search(o.leadingDigits())===0)return $}else if(te({phone:e,country:$},void 0,o.metadata))if(d){if($===d)return $;i.push($)}else return $}if(i.length>0)return i[0]}var In=!1;function Tn(e,n){var t=n.nationalNumber,d=n.defaultCountry,o=n.metadata;if(In&&o.isNonGeographicCallingCode(e))return"001";var i=o.getCountryCodesForCallingCode(e);if(i)return i.length===1?i[0]:Sn(t,{countries:i,defaultCountry:d,metadata:o.metadata})}var qe="+",Fn="[\\-\\.\\(\\)]?",Se="(["+_+"]|"+Fn+")",An="^\\"+qe+Se+"*["+_+"]"+Se+"*$",Dn=new RegExp(An,"g"),W=_,kn="["+W+"]+((\\-)*["+W+"])*",Rn="a-zA-Z",xn="["+Rn+"]+((\\-)*["+W+"])*",Mn="^("+kn+"\\.)*"+xn+"\\.?$",zn=new RegExp(Mn,"g"),Ie="tel:",q=";phone-context=",Bn=";isub=";function Ln(e){var n=e.indexOf(q);if(n<0)return null;var t=n+q.length;if(t>=e.length)return"";var d=e.indexOf(";",t);return d>=0?e.substring(t,d):e.substring(t)}function Vn(e){return e===null?!0:e.length===0?!1:Dn.test(e)||zn.test(e)}function jn(e,n){var t=n.extractFormattedPhoneNumber,d=Ln(e);if(!Vn(d))throw new w("NOT_A_NUMBER");var o;if(d===null)o=t(e)||"";else{o="",d.charAt(0)===qe&&(o+=d);var i=e.indexOf(Ie),a;i>=0?a=i+Ie.length:a=0;var s=e.indexOf(q);o+=e.substring(a,s)}var $=o.indexOf(Bn);if($>0&&(o=o.substring(0,$)),o!=="")return o}var Un=250,Gn=new RegExp("["+J+_+"]"),Hn=new RegExp("[^"+_+"#]+$");function Kn(e,n,t){if(n=n||{},t=new v(t),n.defaultCountry&&!t.hasCountry(n.defaultCountry))throw n.v2?new w("INVALID_COUNTRY"):new Error("Unknown country: ".concat(n.defaultCountry));var d=qn(e,n.v2,n.extract),o=d.number,i=d.ext,a=d.error;if(!o){if(n.v2)throw a==="TOO_SHORT"?new w("TOO_SHORT"):new w("NOT_A_NUMBER");return{}}var s=Yn(o,n.defaultCountry,n.defaultCallingCode,t),$=s.country,l=s.nationalNumber,p=s.countryCallingCode,m=s.countryCallingCodeSource,c=s.carrierCode;if(!t.hasSelectedNumberingPlan()){if(n.v2)throw new w("INVALID_COUNTRY");return{}}if(!l||l.length<Z){if(n.v2)throw new w("TOO_SHORT");return{}}if(l.length>ft){if(n.v2)throw new w("TOO_LONG");return{}}if(n.v2){var f=new hn(p,l,t.metadata);return $&&(f.country=$),c&&(f.carrierCode=c),i&&(f.ext=i),f.__countryCallingCodeSource=m,f}var h=(n.extended?t.hasSelectedNumberingPlan():$)?N(l,t.nationalNumberPattern()):!1;return n.extended?{country:$,countryCallingCode:p,carrierCode:c,valid:h,possible:h?!0:!!(n.extended===!0&&t.possibleLengths()&&We(l,t)),phone:l,ext:i}:h?Xn($,l,i):{}}function Wn(e,n,t){if(e){if(e.length>Un){if(t)throw new w("TOO_LONG");return}if(n===!1)return e;var d=e.search(Gn);if(!(d<0))return e.slice(d).replace(Hn,"")}}function qn(e,n,t){var d=jn(e,{extractFormattedPhoneNumber:function(a){return Wn(a,t,n)}});if(!d)return{};if(!xt(d))return Mt(d)?{error:"TOO_SHORT"}:{};var o=zt(d);return o.ext?o:{number:d}}function Xn(e,n,t){var d={country:e,phone:n};return t&&(d.ext=t),d}function Yn(e,n,t,d){var o=Nn(ye(e),n,t,d.metadata),i=o.countryCallingCodeSource,a=o.countryCallingCode,s=o.number,$;if(a)d.selectNumberingPlan(a);else if(s&&(n||t))d.selectNumberingPlan(n,t),n&&($=n),a=t||Q(n,d.metadata);else return{};if(!s)return{countryCallingCodeSource:i,countryCallingCode:a};var l=K(ye(s),d),p=l.nationalNumber,m=l.carrierCode,c=Tn(a,{nationalNumber:p,defaultCountry:n,metadata:d});return c&&($=c,c==="001"||d.country($)),{country:$,countryCallingCode:a,countryCallingCodeSource:i,nationalNumber:p,carrierCode:m}}function Te(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(e);n&&(d=d.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,d)}return t}function Fe(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?Te(Object(t),!0).forEach(function(d){Zn(e,d,t[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Te(Object(t)).forEach(function(d){Object.defineProperty(e,d,Object.getOwnPropertyDescriptor(t,d))})}return e}function Zn(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Jn(e,n,t){return Kn(e,Fe(Fe({},n),{},{v2:!0}),t)}function X(e){"@babel/helpers - typeof";return X=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},X(e)}function Ae(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(e);n&&(d=d.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,d)}return t}function Qn(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?Ae(Object(t),!0).forEach(function(d){ed(e,d,t[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ae(Object(t)).forEach(function(d){Object.defineProperty(e,d,Object.getOwnPropertyDescriptor(t,d))})}return e}function ed(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function td(e,n){return od(e)||rd(e,n)||dd(e,n)||nd()}function nd(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
7
7
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dd(e,n){if(e){if(typeof e=="string")return De(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return De(e,n)}}function De(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,d=new Array(n);t<n;t++)d[t]=e[t];return d}function rd(e,n){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var d=[],o=!0,i=!1,a,s;try{for(t=t.call(e);!(o=(a=t.next()).done)&&(d.push(a.value),!(n&&d.length===n));o=!0);}catch($){i=!0,s=$}finally{try{!o&&t.return!=null&&t.return()}finally{if(i)throw s}}return d}}function od(e){if(Array.isArray(e))return e}function id(e){var n=Array.prototype.slice.call(e),t=td(n,4),d=t[0],o=t[1],i=t[2],a=t[3],s,$,l;if(typeof d=="string")s=d;else throw new TypeError("A text for parsing must be a string.");if(!o||typeof o=="string")a?($=i,l=a):($=void 0,l=i),o&&($=Qn({defaultCountry:o},$));else if(ad(o))i?($=o,l=i):l=o;else throw new Error("Invalid second argument: ".concat(o));return{text:s,options:$,metadata:l}}var ad=function(n){return X(n)==="object"};function ke(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(e);n&&(d=d.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,d)}return t}function Re(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?ke(Object(t),!0).forEach(function(d){sd(e,d,t[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ke(Object(t)).forEach(function(d){Object.defineProperty(e,d,Object.getOwnPropertyDescriptor(t,d))})}return e}function sd(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ld(e,n,t){n&&n.defaultCountry&&!It(n.defaultCountry,t)&&(n=Re(Re({},n),{},{defaultCountry:void 0}));try{return Jn(e,n,t)}catch(d){if(!(d instanceof w))throw d}}function ud(){var e=id(arguments),n=e.text,t=e.options,d=e.metadata;return ld(n,t,d)}function U(){return it(ud,arguments)}const $d={class:"cols-2-1_2 gap-small pd-small bg-white"},cd=r.createElementVNode("section",{class:"w-100 desktop-only o-hidden radius-big bg-grad-main"},null,-1),Xe={__name:"Auth",setup(e){return r.ref(null),r.ref(null),r.ref(null),b.useRoute(),b.useRouter(),r.ref("email"),(n,t)=>{const d=r.resolveComponent("router-view");return r.openBlock(),r.createElementBlock("div",$d,[r.createVNode(d,{class:"pd-medium br-solid br-1px br-grey radius-big w-m-66r t-center"},{default:r.withCtx(({Component:o,route:i})=>[r.createVNode(r.Transition,{name:"scaleIn",mode:"out-in"},{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(o),{ref:"page",key:i.path,localPosition:n.localPosition},null,8,["localPosition"]))]),_:2},1024)]),_:1}),cd])}}};function xe(e){const n=e;n.__i18n=n.__i18n||[],n.__i18n.push({locale:"",resource:{en:{verifyNumberTitle:t=>{const{normalize:d}=t;return d(["Verify Number"])},instructions:t=>{const{normalize:d}=t;return d(["We have sent a registration code to your phone number. Please enter it in the field below:"])},resendCode:t=>{const{normalize:d}=t;return d(["Send the code again"])},secondsResend:t=>{const{normalize:d}=t;return d(["seconds to the possibility of sending the code again."])}},ru:{verifyNumberTitle:t=>{const{normalize:d}=t;return d(["Подтвердите номер"])},instructions:t=>{const{normalize:d}=t;return d(["Мы отправили код регистрации на ваш номер телефона. Введите его в поле ниже:"])},resendCode:t=>{const{normalize:d}=t;return d(["Отправить код еще раз"])},secondsResend:t=>{const{normalize:d}=t;return d(["секунд до возможности отправить код еще раз."])}}}})}const fd={class:"t-center pd-medium"},pd={class:"mn-medium"},md={class:"mn-big t-transp"},hd={class:"w-100 mn-big flex-nowrap flex"},yd={key:1},ne={__name:"EnterCode",setup(e){const n=b.useRoute(),t=b.useRouter(),{t:d}=I.useI18n({inheritLocale:!0,useScope:"local"}),o=r.reactive({digits:["","","",""],error:null}),i=r.ref(null),a=r.ref(0);async function s(){try{await u.sendCode(u.state.user,n.query.type,u.state.user.phone?"phone":"email"),a.value=30;const m=setInterval(()=>{a.value>0?a.value-=1:clearInterval(m)},1e3)}catch{O.setError({response:{data:{errorCode:"CODE_NOT_SENT"}}})}}const $=(m,c)=>{m.preventDefault();const f=m.clipboardData.getData("text/plain");if(/^\d{4}$/.test(f)){for(let h=0;h<4;h++)o.digits[c+h]=f[h];p(c+3)}else O.setError({response:{data:{errorCode:"INPUT_ERROR"}}})},l=(m,c)=>{if(m.key==="Backspace"&&(o.digits[c]===null||o.digits[c]===void 0||o.digits[c]==="")){m.preventDefault();const f=document.querySelectorAll("input"),h=c>0?f[c-1]:null;h&&(h.focus(),h.setSelectionRange(h.value.length,h.value.length))}},p=m=>{const c=document.querySelectorAll("input"),f=c[m+1],h=m>0?c[m-1]:null;if(o.digits[m]!==""&&o.digits[m]!==null&&o.digits[m]!==void 0&&m<4&&(m<3?f.focus():i.value.focus()),(o.digits[m]===null||o.digits[m]===void 0||o.digits[m]==="")&&m>0&&h.focus(),o.digits.every(T=>T!=="")){const T=o.digits.join(""),B=u.state$1.code.code.toString();T===B?(u.state$1.code.isValid=!0,t.push({path:"/auth/enter-password",query:{type:u.state$1.code.type,method:n.query.method}})):(O.setError({response:{data:{errorCode:"WRONG_CODE"}}}),i.value.focus(),o.digits=["","","",""])}};return(m,c)=>(r.openBlock(),r.createElementBlock("section",fd,[r.createElementVNode("h3",pd,r.toDisplayString(r.unref(d)("verifyNumberTitle")),1),r.createElementVNode("p",md,r.toDisplayString(r.unref(d)("instructions")),1),r.createElementVNode("div",hd,[r.withDirectives(r.createElementVNode("input",{type:"number","onUpdate:modelValue":c[0]||(c[0]=f=>o.digits[0]=f),ref_key:"firstInput",ref:i,maxlength:"1",onInput:c[1]||(c[1]=f=>p(0)),onPaste:c[2]||(c[2]=f=>$(f,0)),onKeydown:c[3]||(c[3]=f=>l(f,0)),class:"w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"},null,544),[[r.vModelText,o.digits[0]]]),r.withDirectives(r.createElementVNode("input",{type:"number","onUpdate:modelValue":c[4]||(c[4]=f=>o.digits[1]=f),maxlength:"1",onInput:c[5]||(c[5]=f=>p(1)),onPaste:c[6]||(c[6]=f=>$(f,1)),onKeydown:c[7]||(c[7]=f=>l(f,1)),class:"w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"},null,544),[[r.vModelText,o.digits[1]]]),r.withDirectives(r.createElementVNode("input",{type:"number","onUpdate:modelValue":c[8]||(c[8]=f=>o.digits[2]=f),maxlength:"1",onInput:c[9]||(c[9]=f=>p(2)),onPaste:c[10]||(c[10]=f=>$(f,2)),onKeydown:c[11]||(c[11]=f=>l(f,2)),class:"w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"},null,544),[[r.vModelText,o.digits[2]]]),r.withDirectives(r.createElementVNode("input",{type:"number","onUpdate:modelValue":c[12]||(c[12]=f=>o.digits[3]=f),maxlength:"1",onInput:c[13]||(c[13]=f=>p(3)),onPaste:c[14]||(c[14]=f=>$(f,3)),onKeydown:c[15]||(c[15]=f=>l(f,3)),class:"w-100 h1 pd-small t-center bg-grey radius-small"},null,544),[[r.vModelText,o.digits[3]]])]),a.value<1?(r.openBlock(),r.createElementBlock("a",{key:0,onClick:s,class:"t-blue"},r.toDisplayString(r.unref(d)("resendCode")),1)):(r.openBlock(),r.createElementBlock("span",yd,r.toDisplayString(a.value)+" "+r.toDisplayString(r.unref(d)("secondsResend")),1))]))}};typeof xe=="function"&&xe(ne);const gd=Object.freeze(Object.defineProperty({__proto__:null,default:ne},Symbol.toStringTag,{value:"Module"})),S=u.axios.create({baseURL:process.env.API_URL,withCredentials:!0});S.defaults.withCredentials=!0;const P=r.reactive({invites:[],invite:null,error:null}),Ye={async read(e){await S.get(`/api/invites/${e}`).then(n=>{P.invites=n.data,P.error=null}).catch(n=>{O.setError(n)})},async readOne(e){await S.get(`/api/invites/get/${e}`).then(n=>{P.invite=n.data,u.state.user.phone=n.data.invitedPhone,u.state.user.email=n.data.invitedEmail}).catch(n=>{O.setError(n)})},async create(e,n){await S.post(`/api/invites/${e}/create`,n).then(()=>{P.error=null}).catch(t=>{O.setError(t)})},async update(e,n){await S.put(`/api/invites/${e}/update`,n).then(()=>{P.error=null}).catch(t=>{O.setError(t)})},async delete(e){await S.delete(`/api/invites/${e}/delete`).then(()=>{P.error=null}).catch(n=>{O.setError(n)})}};r.watch(P,(e,n)=>{});const vd=Object.freeze(Object.defineProperty({__proto__:null,actions:Ye,state:P},Symbol.toStringTag,{value:"Module"}));const bd={class:"t-left pd-medium"},_d=r.createElementVNode("h3",{class:"mn-small"},"Вы были пригилашены в организацию",-1),Cd=r.createElementVNode("p",{class:"mn-semi t-transp"},"Пожалуйста, укажите пароль, на этом регистрация будет закочена.",-1),wd={class:"mn-semi radius-small o-hidden"},Pd={key:0},Nd={key:1},Ze={__name:"Invite",async setup(e){let n,t;const d=r.ref(null),o=b.useRoute(),i=b.useRouter();[n,t]=r.withAsyncContext(()=>Ye.readOne(o.query.inviteCode)),await n,t();async function a(){try{await y.validateInputs(d,y.validatePassword,u.state.user.password,"Некорректный пароль")}catch{throw new Error}await u.actions.signup(u.state.user,o.query.type,o.query.inviteCode)}function s(){i.push({name:"Dashboard"})}return($,l)=>(r.openBlock(),r.createElementBlock("section",bd,[_d,Cd,r.createElementVNode("div",wd,[r.createVNode(u.Field,{field:u.state.user.password,"onUpdate:field":l[0]||(l[0]=p=>u.state.user.password=p),type:"password",validation:d.value,label:"Пароль",placeholder:"******",class:"bg-white radius-small mn-small"},null,8,["field","validation"]),r.createVNode(u.Field,{field:u.state.user.passwordRepeat,"onUpdate:field":l[1]||(l[1]=p=>u.state.user.passwordRepeat=p),type:"password",label:"Повторите пароль",placeholder:"******",class:"bg-white radius-small mn-semi"},null,8,["field"])]),r.createVNode(u._sfc_main,{disabled:P.invite===null,submit:a,callback:s,class:"mn-big"},{default:r.withCtx(()=>[r.unref(o).query.method==="reset-password"?(r.openBlock(),r.createElementBlock("span",Pd,"Поменять пароль")):(r.openBlock(),r.createElementBlock("span",Nd,"Зарегистрироваться"))]),_:1},8,["disabled"])]))}},Od=Object.freeze(Object.defineProperty({__proto__:null,default:Ze},Symbol.toStringTag,{value:"Module"}));function Me(e){const n=e;n.__i18n=n.__i18n||[],n.__i18n.push({locale:"",resource:{en:{almostDone:t=>{const{normalize:d}=t;return d(["Almost there!"])},newPasswordPrompt:t=>{const{normalize:d}=t;return d(["Please, set a new password."])},registrationPasswordPrompt:t=>{const{normalize:d}=t;return d(["Please, set your password to complete the registration."])},passwordPlaceholder:t=>{const{normalize:d}=t;return d(["Password"])},repeatPasswordPlaceholder:t=>{const{normalize:d}=t;return d(["Repeat Password"])},changePasswordBtn:t=>{const{normalize:d}=t;return d(["Change Password"])},registerBtn:t=>{const{normalize:d}=t;return d(["Register"])}},ru:{almostDone:t=>{const{normalize:d}=t;return d(["Почти все!"])},newPasswordPrompt:t=>{const{normalize:d}=t;return d(["Пожалуйста, укажите новый пароль."])},registrationPasswordPrompt:t=>{const{normalize:d}=t;return d(["Пожалуйста, укажите пароль, на этом регистрация будет закончена."])},passwordPlaceholder:t=>{const{normalize:d}=t;return d(["Пароль"])},repeatPasswordPlaceholder:t=>{const{normalize:d}=t;return d(["Повторите пароль"])},changePasswordBtn:t=>{const{normalize:d}=t;return d(["Поменять пароль"])},registerBtn:t=>{const{normalize:d}=t;return d(["Зарегистрироваться"])}}}})}const Ed={class:"t-left pd-medium"},Sd={class:"mn-small"},Id={key:0,class:"mn-semi t-transp"},Td={key:1,class:"mn-semi t-transp"},Fd={class:"mn-semi radius-small o-hidden"},Ad={key:0},Dd={key:1},de={__name:"EnterPassword",setup(e){const n=r.ref(null),{t}=I.useI18n({inheritLocale:!0,useScope:"local"}),d=b.useRoute(),o=b.useRouter();r.ref("phone");async function i(){try{await y.validateInputs(n,y.validatePassword,u.state.user.password,"Некорректный пароль")}catch{throw new Error}d.query.method==="reset-password"&&await u.actions.updatePassword(u.state.user,d.query.type),d.query.method!=="reset-password"&&await u.actions.signup(u.state.user,d.query.type)}function a(){o.push({name:"User Profile",params:{_id:u.state.user._id}})}return(s,$)=>(r.openBlock(),r.createElementBlock("section",Ed,[r.createElementVNode("h3",Sd,r.toDisplayString(r.unref(t)("almostDone")),1),r.unref(d).query.method==="reset-password"?(r.openBlock(),r.createElementBlock("p",Id,r.toDisplayString(r.unref(t)("newPasswordPrompt")),1)):(r.openBlock(),r.createElementBlock("p",Td,r.toDisplayString(r.unref(t)("registrationPasswordPrompt")),1)),r.createElementVNode("div",Fd,[r.createVNode(u.Field,{field:u.state.user.password,"onUpdate:field":$[0]||($[0]=l=>u.state.user.password=l),type:"password",validation:n.value,placeholder:r.unref(t)("passwordPlaceholder"),class:"bg-grey pd-small radius-small mn-thin"},null,8,["field","validation","placeholder"]),r.createVNode(u.Field,{field:u.state.user.passwordRepeat,"onUpdate:field":$[1]||($[1]=l=>u.state.user.passwordRepeat=l),type:"password",placeholder:r.unref(t)("repeatPasswordPlaceholder"),class:"bg-grey pd-small radius-small mn-thin"},null,8,["field","placeholder"])]),r.createVNode(u._sfc_main,{submit:i,callback:a,class:"mn-big"},{default:r.withCtx(()=>[r.unref(d).query.method==="reset-password"?(r.openBlock(),r.createElementBlock("span",Ad,r.toDisplayString(r.unref(t)("changePasswordBtn")),1)):(r.openBlock(),r.createElementBlock("span",Dd,r.toDisplayString(r.unref(t)("registerBtn")),1))]),_:1})]))}};typeof Me=="function"&&Me(de);const kd=Object.freeze(Object.defineProperty({__proto__:null,default:de},Symbol.toStringTag,{value:"Module"})),Rd=[["افغانستان","af","93",,"🇦🇫"],["Shqipëri","al","355",,"🇦🇱"],["الجزائر","dz","213",,"🇩🇿"],["American Samoa","as","1684",,"🇦🇸"],["Andorra","ad","376",,"🇦🇩"],["Angola","ao","244",,"🇦🇴"],["Anguilla","ai","1264",,"🇦🇮"],["Antigua and Barbuda","ag","1268",,"🇦🇬"],["Argentina","ar","54",,"🇦🇷"],["Հայաստան","am","374",,"🇦🇲"],["Aruba","aw","297",,"🇦🇼"],["Australia","au","61",0,,"🇦🇺"],["Österreich","at","43",,"🇦🇹"],["Azərbaycan","az","994",,"🇦🇿"],["Bahamas","bs","1242",,"🇧🇸"],["البحرين","bh","973",,"🇧🇭"],["বাংলাদেশ","bd","880",,"🇧🇩"],["Barbados","bb","1246",,"🇧🇧"],["Беларусь","by","375",,"🇧🇾"],["België","be","32",,"🇧🇪"],["Belize","bz","501",,"🇧🇿"],["Bénin","bj","229",,"🇧🇯"],["Bermuda","bm","1441",,"🇧🇲"],["འབྲུག","bt","975",,"🇧🇹"],["Bolivia","bo","591",,"🇧🇴"],["Босна и Херцеговина","ba","387",,"🇧🇦"],["Botswana","bw","267",,"🇧🇼"],["Brasil","br","55",,"🇧🇷"],["British Indian Ocean Territory","io","246",,"🇮🇴"],["British Virgin Islands","vg","1284",,"🇻🇬"],["Brunei","bn","673",,"🇧🇳"],["България","bg","359",,"🇧🇬"],["Burkina Faso","bf","226",,"🇧🇫"],["Uburundi","bi","257",,"🇧🇮"],["កម្ពុជា","kh","855",,"🇰🇭"],["Cameroun","cm","237",,"🇨🇲"],["Canada","ca","1",1,"🇨🇦"],["Kabu Verdi","cv","238",,"🇨🇻"],["Caribbean Netherlands","bq","599",1,,"🇧🇶"],["Cayman Islands","ky","1345",,"🇰🇾"],["République centrafricaine","cf","236",,"🇨🇫"],["Tchad","td","235",,"🇹🇩"],["Chile","cl","56",,"🇨🇱"],["中国","cn","86",,"🇨🇳"],["Christmas Island","cx","61",2,,"🇨🇽"],["Keeling","cc","61",1,,"🇨🇨"],["Colombia","co","57",,"🇨🇴"],["جزر القمر","km","269",,"🇰🇲"],["DRC","cd","243",,"🇨🇩"],["Republic","cg","242",,"🇨🇬"],["Cook Islands","ck","682",,"🇨🇰"],["Costa Rica","cr","506",,"🇨🇷"],["Côte d’Ivoire","ci","225",,"🇨🇮"],["Hrvatska","hr","385",,"🇭🇷"],["Cuba","cu","53",,"🇨🇺"],["Curaçao","cw","599",0,,"🇨🇼"],["Κύπρος","cy","357",,"🇨🇾"],["Česká republika","cz","420",,"🇨🇿"],["Danmark","dk","45",,"🇩🇰"],["Djibouti","dj","253",,"🇩🇯"],["Dominica","dm","1767",,"🇩🇲"],["República Dominicana","do","1",2,["809","829","849","🇩🇴"]],["Ecuador","ec","593",,"🇪🇨"],["مصر","eg","20",,"🇪🇬"],["El Salvador","sv","503",,"🇸🇻"],["Guinea Ecuatorial","gq","240",,"🇬🇶"],["Eritrea","er","291",,"🇪🇷"],["Eesti","ee","372",,"🇪🇪"],["Ethiopia","et","251",,"🇪🇹"],["Islas Malvinas","fk","500",,"🇫🇰"],["Føroyar","fo","298",,"🇫🇴"],["Fiji","fj","679",,"🇫🇯"],["Suomi","fi","358",0,,"🇫🇮"],["France","fr","33",,"🇫🇷"],["Guyane française","gf","594",,"🇬🇫"],["Polynésie française","pf","689",,"🇵🇫"],["Gabon","ga","241",,"🇬🇦"],["Gambia","gm","220",,"🇬🇲"],["საქართველო","ge","995",,"🇬🇪"],["Deutschland","de","49",,"🇩🇪"],["Gaana","gh","233",,"🇬🇭"],["Gibraltar","gi","350",,"🇬🇮"],["Ελλάδα","gr","30",,"🇬🇷"],["Kalaallit Nunaat","gl","299",,"🇬🇱"],["Grenada","gd","1473",,"🇬🇩"],["Guadeloupe","gp","590",0,,"🇬🇵"],["Guam","gu","1671",,"🇬🇺"],["Guatemala","gt","502",,"🇬🇹"],["Guernsey","gg","44",1,,"🇬🇬"],["Guinée","gn","224",,"🇬🇳"],["Guiné Bissau","gw","245",,"🇬🇼"],["Guyana","gy","592",,"🇬🇾"],["Haiti","ht","509",,"🇭🇹"],["Honduras","hn","504",,"🇭🇳"],["香港","hk","852",,"🇭🇰"],["Magyarország","hu","36",,"🇭🇺"],["Ísland","is","354",,"🇮🇸"],["भारत","in","91",,"🇮🇳"],["Indonesia","id","62",,"🇮🇩"],["ایران","ir","98",,"🇮🇷"],["العراق","iq","964",,"🇮🇶"],["Ireland","ie","353",,"🇮🇪"],["Isle of Man","im","44",2,,"🇮🇲"],["ישראל","il","972",,"🇮🇱"],["Italia","it","39",0,,"🇮🇹"],["Jamaica","jm","1876",,"🇯🇲"],["日本","jp","81",,"🇯🇵"],["Jersey","je","44",3,,"🇯🇪"],["الأردن","jo","962",,"🇯🇴"],["Казахстан","kz","7",1,,"🇰🇿"],["Kenya","ke","254",,"🇰🇪"],["Kiribati","ki","686",,"🇰🇮"],["Kosovo","xk","383",,"🇽🇰"],["الكويت","kw","965",,"🇰🇼"],["Кыргызстан","kg","996",,"🇰🇬"],["ລາວ","la","856",,"🇱🇦"],["Latvija","lv","371",,"🇱🇻"],["لبنان","lb","961",,"🇱🇧"],["Lesotho","ls","266",,"🇱🇸"],["Liberia","lr","231",,"🇱🇷"],["ليبيا","ly","218",,"🇱🇾"],["Liechtenstein","li","423",,"🇱🇮"],["Lietuva","lt","370",,"🇱🇹"],["Luxembourg","lu","352",,"🇱🇺"],["澳門","mo","853",,"🇲🇴"],["FYROM","mk","389",,"🇲🇰"],["Madagasikara","mg","261",,"🇲🇬"],["Malawi","mw","265",,"🇲🇼"],["Malaysia","my","60",,"🇲🇾"],["Maldives","mv","960",,"🇲🇻"],["Mali","ml","223",,"🇲🇱"],["Malta","mt","356",,"🇲🇹"],["Marshall Islands","mh","692",,"🇲🇭"],["Martinique","mq","596",,"🇲🇶"],["موريتانيا","mr","222",,"🇲🇷"],["Moris","mu","230",,"🇲🇺"],["Mayotte","yt","262",1,,"🇾🇹"],["México","mx","52",,"🇲🇽"],["Micronesia","fm","691",,"🇫🇲"],["Republica Moldova","md","373",,"🇲🇩"],["Monaco","mc","377",,"🇲🇨"],["Монгол","mn","976",,"🇲🇳"],["Crna Gora","me","382",,"🇲🇪"],["Montserrat","ms","1664",,"🇲🇸"],["المغرب","ma","212",0,,"🇲🇦"],["Moçambique","mz","258",,"🇲🇿"],["Burma","mm","95",,"🇲🇲"],["Namibië","na","264",,"🇳🇦"],["Nauru","nr","674",,"🇳🇷"],["नेपाल","np","977",,"🇳🇵"],["Nederland","nl","31",,"🇳🇱"],["Nouvelle-Calédonie","nc","687",,"🇳🇨"],["New Zealand","nz","64",,"🇳🇿"],["Nicaragua","ni","505",,"🇳🇮"],["Nijar","ne","227",,"🇳🇪"],["Nigeria","ng","234",,"🇳🇬"],["Niue","nu","683",,"🇳🇺"],["Norfolk Island","nf","672",,"🇳🇫"],["조선 민주주의 인민 공화국","kp","850",,"🇰🇵"],["Northern Mariana Islands","mp","1670",,"🇲🇵"],["Norge","no","47",0,,"🇳🇴"],["عُمان","om","968",,"🇴🇲"],["پاکستان","pk","92",,"🇵🇰"],["Palau","pw","680",,"🇵🇼"],["فلسطين","ps","970",,"🇵🇸"],["Panamá","pa","507",,"🇵🇦"],["Papua New Guinea","pg","675",,"🇵🇬"],["Paraguay","py","595",,"🇵🇾"],["Perú","pe","51",,"🇵🇪"],["Philippines","ph","63",,"🇵🇭"],["Polska","pl","48",,"🇵🇱"],["Portugal","pt","351",,"🇵🇹"],["Puerto Rico","pr","1",3,["787","939","🇵🇷"]],["قطر","qa","974",,"🇶🇦"],["La Réunion","re","262",0,,"🇷🇪"],["România","ro","40",,"🇷🇴"],["Россия","ru","7",0,,"🇷🇺"],["Rwanda","rw","250",,"🇷🇼"],["Saint Barthélemy","bl","590",1,,"🇧🇱"],["Saint Helena","sh","290",,"🇸🇭"],["Saint Kitts and Nevis","kn","1869",,"🇰🇳"],["Saint Lucia","lc","1758",,"🇱🇨"],["Saint-Martin (partie française","mf","590",2,,"🇲🇫"],["Saint-Pierre-et-Miquelon","pm","508",,"🇵🇲"],["Saint Vincent and the Grenadines","vc","1784",,"🇻🇨"],["Samoa","ws","685",,"🇼🇸"],["San Marino","sm","378",,"🇸🇲"],["São Tomé e Príncipe","st","239",,"🇸🇹"],["المملكة العربية السعودية","sa","966",,"🇸🇦"],["Sénégal","sn","221",,"🇸🇳"],["Србија","rs","381",,"🇷🇸"],["Seychelles","sc","248",,"🇸🇨"],["Sierra Leone","sl","232",,"🇸🇱"],["Singapore","sg","65",,"🇸🇬"],["Sint Maarten","sx","1721",,"🇸🇽"],["Slovensko","sk","421",,"🇸🇰"],["Slovenija","si","386",,"🇸🇮"],["Solomon Islands","sb","677",,"🇸🇧"],["Soomaaliya","so","252",,"🇸🇴"],["South Africa","za","27",,"🇿🇦"],["대한민국","kr","82",,"🇰🇷"],["جنوب السودان","ss","211",,"🇸🇸"],["España","es","34",,"🇪🇸"],["ශ්රී ලංකාව","lk","94",,"🇱🇰"],["السودان","sd","249",,"🇸🇩"],["Suriname","sr","597",,"🇸🇷"],["Svalbard and Jan Mayen","sj","47",1,,"🇸🇯"],["Swaziland","sz","268",,"🇸🇿"],["Sverige","se","46",,"🇸🇪"],["Schweiz","ch","41",,"🇨🇭"],["سوريا","sy","963",,"🇸🇾"],["台灣","tw","886",,"🇹🇼"],["Tajikistan","tj","992",,"🇹🇯"],["Tanzania","tz","255",,"🇹🇿"],["ไทย","th","66",,"🇹🇭"],["Timor-Leste","tl","670",,"🇹🇱"],["Togo","tg","228",,"🇹🇬"],["Tokelau","tk","690",,"🇹🇰"],["Tonga","to","676",,"🇹🇴"],["Trinidad and Tobago","tt","1868",,"🇹🇹"],["تونس","tn","216",,"🇹🇳"],["Türkiye","tr","90",,"🇹🇷"],["Turkmenistan","tm","993",,"🇹🇲"],["Turks and Caicos Islands","tc","1649",,"🇹🇨"],["Tuvalu","tv","688",,"🇹🇻"],["U.S. Virgin Islands","vi","1340",,"🇻🇮"],["Uganda","ug","256",,"🇺🇬"],["Україна","ua","380",,"🇺🇦"],["الإمارات العربية المتحدة","ae","971",,"🇦🇪"],["United Kingdom","gb","44",0,,"🇬🇧"],["United States","us","1",0,,"🇺🇸"],["Uruguay","uy","598",,"🇺🇾"],["Oʻzbekiston","uz","998",,"🇺🇿"],["Vanuatu","vu","678",,"🇻🇺"],["Città del Vaticano","va","39",1,,"🇻🇦"],["Venezuela","ve","58",,"🇻🇪"],["Việt Nam","vn","84",,"🇻🇳"],["Wallis-et-Futuna","wf","681",,"🇼🇫"],["الصحراء الغربية","eh","212",1,,"🇪🇭"],["اليمن","ye","967",,"🇾🇪"],["Zambia","zm","260",,"🇿🇲"],["Zimbabwe","zw","263",,"🇿🇼"],["Åland Islands","ax","358",1,,"🇦🇽"]],xd=Rd.map(e=>({name:e[0],iso2:e[1].toUpperCase(),dialCode:e[2],priority:e[3]||0,areaCodes:e[4]||null,flag:e[e.length-1]||null}));function Md(){return fetch("https://ip2c.org/s").then(e=>e.text()).then(e=>{const n=(e||"").toString();if(!n||n[0]!=="1")throw new Error("unable to fetch the country");return n.substr(2,2)})}function zd(e,n){if(e.setSelectionRange)e.focus(),e.setSelectionRange(n,n);else if(e.createTextRange){const t=e.createTextRange();t.collapse(!0),t.moveEnd("character",n),t.moveStart("character",n),t.select()}}const Bd=[{name:"allCountries",type:Array,default:xd,description:"All countries that are used in <code>libphonenumber-js</code>, can be overridden by this prop",inDemo:!1},{name:"autoFormat",type:Boolean,default:!0,description:"Auto update the input to the formatted phone number when it's valid",inDemo:!0},{name:"customValidate",type:[Boolean,RegExp],default:!1,description:"Custom validation RegExp for input",inDemo:!1},{name:"defaultCountry",default:"",type:String,description:"Default country, will override the country fetched from IP address of user",inDemo:!1},{name:"disabled",default:!1,type:Boolean,description:"Disable <code>vue-tel-input</code>, including the input & flag dropdown",inDemo:!1},{name:"autoDefaultCountry",default:!0,type:Boolean,description:"To fetch default country based on IP address of user",inDemo:!1},{name:"dropdownOptions",type:Object,description:"Options for dropdown, see below",inDemo:!1},{name:"dropdownOptions.showDialCodeInList",default:!0,type:Boolean,description:"Show dial code in the dropdown list",inDemo:!0},{name:"dropdownOptions.showDialCodeInSelection",default:!1,type:Boolean,description:"Show dial code in the dropdown selection",inDemo:!0},{name:"dropdownOptions.showFlags",default:!0,type:Boolean,description:"Show flags in the dropdown selection and list",inDemo:!0},{name:"dropdownOptions.tabindex",default:0,type:Number,description:"Native dropdown <code>tabindex</code> attribute",inDemo:!1},{name:"ignoredCountries",default:[],type:Array,description:"List of countries will NOT be shown on the dropdown",inDemo:!1},{name:"inputOptions",type:Object,description:"Options for input, see below",inDemo:!1},{name:"inputOptions.autocomplete",type:String,default:"on",description:"Native input <code>autocomplete</code> attribute",inDemo:!1},{name:"inputOptions.autofocus",type:Boolean,default:!1,description:"Native input <code>autofocus</code> attribute",inDemo:!1},{name:"inputOptions.id",default:"",type:String,description:"Native input <code>id</code> attribute",inDemo:!1},{name:"inputOptions.maxlength",default:25,type:Number,description:"Native input <code>maxlength</code> attribute",inDemo:!1},{name:"inputOptions.name",default:"telephone",type:String,description:"Native input <code>name</code> attribute",inDemo:!1},{name:"inputOptions.placeholder",default:"Enter a phone number",type:String,description:"Placeholder for the input",inDemo:!1},{name:"inputOptions.readonly",default:!1,type:Boolean,description:"Native input <code>readonly</code> attribute",inDemo:!1},{name:"inputOptions.required",default:!1,type:Boolean,description:"Native input <code>required</code> attribute",inDemo:!1},{name:"inputOptions.tabindex",default:0,type:Number,description:"Native input <code>tabindex</code> attribute",inDemo:!1},{name:"inputOptions.type",default:"tel",type:String,description:"Native input <code>type</code> attribute",inDemo:!1},{name:"inputOptions.styleClasses",default:"",type:[String,Array,Object],description:"Custom classes for the <code>input</code>",inDemo:!1},{name:"invalidMsg",default:"",type:String,description:"",inDemo:!1},{name:"mode",default:"auto",type:String,description:"Allowed values: <code>'auto'</code> (Default set by phone), <code>'international'</code> (Format number with the dial code i.e. + 61), <code>'national'</code> (Format number without dial code i.e. 0321232)",inDemo:!0,options:["auto","national","international"]},{name:"onlyCountries",default:[],type:Array,description:"List of countries will be shown on the dropdown",inDemo:!1},{name:"preferredCountries",default:[],type:Array,description:"Preferred countries list, will be on top of the dropdown",inDemo:!1},{name:"styleClasses",default:"",type:[String,Array,Object],description:"Custom classes for the wrapper",inDemo:!1},{name:"validCharactersOnly",default:!1,type:Boolean,description:"Only allow valid characters in a phone number (will also verify in <code>mounted</code>, so phone number with invalid characters will be shown as an empty string)",inDemo:!1}],Ld=[...Bd].reduce((e,n)=>{if(n.name.includes(".")){const[t,d]=n.name.split(".");e[t]?Object.assign(e[t],{[d]:n.default}):Object.assign(e,{[t]:{[d]:n.default}})}else Object.assign(e,{[n.name]:n.default});return e},{}),ze={options:{...Ld}},Vd={beforeMount(e,n,t){if(typeof n.value!="function"){const d=t.context.name;let o=`[Vue-click-outside:] provided expression ${n.expression}
|
8
|
-
is not a function, but has to be`;d&&(o+=`Found in component ${d}`),console.warn(o)}e.clickOutsideEvent=function(d){e===d.target||e.contains(d.target)||n.value(d,e)},document.body.addEventListener("click",e.clickOutsideEvent)},unmounted(e){document.body.removeEventListener("click",e.clickOutsideEvent)}};function g(e){const n=ze.options[e];return typeof n>"u"?ze.options[e]:n}const jd=r.defineComponent({name:"Vue3ReactiveTelInput",directives:{clickOutside:Vd},props:{modelValue:{type:String,default:""},badClass:{type:[String,Array,Object],default:""},goodClass:{type:[String,Array,Object],default:""},badStyle:{type:[String,Array,Object],default:""},goodStyle:{type:[String,Array,Object],default:""},badInputClass:{type:[String,Array,Object],default:""},goodInputClass:{type:[String,Array,Object],default:""},badInputStyle:{type:[String,Array,Object],default:""},goodInputStyle:{type:[String,Array,Object],default:""},allCountries:{type:Array,default:()=>g("allCountries")},autoFormat:{type:Boolean,default:()=>g("autoFormat")},validation:{type:[Boolean,Object],default:!1},customValidate:{type:[Boolean,RegExp],default:()=>g("customValidate")},defaultCountry:{type:String,default:()=>g("defaultCountry")},disabled:{type:Boolean,default:()=>g("disabled")},autoDefaultCountry:{type:Boolean,default:()=>g("autoDefaultCountry")},dropdownOptions:{type:Object,default:()=>g("dropdownOptions")},ignoredCountries:{type:Array,default:()=>g("ignoredCountries")},inputOptions:{type:Object,default:()=>g("inputOptions")},invalidMsg:{type:String,default:()=>g("invalidMsg")},mode:{type:String,default:()=>g("mode")},onlyCountries:{type:Array,default:()=>g("onlyCountries")},preferredCountries:{type:Array,default:()=>g("preferredCountries")},validCharactersOnly:{type:Boolean,default:()=>g("validCharactersOnly")},rootClass:{type:[String,Array,Object],default:()=>g("styleClasses")},inputClass:{type:[String,Array,Object],default:()=>""},divInputClass:{type:[String,Array,Object],default:()=>""},rootStyle:{type:[String,Array,Object],default:()=>""},dropdownStyle:{type:[String,Array,Object],default:()=>""},listStyle:{type:[String,Array,Object],default:()=>""},inputStyle:{type:[String,Array,Object],default:()=>""},inputId:{type:[String,Array,Object],default:()=>""},Placeholder:{type:[String,Object,Function],default:()=>""}},data(){return{counter:5,initCounter:5,message:{action:null,amount:null},phone:this.modelValue?this.modelValue:"",activeCountryCode:"",open:!1,finishMounted:!1,selectedIndex:null,typeToFindInput:"",typeToFindTimer:null,dropdownOpenDirection:"below",parsedPlaceholder:this.Placeholder!==""?this.Placeholder:this.inputOptions.placeholder}},watch:{activeCountry(e,n){if(!e&&(n!=null&&n.iso2)){this.activeCountryCode=n.iso2;return}e!=null&&e.iso2&&this.$emit("country-changed",e)},"phoneObject.countryCode":function(e){this.activeCountryCode=e},"phoneObject.valid":function(){this.$emit("validate",this.phoneObject)},"phoneObject.formatted":function(e){!this.autoFormat||this.customValidate||(this.emitInput(e),this.$nextTick(()=>{e&&!this.value&&(this.phone=e)}))},"inputOptions.placeholder":function(){this.resetPlaceholder()},value(e,n){this.testCharacters()?this.phone=e:this.$nextTick(()=>{this.phone=n,this.onInput()})},open(e){e?(this.setDropdownPosition(),this.$emit("open")):this.$emit("close")}},mounted(){this.cleanInvalidCharacters(),this.initializeCountry().then(()=>{var e;!this.phone&&((e=this.inputOptions)!=null&&e.showDialCode)&&this.activeCountryCode&&(this.phone=`+${this.activeCountryCode}`),this.$emit("validate",this.phoneObject)}).catch(console.error).then(()=>{this.finishMounted=!0})},computed:{activeCountry(){return this.findCountry(this.activeCountryCode)},activeCountryFlag(){return this.activeCountry?this.activeCountry.flag:null},parsedMode(){return this.mode==="auto"?!this.phone||this.phone[0]!=="+"?"national":"international":["international","national"].includes(this.mode)?this.mode:(console.error('Invalid value of prop "mode"'),"international")},filteredCountries(){return this.onlyCountries.length?this.allCountries.filter(({iso2:e})=>this.onlyCountries.some(n=>n.toUpperCase()===e)):this.ignoredCountries.length?this.allCountries.filter(({iso2:e})=>!this.ignoredCountries.includes(e.toUpperCase())&&!this.ignoredCountries.includes(e.toLowerCase())):this.allCountries},sortedCountries(){return[...this.getCountries(this.preferredCountries).map(n=>({...n,preferred:!0})),...this.filteredCountries]},phoneObject(){var i,a,s;let e;((i=this.phone)==null?void 0:i[0])==="+"?e=U(this.phone)||{}:e=U(this.phone,this.activeCountryCode)||{};const{metadata:n,...t}=e;console.log(e);let d=(a=e.isValid)==null?void 0:a.call(e),o=this.phone;return d&&(o=(s=e.format)==null?void 0:s.call(e,this.parsedMode.toUpperCase(),{nationalPrefix:!1})),e.country&&(this.ignoredCountries.length||this.onlyCountries.length)&&(this.findCountry(e.country)||(d=!1,Object.assign(e,{country:null}))),Object.assign(t,{countryCode:e.country,valid:d,country:this.activeCountry,formatted:o}),t},classes(){return this.phoneObject.valid===!0?this.goodClass:this.phoneObject.valid===!1?this.badClass:void 0},styles(){return this.phoneObject.valid===!0?this.goodStyle:this.phoneObject.valid===!1?this.badStyle:void 0},Iclasses(){return this.phoneObject.valid===!0?this.goodInputClass:this.phoneObject.valid===!1?this.badInputClass:void 0},Istyles(){return this.phoneObject.valid===!0?this.goodInputStyle:this.phoneObject.valid===!1?this.badInputStyle:void 0}},methods:{resetPlaceholder(){this.parsedPlaceholder=this.inputOptions.placeholder},initializeCountry(){return new Promise(e=>{var t;if(((t=this.phone)==null?void 0:t[0])==="+"){e();return}if(this.defaultCountry){this.choose(this.defaultCountry),e();return}const n=this.preferredCountries[0]||this.filteredCountries[0];this.autoDefaultCountry?Md().then(d=>{this.choose(d||this.activeCountryCode)}).catch(d=>{console.warn(d),this.choose(n)}).then(()=>{e()}):(this.choose(n),e())})},getCountries(e=[]){return e.map(n=>this.findCountry(n)).filter(Boolean)},findCountry(e=""){return this.filteredCountries.find(n=>n.iso2===e.toUpperCase())},getItemClass(e,n){const t=this.selectedIndex===e,d=e===this.preferredCountries.length-1,o=this.preferredCountries.some(i=>i.toUpperCase()===n);return{highlighted:t,"last-preferred":d,preferred:o}},choose(e){var t,d;let n=e;if(typeof n=="string"&&(n=this.findCountry(n)),!!n){if(((t=this.phone)==null?void 0:t[0])==="+"&&n.iso2&&this.phoneObject.nationalNumber){this.activeCountryCode=n.iso2,this.phone=U(this.phoneObject.nationalNumber,n.iso2).formatInternational();return}if((d=this.inputOptions)!=null&&d.showDialCode&&n){this.phone=`+${n.dialCode}`;return}this.activeCountryCode=n.iso2,this.emitInput(this.phone)}},cleanInvalidCharacters(){const e=this.phone;if(this.validCharactersOnly){const n=this.phone.match(/[()\-+0-9\s]*/g);this.phone=n.join("")}if(this.customValidate&&this.customValidate instanceof RegExp){const n=this.phone.match(this.customValidate);this.phone=n.join("")}e!==this.phone&&this.emitInput(this.phone)},testCharacters(){return this.validCharactersOnly&&!/^[()\-+0-9\s]*$/.test(this.phone)?!1:this.customValidate?this.testCustomValidate():!0},testCustomValidate(){return this.customValidate instanceof RegExp?this.customValidate.test(this.phone):!1},onInput(){this.$refs.input.setCustomValidity(this.phoneObject.valid?"":this.invalidMsg),this.emitInput(this.phoneObject)},emitInput(e){this.$emit("update:modelValue",e)},onBlur(){this.$emit("blur")},onFocus(){zd(this.$refs.input,this.phone.length),this.$emit("focus")},onEnter(){this.$emit("enter")},onSpace(){this.$emit("space")},focus(){this.$refs.input.focus()},toggleDropdown(){this.disabled||(this.open=!this.open)},clickedOutside(){this.open=!1},keyboardNav(e){if(e.keyCode===40){e.preventDefault(),this.open=!0,this.selectedIndex===null?this.selectedIndex=0:this.selectedIndex=Math.min(this.sortedCountries.length-1,this.selectedIndex+1);const n=this.$refs.list.children[this.selectedIndex];n.offsetTop+n.clientHeight>this.$refs.list.scrollTop+this.$refs.list.clientHeight&&(this.$refs.list.scrollTop=n.offsetTop-this.$refs.list.clientHeight+n.clientHeight)}else if(e.keyCode===38){e.preventDefault(),this.open=!0,this.selectedIndex===null?this.selectedIndex=this.sortedCountries.length-1:this.selectedIndex=Math.max(0,this.selectedIndex-1);const n=this.$refs.list.children[this.selectedIndex];n.offsetTop<this.$refs.list.scrollTop&&(this.$refs.list.scrollTop=n.offsetTop)}else if(e.keyCode===13)this.selectedIndex!==null&&this.choose(this.sortedCountries[this.selectedIndex]),this.open=!this.open;else{this.typeToFindInput+=e.key,clearTimeout(this.typeToFindTimer),this.typeToFindTimer=setTimeout(()=>{this.typeToFindInput=""},700);const n=this.sortedCountries.slice(this.preferredCountries.length).findIndex(t=>t.name.toLowerCase().startsWith(this.typeToFindInput));if(n>=0){this.selectedIndex=this.preferredCountries.length+n;const t=this.$refs.list.children[this.selectedIndex],d=t.offsetTop<this.$refs.list.scrollTop,o=t.offsetTop+t.clientHeight>this.$refs.list.scrollTop+this.$refs.list.clientHeight;(d||o)&&(this.$refs.list.scrollTop=t.offsetTop-this.$refs.list.clientHeight/2)}}},reset(){this.selectedIndex=this.sortedCountries.map(e=>e.iso2).indexOf(this.activeCountryCode),this.open=!1},setDropdownPosition(){window.innerHeight-this.$refs.rootElement.getBoundingClientRect().bottom>200?this.dropdownOpenDirection="below":this.dropdownOpenDirection="above"}}}),Ud=["tabindex"],Gd={class:"flex-nowrap flex flex-v-center p-medium vti__selection"},Hd=["innerHTML"],Kd={key:1,class:"vti__country-code"},Wd=["onClick","onMousemove"],qd=["innerHTML"],Xd={key:1},Yd=["type","autocomplete","autofocus","disabled","id","maxlength","name","placeholder","readonly","required","tabindex"],Zd={key:0,class:"mn-t-thin mn-b-thin invalid-feedback"};function Jd(e,n,t,d,o,i){const a=r.resolveDirective("click-outside");return r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createElementVNode("div",{class:r.normalizeClass(["vue3-reactive-tel-input",{"bg-fourth-nano":e.validation},e.$attrs.class,e.rootClass,{disabled:e.disabled},e.classes]),style:r.normalizeStyle([e.rootStyle,e.styles]),ref:"rootElement"},[r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([["vti__dropdown",{open:e.open}],"br-solid br-black-transp br-1px radius-medium"]),tabindex:e.dropdownOptions.tabindex,onKeydown:[n[0]||(n[0]=(...s)=>e.keyboardNav&&e.keyboardNav(...s)),n[2]||(n[2]=r.withKeys((...s)=>e.reset&&e.reset(...s),["esc"]))],onClick:n[1]||(n[1]=(...s)=>e.toggleDropdown&&e.toggleDropdown(...s)),style:r.normalizeStyle([e.dropdownStyle])},[r.createElementVNode("span",Gd,[e.dropdownOptions.showFlags?(r.openBlock(),r.createElementBlock("span",{key:0,innerHTML:e.activeCountryFlag,class:"mn-r-thin"},null,8,Hd)):r.createCommentVNode("",!0),e.dropdownOptions.showDialCodeInSelection?(r.openBlock(),r.createElementBlock("span",Kd," +"+r.toDisplayString(e.activeCountry&&e.activeCountry.dialCode),1)):r.createCommentVNode("",!0)]),r.withDirectives(r.createElementVNode("ul",{ref:"list",class:r.normalizeClass(["bs-black radius-small vti__dropdown-list",e.dropdownOpenDirection]),style:r.normalizeStyle([e.listStyle])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.sortedCountries,(s,$)=>(r.openBlock(),r.createElementBlock("li",{class:r.normalizeClass(["flex-nowrap flex w-max",["vti__dropdown-item",e.getItemClass($,s.iso2)]]),key:s.iso2+(s.preferred?"-preferred":""),onClick:l=>e.choose(s),onMousemove:l=>e.selectedIndex=$},[e.dropdownOptions.showFlags?(r.openBlock(),r.createElementBlock("span",{key:0,innerHTML:s.flag,class:"mn-r-thin"},null,8,qd)):r.createCommentVNode("",!0),r.createElementVNode("strong",null,r.toDisplayString(s.name),1),e.dropdownOptions.showDialCodeInList?(r.openBlock(),r.createElementBlock("span",Xd," +"+r.toDisplayString(s.dialCode),1)):r.createCommentVNode("",!0)],42,Wd))),128))],6),[[r.vShow,e.open]])],46,Ud)),[[a,e.clickedOutside]]),r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":n[3]||(n[3]=s=>e.phone=s),pattern:"[0-9]*",ref:"input",type:e.inputOptions.type,autocomplete:e.inputOptions.autocomplete,autofocus:e.inputOptions.autofocus,class:r.normalizeClass(["vti__input",e.inputOptions.styleClasses,e.inputClass,e.Iclasses]),style:r.normalizeStyle([e.inputStyle,e.Istyles]),disabled:e.disabled,id:e.inputId!==""?e.inputId:e.inputOptions.id,maxlength:e.inputOptions.maxlength,name:e.inputId!==""?e.inputId:e.inputOptions.name,placeholder:e.parsedPlaceholder,readonly:e.inputOptions.readonly,required:e.inputOptions.required,tabindex:e.inputOptions.tabindex,onBlur:n[4]||(n[4]=(...s)=>e.onBlur&&e.onBlur(...s)),onFocus:n[5]||(n[5]=(...s)=>e.onFocus&&e.onFocus(...s)),onInput:n[6]||(n[6]=(...s)=>e.onInput&&e.onInput(...s)),onKeyup:[n[7]||(n[7]=r.withKeys((...s)=>e.onEnter&&e.onEnter(...s),["enter"])),n[8]||(n[8]=r.withKeys((...s)=>e.onSpace&&e.onSpace(...s),["space"]))]},null,46,Yd),[[r.vModelDynamic,e.phone]]),r.renderSlot(e.$slots,"default",{},void 0,!0)],6),r.createVNode(r.Transition,{name:"fade"},{default:r.withCtx(()=>[e.validation?(r.openBlock(),r.createElementBlock("div",Zd," * "+r.toDisplayString(e.validation.message),1)):r.createCommentVNode("",!0)]),_:1})],64)}const re=et._export_sfc(jd,[["render",Jd],["__scopeId","data-v-50353ca7"]]);function Be(e){const n=e;n.__i18n=n.__i18n||[],n.__i18n.push({locale:"",resource:{en:{forgotPasswordTitle:t=>{const{normalize:d}=t;return d(["Forgot Password?"])},instructions:t=>{const{normalize:d}=t;return d(["To reset your password, specify the phone or email used during registration."])},smsInfo:t=>{const{normalize:d}=t;return d(["We will send you an SMS with a confirmation code to reset your password, which you will need to enter in the next step."])},emailInfo:t=>{const{normalize:d}=t;return d(["We will send you an email with a confirmation code to reset your password, which you will need to enter in the next step."])},phone:t=>{const{normalize:d}=t;return d(["Phone"])},email:t=>{const{normalize:d}=t;return d(["Email"])},phonePlaceholder:t=>{const{normalize:d}=t;return d(["Enter your phone"])},emailPlaceholder:t=>{const{normalize:d}=t;return d(["Enter your email"])},sendCode:t=>{const{normalize:d}=t;return d(["Send code"])}},ru:{forgotPasswordTitle:t=>{const{normalize:d}=t;return d(["Забыли пароль?"])},instructions:t=>{const{normalize:d}=t;return d(["Чтобы сбросить пароль, укажите телефон или email, использованные при регистрации."])},smsInfo:t=>{const{normalize:d}=t;return d(["Мы вышлем вам SMS с кодом подтверждения для сброса пароля, который вы должны будете ввести в следующем шаге."])},emailInfo:t=>{const{normalize:d}=t;return d(["Мы отправим вам электронное письмо с кодом подтверждения для сброса пароля, который вы должны будете ввести в следующем шаге."])},phone:t=>{const{normalize:d}=t;return d(["Телефон"])},email:t=>{const{normalize:d}=t;return d(["Email"])},phonePlaceholder:t=>{const{normalize:d}=t;return d(["Введите ваш телефон"])},emailPlaceholder:t=>{const{normalize:d}=t;return d(["Введите ваш email"])},sendCode:t=>{const{normalize:d}=t;return d(["Отправить код"])}}}})}const Qd={class:"t-left pd-medium"},er={class:"mn-small"},tr={class:"mn-small t-transp"},nr={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},dr={key:0,class:"mn-semi radius-small o-hidden"},rr={class:"mn-small t-transp"},or={key:0,class:"mn-semi radius-small o-hidden"},ir={class:"mn-small t-transp"},oe={__name:"ResetPassword",setup(e){const{t:n}=I.useI18n({inheritLocale:!0,useScope:"local"}),t=r.ref(null),d=r.ref(null);b.useRoute();const o=b.useRouter(),i=r.ref("phone");async function a(){try{i.value==="phone"&&await y.validateInputs(t,y.validatePhone,u.state.user.phone,"Некорректный телефон"),i.value==="email"&&await y.validateInputs(d,y.validateEmail,u.state.user.email,"Некорректный email")}catch{throw new Error}try{await u.actions.resetPassword(u.state.user,i.value,"reset-password")}catch($){throw console.log($),new Error}}function s(){o.push({name:"Enter Code",query:{type:i.value,method:"reset-password"}})}return($,l)=>(r.openBlock(),r.createElementBlock("section",Qd,[r.createElementVNode("h3",er,r.toDisplayString(r.unref(n)("forgotPasswordTitle")),1),r.createElementVNode("p",tr,r.toDisplayString(r.unref(n)("instructions")),1),r.createElementVNode("div",nr,[r.createVNode(Y._sfc_main,{selected:i.value,"onUpdate:selected":l[0]||(l[0]=p=>i.value=p),tabs:[{name:r.unref(n)("phone"),value:"phone"},{name:r.unref(n)("email"),value:"email"}]},null,8,["selected","tabs"])]),r.createElementVNode("div",null,[r.createVNode(r.Transition,{name:"slide-fade"},{default:r.withCtx(()=>[i.value==="phone"?(r.openBlock(),r.createElementBlock("div",dr,[r.createElementVNode("p",rr,r.toDisplayString(r.unref(n)("smsInfo")),1),r.createVNode(re,{modelValue:u.state.user.phone,"onUpdate:modelValue":l[1]||(l[1]=p=>u.state.user.phone=p),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:t.value,mode:"national",inputOptions:{placeholder:r.unref(n)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])])):r.createCommentVNode("",!0)]),_:1}),r.createVNode(r.Transition,{name:"slide-fade"},{default:r.withCtx(()=>[i.value==="email"?(r.openBlock(),r.createElementBlock("div",or,[r.createElementVNode("p",ir,r.toDisplayString(r.unref(n)("emailInfo")),1),r.createVNode(u.Field,{field:u.state.user.email,"onUpdate:field":l[2]||(l[2]=p=>u.state.user.email=p),placeholder:r.unref(n)("emailPlaceholder"),validation:d.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])])):r.createCommentVNode("",!0)]),_:1})]),r.createVNode(u._sfc_main,{submit:a,callback:s,class:"mn-big"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("sendCode")),1)]),_:1})]))}};typeof Be=="function"&&Be(oe);const ar=Object.freeze(Object.defineProperty({__proto__:null,default:oe},Symbol.toStringTag,{value:"Module"}));function Le(e){const n=e;n.__i18n=n.__i18n||[],n.__i18n.push({locale:"",resource:{en:{title:t=>{const{normalize:d}=t;return d(["Sign Up to The Commune"])},description:t=>{const{normalize:d}=t;return d(["Choose a convenient way to register via phone or email:"])},phone:t=>{const{normalize:d}=t;return d(["Phone"])},email:t=>{const{normalize:d}=t;return d(["Email"])},phonePlaceholder:t=>{const{normalize:d}=t;return d(["Enter your phone"])},emailPlaceholder:t=>{const{normalize:d}=t;return d(["Enter your email"])},emailNotice:t=>{const{normalize:d}=t;return d(["We will send you an email with a confirmation code that you will need to enter in the next step."])},smsNotice:t=>{const{normalize:d}=t;return d(["We will send you an SMS with a confirmation code that you will need to enter in the next step."])},sendCode:t=>{const{normalize:d}=t;return d(["Send Code"])},haveAccount:t=>{const{normalize:d}=t;return d(["Already have an account?"])}},ru:{title:t=>{const{normalize:d}=t;return d(["Новая учетная запись"])},description:t=>{const{normalize:d}=t;return d(["Выберите удобный способ регистрации через телефон или email:"])},phone:t=>{const{normalize:d}=t;return d(["Телефон"])},email:t=>{const{normalize:d}=t;return d(["Email"])},phonePlaceholder:t=>{const{normalize:d}=t;return d(["Введите ваш телефон"])},emailPlaceholder:t=>{const{normalize:d}=t;return d(["Введите ваш email"])},emailNotice:t=>{const{normalize:d}=t;return d(["Мы отправим вам электронное письмо с кодом подтверждения, который вы должны будете ввести в следующем шаге."])},smsNotice:t=>{const{normalize:d}=t;return d(["Мы вышлем вам SMS с кодом подтверждения, который вы должны будете ввести в следующем шаге."])},sendCode:t=>{const{normalize:d}=t;return d(["Отправить код"])},haveAccount:t=>{const{normalize:d}=t;return d(["У вас уже есть аккаунт?"])}}}})}const sr={class:"t-left pd-medium"},lr={class:"mn-small"},ur={class:"mn-small t-transp"},$r={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},cr={class:""},fr={class:"mn-semi radius-small"},pr={class:"mn-small t-transp"},mr={class:"mn-semi radius-small o-hidden"},hr={class:"mn-small t-transp"},yr={class:"w-100"},ie={__name:"SignUp",setup(e){const{t:n}=I.useI18n({inheritLocale:!0,useScope:"local"}),t=r.ref(null),d=r.ref(null);b.useRoute();const o=b.useRouter(),i=r.ref("phone");async function a(){try{i.value==="phone"&&await y.validateInputs(t,y.validatePhone,u.state.user.phone,"Некорректный телефон"),i.value==="email"&&await y.validateInputs(d,y.validateEmail,u.state.user.email,"Некорректный email")}catch{throw new Error}try{await u.sendCode(u.state.user,"signup",i.value)}catch{throw new Error}}function s(){o.push({name:"Enter Code"})}return($,l)=>{const p=r.resolveComponent("router-link");return r.openBlock(),r.createElementBlock("section",sr,[r.createElementVNode("h3",lr,r.toDisplayString(r.unref(n)("title")),1),r.createElementVNode("p",ur,r.toDisplayString(r.unref(n)("description")),1),r.createElementVNode("div",$r,[r.createVNode(Y._sfc_main,{selected:i.value,"onUpdate:selected":l[0]||(l[0]=m=>i.value=m),tabs:[{name:r.unref(n)("phone"),value:"phone"},{name:r.unref(n)("email"),value:"email"}]},null,8,["selected","tabs"])]),r.createElementVNode("div",cr,[r.createVNode(r.Transition,{name:"slide-fade"},{default:r.withCtx(()=>[r.withDirectives(r.createElementVNode("div",fr,[r.createElementVNode("p",pr,r.toDisplayString(r.unref(n)("smsNotice")),1),r.createVNode(re,{modelValue:u.state.user.phone,"onUpdate:modelValue":l[1]||(l[1]=m=>u.state.user.phone=m),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:t.value,mode:"national",inputOptions:{placeholder:r.unref(n)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])],512),[[r.vShow,i.value==="phone"]])]),_:1}),r.createVNode(r.Transition,{name:"slide-fade"},{default:r.withCtx(()=>[r.withDirectives(r.createElementVNode("div",mr,[r.createElementVNode("p",hr,r.toDisplayString(r.unref(n)("emailNotice")),1),r.createVNode(u.Field,{field:u.state.user.email,"onUpdate:field":l[2]||(l[2]=m=>u.state.user.email=m),placeholder:r.unref(n)("emailPlaceholder"),validation:d.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[r.vShow,i.value==="email"]])]),_:1})]),r.createVNode(u._sfc_main,{submit:a,callback:s,class:"mn-big"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("sendCode")),1)]),_:1}),r.createElementVNode("div",yr,[r.createVNode(p,{to:"/auth/signin",class:"underline mn-medium d-block t-blue"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("haveAccount")),1)]),_:1})])])}}};typeof Le=="function"&&Le(ie);const gr=Object.freeze(Object.defineProperty({__proto__:null,default:ie},Symbol.toStringTag,{value:"Module"}));function Ve(e){const n=e;n.__i18n=n.__i18n||[],n.__i18n.push({locale:"",resource:{en:{title:t=>{const{normalize:d}=t;return d(["Welcome to The Commune"])},subtitle:t=>{const{normalize:d}=t;return d(["Sign In to Continue"])},signup:t=>{const{normalize:d}=t;return d(["Don't have an account?"])},phone:t=>{const{normalize:d}=t;return d(["Phone"])},email:t=>{const{normalize:d}=t;return d(["Email"])},phonePlaceholder:t=>{const{normalize:d}=t;return d(["Enter your phone"])},emailPlaceholder:t=>{const{normalize:d}=t;return d(["Enter your email"])},haveAccount:t=>{const{normalize:d}=t;return d(["Don't have an account? Sign Up"])},passwordPlaceholder:t=>{const{normalize:d}=t;return d(["Enter your password"])},forgotPassword:t=>{const{normalize:d}=t;return d(["Forgot Password?"])},signin:t=>{const{normalize:d}=t;return d(["Sign In"])},soon:t=>{const{normalize:d}=t;return d(["SOON"])},signinMetamask:t=>{const{normalize:d}=t;return d(["Sign In with Apple"])}},ru:{title:t=>{const{normalize:d}=t;return d(["Приветствуем вас,"])},subtitle:t=>{const{normalize:d}=t;return d(["Войдите для продолжения"])},signup:t=>{const{normalize:d}=t;return d(["Нет аккаунта?"])},phone:t=>{const{normalize:d}=t;return d(["Телефон"])},email:t=>{const{normalize:d}=t;return d(["Email"])},phonePlaceholder:t=>{const{normalize:d}=t;return d(["Введите ваш телефон"])},emailPlaceholder:t=>{const{normalize:d}=t;return d(["Введите ваш email"])},haveAccount:t=>{const{normalize:d}=t;return d(["Нет аккаунта? Зарегистрироваться"])},passwordPlaceholder:t=>{const{normalize:d}=t;return d(["Введите ваш пароль"])},forgotPassword:t=>{const{normalize:d}=t;return d(["Забыли пароль?"])},signin:t=>{const{normalize:d}=t;return d(["Войти"])},soon:t=>{const{normalize:d}=t;return d(["СКОРО"])},signinMetamask:t=>{const{normalize:d}=t;return d(["Войти через Apple"])}}}})}const vr={class:""},br={class:"mn-medium"},_r=r.createElementVNode("br",null,null,-1),Cr={class:"t-semi"},wr={class:"mn-big"},Pr={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},Nr={class:""},Or={class:"mn-thin radius-small"},Er={class:"mn-thin radius-small o-hidden"},Sr={class:"w-100 mn-big"},Ir={class:"bg-black t-white w-100 button"},Tr={class:"flex-v-center flex"},Fr={class:"mn-r-small"},ae={__name:"SignIn",setup(e){const{t:n}=I.useI18n({inheritLocale:!0,useScope:"local"}),t=r.ref(null),d=r.ref(null),o=r.ref(null);b.useRoute();const i=b.useRouter(),a=r.ref("phone");async function s(){try{a.value==="phone"&&await y.validateInputs(t,y.validatePhone,u.state.user.phone,"Некорректный телефон"),a.value==="email"&&await y.validateInputs(o,y.validateEmail,u.state.user.email,"Некорректный email")}catch{throw new Error}await u.actions.login(u.state.user,a.value)}function $(){i.push({name:"User Profile",params:{_id:u.state.user._id}})}return(l,p)=>{const m=r.resolveComponent("router-link");return r.openBlock(),r.createElementBlock("section",vr,[r.createElementVNode("h3",br,[r.createTextVNode(r.toDisplayString(r.unref(n)("title"))+" ",1),_r,r.createElementVNode("span",Cr,r.toDisplayString(r.unref(n)("subtitle")),1)]),r.createElementVNode("p",wr,[r.createVNode(m,{to:{name:"Sign Up"},class:"underline t-second"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("signup")),1)]),_:1})]),r.createElementVNode("div",Pr,[r.createVNode(Y._sfc_main,{selected:a.value,"onUpdate:selected":p[0]||(p[0]=c=>a.value=c),tabs:[{name:r.unref(n)("phone"),value:"phone"},{name:r.unref(n)("email"),value:"email"}]},null,8,["selected","tabs"])]),r.createElementVNode("div",Nr,[r.createVNode(r.Transition,{name:"slide-fade"},{default:r.withCtx(()=>[r.withDirectives(r.createElementVNode("div",Or,[r.createVNode(re,{modelValue:u.state.user.phone,"onUpdate:modelValue":p[1]||(p[1]=c=>u.state.user.phone=c),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:t.value,mode:"national",inputOptions:{placeholder:r.unref(n)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])],512),[[r.vShow,a.value==="phone"]])]),_:1}),r.createVNode(r.Transition,{name:"slide-fade"},{default:r.withCtx(()=>[r.withDirectives(r.createElementVNode("div",Er,[r.createVNode(u.Field,{field:u.state.user.email,"onUpdate:field":p[2]||(p[2]=c=>u.state.user.email=c),placeholder:r.unref(n)("emailPlaceholder"),validation:o.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[r.vShow,a.value==="email"]])]),_:1})]),r.createVNode(u.Field,{field:u.state.user.password,"onUpdate:field":p[3]||(p[3]=c=>u.state.user.password=c),type:"password",validation:d.value,placeholder:r.unref(n)("passwordPlaceholder"),class:"bg-grey pd-medium radius-small mn-semi"},null,8,["field","validation","placeholder"]),r.createElementVNode("div",Sr,[r.createVNode(m,{to:"/auth/reset-password",class:"underline d-block t-blue"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("forgotPassword")),1)]),_:1})]),r.createVNode(u._sfc_main,{submit:s,callback:$,class:"mn-thin"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("signin")),1)]),_:1}),r.createElementVNode("button",Ir,[r.createElementVNode("div",Tr,[r.createElementVNode("span",Fr,r.toDisplayString(r.unref(n)("signinMetamask")),1)])])])}}};typeof Ve=="function"&&Ve(ae);const Ar=Object.freeze(Object.defineProperty({__proto__:null,default:ae},Symbol.toStringTag,{value:"Module"})),Dr=[{path:"auth",name:"Authentication",meta:{title:{en:"Sign In",ru:"Вход"}},component:Xe,children:[{path:"signin",name:"Sign In",beforeEnter:[C.requiresNoAuth,C.resetUser],meta:{title:{en:"Sign In",ru:"Вход"}},component:()=>Promise.resolve().then(()=>Ar)},{path:"reset-password",name:"Reset Password",beforeEnter:[C.requiresNoAuth,C.resetUser],meta:{title:{en:"Reset Password",ru:"Сбросить Пароль"}},component:()=>Promise.resolve().then(()=>ar)},{path:"signup",name:"Sign Up",beforeEnter:[C.requiresNoAuth,C.resetUser],meta:{title:{en:"Sign Up",ru:"Регистрация"}},component:()=>Promise.resolve().then(()=>gr)},{path:"enter-code",name:"Enter Code",beforeEnter:[C.requiresNoAuth,C.checkUser],meta:{title:{en:"Enter Code",ru:"Введите Код"}},component:()=>Promise.resolve().then(()=>gd)},{path:"enter-password",name:"Enter Password",beforeEnter:[C.requiresNoAuth,C.checkUser],meta:{title:{en:"Enter Password",ru:"Введите Пароль"}},component:()=>Promise.resolve().then(()=>kd)},{path:"invite",name:"Invite",meta:{title:{en:"Invite",ru:"Приглашение"}},component:()=>Promise.resolve().then(()=>Od)}]}];exports.authStore=u.auth;exports.twofaStore=u.twofa;exports.Auth=Xe;exports.EnterCode=ne;exports.EnterPassword=de;exports.Invite=Ze;exports.ResetPassword=oe;exports.SignIn=ae;exports.SignUp=ie;exports.SliderFeatures=rt;exports.authRoutes=Dr;exports.invitesStore=vd;
|
8
|
+
is not a function, but has to be`;d&&(o+=`Found in component ${d}`),console.warn(o)}e.clickOutsideEvent=function(d){e===d.target||e.contains(d.target)||n.value(d,e)},document.body.addEventListener("click",e.clickOutsideEvent)},unmounted(e){document.body.removeEventListener("click",e.clickOutsideEvent)}};function g(e){const n=ze.options[e];return typeof n>"u"?ze.options[e]:n}const jd=r.defineComponent({name:"Vue3ReactiveTelInput",directives:{clickOutside:Vd},props:{modelValue:{type:String,default:""},badClass:{type:[String,Array,Object],default:""},goodClass:{type:[String,Array,Object],default:""},badStyle:{type:[String,Array,Object],default:""},goodStyle:{type:[String,Array,Object],default:""},badInputClass:{type:[String,Array,Object],default:""},goodInputClass:{type:[String,Array,Object],default:""},badInputStyle:{type:[String,Array,Object],default:""},goodInputStyle:{type:[String,Array,Object],default:""},allCountries:{type:Array,default:()=>g("allCountries")},autoFormat:{type:Boolean,default:()=>g("autoFormat")},validation:{type:[Boolean,Object],default:!1},customValidate:{type:[Boolean,RegExp],default:()=>g("customValidate")},defaultCountry:{type:String,default:()=>g("defaultCountry")},disabled:{type:Boolean,default:()=>g("disabled")},autoDefaultCountry:{type:Boolean,default:()=>g("autoDefaultCountry")},dropdownOptions:{type:Object,default:()=>g("dropdownOptions")},ignoredCountries:{type:Array,default:()=>g("ignoredCountries")},inputOptions:{type:Object,default:()=>g("inputOptions")},invalidMsg:{type:String,default:()=>g("invalidMsg")},mode:{type:String,default:()=>g("mode")},onlyCountries:{type:Array,default:()=>g("onlyCountries")},preferredCountries:{type:Array,default:()=>g("preferredCountries")},validCharactersOnly:{type:Boolean,default:()=>g("validCharactersOnly")},rootClass:{type:[String,Array,Object],default:()=>g("styleClasses")},inputClass:{type:[String,Array,Object],default:()=>""},divInputClass:{type:[String,Array,Object],default:()=>""},rootStyle:{type:[String,Array,Object],default:()=>""},dropdownStyle:{type:[String,Array,Object],default:()=>""},listStyle:{type:[String,Array,Object],default:()=>""},inputStyle:{type:[String,Array,Object],default:()=>""},inputId:{type:[String,Array,Object],default:()=>""},Placeholder:{type:[String,Object,Function],default:()=>""}},data(){return{counter:5,initCounter:5,message:{action:null,amount:null},phone:this.modelValue?this.modelValue:"",activeCountryCode:"",open:!1,finishMounted:!1,selectedIndex:null,typeToFindInput:"",typeToFindTimer:null,dropdownOpenDirection:"below",parsedPlaceholder:this.Placeholder!==""?this.Placeholder:this.inputOptions.placeholder}},watch:{activeCountry(e,n){if(!e&&(n!=null&&n.iso2)){this.activeCountryCode=n.iso2;return}e!=null&&e.iso2&&this.$emit("country-changed",e)},"phoneObject.countryCode":function(e){this.activeCountryCode=e},"phoneObject.valid":function(){this.$emit("validate",this.phoneObject)},"phoneObject.formatted":function(e){!this.autoFormat||this.customValidate||(this.emitInput(e),this.$nextTick(()=>{e&&!this.value&&(this.phone=e)}))},"inputOptions.placeholder":function(){this.resetPlaceholder()},value(e,n){this.testCharacters()?this.phone=e:this.$nextTick(()=>{this.phone=n,this.onInput()})},open(e){e?(this.setDropdownPosition(),this.$emit("open")):this.$emit("close")}},mounted(){this.cleanInvalidCharacters(),this.initializeCountry().then(()=>{var e;!this.phone&&((e=this.inputOptions)!=null&&e.showDialCode)&&this.activeCountryCode&&(this.phone=`+${this.activeCountryCode}`),this.$emit("validate",this.phoneObject)}).catch(console.error).then(()=>{this.finishMounted=!0})},computed:{activeCountry(){return this.findCountry(this.activeCountryCode)},activeCountryFlag(){return this.activeCountry?this.activeCountry.flag:null},parsedMode(){return this.mode==="auto"?!this.phone||this.phone[0]!=="+"?"national":"international":["international","national"].includes(this.mode)?this.mode:(console.error('Invalid value of prop "mode"'),"international")},filteredCountries(){return this.onlyCountries.length?this.allCountries.filter(({iso2:e})=>this.onlyCountries.some(n=>n.toUpperCase()===e)):this.ignoredCountries.length?this.allCountries.filter(({iso2:e})=>!this.ignoredCountries.includes(e.toUpperCase())&&!this.ignoredCountries.includes(e.toLowerCase())):this.allCountries},sortedCountries(){return[...this.getCountries(this.preferredCountries).map(n=>({...n,preferred:!0})),...this.filteredCountries]},phoneObject(){var i,a,s;let e;((i=this.phone)==null?void 0:i[0])==="+"?e=U(this.phone)||{}:e=U(this.phone,this.activeCountryCode)||{};const{metadata:n,...t}=e;console.log(e);let d=(a=e.isValid)==null?void 0:a.call(e),o=this.phone;return d&&(o=(s=e.format)==null?void 0:s.call(e,this.parsedMode.toUpperCase(),{nationalPrefix:!1})),e.country&&(this.ignoredCountries.length||this.onlyCountries.length)&&(this.findCountry(e.country)||(d=!1,Object.assign(e,{country:null}))),Object.assign(t,{countryCode:e.country,valid:d,country:this.activeCountry,formatted:o}),t},classes(){return this.phoneObject.valid===!0?this.goodClass:this.phoneObject.valid===!1?this.badClass:void 0},styles(){return this.phoneObject.valid===!0?this.goodStyle:this.phoneObject.valid===!1?this.badStyle:void 0},Iclasses(){return this.phoneObject.valid===!0?this.goodInputClass:this.phoneObject.valid===!1?this.badInputClass:void 0},Istyles(){return this.phoneObject.valid===!0?this.goodInputStyle:this.phoneObject.valid===!1?this.badInputStyle:void 0}},methods:{resetPlaceholder(){this.parsedPlaceholder=this.inputOptions.placeholder},initializeCountry(){return new Promise(e=>{var t;if(((t=this.phone)==null?void 0:t[0])==="+"){e();return}if(this.defaultCountry){this.choose(this.defaultCountry),e();return}const n=this.preferredCountries[0]||this.filteredCountries[0];this.autoDefaultCountry?Md().then(d=>{this.choose(d||this.activeCountryCode)}).catch(d=>{console.warn(d),this.choose(n)}).then(()=>{e()}):(this.choose(n),e())})},getCountries(e=[]){return e.map(n=>this.findCountry(n)).filter(Boolean)},findCountry(e=""){return this.filteredCountries.find(n=>n.iso2===e.toUpperCase())},getItemClass(e,n){const t=this.selectedIndex===e,d=e===this.preferredCountries.length-1,o=this.preferredCountries.some(i=>i.toUpperCase()===n);return{highlighted:t,"last-preferred":d,preferred:o}},choose(e){var t,d;let n=e;if(typeof n=="string"&&(n=this.findCountry(n)),!!n){if(((t=this.phone)==null?void 0:t[0])==="+"&&n.iso2&&this.phoneObject.nationalNumber){this.activeCountryCode=n.iso2,this.phone=U(this.phoneObject.nationalNumber,n.iso2).formatInternational();return}if((d=this.inputOptions)!=null&&d.showDialCode&&n){this.phone=`+${n.dialCode}`;return}this.activeCountryCode=n.iso2,this.emitInput(this.phone)}},cleanInvalidCharacters(){const e=this.phone;if(this.validCharactersOnly){const n=this.phone.match(/[()\-+0-9\s]*/g);this.phone=n.join("")}if(this.customValidate&&this.customValidate instanceof RegExp){const n=this.phone.match(this.customValidate);this.phone=n.join("")}e!==this.phone&&this.emitInput(this.phone)},testCharacters(){return this.validCharactersOnly&&!/^[()\-+0-9\s]*$/.test(this.phone)?!1:this.customValidate?this.testCustomValidate():!0},testCustomValidate(){return this.customValidate instanceof RegExp?this.customValidate.test(this.phone):!1},onInput(){this.$refs.input.setCustomValidity(this.phoneObject.valid?"":this.invalidMsg),this.emitInput(this.phoneObject)},emitInput(e){this.$emit("update:modelValue",e)},onBlur(){this.$emit("blur")},onFocus(){zd(this.$refs.input,this.phone.length),this.$emit("focus")},onEnter(){this.$emit("enter")},onSpace(){this.$emit("space")},focus(){this.$refs.input.focus()},toggleDropdown(){this.disabled||(this.open=!this.open)},clickedOutside(){this.open=!1},keyboardNav(e){if(e.keyCode===40){e.preventDefault(),this.open=!0,this.selectedIndex===null?this.selectedIndex=0:this.selectedIndex=Math.min(this.sortedCountries.length-1,this.selectedIndex+1);const n=this.$refs.list.children[this.selectedIndex];n.offsetTop+n.clientHeight>this.$refs.list.scrollTop+this.$refs.list.clientHeight&&(this.$refs.list.scrollTop=n.offsetTop-this.$refs.list.clientHeight+n.clientHeight)}else if(e.keyCode===38){e.preventDefault(),this.open=!0,this.selectedIndex===null?this.selectedIndex=this.sortedCountries.length-1:this.selectedIndex=Math.max(0,this.selectedIndex-1);const n=this.$refs.list.children[this.selectedIndex];n.offsetTop<this.$refs.list.scrollTop&&(this.$refs.list.scrollTop=n.offsetTop)}else if(e.keyCode===13)this.selectedIndex!==null&&this.choose(this.sortedCountries[this.selectedIndex]),this.open=!this.open;else{this.typeToFindInput+=e.key,clearTimeout(this.typeToFindTimer),this.typeToFindTimer=setTimeout(()=>{this.typeToFindInput=""},700);const n=this.sortedCountries.slice(this.preferredCountries.length).findIndex(t=>t.name.toLowerCase().startsWith(this.typeToFindInput));if(n>=0){this.selectedIndex=this.preferredCountries.length+n;const t=this.$refs.list.children[this.selectedIndex],d=t.offsetTop<this.$refs.list.scrollTop,o=t.offsetTop+t.clientHeight>this.$refs.list.scrollTop+this.$refs.list.clientHeight;(d||o)&&(this.$refs.list.scrollTop=t.offsetTop-this.$refs.list.clientHeight/2)}}},reset(){this.selectedIndex=this.sortedCountries.map(e=>e.iso2).indexOf(this.activeCountryCode),this.open=!1},setDropdownPosition(){window.innerHeight-this.$refs.rootElement.getBoundingClientRect().bottom>200?this.dropdownOpenDirection="below":this.dropdownOpenDirection="above"}}}),Ud=["tabindex"],Gd={class:"flex-nowrap flex flex-v-center p-medium vti__selection"},Hd=["innerHTML"],Kd={key:1,class:"vti__country-code"},Wd=["onClick","onMousemove"],qd=["innerHTML"],Xd={key:1},Yd=["type","autocomplete","autofocus","disabled","id","maxlength","name","placeholder","readonly","required","tabindex"],Zd={key:0,class:"mn-t-thin mn-b-thin invalid-feedback"};function Jd(e,n,t,d,o,i){const a=r.resolveDirective("click-outside");return r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createElementVNode("div",{class:r.normalizeClass(["vue3-reactive-tel-input",{"bg-fourth-nano":e.validation},e.$attrs.class,e.rootClass,{disabled:e.disabled},e.classes]),style:r.normalizeStyle([e.rootStyle,e.styles]),ref:"rootElement"},[r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([["vti__dropdown",{open:e.open}],"br-solid br-black-transp br-1px radius-medium"]),tabindex:e.dropdownOptions.tabindex,onKeydown:[n[0]||(n[0]=(...s)=>e.keyboardNav&&e.keyboardNav(...s)),n[2]||(n[2]=r.withKeys((...s)=>e.reset&&e.reset(...s),["esc"]))],onClick:n[1]||(n[1]=(...s)=>e.toggleDropdown&&e.toggleDropdown(...s)),style:r.normalizeStyle([e.dropdownStyle])},[r.createElementVNode("span",Gd,[e.dropdownOptions.showFlags?(r.openBlock(),r.createElementBlock("span",{key:0,innerHTML:e.activeCountryFlag,class:"mn-r-thin"},null,8,Hd)):r.createCommentVNode("",!0),e.dropdownOptions.showDialCodeInSelection?(r.openBlock(),r.createElementBlock("span",Kd," +"+r.toDisplayString(e.activeCountry&&e.activeCountry.dialCode),1)):r.createCommentVNode("",!0)]),r.withDirectives(r.createElementVNode("ul",{ref:"list",class:r.normalizeClass(["bs-black radius-small vti__dropdown-list",e.dropdownOpenDirection]),style:r.normalizeStyle([e.listStyle])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.sortedCountries,(s,$)=>(r.openBlock(),r.createElementBlock("li",{class:r.normalizeClass(["flex-nowrap flex w-max",["vti__dropdown-item",e.getItemClass($,s.iso2)]]),key:s.iso2+(s.preferred?"-preferred":""),onClick:l=>e.choose(s),onMousemove:l=>e.selectedIndex=$},[e.dropdownOptions.showFlags?(r.openBlock(),r.createElementBlock("span",{key:0,innerHTML:s.flag,class:"mn-r-thin"},null,8,qd)):r.createCommentVNode("",!0),r.createElementVNode("strong",null,r.toDisplayString(s.name),1),e.dropdownOptions.showDialCodeInList?(r.openBlock(),r.createElementBlock("span",Xd," +"+r.toDisplayString(s.dialCode),1)):r.createCommentVNode("",!0)],42,Wd))),128))],6),[[r.vShow,e.open]])],46,Ud)),[[a,e.clickedOutside]]),r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":n[3]||(n[3]=s=>e.phone=s),pattern:"[0-9]*",ref:"input",type:e.inputOptions.type,autocomplete:e.inputOptions.autocomplete,autofocus:e.inputOptions.autofocus,class:r.normalizeClass(["vti__input",e.inputOptions.styleClasses,e.inputClass,e.Iclasses]),style:r.normalizeStyle([e.inputStyle,e.Istyles]),disabled:e.disabled,id:e.inputId!==""?e.inputId:e.inputOptions.id,maxlength:e.inputOptions.maxlength,name:e.inputId!==""?e.inputId:e.inputOptions.name,placeholder:e.parsedPlaceholder,readonly:e.inputOptions.readonly,required:e.inputOptions.required,tabindex:e.inputOptions.tabindex,onBlur:n[4]||(n[4]=(...s)=>e.onBlur&&e.onBlur(...s)),onFocus:n[5]||(n[5]=(...s)=>e.onFocus&&e.onFocus(...s)),onInput:n[6]||(n[6]=(...s)=>e.onInput&&e.onInput(...s)),onKeyup:[n[7]||(n[7]=r.withKeys((...s)=>e.onEnter&&e.onEnter(...s),["enter"])),n[8]||(n[8]=r.withKeys((...s)=>e.onSpace&&e.onSpace(...s),["space"]))]},null,46,Yd),[[r.vModelDynamic,e.phone]]),r.renderSlot(e.$slots,"default",{},void 0,!0)],6),r.createVNode(r.Transition,{name:"fade"},{default:r.withCtx(()=>[e.validation?(r.openBlock(),r.createElementBlock("div",Zd," * "+r.toDisplayString(e.validation.message),1)):r.createCommentVNode("",!0)]),_:1})],64)}const re=et._export_sfc(jd,[["render",Jd],["__scopeId","data-v-50353ca7"]]);function Be(e){const n=e;n.__i18n=n.__i18n||[],n.__i18n.push({locale:"",resource:{en:{forgotPasswordTitle:t=>{const{normalize:d}=t;return d(["Forgot Password?"])},instructions:t=>{const{normalize:d}=t;return d(["To reset your password, specify the phone or email used during registration."])},smsInfo:t=>{const{normalize:d}=t;return d(["We will send you an SMS with a confirmation code to reset your password, which you will need to enter in the next step."])},emailInfo:t=>{const{normalize:d}=t;return d(["We will send you an email with a confirmation code to reset your password, which you will need to enter in the next step."])},phone:t=>{const{normalize:d}=t;return d(["Phone"])},email:t=>{const{normalize:d}=t;return d(["Email"])},phonePlaceholder:t=>{const{normalize:d}=t;return d(["Enter your phone"])},emailPlaceholder:t=>{const{normalize:d}=t;return d(["Enter your email"])},sendCode:t=>{const{normalize:d}=t;return d(["Send code"])}},ru:{forgotPasswordTitle:t=>{const{normalize:d}=t;return d(["Забыли пароль?"])},instructions:t=>{const{normalize:d}=t;return d(["Чтобы сбросить пароль, укажите телефон или email, использованные при регистрации."])},smsInfo:t=>{const{normalize:d}=t;return d(["Мы вышлем вам SMS с кодом подтверждения для сброса пароля, который вы должны будете ввести в следующем шаге."])},emailInfo:t=>{const{normalize:d}=t;return d(["Мы отправим вам электронное письмо с кодом подтверждения для сброса пароля, который вы должны будете ввести в следующем шаге."])},phone:t=>{const{normalize:d}=t;return d(["Телефон"])},email:t=>{const{normalize:d}=t;return d(["Email"])},phonePlaceholder:t=>{const{normalize:d}=t;return d(["Введите ваш телефон"])},emailPlaceholder:t=>{const{normalize:d}=t;return d(["Введите ваш email"])},sendCode:t=>{const{normalize:d}=t;return d(["Отправить код"])}}}})}const Qd={class:"t-left pd-medium"},er={class:"mn-small"},tr={class:"mn-small t-transp"},nr={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},dr={key:0,class:"mn-semi radius-small o-hidden"},rr={class:"mn-small t-transp"},or={key:0,class:"mn-semi radius-small o-hidden"},ir={class:"mn-small t-transp"},oe={__name:"ResetPassword",setup(e){const{t:n}=I.useI18n({inheritLocale:!0,useScope:"local"}),t=r.ref(null),d=r.ref(null);b.useRoute();const o=b.useRouter(),i=r.ref("phone");async function a(){try{i.value==="phone"&&await y.validateInputs(t,y.validatePhone,u.state.user.phone,"Некорректный телефон"),i.value==="email"&&await y.validateInputs(d,y.validateEmail,u.state.user.email,"Некорректный email")}catch{throw new Error}try{await u.actions.resetPassword(u.state.user,i.value,"reset-password")}catch($){throw console.log($),new Error}}function s(){o.push({name:"Enter Code",query:{type:i.value,method:"reset-password"}})}return($,l)=>(r.openBlock(),r.createElementBlock("section",Qd,[r.createElementVNode("h3",er,r.toDisplayString(r.unref(n)("forgotPasswordTitle")),1),r.createElementVNode("p",tr,r.toDisplayString(r.unref(n)("instructions")),1),r.createElementVNode("div",nr,[r.createVNode(Y._sfc_main,{selected:i.value,"onUpdate:selected":l[0]||(l[0]=p=>i.value=p),tabs:[{name:r.unref(n)("phone"),value:"phone"},{name:r.unref(n)("email"),value:"email"}]},null,8,["selected","tabs"])]),r.createElementVNode("div",null,[r.createVNode(r.Transition,{name:"slide-fade"},{default:r.withCtx(()=>[i.value==="phone"?(r.openBlock(),r.createElementBlock("div",dr,[r.createElementVNode("p",rr,r.toDisplayString(r.unref(n)("smsInfo")),1),r.createVNode(re,{modelValue:u.state.user.phone,"onUpdate:modelValue":l[1]||(l[1]=p=>u.state.user.phone=p),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:t.value,mode:"national",inputOptions:{placeholder:r.unref(n)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])])):r.createCommentVNode("",!0)]),_:1}),r.createVNode(r.Transition,{name:"slide-fade"},{default:r.withCtx(()=>[i.value==="email"?(r.openBlock(),r.createElementBlock("div",or,[r.createElementVNode("p",ir,r.toDisplayString(r.unref(n)("emailInfo")),1),r.createVNode(u.Field,{field:u.state.user.email,"onUpdate:field":l[2]||(l[2]=p=>u.state.user.email=p),placeholder:r.unref(n)("emailPlaceholder"),validation:d.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])])):r.createCommentVNode("",!0)]),_:1})]),r.createVNode(u._sfc_main,{submit:a,callback:s,class:"mn-big"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("sendCode")),1)]),_:1})]))}};typeof Be=="function"&&Be(oe);const ar=Object.freeze(Object.defineProperty({__proto__:null,default:oe},Symbol.toStringTag,{value:"Module"}));function Le(e){const n=e;n.__i18n=n.__i18n||[],n.__i18n.push({locale:"",resource:{en:{title:t=>{const{normalize:d}=t;return d(["Sign Up to The Commune"])},description:t=>{const{normalize:d}=t;return d(["Choose a convenient way to register via phone or email:"])},phone:t=>{const{normalize:d}=t;return d(["Phone"])},email:t=>{const{normalize:d}=t;return d(["Email"])},phonePlaceholder:t=>{const{normalize:d}=t;return d(["Enter your phone"])},emailPlaceholder:t=>{const{normalize:d}=t;return d(["Enter your email"])},emailNotice:t=>{const{normalize:d}=t;return d(["We will send you an email with a confirmation code that you will need to enter in the next step."])},smsNotice:t=>{const{normalize:d}=t;return d(["We will send you an SMS with a confirmation code that you will need to enter in the next step."])},sendCode:t=>{const{normalize:d}=t;return d(["Send Code"])},haveAccount:t=>{const{normalize:d}=t;return d(["Already have an account?"])}},ru:{title:t=>{const{normalize:d}=t;return d(["Новая учетная запись"])},description:t=>{const{normalize:d}=t;return d(["Выберите удобный способ регистрации через телефон или email:"])},phone:t=>{const{normalize:d}=t;return d(["Телефон"])},email:t=>{const{normalize:d}=t;return d(["Email"])},phonePlaceholder:t=>{const{normalize:d}=t;return d(["Введите ваш телефон"])},emailPlaceholder:t=>{const{normalize:d}=t;return d(["Введите ваш email"])},emailNotice:t=>{const{normalize:d}=t;return d(["Мы отправим вам электронное письмо с кодом подтверждения, который вы должны будете ввести в следующем шаге."])},smsNotice:t=>{const{normalize:d}=t;return d(["Мы вышлем вам SMS с кодом подтверждения, который вы должны будете ввести в следующем шаге."])},sendCode:t=>{const{normalize:d}=t;return d(["Отправить код"])},haveAccount:t=>{const{normalize:d}=t;return d(["У вас уже есть аккаунт?"])}}}})}const sr={class:"t-left pd-medium"},lr={class:"mn-small"},ur={class:"mn-small t-transp"},$r={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},cr={class:""},fr={class:"mn-semi radius-small"},pr={class:"mn-small t-transp"},mr={class:"mn-semi radius-small o-hidden"},hr={class:"mn-small t-transp"},yr={class:"w-100"},ie={__name:"SignUp",setup(e){const{t:n}=I.useI18n({inheritLocale:!0,useScope:"local"}),t=r.ref(null),d=r.ref(null);b.useRoute();const o=b.useRouter(),i=r.ref("phone");async function a(){try{i.value==="phone"&&await y.validateInputs(t,y.validatePhone,u.state.user.phone,"Некорректный телефон"),i.value==="email"&&await y.validateInputs(d,y.validateEmail,u.state.user.email,"Некорректный email")}catch{throw new Error}try{await u.sendCode(u.state.user,"signup",i.value)}catch{throw new Error}}function s(){o.push({name:"Enter Code"})}return($,l)=>{const p=r.resolveComponent("router-link");return r.openBlock(),r.createElementBlock("section",sr,[r.createElementVNode("h3",lr,r.toDisplayString(r.unref(n)("title")),1),r.createElementVNode("p",ur,r.toDisplayString(r.unref(n)("description")),1),r.createElementVNode("div",$r,[r.createVNode(Y._sfc_main,{selected:i.value,"onUpdate:selected":l[0]||(l[0]=m=>i.value=m),tabs:[{name:r.unref(n)("phone"),value:"phone"},{name:r.unref(n)("email"),value:"email"}]},null,8,["selected","tabs"])]),r.createElementVNode("div",cr,[r.createVNode(r.Transition,{name:"slide-fade"},{default:r.withCtx(()=>[r.withDirectives(r.createElementVNode("div",fr,[r.createElementVNode("p",pr,r.toDisplayString(r.unref(n)("smsNotice")),1),r.createVNode(re,{modelValue:u.state.user.phone,"onUpdate:modelValue":l[1]||(l[1]=m=>u.state.user.phone=m),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:t.value,mode:"national",inputOptions:{placeholder:r.unref(n)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])],512),[[r.vShow,i.value==="phone"]])]),_:1}),r.createVNode(r.Transition,{name:"slide-fade"},{default:r.withCtx(()=>[r.withDirectives(r.createElementVNode("div",mr,[r.createElementVNode("p",hr,r.toDisplayString(r.unref(n)("emailNotice")),1),r.createVNode(u.Field,{field:u.state.user.email,"onUpdate:field":l[2]||(l[2]=m=>u.state.user.email=m),placeholder:r.unref(n)("emailPlaceholder"),validation:d.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[r.vShow,i.value==="email"]])]),_:1})]),r.createVNode(u._sfc_main,{submit:a,callback:s,class:"mn-big"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("sendCode")),1)]),_:1}),r.createElementVNode("div",yr,[r.createVNode(p,{to:"/auth/signin",class:"underline mn-medium d-block t-blue"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("haveAccount")),1)]),_:1})])])}}};typeof Le=="function"&&Le(ie);const gr=Object.freeze(Object.defineProperty({__proto__:null,default:ie},Symbol.toStringTag,{value:"Module"}));function Ve(e){const n=e;n.__i18n=n.__i18n||[],n.__i18n.push({locale:"",resource:{en:{title:t=>{const{normalize:d}=t;return d(["Welcome to The Commune"])},subtitle:t=>{const{normalize:d}=t;return d(["Sign In to Continue"])},signup:t=>{const{normalize:d}=t;return d(["Don't have an account?"])},phone:t=>{const{normalize:d}=t;return d(["Phone"])},email:t=>{const{normalize:d}=t;return d(["Email"])},phonePlaceholder:t=>{const{normalize:d}=t;return d(["Enter your phone"])},emailPlaceholder:t=>{const{normalize:d}=t;return d(["Enter your email"])},haveAccount:t=>{const{normalize:d}=t;return d(["Don't have an account? Sign Up"])},passwordPlaceholder:t=>{const{normalize:d}=t;return d(["Enter your password"])},forgotPassword:t=>{const{normalize:d}=t;return d(["Forgot Password?"])},signin:t=>{const{normalize:d}=t;return d(["Sign In"])},soon:t=>{const{normalize:d}=t;return d(["SOON"])},signinMetamask:t=>{const{normalize:d}=t;return d(["Sign In with Apple"])}},ru:{title:t=>{const{normalize:d}=t;return d(["Приветствуем вас,"])},subtitle:t=>{const{normalize:d}=t;return d(["Войдите для продолжения"])},signup:t=>{const{normalize:d}=t;return d(["Нет аккаунта?"])},phone:t=>{const{normalize:d}=t;return d(["Телефон"])},email:t=>{const{normalize:d}=t;return d(["Email"])},phonePlaceholder:t=>{const{normalize:d}=t;return d(["Введите ваш телефон"])},emailPlaceholder:t=>{const{normalize:d}=t;return d(["Введите ваш email"])},haveAccount:t=>{const{normalize:d}=t;return d(["Нет аккаунта? Зарегистрироваться"])},passwordPlaceholder:t=>{const{normalize:d}=t;return d(["Введите ваш пароль"])},forgotPassword:t=>{const{normalize:d}=t;return d(["Забыли пароль?"])},signin:t=>{const{normalize:d}=t;return d(["Войти"])},soon:t=>{const{normalize:d}=t;return d(["СКОРО"])},signinMetamask:t=>{const{normalize:d}=t;return d(["Войти через Apple"])}}}})}const vr={class:""},br={class:"mn-medium"},_r=r.createElementVNode("br",null,null,-1),Cr={class:"t-semi"},wr={class:"mn-big"},Pr={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},Nr={class:""},Or={class:"mn-thin radius-small"},Er={class:"mn-thin radius-small o-hidden"},Sr={class:"w-100 mn-big"},ae={__name:"SignIn",setup(e){const{t:n}=I.useI18n({inheritLocale:!0,useScope:"local"}),t=r.ref(null),d=r.ref(null),o=r.ref(null);b.useRoute();const i=b.useRouter(),a=r.ref("phone");async function s(){try{a.value==="phone"&&await y.validateInputs(t,y.validatePhone,u.state.user.phone,"Некорректный телефон"),a.value==="email"&&await y.validateInputs(o,y.validateEmail,u.state.user.email,"Некорректный email")}catch{throw new Error}await u.actions.login(u.state.user,a.value)}function $(){i.push({name:"User Profile",params:{_id:u.state.user._id}})}return(l,p)=>{const m=r.resolveComponent("router-link");return r.openBlock(),r.createElementBlock("section",vr,[r.createElementVNode("h3",br,[r.createTextVNode(r.toDisplayString(r.unref(n)("title"))+" ",1),_r,r.createElementVNode("span",Cr,r.toDisplayString(r.unref(n)("subtitle")),1)]),r.createElementVNode("p",wr,[r.createVNode(m,{to:{name:"Sign Up"},class:"underline t-second"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("signup")),1)]),_:1})]),r.createElementVNode("div",Pr,[r.createVNode(Y._sfc_main,{selected:a.value,"onUpdate:selected":p[0]||(p[0]=c=>a.value=c),tabs:[{name:r.unref(n)("phone"),value:"phone"},{name:r.unref(n)("email"),value:"email"}]},null,8,["selected","tabs"])]),r.createElementVNode("div",Nr,[r.createVNode(r.Transition,{name:"slide-fade"},{default:r.withCtx(()=>[r.withDirectives(r.createElementVNode("div",Or,[r.createVNode(re,{modelValue:u.state.user.phone,"onUpdate:modelValue":p[1]||(p[1]=c=>u.state.user.phone=c),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:t.value,mode:"national",inputOptions:{placeholder:r.unref(n)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])],512),[[r.vShow,a.value==="phone"]])]),_:1}),r.createVNode(r.Transition,{name:"slide-fade"},{default:r.withCtx(()=>[r.withDirectives(r.createElementVNode("div",Er,[r.createVNode(u.Field,{field:u.state.user.email,"onUpdate:field":p[2]||(p[2]=c=>u.state.user.email=c),placeholder:r.unref(n)("emailPlaceholder"),validation:o.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[r.vShow,a.value==="email"]])]),_:1})]),r.createVNode(u.Field,{field:u.state.user.password,"onUpdate:field":p[3]||(p[3]=c=>u.state.user.password=c),type:"password",validation:d.value,placeholder:r.unref(n)("passwordPlaceholder"),class:"bg-grey pd-medium radius-small mn-semi"},null,8,["field","validation","placeholder"]),r.createElementVNode("div",Sr,[r.createVNode(m,{to:"/auth/reset-password",class:"underline d-block t-blue"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("forgotPassword")),1)]),_:1})]),r.createVNode(u._sfc_main,{submit:s,callback:$,class:"mn-thin"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(n)("signin")),1)]),_:1})])}}};typeof Ve=="function"&&Ve(ae);const Ir=Object.freeze(Object.defineProperty({__proto__:null,default:ae},Symbol.toStringTag,{value:"Module"})),Tr=[{path:"auth",name:"Authentication",meta:{title:{en:"Sign In",ru:"Вход"}},component:Xe,children:[{path:"signin",name:"Sign In",beforeEnter:[C.requiresNoAuth,C.resetUser],meta:{title:{en:"Sign In",ru:"Вход"}},component:()=>Promise.resolve().then(()=>Ir)},{path:"reset-password",name:"Reset Password",beforeEnter:[C.requiresNoAuth,C.resetUser],meta:{title:{en:"Reset Password",ru:"Сбросить Пароль"}},component:()=>Promise.resolve().then(()=>ar)},{path:"signup",name:"Sign Up",beforeEnter:[C.requiresNoAuth,C.resetUser],meta:{title:{en:"Sign Up",ru:"Регистрация"}},component:()=>Promise.resolve().then(()=>gr)},{path:"enter-code",name:"Enter Code",beforeEnter:[C.requiresNoAuth,C.checkUser],meta:{title:{en:"Enter Code",ru:"Введите Код"}},component:()=>Promise.resolve().then(()=>gd)},{path:"enter-password",name:"Enter Password",beforeEnter:[C.requiresNoAuth,C.checkUser],meta:{title:{en:"Enter Password",ru:"Введите Пароль"}},component:()=>Promise.resolve().then(()=>kd)},{path:"invite",name:"Invite",meta:{title:{en:"Invite",ru:"Приглашение"}},component:()=>Promise.resolve().then(()=>Od)}]}];exports.authStore=u.auth;exports.twofaStore=u.twofa;exports.Auth=Xe;exports.EnterCode=ne;exports.EnterPassword=de;exports.Invite=Ze;exports.ResetPassword=oe;exports.SignIn=ae;exports.SignUp=ie;exports.SliderFeatures=rt;exports.authRoutes=Tr;exports.invitesStore=vd;
|