cloudcommerce 2.2.3 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/test-apps.yml +3 -3
- package/CHANGELOG.md +29 -0
- package/action.yml +6 -6
- package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
- package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/barra-doce/package.json +2 -2
- package/package.json +2 -2
- package/packages/api/package.json +1 -1
- package/packages/apps/affiliate-program/package.json +1 -1
- package/packages/apps/correios/package.json +1 -1
- package/packages/apps/custom-payment/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/datafrete/package.json +1 -1
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/emails/package.json +1 -1
- package/packages/apps/fb-conversions/package.json +1 -1
- package/packages/apps/flash-courier/package.json +1 -1
- package/packages/apps/frenet/package.json +1 -1
- package/packages/apps/galaxpay/package.json +1 -1
- package/packages/apps/google-analytics/package.json +1 -1
- package/packages/apps/jadlog/package.json +1 -1
- package/packages/apps/loyalty-points/package.json +1 -1
- package/packages/apps/mandae/package.json +1 -1
- package/packages/apps/melhor-envio/package.json +1 -1
- package/packages/apps/mercadopago/package.json +1 -1
- package/packages/apps/pagarme/package.json +1 -1
- package/packages/apps/pagarme-v5/package.json +1 -1
- package/packages/apps/paghiper/package.json +1 -1
- package/packages/apps/pix/package.json +1 -1
- package/packages/apps/tiny-erp/package.json +1 -1
- package/packages/apps/webhooks/package.json +1 -1
- package/packages/cli/ci/bunny-config-base.sh +4 -2
- package/packages/cli/config/firestore.rules +3 -0
- package/packages/cli/package.json +1 -1
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +1 -1
- package/packages/eslint/package.json +1 -1
- package/packages/events/package.json +1 -1
- package/packages/feeds/package.json +1 -1
- package/packages/firebase/package.json +1 -1
- package/packages/i18n/package.json +1 -1
- package/packages/modules/lib/firebase/handle-module.js +28 -7
- package/packages/modules/lib/firebase/handle-module.js.map +1 -1
- package/packages/modules/package.json +1 -1
- package/packages/modules/src/firebase/handle-module.ts +37 -9
- package/packages/passport/package.json +1 -1
- package/packages/ssr/lib/lib/cron-ssr-save-views.js +17 -5
- package/packages/ssr/lib/lib/cron-ssr-save-views.js.map +1 -1
- package/packages/ssr/package.json +3 -3
- package/packages/ssr/src/lib/cron-ssr-save-views.ts +17 -8
- package/packages/storefront/dist/client/_astro/AccountPage.3-eqV6OR.js +1 -0
- package/packages/storefront/dist/client/_astro/CartSidebar.-Gy6eqIy.js +1 -0
- package/packages/storefront/dist/client/_astro/HeroSlider.ju9TsLrJ.js +1 -0
- package/packages/storefront/dist/client/_astro/PitchBar.yqD9ycx5.js +1 -0
- package/packages/storefront/dist/client/_astro/Prices.xI1rdM1e.js +1 -0
- package/packages/storefront/dist/client/_astro/ProductDetails.ATGXfGhG.js +7 -0
- package/packages/storefront/dist/client/_astro/ProductShelf.b77WjhZZ.js +1 -0
- package/packages/storefront/dist/client/_astro/ProductShelf.qbTNzuvn.js +1 -0
- package/packages/storefront/dist/client/_astro/QuantitySelector.v7L8EYOR.js +1 -0
- package/packages/storefront/dist/client/_astro/SearchModal.WzDMBjqi.js +1 -0
- package/packages/storefront/dist/client/_astro/SearchShowcase.9gIA4Cq0.js +1 -0
- package/packages/storefront/dist/client/_astro/ShopHeader.Ee4OJr3q.js +7 -0
- package/packages/storefront/dist/client/_astro/{_plugin-vue_export-helper.SO-0jCqa.js → _plugin-vue_export-helper.xATGHWd9.js} +2 -2
- package/packages/storefront/dist/client/_astro/{_slug_.4W7qhV-L.css → _slug_.WkuZ8tvp.css} +1 -1
- package/packages/storefront/dist/client/_astro/afetch.OifQZgwR.js +1 -0
- package/packages/storefront/dist/client/_astro/client.YJ00ta5M.js +1 -0
- package/packages/storefront/dist/client/_astro/customer-session.dSYHWdP4.js +7 -0
- package/packages/storefront/dist/client/_astro/format-money.1_HtF5S2.js +1 -0
- package/packages/storefront/dist/client/_astro/grid-title.pK2Nn3i-.js +1 -0
- package/packages/storefront/dist/client/_astro/hoisted.d2SGwVMl.js +1 -0
- package/packages/storefront/dist/client/_astro/hoisted.x1b7VHef.js +1 -0
- package/packages/storefront/dist/client/_astro/hoisted.xTPkED8g.js +1 -0
- package/packages/storefront/dist/client/_astro/i18n.zhlBzJt8.js +1 -0
- package/packages/storefront/dist/client/_astro/img.AnjeGdy_.js +1 -0
- package/packages/storefront/dist/client/_astro/index.KfrHdfOH.js +1 -0
- package/packages/storefront/dist/client/_astro/index.ShNlAyu1.js +1 -0
- package/packages/storefront/dist/client/_astro/modules-info.HP6478mG.js +1 -0
- package/packages/storefront/dist/client/_astro/name.VA3MEpe0.js +1 -0
- package/packages/storefront/dist/client/_astro/server-data.4C60Esyt.js +1 -0
- package/packages/storefront/dist/client/_astro/sf-utils.c42cbZ9W.js +13 -0
- package/packages/storefront/dist/client/_astro/shopping-cart.v-dB3kHB.js +1 -0
- package/packages/storefront/dist/client/_astro/use-analytics._ef6TM4P.js +1 -0
- package/packages/storefront/dist/client/_astro/use-product-card.nNtSJVtB.js +1 -0
- package/packages/storefront/dist/client/_astro/use-text-value.0OP9HCfP.js +4 -0
- package/packages/storefront/dist/client/{~fallback/index.html → ~fallback.html} +5 -5
- package/packages/storefront/dist/client/{index.html → ~index.html} +7 -7
- package/packages/storefront/dist/server/_noop-middleware.mjs +3 -0
- package/packages/storefront/dist/server/chunks/{CartSidebar_yYIzwp_R.mjs → CartSidebar_blvgfFa-.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{SearchModal_GvRUZ6ce.mjs → SearchModal_Sktaq643.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/_.._yTK2xBRC.mjs +5 -0
- package/packages/storefront/dist/server/chunks/_page__9PfWVh79.mjs +5 -0
- package/packages/storefront/dist/server/chunks/account_R4bpY7O1.mjs +5 -0
- package/packages/storefront/dist/server/chunks/astro/{assets-service_yXRChsFH.mjs → assets-service_oQ4-9MNg.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{astro_F4pl3toV.mjs → astro_ECsNQeA2.mjs} +18 -14
- package/packages/storefront/dist/server/chunks/index__PeYBuja.mjs +5 -0
- package/packages/storefront/dist/server/chunks/node_njrZIjT6.mjs +5 -0
- package/packages/storefront/dist/server/chunks/pages/{__z8Igc_-f.mjs → __XOsz50la.mjs} +994 -922
- package/packages/storefront/dist/server/chunks/pages/{_page__-V1Q-Ymk.mjs → _page__cIw_KTpN.mjs} +14 -12
- package/packages/storefront/dist/server/chunks/pages/{account_frSUn7gD.mjs → account_l-FHyDJd.mjs} +3 -2
- package/packages/storefront/dist/server/chunks/pages/{index_QqJiJpFy.mjs → index_KP7Gn0ld.mjs} +3 -2
- package/packages/storefront/dist/server/chunks/pages/{node_FoDIj_f7.mjs → node_FoLtkdH1.mjs} +4 -4
- package/packages/storefront/dist/server/chunks/pages/{~fallback_t0lNhRm9.mjs → ~fallback_KPp6Nh_p.mjs} +3 -2
- package/packages/storefront/dist/server/chunks/~fallback_p7P7NIL5.mjs +5 -0
- package/packages/storefront/dist/server/entry.mjs +289 -166
- package/packages/storefront/dist/server/manifest_E6KbHQrT.mjs +202 -0
- package/packages/storefront/dist/server/renderers.mjs +1 -1
- package/packages/storefront/dist/server/static-builds.csv +34 -34
- package/packages/storefront/package.json +3 -3
- package/packages/storefront/src/helpers/afetch.ts +22 -5
- package/packages/storefront/src/lib/composables/use-pagination.ts +1 -1
- package/packages/storefront/src/lib/composables/use-shipping-calculator.ts +273 -0
- package/packages/storefront/src/lib/scripts/git-cms-auth.ts +3 -0
- package/packages/storefront/src/lib/scripts/push-analytics-events.ts +7 -2
- package/packages/storefront/src/lib/scripts/sso-ecom.ts +0 -0
- package/packages/storefront/src/lib/ssr-context.ts +3 -1
- package/packages/storefront/src/lib/state/modules-info.ts +34 -10
- package/packages/test-base/package.json +1 -1
- package/packages/types/index.ts +82 -53
- package/packages/types/package.json +1 -1
- package/packages/storefront/dist/client/_astro/AccountPage.HcKW6HTE.js +0 -1
- package/packages/storefront/dist/client/_astro/CartSidebar.osvr0MUo.js +0 -1
- package/packages/storefront/dist/client/_astro/HeroSlider.I5mC8JdX.js +0 -1
- package/packages/storefront/dist/client/_astro/PitchBar.xC4J7MDy.js +0 -1
- package/packages/storefront/dist/client/_astro/Prices.Jt09rVKv.js +0 -1
- package/packages/storefront/dist/client/_astro/ProductDetails.oouZY3cL.js +0 -7
- package/packages/storefront/dist/client/_astro/ProductShelf.dYlXuNId.js +0 -1
- package/packages/storefront/dist/client/_astro/ProductShelf.vGE0E3Qf.js +0 -1
- package/packages/storefront/dist/client/_astro/QuantitySelector.OL4MN-C_.js +0 -1
- package/packages/storefront/dist/client/_astro/SearchModal.d8lbvLay.js +0 -1
- package/packages/storefront/dist/client/_astro/SearchShowcase.ynowXX4j.js +0 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.l4KJGvUd.js +0 -7
- package/packages/storefront/dist/client/_astro/afetch.5c8VmT0-.js +0 -1
- package/packages/storefront/dist/client/_astro/client.ZhEmw4hZ.js +0 -1
- package/packages/storefront/dist/client/_astro/customer-session.TRPGDX3c.js +0 -7
- package/packages/storefront/dist/client/_astro/format-money.iK5LGydz.js +0 -1
- package/packages/storefront/dist/client/_astro/grid-title.vGKBy72g.js +0 -1
- package/packages/storefront/dist/client/_astro/hoisted.8pwSenCN.js +0 -1
- package/packages/storefront/dist/client/_astro/hoisted.SLwcAI01.js +0 -1
- package/packages/storefront/dist/client/_astro/hoisted.gqV7f6f3.js +0 -1
- package/packages/storefront/dist/client/_astro/i18n.Lxnz1oF-.js +0 -1
- package/packages/storefront/dist/client/_astro/img.WnsidxCx.js +0 -1
- package/packages/storefront/dist/client/_astro/index.R7A-Pg5V.js +0 -1
- package/packages/storefront/dist/client/_astro/index.q6KIyKlJ.js +0 -1
- package/packages/storefront/dist/client/_astro/modules-info.WWsUqEPZ.js +0 -1
- package/packages/storefront/dist/client/_astro/name.urFqJ5yn.js +0 -1
- package/packages/storefront/dist/client/_astro/runtime-core.esm-bundler.XTSAdOlw.js +0 -13
- package/packages/storefront/dist/client/_astro/sf-utils.luvTU5uS.js +0 -1
- package/packages/storefront/dist/client/_astro/shopping-cart.ATTXCPd0.js +0 -1
- package/packages/storefront/dist/client/_astro/use-analytics.WpkjGsWi.js +0 -1
- package/packages/storefront/dist/client/_astro/use-product-card.BhUXhJIp.js +0 -1
- package/packages/storefront/dist/client/_astro/use-text-value.XE_A2nDM.js +0 -4
- package/packages/storefront/dist/client/app/account/index.html +0 -58
- package/packages/storefront/dist/client/app/index.html +0 -98
- package/packages/storefront/dist/client/blog/1/index.html +0 -86
- package/packages/storefront/dist/client/macbook-apple-pro-15.4-intel-core-i7-2.6ghz-ram-16gb-ssd-512gb-mr972ll/a-prata/index.html +0 -93
- package/packages/storefront/dist/client/monitores-gamer/index.html +0 -95
- package/packages/storefront/dist/client/mouse-gamer-corsair-optico-harpoon-rgb-ch-9301011-na/index.html +0 -93
- package/packages/storefront/dist/client/p/contato/index.html +0 -90
- package/packages/storefront/dist/client/p/terms/index.html +0 -101
- package/packages/storefront/dist/client/posts/3/index.html +0 -101
- package/packages/storefront/dist/client/posts/4/index.html +0 -101
- package/packages/storefront/dist/server/_empty-middleware.mjs +0 -3
- package/packages/storefront/dist/server/chunks/_.._Lq3r7hpv.mjs +0 -6
- package/packages/storefront/dist/server/chunks/_page__LqbeNfr1.mjs +0 -6
- package/packages/storefront/dist/server/chunks/account_4n4rpirV.mjs +0 -6
- package/packages/storefront/dist/server/chunks/index_SwXtE1IM.mjs +0 -6
- package/packages/storefront/dist/server/chunks/node_Nzz44v5l.mjs +0 -6
- package/packages/storefront/dist/server/chunks/~fallback_EWqi0UyU.mjs +0 -6
- package/packages/storefront/dist/server/manifest_ZHJUD8_m.mjs +0 -196
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { img, imgSizes, i18n, formatMoney, price, randomObjectId, nickname, inStock, gridTitle, categoriesList, name, onPromotion, variationsGrids, specTextValue, specValueByText } from '@ecomplus/utils';
|
|
2
|
-
import { c as createAstro, b as createComponent, r as renderTemplate,
|
|
2
|
+
import { c as createAstro, b as createComponent, r as renderTemplate, d as addAttribute, u as unescapeHTML, e as renderComponent, f as createTransitionScope, s as spreadAttributes, g as renderSlotToString, h as renderAllHeadContent, m as maybeRenderHead, i as renderSlot$1, F as Fragment } from '../astro_ECsNQeA2.mjs';
|
|
3
3
|
import 'kleur/colors';
|
|
4
|
+
import 'cssesc';
|
|
4
5
|
import api from '@cloudcommerce/api';
|
|
5
6
|
import { EventEmitter } from 'node:events';
|
|
6
7
|
import fs, { readFileSync } from 'node:fs';
|
|
@@ -11,8 +12,8 @@ import 'clsx';
|
|
|
11
12
|
/* empty css */
|
|
12
13
|
import { renderSync, parse as parse$1, ELEMENT_NODE, walkSync } from 'ultrahtml';
|
|
13
14
|
import mime from 'mime/lite.js';
|
|
14
|
-
import { useSSRContext, defineComponent, computed, createVNode, resolveDynamicComponent, mergeProps, withCtx, renderSlot, inject, ref, watch, toRef, onMounted, onBeforeUnmount, provide,
|
|
15
|
-
import { ssrRenderSlotInner, ssrRenderVNode, ssrRenderSlot, ssrRenderAttrs, ssrRenderClass, ssrRenderComponent,
|
|
15
|
+
import { useSSRContext, defineComponent, computed, createVNode, resolveDynamicComponent, mergeProps, withCtx, renderSlot, inject, ref, watch, toRef, onMounted, onBeforeUnmount, provide, reactive, shallowRef, resolveComponent, withDirectives, vShow, openBlock, createBlock, createCommentVNode, Fragment as Fragment$1, renderList, nextTick, withModifiers, Teleport, createTextVNode, toDisplayString, defineAsyncComponent, vModelText, Suspense, createSlots, shallowReactive, withAsyncContext, vModelRadio } from 'vue';
|
|
16
|
+
import { ssrRenderSlotInner, ssrRenderVNode, ssrRenderSlot, ssrRenderAttrs, ssrRenderClass, ssrRenderComponent, ssrRenderStyle, ssrRenderList, ssrIncludeBooleanAttr, ssrRenderAttr, ssrRenderTeleport, ssrInterpolate, ssrRenderSuspense, ssrLooseEqual } from 'vue/server-renderer';
|
|
16
17
|
import { useScroll, useElementHover, useDebounceFn, watchDebounced, useTimeout, promiseTimeout, watchOnce, onClickOutside, useUrlSearchParams, createReusableTemplate } from '@vueuse/core';
|
|
17
18
|
import mitt from 'mitt';
|
|
18
19
|
import { Popover, PopoverButton, PopoverPanel, Menu, MenuButton, MenuItems, MenuItem, Listbox, ListboxButton, ListboxOptions, ListboxOption } from '@headlessui/vue';
|
|
@@ -26,7 +27,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
26
27
|
return target;
|
|
27
28
|
};
|
|
28
29
|
|
|
29
|
-
const _sfc_main$
|
|
30
|
+
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
30
31
|
__name: "Fade",
|
|
31
32
|
props: {
|
|
32
33
|
speed: { default: "default" },
|
|
@@ -161,18 +162,18 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
161
162
|
return __returned__;
|
|
162
163
|
}
|
|
163
164
|
});
|
|
164
|
-
function _sfc_ssrRender$
|
|
165
|
+
function _sfc_ssrRender$G(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
165
166
|
ssrRenderSlotInner(_ctx.$slots, "default", {}, null, _push, _parent, null, true);
|
|
166
167
|
}
|
|
167
|
-
const _sfc_setup$
|
|
168
|
-
_sfc_main$
|
|
168
|
+
const _sfc_setup$G = _sfc_main$G.setup;
|
|
169
|
+
_sfc_main$G.setup = (props, ctx) => {
|
|
169
170
|
const ssrContext = useSSRContext();
|
|
170
171
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/globals/Fade.vue");
|
|
171
|
-
return _sfc_setup$
|
|
172
|
+
return _sfc_setup$G ? _sfc_setup$G(props, ctx) : void 0;
|
|
172
173
|
};
|
|
173
|
-
const Fade = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
174
|
+
const Fade = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["ssrRender", _sfc_ssrRender$G]]);
|
|
174
175
|
|
|
175
|
-
const _sfc_main$
|
|
176
|
+
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
176
177
|
__name: "ALink",
|
|
177
178
|
props: {
|
|
178
179
|
href: {},
|
|
@@ -199,7 +200,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
199
200
|
return __returned__;
|
|
200
201
|
}
|
|
201
202
|
});
|
|
202
|
-
function _sfc_ssrRender$
|
|
203
|
+
function _sfc_ssrRender$F(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
203
204
|
ssrRenderVNode(_push, createVNode(resolveDynamicComponent($props.href ? "a" : "span"), mergeProps({
|
|
204
205
|
href: $props.href,
|
|
205
206
|
target: $setup.linkTarget,
|
|
@@ -217,15 +218,15 @@ function _sfc_ssrRender$E(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
217
218
|
_: 3
|
|
218
219
|
}), _parent);
|
|
219
220
|
}
|
|
220
|
-
const _sfc_setup$
|
|
221
|
-
_sfc_main$
|
|
221
|
+
const _sfc_setup$F = _sfc_main$F.setup;
|
|
222
|
+
_sfc_main$F.setup = (props, ctx) => {
|
|
222
223
|
const ssrContext = useSSRContext();
|
|
223
224
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/globals/ALink.vue");
|
|
224
|
-
return _sfc_setup$
|
|
225
|
+
return _sfc_setup$F ? _sfc_setup$F(props, ctx) : void 0;
|
|
225
226
|
};
|
|
226
|
-
const ALink = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
227
|
+
const ALink = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["ssrRender", _sfc_ssrRender$F]]);
|
|
227
228
|
|
|
228
|
-
const _sfc_main$
|
|
229
|
+
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
229
230
|
__name: "AImg",
|
|
230
231
|
props: {
|
|
231
232
|
picture: {},
|
|
@@ -259,19 +260,19 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
259
260
|
return __returned__;
|
|
260
261
|
}
|
|
261
262
|
});
|
|
262
|
-
function _sfc_ssrRender$
|
|
263
|
+
function _sfc_ssrRender$E(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
263
264
|
_push(`<img${ssrRenderAttrs(mergeProps($setup.attrs, _attrs))}>`);
|
|
264
265
|
}
|
|
265
|
-
const _sfc_setup$
|
|
266
|
-
_sfc_main$
|
|
266
|
+
const _sfc_setup$E = _sfc_main$E.setup;
|
|
267
|
+
_sfc_main$E.setup = (props, ctx) => {
|
|
267
268
|
const ssrContext = useSSRContext();
|
|
268
269
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/globals/AImg.vue");
|
|
269
|
-
return _sfc_setup$
|
|
270
|
+
return _sfc_setup$E ? _sfc_setup$E(props, ctx) : void 0;
|
|
270
271
|
};
|
|
271
|
-
const AImg = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
272
|
+
const AImg = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["ssrRender", _sfc_ssrRender$E]]);
|
|
272
273
|
|
|
273
274
|
const rowClassName = "bg-gray-200 rounded-md dark:bg-gray-700";
|
|
274
|
-
const _sfc_main$
|
|
275
|
+
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
275
276
|
__name: "Skeleton",
|
|
276
277
|
props: {
|
|
277
278
|
isBold: { type: Boolean },
|
|
@@ -291,19 +292,52 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
291
292
|
return __returned__;
|
|
292
293
|
}
|
|
293
294
|
});
|
|
294
|
-
function _sfc_ssrRender$
|
|
295
|
+
function _sfc_ssrRender$D(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
295
296
|
_push(`<div${ssrRenderAttrs(mergeProps({
|
|
296
297
|
role: "status",
|
|
297
298
|
class: ["animate-pulse", $props.isLarge ? "max-w-4xl" : "max-w-sm"]
|
|
298
299
|
}, _attrs))}><div class="${ssrRenderClass([$setup.firstRowClassName, $props.isLarge ? "w-96" : "w-48"])}"></div><div class="${ssrRenderClass([$setup.nextRowsClassName, $props.isLarge ? "max-w-[680px]" : "max-w-[340px]"])}"></div><div class="${ssrRenderClass($setup.nextRowsClassName)}"></div><div class="${ssrRenderClass([$setup.nextRowsClassName, $props.isLarge ? "max-w-[660px]" : "max-w-[330px]"])}"></div><div class="${ssrRenderClass([$setup.nextRowsClassName, $props.isLarge ? "max-w-[600px]" : "max-w-[300px]"])}"></div><div class="${ssrRenderClass([$setup.nextRowsClassName, $props.isLarge ? "max-w-[720px]" : "max-w-[360px]"])}"></div><span class="sr-only">Loading...</span></div>`);
|
|
299
300
|
}
|
|
300
|
-
const _sfc_setup$
|
|
301
|
-
_sfc_main$
|
|
301
|
+
const _sfc_setup$D = _sfc_main$D.setup;
|
|
302
|
+
_sfc_main$D.setup = (props, ctx) => {
|
|
302
303
|
const ssrContext = useSSRContext();
|
|
303
304
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/globals/Skeleton.vue");
|
|
304
|
-
return _sfc_setup$
|
|
305
|
+
return _sfc_setup$D ? _sfc_setup$D(props, ctx) : void 0;
|
|
306
|
+
};
|
|
307
|
+
const Skeleton = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["ssrRender", _sfc_ssrRender$D]]);
|
|
308
|
+
|
|
309
|
+
if (!globalThis.__sfIds)
|
|
310
|
+
globalThis.__sfIds = {};
|
|
311
|
+
const useId = (prefix = "_") => {
|
|
312
|
+
if (typeof globalThis.__sfIds[prefix] !== "number")
|
|
313
|
+
globalThis.__sfIds[prefix] = -1;
|
|
314
|
+
return `${prefix}${++globalThis.__sfIds[prefix]}`;
|
|
315
|
+
};
|
|
316
|
+
const clearAccents = (str) => {
|
|
317
|
+
return str.replace(/[ÁáÃãÂâÀà]/g, "a").replace(/[ÉéÊê]/g, "e").replace(/[Íí]/g, "i").replace(/[ÕõÓóÔô]/g, "o").replace(/[Úú]/g, "u").replace(/[Çç]/g, "c");
|
|
318
|
+
};
|
|
319
|
+
const slugify = (str) => {
|
|
320
|
+
return clearAccents(str.trim()).toLowerCase().replace(/[\W\r\n]/gm, "-").replace(/-{2,}/g, "-").replace(/(^-)|(-$)/g, "");
|
|
321
|
+
};
|
|
322
|
+
const toLowerCaseAccents = (str) => {
|
|
323
|
+
return str.toLowerCase().replace(/Á/g, "á").replace(/Ã/g, "ã").replace(/Â/g, "â").replace(/À/g, "à").replace(/É/g, "é").replace(/Ê/g, "ê").replace(/Í/g, "í").replace(/Õ/g, "õ").replace(/Ó/g, "ó").replace(/Ô/g, "ô").replace(/Ú/g, "ú").replace(/Ç/g, "ç");
|
|
324
|
+
};
|
|
325
|
+
const termify = (str) => {
|
|
326
|
+
return toLowerCaseAccents(str.trim()).replace(/[\r\n]/gm, " ").replace(/[^\w-&%áãâàéêíõóôúç]/g, " ").replace(/\s{2,}/g, " ");
|
|
327
|
+
};
|
|
328
|
+
const getSearchUrl = (term, baseUrl = "/s/") => {
|
|
329
|
+
return `${baseUrl}${encodeURIComponent(termify(term))}`;
|
|
330
|
+
};
|
|
331
|
+
const scrollToEl = (el, top = 0) => {
|
|
332
|
+
while (el.offsetParent) {
|
|
333
|
+
top += el.offsetTop;
|
|
334
|
+
el = el.offsetParent;
|
|
335
|
+
}
|
|
336
|
+
return window.scroll({
|
|
337
|
+
top,
|
|
338
|
+
behavior: "smooth"
|
|
339
|
+
});
|
|
305
340
|
};
|
|
306
|
-
const Skeleton = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["ssrRender", _sfc_ssrRender$C]]);
|
|
307
341
|
|
|
308
342
|
const formatPercentage = (value, digits = 1) => {
|
|
309
343
|
return Number.isInteger(value) ? `${value}%` : `${value.toFixed(digits)}%`;
|
|
@@ -320,6 +354,7 @@ const createApp$1 = (app) => {
|
|
|
320
354
|
const { settings, apiContext } = globalThis.$storefront || {};
|
|
321
355
|
app2.config.globalProperties.$settings = settings;
|
|
322
356
|
app2.config.globalProperties.$apiContext = apiContext;
|
|
357
|
+
app2.config.globalProperties.$useId = useId;
|
|
323
358
|
}
|
|
324
359
|
});
|
|
325
360
|
app.component("Fade", Fade);
|
|
@@ -328,7 +363,7 @@ const createApp$1 = (app) => {
|
|
|
328
363
|
app.component("Skeleton", Skeleton);
|
|
329
364
|
};
|
|
330
365
|
|
|
331
|
-
const _sfc_main$
|
|
366
|
+
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
332
367
|
__name: "CarouselControl",
|
|
333
368
|
props: {
|
|
334
369
|
isPrev: { type: Boolean, default: false }
|
|
@@ -342,7 +377,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
342
377
|
return __returned__;
|
|
343
378
|
}
|
|
344
379
|
});
|
|
345
|
-
function _sfc_ssrRender$
|
|
380
|
+
function _sfc_ssrRender$C(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
346
381
|
_push(`<button${ssrRenderAttrs(mergeProps({
|
|
347
382
|
type: "button",
|
|
348
383
|
"aria-label": !$props.isPrev ? "Pr\xF3ximo" : "Anterior",
|
|
@@ -359,16 +394,16 @@ function _sfc_ssrRender$B(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
359
394
|
}, _push, _parent);
|
|
360
395
|
_push(`</button>`);
|
|
361
396
|
}
|
|
362
|
-
const _sfc_setup$
|
|
363
|
-
_sfc_main$
|
|
397
|
+
const _sfc_setup$C = _sfc_main$C.setup;
|
|
398
|
+
_sfc_main$C.setup = (props, ctx) => {
|
|
364
399
|
const ssrContext = useSSRContext();
|
|
365
400
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/CarouselControl.vue");
|
|
366
|
-
return _sfc_setup$
|
|
401
|
+
return _sfc_setup$C ? _sfc_setup$C(props, ctx) : void 0;
|
|
367
402
|
};
|
|
368
|
-
const CarouselControl = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
403
|
+
const CarouselControl = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["ssrRender", _sfc_ssrRender$C]]);
|
|
369
404
|
|
|
370
405
|
const carouselKey = Symbol("carousel");
|
|
371
|
-
const _sfc_main$
|
|
406
|
+
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
372
407
|
__name: "Carousel",
|
|
373
408
|
props: {
|
|
374
409
|
as: { default: "ul" },
|
|
@@ -550,7 +585,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
550
585
|
return __returned__;
|
|
551
586
|
}
|
|
552
587
|
});
|
|
553
|
-
function _sfc_ssrRender$
|
|
588
|
+
function _sfc_ssrRender$B(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
554
589
|
_push(`<div${ssrRenderAttrs(mergeProps({
|
|
555
590
|
ref: "carousel",
|
|
556
591
|
class: `relative ${!$setup.isX ? "overflow-hidden" : ""}`,
|
|
@@ -614,13 +649,13 @@ function _sfc_ssrRender$A(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
614
649
|
}, _push, _parent);
|
|
615
650
|
_push(`</div>`);
|
|
616
651
|
}
|
|
617
|
-
const _sfc_setup$
|
|
618
|
-
_sfc_main$
|
|
652
|
+
const _sfc_setup$B = _sfc_main$B.setup;
|
|
653
|
+
_sfc_main$B.setup = (props, ctx) => {
|
|
619
654
|
const ssrContext = useSSRContext();
|
|
620
655
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/Carousel.vue");
|
|
621
|
-
return _sfc_setup$
|
|
656
|
+
return _sfc_setup$B ? _sfc_setup$B(props, ctx) : void 0;
|
|
622
657
|
};
|
|
623
|
-
const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
658
|
+
const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["ssrRender", _sfc_ssrRender$B]]);
|
|
624
659
|
|
|
625
660
|
const createApp = (app) => {
|
|
626
661
|
createApp$1(app);
|
|
@@ -805,34 +840,6 @@ const _getConfig = () => {
|
|
|
805
840
|
};
|
|
806
841
|
};
|
|
807
842
|
|
|
808
|
-
let id = -1;
|
|
809
|
-
const useId = () => String(++id);
|
|
810
|
-
const clearAccents = (str) => {
|
|
811
|
-
return str.replace(/[ÁáÃãÂâÀà]/g, "a").replace(/[ÉéÊê]/g, "e").replace(/[Íí]/g, "i").replace(/[ÕõÓóÔô]/g, "o").replace(/[Úú]/g, "u").replace(/[Çç]/g, "c");
|
|
812
|
-
};
|
|
813
|
-
const slugify = (str) => {
|
|
814
|
-
return clearAccents(str.trim()).toLowerCase().replace(/[\W\r\n]/gm, "-").replace(/-{2,}/g, "-").replace(/(^-)|(-$)/g, "");
|
|
815
|
-
};
|
|
816
|
-
const toLowerCaseAccents = (str) => {
|
|
817
|
-
return str.toLowerCase().replace(/Á/g, "á").replace(/Ã/g, "ã").replace(/Â/g, "â").replace(/À/g, "à").replace(/É/g, "é").replace(/Ê/g, "ê").replace(/Í/g, "í").replace(/Õ/g, "õ").replace(/Ó/g, "ó").replace(/Ô/g, "ô").replace(/Ú/g, "ú").replace(/Ç/g, "ç");
|
|
818
|
-
};
|
|
819
|
-
const termify = (str) => {
|
|
820
|
-
return toLowerCaseAccents(str.trim()).replace(/[\r\n]/gm, " ").replace(/[^\w-&%áãâàéêíõóôúç]/g, " ").replace(/\s{2,}/g, " ");
|
|
821
|
-
};
|
|
822
|
-
const getSearchUrl = (term, baseUrl = "/s/") => {
|
|
823
|
-
return `${baseUrl}${encodeURIComponent(termify(term))}`;
|
|
824
|
-
};
|
|
825
|
-
const scrollToEl = (el, top = 0) => {
|
|
826
|
-
while (el.offsetParent) {
|
|
827
|
-
top += el.offsetTop;
|
|
828
|
-
el = el.offsetParent;
|
|
829
|
-
}
|
|
830
|
-
return window.scroll({
|
|
831
|
-
top,
|
|
832
|
-
behavior: "smooth"
|
|
833
|
-
});
|
|
834
|
-
};
|
|
835
|
-
|
|
836
843
|
const emitter$1 = new EventEmitter();
|
|
837
844
|
const getConfig = _getConfig;
|
|
838
845
|
if (!globalThis.$apiMergeConfig) {
|
|
@@ -1015,437 +1022,102 @@ const loadRouteContext = async (Astro, {
|
|
|
1015
1022
|
};
|
|
1016
1023
|
Astro.locals.routeContext = routeContext;
|
|
1017
1024
|
emitter$1.emit("load", routeContext);
|
|
1025
|
+
globalThis.__sfIds = {};
|
|
1018
1026
|
return routeContext;
|
|
1019
1027
|
};
|
|
1020
1028
|
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
const
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1029
|
+
/* eslint-disable */
|
|
1030
|
+
|
|
1031
|
+
const pwaInfo = false;
|
|
1032
|
+
|
|
1033
|
+
const $$Astro$f = createAstro("https://demo.ecomplus.app");
|
|
1034
|
+
const $$ViewTransitions = createComponent(async ($$result, $$props, $$slots) => {
|
|
1035
|
+
const Astro2 = $$result.createAstro($$Astro$f, $$props, $$slots);
|
|
1036
|
+
Astro2.self = $$ViewTransitions;
|
|
1037
|
+
const { fallback = "animate" } = Astro2.props;
|
|
1038
|
+
return renderTemplate`<meta name="astro-view-transitions-enabled" content="true"><meta name="astro-view-transitions-fallback"${addAttribute(fallback, "content")}>`;
|
|
1039
|
+
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/ViewTransitions.astro", void 0);
|
|
1040
|
+
|
|
1041
|
+
var __freeze$3 = Object.freeze;
|
|
1042
|
+
var __defProp$3 = Object.defineProperty;
|
|
1043
|
+
var __template$3 = (cooked, raw) => __freeze$3(__defProp$3(cooked, "raw", { value: __freeze$3(raw || cooked.slice()) }));
|
|
1044
|
+
var _b, _c;
|
|
1045
|
+
const $$Astro$e = createAstro("https://demo.ecomplus.app");
|
|
1046
|
+
const $$BaseHead = createComponent(async ($$result, $$props, $$slots) => {
|
|
1047
|
+
const Astro2 = $$result.createAstro($$Astro$e, $$props, $$slots);
|
|
1048
|
+
Astro2.self = $$BaseHead;
|
|
1049
|
+
const isPWA = pwaInfo !== false;
|
|
1050
|
+
const hasViewTransitions = Astro2.props.hasViewTransitions !== false && !Astro2.url.pathname.startsWith("/app/");
|
|
1051
|
+
const {
|
|
1052
|
+
storeId,
|
|
1053
|
+
isHomepage,
|
|
1054
|
+
isSearchPage,
|
|
1055
|
+
searchPageTerm,
|
|
1056
|
+
cmsContent,
|
|
1057
|
+
fetchingApiContext,
|
|
1058
|
+
apiContext,
|
|
1059
|
+
lang,
|
|
1060
|
+
countryCode,
|
|
1061
|
+
currency,
|
|
1062
|
+
currencySymbol,
|
|
1063
|
+
domain,
|
|
1064
|
+
primaryColor,
|
|
1065
|
+
settings,
|
|
1066
|
+
isPreview,
|
|
1067
|
+
getContent
|
|
1068
|
+
} = Astro2.locals.routeContext;
|
|
1069
|
+
if (fetchingApiContext) {
|
|
1070
|
+
await fetchingApiContext;
|
|
1033
1071
|
}
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1072
|
+
const deployRand = {"BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": true, "SITE": "https://demo.ecomplus.app", "ASSETS_PREFIX": undefined}.DEPLOY_RAND || "_";
|
|
1073
|
+
const getIconUrl = (size) => {
|
|
1074
|
+
return `/_image?f=png&w=${size}&h=${size}&href=${encodeURIComponent(settings.icon)}&V=${deployRand}`;
|
|
1075
|
+
};
|
|
1076
|
+
const apiDoc = apiContext.doc;
|
|
1077
|
+
const state = apiDoc || cmsContent || {};
|
|
1078
|
+
let title = state.meta_title || state.metaTitle || state.name && `${state.name} | ${settings.name}` || state.title && `${state.title} | ${settings.name}` || "";
|
|
1079
|
+
let description = state.meta_description || state.metaDescription || state.short_description || state.description || settings.description || "";
|
|
1080
|
+
if (isHomepage) {
|
|
1081
|
+
if (!title)
|
|
1082
|
+
title = settings.name;
|
|
1083
|
+
if (!description)
|
|
1084
|
+
description = settings.description;
|
|
1039
1085
|
}
|
|
1040
|
-
if (
|
|
1041
|
-
|
|
1086
|
+
if (isSearchPage) {
|
|
1087
|
+
if (searchPageTerm) {
|
|
1088
|
+
if (!title)
|
|
1089
|
+
title = settings.name;
|
|
1090
|
+
title = title.replace("$term", searchPageTerm);
|
|
1091
|
+
if (!title.includes(searchPageTerm)) {
|
|
1092
|
+
title = `${searchPageTerm} | ${title}`;
|
|
1093
|
+
}
|
|
1094
|
+
} else if (!title) {
|
|
1095
|
+
title = `${i19searchProducts} | ${settings.name}`;
|
|
1096
|
+
}
|
|
1042
1097
|
}
|
|
1043
|
-
const
|
|
1044
|
-
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1098
|
+
const favicon = settings.icon ? getIconUrl(32) : "/favicon.ico";
|
|
1099
|
+
const shortcutIcon = settings.icon ? getIconUrl(192) : null;
|
|
1100
|
+
const canonicalUrl = new URL(Astro2.url.pathname, Astro2.site || `https://${domain}`);
|
|
1101
|
+
const { metatags: metatagsContent } = await getContent("layout");
|
|
1102
|
+
const ogLocale = lang.length === 2 ? lang : lang.substring(0, 2) + lang.slice(3).toUpperCase();
|
|
1103
|
+
let ogImage;
|
|
1104
|
+
if (apiDoc) {
|
|
1105
|
+
const picture = img(state, void 0, "zoom");
|
|
1106
|
+
ogImage = picture && picture.url;
|
|
1049
1107
|
}
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
if (typeof src === "string") {
|
|
1055
|
-
unique.add(extname(src).replace(".", ""));
|
|
1108
|
+
if (!ogImage) {
|
|
1109
|
+
if (metatagsContent?.ogImage) {
|
|
1110
|
+
ogImage = metatagsContent.ogImage.charAt(0) === "/" ? `https://${domain}${metatagsContent.ogImage}` : metatagsContent.ogImage;
|
|
1111
|
+
}
|
|
1056
1112
|
} else {
|
|
1057
|
-
|
|
1058
|
-
}
|
|
1059
|
-
return Array.from(unique).filter(Boolean);
|
|
1060
|
-
}
|
|
1061
|
-
const createPictureGetter = (getImage) => {
|
|
1062
|
-
return async (params) => {
|
|
1063
|
-
const {
|
|
1064
|
-
src,
|
|
1065
|
-
alt,
|
|
1066
|
-
widths,
|
|
1067
|
-
fit,
|
|
1068
|
-
position,
|
|
1069
|
-
background
|
|
1070
|
-
} = params;
|
|
1071
|
-
if (!src) {
|
|
1072
|
-
throw new Error("[@astrojs/image] `src` is required");
|
|
1073
|
-
}
|
|
1074
|
-
if (!widths || !Array.isArray(widths)) {
|
|
1075
|
-
throw new Error("[@astrojs/image] at least one `width` is required. ex: `widths={[100]}`");
|
|
1076
|
-
}
|
|
1077
|
-
const aspectRatio = await resolveAspectRatio(params);
|
|
1078
|
-
if (!aspectRatio) {
|
|
1079
|
-
throw new Error("`aspectRatio` must be provided for remote images");
|
|
1080
|
-
}
|
|
1081
|
-
const allFormats = await resolveFormats(params);
|
|
1082
|
-
const lastFormat = allFormats[allFormats.length - 1];
|
|
1083
|
-
const maxWidth = Math.max(...widths);
|
|
1084
|
-
let image;
|
|
1085
|
-
async function getSource(format) {
|
|
1086
|
-
const imgs = await Promise.all(
|
|
1087
|
-
widths.map(async (width) => {
|
|
1088
|
-
const img = await getImage({
|
|
1089
|
-
src,
|
|
1090
|
-
alt,
|
|
1091
|
-
format,
|
|
1092
|
-
width,
|
|
1093
|
-
height: width / aspectRatio,
|
|
1094
|
-
fit,
|
|
1095
|
-
position,
|
|
1096
|
-
background,
|
|
1097
|
-
aspectRatio
|
|
1098
|
-
});
|
|
1099
|
-
if (format === lastFormat && width === maxWidth) {
|
|
1100
|
-
image = img;
|
|
1101
|
-
}
|
|
1102
|
-
return `${img.src} ${width}w`;
|
|
1103
|
-
})
|
|
1104
|
-
);
|
|
1105
|
-
return {
|
|
1106
|
-
type: mime.getType(format) || format,
|
|
1107
|
-
srcset: imgs.join(",")
|
|
1108
|
-
};
|
|
1109
|
-
}
|
|
1110
|
-
const sources = await Promise.all(allFormats.map((format) => getSource(format)));
|
|
1111
|
-
return {
|
|
1112
|
-
sources,
|
|
1113
|
-
// @ts-ignore
|
|
1114
|
-
image
|
|
1115
|
-
};
|
|
1116
|
-
};
|
|
1117
|
-
};
|
|
1118
|
-
|
|
1119
|
-
const { STOREFRONT_BASE_DIR } = process.env;
|
|
1120
|
-
const baseDir = STOREFRONT_BASE_DIR || process.cwd();
|
|
1121
|
-
const builtImages = [];
|
|
1122
|
-
const manifestFilepath = join(baseDir, "dist/server/images.dist.csv");
|
|
1123
|
-
try {
|
|
1124
|
-
readFileSync(manifestFilepath, "utf-8").split(/\n/).forEach((line) => {
|
|
1125
|
-
const [filename, width, height] = line.split(",");
|
|
1126
|
-
builtImages.push({
|
|
1127
|
-
filename,
|
|
1128
|
-
width: Number(width),
|
|
1129
|
-
height: Number(height)
|
|
1130
|
-
});
|
|
1131
|
-
});
|
|
1132
|
-
} catch (err) {
|
|
1133
|
-
if (global.$renderStorefront) {
|
|
1134
|
-
console.error(err);
|
|
1135
|
-
}
|
|
1136
|
-
}
|
|
1137
|
-
builtImages.sort((a, b) => {
|
|
1138
|
-
if (a.width < b.width)
|
|
1139
|
-
return -1;
|
|
1140
|
-
return 1;
|
|
1141
|
-
});
|
|
1142
|
-
const getBuiltImage = async ({ src, width, format }) => {
|
|
1143
|
-
const filename = src.replace(/^.*\//, "").replace(/.\w+(\?.*)?$/, "");
|
|
1144
|
-
const filenameRegExp = new RegExp(`[_.][a-z0-9]+\\.${format}$`, "i");
|
|
1145
|
-
const matchFilename = (_builtImage) => {
|
|
1146
|
-
return filename === _builtImage.filename.replace(filenameRegExp, "");
|
|
1147
|
-
};
|
|
1148
|
-
let builtImage = builtImages.find((_builtImage) => {
|
|
1149
|
-
return _builtImage.width >= width && matchFilename(_builtImage);
|
|
1150
|
-
});
|
|
1151
|
-
if (!builtImage) {
|
|
1152
|
-
builtImage = builtImages.find(matchFilename);
|
|
1153
|
-
}
|
|
1154
|
-
if (builtImage) {
|
|
1155
|
-
return {
|
|
1156
|
-
src: `/_astro/${builtImage.filename}`,
|
|
1157
|
-
width: builtImage.width,
|
|
1158
|
-
height: builtImage.height
|
|
1159
|
-
};
|
|
1160
|
-
}
|
|
1161
|
-
console.warn(`Could not match built ${format} image for ${src} ${width}px`);
|
|
1162
|
-
return { src, width };
|
|
1163
|
-
};
|
|
1164
|
-
|
|
1165
|
-
const getBuiltPicture = createPictureGetter(getBuiltImage);
|
|
1166
|
-
|
|
1167
|
-
const getAspectRatio = (src, tryImageSize) => {
|
|
1168
|
-
if (typeof src === "string") {
|
|
1169
|
-
src = tryImageSize(src);
|
|
1170
|
-
} else if (src.width) {
|
|
1171
|
-
return src.height ? src.width / src.height : 1;
|
|
1172
|
-
}
|
|
1173
|
-
return 0;
|
|
1174
|
-
};
|
|
1175
|
-
const useSSRPicture = async (params) => {
|
|
1176
|
-
const {
|
|
1177
|
-
src,
|
|
1178
|
-
alt,
|
|
1179
|
-
sizes: propSizes,
|
|
1180
|
-
widths,
|
|
1181
|
-
aspectRatio: propAspectRatio,
|
|
1182
|
-
fit,
|
|
1183
|
-
background,
|
|
1184
|
-
position,
|
|
1185
|
-
formats = ["avif", "webp"],
|
|
1186
|
-
loading = "lazy",
|
|
1187
|
-
decoding = "async",
|
|
1188
|
-
hasImg = true,
|
|
1189
|
-
tryImageSize,
|
|
1190
|
-
getPicture,
|
|
1191
|
-
assetsPrefix,
|
|
1192
|
-
...attrs
|
|
1193
|
-
} = params;
|
|
1194
|
-
let aspectRatio;
|
|
1195
|
-
if (propAspectRatio) {
|
|
1196
|
-
if (typeof propAspectRatio === "number") {
|
|
1197
|
-
aspectRatio = propAspectRatio;
|
|
1198
|
-
} else {
|
|
1199
|
-
const [width, height] = propAspectRatio.split(":");
|
|
1200
|
-
aspectRatio = Number(width) / Number(height);
|
|
1201
|
-
}
|
|
1202
|
-
} else if ((!attrs.width || !attrs.height) && typeof src === "string") {
|
|
1203
|
-
const { width, height } = tryImageSize(src);
|
|
1204
|
-
if (width && height) {
|
|
1205
|
-
aspectRatio = getAspectRatio({ width, height }, tryImageSize);
|
|
1206
|
-
let hasSplicedWidths = false;
|
|
1207
|
-
for (let i = widths.length - 1; i >= 0; i--) {
|
|
1208
|
-
if (widths[i] > width) {
|
|
1209
|
-
widths.splice(i, 1);
|
|
1210
|
-
hasSplicedWidths = true;
|
|
1211
|
-
}
|
|
1212
|
-
}
|
|
1213
|
-
if (hasSplicedWidths) {
|
|
1214
|
-
attrs.width = width;
|
|
1215
|
-
attrs.height = height;
|
|
1216
|
-
if (!widths.find((w) => w === width)) {
|
|
1217
|
-
widths.push(width);
|
|
1218
|
-
}
|
|
1219
|
-
} else {
|
|
1220
|
-
attrs.width = Math.max(...widths);
|
|
1221
|
-
attrs.height = Math.round(attrs.width / aspectRatio);
|
|
1222
|
-
}
|
|
1223
|
-
}
|
|
1224
|
-
}
|
|
1225
|
-
let sizes = propSizes || "";
|
|
1226
|
-
if (!sizes && attrs.class) {
|
|
1227
|
-
const classNames = attrs.class.split(" ");
|
|
1228
|
-
let nextSize;
|
|
1229
|
-
const breakpoints = {
|
|
1230
|
-
sm: 640,
|
|
1231
|
-
md: 768,
|
|
1232
|
-
lg: 1024,
|
|
1233
|
-
xl: 1280,
|
|
1234
|
-
"2xl": 1536
|
|
1235
|
-
};
|
|
1236
|
-
[
|
|
1237
|
-
["", 0],
|
|
1238
|
-
...Object.entries(breakpoints)
|
|
1239
|
-
].forEach(([breakpoint, minWidth]) => {
|
|
1240
|
-
const classRegex = breakpoint ? new RegExp(`^${breakpoint}:max-w-(\\[\\w+\\]|screen-\\w+)$`) : /^max-w-(\[\w+\]|screen-\w+)$/;
|
|
1241
|
-
let classMaxW;
|
|
1242
|
-
classNames.find((_class) => {
|
|
1243
|
-
const maxW = _class.replace(classRegex, "$1");
|
|
1244
|
-
if (maxW !== _class) {
|
|
1245
|
-
classMaxW = maxW;
|
|
1246
|
-
return true;
|
|
1247
|
-
}
|
|
1248
|
-
return false;
|
|
1249
|
-
});
|
|
1250
|
-
if (classMaxW) {
|
|
1251
|
-
if (nextSize) {
|
|
1252
|
-
if (sizes)
|
|
1253
|
-
sizes += ", ";
|
|
1254
|
-
sizes += `(max-width: ${minWidth - 1}px) ${nextSize}`;
|
|
1255
|
-
}
|
|
1256
|
-
if (classMaxW.charAt(0) === "[") {
|
|
1257
|
-
nextSize = classMaxW.slice(1, classMaxW.length - 1);
|
|
1258
|
-
} else {
|
|
1259
|
-
const screenSize = breakpoints[classMaxW.slice(7)];
|
|
1260
|
-
if (screenSize) {
|
|
1261
|
-
nextSize = `${screenSize}px`;
|
|
1262
|
-
}
|
|
1263
|
-
}
|
|
1264
|
-
}
|
|
1265
|
-
});
|
|
1266
|
-
if (nextSize) {
|
|
1267
|
-
if (sizes)
|
|
1268
|
-
sizes += ", ";
|
|
1269
|
-
sizes += nextSize;
|
|
1270
|
-
}
|
|
1271
|
-
}
|
|
1272
|
-
if (!sizes && widths.length === 1) {
|
|
1273
|
-
sizes = `${widths[0] / 2}px`;
|
|
1274
|
-
}
|
|
1275
|
-
const { image, sources } = await getPicture({
|
|
1276
|
-
src,
|
|
1277
|
-
widths,
|
|
1278
|
-
formats,
|
|
1279
|
-
aspectRatio,
|
|
1280
|
-
fit,
|
|
1281
|
-
background,
|
|
1282
|
-
position,
|
|
1283
|
-
alt
|
|
1284
|
-
});
|
|
1285
|
-
delete image.width;
|
|
1286
|
-
delete image.height;
|
|
1287
|
-
if (assetsPrefix && image.src?.charAt(0) === "/") {
|
|
1288
|
-
image.src = `${assetsPrefix}${image.src}`;
|
|
1289
|
-
sources.forEach((source) => {
|
|
1290
|
-
source.srcset = `${assetsPrefix}${source.srcset}`.replace(/,\//g, `,${assetsPrefix}/`);
|
|
1291
|
-
});
|
|
1292
|
-
}
|
|
1293
|
-
const pictureAttrs = {};
|
|
1294
|
-
if (!hasImg) {
|
|
1295
|
-
pictureAttrs["data-alt"] = alt;
|
|
1296
|
-
Object.assign(pictureAttrs, attrs);
|
|
1297
|
-
delete pictureAttrs.width;
|
|
1298
|
-
delete pictureAttrs.height;
|
|
1299
|
-
}
|
|
1300
|
-
return {
|
|
1301
|
-
sizes,
|
|
1302
|
-
aspectRatio,
|
|
1303
|
-
sources,
|
|
1304
|
-
pictureAttrs,
|
|
1305
|
-
imgAttrs: !hasImg ? null : {
|
|
1306
|
-
...image,
|
|
1307
|
-
alt,
|
|
1308
|
-
loading,
|
|
1309
|
-
decoding,
|
|
1310
|
-
...attrs
|
|
1311
|
-
}
|
|
1312
|
-
};
|
|
1313
|
-
};
|
|
1314
|
-
|
|
1315
|
-
const $$Astro$f = createAstro("https://demo.ecomplus.app");
|
|
1316
|
-
const $$Picture = createComponent(async ($$result, $$props, $$slots) => {
|
|
1317
|
-
const Astro2 = $$result.createAstro($$Astro$f, $$props, $$slots);
|
|
1318
|
-
Astro2.self = $$Picture;
|
|
1319
|
-
const { STOREFRONT_BASE_DIR } = process.env;
|
|
1320
|
-
const baseDir = STOREFRONT_BASE_DIR || process.cwd();
|
|
1321
|
-
const originalImages = [];
|
|
1322
|
-
const manifestFilepath = join(baseDir, "dist/server/images.src.csv");
|
|
1323
|
-
readFileSync(manifestFilepath, "utf-8").split(/\n/).forEach((line) => {
|
|
1324
|
-
const [filepath, width, height] = line.split(",");
|
|
1325
|
-
originalImages.push({
|
|
1326
|
-
filepath,
|
|
1327
|
-
width: Number(width),
|
|
1328
|
-
height: Number(height)
|
|
1329
|
-
});
|
|
1330
|
-
});
|
|
1331
|
-
const tryImageSize = (src) => {
|
|
1332
|
-
let dimensions = {};
|
|
1333
|
-
if (typeof src === "string" && src.startsWith("/")) {
|
|
1334
|
-
const originalImage = originalImages.find(({ filepath }) => {
|
|
1335
|
-
return new RegExp(`^/${filepath}\\??.*`).test(src);
|
|
1336
|
-
});
|
|
1337
|
-
if (originalImage) {
|
|
1338
|
-
const { width, height } = originalImage;
|
|
1339
|
-
dimensions = { width, height };
|
|
1340
|
-
}
|
|
1341
|
-
}
|
|
1342
|
-
return dimensions;
|
|
1343
|
-
};
|
|
1344
|
-
const {
|
|
1345
|
-
sizes,
|
|
1346
|
-
sources,
|
|
1347
|
-
pictureAttrs,
|
|
1348
|
-
imgAttrs
|
|
1349
|
-
} = await useSSRPicture({
|
|
1350
|
-
...Astro2.props,
|
|
1351
|
-
tryImageSize,
|
|
1352
|
-
getPicture: getBuiltPicture,
|
|
1353
|
-
assetsPrefix: Astro2.locals.assetsPrefix
|
|
1354
|
-
});
|
|
1355
|
-
return renderTemplate`${maybeRenderHead()}<picture${spreadAttributes(pictureAttrs)}> ${sources.map((attrs) => renderTemplate`<source${spreadAttributes(attrs)}${addAttribute(sizes, "sizes")}>`)} ${imgAttrs && renderTemplate`<img${spreadAttributes(imgAttrs)}>`} </picture>`;
|
|
1356
|
-
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/images/Picture.runtime.astro", void 0);
|
|
1357
|
-
|
|
1358
|
-
/* eslint-disable */
|
|
1359
|
-
|
|
1360
|
-
const pwaInfo = false;
|
|
1361
|
-
|
|
1362
|
-
const $$Astro$e = createAstro("https://demo.ecomplus.app");
|
|
1363
|
-
const $$ViewTransitions = createComponent(async ($$result, $$props, $$slots) => {
|
|
1364
|
-
const Astro2 = $$result.createAstro($$Astro$e, $$props, $$slots);
|
|
1365
|
-
Astro2.self = $$ViewTransitions;
|
|
1366
|
-
const { fallback = "animate" } = Astro2.props;
|
|
1367
|
-
return renderTemplate`<meta name="astro-view-transitions-enabled" content="true"><meta name="astro-view-transitions-fallback"${addAttribute(fallback, "content")}>`;
|
|
1368
|
-
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/ViewTransitions.astro", void 0);
|
|
1369
|
-
|
|
1370
|
-
var __freeze$3 = Object.freeze;
|
|
1371
|
-
var __defProp$3 = Object.defineProperty;
|
|
1372
|
-
var __template$3 = (cooked, raw) => __freeze$3(__defProp$3(cooked, "raw", { value: __freeze$3(raw || cooked.slice()) }));
|
|
1373
|
-
var _b, _c;
|
|
1374
|
-
const $$Astro$d = createAstro("https://demo.ecomplus.app");
|
|
1375
|
-
const $$BaseHead = createComponent(async ($$result, $$props, $$slots) => {
|
|
1376
|
-
const Astro2 = $$result.createAstro($$Astro$d, $$props, $$slots);
|
|
1377
|
-
Astro2.self = $$BaseHead;
|
|
1378
|
-
const isPWA = pwaInfo !== false;
|
|
1379
|
-
const hasViewTransitions = Astro2.props.hasViewTransitions !== false && !Astro2.url.pathname.startsWith("/app/");
|
|
1380
|
-
const {
|
|
1381
|
-
storeId,
|
|
1382
|
-
isHomepage,
|
|
1383
|
-
isSearchPage,
|
|
1384
|
-
searchPageTerm,
|
|
1385
|
-
cmsContent,
|
|
1386
|
-
fetchingApiContext,
|
|
1387
|
-
apiContext,
|
|
1388
|
-
lang,
|
|
1389
|
-
countryCode,
|
|
1390
|
-
currency,
|
|
1391
|
-
currencySymbol,
|
|
1392
|
-
domain,
|
|
1393
|
-
primaryColor,
|
|
1394
|
-
settings,
|
|
1395
|
-
isPreview,
|
|
1396
|
-
getContent
|
|
1397
|
-
} = Astro2.locals.routeContext;
|
|
1398
|
-
if (fetchingApiContext) {
|
|
1399
|
-
await fetchingApiContext;
|
|
1400
|
-
}
|
|
1401
|
-
const deployRand = {"BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": true, "SITE": "https://demo.ecomplus.app", "ASSETS_PREFIX": undefined}.DEPLOY_RAND || "_";
|
|
1402
|
-
const getIconUrl = (size) => {
|
|
1403
|
-
return `/_image?f=png&w=${size}&h=${size}&href=${encodeURIComponent(settings.icon)}&V=${deployRand}`;
|
|
1404
|
-
};
|
|
1405
|
-
const apiDoc = apiContext.doc;
|
|
1406
|
-
const state = apiDoc || cmsContent || {};
|
|
1407
|
-
let title = state.meta_title || state.metaTitle || state.name && `${state.name} | ${settings.name}` || state.title && `${state.title} | ${settings.name}` || "";
|
|
1408
|
-
let description = state.meta_description || state.metaDescription || state.short_description || state.description || settings.description || "";
|
|
1409
|
-
if (isHomepage) {
|
|
1410
|
-
if (!title)
|
|
1411
|
-
title = settings.name;
|
|
1412
|
-
if (!description)
|
|
1413
|
-
description = settings.description;
|
|
1414
|
-
}
|
|
1415
|
-
if (isSearchPage) {
|
|
1416
|
-
if (searchPageTerm) {
|
|
1417
|
-
if (!title)
|
|
1418
|
-
title = settings.name;
|
|
1419
|
-
title = title.replace("$term", searchPageTerm);
|
|
1420
|
-
if (!title.includes(searchPageTerm)) {
|
|
1421
|
-
title = `${searchPageTerm} | ${title}`;
|
|
1422
|
-
}
|
|
1423
|
-
} else if (!title) {
|
|
1424
|
-
title = `${i19searchProducts} | ${settings.name}`;
|
|
1425
|
-
}
|
|
1426
|
-
}
|
|
1427
|
-
const favicon = settings.icon ? getIconUrl(32) : "/favicon.ico";
|
|
1428
|
-
const shortcutIcon = settings.icon ? getIconUrl(192) : null;
|
|
1429
|
-
const canonicalUrl = new URL(Astro2.url.pathname, Astro2.site || `https://${domain}`);
|
|
1430
|
-
const { metatags: metatagsContent } = await getContent("layout");
|
|
1431
|
-
const ogLocale = lang.length === 2 ? lang : lang.substring(0, 2) + lang.slice(3).toUpperCase();
|
|
1432
|
-
let ogImage;
|
|
1433
|
-
if (apiDoc) {
|
|
1434
|
-
const picture = img(state, void 0, "zoom");
|
|
1435
|
-
ogImage = picture && picture.url;
|
|
1436
|
-
}
|
|
1437
|
-
if (!ogImage) {
|
|
1438
|
-
if (metatagsContent?.ogImage) {
|
|
1439
|
-
ogImage = metatagsContent.ogImage.charAt(0) === "/" ? `https://${domain}${metatagsContent.ogImage}` : metatagsContent.ogImage;
|
|
1440
|
-
}
|
|
1441
|
-
} else {
|
|
1442
|
-
ogImage = ogImage.replace(/(\w+\.)?(ecoms\d)\.com/i, "$2-nyc3.nyc3.cdn.digitaloceanspaces.com");
|
|
1113
|
+
ogImage = ogImage.replace(/(\w+\.)?(ecoms\d)\.com/i, "$2-nyc3.nyc3.cdn.digitaloceanspaces.com");
|
|
1443
1114
|
}
|
|
1444
1115
|
let inlineClientJS = `
|
|
1445
1116
|
window._emitApiContext = (id = null) => {
|
|
1446
1117
|
console.log('[ctx] emit ' + id);
|
|
1447
1118
|
window.dispatchEvent(new Event('storefront:apiContext'));
|
|
1448
1119
|
window._emitedContextId = id;
|
|
1120
|
+
window.__sfIds = {};
|
|
1449
1121
|
};
|
|
1450
1122
|
window.ECOM_STORE_ID = ${storeId};
|
|
1451
1123
|
window.ECOM_LANG = '${lang}';
|
|
@@ -1515,7 +1187,7 @@ window.$isCmsPreview = true;`;
|
|
|
1515
1187
|
url: `https://${domain}/`,
|
|
1516
1188
|
logo: `https://${domain}${settings.logo}`
|
|
1517
1189
|
});
|
|
1518
|
-
return renderTemplate(_c || (_c = __template$3(['<meta charset="UTF-8"
|
|
1190
|
+
return renderTemplate(_c || (_c = __template$3(['<meta charset="UTF-8"> <meta name="viewport" content="width=device-width"> <meta name="theme-color"', '> <link rel="icon" type="image/png"', ' sizes="32x32"> ', " ", " ", ' <meta name="author"', '> <meta name="generator"', '> <link rel="canonical"', "> ", ' <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="default"> <meta property="og:site_name"', '> <meta property="og:url"', '> <meta property="og:title"', '> <meta property="og:description"', '> <meta property="og:type" content="website"> <meta property="og:locale"', "> ", " ", ' <meta name="twitter:card" content="summary"> ', ' <meta name="ecom-store-id"', "> ", " <script", ">", '</script> <script type="application/ld+json">', "</script> ", " ", ""])), addAttribute(primaryColor, "content"), addAttribute(favicon, "href"), shortcutIcon && renderTemplate`<link rel="icon" type="image/png"${addAttribute(shortcutIcon, "href")} sizes="192x192">`, title && renderTemplate`<title>${title}</title>`, description && renderTemplate`<meta name="description"${addAttribute(description, "content")}>`, addAttribute(settings.name, "content"), addAttribute(Astro2.generator, "content"), addAttribute(canonicalUrl, "href"), shortcutIcon && renderTemplate`<link rel="apple-touch-icon"${addAttribute(shortcutIcon, "href")}>`, addAttribute(settings.name, "content"), addAttribute(canonicalUrl, "content"), addAttribute(title, "content"), addAttribute(description, "content"), addAttribute(ogLocale, "content"), ogImage && renderTemplate`<meta property="og:image"${addAttribute(ogImage, "content")}>`, metatagsContent?.fbAppId && renderTemplate`<meta property="fb:app_id"${addAttribute(metatagsContent.fbAppId, "content")}>`, metatagsContent?.twitterUsername && renderTemplate`<meta name="twitter:site"${addAttribute(metatagsContent.twitterUsername, "content")}>`, addAttribute(String(storeId), "content"), isPWA , addAttribute(createTransitionScope($$result, "kvdive2p"), "data-astro-transition-persist"), unescapeHTML(inlineClientJS), unescapeHTML(inlineJSONLd), hasViewTransitions && renderTemplate`${renderComponent($$result, "ViewTransitions", $$ViewTransitions, { "fallback": "none" })}`, contextInlineClientJS && renderTemplate(_b || (_b = __template$3(["<script>", "</script>"])), unescapeHTML(contextInlineClientJS)));
|
|
1519
1191
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseHead.astro", "self");
|
|
1520
1192
|
|
|
1521
1193
|
function has(value) {
|
|
@@ -1602,57 +1274,394 @@ function isDeferScript(name, { src, defer, async, type }) {
|
|
|
1602
1274
|
return false;
|
|
1603
1275
|
return has(src) && has(defer) || has(src) && is(type, "module") && !has(async);
|
|
1604
1276
|
}
|
|
1605
|
-
function isPrefetchPrerender(name, { rel }) {
|
|
1606
|
-
return name === "link" && any(rel, ["prefetch", "dns-prefetch", "prerender"]);
|
|
1277
|
+
function isPrefetchPrerender(name, { rel }) {
|
|
1278
|
+
return name === "link" && any(rel, ["prefetch", "dns-prefetch", "prerender"]);
|
|
1279
|
+
}
|
|
1280
|
+
function getWeight(element) {
|
|
1281
|
+
for (const [id, detector] of Object.entries(ElementDetectors)) {
|
|
1282
|
+
const children = element.name === "style" && element.children.length > 0 ? renderSync(element) : "";
|
|
1283
|
+
if (detector(element.name, element.attributes, children)) {
|
|
1284
|
+
return ElementWeights[id];
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
return ElementWeights.OTHER;
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
function capo(html) {
|
|
1291
|
+
const ast = parse$1(html);
|
|
1292
|
+
try {
|
|
1293
|
+
walkSync(ast, (node, parent, index) => {
|
|
1294
|
+
if (node.type === ELEMENT_NODE && node.name === "head") {
|
|
1295
|
+
if (parent) {
|
|
1296
|
+
parent.children.splice(index, 1, getSortedHead(node));
|
|
1297
|
+
throw "done";
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
});
|
|
1301
|
+
} catch (e) {
|
|
1302
|
+
if (e !== "done")
|
|
1303
|
+
throw e;
|
|
1304
|
+
}
|
|
1305
|
+
return renderSync(ast);
|
|
1306
|
+
}
|
|
1307
|
+
function getSortedHead(head) {
|
|
1308
|
+
const weightedChildren = head.children.map((node) => {
|
|
1309
|
+
if (node.type === ELEMENT_NODE) {
|
|
1310
|
+
const weight = getWeight(node);
|
|
1311
|
+
return [weight, node];
|
|
1312
|
+
}
|
|
1313
|
+
}).filter(Boolean);
|
|
1314
|
+
const children = weightedChildren.sort((a, b) => b[0] - a[0]).map(([_, element]) => element);
|
|
1315
|
+
return { ...head, children };
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
const Head = createComponent({
|
|
1319
|
+
factory: async (result, props, slots) => {
|
|
1320
|
+
let head = "";
|
|
1321
|
+
head += `<head${spreadAttributes(props)} data-capo>`;
|
|
1322
|
+
head += await renderSlotToString(result, slots.default);
|
|
1323
|
+
head += renderAllHeadContent(result);
|
|
1324
|
+
head += "</head>";
|
|
1325
|
+
return unescapeHTML(capo(head));
|
|
1326
|
+
}
|
|
1327
|
+
});
|
|
1328
|
+
|
|
1329
|
+
function removeQueryString(src) {
|
|
1330
|
+
const index = src.lastIndexOf("?");
|
|
1331
|
+
return index > 0 ? src.substring(0, index) : src;
|
|
1332
|
+
}
|
|
1333
|
+
function basename(src) {
|
|
1334
|
+
return removeQueryString(src.replace(/^.*[\\\/]/, ""));
|
|
1335
|
+
}
|
|
1336
|
+
const extname = (src) => {
|
|
1337
|
+
const base = basename(src);
|
|
1338
|
+
const index = base.lastIndexOf(".");
|
|
1339
|
+
if (index <= 0) {
|
|
1340
|
+
return "";
|
|
1341
|
+
}
|
|
1342
|
+
return base.substring(index);
|
|
1343
|
+
};
|
|
1344
|
+
function parseAspectRatio(aspectRatio) {
|
|
1345
|
+
if (!aspectRatio) {
|
|
1346
|
+
return void 0;
|
|
1347
|
+
}
|
|
1348
|
+
if (typeof aspectRatio === "number") {
|
|
1349
|
+
return aspectRatio;
|
|
1350
|
+
}
|
|
1351
|
+
const [width, height] = aspectRatio.split(":");
|
|
1352
|
+
return parseInt(width, 10) / parseInt(height, 10);
|
|
1353
|
+
}
|
|
1354
|
+
async function resolveAspectRatio({ src, aspectRatio }) {
|
|
1355
|
+
if (typeof src === "string") {
|
|
1356
|
+
return parseAspectRatio(aspectRatio);
|
|
1357
|
+
}
|
|
1358
|
+
throw new Error('Custom (faster) `Picture.runtime.astro` works only with string ("remote") src');
|
|
1359
|
+
}
|
|
1360
|
+
async function resolveFormats({ src, formats }) {
|
|
1361
|
+
const unique = new Set(formats);
|
|
1362
|
+
if (typeof src === "string") {
|
|
1363
|
+
unique.add(extname(src).replace(".", ""));
|
|
1364
|
+
} else {
|
|
1365
|
+
throw new Error("Custom `Picture.ssr.astro` works only with string src");
|
|
1366
|
+
}
|
|
1367
|
+
return Array.from(unique).filter(Boolean);
|
|
1607
1368
|
}
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
const
|
|
1611
|
-
|
|
1612
|
-
|
|
1369
|
+
const createPictureGetter = (getImage) => {
|
|
1370
|
+
return async (params) => {
|
|
1371
|
+
const {
|
|
1372
|
+
src,
|
|
1373
|
+
alt,
|
|
1374
|
+
widths,
|
|
1375
|
+
fit,
|
|
1376
|
+
position,
|
|
1377
|
+
background
|
|
1378
|
+
} = params;
|
|
1379
|
+
if (!src) {
|
|
1380
|
+
throw new Error("[@astrojs/image] `src` is required");
|
|
1381
|
+
}
|
|
1382
|
+
if (!widths || !Array.isArray(widths)) {
|
|
1383
|
+
throw new Error("[@astrojs/image] at least one `width` is required. ex: `widths={[100]}`");
|
|
1384
|
+
}
|
|
1385
|
+
const aspectRatio = await resolveAspectRatio(params);
|
|
1386
|
+
if (!aspectRatio) {
|
|
1387
|
+
throw new Error("`aspectRatio` must be provided for remote images");
|
|
1388
|
+
}
|
|
1389
|
+
const allFormats = await resolveFormats(params);
|
|
1390
|
+
const lastFormat = allFormats[allFormats.length - 1];
|
|
1391
|
+
const maxWidth = Math.max(...widths);
|
|
1392
|
+
let image;
|
|
1393
|
+
async function getSource(format) {
|
|
1394
|
+
const imgs = await Promise.all(
|
|
1395
|
+
widths.map(async (width) => {
|
|
1396
|
+
const img = await getImage({
|
|
1397
|
+
src,
|
|
1398
|
+
alt,
|
|
1399
|
+
format,
|
|
1400
|
+
width,
|
|
1401
|
+
height: width / aspectRatio,
|
|
1402
|
+
fit,
|
|
1403
|
+
position,
|
|
1404
|
+
background,
|
|
1405
|
+
aspectRatio
|
|
1406
|
+
});
|
|
1407
|
+
if (format === lastFormat && width === maxWidth) {
|
|
1408
|
+
image = img;
|
|
1409
|
+
}
|
|
1410
|
+
return `${img.src} ${width}w`;
|
|
1411
|
+
})
|
|
1412
|
+
);
|
|
1413
|
+
return {
|
|
1414
|
+
type: mime.getType(format) || format,
|
|
1415
|
+
srcset: imgs.join(",")
|
|
1416
|
+
};
|
|
1613
1417
|
}
|
|
1418
|
+
const sources = await Promise.all(allFormats.map((format) => getSource(format)));
|
|
1419
|
+
return {
|
|
1420
|
+
sources,
|
|
1421
|
+
// @ts-ignore
|
|
1422
|
+
image
|
|
1423
|
+
};
|
|
1424
|
+
};
|
|
1425
|
+
};
|
|
1426
|
+
|
|
1427
|
+
const { STOREFRONT_BASE_DIR } = process.env;
|
|
1428
|
+
const baseDir = STOREFRONT_BASE_DIR || process.cwd();
|
|
1429
|
+
const builtImages = [];
|
|
1430
|
+
const manifestFilepath = join(baseDir, "dist/server/images.dist.csv");
|
|
1431
|
+
try {
|
|
1432
|
+
readFileSync(manifestFilepath, "utf-8").split(/\n/).forEach((line) => {
|
|
1433
|
+
const [filename, width, height] = line.split(",");
|
|
1434
|
+
builtImages.push({
|
|
1435
|
+
filename,
|
|
1436
|
+
width: Number(width),
|
|
1437
|
+
height: Number(height)
|
|
1438
|
+
});
|
|
1439
|
+
});
|
|
1440
|
+
} catch (err) {
|
|
1441
|
+
if (global.$renderStorefront) {
|
|
1442
|
+
console.error(err);
|
|
1614
1443
|
}
|
|
1615
|
-
return ElementWeights.OTHER;
|
|
1616
1444
|
}
|
|
1445
|
+
builtImages.sort((a, b) => {
|
|
1446
|
+
if (a.width < b.width)
|
|
1447
|
+
return -1;
|
|
1448
|
+
return 1;
|
|
1449
|
+
});
|
|
1450
|
+
const getBuiltImage = async ({ src, width, format }) => {
|
|
1451
|
+
const filename = src.replace(/^.*\//, "").replace(/.\w+(\?.*)?$/, "");
|
|
1452
|
+
const filenameRegExp = new RegExp(`[_.][a-z0-9]+\\.${format}$`, "i");
|
|
1453
|
+
const matchFilename = (_builtImage) => {
|
|
1454
|
+
return filename === _builtImage.filename.replace(filenameRegExp, "");
|
|
1455
|
+
};
|
|
1456
|
+
let builtImage = builtImages.find((_builtImage) => {
|
|
1457
|
+
return _builtImage.width >= width && matchFilename(_builtImage);
|
|
1458
|
+
});
|
|
1459
|
+
if (!builtImage) {
|
|
1460
|
+
builtImage = builtImages.find(matchFilename);
|
|
1461
|
+
}
|
|
1462
|
+
if (builtImage) {
|
|
1463
|
+
return {
|
|
1464
|
+
src: `/_astro/${builtImage.filename}`,
|
|
1465
|
+
width: builtImage.width,
|
|
1466
|
+
height: builtImage.height
|
|
1467
|
+
};
|
|
1468
|
+
}
|
|
1469
|
+
console.warn(`Could not match built ${format} image for ${src} ${width}px`);
|
|
1470
|
+
return { src, width };
|
|
1471
|
+
};
|
|
1617
1472
|
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1473
|
+
const getBuiltPicture = createPictureGetter(getBuiltImage);
|
|
1474
|
+
|
|
1475
|
+
const getAspectRatio = (src, tryImageSize) => {
|
|
1476
|
+
if (typeof src === "string") {
|
|
1477
|
+
src = tryImageSize(src);
|
|
1478
|
+
} else if (src.width) {
|
|
1479
|
+
return src.height ? src.width / src.height : 1;
|
|
1480
|
+
}
|
|
1481
|
+
return 0;
|
|
1482
|
+
};
|
|
1483
|
+
const useSSRPicture = async (params) => {
|
|
1484
|
+
const {
|
|
1485
|
+
src,
|
|
1486
|
+
alt,
|
|
1487
|
+
sizes: propSizes,
|
|
1488
|
+
widths,
|
|
1489
|
+
aspectRatio: propAspectRatio,
|
|
1490
|
+
fit,
|
|
1491
|
+
background,
|
|
1492
|
+
position,
|
|
1493
|
+
formats = ["avif", "webp"],
|
|
1494
|
+
loading = "lazy",
|
|
1495
|
+
decoding = "async",
|
|
1496
|
+
hasImg = true,
|
|
1497
|
+
tryImageSize,
|
|
1498
|
+
getPicture,
|
|
1499
|
+
assetsPrefix,
|
|
1500
|
+
...attrs
|
|
1501
|
+
} = params;
|
|
1502
|
+
let aspectRatio;
|
|
1503
|
+
if (propAspectRatio) {
|
|
1504
|
+
if (typeof propAspectRatio === "number") {
|
|
1505
|
+
aspectRatio = propAspectRatio;
|
|
1506
|
+
} else {
|
|
1507
|
+
const [width, height] = propAspectRatio.split(":");
|
|
1508
|
+
aspectRatio = Number(width) / Number(height);
|
|
1509
|
+
}
|
|
1510
|
+
} else if ((!attrs.width || !attrs.height) && typeof src === "string") {
|
|
1511
|
+
const { width, height } = tryImageSize(src);
|
|
1512
|
+
if (width && height) {
|
|
1513
|
+
aspectRatio = getAspectRatio({ width, height }, tryImageSize);
|
|
1514
|
+
let hasSplicedWidths = false;
|
|
1515
|
+
for (let i = widths.length - 1; i >= 0; i--) {
|
|
1516
|
+
if (widths[i] > width) {
|
|
1517
|
+
widths.splice(i, 1);
|
|
1518
|
+
hasSplicedWidths = true;
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
if (hasSplicedWidths) {
|
|
1522
|
+
attrs.width = width;
|
|
1523
|
+
attrs.height = height;
|
|
1524
|
+
if (!widths.find((w) => w === width)) {
|
|
1525
|
+
widths.push(width);
|
|
1526
|
+
}
|
|
1527
|
+
} else {
|
|
1528
|
+
attrs.width = Math.max(...widths);
|
|
1529
|
+
attrs.height = Math.round(attrs.width / aspectRatio);
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
let sizes = propSizes || "";
|
|
1534
|
+
if (!sizes && attrs.class) {
|
|
1535
|
+
const classNames = attrs.class.split(" ");
|
|
1536
|
+
let nextSize;
|
|
1537
|
+
const breakpoints = {
|
|
1538
|
+
sm: 640,
|
|
1539
|
+
md: 768,
|
|
1540
|
+
lg: 1024,
|
|
1541
|
+
xl: 1280,
|
|
1542
|
+
"2xl": 1536
|
|
1543
|
+
};
|
|
1544
|
+
[
|
|
1545
|
+
["", 0],
|
|
1546
|
+
...Object.entries(breakpoints)
|
|
1547
|
+
].forEach(([breakpoint, minWidth]) => {
|
|
1548
|
+
const classRegex = breakpoint ? new RegExp(`^${breakpoint}:max-w-(\\[\\w+\\]|screen-\\w+)$`) : /^max-w-(\[\w+\]|screen-\w+)$/;
|
|
1549
|
+
let classMaxW;
|
|
1550
|
+
classNames.find((_class) => {
|
|
1551
|
+
const maxW = _class.replace(classRegex, "$1");
|
|
1552
|
+
if (maxW !== _class) {
|
|
1553
|
+
classMaxW = maxW;
|
|
1554
|
+
return true;
|
|
1555
|
+
}
|
|
1556
|
+
return false;
|
|
1557
|
+
});
|
|
1558
|
+
if (classMaxW) {
|
|
1559
|
+
if (nextSize) {
|
|
1560
|
+
if (sizes)
|
|
1561
|
+
sizes += ", ";
|
|
1562
|
+
sizes += `(max-width: ${minWidth - 1}px) ${nextSize}`;
|
|
1563
|
+
}
|
|
1564
|
+
if (classMaxW.charAt(0) === "[") {
|
|
1565
|
+
nextSize = classMaxW.slice(1, classMaxW.length - 1);
|
|
1566
|
+
} else {
|
|
1567
|
+
const screenSize = breakpoints[classMaxW.slice(7)];
|
|
1568
|
+
if (screenSize) {
|
|
1569
|
+
nextSize = `${screenSize}px`;
|
|
1570
|
+
}
|
|
1626
1571
|
}
|
|
1627
1572
|
}
|
|
1628
1573
|
});
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1574
|
+
if (nextSize) {
|
|
1575
|
+
if (sizes)
|
|
1576
|
+
sizes += ", ";
|
|
1577
|
+
sizes += nextSize;
|
|
1578
|
+
}
|
|
1579
|
+
}
|
|
1580
|
+
if (!sizes && widths.length === 1) {
|
|
1581
|
+
sizes = `${widths[0] / 2}px`;
|
|
1582
|
+
}
|
|
1583
|
+
const { image, sources } = await getPicture({
|
|
1584
|
+
src,
|
|
1585
|
+
widths,
|
|
1586
|
+
formats,
|
|
1587
|
+
aspectRatio,
|
|
1588
|
+
fit,
|
|
1589
|
+
background,
|
|
1590
|
+
position,
|
|
1591
|
+
alt
|
|
1592
|
+
});
|
|
1593
|
+
delete image.width;
|
|
1594
|
+
delete image.height;
|
|
1595
|
+
if (assetsPrefix && image.src?.charAt(0) === "/") {
|
|
1596
|
+
image.src = `${assetsPrefix}${image.src}`;
|
|
1597
|
+
sources.forEach((source) => {
|
|
1598
|
+
source.srcset = `${assetsPrefix}${source.srcset}`.replace(/,\//g, `,${assetsPrefix}/`);
|
|
1599
|
+
});
|
|
1600
|
+
}
|
|
1601
|
+
const pictureAttrs = {};
|
|
1602
|
+
if (!hasImg) {
|
|
1603
|
+
pictureAttrs["data-alt"] = alt;
|
|
1604
|
+
Object.assign(pictureAttrs, attrs);
|
|
1605
|
+
delete pictureAttrs.width;
|
|
1606
|
+
delete pictureAttrs.height;
|
|
1632
1607
|
}
|
|
1633
|
-
return
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1608
|
+
return {
|
|
1609
|
+
sizes,
|
|
1610
|
+
aspectRatio,
|
|
1611
|
+
sources,
|
|
1612
|
+
pictureAttrs,
|
|
1613
|
+
imgAttrs: !hasImg ? null : {
|
|
1614
|
+
...image,
|
|
1615
|
+
alt,
|
|
1616
|
+
loading,
|
|
1617
|
+
decoding,
|
|
1618
|
+
...attrs
|
|
1640
1619
|
}
|
|
1641
|
-
}
|
|
1642
|
-
|
|
1643
|
-
return { ...head, children };
|
|
1644
|
-
}
|
|
1620
|
+
};
|
|
1621
|
+
};
|
|
1645
1622
|
|
|
1646
|
-
const
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1623
|
+
const $$Astro$d = createAstro("https://demo.ecomplus.app");
|
|
1624
|
+
const $$Picture = createComponent(async ($$result, $$props, $$slots) => {
|
|
1625
|
+
const Astro2 = $$result.createAstro($$Astro$d, $$props, $$slots);
|
|
1626
|
+
Astro2.self = $$Picture;
|
|
1627
|
+
const { STOREFRONT_BASE_DIR } = process.env;
|
|
1628
|
+
const baseDir = STOREFRONT_BASE_DIR || process.cwd();
|
|
1629
|
+
const originalImages = [];
|
|
1630
|
+
const manifestFilepath = join(baseDir, "dist/server/images.src.csv");
|
|
1631
|
+
readFileSync(manifestFilepath, "utf-8").split(/\n/).forEach((line) => {
|
|
1632
|
+
const [filepath, width, height] = line.split(",");
|
|
1633
|
+
originalImages.push({
|
|
1634
|
+
filepath,
|
|
1635
|
+
width: Number(width),
|
|
1636
|
+
height: Number(height)
|
|
1637
|
+
});
|
|
1638
|
+
});
|
|
1639
|
+
const tryImageSize = (src) => {
|
|
1640
|
+
let dimensions = {};
|
|
1641
|
+
if (typeof src === "string" && src.startsWith("/")) {
|
|
1642
|
+
const originalImage = originalImages.find(({ filepath }) => {
|
|
1643
|
+
return new RegExp(`^/${filepath}\\??.*`).test(src);
|
|
1644
|
+
});
|
|
1645
|
+
if (originalImage) {
|
|
1646
|
+
const { width, height } = originalImage;
|
|
1647
|
+
dimensions = { width, height };
|
|
1648
|
+
}
|
|
1649
|
+
}
|
|
1650
|
+
return dimensions;
|
|
1651
|
+
};
|
|
1652
|
+
const {
|
|
1653
|
+
sizes,
|
|
1654
|
+
sources,
|
|
1655
|
+
pictureAttrs,
|
|
1656
|
+
imgAttrs
|
|
1657
|
+
} = await useSSRPicture({
|
|
1658
|
+
...Astro2.props,
|
|
1659
|
+
tryImageSize,
|
|
1660
|
+
getPicture: getBuiltPicture,
|
|
1661
|
+
assetsPrefix: Astro2.locals.assetsPrefix
|
|
1662
|
+
});
|
|
1663
|
+
return renderTemplate`${maybeRenderHead()}<picture${spreadAttributes(pictureAttrs)}> ${sources.map((attrs) => renderTemplate`<source${spreadAttributes(attrs)}${addAttribute(sizes, "sizes")}>`)} ${imgAttrs && renderTemplate`<img${spreadAttributes(imgAttrs)}>`} </picture>`;
|
|
1664
|
+
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/images/Picture.runtime.astro", void 0);
|
|
1656
1665
|
|
|
1657
1666
|
const $$Astro$c = createAstro("https://demo.ecomplus.app");
|
|
1658
1667
|
const $$BaseBody = createComponent(async ($$result, $$props, $$slots) => {
|
|
@@ -1689,176 +1698,6 @@ const $$Base = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
1689
1698
|
return renderTemplate`${renderComponent($$result, "SfBase", $$Base$1, {}, { "base-head": ($$result2) => renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "slot": "base-head" }, { "default": ($$result3) => renderTemplate` ${renderSlot$1($$result3, $$slots["base-head"])} ` })}`, "before-head-end": ($$result2) => renderTemplate`${renderComponent($$result2, "InlineScripts", $$InlineScripts, { "slot": "before-head-end" })}`, "default": ($$result2) => renderTemplate` ${renderSlot$1($$result2, $$slots["default"])} ` })}`;
|
|
1690
1699
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Base.astro", void 0);
|
|
1691
1700
|
|
|
1692
|
-
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
1693
|
-
__name: "PaymentMethodFlag",
|
|
1694
|
-
props: {
|
|
1695
|
-
as: { default: "i" },
|
|
1696
|
-
flag: {}
|
|
1697
|
-
},
|
|
1698
|
-
setup(__props, { expose: __expose }) {
|
|
1699
|
-
__expose();
|
|
1700
|
-
const props = __props;
|
|
1701
|
-
const iconClassName = computed(() => {
|
|
1702
|
-
switch (props.flag) {
|
|
1703
|
-
case "pix":
|
|
1704
|
-
return "i-pix text-[#77B6A8]";
|
|
1705
|
-
case "visa":
|
|
1706
|
-
return "i-visa";
|
|
1707
|
-
case "mastercard":
|
|
1708
|
-
return "i-mastercard";
|
|
1709
|
-
case "elo":
|
|
1710
|
-
return "i-elo";
|
|
1711
|
-
case "amex":
|
|
1712
|
-
return "i-amex";
|
|
1713
|
-
case "hipercard":
|
|
1714
|
-
return "i-hipercard";
|
|
1715
|
-
case "diners":
|
|
1716
|
-
return "i-dinersclub";
|
|
1717
|
-
case "discover":
|
|
1718
|
-
return "i-discover";
|
|
1719
|
-
default:
|
|
1720
|
-
return "";
|
|
1721
|
-
}
|
|
1722
|
-
});
|
|
1723
|
-
const __returned__ = { props, iconClassName };
|
|
1724
|
-
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
1725
|
-
return __returned__;
|
|
1726
|
-
}
|
|
1727
|
-
});
|
|
1728
|
-
function _sfc_ssrRender$z(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
1729
|
-
if (!$setup.iconClassName) {
|
|
1730
|
-
_push(`<b${ssrRenderAttrs(mergeProps({ class: "mb-1 text-[57%] leading-none tracking-tighter text-black" }, _attrs))}>${ssrInterpolate($setup.props.flag)}</b>`);
|
|
1731
|
-
} else {
|
|
1732
|
-
ssrRenderVNode(_push, createVNode(resolveDynamicComponent($props.as), mergeProps({ class: $setup.iconClassName }, _attrs), null), _parent);
|
|
1733
|
-
}
|
|
1734
|
-
}
|
|
1735
|
-
const _sfc_setup$z = _sfc_main$z.setup;
|
|
1736
|
-
_sfc_main$z.setup = (props, ctx) => {
|
|
1737
|
-
const ssrContext = useSSRContext();
|
|
1738
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/PaymentMethodFlag.vue");
|
|
1739
|
-
return _sfc_setup$z ? _sfc_setup$z(props, ctx) : void 0;
|
|
1740
|
-
};
|
|
1741
|
-
const PaymentMethodFlag = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["ssrRender", _sfc_ssrRender$z]]);
|
|
1742
|
-
|
|
1743
|
-
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
1744
|
-
__name: "FooterStamps",
|
|
1745
|
-
props: {
|
|
1746
|
-
stamps: {}
|
|
1747
|
-
},
|
|
1748
|
-
setup(__props, { expose: __expose }) {
|
|
1749
|
-
__expose();
|
|
1750
|
-
const __returned__ = { PaymentMethodFlag };
|
|
1751
|
-
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
1752
|
-
return __returned__;
|
|
1753
|
-
}
|
|
1754
|
-
});
|
|
1755
|
-
function _sfc_ssrRender$y(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
1756
|
-
const _component_ALink = resolveComponent("ALink");
|
|
1757
|
-
_push(`<div${ssrRenderAttrs(mergeProps({ class: "ui-section" }, _attrs))}><div class="flex flex-wrap items-start justify-between gap-5 lg:flex-nowrap"><ul class="mx-auto flex items-center gap-x-6 gap-y-3 overflow-x-auto md:mx-0 md:flex-wrap md:overflow-hidden lg:gap-x-8"><!--[-->`);
|
|
1758
|
-
ssrRenderList($props.stamps, (stamp, i) => {
|
|
1759
|
-
_push(`<li>`);
|
|
1760
|
-
_push(ssrRenderComponent(_component_ALink, {
|
|
1761
|
-
href: stamp.href?.replace("{domain}", _ctx.$settings.domain || "")
|
|
1762
|
-
}, {
|
|
1763
|
-
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1764
|
-
if (_push2) {
|
|
1765
|
-
ssrRenderSlot(_ctx.$slots, `picture-${i}`, {}, null, _push2, _parent2, _scopeId);
|
|
1766
|
-
if (!stamp.img) {
|
|
1767
|
-
_push2(`<span class="flex items-center"${_scopeId}>`);
|
|
1768
|
-
if (stamp.icon) {
|
|
1769
|
-
_push2(`<span class="[&>*]:from-success-200 [&>*]:to-success-700 mr-2 text-4xl [&>*]:bg-gradient-to-br"${_scopeId}>`);
|
|
1770
|
-
if (stamp.icon === "lock") {
|
|
1771
|
-
_push2(`<i class="i-lock-closed"${_scopeId}></i>`);
|
|
1772
|
-
} else if (stamp.icon === "check") {
|
|
1773
|
-
_push2(`<i class="i-check-badge"${_scopeId}></i>`);
|
|
1774
|
-
} else {
|
|
1775
|
-
_push2(`<i class="i-arrow-path-rounded-square"${_scopeId}></i>`);
|
|
1776
|
-
}
|
|
1777
|
-
_push2(`</span>`);
|
|
1778
|
-
} else {
|
|
1779
|
-
_push2(`<!---->`);
|
|
1780
|
-
}
|
|
1781
|
-
_push2(`<span class="text-base-600 max-w-[140px] text-sm font-medium"${_scopeId}>${ssrInterpolate(stamp.alt)} `);
|
|
1782
|
-
if (stamp.href && stamp.href.charAt(0) !== "/") {
|
|
1783
|
-
_push2(`<i class="bg-base-400 i-arrow-top-right-on-square ml-0.5"${_scopeId}></i>`);
|
|
1784
|
-
} else {
|
|
1785
|
-
_push2(`<!---->`);
|
|
1786
|
-
}
|
|
1787
|
-
_push2(`</span></span>`);
|
|
1788
|
-
} else {
|
|
1789
|
-
_push2(`<!---->`);
|
|
1790
|
-
}
|
|
1791
|
-
} else {
|
|
1792
|
-
return [
|
|
1793
|
-
renderSlot(_ctx.$slots, `picture-${i}`),
|
|
1794
|
-
!stamp.img ? (openBlock(), createBlock("span", {
|
|
1795
|
-
key: 0,
|
|
1796
|
-
class: "flex items-center"
|
|
1797
|
-
}, [
|
|
1798
|
-
stamp.icon ? (openBlock(), createBlock("span", {
|
|
1799
|
-
key: 0,
|
|
1800
|
-
class: "[&>*]:from-success-200 [&>*]:to-success-700 mr-2 text-4xl [&>*]:bg-gradient-to-br"
|
|
1801
|
-
}, [
|
|
1802
|
-
stamp.icon === "lock" ? (openBlock(), createBlock("i", {
|
|
1803
|
-
key: 0,
|
|
1804
|
-
class: "i-lock-closed"
|
|
1805
|
-
})) : stamp.icon === "check" ? (openBlock(), createBlock("i", {
|
|
1806
|
-
key: 1,
|
|
1807
|
-
class: "i-check-badge"
|
|
1808
|
-
})) : (openBlock(), createBlock("i", {
|
|
1809
|
-
key: 2,
|
|
1810
|
-
class: "i-arrow-path-rounded-square"
|
|
1811
|
-
}))
|
|
1812
|
-
])) : createCommentVNode("", true),
|
|
1813
|
-
createVNode("span", { class: "text-base-600 max-w-[140px] text-sm font-medium" }, [
|
|
1814
|
-
createTextVNode(toDisplayString(stamp.alt) + " ", 1),
|
|
1815
|
-
stamp.href && stamp.href.charAt(0) !== "/" ? (openBlock(), createBlock("i", {
|
|
1816
|
-
key: 0,
|
|
1817
|
-
class: "bg-base-400 i-arrow-top-right-on-square ml-0.5"
|
|
1818
|
-
})) : createCommentVNode("", true)
|
|
1819
|
-
])
|
|
1820
|
-
])) : createCommentVNode("", true)
|
|
1821
|
-
];
|
|
1822
|
-
}
|
|
1823
|
-
}),
|
|
1824
|
-
_: 2
|
|
1825
|
-
}, _parent));
|
|
1826
|
-
_push(`</li>`);
|
|
1827
|
-
});
|
|
1828
|
-
_push(`<!--]--></ul><div class="mx-auto flex flex-wrap items-center justify-end gap-4 overflow-x-auto text-2xl md:mx-0 md:flex-nowrap md:overflow-hidden"><!--[-->`);
|
|
1829
|
-
ssrRenderList(_ctx.$settings.paymentMethods, (paymentMethod) => {
|
|
1830
|
-
_push(ssrRenderComponent($setup["PaymentMethodFlag"], {
|
|
1831
|
-
key: paymentMethod,
|
|
1832
|
-
flag: paymentMethod
|
|
1833
|
-
}, null, _parent));
|
|
1834
|
-
});
|
|
1835
|
-
_push(`<!--]--></div></div><div class="mt-7 justify-between gap-4 text-center text-xs md:flex md:text-left"><div class="mb-3 md:mb-0"> @ ${ssrInterpolate((/* @__PURE__ */ new Date()).getFullYear())} ${ssrInterpolate(_ctx.$settings.corporateName)} ${ssrInterpolate(_ctx.$settings.address ? `/ ${_ctx.$settings.address}` : "")} / ${ssrInterpolate(_ctx.$settings.docNumber)}</div>`);
|
|
1836
|
-
_push(ssrRenderComponent(_component_ALink, {
|
|
1837
|
-
href: "https://www.ecomplus.io/",
|
|
1838
|
-
class: "italic text-[#37003c]"
|
|
1839
|
-
}, {
|
|
1840
|
-
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1841
|
-
if (_push2) {
|
|
1842
|
-
_push2(` powered by <b${_scopeId}>e-com.plus</b>`);
|
|
1843
|
-
} else {
|
|
1844
|
-
return [
|
|
1845
|
-
createTextVNode(" powered by "),
|
|
1846
|
-
createVNode("b", null, "e-com.plus")
|
|
1847
|
-
];
|
|
1848
|
-
}
|
|
1849
|
-
}),
|
|
1850
|
-
_: 1
|
|
1851
|
-
}, _parent));
|
|
1852
|
-
_push(`</div></div>`);
|
|
1853
|
-
}
|
|
1854
|
-
const _sfc_setup$y = _sfc_main$y.setup;
|
|
1855
|
-
_sfc_main$y.setup = (props, ctx) => {
|
|
1856
|
-
const ssrContext = useSSRContext();
|
|
1857
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/FooterStamps.vue");
|
|
1858
|
-
return _sfc_setup$y ? _sfc_setup$y(props, ctx) : void 0;
|
|
1859
|
-
};
|
|
1860
|
-
const FooterStamps = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["ssrRender", _sfc_ssrRender$y]]);
|
|
1861
|
-
|
|
1862
1701
|
const emitter = new EventEmitter();
|
|
1863
1702
|
const useSharedData = async (props) => {
|
|
1864
1703
|
const { field, timeout = 1e3 } = props;
|
|
@@ -2093,7 +1932,7 @@ const usePageHeader = async ({ routeContext, listedCategoryFields }) => {
|
|
|
2093
1932
|
};
|
|
2094
1933
|
};
|
|
2095
1934
|
|
|
2096
|
-
const _sfc_main$
|
|
1935
|
+
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
2097
1936
|
__name: "PitchBar",
|
|
2098
1937
|
props: {
|
|
2099
1938
|
slides: {}
|
|
@@ -2110,7 +1949,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
2110
1949
|
return __returned__;
|
|
2111
1950
|
}
|
|
2112
1951
|
});
|
|
2113
|
-
function _sfc_ssrRender$
|
|
1952
|
+
function _sfc_ssrRender$A(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
2114
1953
|
const _component_Carousel = resolveComponent("Carousel");
|
|
2115
1954
|
const _component_ALink = resolveComponent("ALink");
|
|
2116
1955
|
const _component_CarouselControl = resolveComponent("CarouselControl");
|
|
@@ -2203,13 +2042,13 @@ function _sfc_ssrRender$x(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
2203
2042
|
}, _parent));
|
|
2204
2043
|
_push(`</div></div>`);
|
|
2205
2044
|
}
|
|
2206
|
-
const _sfc_setup$
|
|
2207
|
-
_sfc_main$
|
|
2045
|
+
const _sfc_setup$A = _sfc_main$A.setup;
|
|
2046
|
+
_sfc_main$A.setup = (props, ctx) => {
|
|
2208
2047
|
const ssrContext = useSSRContext();
|
|
2209
2048
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/PitchBar.vue");
|
|
2210
|
-
return _sfc_setup$
|
|
2049
|
+
return _sfc_setup$A ? _sfc_setup$A(props, ctx) : void 0;
|
|
2211
2050
|
};
|
|
2212
|
-
const PitchBar = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2051
|
+
const PitchBar = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["ssrRender", _sfc_ssrRender$A]]);
|
|
2213
2052
|
|
|
2214
2053
|
const useStorage = (key, initialValue, storage = globalThis.localStorage) => {
|
|
2215
2054
|
if (!storage) {
|
|
@@ -2409,7 +2248,7 @@ const useStickyHeader = (props) => {
|
|
|
2409
2248
|
watchDebounced(_y, (nextY) => {
|
|
2410
2249
|
y.value = nextY;
|
|
2411
2250
|
}, {
|
|
2412
|
-
debounce: isMobile ? 100 :
|
|
2251
|
+
debounce: isMobile ? 100 : 20,
|
|
2413
2252
|
maxWait: isMobile ? 800 : 400
|
|
2414
2253
|
});
|
|
2415
2254
|
const isSticky = computed(() => ready.value && y.value > staticY.value * 1.2);
|
|
@@ -2593,7 +2432,7 @@ const useShopHeader = (props) => {
|
|
|
2593
2432
|
};
|
|
2594
2433
|
};
|
|
2595
2434
|
|
|
2596
|
-
const _sfc_main$
|
|
2435
|
+
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
2597
2436
|
__name: "Drawer",
|
|
2598
2437
|
props: {
|
|
2599
2438
|
modelValue: { type: Boolean, default: false },
|
|
@@ -2696,7 +2535,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
2696
2535
|
return __returned__;
|
|
2697
2536
|
}
|
|
2698
2537
|
});
|
|
2699
|
-
function _sfc_ssrRender$
|
|
2538
|
+
function _sfc_ssrRender$z(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
2700
2539
|
const _component_Fade = resolveComponent("Fade");
|
|
2701
2540
|
_push(ssrRenderComponent(_component_Fade, mergeProps({
|
|
2702
2541
|
slide: $setup.slideTo,
|
|
@@ -2822,13 +2661,13 @@ function _sfc_ssrRender$w(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
2822
2661
|
_: 3
|
|
2823
2662
|
}, _parent));
|
|
2824
2663
|
}
|
|
2825
|
-
const _sfc_setup$
|
|
2826
|
-
_sfc_main$
|
|
2664
|
+
const _sfc_setup$z = _sfc_main$z.setup;
|
|
2665
|
+
_sfc_main$z.setup = (props, ctx) => {
|
|
2827
2666
|
const ssrContext = useSSRContext();
|
|
2828
2667
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/Drawer.vue");
|
|
2829
|
-
return _sfc_setup$
|
|
2668
|
+
return _sfc_setup$z ? _sfc_setup$z(props, ctx) : void 0;
|
|
2830
2669
|
};
|
|
2831
|
-
const Drawer = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2670
|
+
const Drawer = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["ssrRender", _sfc_ssrRender$z]]);
|
|
2832
2671
|
|
|
2833
2672
|
const storageKey$1 = "ecomSession";
|
|
2834
2673
|
const emptySession = {
|
|
@@ -2867,7 +2706,7 @@ const initializeFirebaseAuth = (canWaitIdle) => {
|
|
|
2867
2706
|
return;
|
|
2868
2707
|
};
|
|
2869
2708
|
|
|
2870
|
-
const _sfc_main$
|
|
2709
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
2871
2710
|
__name: "AccountLink",
|
|
2872
2711
|
props: {
|
|
2873
2712
|
to: {},
|
|
@@ -2909,20 +2748,20 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
2909
2748
|
return __returned__;
|
|
2910
2749
|
}
|
|
2911
2750
|
});
|
|
2912
|
-
function _sfc_ssrRender$
|
|
2751
|
+
function _sfc_ssrRender$y(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
2913
2752
|
_push(`<a${ssrRenderAttrs(mergeProps({ href: $setup.href }, _attrs))}>`);
|
|
2914
2753
|
ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
|
|
2915
2754
|
_push(`</a>`);
|
|
2916
2755
|
}
|
|
2917
|
-
const _sfc_setup$
|
|
2918
|
-
_sfc_main$
|
|
2756
|
+
const _sfc_setup$y = _sfc_main$y.setup;
|
|
2757
|
+
_sfc_main$y.setup = (props, ctx) => {
|
|
2919
2758
|
const ssrContext = useSSRContext();
|
|
2920
2759
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/AccountLink.vue");
|
|
2921
|
-
return _sfc_setup$
|
|
2760
|
+
return _sfc_setup$y ? _sfc_setup$y(props, ctx) : void 0;
|
|
2922
2761
|
};
|
|
2923
|
-
const AccountLink = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2762
|
+
const AccountLink = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["ssrRender", _sfc_ssrRender$y]]);
|
|
2924
2763
|
|
|
2925
|
-
const _sfc_main$
|
|
2764
|
+
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
2926
2765
|
__name: "SocialNetworkIcon",
|
|
2927
2766
|
props: {
|
|
2928
2767
|
as: { default: "i" },
|
|
@@ -2958,18 +2797,18 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
2958
2797
|
return __returned__;
|
|
2959
2798
|
}
|
|
2960
2799
|
});
|
|
2961
|
-
function _sfc_ssrRender$
|
|
2800
|
+
function _sfc_ssrRender$x(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
2962
2801
|
ssrRenderVNode(_push, createVNode(resolveDynamicComponent($props.as), mergeProps({ class: $setup.iconClassName }, _attrs), null), _parent);
|
|
2963
2802
|
}
|
|
2964
|
-
const _sfc_setup$
|
|
2965
|
-
_sfc_main$
|
|
2803
|
+
const _sfc_setup$x = _sfc_main$x.setup;
|
|
2804
|
+
_sfc_main$x.setup = (props, ctx) => {
|
|
2966
2805
|
const ssrContext = useSSRContext();
|
|
2967
2806
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/SocialNetworkIcon.vue");
|
|
2968
|
-
return _sfc_setup$
|
|
2807
|
+
return _sfc_setup$x ? _sfc_setup$x(props, ctx) : void 0;
|
|
2969
2808
|
};
|
|
2970
|
-
const SocialNetworkIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2809
|
+
const SocialNetworkIcon = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["ssrRender", _sfc_ssrRender$x]]);
|
|
2971
2810
|
|
|
2972
|
-
const _sfc_main$
|
|
2811
|
+
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
2973
2812
|
__name: "SocialNetworkLink",
|
|
2974
2813
|
props: {
|
|
2975
2814
|
network: {},
|
|
@@ -2995,7 +2834,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
2995
2834
|
return __returned__;
|
|
2996
2835
|
}
|
|
2997
2836
|
});
|
|
2998
|
-
function _sfc_ssrRender$
|
|
2837
|
+
function _sfc_ssrRender$w(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
2999
2838
|
const _component_ALink = resolveComponent("ALink");
|
|
3000
2839
|
_push(ssrRenderComponent(_component_ALink, mergeProps({ href: $setup.fixedHref }, _attrs), {
|
|
3001
2840
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
@@ -3016,15 +2855,15 @@ function _sfc_ssrRender$t(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
3016
2855
|
_: 3
|
|
3017
2856
|
}, _parent));
|
|
3018
2857
|
}
|
|
3019
|
-
const _sfc_setup$
|
|
3020
|
-
_sfc_main$
|
|
2858
|
+
const _sfc_setup$w = _sfc_main$w.setup;
|
|
2859
|
+
_sfc_main$w.setup = (props, ctx) => {
|
|
3021
2860
|
const ssrContext = useSSRContext();
|
|
3022
2861
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/SocialNetworkLink.vue");
|
|
3023
|
-
return _sfc_setup$
|
|
2862
|
+
return _sfc_setup$w ? _sfc_setup$w(props, ctx) : void 0;
|
|
3024
2863
|
};
|
|
3025
|
-
const SocialNetworkLink = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2864
|
+
const SocialNetworkLink = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["ssrRender", _sfc_ssrRender$w]]);
|
|
3026
2865
|
|
|
3027
|
-
const _sfc_main$
|
|
2866
|
+
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
3028
2867
|
__name: "ShopSidenavCategory",
|
|
3029
2868
|
props: {
|
|
3030
2869
|
categoryTree: {}
|
|
@@ -3047,7 +2886,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
3047
2886
|
return __returned__;
|
|
3048
2887
|
}
|
|
3049
2888
|
});
|
|
3050
|
-
function _sfc_ssrRender$
|
|
2889
|
+
function _sfc_ssrRender$v(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
3051
2890
|
const _component_AImg = resolveComponent("AImg");
|
|
3052
2891
|
const _component_ShopSidenavCategory = resolveComponent("ShopSidenavCategory", true);
|
|
3053
2892
|
_push(`<li${ssrRenderAttrs(mergeProps({ class: "text-base-800 text-lg" }, _attrs))}>`);
|
|
@@ -3085,15 +2924,15 @@ function _sfc_ssrRender$s(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
3085
2924
|
}
|
|
3086
2925
|
_push(`</li>`);
|
|
3087
2926
|
}
|
|
3088
|
-
const _sfc_setup$
|
|
3089
|
-
_sfc_main$
|
|
2927
|
+
const _sfc_setup$v = _sfc_main$v.setup;
|
|
2928
|
+
_sfc_main$v.setup = (props, ctx) => {
|
|
3090
2929
|
const ssrContext = useSSRContext();
|
|
3091
2930
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ShopSidenavCategory.vue");
|
|
3092
|
-
return _sfc_setup$
|
|
2931
|
+
return _sfc_setup$v ? _sfc_setup$v(props, ctx) : void 0;
|
|
3093
2932
|
};
|
|
3094
|
-
const ShopSidenavCategory = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2933
|
+
const ShopSidenavCategory = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["ssrRender", _sfc_ssrRender$v]]);
|
|
3095
2934
|
|
|
3096
|
-
const _sfc_main$
|
|
2935
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
3097
2936
|
__name: "ShopSidenav",
|
|
3098
2937
|
props: {
|
|
3099
2938
|
categoryTrees: {}
|
|
@@ -3114,7 +2953,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
3114
2953
|
return __returned__;
|
|
3115
2954
|
}
|
|
3116
2955
|
});
|
|
3117
|
-
function _sfc_ssrRender$
|
|
2956
|
+
function _sfc_ssrRender$u(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
3118
2957
|
_push(`<aside${ssrRenderAttrs(mergeProps({ class: "flex h-full flex-col bg-white" }, _attrs))}><nav class="grow py-4"><ul class="relative h-full"><!--[-->`);
|
|
3119
2958
|
ssrRenderList($props.categoryTrees, (categoryTree, i) => {
|
|
3120
2959
|
_push(ssrRenderComponent($setup["ShopSidenavCategory"], {
|
|
@@ -3155,13 +2994,13 @@ function _sfc_ssrRender$r(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
3155
2994
|
});
|
|
3156
2995
|
_push(`<!--]--></ul></footer></aside>`);
|
|
3157
2996
|
}
|
|
3158
|
-
const _sfc_setup$
|
|
3159
|
-
_sfc_main$
|
|
2997
|
+
const _sfc_setup$u = _sfc_main$u.setup;
|
|
2998
|
+
_sfc_main$u.setup = (props, ctx) => {
|
|
3160
2999
|
const ssrContext = useSSRContext();
|
|
3161
3000
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ShopSidenav.vue");
|
|
3162
|
-
return _sfc_setup$
|
|
3001
|
+
return _sfc_setup$u ? _sfc_setup$u(props, ctx) : void 0;
|
|
3163
3002
|
};
|
|
3164
|
-
const ShopSidenav = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3003
|
+
const ShopSidenav = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["ssrRender", _sfc_ssrRender$u]]);
|
|
3165
3004
|
|
|
3166
3005
|
const useShopHeaderSubmenu = (props) => {
|
|
3167
3006
|
const categoryPicture = computed(() => {
|
|
@@ -3210,7 +3049,7 @@ const useShopHeaderSubmenu = (props) => {
|
|
|
3210
3049
|
};
|
|
3211
3050
|
};
|
|
3212
3051
|
|
|
3213
|
-
const _sfc_main$
|
|
3052
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
3214
3053
|
__name: "ShopHeaderSubmenu",
|
|
3215
3054
|
props: {
|
|
3216
3055
|
categoryTree: {},
|
|
@@ -3239,14 +3078,17 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
3239
3078
|
return __returned__;
|
|
3240
3079
|
}
|
|
3241
3080
|
});
|
|
3242
|
-
function _sfc_ssrRender$
|
|
3081
|
+
function _sfc_ssrRender$t(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
3243
3082
|
const _component_Fade = resolveComponent("Fade");
|
|
3244
3083
|
const _component_AImg = resolveComponent("AImg");
|
|
3245
3084
|
_push(ssrRenderComponent($setup["Popover"], _attrs, {
|
|
3246
3085
|
default: withCtx(({ open }, _push2, _parent2, _scopeId) => {
|
|
3247
3086
|
if (_push2) {
|
|
3248
3087
|
_push2(`<a${ssrRenderAttr("href", `/${$props.categoryTree.slug}`)} role="button"${_scopeId}>`);
|
|
3249
|
-
_push2(ssrRenderComponent($setup["PopoverButton"], {
|
|
3088
|
+
_push2(ssrRenderComponent($setup["PopoverButton"], {
|
|
3089
|
+
id: `PopB${$props.categoryTree._id || _ctx.$useId("c")}`,
|
|
3090
|
+
class: "outline-none"
|
|
3091
|
+
}, {
|
|
3250
3092
|
default: withCtx((_, _push3, _parent3, _scopeId2) => {
|
|
3251
3093
|
if (_push3) {
|
|
3252
3094
|
ssrRenderSlot(_ctx.$slots, "button", { open }, null, _push3, _parent3, _scopeId2);
|
|
@@ -3457,12 +3299,15 @@ function _sfc_ssrRender$q(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
3457
3299
|
href: `/${$props.categoryTree.slug}`,
|
|
3458
3300
|
role: "button"
|
|
3459
3301
|
}, [
|
|
3460
|
-
createVNode($setup["PopoverButton"], {
|
|
3302
|
+
createVNode($setup["PopoverButton"], {
|
|
3303
|
+
id: `PopB${$props.categoryTree._id || _ctx.$useId("c")}`,
|
|
3304
|
+
class: "outline-none"
|
|
3305
|
+
}, {
|
|
3461
3306
|
default: withCtx(() => [
|
|
3462
3307
|
renderSlot(_ctx.$slots, "button", { open })
|
|
3463
3308
|
]),
|
|
3464
3309
|
_: 2
|
|
3465
|
-
},
|
|
3310
|
+
}, 1032, ["id"])
|
|
3466
3311
|
], 8, ["href"]),
|
|
3467
3312
|
createVNode("div", {
|
|
3468
3313
|
class: "relative",
|
|
@@ -3553,15 +3398,15 @@ function _sfc_ssrRender$q(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
3553
3398
|
_: 3
|
|
3554
3399
|
}, _parent));
|
|
3555
3400
|
}
|
|
3556
|
-
const _sfc_setup$
|
|
3557
|
-
_sfc_main$
|
|
3401
|
+
const _sfc_setup$t = _sfc_main$t.setup;
|
|
3402
|
+
_sfc_main$t.setup = (props, ctx) => {
|
|
3558
3403
|
const ssrContext = useSSRContext();
|
|
3559
3404
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ShopHeaderSubmenu.vue");
|
|
3560
|
-
return _sfc_setup$
|
|
3405
|
+
return _sfc_setup$t ? _sfc_setup$t(props, ctx) : void 0;
|
|
3561
3406
|
};
|
|
3562
|
-
const ShopHeaderSubmenu = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3407
|
+
const ShopHeaderSubmenu = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["ssrRender", _sfc_ssrRender$t]]);
|
|
3563
3408
|
|
|
3564
|
-
const _sfc_main$
|
|
3409
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
3565
3410
|
__name: "ShopHeaderMenu",
|
|
3566
3411
|
props: {
|
|
3567
3412
|
inlineMenuTrees: {}
|
|
@@ -3577,7 +3422,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
3577
3422
|
return __returned__;
|
|
3578
3423
|
}
|
|
3579
3424
|
});
|
|
3580
|
-
function _sfc_ssrRender$
|
|
3425
|
+
function _sfc_ssrRender$s(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
3581
3426
|
_push(`<nav${ssrRenderAttrs(_attrs)}><ul class="${ssrRenderClass([$props.inlineMenuTrees.length < 7 ? "text-base" : "text-sm", "text-base-700 flex gap-4 xl:gap-5"])}"><!--[-->`);
|
|
3582
3427
|
ssrRenderList($props.inlineMenuTrees, (categoryTree, i) => {
|
|
3583
3428
|
_push(`<li>`);
|
|
@@ -3621,15 +3466,15 @@ function _sfc_ssrRender$p(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
3621
3466
|
});
|
|
3622
3467
|
_push(`<!--]--></ul></nav>`);
|
|
3623
3468
|
}
|
|
3624
|
-
const _sfc_setup$
|
|
3625
|
-
_sfc_main$
|
|
3469
|
+
const _sfc_setup$s = _sfc_main$s.setup;
|
|
3470
|
+
_sfc_main$s.setup = (props, ctx) => {
|
|
3626
3471
|
const ssrContext = useSSRContext();
|
|
3627
3472
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ShopHeaderMenu.vue");
|
|
3628
|
-
return _sfc_setup$
|
|
3473
|
+
return _sfc_setup$s ? _sfc_setup$s(props, ctx) : void 0;
|
|
3629
3474
|
};
|
|
3630
|
-
const ShopHeaderMenu = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3475
|
+
const ShopHeaderMenu = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["ssrRender", _sfc_ssrRender$s]]);
|
|
3631
3476
|
|
|
3632
|
-
const _sfc_main$
|
|
3477
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
3633
3478
|
__name: "AccountMenu",
|
|
3634
3479
|
setup(__props, { expose: __expose }) {
|
|
3635
3480
|
__expose();
|
|
@@ -3656,7 +3501,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
3656
3501
|
return __returned__;
|
|
3657
3502
|
}
|
|
3658
3503
|
});
|
|
3659
|
-
function _sfc_ssrRender$
|
|
3504
|
+
function _sfc_ssrRender$r(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
3660
3505
|
const _component_Fade = resolveComponent("Fade");
|
|
3661
3506
|
const _component_ALink = resolveComponent("ALink");
|
|
3662
3507
|
_push(ssrRenderComponent($setup["Menu"], mergeProps({
|
|
@@ -3678,6 +3523,7 @@ function _sfc_ssrRender$o(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
3678
3523
|
default: withCtx((_, _push3, _parent3, _scopeId2) => {
|
|
3679
3524
|
if (_push3) {
|
|
3680
3525
|
_push3(ssrRenderComponent($setup["MenuButton"], {
|
|
3526
|
+
id: "AccountBtn",
|
|
3681
3527
|
class: "outline-none",
|
|
3682
3528
|
"aria-label": "Minha conta"
|
|
3683
3529
|
}, {
|
|
@@ -3695,6 +3541,7 @@ function _sfc_ssrRender$o(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
3695
3541
|
} else {
|
|
3696
3542
|
return [
|
|
3697
3543
|
createVNode($setup["MenuButton"], {
|
|
3544
|
+
id: "AccountBtn",
|
|
3698
3545
|
class: "outline-none",
|
|
3699
3546
|
"aria-label": "Minha conta"
|
|
3700
3547
|
}, {
|
|
@@ -3823,8 +3670,8 @@ function _sfc_ssrRender$o(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
3823
3670
|
_push4(`<!--[-->`);
|
|
3824
3671
|
ssrRenderList(_ctx.$settings.serviceLinks, ({ title, href }, i) => {
|
|
3825
3672
|
_push4(ssrRenderComponent($setup["MenuItem"], {
|
|
3826
|
-
|
|
3827
|
-
|
|
3673
|
+
key: `s-${i}`,
|
|
3674
|
+
as: "li"
|
|
3828
3675
|
}, {
|
|
3829
3676
|
default: withCtx(({ active }, _push5, _parent5, _scopeId4) => {
|
|
3830
3677
|
if (_push5) {
|
|
@@ -3970,8 +3817,8 @@ function _sfc_ssrRender$o(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
3970
3817
|
}),
|
|
3971
3818
|
(openBlock(true), createBlock(Fragment$1, null, renderList(_ctx.$settings.serviceLinks, ({ title, href }, i) => {
|
|
3972
3819
|
return openBlock(), createBlock($setup["MenuItem"], {
|
|
3973
|
-
|
|
3974
|
-
|
|
3820
|
+
key: `s-${i}`,
|
|
3821
|
+
as: "li"
|
|
3975
3822
|
}, {
|
|
3976
3823
|
default: withCtx(({ active }) => [
|
|
3977
3824
|
createVNode(_component_ALink, {
|
|
@@ -4081,8 +3928,8 @@ function _sfc_ssrRender$o(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
4081
3928
|
}),
|
|
4082
3929
|
(openBlock(true), createBlock(Fragment$1, null, renderList(_ctx.$settings.serviceLinks, ({ title, href }, i) => {
|
|
4083
3930
|
return openBlock(), createBlock($setup["MenuItem"], {
|
|
4084
|
-
|
|
4085
|
-
|
|
3931
|
+
key: `s-${i}`,
|
|
3932
|
+
as: "li"
|
|
4086
3933
|
}, {
|
|
4087
3934
|
default: withCtx(({ active }) => [
|
|
4088
3935
|
createVNode(_component_ALink, {
|
|
@@ -4151,6 +3998,7 @@ function _sfc_ssrRender$o(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
4151
3998
|
}, {
|
|
4152
3999
|
default: withCtx(() => [
|
|
4153
4000
|
createVNode($setup["MenuButton"], {
|
|
4001
|
+
id: "AccountBtn",
|
|
4154
4002
|
class: "outline-none",
|
|
4155
4003
|
"aria-label": "Minha conta"
|
|
4156
4004
|
}, {
|
|
@@ -4220,8 +4068,8 @@ function _sfc_ssrRender$o(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
4220
4068
|
}),
|
|
4221
4069
|
(openBlock(true), createBlock(Fragment$1, null, renderList(_ctx.$settings.serviceLinks, ({ title, href }, i) => {
|
|
4222
4070
|
return openBlock(), createBlock($setup["MenuItem"], {
|
|
4223
|
-
|
|
4224
|
-
|
|
4071
|
+
key: `s-${i}`,
|
|
4072
|
+
as: "li"
|
|
4225
4073
|
}, {
|
|
4226
4074
|
default: withCtx(({ active }) => [
|
|
4227
4075
|
createVNode(_component_ALink, {
|
|
@@ -4280,15 +4128,15 @@ function _sfc_ssrRender$o(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
4280
4128
|
_: 3
|
|
4281
4129
|
}, _parent));
|
|
4282
4130
|
}
|
|
4283
|
-
const _sfc_setup$
|
|
4284
|
-
_sfc_main$
|
|
4131
|
+
const _sfc_setup$r = _sfc_main$r.setup;
|
|
4132
|
+
_sfc_main$r.setup = (props, ctx) => {
|
|
4285
4133
|
const ssrContext = useSSRContext();
|
|
4286
4134
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/AccountMenu.vue");
|
|
4287
|
-
return _sfc_setup$
|
|
4135
|
+
return _sfc_setup$r ? _sfc_setup$r(props, ctx) : void 0;
|
|
4288
4136
|
};
|
|
4289
|
-
const AccountMenu = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4137
|
+
const AccountMenu = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["ssrRender", _sfc_ssrRender$r]]);
|
|
4290
4138
|
|
|
4291
|
-
const _sfc_main$
|
|
4139
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
4292
4140
|
__name: "ShopHeader",
|
|
4293
4141
|
props: {
|
|
4294
4142
|
searchInput: {},
|
|
@@ -4299,8 +4147,8 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
4299
4147
|
},
|
|
4300
4148
|
setup(__props, { expose: __expose }) {
|
|
4301
4149
|
__expose();
|
|
4302
|
-
const SearchModal = defineAsyncComponent(() => import('../
|
|
4303
|
-
const CartSidebar = defineAsyncComponent(() => import('../
|
|
4150
|
+
const SearchModal = defineAsyncComponent(() => import('../SearchModal_Sktaq643.mjs'));
|
|
4151
|
+
const CartSidebar = defineAsyncComponent(() => import('../CartSidebar_blvgfFa-.mjs'));
|
|
4304
4152
|
const props = __props;
|
|
4305
4153
|
const header = ref(null);
|
|
4306
4154
|
const searchInput = ref(null);
|
|
@@ -4332,7 +4180,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
4332
4180
|
return __returned__;
|
|
4333
4181
|
}
|
|
4334
4182
|
});
|
|
4335
|
-
function _sfc_ssrRender$
|
|
4183
|
+
function _sfc_ssrRender$q(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
4336
4184
|
const _component_Fade = resolveComponent("Fade");
|
|
4337
4185
|
const _component_Skeleton = resolveComponent("Skeleton");
|
|
4338
4186
|
_push(`<header${ssrRenderAttrs(mergeProps({
|
|
@@ -4551,34 +4399,204 @@ function _sfc_ssrRender$n(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
4551
4399
|
}
|
|
4552
4400
|
_push(`</header>`);
|
|
4553
4401
|
}
|
|
4554
|
-
const _sfc_setup$
|
|
4555
|
-
_sfc_main$
|
|
4402
|
+
const _sfc_setup$q = _sfc_main$q.setup;
|
|
4403
|
+
_sfc_main$q.setup = (props, ctx) => {
|
|
4404
|
+
const ssrContext = useSSRContext();
|
|
4405
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ShopHeader.vue");
|
|
4406
|
+
return _sfc_setup$q ? _sfc_setup$q(props, ctx) : void 0;
|
|
4407
|
+
};
|
|
4408
|
+
const ShopHeader = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["ssrRender", _sfc_ssrRender$q]]);
|
|
4409
|
+
|
|
4410
|
+
var __freeze$1 = Object.freeze;
|
|
4411
|
+
var __defProp$1 = Object.defineProperty;
|
|
4412
|
+
var __template$1 = (cooked, raw) => __freeze$1(__defProp$1(cooked, "raw", { value: __freeze$1(raw || cooked.slice()) }));
|
|
4413
|
+
var _a$1;
|
|
4414
|
+
const $$Astro$8 = createAstro("https://demo.ecomplus.app");
|
|
4415
|
+
const $$PageHeader = createComponent(async ($$result, $$props, $$slots) => {
|
|
4416
|
+
const Astro2 = $$result.createAstro($$Astro$8, $$props, $$slots);
|
|
4417
|
+
Astro2.self = $$PageHeader;
|
|
4418
|
+
const { routeContext } = Astro2.locals;
|
|
4419
|
+
const { settings, isHomepage } = routeContext;
|
|
4420
|
+
const LogoHeading = isHomepage ? "h1" : "h2";
|
|
4421
|
+
const {
|
|
4422
|
+
pitchBar,
|
|
4423
|
+
shopHeader
|
|
4424
|
+
} = await usePageHeader({ routeContext });
|
|
4425
|
+
const { getInlineClientJS } = await useSharedData({ field: "categories" });
|
|
4426
|
+
return renderTemplate`${renderSlot$1($$result, $$slots["pitch-bar"], renderTemplate(_a$1 || (_a$1 = __template$1([" ", "", " <script async>", "<\/script> ", ""])), pitchBar.slides.length > 1 && renderTemplate`${renderComponent($$result, "PitchBar", PitchBar, { ...pitchBar, "client:idle": true, "client:component-hydration": "idle", "client:component-path": "~/components/PitchBar.vue", "client:component-export": "default" })}`, pitchBar.slides.length === 1 && renderTemplate`${renderComponent($$result, "PitchBar", PitchBar, { ...pitchBar })}`, unescapeHTML(getInlineClientJS()), renderComponent($$result, "ShopHeader", ShopHeader, { ...shopHeader, "client:context": "data:categories", "client:component-hydration": "context", "client:component-path": "~/components/ShopHeader.vue", "client:component-export": "default" }, { "logo": ($$result2) => renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "slot": "logo" }, { "default": ($$result3) => renderTemplate` ${maybeRenderHead()}<a href="/"> ${renderComponent($$result3, "LogoHeading", LogoHeading, {}, { "default": ($$result4) => renderTemplate` ${renderComponent($$result4, "Picture", $$Picture, { "src": settings.logo, "alt": settings.name, "widths": [300], "fetchpriority": "high", "loading": "eager", "class": "mx-auto max-w-[150px] hover:drop-shadow-sm" })} ` })} </a> ` })}` })))}`;
|
|
4427
|
+
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/PageHeader.astro", void 0);
|
|
4428
|
+
|
|
4429
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
4430
|
+
__name: "PaymentMethodFlag",
|
|
4431
|
+
props: {
|
|
4432
|
+
as: { default: "i" },
|
|
4433
|
+
flag: {}
|
|
4434
|
+
},
|
|
4435
|
+
setup(__props, { expose: __expose }) {
|
|
4436
|
+
__expose();
|
|
4437
|
+
const props = __props;
|
|
4438
|
+
const iconClassName = computed(() => {
|
|
4439
|
+
switch (props.flag) {
|
|
4440
|
+
case "pix":
|
|
4441
|
+
return "i-pix text-[#77B6A8]";
|
|
4442
|
+
case "visa":
|
|
4443
|
+
return "i-visa";
|
|
4444
|
+
case "mastercard":
|
|
4445
|
+
return "i-mastercard";
|
|
4446
|
+
case "elo":
|
|
4447
|
+
return "i-elo";
|
|
4448
|
+
case "amex":
|
|
4449
|
+
return "i-amex";
|
|
4450
|
+
case "hipercard":
|
|
4451
|
+
return "i-hipercard";
|
|
4452
|
+
case "diners":
|
|
4453
|
+
return "i-dinersclub";
|
|
4454
|
+
case "discover":
|
|
4455
|
+
return "i-discover";
|
|
4456
|
+
default:
|
|
4457
|
+
return "";
|
|
4458
|
+
}
|
|
4459
|
+
});
|
|
4460
|
+
const __returned__ = { props, iconClassName };
|
|
4461
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
4462
|
+
return __returned__;
|
|
4463
|
+
}
|
|
4464
|
+
});
|
|
4465
|
+
function _sfc_ssrRender$p(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
4466
|
+
if (!$setup.iconClassName) {
|
|
4467
|
+
_push(`<b${ssrRenderAttrs(mergeProps({ class: "mb-1 text-[57%] leading-none tracking-tighter text-black" }, _attrs))}>${ssrInterpolate($setup.props.flag)}</b>`);
|
|
4468
|
+
} else {
|
|
4469
|
+
ssrRenderVNode(_push, createVNode(resolveDynamicComponent($props.as), mergeProps({ class: $setup.iconClassName }, _attrs), null), _parent);
|
|
4470
|
+
}
|
|
4471
|
+
}
|
|
4472
|
+
const _sfc_setup$p = _sfc_main$p.setup;
|
|
4473
|
+
_sfc_main$p.setup = (props, ctx) => {
|
|
4474
|
+
const ssrContext = useSSRContext();
|
|
4475
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/PaymentMethodFlag.vue");
|
|
4476
|
+
return _sfc_setup$p ? _sfc_setup$p(props, ctx) : void 0;
|
|
4477
|
+
};
|
|
4478
|
+
const PaymentMethodFlag = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["ssrRender", _sfc_ssrRender$p]]);
|
|
4479
|
+
|
|
4480
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
4481
|
+
__name: "FooterStamps",
|
|
4482
|
+
props: {
|
|
4483
|
+
stamps: {}
|
|
4484
|
+
},
|
|
4485
|
+
setup(__props, { expose: __expose }) {
|
|
4486
|
+
__expose();
|
|
4487
|
+
const __returned__ = { PaymentMethodFlag };
|
|
4488
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
4489
|
+
return __returned__;
|
|
4490
|
+
}
|
|
4491
|
+
});
|
|
4492
|
+
function _sfc_ssrRender$o(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
4493
|
+
const _component_ALink = resolveComponent("ALink");
|
|
4494
|
+
_push(`<div${ssrRenderAttrs(mergeProps({ class: "ui-section" }, _attrs))}><div class="flex flex-wrap items-start justify-between gap-5 lg:flex-nowrap"><ul class="mx-auto flex items-center gap-x-6 gap-y-3 overflow-x-auto md:mx-0 md:flex-wrap md:overflow-hidden lg:gap-x-8"><!--[-->`);
|
|
4495
|
+
ssrRenderList($props.stamps, (stamp, i) => {
|
|
4496
|
+
_push(`<li>`);
|
|
4497
|
+
_push(ssrRenderComponent(_component_ALink, {
|
|
4498
|
+
href: stamp.href?.replace("{domain}", _ctx.$settings.domain || "")
|
|
4499
|
+
}, {
|
|
4500
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
4501
|
+
if (_push2) {
|
|
4502
|
+
ssrRenderSlot(_ctx.$slots, `picture-${i}`, {}, null, _push2, _parent2, _scopeId);
|
|
4503
|
+
if (!stamp.img) {
|
|
4504
|
+
_push2(`<span class="flex items-center"${_scopeId}>`);
|
|
4505
|
+
if (stamp.icon) {
|
|
4506
|
+
_push2(`<span class="[&>*]:from-success-200 [&>*]:to-success-700 mr-2 text-4xl [&>*]:bg-gradient-to-br"${_scopeId}>`);
|
|
4507
|
+
if (stamp.icon === "lock") {
|
|
4508
|
+
_push2(`<i class="i-lock-closed"${_scopeId}></i>`);
|
|
4509
|
+
} else if (stamp.icon === "check") {
|
|
4510
|
+
_push2(`<i class="i-check-badge"${_scopeId}></i>`);
|
|
4511
|
+
} else {
|
|
4512
|
+
_push2(`<i class="i-arrow-path-rounded-square"${_scopeId}></i>`);
|
|
4513
|
+
}
|
|
4514
|
+
_push2(`</span>`);
|
|
4515
|
+
} else {
|
|
4516
|
+
_push2(`<!---->`);
|
|
4517
|
+
}
|
|
4518
|
+
_push2(`<span class="text-base-600 max-w-[140px] text-sm font-medium"${_scopeId}>${ssrInterpolate(stamp.alt)} `);
|
|
4519
|
+
if (stamp.href && stamp.href.charAt(0) !== "/") {
|
|
4520
|
+
_push2(`<i class="bg-base-400 i-arrow-top-right-on-square ml-0.5"${_scopeId}></i>`);
|
|
4521
|
+
} else {
|
|
4522
|
+
_push2(`<!---->`);
|
|
4523
|
+
}
|
|
4524
|
+
_push2(`</span></span>`);
|
|
4525
|
+
} else {
|
|
4526
|
+
_push2(`<!---->`);
|
|
4527
|
+
}
|
|
4528
|
+
} else {
|
|
4529
|
+
return [
|
|
4530
|
+
renderSlot(_ctx.$slots, `picture-${i}`),
|
|
4531
|
+
!stamp.img ? (openBlock(), createBlock("span", {
|
|
4532
|
+
key: 0,
|
|
4533
|
+
class: "flex items-center"
|
|
4534
|
+
}, [
|
|
4535
|
+
stamp.icon ? (openBlock(), createBlock("span", {
|
|
4536
|
+
key: 0,
|
|
4537
|
+
class: "[&>*]:from-success-200 [&>*]:to-success-700 mr-2 text-4xl [&>*]:bg-gradient-to-br"
|
|
4538
|
+
}, [
|
|
4539
|
+
stamp.icon === "lock" ? (openBlock(), createBlock("i", {
|
|
4540
|
+
key: 0,
|
|
4541
|
+
class: "i-lock-closed"
|
|
4542
|
+
})) : stamp.icon === "check" ? (openBlock(), createBlock("i", {
|
|
4543
|
+
key: 1,
|
|
4544
|
+
class: "i-check-badge"
|
|
4545
|
+
})) : (openBlock(), createBlock("i", {
|
|
4546
|
+
key: 2,
|
|
4547
|
+
class: "i-arrow-path-rounded-square"
|
|
4548
|
+
}))
|
|
4549
|
+
])) : createCommentVNode("", true),
|
|
4550
|
+
createVNode("span", { class: "text-base-600 max-w-[140px] text-sm font-medium" }, [
|
|
4551
|
+
createTextVNode(toDisplayString(stamp.alt) + " ", 1),
|
|
4552
|
+
stamp.href && stamp.href.charAt(0) !== "/" ? (openBlock(), createBlock("i", {
|
|
4553
|
+
key: 0,
|
|
4554
|
+
class: "bg-base-400 i-arrow-top-right-on-square ml-0.5"
|
|
4555
|
+
})) : createCommentVNode("", true)
|
|
4556
|
+
])
|
|
4557
|
+
])) : createCommentVNode("", true)
|
|
4558
|
+
];
|
|
4559
|
+
}
|
|
4560
|
+
}),
|
|
4561
|
+
_: 2
|
|
4562
|
+
}, _parent));
|
|
4563
|
+
_push(`</li>`);
|
|
4564
|
+
});
|
|
4565
|
+
_push(`<!--]--></ul><div class="mx-auto flex flex-wrap items-center justify-end gap-4 overflow-x-auto text-2xl md:mx-0 md:flex-nowrap md:overflow-hidden"><!--[-->`);
|
|
4566
|
+
ssrRenderList(_ctx.$settings.paymentMethods, (paymentMethod) => {
|
|
4567
|
+
_push(ssrRenderComponent($setup["PaymentMethodFlag"], {
|
|
4568
|
+
key: paymentMethod,
|
|
4569
|
+
flag: paymentMethod
|
|
4570
|
+
}, null, _parent));
|
|
4571
|
+
});
|
|
4572
|
+
_push(`<!--]--></div></div><div class="mt-7 justify-between gap-4 text-center text-xs md:flex md:text-left"><div class="mb-3 md:mb-0"> @ ${ssrInterpolate((/* @__PURE__ */ new Date()).getFullYear())} ${ssrInterpolate(_ctx.$settings.corporateName)} ${ssrInterpolate(_ctx.$settings.address ? `/ ${_ctx.$settings.address}` : "")} / ${ssrInterpolate(_ctx.$settings.docNumber)}</div>`);
|
|
4573
|
+
_push(ssrRenderComponent(_component_ALink, {
|
|
4574
|
+
href: "https://www.ecomplus.io/",
|
|
4575
|
+
class: "italic text-[#37003c]"
|
|
4576
|
+
}, {
|
|
4577
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
4578
|
+
if (_push2) {
|
|
4579
|
+
_push2(` powered by <b${_scopeId}>e-com.plus</b>`);
|
|
4580
|
+
} else {
|
|
4581
|
+
return [
|
|
4582
|
+
createTextVNode(" powered by "),
|
|
4583
|
+
createVNode("b", null, "e-com.plus")
|
|
4584
|
+
];
|
|
4585
|
+
}
|
|
4586
|
+
}),
|
|
4587
|
+
_: 1
|
|
4588
|
+
}, _parent));
|
|
4589
|
+
_push(`</div></div>`);
|
|
4590
|
+
}
|
|
4591
|
+
const _sfc_setup$o = _sfc_main$o.setup;
|
|
4592
|
+
_sfc_main$o.setup = (props, ctx) => {
|
|
4556
4593
|
const ssrContext = useSSRContext();
|
|
4557
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/
|
|
4558
|
-
return _sfc_setup$
|
|
4594
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/FooterStamps.vue");
|
|
4595
|
+
return _sfc_setup$o ? _sfc_setup$o(props, ctx) : void 0;
|
|
4559
4596
|
};
|
|
4560
|
-
const
|
|
4561
|
-
|
|
4562
|
-
var __freeze$1 = Object.freeze;
|
|
4563
|
-
var __defProp$1 = Object.defineProperty;
|
|
4564
|
-
var __template$1 = (cooked, raw) => __freeze$1(__defProp$1(cooked, "raw", { value: __freeze$1(raw || cooked.slice()) }));
|
|
4565
|
-
var _a$1;
|
|
4566
|
-
const $$Astro$8 = createAstro("https://demo.ecomplus.app");
|
|
4567
|
-
const $$PageHeader = createComponent(async ($$result, $$props, $$slots) => {
|
|
4568
|
-
const Astro2 = $$result.createAstro($$Astro$8, $$props, $$slots);
|
|
4569
|
-
Astro2.self = $$PageHeader;
|
|
4570
|
-
const { routeContext } = Astro2.locals;
|
|
4571
|
-
const { settings, isHomepage } = routeContext;
|
|
4572
|
-
const LogoHeading = isHomepage ? "h1" : "h2";
|
|
4573
|
-
const {
|
|
4574
|
-
pitchBar,
|
|
4575
|
-
shopHeader
|
|
4576
|
-
} = await usePageHeader({ routeContext });
|
|
4577
|
-
const { getInlineClientJS } = await useSharedData({ field: "categories" });
|
|
4578
|
-
return renderTemplate`${renderSlot$1($$result, $$slots["pitch-bar"], renderTemplate(_a$1 || (_a$1 = __template$1([" ", "", " <script async>", "<\/script> ", ""])), pitchBar.slides.length > 1 && renderTemplate`${renderComponent($$result, "PitchBar", PitchBar, { ...pitchBar, "client:idle": true, "client:component-hydration": "idle", "client:component-path": "~/components/PitchBar.vue", "client:component-export": "default" })}`, pitchBar.slides.length === 1 && renderTemplate`${renderComponent($$result, "PitchBar", PitchBar, { ...pitchBar })}`, unescapeHTML(getInlineClientJS()), renderComponent($$result, "ShopHeader", ShopHeader, { ...shopHeader, "client:context": "data:categories", "client:component-hydration": "context", "client:component-path": "~/components/ShopHeader.vue", "client:component-export": "default" }, { "logo": ($$result2) => renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "slot": "logo" }, { "default": ($$result3) => renderTemplate` ${maybeRenderHead()}<a href="/"> ${renderComponent($$result3, "LogoHeading", LogoHeading, {}, { "default": ($$result4) => renderTemplate` ${renderComponent($$result4, "Picture", $$Picture, { "src": settings.logo, "alt": settings.name, "widths": [300], "fetchpriority": "high", "loading": "eager", "class": "mx-auto max-w-[150px] hover:drop-shadow-sm" })} ` })} </a> ` })}` })))}`;
|
|
4579
|
-
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/PageHeader.astro", void 0);
|
|
4597
|
+
const FooterStamps = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["ssrRender", _sfc_ssrRender$o]]);
|
|
4580
4598
|
|
|
4581
|
-
const _sfc_main$
|
|
4599
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
4582
4600
|
__name: "ShopFooter",
|
|
4583
4601
|
props: {
|
|
4584
4602
|
stamps: {},
|
|
@@ -4596,7 +4614,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
4596
4614
|
return __returned__;
|
|
4597
4615
|
}
|
|
4598
4616
|
});
|
|
4599
|
-
function _sfc_ssrRender$
|
|
4617
|
+
function _sfc_ssrRender$n(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
4600
4618
|
const _component_ALink = resolveComponent("ALink");
|
|
4601
4619
|
_push(`<footer${ssrRenderAttrs(mergeProps({ class: "border-base-100 bg-base-50 mt-auto w-screen border-t py-2" }, _attrs))}><div class="ui-section"><div class="border-base-200 flex flex-wrap justify-between gap-y-5 border-b pb-7 sm:gap-x-10 lg:flex-nowrap"><div class="shrink">`);
|
|
4602
4620
|
ssrRenderSlot(_ctx.$slots, "logo", {}, null, _push, _parent);
|
|
@@ -4694,13 +4712,13 @@ function _sfc_ssrRender$m(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
4694
4712
|
_push(ssrRenderComponent($setup["FooterStamps"], { stamps: $props.stamps }, null, _parent));
|
|
4695
4713
|
_push(`</footer>`);
|
|
4696
4714
|
}
|
|
4697
|
-
const _sfc_setup$
|
|
4698
|
-
_sfc_main$
|
|
4715
|
+
const _sfc_setup$n = _sfc_main$n.setup;
|
|
4716
|
+
_sfc_main$n.setup = (props, ctx) => {
|
|
4699
4717
|
const ssrContext = useSSRContext();
|
|
4700
4718
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ShopFooter.vue");
|
|
4701
|
-
return _sfc_setup$
|
|
4719
|
+
return _sfc_setup$n ? _sfc_setup$n(props, ctx) : void 0;
|
|
4702
4720
|
};
|
|
4703
|
-
const ShopFooter = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4721
|
+
const ShopFooter = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["ssrRender", _sfc_ssrRender$n]]);
|
|
4704
4722
|
|
|
4705
4723
|
const $$Astro$7 = createAstro("https://demo.ecomplus.app");
|
|
4706
4724
|
const $$PageFooter = createComponent(async ($$result, $$props, $$slots) => {
|
|
@@ -4795,7 +4813,7 @@ const usePagination = (props) => {
|
|
|
4795
4813
|
return Array.from(Array(endPage.value + 1 - startPage.value).keys()).map((i) => startPage.value + i);
|
|
4796
4814
|
});
|
|
4797
4815
|
const baseUrl = ref("");
|
|
4798
|
-
watch(toRef(props
|
|
4816
|
+
watch(toRef(props, "isUrlPath"), () => {
|
|
4799
4817
|
const url = global.astroUrl ;
|
|
4800
4818
|
if (props.isUrlPath && !url.pathname.endsWith("/")) {
|
|
4801
4819
|
url.pathname += "/";
|
|
@@ -4835,7 +4853,7 @@ const usePagination = (props) => {
|
|
|
4835
4853
|
};
|
|
4836
4854
|
};
|
|
4837
4855
|
|
|
4838
|
-
const _sfc_main$
|
|
4856
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
4839
4857
|
__name: "Pagination",
|
|
4840
4858
|
props: {
|
|
4841
4859
|
totalItems: {},
|
|
@@ -4861,7 +4879,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
4861
4879
|
return __returned__;
|
|
4862
4880
|
}
|
|
4863
4881
|
});
|
|
4864
|
-
function _sfc_ssrRender$
|
|
4882
|
+
function _sfc_ssrRender$m(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
4865
4883
|
const _component_ALink = resolveComponent("ALink");
|
|
4866
4884
|
_push(`<ol${ssrRenderAttrs(mergeProps({ class: "text-base-900 flex justify-center gap-1.5 text-center text-sm font-medium leading-9" }, _attrs))}><li>`);
|
|
4867
4885
|
_push(ssrRenderComponent(_component_ALink, {
|
|
@@ -4922,13 +4940,13 @@ function _sfc_ssrRender$l(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
4922
4940
|
}, _parent));
|
|
4923
4941
|
_push(`</li></ol>`);
|
|
4924
4942
|
}
|
|
4925
|
-
const _sfc_setup$
|
|
4926
|
-
_sfc_main$
|
|
4943
|
+
const _sfc_setup$m = _sfc_main$m.setup;
|
|
4944
|
+
_sfc_main$m.setup = (props, ctx) => {
|
|
4927
4945
|
const ssrContext = useSSRContext();
|
|
4928
4946
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/Pagination.vue");
|
|
4929
|
-
return _sfc_setup$
|
|
4947
|
+
return _sfc_setup$m ? _sfc_setup$m(props, ctx) : void 0;
|
|
4930
4948
|
};
|
|
4931
|
-
const Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4949
|
+
const Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["ssrRender", _sfc_ssrRender$m]]);
|
|
4932
4950
|
|
|
4933
4951
|
var __freeze = Object.freeze;
|
|
4934
4952
|
var __defProp = Object.defineProperty;
|
|
@@ -5105,7 +5123,10 @@ class SearchEngine {
|
|
|
5105
5123
|
return search(opts);
|
|
5106
5124
|
}, debounce);
|
|
5107
5125
|
watch([this.term, this.params, this.pageSize], () => {
|
|
5108
|
-
this.
|
|
5126
|
+
if (this.wasFetched.value) {
|
|
5127
|
+
this.pageNumber.value = 1;
|
|
5128
|
+
this.#wasFetched.value = false;
|
|
5129
|
+
}
|
|
5109
5130
|
});
|
|
5110
5131
|
watch(this.pageNumber, () => {
|
|
5111
5132
|
this.#wasFetched.value = false;
|
|
@@ -5164,7 +5185,9 @@ class SearchEngine {
|
|
|
5164
5185
|
data.result.forEach((item) => this.products.push(item));
|
|
5165
5186
|
}
|
|
5166
5187
|
if (data.meta && data.result) {
|
|
5167
|
-
|
|
5188
|
+
setTimeout(() => {
|
|
5189
|
+
this.#wasFetched.value = true;
|
|
5190
|
+
}, 9);
|
|
5168
5191
|
}
|
|
5169
5192
|
}
|
|
5170
5193
|
}
|
|
@@ -5429,33 +5452,57 @@ const useSearchShowcase = (props) => {
|
|
|
5429
5452
|
if (term !== void 0) {
|
|
5430
5453
|
searchEngine.term.value = term;
|
|
5431
5454
|
}
|
|
5455
|
+
if (props.pageSize) {
|
|
5456
|
+
searchEngine.pageSize.value = props.pageSize;
|
|
5457
|
+
}
|
|
5432
5458
|
Object.assign(searchEngine.params, props.fixedParams);
|
|
5459
|
+
let hasChangedInitParams = false;
|
|
5433
5460
|
if (urlParams) {
|
|
5434
5461
|
Object.keys(urlParams).forEach((param) => {
|
|
5462
|
+
if (!urlParams[param])
|
|
5463
|
+
return;
|
|
5464
|
+
if (param.startsWith("f\\")) {
|
|
5465
|
+
const field = param.substring(2);
|
|
5466
|
+
searchEngine.params[field] = urlParams[param];
|
|
5467
|
+
if (props.fixedParams?.[field] !== urlParams[param]) {
|
|
5468
|
+
hasChangedInitParams = true;
|
|
5469
|
+
}
|
|
5470
|
+
return;
|
|
5471
|
+
}
|
|
5435
5472
|
if (param === "sort") {
|
|
5436
5473
|
searchEngine.params.sort = urlParams.sort;
|
|
5474
|
+
if (typeof urlParams.sort === "string" && props.resultMeta?.sort?.length === 1) {
|
|
5475
|
+
const { field, order } = props.resultMeta.sort[0];
|
|
5476
|
+
const fetchedSort = order ? field : `-${field}`;
|
|
5477
|
+
if (fetchedSort === urlParams.sort)
|
|
5478
|
+
return;
|
|
5479
|
+
}
|
|
5480
|
+
hasChangedInitParams = true;
|
|
5437
5481
|
return;
|
|
5438
5482
|
}
|
|
5439
5483
|
if (param === "p") {
|
|
5440
5484
|
const pageNumber = parseInt(String(urlParams.p), 10);
|
|
5441
|
-
if (pageNumber >= 1)
|
|
5485
|
+
if (pageNumber >= 1) {
|
|
5442
5486
|
searchEngine.pageNumber.value = pageNumber;
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5487
|
+
if (props.resultMeta?.limit) {
|
|
5488
|
+
const { offset, limit } = props.resultMeta;
|
|
5489
|
+
const fetchedPage = offset ? Math.ceil(offset / limit) : 1;
|
|
5490
|
+
if (fetchedPage === pageNumber)
|
|
5491
|
+
return;
|
|
5492
|
+
}
|
|
5493
|
+
hasChangedInitParams = true;
|
|
5494
|
+
}
|
|
5448
5495
|
}
|
|
5449
5496
|
});
|
|
5450
5497
|
}
|
|
5451
5498
|
if (!searchEngine.wasFetched.value) {
|
|
5452
|
-
if (props.products || props.resultMeta) {
|
|
5499
|
+
if ((props.products || props.resultMeta) && !hasChangedInitParams) {
|
|
5453
5500
|
searchEngine.setResult({
|
|
5454
5501
|
result: props.products,
|
|
5455
5502
|
meta: props.resultMeta
|
|
5456
5503
|
});
|
|
5457
5504
|
}
|
|
5458
|
-
if (!props.products) {
|
|
5505
|
+
if (!props.products || hasChangedInitParams) {
|
|
5459
5506
|
searchEngine.fetch().catch(console.error);
|
|
5460
5507
|
}
|
|
5461
5508
|
}
|
|
@@ -5830,7 +5877,7 @@ const useBanner = (props) => {
|
|
|
5830
5877
|
};
|
|
5831
5878
|
};
|
|
5832
5879
|
|
|
5833
|
-
const _sfc_main$
|
|
5880
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
5834
5881
|
__name: "Banner",
|
|
5835
5882
|
props: {
|
|
5836
5883
|
img: {},
|
|
@@ -5857,7 +5904,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
5857
5904
|
return __returned__;
|
|
5858
5905
|
}
|
|
5859
5906
|
});
|
|
5860
|
-
function _sfc_ssrRender$
|
|
5907
|
+
function _sfc_ssrRender$l(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
5861
5908
|
const _component_ALink = resolveComponent("ALink");
|
|
5862
5909
|
_push(`<div${ssrRenderAttrs(mergeProps({
|
|
5863
5910
|
class: ["mx-auto overflow-x-hidden", $setup.hasHeader ? "grid grid-cols-1 sm:grid-cols-2 items-center" : null]
|
|
@@ -5925,15 +5972,15 @@ function _sfc_ssrRender$k(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
5925
5972
|
}
|
|
5926
5973
|
_push(`</div>`);
|
|
5927
5974
|
}
|
|
5928
|
-
const _sfc_setup$
|
|
5929
|
-
_sfc_main$
|
|
5975
|
+
const _sfc_setup$l = _sfc_main$l.setup;
|
|
5976
|
+
_sfc_main$l.setup = (props, ctx) => {
|
|
5930
5977
|
const ssrContext = useSSRContext();
|
|
5931
5978
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/Banner.vue");
|
|
5932
|
-
return _sfc_setup$
|
|
5979
|
+
return _sfc_setup$l ? _sfc_setup$l(props, ctx) : void 0;
|
|
5933
5980
|
};
|
|
5934
|
-
const Banner = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5981
|
+
const Banner = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["ssrRender", _sfc_ssrRender$l]]);
|
|
5935
5982
|
|
|
5936
|
-
const _sfc_main$
|
|
5983
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
5937
5984
|
__name: "HeroSlider",
|
|
5938
5985
|
props: {
|
|
5939
5986
|
autoplay: {},
|
|
@@ -5950,7 +5997,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
5950
5997
|
return __returned__;
|
|
5951
5998
|
}
|
|
5952
5999
|
});
|
|
5953
|
-
function _sfc_ssrRender$
|
|
6000
|
+
function _sfc_ssrRender$k(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
5954
6001
|
const _component_Carousel = resolveComponent("Carousel");
|
|
5955
6002
|
const _component_CarouselControl = resolveComponent("CarouselControl");
|
|
5956
6003
|
_push(`<section${ssrRenderAttrs(mergeProps({ class: "relative mx-auto mb-9 md:mb-12" }, _attrs))}>`);
|
|
@@ -6059,13 +6106,13 @@ function _sfc_ssrRender$j(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
6059
6106
|
}, _parent));
|
|
6060
6107
|
_push(`</section>`);
|
|
6061
6108
|
}
|
|
6062
|
-
const _sfc_setup$
|
|
6063
|
-
_sfc_main$
|
|
6109
|
+
const _sfc_setup$k = _sfc_main$k.setup;
|
|
6110
|
+
_sfc_main$k.setup = (props, ctx) => {
|
|
6064
6111
|
const ssrContext = useSSRContext();
|
|
6065
6112
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/HeroSlider.vue");
|
|
6066
|
-
return _sfc_setup$
|
|
6113
|
+
return _sfc_setup$k ? _sfc_setup$k(props, ctx) : void 0;
|
|
6067
6114
|
};
|
|
6068
|
-
const HeroSlider = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6115
|
+
const HeroSlider = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["ssrRender", _sfc_ssrRender$k]]);
|
|
6069
6116
|
|
|
6070
6117
|
const $$Astro$4 = createAstro("https://demo.ecomplus.app");
|
|
6071
6118
|
const $$Hero = createComponent(async ($$result, $$props, $$slots) => {
|
|
@@ -6077,7 +6124,7 @@ const $$Hero = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
6077
6124
|
return renderTemplate`${heroSlider.slides.length > 0 && renderTemplate`${renderComponent($$result, "HeroSlider", HeroSlider, { ...heroSlider, "client:idle": true, "client:component-hydration": "idle", "client:component-path": "~/components/HeroSlider.vue", "client:component-export": "default" }, { "picture-0": ($$result2) => renderTemplate`${heroSlides[0] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-0", ...heroSlides[0], "index": 0 })}`}`, "picture-1": ($$result2) => renderTemplate`${heroSlides[1] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-1", ...heroSlides[1], "index": 1 })}`}`, "picture-2": ($$result2) => renderTemplate`${heroSlides[2] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-2", ...heroSlides[2], "index": 2 })}`}`, "picture-3": ($$result2) => renderTemplate`${heroSlides[3] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-3", ...heroSlides[3], "index": 3 })}`}`, "picture-4": ($$result2) => renderTemplate`${heroSlides[4] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-4", ...heroSlides[4], "index": 4 })}`}`, "picture-5": ($$result2) => renderTemplate`${heroSlides[5] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-5", ...heroSlides[5], "index": 5 })}`}`, "picture-6": ($$result2) => renderTemplate`${heroSlides[6] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-6", ...heroSlides[6], "index": 6 })}`}`, "picture-7": ($$result2) => renderTemplate`${heroSlides[7] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-7", ...heroSlides[7], "index": 7 })}`}`, "picture-8": ($$result2) => renderTemplate`${heroSlides[8] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-8", ...heroSlides[8], "index": 8 })}`}`, "picture-9": ($$result2) => renderTemplate`${heroSlides[9] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-9", ...heroSlides[9], "index": 9 })}`}` })}`}`;
|
|
6078
6125
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/content/Hero.astro", void 0);
|
|
6079
6126
|
|
|
6080
|
-
const _sfc_main$
|
|
6127
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
6081
6128
|
__name: "ContentClearfix",
|
|
6082
6129
|
props: {
|
|
6083
6130
|
html: {}
|
|
@@ -6091,16 +6138,16 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
6091
6138
|
return __returned__;
|
|
6092
6139
|
}
|
|
6093
6140
|
});
|
|
6094
|
-
function _sfc_ssrRender$
|
|
6141
|
+
function _sfc_ssrRender$j(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
6095
6142
|
_push(`<article${ssrRenderAttrs(mergeProps({ class: "!max-w-full overflow-x-auto prose" }, _attrs))}><div class="[&_iframe]:max-w-full [&_img]:max-w-full [&_table]:max-w-full">${$setup.parsedHTML}</div></article>`);
|
|
6096
6143
|
}
|
|
6097
|
-
const _sfc_setup$
|
|
6098
|
-
_sfc_main$
|
|
6144
|
+
const _sfc_setup$j = _sfc_main$j.setup;
|
|
6145
|
+
_sfc_main$j.setup = (props, ctx) => {
|
|
6099
6146
|
const ssrContext = useSSRContext();
|
|
6100
6147
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/ContentClearfix.vue");
|
|
6101
|
-
return _sfc_setup$
|
|
6148
|
+
return _sfc_setup$j ? _sfc_setup$j(props, ctx) : void 0;
|
|
6102
6149
|
};
|
|
6103
|
-
const ContentClearfix = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6150
|
+
const ContentClearfix = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["ssrRender", _sfc_ssrRender$j]]);
|
|
6104
6151
|
|
|
6105
6152
|
const $$Astro$3 = createAstro("https://demo.ecomplus.app");
|
|
6106
6153
|
const $$BannersGrid = createComponent(async ($$result, $$props, $$slots) => {
|
|
@@ -6170,7 +6217,7 @@ const useBreadcrumbs = async (props = {}) => {
|
|
|
6170
6217
|
};
|
|
6171
6218
|
};
|
|
6172
6219
|
|
|
6173
|
-
const _sfc_main$
|
|
6220
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
6174
6221
|
__name: "Breadcrumbs",
|
|
6175
6222
|
props: {
|
|
6176
6223
|
apiDoc: {},
|
|
@@ -6187,7 +6234,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
6187
6234
|
return __returned__;
|
|
6188
6235
|
}
|
|
6189
6236
|
});
|
|
6190
|
-
function _sfc_ssrRender$
|
|
6237
|
+
function _sfc_ssrRender$i(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
6191
6238
|
_push(`<!--[-->`);
|
|
6192
6239
|
if ($setup.breadcrumbs.length > 1) {
|
|
6193
6240
|
_push(`<section class="ui-section-slim"><nav aria-label="Breadcrumb" class="w-full overflow-hidden text-lg md:text-sm"><ol class="text-base-600 flex items-center gap-1"><li><a href="/" class="hover:text-primary"><span class="sr-only">${ssrInterpolate("In\xEDcio")}</span><i class="i-home"></i></a></li><!--[-->`);
|
|
@@ -6211,13 +6258,13 @@ function _sfc_ssrRender$h(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
6211
6258
|
}
|
|
6212
6259
|
_push(`<!--]-->`);
|
|
6213
6260
|
}
|
|
6214
|
-
const _sfc_setup$
|
|
6215
|
-
_sfc_main$
|
|
6261
|
+
const _sfc_setup$i = _sfc_main$i.setup;
|
|
6262
|
+
_sfc_main$i.setup = (props, ctx) => {
|
|
6216
6263
|
const ssrContext = useSSRContext();
|
|
6217
6264
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/Breadcrumbs.vue");
|
|
6218
|
-
return _sfc_setup$
|
|
6265
|
+
return _sfc_setup$i ? _sfc_setup$i(props, ctx) : void 0;
|
|
6219
6266
|
};
|
|
6220
|
-
const Breadcrumbs = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6267
|
+
const Breadcrumbs = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["ssrRender", _sfc_ssrRender$i]]);
|
|
6221
6268
|
|
|
6222
6269
|
const emitGtagEvent = async (name, _params) => {
|
|
6223
6270
|
return;
|
|
@@ -6498,7 +6545,7 @@ const usePrices = (props) => {
|
|
|
6498
6545
|
};
|
|
6499
6546
|
};
|
|
6500
6547
|
|
|
6501
|
-
const _sfc_main$
|
|
6548
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
6502
6549
|
__name: "Prices",
|
|
6503
6550
|
props: {
|
|
6504
6551
|
isBig: { type: Boolean },
|
|
@@ -6533,7 +6580,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
6533
6580
|
return __returned__;
|
|
6534
6581
|
}
|
|
6535
6582
|
});
|
|
6536
|
-
function _sfc_ssrRender$
|
|
6583
|
+
function _sfc_ssrRender$h(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
6537
6584
|
const _component_Fade = resolveComponent("Fade");
|
|
6538
6585
|
_push(`<div${ssrRenderAttrs(mergeProps({
|
|
6539
6586
|
class: ["text-base-600 [&>div]:[font-size:90%] [&_small]:lowercase [&_small]:[font-size:92%]", $props.isBig ? "text-lg" : null]
|
|
@@ -6663,15 +6710,15 @@ function _sfc_ssrRender$g(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
6663
6710
|
}, _parent));
|
|
6664
6711
|
_push(`</div>`);
|
|
6665
6712
|
}
|
|
6666
|
-
const _sfc_setup$
|
|
6667
|
-
_sfc_main$
|
|
6713
|
+
const _sfc_setup$h = _sfc_main$h.setup;
|
|
6714
|
+
_sfc_main$h.setup = (props, ctx) => {
|
|
6668
6715
|
const ssrContext = useSSRContext();
|
|
6669
6716
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/Prices.vue");
|
|
6670
|
-
return _sfc_setup$
|
|
6717
|
+
return _sfc_setup$h ? _sfc_setup$h(props, ctx) : void 0;
|
|
6671
6718
|
};
|
|
6672
|
-
const Prices = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6719
|
+
const Prices = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["ssrRender", _sfc_ssrRender$h]]);
|
|
6673
6720
|
|
|
6674
|
-
const _sfc_main$
|
|
6721
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
6675
6722
|
__name: "ProductCard",
|
|
6676
6723
|
props: {
|
|
6677
6724
|
product: {},
|
|
@@ -6706,7 +6753,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
6706
6753
|
return __returned__;
|
|
6707
6754
|
}
|
|
6708
6755
|
});
|
|
6709
|
-
function _sfc_ssrRender$
|
|
6756
|
+
function _sfc_ssrRender$g(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
6710
6757
|
const _component_ALink = resolveComponent("ALink");
|
|
6711
6758
|
const _component_AImg = resolveComponent("AImg");
|
|
6712
6759
|
_push(`<article${ssrRenderAttrs(mergeProps({
|
|
@@ -6849,15 +6896,15 @@ function _sfc_ssrRender$f(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
6849
6896
|
}, _parent));
|
|
6850
6897
|
_push(`</article>`);
|
|
6851
6898
|
}
|
|
6852
|
-
const _sfc_setup$
|
|
6853
|
-
_sfc_main$
|
|
6899
|
+
const _sfc_setup$g = _sfc_main$g.setup;
|
|
6900
|
+
_sfc_main$g.setup = (props, ctx) => {
|
|
6854
6901
|
const ssrContext = useSSRContext();
|
|
6855
6902
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ProductCard.vue");
|
|
6856
|
-
return _sfc_setup$
|
|
6903
|
+
return _sfc_setup$g ? _sfc_setup$g(props, ctx) : void 0;
|
|
6857
6904
|
};
|
|
6858
|
-
const ProductCard = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6905
|
+
const ProductCard = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["ssrRender", _sfc_ssrRender$g]]);
|
|
6859
6906
|
|
|
6860
|
-
const _sfc_main$
|
|
6907
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
6861
6908
|
__name: "ProductShelf",
|
|
6862
6909
|
props: {
|
|
6863
6910
|
isGrid: { type: Boolean },
|
|
@@ -6895,7 +6942,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
6895
6942
|
return __returned__;
|
|
6896
6943
|
}
|
|
6897
6944
|
});
|
|
6898
|
-
function _sfc_ssrRender$
|
|
6945
|
+
function _sfc_ssrRender$f(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
6899
6946
|
const _component_ALink = resolveComponent("ALink");
|
|
6900
6947
|
const _component_CarouselControl = resolveComponent("CarouselControl");
|
|
6901
6948
|
_push(`<section${ssrRenderAttrs(mergeProps({ class: "ui-section" }, _attrs))}>`);
|
|
@@ -7004,15 +7051,15 @@ function _sfc_ssrRender$e(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
7004
7051
|
ssrRenderSlot(_ctx.$slots, "append", {}, null, _push, _parent);
|
|
7005
7052
|
_push(`</section>`);
|
|
7006
7053
|
}
|
|
7007
|
-
const _sfc_setup$
|
|
7008
|
-
_sfc_main$
|
|
7054
|
+
const _sfc_setup$f = _sfc_main$f.setup;
|
|
7055
|
+
_sfc_main$f.setup = (props, ctx) => {
|
|
7009
7056
|
const ssrContext = useSSRContext();
|
|
7010
7057
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ProductShelf.vue");
|
|
7011
|
-
return _sfc_setup$
|
|
7058
|
+
return _sfc_setup$f ? _sfc_setup$f(props, ctx) : void 0;
|
|
7012
7059
|
};
|
|
7013
|
-
const ProductShelf = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7060
|
+
const ProductShelf = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["ssrRender", _sfc_ssrRender$f]]);
|
|
7014
7061
|
|
|
7015
|
-
const _sfc_main$
|
|
7062
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
7016
7063
|
__name: "Collapse",
|
|
7017
7064
|
props: {
|
|
7018
7065
|
title: {}
|
|
@@ -7024,20 +7071,20 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
7024
7071
|
return __returned__;
|
|
7025
7072
|
}
|
|
7026
7073
|
});
|
|
7027
|
-
function _sfc_ssrRender$
|
|
7074
|
+
function _sfc_ssrRender$e(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
7028
7075
|
_push(`<details${ssrRenderAttrs(mergeProps({ class: "group my-4 md:my-5 [&_i]:open:-rotate-90" }, _attrs))}><summary role="button" class="text-base-700 hover:text-base-800 [&>i]:hover:text-primary list-none text-2xl font-medium lowercase group-open:mb-3"><i class="i-chevron-right mr-1 rotate-90"></i><span>${ssrInterpolate($props.title)}</span></summary>`);
|
|
7029
7076
|
ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
|
|
7030
7077
|
_push(`</details>`);
|
|
7031
7078
|
}
|
|
7032
|
-
const _sfc_setup$
|
|
7033
|
-
_sfc_main$
|
|
7079
|
+
const _sfc_setup$e = _sfc_main$e.setup;
|
|
7080
|
+
_sfc_main$e.setup = (props, ctx) => {
|
|
7034
7081
|
const ssrContext = useSSRContext();
|
|
7035
7082
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/Collapse.vue");
|
|
7036
|
-
return _sfc_setup$
|
|
7083
|
+
return _sfc_setup$e ? _sfc_setup$e(props, ctx) : void 0;
|
|
7037
7084
|
};
|
|
7038
|
-
const Collapse = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7085
|
+
const Collapse = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["ssrRender", _sfc_ssrRender$e]]);
|
|
7039
7086
|
|
|
7040
|
-
const _sfc_main$
|
|
7087
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
7041
7088
|
__name: "DocDescription",
|
|
7042
7089
|
props: {
|
|
7043
7090
|
apiDoc: { default: () => globalThis.$storefront.apiContext?.doc },
|
|
@@ -7052,7 +7099,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
7052
7099
|
return __returned__;
|
|
7053
7100
|
}
|
|
7054
7101
|
});
|
|
7055
|
-
function _sfc_ssrRender$
|
|
7102
|
+
function _sfc_ssrRender$d(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
7056
7103
|
if ($setup.html) {
|
|
7057
7104
|
_push(`<section${ssrRenderAttrs(mergeProps({ class: "ui-section" }, _attrs))}>`);
|
|
7058
7105
|
_push(ssrRenderComponent($setup["Collapse"], {
|
|
@@ -7075,15 +7122,15 @@ function _sfc_ssrRender$c(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
7075
7122
|
_push(`<!---->`);
|
|
7076
7123
|
}
|
|
7077
7124
|
}
|
|
7078
|
-
const _sfc_setup$
|
|
7079
|
-
_sfc_main$
|
|
7125
|
+
const _sfc_setup$d = _sfc_main$d.setup;
|
|
7126
|
+
_sfc_main$d.setup = (props, ctx) => {
|
|
7080
7127
|
const ssrContext = useSSRContext();
|
|
7081
7128
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/DocDescription.vue");
|
|
7082
|
-
return _sfc_setup$
|
|
7129
|
+
return _sfc_setup$d ? _sfc_setup$d(props, ctx) : void 0;
|
|
7083
7130
|
};
|
|
7084
|
-
const DocDescription = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7131
|
+
const DocDescription = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["ssrRender", _sfc_ssrRender$d]]);
|
|
7085
7132
|
|
|
7086
|
-
const _sfc_main$
|
|
7133
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
7087
7134
|
__name: "DocBanners",
|
|
7088
7135
|
props: {
|
|
7089
7136
|
apiDoc: { default: () => globalThis.$storefront.apiContext?.doc },
|
|
@@ -7098,7 +7145,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
7098
7145
|
return __returned__;
|
|
7099
7146
|
}
|
|
7100
7147
|
});
|
|
7101
|
-
function _sfc_ssrRender$
|
|
7148
|
+
function _sfc_ssrRender$c(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
7102
7149
|
const _component_AImg = resolveComponent("AImg");
|
|
7103
7150
|
if ($setup.pictures.length) {
|
|
7104
7151
|
_push(`<section${ssrRenderAttrs(mergeProps({ class: "ui-section" }, _attrs))}><ul class="flex flex-wrap gap-4 lg:flex-nowrap"><!--[-->`);
|
|
@@ -7112,15 +7159,15 @@ function _sfc_ssrRender$b(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
7112
7159
|
_push(`<!---->`);
|
|
7113
7160
|
}
|
|
7114
7161
|
}
|
|
7115
|
-
const _sfc_setup$
|
|
7116
|
-
_sfc_main$
|
|
7162
|
+
const _sfc_setup$c = _sfc_main$c.setup;
|
|
7163
|
+
_sfc_main$c.setup = (props, ctx) => {
|
|
7117
7164
|
const ssrContext = useSSRContext();
|
|
7118
7165
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/DocBanners.vue");
|
|
7119
|
-
return _sfc_setup$
|
|
7166
|
+
return _sfc_setup$c ? _sfc_setup$c(props, ctx) : void 0;
|
|
7120
7167
|
};
|
|
7121
|
-
const DocBanners = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7168
|
+
const DocBanners = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["ssrRender", _sfc_ssrRender$c]]);
|
|
7122
7169
|
|
|
7123
|
-
const _sfc_main$
|
|
7170
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
7124
7171
|
__name: "CheckoutLink",
|
|
7125
7172
|
props: {
|
|
7126
7173
|
to: { default: "cart" },
|
|
@@ -7175,20 +7222,20 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
7175
7222
|
return __returned__;
|
|
7176
7223
|
}
|
|
7177
7224
|
});
|
|
7178
|
-
function _sfc_ssrRender$
|
|
7225
|
+
function _sfc_ssrRender$b(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
7179
7226
|
_push(`<a${ssrRenderAttrs(mergeProps({ href: $setup.href }, _attrs))}>`);
|
|
7180
7227
|
ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
|
|
7181
7228
|
_push(`</a>`);
|
|
7182
7229
|
}
|
|
7183
|
-
const _sfc_setup$
|
|
7184
|
-
_sfc_main$
|
|
7230
|
+
const _sfc_setup$b = _sfc_main$b.setup;
|
|
7231
|
+
_sfc_main$b.setup = (props, ctx) => {
|
|
7185
7232
|
const ssrContext = useSSRContext();
|
|
7186
7233
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/CheckoutLink.vue");
|
|
7187
|
-
return _sfc_setup$
|
|
7234
|
+
return _sfc_setup$b ? _sfc_setup$b(props, ctx) : void 0;
|
|
7188
7235
|
};
|
|
7189
|
-
const CheckoutLink = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7236
|
+
const CheckoutLink = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["ssrRender", _sfc_ssrRender$b]]);
|
|
7190
7237
|
|
|
7191
|
-
const _sfc_main$
|
|
7238
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
7192
7239
|
__name: "QuantitySelectorControl",
|
|
7193
7240
|
props: {
|
|
7194
7241
|
isMinus: { type: Boolean }
|
|
@@ -7205,7 +7252,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
7205
7252
|
return __returned__;
|
|
7206
7253
|
}
|
|
7207
7254
|
});
|
|
7208
|
-
function _sfc_ssrRender$
|
|
7255
|
+
function _sfc_ssrRender$a(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
7209
7256
|
_push(`<button${ssrRenderAttrs(mergeProps({
|
|
7210
7257
|
type: "button",
|
|
7211
7258
|
class: "leading-12 h-12 w-10 text-xl enabled:text-primary enabled:hover:bg-primary-100/70 disabled:opacity-40",
|
|
@@ -7222,16 +7269,16 @@ function _sfc_ssrRender$9(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
7222
7269
|
}, _push, _parent);
|
|
7223
7270
|
_push(`</button>`);
|
|
7224
7271
|
}
|
|
7225
|
-
const _sfc_setup$
|
|
7226
|
-
_sfc_main$
|
|
7272
|
+
const _sfc_setup$a = _sfc_main$a.setup;
|
|
7273
|
+
_sfc_main$a.setup = (props, ctx) => {
|
|
7227
7274
|
const ssrContext = useSSRContext();
|
|
7228
7275
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/QuantitySelectorControl.vue");
|
|
7229
|
-
return _sfc_setup$
|
|
7276
|
+
return _sfc_setup$a ? _sfc_setup$a(props, ctx) : void 0;
|
|
7230
7277
|
};
|
|
7231
|
-
const QuantitySelectorControl = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7278
|
+
const QuantitySelectorControl = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["ssrRender", _sfc_ssrRender$a]]);
|
|
7232
7279
|
|
|
7233
7280
|
const quantitySelectorKey = Symbol("quantitySelector");
|
|
7234
|
-
const _sfc_main$
|
|
7281
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
7235
7282
|
__name: "QuantitySelector",
|
|
7236
7283
|
props: {
|
|
7237
7284
|
modelValue: { default: 1 },
|
|
@@ -7247,7 +7294,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
7247
7294
|
const props = __props;
|
|
7248
7295
|
const emit = __emit;
|
|
7249
7296
|
const input = ref(null);
|
|
7250
|
-
const inputId =
|
|
7297
|
+
const inputId = useId("NInput");
|
|
7251
7298
|
const value = computed({
|
|
7252
7299
|
get() {
|
|
7253
7300
|
return props.modelValue;
|
|
@@ -7280,7 +7327,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
7280
7327
|
return __returned__;
|
|
7281
7328
|
}
|
|
7282
7329
|
});
|
|
7283
|
-
function _sfc_ssrRender$
|
|
7330
|
+
function _sfc_ssrRender$9(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
7284
7331
|
_push(`<div${ssrRenderAttrs(mergeProps({ "data-quantity-selector": "" }, _attrs))}>`);
|
|
7285
7332
|
ssrRenderSlot(_ctx.$slots, "label", { inputId: $setup.inputId, value: $setup.value }, () => {
|
|
7286
7333
|
_push(`<label${ssrRenderAttr("for", $setup.inputId)} class="sr-only">${ssrInterpolate("Quantidade")}</label>`);
|
|
@@ -7317,15 +7364,15 @@ function _sfc_ssrRender$8(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
7317
7364
|
}, _push, _parent);
|
|
7318
7365
|
_push(`</div></div>`);
|
|
7319
7366
|
}
|
|
7320
|
-
const _sfc_setup$
|
|
7321
|
-
_sfc_main$
|
|
7367
|
+
const _sfc_setup$9 = _sfc_main$9.setup;
|
|
7368
|
+
_sfc_main$9.setup = (props, ctx) => {
|
|
7322
7369
|
const ssrContext = useSSRContext();
|
|
7323
7370
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/QuantitySelector.vue");
|
|
7324
|
-
return _sfc_setup$
|
|
7371
|
+
return _sfc_setup$9 ? _sfc_setup$9(props, ctx) : void 0;
|
|
7325
7372
|
};
|
|
7326
|
-
const QuantitySelector = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7373
|
+
const QuantitySelector = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["ssrRender", _sfc_ssrRender$9]]);
|
|
7327
7374
|
|
|
7328
|
-
const _sfc_main$
|
|
7375
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
7329
7376
|
__name: "ImagesGallery",
|
|
7330
7377
|
props: {
|
|
7331
7378
|
pictures: {}
|
|
@@ -7382,7 +7429,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
7382
7429
|
return __returned__;
|
|
7383
7430
|
}
|
|
7384
7431
|
});
|
|
7385
|
-
function _sfc_ssrRender$
|
|
7432
|
+
function _sfc_ssrRender$8(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
7386
7433
|
const _component_Carousel = resolveComponent("Carousel");
|
|
7387
7434
|
const _component_AImg = resolveComponent("AImg");
|
|
7388
7435
|
const _component_CarouselControl = resolveComponent("CarouselControl");
|
|
@@ -7562,13 +7609,13 @@ function _sfc_ssrRender$7(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
7562
7609
|
}
|
|
7563
7610
|
_push(`</div></div>`);
|
|
7564
7611
|
}
|
|
7565
|
-
const _sfc_setup$
|
|
7566
|
-
_sfc_main$
|
|
7612
|
+
const _sfc_setup$8 = _sfc_main$8.setup;
|
|
7613
|
+
_sfc_main$8.setup = (props, ctx) => {
|
|
7567
7614
|
const ssrContext = useSSRContext();
|
|
7568
7615
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ImagesGallery.vue");
|
|
7569
|
-
return _sfc_setup$
|
|
7616
|
+
return _sfc_setup$8 ? _sfc_setup$8(props, ctx) : void 0;
|
|
7570
7617
|
};
|
|
7571
|
-
const ImagesGallery = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
7618
|
+
const ImagesGallery = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["ssrRender", _sfc_ssrRender$8]]);
|
|
7572
7619
|
|
|
7573
7620
|
const useSkuSelector = (props) => {
|
|
7574
7621
|
const grids = shallowReactive(
|
|
@@ -7679,7 +7726,7 @@ const useSkuSelector = (props) => {
|
|
|
7679
7726
|
};
|
|
7680
7727
|
};
|
|
7681
7728
|
|
|
7682
|
-
const _sfc_main$
|
|
7729
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
7683
7730
|
__name: "SkuSelector",
|
|
7684
7731
|
props: {
|
|
7685
7732
|
variations: {},
|
|
@@ -7708,7 +7755,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
7708
7755
|
return __returned__;
|
|
7709
7756
|
}
|
|
7710
7757
|
});
|
|
7711
|
-
function _sfc_ssrRender$
|
|
7758
|
+
function _sfc_ssrRender$7(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
7712
7759
|
_push(`<div${ssrRenderAttrs(_attrs)}><!--[-->`);
|
|
7713
7760
|
ssrRenderList($setup.variationsGrids, (options, gridId) => {
|
|
7714
7761
|
_push(`<div class="mt-3"><span class="text-base-700 text-sm font-medium">${ssrInterpolate($setup.getGridTitle(gridId))}: `);
|
|
@@ -7735,13 +7782,26 @@ function _sfc_ssrRender$6(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
7735
7782
|
});
|
|
7736
7783
|
_push(`<!--]--></div>`);
|
|
7737
7784
|
}
|
|
7738
|
-
const _sfc_setup$
|
|
7739
|
-
_sfc_main$
|
|
7785
|
+
const _sfc_setup$7 = _sfc_main$7.setup;
|
|
7786
|
+
_sfc_main$7.setup = (props, ctx) => {
|
|
7740
7787
|
const ssrContext = useSSRContext();
|
|
7741
7788
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/SkuSelector.vue");
|
|
7742
|
-
return _sfc_setup$
|
|
7789
|
+
return _sfc_setup$7 ? _sfc_setup$7(props, ctx) : void 0;
|
|
7790
|
+
};
|
|
7791
|
+
const SkuSelector = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["ssrRender", _sfc_ssrRender$7]]);
|
|
7792
|
+
|
|
7793
|
+
const _sfc_main$6 = {};
|
|
7794
|
+
|
|
7795
|
+
function _sfc_ssrRender$6(_ctx, _push, _parent, _attrs) {
|
|
7796
|
+
_push(`<div${ssrRenderAttrs(_attrs)}></div>`);
|
|
7797
|
+
}
|
|
7798
|
+
const _sfc_setup$6 = _sfc_main$6.setup;
|
|
7799
|
+
_sfc_main$6.setup = (props, ctx) => {
|
|
7800
|
+
const ssrContext = useSSRContext()
|
|
7801
|
+
;(ssrContext.modules || (ssrContext.modules = new Set())).add("src/components/ShippingCalculator.vue");
|
|
7802
|
+
return _sfc_setup$6 ? _sfc_setup$6(props, ctx) : undefined
|
|
7743
7803
|
};
|
|
7744
|
-
const
|
|
7804
|
+
const ShippingCalculator = /*#__PURE__*/_export_sfc(_sfc_main$6, [['ssrRender',_sfc_ssrRender$6]]);
|
|
7745
7805
|
|
|
7746
7806
|
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
7747
7807
|
__name: "ProductDetails",
|
|
@@ -7791,7 +7851,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
7791
7851
|
return;
|
|
7792
7852
|
addProductToCart(product, variationId.value ? variationId.value : void 0);
|
|
7793
7853
|
};
|
|
7794
|
-
const __returned__ = { props, product, title, isActive, quantity, params, hasSkuSelectionAlert, variationId, isSkuSelected, checkVariation, addToCart, CheckoutLink, QuantitySelector, Prices, ImagesGallery, SkuSelector };
|
|
7854
|
+
const __returned__ = { props, product, title, isActive, quantity, params, hasSkuSelectionAlert, variationId, isSkuSelected, checkVariation, addToCart, CheckoutLink, QuantitySelector, Prices, ImagesGallery, SkuSelector, ShippingCalculator };
|
|
7795
7855
|
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
7796
7856
|
return __returned__;
|
|
7797
7857
|
}
|
|
@@ -7877,7 +7937,9 @@ function _sfc_ssrRender$5(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
7877
7937
|
}),
|
|
7878
7938
|
_: 1
|
|
7879
7939
|
}, _parent));
|
|
7880
|
-
_push(`<button class="ui-btn-lg ui-btn-contrast grow"${ssrRenderAttr("data-tooltip", !$setup.isSkuSelected ? "Escolha os detalhes do produto para comprar" : null)}>${ssrInterpolate("Adicionar ao carrinho")}</button></div
|
|
7940
|
+
_push(`<button class="ui-btn-lg ui-btn-contrast grow"${ssrRenderAttr("data-tooltip", !$setup.isSkuSelected ? "Escolha os detalhes do produto para comprar" : null)}>${ssrInterpolate("Adicionar ao carrinho")}</button></div>`);
|
|
7941
|
+
_push(ssrRenderComponent($setup["ShippingCalculator"], null, null, _parent));
|
|
7942
|
+
_push(`</div>`);
|
|
7881
7943
|
} else {
|
|
7882
7944
|
_push(`<!---->`);
|
|
7883
7945
|
}
|
|
@@ -8130,6 +8192,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
8130
8192
|
__name: "SearchShowcase",
|
|
8131
8193
|
props: {
|
|
8132
8194
|
term: {},
|
|
8195
|
+
pageSize: {},
|
|
8133
8196
|
fixedParams: {},
|
|
8134
8197
|
products: {},
|
|
8135
8198
|
resultMeta: {},
|
|
@@ -8221,7 +8284,10 @@ function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
8221
8284
|
}, {
|
|
8222
8285
|
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
8223
8286
|
if (_push3) {
|
|
8224
|
-
_push3(ssrRenderComponent($setup["ListboxButton"], {
|
|
8287
|
+
_push3(ssrRenderComponent($setup["ListboxButton"], {
|
|
8288
|
+
id: _ctx.$useId("ss"),
|
|
8289
|
+
class: "ui-btn-sm ui-btn-secondary"
|
|
8290
|
+
}, {
|
|
8225
8291
|
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
|
|
8226
8292
|
if (_push4) {
|
|
8227
8293
|
_push4(`${ssrInterpolate("Ordenar")}`);
|
|
@@ -8366,12 +8432,15 @@ function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
8366
8432
|
}, _parent3, _scopeId2));
|
|
8367
8433
|
} else {
|
|
8368
8434
|
return [
|
|
8369
|
-
createVNode($setup["ListboxButton"], {
|
|
8435
|
+
createVNode($setup["ListboxButton"], {
|
|
8436
|
+
id: _ctx.$useId("ss"),
|
|
8437
|
+
class: "ui-btn-sm ui-btn-secondary"
|
|
8438
|
+
}, {
|
|
8370
8439
|
default: withCtx(() => [
|
|
8371
8440
|
createTextVNode(toDisplayString("Ordenar"))
|
|
8372
8441
|
]),
|
|
8373
8442
|
_: 1
|
|
8374
|
-
}),
|
|
8443
|
+
}, 8, ["id"]),
|
|
8375
8444
|
createVNode(_component_Fade, null, {
|
|
8376
8445
|
default: withCtx(() => [
|
|
8377
8446
|
createVNode($setup["ListboxOptions"], { class: "divide-base-100 absolute right-0 mt-2 divide-y rounded bg-white shadow ring-1 ring-black/5 focus:outline-none" }, {
|
|
@@ -8455,12 +8524,15 @@ function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
8455
8524
|
class: "text-base-800 relative text-sm"
|
|
8456
8525
|
}, {
|
|
8457
8526
|
default: withCtx(() => [
|
|
8458
|
-
createVNode($setup["ListboxButton"], {
|
|
8527
|
+
createVNode($setup["ListboxButton"], {
|
|
8528
|
+
id: _ctx.$useId("ss"),
|
|
8529
|
+
class: "ui-btn-sm ui-btn-secondary"
|
|
8530
|
+
}, {
|
|
8459
8531
|
default: withCtx(() => [
|
|
8460
8532
|
createTextVNode(toDisplayString("Ordenar"))
|
|
8461
8533
|
]),
|
|
8462
8534
|
_: 1
|
|
8463
|
-
}),
|
|
8535
|
+
}, 8, ["id"]),
|
|
8464
8536
|
createVNode(_component_Fade, null, {
|
|
8465
8537
|
default: withCtx(() => [
|
|
8466
8538
|
createVNode($setup["ListboxOptions"], { class: "divide-base-100 absolute right-0 mt-2 divide-y rounded bg-white shadow ring-1 ring-black/5 focus:outline-none" }, {
|
|
@@ -8642,7 +8714,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
8642
8714
|
function _sfc_ssrRender$1(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
8643
8715
|
const _component_AImg = resolveComponent("AImg");
|
|
8644
8716
|
if ($setup.title) {
|
|
8645
|
-
_push(`<section${ssrRenderAttrs(mergeProps({ class: "
|
|
8717
|
+
_push(`<section${ssrRenderAttrs(mergeProps({ class: "bg-secondary-100 py-1" }, _attrs))}><article class="ui-section"><div class="prose mx-auto"><div class="not-prose flex items-center gap-4 md:justify-center">`);
|
|
8646
8718
|
if ($setup.logo) {
|
|
8647
8719
|
_push(ssrRenderComponent(_component_AImg, {
|
|
8648
8720
|
picture: $setup.logo,
|
|
@@ -8652,13 +8724,13 @@ function _sfc_ssrRender$1(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
8652
8724
|
} else {
|
|
8653
8725
|
_push(`<!---->`);
|
|
8654
8726
|
}
|
|
8655
|
-
_push(`<h1 class="ui-title">${ssrInterpolate($setup.title)}</h1></div
|
|
8727
|
+
_push(`<h1 class="ui-title text-secondary-800 text-center">${ssrInterpolate($setup.title)}</h1></div>`);
|
|
8656
8728
|
if ($setup.description) {
|
|
8657
|
-
_push(`<p>${ssrInterpolate($setup.description)}</p>`);
|
|
8729
|
+
_push(`<p class="${ssrRenderClass($setup.description.length < 120 && "md:text-center")}">${ssrInterpolate($setup.description)}</p>`);
|
|
8658
8730
|
} else {
|
|
8659
8731
|
_push(`<!---->`);
|
|
8660
8732
|
}
|
|
8661
|
-
_push(`</div></section>`);
|
|
8733
|
+
_push(`</div></article></section>`);
|
|
8662
8734
|
} else {
|
|
8663
8735
|
_push(`<!---->`);
|
|
8664
8736
|
}
|
|
@@ -8822,7 +8894,7 @@ const $$ = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
8822
8894
|
}
|
|
8823
8895
|
loadError = err;
|
|
8824
8896
|
}
|
|
8825
|
-
return renderTemplate`<html${addAttribute(routeContext?.lang.replace("_", "-"), "lang")}> ${routeContext && renderTemplate`${renderComponent($$result, "Base", $$Base, {}, { "base-head": ($$
|
|
8897
|
+
return renderTemplate`<html${addAttribute(routeContext?.lang.replace("_", "-"), "lang")}> ${routeContext && renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`${renderComponent($$result2, "Base", $$Base, {}, { "base-head": ($$result3) => renderTemplate`${renderComponent($$result3, "BaseHead", $$BaseHead, { "slot": "base-head" })}`, "default": ($$result3) => renderTemplate`${renderComponent($$result3, "PageHeader", $$PageHeader, {})}${renderComponent($$result3, "Main", $$Main, {})}${renderComponent($$result3, "PageFooter", $$PageFooter, {})}` })}` })}`}${loadError && renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`${unescapeHTML(loadError.responseHTML)}` })}`}</html>`;
|
|
8826
8898
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/[...slug].astro", void 0);
|
|
8827
8899
|
const $$file = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/[...slug].astro";
|
|
8828
8900
|
const $$url = "/[...slug]";
|
|
@@ -8835,4 +8907,4 @@ const ____slug_ = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty(
|
|
|
8835
8907
|
url: $$url
|
|
8836
8908
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
8837
8909
|
|
|
8838
|
-
export { $$
|
|
8910
|
+
export { $$Base as $, CheckoutLink as C, FooterStamps as F, Pagination as P, QuantitySelector as Q, SearchEngine as S, _export_sfc as _, $$BaseHead as a, $$PageHeader as b, $$PageFooter as c, $$Picture as d, i19shoppingCart as e, i19error as f, getConfig as g, i19errorMsg as h, i19myAccount as i, i19notFound as j, i19home as k, loadRouteContext as l, mod as m, createApp as n, clearAccents as o, getSearchUrl as p, ProductShelf as q, parseProduct as r, searchHistory as s, removeCartItem as t, Prices as u, freeShippingFromValue as v, shoppingCart as w, totalItems as x, ____slug_ as y };
|