@ozdao/prometheus-framework 0.2.188 → 0.2.189

Sign up to get free protection for your applications and to get access to all the features.
Files changed (298) hide show
  1. package/dist/builder.js +6 -3
  2. package/dist/builder.mjs +6 -3
  3. package/dist/node_modules/@unhead/vue/dist/shared/vue.cf295fb1.cjs +1 -0
  4. package/dist/node_modules/@unhead/vue/dist/shared/vue.cf295fb1.js +26 -0
  5. package/dist/node_modules/@unhead/vue/dist/shared/vue.f36acd1f.cjs +1 -0
  6. package/dist/node_modules/@unhead/vue/dist/shared/vue.f36acd1f.js +26 -0
  7. package/dist/node_modules/unhead/dist/index.cjs +1 -0
  8. package/dist/node_modules/unhead/dist/index.js +7 -0
  9. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +5 -5
  11. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -1
  12. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
  13. package/dist/prometheus-framework/src/modules/auth/views/store/auth.cjs +1 -1
  14. package/dist/prometheus-framework/src/modules/auth/views/store/auth.js +1 -1
  15. package/dist/prometheus-framework/src/modules/auth/views/store/twofa.cjs +1 -1
  16. package/dist/prometheus-framework/src/modules/auth/views/store/twofa.js +1 -1
  17. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
  19. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +73 -42
  21. package/dist/prometheus-framework/src/modules/community/components/sections/Comment.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/community/components/sections/Comment.vue.js +1 -1
  23. package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +1 -1
  24. package/dist/prometheus-framework/src/modules/community/store/blogposts.js +1 -1
  25. package/dist/prometheus-framework/src/modules/community/store/reactions.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/community/store/reactions.js +1 -1
  27. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  29. package/dist/prometheus-framework/src/modules/events/store/events.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/events/store/events.js +1 -1
  31. package/dist/prometheus-framework/src/modules/events/store/tickets.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/events/store/tickets.js +1 -1
  33. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
  35. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  37. package/dist/prometheus-framework/src/modules/gallery/store/gallery.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/gallery/store/gallery.js +1 -1
  39. package/dist/prometheus-framework/src/modules/globals/globals.client.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/globals/globals.client.js +34 -10
  41. package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.cjs +1 -0
  42. package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.js +72 -0
  43. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockFilter.vue.cjs +1 -0
  44. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockFilter.vue.js +57 -0
  45. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.cjs +1 -0
  46. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.js +35 -0
  47. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSorting.vue.cjs +1 -0
  48. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSorting.vue.js +75 -0
  49. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -0
  50. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +194 -0
  51. package/dist/prometheus-framework/src/modules/globals/views/components/elements/ButtonDate.vue.cjs +1 -0
  52. package/dist/prometheus-framework/src/modules/globals/views/components/elements/ButtonDate.vue.js +38 -0
  53. package/dist/prometheus-framework/src/modules/globals/views/components/elements/ButtonSort.vue.cjs +1 -0
  54. package/dist/prometheus-framework/src/modules/globals/views/components/elements/ButtonSort.vue.js +31 -0
  55. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs +1 -0
  56. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js +66 -0
  57. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Empty.vue.cjs +1 -0
  58. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Empty.vue.js +16 -0
  59. package/dist/prometheus-framework/src/modules/globals/views/components/sections/SectionPageTitle.vue.cjs +1 -0
  60. package/dist/prometheus-framework/src/modules/globals/views/components/sections/SectionPageTitle.vue.js +54 -0
  61. package/dist/prometheus-framework/src/modules/globals/views/localization/get-browser-locale.cjs +1 -0
  62. package/dist/prometheus-framework/src/modules/globals/views/localization/get-browser-locale.js +7 -0
  63. package/dist/prometheus-framework/src/modules/globals/views/mixins/mixins.cjs +1 -0
  64. package/dist/prometheus-framework/src/modules/globals/views/mixins/mixins.js +47 -0
  65. package/dist/prometheus-framework/src/modules/globals/views/router/scrollBehavior.cjs +1 -0
  66. package/dist/prometheus-framework/src/modules/globals/views/router/scrollBehavior.js +18 -0
  67. package/dist/prometheus-framework/src/modules/globals/views/store/globals.cjs +1 -0
  68. package/dist/prometheus-framework/src/modules/globals/views/store/globals.js +83 -0
  69. package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue.js +11 -11
  71. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.js +3 -3
  73. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +3 -3
  75. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
  77. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
  79. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +2 -2
  81. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
  83. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  85. package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.js +1 -1
  87. package/dist/prometheus-framework/src/modules/orders/router/orders.router.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/orders/router/orders.router.js +1 -1
  89. package/dist/prometheus-framework/src/modules/orders/store/applications.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/orders/store/applications.js +1 -1
  91. package/dist/prometheus-framework/src/modules/orders/store/customers.store.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/orders/store/customers.store.js +1 -1
  93. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/orders/store/orders.js +1 -1
  95. package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +1 -1
  97. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
  99. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  101. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  103. package/dist/prometheus-framework/src/modules/organizations/router/backoffice.router.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/organizations/router/backoffice.router.js +1 -1
  105. package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +1 -1
  107. package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/organizations/store/departments.js +1 -1
  109. package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/organizations/store/invites.js +1 -1
  111. package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +1 -1
  113. package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/organizations/store/organizations.js +1 -1
  115. package/dist/prometheus-framework/src/modules/pages/views/components/pages/Page.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/pages/views/components/pages/Page.vue.js +1 -1
  117. package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
  119. package/dist/prometheus-framework/src/modules/pages/views/components/pages/Pages.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/pages/views/components/pages/Pages.vue.js +2 -2
  121. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
  123. package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.js +1 -1
  125. package/dist/prometheus-framework/src/modules/pages/views/router/pages.router.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/pages/views/router/pages.router.js +1 -1
  127. package/dist/prometheus-framework/src/modules/pages/views/store/pages.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/pages/views/store/pages.js +1 -1
  129. package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.cjs +1 -1
  130. package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.js +3 -3
  131. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  133. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  134. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  135. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  136. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +1 -1
  137. package/dist/prometheus-framework/src/modules/products/store/categories.cjs +1 -1
  138. package/dist/prometheus-framework/src/modules/products/store/categories.js +1 -1
  139. package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs +1 -1
  140. package/dist/prometheus-framework/src/modules/products/store/leftovers.js +1 -1
  141. package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
  142. package/dist/prometheus-framework/src/modules/products/store/products.js +1 -1
  143. package/dist/prometheus-framework/src/modules/reports/store/reports.cjs +1 -1
  144. package/dist/prometheus-framework/src/modules/reports/store/reports.js +1 -1
  145. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  146. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  147. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -1
  148. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +3 -3
  149. package/dist/prometheus-framework/src/modules/spots/router/spots.cjs +1 -1
  150. package/dist/prometheus-framework/src/modules/spots/router/spots.js +1 -1
  151. package/dist/prometheus-framework/src/modules/spots/store/spots.cjs +1 -1
  152. package/dist/prometheus-framework/src/modules/spots/store/spots.js +1 -1
  153. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Payments.vue.cjs +1 -1
  154. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Payments.vue.js +1 -1
  155. package/dist/prometheus-framework/src/modules/wallet/views/store/payments.store.cjs +1 -1
  156. package/dist/prometheus-framework/src/modules/wallet/views/store/payments.store.js +1 -1
  157. package/dist/prometheus-framework/src/modules/wallet/views/store/wallet.store.cjs +1 -1
  158. package/dist/prometheus-framework/src/modules/wallet/views/store/wallet.store.js +1 -1
  159. package/dist/style.css +1 -1
  160. package/package.json +1 -1
  161. package/src/builder/modes/ssr.dev.js +4 -1
  162. package/src/builder/templates/page.js +1 -1
  163. package/src/builder/webpack/webpack.config.base.js +2 -1
  164. package/src/builder/webpack/webpack.config.spa.js +0 -1
  165. package/src/components/Feed/Feed.vue +5 -5
  166. package/src/components/Sidebar/Sidebar.vue +1 -1
  167. package/src/modules/auth/controllers/services/twofa.service.js +1 -1
  168. package/src/modules/auth/views/components/pages/EnterCode.vue +1 -1
  169. package/src/modules/auth/views/store/auth.js +1 -1
  170. package/src/modules/auth/views/store/twofa.js +1 -1
  171. package/src/modules/auth/views/validations/inputs.validation.js +1 -1
  172. package/src/modules/backoffice/router/backoffice.js +1 -1
  173. package/src/modules/chats/controllers/chats.controller.js +1 -1
  174. package/src/modules/community/components/blocks/CardBlogpost.vue +1 -1
  175. package/src/modules/community/components/pages/BlogPost.vue +63 -2
  176. package/src/modules/community/components/sections/Comment.vue +1 -1
  177. package/src/modules/community/models/blogpost.model.js +4 -4
  178. package/src/modules/community/store/blogposts.js +1 -1
  179. package/src/modules/community/store/reactions.js +1 -1
  180. package/src/modules/events/components/blocks/CardEvent.vue +2 -2
  181. package/src/modules/events/controllers/events.controller.js +1 -1
  182. package/src/modules/events/controllers/tickets.controller.js +1 -1
  183. package/src/modules/events/models/event.model.js +4 -4
  184. package/src/modules/events/store/events.js +1 -1
  185. package/src/modules/events/store/tickets.js +1 -1
  186. package/src/modules/gallery/components/pages/Gallery.vue +2 -2
  187. package/src/modules/gallery/components/sections/BackofficeGallery.vue +2 -2
  188. package/src/modules/gallery/models/photo.model.js +3 -3
  189. package/src/modules/gallery/store/gallery.js +1 -1
  190. package/src/modules/globals/{services → controllers/classes}/globals.crud.js +2 -2
  191. package/src/modules/globals/globals.client.js +78 -8
  192. package/src/modules/globals/globals.server.js +3 -3
  193. package/src/modules/globals/models/{metadata.schema.js → schemas/metadata.schema.js} +1 -1
  194. package/src/modules/globals/{services → views/classes}/globals.store.js +1 -1
  195. package/src/modules/globals/{components → views/components}/blocks/BlockSorting.vue +1 -1
  196. package/src/modules/globals/views/components/layouts/App.vue +83 -0
  197. package/src/modules/globals/{components → views/components}/layouts/Client.vue +8 -8
  198. package/src/modules/globals/{components → views/components}/partials/Header.vue +1 -1
  199. package/src/modules/globals/views/middlewares/localization.js +16 -0
  200. package/src/modules/integrations/stripe/controllers/webhooks/stripe.webhook.js +2 -2
  201. package/src/modules/landing/components/sections/SubscribeNewsletter.vue +1 -1
  202. package/src/modules/marketplace/components/layouts/Marketplace.vue +1 -1
  203. package/src/modules/marketplace/router/marketplace.js +1 -1
  204. package/src/modules/orders/components/pages/Order.vue +1 -1
  205. package/src/modules/orders/components/pages/OrderBackoffice.vue +2 -2
  206. package/src/modules/orders/components/pages/OrderCreate.vue +1 -1
  207. package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +2 -2
  208. package/src/modules/orders/components/pages/Orders.vue +2 -2
  209. package/src/modules/orders/components/sections/FormAddCustomer.vue +2 -2
  210. package/src/modules/orders/components/sections/FormDelivery.vue +1 -1
  211. package/src/modules/orders/controllers/applications.controller.js +1 -1
  212. package/src/modules/orders/controllers/orders.controller.js +1 -1
  213. package/src/modules/orders/models/customer.model.js +3 -3
  214. package/src/modules/orders/models/order.model.js +1 -1
  215. package/src/modules/orders/orders.server.js +1 -1
  216. package/src/modules/orders/router/orders.backoffice.router.js +1 -1
  217. package/src/modules/orders/router/orders.router.js +1 -1
  218. package/src/modules/orders/store/applications.js +1 -1
  219. package/src/modules/orders/store/customers.store.js +1 -1
  220. package/src/modules/orders/store/orders.js +1 -1
  221. package/src/modules/orders/store/shopcart.js +1 -1
  222. package/src/modules/organizations/components/pages/DepartmentEdit.vue +1 -1
  223. package/src/modules/organizations/components/pages/Members.vue +2 -2
  224. package/src/modules/organizations/components/sections/MembersAdd.vue +1 -1
  225. package/src/modules/organizations/controllers/invites.controller.js +1 -1
  226. package/src/modules/organizations/controllers/organizations.controller.js +1 -1
  227. package/src/modules/organizations/models/invite.model.js +2 -2
  228. package/src/modules/organizations/models/organization.model.js +1 -1
  229. package/src/modules/organizations/router/backoffice.router.js +1 -1
  230. package/src/modules/organizations/router/organizations.js +1 -1
  231. package/src/modules/organizations/store/departments.js +1 -1
  232. package/src/modules/organizations/store/invites.js +1 -1
  233. package/src/modules/organizations/store/memberships.js +1 -1
  234. package/src/modules/organizations/store/organizations.js +1 -1
  235. package/src/modules/pages/pages.server.js +1 -1
  236. package/src/modules/pages/views/components/pages/Page.vue +1 -1
  237. package/src/modules/pages/views/components/pages/PageEdit.vue +1 -1
  238. package/src/modules/pages/views/components/pages/Pages.vue +2 -2
  239. package/src/modules/pages/views/components/partials/SidebarPages.vue +1 -1
  240. package/src/modules/pages/views/router/pages.backoffice.router.js +1 -1
  241. package/src/modules/pages/views/router/pages.router.js +1 -1
  242. package/src/modules/pages/views/store/pages.js +1 -1
  243. package/src/modules/pages/views/store/pages.store.js +1 -1
  244. package/src/modules/products/components/blocks/CardLeftover.vue +1 -1
  245. package/src/modules/products/components/pages/EditLeftover.vue +1 -1
  246. package/src/modules/products/components/pages/ProductEdit.vue +1 -1
  247. package/src/modules/products/components/pages/Products.vue +1 -1
  248. package/src/modules/products/models/leftover.model.js +1 -1
  249. package/src/modules/products/store/categories.js +1 -1
  250. package/src/modules/products/store/leftovers.js +1 -1
  251. package/src/modules/products/store/products.js +1 -1
  252. package/src/modules/projects/store/projects.js +1 -1
  253. package/src/modules/reports/store/reports.js +1 -1
  254. package/src/modules/spots/components/layouts/Spots.vue +1 -1
  255. package/src/modules/spots/components/pages/Map.vue +1 -1
  256. package/src/modules/spots/router/spots.js +1 -1
  257. package/src/modules/spots/spots.server.js +1 -1
  258. package/src/modules/spots/store/spots.js +1 -1
  259. package/src/modules/users/models/user.model.js +3 -3
  260. package/src/modules/wallet/controllers/routes/payments.routes.js +1 -1
  261. package/src/modules/wallet/views/components/pages/Payments.vue +1 -1
  262. package/src/modules/wallet/views/store/payments.store.js +1 -1
  263. package/src/modules/wallet/views/store/wallet.store.js +1 -1
  264. package/src/modules/globals/router/routerGuards.js +0 -29
  265. /package/src/modules/globals/{services → controllers/classes}/globals.cache.js +0 -0
  266. /package/src/modules/globals/{services → controllers/classes}/globals.logger.js +0 -0
  267. /package/src/modules/globals/{services → controllers/classes}/globals.observer.js +0 -0
  268. /package/src/modules/globals/{services → controllers/classes}/globals.webhook.js +0 -0
  269. /package/src/modules/globals/{utils → controllers/utils}/mailing.js +0 -0
  270. /package/src/modules/globals/{utils → controllers/utils}/parseCookie.js +0 -0
  271. /package/src/modules/globals/{utils → controllers/utils}/seo-friendly-url.js +0 -0
  272. /package/src/modules/globals/{utils → controllers/utils}/sitemap.js +0 -0
  273. /package/src/modules/globals/models/{common.schema.js → schemas/common.schema.js} +0 -0
  274. /package/src/modules/globals/models/{credentials.schema.js → schemas/credentials.schema.js} +0 -0
  275. /package/src/modules/globals/models/{engagement.schema.js → schemas/engagement.schema.js} +0 -0
  276. /package/src/modules/globals/models/{ownership.schema.js → schemas/ownership.schema.js} +0 -0
  277. /package/src/modules/globals/models/{profile.schema.js → schemas/profile.schema.js} +0 -0
  278. /package/src/modules/globals/models/{socials.schema.js → schemas/socials.schema.js} +0 -0
  279. /package/src/modules/globals/{components → views/components}/blocks/BlockFilter.vue +0 -0
  280. /package/src/modules/globals/{components → views/components}/blocks/BlockSearch.vue +0 -0
  281. /package/src/modules/globals/{components → views/components}/blocks/CardFooter.vue +0 -0
  282. /package/src/modules/globals/{components → views/components}/blocks/CardHeader.vue +0 -0
  283. /package/src/modules/globals/{components → views/components}/elements/ButtonDate.vue +0 -0
  284. /package/src/modules/globals/{components → views/components}/elements/ButtonSort.vue +0 -0
  285. /package/src/modules/globals/{components → views/components}/layouts/Empty.vue +0 -0
  286. /package/src/modules/globals/{components → views/components}/pages/401.vue +0 -0
  287. /package/src/modules/globals/{components → views/components}/pages/404.vue +0 -0
  288. /package/src/modules/globals/{components → views/components}/partials/BottomNavigation.vue +0 -0
  289. /package/src/modules/globals/{components → views/components}/partials/Footer.vue +0 -0
  290. /package/src/modules/globals/{components → views/components}/partials/Navigation.vue +0 -0
  291. /package/src/modules/globals/{components → views/components}/partials/NavigationBar.vue +0 -0
  292. /package/src/modules/globals/{components → views/components}/sections/SectionPageTitle.vue +0 -0
  293. /package/src/modules/globals/{components → views/components}/sections/Title.vue +0 -0
  294. /package/src/modules/globals/{components → views/components}/sections/Walkthrough.vue +0 -0
  295. /package/src/modules/globals/{localization → views/localization}/get-browser-locale.js +0 -0
  296. /package/src/modules/globals/{mixins → views/mixins}/mixins.js +0 -0
  297. /package/src/modules/globals/{router → views/router}/scrollBehavior.js +0 -0
  298. /package/src/modules/globals/{store → views/store}/globals.js +0 -0
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("vue-router");require("vue-i18n");;/* empty css */const o=require("../../../../components/Block/Block.vue.cjs");;/* empty css */const d=require("../../../../components/Field/Field.vue2.cjs"),B=require("../../../../components/Checkbox/Checkbox.vue.cjs"),_=require("../../../../components/Button/Button.vue2.cjs"),C=require("../../../../components/Popup/Popup.vue2.cjs"),V=require("../../../../components/Feed/Feed.vue.cjs"),y=require("../../../../components/EditImages/EditImages.vue.cjs"),b=require("../../../icons/navigation/IconDelete.vue.cjs"),q=require("../blocks/CardPosition.vue.cjs"),P=require("../../../orders/components/blocks/CardOrderItem.vue.cjs"),E=require("../sections/EditProductInfo.vue.cjs"),u=require("../../../globals/store/globals.cjs"),t=require("../../store/products.cjs"),w=require("../../store/categories.cjs");;/* empty css */const U={class:"for-transition w-100 cols-1 pd-thin gap-thin"},z={class:"mn-r-auto"},F={class:"cols-2 gap-thin"},I={key:0,class:"cols-1 gap-thin"},O={class:"bg-light mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big"},D={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},L={class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},S={__name:"ProductEdit",setup(T){const l=k.useRoute(),f=k.useRouter(),h=e.ref(t.state.all),p=e.ref(!1);function N(s){p.value=!0}function i(){p.value=!1}e.onMounted(async()=>{t.mutations.resetProduct(),l.params.product&&await t.actions.read({_id:l.params.product}),t.state.current.ingredients||(t.state.current.ingredients=[]),await w.actions.fetchCategories();try{const s=await t.actions.read({organization:l.params._id,limit:100});h.value=s}catch{console.error("error")}});function v(){l.params.product?t.actions.update(l.params.product,t.state.current):t.actions.create(l.params._id,t.state.current)}function x(){t.actions.deleteProduct(t.state.current._id)}function g(){f.push({name:"Organization",params:{_id:l.params._id}})}return(s,c)=>(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(o.default,{class:"flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[e.createElementVNode("h1",z,e.toDisplayString(e.unref(l).params.product?t.state.current.name:"Create Product"),1),e.unref(l).params.product?(e.openBlock(),e.createBlock(_.default,{key:0,submit:x,callback:g,class:"bg-red mn-r-thin"},{default:e.withCtx(()=>[e.createTextVNode(" Delete ")]),_:1})):e.createCommentVNode("",!0),e.createVNode(_.default,{submit:v,callback:g,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode(" Save ")]),_:1})]),_:1}),e.createVNode(o.default,{placeholder:"The product doesn't have any images yet.",class:"h-min"},{default:e.withCtx(()=>[e.createVNode(y.default,{images:t.state.current.images,uploadPath:"photos","onUpdate:images":c[0]||(c[0]=a=>{t.state.current.images=a})},null,8,["images"])]),_:1}),e.createElementVNode("div",F,[e.createVNode(o.default,{title:"Profile"},{default:e.withCtx(()=>[e.createVNode(E.default,{product:t.state.current},null,8,["product"])]),_:1}),e.createVNode(o.default,{title:"Ingredients",placeholder:"No ingridients added yet",actions:[{label:"+",function:()=>N()}]},{default:e.withCtx(()=>[t.state.current.ingredients.length>0?(e.openBlock(),e.createElementBlock("div",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.ingredients,(a,n)=>(e.openBlock(),e.createBlock(q.default,{key:a._id,product:a,array:t.state.current.ingredients,products:h.value,showPrice:!1,onAdd:c[1]||(c[1]=r=>{u.actions.add(t.state.current.ingredients,r),i()}),onUpdate:r=>{u.actions.update(t.state.current.ingredients,r,n),i()},onDelete:r=>{u.actions.delete(t.state.current.ingredients,r,n),i()}},null,8,["product","array","products","onUpdate","onDelete"]))),128))])):e.createCommentVNode("",!0)]),_:1},8,["actions"]),e.createVNode(C.default,{title:"Add ingredient",onClosePopup:i,isPopupOpen:p.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",O,[e.createVNode(V.default,{search:{class:"bg-white mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:a=>t.actions.read(a),state:null},options:{organization:e.unref(l).params._id},class:""},{default:e.withCtx(({items:a})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(n,r)=>(e.openBlock(),e.createBlock(P.default,{key:n._id,editable:!1,product:n,onClick:()=>{let m={...n};m.quantity=1,m.type="pcs",u.actions.add(t.state.current.ingredients,m),i()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["product","onClick"]))),128))]),_:1},8,["store","options"])])]),_:1},8,["isPopupOpen"])]),e.createVNode(o.default,{title:"Categories",actions:[{label:"+",function:()=>e.unref(f).push({name:"Categories Organization",params:{_id:e.unref(l).params._id}})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.state.all,(a,n)=>(e.openBlock(),e.createBlock(B.default,{label:a.name,name:"categories",value:a.url,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:t.state.current.category,"onUpdate:radio":r=>t.state.current.category=r},null,8,["label","value","radio","onUpdate:radio"]))),256))]),_:1},8,["actions"]),e.createVNode(o.default,{title:"Parameters",placeholder:"No parameters added yet",actions:[{label:"+",function:()=>t.state.current.information.push({name:"",value:""})}],class:"cols-1 gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.information,(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin flex-nowrap flex",key:n},[e.createVNode(d.default,{field:a.name,"onUpdate:field":r=>a.name=r,placeholder:"Название параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:a.value,"onUpdate:field":r=>a.value=r,placeholder:"Значение параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",D,[e.createVNode(b.default,{onClick:()=>t.state.current.information.splice(n,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),e.createVNode(o.default,{title:"Localization",placeholder:"No localizations added yet",actions:[{label:"+",function:()=>t.state.current.localization.push({name:"",value:""})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.localization,(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:n},[e.createVNode(d.default,{field:a.name,"onUpdate:field":r=>a.name=r,placeholder:"Название параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:a.value,"onUpdate:field":r=>a.value=r,placeholder:"Значение параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",L,[e.createVNode(b.default,{onClick:()=>t.state.current.localization.splice(n,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"])]))}};exports.default=S;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("vue-router");require("vue-i18n");;/* empty css */const o=require("../../../../components/Block/Block.vue.cjs");;/* empty css */const d=require("../../../../components/Field/Field.vue2.cjs"),B=require("../../../../components/Checkbox/Checkbox.vue.cjs"),_=require("../../../../components/Button/Button.vue2.cjs"),C=require("../../../../components/Popup/Popup.vue2.cjs"),V=require("../../../../components/Feed/Feed.vue.cjs"),y=require("../../../../components/EditImages/EditImages.vue.cjs"),b=require("../../../icons/navigation/IconDelete.vue.cjs"),q=require("../blocks/CardPosition.vue.cjs"),P=require("../../../orders/components/blocks/CardOrderItem.vue.cjs"),E=require("../sections/EditProductInfo.vue.cjs"),u=require("../../../globals/views/store/globals.cjs"),t=require("../../store/products.cjs"),w=require("../../store/categories.cjs");;/* empty css */const U={class:"for-transition w-100 cols-1 pd-thin gap-thin"},z={class:"mn-r-auto"},F={class:"cols-2 gap-thin"},I={key:0,class:"cols-1 gap-thin"},O={class:"bg-light mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big"},D={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},L={class:"radius-small pd-small flex-center flex aspect-1x1 bg-red"},S={__name:"ProductEdit",setup(T){const l=k.useRoute(),f=k.useRouter(),h=e.ref(t.state.all),p=e.ref(!1);function N(s){p.value=!0}function i(){p.value=!1}e.onMounted(async()=>{t.mutations.resetProduct(),l.params.product&&await t.actions.read({_id:l.params.product}),t.state.current.ingredients||(t.state.current.ingredients=[]),await w.actions.fetchCategories();try{const s=await t.actions.read({organization:l.params._id,limit:100});h.value=s}catch{console.error("error")}});function v(){l.params.product?t.actions.update(l.params.product,t.state.current):t.actions.create(l.params._id,t.state.current)}function x(){t.actions.deleteProduct(t.state.current._id)}function g(){f.push({name:"Organization",params:{_id:l.params._id}})}return(s,c)=>(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(o.default,{class:"flex-nowrap flex-v-center flex"},{default:e.withCtx(()=>[e.createElementVNode("h1",z,e.toDisplayString(e.unref(l).params.product?t.state.current.name:"Create Product"),1),e.unref(l).params.product?(e.openBlock(),e.createBlock(_.default,{key:0,submit:x,callback:g,class:"bg-red mn-r-thin"},{default:e.withCtx(()=>[e.createTextVNode(" Delete ")]),_:1})):e.createCommentVNode("",!0),e.createVNode(_.default,{submit:v,callback:g,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode(" Save ")]),_:1})]),_:1}),e.createVNode(o.default,{placeholder:"The product doesn't have any images yet.",class:"h-min"},{default:e.withCtx(()=>[e.createVNode(y.default,{images:t.state.current.images,uploadPath:"photos","onUpdate:images":c[0]||(c[0]=a=>{t.state.current.images=a})},null,8,["images"])]),_:1}),e.createElementVNode("div",F,[e.createVNode(o.default,{title:"Profile"},{default:e.withCtx(()=>[e.createVNode(E.default,{product:t.state.current},null,8,["product"])]),_:1}),e.createVNode(o.default,{title:"Ingredients",placeholder:"No ingridients added yet",actions:[{label:"+",function:()=>N()}]},{default:e.withCtx(()=>[t.state.current.ingredients.length>0?(e.openBlock(),e.createElementBlock("div",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.ingredients,(a,n)=>(e.openBlock(),e.createBlock(q.default,{key:a._id,product:a,array:t.state.current.ingredients,products:h.value,showPrice:!1,onAdd:c[1]||(c[1]=r=>{u.actions.add(t.state.current.ingredients,r),i()}),onUpdate:r=>{u.actions.update(t.state.current.ingredients,r,n),i()},onDelete:r=>{u.actions.delete(t.state.current.ingredients,r,n),i()}},null,8,["product","array","products","onUpdate","onDelete"]))),128))])):e.createCommentVNode("",!0)]),_:1},8,["actions"]),e.createVNode(C.default,{title:"Add ingredient",onClosePopup:i,isPopupOpen:p.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",O,[e.createVNode(V.default,{search:{class:"bg-white mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:a=>t.actions.read(a),state:null},options:{organization:e.unref(l).params._id},class:""},{default:e.withCtx(({items:a})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(n,r)=>(e.openBlock(),e.createBlock(P.default,{key:n._id,editable:!1,product:n,onClick:()=>{let m={...n};m.quantity=1,m.type="pcs",u.actions.add(t.state.current.ingredients,m),i()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["product","onClick"]))),128))]),_:1},8,["store","options"])])]),_:1},8,["isPopupOpen"])]),e.createVNode(o.default,{title:"Categories",actions:[{label:"+",function:()=>e.unref(f).push({name:"Categories Organization",params:{_id:e.unref(l).params._id}})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.state.all,(a,n)=>(e.openBlock(),e.createBlock(B.default,{label:a.name,name:"categories",value:a.url,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:t.state.current.category,"onUpdate:radio":r=>t.state.current.category=r},null,8,["label","value","radio","onUpdate:radio"]))),256))]),_:1},8,["actions"]),e.createVNode(o.default,{title:"Parameters",placeholder:"No parameters added yet",actions:[{label:"+",function:()=>t.state.current.information.push({name:"",value:""})}],class:"cols-1 gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.information,(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin flex-nowrap flex",key:n},[e.createVNode(d.default,{field:a.name,"onUpdate:field":r=>a.name=r,placeholder:"Название параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:a.value,"onUpdate:field":r=>a.value=r,placeholder:"Значение параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",D,[e.createVNode(b.default,{onClick:()=>t.state.current.information.splice(n,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),e.createVNode(o.default,{title:"Localization",placeholder:"No localizations added yet",actions:[{label:"+",function:()=>t.state.current.localization.push({name:"",value:""})}]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.localization,(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin mn-b-thin flex-nowrap flex",key:n},[e.createVNode(d.default,{field:a.name,"onUpdate:field":r=>a.name=r,placeholder:"Название параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.default,{field:a.value,"onUpdate:field":r=>a.value=r,placeholder:"Значение параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",L,[e.createVNode(b.default,{onClick:()=>t.state.current.localization.splice(n,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"])]))}};exports.default=S;
@@ -14,7 +14,7 @@ import D from "../../../icons/navigation/IconDelete.vue.js";
14
14
  import q from "../blocks/CardPosition.vue.js";
15
15
  import M from "../../../orders/components/blocks/CardOrderItem.vue.js";
16
16
  import j from "../sections/EditProductInfo.vue.js";
17
- import { actions as w } from "../../../globals/store/globals.js";
17
+ import { actions as w } from "../../../globals/views/store/globals.js";
18
18
  import { state as e, mutations as G, actions as c } from "../../store/products.js";
19
19
  import { actions as H, state as J } from "../../store/categories.js";
20
20
  /* empty css */
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("vue-router"),d=require("../../../../components/Tab/Tab.vue2.cjs"),p=require("../../../../components/Feed/Feed.vue.cjs"),m=require("../sections/FilterProducts.vue.cjs"),h=require("../../../globals/components/blocks/BlockSearch.vue.cjs"),b=require("../blocks/CardProduct.vue.cjs"),v=require("../../../auth/views/store/auth.cjs"),c=require("../../store/products.cjs"),f={class:"pd-thin"},g={key:0,class:"mn-b-medium flex-v-center flex-nowrap flex"},q=e.createElementVNode("h2",{class:"mn-r-medium"},"Products",-1),y={class:"cols-2-1_3 bg-light pd-thin radius-big gap-thin"},_={__name:"Products",setup(k){const t=l.useRoute(),n=l.useRouter(),a=e.ref(t.query.tabProducts?t.query.tabProducts:"all");t.query.tabProducts=a.value,e.watch(a,u=>{n.replace({query:{...t.query,tabProducts:u}})});function i(u){let r={...t.query};r.search=u,n.push({query:r})}return(u,r)=>(e.openBlock(),e.createElementBlock("div",f,[e.unref(t).name!=="Organization"?(e.openBlock(),e.createElementBlock("header",g,[q,e.createElementVNode("button",{onClick:r[0]||(r[0]=o=>u.$router.push({name:"ProductAdd"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")])):e.createCommentVNode("",!0),e.unref(t).name!=="Organization"?(e.openBlock(),e.createBlock(d.default,{key:1,selected:a.value,"onUpdate:selected":r[1]||(r[1]=o=>a.value=o),tabs:[{name:"All",value:"all"},{name:"Published",value:"published"},{name:"Unpublished",value:"unpublished"},{name:"Archivied",value:"archivied"}],class:"mn-b-small o-hidden h5 radius-big bg-light"},null,8,["selected"])):e.createCommentVNode("",!0),e.createElementVNode("div",y,[e.createVNode(m.default),e.createElementVNode("div",null,[e.createVNode(h.default,{onSearch:i,placeholder:"Enter product name",class:"bg-white mn-b-thin"}),e.createVNode(p.default,{states:{empty:{title:"No Products Found",description:"Currently, there are no products available."}},store:{read:o=>c.actions.read(o),state:c.state},options:{limit:15,organization:e.unref(t).params._id,categories:e.unref(t).query.categories,prices:e.unref(t).query.prices,delivery:e.unref(t).query.delivery,search:e.unref(t).query.search,...a.value!=="all"&&{status:a.value}},class:"cols-4 gap-thin"},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,s=>(e.openBlock(),e.createBlock(b.default,{key:s._id,product:s,user:v.state.access,class:"h-max",onClickCapture:P=>u.$router.push({name:"Product Organization",params:{_id:e.unref(t).params._id,product:s._id}})},null,8,["product","user","onClickCapture"]))),128))]),_:1},8,["store","options"])])])]))}};exports.default=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("vue-router"),d=require("../../../../components/Tab/Tab.vue2.cjs"),p=require("../../../../components/Feed/Feed.vue.cjs"),m=require("../sections/FilterProducts.vue.cjs"),h=require("../../../globals/views/components/blocks/BlockSearch.vue.cjs"),b=require("../blocks/CardProduct.vue.cjs"),v=require("../../../auth/views/store/auth.cjs"),c=require("../../store/products.cjs"),f={class:"pd-thin"},g={key:0,class:"mn-b-medium flex-v-center flex-nowrap flex"},q=e.createElementVNode("h2",{class:"mn-r-medium"},"Products",-1),y={class:"cols-2-1_3 bg-light pd-thin radius-big gap-thin"},_={__name:"Products",setup(k){const t=l.useRoute(),n=l.useRouter(),a=e.ref(t.query.tabProducts?t.query.tabProducts:"all");t.query.tabProducts=a.value,e.watch(a,u=>{n.replace({query:{...t.query,tabProducts:u}})});function i(u){let r={...t.query};r.search=u,n.push({query:r})}return(u,r)=>(e.openBlock(),e.createElementBlock("div",f,[e.unref(t).name!=="Organization"?(e.openBlock(),e.createElementBlock("header",g,[q,e.createElementVNode("button",{onClick:r[0]||(r[0]=o=>u.$router.push({name:"ProductAdd"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")])):e.createCommentVNode("",!0),e.unref(t).name!=="Organization"?(e.openBlock(),e.createBlock(d.default,{key:1,selected:a.value,"onUpdate:selected":r[1]||(r[1]=o=>a.value=o),tabs:[{name:"All",value:"all"},{name:"Published",value:"published"},{name:"Unpublished",value:"unpublished"},{name:"Archivied",value:"archivied"}],class:"mn-b-small o-hidden h5 radius-big bg-light"},null,8,["selected"])):e.createCommentVNode("",!0),e.createElementVNode("div",y,[e.createVNode(m.default),e.createElementVNode("div",null,[e.createVNode(h.default,{onSearch:i,placeholder:"Enter product name",class:"bg-white mn-b-thin"}),e.createVNode(p.default,{states:{empty:{title:"No Products Found",description:"Currently, there are no products available."}},store:{read:o=>c.actions.read(o),state:c.state},options:{limit:15,organization:e.unref(t).params._id,categories:e.unref(t).query.categories,prices:e.unref(t).query.prices,delivery:e.unref(t).query.delivery,search:e.unref(t).query.search,...a.value!=="all"&&{status:a.value}},class:"cols-4 gap-thin"},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,s=>(e.openBlock(),e.createBlock(b.default,{key:s._id,product:s,user:v.state.access,class:"h-max",onClickCapture:P=>u.$router.push({name:"Product Organization",params:{_id:e.unref(t).params._id,product:s._id}})},null,8,["product","user","onClickCapture"]))),128))]),_:1},8,["store","options"])])])]))}};exports.default=_;
@@ -3,7 +3,7 @@ import { useRoute as y, useRouter as q } from "vue-router";
3
3
  import P from "../../../../components/Tab/Tab.vue2.js";
4
4
  import $ from "../../../../components/Feed/Feed.vue.js";
5
5
  import k from "../sections/FilterProducts.vue.js";
6
- import C from "../../../globals/components/blocks/BlockSearch.vue.js";
6
+ import C from "../../../globals/views/components/blocks/BlockSearch.vue.js";
7
7
  import w from "../blocks/CardProduct.vue.js";
8
8
  import { state as x } from "../../../auth/views/store/auth.js";
9
9
  import { actions as z, state as N } from "../../store/products.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),u=require("axios"),a=require("../../globals/store/globals.cjs"),s=u.create({baseURL:process.env.API_URL,withCredentials:!0}),r=o.reactive({all:[],current:{order:1,name:"",url:"",status:"draft",subcategories:[],filters:[],localization:[]}}),c={async fetchCategories(t){return await s.get("/categories",{params:t}).then(e=>(r.all=e.data,Promise.resolve(e.data)),e=>(a.setError(e),Promise.reject(e)))},updateCategories(t){return s.post("/categories",t).then(e=>(r.all=t,Promise.resolve(t)),e=>(a.setError(e),Promise.reject(e)))},fetchCategory(t){return s.get("/categories/"+t).then(e=>(r.current=e.data,Promise.resolve(e.data)),e=>(a.setError(e),Promise.reject(e)))},addCategory(){return s.post("/categories/add",r.current).then(t=>(r.all.push(t.data),Promise.resolve(t.data)),t=>(a.setError(t),Promise.reject(t)))},updateCategory(t){return s.post("/categories/"+t,r.current).then(e=>(r.current=e.data,Promise.resolve(e.data)),e=>(a.setError(e),Promise.reject(e)))},resetCategory(){r.current={order:0,name:"",url:"",status:"draft",subcategories:[],filters:[],localization:[]}},deleteCategory(t){return s.delete("/categories/"+t).then(e=>{const n=r.all.findIndex(i=>i.url===t);r.all.splice(n,1)},e=>{a.setError(e)})}};o.watch(r,t=>{});exports.actions=c;exports.state=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),u=require("axios"),a=require("../../globals/views/store/globals.cjs"),s=u.create({baseURL:process.env.API_URL,withCredentials:!0}),r=o.reactive({all:[],current:{order:1,name:"",url:"",status:"draft",subcategories:[],filters:[],localization:[]}}),c={async fetchCategories(t){return await s.get("/categories",{params:t}).then(e=>(r.all=e.data,Promise.resolve(e.data)),e=>(a.setError(e),Promise.reject(e)))},updateCategories(t){return s.post("/categories",t).then(e=>(r.all=t,Promise.resolve(t)),e=>(a.setError(e),Promise.reject(e)))},fetchCategory(t){return s.get("/categories/"+t).then(e=>(r.current=e.data,Promise.resolve(e.data)),e=>(a.setError(e),Promise.reject(e)))},addCategory(){return s.post("/categories/add",r.current).then(t=>(r.all.push(t.data),Promise.resolve(t.data)),t=>(a.setError(t),Promise.reject(t)))},updateCategory(t){return s.post("/categories/"+t,r.current).then(e=>(r.current=e.data,Promise.resolve(e.data)),e=>(a.setError(e),Promise.reject(e)))},resetCategory(){r.current={order:0,name:"",url:"",status:"draft",subcategories:[],filters:[],localization:[]}},deleteCategory(t){return s.delete("/categories/"+t).then(e=>{const n=r.all.findIndex(i=>i.url===t);r.all.splice(n,1)},e=>{a.setError(e)})}};o.watch(r,t=>{});exports.actions=c;exports.state=r;
@@ -1,6 +1,6 @@
1
1
  import { reactive as i, watch as u } from "vue";
2
2
  import c from "axios";
3
- import { setError as a } from "../../globals/store/globals.js";
3
+ import { setError as a } from "../../globals/views/store/globals.js";
4
4
  const s = c.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = i({
5
5
  all: [],
6
6
  current: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),p=require("axios"),s=require("../../globals/store/globals.cjs"),o=p.create({baseURL:process.env.API_URL,withCredentials:!0}),e=c.reactive({all:[],current:{organization:"",type:"",comment:null,order:null,positions:[]}}),h={async read(r){try{const t=await o.get("/leftovers",{params:r});return e.all=t.data,t.data}catch(t){throw s.setError(t),t}},async fetch(r){try{const t=await o.get("/leftovers/"+r);return e.current=t.data,t.data}catch(t){throw s.setError(t),t}},async create({organization:r,type:t,order:n,positions:l,creator:i,owner:d,comment:u}){try{const a=await o.post("/leftovers",{organization:r,type:t,order:n,positions:l,creator:i,owner:d,comment:u});return e.all.push(a.data),a.data}catch(a){throw s.setError(a),a}},async update(r){try{const t=await o.post("/leftovers/"+r._id,r);return e.current=t.data,t.data}catch(t){throw s.setError(t),t}},async delete(r){try{const t=await o.delete("/leftovers/"+r);return e.all.splice(e.all.findIndex(n=>n._id==r),1),t.data}catch(t){throw s.setError(t),t}}};c.watch(e,r=>{});exports.actions=h;exports.state=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),p=require("axios"),s=require("../../globals/views/store/globals.cjs"),o=p.create({baseURL:process.env.API_URL,withCredentials:!0}),e=c.reactive({all:[],current:{organization:"",type:"",comment:null,order:null,positions:[]}}),h={async read(r){try{const t=await o.get("/leftovers",{params:r});return e.all=t.data,t.data}catch(t){throw s.setError(t),t}},async fetch(r){try{const t=await o.get("/leftovers/"+r);return e.current=t.data,t.data}catch(t){throw s.setError(t),t}},async create({organization:r,type:t,order:n,positions:l,creator:i,owner:d,comment:u}){try{const a=await o.post("/leftovers",{organization:r,type:t,order:n,positions:l,creator:i,owner:d,comment:u});return e.all.push(a.data),a.data}catch(a){throw s.setError(a),a}},async update(r){try{const t=await o.post("/leftovers/"+r._id,r);return e.current=t.data,t.data}catch(t){throw s.setError(t),t}},async delete(r){try{const t=await o.delete("/leftovers/"+r);return e.all.splice(e.all.findIndex(n=>n._id==r),1),t.data}catch(t){throw s.setError(t),t}}};c.watch(e,r=>{});exports.actions=h;exports.state=e;
@@ -1,6 +1,6 @@
1
1
  import { reactive as p, watch as h } from "vue";
2
2
  import u from "axios";
3
- import { setError as o } from "../../globals/store/globals.js";
3
+ import { setError as o } from "../../globals/views/store/globals.js";
4
4
  const s = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), e = p({
5
5
  all: [],
6
6
  current: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),o=require("axios"),s=require("../../globals/store/globals.cjs"),i=o.create({baseURL:process.env.API_URL,withCredentials:!0}),t=n.reactive({all:[],current:{recommendation:!1,category:[],status:"unpublished",information:[],images:[],files:[],image3d:!1,name:"",sale:0,price:0,localization:[],modifications:[],quantityDiscount:[],ingredients:[],description:""}}),u={async create(e,r){const a={...r,organization:e};return await i.post("/api/products/create",a).then(c=>(l(c.data,"current"),Promise.resolve(c.data)),c=>(s.setError(c),Promise.reject(c)))},async read(e={}){let r={};e._id&&(r._id=e._id),e.category&&(r.category=e.category),e.organization&&(r.organization=e.organization),e.count&&(r.count=e.count),e.categories&&(r.categories=e.categories),e.prices&&(r.prices=e.prices),e.delivery&&(r.delivery=e.delivery),e.status&&(r.status=e.status),e.search&&(r.search=e.search),r.sort="createdAt",r.skip=e.skip,r.limit=e.limit;try{const a=await i.get("/api/products/read",{params:r});return e._id?(t.current={...a.data[0]},Promise.resolve(a.data[0])):Promise.resolve(a.data)}catch(a){return s.setError(a),Promise.reject(a)}},async update(e,r){return await i.post("/api/products/"+e,r).then(a=>Promise.resolve(a.data),a=>(s.setError(a),Promise.reject(a)))},async deleteProduct(e){return await i.delete("/api/products/"+e).then(r=>Promise.resolve(r.data),r=>(s.setError(r),Promise.reject(r)))},async submitMood(e=null){return i.post("/api/product/recommended",{mood:e}).then(r=>(t.current=r.data.product,t.current.recommendation=r.data.recommendationText,Promise.resolve(r.data)),r=>(s.setError(r),Promise.reject(r)))},async fetchProducts(){return await i.get("/api/products/read").then(e=>(t.all=e.data,Promise.resolve(e.data)),e=>(s.setError(e),Promise.reject(e)))},async fetchProductsPopular(){return await i.get("/api/products/popular").then(e=>(t.popular=e.data,Promise.resolve(e.data)),e=>(s.setError(e),Promise.reject(e)))},async fetchProductsPublished(){return await i.get("/api/products").then(e=>{let r=e.data.filter(function(a,c){return a.status!=="unpublished"});return t.all=r,t.filtered=r.slice(),t.filteredPrice=t.filtered,t.filteredPrice.sort(function(a,c){return a[t.sort.current]>c[t.sort.current]?t.sort.ascending?1:-1:a[t.sort.current]<c[t.sort.current]?t.sort.ascending?-1:1:0}),Promise.resolve(e.data)},e=>(s.setError(e),Promise.reject(e)))},async fetchProduct(e){try{const r=await i.get("/api/products/"+e);return t.current=r.data[0],Promise.resolve(r.data[0])}catch(r){return s.setError(r),Promise.reject(r)}},async fetchProductPopular(){return await i.get("/api/products").then(e=>(t.all=e.data.slice(1,5),Promise.resolve(e.data.slice(1,5))),e=>(s.setError(e),Promise.reject(e)))}},d={resetProduct(e){t.current={recommendation:!1,category:[],status:"unpublished",information:[],images:[],files:[],image3d:!1,name:"",sale:0,price:0,localization:[],modifications:[],quantityDiscount:[],ingredients:[],description:""}}};function l(e,r){t[r]=e}const m={};n.watch(t,(e,r)=>{});exports.actions=u;exports.getters=m;exports.mutations=d;exports.state=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),o=require("axios"),s=require("../../globals/views/store/globals.cjs"),i=o.create({baseURL:process.env.API_URL,withCredentials:!0}),t=n.reactive({all:[],current:{recommendation:!1,category:[],status:"unpublished",information:[],images:[],files:[],image3d:!1,name:"",sale:0,price:0,localization:[],modifications:[],quantityDiscount:[],ingredients:[],description:""}}),u={async create(e,r){const a={...r,organization:e};return await i.post("/api/products/create",a).then(c=>(l(c.data,"current"),Promise.resolve(c.data)),c=>(s.setError(c),Promise.reject(c)))},async read(e={}){let r={};e._id&&(r._id=e._id),e.category&&(r.category=e.category),e.organization&&(r.organization=e.organization),e.count&&(r.count=e.count),e.categories&&(r.categories=e.categories),e.prices&&(r.prices=e.prices),e.delivery&&(r.delivery=e.delivery),e.status&&(r.status=e.status),e.search&&(r.search=e.search),r.sort="createdAt",r.skip=e.skip,r.limit=e.limit;try{const a=await i.get("/api/products/read",{params:r});return e._id?(t.current={...a.data[0]},Promise.resolve(a.data[0])):Promise.resolve(a.data)}catch(a){return s.setError(a),Promise.reject(a)}},async update(e,r){return await i.post("/api/products/"+e,r).then(a=>Promise.resolve(a.data),a=>(s.setError(a),Promise.reject(a)))},async deleteProduct(e){return await i.delete("/api/products/"+e).then(r=>Promise.resolve(r.data),r=>(s.setError(r),Promise.reject(r)))},async submitMood(e=null){return i.post("/api/product/recommended",{mood:e}).then(r=>(t.current=r.data.product,t.current.recommendation=r.data.recommendationText,Promise.resolve(r.data)),r=>(s.setError(r),Promise.reject(r)))},async fetchProducts(){return await i.get("/api/products/read").then(e=>(t.all=e.data,Promise.resolve(e.data)),e=>(s.setError(e),Promise.reject(e)))},async fetchProductsPopular(){return await i.get("/api/products/popular").then(e=>(t.popular=e.data,Promise.resolve(e.data)),e=>(s.setError(e),Promise.reject(e)))},async fetchProductsPublished(){return await i.get("/api/products").then(e=>{let r=e.data.filter(function(a,c){return a.status!=="unpublished"});return t.all=r,t.filtered=r.slice(),t.filteredPrice=t.filtered,t.filteredPrice.sort(function(a,c){return a[t.sort.current]>c[t.sort.current]?t.sort.ascending?1:-1:a[t.sort.current]<c[t.sort.current]?t.sort.ascending?-1:1:0}),Promise.resolve(e.data)},e=>(s.setError(e),Promise.reject(e)))},async fetchProduct(e){try{const r=await i.get("/api/products/"+e);return t.current=r.data[0],Promise.resolve(r.data[0])}catch(r){return s.setError(r),Promise.reject(r)}},async fetchProductPopular(){return await i.get("/api/products").then(e=>(t.all=e.data.slice(1,5),Promise.resolve(e.data.slice(1,5))),e=>(s.setError(e),Promise.reject(e)))}},d={resetProduct(e){t.current={recommendation:!1,category:[],status:"unpublished",information:[],images:[],files:[],image3d:!1,name:"",sale:0,price:0,localization:[],modifications:[],quantityDiscount:[],ingredients:[],description:""}}};function l(e,r){t[r]=e}const m={};n.watch(t,(e,r)=>{});exports.actions=u;exports.getters=m;exports.mutations=d;exports.state=t;
@@ -1,6 +1,6 @@
1
1
  import { reactive as n, watch as u } from "vue";
2
2
  import o from "axios";
3
- import { setError as i } from "../../globals/store/globals.js";
3
+ import { setError as i } from "../../globals/views/store/globals.js";
4
4
  const s = o.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = n({
5
5
  all: [],
6
6
  current: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),s=require("../../globals/store/globals.cjs"),l=require("axios"),a=l.create({baseURL:process.env.API_URL}),r=c.reactive({all:[],current:{_id:"",status:"",user:"",type:"",reason:"",target:""},form:{isOpen:!1,status:"",user:"",type:"",reason:"",target:""}}),i={async read(){try{const t=await a.get("/reports");return o.setAll(t.data),t.data}catch(t){throw s.setError(t),t}},async create(t){try{return console.log(t),(await a.post("/reports",t)).data}catch(e){throw s.setError(e),e}},async update(t){try{const e=await a.put("/reports/"+t._id,t);return o.updateReportInAll(e.data),e.data}catch(e){throw s.setError(e),e}},async remove(t){try{const e=await a.delete("/reports/"+t._id);return o.removeReportFromAll(t._id),e.data}catch(e){throw s.setError(e),e}}},o={setAll(t){r.all=t},setCurrent(t){r.current=t},updateReportInAll(t){const e=r.all.findIndex(n=>n._id===t._id);e!==-1&&(r.all[e]=t)},removeReportFromAll(t){const e=r.all.findIndex(n=>n._id===t);e!==-1&&r.all.splice(e,1)},toggleForm(){r.form.isOpen=!r.form.isOpen,r.form={status:"",user:"",type:"",reason:"",target:""}}};c.watch(r,(t,e)=>{});exports.actions=i;exports.mutations=o;exports.state=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),s=require("../../globals/views/store/globals.cjs"),l=require("axios"),a=l.create({baseURL:process.env.API_URL}),r=c.reactive({all:[],current:{_id:"",status:"",user:"",type:"",reason:"",target:""},form:{isOpen:!1,status:"",user:"",type:"",reason:"",target:""}}),i={async read(){try{const t=await a.get("/reports");return o.setAll(t.data),t.data}catch(t){throw s.setError(t),t}},async create(t){try{return console.log(t),(await a.post("/reports",t)).data}catch(e){throw s.setError(e),e}},async update(t){try{const e=await a.put("/reports/"+t._id,t);return o.updateReportInAll(e.data),e.data}catch(e){throw s.setError(e),e}},async remove(t){try{const e=await a.delete("/reports/"+t._id);return o.removeReportFromAll(t._id),e.data}catch(e){throw s.setError(e),e}}},o={setAll(t){r.all=t},setCurrent(t){r.current=t},updateReportInAll(t){const e=r.all.findIndex(n=>n._id===t._id);e!==-1&&(r.all[e]=t)},removeReportFromAll(t){const e=r.all.findIndex(n=>n._id===t);e!==-1&&r.all.splice(e,1)},toggleForm(){r.form.isOpen=!r.form.isOpen,r.form={status:"",user:"",type:"",reason:"",target:""}}};c.watch(r,(t,e)=>{});exports.actions=i;exports.mutations=o;exports.state=r;
@@ -1,5 +1,5 @@
1
1
  import { reactive as c, watch as l } from "vue";
2
- import { setError as a } from "../../globals/store/globals.js";
2
+ import { setError as a } from "../../globals/views/store/globals.js";
3
3
  import i from "axios";
4
4
  const o = i.create({ baseURL: process.env.API_URL }), r = c({
5
5
  all: [],
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("vue-router"),v=require("vue-i18n");;/* empty css */;/* empty css */;/* empty css */;/* empty css */const m=require("../../../globals/store/globals.cjs"),f=require("../../../products/store/categories.cjs"),g=require("../../../marketplace/store/marketplace.cjs"),h={class:"w-100 h-100"},k={class:"h-100 w-100 flex-nowrap flex-column flex gap-thin"},_={class:"pos-absolute z-index-2 w-100"},w={class:"bg-black-transp-25 t-white pd-small w-100 bg-blur-big mn-l-auto mn-r-auto t-center"},b=e.createElementVNode("span",{class:""},"Weed in ",-1),B={key:0},E={key:1},q={key:2},C={__name:"Spots",setup(O){const s=y.useRoute(),n=y.useRouter(),o=e.ref({city:null,state:null,country:null});function u(t){return t.replace(/-/g," ").replace(/\b\w/g,r=>r.toUpperCase())}e.onMounted(async()=>{if(s.params){let t={country:u(s.params.country),state:u(s.params.state),city:u(s.params.city)};o.value=t}if(s.query){const t=s.query,r={categories:t.categories?t.categories.split(","):[],prices:t.prices?t.prices.split(","):[],delivery:t.delivery?t.delivery.split(","):[]};g.state.filter.selected=r}await f.actions.fetchCategories()}),e.watch(()=>g.state.filter.selected,(t,r)=>{const a={...s.query};Object.keys(r).forEach(l=>{a[l]&&delete a[l]});const i=Object.fromEntries(Object.entries(t).filter(([l,c])=>Array.isArray(c)&&c.length>0).map(([l,c])=>[l,c.join(",")]));Object.assign(a,i),n.push({query:a})},{deep:!0});function p(t){return t.toLowerCase().replace(/ /g,"-").replace(/[^a-z0-9-]/g,"")}e.watch(()=>m.state.position,t=>{const r={...n.currentRoute.value};let a={country:p(t.country),state:p(t.state),city:p(t.city)};r.params=a,n.replace(r)},{deep:!0});const d={locale:"en",messages:{en:{meta:{title:"Marketplace – Shop Our Wide Selection of Quality Weed for Delivery",description:"Browse our marketplace of top-grade weed strains and choose from a variety of delivery options. Order now and have your favorite strains delivered straight to your door. Safe, fast, and reliable."},breadcrumbs:{home:"Home",store:"Marketplace"},categoriesTitle:"Category",categories:[],sort:{price:"By price",newest:"By newest",popularity:"By popularity"},filters:{title:"Filters",price:{title:"Price",from:"From",to:"To"},filters:[],reset:"Reset Filters"}},ru:{meta:{title:"Маркетплейс – Выбирайте из нашего ассортимента качественной травки для доставки",description:"Маркетплейс – Изучите наши продукты высокого качества и выбирайте из различных вариантов доставки. Закажите сейчас и получите свои любимые сорта на дом. Безопасно, быстро и надежно."},breadcrumbs:{home:"Главная",store:"Маркетплейс"},categoriesTitle:"Категория",categories:[],sort:{price:"По цене",newest:"По новизне",popularity:"По популярности"},filters:{title:"Фильтры",price:{title:"Цена",from:"От",to:"До"},filters:[],reset:"Сбросить фильтры"}}}};return f.state.all.forEach(t=>{t.localization.forEach(r=>{d.messages[r.locale].categories.push(r.text)})}),v.useI18n(d),(t,r)=>{const a=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",h,[e.createElementVNode("div",k,[e.createElementVNode("div",_,[e.createElementVNode("h2",w,[b,o.value.city||o.value.state||o.value.country?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:r[0]||(r[0]=i=>{m.state.isOpenLocationPopup=!0}),class:"t-semi t-main"},[o.value.city?(e.openBlock(),e.createElementBlock("span",B,e.toDisplayString(o.value.city)+", ",1)):e.createCommentVNode("",!0),o.value.state?(e.openBlock(),e.createElementBlock("span",E,e.toDisplayString(o.value.state)+", ",1)):e.createCommentVNode("",!0),o.value.country?(e.openBlock(),e.createElementBlock("span",q,e.toDisplayString(o.value.country),1)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("span",{key:1,onClick:r[1]||(r[1]=i=>{m.state.isOpenLocationPopup=!0}),class:"t-semi t-main"}," The World "))])]),e.createVNode(a,null,{default:e.withCtx(({Component:i,route:l})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i),{ref:"page",key:l.path,localPosition:o.value,apiKey:t.GOOGLE_MAPS_API_KEY,locale:t.$i18n.locale,class:""},null,8,["localPosition","apiKey","locale"]))]),_:2},1024)]),_:1})])])}}};exports.default=C;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("vue-router"),v=require("vue-i18n");;/* empty css */;/* empty css */;/* empty css */;/* empty css */const m=require("../../../globals/views/store/globals.cjs"),f=require("../../../products/store/categories.cjs"),g=require("../../../marketplace/store/marketplace.cjs"),h={class:"w-100 h-100"},k={class:"h-100 w-100 flex-nowrap flex-column flex gap-thin"},_={class:"pos-absolute z-index-2 w-100"},w={class:"bg-black-transp-25 t-white pd-small w-100 bg-blur-big mn-l-auto mn-r-auto t-center"},b=e.createElementVNode("span",{class:""},"Weed in ",-1),B={key:0},E={key:1},q={key:2},C={__name:"Spots",setup(O){const s=y.useRoute(),n=y.useRouter(),o=e.ref({city:null,state:null,country:null});function u(t){return t.replace(/-/g," ").replace(/\b\w/g,r=>r.toUpperCase())}e.onMounted(async()=>{if(s.params){let t={country:u(s.params.country),state:u(s.params.state),city:u(s.params.city)};o.value=t}if(s.query){const t=s.query,r={categories:t.categories?t.categories.split(","):[],prices:t.prices?t.prices.split(","):[],delivery:t.delivery?t.delivery.split(","):[]};g.state.filter.selected=r}await f.actions.fetchCategories()}),e.watch(()=>g.state.filter.selected,(t,r)=>{const a={...s.query};Object.keys(r).forEach(l=>{a[l]&&delete a[l]});const i=Object.fromEntries(Object.entries(t).filter(([l,c])=>Array.isArray(c)&&c.length>0).map(([l,c])=>[l,c.join(",")]));Object.assign(a,i),n.push({query:a})},{deep:!0});function p(t){return t.toLowerCase().replace(/ /g,"-").replace(/[^a-z0-9-]/g,"")}e.watch(()=>m.state.position,t=>{const r={...n.currentRoute.value};let a={country:p(t.country),state:p(t.state),city:p(t.city)};r.params=a,n.replace(r)},{deep:!0});const d={locale:"en",messages:{en:{meta:{title:"Marketplace – Shop Our Wide Selection of Quality Weed for Delivery",description:"Browse our marketplace of top-grade weed strains and choose from a variety of delivery options. Order now and have your favorite strains delivered straight to your door. Safe, fast, and reliable."},breadcrumbs:{home:"Home",store:"Marketplace"},categoriesTitle:"Category",categories:[],sort:{price:"By price",newest:"By newest",popularity:"By popularity"},filters:{title:"Filters",price:{title:"Price",from:"From",to:"To"},filters:[],reset:"Reset Filters"}},ru:{meta:{title:"Маркетплейс – Выбирайте из нашего ассортимента качественной травки для доставки",description:"Маркетплейс – Изучите наши продукты высокого качества и выбирайте из различных вариантов доставки. Закажите сейчас и получите свои любимые сорта на дом. Безопасно, быстро и надежно."},breadcrumbs:{home:"Главная",store:"Маркетплейс"},categoriesTitle:"Категория",categories:[],sort:{price:"По цене",newest:"По новизне",popularity:"По популярности"},filters:{title:"Фильтры",price:{title:"Цена",from:"От",to:"До"},filters:[],reset:"Сбросить фильтры"}}}};return f.state.all.forEach(t=>{t.localization.forEach(r=>{d.messages[r.locale].categories.push(r.text)})}),v.useI18n(d),(t,r)=>{const a=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",h,[e.createElementVNode("div",k,[e.createElementVNode("div",_,[e.createElementVNode("h2",w,[b,o.value.city||o.value.state||o.value.country?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:r[0]||(r[0]=i=>{m.state.isOpenLocationPopup=!0}),class:"t-semi t-main"},[o.value.city?(e.openBlock(),e.createElementBlock("span",B,e.toDisplayString(o.value.city)+", ",1)):e.createCommentVNode("",!0),o.value.state?(e.openBlock(),e.createElementBlock("span",E,e.toDisplayString(o.value.state)+", ",1)):e.createCommentVNode("",!0),o.value.country?(e.openBlock(),e.createElementBlock("span",q,e.toDisplayString(o.value.country),1)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("span",{key:1,onClick:r[1]||(r[1]=i=>{m.state.isOpenLocationPopup=!0}),class:"t-semi t-main"}," The World "))])]),e.createVNode(a,null,{default:e.withCtx(({Component:i,route:l})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i),{ref:"page",key:l.path,localPosition:o.value,apiKey:t.GOOGLE_MAPS_API_KEY,locale:t.$i18n.locale,class:""},null,8,["localPosition","apiKey","locale"]))]),_:2},1024)]),_:1})])])}}};exports.default=C;
@@ -5,7 +5,7 @@ import { useI18n as j } from "vue-i18n";
5
5
  /* empty css */
6
6
  /* empty css */
7
7
  /* empty css */
8
- import { state as h } from "../../../globals/store/globals.js";
8
+ import { state as h } from "../../../globals/views/store/globals.js";
9
9
  import { actions as q, state as R } from "../../../products/store/categories.js";
10
10
  import { state as b } from "../../../marketplace/store/marketplace.js";
11
11
  const T = { class: "w-100 h-100" }, V = { class: "h-100 w-100 flex-nowrap flex-column flex gap-thin" }, z = { class: "pos-absolute z-index-2 w-100" }, A = { class: "bg-black-transp-25 t-white pd-small w-100 bg-blur-big mn-l-auto mn-r-auto t-center" }, F = /* @__PURE__ */ p("span", { class: "" }, "Weed in ", -1), L = { key: 0 }, M = { key: 1 }, W = { key: 2 }, X = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),I=require("vue-router"),V=require("../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.cjs"),j=require("../../../../components/Button/Button.vue2.cjs"),b=require("../../../organizations/store/organizations.cjs"),p=require("../../../globals/store/globals.cjs"),h=require("../../../marketplace/store/marketplace.cjs");;/* empty css */const K=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),F=y=>(o.pushScopeId("data-v-b8675d5a"),y=y(),o.popScopeId(),y),G={class:"h-100 w-100 pos-relative"},Z={class:"w-100 pos-absolute z-index-2 pos-b-10"},H=F(()=>o.createElementVNode("div",{id:"map",class:"h-100 w-100 pos-relative o-hidden"},null,-1)),U={__name:"Map",props:{localPosition:Object,location:{type:Object,default:()=>({lat:15.87,lng:100.9925})},address:{type:String,default:null},apiKey:String,locale:{type:String,default:"en"}},setup(y){const w=I.useRouter(),e=I.useRoute(),E=y;let n=o.ref(null),c=o.ref([]),O=o.ref(0),L=o.ref(50),u=o.ref({lat:0,lng:0}),_=o.ref(null);async function C(){try{const a=await(await fetch("https://ip2c.org/s")).text();if(!a||a[0]!=="1")throw new Error("Unable to fetch the country");const t=a.split(";");if(t.length<4)throw new Error("Invalid response format");return console.log(t[3]),t[3]}catch(s){throw console.error(s),s}}o.onMounted(async()=>{var m,g,v,T,d,k,q,x;let s=parseFloat(e.query.lat||((g=(m=p.state.position)==null?void 0:m.location)==null?void 0:g.lat)),a=parseFloat(e.query.lng||((T=(v=p.state.position)==null?void 0:v.location)==null?void 0:T.lng)),t;e.params.location||(d=p.state.position)!=null&&d.location?t=15:e.params.country||(k=p.state.position)!=null&&k.country?t=9:e.params.state||(q=p.state.position)!=null&&q.state?t=6:e.params.city||(x=p.state.position)!=null&&x.city?t=14:t=2,new V.Loader({apiKey:E.apiKey,version:"weekly",libraries:["places"],language:"en"}).load().then(async()=>{if(!s||!a){let r;const i=new google.maps.Geocoder;try{r=await C()}catch{r="Thailand",console.log(error)}try{const l=await i.geocode({address:r});console.log(l),l?(s=l.results[0].geometry.location.lat(),a=l.results[0].geometry.location.lng(),t=6):console.error("No results found for the country code.")}catch(l){console.error("Error getting coordinates from country code:",l)}}if(!s&&!a&&(e.params.country||e.params.state||e.params.city)){const r=new google.maps.Geocoder,i=[e.params.city,e.params.state,e.params.country].filter(Boolean).join(", ");try{const l=await r.geocode({address:i});l[0]&&(s=l[0].geometry.location.lat(),a=l[0].geometry.location.lng())}catch(l){console.error("Error getting coordinates:",l)}}O.value+=L.value;const z={country:e.params.country,state:e.params.state,city:e.params.city,categories:e.query.categories,prices:e.query.prices,delivery:e.query.delivery,sortParam:e.query.sortParam||h.state.sort.param,sortOrder:e.query.sortOrder||h.state.sort.order,location:{coordinates:[a,s]},locationRadius:1e3,limit:500};console.log(z);const P=await b.actions.read(z);b.state.all=[...b.state.all,...P],n.value=new google.maps.Map(document.getElementById("map"),{mapTypeControl:!1,fullscreenControl:!1,styles:[{elementType:"geometry",stylers:[{color:"#212121"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{elementType:"labels.text.stroke",stylers:[{color:"#212121"}]},{featureType:"administrative",elementType:"geometry",stylers:[{color:"#757575"},{visibility:"off"}]},{featureType:"administrative.country",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"administrative.land_parcel",stylers:[{visibility:"off"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"administrative.neighborhood",stylers:[]},{featureType:"poi",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#181818"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"poi.park",elementType:"labels.text.stroke",stylers:[{color:"#1b1b1b"}]},{featureType:"road",elementType:"geometry.fill",stylers:[{color:"#2c2c2c"}]},{featureType:"road",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#8a8a8a"}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#373737"}]},{featureType:"road.arterial",elementType:"labels",stylers:[]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#3c3c3c"}]},{featureType:"road.highway",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road.highway.controlled_access",elementType:"geometry",stylers:[{color:"#4e4e4e"}]},{featureType:"road.local",stylers:[]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"transit",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#000000"}]},{featureType:"water",elementType:"labels.text",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#3d3d3d"}]}],center:{lat:s,lng:a},zoom:parseInt(e.query.zoom||t||"12")});for(let r of c.value)r.setMap(null);c.value=[],c.value=P.map(r=>{var l;let i=(l=r.spots[0])==null?void 0:l.location;if(i&&i.type==="Point"){let[N,R]=i.coordinates,S="/marker_2.png";r.products&&r.products.length===0&&(S="/marker.png");const M=new google.maps.Marker({position:{lng:N,lat:R},map:n.value,icon:{url:S,scaledSize:new google.maps.Size(32,48),origin:new google.maps.Point(0,0),anchor:new google.maps.Point(16,48)}});return M.addListener("click",()=>{w.push({name:"Organization",params:{_id:r._id}})}),M}return null}).filter(r=>r!==null),google.maps.event.addListener(n.value,"center_changed",()=>{let r=n.value.getCenter();u.value={lat:r.lat(),lng:r.lng()}}),google.maps.event.addListener(n.value,"zoom_changed",()=>{_.value=n.value.getZoom()})})});const B=async()=>{const s={country:e.params.country,state:e.params.state,city:e.params.city,categories:e.query.categories,prices:e.query.prices,delivery:e.query.delivery,sortParam:e.query.sortParam||h.state.sort.param,sortOrder:e.query.sortOrder||h.state.sort.order,locationRadius:8e3/_.value,limit:100,location:{type:"Point",coordinates:[u.value.lng,u.value.lat]}};console.log([u.value.lng,u.value.lat]);try{const a=await b.actions.read(s);for(let t of c.value)t.setMap(null);c.value=[],c.value=a.map(t=>{var m;let f=(m=t.spots[0])==null?void 0:m.location;if(f&&f.type==="Point"){let[g,v]=f.coordinates,T=t.products&&t.products.length>0?"/marker_2.png":"/marker.png";const d=new google.maps.Marker({position:{lng:g,lat:v},map:n.value,icon:{url:T,scaledSize:new google.maps.Size(32,48),origin:new google.maps.Point(0,0),anchor:new google.maps.Point(16,48)}});return d.addListener("click",()=>{w.push({name:"Organization",params:{_id:t._id}})}),d}return null}).filter(t=>t!==null)}catch(a){console.error("Error fetching organizations:",a)}};return(s,a)=>(o.openBlock(),o.createElementBlock("div",G,[o.createElementVNode("div",Z,[o.createVNode(j.default,{submit:B,class:"mn-l-auto mn-r-auto bg-black t-white w-min-20 button"},{default:o.withCtx(()=>[o.createTextVNode(" Search in This Location ")]),_:1})]),H]))}},A=K.default(U,[["__scopeId","data-v-b8675d5a"]]);exports.default=A;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),I=require("vue-router"),V=require("../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.cjs"),j=require("../../../../components/Button/Button.vue2.cjs"),b=require("../../../organizations/store/organizations.cjs"),p=require("../../../globals/views/store/globals.cjs"),h=require("../../../marketplace/store/marketplace.cjs");;/* empty css */const K=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),F=y=>(o.pushScopeId("data-v-3b081dcc"),y=y(),o.popScopeId(),y),G={class:"h-100 w-100 pos-relative"},Z={class:"w-100 pos-absolute z-index-2 pos-b-10"},H=F(()=>o.createElementVNode("div",{id:"map",class:"h-100 w-100 pos-relative o-hidden"},null,-1)),U={__name:"Map",props:{localPosition:Object,location:{type:Object,default:()=>({lat:15.87,lng:100.9925})},address:{type:String,default:null},apiKey:String,locale:{type:String,default:"en"}},setup(y){const w=I.useRouter(),e=I.useRoute(),E=y;let n=o.ref(null),c=o.ref([]),O=o.ref(0),L=o.ref(50),u=o.ref({lat:0,lng:0}),_=o.ref(null);async function C(){try{const a=await(await fetch("https://ip2c.org/s")).text();if(!a||a[0]!=="1")throw new Error("Unable to fetch the country");const t=a.split(";");if(t.length<4)throw new Error("Invalid response format");return console.log(t[3]),t[3]}catch(s){throw console.error(s),s}}o.onMounted(async()=>{var m,g,v,T,d,k,q,x;let s=parseFloat(e.query.lat||((g=(m=p.state.position)==null?void 0:m.location)==null?void 0:g.lat)),a=parseFloat(e.query.lng||((T=(v=p.state.position)==null?void 0:v.location)==null?void 0:T.lng)),t;e.params.location||(d=p.state.position)!=null&&d.location?t=15:e.params.country||(k=p.state.position)!=null&&k.country?t=9:e.params.state||(q=p.state.position)!=null&&q.state?t=6:e.params.city||(x=p.state.position)!=null&&x.city?t=14:t=2,new V.Loader({apiKey:E.apiKey,version:"weekly",libraries:["places"],language:"en"}).load().then(async()=>{if(!s||!a){let r;const i=new google.maps.Geocoder;try{r=await C()}catch{r="Thailand",console.log(error)}try{const l=await i.geocode({address:r});console.log(l),l?(s=l.results[0].geometry.location.lat(),a=l.results[0].geometry.location.lng(),t=6):console.error("No results found for the country code.")}catch(l){console.error("Error getting coordinates from country code:",l)}}if(!s&&!a&&(e.params.country||e.params.state||e.params.city)){const r=new google.maps.Geocoder,i=[e.params.city,e.params.state,e.params.country].filter(Boolean).join(", ");try{const l=await r.geocode({address:i});l[0]&&(s=l[0].geometry.location.lat(),a=l[0].geometry.location.lng())}catch(l){console.error("Error getting coordinates:",l)}}O.value+=L.value;const z={country:e.params.country,state:e.params.state,city:e.params.city,categories:e.query.categories,prices:e.query.prices,delivery:e.query.delivery,sortParam:e.query.sortParam||h.state.sort.param,sortOrder:e.query.sortOrder||h.state.sort.order,location:{coordinates:[a,s]},locationRadius:1e3,limit:500};console.log(z);const P=await b.actions.read(z);b.state.all=[...b.state.all,...P],n.value=new google.maps.Map(document.getElementById("map"),{mapTypeControl:!1,fullscreenControl:!1,styles:[{elementType:"geometry",stylers:[{color:"#212121"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{elementType:"labels.text.stroke",stylers:[{color:"#212121"}]},{featureType:"administrative",elementType:"geometry",stylers:[{color:"#757575"},{visibility:"off"}]},{featureType:"administrative.country",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"administrative.land_parcel",stylers:[{visibility:"off"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"administrative.neighborhood",stylers:[]},{featureType:"poi",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#181818"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"poi.park",elementType:"labels.text.stroke",stylers:[{color:"#1b1b1b"}]},{featureType:"road",elementType:"geometry.fill",stylers:[{color:"#2c2c2c"}]},{featureType:"road",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#8a8a8a"}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#373737"}]},{featureType:"road.arterial",elementType:"labels",stylers:[]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#3c3c3c"}]},{featureType:"road.highway",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road.highway.controlled_access",elementType:"geometry",stylers:[{color:"#4e4e4e"}]},{featureType:"road.local",stylers:[]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"transit",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#000000"}]},{featureType:"water",elementType:"labels.text",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#3d3d3d"}]}],center:{lat:s,lng:a},zoom:parseInt(e.query.zoom||t||"12")});for(let r of c.value)r.setMap(null);c.value=[],c.value=P.map(r=>{var l;let i=(l=r.spots[0])==null?void 0:l.location;if(i&&i.type==="Point"){let[N,R]=i.coordinates,S="/marker_2.png";r.products&&r.products.length===0&&(S="/marker.png");const M=new google.maps.Marker({position:{lng:N,lat:R},map:n.value,icon:{url:S,scaledSize:new google.maps.Size(32,48),origin:new google.maps.Point(0,0),anchor:new google.maps.Point(16,48)}});return M.addListener("click",()=>{w.push({name:"Organization",params:{_id:r._id}})}),M}return null}).filter(r=>r!==null),google.maps.event.addListener(n.value,"center_changed",()=>{let r=n.value.getCenter();u.value={lat:r.lat(),lng:r.lng()}}),google.maps.event.addListener(n.value,"zoom_changed",()=>{_.value=n.value.getZoom()})})});const B=async()=>{const s={country:e.params.country,state:e.params.state,city:e.params.city,categories:e.query.categories,prices:e.query.prices,delivery:e.query.delivery,sortParam:e.query.sortParam||h.state.sort.param,sortOrder:e.query.sortOrder||h.state.sort.order,locationRadius:8e3/_.value,limit:100,location:{type:"Point",coordinates:[u.value.lng,u.value.lat]}};console.log([u.value.lng,u.value.lat]);try{const a=await b.actions.read(s);for(let t of c.value)t.setMap(null);c.value=[],c.value=a.map(t=>{var m;let f=(m=t.spots[0])==null?void 0:m.location;if(f&&f.type==="Point"){let[g,v]=f.coordinates,T=t.products&&t.products.length>0?"/marker_2.png":"/marker.png";const d=new google.maps.Marker({position:{lng:g,lat:v},map:n.value,icon:{url:T,scaledSize:new google.maps.Size(32,48),origin:new google.maps.Point(0,0),anchor:new google.maps.Point(16,48)}});return d.addListener("click",()=>{w.push({name:"Organization",params:{_id:t._id}})}),d}return null}).filter(t=>t!==null)}catch(a){console.error("Error fetching organizations:",a)}};return(s,a)=>(o.openBlock(),o.createElementBlock("div",G,[o.createElementVNode("div",Z,[o.createVNode(j.default,{submit:B,class:"mn-l-auto mn-r-auto bg-black t-white w-min-20 button"},{default:o.withCtx(()=>[o.createTextVNode(" Search in This Location ")]),_:1})]),H]))}},A=K.default(U,[["__scopeId","data-v-3b081dcc"]]);exports.default=A;
@@ -3,11 +3,11 @@ import { useRouter as D, useRoute as H } from "vue-router";
3
3
  import { Loader as J } from "../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.js";
4
4
  import Q from "../../../../components/Button/Button.vue2.js";
5
5
  import { actions as I, state as M } from "../../../organizations/store/organizations.js";
6
- import { state as p } from "../../../globals/store/globals.js";
6
+ import { state as p } from "../../../globals/views/store/globals.js";
7
7
  import { state as h } from "../../../marketplace/store/marketplace.js";
8
8
  /* empty css */
9
9
  import W from "../../../../../../_virtual/_plugin-vue_export-helper.js";
10
- const X = (y) => (U("data-v-b8675d5a"), y = y(), A(), y), Y = { class: "h-100 w-100 pos-relative" }, ee = { class: "w-100 pos-absolute z-index-2 pos-b-10" }, te = /* @__PURE__ */ X(() => /* @__PURE__ */ E("div", {
10
+ const X = (y) => (U("data-v-3b081dcc"), y = y(), A(), y), Y = { class: "h-100 w-100 pos-relative" }, ee = { class: "w-100 pos-absolute z-index-2 pos-b-10" }, te = /* @__PURE__ */ X(() => /* @__PURE__ */ E("div", {
11
11
  id: "map",
12
12
  class: "h-100 w-100 pos-relative o-hidden"
13
13
  }, null, -1)), oe = {
@@ -471,7 +471,7 @@ const X = (y) => (U("data-v-b8675d5a"), y = y(), A(), y), Y = { class: "h-100 w-
471
471
  te
472
472
  ]));
473
473
  }
474
- }, me = /* @__PURE__ */ W(oe, [["__scopeId", "data-v-b8675d5a"]]);
474
+ }, me = /* @__PURE__ */ W(oe, [["__scopeId", "data-v-3b081dcc"]]);
475
475
  export {
476
476
  me as default
477
477
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../globals/components/layouts/Empty.vue.cjs"),r=require("../components/layouts/Spots.vue.cjs"),e=require("../../auth/views/middlewares/auth.validation.cjs"),o={path:"spots",component:t.default,meta:{title:{en:"Spots",ru:"Места"},breadcrumbs:{hide:!0,hidden:!0}},children:[{path:":country?",component:r.default,meta:{title:{en:"Spots",ru:"Места"},header_theme:"dark",footer_theme:"dark"},children:[{path:":state?",name:"Spots tate",component:()=>Promise.resolve().then(()=>require("../components/pages/Map.vue.cjs")),children:[{path:":city?",name:"Spots City",component:()=>Promise.resolve().then(()=>require("../components/pages/Map.vue.cjs"))}]}]},{path:":_id/spots/create",name:"Spot Creation",meta:{title:"Создание точки"},beforeEnter:[e.requiresAuth],component:()=>Promise.resolve().then(()=>require("../components/pages/SpotEdit.vue.cjs"))},{path:":_id/spots/:spot",name:"Spot",meta:{title:"Точка"},beforeEnter:[e.requiresAuth],component:()=>Promise.resolve().then(()=>require("../components/pages/Spot.vue.cjs"))},{path:":_id/spots/:spot/edit",name:"Spot Edit",meta:{title:"Редактирование точки"},beforeEnter:[e.requiresAuth],component:()=>Promise.resolve().then(()=>require("../components/pages/SpotEdit.vue.cjs"))}]};exports.default=o;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../globals/views/components/layouts/Empty.vue.cjs"),r=require("../components/layouts/Spots.vue.cjs"),e=require("../../auth/views/middlewares/auth.validation.cjs"),o={path:"spots",component:t.default,meta:{title:{en:"Spots",ru:"Места"},breadcrumbs:{hide:!0,hidden:!0}},children:[{path:":country?",component:r.default,meta:{title:{en:"Spots",ru:"Места"},header_theme:"dark",footer_theme:"dark"},children:[{path:":state?",name:"Spots tate",component:()=>Promise.resolve().then(()=>require("../components/pages/Map.vue.cjs")),children:[{path:":city?",name:"Spots City",component:()=>Promise.resolve().then(()=>require("../components/pages/Map.vue.cjs"))}]}]},{path:":_id/spots/create",name:"Spot Creation",meta:{title:"Создание точки"},beforeEnter:[e.requiresAuth],component:()=>Promise.resolve().then(()=>require("../components/pages/SpotEdit.vue.cjs"))},{path:":_id/spots/:spot",name:"Spot",meta:{title:"Точка"},beforeEnter:[e.requiresAuth],component:()=>Promise.resolve().then(()=>require("../components/pages/Spot.vue.cjs"))},{path:":_id/spots/:spot/edit",name:"Spot Edit",meta:{title:"Редактирование точки"},beforeEnter:[e.requiresAuth],component:()=>Promise.resolve().then(()=>require("../components/pages/SpotEdit.vue.cjs"))}]};exports.default=o;
@@ -1,4 +1,4 @@
1
- import e from "../../globals/components/layouts/Empty.vue.js";
1
+ import e from "../../globals/views/components/layouts/Empty.vue.js";
2
2
  import o from "../components/layouts/Spots.vue.js";
3
3
  import { requiresAuth as t } from "../../auth/views/middlewares/auth.validation.js";
4
4
  const n = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("axios");require("../../../../../node_modules/js-cookie/dist/js.cookie.cjs");const i=require("vue"),a=require("../../globals/store/globals.cjs"),s=n.create({baseURL:process.env.API_URL,withCredentials:!0});s.defaults.withCredentials=!0;const o=i.reactive({spots:[],spot:{status:"unpublished",organization:"",profile:{photo:"",name:"",description:"",categories:[]},position:{address:void 0,location:void 0,hide:!1},address:void 0,location:void 0,worktime:[],delivery:[],payment:[],members:[],subspots:[]},error:null}),c={async readOne(t){try{const e=await s.get(`/api/spots/get/${t}`);o.spot=e.data}catch(e){a.setError(e)}},async read(t){try{const e=await s.get(`/api/spots/${t}`);return o.spots=e.data,e.data}catch(e){a.setError(e)}},async create(t,e){try{const r=await s.post(`/api/spots/${t}/create`,e);o.spot=r.data}catch(r){a.setError(r)}},async update(t,e){try{await s.post(`/api/spots/${t}/update`,e)}catch(r){a.setError(r)}},async delete(t,e){try{await s.delete(`/api/spots/${t}/delete`,{data:{_id:e}})}catch(r){a.setError(r)}}};i.watch(o,(t,e)=>{});exports.actions=c;exports.state=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("axios");require("../../../../../node_modules/js-cookie/dist/js.cookie.cjs");const i=require("vue"),a=require("../../globals/views/store/globals.cjs"),s=n.create({baseURL:process.env.API_URL,withCredentials:!0});s.defaults.withCredentials=!0;const o=i.reactive({spots:[],spot:{status:"unpublished",organization:"",profile:{photo:"",name:"",description:"",categories:[]},position:{address:void 0,location:void 0,hide:!1},address:void 0,location:void 0,worktime:[],delivery:[],payment:[],members:[],subspots:[]},error:null}),c={async readOne(t){try{const e=await s.get(`/api/spots/get/${t}`);o.spot=e.data}catch(e){a.setError(e)}},async read(t){try{const e=await s.get(`/api/spots/${t}`);return o.spots=e.data,e.data}catch(e){a.setError(e)}},async create(t,e){try{const r=await s.post(`/api/spots/${t}/create`,e);o.spot=r.data}catch(r){a.setError(r)}},async update(t,e){try{await s.post(`/api/spots/${t}/update`,e)}catch(r){a.setError(r)}},async delete(t,e){try{await s.delete(`/api/spots/${t}/delete`,{data:{_id:e}})}catch(r){a.setError(r)}}};i.watch(o,(t,e)=>{});exports.actions=c;exports.state=o;
@@ -1,7 +1,7 @@
1
1
  import i from "axios";
2
2
  import "../../../../../node_modules/js-cookie/dist/js.cookie.js";
3
3
  import { reactive as n, watch as p } from "vue";
4
- import { setError as r } from "../../globals/store/globals.js";
4
+ import { setError as r } from "../../globals/views/store/globals.js";
5
5
  const s = i.create({ baseURL: process.env.API_URL, withCredentials: !0 });
6
6
  s.defaults.withCredentials = !0;
7
7
  const o = n({
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router"),o=require("../../../../globals/components/sections/SectionPageTitle.vue.cjs"),u=require("../../../../../components/Feed/Feed.vue.cjs"),i=require("../../store/payments.store.cjs");;/* empty css */const c={class:"pd-thin"},d={class:"bg-light pos-relative pd-medium radius-big"},m={__name:"Payments",setup(p){const s=n.useRoute();n.useRouter();const a=e.ref("all");return(_,r)=>(e.openBlock(),e.createElementBlock("div",c,[e.createVNode(o.default,{title:"Payments","onUpdate:tabs_current":r[0]||(r[0]=t=>a.value=t),tabs_current:a.value,tabs:[{name:"All",value:"all"},{name:"Created",value:"created"},{name:"Proccesing",value:"processing"},{name:"Finished",value:"finished"},{name:"Canceled",value:"canceled"},{name:"Refunded",value:"refunded"}],actions:[{to:{name:"PaymentsCreate"},label:"Create Payment"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["tabs_current"]),e.createVNode(u.default,{search:!0,states:{empty:{title:"No Payments Found",description:"Currently, there are no payments."}},store:{read:t=>i.actions.read(t)},options:{limit:15,owner:e.unref(s).params._id,...a.value!=="all"&&{type:a.value}},class:"gap-thin cols-3"},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,l=>(e.openBlock(),e.createElementBlock("div",d,e.toDisplayString(l),1))),256))]),_:1},8,["store","options"])]))}};exports.default=m;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router"),o=require("../../../../globals/views/components/sections/SectionPageTitle.vue.cjs"),u=require("../../../../../components/Feed/Feed.vue.cjs"),i=require("../../store/payments.store.cjs");;/* empty css */const c={class:"pd-thin"},d={class:"bg-light pos-relative pd-medium radius-big"},m={__name:"Payments",setup(p){const s=n.useRoute();n.useRouter();const a=e.ref("all");return(_,r)=>(e.openBlock(),e.createElementBlock("div",c,[e.createVNode(o.default,{title:"Payments","onUpdate:tabs_current":r[0]||(r[0]=t=>a.value=t),tabs_current:a.value,tabs:[{name:"All",value:"all"},{name:"Created",value:"created"},{name:"Proccesing",value:"processing"},{name:"Finished",value:"finished"},{name:"Canceled",value:"canceled"},{name:"Refunded",value:"refunded"}],actions:[{to:{name:"PaymentsCreate"},label:"Create Payment"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["tabs_current"]),e.createVNode(u.default,{search:!0,states:{empty:{title:"No Payments Found",description:"Currently, there are no payments."}},store:{read:t=>i.actions.read(t)},options:{limit:15,owner:e.unref(s).params._id,...a.value!=="all"&&{type:a.value}},class:"gap-thin cols-3"},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,l=>(e.openBlock(),e.createElementBlock("div",d,e.toDisplayString(l),1))),256))]),_:1},8,["store","options"])]))}};exports.default=m;
@@ -1,6 +1,6 @@
1
1
  import { ref as i, openBlock as a, createElementBlock as r, createVNode as s, unref as m, withCtx as u, Fragment as c, renderList as d, toDisplayString as p } from "vue";
2
2
  import { useRoute as _, useRouter as f } from "vue-router";
3
- import g from "../../../../globals/components/sections/SectionPageTitle.vue.js";
3
+ import g from "../../../../globals/views/components/sections/SectionPageTitle.vue.js";
4
4
  import v from "../../../../../components/Feed/Feed.vue.js";
5
5
  import { actions as b } from "../../store/payments.store.js";
6
6
  /* empty css */
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),n=require("axios"),r=require("../../../globals/store/globals.cjs"),s=n.create({baseURL:process.env.API_URL,withCredentials:!0}),a=o.reactive({current:{Status:""},data:{}}),c={async read(){try{const e=await s.get("/api/payments");return a.data=e.data,e.data}catch(e){throw r.setError(e),e}},async create(e){try{const t=await s.post("/api/payments",e);return a.data[t.data._id]=t.data,t.data}catch(t){throw r.setError(t),t}},async update(e){try{const t=await s.post("/api/payments",e);return a.current=t.data,t.data}catch(t){throw r.setError(t),t}},async delete(e){try{const t=await s.delete("/api/payments");return delete a.data[e],t.data}catch(t){throw r.setError(t),t}}};o.watch(a,e=>{});exports.actions=c;exports.state=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),n=require("axios"),r=require("../../../globals/views/store/globals.cjs"),s=n.create({baseURL:process.env.API_URL,withCredentials:!0}),a=o.reactive({current:{Status:""},data:{}}),c={async read(){try{const e=await s.get("/api/payments");return a.data=e.data,e.data}catch(e){throw r.setError(e),e}},async create(e){try{const t=await s.post("/api/payments",e);return a.data[t.data._id]=t.data,t.data}catch(t){throw r.setError(t),t}},async update(e){try{const t=await s.post("/api/payments",e);return a.current=t.data,t.data}catch(t){throw r.setError(t),t}},async delete(e){try{const t=await s.delete("/api/payments");return delete a.data[e],t.data}catch(t){throw r.setError(t),t}}};o.watch(a,e=>{});exports.actions=c;exports.state=a;
@@ -1,6 +1,6 @@
1
1
  import { reactive as o, watch as n } from "vue";
2
2
  import c from "axios";
3
- import { setError as e } from "../../../globals/store/globals.js";
3
+ import { setError as e } from "../../../globals/views/store/globals.js";
4
4
  const s = c.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = o({
5
5
  current: {
6
6
  Status: ""
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("axios"),l=require("vue"),i=require("../../../../../node_modules/bignumber.js/bignumber.cjs");require("../../../globals/store/globals.cjs");const a="/api/crypto",w=2e7,s=u.create({baseURL:process.env.API_URL,withCredentials:!0}),e=l.reactive({rewards:[],tokenBalance:"0",share:"0",account:null,web3:null,depositInfo:null,depositRequestIsActive:!1,websocket:null,config:null,chosenNetwork:null}),n=l.reactive({remaining:0,interval:null}),c={loadConfig:async()=>{await s.get(`${a}/deposit/config`).then(t=>{e.config=t.data,e.chosenNetwork={name:"polygon-WDT",value:{token:e.config.polygon.tokens.WDT,network:"polygon"}}}).catch(t=>console.error(t))},connectWebSocket:()=>{e.websocket=new WebSocket(process.env.WSS_URL),e.websocket.onmessage=t=>{const o=JSON.parse(t.data);if(o.id===e.depositInfo.id){const r=e.depositInfo.confirmations;e.depositInfo=o,e.depositInfo.confirmations=r}o.hash===e.depositInfo.tx.hash&&(e.depositInfo.confirmations=o.confirmations)},e.websocket.onerror=t=>console.error(t)},disconnectWebSocket:()=>{e.websocket&&(e.websocket.close(),e.websocket=null)},listRewards:async()=>{try{const t=await s.get(`${a}/rewards`);e.rewards=t.data,e.tokenBalance=t.data.reduce((o,r)=>o.plus(r.amount),new i.BigNumber("0")).toString(),e.share=new i.BigNumber(e.tokenBalance).div(w).multipliedBy(100).toFormat(6)}catch(t){console.error(t)}},collectRewards:async()=>{try{await s.post(`${a}/collect`,{recipient:e.account}),await c.listRewards()}catch(t){console.error(t)}},disconnectWallet:async()=>{try{await window.ethereum.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),e.account=null}catch(t){console.error(t)}},connectWallet:async()=>{try{const t=await e.web3.eth.requestAccounts();e.account=t[0]}catch(t){console.error(t)}},tryReconnectWallet:async()=>{try{(await e.web3.eth.getAccounts()).length>0&&await c.connectWallet()}catch(t){console.error(t)}},requestCryptoDeposit:async t=>{e.depositRequestIsActive=!0,await s.post(`${a}/deposit`,{network:e.chosenNetwork.value.network,amount:new i.BigNumber(t).shiftedBy(8).toString(),token:e.chosenNetwork.value.token}).then(o=>{e.depositInfo=o.data;const d=new Date(o.data.createdAt).getTime()+e.config[e.chosenNetwork.value.network].waitingTime;n.remaining=Math.floor((d-Date.now())/1e3),n.interval=setInterval(()=>{n.remaining-=1,n.remaining===0&&clearInterval(n.interval)},1e3)}).catch(o=>console.error(o)),e.depositRequestIsActive=!1,c.connectWebSocket()},stopTimer:()=>{clearInterval(n.interval)},cancelDeposit:async()=>{await s.post(`${a}/deposit/cancel`,{id:e.depositInfo.id}).then(()=>c.stopTimer()).then(()=>c.disconnectWebSocket()).catch(t=>console.error(t))}};exports.actions=c;exports.state=e;exports.timer=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("axios"),l=require("vue"),i=require("../../../../../node_modules/bignumber.js/bignumber.cjs");require("../../../globals/views/store/globals.cjs");const a="/api/crypto",w=2e7,s=u.create({baseURL:process.env.API_URL,withCredentials:!0}),e=l.reactive({rewards:[],tokenBalance:"0",share:"0",account:null,web3:null,depositInfo:null,depositRequestIsActive:!1,websocket:null,config:null,chosenNetwork:null}),n=l.reactive({remaining:0,interval:null}),c={loadConfig:async()=>{await s.get(`${a}/deposit/config`).then(t=>{e.config=t.data,e.chosenNetwork={name:"polygon-WDT",value:{token:e.config.polygon.tokens.WDT,network:"polygon"}}}).catch(t=>console.error(t))},connectWebSocket:()=>{e.websocket=new WebSocket(process.env.WSS_URL),e.websocket.onmessage=t=>{const o=JSON.parse(t.data);if(o.id===e.depositInfo.id){const r=e.depositInfo.confirmations;e.depositInfo=o,e.depositInfo.confirmations=r}o.hash===e.depositInfo.tx.hash&&(e.depositInfo.confirmations=o.confirmations)},e.websocket.onerror=t=>console.error(t)},disconnectWebSocket:()=>{e.websocket&&(e.websocket.close(),e.websocket=null)},listRewards:async()=>{try{const t=await s.get(`${a}/rewards`);e.rewards=t.data,e.tokenBalance=t.data.reduce((o,r)=>o.plus(r.amount),new i.BigNumber("0")).toString(),e.share=new i.BigNumber(e.tokenBalance).div(w).multipliedBy(100).toFormat(6)}catch(t){console.error(t)}},collectRewards:async()=>{try{await s.post(`${a}/collect`,{recipient:e.account}),await c.listRewards()}catch(t){console.error(t)}},disconnectWallet:async()=>{try{await window.ethereum.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),e.account=null}catch(t){console.error(t)}},connectWallet:async()=>{try{const t=await e.web3.eth.requestAccounts();e.account=t[0]}catch(t){console.error(t)}},tryReconnectWallet:async()=>{try{(await e.web3.eth.getAccounts()).length>0&&await c.connectWallet()}catch(t){console.error(t)}},requestCryptoDeposit:async t=>{e.depositRequestIsActive=!0,await s.post(`${a}/deposit`,{network:e.chosenNetwork.value.network,amount:new i.BigNumber(t).shiftedBy(8).toString(),token:e.chosenNetwork.value.token}).then(o=>{e.depositInfo=o.data;const d=new Date(o.data.createdAt).getTime()+e.config[e.chosenNetwork.value.network].waitingTime;n.remaining=Math.floor((d-Date.now())/1e3),n.interval=setInterval(()=>{n.remaining-=1,n.remaining===0&&clearInterval(n.interval)},1e3)}).catch(o=>console.error(o)),e.depositRequestIsActive=!1,c.connectWebSocket()},stopTimer:()=>{clearInterval(n.interval)},cancelDeposit:async()=>{await s.post(`${a}/deposit/cancel`,{id:e.depositInfo.id}).then(()=>c.stopTimer()).then(()=>c.disconnectWebSocket()).catch(t=>console.error(t))}};exports.actions=c;exports.state=e;exports.timer=n;
@@ -1,7 +1,7 @@
1
1
  import d from "axios";
2
2
  import { reactive as l } from "vue";
3
3
  import { BigNumber as i } from "../../../../../node_modules/bignumber.js/bignumber.js";
4
- import "../../../globals/store/globals.js";
4
+ import "../../../globals/views/store/globals.js";
5
5
  const c = "/api/crypto", p = 2e7, a = d.create({ baseURL: process.env.API_URL, withCredentials: !0 }), e = l({
6
6
  rewards: [],
7
7
  tokenBalance: "0",