@ozdao/prometheus-framework 0.1.20 → 0.1.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. package/dist/BackofficeGallery-7ae8fbba.mjs +307 -0
  2. package/dist/BackofficeGallery-fe39cff3.js +1 -0
  3. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-8660f9cb.js +1 -0
  4. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-bd3889ee.mjs +1945 -0
  5. package/dist/ButtonFollow-81508d85.mjs +132 -0
  6. package/dist/ButtonFollow-df6317f0.js +1 -0
  7. package/dist/CardOrganization-d8f209ee.js +1 -0
  8. package/dist/CardOrganization-de8ec36e.mjs +230 -0
  9. package/dist/Feed-a75d053e.js +1 -0
  10. package/dist/Feed-c4084664.mjs +368 -0
  11. package/dist/Feed-fea84ce7.mjs +439 -0
  12. package/dist/Feed-ff3b96b2.js +1 -0
  13. package/dist/Image-1281bc48.mjs +477 -0
  14. package/dist/Image-8e67dd2d.js +9 -0
  15. package/dist/Popup-b7609baa.js +1 -0
  16. package/dist/Popup-d5c4cb46.mjs +76 -0
  17. package/dist/Product-3c7b2921.mjs +841 -0
  18. package/dist/Product-6df77924.js +7 -0
  19. package/dist/ProductEdit-737e2a5a.mjs +302 -0
  20. package/dist/ProductEdit-c99ab559.js +1 -0
  21. package/dist/ProfileBlogposts-4293a1e3.js +1 -0
  22. package/dist/ProfileBlogposts-4c326fed.mjs +65 -0
  23. package/dist/ProfileComments-03f88b54.mjs +44 -0
  24. package/dist/ProfileComments-761ce00e.js +1 -0
  25. package/dist/ProfileEvents-0bdd36e4.mjs +57 -0
  26. package/dist/ProfileEvents-a9b96fec.js +1 -0
  27. package/dist/ProfileLikes-3edf6fb8.mjs +44 -0
  28. package/dist/ProfileLikes-51729962.js +1 -0
  29. package/dist/ProfileOrganizations-8961aaee.mjs +213 -0
  30. package/dist/ProfileOrganizations-f52e62e1.js +1 -0
  31. package/dist/Publics-70a0ca9c.mjs +45 -0
  32. package/dist/Publics-bbab7a79.js +1 -0
  33. package/dist/Select-90d4b7c8.mjs +81 -0
  34. package/dist/Select-b9299fb6.js +1 -0
  35. package/dist/Select.vue_vue_type_style_index_0_scoped_a78dbba1_lang-0ea8fbf8.js +1 -0
  36. package/dist/Select.vue_vue_type_style_index_0_scoped_a78dbba1_lang-4ed993c7.mjs +1 -0
  37. package/dist/UploadImage-c9711af2.js +1 -0
  38. package/dist/UploadImage-ec3714e8.mjs +83 -0
  39. package/dist/UploadImageMultiple-b4c8d627.js +1 -0
  40. package/dist/UploadImageMultiple-ebcc51e6.mjs +58 -0
  41. package/dist/auth-78d9392a.mjs +612 -0
  42. package/dist/auth-96449d96.js +7 -0
  43. package/dist/auth.client.cjs +8 -8
  44. package/dist/auth.client.js +8 -8
  45. package/dist/auth.validation-9e493d2f.mjs +20 -0
  46. package/dist/auth.validation-d4795c25.js +1 -0
  47. package/dist/backoffice.client.cjs +1 -1
  48. package/dist/backoffice.client.js +43 -48
  49. package/dist/community.client.cjs +1 -1
  50. package/dist/community.client.js +44 -42
  51. package/dist/events.client.cjs +2 -2
  52. package/dist/events.client.js +25 -24
  53. package/dist/index-2a0269fc.js +2 -0
  54. package/dist/index-9128ade5.mjs +1228 -0
  55. package/dist/landing.client.cjs +1 -1
  56. package/dist/organizations-0fb56927.mjs +122 -0
  57. package/dist/organizations-195ec134.js +1 -0
  58. package/dist/organizations.client-b39db194.js +3 -0
  59. package/dist/organizations.client-df5e8a6f.mjs +3020 -0
  60. package/dist/organizations.client.cjs +1 -1
  61. package/dist/organizations.client.js +46 -44
  62. package/dist/style.css +1 -1
  63. package/dist/users.client.cjs +1 -1
  64. package/dist/users.client.js +23 -23
  65. package/package.json +1 -1
  66. package/src/modules/backoffice/components/layouts/Backoffice.vue +0 -11
  67. package/src/modules/gallery/components/sections/BackofficeGallery.vue +3 -1
@@ -0,0 +1,3020 @@
1
+ import { computed as Z, resolveComponent as ue, openBlock as o, createElementBlock as r, Fragment as O, renderList as L, unref as k, normalizeClass as te, createCommentVNode as g, createBlock as $, withCtx as x, createTextVNode as W, toDisplayString as f, createElementVNode as a, Transition as H, createVNode as h, renderSlot as z, ref as v, reactive as oe, watch as T, onMounted as pe, pushScopeId as me, popScopeId as he, withAsyncContext as Y, withModifiers as re, watchEffect as de, resolveDirective as Ie, normalizeProps as V, guardReactiveProps as U, resolveDynamicComponent as le, mergeProps as ve, toHandlers as Ue, withDirectives as ae, vShow as ye, toRefs as Be, vModelText as we } from "vue";
2
+ import { useRoute as F, useRouter as q } from "vue-router";
3
+ import { useI18n as Ee } from "vue-i18n";
4
+ import { s as C } from "./globals-96ba60e4.mjs";
5
+ import { S as je, _ as Te, C as J } from "./Breadcrumbs.vue_vue_type_style_index_0_lang-bd3889ee.mjs";
6
+ import { _ as Pe } from "./Tab-a243605d.mjs";
7
+ import { a as ge, B as Fe, m as qe, s as Re } from "./ButtonFollow-81508d85.mjs";
8
+ import { _ as Ze } from "./Feed-c4084664.mjs";
9
+ import { _ as He } from "./Feed-fea84ce7.mjs";
10
+ import { _ as Ne } from "./Socials-8193477c.mjs";
11
+ import { a as Ke, _ as We } from "./CardOrganization-de8ec36e.mjs";
12
+ import { I as Ye, P as Je } from "./IconEdit-eacf3856.mjs";
13
+ import { a as _e, F as D, _ as ce } from "./index-9128ade5.mjs";
14
+ import { s as S } from "./auth-78d9392a.mjs";
15
+ import "./Select.vue_vue_type_style_index_0_scoped_a78dbba1_lang-4ed993c7.mjs";
16
+ import { v as Qe, a as Xe } from "./inputs.validation-14e8e01f.mjs";
17
+ import { a as R, s as b } from "./organizations-0fb56927.mjs";
18
+ import { _ as A } from "./_plugin-vue_export-helper-dad06003.mjs";
19
+ import { _ as ze } from "./UploadImage-ec3714e8.mjs";
20
+ import { S as Me } from "./Select-90d4b7c8.mjs";
21
+ import "./Publics-70a0ca9c.mjs";
22
+ const Ge = {
23
+ class: "breadcrumbs flex-row flex-nowrap flex-left flex",
24
+ "aria-label": "breadcrumbs"
25
+ }, et = {
26
+ key: 0,
27
+ class: "i-small mn-r-thin",
28
+ viewBox: "0 0 10 9",
29
+ fill: "none",
30
+ xmlns: "http://www.w3.org/2000/svg"
31
+ }, tt = /* @__PURE__ */ a("path", {
32
+ fill: "black",
33
+ d: "M0.494141 4.26391C0.494141 4.48862 0.659906 4.66912 0.928813 4.66912C1.05037 4.66912 1.16825 4.6065 1.27139 4.52177L1.64344 4.20866V7.56448C1.64344 8.13545 1.98971 8.47803 2.5791 8.47803H7.56678C8.15616 8.47803 8.50243 8.13545 8.50243 7.56448V4.19392L8.8929 4.52177C8.99604 4.6065 9.11392 4.66912 9.23916 4.66912C9.48597 4.66912 9.67015 4.5144 9.67015 4.27128C9.67015 4.1313 9.61121 4.01343 9.5007 3.92133L8.50243 3.08146V1.47538C8.50243 1.30961 8.3956 1.1991 8.22984 1.1991H7.63308C7.46732 1.1991 7.35313 1.30961 7.35313 1.47538V2.11634L5.66969 0.70181C5.31606 0.403433 4.85928 0.403433 4.50197 0.70181L0.663589 3.92133C0.553079 4.01711 0.494141 4.14235 0.494141 4.26391ZM6.13752 5.26219C6.13752 5.08906 6.02701 4.97855 5.85387 4.97855H4.31779C4.14097 4.97855 4.02678 5.08906 4.02678 5.26219V7.63447H2.83327C2.60856 7.63447 2.48332 7.50922 2.48332 7.28084V3.5014L4.90349 1.47538C5.01768 1.37592 5.15029 1.37592 5.26817 1.47538L7.66255 3.48298V7.28084C7.66255 7.50922 7.53731 7.63447 7.3126 7.63447H6.13752V5.26219Z"
34
+ }, null, -1), st = [
35
+ tt
36
+ ], at = { key: 2 }, nt = {
37
+ key: 3,
38
+ class: "i-small chevron",
39
+ viewBox: "0 0 4 8",
40
+ fill: "none",
41
+ xmlns: "http://www.w3.org/2000/svg"
42
+ }, ot = /* @__PURE__ */ a("path", {
43
+ d: "M4 3.99992C4 3.83673 3.94307 3.70391 3.81025 3.57867L0.899431 0.732369C0.800759 0.629902 0.679317 0.580566 0.531309 0.580566C0.239089 0.580566 0 0.815861 0 1.10808C0 1.25229 0.0607211 1.38512 0.166983 1.49138L2.74763 3.99613L0.166983 6.50846C0.0607211 6.61093 0 6.74375 0 6.89176C0 7.18398 0.239089 7.41928 0.531309 7.41928C0.675522 7.41928 0.800759 7.36994 0.899431 7.26747L3.81025 4.42117C3.94307 4.29594 4 4.15931 4 3.99992Z",
44
+ fill: "black"
45
+ }, null, -1), it = [
46
+ ot
47
+ ], lt = {
48
+ __name: "Breadcrumbs",
49
+ setup(e) {
50
+ const t = F(), { t: s, locale: n } = Ee(), d = Z(() => t.matched.map((c) => {
51
+ var w, P, I;
52
+ const p = (w = c.meta) == null ? void 0 : w.title, l = n == null ? void 0 : n.value, u = p && l && p[l], i = c.path.replace(/:.+?\//g, (N) => ""), m = (I = (P = c.meta) == null ? void 0 : P.breadcrumbs) == null ? void 0 : I.hidden;
53
+ return { name: u, path: i, isHidden: m };
54
+ }).filter((c) => c.name && !c.isHidden));
55
+ return (c, p) => {
56
+ const l = ue("router-link");
57
+ return o(), r("ol", Ge, [
58
+ (o(!0), r(O, null, L(k(d), (u, i) => (o(), r("li", {
59
+ key: i,
60
+ class: te(["flex-v-center flex-nowrap flex", { "t-main": i === k(d).length - 1 }])
61
+ }, [
62
+ i === 0 ? (o(), r("svg", et, st)) : g("", !0),
63
+ i !== k(d).length - 1 ? (o(), $(l, {
64
+ key: 1,
65
+ to: i === 0 ? "/" : u.path
66
+ }, {
67
+ default: x(() => [
68
+ W(f(u.name), 1)
69
+ ]),
70
+ _: 2
71
+ }, 1032, ["to"])) : (o(), r("span", at, f(u.name), 1)),
72
+ i !== k(d).length - 1 ? (o(), r("svg", nt, it)) : g("", !0)
73
+ ], 2))), 128))
74
+ ]);
75
+ };
76
+ }
77
+ }, rt = { class: "mn-small w-100" }, dt = ["href"], ct = /* @__PURE__ */ a("span", { class: "t-semi uppercase" }, "Website", -1), ut = [
78
+ ct
79
+ ], pt = ["href"], mt = /* @__PURE__ */ a("span", { class: "t-semi uppercase" }, "Phone", -1), ht = [
80
+ mt
81
+ ], _t = ["href"], ft = /* @__PURE__ */ a("span", { class: "t-semi uppercase" }, "Email", -1), gt = [
82
+ ft
83
+ ], bt = ["href"], vt = /* @__PURE__ */ a("span", { class: "t-semi uppercase" }, "Address", -1), yt = [
84
+ vt
85
+ ], yi = {
86
+ __name: "Contacts",
87
+ props: {
88
+ website: String,
89
+ phone: String,
90
+ email: String,
91
+ address: String
92
+ },
93
+ setup(e) {
94
+ const t = e, s = Z(() => t.website ? !t.website.startsWith("http://") && !t.website.startsWith("https://") ? `http://${t.website}` : t.website : null), n = Z(() => t.address ? encodeURIComponent(t.address) : null);
95
+ return (d, c) => (o(), r("div", rt, [
96
+ k(s) ? (o(), r("a", {
97
+ key: 0,
98
+ href: k(s),
99
+ target: "_blank",
100
+ class: "w-100 br-2px br-solid br-grey radius-small pd-small flex-v-center flex-nowrap flex"
101
+ }, ut, 8, dt)) : g("", !0),
102
+ t.phone ? (o(), r("a", {
103
+ key: 1,
104
+ href: `tel:${t.phone}`,
105
+ class: "w-100 br-2px br-solid br-grey radius-small pd-small flex-v-center flex-nowrap flex"
106
+ }, ht, 8, pt)) : g("", !0),
107
+ t.email ? (o(), r("a", {
108
+ key: 2,
109
+ href: `mailto:${t.email}`,
110
+ target: "_blank",
111
+ class: "w-100 br-2px br-solid br-grey radius-small pd-small flex-v-center flex-nowrap flex"
112
+ }, gt, 8, _t)) : g("", !0),
113
+ k(n) ? (o(), r("a", {
114
+ key: 3,
115
+ href: `https://www.google.com/maps/search/?api=1&query=${k(n)}`,
116
+ target: "_blank",
117
+ class: "w-100 br-2px br-solid br-grey radius-small pd-small flex-v-center flex-nowrap flex"
118
+ }, yt, 8, bt)) : g("", !0)
119
+ ]));
120
+ }
121
+ }, wt = { class: "w-100 mn-small star-container flex-v-center flex" }, $t = { class: "p-big t-semi mn-r-small" }, Ct = /* @__PURE__ */ a("path", {
122
+ fill: "#00FF88",
123
+ d: "M62.2406 5.85971L75.413 32.6098L105.203 36.8654C110.472 37.676 112.498 44.3636 108.648 48.0113L87.1668 68.8844L92.2331 98.2689C93.2464 103.741 87.5721 107.591 82.9111 105.159L56.3637 91.3788L29.8163 105.159C25.1553 107.794 19.4811 103.741 20.4944 98.4716L25.5607 68.8844L4.07956 48.0113C0.22917 44.3636 2.25569 37.676 7.52464 36.8654L37.3145 32.6098L50.4868 5.85971C52.9186 0.996063 59.8088 0.996063 62.2406 5.85971Z"
124
+ }, null, -1), kt = [
125
+ Ct
126
+ ], xt = { class: "" }, wi = {
127
+ __name: "Rating",
128
+ props: {
129
+ rating: {
130
+ type: Number,
131
+ required: !0
132
+ },
133
+ amount: {
134
+ type: Number,
135
+ required: !0
136
+ }
137
+ },
138
+ setup(e) {
139
+ return (t, s) => (o(), r("section", null, [
140
+ a("div", wt, [
141
+ a("span", $t, f(e.rating), 1),
142
+ (o(), r(O, null, L(5, (n) => a("svg", {
143
+ class: te(["i-semi mn-r-small", { "t-transp": n > e.rating }]),
144
+ width: "113",
145
+ height: "108",
146
+ viewBox: "0 0 113 108",
147
+ fill: "none",
148
+ xmlns: "http://www.w3.org/2000/svg"
149
+ }, kt, 2)), 64))
150
+ ]),
151
+ a("p", xt, "Based on " + f(e.amount) + " reviews", 1)
152
+ ]));
153
+ }
154
+ }, Ot = { class: "t-center flex-center flex-column flex pd-medium radius-big bg-grey" }, Lt = ["src"], St = { class: "mn-thin" }, Pt = { class: "mn-medium p-big" }, zt = { class: "flex-center flex-wrap gap-thin flex mn-semi" }, Mt = { class: "pd-thin radius-small t-semi uppercase t-black bg-main p-medium" }, Dt = {
155
+ key: 3,
156
+ class: "mn-t-small mn-thin"
157
+ }, At = {
158
+ __name: "DetailsTab",
159
+ props: {
160
+ organization: Object,
161
+ user: Object
162
+ },
163
+ setup(e) {
164
+ return (t, s) => (o(), $(H, { name: "slide-fade" }, {
165
+ default: x(() => [
166
+ a("section", Ot, [
167
+ e.user._id === e.organization.owner ? (o(), $(Ye, {
168
+ key: 0,
169
+ onClick: s[0] || (s[0] = (n) => t.$router.push({
170
+ name: "Organization Edit",
171
+ params: {
172
+ _id: e.organization._id
173
+ }
174
+ })),
175
+ class: "pos-absolute pos-t-regular pos-r-regular i-regular t-transp"
176
+ })) : g("", !0),
177
+ e.organization.profile.photo ? (o(), r("img", {
178
+ key: 1,
179
+ src: (t.FILE_SERVER_URL || "") + e.organization.profile.photo,
180
+ class: "radius-big bg-grey flex-center flex mn-small i-extra"
181
+ }, null, 8, Lt)) : (o(), $(Je, {
182
+ key: 2,
183
+ class: "radius-medium mn-small i-extra"
184
+ })),
185
+ a("h1", St, f(e.organization.profile.name), 1),
186
+ a("p", Pt, [
187
+ h(Ke, {
188
+ text: e.organization.profile.description ? e.organization.profile.description : "",
189
+ maxLen: 240
190
+ }, null, 8, ["text"])
191
+ ]),
192
+ a("div", zt, [
193
+ (o(!0), r(O, null, L(e.organization.profile.tags, (n) => (o(), r("span", Mt, f(n), 1))), 256))
194
+ ]),
195
+ z(t.$slots, "default"),
196
+ Object.values(e.organization.socials).some((n) => n) ? (o(), r("h4", Dt, " Find us in socials ")) : g("", !0),
197
+ h(Ne, {
198
+ telegram: e.organization.socials.telegram,
199
+ facebook: e.organization.socials.facebook,
200
+ instagram: e.organization.socials.instagram,
201
+ twitter: e.organization.socials.twitter
202
+ }, null, 8, ["telegram", "facebook", "instagram", "twitter"])
203
+ ])
204
+ ]),
205
+ _: 3
206
+ }));
207
+ }
208
+ };
209
+ const Vt = {
210
+ key: 0,
211
+ class: "spoiler"
212
+ }, $e = {
213
+ __name: "Spoiler",
214
+ props: {
215
+ status: {
216
+ type: Boolean,
217
+ default: !1
218
+ }
219
+ },
220
+ setup(e) {
221
+ const t = e, s = v(!1);
222
+ return t.status && (s.value = t.status), (n, d) => (o(), r("div", null, [
223
+ a("div", {
224
+ onClick: d[0] || (d[0] = (c) => s.value = !s.value),
225
+ class: "flex-v-center flex-nowrap flex"
226
+ }, [
227
+ z(n.$slots, "header")
228
+ ]),
229
+ h(H, { name: "collapse" }, {
230
+ default: x(() => [
231
+ s.value ? (o(), r("div", Vt, [
232
+ z(n.$slots, "content")
233
+ ])) : g("", !0)
234
+ ]),
235
+ _: 3
236
+ })
237
+ ]));
238
+ }
239
+ }, B = _e.create({ baseURL: process.env.API_URL, withCredentials: !0 }), y = oe({
240
+ all: [],
241
+ current: {
242
+ recommendation: !1,
243
+ category: [],
244
+ status: "unpublished",
245
+ information: [],
246
+ coverImage: "",
247
+ images: [],
248
+ files: [],
249
+ image3d: !1,
250
+ name: "",
251
+ sale: 0,
252
+ price: 0,
253
+ localization: [],
254
+ modifications: [],
255
+ description: ""
256
+ }
257
+ }), $i = {
258
+ async create(e, t) {
259
+ const s = {
260
+ ...t,
261
+ organization: e
262
+ };
263
+ return await B.post("/products/create", s).then(
264
+ (n) => (It(n.data, "current"), Promise.resolve(n.data)),
265
+ (n) => (C(n), Promise.reject(n))
266
+ );
267
+ },
268
+ async read(e = {}) {
269
+ e._id && (e.params = { _id: e._id }), e.category && (e.params = e.params || {}, e.params.category = e.category), e.params = e.params || {}, e.params.skip = e.skip || 0, e.params.limit = e.limit || 10, e.organization && (e.params.organization = e.organization), e.params.sort = "createdAt";
270
+ try {
271
+ console.log("Request params:" + e.params);
272
+ const t = await B.get("/products/read", { params: e.params });
273
+ return e._id ? y.current = t.data[0] : y.all = t.data, Promise.resolve(t.data);
274
+ } catch (t) {
275
+ return C(t), Promise.reject(t);
276
+ }
277
+ },
278
+ async update(e, t) {
279
+ return await B.post("/products/" + e, t).then(
280
+ (s) => Promise.resolve(s.data),
281
+ (s) => (C(s), Promise.reject(s))
282
+ );
283
+ },
284
+ async deleteProduct(e) {
285
+ return await B.delete("/products/" + e).then(
286
+ (t) => Promise.resolve(t.data),
287
+ (t) => (C(t), Promise.reject(t))
288
+ );
289
+ },
290
+ async submitMood(e = null) {
291
+ return console.log(e), B.post("/product/recommended", { mood: e }).then(
292
+ (t) => (y.current = t.data.product, y.current.recommendation = t.data.recommendationText, Promise.resolve(t.data)),
293
+ (t) => (console.log(t), C(t), Promise.reject(t))
294
+ );
295
+ },
296
+ async fetchProducts() {
297
+ return await B.get("/products").then(
298
+ (e) => (y.all = e.data, y.filtered = e.data.slice(), y.filteredPrice = y.filtered, y.filteredPrice.sort(function(t, s) {
299
+ return t[y.sort.current] > s[y.sort.current] ? y.sort.ascending ? 1 : -1 : t[y.sort.current] < s[y.sort.current] ? y.sort.ascending ? -1 : 1 : 0;
300
+ }), Promise.resolve(e.data)),
301
+ (e) => (C(e), Promise.reject(e))
302
+ );
303
+ },
304
+ async fetchProductsPopular() {
305
+ return await B.get("/products/popular").then(
306
+ (e) => (y.popular = e.data, Promise.resolve(e.data)),
307
+ (e) => (C(e), Promise.reject(e))
308
+ );
309
+ },
310
+ async fetchProductsPublished() {
311
+ return await B.get("/products").then(
312
+ (e) => {
313
+ let t = e.data.filter(function(s, n) {
314
+ return s.status !== "unpublished";
315
+ });
316
+ return y.all = t, y.filtered = t.slice(), y.filteredPrice = y.filtered, y.filteredPrice.sort(function(s, n) {
317
+ return s[y.sort.current] > n[y.sort.current] ? y.sort.ascending ? 1 : -1 : s[y.sort.current] < n[y.sort.current] ? y.sort.ascending ? -1 : 1 : 0;
318
+ }), Promise.resolve(e.data);
319
+ },
320
+ (e) => (C(e), Promise.reject(e))
321
+ );
322
+ },
323
+ async fetchProduct(e) {
324
+ return await B.get("/products/" + e).then(
325
+ (t) => (t.localization || (t.localization = []), y.current = t.data, Promise.resolve(t.data)),
326
+ (t) => (C(t), Promise.reject(t))
327
+ );
328
+ },
329
+ async fetchProductPopular() {
330
+ return await B.get("/products").then(
331
+ (e) => (y.all = e.data.slice(1, 5), Promise.resolve(e.data.slice(1, 5))),
332
+ (e) => (C(e), Promise.reject(e))
333
+ );
334
+ }
335
+ };
336
+ function It(e, t) {
337
+ y[t] = e;
338
+ }
339
+ T(y, (e, t) => {
340
+ });
341
+ const Ut = process.env.API_URL, Q = _e.create({ baseURL: Ut, withCredentials: !0 }), E = oe({
342
+ all: [],
343
+ current: {
344
+ order: "1",
345
+ name: "",
346
+ url: "",
347
+ subcategories: [],
348
+ filters: [],
349
+ localization: []
350
+ }
351
+ }), Ci = {
352
+ async fetchCategories() {
353
+ return await Q.get("/categories").then(
354
+ (e) => (E.all = e.data, Promise.resolve(e.data)),
355
+ (e) => (C(e), Promise.reject(e))
356
+ );
357
+ },
358
+ updateCategories(e) {
359
+ return Q.post("/categories", e).then(
360
+ (t) => (E.all = e, Promise.resolve(e)),
361
+ (t) => (C(t), Promise.reject(t))
362
+ );
363
+ },
364
+ fetchCategory(e) {
365
+ return Q.get("/categories/" + e).then(
366
+ (t) => (E.current = t.data, Promise.resolve(t.data)),
367
+ (t) => (C(t), Promise.reject(t))
368
+ );
369
+ },
370
+ addCategory() {
371
+ return Q.post("/categories/add", E.current).then(
372
+ (e) => (E.all.push(e.data), Promise.resolve(e.data)),
373
+ (e) => (C(e), Promise.reject(e))
374
+ );
375
+ },
376
+ updateCategory(e) {
377
+ return Q.post("/categories/" + e, E.current).then(
378
+ (t) => (E.current = t.data, Promise.resolve(t.data)),
379
+ (t) => (C(t), Promise.reject(t))
380
+ );
381
+ },
382
+ deleteCategory(e) {
383
+ return Q.delete("/categories/" + e).then(
384
+ (t) => {
385
+ const s = E.all.findIndex((n) => n.url === e);
386
+ E.all.splice(s, 1);
387
+ },
388
+ (t) => {
389
+ C(t);
390
+ }
391
+ );
392
+ }
393
+ };
394
+ T(E, (e) => {
395
+ });
396
+ const Bt = { class: "mn-big radius-medium pd-big bg-white" }, Et = { class: "mn-regular" }, jt = { class: "mn-small t-transp p-medium" }, fe = {
397
+ __name: "EmptyState",
398
+ props: {
399
+ title: {
400
+ type: String,
401
+ default: "У вас еще нет организации"
402
+ },
403
+ description: {
404
+ type: String,
405
+ default: "Для использования сервиса, вам необходимо добавить вашу организацию."
406
+ },
407
+ action: {
408
+ type: String,
409
+ default: "Создать организацию"
410
+ },
411
+ callback: {
412
+ type: Function,
413
+ default: () => {
414
+ }
415
+ }
416
+ },
417
+ setup(e) {
418
+ return (t, s) => (o(), r("section", Bt, [
419
+ a("h3", Et, f(e.title), 1),
420
+ a("p", jt, f(e.description), 1),
421
+ a("button", {
422
+ onClick: s[0] || (s[0] = (...n) => e.callback && e.callback(...n)),
423
+ class: "t-white bg-second w-100 button"
424
+ }, f(e.action), 1)
425
+ ]));
426
+ }
427
+ };
428
+ const Tt = {
429
+ __name: "Map",
430
+ props: {
431
+ location: Object
432
+ },
433
+ setup(e) {
434
+ const t = e;
435
+ let s = v(null), n = null, d = null;
436
+ return pe(async () => {
437
+ n = new google.maps.Map(s.value, {
438
+ zoom: 13,
439
+ center: {
440
+ lat: t.location.lat,
441
+ lng: t.location.lng
442
+ }
443
+ }), d = new google.maps.Marker({
444
+ position: {
445
+ lat: t.location.lat,
446
+ lng: t.location.lng
447
+ },
448
+ map: n
449
+ });
450
+ }), T(() => t.location, () => {
451
+ n && d && (d.setPosition(new google.maps.LatLng(t.location.lat, t.location.lng)), n.setCenter(new google.maps.LatLng(t.location.lat, t.location.lng)));
452
+ }, { deep: !0 }), (c, p) => (o(), r("div", {
453
+ ref_key: "gmap",
454
+ ref: s,
455
+ class: "gmap"
456
+ }, null, 512));
457
+ }
458
+ }, Ft = /* @__PURE__ */ A(Tt, [["__scopeId", "data-v-c194b4a5"]]);
459
+ const qt = { class: "pd-small flex-nowrap flex" }, Rt = { class: "user-card__info" }, Zt = { class: "user-card__name" }, Ht = { class: "user-card__position" }, Nt = {
460
+ __name: "DepartmentSub",
461
+ props: {
462
+ department: {
463
+ type: Object,
464
+ required: !0
465
+ }
466
+ // Define other props here
467
+ },
468
+ setup(e) {
469
+ return (t, s) => (o(), r("div", qt, [
470
+ a("div", Rt, [
471
+ a("p", Zt, f(e.department.name ? e.department.name : "Безымянный"), 1),
472
+ a("p", Ht, f(e.department.members ? e.department.members.length : "0") + " человек", 1)
473
+ ])
474
+ ]));
475
+ }
476
+ }, De = /* @__PURE__ */ A(Nt, [["__scopeId", "data-v-d65b1483"]]);
477
+ const Kt = { class: "pd-small flex-nowrap flex" }, Wt = { class: "user-card__info" }, Yt = { class: "user-card__name" }, Jt = { class: "t-transp" }, Qt = {
478
+ __name: "User",
479
+ props: {
480
+ user: {
481
+ type: Object,
482
+ required: !0
483
+ },
484
+ position: {
485
+ type: String,
486
+ required: !0
487
+ }
488
+ // Define other props here
489
+ },
490
+ setup(e) {
491
+ return (t, s) => (o(), r("div", Kt, [
492
+ a("div", Wt, [
493
+ a("p", Yt, f(e.user.name ? e.user.name : "Безымянный"), 1),
494
+ a("p", Jt, f(e.position), 1)
495
+ ])
496
+ ]));
497
+ }
498
+ }, Ae = /* @__PURE__ */ A(Qt, [["__scopeId", "data-v-a27accf5"]]);
499
+ const ie = (e) => (me("data-v-1d33cf95"), e = e(), he(), e), Xt = { class: "radius-big o-hidden cols-2-1_3" }, Gt = { class: "pd-medium w-100" }, es = /* @__PURE__ */ ie(() => /* @__PURE__ */ a("path", {
500
+ d: "M515.693 9.52082C510.095 3.91669 502.49 0.765625 494.563 0.765625C486.635 0.765625 479.036 3.91669 473.432 9.52082L48.7255 434.307C44.8244 438.214 42.0848 443.125 40.8088 448.496L0.939444 615.069C-1.47202 625.168 1.528 635.788 8.86652 643.132C16.2103 650.47 26.8305 653.47 36.9292 651.059L203.516 611.261H203.511C208.88 609.985 213.792 607.246 217.699 603.35L642.485 178.496C648.089 172.892 651.241 165.293 651.241 157.366C651.241 149.439 648.089 141.835 642.485 136.235L515.693 9.52082ZM113.76 453.708L388.307 179.161L472.828 263.682L198.281 538.229L113.76 453.708ZM87.1041 511.5L140.416 564.812L70.3014 581.614L87.1041 511.5ZM515.091 221.793L430.195 136.897L494.184 72.9075L579.08 157.429L515.091 221.793Z",
501
+ fill: "black"
502
+ }, null, -1)), ts = [
503
+ es
504
+ ], ss = ["innerHTML"], as = ["innerHTML"], ns = { class: "pd-small flex-v-center flex-nowrap flex" }, os = /* @__PURE__ */ ie(() => /* @__PURE__ */ a("h5", { class: "w-100" }, "Contacts ", -1)), is = { class: "mn-r-small" }, ls = /* @__PURE__ */ ie(() => /* @__PURE__ */ a("svg", {
505
+ width: "14",
506
+ height: "9",
507
+ viewBox: "0 0 14 9",
508
+ fill: "none",
509
+ xmlns: "http://www.w3.org/2000/svg"
510
+ }, [
511
+ /* @__PURE__ */ a("path", {
512
+ "fill-rule": "evenodd",
513
+ "clip-rule": "evenodd",
514
+ d: "M12.4697 0.469727L13.5304 1.53039L7.00006 8.06072L0.469727 1.53039L1.53039 0.469727L7.00006 5.9394L12.4697 0.469727Z",
515
+ fill: "#8A8A8A"
516
+ })
517
+ ], -1)), rs = { key: 0 }, ds = { class: "pd-small flex-v-center flex-nowrap flex" }, cs = /* @__PURE__ */ ie(() => /* @__PURE__ */ a("h5", { class: "w-100" }, "Working Hours ", -1)), us = { class: "mn-r-small" }, ps = /* @__PURE__ */ ie(() => /* @__PURE__ */ a("svg", {
518
+ width: "14",
519
+ height: "9",
520
+ viewBox: "0 0 14 9",
521
+ fill: "none",
522
+ xmlns: "http://www.w3.org/2000/svg"
523
+ }, [
524
+ /* @__PURE__ */ a("path", {
525
+ "fill-rule": "evenodd",
526
+ "clip-rule": "evenodd",
527
+ d: "M12.4697 0.469727L13.5304 1.53039L7.00006 8.06072L0.469727 1.53039L1.53039 0.469727L7.00006 5.9394L12.4697 0.469727Z",
528
+ fill: "#8A8A8A"
529
+ })
530
+ ], -1)), ms = { key: 0 }, hs = {
531
+ __name: "Department",
532
+ props: {
533
+ department: Object,
534
+ organization: Object
535
+ },
536
+ setup(e) {
537
+ const t = e;
538
+ return (s, n) => (o(), r("div", Xt, [
539
+ h(Ft, {
540
+ location: { lat: e.department.location.coordinates[1], lng: e.department.location.coordinates[0] },
541
+ class: ""
542
+ }, null, 8, ["location"]),
543
+ a("div", Gt, [
544
+ (o(), r("svg", {
545
+ onClick: n[0] || (n[0] = (d) => s.$router.push(`/app/organization/${t.organization._id}/departments/${e.department._id}/edit`)),
546
+ class: "i-regular pos-absolute pos-r-0 pos-t-0 t-transp",
547
+ width: "652",
548
+ height: "652",
549
+ viewBox: "0 0 652 652",
550
+ fill: "none",
551
+ xmlns: "http://www.w3.org/2000/svg"
552
+ }, ts)),
553
+ a("h3", {
554
+ onClick: n[1] || (n[1] = (d) => s.$router.push(`/app/organization/${t.organization._id}/departments/${e.department._id}`)),
555
+ class: "mn-small w-100",
556
+ innerHTML: e.department.profile.name
557
+ }, null, 8, ss),
558
+ a("p", {
559
+ onClick: n[2] || (n[2] = (d) => s.$router.push(`/app/organization/${t.organization._id}/departments/${e.department._id}`)),
560
+ class: "mn-small p-big w-100",
561
+ innerHTML: e.department.address
562
+ }, null, 8, as),
563
+ h($e, { class: "radius-small o-hidden br-1px br-solid br-grey mn-thin" }, {
564
+ header: x(() => [
565
+ a("div", ns, [
566
+ os,
567
+ a("p", is, f(e.department.members.length) + " человек", 1),
568
+ ls
569
+ ])
570
+ ]),
571
+ content: x(() => [
572
+ a("ul", null, [
573
+ e.department.members.length < 1 ? (o(), r("li", rs, "В отделе еще нет участников")) : g("", !0),
574
+ (o(!0), r(O, null, L(e.department.members, (d, c) => (o(), $(Ae, {
575
+ class: "br-b br-solid br-grey",
576
+ key: c,
577
+ user: d.user,
578
+ position: d.position,
579
+ onClick: (p) => s.$router.push(`/app/profile/${d.user._id}`)
580
+ }, null, 8, ["user", "position", "onClick"]))), 128))
581
+ ])
582
+ ]),
583
+ _: 1
584
+ }),
585
+ h($e, { class: "radius-small o-hidden br-1px br-solid br-grey mn-thin" }, {
586
+ header: x(() => [
587
+ a("div", ds, [
588
+ cs,
589
+ a("p", us, f(e.department.subdepartments ? e.department.subdepartments.length : 0) + " отделов", 1),
590
+ ps
591
+ ])
592
+ ]),
593
+ content: x(() => [
594
+ a("ul", null, [
595
+ e.department.subdepartments.length < 1 ? (o(), r("li", ms, "В отделе еще нет подотделов")) : g("", !0),
596
+ (o(!0), r(O, null, L(e.department.subdepartments, (d, c) => (o(), $(De, {
597
+ onClick: (p) => s.$router.push(`/app/organization/departments/${d._id}`),
598
+ key: c,
599
+ class: "br-b br-solid br-grey",
600
+ department: d
601
+ }, null, 8, ["onClick", "department"]))), 128))
602
+ ])
603
+ ]),
604
+ _: 1
605
+ })
606
+ ])
607
+ ]));
608
+ }
609
+ }, _s = /* @__PURE__ */ A(hs, [["__scopeId", "data-v-1d33cf95"]]), G = _e.create({ baseURL: process.env.API_URL, withCredentials: !0 });
610
+ G.defaults.withCredentials = !0;
611
+ const _ = oe({
612
+ departments: [],
613
+ department: {
614
+ organization: "",
615
+ profile: {
616
+ photo: "",
617
+ name: "",
618
+ description: "",
619
+ categories: []
620
+ },
621
+ address: "",
622
+ location: {
623
+ lat: null,
624
+ lng: null
625
+ },
626
+ worktime: [],
627
+ delivery: [],
628
+ payment: [],
629
+ members: [],
630
+ subdepartments: []
631
+ },
632
+ error: null
633
+ }), K = {
634
+ async readOne(e) {
635
+ await G.get(`/api/departments/get/${e}`).then((t) => {
636
+ _.department = t.data, _.error = null;
637
+ }).catch((t) => {
638
+ C(t);
639
+ });
640
+ },
641
+ async read(e) {
642
+ await G.get(`/api/departments/${e}`).then((t) => {
643
+ console.log("Response:", t), _.departments = t.data, _.error = null;
644
+ }).catch((t) => {
645
+ C(t);
646
+ });
647
+ },
648
+ async create(e, t) {
649
+ await G.post(`/api/departments/${e}/create`, t).then((s) => {
650
+ _.error = null, _.department = s.data;
651
+ }).catch((s) => {
652
+ C(s);
653
+ });
654
+ },
655
+ async update(e, t) {
656
+ await G.post(`/api/departments/${e}/update`, t).then(() => {
657
+ _.error = null;
658
+ }).catch((s) => {
659
+ C(s);
660
+ });
661
+ },
662
+ async delete(e, t) {
663
+ await G.delete(`/api/departments/${e}/delete`, { data: { _id: t } }).then(() => {
664
+ _.error = null;
665
+ }).catch((s) => {
666
+ C(s);
667
+ });
668
+ }
669
+ };
670
+ T(_, (e, t) => {
671
+ });
672
+ const ki = {
673
+ __name: "StructureTab",
674
+ props: {
675
+ organization: Object,
676
+ units: Array,
677
+ memberships: Array
678
+ },
679
+ async setup(e) {
680
+ let t, s;
681
+ const n = e;
682
+ v("departments"), [t, s] = Y(() => K.read(n.organization._id)), await t, s();
683
+ const d = Z(() => {
684
+ const c = _.departments, p = c.flatMap(
685
+ (l) => l.subdepartments.map((u) => u._id)
686
+ );
687
+ return c.filter(
688
+ (l) => !p.includes(l._id)
689
+ );
690
+ });
691
+ return (c, p) => (o(), $(H, { name: "slide-fade" }, {
692
+ default: x(() => [
693
+ a("div", null, [
694
+ k(d).length < 1 ? (o(), $(fe, {
695
+ key: 0,
696
+ title: "You don't have any spots yet.",
697
+ description: "Add spots to your hub.",
698
+ action: "Add spot",
699
+ callback: () => c.$router.push(`/app/organization/${n.organization._id}/departments/create`)
700
+ }, null, 8, ["callback"])) : g("", !0),
701
+ a("div", null, [
702
+ (o(!0), r(O, null, L(k(d), (l, u) => (o(), $(_s, {
703
+ key: u,
704
+ department: l,
705
+ organization: e.organization,
706
+ class: "radius-big bg-grey mn-thin"
707
+ }, null, 8, ["department", "organization"]))), 128)),
708
+ k(d).length > 0 && S.user._id === e.organization.owner ? (o(), r("button", {
709
+ key: 0,
710
+ onClick: p[0] || (p[0] = (l) => c.$router.push(`/app/organization/${n.organization._id}/departments/create`)),
711
+ class: "mn-thin button w-100"
712
+ }, " Add spot ")) : g("", !0)
713
+ ])
714
+ ])
715
+ ]),
716
+ _: 1
717
+ }));
718
+ }
719
+ }, ee = _e.create({ baseURL: process.env.API_URL, withCredentials: !0 });
720
+ ee.defaults.withCredentials = !0;
721
+ const j = oe({
722
+ invites: [],
723
+ invite: null,
724
+ error: null
725
+ }), ne = {
726
+ async read(e) {
727
+ await ee.get(`/api/invites/${e}`).then((t) => {
728
+ j.invites = t.data, j.error = null;
729
+ }).catch((t) => {
730
+ C(t);
731
+ });
732
+ },
733
+ async readOne(e) {
734
+ await ee.get(`/api/invites/get/${e}`).then((t) => {
735
+ j.invite = t.data, S.user.phone = t.data.invitedPhone, S.user.email = t.data.invitedEmail;
736
+ }).catch((t) => {
737
+ C(t);
738
+ });
739
+ },
740
+ async create(e, t) {
741
+ await ee.post(`/api/invites/${e}/create`, t).then(() => {
742
+ j.error = null;
743
+ }).catch((s) => {
744
+ C(s);
745
+ });
746
+ },
747
+ async update(e, t) {
748
+ await ee.put(`/api/invites/${e}/update`, t).then(() => {
749
+ j.error = null;
750
+ }).catch((s) => {
751
+ C(s);
752
+ });
753
+ },
754
+ async delete(e) {
755
+ await ee.delete(`/api/invites/${e}/delete`).then(() => {
756
+ j.error = null;
757
+ }).catch((t) => {
758
+ C(t);
759
+ });
760
+ }
761
+ };
762
+ T(j, (e, t) => {
763
+ });
764
+ const xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
765
+ __proto__: null,
766
+ actions: ne,
767
+ state: j
768
+ }, Symbol.toStringTag, { value: "Module" })), fs = { class: "mn-medium radius-medium pd-semi bg-white" }, gs = /* @__PURE__ */ a("h3", { class: "mn-medium" }, "Добавить участников", -1), bs = /* @__PURE__ */ a("p", { class: "mn-small t-transp p-medium" }, "Укажите email или телефон, чтобы отправить ссылку с приглашением:", -1), vs = { class: "w-100 flex-nowrap flex" }, ys = {
769
+ key: 0,
770
+ class: "mn-r-medium flex-v-center flex"
771
+ }, ws = ["onClick"], $s = /* @__PURE__ */ a("p", { class: "t-blue mn-r-small" }, "+ Добавить приглашение", -1), Cs = [
772
+ $s
773
+ ], ks = /* @__PURE__ */ a("span", null, "Отправить приглашения ", -1), xs = {
774
+ __name: "MembersAdd",
775
+ props: {
776
+ organization: Object
777
+ },
778
+ emits: ["send-invite"],
779
+ setup(e, { emit: t }) {
780
+ const s = e, n = v(null), d = v([{ contact: "", role: "" }]);
781
+ function c() {
782
+ d.value.push({ contact: "", role: "" });
783
+ }
784
+ function p(i) {
785
+ d.value.splice(i, 1);
786
+ }
787
+ async function l(i) {
788
+ await ne.create(s.organization._id, d.value);
789
+ }
790
+ function u() {
791
+ }
792
+ return (i, m) => (o(), r("div", null, [
793
+ a("section", fs, [
794
+ gs,
795
+ bs,
796
+ (o(!0), r(O, null, L(d.value, (w, P) => (o(), r("div", {
797
+ key: P,
798
+ class: "br-1px br-solid br-grey flex radius-small mn-thin"
799
+ }, [
800
+ a("div", vs, [
801
+ h(D, {
802
+ field: w.contact,
803
+ "onUpdate:field": (I) => w.contact = I,
804
+ placeholder: "Email или телефон",
805
+ class: "w-100 bg-white",
806
+ validation: n.value
807
+ }, null, 8, ["field", "onUpdate:field", "validation"]),
808
+ P > 0 ? (o(), r("div", ys, [
809
+ a("button", {
810
+ onClick: (I) => p(P),
811
+ class: "button-small button"
812
+ }, "×", 8, ws)
813
+ ])) : g("", !0)
814
+ ]),
815
+ h(Me, {
816
+ options: [
817
+ { name: "Директор", value: "director" },
818
+ { name: "Менеджер", value: "manager" },
819
+ { name: "Сотрудник", value: "member" }
820
+ ],
821
+ prop: w,
822
+ content: "role",
823
+ placeholder: "Роль",
824
+ size: "small",
825
+ class: "w-80"
826
+ }, null, 8, ["prop"])
827
+ ]))), 128)),
828
+ a("div", {
829
+ onClick: c,
830
+ class: "mn-small flex-v-center flex-nowrap flex"
831
+ }, Cs),
832
+ h(ce, {
833
+ submit: i.a = () => l(j.invites),
834
+ callback: u,
835
+ class: "mn-t-medium"
836
+ }, {
837
+ default: x(() => [
838
+ ks
839
+ ]),
840
+ _: 1
841
+ }, 8, ["submit"])
842
+ ])
843
+ ]));
844
+ }
845
+ }, Os = { class: "mn-big radius-medium bg-white" }, Ls = {
846
+ key: 0,
847
+ class: "pd-semi"
848
+ }, Ss = { class: "br-grey br-1px br-solid radius-small flex-nowrap flex-v-center flex pd-medium" }, Ps = { class: "w-100 mn-r-small" }, zs = { class: "t-transp" }, Ms = {
849
+ key: 0,
850
+ class: "mn-l-medium flex-v-center flex"
851
+ }, Ds = ["onClick"], As = {
852
+ key: 1,
853
+ class: "pd-semi"
854
+ }, Vs = { key: 0 }, Is = { class: "br-grey br-1px br-solid radius-small mn-thin flex-nowrap flex-v-center flex pd-medium" }, Us = { class: "w-100 mn-r-small" }, Bs = { class: "t-transp" }, Es = { class: "mn-l-medium flex-v-center flex" }, js = ["onClick"], Ts = {
855
+ __name: "MembersList",
856
+ props: {
857
+ organization: Object,
858
+ memberships: Array,
859
+ invites: Array
860
+ },
861
+ emits: [["removeMember", "removeInvite"]],
862
+ setup(e, { emit: t }) {
863
+ const s = e, n = v("members");
864
+ function d(p, l) {
865
+ s.memberships.splice(p, 1), t("removeMember", l);
866
+ }
867
+ function c(p, l) {
868
+ s.invites.splice(p, 1), t("removeInvite", l);
869
+ }
870
+ return (p, l) => (o(), r("section", Os, [
871
+ h(Pe, {
872
+ selected: n.value,
873
+ "onUpdate:selected": l[0] || (l[0] = (u) => n.value = u),
874
+ class: "br-grey br-b br-solid radius-small",
875
+ tabs: [
876
+ { name: "Участники", value: "members" },
877
+ { name: "Приглашения", value: "invites" }
878
+ ]
879
+ }, null, 8, ["selected"]),
880
+ n.value === "members" ? (o(), r("div", Ls, [
881
+ (o(!0), r(O, null, L(e.memberships, (u, i) => (o(), r("div", Ss, [
882
+ a("span", Ps, f(u.user.email) + " " + f(u.user.phone), 1),
883
+ a("span", zs, f(u.position), 1),
884
+ u.position !== "Основатель" ? (o(), r("div", Ms, [
885
+ a("button", {
886
+ onClick: (m) => d(i, u),
887
+ class: "button-small button"
888
+ }, "×", 8, Ds)
889
+ ])) : g("", !0)
890
+ ]))), 256))
891
+ ])) : g("", !0),
892
+ n.value === "invites" ? (o(), r("div", As, [
893
+ e.invites.length < 1 ? (o(), r("span", Vs, "В организации нет приглашений")) : g("", !0),
894
+ (o(!0), r(O, null, L(e.invites, (u, i) => (o(), r("div", Is, [
895
+ a("span", Us, f(u.invitedEmail) + " " + f(u.invitedPhone), 1),
896
+ a("span", Bs, f(u.status), 1),
897
+ a("div", Es, [
898
+ a("button", {
899
+ onClick: (m) => c(i, u),
900
+ class: "button-small button"
901
+ }, "×", 8, js)
902
+ ])
903
+ ]))), 256))
904
+ ])) : g("", !0)
905
+ ]));
906
+ }
907
+ }, Fs = /* @__PURE__ */ a("section", { class: "mn-medium radius-medium pd-semi bg-white" }, [
908
+ /* @__PURE__ */ a("h2", { class: "mn-regular" }, "Участники"),
909
+ /* @__PURE__ */ a("p", { class: "t-transp p-big" }, "Добавляйте новых участников организации и настраивайте права доступа.")
910
+ ], -1), Oi = {
911
+ __name: "MembersTab",
912
+ props: {
913
+ organization: Object,
914
+ memberships: Array
915
+ },
916
+ async setup(e) {
917
+ let t, s;
918
+ const n = e;
919
+ [t, s] = Y(() => ne.read(n.organization._id)), await t, s();
920
+ async function d(l) {
921
+ await ne.create(n.organization._id, l);
922
+ }
923
+ async function c(l) {
924
+ await ge.delete(l._id);
925
+ }
926
+ async function p(l) {
927
+ await ne.delete(l._id);
928
+ }
929
+ return (l, u) => (o(), $(H, { name: "slide-fade" }, {
930
+ default: x(() => [
931
+ a("div", null, [
932
+ Fs,
933
+ h(xs, {
934
+ organization: e.organization,
935
+ onSendInvite: d
936
+ }, null, 8, ["organization"]),
937
+ h(Ts, {
938
+ organization: e.organization,
939
+ memberships: e.memberships,
940
+ invites: j.invites,
941
+ onRemoveInvite: p,
942
+ onRemoveMember: c
943
+ }, null, 8, ["organization", "memberships", "invites"])
944
+ ])
945
+ ]),
946
+ _: 1
947
+ }));
948
+ }
949
+ };
950
+ const qs = {
951
+ key: 0,
952
+ class: "pd-thin for-transition w-100"
953
+ }, Rs = { class: "t-semi mn-small" }, Zs = {
954
+ __name: "Organization",
955
+ setup(e) {
956
+ const t = q(), s = F();
957
+ let n = s.query.tab ? s.query.tab : "events";
958
+ const d = v(null);
959
+ pe(async () => {
960
+ d.value = await R.read({ _id: s.params._id, user: S.user._id }), await ge.read(s.params._id);
961
+ });
962
+ const c = v(n);
963
+ s.query.tab = c.value, T(c, (l) => {
964
+ t.replace({ query: { ...s.query, tab: l } });
965
+ });
966
+ const p = ({ membership: l, isMember: u, targetId: i }) => {
967
+ qe.handleMembershipUpdate(b.current, l, u, i);
968
+ };
969
+ return (l, u) => d.value ? (o(), r("div", qs, [
970
+ h(At, {
971
+ organization: b.current,
972
+ user: S.user,
973
+ class: "mn-semi"
974
+ }, {
975
+ default: x(() => [
976
+ a("p", Rs, " 👨‍👨‍👧‍👧 " + f(b.current.numberOfMemberships) + " followers ", 1),
977
+ S.user._id && k(s).params._id && k(s).params._id !== S.user._id && b.current.owner !== S.user._id ? (o(), $(Fe, {
978
+ key: 0,
979
+ type: "organization",
980
+ isMember: b.current.isMember,
981
+ targetId: b.current._id,
982
+ userId: S.user._id,
983
+ class: "w-min mn-auto",
984
+ onUpdateMembership: p
985
+ }, null, 8, ["isMember", "targetId", "userId"])) : g("", !0)
986
+ ]),
987
+ _: 1
988
+ }, 8, ["organization", "user"]),
989
+ h(Pe, {
990
+ selected: c.value,
991
+ "onUpdate:selected": u[0] || (u[0] = (i) => c.value = i),
992
+ tabs: [
993
+ { name: "Events", value: "events" },
994
+ { name: "Community", value: "community" }
995
+ ],
996
+ class: "mn-small o-hidden h5 radius-big bg-grey"
997
+ }, null, 8, ["selected"]),
998
+ h(H, { name: "slide-fade" }, {
999
+ default: x(() => [
1000
+ c.value === "events" ? (o(), $(Ze, {
1001
+ key: 0,
1002
+ user: S.user._id,
1003
+ owner: k(s).params._id,
1004
+ sortOrder: "asc"
1005
+ }, null, 8, ["user", "owner"])) : g("", !0)
1006
+ ]),
1007
+ _: 1
1008
+ }),
1009
+ h(H, { name: "slide-fade" }, {
1010
+ default: x(() => [
1011
+ c.value === "community" ? (o(), $(He, {
1012
+ key: 0,
1013
+ user: S.user._id,
1014
+ owner: k(s).params._id
1015
+ }, null, 8, ["user", "owner"])) : g("", !0)
1016
+ ]),
1017
+ _: 1
1018
+ })
1019
+ ])) : g("", !0);
1020
+ }
1021
+ }, Hs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1022
+ __proto__: null,
1023
+ default: Zs
1024
+ }, Symbol.toStringTag, { value: "Module" })), Ns = { class: "for-transition w-100" }, Ks = {
1025
+ id: "dash",
1026
+ class: "pd-medium bg-grey"
1027
+ }, Ws = { class: "mn-medium radius-medium pd-semi bg-white" }, Ys = { class: "flex-nowrap flex mn-small" }, Js = { class: "w-100" }, Qs = /* @__PURE__ */ a("path", {
1028
+ d: "M515.693 9.52082C510.095 3.91669 502.49 0.765625 494.563 0.765625C486.635 0.765625 479.036 3.91669 473.432 9.52082L48.7255 434.307C44.8244 438.214 42.0848 443.125 40.8088 448.496L0.939444 615.069C-1.47202 625.168 1.528 635.788 8.86652 643.132C16.2103 650.47 26.8305 653.47 36.9292 651.059L203.516 611.261H203.511C208.88 609.985 213.792 607.246 217.699 603.35L642.485 178.496C648.089 172.892 651.241 165.293 651.241 157.366C651.241 149.439 648.089 141.835 642.485 136.235L515.693 9.52082ZM113.76 453.708L388.307 179.161L472.828 263.682L198.281 538.229L113.76 453.708ZM87.1041 511.5L140.416 564.812L70.3014 581.614L87.1041 511.5ZM515.091 221.793L430.195 136.897L494.184 72.9075L579.08 157.429L515.091 221.793Z",
1029
+ fill: "black"
1030
+ }, null, -1), Xs = [
1031
+ Qs
1032
+ ], Gs = ["innerHTML"], ea = { class: "mn-medium radius-medium pd-semi bg-white" }, ta = /* @__PURE__ */ a("h3", { class: "mn-regular" }, "Команда", -1), sa = { key: 0 }, aa = { class: "mn-medium radius-medium pd-semi bg-white" }, na = /* @__PURE__ */ a("h3", { class: "mn-regular" }, "Подотделы", -1), oa = { key: 0 }, ia = {
1033
+ __name: "Department",
1034
+ async setup(e) {
1035
+ let t, s;
1036
+ q();
1037
+ const n = F();
1038
+ return [t, s] = Y(() => K.readOne(n.params._id)), await t, s(), (d, c) => (o(), r("div", Ns, [
1039
+ a("div", Ks, [
1040
+ a("section", Ws, [
1041
+ a("div", Ys, [
1042
+ a("h2", Js, f(_.department.name), 1),
1043
+ (o(), r("svg", {
1044
+ onClick: c[0] || (c[0] = (p) => d.$router.push(`/app/organization/departments/${_.department._id}/edit`)),
1045
+ class: "i-regular t-transp",
1046
+ width: "652",
1047
+ height: "652",
1048
+ viewBox: "0 0 652 652",
1049
+ fill: "none",
1050
+ xmlns: "http://www.w3.org/2000/svg"
1051
+ }, Xs))
1052
+ ]),
1053
+ a("p", {
1054
+ class: "t-transp p-big",
1055
+ innerHTML: _.department.description
1056
+ }, null, 8, Gs)
1057
+ ]),
1058
+ a("section", ea, [
1059
+ ta,
1060
+ a("ul", null, [
1061
+ _.department.members.length < 1 ? (o(), r("li", sa, "В отделе еще нет участников")) : g("", !0),
1062
+ (o(!0), r(O, null, L(_.department.members, (p, l) => (o(), $(Ae, {
1063
+ class: "br-b br-solid br-grey",
1064
+ key: l,
1065
+ user: p.user,
1066
+ position: p.position,
1067
+ onClick: (u) => d.$router.push(`/app/profile/${p.user._id}`)
1068
+ }, null, 8, ["user", "position", "onClick"]))), 128))
1069
+ ])
1070
+ ]),
1071
+ a("section", aa, [
1072
+ na,
1073
+ a("ul", null, [
1074
+ _.department.subdepartments.length < 1 ? (o(), r("li", oa, "В отделе еще нет подотделов")) : g("", !0),
1075
+ (o(!0), r(O, null, L(_.department.subdepartments, (p, l) => (o(), $(De, {
1076
+ onClick: (u) => d.$router.push(`/app/organization/departments/${p._id}`),
1077
+ key: l,
1078
+ class: "br-b br-solid br-grey",
1079
+ department: p
1080
+ }, null, 8, ["onClick", "department"]))), 128))
1081
+ ])
1082
+ ])
1083
+ ])
1084
+ ]));
1085
+ }
1086
+ }, la = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1087
+ __proto__: null,
1088
+ default: ia
1089
+ }, Symbol.toStringTag, { value: "Module" }));
1090
+ const ra = { class: "for-transition bg-white radius-big w-100" }, da = { class: "flex-v-center flex-nowrap flex pd-semi" }, ca = /* @__PURE__ */ a("h2", { class: "mn-r-medium" }, "Organizations", -1), ua = { class: "pd-semi" }, pa = {
1091
+ key: 1,
1092
+ class: "cols-3"
1093
+ }, ma = ["onClick"], ha = ["src"], _a = {
1094
+ key: 1,
1095
+ class: "radius-medium mn-small i-thin",
1096
+ width: "42",
1097
+ height: "42",
1098
+ viewBox: "0 0 42 42",
1099
+ fill: "none",
1100
+ xmlns: "http://www.w3.org/2000/svg"
1101
+ }, fa = /* @__PURE__ */ a("circle", {
1102
+ fill: "rgb(var(--main))",
1103
+ cx: "21",
1104
+ cy: "21",
1105
+ r: "21"
1106
+ }, null, -1), ga = /* @__PURE__ */ a("path", {
1107
+ fill: "#242424",
1108
+ "fill-opacity": "0.1",
1109
+ "fill-rule": "evenodd",
1110
+ "clip-rule": "evenodd",
1111
+ d: "M8.00233 37.4954C8.00078 37.4458 8 37.3961 8 37.3462C8 32.9066 11.5673 29.3077 15.9677 29.3077H26.0323C30.4328 29.3077 34 32.9066 34 37.3462C34 37.3961 33.9992 37.4458 33.9977 37.4954C30.4223 40.3165 25.9078 42 21 42C16.0922 42 11.5777 40.3164 8.00233 37.4954ZM21 9C16.5995 9 13.0323 12.5989 13.0323 17.0385C13.0323 21.478 16.5995 25.0769 21 25.0769C25.4005 25.0769 28.9677 21.478 28.9677 17.0385C28.9677 12.5989 25.4005 9 21 9Z"
1112
+ }, null, -1), ba = [
1113
+ fa,
1114
+ ga
1115
+ ], va = { class: "h4 mn-r-semi mn-small" }, ya = ["onClick"], wa = /* @__PURE__ */ a("path", {
1116
+ fill: "black",
1117
+ d: "M6.41357 11.979C9.6831 11.979 12.3901 9.26611 12.3901 6.00244C12.3901 2.73291 9.67724 0.0258789 6.40771 0.0258789C3.14404 0.0258789 0.437008 2.73291 0.437008 6.00244C0.437008 9.26611 3.1499 11.979 6.41357 11.979ZM6.41357 10.9829C3.64795 10.9829 1.43896 8.76807 1.43896 6.00244C1.43896 3.23682 3.64209 1.02197 6.40771 1.02197C9.17334 1.02197 11.3882 3.23682 11.394 6.00244C11.3999 8.76807 9.1792 10.9829 6.41357 10.9829ZM8.72802 4.36182L9.1499 3.93408C9.3374 3.74072 9.35498 3.52979 9.1792 3.34814L9.04443 3.21924C8.86865 3.0376 8.65185 3.06104 8.46435 3.24854L8.03662 3.67041L8.72802 4.36182ZM4.53271 8.53955L8.37646 4.71338L7.68505 4.02197L3.84716 7.84814L3.51318 8.62158C3.45459 8.76807 3.59521 8.89697 3.72412 8.8501L4.53271 8.53955Z"
1118
+ }, null, -1), $a = [
1119
+ wa
1120
+ ], Ca = { class: "t-black p-small" }, Li = {
1121
+ __name: "OrganizationsAccount",
1122
+ async setup(e) {
1123
+ let t, s;
1124
+ S.user._id && ([t, s] = Y(() => R.read({ owner: S.user._id })), await t, s());
1125
+ const n = q(), d = F();
1126
+ let c = d.query.tab ? d.query.tab : "details";
1127
+ const p = v(c);
1128
+ return d.query.tab = p.value, T(p, (l) => {
1129
+ n.replace({ query: { ...d.query, tab: l } });
1130
+ }), (l, u) => (o(), r("div", ra, [
1131
+ a("header", da, [
1132
+ ca,
1133
+ a("button", {
1134
+ onClick: u[0] || (u[0] = (i) => l.$router.push({ name: "Create Organization" })),
1135
+ class: "radius-100p i-semi hover-scale-1 cursor-pointer t-white bg-second"
1136
+ }, "+")
1137
+ ]),
1138
+ a("div", ua, [
1139
+ b.all.length < 1 ? (o(), $(fe, {
1140
+ key: 0,
1141
+ title: "You Haven't Joined Any Organization Yet",
1142
+ description: "Weeder is all about community. Join an organization or maybe you want to create your own?",
1143
+ action: "Create organization",
1144
+ callback: l.a = () => l.$router.push("/app/organization/create/details")
1145
+ }, null, 8, ["callback"])) : (o(), r("div", pa, [
1146
+ (o(!0), r(O, null, L(b.all, (i) => (o(), r("div", {
1147
+ key: i._id,
1148
+ class: "mn-small radius-medium pd-medium br-2px br-solid br-grey",
1149
+ onClick: (m) => l.$router.push({ name: "Organization", params: { _id: i._id } })
1150
+ }, [
1151
+ i.profile.photo.length > 0 ? (o(), r("img", {
1152
+ key: 0,
1153
+ src: (l.FILE_SERVER_URL || "") + i.profile.photo,
1154
+ class: "radius-medium mn-small i-thin"
1155
+ }, null, 8, ha)) : (o(), r("svg", _a, ba)),
1156
+ a("p", va, f(i.profile.name), 1),
1157
+ (o(), r("svg", {
1158
+ onClick: re((m) => l.$router.push({ name: "Organization Edit", params: { _id: i._id } }), ["stop"]),
1159
+ class: "t-transp hover-scale-1 z-index-1 pos-absolute pos-t-regular pos-r-regular i-medium",
1160
+ width: "13",
1161
+ height: "12",
1162
+ viewBox: "0 0 13 12",
1163
+ xmlns: "http://www.w3.org/2000/svg"
1164
+ }, $a, 8, ya)),
1165
+ a("p", Ca, f(i.profile.description.slice(0, 120) + "..."), 1)
1166
+ ], 8, ma))), 128))
1167
+ ]))
1168
+ ])
1169
+ ]));
1170
+ }
1171
+ }, ka = { class: "for-transition pd-thin" }, xa = /* @__PURE__ */ a("h3", { class: "mn-small" }, "Type of group", -1), Oa = /* @__PURE__ */ a("p", { class: "mn-thin" }, "Public groups are open to everyone, whereas in exclusive groups only members can post. If you wish to make a group private, select 'hidden'.", -1), La = /* @__PURE__ */ a("h3", { class: "mn-small" }, "Profile", -1), Sa = { class: "mn-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex" }, Pa = /* @__PURE__ */ a("h4", null, "Upload photo", -1), za = /* @__PURE__ */ a("h3", { class: "mn-small" }, "Socials", -1), Ma = /* @__PURE__ */ a("p", { class: "mn-thin" }, "Please provide only the username for social media profiles, without full links.", -1), Da = {
1172
+ __name: "OrganizationEdit",
1173
+ async setup(e) {
1174
+ let t, s;
1175
+ const n = F(), d = q();
1176
+ R.reset(), n.params._id && ([t, s] = Y(() => R.read({ _id: n.params._id })), await t, s());
1177
+ const c = Z(() => b.current);
1178
+ async function p() {
1179
+ n.params._id ? await R.update(n.params._id, c.value) : await R.create(b.current, S.user._id);
1180
+ }
1181
+ function l() {
1182
+ d.replace({ name: "Organization", params: { _id: b.current._id } });
1183
+ }
1184
+ return (u, i) => (o(), r("div", ka, [
1185
+ xa,
1186
+ Oa,
1187
+ h(je, {
1188
+ modelValue: b.current.types,
1189
+ "onUpdate:modelValue": i[0] || (i[0] = (m) => b.current.types = m),
1190
+ options: ["public", "exclusive", "hidden"],
1191
+ multiple: !1,
1192
+ taggable: !1,
1193
+ placeholder: "Type to search or add type of organization",
1194
+ class: "mn-semi bg-grey pd-medium radius-small"
1195
+ }, null, 8, ["modelValue"]),
1196
+ La,
1197
+ a("div", Sa, [
1198
+ h(ze, {
1199
+ photo: b.current.profile.photo,
1200
+ "onUpdate:photo": i[1] || (i[1] = (m) => b.current.profile.photo = m),
1201
+ uploadPath: "organizations/" + b.current._id + "/avatars",
1202
+ class: "h-4r w-4r aspect-1x1 o-hidden mn-thin radius-extra"
1203
+ }, null, 8, ["photo", "uploadPath"]),
1204
+ Pa
1205
+ ]),
1206
+ h(D, {
1207
+ field: b.current.profile.name,
1208
+ "onUpdate:field": i[2] || (i[2] = (m) => b.current.profile.name = m),
1209
+ placeholder: "Name of organization",
1210
+ class: "mn-thin bg-grey pd-medium radius-small"
1211
+ }, null, 8, ["field"]),
1212
+ h(D, {
1213
+ field: b.current.profile.description,
1214
+ "onUpdate:field": i[3] || (i[3] = (m) => b.current.profile.description = m),
1215
+ placeholder: "Brief description of your group",
1216
+ class: "mn-thin bg-grey pd-medium radius-small"
1217
+ }, null, 8, ["field"]),
1218
+ h(Te, {
1219
+ onTagsChanged: i[4] || (i[4] = (m) => b.current.profile.tags = m),
1220
+ tags: b.current.profile.tags
1221
+ }, null, 8, ["tags"]),
1222
+ za,
1223
+ Ma,
1224
+ h(D, {
1225
+ field: b.current.socials.instagram,
1226
+ "onUpdate:field": i[5] || (i[5] = (m) => b.current.socials.instagram = m),
1227
+ label: "Instagram",
1228
+ placeholder: "",
1229
+ class: "mn-thin bg-grey pd-medium radius-small"
1230
+ }, null, 8, ["field"]),
1231
+ h(D, {
1232
+ field: b.current.socials.twitter,
1233
+ "onUpdate:field": i[6] || (i[6] = (m) => b.current.socials.twitter = m),
1234
+ label: "Twitter",
1235
+ placeholder: "",
1236
+ class: "mn-thin bg-grey pd-medium radius-small"
1237
+ }, null, 8, ["field"]),
1238
+ h(D, {
1239
+ field: b.current.socials.facebook,
1240
+ "onUpdate:field": i[7] || (i[7] = (m) => b.current.socials.facebook = m),
1241
+ label: "Facebook",
1242
+ placeholder: "",
1243
+ class: "mn-thin bg-grey pd-medium radius-small"
1244
+ }, null, 8, ["field"]),
1245
+ h(D, {
1246
+ field: b.current.socials.telegram,
1247
+ "onUpdate:field": i[8] || (i[8] = (m) => b.current.socials.telegram = m),
1248
+ label: "Telegram",
1249
+ placeholder: "",
1250
+ class: "mn-thin bg-grey pd-medium radius-small"
1251
+ }, null, 8, ["field"]),
1252
+ h(ce, {
1253
+ submit: p,
1254
+ callback: l,
1255
+ class: "mn-thin"
1256
+ }, {
1257
+ default: x(() => [
1258
+ W("Save")
1259
+ ]),
1260
+ _: 1
1261
+ })
1262
+ ]));
1263
+ }
1264
+ }, Ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1265
+ __proto__: null,
1266
+ default: Da
1267
+ }, Symbol.toStringTag, { value: "Module" }));
1268
+ const Aa = { class: "for-transition bg-white radius-big w-100" }, Va = /* @__PURE__ */ a("header", { class: "flex-v-center flex-nowrap flex pd-semi" }, [
1269
+ /* @__PURE__ */ a("h2", { class: "mn-r-medium" }, "Weed dispensaries in Thailand")
1270
+ ], -1), Ia = { class: "pd-semi" }, Ua = {
1271
+ key: 1,
1272
+ class: "cols-3"
1273
+ }, Ba = ["onClick"], Ea = ["src"], ja = {
1274
+ key: 1,
1275
+ class: "radius-medium mn-small i-thin",
1276
+ width: "42",
1277
+ height: "42",
1278
+ viewBox: "0 0 42 42",
1279
+ fill: "none",
1280
+ xmlns: "http://www.w3.org/2000/svg"
1281
+ }, Ta = /* @__PURE__ */ a("circle", {
1282
+ fill: "rgb(var(--main))",
1283
+ cx: "21",
1284
+ cy: "21",
1285
+ r: "21"
1286
+ }, null, -1), Fa = /* @__PURE__ */ a("path", {
1287
+ fill: "#242424",
1288
+ "fill-opacity": "0.1",
1289
+ "fill-rule": "evenodd",
1290
+ "clip-rule": "evenodd",
1291
+ d: "M8.00233 37.4954C8.00078 37.4458 8 37.3961 8 37.3462C8 32.9066 11.5673 29.3077 15.9677 29.3077H26.0323C30.4328 29.3077 34 32.9066 34 37.3462C34 37.3961 33.9992 37.4458 33.9977 37.4954C30.4223 40.3165 25.9078 42 21 42C16.0922 42 11.5777 40.3164 8.00233 37.4954ZM21 9C16.5995 9 13.0323 12.5989 13.0323 17.0385C13.0323 21.478 16.5995 25.0769 21 25.0769C25.4005 25.0769 28.9677 21.478 28.9677 17.0385C28.9677 12.5989 25.4005 9 21 9Z"
1292
+ }, null, -1), qa = [
1293
+ Ta,
1294
+ Fa
1295
+ ], Ra = { class: "h4 mn-r-semi mn-small" }, Za = ["onClick"], Ha = /* @__PURE__ */ a("path", {
1296
+ fill: "black",
1297
+ d: "M6.41357 11.979C9.6831 11.979 12.3901 9.26611 12.3901 6.00244C12.3901 2.73291 9.67724 0.0258789 6.40771 0.0258789C3.14404 0.0258789 0.437008 2.73291 0.437008 6.00244C0.437008 9.26611 3.1499 11.979 6.41357 11.979ZM6.41357 10.9829C3.64795 10.9829 1.43896 8.76807 1.43896 6.00244C1.43896 3.23682 3.64209 1.02197 6.40771 1.02197C9.17334 1.02197 11.3882 3.23682 11.394 6.00244C11.3999 8.76807 9.1792 10.9829 6.41357 10.9829ZM8.72802 4.36182L9.1499 3.93408C9.3374 3.74072 9.35498 3.52979 9.1792 3.34814L9.04443 3.21924C8.86865 3.0376 8.65185 3.06104 8.46435 3.24854L8.03662 3.67041L8.72802 4.36182ZM4.53271 8.53955L8.37646 4.71338L7.68505 4.02197L3.84716 7.84814L3.51318 8.62158C3.45459 8.76807 3.59521 8.89697 3.72412 8.8501L4.53271 8.53955Z"
1298
+ }, null, -1), Na = [
1299
+ Ha
1300
+ ], Ka = { class: "t-black p-small" }, Si = {
1301
+ __name: "Organizations",
1302
+ async setup(e) {
1303
+ let t, s;
1304
+ S.user._id && ([t, s] = Y(() => R.read({ owner: S.user._id })), await t, s());
1305
+ const n = q(), d = F();
1306
+ let c = d.query.tab ? d.query.tab : "details";
1307
+ const p = v(c);
1308
+ return d.query.tab = p.value, T(p, (l) => {
1309
+ n.replace({ query: { ...d.query, tab: l } });
1310
+ }), (l, u) => (o(), r("div", Aa, [
1311
+ Va,
1312
+ a("div", Ia, [
1313
+ b.all.length < 1 ? (o(), $(fe, {
1314
+ key: 0,
1315
+ title: "You Haven't Joined Any Organization Yet",
1316
+ description: "Weeder is all about community. Join an organization or maybe you want to create your own?",
1317
+ action: "Create organization",
1318
+ callback: l.a = () => l.$router.push("/app/organization/create/details")
1319
+ }, null, 8, ["callback"])) : (o(), r("div", Ua, [
1320
+ (o(!0), r(O, null, L(b.all, (i) => (o(), r("div", {
1321
+ key: i._id,
1322
+ class: "mn-small radius-medium pd-medium br-2px br-solid br-grey",
1323
+ onClick: (m) => l.$router.push({ name: "Organization", params: { _id: i._id } })
1324
+ }, [
1325
+ i.profile.photo.length > 0 ? (o(), r("img", {
1326
+ key: 0,
1327
+ src: (l.FILE_SERVER_URL || "") + i.profile.photo,
1328
+ class: "radius-medium mn-small i-thin"
1329
+ }, null, 8, Ea)) : (o(), r("svg", ja, qa)),
1330
+ a("p", Ra, f(i.profile.name), 1),
1331
+ (o(), r("svg", {
1332
+ onClick: re((m) => l.$router.push({ name: "Organization Edit", params: { _id: i._id } }), ["stop"]),
1333
+ class: "t-transp hover-scale-1 z-index-1 pos-absolute pos-t-regular pos-r-regular i-medium",
1334
+ width: "13",
1335
+ height: "12",
1336
+ viewBox: "0 0 13 12",
1337
+ xmlns: "http://www.w3.org/2000/svg"
1338
+ }, Na, 8, Za)),
1339
+ a("p", Ka, f(i.profile.description.slice(0, 120) + "..."), 1)
1340
+ ], 8, Ba))), 128))
1341
+ ]))
1342
+ ])
1343
+ ]));
1344
+ }
1345
+ };
1346
+ const Wa = {
1347
+ key: 0,
1348
+ class: "t-transp mn-r-small"
1349
+ }, Ya = ["placeholder", "value"], Ja = {
1350
+ key: 0,
1351
+ class: "mn-t-thin invalid-feedback"
1352
+ }, Qa = {
1353
+ __name: "Address",
1354
+ props: {
1355
+ apiKey: {
1356
+ type: String,
1357
+ required: !0
1358
+ },
1359
+ label: null,
1360
+ placeholder: "Enter something here",
1361
+ field: null,
1362
+ location: {
1363
+ type: Object,
1364
+ default: { lat: 48.6900735, lng: 41.1620239 }
1365
+ },
1366
+ address: {
1367
+ type: String,
1368
+ default: ""
1369
+ }
1370
+ },
1371
+ emits: ["update:address", "update:location", "update:country", "update:state", "update:city"],
1372
+ setup(e, { emit: t }) {
1373
+ const s = e, n = v(null);
1374
+ let d;
1375
+ const c = () => {
1376
+ d = new google.maps.places.Autocomplete(n.value), d.addListener("place_changed", l);
1377
+ }, p = () => {
1378
+ d || c();
1379
+ }, l = () => {
1380
+ const u = d.getPlace();
1381
+ if (!u.geometry || !u.address_components)
1382
+ return;
1383
+ let i = "", m = "", w = "";
1384
+ for (let N = 0; N < u.address_components.length; N++) {
1385
+ console.log(u.address_components);
1386
+ let M = u.address_components[N];
1387
+ M.types.includes("country") && (i = M.long_name), M.types.includes("administrative_area_level_1") && (m = M.long_name), M.types.includes("locality") && (w = M.long_name);
1388
+ }
1389
+ const P = u.formatted_address, I = { lat: u.geometry.location.lat(), lng: u.geometry.location.lng() };
1390
+ t("update:address", P), t("update:location", I), t("update:country", i), t("update:state", m), t("update:city", w);
1391
+ };
1392
+ return de(() => {
1393
+ s.address !== n.value && (n.value = s.address);
1394
+ }), pe(() => {
1395
+ c();
1396
+ }), (u, i) => (o(), r("div", {
1397
+ class: te([u.$attrs.class, "flex-nowrap flex"])
1398
+ }, [
1399
+ e.label ? (o(), r("div", Wa, [
1400
+ a("span", null, f(e.label), 1)
1401
+ ])) : g("", !0),
1402
+ a("input", {
1403
+ ref_key: "addressInput",
1404
+ ref: n,
1405
+ class: "w-100",
1406
+ placeholder: e.placeholder,
1407
+ value: e.address,
1408
+ onInput: p
1409
+ }, null, 40, Ya),
1410
+ h(H, {
1411
+ mode: "out-in",
1412
+ name: "fade"
1413
+ }, {
1414
+ default: x(() => [
1415
+ u.validation ? (o(), r("div", Ja, " * " + f(u.validation.message), 1)) : g("", !0)
1416
+ ]),
1417
+ _: 1
1418
+ })
1419
+ ], 2));
1420
+ }
1421
+ }, Xa = /* @__PURE__ */ A(Qa, [["__scopeId", "data-v-faece1a6"]]);
1422
+ const Ga = (e) => (me("data-v-1c7971e5"), e = e(), he(), e), en = { class: "map-container" }, tn = /* @__PURE__ */ Ga(() => /* @__PURE__ */ a("svg", {
1423
+ class: "i-medium",
1424
+ width: "98",
1425
+ height: "98",
1426
+ viewBox: "0 0 98 98",
1427
+ fill: "none",
1428
+ xmlns: "http://www.w3.org/2000/svg"
1429
+ }, [
1430
+ /* @__PURE__ */ a("path", {
1431
+ d: "M50.0004 31.4995C39.7996 31.4995 31.5 39.7991 31.5 49.9999C31.5 60.2007 39.7996 68.5003 50.0004 68.5003C60.2012 68.5003 68.5008 60.2007 68.5008 49.9999C68.5008 39.7991 60.2012 31.4995 50.0004 31.4995ZM50.0004 63.7944C42.3941 63.7944 36.2059 57.6062 36.2059 49.9999C36.2059 42.3936 42.3941 36.2054 50.0004 36.2054C57.6067 36.2054 63.7949 42.3936 63.7949 49.9999C63.7949 57.6062 57.6067 63.7944 50.0004 63.7944Z",
1432
+ fill: "white"
1433
+ }),
1434
+ /* @__PURE__ */ a("path", {
1435
+ d: "M97.6471 47.6471H84.56C83.3977 30.4141 69.5859 16.6024 52.3529 15.44V2.35294C52.3529 1.05255 51.2988 0 50 0C48.6996 0 47.6471 1.05255 47.6471 2.35294V15.44C30.4141 16.6024 16.6024 30.4141 15.44 47.6471H2.35294C1.05255 47.6471 0 48.6996 0 50C0 51.2988 1.05255 52.3529 2.35294 52.3529H15.44C16.6024 69.5859 30.4141 83.3977 47.6471 84.56V97.6471C47.6471 98.9459 48.6996 100 50 100C51.2988 100 52.3529 98.9459 52.3529 97.6471V84.56C69.5859 83.3977 83.3977 69.5859 84.56 52.3529H97.6471C98.9459 52.3529 100 51.2988 100 50C100 48.6996 98.9459 47.6471 97.6471 47.6471ZM50 79.9435C33.4886 79.9435 20.0565 66.5114 20.0565 50C20.0565 33.4886 33.4886 20.0565 50 20.0565C66.5098 20.0565 79.9435 33.4886 79.9435 50C79.9435 66.5098 66.5098 79.9435 50 79.9435Z",
1436
+ fill: "white"
1437
+ })
1438
+ ], -1)), sn = [
1439
+ tn
1440
+ ], an = {
1441
+ __name: "LocationMarker",
1442
+ props: {
1443
+ location: {
1444
+ type: Object,
1445
+ default: { lat: 48.6900735, lng: 41.1620239 }
1446
+ },
1447
+ address: {
1448
+ type: String,
1449
+ default: ""
1450
+ },
1451
+ apiKey: String
1452
+ },
1453
+ emits: ["update:location", "update:address", "update:country", "update:state", "update:city"],
1454
+ setup(e, { emit: t }) {
1455
+ const s = e, n = v(null);
1456
+ let d, c;
1457
+ pe(() => {
1458
+ d = new google.maps.Map(n.value, {
1459
+ center: s.location,
1460
+ zoom: 15,
1461
+ mapTypeControl: !1,
1462
+ fullscreenControl: !1
1463
+ }), c = new google.maps.Marker({
1464
+ position: s.location,
1465
+ map: d,
1466
+ draggable: !0
1467
+ }), c.addListener("dragend", (u) => {
1468
+ const i = { lat: u.latLng.lat(), lng: u.latLng.lng() };
1469
+ t("update:location", i), p(i);
1470
+ });
1471
+ }), de(() => {
1472
+ s.location && c && c.setPosition(new google.maps.LatLng(s.location.lat, s.location.lng));
1473
+ }), de(() => {
1474
+ if (s.location && d) {
1475
+ const u = new google.maps.LatLng(s.location.lat, s.location.lng);
1476
+ d.setCenter(u);
1477
+ }
1478
+ });
1479
+ function p(u) {
1480
+ new google.maps.Geocoder().geocode({ location: u }, (m, w) => {
1481
+ if (w === "OK")
1482
+ if (m[0]) {
1483
+ t("update:address", m[0].formatted_address);
1484
+ let P = "", I = "", N = "";
1485
+ m[0].address_components.forEach((M) => {
1486
+ M.types.includes("country") && (P = M.long_name), M.types.includes("administrative_area_level_1") && (I = M.long_name), M.types.includes("locality") && (N = M.long_name);
1487
+ }), t("update:country", P), t("update:state", I), t("update:city", N);
1488
+ } else
1489
+ console.error("No results found");
1490
+ else
1491
+ console.error("Geocoder failed due to: " + w);
1492
+ });
1493
+ }
1494
+ async function l() {
1495
+ navigator.geolocation ? navigator.geolocation.getCurrentPosition((u) => {
1496
+ const i = { lat: u.coords.latitude, lng: u.coords.longitude };
1497
+ t("update:location", i), p(i);
1498
+ }, () => {
1499
+ console.error("Error getting location");
1500
+ }) : console.error("Geolocation is not supported by this browser.");
1501
+ }
1502
+ return (u, i) => (o(), r("div", en, [
1503
+ a("div", {
1504
+ ref_key: "mapContainer",
1505
+ ref: n,
1506
+ class: "w-100 h-100"
1507
+ }, null, 512),
1508
+ a("button", {
1509
+ class: "pos-absolute pos-t-regular pos-r-regular i-semi bg-second radius-extra",
1510
+ onClick: l
1511
+ }, sn)
1512
+ ]));
1513
+ }
1514
+ }, nn = /* @__PURE__ */ A(an, [["__scopeId", "data-v-1c7971e5"]]);
1515
+ var on = Object.defineProperty, ln = Object.defineProperties, rn = Object.getOwnPropertyDescriptors, ke = Object.getOwnPropertySymbols, dn = Object.prototype.hasOwnProperty, cn = Object.prototype.propertyIsEnumerable, xe = (e, t, s) => t in e ? on(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, X = (e, t) => {
1516
+ for (var s in t || (t = {}))
1517
+ dn.call(t, s) && xe(e, s, t[s]);
1518
+ if (ke)
1519
+ for (var s of ke(t))
1520
+ cn.call(t, s) && xe(e, s, t[s]);
1521
+ return e;
1522
+ }, Oe = (e, t) => ln(e, rn(t));
1523
+ const un = {
1524
+ props: {
1525
+ autoscroll: {
1526
+ type: Boolean,
1527
+ default: !0
1528
+ }
1529
+ },
1530
+ watch: {
1531
+ typeAheadPointer() {
1532
+ this.autoscroll && this.maybeAdjustScroll();
1533
+ },
1534
+ open(e) {
1535
+ this.autoscroll && e && this.$nextTick(() => this.maybeAdjustScroll());
1536
+ }
1537
+ },
1538
+ methods: {
1539
+ maybeAdjustScroll() {
1540
+ var e;
1541
+ const t = ((e = this.$refs.dropdownMenu) == null ? void 0 : e.children[this.typeAheadPointer]) || !1;
1542
+ if (t) {
1543
+ const s = this.getDropdownViewport(), { top: n, bottom: d, height: c } = t.getBoundingClientRect();
1544
+ if (n < s.top)
1545
+ return this.$refs.dropdownMenu.scrollTop = t.offsetTop;
1546
+ if (d > s.bottom)
1547
+ return this.$refs.dropdownMenu.scrollTop = t.offsetTop - (s.height - c);
1548
+ }
1549
+ },
1550
+ getDropdownViewport() {
1551
+ return this.$refs.dropdownMenu ? this.$refs.dropdownMenu.getBoundingClientRect() : {
1552
+ height: 0,
1553
+ top: 0,
1554
+ bottom: 0
1555
+ };
1556
+ }
1557
+ }
1558
+ }, pn = {
1559
+ data() {
1560
+ return {
1561
+ typeAheadPointer: -1
1562
+ };
1563
+ },
1564
+ watch: {
1565
+ filteredOptions() {
1566
+ for (let e = 0; e < this.filteredOptions.length; e++)
1567
+ if (this.selectable(this.filteredOptions[e])) {
1568
+ this.typeAheadPointer = e;
1569
+ break;
1570
+ }
1571
+ },
1572
+ open(e) {
1573
+ e && this.typeAheadToLastSelected();
1574
+ },
1575
+ selectedValue() {
1576
+ this.open && this.typeAheadToLastSelected();
1577
+ }
1578
+ },
1579
+ methods: {
1580
+ typeAheadUp() {
1581
+ for (let e = this.typeAheadPointer - 1; e >= 0; e--)
1582
+ if (this.selectable(this.filteredOptions[e])) {
1583
+ this.typeAheadPointer = e;
1584
+ break;
1585
+ }
1586
+ },
1587
+ typeAheadDown() {
1588
+ for (let e = this.typeAheadPointer + 1; e < this.filteredOptions.length; e++)
1589
+ if (this.selectable(this.filteredOptions[e])) {
1590
+ this.typeAheadPointer = e;
1591
+ break;
1592
+ }
1593
+ },
1594
+ typeAheadSelect() {
1595
+ const e = this.filteredOptions[this.typeAheadPointer];
1596
+ e && this.selectable(e) && this.select(e);
1597
+ },
1598
+ typeAheadToLastSelected() {
1599
+ this.typeAheadPointer = this.selectedValue.length !== 0 ? this.filteredOptions.indexOf(this.selectedValue[this.selectedValue.length - 1]) : -1;
1600
+ }
1601
+ }
1602
+ }, mn = {
1603
+ props: {
1604
+ loading: {
1605
+ type: Boolean,
1606
+ default: !1
1607
+ }
1608
+ },
1609
+ data() {
1610
+ return {
1611
+ mutableLoading: !1
1612
+ };
1613
+ },
1614
+ watch: {
1615
+ search() {
1616
+ this.$emit("search", this.search, this.toggleLoading);
1617
+ },
1618
+ loading(e) {
1619
+ this.mutableLoading = e;
1620
+ }
1621
+ },
1622
+ methods: {
1623
+ toggleLoading(e = null) {
1624
+ return e == null ? this.mutableLoading = !this.mutableLoading : this.mutableLoading = e;
1625
+ }
1626
+ }
1627
+ }, be = (e, t) => {
1628
+ const s = e.__vccOpts || e;
1629
+ for (const [n, d] of t)
1630
+ s[n] = d;
1631
+ return s;
1632
+ }, hn = {}, _n = {
1633
+ xmlns: "http://www.w3.org/2000/svg",
1634
+ width: "10",
1635
+ height: "10"
1636
+ }, fn = /* @__PURE__ */ a("path", { d: "M6.895455 5l2.842897-2.842898c.348864-.348863.348864-.914488 0-1.263636L9.106534.261648c-.348864-.348864-.914489-.348864-1.263636 0L5 3.104545 2.157102.261648c-.348863-.348864-.914488-.348864-1.263636 0L.261648.893466c-.348864.348864-.348864.914489 0 1.263636L3.104545 5 .261648 7.842898c-.348864.348863-.348864.914488 0 1.263636l.631818.631818c.348864.348864.914773.348864 1.263636 0L5 6.895455l2.842898 2.842897c.348863.348864.914772.348864 1.263636 0l.631818-.631818c.348864-.348864.348864-.914489 0-1.263636L6.895455 5z" }, null, -1), gn = [
1637
+ fn
1638
+ ];
1639
+ function bn(e, t) {
1640
+ return o(), r("svg", _n, gn);
1641
+ }
1642
+ const vn = /* @__PURE__ */ be(hn, [["render", bn]]), yn = {}, wn = {
1643
+ xmlns: "http://www.w3.org/2000/svg",
1644
+ width: "14",
1645
+ height: "10"
1646
+ }, $n = /* @__PURE__ */ a("path", { d: "M9.211364 7.59931l4.48338-4.867229c.407008-.441854.407008-1.158247 0-1.60046l-.73712-.80023c-.407008-.441854-1.066904-.441854-1.474243 0L7 5.198617 2.51662.33139c-.407008-.441853-1.066904-.441853-1.474243 0l-.737121.80023c-.407008.441854-.407008 1.158248 0 1.600461l4.48338 4.867228L7 10l2.211364-2.40069z" }, null, -1), Cn = [
1647
+ $n
1648
+ ];
1649
+ function kn(e, t) {
1650
+ return o(), r("svg", wn, Cn);
1651
+ }
1652
+ const xn = /* @__PURE__ */ be(yn, [["render", kn]]), Le = {
1653
+ Deselect: vn,
1654
+ OpenIndicator: xn
1655
+ }, On = {
1656
+ mounted(e, { instance: t }) {
1657
+ if (t.appendToBody) {
1658
+ const {
1659
+ height: s,
1660
+ top: n,
1661
+ left: d,
1662
+ width: c
1663
+ } = t.$refs.toggle.getBoundingClientRect();
1664
+ let p = window.scrollX || window.pageXOffset, l = window.scrollY || window.pageYOffset;
1665
+ e.unbindPosition = t.calculatePosition(e, t, {
1666
+ width: c + "px",
1667
+ left: p + d + "px",
1668
+ top: l + n + s + "px"
1669
+ }), document.body.appendChild(e);
1670
+ }
1671
+ },
1672
+ unmounted(e, { instance: t }) {
1673
+ t.appendToBody && (e.unbindPosition && typeof e.unbindPosition == "function" && e.unbindPosition(), e.parentNode && e.parentNode.removeChild(e));
1674
+ }
1675
+ };
1676
+ function Ln(e) {
1677
+ const t = {};
1678
+ return Object.keys(e).sort().forEach((s) => {
1679
+ t[s] = e[s];
1680
+ }), JSON.stringify(t);
1681
+ }
1682
+ let Sn = 0;
1683
+ function Pn() {
1684
+ return ++Sn;
1685
+ }
1686
+ const zn = {
1687
+ components: X({}, Le),
1688
+ directives: { appendToBody: On },
1689
+ mixins: [un, pn, mn],
1690
+ compatConfig: {
1691
+ MODE: 3
1692
+ },
1693
+ emits: [
1694
+ "open",
1695
+ "close",
1696
+ "update:modelValue",
1697
+ "search",
1698
+ "search:compositionstart",
1699
+ "search:compositionend",
1700
+ "search:keydown",
1701
+ "search:blur",
1702
+ "search:focus",
1703
+ "search:input",
1704
+ "option:created",
1705
+ "option:selecting",
1706
+ "option:selected",
1707
+ "option:deselecting",
1708
+ "option:deselected"
1709
+ ],
1710
+ props: {
1711
+ modelValue: {},
1712
+ components: {
1713
+ type: Object,
1714
+ default: () => ({})
1715
+ },
1716
+ options: {
1717
+ type: Array,
1718
+ default() {
1719
+ return [];
1720
+ }
1721
+ },
1722
+ disabled: {
1723
+ type: Boolean,
1724
+ default: !1
1725
+ },
1726
+ clearable: {
1727
+ type: Boolean,
1728
+ default: !0
1729
+ },
1730
+ deselectFromDropdown: {
1731
+ type: Boolean,
1732
+ default: !1
1733
+ },
1734
+ searchable: {
1735
+ type: Boolean,
1736
+ default: !0
1737
+ },
1738
+ multiple: {
1739
+ type: Boolean,
1740
+ default: !1
1741
+ },
1742
+ placeholder: {
1743
+ type: String,
1744
+ default: ""
1745
+ },
1746
+ transition: {
1747
+ type: String,
1748
+ default: "vs__fade"
1749
+ },
1750
+ clearSearchOnSelect: {
1751
+ type: Boolean,
1752
+ default: !0
1753
+ },
1754
+ closeOnSelect: {
1755
+ type: Boolean,
1756
+ default: !0
1757
+ },
1758
+ label: {
1759
+ type: String,
1760
+ default: "label"
1761
+ },
1762
+ autocomplete: {
1763
+ type: String,
1764
+ default: "off"
1765
+ },
1766
+ reduce: {
1767
+ type: Function,
1768
+ default: (e) => e
1769
+ },
1770
+ selectable: {
1771
+ type: Function,
1772
+ default: (e) => !0
1773
+ },
1774
+ getOptionLabel: {
1775
+ type: Function,
1776
+ default(e) {
1777
+ return typeof e == "object" ? e.hasOwnProperty(this.label) ? e[this.label] : console.warn(`[vue-select warn]: Label key "option.${this.label}" does not exist in options object ${JSON.stringify(e)}.
1778
+ https://vue-select.org/api/props.html#getoptionlabel`) : e;
1779
+ }
1780
+ },
1781
+ getOptionKey: {
1782
+ type: Function,
1783
+ default(e) {
1784
+ if (typeof e != "object")
1785
+ return e;
1786
+ try {
1787
+ return e.hasOwnProperty("id") ? e.id : Ln(e);
1788
+ } catch (t) {
1789
+ return console.warn(`[vue-select warn]: Could not stringify this option to generate unique key. Please provide'getOptionKey' prop to return a unique key for each option.
1790
+ https://vue-select.org/api/props.html#getoptionkey`, e, t);
1791
+ }
1792
+ }
1793
+ },
1794
+ onTab: {
1795
+ type: Function,
1796
+ default: function() {
1797
+ this.selectOnTab && !this.isComposing && this.typeAheadSelect();
1798
+ }
1799
+ },
1800
+ taggable: {
1801
+ type: Boolean,
1802
+ default: !1
1803
+ },
1804
+ tabindex: {
1805
+ type: Number,
1806
+ default: null
1807
+ },
1808
+ pushTags: {
1809
+ type: Boolean,
1810
+ default: !1
1811
+ },
1812
+ filterable: {
1813
+ type: Boolean,
1814
+ default: !0
1815
+ },
1816
+ filterBy: {
1817
+ type: Function,
1818
+ default(e, t, s) {
1819
+ return (t || "").toLocaleLowerCase().indexOf(s.toLocaleLowerCase()) > -1;
1820
+ }
1821
+ },
1822
+ filter: {
1823
+ type: Function,
1824
+ default(e, t) {
1825
+ return e.filter((s) => {
1826
+ let n = this.getOptionLabel(s);
1827
+ return typeof n == "number" && (n = n.toString()), this.filterBy(s, n, t);
1828
+ });
1829
+ }
1830
+ },
1831
+ createOption: {
1832
+ type: Function,
1833
+ default(e) {
1834
+ return typeof this.optionList[0] == "object" ? { [this.label]: e } : e;
1835
+ }
1836
+ },
1837
+ resetOnOptionsChange: {
1838
+ default: !1,
1839
+ validator: (e) => ["function", "boolean"].includes(typeof e)
1840
+ },
1841
+ clearSearchOnBlur: {
1842
+ type: Function,
1843
+ default: function({ clearSearchOnSelect: e, multiple: t }) {
1844
+ return e && !t;
1845
+ }
1846
+ },
1847
+ noDrop: {
1848
+ type: Boolean,
1849
+ default: !1
1850
+ },
1851
+ inputId: {
1852
+ type: String
1853
+ },
1854
+ dir: {
1855
+ type: String,
1856
+ default: "auto"
1857
+ },
1858
+ selectOnTab: {
1859
+ type: Boolean,
1860
+ default: !1
1861
+ },
1862
+ selectOnKeyCodes: {
1863
+ type: Array,
1864
+ default: () => [13]
1865
+ },
1866
+ searchInputQuerySelector: {
1867
+ type: String,
1868
+ default: "[type=search]"
1869
+ },
1870
+ mapKeydown: {
1871
+ type: Function,
1872
+ default: (e, t) => e
1873
+ },
1874
+ appendToBody: {
1875
+ type: Boolean,
1876
+ default: !1
1877
+ },
1878
+ calculatePosition: {
1879
+ type: Function,
1880
+ default(e, t, { width: s, top: n, left: d }) {
1881
+ e.style.top = n, e.style.left = d, e.style.width = s;
1882
+ }
1883
+ },
1884
+ dropdownShouldOpen: {
1885
+ type: Function,
1886
+ default({ noDrop: e, open: t, mutableLoading: s }) {
1887
+ return e ? !1 : t && !s;
1888
+ }
1889
+ },
1890
+ uid: {
1891
+ type: [String, Number],
1892
+ default: () => Pn()
1893
+ }
1894
+ },
1895
+ data() {
1896
+ return {
1897
+ search: "",
1898
+ open: !1,
1899
+ isComposing: !1,
1900
+ pushedTags: [],
1901
+ _value: [],
1902
+ deselectButtons: []
1903
+ };
1904
+ },
1905
+ computed: {
1906
+ isReducingValues() {
1907
+ return this.$props.reduce !== this.$options.props.reduce.default;
1908
+ },
1909
+ isTrackingValues() {
1910
+ return typeof this.modelValue > "u" || this.isReducingValues;
1911
+ },
1912
+ selectedValue() {
1913
+ let e = this.modelValue;
1914
+ return this.isTrackingValues && (e = this.$data._value), e != null && e !== "" ? [].concat(e) : [];
1915
+ },
1916
+ optionList() {
1917
+ return this.options.concat(this.pushTags ? this.pushedTags : []);
1918
+ },
1919
+ searchEl() {
1920
+ return this.$slots.search ? this.$refs.selectedOptions.querySelector(this.searchInputQuerySelector) : this.$refs.search;
1921
+ },
1922
+ scope() {
1923
+ const e = {
1924
+ search: this.search,
1925
+ loading: this.loading,
1926
+ searching: this.searching,
1927
+ filteredOptions: this.filteredOptions
1928
+ };
1929
+ return {
1930
+ search: {
1931
+ attributes: X({
1932
+ disabled: this.disabled,
1933
+ placeholder: this.searchPlaceholder,
1934
+ tabindex: this.tabindex,
1935
+ readonly: !this.searchable,
1936
+ id: this.inputId,
1937
+ "aria-autocomplete": "list",
1938
+ "aria-labelledby": `vs${this.uid}__combobox`,
1939
+ "aria-controls": `vs${this.uid}__listbox`,
1940
+ ref: "search",
1941
+ type: "search",
1942
+ autocomplete: this.autocomplete,
1943
+ value: this.search
1944
+ }, this.dropdownOpen && this.filteredOptions[this.typeAheadPointer] ? {
1945
+ "aria-activedescendant": `vs${this.uid}__option-${this.typeAheadPointer}`
1946
+ } : {}),
1947
+ events: {
1948
+ compositionstart: () => this.isComposing = !0,
1949
+ compositionend: () => this.isComposing = !1,
1950
+ keydown: this.onSearchKeyDown,
1951
+ blur: this.onSearchBlur,
1952
+ focus: this.onSearchFocus,
1953
+ input: (t) => this.search = t.target.value
1954
+ }
1955
+ },
1956
+ spinner: {
1957
+ loading: this.mutableLoading
1958
+ },
1959
+ noOptions: {
1960
+ search: this.search,
1961
+ loading: this.mutableLoading,
1962
+ searching: this.searching
1963
+ },
1964
+ openIndicator: {
1965
+ attributes: {
1966
+ ref: "openIndicator",
1967
+ role: "presentation",
1968
+ class: "vs__open-indicator"
1969
+ }
1970
+ },
1971
+ listHeader: e,
1972
+ listFooter: e,
1973
+ header: Oe(X({}, e), { deselect: this.deselect }),
1974
+ footer: Oe(X({}, e), { deselect: this.deselect })
1975
+ };
1976
+ },
1977
+ childComponents() {
1978
+ return X(X({}, Le), this.components);
1979
+ },
1980
+ stateClasses() {
1981
+ return {
1982
+ "vs--open": this.dropdownOpen,
1983
+ "vs--single": !this.multiple,
1984
+ "vs--multiple": this.multiple,
1985
+ "vs--searching": this.searching && !this.noDrop,
1986
+ "vs--searchable": this.searchable && !this.noDrop,
1987
+ "vs--unsearchable": !this.searchable,
1988
+ "vs--loading": this.mutableLoading,
1989
+ "vs--disabled": this.disabled
1990
+ };
1991
+ },
1992
+ searching() {
1993
+ return !!this.search;
1994
+ },
1995
+ dropdownOpen() {
1996
+ return this.dropdownShouldOpen(this);
1997
+ },
1998
+ searchPlaceholder() {
1999
+ return this.isValueEmpty && this.placeholder ? this.placeholder : void 0;
2000
+ },
2001
+ filteredOptions() {
2002
+ const e = [].concat(this.optionList);
2003
+ if (!this.filterable && !this.taggable)
2004
+ return e;
2005
+ const t = this.search.length ? this.filter(e, this.search, this) : e;
2006
+ if (this.taggable && this.search.length) {
2007
+ const s = this.createOption(this.search);
2008
+ this.optionExists(s) || t.unshift(s);
2009
+ }
2010
+ return t;
2011
+ },
2012
+ isValueEmpty() {
2013
+ return this.selectedValue.length === 0;
2014
+ },
2015
+ showClearButton() {
2016
+ return !this.multiple && this.clearable && !this.open && !this.isValueEmpty;
2017
+ }
2018
+ },
2019
+ watch: {
2020
+ options(e, t) {
2021
+ const s = () => typeof this.resetOnOptionsChange == "function" ? this.resetOnOptionsChange(e, t, this.selectedValue) : this.resetOnOptionsChange;
2022
+ !this.taggable && s() && this.clearSelection(), this.modelValue && this.isTrackingValues && this.setInternalValueFromOptions(this.modelValue);
2023
+ },
2024
+ modelValue: {
2025
+ immediate: !0,
2026
+ handler(e) {
2027
+ this.isTrackingValues && this.setInternalValueFromOptions(e);
2028
+ }
2029
+ },
2030
+ multiple() {
2031
+ this.clearSelection();
2032
+ },
2033
+ open(e) {
2034
+ this.$emit(e ? "open" : "close");
2035
+ }
2036
+ },
2037
+ created() {
2038
+ this.mutableLoading = this.loading;
2039
+ },
2040
+ methods: {
2041
+ setInternalValueFromOptions(e) {
2042
+ Array.isArray(e) ? this.$data._value = e.map((t) => this.findOptionFromReducedValue(t)) : this.$data._value = this.findOptionFromReducedValue(e);
2043
+ },
2044
+ select(e) {
2045
+ this.$emit("option:selecting", e), this.isOptionSelected(e) ? this.deselectFromDropdown && (this.clearable || this.multiple && this.selectedValue.length > 1) && this.deselect(e) : (this.taggable && !this.optionExists(e) && (this.$emit("option:created", e), this.pushTag(e)), this.multiple && (e = this.selectedValue.concat(e)), this.updateValue(e), this.$emit("option:selected", e)), this.onAfterSelect(e);
2046
+ },
2047
+ deselect(e) {
2048
+ this.$emit("option:deselecting", e), this.updateValue(this.selectedValue.filter((t) => !this.optionComparator(t, e))), this.$emit("option:deselected", e);
2049
+ },
2050
+ clearSelection() {
2051
+ this.updateValue(this.multiple ? [] : null);
2052
+ },
2053
+ onAfterSelect(e) {
2054
+ this.closeOnSelect && (this.open = !this.open, this.searchEl.blur()), this.clearSearchOnSelect && (this.search = "");
2055
+ },
2056
+ updateValue(e) {
2057
+ typeof this.modelValue > "u" && (this.$data._value = e), e !== null && (Array.isArray(e) ? e = e.map((t) => this.reduce(t)) : e = this.reduce(e)), this.$emit("update:modelValue", e);
2058
+ },
2059
+ toggleDropdown(e) {
2060
+ const t = e.target !== this.searchEl;
2061
+ t && e.preventDefault();
2062
+ const s = [
2063
+ ...this.deselectButtons || [],
2064
+ this.$refs.clearButton
2065
+ ];
2066
+ if (this.searchEl === void 0 || s.filter(Boolean).some((n) => n.contains(e.target) || n === e.target)) {
2067
+ e.preventDefault();
2068
+ return;
2069
+ }
2070
+ this.open && t ? this.searchEl.blur() : this.disabled || (this.open = !0, this.searchEl.focus());
2071
+ },
2072
+ isOptionSelected(e) {
2073
+ return this.selectedValue.some((t) => this.optionComparator(t, e));
2074
+ },
2075
+ isOptionDeselectable(e) {
2076
+ return this.isOptionSelected(e) && this.deselectFromDropdown;
2077
+ },
2078
+ optionComparator(e, t) {
2079
+ return this.getOptionKey(e) === this.getOptionKey(t);
2080
+ },
2081
+ findOptionFromReducedValue(e) {
2082
+ const t = (n) => JSON.stringify(this.reduce(n)) === JSON.stringify(e), s = [...this.options, ...this.pushedTags].filter(t);
2083
+ return s.length === 1 ? s[0] : s.find((n) => this.optionComparator(n, this.$data._value)) || e;
2084
+ },
2085
+ closeSearchOptions() {
2086
+ this.open = !1, this.$emit("search:blur");
2087
+ },
2088
+ maybeDeleteValue() {
2089
+ if (!this.searchEl.value.length && this.selectedValue && this.selectedValue.length && this.clearable) {
2090
+ let e = null;
2091
+ this.multiple && (e = [
2092
+ ...this.selectedValue.slice(0, this.selectedValue.length - 1)
2093
+ ]), this.updateValue(e);
2094
+ }
2095
+ },
2096
+ optionExists(e) {
2097
+ return this.optionList.some((t) => this.optionComparator(t, e));
2098
+ },
2099
+ normalizeOptionForSlot(e) {
2100
+ return typeof e == "object" ? e : { [this.label]: e };
2101
+ },
2102
+ pushTag(e) {
2103
+ this.pushedTags.push(e);
2104
+ },
2105
+ onEscape() {
2106
+ this.search.length ? this.search = "" : this.searchEl.blur();
2107
+ },
2108
+ onSearchBlur() {
2109
+ if (this.mousedown && !this.searching)
2110
+ this.mousedown = !1;
2111
+ else {
2112
+ const { clearSearchOnSelect: e, multiple: t } = this;
2113
+ this.clearSearchOnBlur({ clearSearchOnSelect: e, multiple: t }) && (this.search = ""), this.closeSearchOptions();
2114
+ return;
2115
+ }
2116
+ if (this.search.length === 0 && this.options.length === 0) {
2117
+ this.closeSearchOptions();
2118
+ return;
2119
+ }
2120
+ },
2121
+ onSearchFocus() {
2122
+ this.open = !0, this.$emit("search:focus");
2123
+ },
2124
+ onMousedown() {
2125
+ this.mousedown = !0;
2126
+ },
2127
+ onMouseUp() {
2128
+ this.mousedown = !1;
2129
+ },
2130
+ onSearchKeyDown(e) {
2131
+ const t = (d) => (d.preventDefault(), !this.isComposing && this.typeAheadSelect()), s = {
2132
+ 8: (d) => this.maybeDeleteValue(),
2133
+ 9: (d) => this.onTab(),
2134
+ 27: (d) => this.onEscape(),
2135
+ 38: (d) => (d.preventDefault(), this.typeAheadUp()),
2136
+ 40: (d) => (d.preventDefault(), this.typeAheadDown())
2137
+ };
2138
+ this.selectOnKeyCodes.forEach((d) => s[d] = t);
2139
+ const n = this.mapKeydown(s, this);
2140
+ if (typeof n[e.keyCode] == "function")
2141
+ return n[e.keyCode](e);
2142
+ }
2143
+ }
2144
+ }, Mn = ["dir"], Dn = ["id", "aria-expanded", "aria-owns"], An = {
2145
+ ref: "selectedOptions",
2146
+ class: "vs__selected-options"
2147
+ }, Vn = ["disabled", "title", "aria-label", "onClick"], In = {
2148
+ ref: "actions",
2149
+ class: "vs__actions"
2150
+ }, Un = ["disabled"], Bn = { class: "vs__spinner" }, En = ["id"], jn = ["id", "aria-selected", "onMouseover", "onClick"], Tn = {
2151
+ key: 0,
2152
+ class: "vs__no-options"
2153
+ }, Fn = /* @__PURE__ */ W(" Sorry, no matching options. "), qn = ["id"];
2154
+ function Rn(e, t, s, n, d, c) {
2155
+ const p = Ie("append-to-body");
2156
+ return o(), r("div", {
2157
+ dir: s.dir,
2158
+ class: te(["v-select", c.stateClasses])
2159
+ }, [
2160
+ z(e.$slots, "header", V(U(c.scope.header))),
2161
+ a("div", {
2162
+ id: `vs${s.uid}__combobox`,
2163
+ ref: "toggle",
2164
+ class: "vs__dropdown-toggle",
2165
+ role: "combobox",
2166
+ "aria-expanded": c.dropdownOpen.toString(),
2167
+ "aria-owns": `vs${s.uid}__listbox`,
2168
+ "aria-label": "Search for option",
2169
+ onMousedown: t[1] || (t[1] = (l) => c.toggleDropdown(l))
2170
+ }, [
2171
+ a("div", An, [
2172
+ (o(!0), r(O, null, L(c.selectedValue, (l, u) => z(e.$slots, "selected-option-container", {
2173
+ option: c.normalizeOptionForSlot(l),
2174
+ deselect: c.deselect,
2175
+ multiple: s.multiple,
2176
+ disabled: s.disabled
2177
+ }, () => [
2178
+ (o(), r("span", {
2179
+ key: s.getOptionKey(l),
2180
+ class: "vs__selected"
2181
+ }, [
2182
+ z(e.$slots, "selected-option", V(U(c.normalizeOptionForSlot(l))), () => [
2183
+ W(f(s.getOptionLabel(l)), 1)
2184
+ ]),
2185
+ s.multiple ? (o(), r("button", {
2186
+ key: 0,
2187
+ ref_for: !0,
2188
+ ref: (i) => d.deselectButtons[u] = i,
2189
+ disabled: s.disabled,
2190
+ type: "button",
2191
+ class: "vs__deselect",
2192
+ title: `Deselect ${s.getOptionLabel(l)}`,
2193
+ "aria-label": `Deselect ${s.getOptionLabel(l)}`,
2194
+ onClick: (i) => c.deselect(l)
2195
+ }, [
2196
+ (o(), $(le(c.childComponents.Deselect)))
2197
+ ], 8, Vn)) : g("", !0)
2198
+ ]))
2199
+ ])), 256)),
2200
+ z(e.$slots, "search", V(U(c.scope.search)), () => [
2201
+ a("input", ve({ class: "vs__search" }, c.scope.search.attributes, Ue(c.scope.search.events)), null, 16)
2202
+ ])
2203
+ ], 512),
2204
+ a("div", In, [
2205
+ ae(a("button", {
2206
+ ref: "clearButton",
2207
+ disabled: s.disabled,
2208
+ type: "button",
2209
+ class: "vs__clear",
2210
+ title: "Clear Selected",
2211
+ "aria-label": "Clear Selected",
2212
+ onClick: t[0] || (t[0] = (...l) => c.clearSelection && c.clearSelection(...l))
2213
+ }, [
2214
+ (o(), $(le(c.childComponents.Deselect)))
2215
+ ], 8, Un), [
2216
+ [ye, c.showClearButton]
2217
+ ]),
2218
+ z(e.$slots, "open-indicator", V(U(c.scope.openIndicator)), () => [
2219
+ s.noDrop ? g("", !0) : (o(), $(le(c.childComponents.OpenIndicator), V(ve({ key: 0 }, c.scope.openIndicator.attributes)), null, 16))
2220
+ ]),
2221
+ z(e.$slots, "spinner", V(U(c.scope.spinner)), () => [
2222
+ ae(a("div", Bn, "Loading...", 512), [
2223
+ [ye, e.mutableLoading]
2224
+ ])
2225
+ ])
2226
+ ], 512)
2227
+ ], 40, Dn),
2228
+ h(H, { name: s.transition }, {
2229
+ default: x(() => [
2230
+ c.dropdownOpen ? ae((o(), r("ul", {
2231
+ id: `vs${s.uid}__listbox`,
2232
+ ref: "dropdownMenu",
2233
+ key: `vs${s.uid}__listbox`,
2234
+ class: "vs__dropdown-menu",
2235
+ role: "listbox",
2236
+ tabindex: "-1",
2237
+ onMousedown: t[2] || (t[2] = re((...l) => c.onMousedown && c.onMousedown(...l), ["prevent"])),
2238
+ onMouseup: t[3] || (t[3] = (...l) => c.onMouseUp && c.onMouseUp(...l))
2239
+ }, [
2240
+ z(e.$slots, "list-header", V(U(c.scope.listHeader))),
2241
+ (o(!0), r(O, null, L(c.filteredOptions, (l, u) => (o(), r("li", {
2242
+ id: `vs${s.uid}__option-${u}`,
2243
+ key: s.getOptionKey(l),
2244
+ role: "option",
2245
+ class: te(["vs__dropdown-option", {
2246
+ "vs__dropdown-option--deselect": c.isOptionDeselectable(l) && u === e.typeAheadPointer,
2247
+ "vs__dropdown-option--selected": c.isOptionSelected(l),
2248
+ "vs__dropdown-option--highlight": u === e.typeAheadPointer,
2249
+ "vs__dropdown-option--disabled": !s.selectable(l)
2250
+ }]),
2251
+ "aria-selected": u === e.typeAheadPointer ? !0 : null,
2252
+ onMouseover: (i) => s.selectable(l) ? e.typeAheadPointer = u : null,
2253
+ onClick: re((i) => s.selectable(l) ? c.select(l) : null, ["prevent", "stop"])
2254
+ }, [
2255
+ z(e.$slots, "option", V(U(c.normalizeOptionForSlot(l))), () => [
2256
+ W(f(s.getOptionLabel(l)), 1)
2257
+ ])
2258
+ ], 42, jn))), 128)),
2259
+ c.filteredOptions.length === 0 ? (o(), r("li", Tn, [
2260
+ z(e.$slots, "no-options", V(U(c.scope.noOptions)), () => [
2261
+ Fn
2262
+ ])
2263
+ ])) : g("", !0),
2264
+ z(e.$slots, "list-footer", V(U(c.scope.listFooter)))
2265
+ ], 40, En)), [
2266
+ [p]
2267
+ ]) : (o(), r("ul", {
2268
+ key: 1,
2269
+ id: `vs${s.uid}__listbox`,
2270
+ role: "listbox",
2271
+ style: { display: "none", visibility: "hidden" }
2272
+ }, null, 8, qn))
2273
+ ]),
2274
+ _: 3
2275
+ }, 8, ["name"]),
2276
+ z(e.$slots, "footer", V(U(c.scope.footer)))
2277
+ ], 10, Mn);
2278
+ }
2279
+ const Ve = /* @__PURE__ */ be(zn, [["render", Rn]]);
2280
+ const Zn = { class: "w-100" }, Hn = { class: "flex" }, Nn = { class: "mn-regular" }, Kn = { class: "flex-column flex-wrap block" }, Wn = {
2281
+ key: 0,
2282
+ class: "w-100"
2283
+ }, Yn = { class: "w-100 flex-center flex-nowrap flex" }, Jn = { class: "mn-r-regular w-100" }, Qn = ["onClick"], Xn = {
2284
+ key: 0,
2285
+ class: "mn-t-small mn-small w-100"
2286
+ }, Pi = {
2287
+ __name: "EditArray",
2288
+ props: {
2289
+ name: Object,
2290
+ items: Array
2291
+ },
2292
+ emits: ["add", "remove"],
2293
+ setup(e, { emit: t }) {
2294
+ q(), F();
2295
+ let s = oe([]);
2296
+ Be(s);
2297
+ const n = v(null), d = v(null), c = v(null);
2298
+ Z(() => {
2299
+ if (n.value === null || c.value === null || c.value === "")
2300
+ return !0;
2301
+ if (n.value.modifications.length > 0)
2302
+ return d.value === null;
2303
+ });
2304
+ function p(l) {
2305
+ store.commit("leftovers/deleteItemFromLeftover", l);
2306
+ }
2307
+ return (l, u) => (o(), r("div", Zn, [
2308
+ a("div", Hn, [
2309
+ a("h3", Nn, f(e.name), 1)
2310
+ ]),
2311
+ a("ul", Kn, [
2312
+ e.items.length < 1 ? (o(), r("span", Wn, "Вы еще не добавили позиции")) : g("", !0),
2313
+ (o(!0), r(O, null, L(e.items, (i, m) => (o(), r("li", {
2314
+ key: i._id,
2315
+ class: "w-100"
2316
+ }, [
2317
+ a("div", Yn, [
2318
+ a("span", Jn, f(i.name), 1),
2319
+ a("a", {
2320
+ class: "w-20 button",
2321
+ onClick: (w) => p(i)
2322
+ }, "Удалить", 8, Qn)
2323
+ ]),
2324
+ m != e.items.length - 1 ? (o(), r("hr", Xn)) : g("", !0)
2325
+ ]))), 128))
2326
+ ])
2327
+ ]));
2328
+ }
2329
+ };
2330
+ const Gn = { class: "br-grey radius-small mn-small" }, eo = {
2331
+ key: 1,
2332
+ class: "pd-small br-grey br-1px br-solid"
2333
+ }, to = ["disabled"], so = {
2334
+ __name: "DepartmentMemberModify",
2335
+ props: {
2336
+ isPopupOpen: Boolean,
2337
+ department: Number,
2338
+ departments: Array,
2339
+ maindepartment: Object,
2340
+ alldepartments: Array
2341
+ },
2342
+ emits: ["callback", "remove"],
2343
+ setup(e, { emit: t }) {
2344
+ const s = e, n = v({
2345
+ subdepartment: null
2346
+ });
2347
+ s.department !== null && (n.value = s.departments[s.department]);
2348
+ function d(u, i, m) {
2349
+ return u.filter((w) => !(i.some((P) => P._id === w._id) || m._id === w._id));
2350
+ }
2351
+ const c = Z(() => d(s.alldepartments, s.departments, s.maindepartment));
2352
+ async function p() {
2353
+ s.departments.push(n.value.subdepartment), t("callback");
2354
+ }
2355
+ async function l() {
2356
+ s.departments.splice(s.department, 1), t("callback");
2357
+ }
2358
+ return (u, i) => (o(), r("div", null, [
2359
+ a("div", Gn, [
2360
+ s.department === null ? (o(), $(k(Ve), {
2361
+ key: 0,
2362
+ modelValue: n.value.subdepartment,
2363
+ "onUpdate:modelValue": i[0] || (i[0] = (m) => n.value.subdepartment = m),
2364
+ options: k(c),
2365
+ "get-option-label": (m) => m.name,
2366
+ class: "w-100 mn-small"
2367
+ }, null, 8, ["modelValue", "options", "get-option-label"])) : (o(), r("div", eo, f(n.value.name ? n.value.name : "Безымянный"), 1))
2368
+ ]),
2369
+ s.department === null ? (o(), r("button", {
2370
+ key: 0,
2371
+ disabled: !n.value.subdepartment,
2372
+ onClick: p,
2373
+ class: "w-100 button bg-second t-white"
2374
+ }, " Добавить отдел ", 8, to)) : g("", !0),
2375
+ s.department !== null ? (o(), r("button", {
2376
+ key: 1,
2377
+ onClick: l,
2378
+ class: "w-100 button bg-fourth t-white"
2379
+ }, " Удалить отдел ")) : g("", !0)
2380
+ ]));
2381
+ }
2382
+ }, zi = /* @__PURE__ */ A(so, [["__scopeId", "data-v-21f393e1"]]);
2383
+ const ao = { class: "br-grey radius-small mn-small" }, no = {
2384
+ key: 1,
2385
+ class: "pd-small br-grey br-1px br-solid"
2386
+ }, oo = ["disabled"], io = {
2387
+ __name: "DepartmentSubDepartmentModify",
2388
+ props: {
2389
+ isPopupOpen: Boolean,
2390
+ department: Number,
2391
+ departments: Array,
2392
+ maindepartment: Object,
2393
+ alldepartments: Array
2394
+ },
2395
+ emits: ["callback", "remove"],
2396
+ setup(e, { emit: t }) {
2397
+ const s = e, n = v({
2398
+ subdepartment: null
2399
+ });
2400
+ s.department !== null && (n.value = s.departments[s.department]);
2401
+ function d(u, i, m) {
2402
+ return u.filter((w) => !(i.some((P) => P._id === w._id) || m._id === w._id));
2403
+ }
2404
+ const c = Z(() => d(s.alldepartments, s.departments, s.maindepartment));
2405
+ async function p() {
2406
+ s.departments.push(n.value.subdepartment), t("callback");
2407
+ }
2408
+ async function l() {
2409
+ s.departments.splice(s.department, 1), t("callback");
2410
+ }
2411
+ return (u, i) => (o(), r("div", null, [
2412
+ a("div", ao, [
2413
+ s.department === null ? (o(), $(k(Ve), {
2414
+ key: 0,
2415
+ modelValue: n.value.subdepartment,
2416
+ "onUpdate:modelValue": i[0] || (i[0] = (m) => n.value.subdepartment = m),
2417
+ options: k(c),
2418
+ "get-option-label": (m) => m.name,
2419
+ class: "w-100 mn-small"
2420
+ }, null, 8, ["modelValue", "options", "get-option-label"])) : (o(), r("div", no, f(n.value.name ? n.value.name : "Безымянный"), 1))
2421
+ ]),
2422
+ s.department === null ? (o(), r("button", {
2423
+ key: 0,
2424
+ disabled: !n.value.subdepartment,
2425
+ onClick: p,
2426
+ class: "w-100 button bg-second t-white"
2427
+ }, " Добавить отдел ", 8, oo)) : g("", !0),
2428
+ s.department !== null ? (o(), r("button", {
2429
+ key: 1,
2430
+ onClick: l,
2431
+ class: "w-100 button bg-fourth t-white"
2432
+ }, " Удалить отдел ")) : g("", !0)
2433
+ ]));
2434
+ }
2435
+ }, Mi = /* @__PURE__ */ A(io, [["__scopeId", "data-v-d3c6f191"]]);
2436
+ const se = (e) => (me("data-v-195322bd"), e = e(), he(), e), lo = { class: "for-transition w-100" }, ro = { class: "pd-b-zero pd-t-zero pd-thin" }, co = { class: "pd-thin" }, uo = { class: "flex-nowrap flex bg-grey pd-medium radius-big" }, po = {
2437
+ key: 0,
2438
+ class: "mn-r-auto"
2439
+ }, mo = {
2440
+ key: 1,
2441
+ class: "mn-r-auto"
2442
+ }, ho = { class: "flex-nowrap flex pd-thin" }, _o = { class: "pd-b-zero pd-t-zero pd-thin cols-2 gap-thin" }, fo = { class: "flex-stretch flex-column flex" }, go = { class: "mn-thin bg-grey pd-medium o-hidden radius-big" }, bo = /* @__PURE__ */ se(() => /* @__PURE__ */ a("h3", { class: "mn-semi" }, "Profile", -1)), vo = { class: "radius-small flex-nowrap flex" }, yo = { class: "w-100 flex-child-grow-1 flex-child" }, wo = { class: "bg-grey pd-medium o-hidden radius-big" }, $o = /* @__PURE__ */ se(() => /* @__PURE__ */ a("h3", { class: "mn-semi" }, "Details", -1)), Co = /* @__PURE__ */ se(() => /* @__PURE__ */ a("p", { class: "p-medium mn-small" }, "Please the available delivery options:", -1)), ko = { class: "mn-medium flex-nowrap flex" }, xo = /* @__PURE__ */ se(() => /* @__PURE__ */ a("p", { class: "p-medium mn-small" }, "Please select the available payment methods:", -1)), Oo = { class: "flex-nowrap flex" }, Lo = { class: "bg-grey pd-medium o-hidden radius-big" }, So = /* @__PURE__ */ se(() => /* @__PURE__ */ a("h3", { class: "mn-semi" }, "Location", -1)), Po = /* @__PURE__ */ se(() => /* @__PURE__ */ a("p", { class: "mn-small p-medium" }, "Or choose on map:", -1)), zo = { class: "flex-nowrap flex pd-thin" }, Mo = {
2443
+ __name: "DepartmentEdit",
2444
+ setup(e) {
2445
+ const t = q(), s = F();
2446
+ v("details"), v(!1);
2447
+ async function n() {
2448
+ s.params.department && await ge.read(s.params.department), v(Re.memberships), await K.read(s.params._id), s.params.department && await K.readOne(s.params.department);
2449
+ }
2450
+ n(), v(_.department.members), v(!1), v(null), v(!1), v(null);
2451
+ async function d() {
2452
+ s.params.department && await K.update(
2453
+ s.params._id,
2454
+ _.department
2455
+ ), s.params.department || await K.create(
2456
+ s.params._id,
2457
+ _.department
2458
+ );
2459
+ }
2460
+ function c() {
2461
+ t.replace({ name: "Department", params: { _id: s.params._id, department: _.department._id } });
2462
+ }
2463
+ async function p() {
2464
+ await K.delete(
2465
+ s.params._id,
2466
+ _.department
2467
+ );
2468
+ }
2469
+ return (l, u) => (o(), r("div", lo, [
2470
+ a("div", ro, [
2471
+ h(lt, { class: "pd-medium bg-grey radius-big" })
2472
+ ]),
2473
+ a("div", co, [
2474
+ a("header", uo, [
2475
+ k(s).params.department ? (o(), r("h1", po, "Edit Spot")) : (o(), r("h1", mo, "Create Spot")),
2476
+ a("section", ho, [
2477
+ h(ce, {
2478
+ submit: d,
2479
+ callback: c
2480
+ }, {
2481
+ default: x(() => [
2482
+ W("Save Spot")
2483
+ ]),
2484
+ _: 1
2485
+ })
2486
+ ])
2487
+ ])
2488
+ ]),
2489
+ a("div", _o, [
2490
+ a("div", fo, [
2491
+ a("div", go, [
2492
+ bo,
2493
+ a("div", vo, [
2494
+ h(ze, {
2495
+ photo: _.department.profile.photo,
2496
+ "onUpdate:photo": u[0] || (u[0] = (i) => _.department.profile.photo = i),
2497
+ uploadPath: "organizations/" + _.department.name + "/avatars",
2498
+ class: "w-8r aspect-1x1 o-hidden mn-r-small radius-extra"
2499
+ }, null, 8, ["photo", "uploadPath"]),
2500
+ a("div", yo, [
2501
+ h(D, {
2502
+ field: _.department.profile.name,
2503
+ "onUpdate:field": u[1] || (u[1] = (i) => _.department.profile.name = i),
2504
+ label: "Name",
2505
+ placeholder: "Spot Name",
2506
+ class: "mn-small bg-white radius-small pd-medium",
2507
+ validation: l.organizationName
2508
+ }, null, 8, ["field", "validation"]),
2509
+ h(D, {
2510
+ field: _.department.profile.description,
2511
+ "onUpdate:field": u[2] || (u[2] = (i) => _.department.profile.description = i),
2512
+ label: "Description",
2513
+ placeholder: "Spot description (max 120 symbols)",
2514
+ class: "bg-white radius-small pd-medium",
2515
+ validation: l.organizationName
2516
+ }, null, 8, ["field", "validation"])
2517
+ ])
2518
+ ])
2519
+ ]),
2520
+ a("div", wo, [
2521
+ $o,
2522
+ Co,
2523
+ a("div", ko, [
2524
+ h(J, {
2525
+ label: "Pickup",
2526
+ name: "Delivery",
2527
+ value: "pickup",
2528
+ class: "w-100 mn-r-small bg-white radius-small pd-small",
2529
+ radio: _.department.delivery
2530
+ }, null, 8, ["radio"]),
2531
+ h(J, {
2532
+ label: "Delivery",
2533
+ name: "Delivery",
2534
+ value: "courier",
2535
+ class: "w-100 mn-r-small bg-white radius-small pd-small",
2536
+ radio: _.department.delivery
2537
+ }, null, 8, ["radio"]),
2538
+ h(J, {
2539
+ label: "Post",
2540
+ name: "Delivery",
2541
+ value: "post",
2542
+ class: "w-100 bg-white radius-small pd-small",
2543
+ radio: _.department.delivery
2544
+ }, null, 8, ["radio"])
2545
+ ]),
2546
+ xo,
2547
+ a("div", Oo, [
2548
+ h(J, {
2549
+ label: "Cash",
2550
+ name: "Payment",
2551
+ value: "cash",
2552
+ class: "w-100 mn-r-small bg-white radius-small pd-small",
2553
+ radio: _.department.payment
2554
+ }, null, 8, ["radio"]),
2555
+ h(J, {
2556
+ label: "Bank Transfer",
2557
+ name: "Payment",
2558
+ value: "bank",
2559
+ class: "w-100 mn-r-small bg-white radius-small pd-small",
2560
+ radio: _.department.payment
2561
+ }, null, 8, ["radio"]),
2562
+ h(J, {
2563
+ label: "Crypto",
2564
+ name: "Payment",
2565
+ value: "crypto",
2566
+ class: "w-100 bg-white radius-small pd-small",
2567
+ radio: _.department.payment
2568
+ }, null, 8, ["radio"])
2569
+ ])
2570
+ ])
2571
+ ]),
2572
+ a("div", Lo, [
2573
+ So,
2574
+ h(Xa, {
2575
+ apiKey: "AIzaSyDDR6WgYB7XMt7yTDDzQNEdF_gTdUiq8dI",
2576
+ address: _.department.address,
2577
+ location: _.department.location,
2578
+ label: "Address",
2579
+ placeholder: "Enter delivery address",
2580
+ class: "bg-white radius-small pd-small mn-small",
2581
+ "onUpdate:location": u[3] || (u[3] = (i) => {
2582
+ _.department.location = i;
2583
+ }),
2584
+ "onUpdate:address": u[4] || (u[4] = (i) => {
2585
+ _.department.address = i;
2586
+ })
2587
+ }, null, 8, ["address", "location"]),
2588
+ Po,
2589
+ h(nn, {
2590
+ address: _.department.address,
2591
+ location: _.department.location,
2592
+ apiKey: "AIzaSyDDR6WgYB7XMt7yTDDzQNEdF_gTdUiq8dI",
2593
+ class: "radius-big o-hidden",
2594
+ "onUpdate:location": u[5] || (u[5] = (i) => {
2595
+ _.department.location = i;
2596
+ }),
2597
+ "onUpdate:address": u[6] || (u[6] = (i) => {
2598
+ _.department.address = i;
2599
+ })
2600
+ }, null, 8, ["address", "location"])
2601
+ ])
2602
+ ]),
2603
+ a("section", zo, [
2604
+ h(ce, {
2605
+ submit: p,
2606
+ callback: l.redirectToDash,
2607
+ class: "bg-grey"
2608
+ }, {
2609
+ default: x(() => [
2610
+ W("Delete Spot")
2611
+ ]),
2612
+ _: 1
2613
+ }, 8, ["callback"])
2614
+ ])
2615
+ ]));
2616
+ }
2617
+ }, Do = /* @__PURE__ */ A(Mo, [["__scopeId", "data-v-195322bd"]]), Se = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2618
+ __proto__: null,
2619
+ default: Do
2620
+ }, Symbol.toStringTag, { value: "Module" })), Ao = { class: "unit" }, Vo = { class: "unit-details" }, Io = { key: 0 }, Uo = { class: "subunits" }, Di = {
2621
+ __name: "Unit",
2622
+ props: {
2623
+ unit: {
2624
+ type: Object,
2625
+ required: !0
2626
+ },
2627
+ editMode: {
2628
+ type: Boolean,
2629
+ required: !0
2630
+ }
2631
+ },
2632
+ setup(e) {
2633
+ const t = e, s = v({ ...t.unit });
2634
+ T(t.unit, () => {
2635
+ s.value = { ...t.unit };
2636
+ });
2637
+ async function n() {
2638
+ emit("unit-updated", s.value);
2639
+ }
2640
+ async function d() {
2641
+ emit("subunit-added", t.unit._id);
2642
+ }
2643
+ return (c, p) => {
2644
+ const l = ue("unit-component");
2645
+ return o(), r("div", Ao, [
2646
+ a("div", Vo, [
2647
+ a("h3", null, f(e.unit.name), 1),
2648
+ a("p", null, f(e.unit.description), 1),
2649
+ e.editMode ? (o(), r("div", Io, [
2650
+ ae(a("input", {
2651
+ "onUpdate:modelValue": p[0] || (p[0] = (u) => s.value.name = u),
2652
+ placeholder: "Название отдела"
2653
+ }, null, 512), [
2654
+ [we, s.value.name]
2655
+ ]),
2656
+ ae(a("input", {
2657
+ "onUpdate:modelValue": p[1] || (p[1] = (u) => s.value.description = u),
2658
+ placeholder: "Описание отдела"
2659
+ }, null, 512), [
2660
+ [we, s.value.description]
2661
+ ]),
2662
+ a("button", { onClick: n }, "Сохранить"),
2663
+ a("button", { onClick: d }, "Добавить подотдел")
2664
+ ])) : g("", !0)
2665
+ ]),
2666
+ a("div", Uo, [
2667
+ (o(!0), r(O, null, L(e.unit.subunits, (u, i) => (o(), $(l, {
2668
+ key: i,
2669
+ unit: u,
2670
+ "edit-mode": e.editMode
2671
+ }, null, 8, ["unit", "edit-mode"]))), 128))
2672
+ ])
2673
+ ]);
2674
+ };
2675
+ }
2676
+ };
2677
+ const Bo = { class: "br-grey radius-small mn-small" }, Eo = {
2678
+ __name: "Places",
2679
+ props: {
2680
+ isPopupOpen: Boolean,
2681
+ place: Number,
2682
+ places: Array
2683
+ },
2684
+ emits: ["callback"],
2685
+ setup(e, { emit: t }) {
2686
+ const s = e, n = v({
2687
+ logo: "",
2688
+ name: "",
2689
+ address: ""
2690
+ });
2691
+ s.place !== null && (n.value = s.places[s.place]);
2692
+ const d = v(null);
2693
+ async function c() {
2694
+ try {
2695
+ await Qe(
2696
+ d,
2697
+ Xe,
2698
+ n.value.name,
2699
+ "Некорректное название"
2700
+ );
2701
+ } catch {
2702
+ throw new Error();
2703
+ }
2704
+ s.place !== null ? (s.places[s.place] = n.value, t("callback")) : (s.places.push(n.value), t("callback"));
2705
+ }
2706
+ return (p, l) => (o(), r("div", null, [
2707
+ a("div", Bo, [
2708
+ h(Me, {
2709
+ options: [
2710
+ { name: "Кафе", value: "cafe" },
2711
+ { name: "Бар", value: "bar" },
2712
+ { name: "Ресторан", value: "restaraunt" },
2713
+ { name: "Пиццерия", value: "pizzeria" },
2714
+ { name: "Ночной клуб", value: "night-club" },
2715
+ { name: "Шаверма", value: "shaverma" },
2716
+ { name: "Кофейня", value: "coffee" }
2717
+ ],
2718
+ prop: n.value,
2719
+ content: "type",
2720
+ label: "Тип",
2721
+ placeholder: "Тип заведения",
2722
+ size: "small"
2723
+ }, null, 8, ["prop"]),
2724
+ h(D, {
2725
+ field: n.value.name,
2726
+ "onUpdate:field": l[0] || (l[0] = (u) => n.value.name = u),
2727
+ label: "Название",
2728
+ validation: d.value,
2729
+ placeholder: "Введите название места"
2730
+ }, null, 8, ["field", "validation"]),
2731
+ h(D, {
2732
+ field: n.value.address,
2733
+ "onUpdate:field": l[1] || (l[1] = (u) => n.value.address = u),
2734
+ label: "Адрес",
2735
+ validation: d.value,
2736
+ placeholder: "Введите адрес места"
2737
+ }, null, 8, ["field", "validation"]),
2738
+ h(D, {
2739
+ field: n.value.phone,
2740
+ "onUpdate:field": l[2] || (l[2] = (u) => n.value.phone = u),
2741
+ label: "Телефон",
2742
+ validation: d.value,
2743
+ placeholder: "Введите телефон места"
2744
+ }, null, 8, ["field", "validation"])
2745
+ ]),
2746
+ a("button", {
2747
+ onClick: c,
2748
+ class: "w-100 button bg-second t-white"
2749
+ }, f(s.place !== null ? "Редактировать заведение" : "Добавить заведение"), 1)
2750
+ ]));
2751
+ }
2752
+ }, Ai = /* @__PURE__ */ A(Eo, [["__scopeId", "data-v-de5143c5"]]);
2753
+ const jo = (e) => (me("data-v-20739d92"), e = e(), he(), e), To = { class: "documents" }, Fo = /* @__PURE__ */ jo(() => /* @__PURE__ */ a("h3", { class: "mn-small" }, "Список документов", -1)), qo = { class: "mn-big cols-4" }, Ro = ["onClick"], Zo = { class: "mn-small" }, Ho = { class: "t-semi t-transp radius-small" }, No = {
2754
+ __name: "Documents",
2755
+ setup(e) {
2756
+ q(), F();
2757
+ let t = [{
2758
+ name: "Паспорт",
2759
+ status: "Не добавлен",
2760
+ inputs: [{
2761
+ type: "text",
2762
+ name: "Номер и серия"
2763
+ }, {
2764
+ type: "text",
2765
+ name: "Место выдачи"
2766
+ }, {
2767
+ type: "text",
2768
+ name: "Дата выдачи"
2769
+ }]
2770
+ }, {
2771
+ name: "ИНН",
2772
+ status: "Не добавлен",
2773
+ inputs: [{
2774
+ type: "text",
2775
+ name: "Дата регистрации"
2776
+ }]
2777
+ }, {
2778
+ name: "СНИЛС",
2779
+ status: "Не добавлен",
2780
+ inputs: [{
2781
+ type: "text",
2782
+ name: "Дата регистрации"
2783
+ }]
2784
+ }, {
2785
+ name: "Военный билет",
2786
+ status: "Не добавлен",
2787
+ inputs: [{
2788
+ type: "text",
2789
+ name: "Дата регистрации"
2790
+ }]
2791
+ }];
2792
+ const s = v(!1), n = v(null), d = (l) => {
2793
+ n.value = l, s.value = !0;
2794
+ }, c = () => {
2795
+ s.value = !1;
2796
+ }, p = () => {
2797
+ c();
2798
+ };
2799
+ return de(() => {
2800
+ }), (l, u) => {
2801
+ const i = ue("Popup");
2802
+ return o(), r("div", To, [
2803
+ Fo,
2804
+ a("div", qo, [
2805
+ (o(!0), r(O, null, L(k(t), (m, w) => (o(), r("div", {
2806
+ key: w,
2807
+ onClick: (P) => d(w),
2808
+ class: "h-100 pd-medium bg-white radius-small"
2809
+ }, [
2810
+ a("h3", Zo, f(m.name), 1),
2811
+ a("p", Ho, f(m.status), 1)
2812
+ ], 8, Ro))), 128))
2813
+ ]),
2814
+ h(i, {
2815
+ title: "Добавить документ",
2816
+ onClosePopup: c,
2817
+ isPopupOpen: s.value
2818
+ }, {
2819
+ default: x(() => [
2820
+ (o(!0), r(O, null, L(k(t)[n.value].inputs, (m) => (o(), r("div", {
2821
+ key: m.name
2822
+ }, [
2823
+ h(D, {
2824
+ field: m.value,
2825
+ "onUpdate:field": (w) => m.value = w,
2826
+ label: m.name,
2827
+ _id: m.name,
2828
+ placeholder: m.name,
2829
+ class: "w-100"
2830
+ }, null, 8, ["field", "onUpdate:field", "label", "_id", "placeholder"])
2831
+ ]))), 128)),
2832
+ a("button", {
2833
+ onClick: p,
2834
+ class: "w-100 mn-small button"
2835
+ }, "Отправить на верификацию")
2836
+ ]),
2837
+ _: 1
2838
+ }, 8, ["isPopupOpen"])
2839
+ ]);
2840
+ };
2841
+ }
2842
+ }, Vi = /* @__PURE__ */ A(No, [["__scopeId", "data-v-20739d92"]]);
2843
+ const Ko = { class: "for-transition bg-white radius-big w-100" }, Wo = { class: "" }, Yo = {
2844
+ key: 1,
2845
+ class: "cols-1"
2846
+ }, Ii = {
2847
+ __name: "Organizations",
2848
+ props: {
2849
+ owner: {
2850
+ type: String,
2851
+ default: null
2852
+ },
2853
+ user: {
2854
+ type: [String, Number],
2855
+ default: null
2856
+ },
2857
+ onlyuser: {
2858
+ type: [String, Number],
2859
+ default: null
2860
+ }
2861
+ },
2862
+ async setup(e) {
2863
+ let t, s;
2864
+ const n = e, d = v(null);
2865
+ d.value = ([t, s] = Y(() => R.read({ owner: n.owner, user: n.user, onlyuser: n.onlyuser })), t = await t, s(), t);
2866
+ const c = q(), p = F();
2867
+ let l = p.query.tab ? p.query.tab : "details";
2868
+ const u = v(l);
2869
+ return p.query.tab = u.value, T(u, (i) => {
2870
+ c.replace({ query: { ...p.query, tab: i } });
2871
+ }), (i, m) => (o(), r("div", Ko, [
2872
+ a("div", Wo, [
2873
+ d.value < 1 ? (o(), $(fe, {
2874
+ key: 0,
2875
+ title: "You Haven't Joined Any Organization Yet",
2876
+ description: "Weeder is all about community. Join an organization or maybe you want to create your own?",
2877
+ action: "Create organization",
2878
+ callback: i.a = () => i.$router.push("/app/organization/create/details")
2879
+ }, null, 8, ["callback"])) : (o(), r("div", Yo, [
2880
+ (o(!0), r(O, null, L(d.value, (w) => (o(), $(We, {
2881
+ key: w._id,
2882
+ organization: w,
2883
+ user: S.user,
2884
+ onUpdateMembership: i.handleMembershipUpdate,
2885
+ class: te(["w-100", { "mn-r-small": i.index !== d.value.length - 1 }])
2886
+ }, null, 8, ["organization", "user", "onUpdateMembership", "class"]))), 128))
2887
+ ]))
2888
+ ])
2889
+ ]));
2890
+ }
2891
+ }, Jo = {};
2892
+ function Qo(e, t) {
2893
+ const s = ue("router-view");
2894
+ return o(), $(s, null, {
2895
+ default: x(({ Component: n, route: d }) => [
2896
+ (o(), $(le(n)))
2897
+ ]),
2898
+ _: 1
2899
+ });
2900
+ }
2901
+ const Xo = /* @__PURE__ */ A(Jo, [["render", Qo]]), Ui = [{
2902
+ path: "organizations",
2903
+ component: Xo,
2904
+ meta: {
2905
+ title: {
2906
+ en: "Organizations",
2907
+ ru: "Организации"
2908
+ }
2909
+ },
2910
+ children: [{
2911
+ path: ":_id",
2912
+ name: "Organization",
2913
+ meta: {
2914
+ title: {
2915
+ en: "Organization",
2916
+ ru: "Организация"
2917
+ }
2918
+ },
2919
+ component: () => Promise.resolve().then(() => Hs)
2920
+ }, {
2921
+ path: "create",
2922
+ name: "Create Organization",
2923
+ title: {
2924
+ en: "Create Organization",
2925
+ ru: "Создать Организацию"
2926
+ },
2927
+ component: () => Promise.resolve().then(() => Ce)
2928
+ }, {
2929
+ path: ":_id/edit",
2930
+ name: "Organization Edit",
2931
+ meta: {
2932
+ title: {
2933
+ en: "Edit Organization",
2934
+ ru: "Редактировать Организацию"
2935
+ }
2936
+ },
2937
+ component: () => Promise.resolve().then(() => Ce)
2938
+ }, {
2939
+ path: ":_id/departments/create",
2940
+ name: "Department Creation",
2941
+ meta: {
2942
+ title: "Создание отдела"
2943
+ },
2944
+ component: () => Promise.resolve().then(() => Se)
2945
+ }, {
2946
+ path: ":_id/departments/:deparment",
2947
+ name: "Department",
2948
+ meta: {
2949
+ title: "Отдел"
2950
+ },
2951
+ component: () => Promise.resolve().then(() => la)
2952
+ }, {
2953
+ path: ":_id/departments/:department/edit",
2954
+ name: "Department Edit",
2955
+ meta: {
2956
+ title: "Редактирование отдела"
2957
+ },
2958
+ component: () => Promise.resolve().then(() => Se)
2959
+ }, {
2960
+ path: ":_id/products/:product",
2961
+ name: "Product Organization",
2962
+ meta: {
2963
+ title: {
2964
+ en: "Product",
2965
+ ru: "Продукт"
2966
+ }
2967
+ },
2968
+ component: () => import(
2969
+ /* webpackChunkName: 'Product' */
2970
+ "./Product-3c7b2921.mjs"
2971
+ )
2972
+ }, {
2973
+ path: ":_id/products/:product/edit",
2974
+ name: "ProductEdit",
2975
+ component: () => import(
2976
+ /* webpackChunkName: 'ProductPageEdit' */
2977
+ "./ProductEdit-737e2a5a.mjs"
2978
+ )
2979
+ }, {
2980
+ path: ":_id/products/add",
2981
+ name: "AddProduct",
2982
+ component: () => import(
2983
+ /* webpackChunkName: 'ProductPageEdit' */
2984
+ "./ProductEdit-737e2a5a.mjs"
2985
+ )
2986
+ }]
2987
+ }];
2988
+ export {
2989
+ Ui as A,
2990
+ Do as D,
2991
+ Ai as P,
2992
+ Ae as U,
2993
+ lt as _,
2994
+ Ci as a,
2995
+ $i as b,
2996
+ E as c,
2997
+ Zs as d,
2998
+ ia as e,
2999
+ Li as f,
3000
+ Da as g,
3001
+ Si as h,
3002
+ Pi as i,
3003
+ Di as j,
3004
+ De as k,
3005
+ zi as l,
3006
+ Mi as m,
3007
+ fe as n,
3008
+ yi as o,
3009
+ wi as p,
3010
+ xs as q,
3011
+ ki as r,
3012
+ y as s,
3013
+ At as t,
3014
+ Oi as u,
3015
+ Vi as v,
3016
+ Ts as w,
3017
+ _s as x,
3018
+ Ii as y,
3019
+ xi as z
3020
+ };