@builder.io/sdk-vue 0.4.1 → 0.4.3
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/package.json +1 -1
- package/packages/_vue2/dist/{block-styles.18ca317b.cjs → block-styles.aaf62526.cjs} +1 -1
- package/packages/_vue2/dist/{block-styles.69ca115c.js → block-styles.c38fdaef.js} +4 -4
- package/packages/{_vue3/dist/css.7fe37cb4.js → _vue2/dist/css.377600fa.js} +2 -2
- package/packages/{_vue3/dist/css.5cacc3c3.cjs → _vue2/dist/css.4a664d41.cjs} +1 -1
- package/packages/_vue2/dist/{evaluate.8238dbc9.js → evaluate.d2d16952.js} +1 -1
- package/packages/_vue2/dist/{evaluate.cff086ca.cjs → evaluate.d837a845.cjs} +2 -2
- package/packages/_vue2/dist/{index.e2db82e0.js → index.1074d675.js} +131 -129
- package/packages/_vue2/dist/{index.c16f4cca.cjs → index.3d5a7a37.cjs} +6 -6
- package/packages/_vue2/dist/{render-block.0f23cd7e.js → render-block.1ec27d4d.js} +20 -33
- package/packages/_vue2/dist/render-block.43f24cc4.cjs +3 -0
- package/packages/_vue2/dist/{render-component.74280c04.js → render-component.82a8e6f7.js} +3 -3
- package/packages/_vue2/dist/{render-component.e8047ef5.cjs → render-component.ba549c84.cjs} +1 -1
- package/packages/_vue2/dist/render-content.2c57f5bb.cjs +1 -0
- package/packages/_vue2/dist/{render-content.672eabd9.js → render-content.3afd4a46.js} +270 -271
- package/packages/_vue2/dist/{render-inlined-styles.2c0cf85b.cjs → render-inlined-styles.1ed1b531.cjs} +1 -1
- package/packages/_vue2/dist/{render-inlined-styles.ac06208e.js → render-inlined-styles.f76aba42.js} +1 -1
- package/packages/_vue2/dist/render-repeated-block.625e26fc.cjs +1 -0
- package/packages/_vue2/dist/render-repeated-block.d3c2411b.js +38 -0
- package/packages/_vue2/dist/{render-styles.af4e2d5a.js → render-styles.7b01db22.js} +2 -2
- package/packages/_vue2/dist/{render-styles.e6e62ba1.cjs → render-styles.f1413001.cjs} +3 -3
- package/packages/_vue2/dist/sdk.cjs +1 -1
- package/packages/_vue2/dist/sdk.js +1 -1
- package/packages/_vue2/dist/src/components/render-block/render-repeated-block.vue.d.ts +3 -10
- package/packages/_vue2/dist/src/components/render-content/render-content.vue.d.ts +27 -5
- package/packages/_vue2/dist/src/components/render-content-variants/render-content-variants.vue.d.ts +3 -3
- package/packages/_vue2/dist/src/constants/sdk-version.d.ts +1 -1
- package/packages/_vue2/dist/style.css +1 -1
- package/packages/_vue3/dist/sdk.cjs +72 -1
- package/packages/_vue3/dist/sdk.js +3251 -22
- package/packages/_vue3/dist/src/components/render-block/render-repeated-block.vue.d.ts +3 -10
- package/packages/_vue3/dist/src/components/render-content/render-content.vue.d.ts +36 -14
- package/packages/_vue3/dist/src/components/render-content-variants/render-content-variants.vue.d.ts +3 -3
- package/packages/_vue3/dist/src/constants/sdk-version.d.ts +1 -1
- package/packages/_vue3/dist/style.css +1 -1
- package/packages/_vue2/dist/css.24c082d4.cjs +0 -6
- package/packages/_vue2/dist/css.ce776b44.js +0 -75
- package/packages/_vue2/dist/render-block.954cc390.cjs +0 -3
- package/packages/_vue2/dist/render-content.702f0387.cjs +0 -1
- package/packages/_vue2/dist/render-repeated-block.5740965b.cjs +0 -1
- package/packages/_vue2/dist/render-repeated-block.c40e7c25.js +0 -45
- package/packages/_vue3/dist/block-styles.7969d695.js +0 -72
- package/packages/_vue3/dist/block-styles.e3f09eb7.cjs +0 -1
- package/packages/_vue3/dist/evaluate.975fa4d3.js +0 -63
- package/packages/_vue3/dist/evaluate.9a614eea.cjs +0 -4
- package/packages/_vue3/dist/index.3f716812.cjs +0 -32
- package/packages/_vue3/dist/index.cdd37dcf.js +0 -1393
- package/packages/_vue3/dist/render-block.348e561a.js +0 -286
- package/packages/_vue3/dist/render-block.d1c4ccaa.cjs +0 -3
- package/packages/_vue3/dist/render-component.788543b4.cjs +0 -1
- package/packages/_vue3/dist/render-component.9bd5c435.js +0 -42
- package/packages/_vue3/dist/render-content.0423df8b.js +0 -1355
- package/packages/_vue3/dist/render-content.17e9b187.cjs +0 -1
- package/packages/_vue3/dist/render-inlined-styles.49a121f8.js +0 -16
- package/packages/_vue3/dist/render-inlined-styles.528fb5cd.cjs +0 -1
- package/packages/_vue3/dist/render-repeated-block.04301799.cjs +0 -1
- package/packages/_vue3/dist/render-repeated-block.35a0d813.js +0 -39
- package/packages/_vue3/dist/render-styles.3411b577.js +0 -80
- package/packages/_vue3/dist/render-styles.b4509dd3.cjs +0 -31
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* We can't make this a generic `ProvideContext` function because Vue 2 won't support root slots, e.g.
|
|
3
|
-
*
|
|
4
|
-
* ```vue
|
|
5
|
-
* <template>
|
|
6
|
-
* <slot></slot>
|
|
7
|
-
* </template>
|
|
8
|
-
* ```
|
|
9
|
-
*/
|
|
10
1
|
declare const _sfc_main: import("vue").DefineComponent<Readonly<{
|
|
11
2
|
block?: any;
|
|
12
3
|
repeatContext?: any;
|
|
13
|
-
}>, unknown,
|
|
4
|
+
}>, unknown, {
|
|
5
|
+
store: any;
|
|
6
|
+
}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
14
7
|
block?: any;
|
|
15
8
|
repeatContext?: any;
|
|
16
9
|
}>>>, {
|
|
@@ -6,30 +6,52 @@ declare const _sfc_main: import("vue").DefineComponent<Readonly<{
|
|
|
6
6
|
data?: any;
|
|
7
7
|
content?: any;
|
|
8
8
|
canTrack?: any;
|
|
9
|
-
locale?: any;
|
|
10
|
-
customComponents?: any;
|
|
11
9
|
model?: any;
|
|
12
10
|
apiKey?: any;
|
|
13
11
|
parentContentId?: any;
|
|
12
|
+
locale?: any;
|
|
13
|
+
apiVersion?: any;
|
|
14
|
+
customComponents?: any;
|
|
14
15
|
hideContent?: any;
|
|
15
16
|
classNameProp?: any;
|
|
16
17
|
isSsrAbTest?: any;
|
|
17
18
|
includeRefs?: any;
|
|
18
19
|
enrich?: any;
|
|
19
|
-
apiVersion?: any;
|
|
20
20
|
}>, unknown, {
|
|
21
21
|
forceReRenderCount: number;
|
|
22
22
|
overrideContent: null;
|
|
23
|
-
useContent: Nullable<BuilderContent>;
|
|
24
23
|
update: number;
|
|
25
24
|
canTrackToUse: any;
|
|
26
|
-
contentState: {
|
|
27
|
-
[x: string]: unknown;
|
|
28
|
-
};
|
|
29
|
-
allRegisteredComponents: any;
|
|
30
25
|
httpReqsData: {};
|
|
31
26
|
clicked: boolean;
|
|
32
27
|
scriptStr: string;
|
|
28
|
+
builderContextSignal: {
|
|
29
|
+
content: Nullable<BuilderContent>;
|
|
30
|
+
localState: undefined;
|
|
31
|
+
rootState: {
|
|
32
|
+
[x: string]: unknown;
|
|
33
|
+
};
|
|
34
|
+
rootSetState: Function;
|
|
35
|
+
context: any;
|
|
36
|
+
apiKey: any;
|
|
37
|
+
apiVersion: any;
|
|
38
|
+
registeredComponents: any;
|
|
39
|
+
inheritedStyles: {};
|
|
40
|
+
};
|
|
41
|
+
builderContext: {
|
|
42
|
+
Builder: {
|
|
43
|
+
content: null;
|
|
44
|
+
context: {};
|
|
45
|
+
localState: undefined;
|
|
46
|
+
rootSetState(): void;
|
|
47
|
+
rootState: {};
|
|
48
|
+
apiKey: null;
|
|
49
|
+
apiVersion: undefined;
|
|
50
|
+
registeredComponents: {};
|
|
51
|
+
inheritedStyles: {};
|
|
52
|
+
};
|
|
53
|
+
key: symbol;
|
|
54
|
+
};
|
|
33
55
|
TARGET: string;
|
|
34
56
|
}, {
|
|
35
57
|
onUpdateHook0(): {
|
|
@@ -71,32 +93,32 @@ declare const _sfc_main: import("vue").DefineComponent<Readonly<{
|
|
|
71
93
|
data?: any;
|
|
72
94
|
content?: any;
|
|
73
95
|
canTrack?: any;
|
|
74
|
-
locale?: any;
|
|
75
|
-
customComponents?: any;
|
|
76
96
|
model?: any;
|
|
77
97
|
apiKey?: any;
|
|
78
98
|
parentContentId?: any;
|
|
99
|
+
locale?: any;
|
|
100
|
+
apiVersion?: any;
|
|
101
|
+
customComponents?: any;
|
|
79
102
|
hideContent?: any;
|
|
80
103
|
classNameProp?: any;
|
|
81
104
|
isSsrAbTest?: any;
|
|
82
105
|
includeRefs?: any;
|
|
83
106
|
enrich?: any;
|
|
84
|
-
apiVersion?: any;
|
|
85
107
|
}>>>, {
|
|
86
108
|
readonly context?: any;
|
|
87
109
|
readonly data?: any;
|
|
88
110
|
readonly content?: any;
|
|
89
111
|
readonly canTrack?: any;
|
|
90
|
-
readonly locale?: any;
|
|
91
|
-
readonly customComponents?: any;
|
|
92
112
|
readonly model?: any;
|
|
93
113
|
readonly apiKey?: any;
|
|
94
114
|
readonly parentContentId?: any;
|
|
115
|
+
readonly locale?: any;
|
|
116
|
+
readonly apiVersion?: any;
|
|
117
|
+
readonly customComponents?: any;
|
|
95
118
|
readonly hideContent?: any;
|
|
96
119
|
readonly classNameProp?: any;
|
|
97
120
|
readonly isSsrAbTest?: any;
|
|
98
121
|
readonly includeRefs?: any;
|
|
99
122
|
readonly enrich?: any;
|
|
100
|
-
readonly apiVersion?: any;
|
|
101
123
|
}>;
|
|
102
124
|
export default _sfc_main;
|
package/packages/_vue3/dist/src/components/render-content-variants/render-content-variants.vue.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
declare const _sfc_main: import("vue").DefineComponent<Readonly<{
|
|
2
2
|
content?: any;
|
|
3
3
|
canTrack?: any;
|
|
4
|
-
customComponents?: any;
|
|
5
4
|
model?: any;
|
|
6
5
|
apiKey?: any;
|
|
7
6
|
apiVersion?: any;
|
|
7
|
+
customComponents?: any;
|
|
8
8
|
}>, unknown, {
|
|
9
9
|
variantScriptStr: string;
|
|
10
10
|
shouldRenderVariants: boolean;
|
|
@@ -14,16 +14,16 @@ declare const _sfc_main: import("vue").DefineComponent<Readonly<{
|
|
|
14
14
|
}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
15
15
|
content?: any;
|
|
16
16
|
canTrack?: any;
|
|
17
|
-
customComponents?: any;
|
|
18
17
|
model?: any;
|
|
19
18
|
apiKey?: any;
|
|
20
19
|
apiVersion?: any;
|
|
20
|
+
customComponents?: any;
|
|
21
21
|
}>>>, {
|
|
22
22
|
readonly content?: any;
|
|
23
23
|
readonly canTrack?: any;
|
|
24
|
-
readonly customComponents?: any;
|
|
25
24
|
readonly model?: any;
|
|
26
25
|
readonly apiKey?: any;
|
|
27
26
|
readonly apiVersion?: any;
|
|
27
|
+
readonly customComponents?: any;
|
|
28
28
|
}>;
|
|
29
29
|
export default _sfc_main;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.4.
|
|
1
|
+
export declare const SDK_VERSION = "0.4.3";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.button-361b1o6wv2k[data-v-
|
|
1
|
+
.button-361b1o6wv2k[data-v-e8a5e9df]{all:unset}.div-4o9pb21oca6[data-v-61bc5f3a]{display:flex;flex-direction:column;align-items:stretch}.div-1eih9th5ow6[data-v-df2fecd0]{display:flex;line-height:normal}.div-1eih9th5ow6-2[data-v-df2fecd0]{display:flex;flex-direction:column;align-items:stretch}.img-256wrwn33ry[data-v-f59f4313]{opacity:1;transition:opacity .2s ease-in-out}.div-256wrwn33ry[data-v-f59f4313]{width:100%;pointer-events:none;font-size:0}.div-256wrwn33ry-2[data-v-f59f4313]{display:flex;flex-direction:column;align-items:stretch;position:absolute;top:0;left:0;width:100%;height:100%}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";const d=require("./evaluate.cff086ca.cjs"),a=require("./index.c16f4cca.cjs"),p=(e,t,n)=>{if(Object(e)!==e)return e;const s=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return s.slice(0,-1).reduce((c,r,o)=>Object(c[r])===c[r]?c[r]:c[r]=Math.abs(Number(s[o+1]))>>0===+s[o+1]?[]:{},e)[s[s.length-1]]=n,e};const g=({block:e,context:t,localState:n,rootState:s,rootSetState:c})=>{if(!e.bindings)return e;const r=a.fastClone(e),o={...r,properties:{...r.properties},actions:{...r.actions}};for(const i in e.bindings){const l=e.bindings[i],f=d.evaluate({code:l,localState:n,rootState:s,rootSetState:c,context:t});p(o,i,f)}return o};function C({block:e,context:t,shouldEvaluateBindings:n,localState:s,rootState:c,rootSetState:r}){const o=e;return n?g({block:o,localState:s,rootState:c,rootSetState:r,context:t}):o}const S=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),u=e=>Object.entries(e).map(([n,s])=>{if(typeof s=="string")return`${S(n)}: ${s};`}).filter(a.checkIsDefined),v=e=>u(e).join(`
|
|
2
|
-
`),y=({mediaQuery:e,className:t,styles:n})=>{const s=`.${t} {
|
|
3
|
-
${v(n)}
|
|
4
|
-
}`;return e?`${e} {
|
|
5
|
-
${s}
|
|
6
|
-
}`:s};exports.convertStyleMapToCSSArray=u;exports.createCssClass=y;exports.getProcessedBlock=C;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { e as u } from "./evaluate.8238dbc9.js";
|
|
2
|
-
import { f as p, c as l } from "./index.e2db82e0.js";
|
|
3
|
-
const g = (e, t, n) => {
|
|
4
|
-
if (Object(e) !== e)
|
|
5
|
-
return e;
|
|
6
|
-
const s = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
7
|
-
return s.slice(0, -1).reduce(
|
|
8
|
-
(o, r, c) => Object(o[r]) === o[r] ? o[r] : o[r] = Math.abs(Number(s[c + 1])) >> 0 === +s[c + 1] ? [] : {},
|
|
9
|
-
e
|
|
10
|
-
)[s[s.length - 1]] = n, e;
|
|
11
|
-
};
|
|
12
|
-
const d = ({
|
|
13
|
-
block: e,
|
|
14
|
-
context: t,
|
|
15
|
-
localState: n,
|
|
16
|
-
rootState: s,
|
|
17
|
-
rootSetState: o
|
|
18
|
-
}) => {
|
|
19
|
-
if (!e.bindings)
|
|
20
|
-
return e;
|
|
21
|
-
const r = p(e), c = {
|
|
22
|
-
...r,
|
|
23
|
-
properties: { ...r.properties },
|
|
24
|
-
actions: { ...r.actions }
|
|
25
|
-
};
|
|
26
|
-
for (const i in e.bindings) {
|
|
27
|
-
const a = e.bindings[i], f = u({
|
|
28
|
-
code: a,
|
|
29
|
-
localState: n,
|
|
30
|
-
rootState: s,
|
|
31
|
-
rootSetState: o,
|
|
32
|
-
context: t
|
|
33
|
-
});
|
|
34
|
-
g(c, i, f);
|
|
35
|
-
}
|
|
36
|
-
return c;
|
|
37
|
-
};
|
|
38
|
-
function v({
|
|
39
|
-
block: e,
|
|
40
|
-
context: t,
|
|
41
|
-
shouldEvaluateBindings: n,
|
|
42
|
-
localState: s,
|
|
43
|
-
rootState: o,
|
|
44
|
-
rootSetState: r
|
|
45
|
-
}) {
|
|
46
|
-
const c = e;
|
|
47
|
-
return n ? d({
|
|
48
|
-
block: c,
|
|
49
|
-
localState: s,
|
|
50
|
-
rootState: o,
|
|
51
|
-
rootSetState: r,
|
|
52
|
-
context: t
|
|
53
|
-
}) : c;
|
|
54
|
-
}
|
|
55
|
-
const m = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), C = (e) => Object.entries(e).map(([n, s]) => {
|
|
56
|
-
if (typeof s == "string")
|
|
57
|
-
return `${m(n)}: ${s};`;
|
|
58
|
-
}).filter(l), $ = (e) => C(e).join(`
|
|
59
|
-
`), A = ({
|
|
60
|
-
mediaQuery: e,
|
|
61
|
-
className: t,
|
|
62
|
-
styles: n
|
|
63
|
-
}) => {
|
|
64
|
-
const s = `.${t} {
|
|
65
|
-
${$(n)}
|
|
66
|
-
}`;
|
|
67
|
-
return e ? `${e} {
|
|
68
|
-
${s}
|
|
69
|
-
}` : s;
|
|
70
|
-
};
|
|
71
|
-
export {
|
|
72
|
-
C as a,
|
|
73
|
-
A as c,
|
|
74
|
-
v as g
|
|
75
|
-
};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("vue"),u=require("./evaluate.cff086ca.cjs"),d=require("./index.c16f4cca.cjs"),s=require("./css.24c082d4.cjs"),m=e=>`v-on:${e.toLowerCase()}`,h=(e,t)=>o=>u.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:o,isExpression:!1});function S(e){var r;const t={},o=(r=e.block.actions)!=null?r:{};for(const n in o){if(!o.hasOwnProperty(n))continue;const c=o[n];t[m(n)]=h(c,e)}return t}function k(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}function f(e){const t={};if(typeof e!="string")return t;const o=e.trim().split(/\\s+/);for(const r of o)t[r]=!0;return t}function b(e){return e.class=f(e.class),e}const x=e=>({href:e.href});function y(e){var o;const t={...x(e),...e.properties,"builder-id":e.id,style:v(e.style),class:[e.id,"builder-block",e.class,(o=e.properties)==null?void 0:o.class].filter(Boolean).join(" ")};return b(t)}function v(e){if(!!e)switch(d.TARGET){case"svelte":case"vue2":case"vue3":case"solid":return s.convertStyleMapToCSSArray(e).join(" ");case"qwik":case"reactNative":case"react":return e}}const g=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],B=e=>typeof e=="string"&&g.includes(e.toLowerCase()),C=({block:e,context:t})=>{var n;const o=(n=s.getProcessedBlock({block:e,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:n.name;if(!o)return null;const r=t.registeredComponents[o];if(r)return r;console.warn(`
|
|
2
|
-
Could not find a registered component named "${o}".
|
|
3
|
-
If you registered it, is the file that registered it imported by the file that needs to render it?`)},_=({block:e,context:t})=>{const{repeat:o,...r}=e;if(!(o!=null&&o.collection))return;const n=u.evaluate({code:o.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(n))return;const c=o.collection.split(".").pop(),a=o.itemName||(c?c+"Item":"item");return n.map((i,l)=>({context:{...t,localState:{...t.localState,$index:l,$item:i,[a]:i,[`$${a}Index`]:l}},block:r}))},w=()=>Promise.resolve().then(()=>require("./block-styles.18ca317b.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./block-styles.vue",e),e}),P=()=>Promise.resolve().then(()=>require("./render-repeated-block.5740965b.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderRepeatedBlock at ./render-repeated-block.vue",e),e}),E=()=>Promise.resolve().then(()=>require("./render-component.e8047ef5.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderComponent at ./render-component.vue",e),e}),R=p.defineComponent({name:"render-block",components:{RenderComponent:E,RenderRepeatedBlock:P,BlockStyles:w},props:["block","context"],data(){return{component:C({block:this.block,context:this.context}),Tag:this.block.tagName||"div",isEmptyHtmlElement:B}},computed:{repeatItem(){return _({block:this.block,context:this.context})},useBlock(){return this.repeatItem?this.block:s.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0})},canShowBlock(){return"hide"in this.useBlock?!this.useBlock.hide:"show"in this.useBlock?this.useBlock.show:!0},actions(){return S({block:this.useBlock,rootState:this.context.rootState,rootSetState:this.context.rootSetState,localState:this.context.localState,context:this.context.context})},attributes(){return{...y(this.useBlock)}},childrenWithoutParentComponent(){var t,o;return!((t=this.component)!=null&&t.component)&&!this.repeatItem?(o=this.useBlock.children)!=null?o:[]:[]},childrenContext(){const e=()=>({});return{apiKey:this.context.apiKey,apiVersion:this.context.apiVersion,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,content:this.context.content,context:this.context.context,registeredComponents:this.context.registeredComponents,inheritedStyles:e()}},renderComponentProps(){var e,t,o;return{blockChildren:(e=this.useBlock.children)!=null?e:[],componentRef:(t=this.component)==null?void 0:t.component,componentOptions:{...k(this.useBlock),...(o=this.component)!=null&&o.noWrap?{attributes:{...this.attributes,...this.actions}}:{}},context:this.childrenContext}}},methods:{stripVOn:function(t={}){return Object.keys(t).reduce((o,r)=>({...o,[r.replace("v-on:","")]:t[r]}),{})}}});var T=function(){var r;var t=this,o=t._self._c;return t._self._setupProxy,!Boolean(!((r=t.component)!=null&&r.noWrap))&&t.canShowBlock?o("render-component",t._b({},"render-component",t.renderComponentProps,!1)):t.isEmptyHtmlElement(t.Tag)&&t.canShowBlock?o(t.Tag,t._g(t._b({tag:"component"},"component",t.attributes,!1),t.stripVOn(t.actions))):!t.isEmptyHtmlElement(t.Tag)&&t.repeatItem&&t.canShowBlock?o("div",{staticClass:"vue2-root-element-workaround"},t._l(t.repeatItem,function(n,c){return o("render-repeated-block",{key:c,attrs:{repeatContext:n.context,block:n.block}})}),1):t.canShowBlock?o(t.Tag,t._g(t._b({tag:"component"},"component",t.attributes,!1),t.stripVOn(t.actions)),[o("render-component",t._b({},"render-component",t.renderComponentProps,!1)),t._l(t.childrenWithoutParentComponent,function(n,c){return o("render-block",{key:"render-block-"+n.id,attrs:{block:n,context:t.childrenContext}})}),t._l(t.childrenWithoutParentComponent,function(n,c){return o("block-styles",{key:"block-style-"+n.id,attrs:{block:n,context:t.childrenContext}})})],2):t._e()},j=[],O=d.normalizeComponent(R,T,j,!1,null,null,null,null);const A=O.exports;exports.default=A;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("vue"),o=require("./index.c16f4cca.cjs"),g=require("./evaluate.cff086ca.cjs"),x={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0},C={name:"Columns",inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:o.serializeFn(e=>{function t(){n.forEach(a=>{a.delete("width")})}const n=e.get("columns");Array.isArray(n)&&!!n.find(i=>i.get("width"))&&(!!n.find(s=>!s.get("width"))||n.reduce((d,l)=>d+l.get("width"),0)!==100)&&t()})},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}]},S={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},k={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:o.serializeFn(e=>{e.delete("srcset"),e.delete("noWebp");function n(r,d=6e4){return new Promise((l,u)=>{const c=document.createElement("img");let p=!1;c.onload=()=>{p=!0,l(c)},c.addEventListener("error",m=>{console.warn("Image load failed",m.error),u(m.error)}),c.src=r,setTimeout(()=>{p||u(new Error("Image load timed out"))},d)})}function a(r){return Math.round(r*1e3)/1e3}const i=e.get("image"),s=e.get("aspectRatio");if(fetch(i).then(r=>r.blob()).then(r=>{r.type.includes("svg")&&e.set("noWebp",!0)}),i&&(!s||s===.7041))return n(i).then(r=>{const d=e.get("aspectRatio");e.get("image")===i&&(!d||d===.7041)&&r.width&&r.height&&(e.set("aspectRatio",a(r.height/r.width)),e.set("height",r.height),e.set("width",r.width))})})},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}]},T={name:"Core:Section",static:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",inputs:[{name:"maxWidth",type:"number",defaultValue:1200},{name:"lazyLoad",type:"boolean",defaultValue:!1,advanced:!0,description:"Only render this section when in view"}],defaultStyles:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"50px",paddingBottom:"50px",marginTop:"0px",width:"100vw",marginLeft:"calc(50% - 50vw)"},canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"center"}},component:{name:"Text",options:{text:"<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"}}}]},R={name:"Symbol",noWrap:!0,static:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}]},w={name:"Text",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}},I={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]},_={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:o.serializeFn(e=>{const t=e.get("url");if(t)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then(a=>a.json()).then(a=>{e.get("url")===t&&(a.html?e.set("content",a.html):e.set("content","Invalid url, please try another"))}).catch(a=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")})},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},E=["text/javascript","application/javascript","application/ecmascript"],F=e=>E.includes(e.type),A=h.defineComponent({name:"builder-embed",props:["content"],data(){return{scriptsInserted:[],scriptsRun:[],ranInitFn:!1}},watch:{onUpdateHook0:{handler(){this.$refs.elem&&!this.ranInitFn&&(this.ranInitFn=!0,this.findAndRunScripts())},immediate:!0}},computed:{onUpdateHook0(){return{0:this.$refs.elem,1:this.ranInitFn}}},methods:{findAndRunScripts(){if(!this.$refs.elem||!this.$refs.elem.getElementsByTagName)return;const e=this.$refs.elem.getElementsByTagName("script");for(let t=0;t<e.length;t++){const n=e[t];if(n.src&&!this.scriptsInserted.includes(n.src)){this.scriptsInserted.push(n.src);const a=document.createElement("script");a.async=!0,a.src=n.src,document.head.appendChild(a)}else if(F(n)&&!this.scriptsRun.includes(n.innerText))try{this.scriptsRun.push(n.innerText),new Function(n.innerText)()}catch(a){console.warn("`Embed`: Error running script:",a)}}}}});var V=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{ref:"elem",staticClass:"builder-embed",domProps:{innerHTML:t._s(t.content)}})},P=[],U=o.normalizeComponent(A,V,P,!1,null,null,null,null);const j=U.exports,H=h.defineComponent({name:"builder-img-component",props:["backgroundSize","backgroundPosition","imgSrc","altText","image","attributes"],data(){return{isEditing:o.isEditing}},methods:{filterAttrs:function(t={},n){const a="v-on:";return Object.keys(t).filter(i=>{if(!t[i])return!1;const s=i.startsWith(a);return n?s:!s}).reduce((i,s)=>({...i,[s.replace(a,"")]:t[s]}),{})}}});var $=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("img",t._g(t._b({key:t.isEditing()&&t.imgSrc||"default-key",style:{objectFit:t.backgroundSize||"cover",objectPosition:t.backgroundPosition||"center"},attrs:{alt:t.altText,src:t.imgSrc||t.image}},"img",t.filterAttrs(t.attributes,!1),!1),t.filterAttrs(t.attributes,!0)))},W=[],M=o.normalizeComponent(H,$,W,!1,null,null,null,null);const q=M.exports,L={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg"],required:!0}],noWrap:!0,static:!0},B=h.defineComponent({name:"builder-custom-code",props:["replaceNodes","code"],data(){return{scriptsInserted:[],scriptsRun:[]}},mounted(){this.findAndRunScripts()},methods:{findAndRunScripts(){if(this.$refs.elem&&this.$refs.elem.getElementsByTagName&&typeof window<"u"){const e=this.$refs.elem.getElementsByTagName("script");for(let t=0;t<e.length;t++){const n=e[t];if(n.src){if(this.scriptsInserted.includes(n.src))continue;this.scriptsInserted.push(n.src);const a=document.createElement("script");a.async=!0,a.src=n.src,document.head.appendChild(a)}else if(!n.type||["text/javascript","application/javascript","application/ecmascript"].includes(n.type)){if(this.scriptsRun.includes(n.innerText))continue;try{this.scriptsRun.push(n.innerText),new Function(n.innerText)()}catch(a){console.warn("`CustomCode`: Error running script:",a)}}}}},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const a of n)t[a]=!0;return t}}});var N=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{ref:"elem",class:t._classStringToObject("builder-custom-code"+(t.replaceNodes?" replace-nodes":"")),domProps:{innerHTML:t._s(t.code)}})},O=[],z=o.normalizeComponent(B,N,O,!1,null,null,null,null);const K=z.exports,D={name:"Custom Code",static:!0,requiredPermissions:["editCode"],inputs:[{name:"code",type:"html",required:!0,defaultValue:"<p>Hello there, I am custom HTML code!</p>",code:!0},{name:"replaceNodes",type:"boolean",helperText:"Preserve server rendered dom nodes",advanced:!0},{name:"scriptsClientOnly",type:"boolean",defaultValue:!1,helperText:"Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",advanced:!0}]},J=()=>[{component:o.Button,...x},{component:o.Columns,...C},{component:K,...D},{component:j,..._},{component:o.Fragment,...S},{component:o.Image,...k},{component:q,...L},{component:o.Section,...T},{component:o.Symbol,...R},{component:o.Text,...w},{component:o.Video,...I}],G="0.4.1",Y=()=>{o.register("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let b=!1;const X=(e={})=>{var t,n;b||(b=!0,o.isBrowser()&&((t=window.parent)==null||t.postMessage({type:"builder.sdkInfo",data:{target:o.TARGET,version:G,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(n=window.parent)==null||n.postMessage({type:"builder.updateContent",data:{options:e}},"*"),window.addEventListener("message",({data:a})=>{var i,s;if(!!(a!=null&&a.type))switch(a.type){case"builder.evaluate":{const r=a.data.text,d=a.data.arguments||[],l=a.data.id,u=new Function(r);let c,p=null;try{c=u.apply(null,d)}catch(m){p=m}p?(i=window.parent)==null||i.postMessage({type:"builder.evaluateError",data:{id:l,error:p.message}},"*"):c&&typeof c.then=="function"?c.then(m=>{var f;(f=window.parent)==null||f.postMessage({type:"builder.evaluateResult",data:{id:l,result:m}},"*")}).catch(console.error):(s=window.parent)==null||s.postMessage({type:"builder.evaluateResult",data:{result:c,id:l}},"*");break}}})))};function y(e){return Math.round(e*1e3)/1e3}const Q=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let a=n?e:e.parentElement;do{if(!a)return null;if(t(a))return a}while(a=a.parentElement);return null},Z=e=>Q(e,t=>{const n=t.getAttribute("builder-id")||t.id;return Boolean((n==null?void 0:n.indexOf("builder-"))===0)}),v=({event:e,target:t})=>{const n=t.getBoundingClientRect(),a=e.clientX-n.left,i=e.clientY-n.top,s=y(a/n.width),r=y(i/n.height);return{x:s,y:r}},ee=e=>{const t=e.target,n=t&&Z(t),a=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:a||void 0,metadata:{targetOffset:t?v({event:e,target:t}):void 0,builderTargetOffset:n?v({event:e,target:n}):void 0,builderElementIndex:n&&a?[].slice.call(document.getElementsByClassName(a)).indexOf(n):void 0}}},te=({content:e,data:t,locale:n})=>{var s,r,d;const a={};(r=(s=e==null?void 0:e.data)==null?void 0:s.inputs)==null||r.forEach(l=>{var u;l.name&&l.defaultValue!==void 0&&((u=e==null?void 0:e.data)==null?void 0:u.state)&&e.data.state[l.name]===void 0&&(a[l.name]=l.defaultValue)});const i={...(d=e==null?void 0:e.data)==null?void 0:d.state,...t,...n?{locale:n}:{}};return{...a,...i}},ne=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0,ae=()=>Promise.resolve().then(()=>require("./index.c16f4cca.cjs")).then(e=>e.renderBlocks$1).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",e),e}),ie=()=>Promise.resolve().then(()=>require("./render-styles.e6e62ba1.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderContentStyles at ./components/render-styles.vue",e),e}),oe=h.defineComponent({name:"render-content",components:{RenderContentStyles:ie,RenderBlocks:ae},props:["content","data","canTrack","locale","customComponents","model","context","apiKey","parentContentId","hideContent","classNameProp","isSsrAbTest","includeRefs","enrich","apiVersion"],data(){var e;return{forceReRenderCount:0,overrideContent:null,useContent:ne({content:this.content,data:this.data}),update:0,canTrackToUse:o.checkIsDefined(this.canTrack)?this.canTrack:!0,contentState:te({content:this.content,data:this.data,locale:this.locale}),allRegisteredComponents:[...J(),...o.components,...this.customComponents||[]].reduce((t,{component:n,...a})=>({...t,[a.name]:{component:n,...a}}),{}),httpReqsData:{},clicked:!1,scriptStr:o.getRenderContentScriptString({contentId:(e=this.content)==null?void 0:e.id,parentContentId:this.parentContentId}),TARGET:o.TARGET}},provide(){const e=this;return{[o.BuilderContext.key]:{content:e.useContent,localState:void 0,rootState:e.contentState,rootSetState:e.contentSetState,context:e.context||{},apiKey:e.apiKey,apiVersion:e.apiVersion,registeredComponents:e.allRegisteredComponents,inheritedStyles:{}}}},mounted(){var e,t;if(this.apiKey||o.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),o.isBrowser()){if(o.isEditing()&&(this.forceReRenderCount=this.forceReRenderCount+1,Y(),X({...this.locale?{locale:this.locale}:{},...this.includeRefs?{includeRefs:this.includeRefs}:{},...this.enrich?{enrich:this.enrich}:{}}),Object.values(this.allRegisteredComponents).forEach(n=>{var i;const a=o.createRegisterComponentMessage(n);(i=window.parent)==null||i.postMessage(a,"*")}),window.addEventListener("message",this.processMessage),window.addEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate)),this.useContent){const n=(e=this.useContent)==null?void 0:e.testVariationId,a=(t=this.useContent)==null?void 0:t.id;o._track({type:"impression",canTrack:this.canTrackToUse,contentId:a,apiKey:this.apiKey,variationId:n!==a?n:void 0})}if(o.isPreviewing()){const n=new URL(location.href).searchParams,a=n.get("builder.preview"),i=n.get(`builder.preview.${a}`),s=n.get("apiKey")||n.get("builder.space");a===this.model&&s===this.apiKey&&(!this.content||i===this.content.id)&&o.getContent({model:this.model,apiKey:this.apiKey,apiVersion:this.apiVersion}).then(r=>{r&&this.mergeNewContent(r)})}this.evaluateJsCode(),this.runHttpRequests(),this.emitStateUpdate()}},watch:{onUpdateHook0:{handler(){this.content&&this.mergeNewContent(this.content)},immediate:!0},onUpdateHook1:{handler(){this.evaluateJsCode()},immediate:!0},onUpdateHook2:{handler(){this.runHttpRequests()},immediate:!0},onUpdateHook3:{handler(){this.emitStateUpdate()},immediate:!0}},unmounted(){o.isBrowser()&&(window.removeEventListener("message",this.processMessage),window.removeEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate))},computed:{onUpdateHook0(){return{0:this.content}},onUpdateHook1(){var e,t;return{0:(t=(e=this.useContent)==null?void 0:e.data)==null?void 0:t.jsCode,1:this.contentState}},onUpdateHook2(){var e,t;return{0:(t=(e=this.useContent)==null?void 0:e.data)==null?void 0:t.httpRequests}},onUpdateHook3(){return{0:this.contentState}}},methods:{mergeNewContent(e){var t,n,a,i,s;this.useContent={...this.useContent,...e,data:{...(t=this.useContent)==null?void 0:t.data,...e==null?void 0:e.data},meta:{...(n=this.useContent)==null?void 0:n.meta,...e==null?void 0:e.meta,breakpoints:((a=e==null?void 0:e.meta)==null?void 0:a.breakpoints)||((s=(i=this.useContent)==null?void 0:i.meta)==null?void 0:s.breakpoints)}}},setBreakpoints(e){var t;this.useContent={...this.useContent,meta:{...(t=this.useContent)==null?void 0:t.meta,breakpoints:e}}},contentSetState(e){this.contentState=e},processMessage(e){var n;const{data:t}=e;if(t)switch(t.type){case"builder.configureSdk":{const a=t.data,{breakpoints:i,contentId:s}=a;if(!s||s!==((n=this.useContent)==null?void 0:n.id))return;i&&this.setBreakpoints(i),this.forceReRenderCount=this.forceReRenderCount+1;break}case"builder.contentUpdate":{const a=t.data,i=a.key||a.alias||a.entry||a.modelName,s=a.data;i===this.model&&(this.mergeNewContent(s),this.forceReRenderCount=this.forceReRenderCount+1);break}}},evaluateJsCode(){var t,n;const e=(n=(t=this.useContent)==null?void 0:t.data)==null?void 0:n.jsCode;e&&g.evaluate({code:e,context:this.context||{},localState:void 0,rootState:this.contentState,rootSetState:this.contentSetState})},onClick(e){var t,n;if(this.useContent){const a=(t=this.useContent)==null?void 0:t.testVariationId,i=(n=this.useContent)==null?void 0:n.id;o._track({type:"click",canTrack:this.canTrackToUse,contentId:i,apiKey:this.apiKey,variationId:a!==i?a:void 0,...ee(e),unique:!this.clicked})}this.clicked||(this.clicked=!0)},evalExpression(e){return e.replace(/{{([^}]+)}}/g,(t,n)=>g.evaluate({code:n,context:this.context||{},localState:void 0,rootState:this.contentState,rootSetState:this.contentSetState}))},handleRequest({url:e,key:t}){o.fetch(e).then(n=>n.json()).then(n=>{const a={...this.contentState,[t]:n};this.contentSetState(a)}).catch(n=>{console.error("error fetching dynamic data",e,n)})},runHttpRequests(){var t,n,a;const e=(a=(n=(t=this.useContent)==null?void 0:t.data)==null?void 0:n.httpRequests)!=null?a:{};Object.entries(e).forEach(([i,s])=>{if(s&&(!this.httpReqsData[i]||o.isEditing())){const r=this.evalExpression(s);this.handleRequest({url:r,key:i})}})},emitStateUpdate(){o.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:this.contentState,ref:{name:this.model}}}))},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const a of n)t[a]=!0;return t}}});var se=function(){var a,i,s,r,d,l,u,c;var t=this,n=t._self._c;return t._self._setupProxy,t.useContent?n("div",t._b({ref:"elementRef",class:t._classStringToObject(t.classNameProp),attrs:{"builder-content-id":(a=t.useContent)==null?void 0:a.id,"builder-model":t.model},on:{click:function(p){return t.onClick(p)}}},"div",{...t.TARGET==="reactNative"?{dataSet:{"builder-content-id":""}}:{},...t.hideContent?{hidden:!0,"aria-hidden":!0}:{}},!1),[t.isSsrAbTest?[n("script",{tag:"component",domProps:{innerHTML:t._s(t.scriptStr)}})]:t._e(),t.TARGET!=="reactNative"?[n("render-content-styles",{attrs:{contentId:(i=t.useContent)==null?void 0:i.id,cssCode:(r=(s=t.useContent)==null?void 0:s.data)==null?void 0:r.cssCode,customFonts:(l=(d=t.useContent)==null?void 0:d.data)==null?void 0:l.customFonts}})]:t._e(),n("render-blocks",{key:t.forceReRenderCount,attrs:{blocks:(c=(u=t.useContent)==null?void 0:u.data)==null?void 0:c.blocks}})],2):t._e()},re=[],le=o.normalizeComponent(oe,se,re,!1,null,null,null,null);const de=le.exports;exports.default=de;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),o=require("./index.c16f4cca.cjs"),c=()=>Promise.resolve().then(()=>require("./render-block.954cc390.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlock at ./render-block.vue",e),e}),a=r.defineComponent({name:"render-repeated-block",components:{RenderBlock:c},props:["block","repeatContext"],provide(){const e=this;return{[o.BuilderContext.key]:{content:e.repeatContext.content,localState:e.repeatContext.localState,rootState:e.repeatContext.rootState,rootSetState:e.repeatContext.rootSetState,context:e.repeatContext.context,apiKey:e.repeatContext.apiKey,registeredComponents:e.repeatContext.registeredComponents,inheritedStyles:e.repeatContext.inheritedStyles,apiVersion:e.repeatContext.apiVersion}}}});var l=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("render-block",{attrs:{block:t.block,context:t.repeatContext}})},s=[],i=o.normalizeComponent(a,l,s,!1,null,null,null,null);const p=i.exports;exports.default=p;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { defineComponent as n } from "vue";
|
|
2
|
-
import { k as r, n as a } from "./index.e2db82e0.js";
|
|
3
|
-
const p = () => import("./render-block.0f23cd7e.js").then((e) => e.default).catch((e) => {
|
|
4
|
-
throw console.error(
|
|
5
|
-
"Error while attempting to dynamically import component RenderBlock at ./render-block.vue",
|
|
6
|
-
e
|
|
7
|
-
), e;
|
|
8
|
-
}), c = n({
|
|
9
|
-
name: "render-repeated-block",
|
|
10
|
-
components: { RenderBlock: p },
|
|
11
|
-
props: ["block", "repeatContext"],
|
|
12
|
-
provide() {
|
|
13
|
-
const e = this;
|
|
14
|
-
return {
|
|
15
|
-
[r.key]: {
|
|
16
|
-
content: e.repeatContext.content,
|
|
17
|
-
localState: e.repeatContext.localState,
|
|
18
|
-
rootState: e.repeatContext.rootState,
|
|
19
|
-
rootSetState: e.repeatContext.rootSetState,
|
|
20
|
-
context: e.repeatContext.context,
|
|
21
|
-
apiKey: e.repeatContext.apiKey,
|
|
22
|
-
registeredComponents: e.repeatContext.registeredComponents,
|
|
23
|
-
inheritedStyles: e.repeatContext.inheritedStyles,
|
|
24
|
-
apiVersion: e.repeatContext.apiVersion
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
var l = function() {
|
|
30
|
-
var t = this, o = t._self._c;
|
|
31
|
-
return t._self._setupProxy, o("render-block", { attrs: { block: t.block, context: t.repeatContext } });
|
|
32
|
-
}, s = [], i = /* @__PURE__ */ a(
|
|
33
|
-
c,
|
|
34
|
-
l,
|
|
35
|
-
s,
|
|
36
|
-
!1,
|
|
37
|
-
null,
|
|
38
|
-
null,
|
|
39
|
-
null,
|
|
40
|
-
null
|
|
41
|
-
);
|
|
42
|
-
const x = i.exports;
|
|
43
|
-
export {
|
|
44
|
-
x as default
|
|
45
|
-
};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { defineComponent as h, defineAsyncComponent as S, resolveComponent as k, openBlock as y, createBlock as f, createCommentVNode as B } from "vue";
|
|
2
|
-
import { T as g, c as i, g as C, a as d, _ } from "./index.cdd37dcf.js";
|
|
3
|
-
import { g as x, c } from "./css.7fe37cb4.js";
|
|
4
|
-
import "./evaluate.975fa4d3.js";
|
|
5
|
-
const b = () => import("./render-inlined-styles.49a121f8.js").then((e) => e.default).catch((e) => {
|
|
6
|
-
throw console.error(
|
|
7
|
-
"Error while attempting to dynamically import component RenderInlinedStyles at ../render-inlined-styles.vue",
|
|
8
|
-
e
|
|
9
|
-
), e;
|
|
10
|
-
}), w = h({
|
|
11
|
-
name: "block-styles",
|
|
12
|
-
components: {
|
|
13
|
-
RenderInlinedStyles: S(b)
|
|
14
|
-
},
|
|
15
|
-
props: ["block", "context"],
|
|
16
|
-
data() {
|
|
17
|
-
return { TARGET: g };
|
|
18
|
-
},
|
|
19
|
-
computed: {
|
|
20
|
-
useBlock() {
|
|
21
|
-
return x({
|
|
22
|
-
block: this.block,
|
|
23
|
-
localState: this.context.localState,
|
|
24
|
-
rootState: this.context.rootState,
|
|
25
|
-
rootSetState: this.context.rootSetState,
|
|
26
|
-
context: this.context.context,
|
|
27
|
-
shouldEvaluateBindings: !0
|
|
28
|
-
});
|
|
29
|
-
},
|
|
30
|
-
canShowBlock() {
|
|
31
|
-
return i(this.useBlock.hide) ? !this.useBlock.hide : i(this.useBlock.show) ? this.useBlock.show : !0;
|
|
32
|
-
},
|
|
33
|
-
css() {
|
|
34
|
-
var a;
|
|
35
|
-
const e = this.useBlock.responsiveStyles, s = this.context.content, o = C(
|
|
36
|
-
((a = s == null ? void 0 : s.meta) == null ? void 0 : a.breakpoints) || {}
|
|
37
|
-
), n = e == null ? void 0 : e.large, r = e == null ? void 0 : e.medium, l = e == null ? void 0 : e.small, t = this.useBlock.id;
|
|
38
|
-
if (!t)
|
|
39
|
-
return "";
|
|
40
|
-
const m = n ? c({
|
|
41
|
-
className: t,
|
|
42
|
-
styles: n
|
|
43
|
-
}) : "", u = r ? c({
|
|
44
|
-
className: t,
|
|
45
|
-
styles: r,
|
|
46
|
-
mediaQuery: d(
|
|
47
|
-
"medium",
|
|
48
|
-
o
|
|
49
|
-
)
|
|
50
|
-
}) : "", p = l ? c({
|
|
51
|
-
className: t,
|
|
52
|
-
styles: l,
|
|
53
|
-
mediaQuery: d(
|
|
54
|
-
"small",
|
|
55
|
-
o
|
|
56
|
-
)
|
|
57
|
-
}) : "";
|
|
58
|
-
return [m, u, p].join(" ");
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
function v(e, s, o, n, r, l) {
|
|
63
|
-
const t = k("render-inlined-styles");
|
|
64
|
-
return e.TARGET !== "reactNative" && e.css && e.canShowBlock ? (y(), f(t, {
|
|
65
|
-
key: 0,
|
|
66
|
-
styles: e.css
|
|
67
|
-
}, null, 8, ["styles"])) : B("", !0);
|
|
68
|
-
}
|
|
69
|
-
const $ = /* @__PURE__ */ _(w, [["render", v]]);
|
|
70
|
-
export {
|
|
71
|
-
$ as default
|
|
72
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),t=require("./index.3f716812.cjs"),c=require("./css.5cacc3c3.cjs");require("./evaluate.9a614eea.cjs");const y=()=>Promise.resolve().then(()=>require("./render-inlined-styles.528fb5cd.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderInlinedStyles at ../render-inlined-styles.vue",e),e}),S=o.defineComponent({name:"block-styles",components:{RenderInlinedStyles:o.defineAsyncComponent(y)},props:["block","context"],data(){return{TARGET:t.TARGET}},computed:{useBlock(){return c.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0})},canShowBlock(){return t.checkIsDefined(this.useBlock.hide)?!this.useBlock.hide:t.checkIsDefined(this.useBlock.show)?this.useBlock.show:!0},css(){var d;const e=this.useBlock.responsiveStyles,n=this.context.content,r=t.getSizesForBreakpoints(((d=n==null?void 0:n.meta)==null?void 0:d.breakpoints)||{}),l=e==null?void 0:e.large,i=e==null?void 0:e.medium,a=e==null?void 0:e.small,s=this.useBlock.id;if(!s)return"";const u=l?c.createCssClass({className:s,styles:l}):"",m=i?c.createCssClass({className:s,styles:i,mediaQuery:t.getMaxWidthQueryForSize("medium",r)}):"",h=a?c.createCssClass({className:s,styles:a,mediaQuery:t.getMaxWidthQueryForSize("small",r)}):"";return[u,m,h].join(" ")}}});function k(e,n,r,l,i,a){const s=o.resolveComponent("render-inlined-styles");return e.TARGET!=="reactNative"&&e.css&&e.canShowBlock?(o.openBlock(),o.createBlock(s,{key:0,styles:e.css},null,8,["styles"])):o.createCommentVNode("",!0)}const p=t._export_sfc(S,[["render",k]]);exports.default=p;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { i as d, b as w } from "./index.cdd37dcf.js";
|
|
2
|
-
function h({
|
|
3
|
-
code: n,
|
|
4
|
-
context: r,
|
|
5
|
-
localState: e,
|
|
6
|
-
rootState: s,
|
|
7
|
-
rootSetState: i,
|
|
8
|
-
event: u,
|
|
9
|
-
isExpression: c = !0
|
|
10
|
-
}) {
|
|
11
|
-
if (n === "") {
|
|
12
|
-
console.warn("Skipping evaluation of empty code block.");
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
const t = {
|
|
16
|
-
isEditing: d(),
|
|
17
|
-
isBrowser: w(),
|
|
18
|
-
isServer: !w()
|
|
19
|
-
}, l = c && !(n.includes(";") || n.includes(" return ") || n.trim().startsWith("return ")) ? `return (${n});` : n;
|
|
20
|
-
try {
|
|
21
|
-
return new Function(
|
|
22
|
-
"builder",
|
|
23
|
-
"Builder",
|
|
24
|
-
"state",
|
|
25
|
-
"context",
|
|
26
|
-
"event",
|
|
27
|
-
l
|
|
28
|
-
)(
|
|
29
|
-
t,
|
|
30
|
-
t,
|
|
31
|
-
o(s, e, i),
|
|
32
|
-
r,
|
|
33
|
-
u
|
|
34
|
-
);
|
|
35
|
-
} catch (f) {
|
|
36
|
-
console.warn(
|
|
37
|
-
`Builder custom code error:
|
|
38
|
-
While Evaluating:
|
|
39
|
-
`,
|
|
40
|
-
l,
|
|
41
|
-
`
|
|
42
|
-
`,
|
|
43
|
-
f
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
function o(n, r, e) {
|
|
48
|
-
if (n === r)
|
|
49
|
-
throw new Error("rootState === localState");
|
|
50
|
-
return new Proxy(n, {
|
|
51
|
-
get: (s, i) => r && i in r ? r[i] : n[i],
|
|
52
|
-
set: (s, i, u) => {
|
|
53
|
-
if (r && i in r)
|
|
54
|
-
throw new Error(
|
|
55
|
-
"Writing to local state is not allowed as it is read-only."
|
|
56
|
-
);
|
|
57
|
-
return n[i] = u, e == null || e(n), !0;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
export {
|
|
62
|
-
h as e
|
|
63
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("./index.3f716812.cjs");function f({code:n,context:r,localState:i,rootState:s,rootSetState:e,event:u,isExpression:w=!0}){if(n===""){console.warn("Skipping evaluation of empty code block.");return}const c={isEditing:t.isEditing(),isBrowser:t.isBrowser(),isServer:!t.isBrowser()},l=w&&!(n.includes(";")||n.includes(" return ")||n.trim().startsWith("return "))?`return (${n});`:n;try{return new Function("builder","Builder","state","context","event",l)(c,c,o(s,i,e),r,u)}catch(d){console.warn(`Builder custom code error:
|
|
2
|
-
While Evaluating:
|
|
3
|
-
`,l,`
|
|
4
|
-
`,d)}}function o(n,r,i){if(n===r)throw new Error("rootState === localState");return new Proxy(n,{get:(s,e)=>r&&e in r?r[e]:n[e],set:(s,e,u)=>{if(r&&e in r)throw new Error("Writing to local state is not allowed as it is read-only.");return n[e]=u,i==null||i(n),!0}})}exports.evaluate=f;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";const o=require("vue"),ue=o.defineComponent({name:"builder-button",props:["attributes","text","link","openLinkInNewTab"],methods:{filterAttrs:function(t={},n){const r="v-on:";return Object.keys(t).filter(s=>{if(!t[s])return!1;const i=s.startsWith(r);return n?i:!i}).reduce((s,i)=>({...s,[i.replace(r,"")]:t[i]}),{})},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});const y=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},me=["href","target"];function pe(e,t,n,r,s,i){return e.link?(o.openBlock(),o.createElementBlock("a",o.mergeProps({key:0,role:"button",href:e.link,target:e.openLinkInNewTab?"_blank":void 0},e.filterAttrs(e.attributes,!1),o.toHandlers(e.filterAttrs(e.attributes,!0),!0)),o.toDisplayString(e.text),17,me)):(o.openBlock(),o.createElementBlock("button",o.mergeProps({key:1,class:e._classStringToObject(e.attributes.class+" button-361b1o6wv2k")},e.filterAttrs(e.attributes,!1),o.toHandlers(e.filterAttrs(e.attributes,!0),!0)),o.toDisplayString(e.text),17))}const fe=y(ue,[["render",pe],["__scopeId","data-v-a4481d84"]]),I=e=>JSON.parse(JSON.stringify(e)),L={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},he=(e,t=L)=>`@media (max-width: ${t[e].max}px)`,x=({small:e,medium:t})=>{const n=I(L);if(!e||!t)return n;const r=Math.floor(e/2);n.small={max:e,min:r,default:r+1};const s=n.small.max+1;n.medium={max:t,min:s,default:s+1};const i=n.medium.max+1;return n.large={max:2e3,min:i,default:i+1},n},w="vue3",ge=Symbol(),V={Builder:{content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,registeredComponents:{},inheritedStyles:{}},key:ge},be=()=>Promise.resolve().then(()=>z).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",e),e}),ye=()=>Promise.resolve().then(()=>require("./render-inlined-styles.528fb5cd.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderInlinedStyles at ../../components/render-inlined-styles.vue",e),e}),ke=o.defineComponent({name:"builder-columns",components:{RenderInlinedStyles:o.defineAsyncComponent(ye),RenderBlocks:o.defineAsyncComponent(be)},props:["space","columns","stackColumnsAt","reverseColumnsWhenStacked","builderBlock"],data(){return{gutterSize:typeof this.space=="number"?this.space||0:20,cols:this.columns||[],stackAt:this.stackColumnsAt||"tablet",flexDir:this.stackColumnsAt==="never"?"row":this.reverseColumnsWhenStacked?"column-reverse":"column",TARGET:w}},inject:{builderContext:V.key},computed:{columnsCssVars(){return{"--flex-dir":this.flexDir,"--flex-dir-tablet":this.getTabletStyle({stackedStyle:this.flexDir,desktopStyle:"row"})}},columnsStyles(){return`
|
|
2
|
-
@media (max-width: ${this.getWidthForBreakpointSize("medium")}px) {
|
|
3
|
-
.${this.builderBlock.id}-breakpoints {
|
|
4
|
-
flex-direction: var(--flex-dir-tablet);
|
|
5
|
-
align-items: stretch;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.${this.builderBlock.id}-breakpoints > .builder-column {
|
|
9
|
-
width: var(--column-width-tablet) !important;
|
|
10
|
-
margin-left: var(--column-margin-left-tablet) !important;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@media (max-width: ${this.getWidthForBreakpointSize("small")}px) {
|
|
15
|
-
.${this.builderBlock.id}-breakpoints {
|
|
16
|
-
flex-direction: var(--flex-dir);
|
|
17
|
-
align-items: stretch;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.${this.builderBlock.id}-breakpoints > .builder-column {
|
|
21
|
-
width: var(--column-width-mobile) !important;
|
|
22
|
-
margin-left: var(--column-margin-left-mobile) !important;
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
`}},methods:{getWidth(e){var t;return((t=this.cols[e])==null?void 0:t.width)||100/this.cols.length},getColumnCssWidth(e){const t=this.gutterSize*(this.cols.length-1)/this.cols.length;return`calc(${this.getWidth(e)}% - ${t}px)`},getTabletStyle({stackedStyle:e,desktopStyle:t}){return this.stackAt==="tablet"?e:t},getMobileStyle({stackedStyle:e,desktopStyle:t}){return this.stackAt==="never"?t:e},columnCssVars(e){const t=e===0?0:this.gutterSize,n=this.getColumnCssWidth(e),r=`${t}px`,s="100%",i=0;return{width:n,"margin-left":r,"--column-width-mobile":this.getMobileStyle({stackedStyle:s,desktopStyle:n}),"--column-margin-left-mobile":this.getMobileStyle({stackedStyle:i,desktopStyle:r}),"--column-width-tablet":this.getTabletStyle({stackedStyle:s,desktopStyle:n}),"--column-margin-left-tablet":this.getTabletStyle({stackedStyle:i,desktopStyle:r})}},getWidthForBreakpointSize(e){var n,r;return x(((r=(n=this.builderContext.content)==null?void 0:n.meta)==null?void 0:r.breakpoints)||{})[e].max},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});function Se(e,t,n,r,s,i){const a=o.resolveComponent("render-inlined-styles"),l=o.resolveComponent("render-blocks");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e._classStringToObject(`builder-columns ${e.builderBlock.id}-breakpoints div-1eih9th5ow6`)),style:o.normalizeStyle(e.columnsCssVars),dataSet:{"builder-block-name":"builder-columns"}},[e.TARGET!=="reactNative"?(o.openBlock(),o.createBlock(a,{key:0,styles:e.columnsStyles},null,8,["styles"])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.columns,(c,d)=>(o.openBlock(),o.createElementBlock("div",{key:d,class:"builder-column div-1eih9th5ow6-2",style:o.normalizeStyle(e.columnCssVars(d)),dataSet:{"builder-block-name":"builder-column"}},[o.createVNode(l,{blocks:c.blocks,path:`component.options.columns.${d}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"}},null,8,["blocks","path","parent"])],4))),128))],6)}const ve=y(ke,[["render",Se],["__scopeId","data-v-cc8d4c1f"]]),Ce=o.defineComponent({name:"builder-fragment-component",props:[]});function $e(e,t,n,r,s,i){return o.openBlock(),o.createElementBlock("span",null,[o.renderSlot(e.$slots,"default")])}const we=y(Ce,[["render",$e]]);function O(e){return e.replace(/http(s)?:/,"")}function Be(e="",t,n){const r=new RegExp("([?&])"+t+"=.*?(&|$)","i"),s=e.indexOf("?")!==-1?"&":"?";return e.match(r)?e.replace(r,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+s+t+"="+encodeURIComponent(n)}function Te(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return O(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const r=e.split(n[0]),s=n[3],i=t.match("x")?t:`${t}x`;return O(`${r[0]}_${i}${s}`)}return null}function A(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const r=Number(e.split("?width=")[1]);return isNaN(r)||(n=`${n} ${r}w`),t.filter(s=>s!==r).map(s=>`${Be(e,"width",s)} ${s}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[Te(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,r])=>`${n} ${r}w`).concat([e]).join(", "):e}const Ee=o.defineComponent({name:"builder-image",props:["image","src","srcset","noWebp","aspectRatio","altText","backgroundPosition","backgroundSize","className","sizes","builderBlock","fitContent"],computed:{srcSetToUse(){var n;const t=this.image||this.src;if(!t||!(t.match(/builder\.io/)||t.match(/cdn\.shopify\.com/)))return this.srcset;if(this.srcset&&((n=this.image)==null?void 0:n.includes("builder.io/api/v1/image"))){if(!this.srcset.includes(this.image.split("?")[0]))return console.debug("Removed given srcset"),A(t)}else if(this.image&&!this.srcset)return A(t);return A(t)},webpSrcSet(){var e;return((e=this.srcSetToUse)==null?void 0:e.match(/builder\.io/))&&!this.noWebp?this.srcSetToUse.replace(/\?/g,"?format=webp&"):""},aspectRatioCss(){const e={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return this.aspectRatio?e:void 0}},methods:{_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});const Ie=["srcset"],Ve=["alt","role","src","srcset","sizes"],Ae={key:2,class:"div-256wrwn33ry-2"};function Re(e,t,n,r,s,i){var a,l,c,d;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("picture",null,[e.webpSrcSet?(o.openBlock(),o.createElementBlock("source",{key:0,type:"image/webp",srcset:e.webpSrcSet},null,8,Ie)):o.createCommentVNode("",!0),o.createElementVNode("img",{loading:"lazy",alt:e.altText,role:e.altText?"presentation":void 0,style:o.normalizeStyle({objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...e.aspectRatioCss}),class:o.normalizeClass(e._classStringToObject("builder-image"+(e.className?" "+e.className:"")+" img-256wrwn33ry")),src:e.image,srcset:e.srcSetToUse,sizes:e.sizes},null,14,Ve)]),e.aspectRatio&&!(((l=(a=e.builderBlock)==null?void 0:a.children)==null?void 0:l.length)&&e.fitContent)?(o.openBlock(),o.createElementBlock("div",{key:0,class:"builder-image-sizer div-256wrwn33ry",style:o.normalizeStyle({paddingTop:e.aspectRatio*100+"%"})},null,4)):o.createCommentVNode("",!0),((d=(c=e.builderBlock)==null?void 0:c.children)==null?void 0:d.length)&&e.fitContent?o.renderSlot(e.$slots,"default",{key:1},void 0,!0):o.createCommentVNode("",!0),!e.fitContent&&e.children?(o.openBlock(),o.createElementBlock("div",Ae,[o.renderSlot(e.$slots,"default",{},void 0,!0)])):o.createCommentVNode("",!0)],64)}const _e=y(Ee,[["render",Re],["__scopeId","data-v-15a2d98b"]]);function g(){return typeof window<"u"&&typeof document<"u"}function Oe(){return g()&&window.self!==window.top}function $(){return Oe()&&window.location.search.indexOf("builder.frameEditing=")!==-1}const Pe=()=>Promise.resolve().then(()=>require("./block-styles.e3f09eb7.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",e),e}),Ne=()=>Promise.resolve().then(()=>require("./render-block.d1c4ccaa.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",e),e}),je=o.defineComponent({name:"render-blocks",components:{RenderBlock:o.defineAsyncComponent(Ne),BlockStyles:o.defineAsyncComponent(Pe)},props:["blocks","parent","path","styleProp"],inject:{builderContext:V.key},computed:{className(){var e;return"builder-blocks"+((e=this.blocks)!=null&&e.length?"":" no-blocks")}},methods:{onClick(){var e,t;$()&&!((e=this.blocks)!=null&&e.length)&&((t=window.parent)==null||t.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:this.parent,dataPath:this.path}},"*"))},onMouseEnter(){var e,t;$()&&!((e=this.blocks)!=null&&e.length)&&((t=window.parent)==null||t.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:this.parent,dataPath:this.path}},"*"))},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});const Me=["builder-path","builder-parent-id","dataSet"];function Fe(e,t,n,r,s,i){const a=o.resolveComponent("render-block"),l=o.resolveComponent("block-styles");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(e._classStringToObject(e.className+" div-4o9pb21oca6")),"builder-path":e.path,"builder-parent-id":e.parent,dataSet:{class:e.className},style:o.normalizeStyle(e.styleProp),onClick:t[0]||(t[0]=c=>e.onClick()),onMouseenter:t[1]||(t[1]=c=>e.onMouseEnter())},[e.blocks?(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:0},o.renderList(e.blocks,(c,d)=>(o.openBlock(),o.createBlock(a,{key:"render-block-"+c.id,block:c,context:e.builderContext},null,8,["block","context"]))),128)):o.createCommentVNode("",!0),e.blocks?(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:1},o.renderList(e.blocks,(c,d)=>(o.openBlock(),o.createBlock(l,{key:"block-style-"+c.id,block:c,context:e.builderContext},null,8,["block","context"]))),128)):o.createCommentVNode("",!0)],46,Me)}const U=y(je,[["render",Fe],["__scopeId","data-v-8ed03d66"]]),z=Object.freeze(Object.defineProperty({__proto__:null,default:U},Symbol.toStringTag,{value:"Module"})),Le=o.defineComponent({name:"builder-section-component",props:["maxWidth","attributes"],methods:{filterAttrs:function(t={},n){const r="v-on:";return Object.keys(t).filter(s=>{if(!t[s])return!1;const i=s.startsWith(r);return n?i:!i}).reduce((s,i)=>({...s,[i.replace(r,"")]:t[i]}),{})}}});function xe(e,t,n,r,s,i){return o.openBlock(),o.createElementBlock("section",o.mergeProps({style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:e.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"}},e.filterAttrs(e.attributes,!1),o.toHandlers(e.filterAttrs(e.attributes,!0),!0)),[o.renderSlot(e.$slots,"default")],16)}const Ue=y(Le,[["render",xe]]),B="[Builder.io]: ",S={log:(...e)=>console.log(B,...e),error:(...e)=>console.error(B,...e),warn:(...e)=>console.warn(B,...e),debug:(...e)=>console.debug(B,...e)},v=e=>e!=null,ze=e=>{if(e==="localhost"||e==="127.0.0.1")return e;const t=e.split(".");return t.length>2?t.slice(1).join("."):e},W=({name:e,canTrack:t})=>{var n;try{return t?(n=document.cookie.split("; ").find(r=>r.startsWith(`${e}=`)))==null?void 0:n.split("=")[1]:void 0}catch(r){S.warn("[COOKIE] GET error: ",(r==null?void 0:r.message)||r);return}},K=async e=>W(e),We=e=>e.map(([t,n])=>n?`${t}=${n}`:t).filter(v).join("; "),Ke=[["secure",""],["SameSite","None"]],De=({name:e,value:t,expires:n})=>{const s=(g()?location.protocol==="https:":!0)?Ke:[[]],i=n?[["expires",n.toUTCString()]]:[[]],a=[[e,t],...i,["path","/"],["domain",ze(window.location.hostname)],...s];return We(a)},D=async({name:e,value:t,expires:n,canTrack:r})=>{try{if(!r)return;const s=De({name:e,value:t,expires:n});document.cookie=s}catch(s){S.warn("[COOKIE] SET error: ",(s==null?void 0:s.message)||s)}},He="builder.tests",_=e=>`${He}.${e}`,Ge=({contentId:e})=>K({name:_(e),canTrack:!0}),qe=({contentId:e})=>W({name:_(e),canTrack:!0}),Je=({contentId:e,value:t})=>D({name:_(e),value:t,canTrack:!0}),H=e=>v(e.id)&&v(e.variations)&&Object.keys(e.variations).length>0,Qe=({id:e,variations:t})=>{var s;let n=0;const r=Math.random();for(const i in t){const a=(s=t[i])==null?void 0:s.testRatio;if(n+=a,r<n)return i}return e},G=e=>{const t=Qe(e);return Je({contentId:e.id,value:t}).catch(n=>{S.error("could not store A/B test variation: ",n)}),t},q=({item:e,testGroupId:t})=>{const n=e.variations[t];return t===e.id||!n?{testVariationId:e.id,testVariationName:"Default"}:{data:n.data,testVariationId:n.id,testVariationName:n.name||(n.id===e.id?"Default":"")}},Xe=({item:e,canTrack:t})=>{if(!t)return e;if(!e)return;if(!H(e))return e;const n=qe({contentId:e.id})||G({variations:e.variations,id:e.id}),r=q({item:e,testGroupId:n});return{...e,...r}},Ye=async({item:e,canTrack:t})=>{if(!t||!H(e))return e;const r=await Ge({contentId:e.id})||G({variations:e.variations,id:e.id}),s=q({item:e,testGroupId:r});return{...e,...s}},T=e=>v(e)?e:!0;function Ze(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:globalThis}function et(){const e=Ze().fetch;if(typeof e>"u")throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
26
|
-
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return e}const J=et();function R(e,t=null,n="."){return Object.keys(e).reduce((r,s)=>{const i=e[s],a=[t,s].filter(Boolean).join(n);return[typeof i=="object",i!==null,!(Array.isArray(i)&&i.length===0)].every(Boolean)?{...r,...R(i,a,n)}:{...r,[a]:i}},{})}const P="builder.",tt="options.",nt=e=>{const t={};return e.forEach((n,r)=>{t[r]=n}),t},Q=e=>{if(!e)return{};const t=X(e),n={};return Object.keys(t).forEach(r=>{if(r.startsWith(P)){const s=r.replace(P,"").replace(tt,"");n[s]=t[r]}}),n},ot=()=>{if(!g())return{};const e=new URLSearchParams(window.location.search);return Q(e)},X=e=>e instanceof URLSearchParams?nt(e):e,rt="v3",Y=e=>{const{limit:t=30,userAttributes:n,query:r,noTraverse:s=!1,model:i,apiKey:a,includeRefs:l=!0,enrich:c,locale:d,apiVersion:m=rt}=e;if(!a)throw new Error("Missing API key");if(!["v2","v3"].includes(m))throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${m}'`);const p=new URL(`https://cdn.builder.io/api/${m}/content/${i}?apiKey=${a}&limit=${t}&noTraverse=${s}&includeRefs=${l}${d?`&locale=${d}`:""}${c?`&enrich=${c}`:""}`),f={...ot(),...X(e.options||{})},h=R(f);for(const u in h)p.searchParams.set(u,String(h[u]));if(n&&p.searchParams.set("userAttributes",JSON.stringify(n)),r){const u=R({query:r});for(const k in u)p.searchParams.set(k,JSON.stringify(u[k]))}return p},Z=e=>"results"in e;async function ee(e){const t=await ne({...e,limit:1});return t&&Z(t)&&t.results[0]||null}const st=async e=>{const t=Y(e);return await(await J(t.href)).json()},te=async(e,t)=>{const n=T(e.canTrack);if(!n||!(g()||w==="reactNative"))return t;try{const r=[];for(const s of t.results)r.push(await Ye({item:s,canTrack:n}));t.results=r}catch(r){S.error("Could not process A/B tests. ",r)}return t};async function ne(e){try{const t=Y(e),n=await st(e);return Z(n)?te(e,n):(S.error("Error fetching data. ",{url:t,content:n,options:e}),n)}catch(t){return S.error("Error fetching data. ",t),null}}const it=()=>Promise.resolve().then(()=>require("./render-content.17e9b187.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderContent at ../../components/render-content/render-content.vue",e),e}),at=o.defineComponent({name:"builder-symbol",components:{RenderContent:o.defineAsyncComponent(it)},props:["attributes","symbol","dynamic"],data(){var e,t,n;return{className:[...Object.keys(this.attributes.class),"builder-symbol",(e=this.symbol)!=null&&e.inline?"builder-inline-symbol":void 0,((t=this.symbol)==null?void 0:t.dynamic)||this.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" "),contentToUse:(n=this.symbol)==null?void 0:n.content}},inject:{builderContext:V.key},mounted(){this.fetchContent()},watch:{onUpdateHook0:{handler(){this.fetchContent()},immediate:!0}},computed:{onUpdateHook0(){return{0:this.symbol}}},methods:{fetchContent(){var e,t;!this.contentToUse&&((e=this.symbol)==null?void 0:e.model)&&((t=this.builderContext)==null?void 0:t.apiKey)&&ee({model:this.symbol.model,apiKey:this.builderContext.apiKey,apiVersion:this.builderContext.apiVersion,query:{id:this.symbol.entry}}).then(n=>{n&&(this.contentToUse=n)}).catch(n=>{S.error("Could not fetch symbol content: ",n)})},filterAttrs:function(t={},n){const r="v-on:";return Object.keys(t).filter(s=>{if(!t[s])return!1;const i=s.startsWith(r);return n?i:!i}).reduce((s,i)=>({...s,[i.replace(r,"")]:t[i]}),{})},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}}),ct=["dataSet"];function lt(e,t,n,r,s,i){var l,c,d,m;const a=o.resolveComponent("render-content");return o.openBlock(),o.createElementBlock("div",o.mergeProps({dataSet:{class:e.className},class:e._classStringToObject(e.className)},e.filterAttrs(e.attributes,!1),o.toHandlers(e.filterAttrs(e.attributes,!0),!0)),[o.createVNode(a,{apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:e.builderContext.context,customComponents:Object.values(e.builderContext.registeredComponents),data:{...(l=e.symbol)==null?void 0:l.data,...e.builderContext.localState,...(d=(c=e.contentToUse)==null?void 0:c.data)==null?void 0:d.state},model:(m=e.symbol)==null?void 0:m.model,content:e.contentToUse},null,8,["apiVersion","apiKey","context","customComponents","data","model","content"])],16,ct)}const dt=y(at,[["render",lt]]),ut=o.defineComponent({name:"builder-text",props:["text"]}),mt=["innerHTML"];function pt(e,t,n,r,s,i){return o.openBlock(),o.createElementBlock("span",{class:"builder-text",innerHTML:e.text,style:{outline:"none"}},null,8,mt)}const ft=y(ut,[["render",pt]]),ht=o.defineComponent({name:"builder-video",props:["autoPlay","muted","controls","loop","playsInline","attributes","fit","position","video","posterImage"],computed:{videoProps(){return{...this.autoPlay===!0?{autoPlay:!0}:{},...this.muted===!0?{muted:!0}:{},...this.controls===!0?{controls:!0}:{},...this.loop===!0?{loop:!0}:{},...this.playsInline===!0?{playsInline:!0}:{}}},spreadProps(){return{...this.attributes,...this.videoProps}}}}),gt=["src","poster"];function bt(e,t,n,r,s,i){var a;return o.openBlock(),o.createElementBlock("video",o.mergeProps({style:{width:"100%",height:"100%",...(a=e.attributes)==null?void 0:a.style,objectFit:e.fit,objectPosition:e.position,borderRadius:1},src:e.video||"no-src",poster:e.posterImage},e.spreadProps),null,16,gt)}const yt=y(ht,[["render",bt]]),E=e=>Object.values((e==null?void 0:e.variations)||{}),N=({canTrack:e,content:t})=>!(!(E(t).length>0)||!e||g());function kt(e,t,n){function r(){function a(h,u,k){let C="";if(k){const b=new Date;b.setTime(b.getTime()+k*24*60*60*1e3),C="; expires="+b.toUTCString()}document.cookie=h+"="+(u||"")+C+"; path=/; Secure; SameSite=None"}function l(h){const u=h+"=",k=document.cookie.split(";");for(let C=0;C<k.length;C++){let b=k[C];for(;b.charAt(0)===" ";)b=b.substring(1,b.length);if(b.indexOf(u)===0)return b.substring(u.length,b.length)}return null}const c=`builder.tests.${e}`,d=l(c),m=t.map(h=>h.id).concat(e);if(d&&m.includes(d))return d;let p=0;const f=Math.random();for(let h=0;h<t.length;h++){const u=t[h],k=u.testRatio;if(p+=k,f<p)return a(c,u.id),u.id}return a(c,e),e}const s=r(),i=document.getElementById(`variants-styles-${e}`);if(n){i.remove();const a=document.getElementById(`variants-script-${e}`);a==null||a.remove()}else{const a=t.concat({id:e}).filter(l=>l.id!==s).map(l=>`.variant-${l.id} { display: none; }
|
|
27
|
-
`).join("");i.innerHTML=a}}function St(e,t,n){if(!navigator.cookieEnabled)return;function r(c){const d=c+"=",m=document.cookie.split(";");for(let p=0;p<m.length;p++){let f=m[p];for(;f.charAt(0)===" ";)f=f.substring(1,f.length);if(f.indexOf(d)===0)return f.substring(d.length,f.length)}return null}const s=`builder.tests.${t}`,i=r(s),a=document.querySelector(`[builder-content-id="${e}"]`),l=e===t;if(i===e){if(l)return;a==null||a.removeAttribute("hidden"),a==null||a.removeAttribute("aria-hidden")}else{l&&(n?a==null||a.remove():(a==null||a.setAttribute("hidden","true"),a==null||a.setAttribute("aria-hidden","true")));return}}const oe=e=>e==="react"||e==="reactNative"||e==="vue3"||e==="vue2",j="bldrAbTest",re="bldrCntntScrpt",vt=(e,t)=>{const n=kt.toString().replace(/\s+/g," "),r=St.toString().replace(/\s+/g," ");return`
|
|
28
|
-
const ${j} = ${n}
|
|
29
|
-
const ${re} = ${r}
|
|
30
|
-
${j}("${t}", ${JSON.stringify(e)}, ${oe})
|
|
31
|
-
`},Ct=({parentContentId:e,contentId:t})=>`
|
|
32
|
-
${re}("${t}", "${e}", ${oe})`,$t=()=>Promise.resolve().then(()=>require("./render-content.17e9b187.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderContent at ../render-content/render-content.vue",e),e}),wt=()=>Promise.resolve().then(()=>require("./render-inlined-styles.528fb5cd.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderInlinedStyles at ../render-inlined-styles.vue",e),e}),Bt=o.defineComponent({name:"render-content-variants",components:{RenderInlinedStyles:o.defineAsyncComponent(wt),RenderContent:o.defineAsyncComponent($t)},props:["content","canTrack","apiKey","apiVersion","customComponents","model"],data(){var e;return{variantScriptStr:vt(E(this.content).map(t=>({id:t.id,testRatio:t.testRatio})),((e=this.content)==null?void 0:e.id)||""),shouldRenderVariants:N({canTrack:T(this.canTrack),content:this.content}),hideVariantsStyleString:E(this.content).map(t=>`.variant-${t.id} { display: none; } `).join(""),contentToRender:N({canTrack:T(this.canTrack),content:this.content})?this.content:Xe({item:this.content,canTrack:T(this.canTrack)}),getVariants:E}}});function Tt(e,t,n,r,s,i){var c,d,m,p;const a=o.resolveComponent("render-inlined-styles"),l=o.resolveComponent("render-content");return o.openBlock(),o.createElementBlock(o.Fragment,null,[e.shouldRenderVariants?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createVNode(a,{id:`variants-styles-${(c=e.content)==null?void 0:c.id}`,styles:e.hideVariantsStyleString},null,8,["id","styles"]),(o.openBlock(),o.createBlock(o.resolveDynamicComponent("script"),{id:`variants-script-${(d=e.content)==null?void 0:d.id}`,innerHTML:e.variantScriptStr},null,8,["id","innerHTML"])),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.getVariants(e.content),(f,h)=>{var u;return o.openBlock(),o.createBlock(l,{key:f.id,content:f,apiKey:e.apiKey,apiVersion:e.apiVersion,canTrack:e.canTrack,customComponents:e.customComponents,hideContent:!0,parentContentId:(u=e.content)==null?void 0:u.id,isSsrAbTest:e.shouldRenderVariants},null,8,["content","apiKey","apiVersion","canTrack","customComponents","parentContentId","isSsrAbTest"])}),128))],64)):o.createCommentVNode("",!0),o.createVNode(l,{model:e.model,content:e.contentToRender,apiKey:e.apiKey,apiVersion:e.apiVersion,canTrack:e.canTrack,customComponents:e.customComponents,classNameProp:`variant-${(m=e.content)==null?void 0:m.id}`,parentContentId:(p=e.content)==null?void 0:p.id,isSsrAbTest:e.shouldRenderVariants},null,8,["model","content","apiKey","apiVersion","canTrack","customComponents","classNameProp","parentContentId","isSsrAbTest"])],64)}const Et=y(Bt,[["render",Tt]]);function It(){return!g()||$()?!1:Boolean(location.search.indexOf("builder.preview=")!==-1)}const se=e=>{const t=e.toString().trim();return`return (${!t.startsWith("function")&&!t.startsWith("(")?"function ":""}${t}).apply(this, arguments)`},Vt=[],At=({component:e,...t})=>({type:"builder.registerComponent",data:_t(t)}),Rt=e=>typeof e=="function"?se(e):I(e),_t=({inputs:e,...t})=>({...I(t),inputs:e==null?void 0:e.map(n=>Object.entries(n).reduce((r,[s,i])=>({...r,[s]:Rt(i)}),{}))}),M={};function Ot(e,t){let n=M[e];if(n||(n=M[e]=[]),n.push(t),g()){const r={type:"builder.register",data:{type:e,info:t}};try{parent.postMessage(r,"*"),parent!==window&&window.postMessage(r,"*")}catch(s){console.debug("Could not postmessage",s)}}}const F={};function Pt(e){if(g()){Object.assign(F,e);const t={type:"builder.settingsChange",data:F};parent.postMessage(t,"*")}}function Nt(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}function ie(){return Nt().replace(/-/g,"")}const ae="builderSessionId",jt=async({canTrack:e})=>{if(!e)return;const t=await K({name:ae,canTrack:e});if(v(t))return t;{const n=Mt();return Ft({id:n,canTrack:e}),n}},Mt=()=>ie(),Ft=({id:e,canTrack:t})=>D({name:ae,value:e,canTrack:t}),ce=()=>g()&&typeof localStorage<"u"?localStorage:void 0,Lt=({key:e,canTrack:t})=>{var n;try{return t?(n=ce())==null?void 0:n.getItem(e):void 0}catch(r){console.debug("[LocalStorage] GET error: ",r);return}},xt=({key:e,canTrack:t,value:n})=>{var r;try{t&&((r=ce())==null||r.setItem(e,n))}catch(s){console.debug("[LocalStorage] SET error: ",s)}},le="builderVisitorId",Ut=({canTrack:e})=>{if(!e)return;const t=Lt({key:le,canTrack:e});if(v(t))return t;{const n=zt();return Wt({id:n,canTrack:e}),n}},zt=()=>ie(),Wt=({id:e,canTrack:t})=>xt({key:le,value:e,canTrack:t}),Kt=()=>{if(g()){const e=new URL(location.href);return e.pathname===""&&(e.pathname="/"),e}else return console.warn("Cannot get location for tracking in non-browser environment"),null},Dt=()=>typeof navigator=="object"&&navigator.userAgent||"",Ht=()=>{const e=Dt(),t={Android(){return e.match(/Android/i)},BlackBerry(){return e.match(/BlackBerry/i)},iOS(){return e.match(/iPhone|iPod/i)},Opera(){return e.match(/Opera Mini/i)},Windows(){return e.match(/IEMobile/i)||e.match(/WPDesktop/i)},any(){return t.Android()||t.BlackBerry()||t.iOS()||t.Opera()||t.Windows()||w==="reactNative"}},n=e.match(/Tablet|iPad/i),r=Kt();return{urlPath:r==null?void 0:r.pathname,host:(r==null?void 0:r.host)||(r==null?void 0:r.hostname),device:n?"tablet":t.any()?"mobile":"desktop"}},Gt=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const t=await jt({canTrack:e}),n=Ut({canTrack:e});return{sessionId:t,visitorId:n}},qt=async({type:e,canTrack:t,apiKey:n,metadata:r,...s})=>({type:e,data:{...s,metadata:{url:location.href,...r},...await Gt({canTrack:t}),userAttributes:Ht(),ownerId:n}});async function de(e){if(!e.apiKey){S.error("Missing API key for track call. Please provide your API key.");return}if(!!e.canTrack&&!$()&&!!(g()||w==="reactNative"))return fetch("https://builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await qt(e)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(t=>{console.error("Failed to track: ",t)})}const Jt=e=>de({...e,canTrack:!0});exports.BuilderContext=V;exports.Button=fe;exports.Columns=ve;exports.Fragment=we;exports.Image=_e;exports.Section=Ue;exports.Symbol=dt;exports.TARGET=w;exports.Text=ft;exports.Video=yt;exports._export_sfc=y;exports._track=de;exports.checkIsDefined=v;exports.components=Vt;exports.createRegisterComponentMessage=At;exports.fastClone=I;exports.fetch=J;exports.getAllContent=ne;exports.getBuilderSearchParams=Q;exports.getContent=ee;exports.getMaxWidthQueryForSize=he;exports.getRenderContentScriptString=Ct;exports.getSizesForBreakpoints=x;exports.isBrowser=g;exports.isEditing=$;exports.isPreviewing=It;exports.logger=S;exports.processContentResult=te;exports.register=Ot;exports.renderBlocks=U;exports.renderBlocks$1=z;exports.renderContentVariants=Et;exports.serializeFn=se;exports.setEditorSettings=Pt;exports.track=Jt;
|