@ozdao/prometheus-framework 0.1.77 → 0.1.79

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. package/dist/main.css +1 -1
  2. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  3. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +33 -30
  4. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  5. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +2 -44
  6. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  7. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +44 -2
  8. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  9. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +1 -1
  10. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  11. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +41 -43
  12. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  13. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +33 -35
  14. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  15. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +1 -1
  16. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  17. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +43 -45
  18. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  19. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +87 -84
  20. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  21. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +44 -46
  22. package/dist/prometheus-framework/src/modules/auth/localization/SignIn.json.cjs +1 -0
  23. package/dist/prometheus-framework/src/modules/auth/localization/SignIn.json.js +38 -0
  24. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  25. package/dist/prometheus-framework/src/modules/auth/store/auth.js +93 -75
  26. package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.js +4 -3
  28. package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.js +12 -11
  30. package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.cjs +2 -2
  31. package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.js +12 -11
  32. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js +5 -4
  34. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +2 -2
  35. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +20 -19
  36. package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.cjs +1 -1
  37. package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.js +15 -13
  38. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
  40. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  42. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
  44. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  46. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.js +1 -1
  48. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.js +1 -1
  50. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  52. package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.js +1 -1
  54. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  56. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +1 -1
  58. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  60. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileOrganizations.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileOrganizations.vue.js +1 -1
  62. package/dist/prometheus-framework.cjs.js +10 -10
  63. package/dist/prometheus-framework.es.js +8 -5
  64. package/dist/style.css +1 -1
  65. package/package.json +1 -2
  66. package/src/components/Field/Field.vue +4 -1
  67. package/src/components/Status/Status.vue +5 -8
  68. package/src/modules/auth/components/layouts/Auth.vue +45 -36
  69. package/src/modules/auth/components/pages/EnterCode.vue +0 -17
  70. package/src/modules/auth/components/pages/EnterPassword.vue +0 -23
  71. package/src/modules/auth/components/pages/ResetPassword.vue +0 -27
  72. package/src/modules/auth/components/pages/SignIn.vue +17 -47
  73. package/src/modules/auth/components/pages/SignUp.vue +0 -29
  74. package/src/modules/auth/localization/EnterCode.json +14 -0
  75. package/src/modules/auth/localization/EnterPassword.json +20 -0
  76. package/src/modules/auth/localization/ResetPassword.json +24 -0
  77. package/src/modules/auth/localization/SignIn.json +34 -0
  78. package/src/modules/auth/localization/SignUp.json +26 -0
  79. package/src/modules/auth/store/auth.js +20 -20
  80. package/src/modules/constructor/components/elements/Bullets.vue +1 -0
  81. package/src/modules/constructor/components/elements/Caption.vue +1 -0
  82. package/src/modules/constructor/components/elements/H2.vue +1 -0
  83. package/src/modules/constructor/components/elements/ImageUpload.vue +1 -1
  84. package/src/modules/constructor/components/elements/Textarea.vue +1 -0
  85. package/src/modules/globals/localization/methods/get-app-locales.js +13 -0
  86. package/src/modules/globals/localization/vue-i18n.js +20 -14
  87. package/src/modules/globals/localization/vue-i18n.singleton.js +1 -1
  88. package/src/modules/globals/localization/vue-i18n-new.js +0 -70
@@ -1,40 +1,39 @@
1
- import { ref as m, openBlock as u, createElementBlock as p, createElementVNode as s, toDisplayString as r, unref as o, createVNode as i, Transition as _, withCtx as c, createCommentVNode as v, createTextVNode as P } from "vue";
2
- import k from "../../../../components/Tab/Tab.vue.js";
1
+ import { ref as m, openBlock as u, createElementBlock as p, createElementVNode as l, toDisplayString as r, unref as t, createVNode as i, Transition as _, withCtx as c, createCommentVNode as v, createTextVNode as V } from "vue";
2
+ import P from "../../../../components/Tab/Tab.vue2.js";
3
3
  import C from "../../../../components/Field/Field.vue2.js";
4
4
  import E from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
5
  import I from "../../../../components/Button/Button.vue2.js";
6
- import { useRoute as x, useRouter as N } from "vue-router";
7
- import { useI18n as S } from "vue-i18n";
8
- import { state as a, actions as T } from "../../store/auth.js";
6
+ import { useRoute as k, useRouter as x } from "vue-router";
7
+ import { useI18n as N } from "vue-i18n";
8
+ import { state as a, actions as S } from "../../store/auth.js";
9
9
  import "../../store/twofa.js";
10
- import { validateInputs as w, validatePhone as D, validateEmail as F } from "../../../middlewares/client/inputs.validation.js";
10
+ import { validateInputs as w, validatePhone as T, validateEmail as D } from "../../../middlewares/client/inputs.validation.js";
11
11
  import "./ResetPassword.vue2.js";
12
- import b from "./ResetPassword.vue3.js";
13
- const O = { class: "t-left pd-medium" }, R = { class: "mn-small" }, U = { class: "mn-small t-transp" }, B = { class: "mn-small p-small uppercase t-semi bg-grey radius-big o-hidden" }, L = {
12
+ const F = { class: "t-left pd-medium" }, O = { class: "mn-small" }, R = { class: "mn-small t-transp" }, U = { class: "mn-small p-small uppercase t-semi bg-grey radius-big o-hidden" }, B = {
14
13
  key: 0,
15
14
  class: "mn-semi radius-small o-hidden"
16
- }, $ = { class: "mn-small t-transp" }, q = {
15
+ }, L = { class: "mn-small t-transp" }, $ = {
17
16
  key: 0,
18
17
  class: "mn-semi radius-small o-hidden"
19
- }, A = { class: "mn-small t-transp" }, j = {
18
+ }, q = { class: "mn-small t-transp" }, Z = {
20
19
  __name: "ResetPassword",
21
- setup(z) {
22
- const { t: e } = S({
20
+ setup(A) {
21
+ const { t: e } = N({
23
22
  inheritLocale: !0,
24
23
  useScope: "local"
25
24
  }), h = m(null), f = m(null);
26
- x();
27
- const g = N(), t = m("phone");
28
- async function y() {
25
+ k();
26
+ const g = x(), o = m("phone");
27
+ async function b() {
29
28
  try {
30
- t.value === "phone" && await w(
29
+ o.value === "phone" && await w(
31
30
  h,
32
- D,
31
+ T,
33
32
  a.user.phone,
34
33
  "Некорректный телефон"
35
- ), t.value === "email" && await w(
34
+ ), o.value === "email" && await w(
36
35
  f,
37
- F,
36
+ D,
38
37
  a.user.email,
39
38
  "Некорректный email"
40
39
  );
@@ -42,35 +41,35 @@ const O = { class: "t-left pd-medium" }, R = { class: "mn-small" }, U = { class:
42
41
  throw new Error();
43
42
  }
44
43
  try {
45
- await T.resetPassword(a.user, t.value, "reset-password");
44
+ await S.resetPassword(a.user, o.value, "reset-password");
46
45
  } catch (d) {
47
46
  throw console.log(d), new Error();
48
47
  }
49
48
  }
50
- function V() {
51
- g.push({ name: "Enter Code", query: { type: t.value, method: "reset-password" } });
49
+ function y() {
50
+ g.push({ name: "Enter Code", query: { type: o.value, method: "reset-password" } });
52
51
  }
53
- return (d, l) => (u(), p("section", O, [
54
- s("h3", R, r(o(e)("forgotPasswordTitle")), 1),
55
- s("p", U, r(o(e)("instructions")), 1),
56
- s("div", B, [
57
- i(k, {
58
- selected: t.value,
59
- "onUpdate:selected": l[0] || (l[0] = (n) => t.value = n),
52
+ return (d, s) => (u(), p("section", F, [
53
+ l("h3", O, r(t(e)("forgotPasswordTitle")), 1),
54
+ l("p", R, r(t(e)("instructions")), 1),
55
+ l("div", U, [
56
+ i(P, {
57
+ selected: o.value,
58
+ "onUpdate:selected": s[0] || (s[0] = (n) => o.value = n),
60
59
  tabs: [
61
- { name: o(e)("phone"), value: "phone" },
62
- { name: o(e)("email"), value: "email" }
60
+ { name: t(e)("phone"), value: "phone" },
61
+ { name: t(e)("email"), value: "email" }
63
62
  ]
64
63
  }, null, 8, ["selected", "tabs"])
65
64
  ]),
66
- s("div", null, [
65
+ l("div", null, [
67
66
  i(_, { name: "slide-fade" }, {
68
67
  default: c(() => [
69
- t.value === "phone" ? (u(), p("div", L, [
70
- s("p", $, r(o(e)("smsInfo")), 1),
68
+ o.value === "phone" ? (u(), p("div", B, [
69
+ l("p", L, r(t(e)("smsInfo")), 1),
71
70
  i(E, {
72
71
  modelValue: a.user.phone,
73
- "onUpdate:modelValue": l[1] || (l[1] = (n) => a.user.phone = n),
72
+ "onUpdate:modelValue": s[1] || (s[1] = (n) => a.user.phone = n),
74
73
  dropdownOptions: {
75
74
  showDialCodeInSelection: !0,
76
75
  showFlags: !0,
@@ -78,7 +77,7 @@ const O = { class: "t-left pd-medium" }, R = { class: "mn-small" }, U = { class:
78
77
  },
79
78
  validation: h.value,
80
79
  mode: "national",
81
- inputOptions: { placeholder: o(e)("phonePlaceholder") },
80
+ inputOptions: { placeholder: t(e)("phonePlaceholder") },
82
81
  class: "bg-grey pd-small radius-small mn-thin"
83
82
  }, null, 8, ["modelValue", "validation", "inputOptions"])
84
83
  ])) : v("", !0)
@@ -87,12 +86,12 @@ const O = { class: "t-left pd-medium" }, R = { class: "mn-small" }, U = { class:
87
86
  }),
88
87
  i(_, { name: "slide-fade" }, {
89
88
  default: c(() => [
90
- t.value === "email" ? (u(), p("div", q, [
91
- s("p", A, r(o(e)("emailInfo")), 1),
89
+ o.value === "email" ? (u(), p("div", $, [
90
+ l("p", q, r(t(e)("emailInfo")), 1),
92
91
  i(C, {
93
92
  field: a.user.email,
94
- "onUpdate:field": l[2] || (l[2] = (n) => a.user.email = n),
95
- placeholder: o(e)("emailPlaceholder"),
93
+ "onUpdate:field": s[2] || (s[2] = (n) => a.user.email = n),
94
+ placeholder: t(e)("emailPlaceholder"),
96
95
  validation: f.value,
97
96
  class: "bg-grey pd-medium radius-small"
98
97
  }, null, 8, ["field", "placeholder", "validation"])
@@ -102,19 +101,18 @@ const O = { class: "t-left pd-medium" }, R = { class: "mn-small" }, U = { class:
102
101
  })
103
102
  ]),
104
103
  i(I, {
105
- submit: y,
106
- callback: V,
104
+ submit: b,
105
+ callback: y,
107
106
  class: "mn-big"
108
107
  }, {
109
108
  default: c(() => [
110
- P(r(o(e)("sendCode")), 1)
109
+ V(r(t(e)("sendCode")), 1)
111
110
  ]),
112
111
  _: 1
113
112
  })
114
113
  ]));
115
114
  }
116
115
  };
117
- typeof b == "function" && b(j);
118
116
  export {
119
- j as default
117
+ Z as default
120
118
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),V=require("../../../../components/Tab/Tab.vue.cjs"),u=require("../../../../components/Field/Field.vue2.cjs"),g=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),N=require("../../../../components/Button/Button.vue2.cjs"),c=require("vue-router");require("vue-i18n");const l=require("../../store/auth.cjs"),n=require("../../../middlewares/client/inputs.validation.cjs");require("./SignIn.vue2.cjs");const p=require("./SignIn.vue3.cjs"),b={class:""},E={class:"mn-medium"},y=e.createElementVNode("br",null,null,-1),S={class:"t-semi"},P={class:"mn-big"},q={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},C={class:""},D={class:"mn-thin radius-small"},T={class:"mn-thin radius-small o-hidden"},$={class:"w-100 mn-big"},m={__name:"SignIn",setup(I){const r=e.ref(null),h=e.ref(null),d=e.ref(null);c.useRoute();const v=c.useRouter(),o=e.ref("phone");e.inject("APPLE_CLIENTID"),e.inject("APPLE_REDIRECT_URL");const f=t=>new Promise((s,i)=>{const a=document.createElement("script");a.type="text/javascript",a.src=t,a.onload=s,a.onerror=i,document.head.appendChild(a)});e.onMounted(async()=>{await f("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js")});async function _(){try{o.value==="phone"&&await n.validateInputs(r,n.validatePhone,l.state.user.phone,"Некорректный телефон"),o.value==="email"&&await n.validateInputs(d,n.validateEmail,l.state.user.email,"Некорректный email")}catch{throw new Error}l.state.user.phone=l.state.user.phone.number,await l.actions.login(l.state.user,o.value)}function w(){v.push({name:"User Profile",params:{_id:l.state.user._id},query:{afterAuth:"true"}})}return(t,s)=>{const i=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",b,[e.createElementVNode("h3",E,[e.createTextVNode(e.toDisplayString(t.$t("title"))+" ",1),y,e.createElementVNode("span",S,e.toDisplayString(t.$t("subtitle")),1)]),e.createElementVNode("p",P,[e.createVNode(i,{to:{name:"Sign Up"},class:"underline t-second"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("signup")),1)]),_:1})]),e.createElementVNode("div",q,[e.createVNode(V.default,{selected:o.value,"onUpdate:selected":s[0]||(s[0]=a=>o.value=a),tabs:[{name:t.$t("phone"),value:"phone"},{name:t.$t("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",C,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",D,[e.createVNode(g.default,{modelValue:l.state.user.phone,"onUpdate:modelValue":s[1]||(s[1]=a=>l.state.user.phone=a),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:r.value,mode:"national",inputOptions:{placeholder:t.$t("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])],512),[[e.vShow,o.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",T,[e.createVNode(u.default,{field:l.state.user.email,"onUpdate:field":s[2]||(s[2]=a=>l.state.user.email=a),placeholder:t.$t("emailPlaceholder"),validation:d.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,o.value==="email"]])]),_:1})]),e.createVNode(u.default,{field:l.state.user.password,"onUpdate:field":s[3]||(s[3]=a=>l.state.user.password=a),type:"password",validation:h.value,placeholder:t.$t("passwordPlaceholder"),class:"bg-grey pd-medium radius-small mn-semi"},null,8,["field","validation","placeholder"]),e.createElementVNode("div",$,[e.createVNode(i,{to:"/auth/reset-password",class:"underline d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("forgotPassword")),1)]),_:1})]),e.createVNode(N.default,{submit:_,callback:w,class:"mn-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("signin")),1)]),_:1})])}}};typeof p.default=="function"&&p.default(m);exports.default=m;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../components/Tab/Tab.vue2.cjs"),c=require("../../../../components/Field/Field.vue2.cjs"),V=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),w=require("../../../../components/Button/Button.vue2.cjs"),p=require("vue-router"),N=require("vue-i18n"),b=require("../../localization/SignIn.json.cjs"),a=require("../../store/auth.cjs"),i=require("../../../middlewares/client/inputs.validation.cjs");require("./SignIn.vue2.cjs");const E={class:""},y=["src"],S={class:"mn-medium"},q=e.createElementVNode("br",null,null,-1),x={class:"t-semi"},P={class:"mn-big"},C={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},D={class:""},I={class:"mn-thin radius-small"},T={class:"mn-thin radius-small o-hidden"},U={class:"w-100 mn-big"},j={__name:"SignIn",setup(k){const d=e.ref(null),m=e.ref(null),u=e.ref(null);p.useRoute();const h=p.useRouter(),{t:s}=N.useI18n(b.default),l=e.ref("phone");e.inject("APPLE_CLIENTID"),e.inject("APPLE_REDIRECT_URL");const f=r=>new Promise((n,o)=>{const t=document.createElement("script");t.type="text/javascript",t.src=r,t.onload=n,t.onerror=o,document.head.appendChild(t)});e.onMounted(async()=>{await f("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js")});async function v(){try{l.value==="phone"&&await i.validateInputs(d,i.validatePhone,a.state.user.phone,"Некорректный телефон"),l.value==="email"&&await i.validateInputs(u,i.validateEmail,a.state.user.email,"Некорректный email")}catch{throw new Error}a.state.user.phone=a.state.user.phone.number,await a.actions.login(a.state.user,l.value)}function _(){h.push({name:"User Profile",params:{_id:a.state.user._id},query:{afterAuth:"true"}})}return(r,n)=>{const o=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",E,[e.createElementVNode("img",{src:"/logo/logo_square.svg",class:"i-extra mn-small"},null,8,y),e.createElementVNode("h3",S,[e.createTextVNode(e.toDisplayString(e.unref(s)("title"))+" ",1),q,e.createElementVNode("span",x,e.toDisplayString(e.unref(s)("subtitle")),1)]),e.createElementVNode("p",P,[e.createVNode(o,{to:{name:"Sign Up"},class:"underline t-second"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("signup")),1)]),_:1})]),e.createElementVNode("div",C,[e.createVNode(g.default,{selected:l.value,"onUpdate:selected":n[0]||(n[0]=t=>l.value=t),tabs:[{name:e.unref(s)("phone"),value:"phone"},{name:e.unref(s)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",D,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",I,[e.createVNode(V.default,{modelValue:a.state.user.phone,"onUpdate:modelValue":n[1]||(n[1]=t=>a.state.user.phone=t),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:d.value,mode:"national",inputOptions:{placeholder:e.unref(s)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])],512),[[e.vShow,l.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",T,[e.createVNode(c.default,{field:a.state.user.email,"onUpdate:field":n[2]||(n[2]=t=>a.state.user.email=t),placeholder:e.unref(s)("emailPlaceholder"),validation:u.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,l.value==="email"]])]),_:1})]),e.createVNode(c.default,{field:a.state.user.password,"onUpdate:field":n[3]||(n[3]=t=>a.state.user.password=t),type:"password",validation:m.value,placeholder:e.unref(s)("passwordPlaceholder"),class:"bg-grey pd-medium radius-small mn-semi"},null,8,["field","validation","placeholder"]),e.createElementVNode("div",U,[e.createVNode(o,{to:"/auth/reset-password",class:"underline d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("forgotPassword")),1)]),_:1})]),e.createVNode(w.default,{submit:v,callback:_,class:"mn-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("signin")),1)]),_:1})])}}};exports.default=j;
@@ -1,150 +1,154 @@
1
- import { ref as u, inject as h, onMounted as S, resolveComponent as U, openBlock as k, createElementBlock as C, createElementVNode as s, createTextVNode as p, toDisplayString as n, createVNode as l, withCtx as r, Transition as f, withDirectives as v, vShow as _ } from "vue";
2
- import I from "../../../../components/Tab/Tab.vue.js";
3
- import w from "../../../../components/Field/Field.vue2.js";
4
- import D from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
- import L from "../../../../components/Button/Button.vue2.js";
6
- import { useRoute as R, useRouter as T } from "vue-router";
7
- import "vue-i18n";
8
- import { state as a, actions as j } from "../../store/auth.js";
9
- import { validateInputs as b, validatePhone as A, validateEmail as N } from "../../../middlewares/client/inputs.validation.js";
1
+ import { ref as m, inject as f, onMounted as S, resolveComponent as U, openBlock as C, createElementBlock as k, createElementVNode as l, createTextVNode as p, toDisplayString as r, unref as o, createVNode as i, withCtx as d, Transition as v, withDirectives as g, vShow as w } from "vue";
2
+ import D from "../../../../components/Tab/Tab.vue2.js";
3
+ import b from "../../../../components/Field/Field.vue2.js";
4
+ import L from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
+ import R from "../../../../components/Button/Button.vue2.js";
6
+ import { useRoute as T, useRouter as j } from "vue-router";
7
+ import { useI18n as A } from "vue-i18n";
8
+ import N from "../../localization/SignIn.json.js";
9
+ import { state as t, actions as F } from "../../store/auth.js";
10
+ import { validateInputs as P, validatePhone as O, validateEmail as q } from "../../../middlewares/client/inputs.validation.js";
10
11
  import "./SignIn.vue2.js";
11
- import g from "./SignIn.vue3.js";
12
- const F = { class: "" }, O = { class: "mn-medium" }, B = /* @__PURE__ */ s("br", null, null, -1), q = { class: "t-semi" }, M = { class: "mn-big" }, z = { class: "mn-small p-small uppercase t-semi bg-grey radius-big o-hidden" }, G = { class: "" }, H = { class: "mn-thin radius-small" }, J = { class: "mn-thin radius-small o-hidden" }, K = { class: "w-100 mn-big" }, Q = {
12
+ const B = { class: "" }, $ = ["src"], M = { class: "mn-medium" }, z = /* @__PURE__ */ l("br", null, null, -1), G = { class: "t-semi" }, H = { class: "mn-big" }, J = { class: "mn-small p-small uppercase t-semi bg-grey radius-big o-hidden" }, K = { class: "" }, Q = { class: "mn-thin radius-small" }, W = { class: "mn-thin radius-small o-hidden" }, X = { class: "w-100 mn-big" }, ue = {
13
13
  __name: "SignIn",
14
- setup(W) {
15
- const m = u(null), y = u(null), c = u(null);
16
- R();
17
- const P = T(), i = u("phone");
18
- h("APPLE_CLIENTID"), h("APPLE_REDIRECT_URL");
19
- const $ = (e) => new Promise((o, d) => {
20
- const t = document.createElement("script");
21
- t.type = "text/javascript", t.src = e, t.onload = o, t.onerror = d, document.head.appendChild(t);
14
+ setup(Y) {
15
+ const h = m(null), y = m(null), _ = m(null);
16
+ T();
17
+ const E = j(), { t: s } = A(N), n = m("phone");
18
+ f("APPLE_CLIENTID"), f("APPLE_REDIRECT_URL");
19
+ const V = (c) => new Promise((a, u) => {
20
+ const e = document.createElement("script");
21
+ e.type = "text/javascript", e.src = c, e.onload = a, e.onerror = u, document.head.appendChild(e);
22
22
  });
23
23
  S(async () => {
24
- await $("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js");
24
+ await V("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js");
25
25
  });
26
- async function E() {
26
+ async function x() {
27
27
  try {
28
- i.value === "phone" && await b(
29
- m,
30
- A,
31
- a.user.phone,
28
+ n.value === "phone" && await P(
29
+ h,
30
+ O,
31
+ t.user.phone,
32
32
  "Некорректный телефон"
33
- ), i.value === "email" && await b(
34
- c,
35
- N,
36
- a.user.email,
33
+ ), n.value === "email" && await P(
34
+ _,
35
+ q,
36
+ t.user.email,
37
37
  "Некорректный email"
38
38
  );
39
39
  } catch {
40
40
  throw new Error();
41
41
  }
42
- a.user.phone = a.user.phone.number, await j.login(a.user, i.value);
42
+ t.user.phone = t.user.phone.number, await F.login(t.user, n.value);
43
43
  }
44
- function V() {
45
- P.push({
44
+ function I() {
45
+ E.push({
46
46
  name: "User Profile",
47
47
  params: {
48
- _id: a.user._id
48
+ _id: t.user._id
49
49
  },
50
50
  query: { afterAuth: "true" }
51
51
  });
52
52
  }
53
- return (e, o) => {
54
- const d = U("router-link");
55
- return k(), C("section", F, [
56
- s("h3", O, [
57
- p(n(e.$t("title")) + " ", 1),
58
- B,
59
- s("span", q, n(e.$t("subtitle")), 1)
53
+ return (c, a) => {
54
+ const u = U("router-link");
55
+ return C(), k("section", B, [
56
+ l("img", {
57
+ src: "/logo/logo_square.svg",
58
+ class: "i-extra mn-small"
59
+ }, null, 8, $),
60
+ l("h3", M, [
61
+ p(r(o(s)("title")) + " ", 1),
62
+ z,
63
+ l("span", G, r(o(s)("subtitle")), 1)
60
64
  ]),
61
- s("p", M, [
62
- l(d, {
65
+ l("p", H, [
66
+ i(u, {
63
67
  to: { name: "Sign Up" },
64
68
  class: "underline t-second"
65
69
  }, {
66
- default: r(() => [
67
- p(n(e.$t("signup")), 1)
70
+ default: d(() => [
71
+ p(r(o(s)("signup")), 1)
68
72
  ]),
69
73
  _: 1
70
74
  })
71
75
  ]),
72
- s("div", z, [
73
- l(I, {
74
- selected: i.value,
75
- "onUpdate:selected": o[0] || (o[0] = (t) => i.value = t),
76
+ l("div", J, [
77
+ i(D, {
78
+ selected: n.value,
79
+ "onUpdate:selected": a[0] || (a[0] = (e) => n.value = e),
76
80
  tabs: [
77
- { name: e.$t("phone"), value: "phone" },
78
- { name: e.$t("email"), value: "email" }
81
+ { name: o(s)("phone"), value: "phone" },
82
+ { name: o(s)("email"), value: "email" }
79
83
  ]
80
84
  }, null, 8, ["selected", "tabs"])
81
85
  ]),
82
- s("div", G, [
83
- l(f, { name: "slide-fade" }, {
84
- default: r(() => [
85
- v(s("div", H, [
86
- l(D, {
87
- modelValue: a.user.phone,
88
- "onUpdate:modelValue": o[1] || (o[1] = (t) => a.user.phone = t),
86
+ l("div", K, [
87
+ i(v, { name: "slide-fade" }, {
88
+ default: d(() => [
89
+ g(l("div", Q, [
90
+ i(L, {
91
+ modelValue: t.user.phone,
92
+ "onUpdate:modelValue": a[1] || (a[1] = (e) => t.user.phone = e),
89
93
  dropdownOptions: {
90
94
  showDialCodeInSelection: !0,
91
95
  showFlags: !0,
92
96
  showDialCodeInList: !0
93
97
  },
94
- validation: m.value,
98
+ validation: h.value,
95
99
  mode: "national",
96
- inputOptions: { placeholder: e.$t("phonePlaceholder") },
100
+ inputOptions: { placeholder: o(s)("phonePlaceholder") },
97
101
  class: "bg-grey pd-small radius-small mn-thin"
98
102
  }, null, 8, ["modelValue", "validation", "inputOptions"])
99
103
  ], 512), [
100
- [_, i.value === "phone"]
104
+ [w, n.value === "phone"]
101
105
  ])
102
106
  ]),
103
107
  _: 1
104
108
  }),
105
- l(f, { name: "slide-fade" }, {
106
- default: r(() => [
107
- v(s("div", J, [
108
- l(w, {
109
- field: a.user.email,
110
- "onUpdate:field": o[2] || (o[2] = (t) => a.user.email = t),
111
- placeholder: e.$t("emailPlaceholder"),
112
- validation: c.value,
109
+ i(v, { name: "slide-fade" }, {
110
+ default: d(() => [
111
+ g(l("div", W, [
112
+ i(b, {
113
+ field: t.user.email,
114
+ "onUpdate:field": a[2] || (a[2] = (e) => t.user.email = e),
115
+ placeholder: o(s)("emailPlaceholder"),
116
+ validation: _.value,
113
117
  class: "bg-grey pd-medium radius-small"
114
118
  }, null, 8, ["field", "placeholder", "validation"])
115
119
  ], 512), [
116
- [_, i.value === "email"]
120
+ [w, n.value === "email"]
117
121
  ])
118
122
  ]),
119
123
  _: 1
120
124
  })
121
125
  ]),
122
- l(w, {
123
- field: a.user.password,
124
- "onUpdate:field": o[3] || (o[3] = (t) => a.user.password = t),
126
+ i(b, {
127
+ field: t.user.password,
128
+ "onUpdate:field": a[3] || (a[3] = (e) => t.user.password = e),
125
129
  type: "password",
126
130
  validation: y.value,
127
- placeholder: e.$t("passwordPlaceholder"),
131
+ placeholder: o(s)("passwordPlaceholder"),
128
132
  class: "bg-grey pd-medium radius-small mn-semi"
129
133
  }, null, 8, ["field", "validation", "placeholder"]),
130
- s("div", K, [
131
- l(d, {
134
+ l("div", X, [
135
+ i(u, {
132
136
  to: "/auth/reset-password",
133
137
  class: "underline d-block t-blue"
134
138
  }, {
135
- default: r(() => [
136
- p(n(e.$t("forgotPassword")), 1)
139
+ default: d(() => [
140
+ p(r(o(s)("forgotPassword")), 1)
137
141
  ]),
138
142
  _: 1
139
143
  })
140
144
  ]),
141
- l(L, {
142
- submit: E,
143
- callback: V,
145
+ i(R, {
146
+ submit: x,
147
+ callback: I,
144
148
  class: "mn-thin"
145
149
  }, {
146
- default: r(() => [
147
- p(n(e.$t("signin")), 1)
150
+ default: d(() => [
151
+ p(r(o(s)("signin")), 1)
148
152
  ]),
149
153
  _: 1
150
154
  })
@@ -152,7 +156,6 @@ const F = { class: "" }, O = { class: "mn-medium" }, B = /* @__PURE__ */ s("br",
152
156
  };
153
157
  }
154
158
  };
155
- typeof g == "function" && g(Q);
156
159
  export {
157
- Q as default
160
+ ue as default
158
161
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Tab/Tab.vue.cjs"),V=require("../../../../components/Field/Field.vue2.cjs"),g=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),w=require("../../../../components/Button/Button.vue2.cjs"),d=require("vue-router"),N=require("vue-i18n"),n=require("../../store/auth.cjs"),b=require("../../store/twofa.cjs"),s=require("../../../middlewares/client/inputs.validation.cjs");require("./SignUp.vue2.cjs");const c=require("./SignUp.vue3.cjs"),y={class:"t-left pd-medium"},S={class:"mn-small"},E={class:"mn-small t-transp"},q={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},C={class:""},D={class:"mn-semi radius-small"},x={class:"mn-small t-transp"},T={class:"mn-semi radius-small o-hidden"},k={class:"mn-small t-transp"},I={class:"w-100"},m={__name:"SignUp",setup(P){const{t}=N.useI18n({inheritLocale:!0,useScope:"local"}),i=e.ref(null),r=e.ref(null);d.useRoute();const p=d.useRouter(),a=e.ref("phone");async function h(){try{a.value==="phone"&&await s.validateInputs(i,s.validatePhone,n.state.user.phone,"Некорректный телефон"),a.value==="email"&&await s.validateInputs(r,s.validateEmail,n.state.user.email,"Некорректный email")}catch{throw new Error}try{await b.sendCode(n.state.user,"signup",a.value)}catch{throw new Error}}function f(){p.push({name:"Enter Code"})}return(u,l)=>{const _=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",y,[e.createElementVNode("h3",S,e.toDisplayString(e.unref(t)("title")),1),e.createElementVNode("p",E,e.toDisplayString(e.unref(t)("description")),1),e.createElementVNode("div",q,[e.createVNode(v.default,{selected:a.value,"onUpdate:selected":l[0]||(l[0]=o=>a.value=o),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",C,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",D,[e.createElementVNode("p",x,e.toDisplayString(e.unref(t)("smsNotice")),1),e.createVNode(g.default,{modelValue:n.state.user.phone,"onUpdate:modelValue":l[1]||(l[1]=o=>n.state.user.phone=o),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:i.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])],512),[[e.vShow,a.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",T,[e.createElementVNode("p",k,e.toDisplayString(e.unref(t)("emailNotice")),1),e.createVNode(V.default,{field:n.state.user.email,"onUpdate:field":l[2]||(l[2]=o=>n.state.user.email=o),placeholder:e.unref(t)("emailPlaceholder"),validation:r.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,a.value==="email"]])]),_:1})]),e.createVNode(w.default,{submit:h,callback:f,class:"mn-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1}),e.createElementVNode("div",I,[e.createVNode(_,{to:"/auth/signin",class:"underline mn-medium d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("haveAccount")),1)]),_:1})])])}}};typeof c.default=="function"&&c.default(m);exports.default=m;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),_=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),V=require("../../../../components/Button/Button.vue2.cjs"),d=require("vue-router"),w=require("vue-i18n"),l=require("../../store/auth.cjs"),g=require("../../store/twofa.cjs"),s=require("../../../middlewares/client/inputs.validation.cjs");require("./SignUp.vue2.cjs");const N={class:"t-left pd-medium"},b={class:"mn-small"},E={class:"mn-small t-transp"},S={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},y={class:""},q={class:"mn-semi radius-small"},C={class:"mn-small t-transp"},D={class:"mn-semi radius-small o-hidden"},x={class:"mn-small t-transp"},T={class:"w-100"},k={__name:"SignUp",setup(I){const{t}=w.useI18n({inheritLocale:!0,useScope:"local"}),i=e.ref(null),r=e.ref(null);d.useRoute();const c=d.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await s.validateInputs(i,s.validatePhone,l.state.user.phone,"Некорректный телефон"),a.value==="email"&&await s.validateInputs(r,s.validateEmail,l.state.user.email,"Некорректный email")}catch{throw new Error}try{await g.sendCode(l.state.user,"signup",a.value)}catch{throw new Error}}function p(){c.push({name:"Enter Code"})}return(u,n)=>{const h=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",N,[e.createElementVNode("h3",b,e.toDisplayString(e.unref(t)("title")),1),e.createElementVNode("p",E,e.toDisplayString(e.unref(t)("description")),1),e.createElementVNode("div",S,[e.createVNode(v.default,{selected:a.value,"onUpdate:selected":n[0]||(n[0]=o=>a.value=o),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",y,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",q,[e.createElementVNode("p",C,e.toDisplayString(e.unref(t)("smsNotice")),1),e.createVNode(_.default,{modelValue:l.state.user.phone,"onUpdate:modelValue":n[1]||(n[1]=o=>l.state.user.phone=o),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:i.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])],512),[[e.vShow,a.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",D,[e.createElementVNode("p",x,e.toDisplayString(e.unref(t)("emailNotice")),1),e.createVNode(f.default,{field:l.state.user.email,"onUpdate:field":n[2]||(n[2]=o=>l.state.user.email=o),placeholder:e.unref(t)("emailPlaceholder"),validation:r.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,a.value==="email"]])]),_:1})]),e.createVNode(V.default,{submit:m,callback:p,class:"mn-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1}),e.createElementVNode("div",T,[e.createVNode(h,{to:"/auth/signin",class:"underline mn-medium d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("haveAccount")),1)]),_:1})])])}}};exports.default=k;
@@ -1,34 +1,33 @@
1
- import { ref as d, resolveComponent as C, openBlock as E, createElementBlock as S, createElementVNode as o, toDisplayString as n, unref as t, createVNode as a, Transition as h, withCtx as m, withDirectives as f, vShow as _, createTextVNode as v } from "vue";
2
- import N from "../../../../components/Tab/Tab.vue.js";
3
- import x from "../../../../components/Field/Field.vue2.js";
4
- import D from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
- import I from "../../../../components/Button/Button.vue2.js";
6
- import { useRoute as P, useRouter as U } from "vue-router";
7
- import { useI18n as F } from "vue-i18n";
1
+ import { ref as m, resolveComponent as C, openBlock as k, createElementBlock as E, createElementVNode as o, toDisplayString as n, unref as t, createVNode as a, Transition as h, withCtx as d, withDirectives as _, vShow as f, createTextVNode as v } from "vue";
2
+ import S from "../../../../components/Tab/Tab.vue2.js";
3
+ import N from "../../../../components/Field/Field.vue2.js";
4
+ import x from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
+ import D from "../../../../components/Button/Button.vue2.js";
6
+ import { useRoute as I, useRouter as P } from "vue-router";
7
+ import { useI18n as U } from "vue-i18n";
8
8
  import { state as s } from "../../store/auth.js";
9
- import { sendCode as O } from "../../store/twofa.js";
10
- import { validateInputs as w, validatePhone as T, validateEmail as A } from "../../../middlewares/client/inputs.validation.js";
9
+ import { sendCode as F } from "../../store/twofa.js";
10
+ import { validateInputs as w, validatePhone as O, validateEmail as T } from "../../../middlewares/client/inputs.validation.js";
11
11
  import "./SignUp.vue2.js";
12
- import b from "./SignUp.vue3.js";
13
- const B = { class: "t-left pd-medium" }, L = { class: "mn-small" }, R = { class: "mn-small t-transp" }, $ = { class: "mn-small p-small uppercase t-semi bg-grey radius-big o-hidden" }, j = { class: "" }, q = { class: "mn-semi radius-small" }, z = { class: "mn-small t-transp" }, G = { class: "mn-semi radius-small o-hidden" }, H = { class: "mn-small t-transp" }, J = { class: "w-100" }, K = {
12
+ const A = { class: "t-left pd-medium" }, B = { class: "mn-small" }, L = { class: "mn-small t-transp" }, R = { class: "mn-small p-small uppercase t-semi bg-grey radius-big o-hidden" }, $ = { class: "" }, j = { class: "mn-semi radius-small" }, q = { class: "mn-small t-transp" }, z = { class: "mn-semi radius-small o-hidden" }, G = { class: "mn-small t-transp" }, H = { class: "w-100" }, ae = {
14
13
  __name: "SignUp",
15
- setup(M) {
16
- const { t: e } = F({
14
+ setup(J) {
15
+ const { t: e } = U({
17
16
  inheritLocale: !0,
18
17
  useScope: "local"
19
- }), u = d(null), c = d(null);
20
- P();
21
- const g = U(), l = d("phone");
22
- async function y() {
18
+ }), u = m(null), c = m(null);
19
+ I();
20
+ const b = P(), l = m("phone");
21
+ async function g() {
23
22
  try {
24
23
  l.value === "phone" && await w(
25
24
  u,
26
- T,
25
+ O,
27
26
  s.user.phone,
28
27
  "Некорректный телефон"
29
28
  ), l.value === "email" && await w(
30
29
  c,
31
- A,
30
+ T,
32
31
  s.user.email,
33
32
  "Некорректный email"
34
33
  );
@@ -36,21 +35,21 @@ const B = { class: "t-left pd-medium" }, L = { class: "mn-small" }, R = { class:
36
35
  throw new Error();
37
36
  }
38
37
  try {
39
- await O(s.user, "signup", l.value);
38
+ await F(s.user, "signup", l.value);
40
39
  } catch {
41
40
  throw new Error();
42
41
  }
43
42
  }
44
43
  function V() {
45
- g.push({ name: "Enter Code" });
44
+ b.push({ name: "Enter Code" });
46
45
  }
47
46
  return (p, i) => {
48
- const k = C("router-link");
49
- return E(), S("section", B, [
50
- o("h3", L, n(t(e)("title")), 1),
51
- o("p", R, n(t(e)("description")), 1),
52
- o("div", $, [
53
- a(N, {
47
+ const y = C("router-link");
48
+ return k(), E("section", A, [
49
+ o("h3", B, n(t(e)("title")), 1),
50
+ o("p", L, n(t(e)("description")), 1),
51
+ o("div", R, [
52
+ a(S, {
54
53
  selected: l.value,
55
54
  "onUpdate:selected": i[0] || (i[0] = (r) => l.value = r),
56
55
  tabs: [
@@ -59,12 +58,12 @@ const B = { class: "t-left pd-medium" }, L = { class: "mn-small" }, R = { class:
59
58
  ]
60
59
  }, null, 8, ["selected", "tabs"])
61
60
  ]),
62
- o("div", j, [
61
+ o("div", $, [
63
62
  a(h, { name: "slide-fade" }, {
64
- default: m(() => [
65
- f(o("div", q, [
66
- o("p", z, n(t(e)("smsNotice")), 1),
67
- a(D, {
63
+ default: d(() => [
64
+ _(o("div", j, [
65
+ o("p", q, n(t(e)("smsNotice")), 1),
66
+ a(x, {
68
67
  modelValue: s.user.phone,
69
68
  "onUpdate:modelValue": i[1] || (i[1] = (r) => s.user.phone = r),
70
69
  dropdownOptions: {
@@ -78,16 +77,16 @@ const B = { class: "t-left pd-medium" }, L = { class: "mn-small" }, R = { class:
78
77
  class: "bg-grey pd-small radius-small mn-thin"
79
78
  }, null, 8, ["modelValue", "validation", "inputOptions"])
80
79
  ], 512), [
81
- [_, l.value === "phone"]
80
+ [f, l.value === "phone"]
82
81
  ])
83
82
  ]),
84
83
  _: 1
85
84
  }),
86
85
  a(h, { name: "slide-fade" }, {
87
- default: m(() => [
88
- f(o("div", G, [
89
- o("p", H, n(t(e)("emailNotice")), 1),
90
- a(x, {
86
+ default: d(() => [
87
+ _(o("div", z, [
88
+ o("p", G, n(t(e)("emailNotice")), 1),
89
+ a(N, {
91
90
  field: s.user.email,
92
91
  "onUpdate:field": i[2] || (i[2] = (r) => s.user.email = r),
93
92
  placeholder: t(e)("emailPlaceholder"),
@@ -95,28 +94,28 @@ const B = { class: "t-left pd-medium" }, L = { class: "mn-small" }, R = { class:
95
94
  class: "bg-grey pd-medium radius-small"
96
95
  }, null, 8, ["field", "placeholder", "validation"])
97
96
  ], 512), [
98
- [_, l.value === "email"]
97
+ [f, l.value === "email"]
99
98
  ])
100
99
  ]),
101
100
  _: 1
102
101
  })
103
102
  ]),
104
- a(I, {
105
- submit: y,
103
+ a(D, {
104
+ submit: g,
106
105
  callback: V,
107
106
  class: "mn-big"
108
107
  }, {
109
- default: m(() => [
108
+ default: d(() => [
110
109
  v(n(t(e)("sendCode")), 1)
111
110
  ]),
112
111
  _: 1
113
112
  }),
114
- o("div", J, [
115
- a(k, {
113
+ o("div", H, [
114
+ a(y, {
116
115
  to: "/auth/signin",
117
116
  class: "underline mn-medium d-block t-blue"
118
117
  }, {
119
- default: m(() => [
118
+ default: d(() => [
120
119
  v(n(t(e)("haveAccount")), 1)
121
120
  ]),
122
121
  _: 1
@@ -126,7 +125,6 @@ const B = { class: "t-left pd-medium" }, L = { class: "mn-small" }, R = { class:
126
125
  };
127
126
  }
128
127
  };
129
- typeof b == "function" && b(K);
130
128
  export {
131
- K as default
129
+ ae as default
132
130
  };