@ozdao/prometheus-framework 0.0.85 → 0.0.87

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-15e71ec4.js +1 -0
  2. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-628f013e.mjs +138 -0
  3. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-cdbafd07.mjs +1944 -0
  4. package/dist/ButtonFollow-728aab73.mjs +130 -0
  5. package/dist/CardHeader-ce5a1a75.mjs +96 -0
  6. package/dist/CardOrganization-58b54995.js +1 -0
  7. package/dist/CardOrganization-91e79698.mjs +320 -0
  8. package/dist/CardOrganization-ee5c34ab.js +1 -0
  9. package/dist/CardOrganization-f70bd169.mjs +202 -0
  10. package/dist/Comments-63f154a6.js +9 -0
  11. package/dist/Comments-c092550f.mjs +76 -0
  12. package/dist/Comments-c5afa4d6.mjs +459 -0
  13. package/dist/EditProductImages-61ff4321.mjs +236 -0
  14. package/dist/Feed-8fd41524.js +1 -0
  15. package/dist/Feed-926cf4f3.mjs +355 -0
  16. package/dist/Feed-a31c43c2.mjs +423 -0
  17. package/dist/Feed-ecf37814.mjs +367 -0
  18. package/dist/IconEdit-736c89be.js +1 -0
  19. package/dist/IconEdit-e9fd4c6c.mjs +21 -0
  20. package/dist/PlaceholderUserpic-995da0fc.mjs +28 -0
  21. package/dist/Popup-0c791801.mjs +76 -0
  22. package/dist/Popup-105ef2c3.js +1 -0
  23. package/dist/Popup-82fb2c8a.mjs +76 -0
  24. package/dist/Product-2f3d592f.mjs +837 -0
  25. package/dist/Product-2fbf9d99.js +7 -0
  26. package/dist/Product-6c37ef35.js +7 -0
  27. package/dist/Product-7087b358.mjs +837 -0
  28. package/dist/ProductEdit-20709821.mjs +349 -0
  29. package/dist/ProductEdit-a81d13b9.js +1 -0
  30. package/dist/ProductEdit-c5067942.mjs +113 -0
  31. package/dist/ProfileBlogposts-79d5c858.mjs +63 -0
  32. package/dist/ProfileBlogposts-eca9916c.js +1 -0
  33. package/dist/ProfileBlogposts-fb014bc6.mjs +63 -0
  34. package/dist/ProfileComments-48f3d4bc.mjs +43 -0
  35. package/dist/ProfileComments-58094a50.mjs +43 -0
  36. package/dist/ProfileComments-b919f021.js +1 -0
  37. package/dist/ProfileEvents-05485e20.js +1 -0
  38. package/dist/ProfileEvents-20695376.mjs +55 -0
  39. package/dist/ProfileEvents-5d206e3d.mjs +55 -0
  40. package/dist/ProfileLikes-2f3a4488.js +1 -0
  41. package/dist/ProfileLikes-503712ec.mjs +43 -0
  42. package/dist/ProfileLikes-b5ac7f48.mjs +43 -0
  43. package/dist/ProfileOrganizations-0b76e38f.js +1 -0
  44. package/dist/ProfileOrganizations-32ab1e30.mjs +211 -0
  45. package/dist/ProfileOrganizations-3f305f4e.mjs +210 -0
  46. package/dist/ProfileOrganizations-50fce34e.js +1 -0
  47. package/dist/Publics-3f277c17.js +1 -0
  48. package/dist/Publics-49dbeafc.js +1 -0
  49. package/dist/Publics-9ebffff1.mjs +122 -0
  50. package/dist/Publics-b0fad2b0.mjs +1926 -0
  51. package/dist/Tab-58cd105f.mjs +46 -0
  52. package/dist/Tab-6f0a4909.js +1 -0
  53. package/dist/UploadImage-441e8526.js +1 -0
  54. package/dist/UploadImage-d1dbc280.mjs +99 -0
  55. package/dist/UploadImage-ff8f9a0c.mjs +83 -0
  56. package/dist/auth-35ef1791.mjs +1502 -0
  57. package/dist/auth.client.cjs +2 -2
  58. package/dist/auth.client.js +61 -41
  59. package/dist/auth.validation-29113f37.mjs +20 -0
  60. package/dist/categories-d669f3af.mjs +225 -0
  61. package/dist/community.client.cjs +1 -9
  62. package/dist/community.client.js +369 -741
  63. package/dist/community.server.js +16 -4
  64. package/dist/community.server.mjs +16 -4
  65. package/dist/events.client.cjs +1 -1
  66. package/dist/events.client.js +433 -331
  67. package/dist/events.server.js +19 -2
  68. package/dist/events.server.mjs +19 -2
  69. package/dist/inputs.validation-24ae76b9.js +1 -0
  70. package/dist/modules/constructor/components/elements/Bullets.vue.d.ts +15 -0
  71. package/dist/modules/constructor/components/elements/Caption.vue.d.ts +15 -0
  72. package/dist/modules/constructor/components/elements/H2.vue.d.ts +16 -0
  73. package/dist/modules/constructor/components/elements/Image.vue.d.ts +8 -0
  74. package/dist/modules/constructor/components/elements/ImageUpload.vue.d.ts +9 -0
  75. package/dist/modules/constructor/components/elements/Textarea.vue.d.ts +12 -0
  76. package/dist/modules/constructor/components/sections/Constructor.vue.d.ts +7 -0
  77. package/dist/modules/events/components/sections/Feed.vue.d.ts +1 -0
  78. package/dist/modules/icons/entities/IconCommunity.vue.d.ts +2 -0
  79. package/dist/organizations-1b4c84ee.mjs +121 -0
  80. package/dist/organizations-af43bda4.js +1 -0
  81. package/dist/organizations.client-253c8068.mjs +3179 -0
  82. package/dist/organizations.client-c60d7659.js +3 -0
  83. package/dist/organizations.client.cjs +1 -3
  84. package/dist/organizations.client.js +50 -3026
  85. package/dist/organizations.server.js +1 -1
  86. package/dist/organizations.server.mjs +1 -1
  87. package/dist/style.css +1 -1
  88. package/dist/users.client.cjs +1 -1
  89. package/dist/users.client.js +245 -208
  90. package/package.json +1 -1
  91. package/src/modules/auth/router/auth.js +28 -7
  92. package/src/modules/community/community.client.js +1 -12
  93. package/src/modules/community/components/pages/BlogPost.vue +1 -1
  94. package/src/modules/community/components/pages/CreateBlogPost.vue +8 -151
  95. package/src/modules/community/middlewares/server/verifyBlogpost.js +24 -11
  96. package/src/modules/{community → constructor}/components/elements/Textarea.vue +3 -11
  97. package/src/modules/constructor/components/sections/Constructor.vue +167 -0
  98. package/src/modules/events/components/blocks/CardEvent.vue +14 -6
  99. package/src/modules/events/components/pages/EditEvent.vue +228 -133
  100. package/src/modules/events/components/sections/Feed.vue +7 -1
  101. package/src/modules/events/controllers/events.controller.js +9 -0
  102. package/src/modules/events/controllers/tickets.controller.js +2 -1
  103. package/src/modules/events/models/event.model.js +10 -0
  104. package/src/modules/events/store/events.js +15 -19
  105. package/src/modules/icons/entities/IconCommunity.vue +8 -0
  106. package/src/modules/organizations/components/blocks/CardOrganization.vue +3 -5
  107. package/src/modules/organizations/components/sections/Publics.vue +3 -3
  108. package/src/modules/organizations/controllers/organizations.controller.js +1 -1
  109. package/src/modules/organizations/organizations.client.js +0 -2
  110. package/src/modules/users/components/pages/Profile.vue +15 -4
  111. package/src/modules/users/components/pages/ProfileEvents.vue +3 -3
  112. package/src/modules/organizations/components/blocks/CardOrganizationSocial.vue +0 -46
  113. /package/src/modules/{community → constructor}/components/elements/Bullets.vue +0 -0
  114. /package/src/modules/{community → constructor}/components/elements/Caption.vue +0 -0
  115. /package/src/modules/{community → constructor}/components/elements/H2.vue +0 -0
  116. /package/src/modules/{community → constructor}/components/elements/Image.vue +0 -0
  117. /package/src/modules/{community → constructor}/components/elements/ImageUpload.vue +0 -0
@@ -1,15 +1,14 @@
1
1
  import { ref as _, onMounted as Et, openBlock as v, createBlock as ce, unref as c, withCtx as C, createElementBlock as b, Fragment as fe, renderList as $t, createElementVNode as u, normalizeStyle as H, toDisplayString as y, resolveComponent as be, createVNode as g, Transition as F, resolveDynamicComponent as Tt, reactive as ut, withDirectives as S, vModelText as Z, watch as At, withAsyncContext as Ft, defineComponent as Dt, resolveDirective as Rt, normalizeClass as G, withKeys as ie, createCommentVNode as M, vShow as K, vModelDynamic as Mt, renderSlot as xt, createTextVNode as x } from "vue";
2
- import "./Tab.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
3
- import { c as ct, s as p, d as oe, a as zt, F as D, b as Y, e as W, _ as kt } from "./auth-8b5aac7a.mjs";
4
- import { f as R1, t as M1 } from "./auth-8b5aac7a.mjs";
2
+ import { v as D, a as ct, b as _e, c as Ce } from "./inputs.validation-6960f71b.mjs";
3
+ import { d as ft, s as p, e as oe, a as zt, F as R, b as Y, c as W, _ as kt } from "./auth-35ef1791.mjs";
4
+ import { f as D1, t as R1 } from "./auth-35ef1791.mjs";
5
5
  import { C as Lt, S as jt } from "./carousel.es-44c501bc.mjs";
6
6
  import { useI18n as B } from "vue-i18n";
7
7
  import { useRoute as z, useRouter as k } from "vue-router";
8
- import { v as R, a as ft, b as _e, c as Ce } from "./inputs.validation-6960f71b.mjs";
9
8
  import { s as A } from "./globals-96ba60e4.mjs";
10
- import { _ as we } from "./Tab-054b61f7.mjs";
11
- import { r as V, a as ae, c as Te } from "./auth.validation-69488f55.mjs";
12
- const Bt = { class: "parent-div" }, Ut = { class: "mn-small" }, Gt = { class: "mn-big mn-r-small mn-l-small" }, E1 = {
9
+ import { _ as we } from "./Tab-58cd105f.mjs";
10
+ import { r as V, a as ae, c as Te } from "./auth.validation-29113f37.mjs";
11
+ const Bt = { class: "parent-div" }, Ut = { class: "mn-small" }, Gt = { class: "mn-big mn-r-small mn-l-small" }, N1 = {
13
12
  __name: "SliderFeatures",
14
13
  setup(e) {
15
14
  const n = _(null), t = {
@@ -1877,7 +1876,7 @@ const Qd = { class: "t-center pd-medium" }, er = { class: "mn-medium" }, tr = {
1877
1876
  }), i = _(null), o = _(0);
1878
1877
  async function a() {
1879
1878
  try {
1880
- await ct(p.user, n.query.type, p.user.phone ? "phone" : "email"), o.value = 30;
1879
+ await ft(p.user, n.query.type, p.user.phone ? "phone" : "email"), o.value = 30;
1881
1880
  const h = setInterval(() => {
1882
1881
  o.value > 0 ? o.value -= 1 : clearInterval(h);
1883
1882
  }, 1e3);
@@ -2018,7 +2017,7 @@ const E = ut({
2018
2017
  };
2019
2018
  At(E, (e, n) => {
2020
2019
  });
2021
- const T1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2020
+ const E1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2022
2021
  __proto__: null,
2023
2022
  actions: Ct,
2024
2023
  state: E
@@ -2031,9 +2030,9 @@ const ir = { class: "t-left pd-medium" }, or = /* @__PURE__ */ u("h3", { class:
2031
2030
  [n, t] = Ft(() => Ct.readOne(r.query.inviteCode)), await n, t();
2032
2031
  async function o() {
2033
2032
  try {
2034
- await R(
2033
+ await D(
2035
2034
  d,
2036
- ft,
2035
+ ct,
2037
2036
  p.user.password,
2038
2037
  "Некорректный пароль"
2039
2038
  );
@@ -2049,7 +2048,7 @@ const ir = { class: "t-left pd-medium" }, or = /* @__PURE__ */ u("h3", { class:
2049
2048
  or,
2050
2049
  ar,
2051
2050
  u("div", sr, [
2052
- g(D, {
2051
+ g(R, {
2053
2052
  field: p.user.password,
2054
2053
  "onUpdate:field": s[0] || (s[0] = (m) => p.user.password = m),
2055
2054
  type: "password",
@@ -2058,7 +2057,7 @@ const ir = { class: "t-left pd-medium" }, or = /* @__PURE__ */ u("h3", { class:
2058
2057
  placeholder: "******",
2059
2058
  class: "bg-white radius-small mn-small"
2060
2059
  }, null, 8, ["field", "validation"]),
2061
- g(D, {
2060
+ g(R, {
2062
2061
  field: p.user.passwordRepeat,
2063
2062
  "onUpdate:field": s[1] || (s[1] = (m) => p.user.passwordRepeat = m),
2064
2063
  type: "password",
@@ -2168,9 +2167,9 @@ const fr = { class: "t-left pd-medium" }, pr = { class: "mn-small" }, mr = {
2168
2167
  _("phone");
2169
2168
  async function i() {
2170
2169
  try {
2171
- await R(
2170
+ await D(
2172
2171
  n,
2173
- ft,
2172
+ ct,
2174
2173
  p.user.password,
2175
2174
  "Некорректный пароль"
2176
2175
  );
@@ -2186,7 +2185,7 @@ const fr = { class: "t-left pd-medium" }, pr = { class: "mn-small" }, mr = {
2186
2185
  u("h3", pr, y(c(t)("almostDone")), 1),
2187
2186
  c(d).query.method === "reset-password" ? (v(), b("p", mr, y(c(t)("newPasswordPrompt")), 1)) : (v(), b("p", hr, y(c(t)("registrationPasswordPrompt")), 1)),
2188
2187
  u("div", yr, [
2189
- g(D, {
2188
+ g(R, {
2190
2189
  field: p.user.password,
2191
2190
  "onUpdate:field": l[0] || (l[0] = (s) => p.user.password = s),
2192
2191
  type: "password",
@@ -2194,7 +2193,7 @@ const fr = { class: "t-left pd-medium" }, pr = { class: "mn-small" }, mr = {
2194
2193
  placeholder: c(t)("passwordPlaceholder"),
2195
2194
  class: "bg-grey pd-small radius-small mn-thin"
2196
2195
  }, null, 8, ["field", "validation", "placeholder"]),
2197
- g(D, {
2196
+ g(R, {
2198
2197
  field: p.user.passwordRepeat,
2199
2198
  "onUpdate:field": l[1] || (l[1] = (s) => p.user.passwordRepeat = s),
2200
2199
  type: "password",
@@ -3177,12 +3176,12 @@ const Lr = { class: "t-left pd-medium" }, jr = { class: "mn-small" }, Br = { cla
3177
3176
  const r = k(), i = _("phone");
3178
3177
  async function o() {
3179
3178
  try {
3180
- i.value === "phone" && await R(
3179
+ i.value === "phone" && await D(
3181
3180
  t,
3182
3181
  _e,
3183
3182
  p.user.phone,
3184
3183
  "Некорректный телефон"
3185
- ), i.value === "email" && await R(
3184
+ ), i.value === "email" && await D(
3186
3185
  d,
3187
3186
  Ce,
3188
3187
  p.user.email,
@@ -3239,7 +3238,7 @@ const Lr = { class: "t-left pd-medium" }, jr = { class: "mn-small" }, Br = { cla
3239
3238
  default: C(() => [
3240
3239
  i.value === "email" ? (v(), b("div", Hr, [
3241
3240
  u("p", Kr, y(c(n)("emailInfo")), 1),
3242
- g(D, {
3241
+ g(R, {
3243
3242
  field: p.user.email,
3244
3243
  "onUpdate:field": s[2] || (s[2] = (m) => p.user.email = m),
3245
3244
  placeholder: c(n)("emailPlaceholder"),
@@ -3372,12 +3371,12 @@ const qr = { class: "t-left pd-medium" }, Xr = { class: "mn-small" }, Yr = { cla
3372
3371
  const r = k(), i = _("phone");
3373
3372
  async function o() {
3374
3373
  try {
3375
- i.value === "phone" && await R(
3374
+ i.value === "phone" && await D(
3376
3375
  t,
3377
3376
  _e,
3378
3377
  p.user.phone,
3379
3378
  "Некорректный телефон"
3380
- ), i.value === "email" && await R(
3379
+ ), i.value === "email" && await D(
3381
3380
  d,
3382
3381
  Ce,
3383
3382
  p.user.email,
@@ -3387,7 +3386,7 @@ const qr = { class: "t-left pd-medium" }, Xr = { class: "mn-small" }, Yr = { cla
3387
3386
  throw new Error();
3388
3387
  }
3389
3388
  try {
3390
- await ct(p.user, "signup", i.value);
3389
+ await ft(p.user, "signup", i.value);
3391
3390
  } catch {
3392
3391
  throw new Error();
3393
3392
  }
@@ -3438,7 +3437,7 @@ const qr = { class: "t-left pd-medium" }, Xr = { class: "mn-small" }, Yr = { cla
3438
3437
  default: C(() => [
3439
3438
  S(u("div", t1, [
3440
3439
  u("p", n1, y(c(n)("emailNotice")), 1),
3441
- g(D, {
3440
+ g(R, {
3442
3441
  field: p.user.email,
3443
3442
  "onUpdate:field": s[2] || (s[2] = (h) => p.user.email = h),
3444
3443
  placeholder: c(n)("emailPlaceholder"),
@@ -3609,12 +3608,12 @@ const i1 = { class: "" }, o1 = { class: "mn-medium" }, a1 = /* @__PURE__ */ u("b
3609
3608
  const i = k(), o = _("phone");
3610
3609
  async function a() {
3611
3610
  try {
3612
- o.value === "phone" && await R(
3611
+ o.value === "phone" && await D(
3613
3612
  t,
3614
3613
  _e,
3615
3614
  p.user.phone,
3616
3615
  "Некорректный телефон"
3617
- ), o.value === "email" && await R(
3616
+ ), o.value === "email" && await D(
3618
3617
  r,
3619
3618
  Ce,
3620
3619
  p.user.email,
@@ -3683,7 +3682,7 @@ const i1 = { class: "" }, o1 = { class: "mn-medium" }, a1 = /* @__PURE__ */ u("b
3683
3682
  g(F, { name: "slide-fade" }, {
3684
3683
  default: C(() => [
3685
3684
  S(u("div", f1, [
3686
- g(D, {
3685
+ g(R, {
3687
3686
  field: p.user.email,
3688
3687
  "onUpdate:field": m[2] || (m[2] = ($) => p.user.email = $),
3689
3688
  placeholder: c(n)("emailPlaceholder"),
@@ -3697,7 +3696,7 @@ const i1 = { class: "" }, o1 = { class: "mn-medium" }, a1 = /* @__PURE__ */ u("b
3697
3696
  _: 1
3698
3697
  })
3699
3698
  ]),
3700
- g(D, {
3699
+ g(R, {
3701
3700
  field: p.user.password,
3702
3701
  "onUpdate:field": m[3] || (m[3] = ($) => p.user.password = $),
3703
3702
  type: "password",
@@ -3739,12 +3738,15 @@ typeof lt == "function" && lt(St);
3739
3738
  const g1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3740
3739
  __proto__: null,
3741
3740
  default: St
3742
- }, Symbol.toStringTag, { value: "Module" })), A1 = [
3741
+ }, Symbol.toStringTag, { value: "Module" })), T1 = [
3743
3742
  {
3744
3743
  path: "auth",
3745
3744
  name: "Authentication",
3746
3745
  meta: {
3747
- title: "Вход"
3746
+ title: {
3747
+ en: "Sign In",
3748
+ ru: "Вход"
3749
+ }
3748
3750
  },
3749
3751
  component: Jd,
3750
3752
  children: [{
@@ -3755,7 +3757,10 @@ const g1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3755
3757
  ae
3756
3758
  ],
3757
3759
  meta: {
3758
- title: "Вход"
3760
+ title: {
3761
+ en: "Sign In",
3762
+ ru: "Вход"
3763
+ }
3759
3764
  },
3760
3765
  component: () => Promise.resolve().then(() => g1)
3761
3766
  }, {
@@ -3766,7 +3771,10 @@ const g1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3766
3771
  ae
3767
3772
  ],
3768
3773
  meta: {
3769
- title: "Сбросить пароль"
3774
+ title: {
3775
+ en: "Reset Password",
3776
+ ru: "Сбросить Пароль"
3777
+ }
3770
3778
  },
3771
3779
  component: () => Promise.resolve().then(() => Wr)
3772
3780
  }, {
@@ -3777,7 +3785,10 @@ const g1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3777
3785
  ae
3778
3786
  ],
3779
3787
  meta: {
3780
- title: "Регистрация"
3788
+ title: {
3789
+ en: "Sign Up",
3790
+ ru: "Регистрация"
3791
+ }
3781
3792
  },
3782
3793
  component: () => Promise.resolve().then(() => r1)
3783
3794
  }, {
@@ -3788,7 +3799,10 @@ const g1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3788
3799
  Te
3789
3800
  ],
3790
3801
  meta: {
3791
- title: "Введите код"
3802
+ title: {
3803
+ en: "Enter Code",
3804
+ ru: "Введите Код"
3805
+ }
3792
3806
  },
3793
3807
  component: () => Promise.resolve().then(() => rr)
3794
3808
  }, {
@@ -3799,14 +3813,20 @@ const g1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3799
3813
  Te
3800
3814
  ],
3801
3815
  meta: {
3802
- title: "Введите пароль"
3816
+ title: {
3817
+ en: "Enter Password",
3818
+ ru: "Введите Пароль"
3819
+ }
3803
3820
  },
3804
3821
  component: () => Promise.resolve().then(() => br)
3805
3822
  }, {
3806
3823
  path: "invite",
3807
3824
  name: "Invite",
3808
3825
  meta: {
3809
- title: "Приглашение"
3826
+ title: {
3827
+ en: "Invite",
3828
+ ru: "Приглашение"
3829
+ }
3810
3830
  },
3811
3831
  component: () => Promise.resolve().then(() => cr)
3812
3832
  }]
@@ -3820,9 +3840,9 @@ export {
3820
3840
  Pt as ResetPassword,
3821
3841
  St as SignIn,
3822
3842
  Ot as SignUp,
3823
- E1 as SliderFeatures,
3824
- A1 as authRoutes,
3825
- R1 as authStore,
3826
- T1 as invitesStore,
3827
- M1 as twofaStore
3843
+ N1 as SliderFeatures,
3844
+ T1 as authRoutes,
3845
+ D1 as authStore,
3846
+ E1 as invitesStore,
3847
+ R1 as twofaStore
3828
3848
  };
@@ -0,0 +1,20 @@
1
+ import { useRouter as i } from "vue-router";
2
+ import { s } from "./auth-35ef1791.mjs";
3
+ i();
4
+ function n(r, o, e) {
5
+ e(), s.user.phone = "", s.user.email = "", s.user.password = "", s.user.passwordRepeat = "";
6
+ }
7
+ function f(r, o, e) {
8
+ console.log(s.user), s.user.phone === "" && s.user.email === "" ? e("/auth/signin") : e();
9
+ }
10
+ i();
11
+ function c(r, o, e) {
12
+ if (s.access.status)
13
+ return e("/profile/" + s.user._id);
14
+ e();
15
+ }
16
+ export {
17
+ n as a,
18
+ f as c,
19
+ c as r
20
+ };
@@ -0,0 +1,225 @@
1
+ import { computed as V, resolveComponent as z, openBlock as u, createElementBlock as d, Fragment as H, renderList as B, unref as P, normalizeClass as R, createCommentVNode as v, createBlock as U, withCtx as I, createTextVNode as $, toDisplayString as y, createElementVNode as b, reactive as x, watch as L } from "vue";
2
+ import { useRoute as S } from "vue-router";
3
+ import { useI18n as A } from "vue-i18n";
4
+ import { s } from "./globals-96ba60e4.mjs";
5
+ import "./Breadcrumbs.vue_vue_type_style_index_0_lang-628f013e.mjs";
6
+ import { a as j } from "./auth-35ef1791.mjs";
7
+ const E = {
8
+ class: "breadcrumbs flex-row flex-nowrap flex-left flex",
9
+ "aria-label": "breadcrumbs"
10
+ }, M = {
11
+ key: 0,
12
+ class: "i-small mn-r-thin",
13
+ viewBox: "0 0 10 9",
14
+ fill: "none",
15
+ xmlns: "http://www.w3.org/2000/svg"
16
+ }, N = /* @__PURE__ */ b("path", {
17
+ fill: "black",
18
+ 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"
19
+ }, null, -1), Z = [
20
+ N
21
+ ], T = { key: 2 }, q = {
22
+ key: 3,
23
+ class: "i-small chevron",
24
+ viewBox: "0 0 4 8",
25
+ fill: "none",
26
+ xmlns: "http://www.w3.org/2000/svg"
27
+ }, D = /* @__PURE__ */ b("path", {
28
+ 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",
29
+ fill: "black"
30
+ }, null, -1), F = [
31
+ D
32
+ ], te = {
33
+ __name: "Breadcrumbs",
34
+ setup(e) {
35
+ const t = S(), { t: a, locale: n } = A(), f = V(() => t.matched.map((l) => {
36
+ var C, _, w;
37
+ const g = (C = l.meta) == null ? void 0 : C.title, p = n == null ? void 0 : n.value, h = g && p && g[p], i = l.path.replace(/:.+?\//g, (K) => ""), k = (w = (_ = l.meta) == null ? void 0 : _.breadcrumbs) == null ? void 0 : w.hidden;
38
+ return { name: h, path: i, isHidden: k };
39
+ }).filter((l) => l.name && !l.isHidden));
40
+ return (l, g) => {
41
+ const p = z("router-link");
42
+ return u(), d("ol", E, [
43
+ (u(!0), d(H, null, B(P(f), (h, i) => (u(), d("li", {
44
+ key: i,
45
+ class: R(["flex-v-center flex-nowrap flex", { "t-main": i === P(f).length - 1 }])
46
+ }, [
47
+ i === 0 ? (u(), d("svg", M, Z)) : v("", !0),
48
+ i !== P(f).length - 1 ? (u(), U(p, {
49
+ key: 1,
50
+ to: i === 0 ? "/" : h.path
51
+ }, {
52
+ default: I(() => [
53
+ $(y(h.name), 1)
54
+ ]),
55
+ _: 2
56
+ }, 1032, ["to"])) : (u(), d("span", T, y(h.name), 1)),
57
+ i !== P(f).length - 1 ? (u(), d("svg", q, F)) : v("", !0)
58
+ ], 2))), 128))
59
+ ]);
60
+ };
61
+ }
62
+ }, c = j.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = x({
63
+ all: [],
64
+ current: {
65
+ recommendation: !1,
66
+ category: [],
67
+ status: "unpublished",
68
+ information: [],
69
+ coverImage: "",
70
+ images: [],
71
+ files: [],
72
+ image3d: !1,
73
+ name: "",
74
+ sale: 0,
75
+ price: 0,
76
+ localization: [],
77
+ modifications: [],
78
+ description: ""
79
+ }
80
+ }), re = {
81
+ async create(e, t) {
82
+ const a = {
83
+ ...t,
84
+ organization: e
85
+ };
86
+ return await c.post("/products/create", a).then(
87
+ (n) => (G(n.data, "current"), Promise.resolve(n.data)),
88
+ (n) => (s(n), Promise.reject(n))
89
+ );
90
+ },
91
+ async read(e = {}) {
92
+ 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";
93
+ try {
94
+ console.log("Request params:" + e.params);
95
+ const t = await c.get("/products/read", { params: e.params });
96
+ return e._id ? r.current = t.data[0] : r.all = t.data, Promise.resolve(t.data);
97
+ } catch (t) {
98
+ return s(t), Promise.reject(t);
99
+ }
100
+ },
101
+ async update(e, t) {
102
+ return await c.post("/products/" + e, t).then(
103
+ (a) => Promise.resolve(a.data),
104
+ (a) => (s(a), Promise.reject(a))
105
+ );
106
+ },
107
+ async deleteProduct(e) {
108
+ return await c.delete("/products/" + e).then(
109
+ (t) => Promise.resolve(t.data),
110
+ (t) => (s(t), Promise.reject(t))
111
+ );
112
+ },
113
+ async submitMood(e = null) {
114
+ return console.log(e), c.post("/product/recommended", { mood: e }).then(
115
+ (t) => (r.current = t.data.product, r.current.recommendation = t.data.recommendationText, Promise.resolve(t.data)),
116
+ (t) => (console.log(t), s(t), Promise.reject(t))
117
+ );
118
+ },
119
+ async fetchProducts() {
120
+ return await c.get("/products").then(
121
+ (e) => (r.all = e.data, r.filtered = e.data.slice(), r.filteredPrice = r.filtered, r.filteredPrice.sort(function(t, a) {
122
+ return t[r.sort.current] > a[r.sort.current] ? r.sort.ascending ? 1 : -1 : t[r.sort.current] < a[r.sort.current] ? r.sort.ascending ? -1 : 1 : 0;
123
+ }), Promise.resolve(e.data)),
124
+ (e) => (s(e), Promise.reject(e))
125
+ );
126
+ },
127
+ async fetchProductsPopular() {
128
+ return await c.get("/products/popular").then(
129
+ (e) => (r.popular = e.data, Promise.resolve(e.data)),
130
+ (e) => (s(e), Promise.reject(e))
131
+ );
132
+ },
133
+ async fetchProductsPublished() {
134
+ return await c.get("/products").then(
135
+ (e) => {
136
+ let t = e.data.filter(function(a, n) {
137
+ return a.status !== "unpublished";
138
+ });
139
+ return r.all = t, r.filtered = t.slice(), r.filteredPrice = r.filtered, r.filteredPrice.sort(function(a, n) {
140
+ return a[r.sort.current] > n[r.sort.current] ? r.sort.ascending ? 1 : -1 : a[r.sort.current] < n[r.sort.current] ? r.sort.ascending ? -1 : 1 : 0;
141
+ }), Promise.resolve(e.data);
142
+ },
143
+ (e) => (s(e), Promise.reject(e))
144
+ );
145
+ },
146
+ async fetchProduct(e) {
147
+ return await c.get("/products/" + e).then(
148
+ (t) => (t.localization || (t.localization = []), r.current = t.data, Promise.resolve(t.data)),
149
+ (t) => (s(t), Promise.reject(t))
150
+ );
151
+ },
152
+ async fetchProductPopular() {
153
+ return await c.get("/products").then(
154
+ (e) => (r.all = e.data.slice(1, 5), Promise.resolve(e.data.slice(1, 5))),
155
+ (e) => (s(e), Promise.reject(e))
156
+ );
157
+ }
158
+ };
159
+ function G(e, t) {
160
+ r[t] = e;
161
+ }
162
+ L(r, (e, t) => {
163
+ });
164
+ const J = process.env.API_URL, m = j.create({ baseURL: J, withCredentials: !0 }), o = x({
165
+ all: [],
166
+ current: {
167
+ order: "1",
168
+ name: "",
169
+ url: "",
170
+ subcategories: [],
171
+ filters: [],
172
+ localization: []
173
+ }
174
+ }), ae = {
175
+ async fetchCategories() {
176
+ return await m.get("/categories").then(
177
+ (e) => (o.all = e.data, Promise.resolve(e.data)),
178
+ (e) => (s(e), Promise.reject(e))
179
+ );
180
+ },
181
+ updateCategories(e) {
182
+ return m.post("/categories", e).then(
183
+ (t) => (o.all = e, Promise.resolve(e)),
184
+ (t) => (s(t), Promise.reject(t))
185
+ );
186
+ },
187
+ fetchCategory(e) {
188
+ return m.get("/categories/" + e).then(
189
+ (t) => (o.current = t.data, Promise.resolve(t.data)),
190
+ (t) => (s(t), Promise.reject(t))
191
+ );
192
+ },
193
+ addCategory() {
194
+ return m.post("/categories/add", o.current).then(
195
+ (e) => (o.all.push(e.data), Promise.resolve(e.data)),
196
+ (e) => (s(e), Promise.reject(e))
197
+ );
198
+ },
199
+ updateCategory(e) {
200
+ return m.post("/categories/" + e, o.current).then(
201
+ (t) => (o.current = t.data, Promise.resolve(t.data)),
202
+ (t) => (s(t), Promise.reject(t))
203
+ );
204
+ },
205
+ deleteCategory(e) {
206
+ return m.delete("/categories/" + e).then(
207
+ (t) => {
208
+ const a = o.all.findIndex((n) => n.url === e);
209
+ o.all.splice(a, 1);
210
+ },
211
+ (t) => {
212
+ s(t);
213
+ }
214
+ );
215
+ }
216
+ };
217
+ L(o, (e) => {
218
+ });
219
+ export {
220
+ te as _,
221
+ ae as a,
222
+ re as b,
223
+ o as c,
224
+ r as s
225
+ };