@ozdao/prometheus-framework 0.2.46 → 0.2.48

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. package/dist/main-610fd21a.mjs +13628 -0
  2. package/dist/main-669fac33.js +91 -0
  3. package/dist/main-AMWMdo3t.js +91 -0
  4. package/dist/main-R6dlNKp-.mjs +13606 -0
  5. package/dist/main.css +1 -1
  6. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  7. package/dist/prometheus-framework/src/components/Button/Button.vue.js +225 -2
  8. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  9. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +2 -225
  10. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  11. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +20 -20
  12. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  13. package/dist/prometheus-framework/src/components/Field/Field.vue.js +76 -2
  14. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  15. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +2 -76
  16. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  17. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  18. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  19. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +44 -2
  20. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  21. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +2 -44
  22. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  23. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
  24. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  26. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
  28. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +3 -3
  30. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  31. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
  32. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +3 -3
  34. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
  36. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  38. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  40. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  42. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  44. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +1 -1
  46. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  48. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +2 -2
  50. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
  52. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  54. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +1 -1
  56. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
  58. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +1 -1
  60. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  62. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  64. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +3 -3
  66. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  68. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
  70. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  72. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  74. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.js +1 -1
  76. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  78. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.js +1 -1
  80. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  82. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +15 -15
  84. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +52 -49
  86. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  88. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  90. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  92. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  94. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +20 -21
  96. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +89 -79
  98. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +7 -6
  100. package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.js +1 -1
  102. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  104. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
  106. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  107. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +51 -62
  108. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  109. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  110. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  111. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
  112. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  113. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  114. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  115. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
  116. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  117. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  118. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +1 -1
  120. package/dist/prometheus-framework.cjs.js +1 -1
  121. package/dist/prometheus-framework.es.js +1 -1
  122. package/dist/style.css +1 -1
  123. package/dist/web-0410cac1.js +1 -0
  124. package/dist/web-HvAJWryM.js +1 -0
  125. package/dist/web-XMv5d7hK.mjs +55 -0
  126. package/dist/web-c1619455.mjs +55 -0
  127. package/package.json +1 -1
  128. package/src/components/Feed/Feed.vue +9 -7
  129. package/src/modules/products/components/blocks/CardPosition.vue +1 -1
  130. package/src/modules/products/components/blocks/CardProduct.vue +2 -3
  131. package/src/modules/products/components/pages/Product.vue +1 -1
  132. package/src/modules/products/components/pages/ProductEdit.vue +15 -0
  133. package/src/modules/products/components/pages/Products.vue +1 -0
  134. package/src/modules/products/components/sections/SectionProduct.vue +10 -10
  135. package/src/styles/base/all.scss +4 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Field.vue.cjs");const u=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),r={key:0,class:"t-transp mn-r-small"},c={class:"w-100"},m=["type","value","placeholder","tabindex"],f=["value","placeholder","tabindex"],b={key:1,class:"t-transp mn-l-small"},v={key:0,class:"mn-t-thin mn-b-thin mn-b-thin invalid-feedback"},k={__name:"Field",props:{label:null,symbol:null,type:"text",placeholder:"Enter something here",field:null,validation:!1,disabled:!1,tabindex:-1},emits:["update:field","focus","blur"],setup(t,{emit:i}){const a=i,s=t,o=e.ref(s.field);return(d,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass([[d.$attrs.class,{"bg-fourth-nano":t.validation}],"flex-center flex-nowrap flex"])},[t.label?(e.openBlock(),e.createElementBlock("div",r,[e.createElementVNode("span",null,e.toDisplayString(t.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",c,[t.type!=="textarea"?(e.openBlock(),e.createElementBlock("input",{key:0,onInput:l[0]||(l[0]=n=>o.value=a("update:field",n.target.value)),onFocus:l[1]||(l[1]=n=>a("focus",n)),onBlur:l[2]||(l[2]=n=>a("blur",n)),type:t.type,class:"w-100",value:t.field,placeholder:t.placeholder,tabindex:t.tabindex},null,40,m)):(e.openBlock(),e.createElementBlock("textarea",{key:1,onInput:l[3]||(l[3]=n=>o.value=a("update:field",n.target.value)),onFocus:l[4]||(l[4]=n=>a("focus",n)),onBlur:l[5]||(l[5]=n=>a("blur",n)),class:"w-100",value:t.field,placeholder:t.placeholder,tabindex:t.tabindex},null,40,f))]),e.renderSlot(d.$slots,"default",{},void 0,!0),t.symbol?(e.openBlock(),e.createElementBlock("div",b,[e.createElementVNode("span",null,e.toDisplayString(t.symbol),1)])):e.createCommentVNode("",!0)],2),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[t.validation?(e.openBlock(),e.createElementBlock("div",v," * "+e.toDisplayString(t.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],64))}},y=u.default(k,[["__scopeId","data-v-5e69d3c2"]]);exports.default=y;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;
@@ -1,78 +1,4 @@
1
- import { ref as f, openBlock as a, createElementBlock as d, Fragment as b, createElementVNode as i, normalizeClass as c, toDisplayString as o, createCommentVNode as s, renderSlot as v, createVNode as x, Transition as y, withCtx as h } from "vue";
2
- import "./Field.vue.js";
3
- import k from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const p = {
5
- key: 0,
6
- class: "t-transp mn-r-small"
7
- }, g = { class: "w-100" }, w = ["type", "value", "placeholder", "tabindex"], F = ["value", "placeholder", "tabindex"], B = {
8
- key: 1,
9
- class: "t-transp mn-l-small"
10
- }, C = {
11
- key: 0,
12
- class: "mn-t-thin mn-b-thin mn-b-thin invalid-feedback"
13
- }, E = {
14
- __name: "Field",
15
- props: {
16
- label: null,
17
- symbol: null,
18
- type: "text",
19
- placeholder: "Enter something here",
20
- field: null,
21
- validation: !1,
22
- disabled: !1,
23
- tabindex: -1
24
- },
25
- emits: ["update:field", "focus", "blur"],
26
- setup(e, { emit: m }) {
27
- const n = m, u = f(e.field);
28
- return (r, t) => (a(), d(b, null, [
29
- i("div", {
30
- class: c([[
31
- r.$attrs.class,
32
- {
33
- "bg-fourth-nano": e.validation
34
- }
35
- ], "flex-center flex-nowrap flex"])
36
- }, [
37
- e.label ? (a(), d("div", p, [
38
- i("span", null, o(e.label), 1)
39
- ])) : s("", !0),
40
- i("div", g, [
41
- e.type !== "textarea" ? (a(), d("input", {
42
- key: 0,
43
- onInput: t[0] || (t[0] = (l) => u.value = n("update:field", l.target.value)),
44
- onFocus: t[1] || (t[1] = (l) => n("focus", l)),
45
- onBlur: t[2] || (t[2] = (l) => n("blur", l)),
46
- type: e.type,
47
- class: "w-100",
48
- value: e.field,
49
- placeholder: e.placeholder,
50
- tabindex: e.tabindex
51
- }, null, 40, w)) : (a(), d("textarea", {
52
- key: 1,
53
- onInput: t[3] || (t[3] = (l) => u.value = n("update:field", l.target.value)),
54
- onFocus: t[4] || (t[4] = (l) => n("focus", l)),
55
- onBlur: t[5] || (t[5] = (l) => n("blur", l)),
56
- class: "w-100",
57
- value: e.field,
58
- placeholder: e.placeholder,
59
- tabindex: e.tabindex
60
- }, null, 40, F))
61
- ]),
62
- v(r.$slots, "default", {}, void 0, !0),
63
- e.symbol ? (a(), d("div", B, [
64
- i("span", null, o(e.symbol), 1)
65
- ])) : s("", !0)
66
- ], 2),
67
- x(y, { name: "fade" }, {
68
- default: h(() => [
69
- e.validation ? (a(), d("div", C, " * " + o(e.validation.message), 1)) : s("", !0)
70
- ]),
71
- _: 1
72
- })
73
- ], 64));
74
- }
75
- }, $ = /* @__PURE__ */ k(E, [["__scopeId", "data-v-5e69d3c2"]]);
1
+ const e = "";
76
2
  export {
77
- $ as default
3
+ e as default
78
4
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("../Field/Field.vue2.cjs"),B=require("vue-i18n"),S={class:"pd-thin radius-extra flex-nowrap flex"},w=["innerHTML"],_={__name:"FieldBig",props:{input:String,placeholder:{type:String},action:{type:String,default:"Action"},placeholderTexts:{type:Object,default:()=>({en:["Lowest THC, please!","Something with banana flavors?","I'm in the mood for trippy vibes."],ru:["Я хочу самый низкий THC","Я хочу чего-нибудь бананового","Я хочу курнуть хейза"]})},typingSpeed:{type:Number,default:200},loopTyping:{type:Boolean,default:!1},enableTyping:{type:Boolean,default:!1}},emits:["update:input","action"],setup(s,{emit:y}){const t=s,{t:F,locale:c}=B.useI18n();let r=e.ref(0),n=e.ref(t.input),p=e.ref(t.placeholder),i=e.ref(t.enableTyping),d=e.ref(null),f=e.ref(""),o=e.ref(!0),v=null;const g=y;function b(){g("action")}function T(a){g("update:input",a),f.value=a}function m(){r.value=(r.value+1)%t.placeholderTexts[c.value].length}function I(){i.value=!1,clearInterval(d.value),p.value=t.placeholder,f.value||(n.value="")}function x(){!f.value&&t.enableTyping&&(i.value=!0,p.value="",h())}function h(){let a=t.placeholderTexts[c.value][r.value],l=0,u=!1;v=setInterval(()=>{o.value=!o.value},200),d.value=setInterval(()=>{i.value&&(u?(n.value=n.value.slice(0,-1),n.value=a.substring(0,l)+(o.value&&l%2?"|":""),l--):(n.value=a.substring(0,l)+(o.value&&l%2?"|":""),l++),l>a.length&&t.loopTyping&&setTimeout(()=>{u=!0,n.value=a.substring(0,l)},333),l===0&&u&&(u=!1,m(),a=t.placeholderTexts[c.value][r.value]))},t.typingSpeed)}return e.onMounted(()=>{t.enableTyping&&h()}),e.watchEffect(()=>{i.value||(clearInterval(d.value),clearInterval(v))}),(a,l)=>(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(k.default,{field:e.unref(n),"onUpdate:field":[l[0]||(l[0]=u=>e.isRef(n)?n.value=u:n=u),T],placeholder:e.unref(i)?" ":e.unref(p),onInput:m,onFocus:I,onBlur:x,class:"w-100 p-medium t-regular uppercase pd-small"},null,8,["field","placeholder"]),s.action?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:b,class:"t-medium radius-big uppercase cursor-pointer pd-l-semi pd-r-semi w-max hover-bg-fifth t-semi transition-linear transition-timing-1 t-black bg-main",innerHTML:s.action},null,8,w)):e.createCommentVNode("",!0)]))}};exports.default=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("../Field/Field.vue.cjs"),B=require("vue-i18n"),S={class:"pd-thin radius-extra flex-nowrap flex"},w=["innerHTML"],_={__name:"FieldBig",props:{input:String,placeholder:{type:String},action:{type:String,default:"Action"},placeholderTexts:{type:Object,default:()=>({en:["Lowest THC, please!","Something with banana flavors?","I'm in the mood for trippy vibes."],ru:["Я хочу самый низкий THC","Я хочу чего-нибудь бананового","Я хочу курнуть хейза"]})},typingSpeed:{type:Number,default:200},loopTyping:{type:Boolean,default:!1},enableTyping:{type:Boolean,default:!1}},emits:["update:input","action"],setup(s,{emit:y}){const t=s,{t:F,locale:c}=B.useI18n();let r=e.ref(0),n=e.ref(t.input),p=e.ref(t.placeholder),i=e.ref(t.enableTyping),d=e.ref(null),f=e.ref(""),o=e.ref(!0),v=null;const g=y;function b(){g("action")}function T(a){g("update:input",a),f.value=a}function m(){r.value=(r.value+1)%t.placeholderTexts[c.value].length}function I(){i.value=!1,clearInterval(d.value),p.value=t.placeholder,f.value||(n.value="")}function x(){!f.value&&t.enableTyping&&(i.value=!0,p.value="",h())}function h(){let a=t.placeholderTexts[c.value][r.value],l=0,u=!1;v=setInterval(()=>{o.value=!o.value},200),d.value=setInterval(()=>{i.value&&(u?(n.value=n.value.slice(0,-1),n.value=a.substring(0,l)+(o.value&&l%2?"|":""),l--):(n.value=a.substring(0,l)+(o.value&&l%2?"|":""),l++),l>a.length&&t.loopTyping&&setTimeout(()=>{u=!0,n.value=a.substring(0,l)},333),l===0&&u&&(u=!1,m(),a=t.placeholderTexts[c.value][r.value]))},t.typingSpeed)}return e.onMounted(()=>{t.enableTyping&&h()}),e.watchEffect(()=>{i.value||(clearInterval(d.value),clearInterval(v))}),(a,l)=>(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(k.default,{field:e.unref(n),"onUpdate:field":[l[0]||(l[0]=u=>e.isRef(n)?n.value=u:n=u),T],placeholder:e.unref(i)?" ":e.unref(p),onInput:m,onFocus:I,onBlur:x,class:"w-100 p-medium t-regular uppercase pd-small"},null,8,["field","placeholder"]),s.action?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:b,class:"t-medium radius-big uppercase cursor-pointer pd-l-semi pd-r-semi w-max hover-bg-fifth t-semi transition-linear transition-timing-1 t-black bg-main",innerHTML:s.action},null,8,w)):e.createCommentVNode("",!0)]))}};exports.default=_;
@@ -1,5 +1,5 @@
1
1
  import { ref as i, onMounted as S, watchEffect as F, openBlock as T, createElementBlock as b, createVNode as C, unref as v, isRef as H, createCommentVNode as _ } from "vue";
2
- import L from "../Field/Field.vue2.js";
2
+ import L from "../Field/Field.vue.js";
3
3
  import { useI18n as M } from "vue-i18n";
4
4
  const N = { class: "pd-thin radius-extra flex-nowrap flex" }, V = ["innerHTML"], P = {
5
5
  __name: "FieldBig",
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Tab.vue2.cjs");const m={class:""},v={class:"flex-nowrap flex-v-center flex pos-relative"},p=["onClick"],k={__name:"Tab",props:{tabs:Array,selected:String,callback:Function},emits:["update:selected"],setup(s,{emit:o}){const i=o,l=s,c=e.ref(0);if(l.selected){const t=l.tabs.findIndex(a=>a.value===l.selected);t!==-1&&(c.value=t)}function u(t,a){c.value=t,i("update:selected",a.value),l.callback&&l.callback()}function d(t){return`${100/l.tabs.length*t}%`}function f(){return`${100/l.tabs.length}%`}const b=e.computed(()=>({left:d(c.value),width:f()}));return(t,a)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("div",v,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.tabs,(r,n)=>(e.openBlock(),e.createElementBlock("div",{key:n,onClick:_=>u(n,r),class:e.normalizeClass([{"t-transp":n!==c.value},"z-index-1 t-center pd-small w-100"])},[e.createElementVNode("label",null,e.toDisplayString(r.name),1)],10,p))),128)),e.createElementVNode("div",{style:e.normalizeStyle(b.value),class:"radius-extra bg-main t-white tab-selector"},null,4)])]))}};exports.default=k;
@@ -1,4 +1,46 @@
1
- const e = "";
1
+ import { ref as v, computed as h, openBlock as c, createElementBlock as s, createElementVNode as r, Fragment as _, renderList as g, normalizeClass as k, toDisplayString as x, normalizeStyle as y } from "vue";
2
+ import "./Tab.vue2.js";
3
+ const S = { class: "" }, T = { class: "flex-nowrap flex-v-center flex pos-relative" }, w = ["onClick"], W = {
4
+ __name: "Tab",
5
+ props: {
6
+ tabs: Array,
7
+ selected: String,
8
+ callback: Function
9
+ },
10
+ emits: ["update:selected"],
11
+ setup(o, { emit: d }) {
12
+ const u = d, t = o, a = v(0);
13
+ if (t.selected) {
14
+ const e = t.tabs.findIndex((l) => l.value === t.selected);
15
+ e !== -1 && (a.value = e);
16
+ }
17
+ function f(e, l) {
18
+ a.value = e, u("update:selected", l.value), t.callback && t.callback();
19
+ }
20
+ function b(e) {
21
+ return `${100 / t.tabs.length * e}%`;
22
+ }
23
+ function m() {
24
+ return `${100 / t.tabs.length}%`;
25
+ }
26
+ const p = h(() => ({ left: b(a.value), width: m() }));
27
+ return (e, l) => (c(), s("div", S, [
28
+ r("div", T, [
29
+ (c(!0), s(_, null, g(o.tabs, (i, n) => (c(), s("div", {
30
+ key: n,
31
+ onClick: (z) => f(n, i),
32
+ class: k([{ "t-transp": n !== a.value }, "z-index-1 t-center pd-small w-100"])
33
+ }, [
34
+ r("label", null, x(i.name), 1)
35
+ ], 10, w))), 128)),
36
+ r("div", {
37
+ style: y(p.value),
38
+ class: "radius-extra bg-main t-white tab-selector"
39
+ }, null, 4)
40
+ ])
41
+ ]));
42
+ }
43
+ };
2
44
  export {
3
- e as default
45
+ W as default
4
46
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Tab.vue.cjs");const m={class:""},v={class:"flex-nowrap flex-v-center flex pos-relative"},p=["onClick"],k={__name:"Tab",props:{tabs:Array,selected:String,callback:Function},emits:["update:selected"],setup(s,{emit:o}){const i=o,l=s,c=e.ref(0);if(l.selected){const t=l.tabs.findIndex(a=>a.value===l.selected);t!==-1&&(c.value=t)}function u(t,a){c.value=t,i("update:selected",a.value),l.callback&&l.callback()}function d(t){return`${100/l.tabs.length*t}%`}function f(){return`${100/l.tabs.length}%`}const b=e.computed(()=>({left:d(c.value),width:f()}));return(t,a)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("div",v,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.tabs,(r,n)=>(e.openBlock(),e.createElementBlock("div",{key:n,onClick:_=>u(n,r),class:e.normalizeClass([{"t-transp":n!==c.value},"z-index-1 t-center pd-small w-100"])},[e.createElementVNode("label",null,e.toDisplayString(r.name),1)],10,p))),128)),e.createElementVNode("div",{style:e.normalizeStyle(b.value),class:"radius-extra bg-main t-white tab-selector"},null,4)])]))}};exports.default=k;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;
@@ -1,46 +1,4 @@
1
- import { ref as v, computed as h, openBlock as c, createElementBlock as s, createElementVNode as r, Fragment as _, renderList as g, normalizeClass as k, toDisplayString as x, normalizeStyle as y } from "vue";
2
- import "./Tab.vue.js";
3
- const S = { class: "" }, T = { class: "flex-nowrap flex-v-center flex pos-relative" }, w = ["onClick"], W = {
4
- __name: "Tab",
5
- props: {
6
- tabs: Array,
7
- selected: String,
8
- callback: Function
9
- },
10
- emits: ["update:selected"],
11
- setup(o, { emit: d }) {
12
- const u = d, t = o, a = v(0);
13
- if (t.selected) {
14
- const e = t.tabs.findIndex((l) => l.value === t.selected);
15
- e !== -1 && (a.value = e);
16
- }
17
- function f(e, l) {
18
- a.value = e, u("update:selected", l.value), t.callback && t.callback();
19
- }
20
- function b(e) {
21
- return `${100 / t.tabs.length * e}%`;
22
- }
23
- function m() {
24
- return `${100 / t.tabs.length}%`;
25
- }
26
- const p = h(() => ({ left: b(a.value), width: m() }));
27
- return (e, l) => (c(), s("div", S, [
28
- r("div", T, [
29
- (c(!0), s(_, null, g(o.tabs, (i, n) => (c(), s("div", {
30
- key: n,
31
- onClick: (z) => f(n, i),
32
- class: k([{ "t-transp": n !== a.value }, "z-index-1 t-center pd-small w-100"])
33
- }, [
34
- r("label", null, x(i.name), 1)
35
- ], 10, w))), 128)),
36
- r("div", {
37
- style: y(p.value),
38
- class: "radius-extra bg-main t-white tab-selector"
39
- }, null, 4)
40
- ])
41
- ]));
42
- }
43
- };
1
+ const e = "";
44
2
  export {
45
- W as default
3
+ e as default
46
4
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../../../node_modules/vue3-carousel/dist/carousel.css.cjs");require("vue-i18n");require("../../../../../../node_modules/vue3-carousel/dist/carousel.es.cjs");require("../sections/SliderFeatures.vue2.cjs");const r=require("vue-router");require("../../store/auth.cjs");require("../../../middlewares/client/inputs.validation.cjs");const u={class:"cols-2-1_2 gap-small pd-small bg-white"},n=e.createElementVNode("section",{class:"w-100 desktop-only o-hidden radius-big bg-grad-main"},null,-1),s={__name:"Auth",setup(a){return e.ref(null),e.ref(null),e.ref(null),r.useRoute(),r.useRouter(),e.ref("email"),(o,c)=>{const t=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",u,[e.createVNode(t,{class:"pd-medium br-solid br-1px br-grey radius-big w-m-66r t-center"},{default:e.withCtx(({Component:i,route:l})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i),{ref:"page",key:l.path,localPosition:o.localPosition},null,8,["localPosition"]))]),_:2},1024)]),_:1}),n])}}};exports.default=s;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue2.cjs");require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Button/Button.vue2.cjs");require("../../../../../../node_modules/vue3-carousel/dist/carousel.css.cjs");require("vue-i18n");require("../../../../../../node_modules/vue3-carousel/dist/carousel.es.cjs");require("../sections/SliderFeatures.vue2.cjs");const r=require("vue-router");require("../../store/auth.cjs");require("../../../middlewares/client/inputs.validation.cjs");const u={class:"cols-2-1_2 gap-small pd-small bg-white"},n=e.createElementVNode("section",{class:"w-100 desktop-only o-hidden radius-big bg-grad-main"},null,-1),s={__name:"Auth",setup(a){return e.ref(null),e.ref(null),e.ref(null),r.useRoute(),r.useRouter(),e.ref("email"),(o,c)=>{const t=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",u,[e.createVNode(t,{class:"pd-medium br-solid br-1px br-grey radius-big w-m-66r t-center"},{default:e.withCtx(({Component:i,route:l})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i),{ref:"page",key:l.path,localPosition:o.localPosition},null,8,["localPosition"]))]),_:2},1024)]),_:1}),n])}}};exports.default=s;
@@ -1,7 +1,7 @@
1
1
  import { ref as e, resolveComponent as a, openBlock as o, createElementBlock as m, createVNode as t, withCtx as r, Transition as c, createBlock as p, resolveDynamicComponent as u, createElementVNode as d } from "vue";
2
- import "../../../../components/Tab/Tab.vue.js";
3
- import "../../../../components/Field/Field.vue.js";
4
- import "../../../../components/Button/Button.vue.js";
2
+ import "../../../../components/Tab/Tab.vue2.js";
3
+ import "../../../../components/Field/Field.vue2.js";
4
+ import "../../../../components/Button/Button.vue2.js";
5
5
  import "../../../../../../node_modules/vue3-carousel/dist/carousel.css.js";
6
6
  import "vue-i18n";
7
7
  import "../../../../../../node_modules/vue3-carousel/dist/carousel.es.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue");require("../../../../components/Field/Field.vue.cjs");const f=require("vue-router"),w=require("vue-i18n"),E=require("../../store/auth.cjs"),p=require("../../store/twofa.cjs"),y=require("../../../globals/store/globals.cjs"),S=require("../../localization/EnterCode.json.cjs"),q={class:"t-center pd-medium"},D={class:"mn-b-medium"},I={class:"mn-b-big t-transp"},k={class:"w-100 mn-b-big flex-nowrap flex"},C={key:1},N={__name:"EnterCode",setup(V){const g=f.useRoute(),c=f.useRouter(),{t:d}=w.useI18n({useScope:"global",...S.default}),o=n.reactive({digits:["","","",""],error:null});n.watch(()=>o.digits[0],s=>{if(s&&String(s).length>1){let e=String(s).split("");console.log(e);let t=[...o.digits];e.forEach((l,r)=>{console.log(r),console.log(t[r]),console.log(l),t[r]=l}),o.digits=t,u(3)}});const m=n.ref(null),i=n.ref(0);async function v(){try{await p.sendCode(E.state.user,g.query.method,g.query.type),i.value=30;const s=setInterval(()=>{i.value>0?i.value-=1:clearInterval(s)},1e3)}catch{y.setError({response:{data:{errorCode:"CODE_NOT_SENT"}}})}}const a=(s,e)=>{if(s.key==="Backspace"&&(o.digits[e]===null||o.digits[e]===void 0||o.digits[e]==="")){s.preventDefault();const t=document.querySelectorAll("input"),l=e>0?t[e-1]:null;l&&(l.focus(),l.setSelectionRange(l.value.length,l.value.length))}},u=s=>{const e=document.querySelectorAll("input"),t=e[s+1],l=s>0?e[s-1]:null;if(o.digits[s]!==""&&o.digits[s]!==null&&o.digits[s]!==void 0&&s<4&&(s<3?t.focus():m.value.focus()),(o.digits[s]===null||o.digits[s]===void 0||o.digits[s]==="")&&s>0&&l.focus(),o.digits.every(r=>r!=="")){const r=o.digits.join(""),b=p.state.code.code.toString();r===b?(p.state.code.isValid=!0,c.push({path:"/auth/enter-password",query:{type:p.state.code.type,method:g.query.method}})):(y.setError({response:{data:{errorCode:"WRONG_CODE"}}}),m.value.focus(),o.digits=["","","",""])}};return(s,e)=>(n.openBlock(),n.createElementBlock("section",q,[n.createElementVNode("h3",D,n.toDisplayString(n.unref(d)("verifyNumberTitle")),1),n.createElementVNode("p",I,n.toDisplayString(n.unref(d)("instructions")),1),n.createElementVNode("div",k,[n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[0]||(e[0]=t=>o.digits[0]=t),ref_key:"firstInput",ref:m,maxlength:"1",onInput:e[1]||(e[1]=t=>u(0)),onPaste:e[2]||(e[2]=t=>s.onPaste(t,0)),onKeydown:e[3]||(e[3]=t=>a(t,0)),class:"w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[0]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[4]||(e[4]=t=>o.digits[1]=t),maxlength:"1",onInput:e[5]||(e[5]=t=>u(1)),onPaste:e[6]||(e[6]=t=>s.onPaste(t,1)),onKeydown:e[7]||(e[7]=t=>a(t,1)),class:"w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[1]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[8]||(e[8]=t=>o.digits[2]=t),maxlength:"1",onInput:e[9]||(e[9]=t=>u(2)),onPaste:e[10]||(e[10]=t=>s.onPaste(t,2)),onKeydown:e[11]||(e[11]=t=>a(t,2)),class:"w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[2]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[12]||(e[12]=t=>o.digits[3]=t),maxlength:"1",onInput:e[13]||(e[13]=t=>u(3)),onPaste:e[14]||(e[14]=t=>s.onPaste(t,3)),onKeydown:e[15]||(e[15]=t=>a(t,3)),class:"w-100 h1 pd-small t-center bg-grey radius-small"},null,544),[[n.vModelText,o.digits[3]]])]),i.value<1?(n.openBlock(),n.createElementBlock("a",{key:0,onClick:v,class:"t-blue"},n.toDisplayString(n.unref(d)("resendCode")),1)):(n.openBlock(),n.createElementBlock("span",C,n.toDisplayString(i.value)+" "+n.toDisplayString(n.unref(d)("secondsResend")),1))]))}};exports.default=N;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue");require("../../../../components/Field/Field.vue2.cjs");const f=require("vue-router"),w=require("vue-i18n"),E=require("../../store/auth.cjs"),p=require("../../store/twofa.cjs"),y=require("../../../globals/store/globals.cjs"),S=require("../../localization/EnterCode.json.cjs"),q={class:"t-center pd-medium"},D={class:"mn-b-medium"},I={class:"mn-b-big t-transp"},k={class:"w-100 mn-b-big flex-nowrap flex"},C={key:1},N={__name:"EnterCode",setup(V){const g=f.useRoute(),c=f.useRouter(),{t:d}=w.useI18n({useScope:"global",...S.default}),o=n.reactive({digits:["","","",""],error:null});n.watch(()=>o.digits[0],s=>{if(s&&String(s).length>1){let e=String(s).split("");console.log(e);let t=[...o.digits];e.forEach((l,r)=>{console.log(r),console.log(t[r]),console.log(l),t[r]=l}),o.digits=t,u(3)}});const m=n.ref(null),i=n.ref(0);async function v(){try{await p.sendCode(E.state.user,g.query.method,g.query.type),i.value=30;const s=setInterval(()=>{i.value>0?i.value-=1:clearInterval(s)},1e3)}catch{y.setError({response:{data:{errorCode:"CODE_NOT_SENT"}}})}}const a=(s,e)=>{if(s.key==="Backspace"&&(o.digits[e]===null||o.digits[e]===void 0||o.digits[e]==="")){s.preventDefault();const t=document.querySelectorAll("input"),l=e>0?t[e-1]:null;l&&(l.focus(),l.setSelectionRange(l.value.length,l.value.length))}},u=s=>{const e=document.querySelectorAll("input"),t=e[s+1],l=s>0?e[s-1]:null;if(o.digits[s]!==""&&o.digits[s]!==null&&o.digits[s]!==void 0&&s<4&&(s<3?t.focus():m.value.focus()),(o.digits[s]===null||o.digits[s]===void 0||o.digits[s]==="")&&s>0&&l.focus(),o.digits.every(r=>r!=="")){const r=o.digits.join(""),b=p.state.code.code.toString();r===b?(p.state.code.isValid=!0,c.push({path:"/auth/enter-password",query:{type:p.state.code.type,method:g.query.method}})):(y.setError({response:{data:{errorCode:"WRONG_CODE"}}}),m.value.focus(),o.digits=["","","",""])}};return(s,e)=>(n.openBlock(),n.createElementBlock("section",q,[n.createElementVNode("h3",D,n.toDisplayString(n.unref(d)("verifyNumberTitle")),1),n.createElementVNode("p",I,n.toDisplayString(n.unref(d)("instructions")),1),n.createElementVNode("div",k,[n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[0]||(e[0]=t=>o.digits[0]=t),ref_key:"firstInput",ref:m,maxlength:"1",onInput:e[1]||(e[1]=t=>u(0)),onPaste:e[2]||(e[2]=t=>s.onPaste(t,0)),onKeydown:e[3]||(e[3]=t=>a(t,0)),class:"w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[0]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[4]||(e[4]=t=>o.digits[1]=t),maxlength:"1",onInput:e[5]||(e[5]=t=>u(1)),onPaste:e[6]||(e[6]=t=>s.onPaste(t,1)),onKeydown:e[7]||(e[7]=t=>a(t,1)),class:"w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[1]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[8]||(e[8]=t=>o.digits[2]=t),maxlength:"1",onInput:e[9]||(e[9]=t=>u(2)),onPaste:e[10]||(e[10]=t=>s.onPaste(t,2)),onKeydown:e[11]||(e[11]=t=>a(t,2)),class:"w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[2]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[12]||(e[12]=t=>o.digits[3]=t),maxlength:"1",onInput:e[13]||(e[13]=t=>u(3)),onPaste:e[14]||(e[14]=t=>s.onPaste(t,3)),onKeydown:e[15]||(e[15]=t=>a(t,3)),class:"w-100 h1 pd-small t-center bg-grey radius-small"},null,544),[[n.vModelText,o.digits[3]]])]),i.value<1?(n.openBlock(),n.createElementBlock("a",{key:0,onClick:v,class:"t-blue"},n.toDisplayString(n.unref(d)("resendCode")),1)):(n.openBlock(),n.createElementBlock("span",C,n.toDisplayString(i.value)+" "+n.toDisplayString(n.unref(d)("secondsResend")),1))]))}};exports.default=N;
@@ -1,5 +1,5 @@
1
1
  import { reactive as P, watch as D, ref as c, openBlock as b, createElementBlock as w, createElementVNode as r, toDisplayString as d, unref as m, withDirectives as g, vModelText as f } from "vue";
2
- import "../../../../components/Field/Field.vue.js";
2
+ import "../../../../components/Field/Field.vue2.js";
3
3
  import { useRoute as q, useRouter as $ } from "vue-router";
4
4
  import { useI18n as K } from "vue-i18n";
5
5
  import { state as N } from "../../store/auth.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");const l=require("../../../../components/Field/Field.vue2.cjs"),f=require("../../../../components/Button/Button.vue2.cjs"),i=require("vue-router"),h=require("vue-i18n"),t=require("../../store/auth.cjs"),d=require("../../../middlewares/client/inputs.validation.cjs"),w=require("../../localization/EnterPassword.json.cjs");require("./EnterPassword.vue2.cjs");const y={class:"t-left pd-medium"},_={class:"mn-b-small"},g={key:0,class:"mn-b-semi t-transp"},b={key:1,class:"mn-b-semi t-transp"},k={class:"mn-b-semi radius-small o-hidden"},q={key:2,class:"p-medium t-semi mn-b-semi"},B=e.createElementVNode("a",{class:"t-second",href:"/legal/eula",target:"_blank",rel:"noopener noreferrer"},"End User License Agreement (EULA)",-1),E={key:0},P={key:1},v={__name:"EnterPassword",setup(S){const n=e.ref(null),{t:s}=h.useI18n({useScope:"global",...w.default}),r=i.useRoute(),u=i.useRouter();e.ref("phone");async function c(){try{await d.validateInputs(n,d.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}r.query.method==="reset-password"&&await t.actions.updatePassword(t.state.user,r.query.type),r.query.method!=="reset-password"&&await t.actions.signup(t.state.user,r.query.type)}function p(){u.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(m,o)=>(e.openBlock(),e.createElementBlock("section",y,[e.createElementVNode("h3",_,e.toDisplayString(e.unref(s)("almostDone")),1),e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("p",g,e.toDisplayString(e.unref(s)("newPasswordPrompt")),1)):(e.openBlock(),e.createElementBlock("p",b,e.toDisplayString(e.unref(s)("registrationPasswordPrompt")),1)),e.createElementVNode("div",k,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":o[0]||(o[0]=a=>t.state.user.password=a),type:"password",validation:n.value,placeholder:e.unref(s)("passwordPlaceholder"),class:"bg-grey pd-small radius-small mn-b-thin"},null,8,["field","validation","placeholder"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":o[1]||(o[1]=a=>t.state.user.passwordRepeat=a),type:"password",placeholder:e.unref(s)("repeatPasswordPlaceholder"),class:"bg-grey pd-small radius-small mn-b-thin"},null,8,["field","placeholder"])]),e.unref(r).query.method!=="reset-password"?(e.openBlock(),e.createElementBlock("div",q,[e.createTextVNode(" By registering, you agree to our "),B])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:c,callback:p,class:"w-100 bg-main mn-b-big"},{default:e.withCtx(()=>[e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",E,e.toDisplayString(e.unref(s)("changePasswordBtn")),1)):(e.openBlock(),e.createElementBlock("span",P,e.toDisplayString(e.unref(s)("registerBtn")),1))]),_:1})]))}};exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue2.cjs");const l=require("../../../../components/Field/Field.vue.cjs"),f=require("../../../../components/Button/Button.vue.cjs"),i=require("vue-router"),h=require("vue-i18n"),t=require("../../store/auth.cjs"),d=require("../../../middlewares/client/inputs.validation.cjs"),w=require("../../localization/EnterPassword.json.cjs");require("./EnterPassword.vue2.cjs");const y={class:"t-left pd-medium"},_={class:"mn-b-small"},g={key:0,class:"mn-b-semi t-transp"},b={key:1,class:"mn-b-semi t-transp"},k={class:"mn-b-semi radius-small o-hidden"},q={key:2,class:"p-medium t-semi mn-b-semi"},B=e.createElementVNode("a",{class:"t-second",href:"/legal/eula",target:"_blank",rel:"noopener noreferrer"},"End User License Agreement (EULA)",-1),E={key:0},P={key:1},v={__name:"EnterPassword",setup(S){const n=e.ref(null),{t:s}=h.useI18n({useScope:"global",...w.default}),r=i.useRoute(),u=i.useRouter();e.ref("phone");async function c(){try{await d.validateInputs(n,d.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}r.query.method==="reset-password"&&await t.actions.updatePassword(t.state.user,r.query.type),r.query.method!=="reset-password"&&await t.actions.signup(t.state.user,r.query.type)}function p(){u.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(m,o)=>(e.openBlock(),e.createElementBlock("section",y,[e.createElementVNode("h3",_,e.toDisplayString(e.unref(s)("almostDone")),1),e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("p",g,e.toDisplayString(e.unref(s)("newPasswordPrompt")),1)):(e.openBlock(),e.createElementBlock("p",b,e.toDisplayString(e.unref(s)("registrationPasswordPrompt")),1)),e.createElementVNode("div",k,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":o[0]||(o[0]=a=>t.state.user.password=a),type:"password",validation:n.value,placeholder:e.unref(s)("passwordPlaceholder"),class:"bg-grey pd-small radius-small mn-b-thin"},null,8,["field","validation","placeholder"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":o[1]||(o[1]=a=>t.state.user.passwordRepeat=a),type:"password",placeholder:e.unref(s)("repeatPasswordPlaceholder"),class:"bg-grey pd-small radius-small mn-b-thin"},null,8,["field","placeholder"])]),e.unref(r).query.method!=="reset-password"?(e.openBlock(),e.createElementBlock("div",q,[e.createTextVNode(" By registering, you agree to our "),B])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:c,callback:p,class:"w-100 bg-main mn-b-big"},{default:e.withCtx(()=>[e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",E,e.toDisplayString(e.unref(s)("changePasswordBtn")),1)):(e.openBlock(),e.createElementBlock("span",P,e.toDisplayString(e.unref(s)("registerBtn")),1))]),_:1})]))}};exports.default=v;
@@ -1,7 +1,7 @@
1
1
  import { ref as u, openBlock as o, createElementBlock as a, createElementVNode as p, toDisplayString as d, unref as e, createVNode as l, createTextVNode as g, createCommentVNode as b, withCtx as P } from "vue";
2
- import "../../../../components/Tab/Tab.vue.js";
3
- import c from "../../../../components/Field/Field.vue2.js";
4
- import k from "../../../../components/Button/Button.vue2.js";
2
+ import "../../../../components/Tab/Tab.vue2.js";
3
+ import c from "../../../../components/Field/Field.vue.js";
4
+ import k from "../../../../components/Button/Button.vue.js";
5
5
  import { useRoute as q, useRouter as v } from "vue-router";
6
6
  import { useI18n as E } from "vue-i18n";
7
7
  import { state as s, actions as f } from "../../store/auth.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");const l=require("../../../../components/Field/Field.vue2.cjs"),w=require("../../../../components/Button/Button.vue2.cjs"),d=require("vue-router"),t=require("../../store/auth.cjs"),u=require("../../store/invites.cjs"),c=require("../../../middlewares/client/inputs.validation.cjs");require("./Invite.vue2.cjs");const f={class:"t-left pd-medium"},h=e.createElementVNode("h3",{class:"mn-b-small"},"Вы были пригилашены в организацию",-1),v=e.createElementVNode("p",{class:"mn-b-semi t-transp"},"Пожалуйста, укажите пароль, на этом регистрация будет закочена.",-1),y={class:"mn-b-semi radius-small o-hidden"},q={key:0},k={key:1},B={__name:"Invite",async setup(E){let r,n;const i=e.ref(null),s=d.useRoute(),p=d.useRouter();[r,n]=e.withAsyncContext(()=>u.actions.readOne(s.query.inviteCode)),await r,n();async function m(){try{await c.validateInputs(i,c.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}await t.actions.signup(t.state.user,s.query.type,s.query.inviteCode)}function _(){p.push({name:"Dashboard"})}return(b,a)=>(e.openBlock(),e.createElementBlock("section",f,[h,v,e.createElementVNode("div",y,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":a[0]||(a[0]=o=>t.state.user.password=o),type:"password",validation:i.value,label:"Пароль",placeholder:"******",class:"bg-white radius-small mn-b-small"},null,8,["field","validation"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":a[1]||(a[1]=o=>t.state.user.passwordRepeat=o),type:"password",label:"Повторите пароль",placeholder:"******",class:"bg-white radius-small mn-b-semi"},null,8,["field"])]),e.createVNode(w.default,{disabled:u.state.invite===null,submit:m,callback:_,class:"mn-b-big"},{default:e.withCtx(()=>[e.unref(s).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",q,"Поменять пароль")):(e.openBlock(),e.createElementBlock("span",k,"Зарегистрироваться"))]),_:1},8,["disabled"])]))}};exports.default=B;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue2.cjs");const l=require("../../../../components/Field/Field.vue.cjs"),w=require("../../../../components/Button/Button.vue.cjs"),d=require("vue-router"),t=require("../../store/auth.cjs"),u=require("../../store/invites.cjs"),c=require("../../../middlewares/client/inputs.validation.cjs");require("./Invite.vue2.cjs");const f={class:"t-left pd-medium"},h=e.createElementVNode("h3",{class:"mn-b-small"},"Вы были пригилашены в организацию",-1),v=e.createElementVNode("p",{class:"mn-b-semi t-transp"},"Пожалуйста, укажите пароль, на этом регистрация будет закочена.",-1),y={class:"mn-b-semi radius-small o-hidden"},q={key:0},k={key:1},B={__name:"Invite",async setup(E){let r,n;const i=e.ref(null),s=d.useRoute(),p=d.useRouter();[r,n]=e.withAsyncContext(()=>u.actions.readOne(s.query.inviteCode)),await r,n();async function m(){try{await c.validateInputs(i,c.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}await t.actions.signup(t.state.user,s.query.type,s.query.inviteCode)}function _(){p.push({name:"Dashboard"})}return(b,a)=>(e.openBlock(),e.createElementBlock("section",f,[h,v,e.createElementVNode("div",y,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":a[0]||(a[0]=o=>t.state.user.password=o),type:"password",validation:i.value,label:"Пароль",placeholder:"******",class:"bg-white radius-small mn-b-small"},null,8,["field","validation"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":a[1]||(a[1]=o=>t.state.user.passwordRepeat=o),type:"password",label:"Повторите пароль",placeholder:"******",class:"bg-white radius-small mn-b-semi"},null,8,["field"])]),e.createVNode(w.default,{disabled:u.state.invite===null,submit:m,callback:_,class:"mn-b-big"},{default:e.withCtx(()=>[e.unref(s).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",q,"Поменять пароль")):(e.openBlock(),e.createElementBlock("span",k,"Зарегистрироваться"))]),_:1},8,["disabled"])]))}};exports.default=B;
@@ -1,7 +1,7 @@
1
1
  import { ref as w, withAsyncContext as b, openBlock as o, createElementBlock as r, createElementVNode as n, createVNode as i, withCtx as h, unref as y } from "vue";
2
- import "../../../../components/Tab/Tab.vue.js";
3
- import p from "../../../../components/Field/Field.vue2.js";
4
- import v from "../../../../components/Button/Button.vue2.js";
2
+ import "../../../../components/Tab/Tab.vue2.js";
3
+ import p from "../../../../components/Field/Field.vue.js";
4
+ import v from "../../../../components/Button/Button.vue.js";
5
5
  import { useRoute as k, useRouter as g } from "vue-router";
6
6
  import { state as e, actions as q } from "../../store/auth.js";
7
7
  import { actions as x, state as C } from "../../store/invites.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),v=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),_=require("../../../../components/Button/Button.vue2.cjs"),u=require("vue-router"),b=require("vue-i18n"),w=require("../../localization/ResetPassword.json.cjs"),s=require("../../store/auth.cjs");require("../../store/twofa.cjs");const n=require("../../../middlewares/client/inputs.validation.cjs");require("./ResetPassword.vue2.cjs");const V={class:"t-left pd-medium"},g={class:"mn-b-small"},y={class:"mn-b-small t-transp"},N={class:"mn-b-small p-small uppercase t-semi bg-grey radius-big o-hidden"},q={class:"pos-relative"},E={key:0,class:"mn-b-semi radius-small o-hidden"},S={class:"mn-b-small t-transp"},k={key:0,class:"mn-b-semi radius-small o-hidden"},C={class:"mn-b-small t-transp"},P={__name:"ResetPassword",setup(I){const{t}=b.useI18n({useScope:"global",...w.default}),i=e.ref(null),d=e.ref(null);u.useRoute();const c=u.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await n.validateInputs(i,n.validatePhone,s.state.user.phone,"Некорректный телефон"),a.value==="email"&&await n.validateInputs(d,n.validateEmail,s.state.user.email,"Некорректный email")}catch{throw new Error}try{await s.actions.resetPassword(s.state.user,a.value,"reset-password")}catch(r){throw console.log(r),new Error}}function p(){c.push({name:"Enter Code",query:{type:a.value,method:"reset-password"}})}return(r,o)=>(e.openBlock(),e.createElementBlock("section",V,[e.createElementVNode("h3",g,e.toDisplayString(e.unref(t)("forgotPasswordTitle")),1),e.createElementVNode("p",y,e.toDisplayString(e.unref(t)("instructions")),1),e.createElementVNode("div",N,[e.createVNode(h.default,{selected:a.value,"onUpdate:selected":o[0]||(o[0]=l=>a.value=l),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",q,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="phone"?(e.openBlock(),e.createElementBlock("div",E,[e.createElementVNode("p",S,e.toDisplayString(e.unref(t)("smsInfo")),1),e.createVNode(v.default,{modelValue:s.state.user.phone,"onUpdate:modelValue":o[1]||(o[1]=l=>s.state.user.phone=l),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-b-thin"},null,8,["modelValue","validation","inputOptions"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="email"?(e.openBlock(),e.createElementBlock("div",k,[e.createElementVNode("p",C,e.toDisplayString(e.unref(t)("emailInfo")),1),e.createVNode(f.default,{field:s.state.user.email,"onUpdate:field":o[2]||(o[2]=l=>s.state.user.email=l),placeholder:e.unref(t)("emailPlaceholder"),validation:d.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])])):e.createCommentVNode("",!0)]),_:1})]),e.createVNode(_.default,{submit:m,callback:p,class:"mn-b-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1})]))}};exports.default=P;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../components/Tab/Tab.vue.cjs"),f=require("../../../../components/Field/Field.vue.cjs"),v=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),_=require("../../../../components/Button/Button.vue.cjs"),u=require("vue-router"),b=require("vue-i18n"),w=require("../../localization/ResetPassword.json.cjs"),s=require("../../store/auth.cjs");require("../../store/twofa.cjs");const n=require("../../../middlewares/client/inputs.validation.cjs");require("./ResetPassword.vue2.cjs");const V={class:"t-left pd-medium"},g={class:"mn-b-small"},y={class:"mn-b-small t-transp"},N={class:"mn-b-small p-small uppercase t-semi bg-grey radius-big o-hidden"},q={class:"pos-relative"},E={key:0,class:"mn-b-semi radius-small o-hidden"},S={class:"mn-b-small t-transp"},k={key:0,class:"mn-b-semi radius-small o-hidden"},C={class:"mn-b-small t-transp"},P={__name:"ResetPassword",setup(I){const{t}=b.useI18n({useScope:"global",...w.default}),i=e.ref(null),d=e.ref(null);u.useRoute();const c=u.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await n.validateInputs(i,n.validatePhone,s.state.user.phone,"Некорректный телефон"),a.value==="email"&&await n.validateInputs(d,n.validateEmail,s.state.user.email,"Некорректный email")}catch{throw new Error}try{await s.actions.resetPassword(s.state.user,a.value,"reset-password")}catch(r){throw console.log(r),new Error}}function p(){c.push({name:"Enter Code",query:{type:a.value,method:"reset-password"}})}return(r,o)=>(e.openBlock(),e.createElementBlock("section",V,[e.createElementVNode("h3",g,e.toDisplayString(e.unref(t)("forgotPasswordTitle")),1),e.createElementVNode("p",y,e.toDisplayString(e.unref(t)("instructions")),1),e.createElementVNode("div",N,[e.createVNode(h.default,{selected:a.value,"onUpdate:selected":o[0]||(o[0]=l=>a.value=l),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",q,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="phone"?(e.openBlock(),e.createElementBlock("div",E,[e.createElementVNode("p",S,e.toDisplayString(e.unref(t)("smsInfo")),1),e.createVNode(v.default,{modelValue:s.state.user.phone,"onUpdate:modelValue":o[1]||(o[1]=l=>s.state.user.phone=l),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-b-thin"},null,8,["modelValue","validation","inputOptions"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="email"?(e.openBlock(),e.createElementBlock("div",k,[e.createElementVNode("p",C,e.toDisplayString(e.unref(t)("emailInfo")),1),e.createVNode(f.default,{field:s.state.user.email,"onUpdate:field":o[2]||(o[2]=l=>s.state.user.email=l),placeholder:e.unref(t)("emailPlaceholder"),validation:d.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])])):e.createCommentVNode("",!0)]),_:1})]),e.createVNode(_.default,{submit:m,callback:p,class:"mn-b-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1})]))}};exports.default=P;
@@ -1,8 +1,8 @@
1
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
- import C from "../../../../components/Field/Field.vue2.js";
2
+ import P from "../../../../components/Tab/Tab.vue.js";
3
+ import C from "../../../../components/Field/Field.vue.js";
4
4
  import E from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
- import I from "../../../../components/Button/Button.vue2.js";
5
+ import I from "../../../../components/Button/Button.vue.js";
6
6
  import { useRoute as k, useRouter as x } from "vue-router";
7
7
  import { useI18n as N } from "vue-i18n";
8
8
  import S from "../../localization/ResetPassword.json.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../components/Tab/Tab.vue2.cjs"),m=require("../../../../components/Field/Field.vue2.cjs"),w=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),V=require("../../../../components/Button/Button.vue2.cjs"),h=require("vue-router"),N=require("vue-i18n"),y=require("../../localization/SignIn.json.cjs"),a=require("../../store/auth.cjs"),i=require("../../../middlewares/client/inputs.validation.cjs");require("./SignIn.vue2.cjs");const S={class:""},q=["src"],E={class:"mn-b-medium"},x=e.createElementVNode("br",null,null,-1),C={class:"t-semi"},D={class:"mn-b-big"},P={class:"mn-b-small p-small uppercase t-semi bg-grey radius-big o-hidden"},T={class:"pos-relative"},U={class:"mn-b-thin radius-small"},I={class:"mn-b-thin radius-small o-hidden"},k={class:"w-100 mn-b-big"},j={__name:"SignIn",setup(O){const d=e.ref(null),f=e.ref(null),u=e.ref(null),c=h.useRoute(),p=h.useRouter(),{t:l}=N.useI18n({useScope:"global",...y.default}),n=e.ref("phone"),v=o=>new Promise((s,r)=>{const t=document.createElement("script");t.type="text/javascript",t.src=o,t.onload=s,t.onerror=r,document.head.appendChild(t)});e.onMounted(async()=>{await v("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js")});async function _(){try{n.value==="phone"&&await i.validateInputs(d,i.validatePhone,a.state.user.phone,"Некорректный телефон"),n.value==="email"&&await i.validateInputs(u,i.validateEmail,a.state.user.email,"Некорректный email")}catch{throw new Error}const o={...a.state.user};o.phone=a.state.user.phone.number,await a.actions.login(o,n.value)}function b(){c.query.returnUrl?p.push({path:c.query.returnUrl,query:{afterAuth:"true"}}):p.push({name:"User Profile",params:{_id:a.state.user._id},query:{afterAuth:"true"}})}return(o,s)=>{const r=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",S,[e.createElementVNode("img",{src:"/logo/logo.svg",class:"i-extra radius-small mn-b-small"},null,8,q),e.createElementVNode("h3",E,[e.createTextVNode(e.toDisplayString(e.unref(l)("title"))+" ",1),x,e.createElementVNode("span",C,e.toDisplayString(e.unref(l)("subtitle")),1)]),e.createElementVNode("p",D,[e.createVNode(r,{to:{name:"Sign Up"},class:"underline t-second"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signup")),1)]),_:1})]),e.createElementVNode("div",P,[e.createVNode(g.default,{selected:n.value,"onUpdate:selected":s[0]||(s[0]=t=>n.value=t),tabs:[{name:e.unref(l)("phone"),value:"phone"},{name:e.unref(l)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",T,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",U,[e.createVNode(w.default,{modelValue:a.state.user.phone,"onUpdate:modelValue":s[1]||(s[1]=t=>a.state.user.phone=t),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:d.value,mode:"national",inputOptions:{placeholder:e.unref(l)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-b-thin"},null,8,["modelValue","validation","inputOptions"])],512),[[e.vShow,n.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",I,[e.createVNode(m.default,{field:a.state.user.email,"onUpdate:field":s[2]||(s[2]=t=>a.state.user.email=t),placeholder:e.unref(l)("emailPlaceholder"),validation:u.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,n.value==="email"]])]),_:1})]),e.createVNode(m.default,{field:a.state.user.password,"onUpdate:field":s[3]||(s[3]=t=>a.state.user.password=t),type:"password",validation:f.value,placeholder:e.unref(l)("passwordPlaceholder"),class:"bg-grey pd-medium radius-small mn-b-semi"},null,8,["field","validation","placeholder"]),e.createElementVNode("div",k,[e.createVNode(r,{to:"/auth/reset-password",class:"underline d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("forgotPassword")),1)]),_:1})]),e.createVNode(V.default,{submit:_,callback:b,class:"w-100 bg-main mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signin")),1)]),_:1})])}}};exports.default=j;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../components/Tab/Tab.vue.cjs"),m=require("../../../../components/Field/Field.vue.cjs"),w=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),V=require("../../../../components/Button/Button.vue.cjs"),h=require("vue-router"),N=require("vue-i18n"),y=require("../../localization/SignIn.json.cjs"),a=require("../../store/auth.cjs"),i=require("../../../middlewares/client/inputs.validation.cjs");require("./SignIn.vue2.cjs");const S={class:""},q=["src"],E={class:"mn-b-medium"},x=e.createElementVNode("br",null,null,-1),C={class:"t-semi"},D={class:"mn-b-big"},P={class:"mn-b-small p-small uppercase t-semi bg-grey radius-big o-hidden"},T={class:"pos-relative"},U={class:"mn-b-thin radius-small"},I={class:"mn-b-thin radius-small o-hidden"},k={class:"w-100 mn-b-big"},j={__name:"SignIn",setup(O){const d=e.ref(null),f=e.ref(null),u=e.ref(null),c=h.useRoute(),p=h.useRouter(),{t:l}=N.useI18n({useScope:"global",...y.default}),n=e.ref("phone"),v=o=>new Promise((s,r)=>{const t=document.createElement("script");t.type="text/javascript",t.src=o,t.onload=s,t.onerror=r,document.head.appendChild(t)});e.onMounted(async()=>{await v("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js")});async function _(){try{n.value==="phone"&&await i.validateInputs(d,i.validatePhone,a.state.user.phone,"Некорректный телефон"),n.value==="email"&&await i.validateInputs(u,i.validateEmail,a.state.user.email,"Некорректный email")}catch{throw new Error}const o={...a.state.user};o.phone=a.state.user.phone.number,await a.actions.login(o,n.value)}function b(){c.query.returnUrl?p.push({path:c.query.returnUrl,query:{afterAuth:"true"}}):p.push({name:"User Profile",params:{_id:a.state.user._id},query:{afterAuth:"true"}})}return(o,s)=>{const r=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",S,[e.createElementVNode("img",{src:"/logo/logo.svg",class:"i-extra radius-small mn-b-small"},null,8,q),e.createElementVNode("h3",E,[e.createTextVNode(e.toDisplayString(e.unref(l)("title"))+" ",1),x,e.createElementVNode("span",C,e.toDisplayString(e.unref(l)("subtitle")),1)]),e.createElementVNode("p",D,[e.createVNode(r,{to:{name:"Sign Up"},class:"underline t-second"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signup")),1)]),_:1})]),e.createElementVNode("div",P,[e.createVNode(g.default,{selected:n.value,"onUpdate:selected":s[0]||(s[0]=t=>n.value=t),tabs:[{name:e.unref(l)("phone"),value:"phone"},{name:e.unref(l)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",T,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",U,[e.createVNode(w.default,{modelValue:a.state.user.phone,"onUpdate:modelValue":s[1]||(s[1]=t=>a.state.user.phone=t),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:d.value,mode:"national",inputOptions:{placeholder:e.unref(l)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-b-thin"},null,8,["modelValue","validation","inputOptions"])],512),[[e.vShow,n.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",I,[e.createVNode(m.default,{field:a.state.user.email,"onUpdate:field":s[2]||(s[2]=t=>a.state.user.email=t),placeholder:e.unref(l)("emailPlaceholder"),validation:u.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,n.value==="email"]])]),_:1})]),e.createVNode(m.default,{field:a.state.user.password,"onUpdate:field":s[3]||(s[3]=t=>a.state.user.password=t),type:"password",validation:f.value,placeholder:e.unref(l)("passwordPlaceholder"),class:"bg-grey pd-medium radius-small mn-b-semi"},null,8,["field","validation","placeholder"]),e.createElementVNode("div",k,[e.createVNode(r,{to:"/auth/reset-password",class:"underline d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("forgotPassword")),1)]),_:1})]),e.createVNode(V.default,{submit:_,callback:b,class:"w-100 bg-main mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signin")),1)]),_:1})])}}};exports.default=j;
@@ -1,8 +1,8 @@
1
1
  import { ref as p, onMounted as k, resolveComponent as C, openBlock as E, createElementBlock as I, createElementVNode as a, createTextVNode as c, toDisplayString as d, unref as o, createVNode as i, withCtx as u, Transition as b, withDirectives as g, vShow as w } from "vue";
2
- import q from "../../../../components/Tab/Tab.vue2.js";
3
- import y from "../../../../components/Field/Field.vue2.js";
2
+ import q from "../../../../components/Tab/Tab.vue.js";
3
+ import y from "../../../../components/Field/Field.vue.js";
4
4
  import D from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
- import j from "../../../../components/Button/Button.vue2.js";
5
+ import j from "../../../../components/Button/Button.vue.js";
6
6
  import { useRoute as A, useRouter as F } from "vue-router";
7
7
  import { useI18n as N } from "vue-i18n";
8
8
  import O from "../../localization/SignIn.json.js";
@@ -1 +1 @@
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"),b=require("../../../../components/Button/Button.vue2.cjs"),d=require("vue-router"),g=require("vue-i18n"),w=require("../../localization/SignUp.json.cjs"),l=require("../../store/auth.cjs"),V=require("../../store/twofa.cjs"),s=require("../../../middlewares/client/inputs.validation.cjs");require("./SignUp.vue2.cjs");const N={class:"t-left pd-medium"},S={class:"mn-b-small"},E={class:"mn-b-small p-small uppercase t-semi bg-grey radius-big o-hidden"},q={class:"pos-relative"},y={class:"mn-b-semi radius-small"},C={class:"mn-b-small t-transp"},D={class:"mn-b-semi radius-small o-hidden"},x={class:"mn-b-small t-transp"},T={class:"w-100"},k={__name:"SignUp",setup(I){const{t}=g.useI18n({useScope:"global",...w.default}),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 V.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",S,e.toDisplayString(e.unref(t)("title")),1),e.createElementVNode("div",E,[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",q,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",y,[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-b-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(b.default,{submit:m,callback:p,class:"w-100 bg-main mn-b-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-b-medium d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("haveAccount")),1)]),_:1})])])}}};exports.default=k;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Tab/Tab.vue.cjs"),f=require("../../../../components/Field/Field.vue.cjs"),_=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),b=require("../../../../components/Button/Button.vue.cjs"),d=require("vue-router"),g=require("vue-i18n"),w=require("../../localization/SignUp.json.cjs"),l=require("../../store/auth.cjs"),V=require("../../store/twofa.cjs"),s=require("../../../middlewares/client/inputs.validation.cjs");require("./SignUp.vue2.cjs");const N={class:"t-left pd-medium"},S={class:"mn-b-small"},E={class:"mn-b-small p-small uppercase t-semi bg-grey radius-big o-hidden"},q={class:"pos-relative"},y={class:"mn-b-semi radius-small"},C={class:"mn-b-small t-transp"},D={class:"mn-b-semi radius-small o-hidden"},x={class:"mn-b-small t-transp"},T={class:"w-100"},k={__name:"SignUp",setup(I){const{t}=g.useI18n({useScope:"global",...w.default}),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 V.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",S,e.toDisplayString(e.unref(t)("title")),1),e.createElementVNode("div",E,[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",q,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",y,[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-b-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(b.default,{submit:m,callback:p,class:"w-100 bg-main mn-b-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-b-medium d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("haveAccount")),1)]),_:1})])])}}};exports.default=k;
@@ -1,8 +1,8 @@
1
1
  import { ref as d, resolveComponent as C, openBlock as k, createElementBlock as E, createElementVNode as o, toDisplayString as r, unref as t, createVNode as a, Transition as h, withCtx as m, withDirectives as f, vShow as _, createTextVNode as v } from "vue";
2
- import S from "../../../../components/Tab/Tab.vue2.js";
3
- import x from "../../../../components/Field/Field.vue2.js";
2
+ import S from "../../../../components/Tab/Tab.vue.js";
3
+ import x from "../../../../components/Field/Field.vue.js";
4
4
  import N from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
- import D from "../../../../components/Button/Button.vue2.js";
5
+ import D from "../../../../components/Button/Button.vue.js";
6
6
  import { useRoute as I, useRouter as P } from "vue-router";
7
7
  import { useI18n as U } from "vue-i18n";
8
8
  import F from "../../localization/SignUp.json.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../../constructor/components/elements/Textarea.vue2.cjs"),V=require("../../../constructor/components/sections/Constructor.vue.cjs"),y=require("../../../../components/Popup/Popup.vue2.cjs");require("../../../../components/FieldTags/tag-input.vue.cjs");require("../../../../components/FieldTags/vue-tags-input.scss.cjs");const B=require("../../../../components/FieldTags/BlockTags.vue.cjs"),N=require("../../../../components/Checkbox/Checkbox.vue2.cjs"),C=require("../../../../components/Field/Field.vue2.cjs"),P=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),x=require("../../../../components/Button/Button.vue2.cjs"),f=require("vue-router"),n=require("../../store/blogposts.cjs"),i=require("../../../auth/store/auth.cjs"),q=require("../../../organizations/store/organizations.cjs"),E={class:"pd-thin"},T={style:{"min-height":"100%"},class:"w-100 bg-grey pd-big radius-big"},z={class:"w-full h-full"},A={key:0,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},O={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},U=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),D=e.createElementVNode("h5",{class:"mn-b-thin"},"Add source:",-1),M=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),S={key:0,class:"mn-b-thin"},F={key:1,class:"mn-b-medium br-grey br-2px br-solid pd-small radius-big"},R={__name:"CreateBlogPost",setup($){const s=f.useRoute(),u=f.useRouter();let t=e.ref(null),p=e.ref(null);const c=e.ref([]),r=e.ref(null);e.onMounted(async()=>{const o=await q.actions.read({user:i.state.user._id,postable:i.state.user._id,limit:100});if(p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo})),s.params.url){const a=await n.read({user:i.state.user._id,url:s.params.url});t.value=a.pop()}else n.clean(),t.value=n.state.current;t.value.owner||(t.value.owner={target:i.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:i.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(r.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo}),console.log(o)});const g=e.ref(""),m=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>m.value.filter(o=>o.text.toLowerCase().includes(g.value.toLowerCase()))),e.computed(()=>m.value.filter(o=>!c.value.some(a=>a.text===o.text)));const d=e.ref(!1);function h(){d.value=!0}function v(){d.value=!1}function b(){c.value.length>0&&c.value.map(o=>o.text),t.value.status="draft",s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function k(){r.value&&(t.value.owner={target:r.value._id,type:"organization"}),r.value||(t.value.creator.hidden=!1),r.value||(t.value.organization=t.value.creator),t.value.status="published",console.log(t.value),s.params.url?n.update(t.value).then(o=>{console.log(t.value),u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)})}function _(){confirm("Are you sure you want to delete this post?")&&n.remove(t.value._id).then(o=>{u.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.log(o)})}return(o,a)=>(e.openBlock(),e.createElementBlock("article",E,[e.createElementVNode("section",T,[e.createElementVNode("div",z,[e.unref(t)?(e.openBlock(),e.createBlock(w.default,{key:0,prop:e.unref(t),setFocus:!0,content:"name",placeholder:"Enter post title",class:"h2"},null,8,["prop"])):e.createCommentVNode("",!0)]),e.unref(t)?(e.openBlock(),e.createBlock(V.default,{key:0,content:e.unref(t).content,onUpdate:a[0]||(a[0]=l=>e.unref(t).content=l)},null,8,["content"])):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"scaleIn"},{default:e.withCtx(()=>[e.unref(t)?(e.openBlock(),e.createElementBlock("section",A,[e.createElementVNode("div",O,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[1]||(a[1]=l=>_()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[2]||(a[2]=l=>b()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[3]||(a[3]=l=>h()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(y.default,{title:"Добавить участника",onClosePopup:v,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[U,e.createVNode(B.default,{onTagsChanged:a[4]||(a[4]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),D,e.createVNode(C.default,{field:e.unref(t).source,"onUpdate:field":a[5]||(a[5]=l=>e.unref(t).source=l),placeholder:"Add full link to the source",class:"mn-b-medium bg-grey radius-medium pd-small"},null,8,["field"]),M,e.createVNode(P.default,{modelValue:r.value,"onUpdate:modelValue":a[6]||(a[6]=l=>r.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-grey radius-medium pd-small"},null,8,["modelValue","options"]),r.value?(e.openBlock(),e.createElementBlock("h5",S,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",F,[e.createVNode(N.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[7]||(a[7]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(x.default,{submit:k,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])]))}};exports.default=R;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../../constructor/components/elements/Textarea.vue2.cjs"),V=require("../../../constructor/components/sections/Constructor.vue.cjs"),y=require("../../../../components/Popup/Popup.vue2.cjs");require("../../../../components/FieldTags/tag-input.vue.cjs");require("../../../../components/FieldTags/vue-tags-input.scss.cjs");const B=require("../../../../components/FieldTags/BlockTags.vue.cjs"),N=require("../../../../components/Checkbox/Checkbox.vue2.cjs"),C=require("../../../../components/Field/Field.vue.cjs"),P=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),x=require("../../../../components/Button/Button.vue.cjs"),f=require("vue-router"),n=require("../../store/blogposts.cjs"),i=require("../../../auth/store/auth.cjs"),q=require("../../../organizations/store/organizations.cjs"),E={class:"pd-thin"},T={style:{"min-height":"100%"},class:"w-100 bg-grey pd-big radius-big"},z={class:"w-full h-full"},A={key:0,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},O={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},U=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),D=e.createElementVNode("h5",{class:"mn-b-thin"},"Add source:",-1),M=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),S={key:0,class:"mn-b-thin"},F={key:1,class:"mn-b-medium br-grey br-2px br-solid pd-small radius-big"},R={__name:"CreateBlogPost",setup($){const s=f.useRoute(),u=f.useRouter();let t=e.ref(null),p=e.ref(null);const c=e.ref([]),r=e.ref(null);e.onMounted(async()=>{const o=await q.actions.read({user:i.state.user._id,postable:i.state.user._id,limit:100});if(p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo})),s.params.url){const a=await n.read({user:i.state.user._id,url:s.params.url});t.value=a.pop()}else n.clean(),t.value=n.state.current;t.value.owner||(t.value.owner={target:i.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:i.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(r.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo}),console.log(o)});const g=e.ref(""),m=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>m.value.filter(o=>o.text.toLowerCase().includes(g.value.toLowerCase()))),e.computed(()=>m.value.filter(o=>!c.value.some(a=>a.text===o.text)));const d=e.ref(!1);function h(){d.value=!0}function v(){d.value=!1}function b(){c.value.length>0&&c.value.map(o=>o.text),t.value.status="draft",s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function k(){r.value&&(t.value.owner={target:r.value._id,type:"organization"}),r.value||(t.value.creator.hidden=!1),r.value||(t.value.organization=t.value.creator),t.value.status="published",console.log(t.value),s.params.url?n.update(t.value).then(o=>{console.log(t.value),u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)})}function _(){confirm("Are you sure you want to delete this post?")&&n.remove(t.value._id).then(o=>{u.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.log(o)})}return(o,a)=>(e.openBlock(),e.createElementBlock("article",E,[e.createElementVNode("section",T,[e.createElementVNode("div",z,[e.unref(t)?(e.openBlock(),e.createBlock(w.default,{key:0,prop:e.unref(t),setFocus:!0,content:"name",placeholder:"Enter post title",class:"h2"},null,8,["prop"])):e.createCommentVNode("",!0)]),e.unref(t)?(e.openBlock(),e.createBlock(V.default,{key:0,content:e.unref(t).content,onUpdate:a[0]||(a[0]=l=>e.unref(t).content=l)},null,8,["content"])):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"scaleIn"},{default:e.withCtx(()=>[e.unref(t)?(e.openBlock(),e.createElementBlock("section",A,[e.createElementVNode("div",O,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[1]||(a[1]=l=>_()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[2]||(a[2]=l=>b()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[3]||(a[3]=l=>h()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(y.default,{title:"Добавить участника",onClosePopup:v,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[U,e.createVNode(B.default,{onTagsChanged:a[4]||(a[4]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),D,e.createVNode(C.default,{field:e.unref(t).source,"onUpdate:field":a[5]||(a[5]=l=>e.unref(t).source=l),placeholder:"Add full link to the source",class:"mn-b-medium bg-grey radius-medium pd-small"},null,8,["field"]),M,e.createVNode(P.default,{modelValue:r.value,"onUpdate:modelValue":a[6]||(a[6]=l=>r.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-grey radius-medium pd-small"},null,8,["modelValue","options"]),r.value?(e.openBlock(),e.createElementBlock("h5",S,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",F,[e.createVNode(N.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[7]||(a[7]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(x.default,{submit:k,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])]))}};exports.default=R;
@@ -6,9 +6,9 @@ import "../../../../components/FieldTags/tag-input.vue.js";
6
6
  import "../../../../components/FieldTags/vue-tags-input.scss.js";
7
7
  import E from "../../../../components/FieldTags/BlockTags.vue.js";
8
8
  import F from "../../../../components/Checkbox/Checkbox.vue2.js";
9
- import L from "../../../../components/Field/Field.vue2.js";
9
+ import L from "../../../../components/Field/Field.vue.js";
10
10
  import M from "../../../../components/SelectMulti/SelectMulti.vue.js";
11
- import R from "../../../../components/Button/Button.vue2.js";
11
+ import R from "../../../../components/Button/Button.vue.js";
12
12
  import { useRoute as S, useRouter as H } from "vue-router";
13
13
  import { read as j, clean as q, state as G, update as y, create as P, remove as I } from "../../store/blogposts.js";
14
14
  import { state as f } from "../../../auth/store/auth.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Field/Field.vue2.cjs"),m={class:"mn-b-thin w-100 pd-medium bg-white radius-medium"},p=["innerHTML"],b={key:1,class:""},f=e.createElementVNode("p",{class:"t-center"},"Embeds from youtube.com, vimeo.com, soundcloud.com are allowed",-1),v={__name:"Embed",props:["label","value","prop"],emits:["input","updateBlock"],setup(t,{emit:a}){const o=e.ref(null),s=t,c=a;function i(d){return[/youtube\.com/,/facebook\.com/,/instagram\.com/,/twitter\.com/,/tiktok\.com/,/soundcloud\.com/,/vimeo\.com/,/reddit\.com/,/linkedin\.com/,/medium\.com/,/spotify\.com/].some(n=>n.test(d))}function r(){o.value&&i(o.value)?(c("input",o.value),c("updateBlock",s.prop,{content:o.value})):alert("Invalid embed code or source not allowed.")}return(d,l)=>(e.openBlock(),e.createElementBlock("div",m,[t.prop.content?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:t.prop.content,class:"flex-center flex"},null,8,p)):(e.openBlock(),e.createElementBlock("div",b,[e.createVNode(u.default,{field:o.value,"onUpdate:field":l[0]||(l[0]=n=>o.value=n),type:"textarea",placeholder:"Paste your embed code here",class:"w-100 br-solid br-1px br-black-transp-10 pd-medium radius-small mn-b-thin"},null,8,["field"]),e.createElementVNode("div",{class:"flex-v-center flex-nowrap flex gap-small"},[f,e.createElementVNode("button",{onClick:r,class:"button-small button"}," Save ")])]))]))}};exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Field/Field.vue.cjs"),m={class:"mn-b-thin w-100 pd-medium bg-white radius-medium"},p=["innerHTML"],b={key:1,class:""},f=e.createElementVNode("p",{class:"t-center"},"Embeds from youtube.com, vimeo.com, soundcloud.com are allowed",-1),v={__name:"Embed",props:["label","value","prop"],emits:["input","updateBlock"],setup(t,{emit:a}){const o=e.ref(null),s=t,c=a;function i(d){return[/youtube\.com/,/facebook\.com/,/instagram\.com/,/twitter\.com/,/tiktok\.com/,/soundcloud\.com/,/vimeo\.com/,/reddit\.com/,/linkedin\.com/,/medium\.com/,/spotify\.com/].some(n=>n.test(d))}function r(){o.value&&i(o.value)?(c("input",o.value),c("updateBlock",s.prop,{content:o.value})):alert("Invalid embed code or source not allowed.")}return(d,l)=>(e.openBlock(),e.createElementBlock("div",m,[t.prop.content?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:t.prop.content,class:"flex-center flex"},null,8,p)):(e.openBlock(),e.createElementBlock("div",b,[e.createVNode(u.default,{field:o.value,"onUpdate:field":l[0]||(l[0]=n=>o.value=n),type:"textarea",placeholder:"Paste your embed code here",class:"w-100 br-solid br-1px br-black-transp-10 pd-medium radius-small mn-b-thin"},null,8,["field"]),e.createElementVNode("div",{class:"flex-v-center flex-nowrap flex gap-small"},[f,e.createElementVNode("button",{onClick:r,class:"button-small button"}," Save ")])]))]))}};exports.default=v;
@@ -1,5 +1,5 @@
1
1
  import { ref as p, openBlock as n, createElementBlock as c, createVNode as b, createElementVNode as d } from "vue";
2
- import f from "../../../../components/Field/Field.vue2.js";
2
+ import f from "../../../../components/Field/Field.vue.js";
3
3
  const v = { class: "mn-b-thin w-100 pd-medium bg-white radius-medium" }, k = ["innerHTML"], w = {
4
4
  key: 1,
5
5
  class: ""
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),p=require("../../../../components/Button/Button.vue2.cjs");require("../../../auth/store/auth.cjs");const s=require("../../store/tickets.cjs");require("./ButtonJoin.vue2.cjs");const g=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),k={__name:"ButtonJoin",props:{type:{type:String,required:!0},userId:{type:String,required:!0},hasTicket:{type:Boolean,required:!0},targetId:{type:String,required:!0}},emits:["updateTicket"],setup(o,{emit:c}){const n=c,t=o,u=async()=>{t.hasTicket?await l(t.targetId):await d(t.targetId)};async function d(i){try{const e={type:t.type,target:i,user:t.userId},r=await s.actions.create(e);n("updateTicket",{ticket:r,hasTicket:!0,targetId:t.targetId})}catch(e){throw console.log(e),e}}async function l(i){const e={type:t.type,target:i,user:t.userId};try{const r=await s.actions.delete(e);n("updateTicket",{ticket:r,hasTicket:!1,targetId:t.targetId})}catch(r){throw console.log(r),r}}return(i,e)=>(a.openBlock(),a.createBlock(p.default,{submit:u,class:"bg-main button-small radius-extra button"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(o.hasTicket?"Leave":"Join"),1)]),_:1}))}},y=g.default(k,[["__scopeId","data-v-872ff798"]]);exports.default=y;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),p=require("../../../../components/Button/Button.vue.cjs");require("../../../auth/store/auth.cjs");const s=require("../../store/tickets.cjs");require("./ButtonJoin.vue2.cjs");const g=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),k={__name:"ButtonJoin",props:{type:{type:String,required:!0},userId:{type:String,required:!0},hasTicket:{type:Boolean,required:!0},targetId:{type:String,required:!0}},emits:["updateTicket"],setup(o,{emit:c}){const n=c,t=o,u=async()=>{t.hasTicket?await l(t.targetId):await d(t.targetId)};async function d(i){try{const e={type:t.type,target:i,user:t.userId},r=await s.actions.create(e);n("updateTicket",{ticket:r,hasTicket:!0,targetId:t.targetId})}catch(e){throw console.log(e),e}}async function l(i){const e={type:t.type,target:i,user:t.userId};try{const r=await s.actions.delete(e);n("updateTicket",{ticket:r,hasTicket:!1,targetId:t.targetId})}catch(r){throw console.log(r),r}}return(i,e)=>(a.openBlock(),a.createBlock(p.default,{submit:u,class:"bg-main button-small radius-extra button"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(o.hasTicket?"Leave":"Join"),1)]),_:1}))}},y=g.default(k,[["__scopeId","data-v-872ff798"]]);exports.default=y;
@@ -1,5 +1,5 @@
1
1
  import { openBlock as d, createBlock as g, withCtx as m, createTextVNode as l, toDisplayString as k } from "vue";
2
- import f from "../../../../components/Button/Button.vue2.js";
2
+ import f from "../../../../components/Button/Button.vue.js";
3
3
  import "../../../auth/store/auth.js";
4
4
  import { actions as c } from "../../store/tickets.js";
5
5
  import "./ButtonJoin.vue2.js";