@ozdao/prometheus-framework 0.0.78 → 0.0.80

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-451d2614.mjs +80 -0
  2. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-5ea8b4fa.js +1 -0
  3. package/dist/ButtonFollow-0d83a04a.mjs +130 -0
  4. package/dist/ButtonFollow-f9c5dc7a.js +1 -0
  5. package/dist/CardHeader-2d7e5d49.mjs +76 -0
  6. package/dist/CardHeader-dff9c71a.js +1 -0
  7. package/dist/Comments-b6e32958.js +1 -0
  8. package/dist/Comments-d2a8fd0f.mjs +76 -0
  9. package/dist/EditProductImages-1d4b44a9.mjs +236 -0
  10. package/dist/EditProductImages-d9228ad0.js +1 -0
  11. package/dist/EmptyState-34d85f10.mjs +36 -0
  12. package/dist/EmptyState-7658d7d6.js +1 -0
  13. package/dist/Feed-932d976d.js +1 -0
  14. package/dist/Feed-962e009b.js +1 -0
  15. package/dist/Feed-c93012c7.mjs +346 -0
  16. package/dist/Feed-d8e33aed.mjs +397 -0
  17. package/dist/PlaceholderUserpic-1a6cf257.mjs +28 -0
  18. package/dist/PlaceholderUserpic-3bf126ee.js +1 -0
  19. package/dist/Popup.vue_vue_type_style_index_0_lang-8981c189.mjs +280 -0
  20. package/dist/Popup.vue_vue_type_style_index_0_lang-931f265a.js +1 -0
  21. package/dist/Product-3c64a352.mjs +904 -0
  22. package/dist/Product-67efba5c.js +7 -0
  23. package/dist/ProductEdit-04760699.js +1 -0
  24. package/dist/ProductEdit-39adf62f.mjs +113 -0
  25. package/dist/ProfileBlogposts-00424109.js +1 -0
  26. package/dist/ProfileBlogposts-65a7a5e0.mjs +56 -0
  27. package/dist/ProfileComments-5884d09f.mjs +43 -0
  28. package/dist/ProfileComments-677731b3.js +1 -0
  29. package/dist/ProfileEvents-85a88674.mjs +55 -0
  30. package/dist/ProfileEvents-b5431cd6.js +1 -0
  31. package/dist/ProfileLikes-4a57f637.mjs +43 -0
  32. package/dist/ProfileLikes-8ccf6815.js +1 -0
  33. package/dist/ProfileOrganizations-5d681498.mjs +202 -0
  34. package/dist/ProfileOrganizations-c7688210.js +1 -0
  35. package/dist/Publics-889c25fc.js +1 -0
  36. package/dist/Publics-8bea4201.mjs +44 -0
  37. package/dist/UploadImage-34bc4a3f.mjs +99 -0
  38. package/dist/UploadImage-75b1a18a.js +1 -0
  39. package/dist/auth-18f80fef.mjs +1501 -0
  40. package/dist/auth-78fd9408.js +8 -0
  41. package/dist/auth.client.cjs +5 -5
  42. package/dist/auth.client.js +5 -5
  43. package/dist/auth.validation-6bccabd6.mjs +20 -0
  44. package/dist/auth.validation-a18510e8.js +1 -0
  45. package/dist/community.client.cjs +8 -9
  46. package/dist/community.client.js +568 -552
  47. package/dist/community.server.js +3 -2
  48. package/dist/community.server.mjs +3 -2
  49. package/dist/events.client.cjs +1 -1
  50. package/dist/events.client.js +10 -10
  51. package/dist/files.client.cjs +1 -0
  52. package/dist/files.client.js +1 -0
  53. package/dist/files.server.js +5 -2
  54. package/dist/files.server.mjs +5 -2
  55. package/dist/main.css +1 -1
  56. package/dist/organizations-0e9ff7ca.mjs +319 -0
  57. package/dist/organizations-c77ea9d0.js +1 -0
  58. package/dist/organizations.client.cjs +2 -2
  59. package/dist/organizations.client.js +26 -26
  60. package/dist/prometheus-framework.cjs.js +3 -3
  61. package/dist/prometheus-framework.es.js +8 -8
  62. package/dist/style.css +1 -1
  63. package/dist/users.client.cjs +1 -1
  64. package/dist/users.client.js +10 -10
  65. package/package.json +3 -3
  66. package/src/modules/community/components/elements/ImageUpload.vue +7 -5
  67. package/src/modules/community/components/pages/BlogPost.vue +12 -15
  68. package/src/modules/community/components/pages/CreateBlogPost.vue +14 -1
  69. package/src/modules/community/controllers/blog.controller.js +2 -1
  70. package/src/modules/files/controllers/files.controller.js +5 -1
  71. package/src/modules/files/routes/files.routes.js +3 -1
@@ -1,68 +1,68 @@
1
- import { resolveComponent as de, openBlock as u, createElementBlock as d, createElementVNode as c, createVNode as k, normalizeClass as I, unref as y, createCommentVNode as x, withCtx as S, Transition as le, createBlock as B, resolveDynamicComponent as G, ref as f, onUpdated as z, onMounted as T, watch as H, withDirectives as A, vModelText as L, nextTick as Q, createTextVNode as P, toDisplayString as M, withModifiers as oe, withAsyncContext as ae, watchEffect as se, Fragment as E, renderList as N, createStaticVNode as me, TransitionGroup as X, mergeProps as fe, isRef as re, pushScopeId as ge, popScopeId as he } from "vue";
2
- import { useRoute as O, useRouter as W } from "vue-router";
3
- import { S as ve } from "./Breadcrumbs.vue_vue_type_style_index_0_lang-d777ad17.mjs";
4
- import { s as F, r as K, c as _e, u as be, a as ye, b as ie, _ as xe } from "./Feed-e5fb4972.mjs";
5
- import { d as hn, e as vn, f as _n } from "./Feed-e5fb4972.mjs";
6
- import { s as C, a as we, _ as ce, F as ke } from "./auth-84680727.mjs";
7
- import { V as $e } from "./vue-draggable-next.esm-bundler-ff6e3f52.mjs";
8
- import { _ as Be } from "./EmptyState-1214f70b.mjs";
9
- import { _ as Ce } from "./Publics-21f24533.mjs";
10
- import { _ as Te } from "./Comments-9427a0eb.mjs";
11
- import { useI18n as Pe } from "vue-i18n";
1
+ import { resolveComponent as se, openBlock as u, createElementBlock as d, createElementVNode as r, createVNode as B, normalizeClass as D, unref as v, createCommentVNode as w, withCtx as F, Transition as q, createBlock as U, resolveDynamicComponent as J, ref as m, onUpdated as L, nextTick as j, onMounted as I, watch as A, withDirectives as V, vModelText as O, createTextVNode as S, toDisplayString as M, withModifiers as Y, watchEffect as Z, Fragment as E, renderList as z, createStaticVNode as ee, TransitionGroup as G, mergeProps as ae, isRef as te, withAsyncContext as re, pushScopeId as ie, popScopeId as ce } from "vue";
2
+ import { useRoute as R, useRouter as W } from "vue-router";
3
+ import { S as ue } from "./Breadcrumbs.vue_vue_type_style_index_0_lang-451d2614.mjs";
4
+ import { s as N, r as K, c as pe, u as de, a as me, b as ne, _ as ge } from "./Feed-d8e33aed.mjs";
5
+ import { d as fn, e as hn, f as vn } from "./Feed-d8e33aed.mjs";
6
+ import { s as P, a as fe, _ as le, F as he } from "./auth-18f80fef.mjs";
7
+ import { V as ve } from "./vue-draggable-next.esm-bundler-ff6e3f52.mjs";
8
+ import { _ as _e } from "./EmptyState-34d85f10.mjs";
9
+ import { _ as be } from "./Publics-8bea4201.mjs";
10
+ import { _ as ye } from "./Comments-d2a8fd0f.mjs";
11
+ import { useI18n as xe } from "vue-i18n";
12
12
  import "./globals-f538c0ef.mjs";
13
- import "./CardHeader-88de7b20.mjs";
14
- import "./PlaceholderUserpic-4fe04ec9.mjs";
15
- import "./organizations-a9b86de7.mjs";
16
- import "./ButtonFollow-6bbf3e24.mjs";
17
- const Ie = { class: "min-h-100vh pd-thin" }, Se = { class: "mn-thin flex-v-center t-left flex-nowrap flex" }, Ue = { class: "flex-v-center flex-nowrap flex t-left" }, Me = /* @__PURE__ */ c("span", { class: "" }, "Topics for ", -1), De = { class: "bg-grey pd-medium radius-big mn-semi flex-nowrap flex" }, Fe = { class: "" }, He = {
13
+ import "./CardHeader-2d7e5d49.mjs";
14
+ import "./PlaceholderUserpic-1a6cf257.mjs";
15
+ import "./organizations-0e9ff7ca.mjs";
16
+ import "./ButtonFollow-0d83a04a.mjs";
17
+ const we = { class: "min-h-100vh pd-thin" }, ke = { class: "mn-thin flex-v-center t-left flex-nowrap flex" }, $e = { class: "flex-v-center flex-nowrap flex t-left" }, Be = /* @__PURE__ */ r("span", { class: "" }, "Topics for ", -1), Ce = { class: "bg-grey pd-medium radius-big mn-semi flex-nowrap flex" }, Te = { class: "" }, Pe = {
18
18
  __name: "Community",
19
19
  setup(l) {
20
- const s = O(), e = W();
21
- return (o, i) => {
22
- const a = de("router-view");
23
- return u(), d("div", Ie, [
24
- c("header", Se, [
25
- c("h2", Ue, [
26
- Me,
27
- k(ve, {
20
+ const s = R(), t = W();
21
+ return (e, i) => {
22
+ const c = se("router-view");
23
+ return u(), d("div", we, [
24
+ r("header", ke, [
25
+ r("h2", $e, [
26
+ Be,
27
+ B(ue, {
28
28
  options: ["today", "week", "month", "year"],
29
- select: F.filter.period,
30
- "onUpdate:select": i[0] || (i[0] = (n) => F.filter.period = n),
29
+ select: N.filter.period,
30
+ "onUpdate:select": i[0] || (i[0] = (n) => N.filter.period = n),
31
31
  placeholder: "Select type",
32
32
  class: "w-max mn-l-small bg-grey pd-thin radius-medium h2 t-center t-black"
33
33
  }, null, 8, ["select"])
34
34
  ])
35
35
  ]),
36
- c("ul", De, [
37
- c("li", {
38
- class: I([{ "t-white bg-black": y(s).params.category === "featured" }, "mn-r-small t-medium pd-small radius-small"]),
39
- onClick: i[1] || (i[1] = (n) => y(e).push({ name: "Blog" }))
36
+ r("ul", Ce, [
37
+ r("li", {
38
+ class: D([{ "t-white bg-black": v(s).params.category === "featured" }, "mn-r-small t-medium pd-small radius-small"]),
39
+ onClick: i[1] || (i[1] = (n) => v(t).push({ name: "Blog" }))
40
40
  }, "👑 Featured", 2),
41
- c("li", {
42
- class: I([{ "t-white bg-black": y(s).params.category === "popular" }, "mn-r-small t-medium pd-small radius-small"]),
43
- onClick: i[2] || (i[2] = (n) => y(e).push({ name: "Blog", params: { category: "popular" } }))
41
+ r("li", {
42
+ class: D([{ "t-white bg-black": v(s).params.category === "popular" }, "mn-r-small t-medium pd-small radius-small"]),
43
+ onClick: i[2] || (i[2] = (n) => v(t).push({ name: "Blog", params: { category: "popular" } }))
44
44
  }, "🔥 Popular", 2),
45
- c("li", {
46
- class: I([{ "t-white bg-black": y(s).params.category === "new" }, "mn-r-small t-medium pd-small radius-small"]),
47
- onClick: i[3] || (i[3] = (n) => y(e).push({ name: "Blog", params: { category: "new" } }))
45
+ r("li", {
46
+ class: D([{ "t-white bg-black": v(s).params.category === "new" }, "mn-r-small t-medium pd-small radius-small"]),
47
+ onClick: i[3] || (i[3] = (n) => v(t).push({ name: "Blog", params: { category: "new" } }))
48
48
  }, "🆕 New", 2),
49
- C.user._id ? (u(), d("li", {
49
+ P.user._id ? (u(), d("li", {
50
50
  key: 0,
51
- class: I([{ "t-white bg-black": y(s).params.category === "following" }, "t-medium pd-small radius-small"]),
52
- onClick: i[4] || (i[4] = (n) => y(e).push({ name: "Blog", params: { category: "following" } }))
53
- }, "👥 Following", 2)) : x("", !0)
51
+ class: D([{ "t-white bg-black": v(s).params.category === "following" }, "t-medium pd-small radius-small"]),
52
+ onClick: i[4] || (i[4] = (n) => v(t).push({ name: "Blog", params: { category: "following" } }))
53
+ }, "👥 Following", 2)) : w("", !0)
54
54
  ]),
55
- c("section", Fe, [
56
- k(a, null, {
57
- default: S(({ Component: n, route: t }) => [
58
- k(le, {
55
+ r("section", Te, [
56
+ B(c, null, {
57
+ default: F(({ Component: n, route: a }) => [
58
+ B(q, {
59
59
  name: "scaleIn",
60
60
  mode: "out-in"
61
61
  }, {
62
- default: S(() => [
63
- (u(), B(G(n), {
62
+ default: F(() => [
63
+ (u(), U(J(n), {
64
64
  ref: "page",
65
- key: t.query
65
+ key: a.query
66
66
  }))
67
67
  ]),
68
68
  _: 2
@@ -75,179 +75,193 @@ const Ie = { class: "min-h-100vh pd-thin" }, Se = { class: "mn-thin flex-v-cente
75
75
  };
76
76
  }
77
77
  };
78
- const je = ["placeholder"], J = {
78
+ const Ie = ["placeholder"], Q = {
79
79
  __name: "Textarea",
80
- props: ["obj", "label", "prop", "value", "content", "textarea", "placeholder", "index", "ref"],
81
- emits: ["deleteBlock", "addBlock", "focus"],
80
+ props: ["obj", "label", "prop", "value", "content", "textarea", "placeholder", "index", "ref", "setFocus"],
81
+ emits: ["deleteBlock", "updateBlock", "addBlock", "focus"],
82
82
  setup(l, { emit: s }) {
83
- const e = l;
84
- f(e);
85
- const o = f(null);
86
- function i(n) {
87
- let t = n.target.value.split(/\n+/);
88
- if (t.length > 1) {
89
- e.prop[e.content] = t[0], Q(() => {
83
+ const t = l;
84
+ m(t);
85
+ const e = m(null);
86
+ m(0);
87
+ function i(o) {
88
+ let p = o.target.value.split(/\n+/);
89
+ if (p.length > 1) {
90
+ t.prop[t.content] = p[0], j(() => {
90
91
  a();
91
92
  });
92
- let r = t.slice(1).map((p) => ({ __name: "Textarea", content: p }));
93
- s("addBlock", "Textarea", "", e.index, { blocks: r, ref: o });
93
+ let g = p.slice(1).map((h) => ({ __name: "Textarea", content: h }));
94
+ s("addBlock", "Textarea", "", t.index, { blocks: g, ref: e });
94
95
  } else
95
- n.target.value.trim() === "" && n.target.value.includes(`
96
+ o.target.value.trim() === "" && o.target.value.includes(`
96
97
 
97
- `) && s("addBlock", "Textarea", "", e.index, { blocks: newBlocks, ref: o }), a();
98
+ `) && (console.log("We are adding new block:" + t.index + newBlocks + e), s("addBlock", "Textarea", "", t.index, { blocks: newBlocks, ref: e })), a();
99
+ }
100
+ function c(o) {
101
+ (o.keyCode === 8 || o.keyCode === 46) && t.prop[t.content].trim() === "" && s("deleteBlock", t.prop);
102
+ }
103
+ function n() {
104
+ j(() => {
105
+ e.value.focus(), s("updateBlock", t.prop, { setFocus: !1 });
106
+ });
98
107
  }
99
108
  function a() {
100
- o.value.style.height = "1rem", o.value.style.height = o.value.scrollHeight + "px";
109
+ e.value.style.height = "1rem", e.value.style.height = e.value.scrollHeight + "px";
101
110
  }
102
- return z(() => {
103
- a();
104
- }), T(() => {
105
- a();
106
- }), H(() => e.prop[e.content], (n) => {
107
- n === "" && !n.includes(`
108
- `) && s("deleteBlock", e.prop);
109
- }), (n, t) => A((u(), d("textarea", {
110
- "onUpdate:modelValue": t[0] || (t[0] = (r) => l.prop[l.content] = r),
111
- placeholder: l.placeholder ? l.placeholder : "Enter text",
112
- onInput: i,
113
- onFocus: t[1] || (t[1] = (r) => s("focus", o.value)),
114
- ref_key: "textarea",
115
- ref: o,
116
- class: "text-area mn-small"
117
- }, `
118
- `, 40, je)), [
119
- [L, l.prop[l.content]]
120
- ]);
111
+ return L(() => {
112
+ t.setFocus && j(() => {
113
+ n();
114
+ }), a();
115
+ }), I(() => {
116
+ t.setFocus && j(() => {
117
+ n();
118
+ }), a();
119
+ }), A(() => t.prop[t.content], (o) => {
120
+ }), (o, p) => (u(), d("div", null, [
121
+ V(r("textarea", {
122
+ "onUpdate:modelValue": p[0] || (p[0] = (g) => l.prop[l.content] = g),
123
+ placeholder: l.placeholder ? l.placeholder : "Enter text",
124
+ onInput: i,
125
+ onFocus: p[1] || (p[1] = (g) => s("focus", e.value)),
126
+ onKeyup: c,
127
+ ref_key: "textarea",
128
+ ref: e,
129
+ class: "text-area mn-thin"
130
+ }, `
131
+ `, 40, Ie), [
132
+ [O, l.prop[l.content]]
133
+ ])
134
+ ]));
121
135
  }
122
- }, Ee = ["placeholder"], Y = {
136
+ }, Se = ["placeholder"], Fe = {
123
137
  __name: "H2",
124
138
  props: ["obj", "label", "prop", "value", "content", "textarea", "placeholder", "index", "ref"],
125
139
  emits: ["deleteBlock", "addBlock", "focus"],
126
140
  setup(l, { emit: s }) {
127
- const e = l;
128
- f(e);
129
- const o = f(null);
141
+ const t = l;
142
+ m(t);
143
+ const e = m(null);
130
144
  function i(n) {
131
- let t = n.target.value.split(/\n+/);
132
- if (t.length > 1) {
133
- e.prop[e.content] = t[0], Q(() => {
134
- a();
145
+ let a = n.target.value.split(/\n+/);
146
+ if (a.length > 1) {
147
+ t.prop[t.content] = a[0], j(() => {
148
+ c();
135
149
  });
136
- let r = t.slice(1).map((p) => ({ __name: "H2", content: p }));
137
- s("addBlock", "H2", "", e.index, { blocks: r, ref: o });
150
+ let o = a.slice(1).map((p) => ({ __name: "H2", content: p }));
151
+ s("addBlock", "H2", "", t.index, { blocks: o, ref: e });
138
152
  } else
139
153
  n.target.value.trim() === "" && n.target.value.includes(`
140
154
 
141
- `) && s("addBlock", "H2", "", e.index, { blocks: newBlocks, ref: o }), a();
155
+ `) && s("addBlock", "H2", "", t.index, { blocks: newBlocks, ref: e }), c();
142
156
  }
143
- function a() {
144
- o.value.style.height = "1rem", o.value.style.height = o.value.scrollHeight + "px";
157
+ function c() {
158
+ e.value.style.height = "1rem", e.value.style.height = e.value.scrollHeight + "px";
145
159
  }
146
- return z(() => {
147
- a();
148
- }), T(() => {
149
- a();
150
- }), H(() => e.prop[e.content], (n) => {
160
+ return L(() => {
161
+ c();
162
+ }), I(() => {
163
+ c();
164
+ }), A(() => t.prop[t.content], (n) => {
151
165
  n === "" && !n.includes(`
152
- `) && s("deleteBlock", e.prop);
153
- }), (n, t) => A((u(), d("textarea", {
154
- "onUpdate:modelValue": t[0] || (t[0] = (r) => l.prop[l.content] = r),
166
+ `) && s("deleteBlock", t.prop);
167
+ }), (n, a) => V((u(), d("textarea", {
168
+ "onUpdate:modelValue": a[0] || (a[0] = (o) => l.prop[l.content] = o),
155
169
  placeholder: l.placeholder ? l.placeholder : "Enter text",
156
170
  onInput: i,
157
- onFocus: t[1] || (t[1] = (r) => s("focus", o.value)),
171
+ onFocus: a[1] || (a[1] = (o) => s("focus", e.value)),
158
172
  ref_key: "textarea",
159
- ref: o,
173
+ ref: e,
160
174
  class: "h3 w-100 mn-t-semi mn-medium t-semi"
161
175
  }, `
162
- `, 40, Ee)), [
163
- [L, l.prop[l.content]]
176
+ `, 40, Se)), [
177
+ [O, l.prop[l.content]]
164
178
  ]);
165
179
  }
166
- }, Ne = ["placeholder"], Z = {
180
+ }, Ue = ["placeholder"], Me = {
167
181
  __name: "Caption",
168
182
  props: ["obj", "label", "prop", "value", "content", "textarea", "placeholder", "index", "ref"],
169
183
  emits: ["deleteBlock", "addBlock", "focus"],
170
184
  setup(l, { emit: s }) {
171
- const e = l;
172
- f(e);
173
- const o = f(null);
185
+ const t = l;
186
+ m(t);
187
+ const e = m(null);
174
188
  function i(n) {
175
- const t = /^\s*[-*]\s+(.*)/;
176
- let p = n.target.value.split(/\n+/).map((_) => {
177
- const b = t.exec(_);
178
- return b ? b[1] : null;
179
- }).filter((_) => _ !== null);
180
- p.length > 0 ? (e.prop[e.content] = p, a()) : n.target.value.trim() === "" && (e.prop[e.content] = [], a());
189
+ const a = /^\s*[-*]\s+(.*)/;
190
+ let p = n.target.value.split(/\n+/).map((g) => {
191
+ const h = a.exec(g);
192
+ return h ? h[1] : null;
193
+ }).filter((g) => g !== null);
194
+ p.length > 0 ? (t.prop[t.content] = p, c()) : n.target.value.trim() === "" && (t.prop[t.content] = [], c());
181
195
  }
182
- function a() {
183
- o.value.style.height = "1rem", o.value.style.height = o.value.scrollHeight + "px";
196
+ function c() {
197
+ e.value.style.height = "1rem", e.value.style.height = e.value.scrollHeight + "px";
184
198
  }
185
- return z(() => {
186
- a();
187
- }), T(() => {
188
- a();
189
- }), H(() => e.prop[e.content], (n) => {
190
- (!n || n.length === 0) && s("deleteBlock", e.prop);
191
- }), (n, t) => (u(), d("div", null, [
192
- A(c("textarea", {
193
- "onUpdate:modelValue": t[0] || (t[0] = (r) => l.prop[l.content] = r),
199
+ return L(() => {
200
+ c();
201
+ }), I(() => {
202
+ c();
203
+ }), A(() => t.prop[t.content], (n) => {
204
+ (!n || n.length === 0) && s("deleteBlock", t.prop);
205
+ }), (n, a) => (u(), d("div", null, [
206
+ V(r("textarea", {
207
+ "onUpdate:modelValue": a[0] || (a[0] = (o) => l.prop[l.content] = o),
194
208
  placeholder: l.placeholder ? l.placeholder : "Enter text",
195
209
  onInput: i,
196
- onFocus: t[1] || (t[1] = (r) => s("focus", o.value)),
210
+ onFocus: a[1] || (a[1] = (o) => s("focus", e.value)),
197
211
  ref_key: "textarea",
198
- ref: o,
212
+ ref: e,
199
213
  class: "br-l br-solid br-main pd-l-small text-area mn-small"
200
214
  }, `
201
- `, 40, Ne), [
202
- [L, l.prop[l.content]]
215
+ `, 40, Ue), [
216
+ [O, l.prop[l.content]]
203
217
  ])
204
218
  ]));
205
219
  }
206
- }, ze = ["placeholder"], ee = {
220
+ }, De = ["placeholder"], He = {
207
221
  __name: "Bullets",
208
222
  props: ["obj", "label", "prop", "value", "content", "textarea", "placeholder", "index", "ref"],
209
223
  emits: ["deleteBlock", "addBlock", "focus"],
210
224
  setup(l, { emit: s }) {
211
- const e = l;
212
- f(e);
213
- const o = f(null);
225
+ const t = l;
226
+ m(t);
227
+ const e = m(null);
214
228
  function i(n) {
215
- const t = /^\s*[-*]\s+(.*)/;
216
- let p = n.target.value.split(/\n+/).map((_) => {
217
- const b = t.exec(_);
218
- return b ? b[1] : null;
219
- }).filter((_) => _ !== null);
220
- p.length > 0 ? (e.prop[e.content] = p, a()) : n.target.value.trim() === "" && (e.prop[e.content] = [], a());
229
+ const a = /^\s*[-*]\s+(.*)/;
230
+ let p = n.target.value.split(/\n+/).map((g) => {
231
+ const h = a.exec(g);
232
+ return h ? h[1] : null;
233
+ }).filter((g) => g !== null);
234
+ p.length > 0 ? (t.prop[t.content] = p, c()) : n.target.value.trim() === "" && (t.prop[t.content] = [], c());
221
235
  }
222
- function a() {
223
- o.value.style.height = "1rem", o.value.style.height = o.value.scrollHeight + "px";
236
+ function c() {
237
+ e.value.style.height = "1rem", e.value.style.height = e.value.scrollHeight + "px";
224
238
  }
225
- return z(() => {
226
- a();
227
- }), T(() => {
228
- a();
229
- }), H(() => e.prop[e.content], (n) => {
230
- (!n || n.length === 0) && s("deleteBlock", e.prop);
231
- }), (n, t) => (u(), d("div", null, [
232
- P(M(l.prop[l.content]) + " ", 1),
233
- A(c("textarea", {
234
- "onUpdate:modelValue": t[0] || (t[0] = (r) => l.prop[l.content] = r),
239
+ return L(() => {
240
+ c();
241
+ }), I(() => {
242
+ c();
243
+ }), A(() => t.prop[t.content], (n) => {
244
+ (!n || n.length === 0) && s("deleteBlock", t.prop);
245
+ }), (n, a) => (u(), d("div", null, [
246
+ S(M(l.prop[l.content]) + " ", 1),
247
+ V(r("textarea", {
248
+ "onUpdate:modelValue": a[0] || (a[0] = (o) => l.prop[l.content] = o),
235
249
  placeholder: l.placeholder ? l.placeholder : "Enter text",
236
250
  onInput: i,
237
- onFocus: t[1] || (t[1] = (r) => s("focus", o.value)),
251
+ onFocus: a[1] || (a[1] = (o) => s("focus", e.value)),
238
252
  ref_key: "textarea",
239
- ref: o,
253
+ ref: e,
240
254
  class: "text-area mn-small"
241
255
  }, `
242
- `, 40, ze), [
243
- [L, l.prop[l.content]]
256
+ `, 40, De), [
257
+ [O, l.prop[l.content]]
244
258
  ])
245
259
  ]));
246
260
  }
247
- }, Ae = ["src"], Le = {
261
+ }, je = ["src"], Ne = {
248
262
  key: 1,
249
263
  class: "t-transp pd-extra"
250
- }, te = {
264
+ }, Ae = {
251
265
  __name: "ImageUpload",
252
266
  props: [
253
267
  "label",
@@ -256,47 +270,47 @@ const je = ["placeholder"], J = {
256
270
  ],
257
271
  emits: ["input", "updateBlock"],
258
272
  setup(l, { emit: s }) {
259
- const e = l, o = f(null), i = f(null);
260
- function a() {
273
+ const t = l, e = m(null), i = m(null);
274
+ function c() {
261
275
  i.value.click();
262
276
  }
263
- async function n(r) {
264
- let p = r.target.files[0], _ = new FormData();
265
- _.append("file", p);
277
+ async function n(o) {
278
+ let p = o.target.files[0];
279
+ console.log(p);
280
+ let g = new FormData(), h = "unsorted";
281
+ g.append("file", p), console.log(g.has("file"));
266
282
  try {
267
- const b = we.create({ baseURL: process.env.API_URL, withCredentials: !0 });
268
- console.log(_), console.log(process.env.API_URL);
269
- let $ = await b.post("/api/upload/image", _, {
283
+ let H = await fe.create({ baseURL: process.env.API_URL, withCredentials: !0 }).post(`/api/upload/file?folderName=${encodeURIComponent(h)}`, g, {
270
284
  headers: {
271
285
  "Content-Type": "multipart/form-data"
272
286
  }
273
287
  });
274
- o.value = $.data.filepath, s("input", o.value), s("updateBlock", e.prop, o.value);
275
- } catch (b) {
276
- console.error(b);
288
+ e.value = H.data.filepath, console.log(e.value), s("input", e.value), s("updateBlock", t.prop, { content: e.value });
289
+ } catch (C) {
290
+ console.error(C);
277
291
  }
278
292
  }
279
- function t(r) {
280
- r.preventDefault(), n({
293
+ function a(o) {
294
+ o.preventDefault(), n({
281
295
  target: {
282
- files: r.dataTransfer.files
296
+ files: o.dataTransfer.files
283
297
  }
284
298
  });
285
299
  }
286
- return (r, p) => (u(), d("div", {
287
- onClick: a,
288
- onDrop: t,
289
- onDragover: p[0] || (p[0] = oe(() => {
300
+ return (o, p) => (u(), d("div", {
301
+ onClick: c,
302
+ onDrop: a,
303
+ onDragover: p[0] || (p[0] = Y(() => {
290
304
  }, ["prevent"])),
291
- class: "w-100 image-upload-area bg-grey flex-v-center flex-h-center flex t-black mn-small"
305
+ class: "w-100 radius-big bg-white image-upload-area flex-v-center flex-h-center flex t-black mn-small"
292
306
  }, [
293
307
  l.prop.content ? (u(), d("img", {
294
308
  key: 0,
295
309
  src: l.prop.content,
296
310
  alt: "Uploaded image",
297
311
  class: "w-100 h-30r object-fit-contain"
298
- }, null, 8, Ae)) : (u(), d("span", Le, "Click or drag-and-drop your image")),
299
- c("input", {
312
+ }, null, 8, je)) : (u(), d("span", Ne, "Click or drag-and-drop your image")),
313
+ r("input", {
300
314
  type: "file",
301
315
  ref_key: "fileInput",
302
316
  ref: i,
@@ -305,197 +319,202 @@ const je = ["placeholder"], J = {
305
319
  }, null, 544)
306
320
  ], 32));
307
321
  }
308
- };
309
- const Oe = { class: "pd-thin" }, Ve = { class: "pd-t-big pd-b-big pd-thin radius-big" }, Re = { class: "mn-l-semi mn-r-semi w-full h-full" }, qe = ["onMouseover"], Je = { class: "mn-l-semi mn-r-semi relative w-full h-full" }, Ge = {
322
+ }, Ee = { class: "pd-big" }, ze = {
323
+ key: 0,
324
+ class: "cols-2 gap-thin"
325
+ }, Le = { class: "w-100 bg-grey pd-big radius-big" }, Ve = { class: "w-full h-full" }, Oe = ["onMouseover"], Re = {
310
326
  key: 0,
311
- class: "z-index-5 relative left-0 mt-2 w-48 bg-white shadow-lg rounded"
312
- }, Qe = ["onClick"], We = /* @__PURE__ */ c("button", { class: "block w-full text-left px-4 py-2 hover:bg-gray-200" }, "Поменять тип", -1), Ke = ["onClick"], Xe = ["onClick"], Ye = ["onClick"], Ze = ["onClick"], et = { class: "pd-thin bg-grey pos-fixed pos-l-0 pos-b-0 w-100" }, tt = {
327
+ class: "z-index-5 radius-thin mn-small relative left-0 mt-2 w-48 bg-white shadow-lg rounded"
328
+ }, qe = ["onClick"], Je = /* @__PURE__ */ r("button", { class: "block w-full text-left px-4 py-2 hover:bg-gray-200" }, "Поменять тип", -1), We = ["onClick"], Ke = ["onClick"], Ge = ["onClick"], Qe = ["onClick"], Xe = /* @__PURE__ */ ee('<section class=""><h4 class="mn-small">Select public</h4><div class="mn-semi bg-grey pd-big radius-big gw-100"></div><h4 class="mn-small">Add tags</h4><div class="bg-grey pd-big radius-big gw-100"></div></section>', 1), Ye = { class: "pd-thin pos-fixed pos-l-0 pos-b-0 w-100" }, Ze = { class: "pd-thin radius-big bg-main w-100 flex-nowrap flex" }, et = {
313
329
  __name: "CreateBlogPost",
314
- async setup(l) {
315
- let s, e;
316
- const o = O(), i = W();
317
- let a = f({});
318
- if (o.params.url) {
319
- const m = ([s, e] = ae(() => K({ owner: C.user._id, url: o.params.url })), s = await s, e(), s);
320
- a.value = m.pop();
321
- } else
322
- _e(), a.value = F.current;
323
- a.value.owner = C.user._id;
324
- const n = {
325
- Textarea: J,
326
- H2: Y,
327
- Bullets: ee,
328
- Caption: Z,
329
- ImageUpload: te
330
+ setup(l) {
331
+ const s = R(), t = W();
332
+ let e = m(null);
333
+ I(async () => {
334
+ if (s.params.url) {
335
+ const b = await K({ owner: P.user._id, url: s.params.url });
336
+ e.value = b.pop();
337
+ } else
338
+ pe(), e.value = N.current;
339
+ e.value.owner = {
340
+ target: P.user._id,
341
+ type: "user"
342
+ }, e.value.creator = {
343
+ target: P.user._id,
344
+ type: "user"
345
+ };
346
+ });
347
+ const i = {
348
+ Textarea: Q,
349
+ H2: Fe,
350
+ Bullets: He,
351
+ Caption: Me,
352
+ ImageUpload: Ae
330
353
  };
331
- function t(m = "Textarea", v = "", g, h) {
332
- let w = {
333
- order: a.value.content.length + 1,
334
- type: { name: m, value: n[m] },
354
+ function c(b = "Textarea", _ = "", f, y) {
355
+ console.log("We are adding new block (functuin HandleAddBlock):" + b + _ + f + y);
356
+ let x = {
357
+ order: e.value.content.length + 1,
358
+ type: b,
335
359
  style: "",
336
- class: "",
337
- content: v,
360
+ class: "p-medium",
361
+ content: _,
338
362
  blocks: [],
339
- ref: h && h.ref ? h.ref : f(null)
363
+ setFocus: !0
340
364
  };
341
- if (h && h.blocks && Array.isArray(h.blocks)) {
342
- let q = h.blocks.map((pe) => ({
343
- ...w,
344
- content: pe.content,
345
- ref: f(null)
346
- })), ue = [(h.index || g) + 1, 0].concat(q);
347
- a.value.content.splice.apply(a.value.content, ue), q[q.length - 1];
365
+ if (y && y.blocks && Array.isArray(y.blocks)) {
366
+ let $ = y.blocks.map((oe) => ({
367
+ ...x,
368
+ content: oe.content
369
+ })), k = [(y.index || f) + 1, 0].concat($);
370
+ e.value.content.splice.apply(e.value.content, k);
371
+ const T = $[$.length - 1];
372
+ console.log("New block is" + T);
348
373
  } else
349
- g !== void 0 ? a.value.content.splice(g + 1, 0, w) : a.value.content.push(w);
350
- Q(() => {
351
- w.focus();
352
- });
374
+ f !== void 0 ? (e.value.content.splice(f + 1, 0, x), console.log("Latest block is" + x)) : (console.log("Another block is" + x), e.value.content.push(x));
375
+ p.value = null;
353
376
  }
354
- function r(m, v) {
355
- const g = a.value.content.findIndex((h) => h === m);
356
- g !== -1 && (a.value.content[g].content = v);
377
+ function n(b, _) {
378
+ const f = e.value.content.findIndex((y) => y === b);
379
+ f !== -1 && (e.value.content[f] = { ...e.value.content[f], ..._ });
357
380
  }
358
- function p(m) {
359
- let v = a.value.content.findIndex((g) => g === m);
360
- v !== -1 && a.value.content.splice(v, 1);
381
+ function a(b) {
382
+ let _ = e.value.content.findIndex((f) => f === b);
383
+ _ !== -1 && e.value.content.splice(_, 1), e.value.content[_ - 1].setFocus = !0;
361
384
  }
362
- function _(m) {
363
- m.focus();
364
- }
365
- function b() {
366
- o.params.url ? be(a.value).then((m) => {
367
- i.push({ name: "BlogPost", params: { url: m.url } });
368
- }).catch((m) => {
369
- console.log(m);
370
- }) : ye(a.value).then((m) => {
371
- i.push({ name: "BlogPost", params: { url: m.url } });
372
- }).catch((m) => {
373
- console.log(m);
385
+ function o() {
386
+ s.params.url ? de(e.value).then((b) => {
387
+ t.push({ name: "BlogPost", params: { url: b.url } });
388
+ }).catch((b) => {
389
+ console.log(b);
390
+ }) : me(e.value).then((b) => {
391
+ t.push({ name: "BlogPost", params: { url: b.url } });
392
+ }).catch((b) => {
393
+ console.log(b);
374
394
  });
375
395
  }
376
- const $ = f(null), D = f(!1), U = f(!1);
377
- function j(m) {
378
- if (m.__name) {
379
- if (m.__name === "Textarea")
380
- return J;
381
- if (m.__name === "ImageUpload")
382
- return te;
383
- if (m.__name === "H2")
384
- return Y;
385
- if (m.__name === "Bullets")
386
- return ee;
387
- if (m.__name === "Caption")
388
- return Z;
389
- } else
390
- return m;
391
- }
392
- function V() {
393
- D.value = !0;
396
+ const p = m(null), g = m(!1), h = m(!1);
397
+ function C() {
398
+ g.value = !0;
394
399
  }
395
- function R() {
396
- D.value = !1;
400
+ function H() {
401
+ g.value = !1;
397
402
  }
398
- return se(() => {
399
- a.value.content.length === 0 && t("Textarea", "");
400
- }), (m, v) => (u(), d("article", Oe, [
401
- c("section", Ve, [
402
- c("div", Re, [
403
- k(J, {
404
- prop: y(a),
405
- content: "name",
406
- placeholder: "Enter post title",
407
- class: "h2"
408
- }, null, 8, ["prop"])
409
- ]),
410
- y(a).content ? (u(), B(y($e), {
411
- key: 0,
412
- class: "w-full",
413
- list: y(a).content,
414
- onStart: V,
415
- onEnd: R
416
- }, {
417
- default: S(() => [
418
- (u(!0), d(E, null, N(y(a).content, (g, h) => (u(), d("div", {
419
- key: h,
420
- class: "relative",
421
- onMouseover: (w) => $.value = h,
422
- onMouseleave: v[2] || (v[2] = (w) => {
423
- $.value = null, U.value = !1;
424
- })
425
- }, [
426
- c("div", Je, [
427
- (u(), B(G(j(g.type.value)), {
428
- index: h,
429
- component: g,
430
- prop: g,
431
- class: I(g.class),
432
- content: "content",
433
- onDeleteBlock: p,
434
- onAddBlock: t,
435
- onUpdateBlock: r,
436
- onFocusBlock: _
437
- }, null, 40, ["index", "component", "prop", "class"]))
438
- ]),
439
- $.value === h ? (u(), d("div", {
440
- key: 0,
441
- class: "pos-absolute pos-l-0 pos-t-0",
442
- onMousedown: v[1] || (v[1] = oe((w) => D.value = !0, ["prevent"]))
443
- }, [
444
- c("button", {
445
- onClick: v[0] || (v[0] = (w) => U.value = !U.value),
446
- class: "i-regular bg-grey radius-thin"
447
- }, M(g.content ? "..." : "+"), 1),
448
- U.value ? (u(), d("div", Ge, [
449
- c("button", {
450
- onClick: (w) => p(g),
451
- class: "block w-full text-left px-4 py-2 hover:bg-gray-200"
452
- }, "Удалить", 8, Qe),
453
- We,
454
- c("button", {
455
- onClick: (w) => t("ImageUpload", "", h),
456
- class: "block w-full text-left px-4 py-2 hover:bg-gray-200"
457
- }, "Добавить изображение", 8, Ke),
458
- c("button", {
459
- onClick: (w) => t("H2", "", h),
460
- class: "block w-full text-left px-4 py-2 hover:bg-gray-200"
461
- }, "Добавить заголовок", 8, Xe),
462
- c("button", {
463
- onClick: (w) => t("Bullets", "", h),
464
- class: "block w-full text-left px-4 py-2 hover:bg-gray-200"
465
- }, "Добавить список", 8, Ye),
466
- c("button", {
467
- onClick: (w) => t("Caption", "", h),
468
- class: "block w-full text-left px-4 py-2 hover:bg-gray-200"
469
- }, "Добавить выделенный текст", 8, Ze)
470
- ])) : x("", !0)
471
- ], 32)) : x("", !0)
472
- ], 40, qe))), 128))
403
+ return Z(() => {
404
+ e.value && e.value.content.length === 0 && c("Textarea", "");
405
+ }), (b, _) => (u(), d("article", Ee, [
406
+ v(e) ? (u(), d("div", ze, [
407
+ S(M(v(e).owner) + " " + M(v(e).creator) + " ", 1),
408
+ r("section", Le, [
409
+ r("div", Ve, [
410
+ B(Q, {
411
+ prop: v(e),
412
+ content: "name",
413
+ placeholder: "Enter post title",
414
+ class: "h2"
415
+ }, null, 8, ["prop"])
473
416
  ]),
474
- _: 1
475
- }, 8, ["list"])) : x("", !0)
476
- ]),
477
- c("section", et, [
478
- c("a", {
479
- onClick: v[3] || (v[3] = (g) => b()),
480
- class: "mn-l-auto bg-main button"
481
- }, "Publish")
417
+ v(e).content ? (u(), U(v(ve), {
418
+ key: 0,
419
+ class: "w-full",
420
+ list: v(e).content,
421
+ onStart: C,
422
+ onEnd: H
423
+ }, {
424
+ default: F(() => [
425
+ (u(!0), d(E, null, z(v(e).content, (f, y) => (u(), d("div", {
426
+ key: y,
427
+ class: "relative"
428
+ }, [
429
+ r("div", {
430
+ onMouseover: (x) => (p.value = y, h.value = !1),
431
+ class: "w-full h-full"
432
+ }, [
433
+ (u(), U(J(i[f.type]), {
434
+ index: y,
435
+ component: f,
436
+ prop: f,
437
+ class: D(f.class),
438
+ setFocus: f.setFocus,
439
+ content: "content",
440
+ onDeleteBlock: a,
441
+ onAddBlock: c,
442
+ onUpdateBlock: n
443
+ }, null, 40, ["index", "component", "prop", "class", "setFocus"]))
444
+ ], 40, Oe),
445
+ B(q, { name: "fade" }, {
446
+ default: F(() => [
447
+ p.value === y ? (u(), d("div", {
448
+ key: 0,
449
+ class: "pos-absolute pos-r-100 pos-t-0 z-index-4 i-semi",
450
+ onMousedown: _[1] || (_[1] = Y((x) => g.value = !0, ["prevent"]))
451
+ }, [
452
+ r("button", {
453
+ onClick: _[0] || (_[0] = (x) => h.value = !h.value),
454
+ class: "mn-small w-100 i-big bg-white radius-thin"
455
+ }, M(f.content ? "..." : "+"), 1),
456
+ h.value ? (u(), d("div", Re, [
457
+ r("button", {
458
+ onClick: (x) => a(f),
459
+ class: "block w-full text-left px-4 py-2 hover:bg-gray-200"
460
+ }, "Удалить", 8, qe),
461
+ Je,
462
+ r("button", {
463
+ onClick: (x) => c("ImageUpload", "", y),
464
+ class: "block w-full text-left px-4 py-2 hover:bg-gray-200"
465
+ }, "Добавить изображение", 8, We),
466
+ r("button", {
467
+ onClick: (x) => c("H2", "", y),
468
+ class: "block w-full text-left px-4 py-2 hover:bg-gray-200"
469
+ }, "Добавить заголовок", 8, Ke),
470
+ r("button", {
471
+ onClick: (x) => c("Bullets", "", y),
472
+ class: "block w-full text-left px-4 py-2 hover:bg-gray-200"
473
+ }, "Добавить список", 8, Ge),
474
+ r("button", {
475
+ onClick: (x) => c("Caption", "", y),
476
+ class: "block w-full text-left px-4 py-2 hover:bg-gray-200"
477
+ }, "Добавить выделенный текст", 8, Qe)
478
+ ])) : w("", !0)
479
+ ], 32)) : w("", !0)
480
+ ]),
481
+ _: 2
482
+ }, 1024)
483
+ ]))), 128))
484
+ ]),
485
+ _: 1
486
+ }, 8, ["list"])) : w("", !0)
487
+ ]),
488
+ Xe
489
+ ])) : w("", !0),
490
+ r("section", Ye, [
491
+ r("div", Ze, [
492
+ r("a", {
493
+ onClick: _[2] || (_[2] = (f) => o()),
494
+ class: "mn-l-auto bg-white t-black button"
495
+ }, "To Drafts"),
496
+ r("a", {
497
+ onClick: _[3] || (_[3] = (f) => o()),
498
+ class: "mn-l-thin bg-black t-white button"
499
+ }, "Publish")
500
+ ])
482
501
  ])
483
502
  ]));
484
503
  }
485
- }, ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
504
+ }, X = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
486
505
  __proto__: null,
487
- default: tt
488
- }, Symbol.toStringTag, { value: "Module" })), nt = {}, lt = {
506
+ default: et
507
+ }, Symbol.toStringTag, { value: "Module" })), tt = {}, nt = {
489
508
  width: "100%",
490
509
  height: "20rem",
491
510
  xmlns: "http://www.w3.org/2000/svg"
492
- }, ot = /* @__PURE__ */ me('<rect x="0" y="0" rx="5" ry="5" width="100%" height="100%" fill="rgb(var(--grey))"></rect><rect x="15" y="15" rx="4" ry="4" width="40%" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="45" rx="5" ry="5" width="70%" height="50" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="110" rx="3" ry="3" width="90%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="130" rx="3" ry="3" width="70%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" mask="url(#myMask)" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>', 6), at = [
493
- ot
511
+ }, lt = /* @__PURE__ */ ee('<rect x="0" y="0" rx="5" ry="5" width="100%" height="100%" fill="rgb(var(--grey))"></rect><rect x="15" y="15" rx="4" ry="4" width="40%" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="45" rx="5" ry="5" width="70%" height="50" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="110" rx="3" ry="3" width="90%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="130" rx="3" ry="3" width="70%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" mask="url(#myMask)" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>', 6), ot = [
512
+ lt
494
513
  ];
495
514
  function st(l, s) {
496
- return u(), d("svg", lt, at);
515
+ return u(), d("svg", nt, ot);
497
516
  }
498
- const rt = /* @__PURE__ */ ce(nt, [["render", st]]), it = { class: "w-100 bg-darkgrey radius-big image-upload-area flex-v-center flex-h-center flex t-black mn-small" }, ct = ["src"], ut = {
517
+ const at = /* @__PURE__ */ le(tt, [["render", st]]), rt = { class: "w-100 bg-white radius-big image-upload-area flex-v-center flex-h-center flex t-black mn-small" }, it = ["src"], ct = {
499
518
  __name: "Image",
500
519
  props: [
501
520
  "label",
@@ -503,146 +522,143 @@ const rt = /* @__PURE__ */ ce(nt, [["render", st]]), it = { class: "w-100 bg-dar
503
522
  "prop"
504
523
  ],
505
524
  setup(l) {
506
- return f(null), (s, e) => (u(), d("div", it, [
525
+ return m(null), (s, t) => (u(), d("div", rt, [
507
526
  l.prop.content ? (u(), d("img", {
508
527
  key: 0,
509
528
  src: l.prop.content,
510
529
  alt: "Uploaded image",
511
530
  class: "w-100 h-30r object-fit-contain"
512
- }, null, 8, ct)) : x("", !0)
531
+ }, null, 8, it)) : w("", !0)
513
532
  ]));
514
533
  }
515
- }, pt = { class: "pd-thin" }, dt = {
534
+ }, ut = { class: "pd-big" }, pt = {
516
535
  __name: "BlogPost",
517
536
  setup(l) {
518
- const s = O(), e = f(null), o = f(!0);
519
- T(async () => {
520
- o.value = !0;
521
- const t = await K({ user: C.user._id, url: s.params.url });
522
- e.value = t[0], o.value = !1;
537
+ const s = R(), t = m(null), e = m(!0);
538
+ I(async () => {
539
+ e.value = !0;
540
+ const n = await K({ user: P.user._id, url: s.params.url });
541
+ t.value = n[0], e.value = !1;
523
542
  });
524
- const i = [
525
- { name: "Textarea", value: "p" },
526
- { name: "H2", value: "h2" },
527
- { name: "Caption", value: "caption" },
528
- { name: "ImageUpload", value: ut }
529
- ];
530
- function a(t) {
531
- var r;
532
- return (r = i.find((p) => p.name === t)) == null ? void 0 : r.value;
533
- }
534
- function n(t) {
535
- return t.type.name === "Textarea" ? { innerHTML: t.content } : t.type.name === "H2" ? { innerHTML: t.content } : t.type.name === "Caption" ? { innerHTML: t.content } : t.type.name === "ImageUpload" ? { src: t.content } : {};
543
+ const i = {
544
+ Textarea: "p",
545
+ H2: "h2",
546
+ Bullets: "p",
547
+ Caption: "p",
548
+ ImageUpload: ct
549
+ };
550
+ function c(n) {
551
+ return n.type === "Textarea" ? { innerHTML: n.content } : n.type === "H2" ? { innerHTML: n.content } : n.type === "Caption" ? { innerHTML: n.content } : n.type === "ImageUpload" ? { src: n.content } : {};
536
552
  }
537
- return (t, r) => (u(), d("section", pt, [
538
- k(X, {
553
+ return (n, a) => (u(), d("section", ut, [
554
+ B(G, {
539
555
  tag: "ul",
540
556
  name: "fade",
541
557
  class: "o-hidden bg-grey radius-big"
542
558
  }, {
543
- default: S(() => [
544
- o.value ? (u(), d(E, { key: 0 }, N(3, (p) => k(rt, { key: p })), 64)) : x("", !0)
559
+ default: F(() => [
560
+ e.value ? (u(), d(E, { key: 0 }, z(3, (o) => B(at, { key: o })), 64)) : w("", !0)
545
561
  ]),
546
562
  _: 1
547
563
  }),
548
- k(le, { name: "fade" }, {
549
- default: S(() => [
550
- !o.value && !e.value ? (u(), B(Be, {
564
+ B(q, { name: "fade" }, {
565
+ default: F(() => [
566
+ !e.value && !t.value ? (u(), U(_e, {
551
567
  key: 0,
552
568
  title: "No Blogpost Found",
553
569
  description: "Currently, there are no blogposts available. Please check back later.",
554
570
  class: "pd-medium mn-thin bg-grey radius-big"
555
- })) : x("", !0)
571
+ })) : w("", !0)
556
572
  ]),
557
573
  _: 1
558
574
  }),
559
- k(X, {
575
+ B(G, {
560
576
  tag: "ul",
561
577
  name: "fade",
562
578
  class: "container"
563
579
  }, {
564
- default: S(() => [
565
- !o.value && e.value ? (u(), B(ie, {
580
+ default: F(() => [
581
+ !e.value && t.value ? (u(), U(ne, {
566
582
  key: 0,
567
- onClick: r[0] || (r[0] = (p) => t.$router.push({ name: "Blogpost", params: { url: e.value.url } })),
568
- blogpost: e.value,
569
- user: C.user._id,
583
+ onClick: a[0] || (a[0] = (o) => n.$router.push({ name: "Blogpost", params: { url: t.value.url } })),
584
+ blogpost: t.value,
585
+ user: P.user._id,
570
586
  type: "blogpostPage",
571
- class: I(["mn-medium", {
572
- "br-b br-solid br-black-transp-10": t.index !== e.value.length - 1
587
+ class: D(["mn-medium", {
588
+ "br-b br-solid br-black-transp-10": n.index !== t.value.length - 1
573
589
  }])
574
590
  }, {
575
- default: S(() => [
576
- c("section", null, [
577
- e.value && e.value.content ? (u(!0), d(E, { key: 0 }, N(e.value.content, (p, _) => (u(), B(G(a(p.type.name)), fe({
578
- key: _,
579
- index: _,
580
- component: p,
581
- prop: p,
582
- class: p.class,
591
+ default: F(() => [
592
+ r("section", null, [
593
+ t.value && t.value.content ? (u(!0), d(E, { key: 0 }, z(t.value.content, (o, p) => (u(), U(J(i[o.type]), ae({
594
+ key: p,
595
+ index: p,
596
+ component: o,
597
+ prop: o,
598
+ class: o.class,
583
599
  content: "content"
584
- }, n(p), { class: "mn-medium" }), null, 16, ["index", "component", "prop", "class"]))), 128)) : x("", !0)
600
+ }, c(o), { class: "mn-medium" }), null, 16, ["index", "component", "prop", "class"]))), 128)) : w("", !0)
585
601
  ])
586
602
  ]),
587
603
  _: 1
588
- }, 8, ["blogpost", "user", "class"])) : x("", !0),
589
- k(Ce, { class: "mn-small" }),
590
- !o.value && e.value ? (u(), B(Te, {
604
+ }, 8, ["blogpost", "user", "class"])) : w("", !0),
605
+ B(be, { class: "mn-small" }),
606
+ !e.value && t.value ? (u(), U(ye, {
591
607
  key: 1,
592
608
  type: "blogpost",
593
- target: e.value._id,
594
- owner: C.user._id
595
- }, null, 8, ["target", "owner"])) : x("", !0)
609
+ target: t.value._id,
610
+ owner: P.user._id
611
+ }, null, 8, ["target", "owner"])) : w("", !0)
596
612
  ]),
597
613
  _: 1
598
614
  })
599
615
  ]));
600
616
  }
601
- }, mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
617
+ }, dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
602
618
  __proto__: null,
603
- default: dt
604
- }, Symbol.toStringTag, { value: "Module" })), ft = {
619
+ default: pt
620
+ }, Symbol.toStringTag, { value: "Module" })), mt = {
605
621
  __name: "Blog",
606
622
  setup(l) {
607
- const s = O(), e = W();
608
- return s.params.category || (s.params.category = "featured"), T(() => {
623
+ const s = R(), t = W();
624
+ return s.params.category || (s.params.category = "featured"), I(() => {
609
625
  if (s.query) {
610
- const o = s.query, i = {
611
- tags: o.tags ? o.tags.split(",") : [],
612
- period: o.period ? o.period : "year"
626
+ const e = s.query, i = {
627
+ tags: e.tags ? e.tags.split(",") : [],
628
+ period: e.period ? e.period : "year"
613
629
  };
614
- F.filter = i;
630
+ N.filter = i;
615
631
  }
616
- }), H(() => F.filter, (o, i) => {
617
- const a = { ...s.query };
618
- Object.keys(i).forEach((t) => {
619
- a[t] && delete a[t];
632
+ }), A(() => N.filter, (e, i) => {
633
+ const c = { ...s.query };
634
+ Object.keys(i).forEach((a) => {
635
+ c[a] && delete c[a];
620
636
  });
621
637
  const n = Object.fromEntries(
622
- Object.entries(o).filter(([t, r]) => Array.isArray(r) && r.length > 0 || typeof r == "string" && r).map(([t, r]) => [t, Array.isArray(r) ? r.join(",") : r])
638
+ Object.entries(e).filter(([a, o]) => Array.isArray(o) && o.length > 0 || typeof o == "string" && o).map(([a, o]) => [a, Array.isArray(o) ? o.join(",") : o])
623
639
  );
624
- Object.assign(a, n), e.push({ query: a });
625
- }, { deep: !0 }), (o, i) => (u(), d("section", null, [
626
- k(xe, {
627
- category: y(s).params.category,
628
- user: C.user._id,
629
- period: y(s).query.period
640
+ Object.assign(c, n), t.push({ query: c });
641
+ }, { deep: !0 }), (e, i) => (u(), d("section", null, [
642
+ B(ge, {
643
+ category: v(s).params.category,
644
+ user: P.user._id,
645
+ period: v(s).query.period
630
646
  }, null, 8, ["category", "user", "period"])
631
647
  ]));
632
648
  }
633
649
  }, gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
634
650
  __proto__: null,
635
- default: ft
636
- }, Symbol.toStringTag, { value: "Module" })), ht = { class: "w-100 cols-4 t-left flex-nowrap flex" }, vt = {
651
+ default: mt
652
+ }, Symbol.toStringTag, { value: "Module" })), ft = { class: "w-100 cols-4 t-left flex-nowrap flex" }, ht = {
637
653
  key: 0,
638
654
  class: "w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"
639
- }, _t = /* @__PURE__ */ c("p", { class: "h4 i-medium mn-r-small" }, "👍", -1), bt = { class: "t-semi uppercase" }, yt = /* @__PURE__ */ c("br", null, null, -1), xt = {
655
+ }, vt = /* @__PURE__ */ r("p", { class: "h4 i-medium mn-r-small" }, "👍", -1), _t = { class: "t-semi uppercase" }, bt = /* @__PURE__ */ r("br", null, null, -1), yt = {
640
656
  key: 1,
641
657
  class: "w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"
642
- }, wt = /* @__PURE__ */ c("p", { class: "h4 i-medium mn-r-small" }, "💬", -1), kt = { class: "t-semi uppercase" }, $t = /* @__PURE__ */ c("br", null, null, -1), Bt = {
658
+ }, xt = /* @__PURE__ */ r("p", { class: "h4 i-medium mn-r-small" }, "💬", -1), wt = { class: "t-semi uppercase" }, kt = /* @__PURE__ */ r("br", null, null, -1), $t = {
643
659
  key: 2,
644
660
  class: "w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"
645
- }, Ct = /* @__PURE__ */ c("p", { class: "h4 i-medium mn-r-small" }, "👍", -1), Tt = { class: "t-semi uppercase" }, Pt = /* @__PURE__ */ c("br", null, null, -1), cn = {
661
+ }, Bt = /* @__PURE__ */ r("p", { class: "h4 i-medium mn-r-small" }, "👍", -1), Ct = { class: "t-semi uppercase" }, Tt = /* @__PURE__ */ r("br", null, null, -1), rn = {
646
662
  __name: "Activity",
647
663
  props: {
648
664
  likes: Number,
@@ -650,34 +666,34 @@ const rt = /* @__PURE__ */ ce(nt, [["render", st]]), it = { class: "w-100 bg-dar
650
666
  subscriptions: Number
651
667
  },
652
668
  setup(l) {
653
- return (s, e) => (u(), d("section", ht, [
654
- l.likes ? (u(), d("div", vt, [
655
- _t,
656
- c("span", bt, [
657
- P(M(l.likes), 1),
658
- yt,
659
- P("likes")
669
+ return (s, t) => (u(), d("section", ft, [
670
+ l.likes ? (u(), d("div", ht, [
671
+ vt,
672
+ r("span", _t, [
673
+ S(M(l.likes), 1),
674
+ bt,
675
+ S("likes")
660
676
  ])
661
- ])) : x("", !0),
662
- l.comments ? (u(), d("div", xt, [
663
- wt,
664
- c("span", kt, [
665
- P(M(l.comments), 1),
666
- $t,
667
- P("comments")
677
+ ])) : w("", !0),
678
+ l.comments ? (u(), d("div", yt, [
679
+ xt,
680
+ r("span", wt, [
681
+ S(M(l.comments), 1),
682
+ kt,
683
+ S("comments")
668
684
  ])
669
- ])) : x("", !0),
670
- l.subscriptions ? (u(), d("div", Bt, [
671
- Ct,
672
- c("span", Tt, [
673
- P(M(l.subscriptions), 1),
674
- Pt,
675
- P("subscriptions")
685
+ ])) : w("", !0),
686
+ l.subscriptions ? (u(), d("div", $t, [
687
+ Bt,
688
+ r("span", Ct, [
689
+ S(M(l.subscriptions), 1),
690
+ Tt,
691
+ S("subscriptions")
676
692
  ])
677
- ])) : x("", !0)
693
+ ])) : w("", !0)
678
694
  ]));
679
695
  }
680
- }, It = { class: "pd-thin radius-extra flex-nowrap flex" }, St = ["innerHTML"], Ut = {
696
+ }, Pt = { class: "pd-thin radius-extra flex-nowrap flex" }, It = ["innerHTML"], St = {
681
697
  __name: "FieldBig",
682
698
  props: {
683
699
  input: String,
@@ -710,100 +726,100 @@ const rt = /* @__PURE__ */ ce(nt, [["render", st]]), it = { class: "w-100 bg-dar
710
726
  },
711
727
  emits: ["update:input", "action"],
712
728
  setup(l, { emit: s }) {
713
- const e = l, { t: o, locale: i } = Pe();
714
- let a = f(0), n = f(e.input), t = f(e.placeholder), r = f(e.enableTyping), p = f(null), _ = f(""), b = f(!0), $ = null;
715
- function D() {
729
+ const t = l, { t: e, locale: i } = xe();
730
+ let c = m(0), n = m(t.input), a = m(t.placeholder), o = m(t.enableTyping), p = m(null), g = m(""), h = m(!0), C = null;
731
+ function H() {
716
732
  s("action");
717
733
  }
718
- function U(v) {
719
- s("update:input", v), _.value = v;
734
+ function b($) {
735
+ s("update:input", $), g.value = $;
720
736
  }
721
- function j() {
722
- a.value = (a.value + 1) % e.placeholderTexts[i.value].length;
737
+ function _() {
738
+ c.value = (c.value + 1) % t.placeholderTexts[i.value].length;
723
739
  }
724
- function V() {
725
- r.value = !1, clearInterval(p.value), t.value = e.placeholder, _.value || (n.value = "");
740
+ function f() {
741
+ o.value = !1, clearInterval(p.value), a.value = t.placeholder, g.value || (n.value = "");
726
742
  }
727
- function R() {
728
- !_.value && e.enableTyping && (r.value = !0, t.value = "", m());
743
+ function y() {
744
+ !g.value && t.enableTyping && (o.value = !0, a.value = "", x());
729
745
  }
730
- function m() {
731
- let v = e.placeholderTexts[i.value][a.value], g = 0, h = !1;
732
- $ = setInterval(() => {
733
- b.value = !b.value;
746
+ function x() {
747
+ let $ = t.placeholderTexts[i.value][c.value], k = 0, T = !1;
748
+ C = setInterval(() => {
749
+ h.value = !h.value;
734
750
  }, 200), p.value = setInterval(() => {
735
- r.value && (h ? (n.value = n.value.slice(0, -1), n.value = v.substring(0, g) + (b.value && g % 2 ? "|" : ""), g--) : (n.value = v.substring(0, g) + (b.value && g % 2 ? "|" : ""), g++), g > v.length && e.loopTyping && setTimeout(() => {
736
- h = !0, n.value = v.substring(0, g);
737
- }, 333), g === 0 && h && (h = !1, j(), v = e.placeholderTexts[i.value][a.value]));
738
- }, e.typingSpeed);
751
+ o.value && (T ? (n.value = n.value.slice(0, -1), n.value = $.substring(0, k) + (h.value && k % 2 ? "|" : ""), k--) : (n.value = $.substring(0, k) + (h.value && k % 2 ? "|" : ""), k++), k > $.length && t.loopTyping && setTimeout(() => {
752
+ T = !0, n.value = $.substring(0, k);
753
+ }, 333), k === 0 && T && (T = !1, _(), $ = t.placeholderTexts[i.value][c.value]));
754
+ }, t.typingSpeed);
739
755
  }
740
- return T(() => {
741
- e.enableTyping && m();
742
- }), se(() => {
743
- r.value || (clearInterval(p.value), clearInterval($));
744
- }), (v, g) => (u(), d("div", It, [
745
- k(ke, {
746
- field: y(n),
756
+ return I(() => {
757
+ t.enableTyping && x();
758
+ }), Z(() => {
759
+ o.value || (clearInterval(p.value), clearInterval(C));
760
+ }), ($, k) => (u(), d("div", Pt, [
761
+ B(he, {
762
+ field: v(n),
747
763
  "onUpdate:field": [
748
- g[0] || (g[0] = (h) => re(n) ? n.value = h : n = h),
749
- U
764
+ k[0] || (k[0] = (T) => te(n) ? n.value = T : n = T),
765
+ b
750
766
  ],
751
- placeholder: y(t),
752
- onInput: j,
753
- onFocus: V,
754
- onBlur: R,
767
+ placeholder: v(a),
768
+ onInput: _,
769
+ onFocus: f,
770
+ onBlur: y,
755
771
  class: "w-100 pd-small p-big"
756
772
  }, null, 8, ["field", "placeholder"]),
757
773
  l.action ? (u(), d("button", {
758
774
  key: 0,
759
- onClick: D,
775
+ onClick: H,
760
776
  class: "w-min hover_bg-white hover-t-black t-black bg-main button",
761
777
  innerHTML: l.action
762
- }, null, 8, St)) : x("", !0)
778
+ }, null, 8, It)) : w("", !0)
763
779
  ]));
764
780
  }
765
781
  };
766
- const Mt = { class: "pd-thin" }, Dt = { class: "o-hidden t-black bg-main pd-big radius-big" }, Ft = /* @__PURE__ */ c("header", { class: "t-center z-index-1 mn-big" }, [
767
- /* @__PURE__ */ c("h2", { class: "mn-l-auto mn-r-auto w-m-40r mn-medium" }, "Stay Updated with The Latest in Cannabis."),
768
- /* @__PURE__ */ c("p", { class: "t-transp p-big" }, "Subscribe to our newsletter for news, insights, and more from the Weeder universe.")
769
- ], -1), Ht = { class: "z-index-1 mn-big w-100 flex-nowrap flex" }, jt = /* @__PURE__ */ c("div", { class: "w-100 h-100 pos-absolute pos-t-50-negative pos-r-0 z-index-0 grid" }, [
770
- /* @__PURE__ */ c("div", { class: "spiral" })
771
- ], -1), un = {
782
+ const Ft = { class: "pd-thin" }, Ut = { class: "o-hidden t-black bg-main pd-big radius-big" }, Mt = /* @__PURE__ */ r("header", { class: "t-center z-index-1 mn-big" }, [
783
+ /* @__PURE__ */ r("h2", { class: "mn-l-auto mn-r-auto w-m-40r mn-medium" }, "Stay Updated with The Latest in Cannabis."),
784
+ /* @__PURE__ */ r("p", { class: "t-transp p-big" }, "Subscribe to our newsletter for news, insights, and more from the Weeder universe.")
785
+ ], -1), Dt = { class: "z-index-1 mn-big w-100 flex-nowrap flex" }, Ht = /* @__PURE__ */ r("div", { class: "w-100 h-100 pos-absolute pos-t-50-negative pos-r-0 z-index-0 grid" }, [
786
+ /* @__PURE__ */ r("div", { class: "spiral" })
787
+ ], -1), cn = {
772
788
  __name: "SubscribeNewsletter",
773
789
  setup(l) {
774
- let s = f("");
775
- return (e, o) => (u(), d("section", Mt, [
776
- c("div", Dt, [
777
- Ft,
778
- c("div", Ht, [
779
- k(Ut, {
780
- input: y(s),
790
+ let s = m("");
791
+ return (t, e) => (u(), d("section", Ft, [
792
+ r("div", Ut, [
793
+ Mt,
794
+ r("div", Dt, [
795
+ B(St, {
796
+ input: v(s),
781
797
  typingSpeed: 75,
782
798
  loopTyping: !1,
783
799
  enableTyping: !1,
784
800
  placeholder: "Please enter your email",
785
801
  action: "Subscribe",
786
- "onUpdate:input": o[0] || (o[0] = (i) => re(s) ? s.value = i : s = i),
787
- onAction: o[1] || (o[1] = (i) => e.router.push({ name: "Product Recommmendation", query: { mood: e.mood } })),
802
+ "onUpdate:input": e[0] || (e[0] = (i) => te(s) ? s.value = i : s = i),
803
+ onAction: e[1] || (e[1] = (i) => t.router.push({ name: "Product Recommmendation", query: { mood: t.mood } })),
788
804
  class: "mn-l-auto mn-r-auto bg-white t-black w-50"
789
805
  }, null, 8, ["input"])
790
806
  ]),
791
- jt
807
+ Ht
792
808
  ])
793
809
  ]));
794
810
  }
795
811
  };
796
- const Et = { class: "container-joinus" }, Nt = { class: "content" }, zt = { class: "h0 mn-big" }, At = /* @__PURE__ */ c("p", { class: "w-m-33r t-center mn-small p-big" }, "Together, we're shaping the future of the globals cannabis community.", -1), Lt = /* @__PURE__ */ c("button", { class: "bg-black t-white button" }, "Join Now", -1), pn = {
812
+ const jt = { class: "container-joinus" }, Nt = { class: "content" }, At = { class: "h0 mn-big" }, Et = /* @__PURE__ */ r("p", { class: "w-m-33r t-center mn-small p-big" }, "Together, we're shaping the future of the globals cannabis community.", -1), zt = /* @__PURE__ */ r("button", { class: "bg-black t-white button" }, "Join Now", -1), un = {
797
813
  __name: "JoinUs",
798
814
  setup(l) {
799
- const s = f(120950), e = f([
815
+ const s = m(120950), t = m([
800
816
  "/assets/images/reviews/01.png",
801
817
  "/assets/images/reviews/02.png",
802
818
  "/assets/images/reviews/03.png",
803
819
  "/assets/images/reviews/04.png",
804
820
  "/assets/images/reviews/05.png",
805
821
  "/assets/images/reviews/06.png"
806
- ]), o = () => {
822
+ ]), e = () => {
807
823
  setInterval(() => {
808
824
  s.value += Math.floor(Math.random() * 5) + 1;
809
825
  }, 330);
@@ -814,39 +830,39 @@ const Et = { class: "container-joinus" }, Nt = { class: "content" }, zt = { clas
814
830
  maxDuration: 15,
815
831
  spawnPoints: [10, 90]
816
832
  };
817
- T(() => {
818
- a(), o();
833
+ I(() => {
834
+ c(), e();
819
835
  });
820
- const a = () => {
821
- e.value.forEach((n, t) => {
822
- let r = document.createElement("img");
823
- r.src = n, r.classList.add("floating-image");
824
- let p = i.spawnPoints[Math.floor(Math.random() * i.spawnPoints.length)], _ = (Math.random() - 0.5) * 2 * 10;
825
- r.style.left = `${p + _}%`, r.style.animationDuration = `${Math.random() * (i.maxDuration - i.minDuration) + i.minDuration}s`, document.querySelector(".container").appendChild(r), r.addEventListener("animationiteration", () => {
826
- const b = i.spawnPoints[Math.floor(Math.random() * i.spawnPoints.length)], $ = (Math.random() - 0.5) * 2 * 10;
827
- r.style.left = `${b + $}%`;
836
+ const c = () => {
837
+ t.value.forEach((n, a) => {
838
+ let o = document.createElement("img");
839
+ o.src = n, o.classList.add("floating-image");
840
+ let p = i.spawnPoints[Math.floor(Math.random() * i.spawnPoints.length)], g = (Math.random() - 0.5) * 2 * 10;
841
+ o.style.left = `${p + g}%`, o.style.animationDuration = `${Math.random() * (i.maxDuration - i.minDuration) + i.minDuration}s`, document.querySelector(".container").appendChild(o), o.addEventListener("animationiteration", () => {
842
+ const h = i.spawnPoints[Math.floor(Math.random() * i.spawnPoints.length)], C = (Math.random() - 0.5) * 2 * 10;
843
+ o.style.left = `${h + C}%`;
828
844
  });
829
845
  });
830
846
  };
831
- return (n, t) => (u(), d("div", Et, [
832
- c("div", Nt, [
833
- c("span", zt, M(s.value.toLocaleString()), 1),
834
- At,
835
- Lt
847
+ return (n, a) => (u(), d("div", jt, [
848
+ r("div", Nt, [
849
+ r("span", At, M(s.value.toLocaleString()), 1),
850
+ Et,
851
+ zt
836
852
  ])
837
853
  ]));
838
854
  }
839
855
  };
840
- const Ot = (l) => (ge("data-v-18db0d1b"), l = l(), he(), l), Vt = { class: "community-feed" }, Rt = /* @__PURE__ */ Ot(() => /* @__PURE__ */ c("h2", { class: "w-m-75r mn-auto pd-t-big pd-b-big t-center" }, "Discover the Vibrant Community", -1)), qt = { class: "grid-container" }, Jt = {
856
+ const Lt = (l) => (ie("data-v-18db0d1b"), l = l(), ce(), l), Vt = { class: "community-feed" }, Ot = /* @__PURE__ */ Lt(() => /* @__PURE__ */ r("h2", { class: "w-m-75r mn-auto pd-t-big pd-b-big t-center" }, "Discover the Vibrant Community", -1)), Rt = { class: "grid-container" }, qt = {
841
857
  __name: "HotPosts",
842
858
  async setup(l) {
843
- let s, e;
844
- const o = f([]), i = async () => {
859
+ let s, t;
860
+ const e = m([]), i = async () => {
845
861
  const n = await K({ skip: 0, limit: 7, period: "year" });
846
- console.log(n), o.value = n;
862
+ console.log(n), e.value = n;
847
863
  };
848
- [s, e] = ae(() => i()), await s, e();
849
- const a = (n) => {
864
+ [s, t] = re(() => i()), await s, t();
865
+ const c = (n) => {
850
866
  switch (n) {
851
867
  case 0:
852
868
  return "grid-item-2x2";
@@ -863,22 +879,22 @@ const Ot = (l) => (ge("data-v-18db0d1b"), l = l(), he(), l), Vt = { class: "comm
863
879
  return "";
864
880
  }
865
881
  };
866
- return (n, t) => (u(), d("section", Vt, [
867
- Rt,
868
- c("div", qt, [
869
- (u(!0), d(E, null, N(o.value, (r, p) => (u(), B(ie, {
870
- blogpost: r,
871
- owner: C.user._id,
882
+ return (n, a) => (u(), d("section", Vt, [
883
+ Ot,
884
+ r("div", Rt, [
885
+ (u(!0), d(E, null, z(e.value, (o, p) => (u(), U(ne, {
886
+ blogpost: o,
887
+ owner: P.user._id,
872
888
  key: p,
873
- class: I(a(p))
889
+ class: D(c(p))
874
890
  }, null, 8, ["blogpost", "owner", "class"]))), 128))
875
891
  ])
876
892
  ]));
877
893
  }
878
- }, dn = /* @__PURE__ */ ce(Jt, [["__scopeId", "data-v-18db0d1b"]]), mn = [
894
+ }, pn = /* @__PURE__ */ le(qt, [["__scopeId", "data-v-18db0d1b"]]), dn = [
879
895
  {
880
896
  path: "community",
881
- component: He,
897
+ component: Pe,
882
898
  meta: {
883
899
  title: {
884
900
  en: "Community",
@@ -901,7 +917,7 @@ const Ot = (l) => (ge("data-v-18db0d1b"), l = l(), he(), l), Vt = { class: "comm
901
917
  },
902
918
  authorize: []
903
919
  },
904
- component: () => Promise.resolve().then(() => ne)
920
+ component: () => Promise.resolve().then(() => X)
905
921
  },
906
922
  {
907
923
  path: "community/posts/:url",
@@ -912,7 +928,7 @@ const Ot = (l) => (ge("data-v-18db0d1b"), l = l(), he(), l), Vt = { class: "comm
912
928
  ru: "Пост"
913
929
  }
914
930
  },
915
- component: () => Promise.resolve().then(() => mt)
931
+ component: () => Promise.resolve().then(() => dt)
916
932
  },
917
933
  {
918
934
  path: "community/posts/:url/edit",
@@ -924,29 +940,29 @@ const Ot = (l) => (ge("data-v-18db0d1b"), l = l(), he(), l), Vt = { class: "comm
924
940
  },
925
941
  authorize: []
926
942
  },
927
- component: () => Promise.resolve().then(() => ne)
943
+ component: () => Promise.resolve().then(() => X)
928
944
  }
929
945
  ];
930
946
  export {
931
- cn as Activity,
932
- ft as Blog,
933
- dt as BlogPost,
934
- ee as Bullets,
935
- Z as Caption,
936
- ie as CardBlogpost,
937
- Te as Comments,
938
- He as Community,
939
- tt as CreateBlogPost,
940
- xe as Feed,
941
- hn as FooterBlogpost,
942
- Y as H2,
943
- dn as HotPosts,
944
- ut as Image,
945
- te as ImageUpload,
946
- pn as JoinUs,
947
- un as SubscribeNewsletter,
948
- J as Textarea,
949
- mn as blogpostsRoutes,
950
- vn as blogpostsStore,
951
- _n as reactionsStore
947
+ rn as Activity,
948
+ mt as Blog,
949
+ pt as BlogPost,
950
+ He as Bullets,
951
+ Me as Caption,
952
+ ne as CardBlogpost,
953
+ ye as Comments,
954
+ Pe as Community,
955
+ et as CreateBlogPost,
956
+ ge as Feed,
957
+ fn as FooterBlogpost,
958
+ Fe as H2,
959
+ pn as HotPosts,
960
+ ct as Image,
961
+ Ae as ImageUpload,
962
+ un as JoinUs,
963
+ cn as SubscribeNewsletter,
964
+ Q as Textarea,
965
+ dn as blogpostsRoutes,
966
+ hn as blogpostsStore,
967
+ vn as reactionsStore
952
968
  };