@useinsider/guido 3.2.0-beta.e69fb3b → 3.2.0-beta.ecc7c6c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/config/schemas.js +1 -1
- package/dist/@types/config/validator.js +34 -27
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +81 -76
- package/dist/components/organisms/base/Toaster.vue2.js +11 -10
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +12 -12
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +6 -6
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +15 -9
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +40 -31
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +20 -19
- package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +14 -11
- package/dist/components/organisms/header/EditorActions.vue.js +12 -11
- package/dist/components/organisms/header/EditorActions.vue2.js +22 -18
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +15 -12
- package/dist/components/organisms/header/LeftSlot.vue2.js +19 -16
- package/dist/components/organisms/header/MiddleSlot.vue2.js +11 -14
- package/dist/components/organisms/header/RightSlot.vue2.js +17 -14
- package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +12 -11
- package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +26 -24
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +12 -11
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +44 -41
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +12 -11
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +38 -36
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +21 -18
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +31 -27
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +12 -11
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +32 -30
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +12 -11
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +23 -21
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +9 -8
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +10 -9
- package/dist/composables/useActionsApi.js +38 -37
- package/dist/composables/useBlocksConfig.js +26 -26
- package/dist/composables/useFullStoryBridge.js +9 -8
- package/dist/composables/useHtmlCompiler.js +26 -34
- package/dist/composables/useHtmlValidator.js +114 -101
- package/dist/composables/useHttp.js +30 -30
- package/dist/composables/usePartner.js +1 -1
- package/dist/composables/useRecommendation.js +15 -14
- package/dist/composables/useRibbonOffset.js +15 -15
- package/dist/composables/useSave.js +23 -19
- package/dist/composables/useStripo.js +48 -53
- package/dist/composables/useSyncModuleExtractor.js +29 -31
- package/dist/composables/useTimerClone.js +25 -24
- package/dist/composables/useTranslations.js +3 -2
- package/dist/composables/useValidation.js +8 -7
- package/dist/composables/validators/useCouponBlockValidator.js +24 -0
- package/dist/composables/validators/useLiquidValidator.js +13 -13
- package/dist/config/compiler/recommendationCompilerRules.js +27 -27
- package/dist/config/compiler/unsubscribeCompilerRules.js +19 -17
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +11 -10
- package/dist/config/migrator/checkboxMigrator.js +21 -20
- package/dist/config/migrator/couponBlockMigrator.js +19 -18
- package/dist/config/migrator/itemsBlockMigrator.js +89 -87
- package/dist/config/migrator/radioButtonMigrator.js +63 -42
- package/dist/config/migrator/recommendationMigrator.js +109 -106
- package/dist/config/migrator/unsubscribeMigrator.js +11 -10
- package/dist/enums/unsubscribe.js +19 -18
- package/dist/extensions/Blocks/Items/block.js +9 -9
- package/dist/extensions/Blocks/Items/controls/button/link.js +14 -14
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +97 -89
- package/dist/extensions/Blocks/Items/controls/image/link.js +14 -14
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +24 -23
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +14 -13
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +47 -44
- package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +38 -38
- package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +11 -11
- package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +40 -38
- package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +35 -35
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +162 -155
- package/dist/extensions/Blocks/Items/enums/productEnums.js +14 -9
- package/dist/extensions/Blocks/Items/template.js +210 -210
- package/dist/extensions/Blocks/RadioButton/template.js +1 -1
- package/dist/extensions/Blocks/Recommendation/controls/button/index.js +36 -36
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +133 -128
- package/dist/extensions/Blocks/Recommendation/controls/customAttribute/index.js +9 -9
- package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +10 -10
- package/dist/extensions/Blocks/Recommendation/controls/image/index.js +9 -9
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +18 -17
- package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +6 -4
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +90 -82
- package/dist/extensions/Blocks/Recommendation/controls/main/layoutOrientation.js +18 -18
- package/dist/extensions/Blocks/Recommendation/controls/main/productCount.js +4 -4
- package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +36 -35
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +135 -134
- package/dist/extensions/Blocks/Recommendation/controls/name/index.js +24 -24
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +10 -10
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +24 -24
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +24 -24
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.js +4 -4
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.js +4 -4
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +24 -24
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.js +4 -4
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.js +4 -4
- package/dist/extensions/Blocks/Recommendation/controls/price/index.js +24 -24
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +32 -32
- package/dist/extensions/Blocks/Recommendation/controls/syncInfoMessage.js +20 -18
- package/dist/extensions/Blocks/Recommendation/extension.js +32 -31
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +16 -8
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +64 -54
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +23 -22
- package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +10 -10
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +10 -10
- package/dist/extensions/Blocks/Recommendation/templates/index.js +6 -6
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +25 -24
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +1 -1
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +47 -45
- package/dist/extensions/Blocks/Recommendation/validation/filterSchema.js +16 -13
- package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +33 -0
- package/dist/extensions/Blocks/Unsubscribe/control.js +13 -11
- package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +18 -16
- package/dist/extensions/Blocks/common-control.js +26 -25
- package/dist/extensions/DynamicContent/dynamic-content.js +58 -53
- package/dist/guido.css +1 -1
- package/dist/library.js +12 -11
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +234 -233
- package/dist/node_modules/lodash-es/_DataView.js +6 -0
- package/dist/node_modules/lodash-es/_Promise.js +6 -0
- package/dist/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/lodash-es/_SetCache.js +13 -0
- package/dist/node_modules/lodash-es/_Stack.js +18 -0
- package/dist/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/lodash-es/_WeakMap.js +6 -0
- package/dist/node_modules/lodash-es/_arrayFilter.js +10 -0
- package/dist/node_modules/lodash-es/_arrayLikeKeys.js +20 -0
- package/dist/node_modules/lodash-es/_arrayMap.js +8 -0
- package/dist/node_modules/lodash-es/_arrayPush.js +8 -0
- package/dist/node_modules/lodash-es/_arraySome.js +9 -0
- package/dist/node_modules/lodash-es/_baseEach.js +6 -0
- package/dist/node_modules/lodash-es/_baseFlatten.js +13 -0
- package/dist/node_modules/lodash-es/_baseFor.js +5 -0
- package/dist/node_modules/lodash-es/_baseForOwn.js +8 -0
- package/dist/node_modules/lodash-es/_baseGet.js +11 -0
- package/dist/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
- package/dist/node_modules/lodash-es/_baseHasIn.js +6 -0
- package/dist/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/lodash-es/_baseIsEqual.js +8 -0
- package/dist/node_modules/lodash-es/_baseIsEqualDeep.js +32 -0
- package/dist/node_modules/lodash-es/_baseIsMatch.js +29 -0
- package/dist/node_modules/lodash-es/_baseIsTypedArray.js +12 -0
- package/dist/node_modules/lodash-es/_baseIteratee.js +11 -0
- package/dist/node_modules/lodash-es/_baseKeys.js +14 -0
- package/dist/node_modules/lodash-es/_baseMap.js +11 -0
- package/dist/node_modules/lodash-es/_baseMatches.js +12 -0
- package/dist/node_modules/lodash-es/_baseMatchesProperty.js +17 -0
- package/dist/node_modules/lodash-es/_baseProperty.js +8 -0
- package/dist/node_modules/lodash-es/_basePropertyDeep.js +9 -0
- package/dist/node_modules/lodash-es/_baseRange.js +9 -0
- package/dist/node_modules/lodash-es/_baseTimes.js +8 -0
- package/dist/node_modules/lodash-es/_baseToString.js +18 -0
- package/dist/node_modules/lodash-es/_baseTrim.js +8 -0
- package/dist/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/lodash-es/_cacheHas.js +6 -0
- package/dist/node_modules/lodash-es/_castPath.js +10 -0
- package/dist/node_modules/lodash-es/_createBaseEach.js +15 -0
- package/dist/node_modules/lodash-es/_createBaseFor.js +13 -0
- package/dist/node_modules/lodash-es/_createRange.js +11 -0
- package/dist/node_modules/lodash-es/_equalArrays.js +40 -0
- package/dist/node_modules/lodash-es/_equalByTag.js +45 -0
- package/dist/node_modules/lodash-es/_equalObjects.js +36 -0
- package/dist/node_modules/lodash-es/_getAllKeys.js +9 -0
- package/dist/node_modules/lodash-es/_getMatchData.js +12 -0
- package/dist/node_modules/lodash-es/_getSymbols.js +10 -0
- package/dist/node_modules/lodash-es/_getTag.js +28 -0
- package/dist/node_modules/lodash-es/_getValue.js +1 -1
- package/dist/node_modules/lodash-es/_hasPath.js +19 -0
- package/dist/node_modules/lodash-es/_isFlattenable.js +10 -0
- package/dist/node_modules/lodash-es/_isIndex.js +8 -0
- package/dist/node_modules/lodash-es/_isIterateeCall.js +13 -0
- package/dist/node_modules/lodash-es/_isKey.js +12 -0
- package/dist/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/lodash-es/_isStrictComparable.js +7 -0
- package/dist/node_modules/lodash-es/_mapToArray.js +9 -0
- package/dist/node_modules/lodash-es/_matchesStrictComparable.js +8 -0
- package/dist/node_modules/lodash-es/_memoizeCapped.js +11 -0
- package/dist/node_modules/lodash-es/_nativeKeys.js +5 -0
- package/dist/node_modules/lodash-es/_nodeUtil.js +11 -0
- package/dist/node_modules/lodash-es/_overArg.js +8 -0
- package/dist/node_modules/lodash-es/_setCacheAdd.js +7 -0
- package/dist/node_modules/lodash-es/_setCacheHas.js +6 -0
- package/dist/node_modules/lodash-es/_setToArray.js +9 -0
- package/dist/node_modules/lodash-es/_stackClear.js +7 -0
- package/dist/node_modules/lodash-es/_stackDelete.js +7 -0
- package/dist/node_modules/lodash-es/_stackGet.js +6 -0
- package/dist/node_modules/lodash-es/_stackHas.js +6 -0
- package/dist/node_modules/lodash-es/_stackSet.js +17 -0
- package/dist/node_modules/lodash-es/_stringToPath.js +10 -0
- package/dist/node_modules/lodash-es/_toKey.js +10 -0
- package/dist/node_modules/lodash-es/_trimmedEndIndex.js +9 -0
- package/dist/node_modules/lodash-es/flatMap.js +8 -0
- package/dist/node_modules/lodash-es/get.js +8 -0
- package/dist/node_modules/lodash-es/hasIn.js +8 -0
- package/dist/node_modules/lodash-es/identity.js +6 -0
- package/dist/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/lodash-es/isSymbol.js +9 -0
- package/dist/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/lodash-es/keys.js +9 -0
- package/dist/node_modules/lodash-es/map.js +11 -0
- package/dist/node_modules/lodash-es/property.js +10 -0
- package/dist/node_modules/lodash-es/range.js +5 -0
- package/dist/node_modules/lodash-es/stubArray.js +6 -0
- package/dist/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/node_modules/lodash-es/toFinite.js +14 -0
- package/dist/node_modules/lodash-es/toNumber.js +22 -0
- package/dist/node_modules/lodash-es/toString.js +7 -0
- package/dist/node_modules/valibot/dist/index.js +126 -122
- package/dist/services/recommendationApi.js +17 -14
- package/dist/services/templateLibraryApi.js +40 -38
- package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
- package/dist/src/composables/useHtmlCompiler.d.ts +2 -1
- package/dist/src/composables/validators/useCouponBlockValidator.d.ts +3 -0
- package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +7 -1
- package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +21 -0
- package/dist/src/stores/dynamic-content.d.ts +3 -3
- package/dist/stores/config.js +81 -25
- package/dist/stores/dynamic-content.js +11 -6
- package/dist/stores/onboarding.js +1 -1
- package/dist/stores/preview.js +9 -6
- package/dist/stores/unsubscribe.js +4 -1
- package/dist/utils/dateUtil.js +10 -7
- package/dist/utils/genericUtil.js +13 -10
- package/dist/utils/pairProductVariables.js +89 -87
- package/package.json +1 -6
- package/dist/enums/displayConditions.js +0 -80
- package/dist/src/enums/displayConditions.d.ts +0 -2
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ToasterTypeOptions as c } from "../../enums/toaster.js";
|
|
2
|
+
import { COUPON_PLACEHOLDER_DEFAULT as i, COUPON_PLACEHOLDER_LIQUID as l } from "../../extensions/Blocks/CouponBlock/template.js";
|
|
3
|
+
import { useToaster as m } from "../useToaster.js";
|
|
4
|
+
import { useTranslations as p } from "../useTranslations.js";
|
|
5
|
+
const u = /* @__PURE__ */ new Set([
|
|
6
|
+
i,
|
|
7
|
+
l
|
|
8
|
+
]), A = () => {
|
|
9
|
+
const { showToaster: t } = m(), r = p();
|
|
10
|
+
return { validateCouponBlockTags: (e) => {
|
|
11
|
+
const n = new DOMParser().parseFromString(e, "text/html");
|
|
12
|
+
return Array.from(n.querySelectorAll(".coupon-block")).find((s) => {
|
|
13
|
+
var o;
|
|
14
|
+
const a = ((o = s.textContent) == null ? void 0 : o.trim()) ?? "";
|
|
15
|
+
return !u.has(a);
|
|
16
|
+
}) ? (t({
|
|
17
|
+
type: c.Warning,
|
|
18
|
+
message: r("newsletter.coupon-tag-modified")
|
|
19
|
+
}), !1) : !0;
|
|
20
|
+
} };
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
A as useCouponBlockValidator
|
|
24
|
+
};
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { ToasterTypeOptions as
|
|
1
|
+
import { ToasterTypeOptions as a } from "../../enums/toaster.js";
|
|
2
2
|
import { base64EncodeWithSpecialChars as u } from "../../utils/base64.js";
|
|
3
3
|
import { useHttp as d } from "../useHttp.js";
|
|
4
4
|
import { useToaster as c } from "../useToaster.js";
|
|
5
5
|
import { useTranslations as p } from "../useTranslations.js";
|
|
6
6
|
const v = () => {
|
|
7
|
-
const { post:
|
|
8
|
-
return { validateLiquidSyntax: async (
|
|
7
|
+
const { post: i } = d(), { showToaster: e } = c(), s = p();
|
|
8
|
+
return { validateLiquidSyntax: async (o) => {
|
|
9
9
|
try {
|
|
10
|
-
const t = await
|
|
10
|
+
const t = await i("/newsletter/contents/validate-syntax", [{
|
|
11
11
|
identifier: "default",
|
|
12
12
|
syntax: "liquid",
|
|
13
13
|
contents: {
|
|
14
14
|
subject: null,
|
|
15
15
|
preheader: null,
|
|
16
|
-
html: u(
|
|
16
|
+
html: u(o),
|
|
17
17
|
ampHtml: null
|
|
18
18
|
}
|
|
19
19
|
}]);
|
|
20
20
|
if (!Array.isArray(t.data)) {
|
|
21
21
|
const l = t.data;
|
|
22
22
|
return e({
|
|
23
|
-
type:
|
|
24
|
-
message: l.message ??
|
|
23
|
+
type: a.Warning,
|
|
24
|
+
message: l.message ?? s("journey-builder.liquid-validation-failed")
|
|
25
25
|
}), !1;
|
|
26
26
|
}
|
|
27
|
-
const [
|
|
28
|
-
return
|
|
29
|
-
type:
|
|
30
|
-
message:
|
|
27
|
+
const [r] = t.data, n = Object.values((r == null ? void 0 : r.errors) ?? {});
|
|
28
|
+
return n.length ? (e({
|
|
29
|
+
type: a.Warning,
|
|
30
|
+
message: n[0].replace(/^line \d+:\s*/, "")
|
|
31
31
|
}), !1) : !0;
|
|
32
32
|
} catch {
|
|
33
33
|
return e({
|
|
34
|
-
type:
|
|
35
|
-
message:
|
|
34
|
+
type: a.Alert,
|
|
35
|
+
message: s("journey-builder.liquid-validation-failed")
|
|
36
36
|
}), !1;
|
|
37
37
|
}
|
|
38
38
|
} };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useRecommendation as
|
|
2
|
-
import { DUMMY_IMAGE_MAPPINGS as
|
|
1
|
+
import { useRecommendation as N } from "../../composables/useRecommendation.js";
|
|
2
|
+
import { DUMMY_IMAGE_MAPPINGS as y, REGEX as T, VerticalOrientation as M, CSS as E, ATTRIBUTES as A, CONDITIONS as g, HTML as h } from "../../enums/recommendation.js";
|
|
3
3
|
import { prepareRecommendationBlocks as x } from "./utils/recommendationCompilerUtils.js";
|
|
4
4
|
const w = [
|
|
5
5
|
{
|
|
@@ -8,7 +8,7 @@ const w = [
|
|
|
8
8
|
type: "custom",
|
|
9
9
|
processor: (c) => {
|
|
10
10
|
let e = c;
|
|
11
|
-
return Object.entries(
|
|
11
|
+
return Object.entries(y).forEach(([, l]) => {
|
|
12
12
|
Object.entries(l).forEach(([n, s]) => {
|
|
13
13
|
e = e.replaceAll(s, `{{${n}}}`);
|
|
14
14
|
});
|
|
@@ -30,13 +30,13 @@ const w = [
|
|
|
30
30
|
description: "Adding recommendation unresponsive css",
|
|
31
31
|
type: "custom",
|
|
32
32
|
processor: (c) => {
|
|
33
|
-
const { calculateCardWidth: e, getRecommendationCampaignData: l } =
|
|
33
|
+
const { calculateCardWidth: e, getRecommendationCampaignData: l } = N();
|
|
34
34
|
let n = c;
|
|
35
35
|
const s = n.match(T.ID);
|
|
36
36
|
if (s) {
|
|
37
37
|
const a = [];
|
|
38
38
|
if (s.forEach((i) => {
|
|
39
|
-
const
|
|
39
|
+
const u = /recommendation-id="(.*?)"/i.exec(i), _ = u ? u[1].trim() : "", R = l(_);
|
|
40
40
|
R.textTrimming && R.orientation === M && a.push(e(R));
|
|
41
41
|
}), a.length) {
|
|
42
42
|
const i = `width:${Math.min(...a)}px!important;`;
|
|
@@ -60,25 +60,25 @@ const w = [
|
|
|
60
60
|
type: "custom",
|
|
61
61
|
processor: (c) => {
|
|
62
62
|
let e = c;
|
|
63
|
-
const l = e.match(T.ATTRIBUTE_PARAGRAPH), { getRecommendationCampaignData: n } =
|
|
63
|
+
const l = e.match(T.ATTRIBUTE_PARAGRAPH), { getRecommendationCampaignData: n } = N();
|
|
64
64
|
return l !== null && l.forEach((s) => {
|
|
65
65
|
const a = s.match(T.CUSTOM_FIELD);
|
|
66
66
|
if (!a)
|
|
67
67
|
return;
|
|
68
|
-
const [i] = a,
|
|
69
|
-
if (!
|
|
68
|
+
const [i] = a, u = i.match(T.CUSTOM_FIELD_INDEXES_PART), _ = i.match(T.CUSTOM_FIELD_NAME_PART), R = s.match(T.ATTRIBUTE_PARAGRAPH_START_TAG);
|
|
69
|
+
if (!u || !_ || !R)
|
|
70
70
|
return;
|
|
71
|
-
const [S] =
|
|
71
|
+
const [S] = u, [b] = _, [d] = R, o = b.substring(1, b.length - 2), r = d.match(T.COMPOSITION) !== null;
|
|
72
72
|
let t = i;
|
|
73
73
|
if (r) {
|
|
74
|
-
const I = S.substring(2, S.length - 3),
|
|
75
|
-
o === A.OMNIBUS_PRICE && (
|
|
74
|
+
const I = S.substring(2, S.length - 3), m = n(I);
|
|
75
|
+
o === A.OMNIBUS_PRICE && (m.priceBeforeTextValue && (t = `${m.priceBeforeTextValue}${t}`), m.priceAfterTextValue && (t = `${t}${m.priceAfterTextValue}`)), o === A.OMNIBUS_DISCOUNT && (m.discountBeforeTextValue && (t = `${m.discountBeforeTextValue}${t}`), m.discountAfterTextValue && (t = `${t}${m.discountAfterTextValue}`));
|
|
76
76
|
}
|
|
77
|
-
const
|
|
77
|
+
const p = S.substring(2);
|
|
78
78
|
let f = "";
|
|
79
|
-
o in g.IF && (f = g.IF[o].replaceAll(`{${A.DISCOUNT}}`, `${
|
|
80
|
-
const $ = `${
|
|
81
|
-
e = e.replace(s,
|
|
79
|
+
o in g.IF && (f = g.IF[o].replaceAll(`{${A.DISCOUNT}}`, `${p}${A.DISCOUNT}`).replaceAll(`{${A.OMNIBUS_DISCOUNT}}`, `${p}${A.OMNIBUS_DISCOUNT}`).replaceAll(`{${A.OMNIBUS_PRICE}}`, `${p}${A.OMNIBUS_PRICE}`));
|
|
80
|
+
const $ = `${d}${t}${h.PARAGRAPH_END_TAG}`, C = `${f}${r ? $ : s}${g.ELSE}${d}${h.PARAGRAPH_END_TAG}${g.END_IF}`;
|
|
81
|
+
e = e.replace(s, C);
|
|
82
82
|
}), e;
|
|
83
83
|
},
|
|
84
84
|
priority: 53
|
|
@@ -136,7 +136,7 @@ const w = [
|
|
|
136
136
|
/@media[^{]*max-width\s*:\s*480px[^{]*\{((?:[^{}]*\{[^{}]*\})*[^{}]*)\}/g,
|
|
137
137
|
(l, n) => {
|
|
138
138
|
const s = n.match(/[^{}]+\{[^{}]*\}/g) || [], a = /ins-recommendation|product-image-cell|button-cell|product-info-cell/;
|
|
139
|
-
return s.every((
|
|
139
|
+
return s.every((u) => a.test(u)) ? "" : l;
|
|
140
140
|
}
|
|
141
141
|
)), e;
|
|
142
142
|
},
|
|
@@ -151,7 +151,7 @@ const w = [
|
|
|
151
151
|
/<a\b[^>]*\bes-button\b[^>]*>/g,
|
|
152
152
|
(o) => o.replace(
|
|
153
153
|
/([;"]color:)([^;"]+)/g,
|
|
154
|
-
(r, t,
|
|
154
|
+
(r, t, p) => p.includes("!important") ? r : `${t}${p} !important`
|
|
155
155
|
)
|
|
156
156
|
), l = /<!--REC_START-->([\s\S]*?)<!--REC_END-->/g, n = / style="([^"]*)"/g, s = /* @__PURE__ */ new Map();
|
|
157
157
|
let a = l.exec(e);
|
|
@@ -163,12 +163,12 @@ const w = [
|
|
|
163
163
|
}
|
|
164
164
|
n.lastIndex = 0, a = l.exec(e);
|
|
165
165
|
}
|
|
166
|
-
const i = /* @__PURE__ */ new Map(),
|
|
166
|
+
const i = /* @__PURE__ */ new Map(), u = [];
|
|
167
167
|
let _ = 0;
|
|
168
168
|
if (s.forEach((o, r) => {
|
|
169
169
|
if (o >= 6) {
|
|
170
|
-
const t = `rc${_++}
|
|
171
|
-
i.set(r, t),
|
|
170
|
+
const t = `rc${_++}`, p = r.endsWith(";") ? r : `${r};`;
|
|
171
|
+
i.set(r, t), u.push(`.${t}{${p}}`);
|
|
172
172
|
}
|
|
173
173
|
}), i.size === 0) {
|
|
174
174
|
let o = e;
|
|
@@ -182,23 +182,23 @@ const w = [
|
|
|
182
182
|
caseB: new RegExp(` style="${t}"((?:[^>]*?))(class="[^"]*")`, "g")
|
|
183
183
|
});
|
|
184
184
|
});
|
|
185
|
-
let
|
|
186
|
-
return
|
|
185
|
+
let d = e.replace("</style>", `${u.join("")}</style>`);
|
|
186
|
+
return d = d.replace(
|
|
187
187
|
/<!--REC_START-->([\s\S]*?)<!--REC_END-->/g,
|
|
188
188
|
(o, r) => {
|
|
189
189
|
let t = r;
|
|
190
|
-
return i.forEach((
|
|
190
|
+
return i.forEach((p, f) => {
|
|
191
191
|
const $ = b.get(f);
|
|
192
192
|
t = t.replace(
|
|
193
193
|
$.caseA,
|
|
194
|
-
(
|
|
194
|
+
(C, I, m) => S(I, p) + m
|
|
195
195
|
), t = t.replace(
|
|
196
196
|
$.caseB,
|
|
197
|
-
(
|
|
198
|
-
), t = t.replaceAll(` style="${f}"`, ` class="${
|
|
197
|
+
(C, I, m) => I + S(m, p)
|
|
198
|
+
), t = t.replaceAll(` style="${f}"`, ` class="${p}"`);
|
|
199
199
|
}), t;
|
|
200
200
|
}
|
|
201
|
-
),
|
|
201
|
+
), d = d.replaceAll("<!--REC_START-->", ""), d = d.replaceAll("<!--REC_END-->", ""), d;
|
|
202
202
|
},
|
|
203
203
|
priority: 58
|
|
204
204
|
}
|
|
@@ -1,41 +1,43 @@
|
|
|
1
|
-
import { usePartner as
|
|
2
|
-
import { LINK_REGEXES as p, PRODUCT_TYPE_URL_SEGMENTS as
|
|
3
|
-
import { parsePageList as
|
|
4
|
-
import { useConfigStore as
|
|
5
|
-
import { useDynamicContentStore as
|
|
6
|
-
import { useUnsubscribeStore as
|
|
7
|
-
import { ProductType as
|
|
8
|
-
|
|
1
|
+
import { usePartner as U } from "../../composables/usePartner.js";
|
|
2
|
+
import { LINK_REGEXES as p, PRODUCT_TYPE_URL_SEGMENTS as R, LINK_TYPES as _, INSIDER_ID as m, URLS as y } from "../../enums/unsubscribe.js";
|
|
3
|
+
import { parsePageList as N } from "../../extensions/Blocks/Unsubscribe/utils/utils.js";
|
|
4
|
+
import { useConfigStore as C } from "../../stores/config.js";
|
|
5
|
+
import { useDynamicContentStore as L } from "../../stores/dynamic-content.js";
|
|
6
|
+
import { useUnsubscribeStore as P } from "../../stores/unsubscribe.js";
|
|
7
|
+
import { ProductType as B } from "../../@types/config/schemas.js";
|
|
8
|
+
import "../../@types/config/defaults.js";
|
|
9
|
+
const F = [
|
|
9
10
|
{
|
|
10
11
|
id: "add-unsubscribe-link-values",
|
|
11
12
|
description: "Adding unsubscribe link values",
|
|
12
13
|
type: "custom",
|
|
13
14
|
processor: (s) => {
|
|
14
|
-
const { getPartnerName: i } =
|
|
15
|
+
const { getPartnerName: i } = U(), n = C(), t = L(), E = P(), c = n.variationId;
|
|
15
16
|
if (!c)
|
|
16
17
|
return s;
|
|
17
|
-
const r =
|
|
18
|
+
const r = R[n.productType] ?? R[B.EMAIL];
|
|
18
19
|
let e = s;
|
|
19
20
|
const d = `/${i()}/${r}/${c}?user={{iid}}`, f = new DOMParser().parseFromString(e, "text/html").querySelectorAll(".unsubscribe-block-v2[data-unsubscribe-page-list]");
|
|
20
21
|
let a = !1, l = !1;
|
|
21
22
|
return f.forEach((g) => {
|
|
23
|
+
var S;
|
|
22
24
|
const u = g.getAttribute("data-unsubscribe-page-list");
|
|
23
25
|
if (!u)
|
|
24
26
|
return;
|
|
25
|
-
const
|
|
26
|
-
(o) =>
|
|
27
|
-
) ?? [];
|
|
28
|
-
a = a || b.some((o) => o.type ===
|
|
27
|
+
const I = N(u), b = ((S = E.templates) == null ? void 0 : S.filter(
|
|
28
|
+
(o) => I.includes(o.id)
|
|
29
|
+
)) ?? [];
|
|
30
|
+
a = a || b.some((o) => o.type === _.UNSUBSCRIBE_LINK_TYPE), l = l || b.some((o) => o.type === _.PREFERENCES_LINK_TYPE);
|
|
29
31
|
}), (a || l) && (t.selectedDynamicContentList.some((u) => u.value === m) || t.selectedDynamicContentList.push({
|
|
30
32
|
text: m,
|
|
31
33
|
value: m,
|
|
32
34
|
fallback: ""
|
|
33
35
|
})), a && (e = e.replace(
|
|
34
36
|
p.GLOBAL_UNSUBSCRIBE_LINK_REGEX,
|
|
35
|
-
|
|
37
|
+
y.UNSUBSCRIBE_URL + d
|
|
36
38
|
)), l && (e = e.replace(
|
|
37
39
|
p.PREFERENCES_UNSUBSCRIBE_LINK_REGEX,
|
|
38
|
-
|
|
40
|
+
y.PREFERENCES_URL + d
|
|
39
41
|
)), f.length && (e = e.replace(p.UNSUBSCRIBE_LINK_REGEX, "")), e;
|
|
40
42
|
},
|
|
41
43
|
priority: 60
|
|
@@ -79,5 +81,5 @@ const $ = [
|
|
|
79
81
|
}
|
|
80
82
|
];
|
|
81
83
|
export {
|
|
82
|
-
|
|
84
|
+
F as unsubscribeCompilerRules
|
|
83
85
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useConfig as S } from "../../../composables/useConfig.js";
|
|
2
2
|
import { useRecommendation as _ } from "../../../composables/useRecommendation.js";
|
|
3
3
|
import { useRecommendationExtensionStore as d } from "../../../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
4
|
-
function
|
|
4
|
+
function y(e, u, r, o, s = "") {
|
|
5
5
|
const n = `{{${s}${e}_${u}_${r}}}`, t = `{{${s}${e}_${u}_currency}}`;
|
|
6
6
|
return o === "before" ? `${t} ${n}` : `${n} ${t}`;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function m(e, u, r, o, s, n) {
|
|
9
9
|
switch (u) {
|
|
10
10
|
case "productImage": {
|
|
11
11
|
const t = e.querySelector("img");
|
|
@@ -26,7 +26,7 @@ function b(e, u, r, o, s, n) {
|
|
|
26
26
|
const t = e.querySelector("p");
|
|
27
27
|
if (t) {
|
|
28
28
|
const c = t.querySelector("strong") || t;
|
|
29
|
-
c.textContent =
|
|
29
|
+
c.textContent = y(r, o, "price", s, n);
|
|
30
30
|
}
|
|
31
31
|
break;
|
|
32
32
|
}
|
|
@@ -34,7 +34,7 @@ function b(e, u, r, o, s, n) {
|
|
|
34
34
|
const t = e.querySelector("p");
|
|
35
35
|
if (t) {
|
|
36
36
|
const c = t.querySelector("strong") || t;
|
|
37
|
-
c.textContent =
|
|
37
|
+
c.textContent = y(
|
|
38
38
|
r,
|
|
39
39
|
o,
|
|
40
40
|
"original_price",
|
|
@@ -85,8 +85,8 @@ function q(e, u, r, o) {
|
|
|
85
85
|
n.querySelectorAll("[data-attribute-type]").forEach((a) => {
|
|
86
86
|
const i = a.getAttribute("data-attribute-type") || "", l = a.querySelectorAll(".attribute-cell");
|
|
87
87
|
l.length > 0 ? l.forEach((p) => {
|
|
88
|
-
|
|
89
|
-
}) :
|
|
88
|
+
m(p, i, u, t, r, o);
|
|
89
|
+
}) : m(a, i, u, t, r, o);
|
|
90
90
|
});
|
|
91
91
|
});
|
|
92
92
|
}
|
|
@@ -97,10 +97,10 @@ function g(e, u, r, o) {
|
|
|
97
97
|
const [n] = s, t = n.querySelector("[data-attribute-type]"), c = t ? t.querySelectorAll(".attribute-cell").length : 1;
|
|
98
98
|
s.forEach((a, i) => {
|
|
99
99
|
a.querySelectorAll("[data-attribute-type]").forEach((p) => {
|
|
100
|
-
const
|
|
100
|
+
const b = p.getAttribute("data-attribute-type") || "";
|
|
101
101
|
p.querySelectorAll(".attribute-cell").forEach((f, $) => {
|
|
102
102
|
const A = i * c + $;
|
|
103
|
-
|
|
103
|
+
m(f, b, u, A, r, o);
|
|
104
104
|
});
|
|
105
105
|
});
|
|
106
106
|
});
|
|
@@ -127,11 +127,12 @@ function T(e) {
|
|
|
127
127
|
n.recommendationCampaignUrls = {};
|
|
128
128
|
const { isFeatureEnabled: t } = S(), c = t("liquidSyntax") ? "reco_" : "";
|
|
129
129
|
return o.forEach((i) => {
|
|
130
|
+
var p, b;
|
|
130
131
|
const l = i.getAttribute("recommendation-id");
|
|
131
|
-
l && (i.parentNode
|
|
132
|
+
l && ((p = i.parentNode) == null || p.insertBefore(r.createComment("REC_START"), i), (b = i.parentNode) == null || b.insertBefore(r.createComment("REC_END"), i.nextSibling), s(l), C(i, l, c));
|
|
132
133
|
}), E(u, r).replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}");
|
|
133
134
|
}
|
|
134
135
|
export {
|
|
135
|
-
|
|
136
|
+
y as formatPriceVariable,
|
|
136
137
|
T as prepareRecommendationBlocks
|
|
137
138
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
class
|
|
1
|
+
var x = Object.defineProperty;
|
|
2
|
+
var y = (s, t, e) => t in s ? x(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
3
|
+
var m = (s, t, e) => y(s, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import b from "../../extensions/Blocks/Checkbox/template.js";
|
|
5
|
+
class f {
|
|
6
6
|
constructor() {
|
|
7
|
-
|
|
7
|
+
m(this, "parser");
|
|
8
8
|
this.parser = new DOMParser();
|
|
9
9
|
}
|
|
10
10
|
migrate(t) {
|
|
@@ -13,17 +13,18 @@ class b {
|
|
|
13
13
|
return i.length === 0 ? t : (i.forEach((r) => {
|
|
14
14
|
if (r.classList.contains("checkbox-block-v2"))
|
|
15
15
|
return;
|
|
16
|
-
const
|
|
17
|
-
`<table id="tempDoc"><tbody><tr>${
|
|
16
|
+
const n = r.getAttribute("id"), l = this.extractTextFromElement(r, "ins-title"), c = this.extractTextFromElement(r, "ins-description"), a = this.buildTextBlock(l), p = this.buildTextBlock(c), g = b.replace("{-{-TITLE-}-}", a).replace("{-{-DESCRIPTION-}-}", p), o = this.parser.parseFromString(
|
|
17
|
+
`<table id="tempDoc"><tbody><tr>${g}</tr></tbody></table>`,
|
|
18
18
|
"text/html"
|
|
19
19
|
).querySelector(".checkbox-block-v2");
|
|
20
|
-
|
|
20
|
+
o && r.parentNode && (o.setAttribute("id", n || ""), r.parentNode.replaceChild(o, r));
|
|
21
21
|
}), e.documentElement.outerHTML);
|
|
22
22
|
} catch (e) {
|
|
23
23
|
return console.error("CheckboxMigrator failed:", e), t;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
extractTextFromElement(t, e) {
|
|
27
|
+
var o, d;
|
|
27
28
|
const i = t.querySelector(`.${e}`);
|
|
28
29
|
if (!i)
|
|
29
30
|
return {
|
|
@@ -36,18 +37,18 @@ class b {
|
|
|
36
37
|
const r = i.querySelector("p");
|
|
37
38
|
if (!r)
|
|
38
39
|
return {
|
|
39
|
-
text: i.textContent
|
|
40
|
+
text: ((o = i.textContent) == null ? void 0 : o.trim()) || (e === "ins-title" ? "Title" : "Description"),
|
|
40
41
|
isBold: !1,
|
|
41
42
|
isItalic: !1,
|
|
42
43
|
align: i.getAttribute("align") || "left",
|
|
43
44
|
styles: ""
|
|
44
45
|
};
|
|
45
|
-
const
|
|
46
|
+
const n = ((d = r.textContent) == null ? void 0 : d.trim()) || (e === "ins-title" ? "Title" : "Description"), l = r.getAttribute("style") || "", c = i.getAttribute("align") || r.getAttribute("align") || "left", a = /font-weight\s*:\s*bold/i.test(l) || !!r.querySelector("b, strong"), p = /font-style\s*:\s*italic/i.test(l) || !!r.querySelector("i, em"), g = this.removeStyleProperties(l, ["font-weight", "font-style"]), u = this.convertInlineToBlock(g);
|
|
46
47
|
return {
|
|
47
|
-
text:
|
|
48
|
-
isBold:
|
|
49
|
-
isItalic:
|
|
50
|
-
align:
|
|
48
|
+
text: n,
|
|
49
|
+
isBold: a,
|
|
50
|
+
isItalic: p,
|
|
51
|
+
align: c,
|
|
51
52
|
styles: u
|
|
52
53
|
};
|
|
53
54
|
}
|
|
@@ -64,8 +65,8 @@ class b {
|
|
|
64
65
|
`;
|
|
65
66
|
}
|
|
66
67
|
removeStyleProperties(t, e) {
|
|
67
|
-
return t ? e.reduce((r,
|
|
68
|
-
const l = new RegExp(`${
|
|
68
|
+
return t ? e.reduce((r, n) => {
|
|
69
|
+
const l = new RegExp(`${n}\\s*:\\s*[^;]*;?`, "gi");
|
|
69
70
|
return r.replace(l, "");
|
|
70
71
|
}, t).replace(/;\s*;/g, ";").replace(/^;|;$/g, "").trim() : "";
|
|
71
72
|
}
|
|
@@ -76,9 +77,9 @@ class b {
|
|
|
76
77
|
return /display\s*:/i.test(e) || (e = e ? `${e}; display: block` : "display: block"), e.replace(/;\s*;/g, ";").replace(/^;|;$/g, "").trim();
|
|
77
78
|
}
|
|
78
79
|
}
|
|
79
|
-
function
|
|
80
|
-
return new
|
|
80
|
+
function k(s) {
|
|
81
|
+
return new f().migrate(s);
|
|
81
82
|
}
|
|
82
83
|
export {
|
|
83
|
-
|
|
84
|
+
k as migrateCheckbox
|
|
84
85
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
class
|
|
1
|
+
var k = Object.defineProperty;
|
|
2
|
+
var m = (o, t, e) => t in o ? k(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
|
|
3
|
+
var x = (o, t, e) => m(o, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import h from "../../extensions/Blocks/CouponBlock/template.js";
|
|
5
|
+
class y {
|
|
6
6
|
constructor() {
|
|
7
|
-
|
|
7
|
+
x(this, "parser");
|
|
8
8
|
this.parser = new DOMParser();
|
|
9
9
|
}
|
|
10
10
|
migrate(t) {
|
|
11
11
|
try {
|
|
12
|
-
const e = this.parser.parseFromString(t, "text/html"),
|
|
13
|
-
return
|
|
14
|
-
const
|
|
12
|
+
const e = this.parser.parseFromString(t, "text/html"), n = e.querySelectorAll("td.coupon-block.ins-coupon-code:not([esd-extension-block-id])");
|
|
13
|
+
return n.length === 0 ? t : (n.forEach((s) => {
|
|
14
|
+
const i = this.extractText(s), c = this.extractAttributes(s), l = h.replace("{@COUPON_CODE}", i).replace(
|
|
15
15
|
'class="coupon-block coupon-block-v2 ins-coupon-code esd-block-text esd-extension-block"',
|
|
16
16
|
c.class
|
|
17
17
|
).replace(
|
|
@@ -28,25 +28,26 @@ class h {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
extractText(t) {
|
|
31
|
+
var g;
|
|
31
32
|
const e = t.querySelector(".ins-title");
|
|
32
33
|
if (!e)
|
|
33
34
|
return "{@COUPON_CODE}";
|
|
34
|
-
const
|
|
35
|
+
const n = ((g = e.textContent) == null ? void 0 : g.trim()) || "{@COUPON_CODE}", s = e.getAttribute("style") || "", i = /font-weight\s*:\s*bold/i.test(s), c = /font-style\s*:\s*italic/i.test(s), l = /text-decoration[^;]*underline/i.test(s), u = /text-decoration[^;]*line-through/i.test(s), a = /vertical-align\s*:\s*sub/i.test(s), p = /vertical-align\s*:\s*super/i.test(s);
|
|
35
36
|
return [
|
|
36
|
-
[
|
|
37
|
+
[i, "strong"],
|
|
37
38
|
[c, "em"],
|
|
38
39
|
[l, "u"],
|
|
39
40
|
[u, "s"],
|
|
40
41
|
[a, "sub"],
|
|
41
42
|
[p, "sup"]
|
|
42
|
-
].reduce((
|
|
43
|
+
].reduce((b, [f, d]) => f ? `<${d}>${b}</${d}>` : b, n);
|
|
43
44
|
}
|
|
44
45
|
extractAttributes(t) {
|
|
45
|
-
const e = t.querySelector(".ins-title"),
|
|
46
|
+
const e = t.querySelector(".ins-title"), n = t.className.split(" ").filter((r) => r.startsWith("es-")), s = t.getAttribute("align"), i = t.getAttribute("bgcolor"), c = t.getAttribute("style"), l = e == null ? void 0 : e.getAttribute("style");
|
|
46
47
|
let u = 'class="coupon-block coupon-block-v2 ins-coupon-code esd-block-text esd-extension-block';
|
|
47
|
-
|
|
48
|
+
n.length && (u += ` ${n.join(" ")}`), u += '"';
|
|
48
49
|
let a = "";
|
|
49
|
-
if (s && (a += ` align="${s}"`),
|
|
50
|
+
if (s && (a += ` align="${s}"`), i && (a += ` bgcolor="${i}"`), c) {
|
|
50
51
|
const r = c.replace(/background-color[^;]+;?/gi, "").replace(/;+/g, ";").trim();
|
|
51
52
|
r && (a += ` style="${r.replace(/"/g, "'")}"`);
|
|
52
53
|
}
|
|
@@ -58,9 +59,9 @@ class h {
|
|
|
58
59
|
return { class: u, block: a, text: p };
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
|
-
function
|
|
62
|
-
return new
|
|
62
|
+
function C(o) {
|
|
63
|
+
return new y().migrate(o);
|
|
63
64
|
}
|
|
64
65
|
export {
|
|
65
|
-
|
|
66
|
+
C as migrateCouponBlock
|
|
66
67
|
};
|