@ozdao/martyrs 0.2.506 → 0.2.507
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.
- package/dist/auth.server.cjs +1 -1
- package/dist/auth.server.js +1 -1
- package/dist/builder.cjs +52 -60
- package/dist/builder.js +52 -60
- package/dist/chats.server.cjs +1 -1
- package/dist/chats.server.js +1 -1
- package/dist/events.server.cjs +1 -1
- package/dist/events.server.js +1 -1
- package/dist/{mailing-q7sR8gCV.cjs → mailing-Bs9ThyVZ.cjs} +1 -24
- package/dist/{mailing-C11EYWm-.js → mailing-DzlhsxCC.js} +1 -24
- package/dist/main-AWSb_d2P.cjs +11 -0
- package/dist/{main-DC__VS5b.js → main-Dq-UfO4G.js} +2562 -2477
- package/dist/martyrs/src/components/Button/{Button.vue.cjs → Button.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Button/Button.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Button/{Button.vue.js → Button.vue2.js} +2 -2
- package/dist/martyrs/src/components/Button/{Button.vue.cjs.map → Button.vue2.js.map} +1 -1
- package/dist/martyrs/src/components/Checkbox/Checkbox.vue.cjs +3 -3
- package/dist/martyrs/src/components/Checkbox/Checkbox.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js +3 -3
- package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js.map +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue.cjs +0 -93
- package/dist/martyrs/src/components/EditImages/EditImages.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue.js +1 -94
- package/dist/martyrs/src/components/EditImages/EditImages.vue.js.map +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.cjs +93 -0
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.cjs.map +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.js +94 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.js.map +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs +14 -45
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js +21 -52
- package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -1
- package/dist/martyrs/src/components/Field/Field.vue.cjs +14 -6
- package/dist/martyrs/src/components/Field/Field.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Field/Field.vue.js +14 -6
- package/dist/martyrs/src/components/Field/Field.vue.js.map +1 -1
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs +58 -11
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +60 -13
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js.map +1 -1
- package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.cjs +2 -2
- package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.js +2 -2
- package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.js.map +1 -1
- package/dist/martyrs/src/components/Spoiler/{Spoiler.vue.cjs → Spoiler.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Spoiler/Spoiler.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Spoiler/{Spoiler.vue.js → Spoiler.vue2.js} +2 -2
- package/dist/martyrs/src/components/Spoiler/{Spoiler.vue.cjs.map → Spoiler.vue2.js.map} +1 -1
- package/dist/martyrs/src/components/Tab/{Tab.vue.cjs → Tab.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Tab/Tab.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Tab/{Tab.vue.js → Tab.vue2.js} +2 -2
- package/dist/martyrs/src/components/Tab/{Tab.vue.cjs.map → Tab.vue2.js.map} +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileBlogposts.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileBlogposts.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +42 -10
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +44 -12
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.cjs +12 -16
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +22 -26
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs +13 -17
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +34 -38
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.cjs +13 -9
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.js +13 -9
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.js.map +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/router/users.cjs +0 -4
- package/dist/martyrs/src/modules/auth/views/router/users.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/router/users.js +0 -4
- package/dist/martyrs/src/modules/auth/views/router/users.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/pages/Posts.vue.cjs +431 -0
- package/dist/martyrs/src/modules/community/components/pages/Posts.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/community/components/pages/Posts.vue.js +431 -0
- package/dist/martyrs/src/modules/community/components/pages/Posts.vue.js.map +1 -0
- package/dist/martyrs/src/modules/community/router/blogposts.cjs +17 -0
- package/dist/martyrs/src/modules/community/router/blogposts.cjs.map +1 -1
- package/dist/martyrs/src/modules/community/router/blogposts.js +17 -0
- package/dist/martyrs/src/modules/community/router/blogposts.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +2 -2
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +1 -3
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +1 -3
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +2 -2
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.cjs +4 -6
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.js +4 -6
- package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/BlockFilter.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/BlockFilter.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/Card.vue.cjs +5 -2
- package/dist/martyrs/src/modules/globals/views/components/blocks/Card.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/Card.vue.js +6 -3
- package/dist/martyrs/src/modules/globals/views/components/blocks/Card.vue.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +2 -3
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +2 -3
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs +324 -0
- package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs.map +1 -0
- package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.js +324 -0
- package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.js.map +1 -0
- package/dist/martyrs/src/modules/globals/views/components/sections/SectionPageTitle.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/sections/SectionPageTitle.vue.js +1 -1
- package/dist/martyrs/src/modules/icons/entities/IconLock.vue.cjs +32 -0
- package/dist/martyrs/src/modules/icons/entities/IconLock.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/icons/entities/IconLock.vue.js +32 -0
- package/dist/martyrs/src/modules/icons/entities/IconLock.vue.js.map +1 -0
- package/dist/martyrs/src/modules/icons/icons.client.cjs +2 -0
- package/dist/martyrs/src/modules/icons/icons.client.cjs.map +1 -1
- package/dist/martyrs/src/modules/icons/icons.client.js +116 -114
- package/dist/martyrs/src/modules/icons/icons.client.js.map +1 -1
- package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.cjs +5 -3
- package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.js +117 -115
- package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionGuide.vue.cjs +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SectionGuide.vue.js +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SubscribeNewsletter.vue.cjs +11 -36
- package/dist/martyrs/src/modules/landing/components/sections/SubscribeNewsletter.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/landing/components/sections/SubscribeNewsletter.vue.js +11 -36
- package/dist/martyrs/src/modules/landing/components/sections/SubscribeNewsletter.vue.js.map +1 -1
- package/dist/martyrs/src/modules/landing/landing.client.cjs +3 -0
- package/dist/martyrs/src/modules/landing/landing.client.cjs.map +1 -1
- package/dist/martyrs/src/modules/landing/landing.client.js +3 -0
- package/dist/martyrs/src/modules/landing/landing.client.js.map +1 -1
- package/dist/martyrs/src/modules/landing/locales/en.cjs +12 -0
- package/dist/martyrs/src/modules/landing/locales/en.cjs.map +1 -0
- package/dist/martyrs/src/modules/landing/locales/en.js +12 -0
- package/dist/martyrs/src/modules/landing/locales/en.js.map +1 -0
- package/dist/martyrs/src/modules/landing/locales/index.cjs +10 -0
- package/dist/martyrs/src/modules/landing/locales/index.cjs.map +1 -0
- package/dist/martyrs/src/modules/landing/locales/index.js +10 -0
- package/dist/martyrs/src/modules/landing/locales/index.js.map +1 -0
- package/dist/martyrs/src/modules/landing/locales/ru.cjs +12 -0
- package/dist/martyrs/src/modules/landing/locales/ru.cjs.map +1 -0
- package/dist/martyrs/src/modules/landing/locales/ru.js +12 -0
- package/dist/martyrs/src/modules/landing/locales/ru.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Artist.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +1 -1
- package/dist/martyrs/src/modules/music/router/music.cjs +2 -4
- package/dist/martyrs/src/modules/music/router/music.cjs.map +1 -1
- package/dist/martyrs/src/modules/music/router/music.js +2 -4
- package/dist/martyrs/src/modules/music/router/music.js.map +1 -1
- package/dist/martyrs/src/modules/notifications/components/pages/Notifications.vue.cjs +1 -1
- package/dist/martyrs/src/modules/notifications/components/pages/Notifications.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/blocks/CardApplication.vue.cjs +86 -0
- package/dist/martyrs/src/modules/orders/components/blocks/CardApplication.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/components/blocks/CardApplication.vue.js +86 -0
- package/dist/martyrs/src/modules/orders/components/blocks/CardApplication.vue.js.map +1 -0
- package/dist/martyrs/src/modules/orders/components/blocks/CardCustomer.vue.cjs +103 -0
- package/dist/martyrs/src/modules/orders/components/blocks/CardCustomer.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/components/blocks/CardCustomer.vue.js +103 -0
- package/dist/martyrs/src/modules/orders/components/blocks/CardCustomer.vue.js.map +1 -0
- package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.cjs +194 -0
- package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.js +194 -0
- package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.js.map +1 -0
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.cjs +138 -0
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +138 -0
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js.map +1 -0
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.cjs +189 -0
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +189 -0
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js.map +1 -0
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.cjs +173 -0
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +173 -0
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js.map +1 -0
- package/dist/martyrs/src/modules/orders/components/pages/Applications.vue.cjs +233 -0
- package/dist/martyrs/src/modules/orders/components/pages/Applications.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/components/pages/Applications.vue.js +233 -0
- package/dist/martyrs/src/modules/orders/components/pages/Applications.vue.js.map +1 -0
- package/dist/martyrs/src/modules/orders/components/pages/Customers.vue.cjs +234 -0
- package/dist/martyrs/src/modules/orders/components/pages/Customers.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/components/pages/Customers.vue.js +234 -0
- package/dist/martyrs/src/modules/orders/components/pages/Customers.vue.js.map +1 -0
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs +10 -9
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +10 -9
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +9 -83
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +10 -84
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.cjs +119 -0
- package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js +119 -0
- package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js.map +1 -0
- package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.cjs +139 -0
- package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js +139 -0
- package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js.map +1 -0
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -3
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +1 -3
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/locales/en.cjs +38 -0
- package/dist/martyrs/src/modules/orders/locales/en.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/locales/en.js +38 -0
- package/dist/martyrs/src/modules/orders/locales/en.js.map +1 -0
- package/dist/martyrs/src/modules/orders/locales/index.cjs +10 -0
- package/dist/martyrs/src/modules/orders/locales/index.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/locales/index.js +10 -0
- package/dist/martyrs/src/modules/orders/locales/index.js.map +1 -0
- package/dist/martyrs/src/modules/orders/locales/ru.cjs +38 -0
- package/dist/martyrs/src/modules/orders/locales/ru.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/locales/ru.js +38 -0
- package/dist/martyrs/src/modules/orders/locales/ru.js.map +1 -0
- package/dist/martyrs/src/modules/orders/orders.client.cjs +78 -3
- package/dist/martyrs/src/modules/orders/orders.client.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/orders.client.js +80 -5
- package/dist/martyrs/src/modules/orders/orders.client.js.map +1 -1
- package/dist/martyrs/src/modules/orders/router/applications.router.cjs +17 -0
- package/dist/martyrs/src/modules/orders/router/applications.router.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/router/applications.router.js +17 -0
- package/dist/martyrs/src/modules/orders/router/applications.router.js.map +1 -0
- package/dist/martyrs/src/modules/orders/router/customers.router.cjs +18 -0
- package/dist/martyrs/src/modules/orders/router/customers.router.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/router/customers.router.js +18 -0
- package/dist/martyrs/src/modules/orders/router/customers.router.js.map +1 -0
- package/dist/martyrs/src/modules/orders/store/applications.cjs +4 -42
- package/dist/martyrs/src/modules/orders/store/applications.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/store/applications.js +3 -41
- package/dist/martyrs/src/modules/orders/store/applications.js.map +1 -1
- package/dist/martyrs/src/modules/orders/store/models/application.cjs +20 -0
- package/dist/martyrs/src/modules/orders/store/models/application.cjs.map +1 -0
- package/dist/martyrs/src/modules/orders/store/models/application.js +20 -0
- package/dist/martyrs/src/modules/orders/store/models/application.js.map +1 -0
- package/dist/martyrs/src/modules/orders/store/models/customer.cjs +13 -1
- package/dist/martyrs/src/modules/orders/store/models/customer.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/store/models/customer.js +13 -1
- package/dist/martyrs/src/modules/orders/store/models/customer.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +16 -192
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +17 -193
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs +2 -11
- package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.js +6 -15
- package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.cjs +85 -89
- package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js +92 -96
- package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/router/organizations.cjs +4 -0
- package/dist/martyrs/src/modules/organizations/router/organizations.cjs.map +1 -1
- package/dist/martyrs/src/modules/organizations/router/organizations.js +4 -0
- package/dist/martyrs/src/modules/organizations/router/organizations.js.map +1 -1
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/Page.vue.cjs +3 -6
- package/dist/martyrs/src/modules/pages/views/components/pages/Page.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/Page.vue.js +3 -6
- package/dist/martyrs/src/modules/pages/views/components/pages/Page.vue.js.map +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +22 -19
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +22 -19
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +28 -19
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +28 -19
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +3 -3
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs +360 -105
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +378 -123
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.cjs +33 -3
- package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +34 -4
- package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +2 -2
- package/dist/martyrs/src/modules/products/router/products.router.cjs +15 -0
- package/dist/martyrs/src/modules/products/router/products.router.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/router/products.router.js +15 -0
- package/dist/martyrs/src/modules/products/router/products.router.js.map +1 -1
- package/dist/martyrs/src/modules/products/store/categories.cjs +25 -7
- package/dist/martyrs/src/modules/products/store/categories.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/store/categories.js +25 -7
- package/dist/martyrs/src/modules/products/store/categories.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.cjs +2 -2
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +2 -2
- package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.cjs +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js +1 -1
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Map.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Spot.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Spot.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.cjs +345 -0
- package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js +345 -0
- package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js.map +1 -0
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/router/spots.cjs +17 -0
- package/dist/martyrs/src/modules/spots/router/spots.cjs.map +1 -1
- package/dist/martyrs/src/modules/spots/router/spots.js +17 -0
- package/dist/martyrs/src/modules/spots/router/spots.js.map +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
- package/dist/martyrs.cjs.js +1 -1
- package/dist/martyrs.css +1 -1
- package/dist/martyrs.es.js +1 -1
- package/dist/notifications.server.cjs +1 -1
- package/dist/notifications.server.js +1 -1
- package/dist/orders.server.cjs +459 -201
- package/dist/orders.server.js +459 -201
- package/dist/organizations.server.cjs +1 -1
- package/dist/organizations.server.js +1 -1
- package/dist/products.server.cjs +428 -255
- package/dist/products.server.js +428 -255
- package/dist/style.css +115 -139
- package/dist/{tickets.controller-DQQcjyui.js → tickets.controller-C56OvH6v.js} +1 -1
- package/dist/{tickets.controller-D0V0gJCA.cjs → tickets.controller-DdnndM6c.cjs} +1 -1
- package/dist/wallet.server.cjs +1 -1
- package/dist/wallet.server.js +1 -1
- package/dist/{web-B1bEJ1W9.js → web-BXajFCU2.js} +1 -1
- package/dist/{web-D5i9k2Vv.cjs → web-DaBwwCQ5.cjs} +1 -1
- package/package.json +1 -1
- package/src/builder/modes/ssr.dev.js +10 -10
- package/src/builder/rspack/rspack.config.ssr.client.js +50 -50
- package/src/components/Checkbox/Checkbox.vue +3 -4
- package/src/components/Feed/Feed.old.vue +522 -0
- package/src/components/Feed/Feed.vue +4 -4
- package/src/components/Field/Field.vue +7 -1
- package/src/components/FieldBig/FieldBig.vue +62 -8
- package/src/components/PhotoViewer/PhotoViewer.vue +1 -1
- package/src/modules/STYLES.MD +198 -0
- package/src/modules/auth/views/components/pages/Profile.vue +1 -1
- package/src/modules/auth/views/components/pages/ProfileEdit.vue +42 -8
- package/src/modules/auth/views/components/pages/ProfileEditAccount.vue +9 -11
- package/src/modules/auth/views/components/pages/ProfileEditProfile.vue +9 -11
- package/src/modules/auth/views/components/pages/ProfileEditSidebar.vue +7 -4
- package/src/modules/auth/views/router/users.js +0 -4
- package/src/modules/community/components/pages/Posts.vue +444 -0
- package/src/modules/community/router/blogposts.js +15 -0
- package/src/modules/globals/views/classes/globals.websocket.js +7 -8
- package/src/modules/globals/views/components/blocks/Card.vue +2 -1
- package/src/modules/globals/views/components/layouts/Client.vue +1 -2
- package/src/modules/globals/views/components/partials/FooterAlt.vue +161 -188
- package/src/modules/globals/views/components/sections/Filters.vue +261 -121
- package/src/modules/globals/views/components/sections/filters/FilterCheckbox.vue +78 -0
- package/src/modules/globals/views/components/sections/filters/FilterDateRange.vue +177 -0
- package/src/modules/globals/views/components/sections/filters/FilterRange.vue +51 -50
- package/src/modules/icons/entities/IconLock.vue +14 -0
- package/src/modules/icons/icons.client.js +2 -1
- package/src/modules/icons/pages/IconsPage.vue +4 -2
- package/src/modules/landing/components/sections/SubscribeNewsletter.vue +11 -61
- package/src/modules/landing/landing.client.js +6 -0
- package/src/modules/landing/locales/en.js +9 -0
- package/src/modules/landing/locales/index.js +7 -0
- package/src/modules/landing/locales/ru.js +9 -0
- package/src/modules/music/components/pages/Album.vue +1 -1
- package/src/modules/music/components/pages/Playlist.vue +1 -1
- package/src/modules/music/components/pages/Track.vue +1 -1
- package/src/modules/orders/components/blocks/CardApplication.vue +74 -0
- package/src/modules/orders/components/blocks/CardCustomer.vue +90 -0
- package/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue +199 -0
- package/src/modules/orders/components/forms/FormApplicationDetails.vue +117 -0
- package/src/modules/orders/components/forms/FormCustomerDetails.vue +165 -0
- package/src/modules/orders/components/forms/FormSelectCustomer.vue +172 -0
- package/src/modules/orders/components/pages/Applications.vue +240 -0
- package/src/modules/orders/components/pages/Customers.vue +239 -0
- package/src/modules/orders/components/pages/OrderCreate.vue +2 -2
- package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +4 -75
- package/src/modules/orders/components/sections/ApplicationDetails.vue +91 -0
- package/src/modules/orders/components/sections/CustomerDetails.vue +107 -0
- package/src/modules/orders/locales/en.js +35 -0
- package/src/modules/orders/locales/index.js +7 -0
- package/src/modules/orders/locales/ru.js +35 -0
- package/src/modules/orders/middlewares/applications.verifier.js +189 -0
- package/src/modules/orders/middlewares/customers.verifier.js +251 -0
- package/src/modules/orders/models/application.model.js +21 -0
- package/src/modules/orders/models/customer.model.js +26 -0
- package/src/modules/orders/orders.client.js +86 -1
- package/src/modules/orders/orders.server.js +3 -1
- package/src/modules/orders/router/applications.router.js +15 -0
- package/src/modules/orders/router/customers.router.js +17 -0
- package/src/modules/orders/routes/applications.routes.js +124 -12
- package/src/modules/orders/routes/customers.routes.js +43 -0
- package/src/modules/orders/store/applications.js +3 -159
- package/src/modules/orders/store/models/application.js +18 -0
- package/src/modules/orders/store/models/customer.js +12 -0
- package/src/modules/organizations/components/pages/Organization.new.vue +593 -0
- package/src/modules/organizations/components/pages/Organization.vue +10 -201
- package/src/modules/organizations/components/sections/DetailsTabSection.vue +2 -2
- package/src/modules/organizations/configs/navigation.organization.config.js +69 -85
- package/src/modules/organizations/router/organizations.js +5 -0
- package/src/modules/pages/views/components/pages/Page.vue +1 -1
- package/src/modules/products/TASKS.MD +157 -0
- package/src/modules/products/components/blocks/CardCategory.vue +1 -1
- package/src/modules/products/components/blocks/ProductImages.vue +1 -1
- package/src/modules/products/components/pages/Categories.vue +27 -22
- package/src/modules/products/components/pages/CategoryEdit.vue +24 -13
- package/src/modules/products/components/pages/Products.vue +414 -173
- package/src/modules/products/components/sections/ProductsRecommended.vue +46 -2
- package/src/modules/products/controllers/categories.controller.js +321 -282
- package/src/modules/products/controllers/configs/products.lookup.config.js +9 -0
- package/src/modules/products/controllers/products.controller.js +2 -1
- package/src/modules/products/controllers/queries/products.queries.js +183 -11
- package/src/modules/products/middlewares/categories.verifier.js +58 -15
- package/src/modules/products/migrations/categories-to-materialized-path.js +433 -0
- package/src/modules/products/migrations/path-to-url.js +27 -0
- package/src/modules/products/models/category.model.js +8 -23
- package/src/modules/products/router/products.router.js +12 -0
- package/src/modules/products/store/categories.js +26 -7
- package/src/modules/rents/TASK.MD +161 -0
- package/src/modules/spots/components/pages/Spots.vue +342 -0
- package/src/modules/spots/router/spots.js +15 -0
- package/src/styles/base/all.scss +2 -3
- package/src/styles/layout.scss +16 -0
- package/dist/main-w3rPUBVh.cjs +0 -11
- package/dist/martyrs/src/components/BottomSheet/BottomSheet.vue.cjs +0 -96
- package/dist/martyrs/src/components/BottomSheet/BottomSheet.vue.cjs.map +0 -1
- package/dist/martyrs/src/components/BottomSheet/BottomSheet.vue.js +0 -96
- package/dist/martyrs/src/components/BottomSheet/BottomSheet.vue.js.map +0 -1
- package/dist/martyrs/src/components/Button/Button.vue.js.map +0 -1
- package/dist/martyrs/src/components/Spoiler/Spoiler.vue.js.map +0 -1
- package/dist/martyrs/src/components/Tab/Tab.vue.js.map +0 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +0 -155
- package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.cjs.map +0 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.js +0 -155
- package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.js.map +0 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +0 -81
- package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs.map +0 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.js +0 -81
- package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.js.map +0 -1
- package/src/modules/orders/components/sections/FormAddCustomer.vue +0 -152
- package/src/modules/orders/components/sections/FormCustomerDetails.vue +0 -67
- package/src/modules/orders/controllers/applications.controller.js +0 -122
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { ref, computed, onMounted, createElementBlock, openBlock, createBlock, createCommentVNode, createVNode, unref, withCtx, createElementVNode, toDisplayString, Fragment, renderList } from "vue";
|
|
2
|
+
import { useRoute, useRouter } from "vue-router";
|
|
3
|
+
import _sfc_main$2 from "../../../../components/Block/Block.vue.js";
|
|
4
|
+
import _sfc_main$4 from "../../../../components/Popup/Popup.vue.js";
|
|
5
|
+
import applications from "../../store/applications.js";
|
|
6
|
+
import _sfc_main$1 from "../../../globals/views/components/sections/SectionPageTitle.vue.js";
|
|
7
|
+
import _sfc_main$3 from "../../../../components/Feed/Feed.vue.js";
|
|
8
|
+
import CardApplication from "../blocks/CardApplication.vue.js";
|
|
9
|
+
import _sfc_main$5 from "../forms/FormApplicationDetails.vue.js";
|
|
10
|
+
import ApplicationDetails from "../sections/ApplicationDetails.vue.js";
|
|
11
|
+
import applicationInitState from "../../store/models/application.js";
|
|
12
|
+
import { state } from "../../../auth/views/store/auth.js";
|
|
13
|
+
const _hoisted_1 = { class: "mobile:pd-thin pd-medium" };
|
|
14
|
+
const _hoisted_2 = { class: "gap-micro flex-nowrap flex" };
|
|
15
|
+
const _hoisted_3 = { class: "w-100 bg-white radius-small pd-small" };
|
|
16
|
+
const _hoisted_4 = { class: "w-100 bg-white radius-small pd-small" };
|
|
17
|
+
const _hoisted_5 = { class: "w-100 bg-white radius-small pd-small" };
|
|
18
|
+
const _hoisted_6 = ["onClick"];
|
|
19
|
+
const _sfc_main = {
|
|
20
|
+
__name: "Applications",
|
|
21
|
+
setup(__props) {
|
|
22
|
+
const route = useRoute();
|
|
23
|
+
useRouter();
|
|
24
|
+
const statusFilter = ref("all");
|
|
25
|
+
const showViewPopup = ref(false);
|
|
26
|
+
const showFormPopup = ref(false);
|
|
27
|
+
const selectedApplication = ref(null);
|
|
28
|
+
const formApplication = ref({ ...applicationInitState });
|
|
29
|
+
const isCreateMode = ref(false);
|
|
30
|
+
const currentApplications = ref([]);
|
|
31
|
+
const totalApplications = computed(() => {
|
|
32
|
+
return applications.state.items?.length || 0;
|
|
33
|
+
});
|
|
34
|
+
const inProgressApplications = computed(() => {
|
|
35
|
+
return applications.state.items?.filter((application) => application.status === "in_progress").length || 0;
|
|
36
|
+
});
|
|
37
|
+
const newApplicationsThisMonth = computed(() => {
|
|
38
|
+
if (!applications.state.items) return 0;
|
|
39
|
+
const now = /* @__PURE__ */ new Date();
|
|
40
|
+
const startOfMonth = new Date(now.getFullYear(), now.getMonth(), 1);
|
|
41
|
+
return applications.state.items.filter(
|
|
42
|
+
(application) => new Date(application.createdAt) >= startOfMonth
|
|
43
|
+
).length;
|
|
44
|
+
});
|
|
45
|
+
const openCreatePopup = () => {
|
|
46
|
+
formApplication.value = { ...applicationInitState };
|
|
47
|
+
isCreateMode.value = true;
|
|
48
|
+
showFormPopup.value = true;
|
|
49
|
+
};
|
|
50
|
+
const openViewPopup = (application) => {
|
|
51
|
+
selectedApplication.value = application;
|
|
52
|
+
showViewPopup.value = true;
|
|
53
|
+
};
|
|
54
|
+
const closeViewPopup = () => {
|
|
55
|
+
showViewPopup.value = false;
|
|
56
|
+
selectedApplication.value = null;
|
|
57
|
+
};
|
|
58
|
+
const closeFormPopup = () => {
|
|
59
|
+
showFormPopup.value = false;
|
|
60
|
+
formApplication.value = { ...applicationInitState };
|
|
61
|
+
isCreateMode.value = false;
|
|
62
|
+
};
|
|
63
|
+
const enableEdit = () => {
|
|
64
|
+
formApplication.value = { ...selectedApplication.value };
|
|
65
|
+
isCreateMode.value = false;
|
|
66
|
+
showViewPopup.value = false;
|
|
67
|
+
showFormPopup.value = true;
|
|
68
|
+
};
|
|
69
|
+
const saveApplication = async () => {
|
|
70
|
+
try {
|
|
71
|
+
const cleanData = { ...formApplication.value };
|
|
72
|
+
if (!cleanData.contacts?.email) delete cleanData.contacts?.email;
|
|
73
|
+
if (!cleanData.contacts?.phone) delete cleanData.contacts?.phone;
|
|
74
|
+
if (!cleanData.contacts?.name) delete cleanData.contacts?.name;
|
|
75
|
+
if (!cleanData.text) delete cleanData.text;
|
|
76
|
+
if (!cleanData.chat) delete cleanData.chat;
|
|
77
|
+
if (isCreateMode.value) {
|
|
78
|
+
delete cleanData._id;
|
|
79
|
+
}
|
|
80
|
+
if (route.meta.context === "organization") {
|
|
81
|
+
cleanData.owner = {
|
|
82
|
+
type: "Organization",
|
|
83
|
+
target: route.params._id || cleanData.owner?.target
|
|
84
|
+
};
|
|
85
|
+
} else {
|
|
86
|
+
cleanData.owner = {
|
|
87
|
+
type: "platform",
|
|
88
|
+
target: "000000000000000000000000"
|
|
89
|
+
// заглушка для отдела платформы
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
cleanData.creator = {
|
|
93
|
+
type: "User",
|
|
94
|
+
target: state.user._id || cleanData.creator?.target
|
|
95
|
+
};
|
|
96
|
+
if (isCreateMode.value) {
|
|
97
|
+
const response = await applications.create(cleanData);
|
|
98
|
+
applications.addItem(response, currentApplications.value);
|
|
99
|
+
} else {
|
|
100
|
+
const response = await applications.update(cleanData);
|
|
101
|
+
applications.updateItem(response, currentApplications.value);
|
|
102
|
+
selectedApplication.value = { ...response };
|
|
103
|
+
}
|
|
104
|
+
closeFormPopup();
|
|
105
|
+
} catch (error) {
|
|
106
|
+
console.error("Error saving application:", error);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
const deleteApplication = async () => {
|
|
110
|
+
if (confirm("Are you sure you want to delete this application?")) {
|
|
111
|
+
try {
|
|
112
|
+
await applications.delete({ _id: selectedApplication.value._id });
|
|
113
|
+
applications.removeItem(selectedApplication.value, currentApplications.value);
|
|
114
|
+
closeViewPopup();
|
|
115
|
+
} catch (error) {
|
|
116
|
+
console.error("Error deleting application:", error);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
onMounted(async () => {
|
|
121
|
+
});
|
|
122
|
+
return (_ctx, _cache) => {
|
|
123
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
124
|
+
!_ctx.MOBILE_APP ? (openBlock(), createBlock(_sfc_main$1, {
|
|
125
|
+
key: 0,
|
|
126
|
+
title: "Applications",
|
|
127
|
+
actions: [
|
|
128
|
+
{ method: () => openCreatePopup(), label: "Create Application" }
|
|
129
|
+
],
|
|
130
|
+
class: "mn-b-small"
|
|
131
|
+
}, null, 8, ["actions"])) : createCommentVNode("", true),
|
|
132
|
+
unref(route).meta.context !== "user" ? (openBlock(), createBlock(_sfc_main$2, {
|
|
133
|
+
key: 1,
|
|
134
|
+
title: "Statistics",
|
|
135
|
+
class: "mn-b-small"
|
|
136
|
+
}, {
|
|
137
|
+
default: withCtx(() => [
|
|
138
|
+
createElementVNode("div", _hoisted_2, [
|
|
139
|
+
createElementVNode("div", _hoisted_3, [
|
|
140
|
+
_cache[2] || (_cache[2] = createElementVNode("p", { class: "mn-b-thin" }, "Total", -1)),
|
|
141
|
+
createElementVNode("h3", null, toDisplayString(totalApplications.value), 1)
|
|
142
|
+
]),
|
|
143
|
+
createElementVNode("div", _hoisted_4, [
|
|
144
|
+
_cache[3] || (_cache[3] = createElementVNode("p", { class: "mn-b-thin" }, "In Progress", -1)),
|
|
145
|
+
createElementVNode("h3", null, toDisplayString(inProgressApplications.value), 1)
|
|
146
|
+
]),
|
|
147
|
+
createElementVNode("div", _hoisted_5, [
|
|
148
|
+
_cache[4] || (_cache[4] = createElementVNode("p", { class: "mn-b-thin" }, "New This Month", -1)),
|
|
149
|
+
createElementVNode("h3", null, toDisplayString(newApplicationsThisMonth.value), 1)
|
|
150
|
+
])
|
|
151
|
+
])
|
|
152
|
+
]),
|
|
153
|
+
_: 1
|
|
154
|
+
})) : createCommentVNode("", true),
|
|
155
|
+
createVNode(_sfc_main$3, {
|
|
156
|
+
items: currentApplications.value,
|
|
157
|
+
"onUpdate:items": _cache[0] || (_cache[0] = ($event) => currentApplications.value = $event),
|
|
158
|
+
search: true,
|
|
159
|
+
states: {
|
|
160
|
+
empty: {
|
|
161
|
+
title: "No Applications Found",
|
|
162
|
+
description: "Currently, there are no applications."
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
store: unref(applications),
|
|
166
|
+
options: {
|
|
167
|
+
limit: 15,
|
|
168
|
+
...unref(route).meta.context === "organization" && { owner: unref(route).params._id },
|
|
169
|
+
...statusFilter.value !== "all" && { status: statusFilter.value }
|
|
170
|
+
},
|
|
171
|
+
class: "gap-thin cols-3 mobile:cols-1"
|
|
172
|
+
}, {
|
|
173
|
+
default: withCtx(({
|
|
174
|
+
items
|
|
175
|
+
}) => [
|
|
176
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(items, (application) => {
|
|
177
|
+
return openBlock(), createElementBlock("div", {
|
|
178
|
+
key: application._id,
|
|
179
|
+
onClick: ($event) => openViewPopup(application),
|
|
180
|
+
class: "cursor-pointer"
|
|
181
|
+
}, [
|
|
182
|
+
createVNode(CardApplication, {
|
|
183
|
+
application,
|
|
184
|
+
formatDate: _ctx.formatDate
|
|
185
|
+
}, null, 8, ["application", "formatDate"])
|
|
186
|
+
], 8, _hoisted_6);
|
|
187
|
+
}), 128))
|
|
188
|
+
]),
|
|
189
|
+
_: 1
|
|
190
|
+
}, 8, ["items", "store", "options"]),
|
|
191
|
+
createVNode(_sfc_main$4, {
|
|
192
|
+
isPopupOpen: showViewPopup.value,
|
|
193
|
+
onClosePopup: closeViewPopup,
|
|
194
|
+
title: "Application Details",
|
|
195
|
+
align: "center right",
|
|
196
|
+
class: "bg-white h-min-100 w-max-50r pd-medium"
|
|
197
|
+
}, {
|
|
198
|
+
default: withCtx(() => [
|
|
199
|
+
selectedApplication.value ? (openBlock(), createBlock(ApplicationDetails, {
|
|
200
|
+
key: 0,
|
|
201
|
+
application: selectedApplication.value,
|
|
202
|
+
onEdit: enableEdit,
|
|
203
|
+
onDelete: deleteApplication
|
|
204
|
+
}, null, 8, ["application"])) : createCommentVNode("", true)
|
|
205
|
+
]),
|
|
206
|
+
_: 1
|
|
207
|
+
}, 8, ["isPopupOpen"]),
|
|
208
|
+
createVNode(_sfc_main$4, {
|
|
209
|
+
isPopupOpen: showFormPopup.value,
|
|
210
|
+
onClosePopup: closeFormPopup,
|
|
211
|
+
title: isCreateMode.value ? "Create Application" : "Edit Application",
|
|
212
|
+
align: "center right",
|
|
213
|
+
class: "bg-white h-min-100 w-max-50r pd-medium"
|
|
214
|
+
}, {
|
|
215
|
+
default: withCtx(() => [
|
|
216
|
+
createVNode(_sfc_main$5, {
|
|
217
|
+
application: formApplication.value,
|
|
218
|
+
"onUpdate:application": _cache[1] || (_cache[1] = ($event) => formApplication.value = $event),
|
|
219
|
+
onSave: saveApplication,
|
|
220
|
+
onCancel: closeFormPopup,
|
|
221
|
+
"create-mode": isCreateMode.value
|
|
222
|
+
}, null, 8, ["application", "create-mode"])
|
|
223
|
+
]),
|
|
224
|
+
_: 1
|
|
225
|
+
}, 8, ["isPopupOpen", "title"])
|
|
226
|
+
]);
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
export {
|
|
231
|
+
_sfc_main as default
|
|
232
|
+
};
|
|
233
|
+
//# sourceMappingURL=Applications.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Applications.vue.js","sources":["../../../../../../../src/modules/orders/components/pages/Applications.vue"],"sourcesContent":["<template>\n <div class=\"mobile:pd-thin pd-medium\"> \n <SectionPageTitle\n v-if=\"!MOBILE_APP\"\n title=\"Applications\"\n :actions=\"[\n { method: () => openCreatePopup(), label: 'Create Application' }\n ]\"\n class=\"mn-b-small\"\n />\n\n <Block\n v-if=\"route.meta.context !== 'user'\"\n title=\"Statistics\"\n class=\"mn-b-small\"\n >\n <div class=\"gap-micro flex-nowrap flex\">\n <div class=\"w-100 bg-white radius-small pd-small\">\n <p class=\"mn-b-thin\">Total</p>\n <h3>{{totalApplications}}</h3>\n </div>\n <div class=\"w-100 bg-white radius-small pd-small\">\n <p class=\"mn-b-thin\">In Progress</p>\n <h3>{{inProgressApplications}}</h3>\n </div>\n <div class=\"w-100 bg-white radius-small pd-small\">\n <p class=\"mn-b-thin\">New This Month</p>\n <h3>{{newApplicationsThisMonth}}</h3>\n </div>\n </div>\n </Block>\n <Feed\n v-model:items=\"currentApplications\"\n :search=\"true\"\n :states=\"{\n empty: {\n title: 'No Applications Found',\n description: 'Currently, there are no applications.'\n }\n }\"\n :store=\"applications\"\n :options=\"{\n limit: 15,\n ...(route.meta.context === 'organization' && { owner: route.params._id }),\n ...(statusFilter !== 'all' && { status: statusFilter })\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"gap-thin cols-3 mobile:cols-1\"\n >\n <div \n v-for=\"application in items\" \n :key=\"application._id\"\n @click=\"openViewPopup(application)\"\n class=\"cursor-pointer\"\n >\n <CardApplication \n :application=\"application\"\n :formatDate=\"formatDate\"\n />\n </div>\n </Feed>\n\n <!-- View Application Popup -->\n <Popup \n :isPopupOpen=\"showViewPopup\"\n @close-popup=\"closeViewPopup\"\n title=\"Application Details\"\n align=\"center right\"\n class=\"bg-white h-min-100 w-max-50r pd-medium\"\n >\n <ApplicationDetails\n v-if=\"selectedApplication\"\n :application=\"selectedApplication\"\n @edit=\"enableEdit\"\n @delete=\"deleteApplication\"\n />\n </Popup>\n\n <!-- Create/Edit Application Popup -->\n <Popup \n :isPopupOpen=\"showFormPopup\"\n @close-popup=\"closeFormPopup\"\n :title=\"isCreateMode ? 'Create Application' : 'Edit Application'\"\n align=\"center right\"\n class=\"bg-white h-min-100 w-max-50r pd-medium\"\n >\n <FormApplicationDetails \n v-model:application=\"formApplication\"\n @save=\"saveApplication\"\n @cancel=\"closeFormPopup\"\n :create-mode=\"isCreateMode\"\n />\n </Popup>\n </div>\n</template>\n\n<script setup>\n import { computed, onMounted, ref } from 'vue';\n import { useRoute, useRouter } from 'vue-router';\n\n import Block from '@martyrs/src/components/Block/Block.vue';\n import Popup from '@martyrs/src/components/Popup/Popup.vue';\n import applications from '@martyrs/src/modules/orders/store/applications.js';\n import SectionPageTitle from '@martyrs/src/modules/globals/views/components/sections/SectionPageTitle.vue'\n import Feed from '@martyrs/src/components/Feed/Feed.vue'\n import CardApplication from '@martyrs/src/modules/orders/components/blocks/CardApplication.vue'\n import FormApplicationDetails from '@martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue'\n import ApplicationDetails from '@martyrs/src/modules/orders/components/sections/ApplicationDetails.vue'\n import applicationInitState from '@martyrs/src/modules/orders/store/models/application.js';\n import * as auth from '@martyrs/src/modules/auth/views/store/auth.js';\n\n const route = useRoute();\n const router = useRouter();\n\n const statusFilter = ref('all')\n\n // Popup states\n const showViewPopup = ref(false)\n const showFormPopup = ref(false)\n const selectedApplication = ref(null)\n const formApplication = ref({ ...applicationInitState })\n const isCreateMode = ref(false)\n const currentApplications = ref([])\n\n const totalApplications = computed(() => {\n return applications.state.items?.length || 0\n });\n\n const inProgressApplications = computed(() => {\n return applications.state.items?.filter(application => application.status === 'in_progress').length || 0\n });\n\n const newApplicationsThisMonth = computed(() => {\n if (!applications.state.items) return 0;\n const now = new Date();\n const startOfMonth = new Date(now.getFullYear(), now.getMonth(), 1);\n return applications.state.items.filter(application => \n new Date(application.createdAt) >= startOfMonth\n ).length\n });\n\n // Popup methods\n const openCreatePopup = () => {\n formApplication.value = { ...applicationInitState };\n // Ownership будет установлен в saveApplication\n isCreateMode.value = true;\n showFormPopup.value = true;\n };\n\n const openViewPopup = (application) => {\n selectedApplication.value = application;\n showViewPopup.value = true;\n };\n\n const closeViewPopup = () => {\n showViewPopup.value = false;\n selectedApplication.value = null;\n };\n\n const closeFormPopup = () => {\n showFormPopup.value = false;\n formApplication.value = { ...applicationInitState };\n isCreateMode.value = false;\n };\n\n const enableEdit = () => {\n formApplication.value = { ...selectedApplication.value };\n isCreateMode.value = false;\n showViewPopup.value = false;\n showFormPopup.value = true;\n };\n\n const saveApplication = async () => {\n try {\n // Remove empty fields but preserve required ownership structure\n const cleanData = { ...formApplication.value };\n if (!cleanData.contacts?.email) delete cleanData.contacts?.email;\n if (!cleanData.contacts?.phone) delete cleanData.contacts?.phone;\n if (!cleanData.contacts?.name) delete cleanData.contacts?.name;\n if (!cleanData.text) delete cleanData.text;\n if (!cleanData.chat) delete cleanData.chat;\n \n // Remove _id to let MongoDB auto-generate it (Mongoose bug when _id is null)\n if (isCreateMode.value) {\n delete cleanData._id;\n }\n \n // Set owner based on context\n if (route.meta.context === 'organization') {\n // В контексте организации - owner это организация\n cleanData.owner = {\n type: 'Organization',\n target: route.params._id || cleanData.owner?.target\n };\n } else {\n // В контексте бекофиса - owner это Platform\n cleanData.owner = {\n type: 'platform',\n target: '000000000000000000000000' // заглушка для отдела платформы\n };\n }\n \n // Set creator (who created the application)\n cleanData.creator = {\n type: 'User',\n target: auth.state.user._id || cleanData.creator?.target\n };\n \n if (isCreateMode.value) {\n const response = await applications.create(cleanData);\n applications.addItem(response, currentApplications.value);\n } else {\n const response = await applications.update(cleanData);\n applications.updateItem(response, currentApplications.value);\n selectedApplication.value = { ...response };\n }\n closeFormPopup();\n } catch (error) {\n console.error('Error saving application:', error);\n }\n };\n\n const deleteApplication = async () => {\n if (confirm('Are you sure you want to delete this application?')) {\n try {\n await applications.delete({ _id: selectedApplication.value._id });\n applications.removeItem(selectedApplication.value, currentApplications.value);\n closeViewPopup();\n } catch (error) {\n console.error('Error deleting application:', error);\n }\n }\n };\n\n onMounted(async () => {\n \n });\n</script>"],"names":["auth.state"],"mappings":"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"}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const vueRouter = require("vue-router");
|
|
5
|
+
const Block = require("../../../../components/Block/Block.vue.cjs");
|
|
6
|
+
const Popup = require("../../../../components/Popup/Popup.vue.cjs");
|
|
7
|
+
const customers_store = require("../../store/customers.store.cjs");
|
|
8
|
+
const SectionPageTitle = require("../../../globals/views/components/sections/SectionPageTitle.vue.cjs");
|
|
9
|
+
const Feed = require("../../../../components/Feed/Feed.vue.cjs");
|
|
10
|
+
const CardCustomer = require("../blocks/CardCustomer.vue.cjs");
|
|
11
|
+
const FormCustomerDetails = require("../forms/FormCustomerDetails.vue.cjs");
|
|
12
|
+
const CustomerDetails = require("../sections/CustomerDetails.vue.cjs");
|
|
13
|
+
const customer = require("../../store/models/customer.cjs");
|
|
14
|
+
const auth = require("../../../auth/views/store/auth.cjs");
|
|
15
|
+
const _hoisted_1 = { class: "mobile:pd-thin pd-medium" };
|
|
16
|
+
const _hoisted_2 = { class: "gap-micro flex-nowrap flex" };
|
|
17
|
+
const _hoisted_3 = { class: "w-100 bg-white radius-small pd-small" };
|
|
18
|
+
const _hoisted_4 = { class: "w-100 bg-white radius-small pd-small" };
|
|
19
|
+
const _hoisted_5 = { class: "w-100 bg-white radius-small pd-small" };
|
|
20
|
+
const _hoisted_6 = ["onClick"];
|
|
21
|
+
const _sfc_main = {
|
|
22
|
+
__name: "Customers",
|
|
23
|
+
setup(__props) {
|
|
24
|
+
const route = vueRouter.useRoute();
|
|
25
|
+
vueRouter.useRouter();
|
|
26
|
+
const statusFilter = vue.ref("all");
|
|
27
|
+
const showViewPopup = vue.ref(false);
|
|
28
|
+
const showFormPopup = vue.ref(false);
|
|
29
|
+
const selectedCustomer = vue.ref(null);
|
|
30
|
+
const formCustomer = vue.ref({ ...customer.default });
|
|
31
|
+
const isCreateMode = vue.ref(false);
|
|
32
|
+
const currentCustomers = vue.ref([]);
|
|
33
|
+
const totalCustomers = vue.computed(() => {
|
|
34
|
+
return customers_store.default.state.items?.length || 0;
|
|
35
|
+
});
|
|
36
|
+
const activeCustomers = vue.computed(() => {
|
|
37
|
+
return customers_store.default.state.items?.filter((customer2) => customer2.status === "active").length || 0;
|
|
38
|
+
});
|
|
39
|
+
const newCustomersThisMonth = vue.computed(() => {
|
|
40
|
+
if (!customers_store.default.state.items) return 0;
|
|
41
|
+
const now = /* @__PURE__ */ new Date();
|
|
42
|
+
const startOfMonth = new Date(now.getFullYear(), now.getMonth(), 1);
|
|
43
|
+
return customers_store.default.state.items.filter(
|
|
44
|
+
(customer2) => new Date(customer2.createdAt) >= startOfMonth
|
|
45
|
+
).length;
|
|
46
|
+
});
|
|
47
|
+
const openCreatePopup = () => {
|
|
48
|
+
formCustomer.value = { ...customer.default };
|
|
49
|
+
if (route.params._id) {
|
|
50
|
+
formCustomer.value.owner = {
|
|
51
|
+
type: "Organization",
|
|
52
|
+
target: route.params._id
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
formCustomer.value.creator = {
|
|
56
|
+
type: "User",
|
|
57
|
+
target: auth.state.user._id
|
|
58
|
+
};
|
|
59
|
+
isCreateMode.value = true;
|
|
60
|
+
showFormPopup.value = true;
|
|
61
|
+
};
|
|
62
|
+
const openViewPopup = (customer2) => {
|
|
63
|
+
selectedCustomer.value = customer2;
|
|
64
|
+
showViewPopup.value = true;
|
|
65
|
+
};
|
|
66
|
+
const closeViewPopup = () => {
|
|
67
|
+
showViewPopup.value = false;
|
|
68
|
+
selectedCustomer.value = null;
|
|
69
|
+
};
|
|
70
|
+
const closeFormPopup = () => {
|
|
71
|
+
showFormPopup.value = false;
|
|
72
|
+
formCustomer.value = { ...customer.default };
|
|
73
|
+
isCreateMode.value = false;
|
|
74
|
+
};
|
|
75
|
+
const enableEdit = () => {
|
|
76
|
+
formCustomer.value = { ...selectedCustomer.value };
|
|
77
|
+
isCreateMode.value = false;
|
|
78
|
+
showViewPopup.value = false;
|
|
79
|
+
showFormPopup.value = true;
|
|
80
|
+
};
|
|
81
|
+
const saveCustomer = async () => {
|
|
82
|
+
try {
|
|
83
|
+
const cleanData = { ...formCustomer.value };
|
|
84
|
+
if (!cleanData.email) delete cleanData.email;
|
|
85
|
+
if (!cleanData.phone) delete cleanData.phone;
|
|
86
|
+
if (!cleanData.notes) delete cleanData.notes;
|
|
87
|
+
if (!cleanData.referral?.code) {
|
|
88
|
+
if (cleanData.referral) delete cleanData.referral.code;
|
|
89
|
+
}
|
|
90
|
+
cleanData.owner = {
|
|
91
|
+
type: "Organization",
|
|
92
|
+
target: route.params._id || cleanData.owner?.target
|
|
93
|
+
};
|
|
94
|
+
cleanData.creator = {
|
|
95
|
+
type: "User",
|
|
96
|
+
target: auth.state.user._id || cleanData.creator?.target
|
|
97
|
+
};
|
|
98
|
+
console.log("Sending customer data:", cleanData);
|
|
99
|
+
if (isCreateMode.value) {
|
|
100
|
+
const created = await customers_store.default.create(cleanData);
|
|
101
|
+
customers_store.default.addItem(created, currentCustomers.value);
|
|
102
|
+
} else {
|
|
103
|
+
const updated = await customers_store.default.update(cleanData);
|
|
104
|
+
customers_store.default.updateItem(updated, currentCustomers.value);
|
|
105
|
+
selectedCustomer.value = { ...updated };
|
|
106
|
+
}
|
|
107
|
+
closeFormPopup();
|
|
108
|
+
} catch (error) {
|
|
109
|
+
console.error("Error saving customer:", error);
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
const deleteCustomer = async () => {
|
|
113
|
+
if (confirm("Are you sure you want to delete this customer?")) {
|
|
114
|
+
try {
|
|
115
|
+
await customers_store.default.delete({ _id: selectedCustomer.value._id });
|
|
116
|
+
customers_store.default.removeItem(selectedCustomer.value, currentCustomers.value);
|
|
117
|
+
closeViewPopup();
|
|
118
|
+
} catch (error) {
|
|
119
|
+
console.error("Error deleting customer:", error);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
vue.onMounted(async () => {
|
|
124
|
+
});
|
|
125
|
+
return (_ctx, _cache) => {
|
|
126
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
127
|
+
!_ctx.MOBILE_APP ? (vue.openBlock(), vue.createBlock(SectionPageTitle.default, {
|
|
128
|
+
key: 0,
|
|
129
|
+
title: "Customers",
|
|
130
|
+
actions: [
|
|
131
|
+
{ method: () => openCreatePopup(), label: "Create Customer" }
|
|
132
|
+
],
|
|
133
|
+
class: "mn-b-small"
|
|
134
|
+
}, null, 8, ["actions"])) : vue.createCommentVNode("", true),
|
|
135
|
+
vue.unref(route).meta.context !== "user" ? (vue.openBlock(), vue.createBlock(Block.default, {
|
|
136
|
+
key: 1,
|
|
137
|
+
title: "Statistics",
|
|
138
|
+
class: "mn-b-small"
|
|
139
|
+
}, {
|
|
140
|
+
default: vue.withCtx(() => [
|
|
141
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
142
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
143
|
+
_cache[2] || (_cache[2] = vue.createElementVNode("p", { class: "mn-b-thin" }, "Total", -1)),
|
|
144
|
+
vue.createElementVNode("h3", null, vue.toDisplayString(totalCustomers.value), 1)
|
|
145
|
+
]),
|
|
146
|
+
vue.createElementVNode("div", _hoisted_4, [
|
|
147
|
+
_cache[3] || (_cache[3] = vue.createElementVNode("p", { class: "mn-b-thin" }, "Active", -1)),
|
|
148
|
+
vue.createElementVNode("h3", null, vue.toDisplayString(activeCustomers.value), 1)
|
|
149
|
+
]),
|
|
150
|
+
vue.createElementVNode("div", _hoisted_5, [
|
|
151
|
+
_cache[4] || (_cache[4] = vue.createElementVNode("p", { class: "mn-b-thin" }, "New This Month", -1)),
|
|
152
|
+
vue.createElementVNode("h3", null, vue.toDisplayString(newCustomersThisMonth.value), 1)
|
|
153
|
+
])
|
|
154
|
+
])
|
|
155
|
+
]),
|
|
156
|
+
_: 1
|
|
157
|
+
})) : vue.createCommentVNode("", true),
|
|
158
|
+
vue.createVNode(Feed.default, {
|
|
159
|
+
modelValue: currentCustomers.value,
|
|
160
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => currentCustomers.value = $event),
|
|
161
|
+
search: true,
|
|
162
|
+
states: {
|
|
163
|
+
empty: {
|
|
164
|
+
title: "No Customers Found",
|
|
165
|
+
description: "Currently, there are no customers."
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
store: vue.unref(customers_store.default),
|
|
169
|
+
options: {
|
|
170
|
+
limit: 15,
|
|
171
|
+
...vue.unref(route).meta.context === "organization" && { owner: vue.unref(route).params._id },
|
|
172
|
+
...statusFilter.value !== "all" && { status: statusFilter.value }
|
|
173
|
+
},
|
|
174
|
+
class: "gap-thin cols-3 mobile:cols-1"
|
|
175
|
+
}, {
|
|
176
|
+
default: vue.withCtx(({
|
|
177
|
+
items
|
|
178
|
+
}) => [
|
|
179
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(items, (customer2) => {
|
|
180
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
181
|
+
key: customer2._id,
|
|
182
|
+
onClick: ($event) => openViewPopup(customer2),
|
|
183
|
+
class: "cursor-pointer"
|
|
184
|
+
}, [
|
|
185
|
+
vue.createVNode(CardCustomer.default, {
|
|
186
|
+
customer: customer2,
|
|
187
|
+
formatDate: _ctx.formatDate
|
|
188
|
+
}, null, 8, ["customer", "formatDate"])
|
|
189
|
+
], 8, _hoisted_6);
|
|
190
|
+
}), 128))
|
|
191
|
+
]),
|
|
192
|
+
_: 1
|
|
193
|
+
}, 8, ["modelValue", "store", "options"]),
|
|
194
|
+
vue.createVNode(Popup.default, {
|
|
195
|
+
isPopupOpen: showViewPopup.value,
|
|
196
|
+
onClosePopup: closeViewPopup,
|
|
197
|
+
title: "Customer Details",
|
|
198
|
+
align: "center right",
|
|
199
|
+
class: "bg-white h-min-100 w-max-50r pd-medium"
|
|
200
|
+
}, {
|
|
201
|
+
default: vue.withCtx(() => [
|
|
202
|
+
selectedCustomer.value ? (vue.openBlock(), vue.createBlock(CustomerDetails.default, {
|
|
203
|
+
key: 0,
|
|
204
|
+
customer: selectedCustomer.value,
|
|
205
|
+
onEdit: enableEdit,
|
|
206
|
+
onDelete: deleteCustomer
|
|
207
|
+
}, null, 8, ["customer"])) : vue.createCommentVNode("", true)
|
|
208
|
+
]),
|
|
209
|
+
_: 1
|
|
210
|
+
}, 8, ["isPopupOpen"]),
|
|
211
|
+
vue.createVNode(Popup.default, {
|
|
212
|
+
isPopupOpen: showFormPopup.value,
|
|
213
|
+
onClosePopup: closeFormPopup,
|
|
214
|
+
title: isCreateMode.value ? "Create Customer" : "Edit Customer",
|
|
215
|
+
align: "center right",
|
|
216
|
+
class: "bg-white h-min-100 w-max-50r pd-medium"
|
|
217
|
+
}, {
|
|
218
|
+
default: vue.withCtx(() => [
|
|
219
|
+
vue.createVNode(FormCustomerDetails.default, {
|
|
220
|
+
customer: formCustomer.value,
|
|
221
|
+
"onUpdate:customer": _cache[1] || (_cache[1] = ($event) => formCustomer.value = $event),
|
|
222
|
+
onSave: saveCustomer,
|
|
223
|
+
onCancel: closeFormPopup,
|
|
224
|
+
"create-mode": isCreateMode.value
|
|
225
|
+
}, null, 8, ["customer", "create-mode"])
|
|
226
|
+
]),
|
|
227
|
+
_: 1
|
|
228
|
+
}, 8, ["isPopupOpen", "title"])
|
|
229
|
+
]);
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
exports.default = _sfc_main;
|
|
234
|
+
//# sourceMappingURL=Customers.vue.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Customers.vue.cjs","sources":["../../../../../../../src/modules/orders/components/pages/Customers.vue"],"sourcesContent":["<template>\n <div class=\"mobile:pd-thin pd-medium\"> \n <SectionPageTitle\n v-if=\"!MOBILE_APP\"\n title=\"Customers\"\n :actions=\"[\n { method: () => openCreatePopup(), label: 'Create Customer' }\n ]\"\n class=\"mn-b-small\"\n />\n\n <Block\n v-if=\"route.meta.context !== 'user'\"\n title=\"Statistics\"\n class=\"mn-b-small\"\n >\n <div class=\"gap-micro flex-nowrap flex\">\n <div class=\"w-100 bg-white radius-small pd-small\">\n <p class=\"mn-b-thin\">Total</p>\n <h3>{{totalCustomers}}</h3>\n </div>\n <div class=\"w-100 bg-white radius-small pd-small\">\n <p class=\"mn-b-thin\">Active</p>\n <h3>{{activeCustomers}}</h3>\n </div>\n <div class=\"w-100 bg-white radius-small pd-small\">\n <p class=\"mn-b-thin\">New This Month</p>\n <h3>{{newCustomersThisMonth}}</h3>\n </div>\n </div>\n </Block>\n\n <Feed\n v-model=\"currentCustomers\"\n :search=\"true\"\n :states=\"{\n empty: {\n title: 'No Customers Found',\n description: 'Currently, there are no customers.'\n }\n }\"\n :store=\"customers\"\n :options=\"{\n limit: 15,\n ...(route.meta.context === 'organization' && { owner: route.params._id }),\n ...(statusFilter !== 'all' && { status: statusFilter })\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"gap-thin cols-3 mobile:cols-1\"\n >\n <div \n v-for=\"customer in items\" \n :key=\"customer._id\"\n @click=\"openViewPopup(customer)\"\n class=\"cursor-pointer\"\n >\n <CardCustomer \n :customer=\"customer\"\n :formatDate=\"formatDate\"\n />\n </div>\n </Feed>\n\n <!-- View Customer Popup -->\n <Popup \n :isPopupOpen=\"showViewPopup\"\n @close-popup=\"closeViewPopup\"\n title=\"Customer Details\"\n align=\"center right\"\n class=\"bg-white h-min-100 w-max-50r pd-medium\"\n >\n <CustomerDetails\n v-if=\"selectedCustomer\"\n :customer=\"selectedCustomer\"\n @edit=\"enableEdit\"\n @delete=\"deleteCustomer\"\n />\n </Popup>\n\n <!-- Create/Edit Customer Popup -->\n <Popup \n :isPopupOpen=\"showFormPopup\"\n @close-popup=\"closeFormPopup\"\n :title=\"isCreateMode ? 'Create Customer' : 'Edit Customer'\"\n align=\"center right\"\n class=\"bg-white h-min-100 w-max-50r pd-medium\"\n >\n <FormCustomerDetails \n v-model:customer=\"formCustomer\"\n @save=\"saveCustomer\"\n @cancel=\"closeFormPopup\"\n :create-mode=\"isCreateMode\"\n />\n </Popup>\n </div>\n</template>\n\n<script setup>\n import { computed, onMounted, ref } from 'vue';\n import { useRoute, useRouter } from 'vue-router';\n\n import Block from '@martyrs/src/components/Block/Block.vue';\n import Popup from '@martyrs/src/components/Popup/Popup.vue';\n import customers from '@martyrs/src/modules/orders/store/customers.store.js';\n import SectionPageTitle from '@martyrs/src/modules/globals/views/components/sections/SectionPageTitle.vue'\n import Feed from '@martyrs/src/components/Feed/Feed.vue'\n import CardCustomer from '@martyrs/src/modules/orders/components/blocks/CardCustomer.vue'\n import FormCustomerDetails from '@martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue'\n import CustomerDetails from '@martyrs/src/modules/orders/components/sections/CustomerDetails.vue'\n import customerInitState from '@martyrs/src/modules/orders/store/models/customer.js';\n import * as auth from '@martyrs/src/modules/auth/views/store/auth.js';\n\n const route = useRoute();\n const router = useRouter();\n\n const statusFilter = ref('all')\n\n // Popup states\n const showViewPopup = ref(false)\n const showFormPopup = ref(false)\n const selectedCustomer = ref(null)\n const formCustomer = ref({ ...customerInitState })\n const isCreateMode = ref(false)\n const currentCustomers = ref([])\n\n const totalCustomers = computed(() => {\n return customers.state.items?.length || 0\n });\n\n const activeCustomers = computed(() => {\n return customers.state.items?.filter(customer => customer.status === 'active').length || 0\n });\n\n const newCustomersThisMonth = computed(() => {\n if (!customers.state.items) return 0;\n const now = new Date();\n const startOfMonth = new Date(now.getFullYear(), now.getMonth(), 1);\n return customers.state.items.filter(customer => \n new Date(customer.createdAt) >= startOfMonth\n ).length\n });\n\n // Popup methods\n const openCreatePopup = () => {\n formCustomer.value = { ...customerInitState };\n // Set owner and creator\n if (route.params._id) {\n formCustomer.value.owner = {\n type: 'Organization',\n target: route.params._id\n };\n }\n formCustomer.value.creator = {\n type: 'User',\n target: auth.state.user._id\n };\n isCreateMode.value = true;\n showFormPopup.value = true;\n };\n\n const openViewPopup = (customer) => {\n selectedCustomer.value = customer;\n showViewPopup.value = true;\n };\n\n const closeViewPopup = () => {\n showViewPopup.value = false;\n selectedCustomer.value = null;\n };\n\n const closeFormPopup = () => {\n showFormPopup.value = false;\n formCustomer.value = { ...customerInitState };\n isCreateMode.value = false;\n };\n\n const enableEdit = () => {\n formCustomer.value = { ...selectedCustomer.value };\n isCreateMode.value = false;\n showViewPopup.value = false;\n showFormPopup.value = true;\n };\n\n const saveCustomer = async () => {\n try {\n // Remove empty fields but preserve required ownership structure\n const cleanData = { ...formCustomer.value };\n if (!cleanData.email) delete cleanData.email;\n if (!cleanData.phone) delete cleanData.phone;\n if (!cleanData.notes) delete cleanData.notes;\n if (!cleanData.referral?.code) {\n if (cleanData.referral) delete cleanData.referral.code;\n }\n \n // Always ensure owner and creator have proper structure\n cleanData.owner = {\n type: 'Organization',\n target: route.params._id || cleanData.owner?.target\n };\n \n cleanData.creator = {\n type: 'User',\n target: auth.state.user._id || cleanData.creator?.target\n };\n \n console.log('Sending customer data:', cleanData);\n \n if (isCreateMode.value) {\n const created = await customers.create(cleanData);\n customers.addItem(created, currentCustomers.value);\n } else {\n const updated = await customers.update(cleanData);\n customers.updateItem(updated, currentCustomers.value);\n selectedCustomer.value = { ...updated };\n }\n closeFormPopup();\n } catch (error) {\n console.error('Error saving customer:', error);\n }\n };\n\n const deleteCustomer = async () => {\n if (confirm('Are you sure you want to delete this customer?')) {\n try {\n await customers.delete({ _id: selectedCustomer.value._id });\n customers.removeItem(selectedCustomer.value, currentCustomers.value);\n closeViewPopup();\n } catch (error) {\n console.error('Error deleting customer:', error);\n }\n }\n };\n\n onMounted(async () => {\n \n });\n</script>"],"names":["useRoute","useRouter","ref","customerInitState","computed","customers","customer","auth.state","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAkHE,UAAM,QAAQA,UAAAA,SAAQ;AACPC,cAAAA,UAAS;AAExB,UAAM,eAAeC,IAAAA,IAAI,KAAK;AAG9B,UAAM,gBAAgBA,IAAAA,IAAI,KAAK;AAC/B,UAAM,gBAAgBA,IAAAA,IAAI,KAAK;AAC/B,UAAM,mBAAmBA,IAAAA,IAAI,IAAI;AACjC,UAAM,eAAeA,IAAAA,IAAI,EAAE,GAAGC,iBAAiB,CAAE;AACjD,UAAM,eAAeD,IAAAA,IAAI,KAAK;AAC9B,UAAM,mBAAmBA,IAAAA,IAAI,CAAA,CAAE;AAE/B,UAAM,iBAAiBE,IAAAA,SAAS,MAAM;AACpC,aAAOC,wBAAU,MAAM,OAAO,UAAU;AAAA,IAC1C,CAAC;AAED,UAAM,kBAAkBD,IAAAA,SAAS,MAAM;AACrC,aAAOC,gBAAAA,QAAU,MAAM,OAAO,OAAO,CAAAC,cAAYA,UAAS,WAAW,QAAQ,EAAE,UAAU;AAAA,IAC3F,CAAC;AAED,UAAM,wBAAwBF,IAAAA,SAAS,MAAM;AAC3C,UAAI,CAACC,gBAAAA,QAAU,MAAM,MAAO,QAAO;AACnC,YAAM,MAAM,oBAAI,KAAI;AACpB,YAAM,eAAe,IAAI,KAAK,IAAI,YAAW,GAAI,IAAI,SAAQ,GAAI,CAAC;AAClE,aAAOA,wBAAU,MAAM,MAAM;AAAA,QAAO,CAAAC,cAClC,IAAI,KAAKA,UAAS,SAAS,KAAK;AAAA,MACtC,EAAM;AAAA,IACJ,CAAC;AAGD,UAAM,kBAAkB,MAAM;AAC5B,mBAAa,QAAQ,EAAE,GAAGH,iBAAiB;AAE3C,UAAI,MAAM,OAAO,KAAK;AACpB,qBAAa,MAAM,QAAQ;AAAA,UACzB,MAAM;AAAA,UACN,QAAQ,MAAM,OAAO;AAAA,QAC7B;AAAA,MACI;AACA,mBAAa,MAAM,UAAU;AAAA,QAC3B,MAAM;AAAA,QACN,QAAQI,KAAAA,MAAW,KAAK;AAAA,MAC9B;AACI,mBAAa,QAAQ;AACrB,oBAAc,QAAQ;AAAA,IACxB;AAEA,UAAM,gBAAgB,CAACD,cAAa;AAClC,uBAAiB,QAAQA;AACzB,oBAAc,QAAQ;AAAA,IACxB;AAEA,UAAM,iBAAiB,MAAM;AAC3B,oBAAc,QAAQ;AACtB,uBAAiB,QAAQ;AAAA,IAC3B;AAEA,UAAM,iBAAiB,MAAM;AAC3B,oBAAc,QAAQ;AACtB,mBAAa,QAAQ,EAAE,GAAGH,iBAAiB;AAC3C,mBAAa,QAAQ;AAAA,IACvB;AAEA,UAAM,aAAa,MAAM;AACvB,mBAAa,QAAQ,EAAE,GAAG,iBAAiB,MAAK;AAChD,mBAAa,QAAQ;AACrB,oBAAc,QAAQ;AACtB,oBAAc,QAAQ;AAAA,IACxB;AAEA,UAAM,eAAe,YAAY;AAC/B,UAAI;AAEF,cAAM,YAAY,EAAE,GAAG,aAAa,MAAK;AACzC,YAAI,CAAC,UAAU,MAAO,QAAO,UAAU;AACvC,YAAI,CAAC,UAAU,MAAO,QAAO,UAAU;AACvC,YAAI,CAAC,UAAU,MAAO,QAAO,UAAU;AACvC,YAAI,CAAC,UAAU,UAAU,MAAM;AAC7B,cAAI,UAAU,SAAU,QAAO,UAAU,SAAS;AAAA,QACpD;AAGA,kBAAU,QAAQ;AAAA,UAChB,MAAM;AAAA,UACN,QAAQ,MAAM,OAAO,OAAO,UAAU,OAAO;AAAA,QACrD;AAEM,kBAAU,UAAU;AAAA,UAClB,MAAM;AAAA,UACN,QAAQI,KAAAA,MAAW,KAAK,OAAO,UAAU,SAAS;AAAA,QAC1D;AAEM,gBAAQ,IAAI,0BAA0B,SAAS;AAE/C,YAAI,aAAa,OAAO;AACtB,gBAAM,UAAU,MAAMF,wBAAU,OAAO,SAAS;AAChDA,0BAAAA,QAAU,QAAQ,SAAS,iBAAiB,KAAK;AAAA,QACnD,OAAO;AACL,gBAAM,UAAU,MAAMA,wBAAU,OAAO,SAAS;AAChDA,0BAAAA,QAAU,WAAW,SAAS,iBAAiB,KAAK;AACpD,2BAAiB,QAAQ,EAAE,GAAG,QAAO;AAAA,QACvC;AACA,uBAAc;AAAA,MAChB,SAAS,OAAO;AACd,gBAAQ,MAAM,0BAA0B,KAAK;AAAA,MAC/C;AAAA,IACF;AAEA,UAAM,iBAAiB,YAAY;AACjC,UAAI,QAAQ,gDAAgD,GAAG;AAC7D,YAAI;AACF,gBAAMA,gBAAAA,QAAU,OAAO,EAAE,KAAK,iBAAiB,MAAM,KAAK;AAC1DA,0BAAAA,QAAU,WAAW,iBAAiB,OAAO,iBAAiB,KAAK;AACnE,yBAAc;AAAA,QAChB,SAAS,OAAO;AACd,kBAAQ,MAAM,4BAA4B,KAAK;AAAA,QACjD;AAAA,MACF;AAAA,IACF;AAEAG,QAAAA,UAAU,YAAY;AAAA,IAEtB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|