@ozdao/martyrs 0.2.456 → 0.2.458

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 (156) hide show
  1. package/dist/{Media-1oukRVfv.js → Media-B9V7fmz-.js} +1 -1
  2. package/dist/{Media-q-XJSM_H.mjs → Media-Df1hO2ZT.mjs} +1 -1
  3. package/dist/{main-yXkgrjj8.mjs → main-DbrX42CV.mjs} +99 -95
  4. package/dist/{main-C7jGMDJC.js → main-DviXUDiB.js} +1 -1
  5. package/dist/martyrs/src/components/EditImages/EditImages.vue.cjs +0 -93
  6. package/dist/martyrs/src/components/EditImages/EditImages.vue.cjs.map +1 -1
  7. package/dist/martyrs/src/components/EditImages/EditImages.vue.js +1 -94
  8. package/dist/martyrs/src/components/EditImages/EditImages.vue.js.map +1 -1
  9. package/dist/martyrs/src/components/EditImages/EditImages.vue2.cjs +93 -0
  10. package/dist/martyrs/src/components/EditImages/EditImages.vue2.cjs.map +1 -1
  11. package/dist/martyrs/src/components/EditImages/EditImages.vue2.js +94 -1
  12. package/dist/martyrs/src/components/EditImages/EditImages.vue2.js.map +1 -1
  13. package/dist/martyrs/src/components/Tab/{Tab.vue.cjs → Tab.vue2.cjs} +2 -2
  14. package/dist/martyrs/src/components/Tab/Tab.vue2.cjs.map +1 -0
  15. package/dist/martyrs/src/components/Tab/{Tab.vue.js → Tab.vue2.js} +2 -2
  16. package/dist/martyrs/src/components/Tab/{Tab.vue.cjs.map → Tab.vue2.js.map} +1 -1
  17. package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.cjs +1 -1
  18. package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.js +1 -1
  19. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +1 -1
  20. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +1 -1
  21. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -1
  22. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
  23. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileBlogposts.vue.cjs +1 -1
  24. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileBlogposts.vue.js +1 -1
  25. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +1 -1
  26. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +1 -1
  27. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +1 -1
  28. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +1 -1
  29. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs +1 -1
  30. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +1 -1
  31. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.cjs +1 -1
  32. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
  33. package/dist/martyrs/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  34. package/dist/martyrs/src/modules/backoffice/components/pages/Dashboard.vue.cjs.map +1 -1
  35. package/dist/martyrs/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  36. package/dist/martyrs/src/modules/backoffice/components/pages/Dashboard.vue.js.map +1 -1
  37. package/dist/martyrs/src/modules/community/community.client.js +27 -27
  38. package/dist/martyrs/src/modules/community/community.client.js.map +1 -1
  39. package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.cjs +6 -5
  40. package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.cjs.map +1 -1
  41. package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.js +6 -5
  42. package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.js.map +1 -1
  43. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  44. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  45. package/dist/martyrs/src/modules/events/components/pages/Events.vue.cjs +1 -1
  46. package/dist/martyrs/src/modules/events/components/pages/Events.vue.cjs.map +1 -1
  47. package/dist/martyrs/src/modules/events/components/pages/Events.vue.js +1 -1
  48. package/dist/martyrs/src/modules/events/components/pages/Events.vue.js.map +1 -1
  49. package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.cjs +1 -1
  50. package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.js +1 -1
  51. package/dist/martyrs/src/modules/events/components/sections/SelectDate.vue.cjs +1 -1
  52. package/dist/martyrs/src/modules/events/components/sections/SelectDate.vue.cjs.map +1 -1
  53. package/dist/martyrs/src/modules/events/components/sections/SelectDate.vue.js +1 -1
  54. package/dist/martyrs/src/modules/events/components/sections/SelectDate.vue.js.map +1 -1
  55. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +2 -2
  56. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs.map +1 -1
  57. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  58. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js.map +1 -1
  59. package/dist/martyrs/src/modules/globals/views/components/layouts/App.vue.cjs +14 -6
  60. package/dist/martyrs/src/modules/globals/views/components/layouts/App.vue.cjs.map +1 -1
  61. package/dist/martyrs/src/modules/globals/views/components/layouts/App.vue.js +14 -6
  62. package/dist/martyrs/src/modules/globals/views/components/layouts/App.vue.js.map +1 -1
  63. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +15 -2
  64. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
  65. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +15 -2
  66. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
  67. package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.cjs +23 -28
  68. package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.cjs.map +1 -1
  69. package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js +24 -29
  70. package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js.map +1 -1
  71. package/dist/martyrs/src/modules/globals/views/components/partials/Sidebar.vue.cjs +1 -3
  72. package/dist/martyrs/src/modules/globals/views/components/partials/Sidebar.vue.cjs.map +1 -1
  73. package/dist/martyrs/src/modules/globals/views/components/partials/Sidebar.vue.js +1 -3
  74. package/dist/martyrs/src/modules/globals/views/components/partials/Sidebar.vue.js.map +1 -1
  75. package/dist/martyrs/src/modules/globals/views/components/sections/SectionPageTitle.vue.cjs +1 -1
  76. package/dist/martyrs/src/modules/globals/views/components/sections/SectionPageTitle.vue.js +1 -1
  77. package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.cjs +1 -1
  78. package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.cjs.map +1 -1
  79. package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.js +1 -1
  80. package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.js.map +1 -1
  81. package/dist/martyrs/src/modules/landing/components/sections/SectionFeaturesImages.vue.cjs +2 -2
  82. package/dist/martyrs/src/modules/landing/components/sections/SectionFeaturesImages.vue.cjs.map +1 -1
  83. package/dist/martyrs/src/modules/landing/components/sections/SectionFeaturesImages.vue.js +2 -2
  84. package/dist/martyrs/src/modules/landing/components/sections/SectionFeaturesImages.vue.js.map +1 -1
  85. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  86. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
  87. package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.cjs +2 -2
  88. package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.cjs.map +1 -1
  89. package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js +2 -2
  90. package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js.map +1 -1
  91. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  92. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
  93. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  94. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +1 -1
  95. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  96. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  97. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  98. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
  99. package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  100. package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  101. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  102. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  103. package/dist/martyrs/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  104. package/dist/martyrs/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  105. package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +1 -1
  106. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +1 -1
  107. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +2 -2
  108. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
  109. package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs +1 -1
  110. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +1 -1
  111. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  112. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  113. package/dist/martyrs/src/modules/rents/views/components/pages/GanttChart.vue.cjs +1 -1
  114. package/dist/martyrs/src/modules/rents/views/components/pages/GanttChart.vue.js +1 -1
  115. package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.cjs +1 -1
  116. package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js +1 -1
  117. package/dist/martyrs/src/modules/reports/components/pages/BackofficeReports.vue.cjs +1 -1
  118. package/dist/martyrs/src/modules/reports/components/pages/BackofficeReports.vue.cjs.map +1 -1
  119. package/dist/martyrs/src/modules/reports/components/pages/BackofficeReports.vue.js +1 -1
  120. package/dist/martyrs/src/modules/reports/components/pages/BackofficeReports.vue.js.map +1 -1
  121. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
  122. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +1 -1
  123. package/dist/martyrs/src/modules/wallet/views/components/pages/Payments.vue.cjs +1 -1
  124. package/dist/martyrs/src/modules/wallet/views/components/pages/Payments.vue.cjs.map +1 -1
  125. package/dist/martyrs/src/modules/wallet/views/components/pages/Payments.vue.js +1 -1
  126. package/dist/martyrs/src/modules/wallet/views/components/pages/Payments.vue.js.map +1 -1
  127. package/dist/martyrs.cjs.js +1 -1
  128. package/dist/martyrs.css +1 -1
  129. package/dist/martyrs.es.js +1 -1
  130. package/dist/style.css +87 -113
  131. package/package.json +1 -1
  132. package/src/components/Slider/Slider.vue +35 -11
  133. package/src/modules/backoffice/components/admin/Users.vue +1 -1
  134. package/src/modules/backoffice/components/pages/Dashboard.vue +1 -1
  135. package/src/modules/community/components/sections/HotPosts.vue +5 -5
  136. package/src/modules/events/components/pages/Events.vue +1 -1
  137. package/src/modules/events/components/sections/SelectDate.vue +1 -1
  138. package/src/modules/gallery/components/sections/BackofficeGallery.vue +1 -1
  139. package/src/modules/globals/views/components/layouts/App.vue +16 -7
  140. package/src/modules/globals/views/components/layouts/Client.vue +17 -1
  141. package/src/modules/globals/views/components/partials/Footer.vue +2 -2
  142. package/src/modules/globals/views/components/partials/Navigation.vue +19 -65
  143. package/src/modules/globals/views/components/partials/Sidebar.vue +1 -11
  144. package/src/modules/landing/components/sections/SectionFeatures.vue +1 -1
  145. package/src/modules/landing/components/sections/SectionFeaturesImages.vue +1 -1
  146. package/src/modules/orders/components/pages/Orders.vue +1 -1
  147. package/src/modules/reports/components/pages/BackofficeReports.vue +1 -1
  148. package/src/modules/wallet/views/components/pages/Payments.vue +1 -1
  149. package/src/modules/wallet/views/components/pages/Wallet.vue +2 -2
  150. package/src/styles/config.scss +11 -0
  151. package/src/styles/responsive.scss +1 -1
  152. package/dist/martyrs/src/components/Slider/Slider.vue.cjs +0 -110
  153. package/dist/martyrs/src/components/Slider/Slider.vue.cjs.map +0 -1
  154. package/dist/martyrs/src/components/Slider/Slider.vue.js +0 -110
  155. package/dist/martyrs/src/components/Slider/Slider.vue.js.map +0 -1
  156. package/dist/martyrs/src/components/Tab/Tab.vue.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Client.vue.cjs","sources":["../../../../../../../../src/modules/globals/views/components/layouts/Client.vue"],"sourcesContent":["<template>\n\t<div \n\t\tid=\"app-wrapper\"\n\t\tclass=\"flex flex-column h-100 w-100 pos-relative o-hidden\"\n\t\t:class=\"{\n \t\t'pd-t-extra': MOBILE_APP === 'ios', \n\t\t\t'bg-white': headerTheme === 'light',\n\t\t\t'bg-black': headerTheme === 'dark' \n \t}\"\n\t>\n\t\t<transition name=\"moveFromTop\" appear>\n\t\t\t<Loader v-if=\"!page || isPageLoading\" class=\"pos-fixed\"/>\n\t\t</transition>\n\n\n\t <transition \n\t name=\"moveFromTop\" \n\t mode=\"out-in\"\n\t >\n\t <section \n\t v-if=\"FirstUse && route.meta.walkthrough\"\n\t class=\"w-100 h-100\" \n\t >\n\t <component \n\t :is=\"route.meta.walkthrough\"\n\t name=\"Walkthrough\"\n\t @updateFirstUse=\"updateFirstUse\" \n\t :slides=\"[1,2,3]\" \n\t class=\"tab\"\n\t >\n\t </component>\n\t </section>\n\t </transition>\n\n <component\n\t\t\tv-if=\"!MOBILE_APP && route.meta.header\"\n ref=\"header\" \n :is=\"route.meta.header\"\n :theme=\"headerTheme\"\n :logotype=\"route.meta.logotype\"\n :location=\"route.meta.location\"\n >\n \t<component\n\t\t v-if=\"route.meta?.header_navigation\"\n\t\t :is=\"route.meta.header_navigation\"\n\t\t :horizontal=\"true\"\n\t\t\t\t:navigationItems=\"route.meta.sidebar_navigation_items\"\n\t\t\t\t:stateSidebar=\"globals.state.isOpenSidebar\" \n\t\t\t\t:theme=\"headerTheme\"\n\t\t />\n \t</component>\n\n\t\t<transition name=\"moveFromTop\" mode=\"out-in\" appear>\n\t\t\t<component\n \tv-if=\"MOBILE_APP && !route.meta.hideNavigationBar\"\n :is=\"route.meta.navigationbar\"\n :logotype=\"route.meta.logotype\"\n :navigationItems=\"route.meta.sidebar_navigation_items\"\n\t :stateSidebar=\"globals.state.isOpenSidebar\" \n />\n\t\t</transition>\n\n\t <Popup \n\t \t@close-popup=\"closeLocationPopup\" \n\t \t:isPopupOpen=\"globals.state.isOpenLocationPopup\"\n\t \tclass=\"bg-white pd-semi w-m-33r radius-big\"\n\t >\t\n\t \t<LocationSelection />\n\t </Popup>\n\n\t <!-- class=\"flex flex-nowrap transition-ease-in-out o-hidden pos-relative\" -->\n\t\t<section \n\t\t\tid=\"screen\" \n\t\t\tref=\"screen\"\n\t\t\t@scroll=\"handleScroll\"\n\t\t\tclass=\"flex flex-nowrap h-100 pos-relative o-hidden transition-ease-in-out\"\n\t\t\t:class=\"{\n\t\t\t\t'': MOBILE_APP === 'ios',\n }\"\n\t\t>\n\t\t\t<ShopCart \n\t\t\t\t:class=\"{\n\t\t\t\t\t'mobile:pd-t-extra': MOBILE_APP === 'ios', \n\t\t\t\t}\"\n\t\t\t/>\n\n\t\t\t<!-- <section v-if=\"!route.meta?.breadcrumbs?.hide\" class=\"pd-thin pd-b-zero\">\n\t\t\t\t<Breadcrumbs \n\t\t\t\t\tv-if=\"!MOBILE_APP\"\n\t\t\t\t\tclass=\"bg-light pd-small radius-big\"\n\t\t\t\t/>\n\t\t\t</section> -->\n\n\t <component\n\t v-if=\"route.meta?.sidebar && !MOBILE_APP\"\n\t v-slot=\"{ Component }\"\n\t :is=\"route.meta.sidebar\"\n\t :stateSidebar=\"globals.state.isOpenSidebar\" \n\t :widthHidden='route.meta?.sidebar_width_hidden'\n\t :width=\"route.meta?.sidebar_width\"\n\t :theme=\"headerTheme\"\n\t @closeSidebar=\"() => globals.state.isOpenSidebar = false\"\n\t >\n\t \t<transition name=\"moveFromTop\" mode=\"out-in\" appear>\n\t\t <component\n\t\t v-if=\"route.meta?.sidebar_navigation\"\n\t\t :is=\"route.meta.sidebar_navigation\"\n\t\t :key=\"route.meta.sidebar_navigation\"\n\t\t :navigationItems=\"route.meta.sidebar_navigation_items\"\n\t\t\t :stateSidebar=\"globals.state.isOpenSidebar\" \n\t\t\t\t\t\t:theme=\"headerTheme\"\n\t\t />\n\t </transition>\n\t </component>\n\t\t <!-- rows-1-min0_max1 z-index-1 pos-relative w-100 h-100 -->\n\t\t <div class=\"rows-1-min0_max1 z-index-1 pos-relative w-100 h-100\">\n \t\t\t<Status \n\t\t\t\t\tv-if=\"globals.state.error.show\" \n\t\t\t\t\t:data=\"globals.state.error\"\n\t\t\t\t\t@close=\"globals.state.error.show = false\"\n\t\t\t\t\tclass=\"z-index-7\" \n\t\t\t\t/>\n\t\t\t\t <Suspense @resolve=\"onSuspenseResolved\">\n\t\t\t\t\t<router-view \n\t\t\t\t\t\tv-slot=\"{ Component, route }\" \n\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t'scroll-hide': MOBILE_APP,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\tclass=\"o-y-scroll o-x-hidden flex flex-column pos-relative h-100\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<transition @before-enter=\"scrollTop\" name=\"scaleTransition\" mode=\"out-in\" appear>\n\t\t\t \t<component \n\t\t\t \t\tref=\"page\" \n\t\t\t \t\t:is=\"Component\" \n\t\t\t \t\t:key=\"route.path\"\n\t\t\t \t\tclass=\"w-100 h-min-100\"\n\t\t \t\t \t@page-loading=\"handlePageLoading\"\n\t @page-loaded=\"handlePageLoaded\"\n\t\t\t \t/>\n\t\t\t \t<!-- Key пока выключил непонятно какие проблемы это вызовет -->\n\t\t\t \t<!-- -->\n\t\t\t </transition>\n\n\t\t\t <!-- <Footer /> -->\n\t\t\t\t\t</router-view>\n\t\t\t\t</Suspense>\n\t\t\t</div>\n\t\t</section>\n\n\t\t<router-view \n\t\t\tname=\"defaultBottom\"\n\t\t\tv-slot=\"{ Component, route }\" \n\t\t>\n\t\t\t<component \n \t\t:is=\"Component\" \n \t/>\n\t\t</router-view>\n\n\t <component\n\t\t\tv-if=\"!MOBILE_APP && route.meta.footer?.component && !route.meta.hideFooter\"\n ref=\"footer\" \n :is=\"route.meta.footer.component\"\n :theme=\"headerTheme\"\n :logotype=\"route.meta.footer.logotype\"\n :location=\"route.meta.footer.location\"\n />\n\n <component \n v-if=\"MOBILE_APP && route.meta.title_hide\"\n class=\"z-index-2\"\n \t:is=\"route.meta.bottombar\"\n />\n\t</div>\n</template>\n\n\n\n<script setup>\n\timport { computed, ref, onMounted, watch } from 'vue';\n\t// Router\n\timport { useRoute } from 'vue-router';\n\t// Store\n\timport * as globals from '@martyrs/src/modules/globals/views/store/globals';\n\t// Partials\n\timport Status from '@martyrs/src/components/Status/Status.vue';\n\timport Popup from '@martyrs/src/components/Popup/Popup.vue';\n\t// import Breadcrumbs from '@martyrs/src/components/Breadcrumbs/Breadcrumbs.vue'\n\timport Loader from '@martyrs/src/components/Loader/Loader.vue';\n\n\timport NavigationBar from '@martyrs/src/modules/globals/views/components/partials/NavigationBar.vue';\n\timport LocationSelection from '@martyrs/src/modules/globals/views/components/partials/LocationSelection.vue';\n\t// import Footer from '@martyrs/src/modules/globals/views/components/partials/Footer.vue'\n\n\timport ShopCart from '@martyrs/src/modules/orders/components/partials/ShopCart.vue';\n\t/////////////////////////////\n // LOADING\n /////////////////////////////\n // State\n let show = ref(false)\n // Preloader\n const page = ref(null)\n\n const isPageLoading = ref(true);\n \n // Обработчики событий загрузки\n function handlePageLoading() {\n isPageLoading.value = true;\n }\n \n function handlePageLoaded() {\n isPageLoading.value = false;\n }\n \n // Обработка события разрешения Suspense (когда async setup компонента завершается)\n function onSuspenseResolved() {\n // Если страница не отправляет событие page-loaded, этот обработчик \n // может служить запасным вариантом для отключения лоадера\n // Можно оставить закомментированным, если все страницы будут явно вызывать handlePageLoaded\n isPageLoading.value = false;\n }\n\t/////////////////////////////\n\t// CREATED\n\t/////////////////////////////\n\tconst route = useRoute()\n\t// const router = useRouter()\n\t// Ref Code\n\tconst referalCode = ref(route.query.referalCode);\n\t/////////////////////////////\n\t// Methods\n\t/////////////////////////////\n\tfunction closeLocationPopup() {\n\t globals.state.isOpenLocationPopup = false;\n\t}\n\tfunction scrollTop(){\n\t\tdocument.getElementById('app').scrollIntoView();\n\t}\n\t// Scrolling header\n\tconst scrollOffset = ref(0)\n\tlet isScrolled = false\n\tconst header = ref(null)\n\n\tconst headerTheme = computed(() => {\n\t\tif (scrollOffset.value > 50) {\n\t\t\treturn route.meta.header_theme || 'light'\n\t\t} else {\n\t\t\treturn route.meta.header_theme || 'light'\n\t\t}\n\t})\n\n\tconst handleScroll = () => {\n\t scrollOffset.value = event.target.scrollTop\n\t};\n/////////////////////////////\n // FIRST USE\n /////////////////////////////\n const FirstUse = ref(false);\n\n import { Preferences } from '@capacitor/preferences';\n\n async function getFirstUse() {\n const ret = await Preferences.get({ key: 'first-use' });\n FirstUse.value = ret.value ? JSON.parse(ret.value) : true;\n }\n\n const updateFirstUse = (value) => {\n FirstUse.value = value;\n }\n\n\tonMounted(async () => {\n\t await getFirstUse()\n\n\t\t// if ('serviceWorker' in navigator) {\n\t // \twindow.addEventListener('load', () => {\n\t // \tnavigator.serviceWorker.register('/service-worker.js').then(registration => {\n\t // \tconsole.log('SW registered: ', registration);\n\t // \t}).catch(registrationError => {\n\t // \tconsole.log('SW registration failed: ', registrationError);\n\t // \t});\n\t // });\n\t \t// }\n\t\t\n\t\tconst savedPosition = localStorage.getItem('position');\n\n\t if (savedPosition) {\n\t globals.state.position = JSON.parse(savedPosition);\n\t } else if (route.meta.location) {\n \t\tglobals.state.isOpenLocationPopup = true;\n\t } else {\n\t \tglobals.state.isOpenLocationPopup = false;\n\t }\n\n\t\tif (referalCode.value) {\n\t\t localStorage.setItem('referalCode', referalCode.value);\n\t\t}\n\n\t\tif (page.value) show.value = true\n\t});\n</script>\n\n<style lang=\"scss\">\n\t.fade-enter-active, .fade-leave-active {\n\t transition: opacity .5s;\n\t}\n\t.fade-enter, .fade-leave-to /* .fade-leave-active в версии 2.1.8+ */ {\n\t opacity: 0;\n\t}\n\n\t\n .fade-move,\n .fade-enter-active,\n .fade-leave-active {\n transition: all 0.5s cubic-bezier(0.55, 0, 0.1, 1);\n }\n\n /* 2. declare enter from and leave to state */\n .fade-enter-from,\n .fade-leave-to {\n opacity: 0;\n transform: translate(30px, 0);\n }\n\n /* 3. ensure leaving items are taken out of layout flow so that moving\n animations can be calculated correctly. */\n .fade-leave-active {\n position: absolute;\n }\n\n.moveFromTop-enter-active,\n.moveFromTop-leave-active {\n transition: all 0.3s ease, max-height 0.2s ease;\n overflow: hidden;\n}\n\n.moveFromTop-enter-from,\n.moveFromTop-leave-to {\n transform: translateY(-1rem);\n opacity: 0;\n // max-height: 0;\n}\n\n.moveFromTop-enter-to,\n.moveFromTop-leave-from {\n // max-height: 100vh; \n}\n\n\t.moveFromTopAbsolute-enter-active,\n\t.moveFromTopAbsolute-leave-active {\n\t\ttransform: translateY(0);\n\t\topacity: 1;\n\t\ttransition: all 0.5s ease; \n\t\t\n\t}\n\t.moveFromTopAbsolute-enter-from,\n\t.moveFromTopAbsolute-leave-to {\n\t\tposition: absolute;\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\n\t.ScaleOut-enter-active,\n\t.ScaleOut-leave-active {\n\t\topacity: 1;\n\t\ttransform: scale(1);\n\t\ttransition: all 0.3s ease; \n\t\t\n\t}\n\t.ScaleOut-enter-from,\n\t.ScaleOut-leave-to {\n\t\topacity: 0;\n\t\ttransform: scale(0.9);\n\t\ttransition: all 0.3s ease;\n\t}\n\t.slide-fade-enter-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-leave-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-enter-from,\n\t.slide-fade-leave-to {\n\t\tmin-height: 0;\n\t transform: translateX(20px);\n\t opacity: 0;\n\t left: 0;\n\t top: 0;\n\t}\n\n\t.scaleTransition-5px-enter-active,\n .scaleTransition-5px-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.2s ease;\n }\n\n .scaleTransition-5px-enter-from,\n .scaleTransition-5px-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n transform: translateY(-30px); \n transition: all 0.2s ease;\n }\n\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(30px); \n transition: all 0.5s ease;\n }\n\n .scaleTransition-enter-active,\n .scaleTransition-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.5s ease;\n }\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(30px); \n transition: all 0.5s ease;\n }\n\n .scaleIn-enter-active,\n .scaleIn-leave-active {\n // background: red;\n transition: all 0.5s ease;\n > section,div { transform-origin: 0 0; transform: translateZ(0px); transition: all 0.5s ease; }\n }\n .scaleIn-enter-from,\n .scaleIn-leave-to {\n opacity: 0;\n transform: scale(0.95);\n > section,div { transform: translateZ(-30px); transition: all 0.5s ease; }\n }\n</style>"],"names":["ref","useRoute","globals.state","computed","Preferences","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAsME,QAAI,OAAOA,IAAAA,IAAI,KAAK;AAEpB,UAAM,OAAOA,IAAAA,IAAI,IAAI;AAErB,UAAM,gBAAgBA,IAAG,IAAC,IAAI;AAG9B,aAAS,oBAAoB;AAC3B,oBAAc,QAAQ;AAAA,IAC1B;AAEE,aAAS,mBAAmB;AAC1B,oBAAc,QAAQ;AAAA,IAC1B;AAGE,aAAS,qBAAqB;AAI5B,oBAAc,QAAQ;AAAA,IAC1B;AAIC,UAAM,QAAQC,UAAQ,SAAA;AAGtB,UAAM,cAAcD,IAAG,IAAC,MAAM,MAAM,WAAW;AAI/C,aAAS,qBAAqB;AAC5BE,cAAa,MAAC,sBAAsB;AAAA,IACvC;AACC,aAAS,YAAW;AACnB,eAAS,eAAe,KAAK,EAAE,eAAgB;AAAA,IACjD;AAEC,UAAM,eAAeF,IAAAA,IAAI,CAAC;AAE1B,UAAM,SAASA,IAAAA,IAAI,IAAI;AAEvB,UAAM,cAAcG,IAAAA,SAAS,MAAM;AAClC,UAAI,aAAa,QAAQ,IAAI;AAC5B,eAAO,MAAM,KAAK,gBAAiB;AAAA,MACtC,OAAS;AACN,eAAO,MAAM,KAAK,gBAAgB;AAAA,MACrC;AAAA,IACE,CAAA;AAED,UAAM,eAAe,MAAM;AACzB,mBAAa,QAAQ,MAAM,OAAO;AAAA,IACnC;AAIA,UAAM,WAAWH,IAAG,IAAC,KAAK;AAI1B,mBAAe,cAAc;AAC3B,YAAM,MAAM,MAAMI,MAAW,YAAC,IAAI,EAAE,KAAK,aAAa;AACtD,eAAS,QAAQ,IAAI,QAAQ,KAAK,MAAM,IAAI,KAAK,IAAI;AAAA,IACzD;AAEE,UAAM,iBAAiB,CAAC,UAAU;AAChC,eAAS,QAAQ;AAAA,IACrB;AAECC,QAAAA,UAAU,YAAY;AACpB,YAAM,YAAW;AAYlB,YAAM,gBAAgB,aAAa,QAAQ,UAAU;AAEpD,UAAI,eAAe;AACjBH,gBAAAA,MAAc,WAAW,KAAK,MAAM,aAAa;AAAA,MACtD,WAAc,MAAM,KAAK,UAAU;AAC/BA,gBAAa,MAAC,sBAAsB;AAAA,MACxC,OAAU;AACNA,gBAAa,MAAC,sBAAsB;AAAA,MACxC;AAEE,UAAI,YAAY,OAAO;AACrB,qBAAa,QAAQ,eAAe,YAAY,KAAK;AAAA,MACzD;AAEE,UAAI,KAAK,MAAO,MAAK,QAAQ;AAAA,IAC/B,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Client.vue.cjs","sources":["../../../../../../../../src/modules/globals/views/components/layouts/Client.vue"],"sourcesContent":["<template>\n\t<div \n\t\tid=\"app-wrapper\"\n\t\tclass=\"flex flex-column h-100 w-100 pos-relative o-hidden\"\n\t\t:class=\"{\n \t\t'pd-t-extra': MOBILE_APP === 'ios', \n\t\t\t'bg-white': headerTheme === 'light',\n\t\t\t'bg-black': headerTheme === 'dark' \n \t}\"\n\t>\n\t\t<transition name=\"moveFromTop\" appear>\n\t\t\t<Loader v-if=\"!page || isPageLoading\" class=\"pos-fixed\"/>\n\t\t</transition>\n\n\n\t <transition \n\t name=\"moveFromTop\" \n\t mode=\"out-in\"\n\t >\n\t <section \n\t v-if=\"FirstUse && route.meta.walkthrough\"\n\t class=\"w-100 h-100\" \n\t >\n\t <component \n\t :is=\"route.meta.walkthrough\"\n\t name=\"Walkthrough\"\n\t @updateFirstUse=\"updateFirstUse\" \n\t :slides=\"[1,2,3]\" \n\t class=\"tab\"\n\t >\n\t </component>\n\t </section>\n\t </transition>\n\n <component\n\t\t\tv-if=\"!MOBILE_APP && route.meta.header\"\n ref=\"header\" \n :is=\"route.meta.header\"\n :theme=\"headerTheme\"\n :logotype=\"route.meta.logotype\"\n :location=\"route.meta.location\"\n >\n \t<component\n\t\t v-if=\"route.meta?.header_navigation\"\n\t\t :is=\"route.meta.header_navigation\"\n\t\t :horizontal=\"true\"\n\t\t\t\t:navigationItems=\"route.meta.sidebar_navigation_items\"\n\t\t\t\t:stateSidebar=\"globals.state.isOpenSidebar\" \n\t\t\t\t:theme=\"headerTheme\"\n\t\t />\n \t</component>\n\n\t\t<transition name=\"moveFromTop\" mode=\"out-in\" appear>\n\t\t\t<component\n \tv-if=\"MOBILE_APP && !route.meta.hideNavigationBar\"\n :is=\"route.meta.navigationbar\"\n :logotype=\"route.meta.logotype\"\n :navigationItems=\"route.meta.sidebar_navigation_items\"\n\t :stateSidebar=\"globals.state.isOpenSidebar\" \n />\n\t\t</transition>\n\n\t <Popup \n\t \t@close-popup=\"closeLocationPopup\" \n\t \t:isPopupOpen=\"globals.state.isOpenLocationPopup\"\n\t \tclass=\"bg-white pd-semi w-m-33r radius-big\"\n\t >\t\n\t \t<LocationSelection />\n\t </Popup>\n\n\t <!-- class=\"flex flex-nowrap transition-ease-in-out o-hidden pos-relative\" -->\n\t\t<section \n\t\t\tid=\"screen\" \n\t\t\tref=\"screen\"\n\t\t\t@scroll=\"handleScroll\"\n\t\t\tclass=\"flex flex-nowrap h-100 pos-relative o-hidden transition-ease-in-out\"\n\t\t\t:class=\"{\n\t\t\t\t'': MOBILE_APP === 'ios',\n }\"\n\t\t>\n\t\t\t<ShopCart \n\t\t\t\t:class=\"{\n\t\t\t\t\t'mobile:pd-t-extra': MOBILE_APP === 'ios', \n\t\t\t\t}\"\n\t\t\t/>\n\n\t\t\t<!-- <section v-if=\"!route.meta?.breadcrumbs?.hide\" class=\"pd-thin pd-b-zero\">\n\t\t\t\t<Breadcrumbs \n\t\t\t\t\tv-if=\"!MOBILE_APP\"\n\t\t\t\t\tclass=\"bg-light pd-small radius-big\"\n\t\t\t\t/>\n\t\t\t</section> -->\n\n\t <component\n\t v-if=\"route.meta?.sidebar && !MOBILE_APP\"\n\t v-slot=\"{ Component }\"\n\t :is=\"route.meta.sidebar\"\n\t :stateSidebar=\"globals.state.isOpenSidebar\" \n\t :widthHidden='route.meta?.sidebar_width_hidden'\n\t :width=\"route.meta?.sidebar_width\"\n\t :theme=\"headerTheme\"\n\t @closeSidebar=\"() => globals.state.isOpenSidebar = false\"\n\t >\n\t \t<transition name=\"moveFromTop\" mode=\"out-in\">\n\t\t <component\n\t\t v-if=\"route.meta?.sidebar_navigation\"\n\t\t :is=\"route.meta.sidebar_navigation\"\n\t\t :key=\"route.meta.sidebar_navigation\"\n\t\t :navigationItems=\"route.meta.sidebar_navigation_items\"\n\t\t\t :stateSidebar=\"globals.state.isOpenSidebar\" \n\t\t\t\t\t\t:theme=\"headerTheme\"\n\t\t />\n\t </transition>\n\t </component>\n\t\t <!-- rows-1-min0_max1 z-index-1 pos-relative w-100 h-100 -->\n\t\t <div class=\"rows-1-min0_max1 z-index-1 pos-relative w-100 h-100\">\n \t\t\t<Status \n\t\t\t\t\tv-if=\"globals.state.error.show\" \n\t\t\t\t\t:data=\"globals.state.error\"\n\t\t\t\t\t@close=\"globals.state.error.show = false\"\n\t\t\t\t\tclass=\"z-index-7\" \n\t\t\t\t/>\n\t\t\t\t <Suspense @resolve=\"onSuspenseResolved\">\n\t\t\t\t\t<router-view \n\t\t\t\t\t\tv-slot=\"{ Component, route }\" \n\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t'scroll-hide': MOBILE_APP,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\tclass=\"o-y-scroll o-x-hidden flex flex-column pos-relative h-100\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<transition @before-enter=\"scrollTop\" name=\"scaleTransition\" mode=\"out-in\" appear>\n\t\t\t \t<component \n\t\t\t \t\tref=\"page\" \n\t\t\t \t\t:is=\"Component\" \n\t\t\t \t\t:key=\"route.path\"\n\t\t\t \t\tclass=\"w-100 h-min-100\"\n\t\t \t\t \t@page-loading=\"handlePageLoading\"\n\t @page-loaded=\"handlePageLoaded\"\n\t\t\t \t/>\n\t\t\t \t<!-- Key пока выключил непонятно какие проблемы это вызовет -->\n\t\t\t \t<!-- -->\n\t\t\t </transition>\n\n\t\t\t <!-- <Footer /> -->\n\t\t\t\t\t</router-view>\n\t\t\t\t</Suspense>\n\t\t\t</div>\n\t\t</section>\n\n\t\t<router-view \n\t\t\tname=\"defaultBottom\"\n\t\t\tv-slot=\"{ Component, route }\" \n\t\t>\n\t\t\t<component \n \t\t:is=\"Component\" \n \t/>\n\t\t</router-view>\n\n\t <component\n\t\t\tv-if=\"!MOBILE_APP && route.meta.footer?.component && !route.meta.hideFooter\"\n ref=\"footer\" \n :is=\"route.meta.footer.component\"\n :theme=\"headerTheme\"\n :logotype=\"route.meta.footer.logotype\"\n :location=\"route.meta.footer.location\"\n />\n\n <component \n v-if=\"MOBILE_APP && route.meta.title_hide\"\n class=\"z-index-2\"\n \t:is=\"route.meta.bottombar\"\n />\n\t</div>\n</template>\n\n\n\n<script setup>\n\timport { computed, ref, onMounted, watch } from 'vue';\n\t// Router\n\timport { useRoute } from 'vue-router';\n\t// Store\n\timport * as globals from '@martyrs/src/modules/globals/views/store/globals';\n\t// Partials\n\timport Status from '@martyrs/src/components/Status/Status.vue';\n\timport Popup from '@martyrs/src/components/Popup/Popup.vue';\n\t// import Breadcrumbs from '@martyrs/src/components/Breadcrumbs/Breadcrumbs.vue'\n\timport Loader from '@martyrs/src/components/Loader/Loader.vue';\n\n\timport NavigationBar from '@martyrs/src/modules/globals/views/components/partials/NavigationBar.vue';\n\timport LocationSelection from '@martyrs/src/modules/globals/views/components/partials/LocationSelection.vue';\n\t// import Footer from '@martyrs/src/modules/globals/views/components/partials/Footer.vue'\n\n\timport ShopCart from '@martyrs/src/modules/orders/components/partials/ShopCart.vue';\n\t// PROPS\n\tconst props = defineProps({\n env: {\n type: Object,\n required: true\n },\n app: {\n type: Object,\n required: true\n },\n modules: {\n type: Object,\n required: true\n }\n })\n\n\t/////////////////////////////\n // LOADING\n /////////////////////////////\n // State\n let show = ref(false)\n // Preloader\n const page = ref(null)\n\n const isPageLoading = ref(true);\n \n // Обработчики событий загрузки\n function handlePageLoading() {\n isPageLoading.value = true;\n }\n \n function handlePageLoaded() {\n isPageLoading.value = false;\n }\n \n // Обработка события разрешения Suspense (когда async setup компонента завершается)\n function onSuspenseResolved() {\n // Если страница не отправляет событие page-loaded, этот обработчик \n // может служить запасным вариантом для отключения лоадера\n // Можно оставить закомментированным, если все страницы будут явно вызывать handlePageLoaded\n isPageLoading.value = false;\n }\n\t/////////////////////////////\n\t// CREATED\n\t/////////////////////////////\n\tconst route = useRoute()\n\t// const router = useRouter()\n\t// Ref Code\n\tconst referalCode = ref(route.query.referalCode);\n\t/////////////////////////////\n\t// Methods\n\t/////////////////////////////\n\tfunction closeLocationPopup() {\n\t globals.state.isOpenLocationPopup = false;\n\t}\n\tfunction scrollTop(){\n\t\tdocument.getElementById('app').scrollIntoView();\n\t}\n\t// Scrolling header\n\tconst scrollOffset = ref(0)\n\tlet isScrolled = false\n\tconst header = ref(null)\n\n\tconst headerTheme = computed(() => {\n\t\tif (scrollOffset.value > 50) {\n\t\t\treturn route.meta.header_theme || 'light'\n\t\t} else {\n\t\t\treturn route.meta.header_theme || 'light'\n\t\t}\n\t})\n\n\tconst handleScroll = () => {\n\t scrollOffset.value = event.target.scrollTop\n\t};\n/////////////////////////////\n // FIRST USE\n /////////////////////////////\n const FirstUse = ref(false);\n\n import { Preferences } from '@capacitor/preferences';\n\n async function getFirstUse() {\n const ret = await Preferences.get({ key: 'first-use' });\n FirstUse.value = ret.value ? JSON.parse(ret.value) : true;\n }\n\n const updateFirstUse = (value) => {\n FirstUse.value = value;\n }\n\n\tonMounted(async () => {\n\t await getFirstUse()\n\n\t\t// if ('serviceWorker' in navigator) {\n\t // \twindow.addEventListener('load', () => {\n\t // \tnavigator.serviceWorker.register('/service-worker.js').then(registration => {\n\t // \tconsole.log('SW registered: ', registration);\n\t // \t}).catch(registrationError => {\n\t // \tconsole.log('SW registration failed: ', registrationError);\n\t // \t});\n\t // });\n\t \t// }\n\t\t\n\t\tconst savedPosition = localStorage.getItem('position');\n\n\t if (savedPosition) {\n\t globals.state.position = JSON.parse(savedPosition);\n\t } else if (route.meta.location) {\n \t\tglobals.state.isOpenLocationPopup = true;\n\t } else {\n\t \tglobals.state.isOpenLocationPopup = false;\n\t }\n\n\t\tif (referalCode.value) {\n\t\t localStorage.setItem('referalCode', referalCode.value);\n\t\t}\n\n\t\tif (page.value) show.value = true\n\t});\n</script>\n\n<style lang=\"scss\">\n\t.fade-enter-active, .fade-leave-active {\n\t transition: opacity .5s;\n\t}\n\t.fade-enter, .fade-leave-to /* .fade-leave-active в версии 2.1.8+ */ {\n\t opacity: 0;\n\t}\n\n\t\n .fade-move,\n .fade-enter-active,\n .fade-leave-active {\n transition: all 0.5s cubic-bezier(0.55, 0, 0.1, 1);\n }\n\n /* 2. declare enter from and leave to state */\n .fade-enter-from,\n .fade-leave-to {\n opacity: 0;\n transform: translate(30px, 0);\n }\n\n /* 3. ensure leaving items are taken out of layout flow so that moving\n animations can be calculated correctly. */\n .fade-leave-active {\n position: absolute;\n }\n\n.moveFromTop-enter-active,\n.moveFromTop-leave-active {\n transition: all 0.3s ease, max-height 0.2s ease;\n overflow: hidden;\n}\n\n.moveFromTop-enter-from,\n.moveFromTop-leave-to {\n transform: translateY(-1rem);\n opacity: 0;\n // max-height: 0;\n}\n\n.moveFromTop-enter-to,\n.moveFromTop-leave-from {\n // max-height: 100vh; \n}\n\n\t.moveFromTopAbsolute-enter-active,\n\t.moveFromTopAbsolute-leave-active {\n\t\ttransform: translateY(0);\n\t\topacity: 1;\n\t\ttransition: all 0.5s ease; \n\t\t\n\t}\n\t.moveFromTopAbsolute-enter-from,\n\t.moveFromTopAbsolute-leave-to {\n\t\tposition: absolute;\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\n\t.ScaleOut-enter-active,\n\t.ScaleOut-leave-active {\n\t\topacity: 1;\n\t\ttransform: scale(1);\n\t\ttransition: all 0.3s ease; \n\t\t\n\t}\n\t.ScaleOut-enter-from,\n\t.ScaleOut-leave-to {\n\t\topacity: 0;\n\t\ttransform: scale(0.9);\n\t\ttransition: all 0.3s ease;\n\t}\n\t.slide-fade-enter-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-leave-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-enter-from,\n\t.slide-fade-leave-to {\n\t\tmin-height: 0;\n\t transform: translateX(20px);\n\t opacity: 0;\n\t left: 0;\n\t top: 0;\n\t}\n\n\t.scaleTransition-5px-enter-active,\n .scaleTransition-5px-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.2s ease;\n }\n\n .scaleTransition-5px-enter-from,\n .scaleTransition-5px-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n transform: translateY(-30px); \n transition: all 0.2s ease;\n }\n\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(30px); \n transition: all 0.5s ease;\n }\n\n .scaleTransition-enter-active,\n .scaleTransition-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.5s ease;\n }\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(30px); \n transition: all 0.5s ease;\n }\n\n .scaleIn-enter-active,\n .scaleIn-leave-active {\n // background: red;\n transition: all 0.5s ease;\n > section,div { transform-origin: 0 0; transform: translateZ(0px); transition: all 0.5s ease; }\n }\n .scaleIn-enter-from,\n .scaleIn-leave-to {\n opacity: 0;\n transform: scale(0.95);\n > section,div { transform: translateZ(-30px); transition: all 0.5s ease; }\n }\n</style>"],"names":["ref","useRoute","globals.state","computed","Preferences","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsNE,QAAI,OAAOA,IAAAA,IAAI,KAAK;AAEpB,UAAM,OAAOA,IAAAA,IAAI,IAAI;AAErB,UAAM,gBAAgBA,IAAG,IAAC,IAAI;AAG9B,aAAS,oBAAoB;AAC3B,oBAAc,QAAQ;AAAA,IAC1B;AAEE,aAAS,mBAAmB;AAC1B,oBAAc,QAAQ;AAAA,IAC1B;AAGE,aAAS,qBAAqB;AAI5B,oBAAc,QAAQ;AAAA,IAC1B;AAIC,UAAM,QAAQC,UAAQ,SAAA;AAGtB,UAAM,cAAcD,IAAG,IAAC,MAAM,MAAM,WAAW;AAI/C,aAAS,qBAAqB;AAC5BE,cAAa,MAAC,sBAAsB;AAAA,IACvC;AACC,aAAS,YAAW;AACnB,eAAS,eAAe,KAAK,EAAE,eAAgB;AAAA,IACjD;AAEC,UAAM,eAAeF,IAAAA,IAAI,CAAC;AAE1B,UAAM,SAASA,IAAAA,IAAI,IAAI;AAEvB,UAAM,cAAcG,IAAAA,SAAS,MAAM;AAClC,UAAI,aAAa,QAAQ,IAAI;AAC5B,eAAO,MAAM,KAAK,gBAAiB;AAAA,MACtC,OAAS;AACN,eAAO,MAAM,KAAK,gBAAgB;AAAA,MACrC;AAAA,IACE,CAAA;AAED,UAAM,eAAe,MAAM;AACzB,mBAAa,QAAQ,MAAM,OAAO;AAAA,IACnC;AAIA,UAAM,WAAWH,IAAG,IAAC,KAAK;AAI1B,mBAAe,cAAc;AAC3B,YAAM,MAAM,MAAMI,MAAW,YAAC,IAAI,EAAE,KAAK,aAAa;AACtD,eAAS,QAAQ,IAAI,QAAQ,KAAK,MAAM,IAAI,KAAK,IAAI;AAAA,IACzD;AAEE,UAAM,iBAAiB,CAAC,UAAU;AAChC,eAAS,QAAQ;AAAA,IACrB;AAECC,QAAAA,UAAU,YAAY;AACpB,YAAM,YAAW;AAYlB,YAAM,gBAAgB,aAAa,QAAQ,UAAU;AAEpD,UAAI,eAAe;AACjBH,gBAAAA,MAAc,WAAW,KAAK,MAAM,aAAa;AAAA,MACtD,WAAc,MAAM,KAAK,UAAU;AAC/BA,gBAAa,MAAC,sBAAsB;AAAA,MACxC,OAAU;AACNA,gBAAa,MAAC,sBAAsB;AAAA,MACxC;AAEE,UAAI,YAAY,OAAO;AACrB,qBAAa,QAAQ,eAAe,YAAY,KAAK;AAAA,MACzD;AAEE,UAAI,KAAK,MAAO,MAAK,QAAQ;AAAA,IAC/B,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -20,6 +20,20 @@ const _hoisted_1 = {
20
20
  const _hoisted_2 = { class: "rows-1-min0_max1 z-index-1 pos-relative w-100 h-100" };
21
21
  const _sfc_main = {
22
22
  __name: "Client",
23
+ props: {
24
+ env: {
25
+ type: Object,
26
+ required: true
27
+ },
28
+ app: {
29
+ type: Object,
30
+ required: true
31
+ },
32
+ modules: {
33
+ type: Object,
34
+ required: true
35
+ }
36
+ },
23
37
  setup(__props) {
24
38
  let show = ref(false);
25
39
  const page = ref(null);
@@ -186,8 +200,7 @@ const _sfc_main = {
186
200
  default: withCtx(({ Component }) => [
187
201
  createVNode(Transition, {
188
202
  name: "moveFromTop",
189
- mode: "out-in",
190
- appear: ""
203
+ mode: "out-in"
191
204
  }, {
192
205
  default: withCtx(() => {
193
206
  var _a2;
@@ -1 +1 @@
1
- {"version":3,"file":"Client.vue.js","sources":["../../../../../../../../src/modules/globals/views/components/layouts/Client.vue"],"sourcesContent":["<template>\n\t<div \n\t\tid=\"app-wrapper\"\n\t\tclass=\"flex flex-column h-100 w-100 pos-relative o-hidden\"\n\t\t:class=\"{\n \t\t'pd-t-extra': MOBILE_APP === 'ios', \n\t\t\t'bg-white': headerTheme === 'light',\n\t\t\t'bg-black': headerTheme === 'dark' \n \t}\"\n\t>\n\t\t<transition name=\"moveFromTop\" appear>\n\t\t\t<Loader v-if=\"!page || isPageLoading\" class=\"pos-fixed\"/>\n\t\t</transition>\n\n\n\t <transition \n\t name=\"moveFromTop\" \n\t mode=\"out-in\"\n\t >\n\t <section \n\t v-if=\"FirstUse && route.meta.walkthrough\"\n\t class=\"w-100 h-100\" \n\t >\n\t <component \n\t :is=\"route.meta.walkthrough\"\n\t name=\"Walkthrough\"\n\t @updateFirstUse=\"updateFirstUse\" \n\t :slides=\"[1,2,3]\" \n\t class=\"tab\"\n\t >\n\t </component>\n\t </section>\n\t </transition>\n\n <component\n\t\t\tv-if=\"!MOBILE_APP && route.meta.header\"\n ref=\"header\" \n :is=\"route.meta.header\"\n :theme=\"headerTheme\"\n :logotype=\"route.meta.logotype\"\n :location=\"route.meta.location\"\n >\n \t<component\n\t\t v-if=\"route.meta?.header_navigation\"\n\t\t :is=\"route.meta.header_navigation\"\n\t\t :horizontal=\"true\"\n\t\t\t\t:navigationItems=\"route.meta.sidebar_navigation_items\"\n\t\t\t\t:stateSidebar=\"globals.state.isOpenSidebar\" \n\t\t\t\t:theme=\"headerTheme\"\n\t\t />\n \t</component>\n\n\t\t<transition name=\"moveFromTop\" mode=\"out-in\" appear>\n\t\t\t<component\n \tv-if=\"MOBILE_APP && !route.meta.hideNavigationBar\"\n :is=\"route.meta.navigationbar\"\n :logotype=\"route.meta.logotype\"\n :navigationItems=\"route.meta.sidebar_navigation_items\"\n\t :stateSidebar=\"globals.state.isOpenSidebar\" \n />\n\t\t</transition>\n\n\t <Popup \n\t \t@close-popup=\"closeLocationPopup\" \n\t \t:isPopupOpen=\"globals.state.isOpenLocationPopup\"\n\t \tclass=\"bg-white pd-semi w-m-33r radius-big\"\n\t >\t\n\t \t<LocationSelection />\n\t </Popup>\n\n\t <!-- class=\"flex flex-nowrap transition-ease-in-out o-hidden pos-relative\" -->\n\t\t<section \n\t\t\tid=\"screen\" \n\t\t\tref=\"screen\"\n\t\t\t@scroll=\"handleScroll\"\n\t\t\tclass=\"flex flex-nowrap h-100 pos-relative o-hidden transition-ease-in-out\"\n\t\t\t:class=\"{\n\t\t\t\t'': MOBILE_APP === 'ios',\n }\"\n\t\t>\n\t\t\t<ShopCart \n\t\t\t\t:class=\"{\n\t\t\t\t\t'mobile:pd-t-extra': MOBILE_APP === 'ios', \n\t\t\t\t}\"\n\t\t\t/>\n\n\t\t\t<!-- <section v-if=\"!route.meta?.breadcrumbs?.hide\" class=\"pd-thin pd-b-zero\">\n\t\t\t\t<Breadcrumbs \n\t\t\t\t\tv-if=\"!MOBILE_APP\"\n\t\t\t\t\tclass=\"bg-light pd-small radius-big\"\n\t\t\t\t/>\n\t\t\t</section> -->\n\n\t <component\n\t v-if=\"route.meta?.sidebar && !MOBILE_APP\"\n\t v-slot=\"{ Component }\"\n\t :is=\"route.meta.sidebar\"\n\t :stateSidebar=\"globals.state.isOpenSidebar\" \n\t :widthHidden='route.meta?.sidebar_width_hidden'\n\t :width=\"route.meta?.sidebar_width\"\n\t :theme=\"headerTheme\"\n\t @closeSidebar=\"() => globals.state.isOpenSidebar = false\"\n\t >\n\t \t<transition name=\"moveFromTop\" mode=\"out-in\" appear>\n\t\t <component\n\t\t v-if=\"route.meta?.sidebar_navigation\"\n\t\t :is=\"route.meta.sidebar_navigation\"\n\t\t :key=\"route.meta.sidebar_navigation\"\n\t\t :navigationItems=\"route.meta.sidebar_navigation_items\"\n\t\t\t :stateSidebar=\"globals.state.isOpenSidebar\" \n\t\t\t\t\t\t:theme=\"headerTheme\"\n\t\t />\n\t </transition>\n\t </component>\n\t\t <!-- rows-1-min0_max1 z-index-1 pos-relative w-100 h-100 -->\n\t\t <div class=\"rows-1-min0_max1 z-index-1 pos-relative w-100 h-100\">\n \t\t\t<Status \n\t\t\t\t\tv-if=\"globals.state.error.show\" \n\t\t\t\t\t:data=\"globals.state.error\"\n\t\t\t\t\t@close=\"globals.state.error.show = false\"\n\t\t\t\t\tclass=\"z-index-7\" \n\t\t\t\t/>\n\t\t\t\t <Suspense @resolve=\"onSuspenseResolved\">\n\t\t\t\t\t<router-view \n\t\t\t\t\t\tv-slot=\"{ Component, route }\" \n\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t'scroll-hide': MOBILE_APP,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\tclass=\"o-y-scroll o-x-hidden flex flex-column pos-relative h-100\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<transition @before-enter=\"scrollTop\" name=\"scaleTransition\" mode=\"out-in\" appear>\n\t\t\t \t<component \n\t\t\t \t\tref=\"page\" \n\t\t\t \t\t:is=\"Component\" \n\t\t\t \t\t:key=\"route.path\"\n\t\t\t \t\tclass=\"w-100 h-min-100\"\n\t\t \t\t \t@page-loading=\"handlePageLoading\"\n\t @page-loaded=\"handlePageLoaded\"\n\t\t\t \t/>\n\t\t\t \t<!-- Key пока выключил непонятно какие проблемы это вызовет -->\n\t\t\t \t<!-- -->\n\t\t\t </transition>\n\n\t\t\t <!-- <Footer /> -->\n\t\t\t\t\t</router-view>\n\t\t\t\t</Suspense>\n\t\t\t</div>\n\t\t</section>\n\n\t\t<router-view \n\t\t\tname=\"defaultBottom\"\n\t\t\tv-slot=\"{ Component, route }\" \n\t\t>\n\t\t\t<component \n \t\t:is=\"Component\" \n \t/>\n\t\t</router-view>\n\n\t <component\n\t\t\tv-if=\"!MOBILE_APP && route.meta.footer?.component && !route.meta.hideFooter\"\n ref=\"footer\" \n :is=\"route.meta.footer.component\"\n :theme=\"headerTheme\"\n :logotype=\"route.meta.footer.logotype\"\n :location=\"route.meta.footer.location\"\n />\n\n <component \n v-if=\"MOBILE_APP && route.meta.title_hide\"\n class=\"z-index-2\"\n \t:is=\"route.meta.bottombar\"\n />\n\t</div>\n</template>\n\n\n\n<script setup>\n\timport { computed, ref, onMounted, watch } from 'vue';\n\t// Router\n\timport { useRoute } from 'vue-router';\n\t// Store\n\timport * as globals from '@martyrs/src/modules/globals/views/store/globals';\n\t// Partials\n\timport Status from '@martyrs/src/components/Status/Status.vue';\n\timport Popup from '@martyrs/src/components/Popup/Popup.vue';\n\t// import Breadcrumbs from '@martyrs/src/components/Breadcrumbs/Breadcrumbs.vue'\n\timport Loader from '@martyrs/src/components/Loader/Loader.vue';\n\n\timport NavigationBar from '@martyrs/src/modules/globals/views/components/partials/NavigationBar.vue';\n\timport LocationSelection from '@martyrs/src/modules/globals/views/components/partials/LocationSelection.vue';\n\t// import Footer from '@martyrs/src/modules/globals/views/components/partials/Footer.vue'\n\n\timport ShopCart from '@martyrs/src/modules/orders/components/partials/ShopCart.vue';\n\t/////////////////////////////\n // LOADING\n /////////////////////////////\n // State\n let show = ref(false)\n // Preloader\n const page = ref(null)\n\n const isPageLoading = ref(true);\n \n // Обработчики событий загрузки\n function handlePageLoading() {\n isPageLoading.value = true;\n }\n \n function handlePageLoaded() {\n isPageLoading.value = false;\n }\n \n // Обработка события разрешения Suspense (когда async setup компонента завершается)\n function onSuspenseResolved() {\n // Если страница не отправляет событие page-loaded, этот обработчик \n // может служить запасным вариантом для отключения лоадера\n // Можно оставить закомментированным, если все страницы будут явно вызывать handlePageLoaded\n isPageLoading.value = false;\n }\n\t/////////////////////////////\n\t// CREATED\n\t/////////////////////////////\n\tconst route = useRoute()\n\t// const router = useRouter()\n\t// Ref Code\n\tconst referalCode = ref(route.query.referalCode);\n\t/////////////////////////////\n\t// Methods\n\t/////////////////////////////\n\tfunction closeLocationPopup() {\n\t globals.state.isOpenLocationPopup = false;\n\t}\n\tfunction scrollTop(){\n\t\tdocument.getElementById('app').scrollIntoView();\n\t}\n\t// Scrolling header\n\tconst scrollOffset = ref(0)\n\tlet isScrolled = false\n\tconst header = ref(null)\n\n\tconst headerTheme = computed(() => {\n\t\tif (scrollOffset.value > 50) {\n\t\t\treturn route.meta.header_theme || 'light'\n\t\t} else {\n\t\t\treturn route.meta.header_theme || 'light'\n\t\t}\n\t})\n\n\tconst handleScroll = () => {\n\t scrollOffset.value = event.target.scrollTop\n\t};\n/////////////////////////////\n // FIRST USE\n /////////////////////////////\n const FirstUse = ref(false);\n\n import { Preferences } from '@capacitor/preferences';\n\n async function getFirstUse() {\n const ret = await Preferences.get({ key: 'first-use' });\n FirstUse.value = ret.value ? JSON.parse(ret.value) : true;\n }\n\n const updateFirstUse = (value) => {\n FirstUse.value = value;\n }\n\n\tonMounted(async () => {\n\t await getFirstUse()\n\n\t\t// if ('serviceWorker' in navigator) {\n\t // \twindow.addEventListener('load', () => {\n\t // \tnavigator.serviceWorker.register('/service-worker.js').then(registration => {\n\t // \tconsole.log('SW registered: ', registration);\n\t // \t}).catch(registrationError => {\n\t // \tconsole.log('SW registration failed: ', registrationError);\n\t // \t});\n\t // });\n\t \t// }\n\t\t\n\t\tconst savedPosition = localStorage.getItem('position');\n\n\t if (savedPosition) {\n\t globals.state.position = JSON.parse(savedPosition);\n\t } else if (route.meta.location) {\n \t\tglobals.state.isOpenLocationPopup = true;\n\t } else {\n\t \tglobals.state.isOpenLocationPopup = false;\n\t }\n\n\t\tif (referalCode.value) {\n\t\t localStorage.setItem('referalCode', referalCode.value);\n\t\t}\n\n\t\tif (page.value) show.value = true\n\t});\n</script>\n\n<style lang=\"scss\">\n\t.fade-enter-active, .fade-leave-active {\n\t transition: opacity .5s;\n\t}\n\t.fade-enter, .fade-leave-to /* .fade-leave-active в версии 2.1.8+ */ {\n\t opacity: 0;\n\t}\n\n\t\n .fade-move,\n .fade-enter-active,\n .fade-leave-active {\n transition: all 0.5s cubic-bezier(0.55, 0, 0.1, 1);\n }\n\n /* 2. declare enter from and leave to state */\n .fade-enter-from,\n .fade-leave-to {\n opacity: 0;\n transform: translate(30px, 0);\n }\n\n /* 3. ensure leaving items are taken out of layout flow so that moving\n animations can be calculated correctly. */\n .fade-leave-active {\n position: absolute;\n }\n\n.moveFromTop-enter-active,\n.moveFromTop-leave-active {\n transition: all 0.3s ease, max-height 0.2s ease;\n overflow: hidden;\n}\n\n.moveFromTop-enter-from,\n.moveFromTop-leave-to {\n transform: translateY(-1rem);\n opacity: 0;\n // max-height: 0;\n}\n\n.moveFromTop-enter-to,\n.moveFromTop-leave-from {\n // max-height: 100vh; \n}\n\n\t.moveFromTopAbsolute-enter-active,\n\t.moveFromTopAbsolute-leave-active {\n\t\ttransform: translateY(0);\n\t\topacity: 1;\n\t\ttransition: all 0.5s ease; \n\t\t\n\t}\n\t.moveFromTopAbsolute-enter-from,\n\t.moveFromTopAbsolute-leave-to {\n\t\tposition: absolute;\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\n\t.ScaleOut-enter-active,\n\t.ScaleOut-leave-active {\n\t\topacity: 1;\n\t\ttransform: scale(1);\n\t\ttransition: all 0.3s ease; \n\t\t\n\t}\n\t.ScaleOut-enter-from,\n\t.ScaleOut-leave-to {\n\t\topacity: 0;\n\t\ttransform: scale(0.9);\n\t\ttransition: all 0.3s ease;\n\t}\n\t.slide-fade-enter-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-leave-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-enter-from,\n\t.slide-fade-leave-to {\n\t\tmin-height: 0;\n\t transform: translateX(20px);\n\t opacity: 0;\n\t left: 0;\n\t top: 0;\n\t}\n\n\t.scaleTransition-5px-enter-active,\n .scaleTransition-5px-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.2s ease;\n }\n\n .scaleTransition-5px-enter-from,\n .scaleTransition-5px-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n transform: translateY(-30px); \n transition: all 0.2s ease;\n }\n\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(30px); \n transition: all 0.5s ease;\n }\n\n .scaleTransition-enter-active,\n .scaleTransition-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.5s ease;\n }\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(30px); \n transition: all 0.5s ease;\n }\n\n .scaleIn-enter-active,\n .scaleIn-leave-active {\n // background: red;\n transition: all 0.5s ease;\n > section,div { transform-origin: 0 0; transform: translateZ(0px); transition: all 0.5s ease; }\n }\n .scaleIn-enter-from,\n .scaleIn-leave-to {\n opacity: 0;\n transform: scale(0.95);\n > section,div { transform: translateZ(-30px); transition: all 0.5s ease; }\n }\n</style>"],"names":["globals.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAsME,QAAI,OAAO,IAAI,KAAK;AAEpB,UAAM,OAAO,IAAI,IAAI;AAErB,UAAM,gBAAgB,IAAI,IAAI;AAG9B,aAAS,oBAAoB;AAC3B,oBAAc,QAAQ;AAAA,IAC1B;AAEE,aAAS,mBAAmB;AAC1B,oBAAc,QAAQ;AAAA,IAC1B;AAGE,aAAS,qBAAqB;AAI5B,oBAAc,QAAQ;AAAA,IAC1B;AAIC,UAAM,QAAQ,SAAQ;AAGtB,UAAM,cAAc,IAAI,MAAM,MAAM,WAAW;AAI/C,aAAS,qBAAqB;AAC5BA,YAAc,sBAAsB;AAAA,IACvC;AACC,aAAS,YAAW;AACnB,eAAS,eAAe,KAAK,EAAE,eAAgB;AAAA,IACjD;AAEC,UAAM,eAAe,IAAI,CAAC;AAE1B,UAAM,SAAS,IAAI,IAAI;AAEvB,UAAM,cAAc,SAAS,MAAM;AAClC,UAAI,aAAa,QAAQ,IAAI;AAC5B,eAAO,MAAM,KAAK,gBAAiB;AAAA,MACtC,OAAS;AACN,eAAO,MAAM,KAAK,gBAAgB;AAAA,MACrC;AAAA,IACE,CAAA;AAED,UAAM,eAAe,MAAM;AACzB,mBAAa,QAAQ,MAAM,OAAO;AAAA,IACnC;AAIA,UAAM,WAAW,IAAI,KAAK;AAI1B,mBAAe,cAAc;AAC3B,YAAM,MAAM,MAAM,YAAY,IAAI,EAAE,KAAK,aAAa;AACtD,eAAS,QAAQ,IAAI,QAAQ,KAAK,MAAM,IAAI,KAAK,IAAI;AAAA,IACzD;AAEE,UAAM,iBAAiB,CAAC,UAAU;AAChC,eAAS,QAAQ;AAAA,IACrB;AAEC,cAAU,YAAY;AACpB,YAAM,YAAW;AAYlB,YAAM,gBAAgB,aAAa,QAAQ,UAAU;AAEpD,UAAI,eAAe;AACjBA,cAAc,WAAW,KAAK,MAAM,aAAa;AAAA,MACtD,WAAc,MAAM,KAAK,UAAU;AAC/BA,cAAc,sBAAsB;AAAA,MACxC,OAAU;AACNA,cAAc,sBAAsB;AAAA,MACxC;AAEE,UAAI,YAAY,OAAO;AACrB,qBAAa,QAAQ,eAAe,YAAY,KAAK;AAAA,MACzD;AAEE,UAAI,KAAK,MAAO,MAAK,QAAQ;AAAA,IAC/B,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Client.vue.js","sources":["../../../../../../../../src/modules/globals/views/components/layouts/Client.vue"],"sourcesContent":["<template>\n\t<div \n\t\tid=\"app-wrapper\"\n\t\tclass=\"flex flex-column h-100 w-100 pos-relative o-hidden\"\n\t\t:class=\"{\n \t\t'pd-t-extra': MOBILE_APP === 'ios', \n\t\t\t'bg-white': headerTheme === 'light',\n\t\t\t'bg-black': headerTheme === 'dark' \n \t}\"\n\t>\n\t\t<transition name=\"moveFromTop\" appear>\n\t\t\t<Loader v-if=\"!page || isPageLoading\" class=\"pos-fixed\"/>\n\t\t</transition>\n\n\n\t <transition \n\t name=\"moveFromTop\" \n\t mode=\"out-in\"\n\t >\n\t <section \n\t v-if=\"FirstUse && route.meta.walkthrough\"\n\t class=\"w-100 h-100\" \n\t >\n\t <component \n\t :is=\"route.meta.walkthrough\"\n\t name=\"Walkthrough\"\n\t @updateFirstUse=\"updateFirstUse\" \n\t :slides=\"[1,2,3]\" \n\t class=\"tab\"\n\t >\n\t </component>\n\t </section>\n\t </transition>\n\n <component\n\t\t\tv-if=\"!MOBILE_APP && route.meta.header\"\n ref=\"header\" \n :is=\"route.meta.header\"\n :theme=\"headerTheme\"\n :logotype=\"route.meta.logotype\"\n :location=\"route.meta.location\"\n >\n \t<component\n\t\t v-if=\"route.meta?.header_navigation\"\n\t\t :is=\"route.meta.header_navigation\"\n\t\t :horizontal=\"true\"\n\t\t\t\t:navigationItems=\"route.meta.sidebar_navigation_items\"\n\t\t\t\t:stateSidebar=\"globals.state.isOpenSidebar\" \n\t\t\t\t:theme=\"headerTheme\"\n\t\t />\n \t</component>\n\n\t\t<transition name=\"moveFromTop\" mode=\"out-in\" appear>\n\t\t\t<component\n \tv-if=\"MOBILE_APP && !route.meta.hideNavigationBar\"\n :is=\"route.meta.navigationbar\"\n :logotype=\"route.meta.logotype\"\n :navigationItems=\"route.meta.sidebar_navigation_items\"\n\t :stateSidebar=\"globals.state.isOpenSidebar\" \n />\n\t\t</transition>\n\n\t <Popup \n\t \t@close-popup=\"closeLocationPopup\" \n\t \t:isPopupOpen=\"globals.state.isOpenLocationPopup\"\n\t \tclass=\"bg-white pd-semi w-m-33r radius-big\"\n\t >\t\n\t \t<LocationSelection />\n\t </Popup>\n\n\t <!-- class=\"flex flex-nowrap transition-ease-in-out o-hidden pos-relative\" -->\n\t\t<section \n\t\t\tid=\"screen\" \n\t\t\tref=\"screen\"\n\t\t\t@scroll=\"handleScroll\"\n\t\t\tclass=\"flex flex-nowrap h-100 pos-relative o-hidden transition-ease-in-out\"\n\t\t\t:class=\"{\n\t\t\t\t'': MOBILE_APP === 'ios',\n }\"\n\t\t>\n\t\t\t<ShopCart \n\t\t\t\t:class=\"{\n\t\t\t\t\t'mobile:pd-t-extra': MOBILE_APP === 'ios', \n\t\t\t\t}\"\n\t\t\t/>\n\n\t\t\t<!-- <section v-if=\"!route.meta?.breadcrumbs?.hide\" class=\"pd-thin pd-b-zero\">\n\t\t\t\t<Breadcrumbs \n\t\t\t\t\tv-if=\"!MOBILE_APP\"\n\t\t\t\t\tclass=\"bg-light pd-small radius-big\"\n\t\t\t\t/>\n\t\t\t</section> -->\n\n\t <component\n\t v-if=\"route.meta?.sidebar && !MOBILE_APP\"\n\t v-slot=\"{ Component }\"\n\t :is=\"route.meta.sidebar\"\n\t :stateSidebar=\"globals.state.isOpenSidebar\" \n\t :widthHidden='route.meta?.sidebar_width_hidden'\n\t :width=\"route.meta?.sidebar_width\"\n\t :theme=\"headerTheme\"\n\t @closeSidebar=\"() => globals.state.isOpenSidebar = false\"\n\t >\n\t \t<transition name=\"moveFromTop\" mode=\"out-in\">\n\t\t <component\n\t\t v-if=\"route.meta?.sidebar_navigation\"\n\t\t :is=\"route.meta.sidebar_navigation\"\n\t\t :key=\"route.meta.sidebar_navigation\"\n\t\t :navigationItems=\"route.meta.sidebar_navigation_items\"\n\t\t\t :stateSidebar=\"globals.state.isOpenSidebar\" \n\t\t\t\t\t\t:theme=\"headerTheme\"\n\t\t />\n\t </transition>\n\t </component>\n\t\t <!-- rows-1-min0_max1 z-index-1 pos-relative w-100 h-100 -->\n\t\t <div class=\"rows-1-min0_max1 z-index-1 pos-relative w-100 h-100\">\n \t\t\t<Status \n\t\t\t\t\tv-if=\"globals.state.error.show\" \n\t\t\t\t\t:data=\"globals.state.error\"\n\t\t\t\t\t@close=\"globals.state.error.show = false\"\n\t\t\t\t\tclass=\"z-index-7\" \n\t\t\t\t/>\n\t\t\t\t <Suspense @resolve=\"onSuspenseResolved\">\n\t\t\t\t\t<router-view \n\t\t\t\t\t\tv-slot=\"{ Component, route }\" \n\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t'scroll-hide': MOBILE_APP,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\tclass=\"o-y-scroll o-x-hidden flex flex-column pos-relative h-100\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<transition @before-enter=\"scrollTop\" name=\"scaleTransition\" mode=\"out-in\" appear>\n\t\t\t \t<component \n\t\t\t \t\tref=\"page\" \n\t\t\t \t\t:is=\"Component\" \n\t\t\t \t\t:key=\"route.path\"\n\t\t\t \t\tclass=\"w-100 h-min-100\"\n\t\t \t\t \t@page-loading=\"handlePageLoading\"\n\t @page-loaded=\"handlePageLoaded\"\n\t\t\t \t/>\n\t\t\t \t<!-- Key пока выключил непонятно какие проблемы это вызовет -->\n\t\t\t \t<!-- -->\n\t\t\t </transition>\n\n\t\t\t <!-- <Footer /> -->\n\t\t\t\t\t</router-view>\n\t\t\t\t</Suspense>\n\t\t\t</div>\n\t\t</section>\n\n\t\t<router-view \n\t\t\tname=\"defaultBottom\"\n\t\t\tv-slot=\"{ Component, route }\" \n\t\t>\n\t\t\t<component \n \t\t:is=\"Component\" \n \t/>\n\t\t</router-view>\n\n\t <component\n\t\t\tv-if=\"!MOBILE_APP && route.meta.footer?.component && !route.meta.hideFooter\"\n ref=\"footer\" \n :is=\"route.meta.footer.component\"\n :theme=\"headerTheme\"\n :logotype=\"route.meta.footer.logotype\"\n :location=\"route.meta.footer.location\"\n />\n\n <component \n v-if=\"MOBILE_APP && route.meta.title_hide\"\n class=\"z-index-2\"\n \t:is=\"route.meta.bottombar\"\n />\n\t</div>\n</template>\n\n\n\n<script setup>\n\timport { computed, ref, onMounted, watch } from 'vue';\n\t// Router\n\timport { useRoute } from 'vue-router';\n\t// Store\n\timport * as globals from '@martyrs/src/modules/globals/views/store/globals';\n\t// Partials\n\timport Status from '@martyrs/src/components/Status/Status.vue';\n\timport Popup from '@martyrs/src/components/Popup/Popup.vue';\n\t// import Breadcrumbs from '@martyrs/src/components/Breadcrumbs/Breadcrumbs.vue'\n\timport Loader from '@martyrs/src/components/Loader/Loader.vue';\n\n\timport NavigationBar from '@martyrs/src/modules/globals/views/components/partials/NavigationBar.vue';\n\timport LocationSelection from '@martyrs/src/modules/globals/views/components/partials/LocationSelection.vue';\n\t// import Footer from '@martyrs/src/modules/globals/views/components/partials/Footer.vue'\n\n\timport ShopCart from '@martyrs/src/modules/orders/components/partials/ShopCart.vue';\n\t// PROPS\n\tconst props = defineProps({\n env: {\n type: Object,\n required: true\n },\n app: {\n type: Object,\n required: true\n },\n modules: {\n type: Object,\n required: true\n }\n })\n\n\t/////////////////////////////\n // LOADING\n /////////////////////////////\n // State\n let show = ref(false)\n // Preloader\n const page = ref(null)\n\n const isPageLoading = ref(true);\n \n // Обработчики событий загрузки\n function handlePageLoading() {\n isPageLoading.value = true;\n }\n \n function handlePageLoaded() {\n isPageLoading.value = false;\n }\n \n // Обработка события разрешения Suspense (когда async setup компонента завершается)\n function onSuspenseResolved() {\n // Если страница не отправляет событие page-loaded, этот обработчик \n // может служить запасным вариантом для отключения лоадера\n // Можно оставить закомментированным, если все страницы будут явно вызывать handlePageLoaded\n isPageLoading.value = false;\n }\n\t/////////////////////////////\n\t// CREATED\n\t/////////////////////////////\n\tconst route = useRoute()\n\t// const router = useRouter()\n\t// Ref Code\n\tconst referalCode = ref(route.query.referalCode);\n\t/////////////////////////////\n\t// Methods\n\t/////////////////////////////\n\tfunction closeLocationPopup() {\n\t globals.state.isOpenLocationPopup = false;\n\t}\n\tfunction scrollTop(){\n\t\tdocument.getElementById('app').scrollIntoView();\n\t}\n\t// Scrolling header\n\tconst scrollOffset = ref(0)\n\tlet isScrolled = false\n\tconst header = ref(null)\n\n\tconst headerTheme = computed(() => {\n\t\tif (scrollOffset.value > 50) {\n\t\t\treturn route.meta.header_theme || 'light'\n\t\t} else {\n\t\t\treturn route.meta.header_theme || 'light'\n\t\t}\n\t})\n\n\tconst handleScroll = () => {\n\t scrollOffset.value = event.target.scrollTop\n\t};\n/////////////////////////////\n // FIRST USE\n /////////////////////////////\n const FirstUse = ref(false);\n\n import { Preferences } from '@capacitor/preferences';\n\n async function getFirstUse() {\n const ret = await Preferences.get({ key: 'first-use' });\n FirstUse.value = ret.value ? JSON.parse(ret.value) : true;\n }\n\n const updateFirstUse = (value) => {\n FirstUse.value = value;\n }\n\n\tonMounted(async () => {\n\t await getFirstUse()\n\n\t\t// if ('serviceWorker' in navigator) {\n\t // \twindow.addEventListener('load', () => {\n\t // \tnavigator.serviceWorker.register('/service-worker.js').then(registration => {\n\t // \tconsole.log('SW registered: ', registration);\n\t // \t}).catch(registrationError => {\n\t // \tconsole.log('SW registration failed: ', registrationError);\n\t // \t});\n\t // });\n\t \t// }\n\t\t\n\t\tconst savedPosition = localStorage.getItem('position');\n\n\t if (savedPosition) {\n\t globals.state.position = JSON.parse(savedPosition);\n\t } else if (route.meta.location) {\n \t\tglobals.state.isOpenLocationPopup = true;\n\t } else {\n\t \tglobals.state.isOpenLocationPopup = false;\n\t }\n\n\t\tif (referalCode.value) {\n\t\t localStorage.setItem('referalCode', referalCode.value);\n\t\t}\n\n\t\tif (page.value) show.value = true\n\t});\n</script>\n\n<style lang=\"scss\">\n\t.fade-enter-active, .fade-leave-active {\n\t transition: opacity .5s;\n\t}\n\t.fade-enter, .fade-leave-to /* .fade-leave-active в версии 2.1.8+ */ {\n\t opacity: 0;\n\t}\n\n\t\n .fade-move,\n .fade-enter-active,\n .fade-leave-active {\n transition: all 0.5s cubic-bezier(0.55, 0, 0.1, 1);\n }\n\n /* 2. declare enter from and leave to state */\n .fade-enter-from,\n .fade-leave-to {\n opacity: 0;\n transform: translate(30px, 0);\n }\n\n /* 3. ensure leaving items are taken out of layout flow so that moving\n animations can be calculated correctly. */\n .fade-leave-active {\n position: absolute;\n }\n\n.moveFromTop-enter-active,\n.moveFromTop-leave-active {\n transition: all 0.3s ease, max-height 0.2s ease;\n overflow: hidden;\n}\n\n.moveFromTop-enter-from,\n.moveFromTop-leave-to {\n transform: translateY(-1rem);\n opacity: 0;\n // max-height: 0;\n}\n\n.moveFromTop-enter-to,\n.moveFromTop-leave-from {\n // max-height: 100vh; \n}\n\n\t.moveFromTopAbsolute-enter-active,\n\t.moveFromTopAbsolute-leave-active {\n\t\ttransform: translateY(0);\n\t\topacity: 1;\n\t\ttransition: all 0.5s ease; \n\t\t\n\t}\n\t.moveFromTopAbsolute-enter-from,\n\t.moveFromTopAbsolute-leave-to {\n\t\tposition: absolute;\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\n\t.ScaleOut-enter-active,\n\t.ScaleOut-leave-active {\n\t\topacity: 1;\n\t\ttransform: scale(1);\n\t\ttransition: all 0.3s ease; \n\t\t\n\t}\n\t.ScaleOut-enter-from,\n\t.ScaleOut-leave-to {\n\t\topacity: 0;\n\t\ttransform: scale(0.9);\n\t\ttransition: all 0.3s ease;\n\t}\n\t.slide-fade-enter-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-leave-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-enter-from,\n\t.slide-fade-leave-to {\n\t\tmin-height: 0;\n\t transform: translateX(20px);\n\t opacity: 0;\n\t left: 0;\n\t top: 0;\n\t}\n\n\t.scaleTransition-5px-enter-active,\n .scaleTransition-5px-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.2s ease;\n }\n\n .scaleTransition-5px-enter-from,\n .scaleTransition-5px-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n transform: translateY(-30px); \n transition: all 0.2s ease;\n }\n\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(30px); \n transition: all 0.5s ease;\n }\n\n .scaleTransition-enter-active,\n .scaleTransition-leave-active {\n transform: translateY(0px); \n opacity: 1;\n z-index: 1;\n transition: all 0.5s ease;\n }\n .scaleTransition-enter-from,\n .scaleTransition-leave-to {\n opacity: 0;\n z-index: 0;\n position: absolute;\n width: inherit;\n height: inherit;\n display: block;\n transform: translateY(30px); \n transition: all 0.5s ease;\n }\n\n .scaleIn-enter-active,\n .scaleIn-leave-active {\n // background: red;\n transition: all 0.5s ease;\n > section,div { transform-origin: 0 0; transform: translateZ(0px); transition: all 0.5s ease; }\n }\n .scaleIn-enter-from,\n .scaleIn-leave-to {\n opacity: 0;\n transform: scale(0.95);\n > section,div { transform: translateZ(-30px); transition: all 0.5s ease; }\n }\n</style>"],"names":["globals.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsNE,QAAI,OAAO,IAAI,KAAK;AAEpB,UAAM,OAAO,IAAI,IAAI;AAErB,UAAM,gBAAgB,IAAI,IAAI;AAG9B,aAAS,oBAAoB;AAC3B,oBAAc,QAAQ;AAAA,IAC1B;AAEE,aAAS,mBAAmB;AAC1B,oBAAc,QAAQ;AAAA,IAC1B;AAGE,aAAS,qBAAqB;AAI5B,oBAAc,QAAQ;AAAA,IAC1B;AAIC,UAAM,QAAQ,SAAQ;AAGtB,UAAM,cAAc,IAAI,MAAM,MAAM,WAAW;AAI/C,aAAS,qBAAqB;AAC5BA,YAAc,sBAAsB;AAAA,IACvC;AACC,aAAS,YAAW;AACnB,eAAS,eAAe,KAAK,EAAE,eAAgB;AAAA,IACjD;AAEC,UAAM,eAAe,IAAI,CAAC;AAE1B,UAAM,SAAS,IAAI,IAAI;AAEvB,UAAM,cAAc,SAAS,MAAM;AAClC,UAAI,aAAa,QAAQ,IAAI;AAC5B,eAAO,MAAM,KAAK,gBAAiB;AAAA,MACtC,OAAS;AACN,eAAO,MAAM,KAAK,gBAAgB;AAAA,MACrC;AAAA,IACE,CAAA;AAED,UAAM,eAAe,MAAM;AACzB,mBAAa,QAAQ,MAAM,OAAO;AAAA,IACnC;AAIA,UAAM,WAAW,IAAI,KAAK;AAI1B,mBAAe,cAAc;AAC3B,YAAM,MAAM,MAAM,YAAY,IAAI,EAAE,KAAK,aAAa;AACtD,eAAS,QAAQ,IAAI,QAAQ,KAAK,MAAM,IAAI,KAAK,IAAI;AAAA,IACzD;AAEE,UAAM,iBAAiB,CAAC,UAAU;AAChC,eAAS,QAAQ;AAAA,IACrB;AAEC,cAAU,YAAY;AACpB,YAAM,YAAW;AAYlB,YAAM,gBAAgB,aAAa,QAAQ,UAAU;AAEpD,UAAI,eAAe;AACjBA,cAAc,WAAW,KAAK,MAAM,aAAa;AAAA,MACtD,WAAc,MAAM,KAAK,UAAU;AAC/BA,cAAc,sBAAsB;AAAA,MACxC,OAAU;AACNA,cAAc,sBAAsB;AAAA,MACxC;AAEE,UAAI,YAAY,OAAO;AACrB,qBAAa,QAAQ,eAAe,YAAY,KAAK;AAAA,MACzD;AAEE,UAAI,KAAK,MAAO,MAAK,QAAQ;AAAA,IAC/B,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -14,19 +14,15 @@ const _hoisted_2 = {
14
14
  };
15
15
  const _hoisted_3 = ["onClick"];
16
16
  const _hoisted_4 = {
17
- key: 3,
18
- class: "sidebar-highlight-indicator"
19
- };
20
- const _hoisted_9 = {
21
17
  key: 0,
22
18
  class: "sidebar-submenu"
23
19
  };
24
- const _hoisted_10 = ["onClick"];
25
- const _hoisted_11 = {
20
+ const _hoisted_5 = ["onClick"];
21
+ const _hoisted_6 = {
26
22
  key: 1,
27
23
  class: "sidebar-subitem-icon"
28
24
  };
29
- const _hoisted_12 = { class: "sidebar-subitem-title" };
25
+ const _hoisted_7 = { class: "sidebar-subitem-title" };
30
26
  const _sfc_main = {
31
27
  __name: "Navigation",
32
28
  props: {
@@ -51,13 +47,12 @@ const _sfc_main = {
51
47
  setup(__props, { emit: __emit }) {
52
48
  const router = vueRouter.useRouter();
53
49
  const props = __props;
54
- const emit = __emit;
50
+ const emits = __emit;
55
51
  const expandedSections = vue.ref([]);
56
- const menuItems = vue.computed(() => props.navigationItems || []);
57
52
  const toggleSection = (title) => {
58
53
  if (!props.stateSidebar) {
59
54
  if (menuItems.value.flatMap((section) => section.items).find((item) => item.title === title && item.subItems)) {
60
- emit("closeSidebar");
55
+ emits("closeSidebar");
61
56
  setTimeout(() => {
62
57
  expandedSections.value.push(title);
63
58
  }, 50);
@@ -92,16 +87,16 @@ const _sfc_main = {
92
87
  __props.horizontal ? "w-100 desktop-only flex flex-center flex-nowrap o-y-hidden" : "o-y-scroll rows-1"
93
88
  ]])
94
89
  }, [
95
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(menuItems.value, (section) => {
90
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(props.navigationItems, (section) => {
96
91
  return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
97
92
  key: section.category,
98
- class: vue.normalizeClass([[
93
+ class: vue.normalizeClass([
99
94
  __props.horizontal ? "w-max flex-child-default flex flex-nowrap" : "",
100
95
  __props.stateSidebar && !__props.horizontal ? "mn-t-medium" : ""
101
- ], ""])
96
+ ])
102
97
  }, [
103
98
  vue.createElementVNode("div", {
104
- class: vue.normalizeClass(["sidebar-category", {
99
+ class: vue.normalizeClass(["uppercase t-medium t-transp p-small", {
105
100
  "hidden": !__props.stateSidebar || __props.horizontal,
106
101
  "visible": __props.stateSidebar && !__props.horizontal,
107
102
  "t-black": __props.theme === "light",
@@ -115,15 +110,14 @@ const _sfc_main = {
115
110
  }, [
116
111
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(section.items, (item) => {
117
112
  return vue.withDirectives((vue.openBlock(), vue.createElementBlock("li", {
118
- key: item.title,
119
113
  class: vue.normalizeClass(["flex-center", [
120
- __props.stateSidebar ? "" : "",
121
114
  __props.horizontal ? "w-100 flex flex-nowrap" : "",
122
115
  __props.stateSidebar && !__props.horizontal ? "" : "aspect-1x1"
123
- ]])
116
+ ]]),
117
+ key: item.title
124
118
  }, [
125
119
  vue.createElementVNode("button", {
126
- onClick: ($event) => item.route ? (_ctx.isPhone ? __props.stateSidebar = false : null, vue.unref(router).push(processRoute(item.route))) : null,
120
+ onClick: ($event) => item.route ? (_ctx.isPhone ? __props.stateSidebar = false : null, _ctx.$route.path !== processRoute(item.route) ? vue.unref(router).push(processRoute(item.route)) : __props.stateSidebar = false) : null,
127
121
  class: vue.normalizeClass(["flex-child-default flex-center gap-thin flex sidebar-item-btn", [
128
122
  __props.stateSidebar || __props.horizontal ? "expanded-item pd-thin" : "w-100 h-100 justify-center",
129
123
  __props.horizontal ? "w-max flex flex-nowrap" : "",
@@ -144,9 +138,7 @@ const _sfc_main = {
144
138
  key: 2,
145
139
  class: vue.normalizeClass(["mn-l-auto sidebar-dropdown-icon", { "rotate-180": isSectionExpanded(item.title) }]),
146
140
  onClick: vue.withModifiers(($event) => toggleSection(item.title), ["stop"])
147
- }, " ▾ ", 10, _hoisted_3)) : vue.createCommentVNode("", true),
148
- item.route && _ctx.$route.path === processRoute(item.route) && !__props.horizontal ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4)) : vue.createCommentVNode("", true),
149
- vue.createCommentVNode("", true)
141
+ }, " ▾ ", 10, _hoisted_3)) : vue.createCommentVNode("", true)
150
142
  ], 10, _hoisted_1),
151
143
  vue.createVNode(vue.Transition, {
152
144
  "enter-active-class": "dropdown-enter",
@@ -157,23 +149,26 @@ const _sfc_main = {
157
149
  "leave-to-class": "dropdown-leave-to"
158
150
  }, {
159
151
  default: vue.withCtx(() => [
160
- item.subItems && isSectionExpanded(item.title) && __props.stateSidebar && !__props.horizontal ? (vue.openBlock(), vue.createElementBlock("ul", _hoisted_9, [
152
+ item.subItems && isSectionExpanded(item.title) && __props.stateSidebar && !__props.horizontal ? (vue.openBlock(), vue.createElementBlock("ul", _hoisted_4, [
161
153
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item.subItems, (subItem) => {
162
154
  return vue.openBlock(), vue.createElementBlock("li", {
163
155
  key: subItem.title
164
156
  }, [
165
157
  vue.createElementVNode("a", {
166
- onClick: ($event) => subItem.route && vue.unref(router).push(subItem.route),
158
+ onClick: ($event) => subItem.route && (this.$route.path !== subItem.route ? vue.unref(router).push(subItem.route) : _ctx.isPhone ? __props.stateSidebar = false : null),
167
159
  href: "#",
168
- class: "sidebar-subitem-link flex flex-nowrap gap-thin pd-thin radius-small"
160
+ class: vue.normalizeClass(["sidebar-subitem-link flex flex-nowrap gap-thin pd-thin radius-small", [
161
+ subItem.route && _ctx.$route.path === processRoute(subItem.route) ? __props.theme === "light" ? "bg-light" : "bg-dark" : "",
162
+ __props.theme === "light" ? "hover-bg-light" : "hover-bg-dark"
163
+ ]])
169
164
  }, [
170
165
  subItem.iconComponent ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(subItem.iconComponent), {
171
166
  key: 0,
172
167
  class: "sidebar-subitem-icon i-medium",
173
168
  fill: globals.state.theme.darkmode || __props.theme === "dark" ? "rgba(255,255,255,0.7)" : "rgba(0,0,0,0.25)"
174
- }, null, 8, ["fill"])) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_11, vue.toDisplayString(subItem.icon), 1)),
175
- vue.createElementVNode("span", _hoisted_12, vue.toDisplayString(subItem.title), 1)
176
- ], 8, _hoisted_10)
169
+ }, null, 8, ["fill"])) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_6, vue.toDisplayString(subItem.icon), 1)),
170
+ vue.createElementVNode("span", _hoisted_7, vue.toDisplayString(subItem.title), 1)
171
+ ], 10, _hoisted_5)
177
172
  ]);
178
173
  }), 128))
179
174
  ])) : vue.createCommentVNode("", true)
@@ -193,6 +188,6 @@ const _sfc_main = {
193
188
  };
194
189
  }
195
190
  };
196
- const Navigation = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-371c51a6"]]);
191
+ const Navigation = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-f858259f"]]);
197
192
  exports.default = Navigation;
198
193
  //# sourceMappingURL=Navigation.vue.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Navigation.vue.cjs","sources":["../../../../../../../../src/modules/globals/views/components/partials/Navigation.vue"],"sourcesContent":["<script setup>\nimport { ref, watch, computed } from 'vue'\nimport { useRouter } from 'vue-router'\n\nimport * as globals from '@martyrs/src/modules/globals/views/store/globals'\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth'\n\n// Import icons\nimport IconProducts from '@martyrs/src/modules/icons/entities/IconProducts.vue'\nimport IconPayments from '@martyrs/src/modules/icons/entities/IconPayments.vue'\nimport IconEvents from '@martyrs/src/modules/icons/entities/IconEvents.vue'\nimport IconGroups from '@martyrs/src/modules/icons/entities/IconGroups.vue'\nimport IconCommunity from '@martyrs/src/modules/icons/entities/IconCommunity.vue'\nimport IconGallery from '@martyrs/src/modules/icons/entities/IconGallery.vue'\nimport IconOrders from '@martyrs/src/modules/icons/entities/IconOrders.vue'\nimport IconLeftovers from '@martyrs/src/modules/icons/entities/IconLeftovers.vue'\n\nconst router = useRouter()\n\nimport Dropdown from '@martyrs/src/components/Dropdown/Dropdown.vue'\nimport Spoiler from '@martyrs/src/components/Spoiler/Spoiler.vue'\n\nconst props = defineProps({\n navigationItems: Array, // Fixed property name typo\n theme: {\n type: String,\n default: \"light\"\n },\n stateSidebar: {\n type: Boolean,\n default: false\n },\n horizontal: {\n type: Boolean,\n default: false\n }\n})\n\nconst emit = defineEmits([\n 'closeSidebar'\n])\n\nconst expandedSections = ref([])\n\n// Use navigationItems from props instead of nagigationItems\nconst menuItems = computed(() => props.navigationItems || [])\n\nconst toggleSection = (title) => {\n if (!props.stateSidebar) {\n if (menuItems.value.flatMap(section => section.items).find(item => item.title === title && item.subItems)) {\n emit('closeSidebar')\n setTimeout(() => {\n expandedSections.value.push(title)\n }, 50)\n }\n return\n }\n \n const index = expandedSections.value.indexOf(title)\n\n if (index === -1) {\n expandedSections.value.push(title)\n } else {\n expandedSections.value.splice(index, 1)\n }\n}\n\nconst isSectionExpanded = (title) => {\n return expandedSections.value.includes(title)\n}\n\nwatch(() => props.stateSidebar, (newValue) => {\n if (!newValue) {\n expandedSections.value = []\n }\n})\n\n// Process route functions with globals and auth data\nconst processRoute = (route) => {\n if (typeof route === 'function') {\n return route(globals.state, auth.state)\n }\n return route\n}\n</script>\n\n<template>\n <nav\n class=\"o-x-hidden h-100\"\n :class=\"[\n stateSidebar ? 'pd-small' : 'pd-micro',\n horizontal ? 'w-100 desktop-only flex flex-center flex-nowrap o-y-hidden' : 'o-y-scroll rows-1',\n ]\"\n >\n <div \n v-for=\"section in menuItems\" \n v-show=\"!section.visible || (typeof section.visible === 'function' ? section.visible(auth.state) : true)\"\n :key=\"section.category\" \n :class=\"[\n horizontal ? 'w-max flex-child-default flex flex-nowrap' : '',\n stateSidebar && !horizontal ? 'mn-t-medium' : '',\n ]\"\n class=\"\"\n >\n <div \n class=\"sidebar-category\"\n :class=\"{ \n 'hidden': !stateSidebar || horizontal, \n 'visible': stateSidebar && !horizontal,\n 't-black': theme === 'light',\n 't-white': theme === 'dark'\n }\"\n >\n {{ section.category }}\n </div>\n\n <ul \n :class=\"[\n horizontal ? 'w-100 gap-micro flex flex-nowrap' : 'flex flex-column gap-thin',\n ]\"\n >\n <li \n v-for=\"item in section.items\" \n :key=\"item.title\"\n v-show=\"!item.visible || (typeof item.visible === 'function' ? item.visible(auth.state) : true)\"\n class=\"flex-center\"\n :class=\"[\n stateSidebar ? '' : '',\n horizontal ? 'w-100 flex flex-nowrap' : '',\n stateSidebar && !horizontal ? '' : 'aspect-1x1'\n ]\"\n >\n <button\n @click=\"item.route ? (isPhone ? (stateSidebar = false) : null, router.push(processRoute(item.route))) : null\"\n class=\"flex-child-default flex-center gap-thin flex sidebar-item-btn\"\n :class=\"[\n stateSidebar || horizontal ? 'expanded-item pd-thin' : 'w-100 h-100 justify-center',\n horizontal ? 'w-max flex flex-nowrap' : '',\n item.route && $route.path === processRoute(item.route) ? theme === 'light' ? 'bg-light' : 'bg-dark' : '',\n theme === 'light' ? 'hover-bg-light' : 'hover-bg-dark'\n ]\"\n >\n <component \n v-if=\"item.iconComponent && !horizontal\" \n :is=\"item.iconComponent\" \n class=\"i-medium flex-child-default\" \n :fill=\"globals.state.theme.darkmode || theme === 'dark' ? 'rgba(255,255,255,0.7)' : 'rgba(0,0,0,0.25)'\"\n />\n <span v-if=\"!item.iconComponent && !horizontal\" class=\"i-medium sidebar-item-icon t-lh-1 flex-child-default\">{{ item.icon }}</span>\n \n <span\n class=\"w-100 t-left sidebar-item-title\"\n :class=\"{ 'hidden': !stateSidebar && !horizontal, 'visible': stateSidebar || horizontal }\"\n >\n {{ item.title }}\n </span>\n \n <span\n v-if=\"item.subItems && stateSidebar && !horizontal\"\n class=\"mn-l-auto sidebar-dropdown-icon\"\n :class=\"{ 'rotate-180': isSectionExpanded(item.title) }\"\n @click.stop=\"toggleSection(item.title)\" \n >\n ▾\n </span>\n \n <div v-if=\"item.route && $route.path === processRoute(item.route) && !horizontal\" class=\"sidebar-highlight-indicator\" />\n <Dropdown \n v-if=\"false\"\n :label=\"hello\"\n :align=\"'right'\"\n class=\"cursor-pointer pos-absolute pos-r-regular pos-t-regular pd-thin radius-extra \"\n >\n <ul\n v-if=\"item.subItems\"\n class=\"sidebar-submenu\"\n >\n <li v-for=\"subItem in item.subItems\" :key=\"subItem.title\">\n <a \n @click=\"subItem.route && router.push(subItem.route)\" \n href=\"#\" \n class=\"sidebar-subitem-link\"\n >\n <component \n v-if=\"subItem.iconComponent\" \n :is=\"subItem.iconComponent\" \n class=\"sidebar-subitem-icon i-medium\" \n :fill=\"globals.state.theme.darkmode || theme === 'dark' ? 'rgba(255,255,255,0.7)' : 'rgba(0,0,0,0.25)'\"\n />\n <span v-else class=\"sidebar-subitem-icon\">{{ subItem.icon }}</span>\n <span class=\"sidebar-subitem-title\">{{ subItem.title }}</span>\n </a>\n </li>\n </ul>\n </Dropdown>\n </button>\n <!-- { component: IconEllipsis, class: 'i-regular t-transp' } -->\n\n\n <transition\n enter-active-class=\"dropdown-enter\"\n leave-active-class=\"dropdown-leave\"\n enter-from-class=\"dropdown-enter-from\"\n enter-to-class=\"dropdown-enter-to\"\n leave-from-class=\"dropdown-leave-from\"\n leave-to-class=\"dropdown-leave-to\"\n >\n <ul\n v-if=\"item.subItems && isSectionExpanded(item.title) && stateSidebar && !horizontal\"\n class=\"sidebar-submenu\"\n >\n <li v-for=\"subItem in item.subItems\" :key=\"subItem.title\">\n <a \n @click=\"subItem.route && router.push(subItem.route)\" \n href=\"#\" \n class=\"sidebar-subitem-link flex flex-nowrap gap-thin pd-thin radius-small\"\n >\n <component \n v-if=\"subItem.iconComponent\" \n :is=\"subItem.iconComponent\" \n class=\"sidebar-subitem-icon i-medium\" \n :fill=\"globals.state.theme.darkmode || theme === 'dark' ? 'rgba(255,255,255,0.7)' : 'rgba(0,0,0,0.25)'\"\n />\n <span v-else class=\"sidebar-subitem-icon\">{{ subItem.icon }}</span>\n <span class=\"sidebar-subitem-title\">{{ subItem.title }}</span>\n </a>\n </li>\n </ul>\n </transition>\n </li>\n </ul>\n </div>\n </nav>\n</template>\n\n<style scoped>\n.sidebar-item-btn:hover .sidebar-item-icon,\n.sidebar-subitem-link:hover .sidebar-subitem-icon {\n transform: scale(1.1);\n}\n\n.sidebar-item-btn:hover .sidebar-item-icon {\n transform: scale(1.1);\n}\n\n\n.sidebar-subitem-link:hover .sidebar-subitem-icon {\n transform: scale(1.1);\n}\n\n\n\n.expanded-item {\n display: flex;\n align-items: center;\n width: 100%;\n border-radius: var(--small);\n}\n\n.sidebar-item-btn {\n align-items: center;\n border-radius: var(--small);\n transition: all 0.2s;\n position: relative;\n border: none;\n cursor: pointer;\n}\n\n\n.sidebar-item-title {\n font-weight: 500;\n transition: opacity 0.2s, width 0.2s;\n white-space: nowrap;\n}\n\n.sidebar-item-icon {\n font-size: 1.25rem;\n transition: transform 0.2s;\n}\n\n\n\n.sidebar-category {\n font-size: 0.75rem;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n padding-left: var(--regular);\n padding-right: var(--regular);\n transition: opacity 0.2s;\n color: var(--grey-medium);\n}\n\n.sidebar-highlight-indicator {\n position: absolute;\n left: 0;\n width: 4px;\n height: 100%;\n border-radius: 0 var(--micro) var(--micro) 0;\n background: linear-gradient(to bottom, var(--second-regular), var(--second-small));\n transition: opacity 0.2s;\n}\n\n\n\n.sidebar-dropdown-icon {\n color: var(--grey-medium);\n transition: transform 0.2s;\n}\n\n.rotate-180 {\n transform: rotate(180deg);\n}\n\n.sidebar-submenu {\n margin-top: var(--micro);\n margin-left: var(--semi);\n display: flex;\n flex-direction: column;\n gap: var(--micro);\n}\n\n.sidebar-subitem-link {\n display: flex;\n align-items: center;\n text-decoration: none;\n transition: all 0.2s;\n}\n\n\n.sidebar-subitem-title {\n font-size: 0.875rem;\n}\n\n.hidden {\n opacity: 0;\n width: 0;\n display: none;\n}\n\n.visible {\n opacity: 1;\n display: block;\n}\n\n/* Dropdown animations */\n.dropdown-enter, .dropdown-leave {\n transition: all 0.3s ease-in-out;\n}\n\n.dropdown-enter-from, .dropdown-leave-to {\n opacity: 0;\n transform: translateY(-0.5rem);\n}\n\n.dropdown-enter-to, .dropdown-leave-from {\n opacity: 1;\n transform: translateY(0);\n}\n</style>"],"names":["useRouter","ref","computed","watch","globals.state","auth.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,UAAM,SAASA,UAAS,UAAA;AAKxB,UAAM,QAAQ;AAgBd,UAAM,OAAO;AAIb,UAAM,mBAAmBC,IAAG,IAAC,CAAE,CAAA;AAG/B,UAAM,YAAYC,IAAQ,SAAC,MAAM,MAAM,mBAAmB,CAAE,CAAA;AAE5D,UAAM,gBAAgB,CAAC,UAAU;AAC/B,UAAI,CAAC,MAAM,cAAc;AACvB,YAAI,UAAU,MAAM,QAAQ,aAAW,QAAQ,KAAK,EAAE,KAAK,UAAQ,KAAK,UAAU,SAAS,KAAK,QAAQ,GAAG;AACzG,eAAK,cAAc;AACnB,qBAAW,MAAM;AACf,6BAAiB,MAAM,KAAK,KAAK;AAAA,UACzC,GAAS,EAAE;AAAA,QACX;AACI;AAAA,MACJ;AAEE,YAAM,QAAQ,iBAAiB,MAAM,QAAQ,KAAK;AAElD,UAAI,UAAU,IAAI;AAChB,yBAAiB,MAAM,KAAK,KAAK;AAAA,MACrC,OAAS;AACL,yBAAiB,MAAM,OAAO,OAAO,CAAC;AAAA,MAC1C;AAAA,IACA;AAEA,UAAM,oBAAoB,CAAC,UAAU;AACnC,aAAO,iBAAiB,MAAM,SAAS,KAAK;AAAA,IAC9C;AAEAC,QAAK,MAAC,MAAM,MAAM,cAAc,CAAC,aAAa;AAC5C,UAAI,CAAC,UAAU;AACb,yBAAiB,QAAQ,CAAA;AAAA,MAC7B;AAAA,IACA,CAAC;AAGD,UAAM,eAAe,CAAC,UAAU;AAC9B,UAAI,OAAO,UAAU,YAAY;AAC/B,eAAO,MAAMC,QAAAA,OAAeC,KAAU,KAAA;AAAA,MAC1C;AACE,aAAO;AAAA,IACT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Navigation.vue.cjs","sources":["../../../../../../../../src/modules/globals/views/components/partials/Navigation.vue"],"sourcesContent":["<script setup>\nimport { ref, watch, computed } from 'vue'\nimport { useRouter } from 'vue-router'\n\nimport * as globals from '@martyrs/src/modules/globals/views/store/globals'\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth'\n\nconst router = useRouter()\n\nimport Dropdown from '@martyrs/src/components/Dropdown/Dropdown.vue'\nimport Spoiler from '@martyrs/src/components/Spoiler/Spoiler.vue'\n\nconst props = defineProps({\n navigationItems: Array, // Fixed property name typo\n theme: {\n type: String,\n default: \"light\"\n },\n stateSidebar: {\n type: Boolean,\n default: false\n },\n horizontal: {\n type: Boolean,\n default: false\n }\n})\n\nconst emits = defineEmits([\n 'closeSidebar'\n])\n\nconst expandedSections = ref([])\n\n// Use navigationItems from props instead of nagigationItems\n\nconst toggleSection = (title) => {\n if (!props.stateSidebar) {\n if (menuItems.value.flatMap(section => section.items).find(item => item.title === title && item.subItems)) {\n emits('closeSidebar')\n setTimeout(() => {\n expandedSections.value.push(title)\n }, 50)\n }\n return\n }\n \n const index = expandedSections.value.indexOf(title)\n\n if (index === -1) {\n expandedSections.value.push(title)\n } else {\n expandedSections.value.splice(index, 1)\n }\n}\n\nconst isSectionExpanded = (title) => {\n return expandedSections.value.includes(title)\n}\n\nwatch(() => props.stateSidebar, (newValue) => {\n if (!newValue) {\n expandedSections.value = []\n }\n})\n\n// Process route functions with globals and auth data\nconst processRoute = (route) => {\n if (typeof route === 'function') {\n return route(globals.state, auth.state)\n }\n return route\n}\n</script>\n\n<template>\n <nav\n class=\"o-x-hidden h-100\"\n :class=\"[\n stateSidebar ? 'pd-small' : 'pd-micro',\n horizontal ? 'w-100 desktop-only flex flex-center flex-nowrap o-y-hidden' : 'o-y-scroll rows-1',\n ]\"\n >\n <div \n v-for=\"section in props.navigationItems\" \n v-show=\"!section.visible || (typeof section.visible === 'function' ? section.visible(auth.state) : true)\"\n :key=\"section.category\" \n :class=\"[\n horizontal ? 'w-max flex-child-default flex flex-nowrap' : '',\n stateSidebar && !horizontal ? 'mn-t-medium' : '',\n ]\"\n >\n <div \n class=\"uppercase t-medium t-transp p-small\"\n :class=\"{ \n 'hidden': !stateSidebar || horizontal, \n 'visible': stateSidebar && !horizontal,\n 't-black': theme === 'light',\n 't-white': theme === 'dark'\n }\"\n >\n {{ section.category }}\n </div>\n\n <ul \n :class=\"[\n horizontal ? 'w-100 gap-micro flex flex-nowrap' : 'flex flex-column gap-thin',\n ]\"\n >\n <li \n v-for=\"item in section.items\" \n v-show=\"!item.visible || (typeof item.visible === 'function' ? item.visible(auth.state) : true)\"\n class=\"flex-center\"\n :class=\"[\n horizontal ? 'w-100 flex flex-nowrap' : '',\n stateSidebar && !horizontal ? '' : 'aspect-1x1'\n ]\"\n :key=\"item.title\"\n >\n <button\n @click=\"item.route ? (isPhone ? (stateSidebar = false) : null, $route.path !== processRoute(item.route) ? router.push(processRoute(item.route)) : stateSidebar = false) : null\"\n class=\"flex-child-default flex-center gap-thin flex sidebar-item-btn\"\n :class=\"[\n stateSidebar || horizontal ? 'expanded-item pd-thin' : 'w-100 h-100 justify-center',\n horizontal ? 'w-max flex flex-nowrap' : '',\n item.route && $route.path === processRoute(item.route) ? theme === 'light' ? 'bg-light' : 'bg-dark' : '',\n theme === 'light' ? 'hover-bg-light' : 'hover-bg-dark'\n ]\"\n >\n <component \n v-if=\"item.iconComponent && !horizontal\" \n :is=\"item.iconComponent\" \n class=\"i-medium flex-child-default\" \n :fill=\"globals.state.theme.darkmode || theme === 'dark' ? 'rgba(255,255,255,0.7)' : 'rgba(0,0,0,0.25)'\"\n />\n <span \n v-if=\"!item.iconComponent && !horizontal\" \n class=\"i-medium sidebar-item-icon t-lh-1 flex-child-default\"\n >\n {{ item.icon }}\n </span>\n \n <span\n class=\"w-100 t-left sidebar-item-title\"\n :class=\"{ 'hidden': !stateSidebar && !horizontal, 'visible': stateSidebar || horizontal }\"\n >\n {{ item.title }}\n </span>\n \n <span\n v-if=\"item.subItems && stateSidebar && !horizontal\"\n class=\"mn-l-auto sidebar-dropdown-icon\"\n :class=\"{ 'rotate-180': isSectionExpanded(item.title) }\"\n @click.stop=\"toggleSection(item.title)\" \n >\n ▾\n </span>\n </button>\n\n <transition\n enter-active-class=\"dropdown-enter\"\n leave-active-class=\"dropdown-leave\"\n enter-from-class=\"dropdown-enter-from\"\n enter-to-class=\"dropdown-enter-to\"\n leave-from-class=\"dropdown-leave-from\"\n leave-to-class=\"dropdown-leave-to\"\n >\n <ul\n v-if=\"item.subItems && isSectionExpanded(item.title) && stateSidebar && !horizontal\"\n class=\"sidebar-submenu\"\n >\n <li v-for=\"subItem in item.subItems\" :key=\"subItem.title\">\n <a \n @click=\"subItem.route && (this.$route.path !== subItem.route ? router.push(subItem.route) : (isPhone ? stateSidebar = false : null))\"\n href=\"#\" \n class=\"sidebar-subitem-link flex flex-nowrap gap-thin pd-thin radius-small\"\n :class=\"[\n subItem.route && $route.path === processRoute(subItem.route) ? theme === 'light' ? 'bg-light' : 'bg-dark' : '',\n theme === 'light' ? 'hover-bg-light' : 'hover-bg-dark'\n ]\"\n >\n <component \n v-if=\"subItem.iconComponent\" \n :is=\"subItem.iconComponent\" \n class=\"sidebar-subitem-icon i-medium\" \n :fill=\"globals.state.theme.darkmode || theme === 'dark' ? 'rgba(255,255,255,0.7)' : 'rgba(0,0,0,0.25)'\"\n />\n <span v-else class=\"sidebar-subitem-icon\">{{ subItem.icon }}</span>\n <span class=\"sidebar-subitem-title\">{{ subItem.title }}</span>\n </a>\n </li>\n </ul>\n </transition>\n </li>\n </ul>\n </div>\n </nav>\n</template>\n\n<style scoped>\n.sidebar-item-btn:hover .sidebar-item-icon,\n.sidebar-subitem-link:hover .sidebar-subitem-icon {\n transform: scale(1.1);\n}\n\n.sidebar-item-btn:hover .sidebar-item-icon {\n transform: scale(1.1);\n}\n\n\n.sidebar-subitem-link:hover .sidebar-subitem-icon {\n transform: scale(1.1);\n}\n\n\n\n.expanded-item {\n display: flex;\n align-items: center;\n width: 100%;\n border-radius: var(--small);\n}\n\n.sidebar-item-btn {\n align-items: center;\n border-radius: var(--small);\n transition: all 0.2s;\n position: relative;\n border: none;\n cursor: pointer;\n}\n\n\n.sidebar-item-title {\n font-weight: 500;\n transition: opacity 0.2s, width 0.2s;\n white-space: nowrap;\n}\n\n.sidebar-item-icon {\n font-size: 1.25rem;\n transition: transform 0.2s;\n}\n\n\n\n\n.sidebar-highlight-indicator {\n position: absolute;\n left: 0;\n width: 4px;\n height: 100%;\n border-radius: 0 var(--micro) var(--micro) 0;\n background: linear-gradient(to bottom, var(--second-regular), var(--second-small));\n transition: opacity 0.2s;\n}\n\n\n\n.sidebar-dropdown-icon {\n color: var(--grey-medium);\n transition: transform 0.2s;\n}\n\n.rotate-180 {\n transform: rotate(180deg);\n}\n\n.sidebar-submenu {\n margin-top: var(--micro);\n margin-left: var(--semi);\n display: flex;\n flex-direction: column;\n gap: var(--micro);\n}\n\n.sidebar-subitem-link {\n display: flex;\n align-items: center;\n text-decoration: none;\n transition: all 0.2s;\n}\n\n\n.sidebar-subitem-title {\n font-size: 0.875rem;\n}\n\n.hidden {\n/* opacity: 0;*/\n width: 0;\n display: none;\n}\n\n.visible {\n/* opacity: 1;*/\n display: block;\n}\n\n/* Dropdown animations */\n.dropdown-enter, .dropdown-leave {\n transition: all 0.3s ease-in-out;\n}\n\n.dropdown-enter-from, .dropdown-leave-to {\n opacity: 0;\n transform: translateY(-0.5rem);\n}\n\n.dropdown-enter-to, .dropdown-leave-from {\n opacity: 1;\n transform: translateY(0);\n}\n</style>"],"names":["useRouter","ref","watch","globals.state","auth.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,UAAM,SAASA,UAAS,UAAA;AAKxB,UAAM,QAAQ;AAgBd,UAAM,QAAQ;AAId,UAAM,mBAAmBC,IAAG,IAAC,CAAE,CAAA;AAI/B,UAAM,gBAAgB,CAAC,UAAU;AAC/B,UAAI,CAAC,MAAM,cAAc;AACvB,YAAI,UAAU,MAAM,QAAQ,aAAW,QAAQ,KAAK,EAAE,KAAK,UAAQ,KAAK,UAAU,SAAS,KAAK,QAAQ,GAAG;AACzG,gBAAM,cAAc;AACpB,qBAAW,MAAM;AACf,6BAAiB,MAAM,KAAK,KAAK;AAAA,UACzC,GAAS,EAAE;AAAA,QACX;AACI;AAAA,MACJ;AAEE,YAAM,QAAQ,iBAAiB,MAAM,QAAQ,KAAK;AAElD,UAAI,UAAU,IAAI;AAChB,yBAAiB,MAAM,KAAK,KAAK;AAAA,MACrC,OAAS;AACL,yBAAiB,MAAM,OAAO,OAAO,CAAC;AAAA,MAC1C;AAAA,IACA;AAEA,UAAM,oBAAoB,CAAC,UAAU;AACnC,aAAO,iBAAiB,MAAM,SAAS,KAAK;AAAA,IAC9C;AAEAC,QAAK,MAAC,MAAM,MAAM,cAAc,CAAC,aAAa;AAC5C,UAAI,CAAC,UAAU;AACb,yBAAiB,QAAQ,CAAA;AAAA,MAC7B;AAAA,IACA,CAAC;AAGD,UAAM,eAAe,CAAC,UAAU;AAC9B,UAAI,OAAO,UAAU,YAAY;AAC/B,eAAO,MAAMC,QAAAA,OAAeC,KAAU,KAAA;AAAA,MAC1C;AACE,aAAO;AAAA,IACT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import { ref, computed, watch, createElementBlock, openBlock, normalizeClass, Fragment, renderList, withDirectives, createElementVNode, toDisplayString, createVNode, unref, createBlock, createCommentVNode, resolveDynamicComponent, withModifiers, Transition, withCtx, vShow } from "vue";
1
+ import { ref, watch, createElementBlock, openBlock, normalizeClass, Fragment, renderList, withDirectives, createElementVNode, toDisplayString, createVNode, unref, createBlock, createCommentVNode, resolveDynamicComponent, withModifiers, Transition, withCtx, vShow } from "vue";
2
2
  import { useRouter } from "vue-router";
3
3
  import { state } from "../../store/globals.js";
4
4
  import { state as state$1 } from "../../../../auth/views/store/auth.js";
@@ -12,19 +12,15 @@ const _hoisted_2 = {
12
12
  };
13
13
  const _hoisted_3 = ["onClick"];
14
14
  const _hoisted_4 = {
15
- key: 3,
16
- class: "sidebar-highlight-indicator"
17
- };
18
- const _hoisted_9 = {
19
15
  key: 0,
20
16
  class: "sidebar-submenu"
21
17
  };
22
- const _hoisted_10 = ["onClick"];
23
- const _hoisted_11 = {
18
+ const _hoisted_5 = ["onClick"];
19
+ const _hoisted_6 = {
24
20
  key: 1,
25
21
  class: "sidebar-subitem-icon"
26
22
  };
27
- const _hoisted_12 = { class: "sidebar-subitem-title" };
23
+ const _hoisted_7 = { class: "sidebar-subitem-title" };
28
24
  const _sfc_main = {
29
25
  __name: "Navigation",
30
26
  props: {
@@ -49,13 +45,12 @@ const _sfc_main = {
49
45
  setup(__props, { emit: __emit }) {
50
46
  const router = useRouter();
51
47
  const props = __props;
52
- const emit = __emit;
48
+ const emits = __emit;
53
49
  const expandedSections = ref([]);
54
- const menuItems = computed(() => props.navigationItems || []);
55
50
  const toggleSection = (title) => {
56
51
  if (!props.stateSidebar) {
57
52
  if (menuItems.value.flatMap((section) => section.items).find((item) => item.title === title && item.subItems)) {
58
- emit("closeSidebar");
53
+ emits("closeSidebar");
59
54
  setTimeout(() => {
60
55
  expandedSections.value.push(title);
61
56
  }, 50);
@@ -90,16 +85,16 @@ const _sfc_main = {
90
85
  __props.horizontal ? "w-100 desktop-only flex flex-center flex-nowrap o-y-hidden" : "o-y-scroll rows-1"
91
86
  ]])
92
87
  }, [
93
- (openBlock(true), createElementBlock(Fragment, null, renderList(menuItems.value, (section) => {
88
+ (openBlock(true), createElementBlock(Fragment, null, renderList(props.navigationItems, (section) => {
94
89
  return withDirectives((openBlock(), createElementBlock("div", {
95
90
  key: section.category,
96
- class: normalizeClass([[
91
+ class: normalizeClass([
97
92
  __props.horizontal ? "w-max flex-child-default flex flex-nowrap" : "",
98
93
  __props.stateSidebar && !__props.horizontal ? "mn-t-medium" : ""
99
- ], ""])
94
+ ])
100
95
  }, [
101
96
  createElementVNode("div", {
102
- class: normalizeClass(["sidebar-category", {
97
+ class: normalizeClass(["uppercase t-medium t-transp p-small", {
103
98
  "hidden": !__props.stateSidebar || __props.horizontal,
104
99
  "visible": __props.stateSidebar && !__props.horizontal,
105
100
  "t-black": __props.theme === "light",
@@ -113,15 +108,14 @@ const _sfc_main = {
113
108
  }, [
114
109
  (openBlock(true), createElementBlock(Fragment, null, renderList(section.items, (item) => {
115
110
  return withDirectives((openBlock(), createElementBlock("li", {
116
- key: item.title,
117
111
  class: normalizeClass(["flex-center", [
118
- __props.stateSidebar ? "" : "",
119
112
  __props.horizontal ? "w-100 flex flex-nowrap" : "",
120
113
  __props.stateSidebar && !__props.horizontal ? "" : "aspect-1x1"
121
- ]])
114
+ ]]),
115
+ key: item.title
122
116
  }, [
123
117
  createElementVNode("button", {
124
- onClick: ($event) => item.route ? (_ctx.isPhone ? __props.stateSidebar = false : null, unref(router).push(processRoute(item.route))) : null,
118
+ onClick: ($event) => item.route ? (_ctx.isPhone ? __props.stateSidebar = false : null, _ctx.$route.path !== processRoute(item.route) ? unref(router).push(processRoute(item.route)) : __props.stateSidebar = false) : null,
125
119
  class: normalizeClass(["flex-child-default flex-center gap-thin flex sidebar-item-btn", [
126
120
  __props.stateSidebar || __props.horizontal ? "expanded-item pd-thin" : "w-100 h-100 justify-center",
127
121
  __props.horizontal ? "w-max flex flex-nowrap" : "",
@@ -142,9 +136,7 @@ const _sfc_main = {
142
136
  key: 2,
143
137
  class: normalizeClass(["mn-l-auto sidebar-dropdown-icon", { "rotate-180": isSectionExpanded(item.title) }]),
144
138
  onClick: withModifiers(($event) => toggleSection(item.title), ["stop"])
145
- }, " ▾ ", 10, _hoisted_3)) : createCommentVNode("", true),
146
- item.route && _ctx.$route.path === processRoute(item.route) && !__props.horizontal ? (openBlock(), createElementBlock("div", _hoisted_4)) : createCommentVNode("", true),
147
- createCommentVNode("", true)
139
+ }, " ▾ ", 10, _hoisted_3)) : createCommentVNode("", true)
148
140
  ], 10, _hoisted_1),
149
141
  createVNode(Transition, {
150
142
  "enter-active-class": "dropdown-enter",
@@ -155,23 +147,26 @@ const _sfc_main = {
155
147
  "leave-to-class": "dropdown-leave-to"
156
148
  }, {
157
149
  default: withCtx(() => [
158
- item.subItems && isSectionExpanded(item.title) && __props.stateSidebar && !__props.horizontal ? (openBlock(), createElementBlock("ul", _hoisted_9, [
150
+ item.subItems && isSectionExpanded(item.title) && __props.stateSidebar && !__props.horizontal ? (openBlock(), createElementBlock("ul", _hoisted_4, [
159
151
  (openBlock(true), createElementBlock(Fragment, null, renderList(item.subItems, (subItem) => {
160
152
  return openBlock(), createElementBlock("li", {
161
153
  key: subItem.title
162
154
  }, [
163
155
  createElementVNode("a", {
164
- onClick: ($event) => subItem.route && unref(router).push(subItem.route),
156
+ onClick: ($event) => subItem.route && (this.$route.path !== subItem.route ? unref(router).push(subItem.route) : _ctx.isPhone ? __props.stateSidebar = false : null),
165
157
  href: "#",
166
- class: "sidebar-subitem-link flex flex-nowrap gap-thin pd-thin radius-small"
158
+ class: normalizeClass(["sidebar-subitem-link flex flex-nowrap gap-thin pd-thin radius-small", [
159
+ subItem.route && _ctx.$route.path === processRoute(subItem.route) ? __props.theme === "light" ? "bg-light" : "bg-dark" : "",
160
+ __props.theme === "light" ? "hover-bg-light" : "hover-bg-dark"
161
+ ]])
167
162
  }, [
168
163
  subItem.iconComponent ? (openBlock(), createBlock(resolveDynamicComponent(subItem.iconComponent), {
169
164
  key: 0,
170
165
  class: "sidebar-subitem-icon i-medium",
171
166
  fill: state.theme.darkmode || __props.theme === "dark" ? "rgba(255,255,255,0.7)" : "rgba(0,0,0,0.25)"
172
- }, null, 8, ["fill"])) : (openBlock(), createElementBlock("span", _hoisted_11, toDisplayString(subItem.icon), 1)),
173
- createElementVNode("span", _hoisted_12, toDisplayString(subItem.title), 1)
174
- ], 8, _hoisted_10)
167
+ }, null, 8, ["fill"])) : (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(subItem.icon), 1)),
168
+ createElementVNode("span", _hoisted_7, toDisplayString(subItem.title), 1)
169
+ ], 10, _hoisted_5)
175
170
  ]);
176
171
  }), 128))
177
172
  ])) : createCommentVNode("", true)
@@ -191,7 +186,7 @@ const _sfc_main = {
191
186
  };
192
187
  }
193
188
  };
194
- const Navigation = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-371c51a6"]]);
189
+ const Navigation = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f858259f"]]);
195
190
  export {
196
191
  Navigation as default
197
192
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Navigation.vue.js","sources":["../../../../../../../../src/modules/globals/views/components/partials/Navigation.vue"],"sourcesContent":["<script setup>\nimport { ref, watch, computed } from 'vue'\nimport { useRouter } from 'vue-router'\n\nimport * as globals from '@martyrs/src/modules/globals/views/store/globals'\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth'\n\n// Import icons\nimport IconProducts from '@martyrs/src/modules/icons/entities/IconProducts.vue'\nimport IconPayments from '@martyrs/src/modules/icons/entities/IconPayments.vue'\nimport IconEvents from '@martyrs/src/modules/icons/entities/IconEvents.vue'\nimport IconGroups from '@martyrs/src/modules/icons/entities/IconGroups.vue'\nimport IconCommunity from '@martyrs/src/modules/icons/entities/IconCommunity.vue'\nimport IconGallery from '@martyrs/src/modules/icons/entities/IconGallery.vue'\nimport IconOrders from '@martyrs/src/modules/icons/entities/IconOrders.vue'\nimport IconLeftovers from '@martyrs/src/modules/icons/entities/IconLeftovers.vue'\n\nconst router = useRouter()\n\nimport Dropdown from '@martyrs/src/components/Dropdown/Dropdown.vue'\nimport Spoiler from '@martyrs/src/components/Spoiler/Spoiler.vue'\n\nconst props = defineProps({\n navigationItems: Array, // Fixed property name typo\n theme: {\n type: String,\n default: \"light\"\n },\n stateSidebar: {\n type: Boolean,\n default: false\n },\n horizontal: {\n type: Boolean,\n default: false\n }\n})\n\nconst emit = defineEmits([\n 'closeSidebar'\n])\n\nconst expandedSections = ref([])\n\n// Use navigationItems from props instead of nagigationItems\nconst menuItems = computed(() => props.navigationItems || [])\n\nconst toggleSection = (title) => {\n if (!props.stateSidebar) {\n if (menuItems.value.flatMap(section => section.items).find(item => item.title === title && item.subItems)) {\n emit('closeSidebar')\n setTimeout(() => {\n expandedSections.value.push(title)\n }, 50)\n }\n return\n }\n \n const index = expandedSections.value.indexOf(title)\n\n if (index === -1) {\n expandedSections.value.push(title)\n } else {\n expandedSections.value.splice(index, 1)\n }\n}\n\nconst isSectionExpanded = (title) => {\n return expandedSections.value.includes(title)\n}\n\nwatch(() => props.stateSidebar, (newValue) => {\n if (!newValue) {\n expandedSections.value = []\n }\n})\n\n// Process route functions with globals and auth data\nconst processRoute = (route) => {\n if (typeof route === 'function') {\n return route(globals.state, auth.state)\n }\n return route\n}\n</script>\n\n<template>\n <nav\n class=\"o-x-hidden h-100\"\n :class=\"[\n stateSidebar ? 'pd-small' : 'pd-micro',\n horizontal ? 'w-100 desktop-only flex flex-center flex-nowrap o-y-hidden' : 'o-y-scroll rows-1',\n ]\"\n >\n <div \n v-for=\"section in menuItems\" \n v-show=\"!section.visible || (typeof section.visible === 'function' ? section.visible(auth.state) : true)\"\n :key=\"section.category\" \n :class=\"[\n horizontal ? 'w-max flex-child-default flex flex-nowrap' : '',\n stateSidebar && !horizontal ? 'mn-t-medium' : '',\n ]\"\n class=\"\"\n >\n <div \n class=\"sidebar-category\"\n :class=\"{ \n 'hidden': !stateSidebar || horizontal, \n 'visible': stateSidebar && !horizontal,\n 't-black': theme === 'light',\n 't-white': theme === 'dark'\n }\"\n >\n {{ section.category }}\n </div>\n\n <ul \n :class=\"[\n horizontal ? 'w-100 gap-micro flex flex-nowrap' : 'flex flex-column gap-thin',\n ]\"\n >\n <li \n v-for=\"item in section.items\" \n :key=\"item.title\"\n v-show=\"!item.visible || (typeof item.visible === 'function' ? item.visible(auth.state) : true)\"\n class=\"flex-center\"\n :class=\"[\n stateSidebar ? '' : '',\n horizontal ? 'w-100 flex flex-nowrap' : '',\n stateSidebar && !horizontal ? '' : 'aspect-1x1'\n ]\"\n >\n <button\n @click=\"item.route ? (isPhone ? (stateSidebar = false) : null, router.push(processRoute(item.route))) : null\"\n class=\"flex-child-default flex-center gap-thin flex sidebar-item-btn\"\n :class=\"[\n stateSidebar || horizontal ? 'expanded-item pd-thin' : 'w-100 h-100 justify-center',\n horizontal ? 'w-max flex flex-nowrap' : '',\n item.route && $route.path === processRoute(item.route) ? theme === 'light' ? 'bg-light' : 'bg-dark' : '',\n theme === 'light' ? 'hover-bg-light' : 'hover-bg-dark'\n ]\"\n >\n <component \n v-if=\"item.iconComponent && !horizontal\" \n :is=\"item.iconComponent\" \n class=\"i-medium flex-child-default\" \n :fill=\"globals.state.theme.darkmode || theme === 'dark' ? 'rgba(255,255,255,0.7)' : 'rgba(0,0,0,0.25)'\"\n />\n <span v-if=\"!item.iconComponent && !horizontal\" class=\"i-medium sidebar-item-icon t-lh-1 flex-child-default\">{{ item.icon }}</span>\n \n <span\n class=\"w-100 t-left sidebar-item-title\"\n :class=\"{ 'hidden': !stateSidebar && !horizontal, 'visible': stateSidebar || horizontal }\"\n >\n {{ item.title }}\n </span>\n \n <span\n v-if=\"item.subItems && stateSidebar && !horizontal\"\n class=\"mn-l-auto sidebar-dropdown-icon\"\n :class=\"{ 'rotate-180': isSectionExpanded(item.title) }\"\n @click.stop=\"toggleSection(item.title)\" \n >\n ▾\n </span>\n \n <div v-if=\"item.route && $route.path === processRoute(item.route) && !horizontal\" class=\"sidebar-highlight-indicator\" />\n <Dropdown \n v-if=\"false\"\n :label=\"hello\"\n :align=\"'right'\"\n class=\"cursor-pointer pos-absolute pos-r-regular pos-t-regular pd-thin radius-extra \"\n >\n <ul\n v-if=\"item.subItems\"\n class=\"sidebar-submenu\"\n >\n <li v-for=\"subItem in item.subItems\" :key=\"subItem.title\">\n <a \n @click=\"subItem.route && router.push(subItem.route)\" \n href=\"#\" \n class=\"sidebar-subitem-link\"\n >\n <component \n v-if=\"subItem.iconComponent\" \n :is=\"subItem.iconComponent\" \n class=\"sidebar-subitem-icon i-medium\" \n :fill=\"globals.state.theme.darkmode || theme === 'dark' ? 'rgba(255,255,255,0.7)' : 'rgba(0,0,0,0.25)'\"\n />\n <span v-else class=\"sidebar-subitem-icon\">{{ subItem.icon }}</span>\n <span class=\"sidebar-subitem-title\">{{ subItem.title }}</span>\n </a>\n </li>\n </ul>\n </Dropdown>\n </button>\n <!-- { component: IconEllipsis, class: 'i-regular t-transp' } -->\n\n\n <transition\n enter-active-class=\"dropdown-enter\"\n leave-active-class=\"dropdown-leave\"\n enter-from-class=\"dropdown-enter-from\"\n enter-to-class=\"dropdown-enter-to\"\n leave-from-class=\"dropdown-leave-from\"\n leave-to-class=\"dropdown-leave-to\"\n >\n <ul\n v-if=\"item.subItems && isSectionExpanded(item.title) && stateSidebar && !horizontal\"\n class=\"sidebar-submenu\"\n >\n <li v-for=\"subItem in item.subItems\" :key=\"subItem.title\">\n <a \n @click=\"subItem.route && router.push(subItem.route)\" \n href=\"#\" \n class=\"sidebar-subitem-link flex flex-nowrap gap-thin pd-thin radius-small\"\n >\n <component \n v-if=\"subItem.iconComponent\" \n :is=\"subItem.iconComponent\" \n class=\"sidebar-subitem-icon i-medium\" \n :fill=\"globals.state.theme.darkmode || theme === 'dark' ? 'rgba(255,255,255,0.7)' : 'rgba(0,0,0,0.25)'\"\n />\n <span v-else class=\"sidebar-subitem-icon\">{{ subItem.icon }}</span>\n <span class=\"sidebar-subitem-title\">{{ subItem.title }}</span>\n </a>\n </li>\n </ul>\n </transition>\n </li>\n </ul>\n </div>\n </nav>\n</template>\n\n<style scoped>\n.sidebar-item-btn:hover .sidebar-item-icon,\n.sidebar-subitem-link:hover .sidebar-subitem-icon {\n transform: scale(1.1);\n}\n\n.sidebar-item-btn:hover .sidebar-item-icon {\n transform: scale(1.1);\n}\n\n\n.sidebar-subitem-link:hover .sidebar-subitem-icon {\n transform: scale(1.1);\n}\n\n\n\n.expanded-item {\n display: flex;\n align-items: center;\n width: 100%;\n border-radius: var(--small);\n}\n\n.sidebar-item-btn {\n align-items: center;\n border-radius: var(--small);\n transition: all 0.2s;\n position: relative;\n border: none;\n cursor: pointer;\n}\n\n\n.sidebar-item-title {\n font-weight: 500;\n transition: opacity 0.2s, width 0.2s;\n white-space: nowrap;\n}\n\n.sidebar-item-icon {\n font-size: 1.25rem;\n transition: transform 0.2s;\n}\n\n\n\n.sidebar-category {\n font-size: 0.75rem;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n padding-left: var(--regular);\n padding-right: var(--regular);\n transition: opacity 0.2s;\n color: var(--grey-medium);\n}\n\n.sidebar-highlight-indicator {\n position: absolute;\n left: 0;\n width: 4px;\n height: 100%;\n border-radius: 0 var(--micro) var(--micro) 0;\n background: linear-gradient(to bottom, var(--second-regular), var(--second-small));\n transition: opacity 0.2s;\n}\n\n\n\n.sidebar-dropdown-icon {\n color: var(--grey-medium);\n transition: transform 0.2s;\n}\n\n.rotate-180 {\n transform: rotate(180deg);\n}\n\n.sidebar-submenu {\n margin-top: var(--micro);\n margin-left: var(--semi);\n display: flex;\n flex-direction: column;\n gap: var(--micro);\n}\n\n.sidebar-subitem-link {\n display: flex;\n align-items: center;\n text-decoration: none;\n transition: all 0.2s;\n}\n\n\n.sidebar-subitem-title {\n font-size: 0.875rem;\n}\n\n.hidden {\n opacity: 0;\n width: 0;\n display: none;\n}\n\n.visible {\n opacity: 1;\n display: block;\n}\n\n/* Dropdown animations */\n.dropdown-enter, .dropdown-leave {\n transition: all 0.3s ease-in-out;\n}\n\n.dropdown-enter-from, .dropdown-leave-to {\n opacity: 0;\n transform: translateY(-0.5rem);\n}\n\n.dropdown-enter-to, .dropdown-leave-from {\n opacity: 1;\n transform: translateY(0);\n}\n</style>"],"names":["globals.state","auth.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,UAAM,SAAS,UAAS;AAKxB,UAAM,QAAQ;AAgBd,UAAM,OAAO;AAIb,UAAM,mBAAmB,IAAI,CAAE,CAAA;AAG/B,UAAM,YAAY,SAAS,MAAM,MAAM,mBAAmB,CAAE,CAAA;AAE5D,UAAM,gBAAgB,CAAC,UAAU;AAC/B,UAAI,CAAC,MAAM,cAAc;AACvB,YAAI,UAAU,MAAM,QAAQ,aAAW,QAAQ,KAAK,EAAE,KAAK,UAAQ,KAAK,UAAU,SAAS,KAAK,QAAQ,GAAG;AACzG,eAAK,cAAc;AACnB,qBAAW,MAAM;AACf,6BAAiB,MAAM,KAAK,KAAK;AAAA,UACzC,GAAS,EAAE;AAAA,QACX;AACI;AAAA,MACJ;AAEE,YAAM,QAAQ,iBAAiB,MAAM,QAAQ,KAAK;AAElD,UAAI,UAAU,IAAI;AAChB,yBAAiB,MAAM,KAAK,KAAK;AAAA,MACrC,OAAS;AACL,yBAAiB,MAAM,OAAO,OAAO,CAAC;AAAA,MAC1C;AAAA,IACA;AAEA,UAAM,oBAAoB,CAAC,UAAU;AACnC,aAAO,iBAAiB,MAAM,SAAS,KAAK;AAAA,IAC9C;AAEA,UAAM,MAAM,MAAM,cAAc,CAAC,aAAa;AAC5C,UAAI,CAAC,UAAU;AACb,yBAAiB,QAAQ,CAAA;AAAA,MAC7B;AAAA,IACA,CAAC;AAGD,UAAM,eAAe,CAAC,UAAU;AAC9B,UAAI,OAAO,UAAU,YAAY;AAC/B,eAAO,MAAMA,OAAeC,OAAU;AAAA,MAC1C;AACE,aAAO;AAAA,IACT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Navigation.vue.js","sources":["../../../../../../../../src/modules/globals/views/components/partials/Navigation.vue"],"sourcesContent":["<script setup>\nimport { ref, watch, computed } from 'vue'\nimport { useRouter } from 'vue-router'\n\nimport * as globals from '@martyrs/src/modules/globals/views/store/globals'\nimport * as auth from '@martyrs/src/modules/auth/views/store/auth'\n\nconst router = useRouter()\n\nimport Dropdown from '@martyrs/src/components/Dropdown/Dropdown.vue'\nimport Spoiler from '@martyrs/src/components/Spoiler/Spoiler.vue'\n\nconst props = defineProps({\n navigationItems: Array, // Fixed property name typo\n theme: {\n type: String,\n default: \"light\"\n },\n stateSidebar: {\n type: Boolean,\n default: false\n },\n horizontal: {\n type: Boolean,\n default: false\n }\n})\n\nconst emits = defineEmits([\n 'closeSidebar'\n])\n\nconst expandedSections = ref([])\n\n// Use navigationItems from props instead of nagigationItems\n\nconst toggleSection = (title) => {\n if (!props.stateSidebar) {\n if (menuItems.value.flatMap(section => section.items).find(item => item.title === title && item.subItems)) {\n emits('closeSidebar')\n setTimeout(() => {\n expandedSections.value.push(title)\n }, 50)\n }\n return\n }\n \n const index = expandedSections.value.indexOf(title)\n\n if (index === -1) {\n expandedSections.value.push(title)\n } else {\n expandedSections.value.splice(index, 1)\n }\n}\n\nconst isSectionExpanded = (title) => {\n return expandedSections.value.includes(title)\n}\n\nwatch(() => props.stateSidebar, (newValue) => {\n if (!newValue) {\n expandedSections.value = []\n }\n})\n\n// Process route functions with globals and auth data\nconst processRoute = (route) => {\n if (typeof route === 'function') {\n return route(globals.state, auth.state)\n }\n return route\n}\n</script>\n\n<template>\n <nav\n class=\"o-x-hidden h-100\"\n :class=\"[\n stateSidebar ? 'pd-small' : 'pd-micro',\n horizontal ? 'w-100 desktop-only flex flex-center flex-nowrap o-y-hidden' : 'o-y-scroll rows-1',\n ]\"\n >\n <div \n v-for=\"section in props.navigationItems\" \n v-show=\"!section.visible || (typeof section.visible === 'function' ? section.visible(auth.state) : true)\"\n :key=\"section.category\" \n :class=\"[\n horizontal ? 'w-max flex-child-default flex flex-nowrap' : '',\n stateSidebar && !horizontal ? 'mn-t-medium' : '',\n ]\"\n >\n <div \n class=\"uppercase t-medium t-transp p-small\"\n :class=\"{ \n 'hidden': !stateSidebar || horizontal, \n 'visible': stateSidebar && !horizontal,\n 't-black': theme === 'light',\n 't-white': theme === 'dark'\n }\"\n >\n {{ section.category }}\n </div>\n\n <ul \n :class=\"[\n horizontal ? 'w-100 gap-micro flex flex-nowrap' : 'flex flex-column gap-thin',\n ]\"\n >\n <li \n v-for=\"item in section.items\" \n v-show=\"!item.visible || (typeof item.visible === 'function' ? item.visible(auth.state) : true)\"\n class=\"flex-center\"\n :class=\"[\n horizontal ? 'w-100 flex flex-nowrap' : '',\n stateSidebar && !horizontal ? '' : 'aspect-1x1'\n ]\"\n :key=\"item.title\"\n >\n <button\n @click=\"item.route ? (isPhone ? (stateSidebar = false) : null, $route.path !== processRoute(item.route) ? router.push(processRoute(item.route)) : stateSidebar = false) : null\"\n class=\"flex-child-default flex-center gap-thin flex sidebar-item-btn\"\n :class=\"[\n stateSidebar || horizontal ? 'expanded-item pd-thin' : 'w-100 h-100 justify-center',\n horizontal ? 'w-max flex flex-nowrap' : '',\n item.route && $route.path === processRoute(item.route) ? theme === 'light' ? 'bg-light' : 'bg-dark' : '',\n theme === 'light' ? 'hover-bg-light' : 'hover-bg-dark'\n ]\"\n >\n <component \n v-if=\"item.iconComponent && !horizontal\" \n :is=\"item.iconComponent\" \n class=\"i-medium flex-child-default\" \n :fill=\"globals.state.theme.darkmode || theme === 'dark' ? 'rgba(255,255,255,0.7)' : 'rgba(0,0,0,0.25)'\"\n />\n <span \n v-if=\"!item.iconComponent && !horizontal\" \n class=\"i-medium sidebar-item-icon t-lh-1 flex-child-default\"\n >\n {{ item.icon }}\n </span>\n \n <span\n class=\"w-100 t-left sidebar-item-title\"\n :class=\"{ 'hidden': !stateSidebar && !horizontal, 'visible': stateSidebar || horizontal }\"\n >\n {{ item.title }}\n </span>\n \n <span\n v-if=\"item.subItems && stateSidebar && !horizontal\"\n class=\"mn-l-auto sidebar-dropdown-icon\"\n :class=\"{ 'rotate-180': isSectionExpanded(item.title) }\"\n @click.stop=\"toggleSection(item.title)\" \n >\n ▾\n </span>\n </button>\n\n <transition\n enter-active-class=\"dropdown-enter\"\n leave-active-class=\"dropdown-leave\"\n enter-from-class=\"dropdown-enter-from\"\n enter-to-class=\"dropdown-enter-to\"\n leave-from-class=\"dropdown-leave-from\"\n leave-to-class=\"dropdown-leave-to\"\n >\n <ul\n v-if=\"item.subItems && isSectionExpanded(item.title) && stateSidebar && !horizontal\"\n class=\"sidebar-submenu\"\n >\n <li v-for=\"subItem in item.subItems\" :key=\"subItem.title\">\n <a \n @click=\"subItem.route && (this.$route.path !== subItem.route ? router.push(subItem.route) : (isPhone ? stateSidebar = false : null))\"\n href=\"#\" \n class=\"sidebar-subitem-link flex flex-nowrap gap-thin pd-thin radius-small\"\n :class=\"[\n subItem.route && $route.path === processRoute(subItem.route) ? theme === 'light' ? 'bg-light' : 'bg-dark' : '',\n theme === 'light' ? 'hover-bg-light' : 'hover-bg-dark'\n ]\"\n >\n <component \n v-if=\"subItem.iconComponent\" \n :is=\"subItem.iconComponent\" \n class=\"sidebar-subitem-icon i-medium\" \n :fill=\"globals.state.theme.darkmode || theme === 'dark' ? 'rgba(255,255,255,0.7)' : 'rgba(0,0,0,0.25)'\"\n />\n <span v-else class=\"sidebar-subitem-icon\">{{ subItem.icon }}</span>\n <span class=\"sidebar-subitem-title\">{{ subItem.title }}</span>\n </a>\n </li>\n </ul>\n </transition>\n </li>\n </ul>\n </div>\n </nav>\n</template>\n\n<style scoped>\n.sidebar-item-btn:hover .sidebar-item-icon,\n.sidebar-subitem-link:hover .sidebar-subitem-icon {\n transform: scale(1.1);\n}\n\n.sidebar-item-btn:hover .sidebar-item-icon {\n transform: scale(1.1);\n}\n\n\n.sidebar-subitem-link:hover .sidebar-subitem-icon {\n transform: scale(1.1);\n}\n\n\n\n.expanded-item {\n display: flex;\n align-items: center;\n width: 100%;\n border-radius: var(--small);\n}\n\n.sidebar-item-btn {\n align-items: center;\n border-radius: var(--small);\n transition: all 0.2s;\n position: relative;\n border: none;\n cursor: pointer;\n}\n\n\n.sidebar-item-title {\n font-weight: 500;\n transition: opacity 0.2s, width 0.2s;\n white-space: nowrap;\n}\n\n.sidebar-item-icon {\n font-size: 1.25rem;\n transition: transform 0.2s;\n}\n\n\n\n\n.sidebar-highlight-indicator {\n position: absolute;\n left: 0;\n width: 4px;\n height: 100%;\n border-radius: 0 var(--micro) var(--micro) 0;\n background: linear-gradient(to bottom, var(--second-regular), var(--second-small));\n transition: opacity 0.2s;\n}\n\n\n\n.sidebar-dropdown-icon {\n color: var(--grey-medium);\n transition: transform 0.2s;\n}\n\n.rotate-180 {\n transform: rotate(180deg);\n}\n\n.sidebar-submenu {\n margin-top: var(--micro);\n margin-left: var(--semi);\n display: flex;\n flex-direction: column;\n gap: var(--micro);\n}\n\n.sidebar-subitem-link {\n display: flex;\n align-items: center;\n text-decoration: none;\n transition: all 0.2s;\n}\n\n\n.sidebar-subitem-title {\n font-size: 0.875rem;\n}\n\n.hidden {\n/* opacity: 0;*/\n width: 0;\n display: none;\n}\n\n.visible {\n/* opacity: 1;*/\n display: block;\n}\n\n/* Dropdown animations */\n.dropdown-enter, .dropdown-leave {\n transition: all 0.3s ease-in-out;\n}\n\n.dropdown-enter-from, .dropdown-leave-to {\n opacity: 0;\n transform: translateY(-0.5rem);\n}\n\n.dropdown-enter-to, .dropdown-leave-from {\n opacity: 1;\n transform: translateY(0);\n}\n</style>"],"names":["globals.state","auth.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,UAAM,SAAS,UAAS;AAKxB,UAAM,QAAQ;AAgBd,UAAM,QAAQ;AAId,UAAM,mBAAmB,IAAI,CAAE,CAAA;AAI/B,UAAM,gBAAgB,CAAC,UAAU;AAC/B,UAAI,CAAC,MAAM,cAAc;AACvB,YAAI,UAAU,MAAM,QAAQ,aAAW,QAAQ,KAAK,EAAE,KAAK,UAAQ,KAAK,UAAU,SAAS,KAAK,QAAQ,GAAG;AACzG,gBAAM,cAAc;AACpB,qBAAW,MAAM;AACf,6BAAiB,MAAM,KAAK,KAAK;AAAA,UACzC,GAAS,EAAE;AAAA,QACX;AACI;AAAA,MACJ;AAEE,YAAM,QAAQ,iBAAiB,MAAM,QAAQ,KAAK;AAElD,UAAI,UAAU,IAAI;AAChB,yBAAiB,MAAM,KAAK,KAAK;AAAA,MACrC,OAAS;AACL,yBAAiB,MAAM,OAAO,OAAO,CAAC;AAAA,MAC1C;AAAA,IACA;AAEA,UAAM,oBAAoB,CAAC,UAAU;AACnC,aAAO,iBAAiB,MAAM,SAAS,KAAK;AAAA,IAC9C;AAEA,UAAM,MAAM,MAAM,cAAc,CAAC,aAAa;AAC5C,UAAI,CAAC,UAAU;AACb,yBAAiB,QAAQ,CAAA;AAAA,MAC7B;AAAA,IACA,CAAC;AAGD,UAAM,eAAe,CAAC,UAAU;AAC9B,UAAI,OAAO,UAAU,YAAY;AAC/B,eAAO,MAAMA,OAAeC,OAAU;AAAA,MAC1C;AACE,aAAO;AAAA,IACT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}