@ozdao/prometheus-framework 0.2.212 → 0.2.214
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +2 -2
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +2 -2
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js.map +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.cjs +41 -0
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.js +41 -0
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.cjs +1 -2
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.js +1 -2
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +5 -5
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs +5 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js +7 -2
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs +22 -16
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +23 -17
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/sections/SectionPageTitle.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/sections/SectionPageTitle.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/store/globals.cjs +56 -4
- package/dist/prometheus-framework/src/modules/globals/views/store/globals.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/store/globals.js +56 -4
- package/dist/prometheus-framework/src/modules/globals/views/store/globals.js.map +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonBlogpost.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonBlogpost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonBlogpost.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEvent.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEvent.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEvent.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEvent.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEventShort.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEventShort.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEventShort.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEventShort.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonOrganization.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonOrganization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonOrganization.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +5 -5
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +5 -5
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +5 -5
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTabSection.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/pages/pages.client.cjs +627 -627
- package/dist/prometheus-framework/src/modules/pages/pages.client.js +627 -627
- package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +5 -5
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +16 -6
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +20 -10
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +5 -5
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +5 -5
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +3 -3
- package/package.json +1 -1
- package/src/components/Feed/Feed.vue +1 -1
- package/src/modules/community/components/blocks/CardBlogpost.vue +0 -22
- package/src/modules/community/components/pages/Blog.vue +1 -1
- package/src/modules/globals/views/components/layouts/App.vue +10 -2
- package/src/modules/globals/views/components/layouts/Client.vue +58 -49
- package/src/modules/globals/views/store/globals.js +69 -6
- package/src/modules/icons/logos/Logotype.vue +0 -4
- package/src/modules/icons/skeletons/SkeletonBlogpost.vue +1 -1
- package/src/modules/icons/skeletons/SkeletonEvent.vue +3 -3
- package/src/modules/icons/skeletons/SkeletonEventShort.vue +1 -1
- package/src/modules/icons/skeletons/SkeletonOrganization.vue +1 -1
- package/src/modules/users/components/pages/ProfileEdit.vue +11 -0
package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs
CHANGED
@@ -4,8 +4,9 @@ const vue = require("vue");
|
|
4
4
|
const vueRouter = require("vue-router");
|
5
5
|
const globals = require("../../store/globals.cjs");
|
6
6
|
const Status = require("../../../../../components/Status/Status.vue.cjs");
|
7
|
-
const Popup = require("../../../../../components/Popup/Popup.
|
7
|
+
const Popup = require("../../../../../components/Popup/Popup.vue.cjs");
|
8
8
|
const Loader = require("../../../../../components/Loader/Loader.vue2.cjs");
|
9
|
+
const BottomNavigationBar = require("../partials/BottomNavigationBar.vue.cjs");
|
9
10
|
const NavigationBar = require("../partials/NavigationBar.vue.cjs");
|
10
11
|
const LocationSelection = require("../partials/LocationSelection.vue.cjs");
|
11
12
|
const ShopCart = require("../../../../orders/components/partials/ShopCart.vue.cjs");
|
@@ -41,7 +42,6 @@ const _sfc_main = {
|
|
41
42
|
scrollOffset.value = event.target.scrollTop;
|
42
43
|
if (scrollOffset.value > 50 && !isScrolled) {
|
43
44
|
isScrolled = true;
|
44
|
-
header.value.$el.classList.add("scrolled");
|
45
45
|
const firstRect = header.value.$el.getBoundingClientRect();
|
46
46
|
const invert = -firstRect.top;
|
47
47
|
header.value.$el.style.transform = `translateY(${invert}px)`;
|
@@ -50,7 +50,6 @@ const _sfc_main = {
|
|
50
50
|
}, 0);
|
51
51
|
} else if (scrollOffset.value <= 75 && isScrolled) {
|
52
52
|
isScrolled = false;
|
53
|
-
header.value.$el.classList.remove("scrolled");
|
54
53
|
const firstRect = header.value.$el.getBoundingClientRect();
|
55
54
|
const invert = firstRect.top;
|
56
55
|
header.value.$el.style.transform = `translateY(${invert}px)`;
|
@@ -81,8 +80,8 @@ const _sfc_main = {
|
|
81
80
|
if (page.value) show.value = true;
|
82
81
|
});
|
83
82
|
return (_ctx, _cache) => {
|
83
|
+
var _a, _b;
|
84
84
|
const _component_router_view = vue.resolveComponent("router-view");
|
85
|
-
const _component_BottomNavigation = vue.resolveComponent("BottomNavigation");
|
86
85
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
87
86
|
vue.createVNode(vue.Transition, {
|
88
87
|
name: "moveFromTop",
|
@@ -96,7 +95,7 @@ const _sfc_main = {
|
|
96
95
|
]),
|
97
96
|
_: 1
|
98
97
|
}),
|
99
|
-
vue.unref(route).meta.header.component ? (vue.openBlock(), vue.createElementBlock("header", {
|
98
|
+
!_ctx.MOBILE_APP && vue.unref(route).meta.header.component ? (vue.openBlock(), vue.createElementBlock("header", {
|
100
99
|
key: 0,
|
101
100
|
id: "header",
|
102
101
|
class: vue.normalizeClass(["pd-thin gap-micro flex-justify-between flex-nowrap flex h-4r w-100 z-index-2 pos-relative pos-t-0", {
|
@@ -104,8 +103,7 @@ const _sfc_main = {
|
|
104
103
|
"t-white bg-black": headerTheme.value === "dark"
|
105
104
|
}])
|
106
105
|
}, [
|
107
|
-
|
108
|
-
key: 0,
|
106
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(route).meta.header.component), {
|
109
107
|
ref_key: "header",
|
110
108
|
ref: header,
|
111
109
|
theme: headerTheme.value,
|
@@ -119,7 +117,7 @@ const _sfc_main = {
|
|
119
117
|
})) : vue.createCommentVNode("", true)
|
120
118
|
]),
|
121
119
|
_: 1
|
122
|
-
}, 8, ["theme", "logotype", "location"]))
|
120
|
+
}, 8, ["theme", "logotype", "location"]))
|
123
121
|
], 2)) : vue.createCommentVNode("", true),
|
124
122
|
vue.createVNode(vue.Transition, {
|
125
123
|
name: "moveFromTop",
|
@@ -129,13 +127,13 @@ const _sfc_main = {
|
|
129
127
|
default: vue.withCtx(() => [
|
130
128
|
_ctx.MOBILE_APP ? (vue.openBlock(), vue.createBlock(NavigationBar.default, {
|
131
129
|
key: 0,
|
132
|
-
logotype: vue.unref(route).meta.logotype
|
133
|
-
|
134
|
-
}, null, 8, ["logotype", "style"])) : vue.createCommentVNode("", true)
|
130
|
+
logotype: vue.unref(route).meta.header.logotype
|
131
|
+
}, null, 8, ["logotype"])) : vue.createCommentVNode("", true)
|
135
132
|
]),
|
136
133
|
_: 1
|
137
134
|
}),
|
138
|
-
vue.
|
135
|
+
vue.unref(route).meta.header.location ? (vue.openBlock(), vue.createBlock(Popup.default, {
|
136
|
+
key: 1,
|
139
137
|
onClosePopup: closeLocationPopup,
|
140
138
|
isPopupOpen: globals.state.isOpenLocationPopup,
|
141
139
|
class: "bg-white pd-semi w-m-33r radius-big"
|
@@ -144,7 +142,7 @@ const _sfc_main = {
|
|
144
142
|
vue.createVNode(LocationSelection.default)
|
145
143
|
]),
|
146
144
|
_: 1
|
147
|
-
}, 8, ["isPopupOpen"]),
|
145
|
+
}, 8, ["isPopupOpen"])) : vue.createCommentVNode("", true),
|
148
146
|
vue.createElementVNode("section", {
|
149
147
|
id: "screen",
|
150
148
|
ref: "screen",
|
@@ -183,10 +181,18 @@ const _sfc_main = {
|
|
183
181
|
}, 8, ["class"])
|
184
182
|
]),
|
185
183
|
_: 1
|
186
|
-
}))
|
184
|
+
})),
|
185
|
+
vue.createVNode(_component_router_view, { name: "defaultBottom" }, {
|
186
|
+
default: vue.withCtx(({ Component, route: route2 }) => [
|
187
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(Component)))
|
188
|
+
]),
|
189
|
+
_: 1
|
190
|
+
}),
|
191
|
+
((_a = vue.unref(route).meta.radio) == null ? void 0 : _a.page) ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(route).meta.radio.page), { key: 0 })) : vue.createCommentVNode("", true)
|
187
192
|
], 544),
|
188
|
-
|
189
|
-
|
193
|
+
((_b = vue.unref(route).meta.radio) == null ? void 0 : _b.player) ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(route).meta.radio.player), { key: 2 })) : vue.createCommentVNode("", true),
|
194
|
+
_ctx.MOBILE_APP && vue.unref(route).meta.title_hide ? (vue.openBlock(), vue.createBlock(BottomNavigationBar.default, {
|
195
|
+
key: 3,
|
190
196
|
class: "pd-small z-index-2"
|
191
197
|
})) : vue.createCommentVNode("", true)
|
192
198
|
]);
|
package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Client.vue.cjs","sources":["../../../../../../../../src/modules/globals/views/components/layouts/Client.vue"],"sourcesContent":["<template>\n\t<div id=\"app-wrapper\" class=\"pos-relative\">\n\t\t<transition name=\"moveFromTop\" appear>\n\t\t\t<Loader v-if=\"!page\" class=\"pos-fixed\"/>\n\t\t</transition>\n\n\t\t<!-- <transition name=\"moveFromTop\" mode=\"out-in\" appear> -->\n\t\t\t<header \n\t\t\t\tid=\"header\" \n\t\t\t\tv-if=\"route.meta.header.component\"\n\t\t\t\tclass=\"\n\t\t\t\t\tpd-thin \n\t\t\t\t\tgap-micro\n\t\t\t\t\tflex-justify-between\n\t\t\t\t\tflex-nowrap\n\t\t\t\t\tflex\n\t\t\t\t\th-4r\n\t\t\t\t\tw-100\n\t\t\t\t\tz-index-2 \n\t\t\t\t\tpos-relative pos-t-0\n\t\t\t\t\"\n\t\t\t\t:class=\"{\n\t\t \t\t't-black bg-white': headerTheme === 'light',\n\t\t \t\t't-white bg-black': headerTheme === 'dark' \n\t\t \t}\"\n\t\t\t>\n\t <component\n\t\t\t \tv-if=\"!MOBILE_APP\"\n\t :is=\"route.meta.header.component\"\n\t ref=\"header\" \n\t :theme=\"headerTheme\"\n\t :logotype=\"route.meta.header.logotype\"\n\t :location=\"route.meta.header.location\"\n\t >\n\t <component\n\t v-if=\"route.meta.navigation\"\n\t :is=\"route.meta.navigation\"\n\t class=\"mn-l-auto desktop-only\"\n\t />\n\t </component>\n\t\t </header>\n <!-- </transition> -->\n\n\t\t<transition name=\"moveFromTop\" mode=\"out-in\" appear>\n\t\t\t<NavigationBar\n\t\t \tv-if=\"MOBILE_APP\"\n\t\t \t:logotype=\"route.meta.logotype\"\n\t\t\t\t:style=\"MOBILE_APP === 'ios' ?'padding-top: 6rem;':''\" \n\t\t />\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\t<section \n\t\t\tid=\"screen\" \n\t\t\tref=\"screen\"\n\t\t\t@scroll=\"handleScroll\"\n\t\t\tclass=\"transition-ease-in-out h-min-100 w-100 bg-white pos-relative o-scroll\"\n\t\t>\n\t\t\t<ShopCart />\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\t\t<Suspense>\n\t\t\t\t<router-view \n\t\t\t\t\tv-slot=\"{ Component, route }\" \n\t\t\t\t\t:class=\"{'mn-b-extra': MOBILE_APP}\"\n\t\t\t\t>\n\t\t\t\t\t<Status \n\t\t\t\t\t\tv-if=\"globals.state.error.show\" \n\t\t\t\t\t\t:data=\"globals.state.error\"\n\t\t\t\t\t\tclass=\"z-index-7\" \n\t\t\t\t\t/>\n\n\n\t\t\t\t\t<transition @before-enter=\"scrollTop\" name=\"scaleTransition\" mode=\"out-in\" appear>\n\t\t \t<component \n\t\t \t\tref=\"page\" \n\t\t \t\t:is=\"Component\" \n\t\t \t\t:key=\"route.path\"\n\t\t \t/>\n\t\t \t<!-- Key пока выключил непонятно какие проблемы это вызовет -->\n\t\t \t<!-- -->\n\t\t </transition>\n\n\t\t <!-- <Footer /> -->\n\t\t\t\t</router-view>\n\t\t\t</Suspense>\n \n\t\t</section>\n\n <BottomNavigation \n v-if=\"MOBILE_APP && route.meta.title_hide\"\n class=\"pd-small z-index-2\"\n />\n\t</div>\n</template>\n\n\n\n<script setup>\n\timport { computed, ref, onMounted } from 'vue';\n\t// Router\n\timport { useRoute } from 'vue-router';\n\t// Store\n\timport * as globals from '@pf/src/modules/globals/views/store/globals';\n\t// Partials\n\timport Status from '@pf/src/components/Status/Status.vue';\n\timport Popup from '@pf/src/components/Popup/Popup.vue';\n\t// import Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'\n\timport Loader from '@pf/src/components/Loader/Loader.vue';\n\n\timport BottomNavigationBar from '@pf/src/modules/globals/views/components/partials/BottomNavigationBar.vue';\n\n\timport NavigationBar from '@pf/src/modules/globals/views/components/partials/NavigationBar.vue';\n\timport LocationSelection from '@pf/src/modules/globals/views/components/partials/LocationSelection.vue';\n\t// import Footer from '@pf/src/modules/globals/views/components/partials/Footer.vue'\n\n\timport ShopCart from '@pf/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\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 'light'\n\t\t} else {\n\t\t\treturn route.meta.header_theme || 'light'\n\t\t}\n\t})\n\tconst handleScroll = () => {\n\t scrollOffset.value = event.target.scrollTop\n\n\t if (scrollOffset.value > 50 && !isScrolled) {\n\t isScrolled = true;\n\n\t header.value.$el.classList.add('scrolled');\n\n\t const firstRect = header.value.$el.getBoundingClientRect();\n\t const invert = -firstRect.top;\n\n\t header.value.$el.style.transform = `translateY(${invert}px)`;\n\n\t // headerTheme.value - light\n\n\t setTimeout(() => {\n\t header.value.$el.style.transform = 'translateY(0)';\n\t }, 0);\n\t } else if (scrollOffset.value <= 75 && isScrolled) {\n\t isScrolled = false;\n\t header.value.$el.classList.remove('scrolled');\n\n\t const firstRect = header.value.$el.getBoundingClientRect();\n\t const invert = firstRect.top;\n\n\t header.value.$el.style.transform = `translateY(${invert}px)`;\n\n\t setTimeout(() => {\n\t header.value.$el.style.transform = 'translateY(0)';\n\t }, 0);\n\t }\n\t};\n\t/////////////////////////////\n\t// MOUNTED\n\t/////////////////////////////\n\t// if (typeof window === 'undefined') {\n\t// show.value = true\n\t// } else {\n\t// \tshow.value = false\n\t// }\n\n\tonMounted(async () => {\n\t\t \n\t\tif ('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 {\n \t\tglobals.state.isOpenLocationPopup = true;\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\">;\t\n\t.scaleIn-enter-active,\n\t.scaleIn-leave-active {\n\t\ttransform: scale(1); \n\t\ttransition: all 0.5s ease; \n\t}\n\t.scaleIn-enter-from,\n\t.scaleIn-leave-to {\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease; \n\t}\n\n\t.moveFromTop-enter-active,\n\t.moveFromTop-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.moveFromTop-enter-from,\n\t.moveFromTop-leave-to {\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\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 > section,div { transform: translateZ(-30px); transition: all 0.5s ease; }\n transform: scale(0.95);\n }\n</style>"],"names":["ref","useRoute","globals.state","computed","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;AAsIE,QAAI,OAAOA,IAAG,IAAC,KAAK;AAEpB,UAAM,OAAOA,IAAG,IAAC,IAAI;AAItB,UAAM,QAAQC,UAAAA,SAAU;AAGxB,UAAM,cAAcD,IAAG,IAAC,MAAM,MAAM,WAAW;AAI/C,aAAS,qBAAqB;AAC5BE,cAAa,MAAC,sBAAsB;AAAA,IACrC;AACD,aAAS,YAAW;AACnB,eAAS,eAAe,KAAK,EAAE,eAAc;AAAA,IAC7C;AAED,UAAM,eAAeF,IAAG,IAAC,CAAC;AAC1B,QAAI,aAAa;AACjB,UAAM,SAASA,IAAG,IAAC,IAAI;AAEvB,UAAM,cAAcG,IAAAA,SAAS,MAAM;AAClC,UAAI,aAAa,QAAQ,IAAI;AAC5B,eAAO;AAAA,MACV,OAAS;AACN,eAAO,MAAM,KAAK,gBAAgB;AAAA,MAClC;AAAA,IACH,CAAE;AACD,UAAM,eAAe,MAAM;AACzB,mBAAa,QAAQ,MAAM,OAAO;AAElC,UAAI,aAAa,QAAQ,MAAM,CAAC,YAAY;AAC1C,qBAAa;AAEb,eAAO,MAAM,IAAI,UAAU,IAAI,UAAU;AAEzC,cAAM,YAAY,OAAO,MAAM,IAAI,sBAAqB;AACxD,cAAM,SAAS,CAAC,UAAU;AAE1B,eAAO,MAAM,IAAI,MAAM,YAAY,cAAc,MAAM;AAIvD,mBAAW,MAAM;AACf,iBAAO,MAAM,IAAI,MAAM,YAAY;AAAA,QACpC,GAAE,CAAC;AAAA,MACL,WAAU,aAAa,SAAS,MAAM,YAAY;AACjD,qBAAa;AACb,eAAO,MAAM,IAAI,UAAU,OAAO,UAAU;AAE5C,cAAM,YAAY,OAAO,MAAM,IAAI,sBAAqB;AACxD,cAAM,SAAS,UAAU;AAEzB,eAAO,MAAM,IAAI,MAAM,YAAY,cAAc,MAAM;AAEvD,mBAAW,MAAM;AACf,iBAAO,MAAM,IAAI,MAAM,YAAY;AAAA,QACpC,GAAE,CAAC;AAAA,MACL;AAAA,IACJ;AAUCC,QAAAA,UAAU,YAAY;AAErB,UAAI,mBAAmB,WAAW;AAC/B,eAAO,iBAAiB,QAAQ,MAAM;AACpC,oBAAU,cAAc,SAAS,oBAAoB,EAAE,KAAK,kBAAgB;AAC1E,oBAAQ,IAAI,mBAAmB,YAAY;AAAA,UACpD,CAAQ,EAAE,MAAM,uBAAqB;AAC5B,oBAAQ,IAAI,4BAA4B,iBAAiB;AAAA,UAClE,CAAQ;AAAA,QACR,CAAK;AAAA,MACD;AAEF,YAAM,gBAAgB,aAAa,QAAQ,UAAU;AAEpD,UAAI,eAAe;AACjBF,gBAAAA,MAAc,WAAW,KAAK,MAAM,aAAa;AAAA,MACtD,OAAU;AACNA,gBAAa,MAAC,sBAAsB;AAAA,MACpC;AAEF,UAAI,YAAY,OAAO;AACrB,qBAAa,QAAQ,eAAe,YAAY,KAAK;AAAA,MACtD;AAED,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 id=\"app-wrapper\" class=\"pos-relative\">\n\t\t<transition name=\"moveFromTop\" appear>\n\t\t\t<Loader v-if=\"!page\" class=\"pos-fixed\"/>\n\t\t</transition>\n\n\t\t<header \n\t\t\tv-if=\"!MOBILE_APP && route.meta.header.component\"\n\t\t\tid=\"header\" \n\t\t\tclass=\"\n\t\t\t\tpd-thin \n\t\t\t\tgap-micro\n\t\t\t\tflex-justify-between\n\t\t\t\tflex-nowrap\n\t\t\t\tflex\n\t\t\t\th-4r\n\t\t\t\tw-100\n\t\t\t\tz-index-2 \n\t\t\t\tpos-relative pos-t-0\n\t\t\t\"\n\t\t\t:class=\"{\n\t \t\t't-black bg-white': headerTheme === 'light',\n\t \t\t't-white bg-black': headerTheme === 'dark' \n\t \t}\"\n\t\t>\n <component\n ref=\"header\" \n :is=\"route.meta.header.component\"\n :theme=\"headerTheme\"\n :logotype=\"route.meta.header.logotype\"\n :location=\"route.meta.header.location\"\n >\n <component\n v-if=\"route.meta.navigation\"\n :is=\"route.meta.navigation\"\n class=\"mn-l-auto desktop-only\"\n />\n </component>\n\t </header>\n\n\t\t<transition name=\"moveFromTop\" mode=\"out-in\" appear>\n\t\t\t<NavigationBar\n\t\t \tv-if=\"MOBILE_APP\"\n\t\t \t:logotype=\"route.meta.header.logotype\"\n\t\t />\n\t\t</transition>\n\n\t <Popup \n\t \tv-if=\"route.meta.header.location\"\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\t<section \n\t\t\tid=\"screen\" \n\t\t\tref=\"screen\"\n\t\t\t@scroll=\"handleScroll\"\n\t\t\tclass=\"transition-ease-in-out h-min-100 w-100 bg-white pos-relative o-scroll\"\n\t\t>\n\t\t\t<ShopCart />\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\t\t<Suspense>\n\t\t\t\t<router-view \n\t\t\t\t\tv-slot=\"{ Component, route }\" \n\t\t\t\t\t:class=\"{'mn-b-extra': MOBILE_APP}\"\n\t\t\t\t>\n\t\t\t\t\t<Status \n\t\t\t\t\t\tv-if=\"globals.state.error.show\" \n\t\t\t\t\t\t:data=\"globals.state.error\"\n\t\t\t\t\t\tclass=\"z-index-7\" \n\t\t\t\t\t/>\n\n\n\t\t\t\t\t<transition @before-enter=\"scrollTop\" name=\"scaleTransition\" mode=\"out-in\" appear>\n\t\t \t<component \n\t\t \t\tref=\"page\" \n\t\t \t\t:is=\"Component\" \n\t\t \t\t:key=\"route.path\"\n\t\t \t/>\n\t\t \t<!-- Key пока выключил непонятно какие проблемы это вызовет -->\n\t\t \t<!-- -->\n\t\t </transition>\n\n\t\t <!-- <Footer /> -->\n\t\t\t\t</router-view>\n\t\t\t</Suspense>\n\n\t\t\t<router-view \n\t\t\t\tname=\"defaultBottom\"\n\t\t\t\tv-slot=\"{ Component, route }\" \n\t\t\t>\n\t\t\t\t<component \n \t\t:is=\"Component\" \n \t/>\n\t\t\t</router-view>\n\n\t\t\t<component\n\t\t \tv-if=\"route.meta.radio?.page\"\n :is=\"route.meta.radio.page\"\n />\n \n\t\t</section>\n\n\t\t<component\n\t \tv-if=\"route.meta.radio?.player\"\n :is=\"route.meta.radio.player\"\n />\n\n <BottomNavigationBar \n v-if=\"MOBILE_APP && route.meta.title_hide\"\n class=\"pd-small z-index-2\"\n />\n\t</div>\n</template>\n\n\n\n<script setup>\n\timport { computed, ref, onMounted } from 'vue';\n\t// Router\n\timport { useRoute } from 'vue-router';\n\t// Store\n\timport * as globals from '@pf/src/modules/globals/views/store/globals';\n\t// Partials\n\timport Status from '@pf/src/components/Status/Status.vue';\n\timport Popup from '@pf/src/components/Popup/Popup.vue';\n\t// import Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'\n\timport Loader from '@pf/src/components/Loader/Loader.vue';\n\n\timport BottomNavigationBar from '@pf/src/modules/globals/views/components/partials/BottomNavigationBar.vue';\n\n\timport NavigationBar from '@pf/src/modules/globals/views/components/partials/NavigationBar.vue';\n\timport LocationSelection from '@pf/src/modules/globals/views/components/partials/LocationSelection.vue';\n\t// import Footer from '@pf/src/modules/globals/views/components/partials/Footer.vue'\n\n\timport ShopCart from '@pf/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\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 '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\n\t if (scrollOffset.value > 50 && !isScrolled) {\n\t isScrolled = true;\n\n\t // header.value.$el.classList.add('scrolled');\n\n\t const firstRect = header.value.$el.getBoundingClientRect();\n\t const invert = -firstRect.top;\n\n\t header.value.$el.style.transform = `translateY(${invert}px)`;\n\n\t // headerTheme.value - light\n\n\t setTimeout(() => {\n\t header.value.$el.style.transform = 'translateY(0)';\n\t }, 0);\n\t } else if (scrollOffset.value <= 75 && isScrolled) {\n\t isScrolled = false;\n\t // header.value.$el.classList.remove('scrolled');\n\n\t const firstRect = header.value.$el.getBoundingClientRect();\n\t const invert = firstRect.top;\n\n\t header.value.$el.style.transform = `translateY(${invert}px)`;\n\n\t setTimeout(() => {\n\t header.value.$el.style.transform = 'translateY(0)';\n\t }, 0);\n\t }\n\t};\n\n\tonMounted(async () => {\n\t\t \n\t\tif ('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 {\n \t\tglobals.state.isOpenLocationPopup = true;\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\">;\t\n\t.scaleIn-enter-active,\n\t.scaleIn-leave-active {\n\t\ttransform: scale(1); \n\t\ttransition: all 0.5s ease; \n\t}\n\t.scaleIn-enter-from,\n\t.scaleIn-leave-to {\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease; \n\t}\n\n\t.moveFromTop-enter-active,\n\t.moveFromTop-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.moveFromTop-enter-from,\n\t.moveFromTop-leave-to {\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\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 > section,div { transform: translateZ(-30px); transition: all 0.5s ease; }\n transform: scale(0.95);\n }\n</style>"],"names":["ref","useRoute","globals.state","computed","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;AAsJE,QAAI,OAAOA,IAAG,IAAC,KAAK;AAEpB,UAAM,OAAOA,IAAG,IAAC,IAAI;AAItB,UAAM,QAAQC,UAAAA,SAAU;AAGxB,UAAM,cAAcD,IAAG,IAAC,MAAM,MAAM,WAAW;AAI/C,aAAS,qBAAqB;AAC5BE,cAAa,MAAC,sBAAsB;AAAA,IACrC;AACD,aAAS,YAAW;AACnB,eAAS,eAAe,KAAK,EAAE,eAAc;AAAA,IAC7C;AAED,UAAM,eAAeF,IAAG,IAAC,CAAC;AAC1B,QAAI,aAAa;AACjB,UAAM,SAASA,IAAG,IAAC,IAAI;AAEvB,UAAM,cAAcG,IAAAA,SAAS,MAAM;AAClC,UAAI,aAAa,QAAQ,IAAI;AAC5B,eAAO;AAAA,MACV,OAAS;AACN,eAAO,MAAM,KAAK,gBAAgB;AAAA,MAClC;AAAA,IACH,CAAE;AAED,UAAM,eAAe,MAAM;AACzB,mBAAa,QAAQ,MAAM,OAAO;AAElC,UAAI,aAAa,QAAQ,MAAM,CAAC,YAAY;AAC1C,qBAAa;AAIb,cAAM,YAAY,OAAO,MAAM,IAAI,sBAAqB;AACxD,cAAM,SAAS,CAAC,UAAU;AAE1B,eAAO,MAAM,IAAI,MAAM,YAAY,cAAc,MAAM;AAIvD,mBAAW,MAAM;AACf,iBAAO,MAAM,IAAI,MAAM,YAAY;AAAA,QACpC,GAAE,CAAC;AAAA,MACL,WAAU,aAAa,SAAS,MAAM,YAAY;AACjD,qBAAa;AAGb,cAAM,YAAY,OAAO,MAAM,IAAI,sBAAqB;AACxD,cAAM,SAAS,UAAU;AAEzB,eAAO,MAAM,IAAI,MAAM,YAAY,cAAc,MAAM;AAEvD,mBAAW,MAAM;AACf,iBAAO,MAAM,IAAI,MAAM,YAAY;AAAA,QACpC,GAAE,CAAC;AAAA,MACL;AAAA,IACJ;AAECC,QAAAA,UAAU,YAAY;AAErB,UAAI,mBAAmB,WAAW;AAC/B,eAAO,iBAAiB,QAAQ,MAAM;AACpC,oBAAU,cAAc,SAAS,oBAAoB,EAAE,KAAK,kBAAgB;AAC1E,oBAAQ,IAAI,mBAAmB,YAAY;AAAA,UACpD,CAAQ,EAAE,MAAM,uBAAqB;AAC5B,oBAAQ,IAAI,4BAA4B,iBAAiB;AAAA,UAClE,CAAQ;AAAA,QACR,CAAK;AAAA,MACD;AAEF,YAAM,gBAAgB,aAAa,QAAQ,UAAU;AAEpD,UAAI,eAAe;AACjBF,gBAAAA,MAAc,WAAW,KAAK,MAAM,aAAa;AAAA,MACtD,OAAU;AACNA,gBAAa,MAAC,sBAAsB;AAAA,MACpC;AAEF,UAAI,YAAY,OAAO;AACrB,qBAAa,QAAQ,eAAe,YAAY,KAAK;AAAA,MACtD;AAED,UAAI,KAAK,MAAO,MAAK,QAAQ;AAAA,IAC/B,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
-
import { ref, computed, onMounted, resolveComponent, openBlock, createElementBlock, createVNode, Transition, withCtx, createBlock, createCommentVNode, unref, normalizeClass, resolveDynamicComponent,
|
1
|
+
import { ref, computed, onMounted, resolveComponent, openBlock, createElementBlock, createVNode, Transition, withCtx, createBlock, createCommentVNode, unref, normalizeClass, resolveDynamicComponent, createElementVNode, Suspense } from "vue";
|
2
2
|
import { useRoute } from "vue-router";
|
3
3
|
import { state } from "../../store/globals.js";
|
4
4
|
import _sfc_main$5 from "../../../../../components/Status/Status.vue.js";
|
5
|
-
import _sfc_main$2 from "../../../../../components/Popup/Popup.
|
5
|
+
import _sfc_main$2 from "../../../../../components/Popup/Popup.vue.js";
|
6
6
|
import Loader from "../../../../../components/Loader/Loader.vue2.js";
|
7
|
+
import _sfc_main$6 from "../partials/BottomNavigationBar.vue.js";
|
7
8
|
import _sfc_main$1 from "../partials/NavigationBar.vue.js";
|
8
9
|
import _sfc_main$3 from "../partials/LocationSelection.vue.js";
|
9
10
|
import _sfc_main$4 from "../../../../orders/components/partials/ShopCart.vue.js";
|
@@ -39,7 +40,6 @@ const _sfc_main = {
|
|
39
40
|
scrollOffset.value = event.target.scrollTop;
|
40
41
|
if (scrollOffset.value > 50 && !isScrolled) {
|
41
42
|
isScrolled = true;
|
42
|
-
header.value.$el.classList.add("scrolled");
|
43
43
|
const firstRect = header.value.$el.getBoundingClientRect();
|
44
44
|
const invert = -firstRect.top;
|
45
45
|
header.value.$el.style.transform = `translateY(${invert}px)`;
|
@@ -48,7 +48,6 @@ const _sfc_main = {
|
|
48
48
|
}, 0);
|
49
49
|
} else if (scrollOffset.value <= 75 && isScrolled) {
|
50
50
|
isScrolled = false;
|
51
|
-
header.value.$el.classList.remove("scrolled");
|
52
51
|
const firstRect = header.value.$el.getBoundingClientRect();
|
53
52
|
const invert = firstRect.top;
|
54
53
|
header.value.$el.style.transform = `translateY(${invert}px)`;
|
@@ -79,8 +78,8 @@ const _sfc_main = {
|
|
79
78
|
if (page.value) show.value = true;
|
80
79
|
});
|
81
80
|
return (_ctx, _cache) => {
|
81
|
+
var _a, _b;
|
82
82
|
const _component_router_view = resolveComponent("router-view");
|
83
|
-
const _component_BottomNavigation = resolveComponent("BottomNavigation");
|
84
83
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
85
84
|
createVNode(Transition, {
|
86
85
|
name: "moveFromTop",
|
@@ -94,7 +93,7 @@ const _sfc_main = {
|
|
94
93
|
]),
|
95
94
|
_: 1
|
96
95
|
}),
|
97
|
-
unref(route).meta.header.component ? (openBlock(), createElementBlock("header", {
|
96
|
+
!_ctx.MOBILE_APP && unref(route).meta.header.component ? (openBlock(), createElementBlock("header", {
|
98
97
|
key: 0,
|
99
98
|
id: "header",
|
100
99
|
class: normalizeClass(["pd-thin gap-micro flex-justify-between flex-nowrap flex h-4r w-100 z-index-2 pos-relative pos-t-0", {
|
@@ -102,8 +101,7 @@ const _sfc_main = {
|
|
102
101
|
"t-white bg-black": headerTheme.value === "dark"
|
103
102
|
}])
|
104
103
|
}, [
|
105
|
-
|
106
|
-
key: 0,
|
104
|
+
(openBlock(), createBlock(resolveDynamicComponent(unref(route).meta.header.component), {
|
107
105
|
ref_key: "header",
|
108
106
|
ref: header,
|
109
107
|
theme: headerTheme.value,
|
@@ -117,7 +115,7 @@ const _sfc_main = {
|
|
117
115
|
})) : createCommentVNode("", true)
|
118
116
|
]),
|
119
117
|
_: 1
|
120
|
-
}, 8, ["theme", "logotype", "location"]))
|
118
|
+
}, 8, ["theme", "logotype", "location"]))
|
121
119
|
], 2)) : createCommentVNode("", true),
|
122
120
|
createVNode(Transition, {
|
123
121
|
name: "moveFromTop",
|
@@ -127,13 +125,13 @@ const _sfc_main = {
|
|
127
125
|
default: withCtx(() => [
|
128
126
|
_ctx.MOBILE_APP ? (openBlock(), createBlock(_sfc_main$1, {
|
129
127
|
key: 0,
|
130
|
-
logotype: unref(route).meta.logotype
|
131
|
-
|
132
|
-
}, null, 8, ["logotype", "style"])) : createCommentVNode("", true)
|
128
|
+
logotype: unref(route).meta.header.logotype
|
129
|
+
}, null, 8, ["logotype"])) : createCommentVNode("", true)
|
133
130
|
]),
|
134
131
|
_: 1
|
135
132
|
}),
|
136
|
-
|
133
|
+
unref(route).meta.header.location ? (openBlock(), createBlock(_sfc_main$2, {
|
134
|
+
key: 1,
|
137
135
|
onClosePopup: closeLocationPopup,
|
138
136
|
isPopupOpen: state.isOpenLocationPopup,
|
139
137
|
class: "bg-white pd-semi w-m-33r radius-big"
|
@@ -142,7 +140,7 @@ const _sfc_main = {
|
|
142
140
|
createVNode(_sfc_main$3)
|
143
141
|
]),
|
144
142
|
_: 1
|
145
|
-
}, 8, ["isPopupOpen"]),
|
143
|
+
}, 8, ["isPopupOpen"])) : createCommentVNode("", true),
|
146
144
|
createElementVNode("section", {
|
147
145
|
id: "screen",
|
148
146
|
ref: "screen",
|
@@ -181,10 +179,18 @@ const _sfc_main = {
|
|
181
179
|
}, 8, ["class"])
|
182
180
|
]),
|
183
181
|
_: 1
|
184
|
-
}))
|
182
|
+
})),
|
183
|
+
createVNode(_component_router_view, { name: "defaultBottom" }, {
|
184
|
+
default: withCtx(({ Component, route: route2 }) => [
|
185
|
+
(openBlock(), createBlock(resolveDynamicComponent(Component)))
|
186
|
+
]),
|
187
|
+
_: 1
|
188
|
+
}),
|
189
|
+
((_a = unref(route).meta.radio) == null ? void 0 : _a.page) ? (openBlock(), createBlock(resolveDynamicComponent(unref(route).meta.radio.page), { key: 0 })) : createCommentVNode("", true)
|
185
190
|
], 544),
|
186
|
-
|
187
|
-
|
191
|
+
((_b = unref(route).meta.radio) == null ? void 0 : _b.player) ? (openBlock(), createBlock(resolveDynamicComponent(unref(route).meta.radio.player), { key: 2 })) : createCommentVNode("", true),
|
192
|
+
_ctx.MOBILE_APP && unref(route).meta.title_hide ? (openBlock(), createBlock(_sfc_main$6, {
|
193
|
+
key: 3,
|
188
194
|
class: "pd-small z-index-2"
|
189
195
|
})) : createCommentVNode("", true)
|
190
196
|
]);
|
package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Client.vue.js","sources":["../../../../../../../../src/modules/globals/views/components/layouts/Client.vue"],"sourcesContent":["<template>\n\t<div id=\"app-wrapper\" class=\"pos-relative\">\n\t\t<transition name=\"moveFromTop\" appear>\n\t\t\t<Loader v-if=\"!page\" class=\"pos-fixed\"/>\n\t\t</transition>\n\n\t\t<!-- <transition name=\"moveFromTop\" mode=\"out-in\" appear> -->\n\t\t\t<header \n\t\t\t\tid=\"header\" \n\t\t\t\tv-if=\"route.meta.header.component\"\n\t\t\t\tclass=\"\n\t\t\t\t\tpd-thin \n\t\t\t\t\tgap-micro\n\t\t\t\t\tflex-justify-between\n\t\t\t\t\tflex-nowrap\n\t\t\t\t\tflex\n\t\t\t\t\th-4r\n\t\t\t\t\tw-100\n\t\t\t\t\tz-index-2 \n\t\t\t\t\tpos-relative pos-t-0\n\t\t\t\t\"\n\t\t\t\t:class=\"{\n\t\t \t\t't-black bg-white': headerTheme === 'light',\n\t\t \t\t't-white bg-black': headerTheme === 'dark' \n\t\t \t}\"\n\t\t\t>\n\t <component\n\t\t\t \tv-if=\"!MOBILE_APP\"\n\t :is=\"route.meta.header.component\"\n\t ref=\"header\" \n\t :theme=\"headerTheme\"\n\t :logotype=\"route.meta.header.logotype\"\n\t :location=\"route.meta.header.location\"\n\t >\n\t <component\n\t v-if=\"route.meta.navigation\"\n\t :is=\"route.meta.navigation\"\n\t class=\"mn-l-auto desktop-only\"\n\t />\n\t </component>\n\t\t </header>\n <!-- </transition> -->\n\n\t\t<transition name=\"moveFromTop\" mode=\"out-in\" appear>\n\t\t\t<NavigationBar\n\t\t \tv-if=\"MOBILE_APP\"\n\t\t \t:logotype=\"route.meta.logotype\"\n\t\t\t\t:style=\"MOBILE_APP === 'ios' ?'padding-top: 6rem;':''\" \n\t\t />\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\t<section \n\t\t\tid=\"screen\" \n\t\t\tref=\"screen\"\n\t\t\t@scroll=\"handleScroll\"\n\t\t\tclass=\"transition-ease-in-out h-min-100 w-100 bg-white pos-relative o-scroll\"\n\t\t>\n\t\t\t<ShopCart />\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\t\t<Suspense>\n\t\t\t\t<router-view \n\t\t\t\t\tv-slot=\"{ Component, route }\" \n\t\t\t\t\t:class=\"{'mn-b-extra': MOBILE_APP}\"\n\t\t\t\t>\n\t\t\t\t\t<Status \n\t\t\t\t\t\tv-if=\"globals.state.error.show\" \n\t\t\t\t\t\t:data=\"globals.state.error\"\n\t\t\t\t\t\tclass=\"z-index-7\" \n\t\t\t\t\t/>\n\n\n\t\t\t\t\t<transition @before-enter=\"scrollTop\" name=\"scaleTransition\" mode=\"out-in\" appear>\n\t\t \t<component \n\t\t \t\tref=\"page\" \n\t\t \t\t:is=\"Component\" \n\t\t \t\t:key=\"route.path\"\n\t\t \t/>\n\t\t \t<!-- Key пока выключил непонятно какие проблемы это вызовет -->\n\t\t \t<!-- -->\n\t\t </transition>\n\n\t\t <!-- <Footer /> -->\n\t\t\t\t</router-view>\n\t\t\t</Suspense>\n \n\t\t</section>\n\n <BottomNavigation \n v-if=\"MOBILE_APP && route.meta.title_hide\"\n class=\"pd-small z-index-2\"\n />\n\t</div>\n</template>\n\n\n\n<script setup>\n\timport { computed, ref, onMounted } from 'vue';\n\t// Router\n\timport { useRoute } from 'vue-router';\n\t// Store\n\timport * as globals from '@pf/src/modules/globals/views/store/globals';\n\t// Partials\n\timport Status from '@pf/src/components/Status/Status.vue';\n\timport Popup from '@pf/src/components/Popup/Popup.vue';\n\t// import Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'\n\timport Loader from '@pf/src/components/Loader/Loader.vue';\n\n\timport BottomNavigationBar from '@pf/src/modules/globals/views/components/partials/BottomNavigationBar.vue';\n\n\timport NavigationBar from '@pf/src/modules/globals/views/components/partials/NavigationBar.vue';\n\timport LocationSelection from '@pf/src/modules/globals/views/components/partials/LocationSelection.vue';\n\t// import Footer from '@pf/src/modules/globals/views/components/partials/Footer.vue'\n\n\timport ShopCart from '@pf/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\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 'light'\n\t\t} else {\n\t\t\treturn route.meta.header_theme || 'light'\n\t\t}\n\t})\n\tconst handleScroll = () => {\n\t scrollOffset.value = event.target.scrollTop\n\n\t if (scrollOffset.value > 50 && !isScrolled) {\n\t isScrolled = true;\n\n\t header.value.$el.classList.add('scrolled');\n\n\t const firstRect = header.value.$el.getBoundingClientRect();\n\t const invert = -firstRect.top;\n\n\t header.value.$el.style.transform = `translateY(${invert}px)`;\n\n\t // headerTheme.value - light\n\n\t setTimeout(() => {\n\t header.value.$el.style.transform = 'translateY(0)';\n\t }, 0);\n\t } else if (scrollOffset.value <= 75 && isScrolled) {\n\t isScrolled = false;\n\t header.value.$el.classList.remove('scrolled');\n\n\t const firstRect = header.value.$el.getBoundingClientRect();\n\t const invert = firstRect.top;\n\n\t header.value.$el.style.transform = `translateY(${invert}px)`;\n\n\t setTimeout(() => {\n\t header.value.$el.style.transform = 'translateY(0)';\n\t }, 0);\n\t }\n\t};\n\t/////////////////////////////\n\t// MOUNTED\n\t/////////////////////////////\n\t// if (typeof window === 'undefined') {\n\t// show.value = true\n\t// } else {\n\t// \tshow.value = false\n\t// }\n\n\tonMounted(async () => {\n\t\t \n\t\tif ('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 {\n \t\tglobals.state.isOpenLocationPopup = true;\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\">;\t\n\t.scaleIn-enter-active,\n\t.scaleIn-leave-active {\n\t\ttransform: scale(1); \n\t\ttransition: all 0.5s ease; \n\t}\n\t.scaleIn-enter-from,\n\t.scaleIn-leave-to {\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease; \n\t}\n\n\t.moveFromTop-enter-active,\n\t.moveFromTop-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.moveFromTop-enter-from,\n\t.moveFromTop-leave-to {\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\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 > section,div { transform: translateZ(-30px); transition: all 0.5s ease; }\n transform: scale(0.95);\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AErB,UAAI,mBAAmB,WAAW;AAC/B,eAAO,iBAAiB,QAAQ,MAAM;AACpC,oBAAU,cAAc,SAAS,oBAAoB,EAAE,KAAK,kBAAgB;AAC1E,oBAAQ,IAAI,mBAAmB,YAAY;AAAA,UACpD,CAAQ,EAAE,MAAM,uBAAqB;AAC5B,oBAAQ,IAAI,4BAA4B,iBAAiB;AAAA,UAClE,CAAQ;AAAA,QACR,CAAK;AAAA,MACD;AAEF,YAAM,gBAAgB,aAAa,QAAQ,UAAU;AAEpD,UAAI,eAAe;AACjBA,cAAc,WAAW,KAAK,MAAM,aAAa;AAAA,MACtD,OAAU;AACNA,cAAc,sBAAsB;AAAA,MACpC;AAEF,UAAI,YAAY,OAAO;AACrB,qBAAa,QAAQ,eAAe,YAAY,KAAK;AAAA,MACtD;AAED,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 id=\"app-wrapper\" class=\"pos-relative\">\n\t\t<transition name=\"moveFromTop\" appear>\n\t\t\t<Loader v-if=\"!page\" class=\"pos-fixed\"/>\n\t\t</transition>\n\n\t\t<header \n\t\t\tv-if=\"!MOBILE_APP && route.meta.header.component\"\n\t\t\tid=\"header\" \n\t\t\tclass=\"\n\t\t\t\tpd-thin \n\t\t\t\tgap-micro\n\t\t\t\tflex-justify-between\n\t\t\t\tflex-nowrap\n\t\t\t\tflex\n\t\t\t\th-4r\n\t\t\t\tw-100\n\t\t\t\tz-index-2 \n\t\t\t\tpos-relative pos-t-0\n\t\t\t\"\n\t\t\t:class=\"{\n\t \t\t't-black bg-white': headerTheme === 'light',\n\t \t\t't-white bg-black': headerTheme === 'dark' \n\t \t}\"\n\t\t>\n <component\n ref=\"header\" \n :is=\"route.meta.header.component\"\n :theme=\"headerTheme\"\n :logotype=\"route.meta.header.logotype\"\n :location=\"route.meta.header.location\"\n >\n <component\n v-if=\"route.meta.navigation\"\n :is=\"route.meta.navigation\"\n class=\"mn-l-auto desktop-only\"\n />\n </component>\n\t </header>\n\n\t\t<transition name=\"moveFromTop\" mode=\"out-in\" appear>\n\t\t\t<NavigationBar\n\t\t \tv-if=\"MOBILE_APP\"\n\t\t \t:logotype=\"route.meta.header.logotype\"\n\t\t />\n\t\t</transition>\n\n\t <Popup \n\t \tv-if=\"route.meta.header.location\"\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\t<section \n\t\t\tid=\"screen\" \n\t\t\tref=\"screen\"\n\t\t\t@scroll=\"handleScroll\"\n\t\t\tclass=\"transition-ease-in-out h-min-100 w-100 bg-white pos-relative o-scroll\"\n\t\t>\n\t\t\t<ShopCart />\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\t\t<Suspense>\n\t\t\t\t<router-view \n\t\t\t\t\tv-slot=\"{ Component, route }\" \n\t\t\t\t\t:class=\"{'mn-b-extra': MOBILE_APP}\"\n\t\t\t\t>\n\t\t\t\t\t<Status \n\t\t\t\t\t\tv-if=\"globals.state.error.show\" \n\t\t\t\t\t\t:data=\"globals.state.error\"\n\t\t\t\t\t\tclass=\"z-index-7\" \n\t\t\t\t\t/>\n\n\n\t\t\t\t\t<transition @before-enter=\"scrollTop\" name=\"scaleTransition\" mode=\"out-in\" appear>\n\t\t \t<component \n\t\t \t\tref=\"page\" \n\t\t \t\t:is=\"Component\" \n\t\t \t\t:key=\"route.path\"\n\t\t \t/>\n\t\t \t<!-- Key пока выключил непонятно какие проблемы это вызовет -->\n\t\t \t<!-- -->\n\t\t </transition>\n\n\t\t <!-- <Footer /> -->\n\t\t\t\t</router-view>\n\t\t\t</Suspense>\n\n\t\t\t<router-view \n\t\t\t\tname=\"defaultBottom\"\n\t\t\t\tv-slot=\"{ Component, route }\" \n\t\t\t>\n\t\t\t\t<component \n \t\t:is=\"Component\" \n \t/>\n\t\t\t</router-view>\n\n\t\t\t<component\n\t\t \tv-if=\"route.meta.radio?.page\"\n :is=\"route.meta.radio.page\"\n />\n \n\t\t</section>\n\n\t\t<component\n\t \tv-if=\"route.meta.radio?.player\"\n :is=\"route.meta.radio.player\"\n />\n\n <BottomNavigationBar \n v-if=\"MOBILE_APP && route.meta.title_hide\"\n class=\"pd-small z-index-2\"\n />\n\t</div>\n</template>\n\n\n\n<script setup>\n\timport { computed, ref, onMounted } from 'vue';\n\t// Router\n\timport { useRoute } from 'vue-router';\n\t// Store\n\timport * as globals from '@pf/src/modules/globals/views/store/globals';\n\t// Partials\n\timport Status from '@pf/src/components/Status/Status.vue';\n\timport Popup from '@pf/src/components/Popup/Popup.vue';\n\t// import Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'\n\timport Loader from '@pf/src/components/Loader/Loader.vue';\n\n\timport BottomNavigationBar from '@pf/src/modules/globals/views/components/partials/BottomNavigationBar.vue';\n\n\timport NavigationBar from '@pf/src/modules/globals/views/components/partials/NavigationBar.vue';\n\timport LocationSelection from '@pf/src/modules/globals/views/components/partials/LocationSelection.vue';\n\t// import Footer from '@pf/src/modules/globals/views/components/partials/Footer.vue'\n\n\timport ShopCart from '@pf/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\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 '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\n\t if (scrollOffset.value > 50 && !isScrolled) {\n\t isScrolled = true;\n\n\t // header.value.$el.classList.add('scrolled');\n\n\t const firstRect = header.value.$el.getBoundingClientRect();\n\t const invert = -firstRect.top;\n\n\t header.value.$el.style.transform = `translateY(${invert}px)`;\n\n\t // headerTheme.value - light\n\n\t setTimeout(() => {\n\t header.value.$el.style.transform = 'translateY(0)';\n\t }, 0);\n\t } else if (scrollOffset.value <= 75 && isScrolled) {\n\t isScrolled = false;\n\t // header.value.$el.classList.remove('scrolled');\n\n\t const firstRect = header.value.$el.getBoundingClientRect();\n\t const invert = firstRect.top;\n\n\t header.value.$el.style.transform = `translateY(${invert}px)`;\n\n\t setTimeout(() => {\n\t header.value.$el.style.transform = 'translateY(0)';\n\t }, 0);\n\t }\n\t};\n\n\tonMounted(async () => {\n\t\t \n\t\tif ('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 {\n \t\tglobals.state.isOpenLocationPopup = true;\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\">;\t\n\t.scaleIn-enter-active,\n\t.scaleIn-leave-active {\n\t\ttransform: scale(1); \n\t\ttransition: all 0.5s ease; \n\t}\n\t.scaleIn-enter-from,\n\t.scaleIn-leave-to {\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease; \n\t}\n\n\t.moveFromTop-enter-active,\n\t.moveFromTop-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.moveFromTop-enter-from,\n\t.moveFromTop-leave-to {\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\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 > section,div { transform: translateZ(-30px); transition: all 0.5s ease; }\n transform: scale(0.95);\n }\n</style>"],"names":["globals.state"],"mappings":";;;;;;;;;;;;;;;;;;AAsJE,QAAI,OAAO,IAAI,KAAK;AAEpB,UAAM,OAAO,IAAI,IAAI;AAItB,UAAM,QAAQ,SAAU;AAGxB,UAAM,cAAc,IAAI,MAAM,MAAM,WAAW;AAI/C,aAAS,qBAAqB;AAC5BA,YAAc,sBAAsB;AAAA,IACrC;AACD,aAAS,YAAW;AACnB,eAAS,eAAe,KAAK,EAAE,eAAc;AAAA,IAC7C;AAED,UAAM,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c,sBAAsB;AAAA,MACpC;AAEF,UAAI,YAAY,OAAO;AACrB,qBAAa,QAAQ,eAAe,YAAY,KAAK;AAAA,MACtD;AAED,UAAI,KAAK,MAAO,MAAK,QAAQ;AAAA,IAC/B,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.cjs
CHANGED
@@ -7,8 +7,8 @@ const globals = require("../../store/globals.cjs");
|
|
7
7
|
const shopcart = require("../../../../orders/store/shopcart.cjs");
|
8
8
|
const auth = require("../../../../auth/views/store/auth.cjs");
|
9
9
|
;/* empty css */
|
10
|
-
const Button = require("../../../../../components/Button/Button.
|
11
|
-
const Select = require("../../../../../components/Select/Select.
|
10
|
+
const Button = require("../../../../../components/Button/Button.vue2.cjs");
|
11
|
+
const Select = require("../../../../../components/Select/Select.vue.cjs");
|
12
12
|
const Checkbox = require("../../../../../components/Checkbox/Checkbox.vue.cjs");
|
13
13
|
const IconShopcart = require("../../../../icons/entities/IconShopcart.vue.cjs");
|
14
14
|
const IconProfile = require("../../../../icons/entities/IconProfile.vue.cjs");
|
package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.js
CHANGED
@@ -5,8 +5,8 @@ import { state, actions as actions$1 } from "../../store/globals.js";
|
|
5
5
|
import { actions, getters } from "../../../../orders/store/shopcart.js";
|
6
6
|
import { state as state$1 } from "../../../../auth/views/store/auth.js";
|
7
7
|
/* empty css */
|
8
|
-
import _sfc_main$2 from "../../../../../components/Button/Button.
|
9
|
-
import Select from "../../../../../components/Select/Select.
|
8
|
+
import _sfc_main$2 from "../../../../../components/Button/Button.vue2.js";
|
9
|
+
import Select from "../../../../../components/Select/Select.vue.js";
|
10
10
|
import _sfc_main$1 from "../../../../../components/Checkbox/Checkbox.vue.js";
|
11
11
|
import _sfc_main$3 from "../../../../icons/entities/IconShopcart.vue.js";
|
12
12
|
import _sfc_main$4 from "../../../../icons/entities/IconProfile.vue.js";
|
@@ -5,7 +5,7 @@ const vueRouter = require("vue-router");
|
|
5
5
|
const vueI18n = require("vue-i18n");
|
6
6
|
const IconShopcart = require("../../../../icons/entities/IconShopcart.vue.cjs");
|
7
7
|
const IconProfile = require("../../../../icons/entities/IconProfile.vue.cjs");
|
8
|
-
const Button = require("../../../../../components/Button/Button.
|
8
|
+
const Button = require("../../../../../components/Button/Button.vue2.cjs");
|
9
9
|
require("../../store/globals.cjs");
|
10
10
|
const shopcart = require("../../../../orders/store/shopcart.cjs");
|
11
11
|
const auth = require("../../../../auth/views/store/auth.cjs");
|
package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.js
CHANGED
@@ -3,7 +3,7 @@ import { useRouter, useRoute } from "vue-router";
|
|
3
3
|
import { useI18n } from "vue-i18n";
|
4
4
|
import _sfc_main$2 from "../../../../icons/entities/IconShopcart.vue.js";
|
5
5
|
import _sfc_main$3 from "../../../../icons/entities/IconProfile.vue.js";
|
6
|
-
import _sfc_main$1 from "../../../../../components/Button/Button.
|
6
|
+
import _sfc_main$1 from "../../../../../components/Button/Button.vue2.js";
|
7
7
|
import "../../store/globals.js";
|
8
8
|
import { actions, getters } from "../../../../orders/store/shopcart.js";
|
9
9
|
import { state } from "../../../../auth/views/store/auth.js";
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
|
-
const Tab = require("../../../../../components/Tab/Tab.
|
4
|
+
const Tab = require("../../../../../components/Tab/Tab.vue2.cjs");
|
5
5
|
const _hoisted_1 = { class: "pd-medium flex-v-center flex-nowrap flex" };
|
6
6
|
const _hoisted_2 = { class: "mn-r-auto" };
|
7
7
|
const _hoisted_3 = ["onClick"];
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, Fragment, renderList, createBlock, normalizeClass, withCtx, createTextVNode, createCommentVNode } from "vue";
|
2
|
-
import _sfc_main$1 from "../../../../../components/Tab/Tab.
|
2
|
+
import _sfc_main$1 from "../../../../../components/Tab/Tab.vue2.js";
|
3
3
|
const _hoisted_1 = { class: "pd-medium flex-v-center flex-nowrap flex" };
|
4
4
|
const _hoisted_2 = { class: "mn-r-auto" };
|
5
5
|
const _hoisted_3 = ["onClick"];
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
3
|
const vue = require("vue");
|
4
|
+
const index = require("../../../../../node_modules/@capacitor/preferences/dist/esm/index.cjs");
|
4
5
|
const state = vue.reactive({
|
5
6
|
loading: false,
|
6
7
|
isOpenLocationPopup: false,
|
@@ -24,10 +25,18 @@ const actions = {
|
|
24
25
|
state.loading = status;
|
25
26
|
},
|
26
27
|
// Black/White Theme
|
27
|
-
|
28
|
+
async setTheme(isDarkMode) {
|
28
29
|
let root = document.querySelector(":root");
|
29
|
-
state.theme.darkmode =
|
30
|
-
|
30
|
+
state.theme.darkmode = isDarkMode;
|
31
|
+
await index.Preferences.set({
|
32
|
+
key: "darkmode",
|
33
|
+
value: JSON.stringify(state.theme.darkmode)
|
34
|
+
});
|
35
|
+
if (isDarkMode) {
|
36
|
+
root.classList.add("dark-theme");
|
37
|
+
} else {
|
38
|
+
root.classList.remove("dark-theme");
|
39
|
+
}
|
31
40
|
const variableNames = [
|
32
41
|
"--white",
|
33
42
|
"--light",
|
@@ -42,7 +51,50 @@ const actions = {
|
|
42
51
|
state.theme.originalColors[variableName] = currentColor;
|
43
52
|
});
|
44
53
|
}
|
45
|
-
|
54
|
+
if (isDarkMode) {
|
55
|
+
invertColors(variableNames, state.theme.originalColors);
|
56
|
+
} else {
|
57
|
+
variableNames.forEach((variableName) => {
|
58
|
+
document.documentElement.style.setProperty(variableName, state.theme.originalColors[variableName]);
|
59
|
+
});
|
60
|
+
}
|
61
|
+
},
|
62
|
+
setTheme(isDarkMode) {
|
63
|
+
let root = document.querySelector(":root");
|
64
|
+
state.theme.darkmode = isDarkMode;
|
65
|
+
index.Preferences.set({
|
66
|
+
key: "darkmode",
|
67
|
+
value: JSON.stringify(state.theme.darkmode)
|
68
|
+
});
|
69
|
+
if (isDarkMode) {
|
70
|
+
root.classList.add("dark-theme");
|
71
|
+
} else {
|
72
|
+
root.classList.remove("dark-theme");
|
73
|
+
}
|
74
|
+
const variableNames = [
|
75
|
+
"--white",
|
76
|
+
"--light",
|
77
|
+
"--grey",
|
78
|
+
"--dark",
|
79
|
+
"--black"
|
80
|
+
];
|
81
|
+
if (!state.theme.originalColors) {
|
82
|
+
state.theme.originalColors = {};
|
83
|
+
variableNames.forEach((variableName) => {
|
84
|
+
const currentColor = getComputedStyle(document.documentElement).getPropertyValue(variableName).trim();
|
85
|
+
state.theme.originalColors[variableName] = currentColor;
|
86
|
+
});
|
87
|
+
}
|
88
|
+
if (isDarkMode) {
|
89
|
+
invertColors(variableNames, state.theme.originalColors);
|
90
|
+
} else {
|
91
|
+
variableNames.forEach((variableName) => {
|
92
|
+
document.documentElement.style.setProperty(variableName, state.theme.originalColors[variableName]);
|
93
|
+
});
|
94
|
+
}
|
95
|
+
},
|
96
|
+
toggleTheme() {
|
97
|
+
this.setTheme(!state.theme.darkmode);
|
46
98
|
},
|
47
99
|
add(array, item) {
|
48
100
|
const existingItemIndex = array.findIndex((i) => i._id === item._id);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"globals.cjs","sources":["../../../../../../../src/modules/globals/views/store/globals.js"],"sourcesContent":["// Vue modules\nimport { reactive, computed } from \"vue\";\n\n// import i18n from \"@/localization\";\n\n// State\nconst state = reactive({\n loading: false,\n\n isOpenLocationPopup: false,\n isOpenSidebar: false,\n\n position: null,\n search: null,\n\n theme: {\n darkmode: false\n },\n\n error: {\n status: \"\",\n headers: \"\",\n data: \"\",\n show: \"\",\n name: \"\",\n message: \"\"\n }\n});\n\n// Actions\nconst actions = {\n setLoading(status) {\n state.loading = status\n },\n\n // Black/White Theme\n toggleTheme() {\n let root = document.querySelector(\":root\");\n\n state.theme.darkmode = !state.theme.darkmode\n\n root.classList.toggle('dark-theme');\n\n const variableNames = [\n '--white',\n '--light',\n '--grey',\n '--dark',\n '--black'\n ];\n\n // Проверяем, сохранены ли оригинальные цвета\n if (!state.theme.originalColors) {\n // Сохраняем оригинальные цвета\n state.theme.originalColors = {};\n\n variableNames.forEach(variableName => {\n const currentColor = getComputedStyle(document.documentElement).getPropertyValue(variableName).trim();\n state.theme.originalColors[variableName] = currentColor;\n });\n }\n\n invertColors(variableNames, state.theme.originalColors);\n },\n\n add(array, item) {\n const existingItemIndex = array.findIndex(i => i._id === item._id);\n\n if (existingItemIndex === -1) {\n array.push(item);\n } else {\n array[existingItemIndex] = item\n }\n },\n update(array, item) {\n const existingItemIndex = array.findIndex(i => i._id === item._id);\n if (existingItemIndex === -1) {\n // If the item doesn't exist, push it to the array\n array.push(item);\n } else {\n // Update the item in the array without creating a new array\n Object.assign(array[existingItemIndex], item);\n }\n },\n delete(array, item) {\n const existingItemIndex = array.findIndex(c => c._id === item._id);\n\n if (existingItemIndex !== -1) {\n array.splice(existingItemIndex, 1);\n }\n }, \n\n\n increment(array, item) {\n console.log(array)\n console.log(item)\n const arrayItem = array.find(\n (i) => i._id === item._id\n );\n\n if (arrayItem) {\n arrayItem.quantity++;\n }\n },\n\n decrement(array, item) {\n const arrayItem = array.find(\n (i) => i._id === item._id\n );\n\n const arrayItemIndex = array.indexOf(arrayItem);\n \n if (arrayItemIndex > -1) {\n arrayItem.quantity--;\n \n if (arrayItem.quantity < 1) array.splice(arrayItemIndex, 1);\n }\n },\n\n reset(array) {\n array = [];\n },\n}\n\nconst errorMessages = {\n ru: {\n \"errors\": {\n \"USER_ALREADY_REGISTERED\": \"Такой пользователь уже зарегистрирован!\",\n \"USER_NOT_REGISTERED_YET\": \"Такой пользователь еще не зарегистрирован!\",\n \"USER_PHONE_OR_PASSWORD_NOT_FOUND\": \"Пользователь с таким телефоном или паролем не найден!\",\n \"INCORRECT_PASSWORD_ENTERED\": \"Вы ввели неверный пароль!\",\n \"INVALID_INVITATION_CODE\": \"Неверный код приглашения\",\n \"MISSING_REQUIRED_PARAMETERS\": \"Отсутствуют необходимые параметры.\",\n \"ERROR_UPDATING_USER\": \"Произошла ошибка при обновлении пользователя.\",\n \"PASSWORDS_DO_NOT_MATCH\": \"Введенные вами пароли не совпадают. Исправьте ошибки и попробуйте еще раз.\",\n \"CODE_NOT_SENT\": \"Что-то пошло не так и код не был отправлен. Попробуйте еще раз.\",\n \"INPUT_ERROR\": \"Вставьте только четырехзначный код.\",\n \"WRONG_CODE\": \"Вы ввели неверный код. Попробуйте еще раз.\",\n \"POST_URL_ALREADY_IN_USE\": \"Ошибка! Публикация с этим URL уже используется!\",\n \"NAME_CANNOT_BE_EMPTY\": \"Ошибка: Название не может быть пустым. Пожалуйста, введите название.\"\n }\n },\n en: {\n \"errors\": {\n \"USER_ALREADY_REGISTERED\": \"Such user is already registered!\",\n \"USER_NOT_REGISTERED_YET\": \"This user has not been registered yet!\",\n \"USER_PHONE_OR_PASSWORD_NOT_FOUND\": \"User with such phone or password not found!\",\n \"INCORRECT_PASSWORD_ENTERED\": \"You entered an incorrect password!\",\n \"INVALID_INVITATION_CODE\": \"Incorrect invitation code.\",\n \"MISSING_REQUIRED_PARAMETERS\": \"Missing required parameters.\",\n \"ERROR_UPDATING_USER\": \"Something wrong when updating user.\",\n \"PASSWORDS_DO_NOT_MATCH\": \"The passwords you entered do not match. Please correct the errors and try again.\",\n \"CODE_NOT_SENT\": \"Something went wrong and the code was not sent. Please try again.\",\n \"INPUT_ERROR\": \"Please enter only a four-digit code.\",\n \"WRONG_CODE\": \"You entered an incorrect code. Please try again.\",\n \"POST_URL_ALREADY_IN_USE\": \"Failed! Blogpost with this URL is already in use!\",\n \"NAME_CANNOT_BE_EMPTY\": \"Error: Name cannot be empty. Please enter a name.\"\n }\n }\n};\n\n// i18n.global.mergeLocaleMessage('ru', errorMessages.ru);\n// i18n.global.mergeLocaleMessage('en', errorMessages.en);\n\n// Mutations\nfunction setError(error) {\n let errorData \n\n errorData = error\n\n if (error?.response?.data) errorData = error.response.data\n\n if (error && errorData.errorCode) {\n state.error.message = i18n.global.t(`errors.${errorData.errorCode}`);\n } else {\n state.error.message = errorData.message || \"Unknown error\";\n }\n\n state.error.show = true;\n\n setTimeout(() => state.error.show = false, 3000);\n}\n\nfunction invertColors(variableNames, originalColors) {\n variableNames.forEach(variableName => {\n const baseColor = originalColors[variableName];\n const colorArray = baseColor.split(',').map(Number);\n\n let invertedColor;\n\n if (variableName === '--white') {\n invertedColor = colorArray.map(value => 255 - value / 1.075);\n } else if (variableName === '--black') {\n invertedColor = colorArray.map(value => 255 - value); \n } else if (variableName === '--grey') {\n invertedColor = colorArray.map(value => 255 - value * 2);\n } else {\n invertedColor = colorArray.map(value => 255 - value / 1.075);\n }\n // Устанавливаем новые значения переменных CSS\n document.documentElement.style.setProperty(variableName, state.theme.darkmode ? invertedColor.join(', ') : baseColor );\n });\n}\n\nexport {\n state,\n actions,\n setError,\n}"],"names":["reactive"],"mappings":";;;AAMK,MAAC,QAAQA,IAAAA,SAAS;AAAA,EACrB,SAAS;AAAA,EAET,qBAAqB;AAAA,EACrB,eAAe;AAAA,EAEf,UAAU;AAAA,EACV,QAAQ;AAAA,EAER,OAAO;AAAA,IACL,UAAU;AAAA,EACX;AAAA,EAED,OAAO;AAAA,IACL,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACV;AACH,CAAC;AAGI,MAAC,UAAU;AAAA,EACd,WAAW,QAAQ;AACjB,UAAM,UAAU;AAAA,EACjB;AAAA;AAAA,EAGD,cAAc;AACZ,QAA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AAM,YAAY,cAAc,MAAM,MAAM,WAAW,cAAc,KAAK,IAAI,IAAI,SAAS;AAAA,EACxH,CAAG;AACH;;;;"}
|
1
|
+
{"version":3,"file":"globals.cjs","sources":["../../../../../../../src/modules/globals/views/store/globals.js"],"sourcesContent":["// Vue modules\nimport { reactive, computed } from \"vue\";\nimport { Preferences } from '@capacitor/preferences';\n\n// import i18n from \"@/localization\";\n\n// State\nconst state = reactive({\n loading: false,\n\n isOpenLocationPopup: false,\n isOpenSidebar: false,\n\n position: null,\n search: null,\n\n theme: {\n darkmode: false\n },\n\n error: {\n status: \"\",\n headers: \"\",\n data: \"\",\n show: \"\",\n name: \"\",\n message: \"\"\n }\n});\n\n// Actions\nconst actions = {\n setLoading(status) {\n state.loading = status\n },\n\n // Black/White Theme\n async setTheme(isDarkMode) {\n let root = document.querySelector(\":root\");\n \n state.theme.darkmode = isDarkMode;\n await Preferences.set({\n key: 'darkmode',\n value: JSON.stringify(state.theme.darkmode),\n });\n \n if (isDarkMode) {\n root.classList.add('dark-theme');\n } else {\n root.classList.remove('dark-theme');\n }\n\n const variableNames = [\n '--white',\n '--light',\n '--grey',\n '--dark',\n '--black'\n ];\n\n // Проверяем, сохранены ли оригинальные цвета\n if (!state.theme.originalColors) {\n // Сохраняем оригинальные цвета\n state.theme.originalColors = {};\n variableNames.forEach(variableName => {\n const currentColor = getComputedStyle(document.documentElement).getPropertyValue(variableName).trim();\n state.theme.originalColors[variableName] = currentColor;\n });\n }\n\n if (isDarkMode) {\n invertColors(variableNames, state.theme.originalColors);\n } else {\n // Восстанавливаем оригинальные цвета\n variableNames.forEach(variableName => {\n document.documentElement.style.setProperty(variableName, state.theme.originalColors[variableName]);\n });\n }\n },\n\n setTheme(isDarkMode) {\n let root = document.querySelector(\":root\");\n state.theme.darkmode = isDarkMode;\n \n Preferences.set({\n key: 'darkmode',\n value: JSON.stringify(state.theme.darkmode),\n });\n \n if (isDarkMode) {\n root.classList.add('dark-theme');\n } else {\n root.classList.remove('dark-theme');\n }\n\n const variableNames = [\n '--white',\n '--light',\n '--grey',\n '--dark',\n '--black'\n ];\n\n // Проверяем, сохранены ли оригинальные цвета\n if (!state.theme.originalColors) {\n // Сохраняем оригинальные цвета\n state.theme.originalColors = {};\n variableNames.forEach(variableName => {\n const currentColor = getComputedStyle(document.documentElement).getPropertyValue(variableName).trim();\n state.theme.originalColors[variableName] = currentColor;\n });\n }\n\n if (isDarkMode) {\n invertColors(variableNames, state.theme.originalColors);\n } else {\n // Возвращаем оригинальные цвета\n variableNames.forEach(variableName => {\n document.documentElement.style.setProperty(variableName, state.theme.originalColors[variableName]);\n });\n }\n },\n\n toggleTheme() {\n this.setTheme(!state.theme.darkmode);\n },\n\n add(array, item) {\n const existingItemIndex = array.findIndex(i => i._id === item._id);\n\n if (existingItemIndex === -1) {\n array.push(item);\n } else {\n array[existingItemIndex] = item\n }\n },\n\n update(array, item) {\n const existingItemIndex = array.findIndex(i => i._id === item._id);\n if (existingItemIndex === -1) {\n // If the item doesn't exist, push it to the array\n array.push(item);\n } else {\n // Update the item in the array without creating a new array\n Object.assign(array[existingItemIndex], item);\n }\n },\n\n delete(array, item) {\n const existingItemIndex = array.findIndex(c => c._id === item._id);\n\n if (existingItemIndex !== -1) {\n array.splice(existingItemIndex, 1);\n }\n }, \n\n increment(array, item) {\n console.log(array)\n console.log(item)\n const arrayItem = array.find(\n (i) => i._id === item._id\n );\n\n if (arrayItem) {\n arrayItem.quantity++;\n }\n },\n\n decrement(array, item) {\n const arrayItem = array.find(\n (i) => i._id === item._id\n );\n\n const arrayItemIndex = array.indexOf(arrayItem);\n \n if (arrayItemIndex > -1) {\n arrayItem.quantity--;\n \n if (arrayItem.quantity < 1) array.splice(arrayItemIndex, 1);\n }\n },\n\n reset(array) {\n array = [];\n },\n}\n\nconst errorMessages = {\n ru: {\n \"errors\": {\n \"USER_ALREADY_REGISTERED\": \"Такой пользователь уже зарегистрирован!\",\n \"USER_NOT_REGISTERED_YET\": \"Такой пользователь еще не зарегистрирован!\",\n \"USER_PHONE_OR_PASSWORD_NOT_FOUND\": \"Пользователь с таким телефоном или паролем не найден!\",\n \"INCORRECT_PASSWORD_ENTERED\": \"Вы ввели неверный пароль!\",\n \"INVALID_INVITATION_CODE\": \"Неверный код приглашения\",\n \"MISSING_REQUIRED_PARAMETERS\": \"Отсутствуют необходимые параметры.\",\n \"ERROR_UPDATING_USER\": \"Произошла ошибка при обновлении пользователя.\",\n \"PASSWORDS_DO_NOT_MATCH\": \"Введенные вами пароли не совпадают. Исправьте ошибки и попробуйте еще раз.\",\n \"CODE_NOT_SENT\": \"Что-то пошло не так и код не был отправлен. Попробуйте еще раз.\",\n \"INPUT_ERROR\": \"Вставьте только четырехзначный код.\",\n \"WRONG_CODE\": \"Вы ввели неверный код. Попробуйте еще раз.\",\n \"POST_URL_ALREADY_IN_USE\": \"Ошибка! Публикация с этим URL уже используется!\",\n \"NAME_CANNOT_BE_EMPTY\": \"Ошибка: Название не может быть пустым. Пожалуйста, введите название.\"\n }\n },\n en: {\n \"errors\": {\n \"USER_ALREADY_REGISTERED\": \"Such user is already registered!\",\n \"USER_NOT_REGISTERED_YET\": \"This user has not been registered yet!\",\n \"USER_PHONE_OR_PASSWORD_NOT_FOUND\": \"User with such phone or password not found!\",\n \"INCORRECT_PASSWORD_ENTERED\": \"You entered an incorrect password!\",\n \"INVALID_INVITATION_CODE\": \"Incorrect invitation code.\",\n \"MISSING_REQUIRED_PARAMETERS\": \"Missing required parameters.\",\n \"ERROR_UPDATING_USER\": \"Something wrong when updating user.\",\n \"PASSWORDS_DO_NOT_MATCH\": \"The passwords you entered do not match. Please correct the errors and try again.\",\n \"CODE_NOT_SENT\": \"Something went wrong and the code was not sent. Please try again.\",\n \"INPUT_ERROR\": \"Please enter only a four-digit code.\",\n \"WRONG_CODE\": \"You entered an incorrect code. Please try again.\",\n \"POST_URL_ALREADY_IN_USE\": \"Failed! Blogpost with this URL is already in use!\",\n \"NAME_CANNOT_BE_EMPTY\": \"Error: Name cannot be empty. Please enter a name.\"\n }\n }\n};\n\n// i18n.global.mergeLocaleMessage('ru', errorMessages.ru);\n// i18n.global.mergeLocaleMessage('en', errorMessages.en);\n\n// Mutations\nfunction setError(error) {\n let errorData \n\n errorData = error\n\n if (error?.response?.data) errorData = error.response.data\n\n if (error && errorData.errorCode) {\n state.error.message = i18n.global.t(`errors.${errorData.errorCode}`);\n } else {\n state.error.message = errorData.message || \"Unknown error\";\n }\n\n state.error.show = true;\n\n setTimeout(() => state.error.show = false, 3000);\n}\n\nfunction invertColors(variableNames, originalColors) {\n variableNames.forEach(variableName => {\n const baseColor = originalColors[variableName];\n const colorArray = baseColor.split(',').map(Number);\n\n let invertedColor;\n\n if (variableName === '--white') {\n invertedColor = colorArray.map(value => 255 - value / 1.075);\n } else if (variableName === '--black') {\n invertedColor = colorArray.map(value => 255 - value); \n } else if (variableName === '--grey') {\n invertedColor = colorArray.map(value => 255 - value * 2);\n } else {\n invertedColor = colorArray.map(value => 255 - value / 1.075);\n }\n // Устанавливаем новые значения переменных CSS\n document.documentElement.style.setProperty(variableName, state.theme.darkmode ? invertedColor.join(', ') : baseColor );\n });\n}\n\nexport {\n state,\n actions,\n setError,\n}"],"names":["reactive","Preferences"],"mappings":";;;;AAOK,MAAC,QAAQA,IAAAA,SAAS;AAAA,EACrB,SAAS;AAAA,EAET,qBAAqB;AAAA,EACrB,eAAe;AAAA,EAEf,UAAU;AAAA,EACV,QAAQ;AAAA,EAER,OAAO;AAAA,IACL,UAAU;AAAA,EACX;AAAA,EAED,OAAO;AAAA,IACL,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACV;AACH,CAAC;AAGI,MAAC,UAAU;AAAA,EACd,WAAW,QAAQ;AACjB,UAAM,UAAU;AAAA,EACjB;AAAA;AAAA,EAGD,MAAM,SAAS,YAAY;AACzB,QAAI,OAAO,SAAS,cAAc,OAAO;AAEzC,UAAM,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