@ozdao/martyrs 0.2.496 → 0.2.498

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/dist/_virtual/index.cjs +4 -4
  2. package/dist/_virtual/index.js +4 -4
  3. package/dist/_virtual/index2.cjs +4 -4
  4. package/dist/_virtual/index2.js +4 -4
  5. package/dist/builder.cjs +42 -41
  6. package/dist/builder.js +44 -43
  7. package/dist/martyrs/src/components/Block/Block.vue.cjs +1 -1
  8. package/dist/martyrs/src/components/Block/Block.vue.js +1 -1
  9. package/dist/martyrs/src/components/Button/{Button.vue.cjs → Button.vue2.cjs} +2 -2
  10. package/dist/martyrs/src/components/Button/Button.vue2.cjs.map +1 -0
  11. package/dist/martyrs/src/components/Button/{Button.vue.js → Button.vue2.js} +2 -2
  12. package/dist/martyrs/src/components/Button/{Button.vue.cjs.map → Button.vue2.js.map} +1 -1
  13. package/dist/martyrs/src/components/Feed/Feed.vue.cjs +1 -1
  14. package/dist/martyrs/src/components/Feed/Feed.vue.js +1 -1
  15. package/dist/martyrs/src/components/FieldTags/FieldTags.vue.cjs +1 -1
  16. package/dist/martyrs/src/components/FieldTags/FieldTags.vue.js +1 -1
  17. package/dist/martyrs/src/components/Menu/{Menu.vue.cjs → Menu.vue2.cjs} +2 -2
  18. package/dist/martyrs/src/components/Menu/Menu.vue2.cjs.map +1 -0
  19. package/dist/martyrs/src/components/Menu/{Menu.vue.js → Menu.vue2.js} +2 -2
  20. package/dist/martyrs/src/components/Menu/Menu.vue2.js.map +1 -0
  21. package/dist/martyrs/src/components/Select/{Select.vue2.cjs → Select.vue.cjs} +2 -2
  22. package/dist/martyrs/src/components/Select/{Select.vue2.js.map → Select.vue.cjs.map} +1 -1
  23. package/dist/martyrs/src/components/Select/{Select.vue2.js → Select.vue.js} +2 -2
  24. package/dist/martyrs/src/components/Select/Select.vue.js.map +1 -0
  25. package/dist/martyrs/src/components/Tooltip/{Tooltip.vue.cjs → Tooltip.vue2.cjs} +2 -2
  26. package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.cjs.map +1 -0
  27. package/dist/martyrs/src/components/Tooltip/{Tooltip.vue.js → Tooltip.vue2.js} +2 -2
  28. package/dist/martyrs/src/components/Tooltip/{Tooltip.vue.cjs.map → Tooltip.vue2.js.map} +1 -1
  29. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +1 -1
  30. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +1 -1
  31. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -1
  32. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
  33. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +2 -2
  34. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +2 -2
  35. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.cjs +1 -1
  36. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +1 -1
  37. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs +1 -1
  38. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +1 -1
  39. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +1 -1
  40. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +1 -1
  41. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs +1 -1
  42. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +1 -1
  43. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.cjs +1 -1
  44. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
  45. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.cjs +1 -1
  46. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +1 -1
  47. package/dist/martyrs/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  48. package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js +1 -1
  49. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
  50. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +1 -1
  51. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +2 -2
  52. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  53. package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  54. package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  55. package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  56. package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  57. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  58. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  59. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  60. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  61. package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +1 -1
  62. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +1 -1
  63. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +2 -2
  64. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  65. package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.cjs +1 -1
  66. package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.js +1 -1
  67. package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.cjs +5 -1
  68. package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.cjs.map +1 -1
  69. package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.js +5 -1
  70. package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.js.map +1 -1
  71. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +2 -2
  72. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +2 -2
  73. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.cjs +1 -1
  74. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.js +1 -1
  75. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs +1 -1
  76. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +1 -1
  77. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -1
  78. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +1 -1
  79. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs +2 -2
  80. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js +2 -2
  81. package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
  82. package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
  83. package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.cjs +1 -1
  84. package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +1 -1
  85. package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.cjs +1 -1
  86. package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +1 -1
  87. package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.cjs +1 -1
  88. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.cjs +2 -2
  89. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +2 -2
  90. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.cjs +1 -1
  91. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +1 -1
  92. package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.cjs +1 -1
  93. package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js +1 -1
  94. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.cjs +1 -1
  95. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +1 -1
  96. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.cjs +1 -1
  97. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +1 -1
  98. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.cjs +2 -2
  99. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +2 -2
  100. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.cjs +2 -2
  101. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +2 -2
  102. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs +1 -1
  103. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +1 -1
  104. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.cjs +1 -1
  105. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +1 -1
  106. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.cjs +2 -2
  107. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +2 -2
  108. package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs +1 -1
  109. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +1 -1
  110. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.cjs +1 -1
  111. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +1 -1
  112. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.cjs +1 -1
  113. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +1 -1
  114. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs +1 -1
  115. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +1 -1
  116. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.cjs +1 -1
  117. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +1 -1
  118. package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs +1 -1
  119. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +1 -1
  120. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.cjs +1 -1
  121. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +1 -1
  122. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.cjs +14 -19
  123. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.cjs.map +1 -1
  124. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +15 -20
  125. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js.map +1 -1
  126. package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.cjs +2 -2
  127. package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.cjs.map +1 -1
  128. package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.js +2 -2
  129. package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.js.map +1 -1
  130. package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.cjs +2 -2
  131. package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.cjs.map +1 -1
  132. package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.js +2 -2
  133. package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.js.map +1 -1
  134. package/dist/martyrs/src/modules/music/router/music.cjs +3 -3
  135. package/dist/martyrs/src/modules/music/router/music.js +3 -3
  136. package/dist/martyrs/src/modules/notifications/notifications.client.cjs +8 -3
  137. package/dist/martyrs/src/modules/notifications/notifications.client.cjs.map +1 -1
  138. package/dist/martyrs/src/modules/notifications/notifications.client.js +8 -3
  139. package/dist/martyrs/src/modules/notifications/notifications.client.js.map +1 -1
  140. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.cjs +1 -1
  141. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.js +1 -1
  142. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +3 -3
  143. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +3 -3
  144. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
  145. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
  146. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  147. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
  148. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +2 -2
  149. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
  150. package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  151. package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  152. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  153. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  154. package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  155. package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  156. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  157. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  158. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +2 -2
  159. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  160. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +2 -2
  161. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +2 -2
  162. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  163. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  164. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
  165. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
  166. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +2 -2
  167. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  168. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  169. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  170. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.cjs +2 -2
  171. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  172. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  173. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  174. package/dist/martyrs/src/modules/organizations/router/organizations.cjs +1 -1
  175. package/dist/martyrs/src/modules/organizations/router/organizations.js +1 -1
  176. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -1
  177. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
  178. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs +2 -2
  179. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +2 -2
  180. package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
  181. package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
  182. package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.cjs +1 -1
  183. package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.js +1 -1
  184. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  185. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +1 -1
  186. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +2 -2
  187. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
  188. package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +1 -1
  189. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +1 -1
  190. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +2 -2
  191. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
  192. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.cjs +1 -1
  193. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +1 -1
  194. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.cjs +2 -2
  195. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +2 -2
  196. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.cjs +2 -2
  197. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +2 -2
  198. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.cjs +1 -1
  199. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
  200. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.cjs +1 -1
  201. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +1 -1
  202. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  203. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  204. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.cjs +1 -1
  205. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +1 -1
  206. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.cjs +2 -2
  207. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  208. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  209. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
  210. package/dist/martyrs/src/modules/spots/components/pages/Map.vue.cjs +1 -1
  211. package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
  212. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +2 -2
  213. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
  214. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs +2 -2
  215. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +2 -2
  216. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  217. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
  218. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.cjs +3 -3
  219. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
  220. package/dist/style.css +85 -81
  221. package/package.json +1 -1
  222. package/src/builder/rspack/rspack.config.ssr.client.js +40 -40
  223. package/src/modules/globals/views/classes/globals.websocket.js +6 -1
  224. package/src/modules/music/components/player/MusicPlayer.vue +24 -21
  225. package/src/modules/music/components/player/TrackProgress.vue +9 -8
  226. package/src/modules/music/components/player/VolumeControl.vue +3 -2
  227. package/src/modules/notifications/notifications.client.js +7 -0
  228. package/dist/martyrs/src/components/Button/Button.vue.js.map +0 -1
  229. package/dist/martyrs/src/components/Menu/Menu.vue.cjs.map +0 -1
  230. package/dist/martyrs/src/components/Menu/Menu.vue.js.map +0 -1
  231. package/dist/martyrs/src/components/Select/Select.vue2.cjs.map +0 -1
  232. package/dist/martyrs/src/components/Tooltip/Tooltip.vue.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"VolumeControl.vue.js","sources":["../../../../../../../src/modules/music/components/player/VolumeControl.vue"],"sourcesContent":["<!-- components/player/VolumeControl.vue -->\n<template>\n <div class=\"volume-control\">\n <div \n ref=\"volumeBarContainer\"\n class=\"volume-bar-container\"\n @click=\"setVolume\"\n @mousedown=\"startVolumeChange\"\n @mousemove=\"updateVolumePosition\"\n @mouseup=\"endVolumeChange\"\n @mouseleave=\"endVolumeChange\"\n >\n <div \n class=\"volume-track\"\n :style=\"{ \n background: `linear-gradient(to right, rgb(var(--main)) 0%, rgb(var(--main)) ${volumePercentage}%, rgb(79, 79, 79) ${volumePercentage}%, rgb(79, 79, 79) 100%)`\n }\"\n >\n <div \n class=\"volume-thumb\"\n :style=\"{ \n left: `${volumePercentage}%`,\n opacity: muted ? 0 : 1\n }\"\n ></div>\n </div>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref, computed } from 'vue';\n\n// Import player store\nimport { state as playerState, actions as playerActions } from '../../store/player.js';\n\n// Refs\nconst volumeBarContainer = ref(null);\nconst isChangingVolume = ref(false);\n\n// Computed properties\nconst volume = computed(() => playerState.volume);\nconst muted = computed(() => playerState.muted);\nconst volumePercentage = computed(() => {\n if (muted.value) return 0;\n return volume.value * 100;\n});\n\n// Methods\nconst calculateVolume = (event) => {\n if (!volumeBarContainer.value) return 0;\n \n const rect = volumeBarContainer.value.getBoundingClientRect();\n const offsetX = event.clientX - rect.left;\n \n return Math.max(0, Math.min(1, offsetX / rect.width));\n};\n\nconst setVolume = (event) => {\n const newVolume = calculateVolume(event);\n playerActions.setVolume(newVolume);\n \n // Unmute if was muted\n if (muted.value && newVolume > 0) {\n playerActions.toggleMute();\n }\n};\n\nconst startVolumeChange = (event) => {\n isChangingVolume.value = true;\n setVolume(event);\n};\n\nconst updateVolumePosition = (event) => {\n if (isChangingVolume.value) {\n setVolume(event);\n }\n};\n\nconst endVolumeChange = () => {\n isChangingVolume.value = false;\n};\n</script>\n\n<style scoped>\n.volume-control {\n width: 100%;\n}\n\n.volume-bar-container {\n width: 100%;\n height: 12px;\n display: flex;\n align-items: center;\n cursor: pointer;\n padding: 4px 0;\n}\n\n.volume-track {\n position: relative;\n width: 100%;\n height: 4px;\n border-radius: 2px;\n transition: height 0.2s ease;\n}\n\n.volume-thumb {\n position: absolute;\n top: 50%;\n width: 12px;\n height: 12px;\n background: rgb(var(--white));\n border-radius: 50%;\n transform: translate(-50%, -50%);\n transition: opacity 0.2s ease;\n opacity: 0;\n}\n\n.volume-bar-container:hover .volume-track {\n height: 6px;\n}\n\n.volume-bar-container:hover .volume-thumb {\n opacity: 1 !important;\n}\n\n/* Muted state */\n.volume-track.muted {\n opacity: 0.5;\n}\n</style>"],"names":["playerState","playerActions"],"mappings":";;;;;;;;AAqCA,UAAM,qBAAqB,IAAI,IAAI;AACnC,UAAM,mBAAmB,IAAI,KAAK;AAGlC,UAAM,SAAS,SAAS,MAAMA,MAAY,MAAM;AAChD,UAAM,QAAQ,SAAS,MAAMA,MAAY,KAAK;AAC9C,UAAM,mBAAmB,SAAS,MAAM;AACtC,UAAI,MAAM,MAAO,QAAO;AACxB,aAAO,OAAO,QAAQ;AAAA,IACxB,CAAC;AAGD,UAAM,kBAAkB,CAAC,UAAU;AACjC,UAAI,CAAC,mBAAmB,MAAO,QAAO;AAEtC,YAAM,OAAO,mBAAmB,MAAM,sBAAqB;AAC3D,YAAM,UAAU,MAAM,UAAU,KAAK;AAErC,aAAO,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,UAAU,KAAK,KAAK,CAAC;AAAA,IACtD;AAEA,UAAM,YAAY,CAAC,UAAU;AAC3B,YAAM,YAAY,gBAAgB,KAAK;AACvCC,cAAc,UAAU,SAAS;AAGjC,UAAI,MAAM,SAAS,YAAY,GAAG;AAChCA,gBAAc,WAAU;AAAA,MAC1B;AAAA,IACF;AAEA,UAAM,oBAAoB,CAAC,UAAU;AACnC,uBAAiB,QAAQ;AACzB,gBAAU,KAAK;AAAA,IACjB;AAEA,UAAM,uBAAuB,CAAC,UAAU;AACtC,UAAI,iBAAiB,OAAO;AAC1B,kBAAU,KAAK;AAAA,MACjB;AAAA,IACF;AAEA,UAAM,kBAAkB,MAAM;AAC5B,uBAAiB,QAAQ;AAAA,IAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"VolumeControl.vue.js","sources":["../../../../../../../src/modules/music/components/player/VolumeControl.vue"],"sourcesContent":["<!-- components/player/VolumeControl.vue -->\n<template>\n <div class=\"volume-control\">\n <div \n ref=\"volumeBarContainer\"\n class=\"volume-bar-container\"\n @click=\"setVolume\"\n @mousedown=\"startVolumeChange\"\n @mousemove=\"updateVolumePosition\"\n @mouseup=\"endVolumeChange\"\n @mouseleave=\"endVolumeChange\"\n >\n <div \n class=\"volume-track\"\n :style=\"{ \n background: `linear-gradient(to right, rgb(var(--black)) 0%, rgb(var(--black)) ${volumePercentage}%, rgb(var(--grey)) ${volumePercentage}%, rgb(var(--grey)) 100%)`\n }\"\n >\n <div \n class=\"volume-thumb\"\n :style=\"{ \n left: `${volumePercentage}%`,\n opacity: muted ? 0 : 1\n }\"\n ></div>\n </div>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref, computed } from 'vue';\n\n// Import player store\nimport { state as playerState, actions as playerActions } from '../../store/player.js';\n\n// Refs\nconst volumeBarContainer = ref(null);\nconst isChangingVolume = ref(false);\n\n// Computed properties\nconst volume = computed(() => playerState.volume);\nconst muted = computed(() => playerState.muted);\nconst volumePercentage = computed(() => {\n if (muted.value) return 0;\n return volume.value * 100;\n});\n\n// Methods\nconst calculateVolume = (event) => {\n if (!volumeBarContainer.value) return 0;\n \n const rect = volumeBarContainer.value.getBoundingClientRect();\n const offsetX = event.clientX - rect.left;\n \n return Math.max(0, Math.min(1, offsetX / rect.width));\n};\n\nconst setVolume = (event) => {\n const newVolume = calculateVolume(event);\n playerActions.setVolume(newVolume);\n \n // Unmute if was muted\n if (muted.value && newVolume > 0) {\n playerActions.toggleMute();\n }\n};\n\nconst startVolumeChange = (event) => {\n isChangingVolume.value = true;\n setVolume(event);\n};\n\nconst updateVolumePosition = (event) => {\n if (isChangingVolume.value) {\n setVolume(event);\n }\n};\n\nconst endVolumeChange = () => {\n isChangingVolume.value = false;\n};\n</script>\n\n<style scoped>\n.volume-control {\n width: 100%;\n}\n\n.volume-bar-container {\n width: 100%;\n height: 12px;\n display: flex;\n align-items: center;\n cursor: pointer;\n padding: 4px 0;\n}\n\n.volume-track {\n position: relative;\n width: 100%;\n height: 4px;\n border-radius: 2px;\n transition: height 0.2s ease;\n}\n\n.volume-thumb {\n position: absolute;\n top: 50%;\n width: 12px;\n height: 12px;\n background: rgb(var(--black));\n border: 1px solid rgba(var(--white),0.1);\n border-radius: 50%;\n transform: translate(-50%, -50%);\n transition: opacity 0.2s ease;\n opacity: 0;\n}\n\n.volume-bar-container:hover .volume-track {\n height: 6px;\n}\n\n.volume-bar-container:hover .volume-thumb {\n opacity: 1 !important;\n}\n\n/* Muted state */\n.volume-track.muted {\n opacity: 0.5;\n}\n</style>"],"names":["playerState","playerActions"],"mappings":";;;;;;;;AAqCA,UAAM,qBAAqB,IAAI,IAAI;AACnC,UAAM,mBAAmB,IAAI,KAAK;AAGlC,UAAM,SAAS,SAAS,MAAMA,MAAY,MAAM;AAChD,UAAM,QAAQ,SAAS,MAAMA,MAAY,KAAK;AAC9C,UAAM,mBAAmB,SAAS,MAAM;AACtC,UAAI,MAAM,MAAO,QAAO;AACxB,aAAO,OAAO,QAAQ;AAAA,IACxB,CAAC;AAGD,UAAM,kBAAkB,CAAC,UAAU;AACjC,UAAI,CAAC,mBAAmB,MAAO,QAAO;AAEtC,YAAM,OAAO,mBAAmB,MAAM,sBAAqB;AAC3D,YAAM,UAAU,MAAM,UAAU,KAAK;AAErC,aAAO,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,UAAU,KAAK,KAAK,CAAC;AAAA,IACtD;AAEA,UAAM,YAAY,CAAC,UAAU;AAC3B,YAAM,YAAY,gBAAgB,KAAK;AACvCC,cAAc,UAAU,SAAS;AAGjC,UAAI,MAAM,SAAS,YAAY,GAAG;AAChCA,gBAAc,WAAU;AAAA,MAC1B;AAAA,IACF;AAEA,UAAM,oBAAoB,CAAC,UAAU;AACnC,uBAAiB,QAAQ;AACzB,gBAAU,KAAK;AAAA,IACjB;AAEA,UAAM,uBAAuB,CAAC,UAAU;AACtC,UAAI,iBAAiB,OAAO;AAC1B,kBAAU,KAAK;AAAA,MACjB;AAAA,IACF;AAEA,UAAM,kBAAkB,MAAM;AAC5B,uBAAiB,QAAQ;AAAA,IAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -5,18 +5,18 @@ require("vue-router");
5
5
  require("../../globals/views/store/globals.cjs");
6
6
  ;/* empty css */
7
7
  ;/* empty css */
8
- ;/* empty css */
8
+ ;/* empty css */
9
9
  ;/* empty css */
10
10
  ;/* empty css */
11
11
  ;/* empty css */
12
12
  ;/* empty css */
13
13
  ;/* empty css */
14
14
  ;/* empty css */
15
- ;/* empty css */
15
+ ;/* empty css */
16
16
  ;/* empty css */
17
17
  ;/* empty css */
18
18
  ;/* empty css */
19
- ;/* empty css */
19
+ ;/* empty css */
20
20
  require("axios");
21
21
  ;/* empty css */
22
22
  require("../store/playlists.cjs");
@@ -3,18 +3,18 @@ import "vue-router";
3
3
  import "../../globals/views/store/globals.js";
4
4
  /* empty css */
5
5
  /* empty css */
6
- /* empty css */
6
+ /* empty css */
7
7
  /* empty css */
8
8
  /* empty css */
9
9
  /* empty css */
10
10
  /* empty css */
11
11
  /* empty css */
12
12
  /* empty css */
13
- /* empty css */
13
+ /* empty css */
14
14
  /* empty css */
15
15
  /* empty css */
16
16
  /* empty css */
17
- /* empty css */
17
+ /* empty css */
18
18
  import "axios";
19
19
  /* empty css */
20
20
  import "../store/playlists.js";
@@ -158,6 +158,11 @@ class NotificationManager {
158
158
  return;
159
159
  }
160
160
  console.log("Connecting to websockets via notifications");
161
+ globals_websocket.default.initialize({
162
+ wsUrl: app.config.globalProperties.WSS_URL,
163
+ maxReconnectAttempts: 10,
164
+ reconnectDelay: 2e3
165
+ });
161
166
  await globals_websocket.default.connect(userId);
162
167
  globals_websocket.default.removeModuleListeners("notification");
163
168
  await globals_websocket.default.subscribeModule("notification");
@@ -199,12 +204,12 @@ const SSRUtils = {
199
204
  }
200
205
  }
201
206
  };
202
- function initializeNotifications(app, store, router, options = {}) {
207
+ function initializeNotifications(app2, store, router, options = {}) {
203
208
  const route = options.route || "User Profile Root";
204
209
  router.addRoute(route, notifications_router.default);
205
210
  store.addStore("notifications", notifications_store);
206
211
  if (options.wsUrl) {
207
- globals_websocket.default.initialize({ wsUrl: app.config.globalProperties.WSS_URL });
212
+ globals_websocket.default.initialize({ wsUrl: app2.config.globalProperties.WSS_URL });
208
213
  }
209
214
  const notificationManager = new NotificationManager(store, {
210
215
  enablePush: options.enablePush !== false,
@@ -233,7 +238,7 @@ function initializeNotifications(app, store, router, options = {}) {
233
238
  }
234
239
  );
235
240
  }
236
- app.provide("useNotifications", () => {
241
+ app2.provide("useNotifications", () => {
237
242
  return {
238
243
  ...vue.toRefs(store.notifications.state),
239
244
  ...store.notifications.actions,
@@ -1 +1 @@
1
- {"version":3,"file":"notifications.client.cjs","sources":["../../../../../src/modules/notifications/notifications.client.js"],"sourcesContent":["import { toRefs, watch } from 'vue';\n// Router import\nimport routerNotifications from './router/notifications.router.js';\n// Store\nimport * as storeNotifications from './store/notifications.store.js';\n// Auth store import\n// Global WebSocket import\nimport globalWebSocket from '@martyrs/src/modules/globals/views/classes/globals.websocket.js';\n// Layouts\nimport NotificationsLayout from './components/layouts/NotificationsLayout.vue';\n// Sections\nimport NotificationPreferences from './components/sections/NotificationPreferences.vue';\nimport NotificationsList from './components/sections/NotificationsList.vue';\n// Pages\nimport Notifications from './components/pages/Notifications.vue';\n// Components\nimport NotificationItem from './components/blocks/NotificationItem.vue';\nimport NotificationBadge from './components/elements/NotificationBadge.vue';\n\n/**\n * Capacitor Push Notification handler\n */\nclass CapacitorPushHandler {\n constructor(store) {\n this.store = store;\n this.pushNotifications = null;\n this.device = null;\n this.isInitialized = false;\n }\n\n /**\n * Initialize Capacitor plugins\n */\n async initialize() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n try {\n // Dynamic imports to prevent errors in web environment\n const { Capacitor } = await import('@capacitor/core');\n const { PushNotifications } = await import('@capacitor/push-notifications');\n const { Device } = await import('@capacitor/device');\n\n this.capacitor = Capacitor;\n this.pushNotifications = PushNotifications;\n this.device = Device;\n\n // Only proceed if running on a native platform\n if (!this.capacitor.isNativePlatform()) {\n return false;\n }\n\n this.isInitialized = true;\n return true;\n } catch (error) {\n console.error('Error importing Capacitor plugins:', error);\n return false;\n }\n }\n\n /**\n * Request permission and register for push notifications\n */\n async requestPermissions() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n if (!this.isInitialized) {\n const initialized = await this.initialize();\n if (!initialized) return false;\n }\n\n try {\n // Request permission\n const permissionResult = await this.pushNotifications.requestPermissions();\n if (permissionResult.receive !== 'granted') {\n console.log('Push notification permission denied');\n return false;\n }\n\n // Set up event listeners\n this._setupListeners();\n\n // Register with Apple/Google\n await this.pushNotifications.register();\n return true;\n } catch (error) {\n console.error('Error requesting push notification permissions:', error);\n return false;\n }\n }\n\n /**\n * Setup push notification event listeners\n */\n _setupListeners() {\n // Registration event\n this.pushNotifications.addListener('registration', this._handleRegistration.bind(this));\n\n // Notification received event\n this.pushNotifications.addListener('pushNotificationReceived', this._handleNotificationReceived.bind(this));\n\n // Notification action performed event\n this.pushNotifications.addListener('pushNotificationActionPerformed', this._handleNotificationAction.bind(this));\n }\n\n /**\n * Handle registration token received\n */\n async _handleRegistration(token) {\n try {\n // Get device info\n const deviceInfo = await this.device.getInfo();\n const deviceId = await this.device.getId();\n\n // Prepare device data\n const deviceData = {\n deviceId: deviceId.uuid,\n deviceType: deviceInfo.platform.toLowerCase(),\n deviceToken: token.value,\n };\n\n // Register device with backend\n await this.store.notifications.actions.registerDevice(deviceData);\n } catch (error) {\n console.error('Error handling push registration:', error);\n }\n }\n\n /**\n * Handle received notification\n */\n _handleNotificationReceived(notification) {\n // Add notification to store\n this.store.notifications.actions.addLocalNotification({\n title: notification.title,\n body: notification.body,\n data: notification.data || {},\n });\n }\n\n /**\n * Handle notification action (when user taps on notification)\n */\n _handleNotificationAction(actionData) {\n if (actionData.notification && actionData.notification.data) {\n this.store.notifications.actions.handleNotificationAction(actionData.notification.data);\n }\n }\n\n /**\n * Remove push notification listeners\n */\n removeListeners() {\n if (typeof window === 'undefined') {\n return;\n }\n\n if (this.pushNotifications) {\n this.pushNotifications.removeAllListeners();\n }\n }\n}\n\n/**\n * Notification Manager for coordinating WebSocket and Push notifications\n */\n\nclass NotificationManager {\n constructor(store, options = {}) {\n this.store = store;\n this.options = options;\n this.pushHandler = new CapacitorPushHandler(store);\n this.initialized = false;\n this.isServer = typeof window === 'undefined';\n }\n\n async registerWebPush(store) {\n if (!('Notification' in window) || !('serviceWorker' in navigator) || !('PushManager' in window)) {\n console.warn('Web Push не поддерживается в браузере');\n return;\n }\n\n const permission = await Notification.requestPermission();\n if (permission !== 'granted') {\n console.warn('Разрешение на уведомления не получено');\n return;\n }\n\n const registration = await navigator.serviceWorker.ready;\n const subscription = await registration.pushManager.subscribe({\n userVisibleOnly: true,\n applicationServerKey: 'BJtNnRrx05VQS0abnkHC-8gHJWpnmoqC_iQveENCmZOZIs-adWzqAiqFCdGVVd7CbiaLW-Q5iuIBDRgM9G-VnKg',\n });\n\n console.log('New subscription:', JSON.stringify(subscription));\n\n // Отправь подписку на сервер\n await store.notifications.actions.registerDevice({\n deviceToken: JSON.stringify(subscription),\n deviceType: 'web',\n });\n }\n\n async initialize() {\n if (this.initialized || this.isServer) return;\n\n const userId = this.store.auth.state.user?._id;\n if (!userId) {\n console.warn('Cannot initialize notifications: No user ID found in auth store');\n return;\n }\n\n console.log('Connecting to websockets via notifications');\n await globalWebSocket.connect(userId);\n\n globalWebSocket.removeModuleListeners('notification');\n\n await globalWebSocket.subscribeModule('notification');\n\n globalWebSocket.addEventListener(\n 'notification',\n data => {\n this.store.notifications.actions.addLocalNotification(data.data);\n },\n { module: 'notification' }\n );\n\n // 🎯 Опционально включаем push\n if (this.options.enablePush !== false) {\n await this.pushHandler.requestPermissions();\n await this.registerWebPush(this.store);\n }\n\n this.initialized = true;\n\n // ✅ Загружаем список уведомлений из API\n await this.store.notifications.actions.getNotifications(userId);\n }\n\n disconnect() {\n if (this.isServer) return;\n\n globalWebSocket.removeModuleListeners('notification');\n this.pushHandler.removeListeners();\n this.initialized = false;\n }\n}\n\n/**\n * Server-side utility for pre-fetching notification data\n */\nconst SSRUtils = {\n /**\n * Pre-fetch notifications for SSR\n * @param {Object} store - Store instance\n * @param {Object} context - SSR context\n */\n async prefetchNotifications(store, context) {\n try {\n const userId = store.auth.state.user?._id;\n if (userId) {\n // Fetch notifications without WebSocket or push setup\n await store.notifications.actions.getNotifications(userId);\n }\n } catch (error) {\n console.error('Error pre-fetching notifications for SSR:', error);\n }\n },\n};\n\n/**\n * Function to initialize the notifications module\n * @param {Object} app - Vue app instance\n * @param {Object} store - Vuex/Pinia store\n * @param {Object} router - Vue Router instance\n * @param {Object} options - Configuration options\n */\nfunction initializeNotifications(app, store, router, options = {}) {\n // Add routes and store\n const route = options.route || 'User Profile Root';\n router.addRoute(route, routerNotifications);\n store.addStore('notifications', storeNotifications);\n\n // Initialize global WebSocket if needed\n if (options.wsUrl) {\n globalWebSocket.initialize({ wsUrl: app.config.globalProperties.WSS_URL });\n }\n\n // Create notification manager\n const notificationManager = new NotificationManager(store, {\n enablePush: options.enablePush !== false,\n maxReconnectAttempts: options.maxReconnectAttempts || 5,\n reconnectDelay: options.reconnectDelay || 3000,\n pingInterval: options.pingInterval || 30000,\n });\n\n // Attach notification manager to store for access in components\n store.notificationManager = notificationManager;\n\n // Don't auto-initialize on server\n const isServer = typeof window === 'undefined';\n const autoInit = !isServer && options.autoInit !== false;\n\n if (autoInit) {\n // Initialize after auth is confirmed\n const isAuthenticated = store.auth.state.access.status;\n const userId = store.auth.state.user?._id;\n\n if (isAuthenticated && userId) {\n notificationManager.initialize();\n }\n\n // Watch for user login/logout using auth store\n watch(\n () => store.auth.state.access.status,\n isAuthenticated => {\n if (isAuthenticated) {\n notificationManager.initialize();\n } else {\n notificationManager.disconnect();\n store.notifications.mutations.resetNotifications();\n }\n }\n );\n }\n\n // Provide composable for components to access notification functionality\n app.provide('useNotifications', () => {\n return {\n ...toRefs(store.notifications.state),\n ...store.notifications.actions,\n ...store.notifications.mutations,\n init: notificationManager.initialize.bind(notificationManager),\n disconnect: notificationManager.disconnect.bind(notificationManager),\n isServer,\n };\n });\n\n return notificationManager;\n}\n\n// Module export\nconst ModuleNotifications = {\n initialize: initializeNotifications,\n SSR: SSRUtils, // Export SSR utilities\n views: {\n store: {\n storeNotifications,\n },\n router: {\n routerNotifications,\n },\n components: {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n },\n },\n};\n\n// Component exports\nexport {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n // Sections\n NotificationsList,\n // SSR Utilities\n SSRUtils,\n};\n\nexport default ModuleNotifications;\n"],"names":["globalWebSocket","routerNotifications","storeNotifications","watch","isAuthenticated","toRefs","NotificationBadge","NotificationItem","NotificationsList","NotificationPreferences","Notifications","NotificationsLayout"],"mappings":";;;;;;;;;;;;AAsBA,MAAM,qBAAqB;AAAA,EACzB,YAAY,OAAO;AACjB,SAAK,QAAQ;AACb,SAAK,oBAAoB;AACzB,SAAK,SAAS;AACd,SAAK,gBAAgB;AAAA,EACvB;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,aAAa;AAEjB,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,IACT;AAEA,QAAI;AAEF,YAAM,EAAE,UAAS,IAAK,MAAM,QAAA,QAAA,EAAA,KAAA,MAAA,QAAO,+FAAiB,CAAA;AACpD,YAAM,EAAE,kBAAiB,IAAK,MAAM,QAAA,QAAA,EAAA,KAAA,MAAA,QAAO,wJAA+B,CAAA;AAC1E,YAAM,EAAE,OAAM,IAAK,MAAM,QAAA,QAAA,EAAA,KAAA,MAAA,QAAO,gIAAmB,CAAA;A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AAM,cAAc;AAAA,MACvB,GAAG,MAAM,cAAc;AAAA,MACvB,MAAM,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MAC7D,YAAY,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MACnE;AAAA,IACN;AAAA,EACE,CAAC;AAED,SAAO;AACT;AAGK,MAAC,sBAAsB;AAAA,EAC1B,YAAY;AAAA,EACZ,KAAK;AAAA;AAAA,EACL,OAAO;AAAA,IACL,OAAO;AAAA,MACX,oBAAMH;AAAAA,IACN;AAAA,IACI,QAAQ;AAAA,MACZ,qBAAMD,qBAAAA;AAAAA,IACN;AAAA,IACI,YAAY;AAAA;AAAA,MAEhB,mBAAMK,kBAAAA;AAAAA;AAAAA,MAEN,kBAAMC,iBAAAA;AAAAA;AAAAA,MAEN,mBAAMC,kBAAAA;AAAAA,MACN,yBAAMC,wBAAAA;AAAAA;AAAAA,MAEN,eAAMC,cAAAA;AAAAA;AAAAA,MAEN,qBAAMC,oBAAAA;AAAAA,IACN;AAAA,EACA;AACA;;;;;;;;;"}
1
+ {"version":3,"file":"notifications.client.cjs","sources":["../../../../../src/modules/notifications/notifications.client.js"],"sourcesContent":["import { toRefs, watch } from 'vue';\n// Router import\nimport routerNotifications from './router/notifications.router.js';\n// Store\nimport * as storeNotifications from './store/notifications.store.js';\n// Auth store import\n// Global WebSocket import\nimport globalWebSocket from '@martyrs/src/modules/globals/views/classes/globals.websocket.js';\n// Layouts\nimport NotificationsLayout from './components/layouts/NotificationsLayout.vue';\n// Sections\nimport NotificationPreferences from './components/sections/NotificationPreferences.vue';\nimport NotificationsList from './components/sections/NotificationsList.vue';\n// Pages\nimport Notifications from './components/pages/Notifications.vue';\n// Components\nimport NotificationItem from './components/blocks/NotificationItem.vue';\nimport NotificationBadge from './components/elements/NotificationBadge.vue';\n\n/**\n * Capacitor Push Notification handler\n */\nclass CapacitorPushHandler {\n constructor(store) {\n this.store = store;\n this.pushNotifications = null;\n this.device = null;\n this.isInitialized = false;\n }\n\n /**\n * Initialize Capacitor plugins\n */\n async initialize() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n try {\n // Dynamic imports to prevent errors in web environment\n const { Capacitor } = await import('@capacitor/core');\n const { PushNotifications } = await import('@capacitor/push-notifications');\n const { Device } = await import('@capacitor/device');\n\n this.capacitor = Capacitor;\n this.pushNotifications = PushNotifications;\n this.device = Device;\n\n // Only proceed if running on a native platform\n if (!this.capacitor.isNativePlatform()) {\n return false;\n }\n\n this.isInitialized = true;\n return true;\n } catch (error) {\n console.error('Error importing Capacitor plugins:', error);\n return false;\n }\n }\n\n /**\n * Request permission and register for push notifications\n */\n async requestPermissions() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n if (!this.isInitialized) {\n const initialized = await this.initialize();\n if (!initialized) return false;\n }\n\n try {\n // Request permission\n const permissionResult = await this.pushNotifications.requestPermissions();\n if (permissionResult.receive !== 'granted') {\n console.log('Push notification permission denied');\n return false;\n }\n\n // Set up event listeners\n this._setupListeners();\n\n // Register with Apple/Google\n await this.pushNotifications.register();\n return true;\n } catch (error) {\n console.error('Error requesting push notification permissions:', error);\n return false;\n }\n }\n\n /**\n * Setup push notification event listeners\n */\n _setupListeners() {\n // Registration event\n this.pushNotifications.addListener('registration', this._handleRegistration.bind(this));\n\n // Notification received event\n this.pushNotifications.addListener('pushNotificationReceived', this._handleNotificationReceived.bind(this));\n\n // Notification action performed event\n this.pushNotifications.addListener('pushNotificationActionPerformed', this._handleNotificationAction.bind(this));\n }\n\n /**\n * Handle registration token received\n */\n async _handleRegistration(token) {\n try {\n // Get device info\n const deviceInfo = await this.device.getInfo();\n const deviceId = await this.device.getId();\n\n // Prepare device data\n const deviceData = {\n deviceId: deviceId.uuid,\n deviceType: deviceInfo.platform.toLowerCase(),\n deviceToken: token.value,\n };\n\n // Register device with backend\n await this.store.notifications.actions.registerDevice(deviceData);\n } catch (error) {\n console.error('Error handling push registration:', error);\n }\n }\n\n /**\n * Handle received notification\n */\n _handleNotificationReceived(notification) {\n // Add notification to store\n this.store.notifications.actions.addLocalNotification({\n title: notification.title,\n body: notification.body,\n data: notification.data || {},\n });\n }\n\n /**\n * Handle notification action (when user taps on notification)\n */\n _handleNotificationAction(actionData) {\n if (actionData.notification && actionData.notification.data) {\n this.store.notifications.actions.handleNotificationAction(actionData.notification.data);\n }\n }\n\n /**\n * Remove push notification listeners\n */\n removeListeners() {\n if (typeof window === 'undefined') {\n return;\n }\n\n if (this.pushNotifications) {\n this.pushNotifications.removeAllListeners();\n }\n }\n}\n\n/**\n * Notification Manager for coordinating WebSocket and Push notifications\n */\n\nclass NotificationManager {\n constructor(store, options = {}) {\n this.store = store;\n this.options = options;\n this.pushHandler = new CapacitorPushHandler(store);\n this.initialized = false;\n this.isServer = typeof window === 'undefined';\n }\n\n async registerWebPush(store) {\n if (!('Notification' in window) || !('serviceWorker' in navigator) || !('PushManager' in window)) {\n console.warn('Web Push не поддерживается в браузере');\n return;\n }\n\n const permission = await Notification.requestPermission();\n if (permission !== 'granted') {\n console.warn('Разрешение на уведомления не получено');\n return;\n }\n\n const registration = await navigator.serviceWorker.ready;\n const subscription = await registration.pushManager.subscribe({\n userVisibleOnly: true,\n applicationServerKey: 'BJtNnRrx05VQS0abnkHC-8gHJWpnmoqC_iQveENCmZOZIs-adWzqAiqFCdGVVd7CbiaLW-Q5iuIBDRgM9G-VnKg',\n });\n\n console.log('New subscription:', JSON.stringify(subscription));\n\n // Отправь подписку на сервер\n await store.notifications.actions.registerDevice({\n deviceToken: JSON.stringify(subscription),\n deviceType: 'web',\n });\n }\n\n async initialize() {\n if (this.initialized || this.isServer) return;\n\n const userId = this.store.auth.state.user?._id;\n if (!userId) {\n console.warn('Cannot initialize notifications: No user ID found in auth store');\n return;\n }\n\n \n console.log('Connecting to websockets via notifications');\n globalWebSocket.initialize({\n wsUrl: app.config.globalProperties.WSS_URL,\n maxReconnectAttempts: 10,\n reconnectDelay: 2000,\n });\n\n await globalWebSocket.connect(userId);\n\n globalWebSocket.removeModuleListeners('notification');\n\n await globalWebSocket.subscribeModule('notification');\n\n globalWebSocket.addEventListener(\n 'notification',\n data => {\n this.store.notifications.actions.addLocalNotification(data.data);\n },\n { module: 'notification' }\n );\n\n // 🎯 Опционально включаем push\n if (this.options.enablePush !== false) {\n await this.pushHandler.requestPermissions();\n await this.registerWebPush(this.store);\n }\n\n this.initialized = true;\n\n // ✅ Загружаем список уведомлений из API\n await this.store.notifications.actions.getNotifications(userId);\n }\n\n disconnect() {\n if (this.isServer) return;\n\n globalWebSocket.removeModuleListeners('notification');\n this.pushHandler.removeListeners();\n this.initialized = false;\n }\n}\n\n/**\n * Server-side utility for pre-fetching notification data\n */\nconst SSRUtils = {\n /**\n * Pre-fetch notifications for SSR\n * @param {Object} store - Store instance\n * @param {Object} context - SSR context\n */\n async prefetchNotifications(store, context) {\n try {\n const userId = store.auth.state.user?._id;\n if (userId) {\n // Fetch notifications without WebSocket or push setup\n await store.notifications.actions.getNotifications(userId);\n }\n } catch (error) {\n console.error('Error pre-fetching notifications for SSR:', error);\n }\n },\n};\n\n/**\n * Function to initialize the notifications module\n * @param {Object} app - Vue app instance\n * @param {Object} store - Vuex/Pinia store\n * @param {Object} router - Vue Router instance\n * @param {Object} options - Configuration options\n */\nfunction initializeNotifications(app, store, router, options = {}) {\n // Add routes and store\n const route = options.route || 'User Profile Root';\n router.addRoute(route, routerNotifications);\n store.addStore('notifications', storeNotifications);\n\n // Initialize global WebSocket if needed\n if (options.wsUrl) {\n globalWebSocket.initialize({ wsUrl: app.config.globalProperties.WSS_URL });\n }\n\n // Create notification manager\n const notificationManager = new NotificationManager(store, {\n enablePush: options.enablePush !== false,\n maxReconnectAttempts: options.maxReconnectAttempts || 5,\n reconnectDelay: options.reconnectDelay || 3000,\n pingInterval: options.pingInterval || 30000,\n });\n\n // Attach notification manager to store for access in components\n store.notificationManager = notificationManager;\n\n // Don't auto-initialize on server\n const isServer = typeof window === 'undefined';\n const autoInit = !isServer && options.autoInit !== false;\n\n if (autoInit) {\n // Initialize after auth is confirmed\n const isAuthenticated = store.auth.state.access.status;\n const userId = store.auth.state.user?._id;\n\n if (isAuthenticated && userId) {\n notificationManager.initialize();\n }\n\n // Watch for user login/logout using auth store\n watch(\n () => store.auth.state.access.status,\n isAuthenticated => {\n if (isAuthenticated) {\n notificationManager.initialize();\n } else {\n notificationManager.disconnect();\n store.notifications.mutations.resetNotifications();\n }\n }\n );\n }\n\n // Provide composable for components to access notification functionality\n app.provide('useNotifications', () => {\n return {\n ...toRefs(store.notifications.state),\n ...store.notifications.actions,\n ...store.notifications.mutations,\n init: notificationManager.initialize.bind(notificationManager),\n disconnect: notificationManager.disconnect.bind(notificationManager),\n isServer,\n };\n });\n\n return notificationManager;\n}\n\n// Module export\nconst ModuleNotifications = {\n initialize: initializeNotifications,\n SSR: SSRUtils, // Export SSR utilities\n views: {\n store: {\n storeNotifications,\n },\n router: {\n routerNotifications,\n },\n components: {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n },\n },\n};\n\n// Component exports\nexport {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n // Sections\n NotificationsList,\n // SSR Utilities\n SSRUtils,\n};\n\nexport default ModuleNotifications;\n"],"names":["globalWebSocket","app","routerNotifications","storeNotifications","watch","isAuthenticated","toRefs","NotificationBadge","NotificationItem","NotificationsList","NotificationPreferences","Notifications","NotificationsLayout"],"mappings":";;;;;;;;;;;;AAsBA,MAAM,qBAAqB;AAAA,EACzB,YAAY,OAAO;AACjB,SAAK,QAAQ;AACb,SAAK,oBAAoB;AACzB,SAAK,SAAS;AACd,SAAK,gBAAgB;AAAA,EACvB;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,aAAa;AAEjB,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,I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QAAI,mBAAmB,QAAQ;AAC7B,0BAAoB,WAAU;AAAA,IAChC;AAGAG,QAAAA;AAAAA,MACE,MAAM,MAAM,KAAK,MAAM,OAAO;AAAA,MAC9B,CAAAC,qBAAmB;AACjB,YAAIA,kBAAiB;AACnB,8BAAoB,WAAU;AAAA,QAChC,OAAO;AACL,8BAAoB,WAAU;AAC9B,gBAAM,cAAc,UAAU,mBAAkB;AAAA,QAClD;AAAA,MACF;AAAA,IACN;AAAA,EACE;AAGA,EAAAJ,KAAI,QAAQ,oBAAoB,MAAM;AACpC,WAAO;AAAA,MACL,GAAGK,WAAO,MAAM,cAAc,KAAK;AAAA,MACnC,GAAG,MAAM,cAAc;AAAA,MACvB,GAAG,MAAM,cAAc;AAAA,MACvB,MAAM,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MAC7D,YAAY,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MACnE;AAAA,IACN;AAAA,EACE,CAAC;AAED,SAAO;AACT;AAGK,MAAC,sBAAsB;AAAA,EAC1B,YAAY;AAAA,EACZ,KAAK;AAAA;AAAA,EACL,OAAO;AAAA,IACL,OAAO;AAAA,MACX,oBAAMH;AAAAA,IACN;AAAA,IACI,QAAQ;AAAA,MACZ,qBAAMD,qBAAAA;AAAAA,IACN;AAAA,IACI,YAAY;AAAA;AAAA,MAEhB,mBAAMK,kBAAAA;AAAAA;AAAAA,MAEN,kBAAMC,iBAAAA;AAAAA;AAAAA,MAEN,mBAAMC,kBAAAA;AAAAA,MACN,yBAAMC,wBAAAA;AAAAA;AAAAA,MAEN,eAAMC,cAAAA;AAAAA;AAAAA,MAEN,qBAAMC,oBAAAA;AAAAA,IACN;AAAA,EACA;AACA;;;;;;;;;"}
@@ -156,6 +156,11 @@ class NotificationManager {
156
156
  return;
157
157
  }
158
158
  console.log("Connecting to websockets via notifications");
159
+ globalWebSocket.initialize({
160
+ wsUrl: app.config.globalProperties.WSS_URL,
161
+ maxReconnectAttempts: 10,
162
+ reconnectDelay: 2e3
163
+ });
159
164
  await globalWebSocket.connect(userId);
160
165
  globalWebSocket.removeModuleListeners("notification");
161
166
  await globalWebSocket.subscribeModule("notification");
@@ -197,12 +202,12 @@ const SSRUtils = {
197
202
  }
198
203
  }
199
204
  };
200
- function initializeNotifications(app, store, router, options = {}) {
205
+ function initializeNotifications(app2, store, router, options = {}) {
201
206
  const route = options.route || "User Profile Root";
202
207
  router.addRoute(route, nofitications);
203
208
  store.addStore("notifications", notifications_store);
204
209
  if (options.wsUrl) {
205
- globalWebSocket.initialize({ wsUrl: app.config.globalProperties.WSS_URL });
210
+ globalWebSocket.initialize({ wsUrl: app2.config.globalProperties.WSS_URL });
206
211
  }
207
212
  const notificationManager = new NotificationManager(store, {
208
213
  enablePush: options.enablePush !== false,
@@ -231,7 +236,7 @@ function initializeNotifications(app, store, router, options = {}) {
231
236
  }
232
237
  );
233
238
  }
234
- app.provide("useNotifications", () => {
239
+ app2.provide("useNotifications", () => {
235
240
  return {
236
241
  ...toRefs(store.notifications.state),
237
242
  ...store.notifications.actions,
@@ -1 +1 @@
1
- {"version":3,"file":"notifications.client.js","sources":["../../../../../src/modules/notifications/notifications.client.js"],"sourcesContent":["import { toRefs, watch } from 'vue';\n// Router import\nimport routerNotifications from './router/notifications.router.js';\n// Store\nimport * as storeNotifications from './store/notifications.store.js';\n// Auth store import\n// Global WebSocket import\nimport globalWebSocket from '@martyrs/src/modules/globals/views/classes/globals.websocket.js';\n// Layouts\nimport NotificationsLayout from './components/layouts/NotificationsLayout.vue';\n// Sections\nimport NotificationPreferences from './components/sections/NotificationPreferences.vue';\nimport NotificationsList from './components/sections/NotificationsList.vue';\n// Pages\nimport Notifications from './components/pages/Notifications.vue';\n// Components\nimport NotificationItem from './components/blocks/NotificationItem.vue';\nimport NotificationBadge from './components/elements/NotificationBadge.vue';\n\n/**\n * Capacitor Push Notification handler\n */\nclass CapacitorPushHandler {\n constructor(store) {\n this.store = store;\n this.pushNotifications = null;\n this.device = null;\n this.isInitialized = false;\n }\n\n /**\n * Initialize Capacitor plugins\n */\n async initialize() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n try {\n // Dynamic imports to prevent errors in web environment\n const { Capacitor } = await import('@capacitor/core');\n const { PushNotifications } = await import('@capacitor/push-notifications');\n const { Device } = await import('@capacitor/device');\n\n this.capacitor = Capacitor;\n this.pushNotifications = PushNotifications;\n this.device = Device;\n\n // Only proceed if running on a native platform\n if (!this.capacitor.isNativePlatform()) {\n return false;\n }\n\n this.isInitialized = true;\n return true;\n } catch (error) {\n console.error('Error importing Capacitor plugins:', error);\n return false;\n }\n }\n\n /**\n * Request permission and register for push notifications\n */\n async requestPermissions() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n if (!this.isInitialized) {\n const initialized = await this.initialize();\n if (!initialized) return false;\n }\n\n try {\n // Request permission\n const permissionResult = await this.pushNotifications.requestPermissions();\n if (permissionResult.receive !== 'granted') {\n console.log('Push notification permission denied');\n return false;\n }\n\n // Set up event listeners\n this._setupListeners();\n\n // Register with Apple/Google\n await this.pushNotifications.register();\n return true;\n } catch (error) {\n console.error('Error requesting push notification permissions:', error);\n return false;\n }\n }\n\n /**\n * Setup push notification event listeners\n */\n _setupListeners() {\n // Registration event\n this.pushNotifications.addListener('registration', this._handleRegistration.bind(this));\n\n // Notification received event\n this.pushNotifications.addListener('pushNotificationReceived', this._handleNotificationReceived.bind(this));\n\n // Notification action performed event\n this.pushNotifications.addListener('pushNotificationActionPerformed', this._handleNotificationAction.bind(this));\n }\n\n /**\n * Handle registration token received\n */\n async _handleRegistration(token) {\n try {\n // Get device info\n const deviceInfo = await this.device.getInfo();\n const deviceId = await this.device.getId();\n\n // Prepare device data\n const deviceData = {\n deviceId: deviceId.uuid,\n deviceType: deviceInfo.platform.toLowerCase(),\n deviceToken: token.value,\n };\n\n // Register device with backend\n await this.store.notifications.actions.registerDevice(deviceData);\n } catch (error) {\n console.error('Error handling push registration:', error);\n }\n }\n\n /**\n * Handle received notification\n */\n _handleNotificationReceived(notification) {\n // Add notification to store\n this.store.notifications.actions.addLocalNotification({\n title: notification.title,\n body: notification.body,\n data: notification.data || {},\n });\n }\n\n /**\n * Handle notification action (when user taps on notification)\n */\n _handleNotificationAction(actionData) {\n if (actionData.notification && actionData.notification.data) {\n this.store.notifications.actions.handleNotificationAction(actionData.notification.data);\n }\n }\n\n /**\n * Remove push notification listeners\n */\n removeListeners() {\n if (typeof window === 'undefined') {\n return;\n }\n\n if (this.pushNotifications) {\n this.pushNotifications.removeAllListeners();\n }\n }\n}\n\n/**\n * Notification Manager for coordinating WebSocket and Push notifications\n */\n\nclass NotificationManager {\n constructor(store, options = {}) {\n this.store = store;\n this.options = options;\n this.pushHandler = new CapacitorPushHandler(store);\n this.initialized = false;\n this.isServer = typeof window === 'undefined';\n }\n\n async registerWebPush(store) {\n if (!('Notification' in window) || !('serviceWorker' in navigator) || !('PushManager' in window)) {\n console.warn('Web Push не поддерживается в браузере');\n return;\n }\n\n const permission = await Notification.requestPermission();\n if (permission !== 'granted') {\n console.warn('Разрешение на уведомления не получено');\n return;\n }\n\n const registration = await navigator.serviceWorker.ready;\n const subscription = await registration.pushManager.subscribe({\n userVisibleOnly: true,\n applicationServerKey: 'BJtNnRrx05VQS0abnkHC-8gHJWpnmoqC_iQveENCmZOZIs-adWzqAiqFCdGVVd7CbiaLW-Q5iuIBDRgM9G-VnKg',\n });\n\n console.log('New subscription:', JSON.stringify(subscription));\n\n // Отправь подписку на сервер\n await store.notifications.actions.registerDevice({\n deviceToken: JSON.stringify(subscription),\n deviceType: 'web',\n });\n }\n\n async initialize() {\n if (this.initialized || this.isServer) return;\n\n const userId = this.store.auth.state.user?._id;\n if (!userId) {\n console.warn('Cannot initialize notifications: No user ID found in auth store');\n return;\n }\n\n console.log('Connecting to websockets via notifications');\n await globalWebSocket.connect(userId);\n\n globalWebSocket.removeModuleListeners('notification');\n\n await globalWebSocket.subscribeModule('notification');\n\n globalWebSocket.addEventListener(\n 'notification',\n data => {\n this.store.notifications.actions.addLocalNotification(data.data);\n },\n { module: 'notification' }\n );\n\n // 🎯 Опционально включаем push\n if (this.options.enablePush !== false) {\n await this.pushHandler.requestPermissions();\n await this.registerWebPush(this.store);\n }\n\n this.initialized = true;\n\n // ✅ Загружаем список уведомлений из API\n await this.store.notifications.actions.getNotifications(userId);\n }\n\n disconnect() {\n if (this.isServer) return;\n\n globalWebSocket.removeModuleListeners('notification');\n this.pushHandler.removeListeners();\n this.initialized = false;\n }\n}\n\n/**\n * Server-side utility for pre-fetching notification data\n */\nconst SSRUtils = {\n /**\n * Pre-fetch notifications for SSR\n * @param {Object} store - Store instance\n * @param {Object} context - SSR context\n */\n async prefetchNotifications(store, context) {\n try {\n const userId = store.auth.state.user?._id;\n if (userId) {\n // Fetch notifications without WebSocket or push setup\n await store.notifications.actions.getNotifications(userId);\n }\n } catch (error) {\n console.error('Error pre-fetching notifications for SSR:', error);\n }\n },\n};\n\n/**\n * Function to initialize the notifications module\n * @param {Object} app - Vue app instance\n * @param {Object} store - Vuex/Pinia store\n * @param {Object} router - Vue Router instance\n * @param {Object} options - Configuration options\n */\nfunction initializeNotifications(app, store, router, options = {}) {\n // Add routes and store\n const route = options.route || 'User Profile Root';\n router.addRoute(route, routerNotifications);\n store.addStore('notifications', storeNotifications);\n\n // Initialize global WebSocket if needed\n if (options.wsUrl) {\n globalWebSocket.initialize({ wsUrl: app.config.globalProperties.WSS_URL });\n }\n\n // Create notification manager\n const notificationManager = new NotificationManager(store, {\n enablePush: options.enablePush !== false,\n maxReconnectAttempts: options.maxReconnectAttempts || 5,\n reconnectDelay: options.reconnectDelay || 3000,\n pingInterval: options.pingInterval || 30000,\n });\n\n // Attach notification manager to store for access in components\n store.notificationManager = notificationManager;\n\n // Don't auto-initialize on server\n const isServer = typeof window === 'undefined';\n const autoInit = !isServer && options.autoInit !== false;\n\n if (autoInit) {\n // Initialize after auth is confirmed\n const isAuthenticated = store.auth.state.access.status;\n const userId = store.auth.state.user?._id;\n\n if (isAuthenticated && userId) {\n notificationManager.initialize();\n }\n\n // Watch for user login/logout using auth store\n watch(\n () => store.auth.state.access.status,\n isAuthenticated => {\n if (isAuthenticated) {\n notificationManager.initialize();\n } else {\n notificationManager.disconnect();\n store.notifications.mutations.resetNotifications();\n }\n }\n );\n }\n\n // Provide composable for components to access notification functionality\n app.provide('useNotifications', () => {\n return {\n ...toRefs(store.notifications.state),\n ...store.notifications.actions,\n ...store.notifications.mutations,\n init: notificationManager.initialize.bind(notificationManager),\n disconnect: notificationManager.disconnect.bind(notificationManager),\n isServer,\n };\n });\n\n return notificationManager;\n}\n\n// Module export\nconst ModuleNotifications = {\n initialize: initializeNotifications,\n SSR: SSRUtils, // Export SSR utilities\n views: {\n store: {\n storeNotifications,\n },\n router: {\n routerNotifications,\n },\n components: {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n },\n },\n};\n\n// Component exports\nexport {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n // Sections\n NotificationsList,\n // SSR Utilities\n SSRUtils,\n};\n\nexport default ModuleNotifications;\n"],"names":["routerNotifications","storeNotifications","isAuthenticated","Notifications","NotificationsLayout"],"mappings":";;;;;;;;;;AAsBA,MAAM,qBAAqB;AAAA,EACzB,YAAY,OAAO;AACjB,SAAK,QAAQ;AACb,SAAK,oBAAoB;AACzB,SAAK,SAAS;AACd,SAAK,gBAAgB;AAAA,EACvB;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,aAAa;AAEjB,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,IACT;AAEA,QAAI;AAEF,YAAM,EAAE,UAAS,IAAK,MAAM,OAAO,8FAAiB;AACpD,YAAM,EAAE,kBAAiB,IAAK,MAAM,OAAO,uJAA+B;AAC1E,YAAM,EAAE,OAAM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,cAAc;AAAA,MACvB,MAAM,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MAC7D,YAAY,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MACnE;AAAA,IACN;AAAA,EACE,CAAC;AAED,SAAO;AACT;AAGK,MAAC,sBAAsB;AAAA,EAC1B,YAAY;AAAA,EACZ,KAAK;AAAA;AAAA,EACL,OAAO;AAAA,IACL,OAAO;AAAA,MACX,oBAAMD;AAAAA,IACN;AAAA,IACI,QAAQ;AAAA,MACZ,qBAAMD;AAAAA,IACN;AAAA,IACI,YAAY;AAAA;AAAA,MAEV;AAAA;AAAA,MAEA;AAAA;AAAA,MAEA;AAAA,MACA;AAAA;AAAA,MAEN,eAAMG;AAAAA;AAAAA,MAEN,qBAAMC;AAAAA,IACN;AAAA,EACA;AACA;"}
1
+ {"version":3,"file":"notifications.client.js","sources":["../../../../../src/modules/notifications/notifications.client.js"],"sourcesContent":["import { toRefs, watch } from 'vue';\n// Router import\nimport routerNotifications from './router/notifications.router.js';\n// Store\nimport * as storeNotifications from './store/notifications.store.js';\n// Auth store import\n// Global WebSocket import\nimport globalWebSocket from '@martyrs/src/modules/globals/views/classes/globals.websocket.js';\n// Layouts\nimport NotificationsLayout from './components/layouts/NotificationsLayout.vue';\n// Sections\nimport NotificationPreferences from './components/sections/NotificationPreferences.vue';\nimport NotificationsList from './components/sections/NotificationsList.vue';\n// Pages\nimport Notifications from './components/pages/Notifications.vue';\n// Components\nimport NotificationItem from './components/blocks/NotificationItem.vue';\nimport NotificationBadge from './components/elements/NotificationBadge.vue';\n\n/**\n * Capacitor Push Notification handler\n */\nclass CapacitorPushHandler {\n constructor(store) {\n this.store = store;\n this.pushNotifications = null;\n this.device = null;\n this.isInitialized = false;\n }\n\n /**\n * Initialize Capacitor plugins\n */\n async initialize() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n try {\n // Dynamic imports to prevent errors in web environment\n const { Capacitor } = await import('@capacitor/core');\n const { PushNotifications } = await import('@capacitor/push-notifications');\n const { Device } = await import('@capacitor/device');\n\n this.capacitor = Capacitor;\n this.pushNotifications = PushNotifications;\n this.device = Device;\n\n // Only proceed if running on a native platform\n if (!this.capacitor.isNativePlatform()) {\n return false;\n }\n\n this.isInitialized = true;\n return true;\n } catch (error) {\n console.error('Error importing Capacitor plugins:', error);\n return false;\n }\n }\n\n /**\n * Request permission and register for push notifications\n */\n async requestPermissions() {\n // Skip if running in SSR\n if (typeof window === 'undefined') {\n return false;\n }\n\n if (!this.isInitialized) {\n const initialized = await this.initialize();\n if (!initialized) return false;\n }\n\n try {\n // Request permission\n const permissionResult = await this.pushNotifications.requestPermissions();\n if (permissionResult.receive !== 'granted') {\n console.log('Push notification permission denied');\n return false;\n }\n\n // Set up event listeners\n this._setupListeners();\n\n // Register with Apple/Google\n await this.pushNotifications.register();\n return true;\n } catch (error) {\n console.error('Error requesting push notification permissions:', error);\n return false;\n }\n }\n\n /**\n * Setup push notification event listeners\n */\n _setupListeners() {\n // Registration event\n this.pushNotifications.addListener('registration', this._handleRegistration.bind(this));\n\n // Notification received event\n this.pushNotifications.addListener('pushNotificationReceived', this._handleNotificationReceived.bind(this));\n\n // Notification action performed event\n this.pushNotifications.addListener('pushNotificationActionPerformed', this._handleNotificationAction.bind(this));\n }\n\n /**\n * Handle registration token received\n */\n async _handleRegistration(token) {\n try {\n // Get device info\n const deviceInfo = await this.device.getInfo();\n const deviceId = await this.device.getId();\n\n // Prepare device data\n const deviceData = {\n deviceId: deviceId.uuid,\n deviceType: deviceInfo.platform.toLowerCase(),\n deviceToken: token.value,\n };\n\n // Register device with backend\n await this.store.notifications.actions.registerDevice(deviceData);\n } catch (error) {\n console.error('Error handling push registration:', error);\n }\n }\n\n /**\n * Handle received notification\n */\n _handleNotificationReceived(notification) {\n // Add notification to store\n this.store.notifications.actions.addLocalNotification({\n title: notification.title,\n body: notification.body,\n data: notification.data || {},\n });\n }\n\n /**\n * Handle notification action (when user taps on notification)\n */\n _handleNotificationAction(actionData) {\n if (actionData.notification && actionData.notification.data) {\n this.store.notifications.actions.handleNotificationAction(actionData.notification.data);\n }\n }\n\n /**\n * Remove push notification listeners\n */\n removeListeners() {\n if (typeof window === 'undefined') {\n return;\n }\n\n if (this.pushNotifications) {\n this.pushNotifications.removeAllListeners();\n }\n }\n}\n\n/**\n * Notification Manager for coordinating WebSocket and Push notifications\n */\n\nclass NotificationManager {\n constructor(store, options = {}) {\n this.store = store;\n this.options = options;\n this.pushHandler = new CapacitorPushHandler(store);\n this.initialized = false;\n this.isServer = typeof window === 'undefined';\n }\n\n async registerWebPush(store) {\n if (!('Notification' in window) || !('serviceWorker' in navigator) || !('PushManager' in window)) {\n console.warn('Web Push не поддерживается в браузере');\n return;\n }\n\n const permission = await Notification.requestPermission();\n if (permission !== 'granted') {\n console.warn('Разрешение на уведомления не получено');\n return;\n }\n\n const registration = await navigator.serviceWorker.ready;\n const subscription = await registration.pushManager.subscribe({\n userVisibleOnly: true,\n applicationServerKey: 'BJtNnRrx05VQS0abnkHC-8gHJWpnmoqC_iQveENCmZOZIs-adWzqAiqFCdGVVd7CbiaLW-Q5iuIBDRgM9G-VnKg',\n });\n\n console.log('New subscription:', JSON.stringify(subscription));\n\n // Отправь подписку на сервер\n await store.notifications.actions.registerDevice({\n deviceToken: JSON.stringify(subscription),\n deviceType: 'web',\n });\n }\n\n async initialize() {\n if (this.initialized || this.isServer) return;\n\n const userId = this.store.auth.state.user?._id;\n if (!userId) {\n console.warn('Cannot initialize notifications: No user ID found in auth store');\n return;\n }\n\n \n console.log('Connecting to websockets via notifications');\n globalWebSocket.initialize({\n wsUrl: app.config.globalProperties.WSS_URL,\n maxReconnectAttempts: 10,\n reconnectDelay: 2000,\n });\n\n await globalWebSocket.connect(userId);\n\n globalWebSocket.removeModuleListeners('notification');\n\n await globalWebSocket.subscribeModule('notification');\n\n globalWebSocket.addEventListener(\n 'notification',\n data => {\n this.store.notifications.actions.addLocalNotification(data.data);\n },\n { module: 'notification' }\n );\n\n // 🎯 Опционально включаем push\n if (this.options.enablePush !== false) {\n await this.pushHandler.requestPermissions();\n await this.registerWebPush(this.store);\n }\n\n this.initialized = true;\n\n // ✅ Загружаем список уведомлений из API\n await this.store.notifications.actions.getNotifications(userId);\n }\n\n disconnect() {\n if (this.isServer) return;\n\n globalWebSocket.removeModuleListeners('notification');\n this.pushHandler.removeListeners();\n this.initialized = false;\n }\n}\n\n/**\n * Server-side utility for pre-fetching notification data\n */\nconst SSRUtils = {\n /**\n * Pre-fetch notifications for SSR\n * @param {Object} store - Store instance\n * @param {Object} context - SSR context\n */\n async prefetchNotifications(store, context) {\n try {\n const userId = store.auth.state.user?._id;\n if (userId) {\n // Fetch notifications without WebSocket or push setup\n await store.notifications.actions.getNotifications(userId);\n }\n } catch (error) {\n console.error('Error pre-fetching notifications for SSR:', error);\n }\n },\n};\n\n/**\n * Function to initialize the notifications module\n * @param {Object} app - Vue app instance\n * @param {Object} store - Vuex/Pinia store\n * @param {Object} router - Vue Router instance\n * @param {Object} options - Configuration options\n */\nfunction initializeNotifications(app, store, router, options = {}) {\n // Add routes and store\n const route = options.route || 'User Profile Root';\n router.addRoute(route, routerNotifications);\n store.addStore('notifications', storeNotifications);\n\n // Initialize global WebSocket if needed\n if (options.wsUrl) {\n globalWebSocket.initialize({ wsUrl: app.config.globalProperties.WSS_URL });\n }\n\n // Create notification manager\n const notificationManager = new NotificationManager(store, {\n enablePush: options.enablePush !== false,\n maxReconnectAttempts: options.maxReconnectAttempts || 5,\n reconnectDelay: options.reconnectDelay || 3000,\n pingInterval: options.pingInterval || 30000,\n });\n\n // Attach notification manager to store for access in components\n store.notificationManager = notificationManager;\n\n // Don't auto-initialize on server\n const isServer = typeof window === 'undefined';\n const autoInit = !isServer && options.autoInit !== false;\n\n if (autoInit) {\n // Initialize after auth is confirmed\n const isAuthenticated = store.auth.state.access.status;\n const userId = store.auth.state.user?._id;\n\n if (isAuthenticated && userId) {\n notificationManager.initialize();\n }\n\n // Watch for user login/logout using auth store\n watch(\n () => store.auth.state.access.status,\n isAuthenticated => {\n if (isAuthenticated) {\n notificationManager.initialize();\n } else {\n notificationManager.disconnect();\n store.notifications.mutations.resetNotifications();\n }\n }\n );\n }\n\n // Provide composable for components to access notification functionality\n app.provide('useNotifications', () => {\n return {\n ...toRefs(store.notifications.state),\n ...store.notifications.actions,\n ...store.notifications.mutations,\n init: notificationManager.initialize.bind(notificationManager),\n disconnect: notificationManager.disconnect.bind(notificationManager),\n isServer,\n };\n });\n\n return notificationManager;\n}\n\n// Module export\nconst ModuleNotifications = {\n initialize: initializeNotifications,\n SSR: SSRUtils, // Export SSR utilities\n views: {\n store: {\n storeNotifications,\n },\n router: {\n routerNotifications,\n },\n components: {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n // Sections\n NotificationsList,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n },\n },\n};\n\n// Component exports\nexport {\n // Elements\n NotificationBadge,\n // Blocks\n NotificationItem,\n NotificationPreferences,\n // Pages\n Notifications,\n // Layouts\n NotificationsLayout,\n // Sections\n NotificationsList,\n // SSR Utilities\n SSRUtils,\n};\n\nexport default ModuleNotifications;\n"],"names":["app","routerNotifications","storeNotifications","isAuthenticated","Notifications","NotificationsLayout"],"mappings":";;;;;;;;;;AAsBA,MAAM,qBAAqB;AAAA,EACzB,YAAY,OAAO;AACjB,SAAK,QAAQ;AACb,SAAK,oBAAoB;AACzB,SAAK,SAAS;AACd,SAAK,gBAAgB;AAAA,EACvB;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,aAAa;AAEjB,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,IACT;AAEA,QAAI;AAEF,YAAM,EAAE,UAAS,IAAK,MAAM,OAAO,8FAAiB;AACpD,YAAM,EAAE,kBAAiB,IAAK,MAAM,OAAO,uJAA+B;AAC1E,YAAM,EAAE,OAAM,IAAK,MAAM,OAAO,+HAAmB;AAEnD,WAAK,YAAY;AACjB,WAAK,oBA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Ac,KAAK;AAAA,MACnC,GAAG,MAAM,cAAc;AAAA,MACvB,GAAG,MAAM,cAAc;AAAA,MACvB,MAAM,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MAC7D,YAAY,oBAAoB,WAAW,KAAK,mBAAmB;AAAA,MACnE;AAAA,IACN;AAAA,EACE,CAAC;AAED,SAAO;AACT;AAGK,MAAC,sBAAsB;AAAA,EAC1B,YAAY;AAAA,EACZ,KAAK;AAAA;AAAA,EACL,OAAO;AAAA,IACL,OAAO;AAAA,MACX,oBAAME;AAAAA,IACN;AAAA,IACI,QAAQ;AAAA,MACZ,qBAAMD;AAAAA,IACN;AAAA,IACI,YAAY;AAAA;AAAA,MAEV;AAAA;AAAA,MAEA;AAAA;AAAA,MAEA;AAAA,MACA;AAAA;AAAA,MAEN,eAAMG;AAAAA;AAAAA,MAEN,qBAAMC;AAAAA,IACN;AAAA,EACA;AACA;"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
- const Tooltip = require("../../../../components/Tooltip/Tooltip.vue.cjs");
4
+ const Tooltip = require("../../../../components/Tooltip/Tooltip.vue2.cjs");
5
5
  const IconStatusCreated = require("../icons/IconStatusCreated.vue.cjs");
6
6
  const IconStatusConfirmed = require("../icons/IconStatusConfirmed.vue.cjs");
7
7
  const IconStatusInUse = require("../icons/IconStatusInUse.vue.cjs");
@@ -1,5 +1,5 @@
1
1
  import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, Fragment, renderList, toDisplayString, createVNode, withCtx, createBlock, resolveDynamicComponent } from "vue";
2
- import _sfc_main$7 from "../../../../components/Tooltip/Tooltip.vue.js";
2
+ import _sfc_main$7 from "../../../../components/Tooltip/Tooltip.vue2.js";
3
3
  import _sfc_main$6 from "../icons/IconStatusCreated.vue.js";
4
4
  import _sfc_main$5 from "../icons/IconStatusConfirmed.vue.js";
5
5
  import _sfc_main$2 from "../icons/IconStatusInUse.vue.js";
@@ -2,15 +2,15 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
4
  const vueRouter = require("vue-router");
5
- const Button = require("../../../../components/Button/Button.vue.cjs");
6
- const Select = require("../../../../components/Select/Select.vue2.cjs");
5
+ const Button = require("../../../../components/Button/Button.vue2.cjs");
6
+ const Select = require("../../../../components/Select/Select.vue.cjs");
7
7
  const Popup = require("../../../../components/Popup/Popup.vue.cjs");
8
8
  const IconTime = require("../../../icons/entities/IconTime.vue.cjs");
9
9
  const CardOrderItem = require("../blocks/CardOrderItem.vue.cjs");
10
10
  const CardOrganization = require("../../../organizations/components/blocks/CardOrganization.vue.cjs");
11
11
  const ChatPage = require("../../../chats/components/pages/ChatPage.vue.cjs");
12
12
  const PriceTotal = require("../elements/PriceTotal.vue.cjs");
13
- ;/* empty css */
13
+ ;/* empty css */
14
14
  const globals = require("../../../globals/views/store/globals.cjs");
15
15
  const auth = require("../../../auth/views/store/auth.cjs");
16
16
  const orders = require("../../store/orders.cjs");
@@ -1,14 +1,14 @@
1
1
  import { ref, onMounted, computed, createElementBlock, createCommentVNode, openBlock, createVNode, createElementVNode, createTextVNode, toDisplayString, Fragment, renderList, normalizeClass, withCtx, createBlock, unref } from "vue";
2
2
  import { useRouter, useRoute } from "vue-router";
3
- import _sfc_main$2 from "../../../../components/Button/Button.vue.js";
4
- import Select from "../../../../components/Select/Select.vue2.js";
3
+ import _sfc_main$2 from "../../../../components/Button/Button.vue2.js";
4
+ import Select from "../../../../components/Select/Select.vue.js";
5
5
  import _sfc_main$1 from "../../../../components/Popup/Popup.vue.js";
6
6
  import IconClock from "../../../icons/entities/IconTime.vue.js";
7
7
  import _sfc_main$3 from "../blocks/CardOrderItem.vue.js";
8
8
  import _sfc_main$5 from "../../../organizations/components/blocks/CardOrganization.vue.js";
9
9
  import _sfc_main$6 from "../../../chats/components/pages/ChatPage.vue.js";
10
10
  import _sfc_main$4 from "../elements/PriceTotal.vue.js";
11
- /* empty css */
11
+ /* empty css */
12
12
  import { state } from "../../../globals/views/store/globals.js";
13
13
  import { state as state$1 } from "../../../auth/views/store/auth.js";
14
14
  import { actions, state as state$2, getters, mutations } from "../../store/orders.js";
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
- const Button = require("../../../../components/Button/Button.vue.cjs");
4
+ const Button = require("../../../../components/Button/Button.vue2.cjs");
5
5
  const CardOrderItem = require("../blocks/CardOrderItem.vue.cjs");
6
6
  const AskToLogin = require("../sections/AskToLogin.vue.cjs");
7
7
  const Succes = require("../sections/Succes.vue.cjs");
@@ -1,5 +1,5 @@
1
1
  import { ref, computed, onMounted, watch, createElementBlock, openBlock, createBlock, createCommentVNode, createElementVNode, unref, toDisplayString, createVNode, Fragment, renderList, withCtx, createTextVNode } from "vue";
2
- import _sfc_main$9 from "../../../../components/Button/Button.vue.js";
2
+ import _sfc_main$9 from "../../../../components/Button/Button.vue2.js";
3
3
  import _sfc_main$7 from "../blocks/CardOrderItem.vue.js";
4
4
  import _sfc_main$1 from "../sections/AskToLogin.vue.js";
5
5
  import _sfc_main$3 from "../sections/Succes.vue.js";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
3
3
  const vue = require("vue");
4
4
  const vueRouter = require("vue-router");
5
5
  ;/* empty css */
6
- const Button = require("../../../../components/Button/Button.vue.cjs");
6
+ const Button = require("../../../../components/Button/Button.vue2.cjs");
7
7
  const Tab = require("../../../../components/Tab/Tab.vue2.cjs");
8
8
  const Popup = require("../../../../components/Popup/Popup.vue.cjs");
9
9
  const Block = require("../../../../components/Block/Block.vue.cjs");
@@ -1,7 +1,7 @@
1
1
  import { getCurrentInstance, computed, ref, onMounted, createElementBlock, openBlock, createVNode, createBlock, createCommentVNode, withCtx, createElementVNode, createTextVNode, unref, Fragment, renderList, toDisplayString, normalizeClass } from "vue";
2
2
  import { useRoute, useRouter } from "vue-router";
3
3
  /* empty css */
4
- import _sfc_main$2 from "../../../../components/Button/Button.vue.js";
4
+ import _sfc_main$2 from "../../../../components/Button/Button.vue2.js";
5
5
  import _sfc_main$3 from "../../../../components/Tab/Tab.vue2.js";
6
6
  import _sfc_main$4 from "../../../../components/Popup/Popup.vue.js";
7
7
  import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
@@ -5,9 +5,9 @@ const vueRouter = require("vue-router");
5
5
  const Block = require("../../../../components/Block/Block.vue.cjs");
6
6
  ;/* empty css */
7
7
  const clickOutside = require("../../../../components/FieldPhone/click-outside.cjs");
8
- ;/* empty css */
8
+ ;/* empty css */
9
9
  const Feed = require("../../../../components/Feed/Feed.vue.cjs");
10
- const Button = require("../../../../components/Button/Button.vue.cjs");
10
+ const Button = require("../../../../components/Button/Button.vue2.cjs");
11
11
  const BlockSearch = require("../../../globals/views/components/blocks/BlockSearch.vue.cjs");
12
12
  const CardUser = require("../../../auth/views/components/blocks/CardUser.vue.cjs");
13
13
  const FormCustomerDetails = require("./FormCustomerDetails.vue.cjs");
@@ -3,9 +3,9 @@ import { useRoute } from "vue-router";
3
3
  import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
4
4
  /* empty css */
5
5
  import clickOutside from "../../../../components/FieldPhone/click-outside.js";
6
- /* empty css */
6
+ /* empty css */
7
7
  import _sfc_main$4 from "../../../../components/Feed/Feed.vue.js";
8
- import _sfc_main$6 from "../../../../components/Button/Button.vue.js";
8
+ import _sfc_main$6 from "../../../../components/Button/Button.vue2.js";
9
9
  import _sfc_main$2 from "../../../globals/views/components/blocks/BlockSearch.vue.js";
10
10
  import _sfc_main$3 from "../../../auth/views/components/blocks/CardUser.vue.js";
11
11
  import _sfc_main$5 from "./FormCustomerDetails.vue.js";
@@ -4,7 +4,7 @@ const vue = require("vue");
4
4
  const Block = require("../../../../components/Block/Block.vue.cjs");
5
5
  const Field = require("../../../../components/Field/Field.vue.cjs");
6
6
  const FieldPhone = require("../../../../components/FieldPhone/FieldPhone.vue.cjs");
7
- const Select = require("../../../../components/Select/Select.vue2.cjs");
7
+ const Select = require("../../../../components/Select/Select.vue.cjs");
8
8
  const _hoisted_1 = { class: "gap-thin flex-justify-between flex-nowrap flex" };
9
9
  const _sfc_main = {
10
10
  __name: "FormCustomerDetails",
@@ -2,7 +2,7 @@ import { ref, createBlock, openBlock, withCtx, createVNode, createElementVNode,
2
2
  import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
3
3
  import Field from "../../../../components/Field/Field.vue.js";
4
4
  import _sfc_main$2 from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
- import Select from "../../../../components/Select/Select.vue2.js";
5
+ import Select from "../../../../components/Select/Select.vue.js";
6
6
  const _hoisted_1 = { class: "gap-thin flex-justify-between flex-nowrap flex" };
7
7
  const _sfc_main = {
8
8
  __name: "FormCustomerDetails",
@@ -10,7 +10,7 @@ const Field = require("../../../../components/Field/Field.vue.cjs");
10
10
  const Radio = require("../../../../components/Radio/Radio.vue.cjs");
11
11
  ;/* empty css */
12
12
  ;/* empty css */
13
- ;/* empty css */
13
+ ;/* empty css */
14
14
  ;/* empty css */
15
15
  ;/* empty css */
16
16
  ;/* empty css */
@@ -8,7 +8,7 @@ import Field from "../../../../components/Field/Field.vue.js";
8
8
  import _sfc_main$2 from "../../../../components/Radio/Radio.vue.js";
9
9
  /* empty css */
10
10
  /* empty css */
11
- /* empty css */
11
+ /* empty css */
12
12
  /* empty css */
13
13
  /* empty css */
14
14
  /* empty css */
@@ -2,7 +2,7 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
4
  const Block = require("../../../../components/Block/Block.vue.cjs");
5
- const Select = require("../../../../components/Select/Select.vue2.cjs");
5
+ const Select = require("../../../../components/Select/Select.vue.cjs");
6
6
  const _hoisted_1 = { class: "mn-b-small flex-nowrap flex" };
7
7
  const _sfc_main = {
8
8
  __name: "FormPayment",
@@ -1,6 +1,6 @@
1
1
  import { computed, createBlock, openBlock, withCtx, createElementVNode, createVNode } from "vue";
2
2
  import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
3
- import Select from "../../../../components/Select/Select.vue2.js";
3
+ import Select from "../../../../components/Select/Select.vue.js";
4
4
  const _hoisted_1 = { class: "mn-b-small flex-nowrap flex" };
5
5
  const _sfc_main = {
6
6
  __name: "FormPayment",
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
- const Button = require("../../../../components/Button/Button.vue.cjs");
4
+ const Button = require("../../../../components/Button/Button.vue2.cjs");
5
5
  require("../../../auth/views/store/auth.cjs");
6
6
  const memberships = require("../../store/memberships.cjs");
7
7
  const _sfc_main = {
@@ -1,5 +1,5 @@
1
1
  import { createBlock, openBlock, withCtx, createTextVNode, toDisplayString } from "vue";
2
- import _sfc_main$1 from "../../../../components/Button/Button.vue.js";
2
+ import _sfc_main$1 from "../../../../components/Button/Button.vue2.js";
3
3
  import "../../../auth/views/store/auth.js";
4
4
  import { actions } from "../../store/memberships.js";
5
5
  const _sfc_main = {
@@ -8,13 +8,13 @@ require("vue-i18n");
8
8
  const UploadImage = require("../../../../components/UploadImage/UploadImage.vue.cjs");
9
9
  ;/* empty css */
10
10
  const Field = require("../../../../components/Field/Field.vue.cjs");
11
- ;/* empty css */
11
+ ;/* empty css */
12
12
  const Checkbox = require("../../../../components/Checkbox/Checkbox.vue.cjs");
13
13
  require("../../../../../../node_modules/.pnpm/@googlemaps_js-api-loader@1.16.8/node_modules/@googlemaps/js-api-loader/dist/index.cjs");
14
14
  ;/* empty css */
15
15
  ;/* empty css */
16
16
  ;/* empty css */
17
- const Button = require("../../../../components/Button/Button.vue.cjs");
17
+ const Button = require("../../../../components/Button/Button.vue2.cjs");
18
18
  const Popup = require("../../../../components/Popup/Popup.vue.cjs");
19
19
  const Block = require("../../../../components/Block/Block.vue.cjs");
20
20
  const Feed = require("../../../../components/Feed/Feed.vue.cjs");
@@ -6,13 +6,13 @@ import "vue-i18n";
6
6
  import _sfc_main$3 from "../../../../components/UploadImage/UploadImage.vue.js";
7
7
  /* empty css */
8
8
  import Field from "../../../../components/Field/Field.vue.js";
9
- /* empty css */
9
+ /* empty css */
10
10
  import _sfc_main$8 from "../../../../components/Checkbox/Checkbox.vue.js";
11
11
  import "../../../../../../node_modules/.pnpm/@googlemaps_js-api-loader@1.16.8/node_modules/@googlemaps/js-api-loader/dist/index.js";
12
12
  /* empty css */
13
13
  /* empty css */
14
14
  /* empty css */
15
- import _sfc_main$1 from "../../../../components/Button/Button.vue.js";
15
+ import _sfc_main$1 from "../../../../components/Button/Button.vue2.js";
16
16
  import _sfc_main$6 from "../../../../components/Popup/Popup.vue.js";
17
17
  import _sfc_main$2 from "../../../../components/Block/Block.vue.js";
18
18
  import _sfc_main$7 from "../../../../components/Feed/Feed.vue.js";
@@ -4,11 +4,11 @@ const vue = require("vue");
4
4
  const vueRouter = require("vue-router");
5
5
  const Feed = require("../../../../components/Feed/Feed.vue.cjs");
6
6
  ;/* empty css */
7
- ;/* empty css */
7
+ ;/* empty css */
8
8
  const Popup = require("../../../../components/Popup/Popup.vue.cjs");
9
9
  const SectionPageTitle = require("../../../globals/views/components/sections/SectionPageTitle.vue.cjs");
10
10
  const MembersAdd = require("../sections/MembersAdd.vue.cjs");
11
- ;/* empty css */
11
+ ;/* empty css */
12
12
  require("../../../../components/Menu/MenuItem.vue.cjs");
13
13
  const CardUser = require("../../../auth/views/components/blocks/CardUser.vue.cjs");
14
14
  const CardDepartment = require("../blocks/CardDepartment.vue.cjs");
@@ -2,11 +2,11 @@ import { ref, onMounted, computed, resolveComponent, createElementBlock, openBlo
2
2
  import { useRoute, useRouter } from "vue-router";
3
3
  import _sfc_main$4 from "../../../../components/Feed/Feed.vue.js";
4
4
  /* empty css */
5
- /* empty css */
5
+ /* empty css */
6
6
  import _sfc_main$2 from "../../../../components/Popup/Popup.vue.js";
7
7
  import _sfc_main$1 from "../../../globals/views/components/sections/SectionPageTitle.vue.js";
8
8
  import _sfc_main$3 from "../sections/MembersAdd.vue.js";
9
- /* empty css */
9
+ /* empty css */
10
10
  import "../../../../components/Menu/MenuItem.vue.js";
11
11
  import _sfc_main$5 from "../../../auth/views/components/blocks/CardUser.vue.js";
12
12
  import CardDepartment from "../blocks/CardDepartment.vue.js";