@builder.io/sdk-vue 0.2.3 → 0.3.2-0
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 +2 -5
- package/packages/_vue2/dist/block-styles.22c50e60.js +75 -0
- package/packages/_vue2/dist/block-styles.82ffdfab.cjs +1 -0
- package/packages/_vue2/dist/css.d1f35fa9.js +74 -0
- package/packages/_vue2/dist/css.d67364ee.cjs +6 -0
- package/packages/_vue2/dist/{index.6a9eec41.js → index.1955e2ac.js} +506 -470
- package/packages/_vue2/dist/index.2eccdb53.cjs +29 -0
- package/packages/_vue2/dist/{render-block.4c7d7ca1.js → render-block.11a66585.js} +92 -87
- package/packages/_vue2/dist/render-block.742f7d9b.cjs +3 -0
- package/packages/_vue2/dist/{render-component.90275cfa.cjs → render-component.8f5204ca.cjs} +1 -1
- package/packages/_vue2/dist/{render-component.84d45798.js → render-component.dc53dbd0.js} +3 -3
- package/packages/_vue2/dist/{render-inlined-styles.1999f52e.cjs → render-inlined-styles.1887b766.cjs} +1 -1
- package/packages/_vue2/dist/{render-inlined-styles.1fa49816.js → render-inlined-styles.955770d4.js} +1 -1
- package/packages/_vue2/dist/render-repeated-block.1cb6b42e.cjs +1 -0
- package/packages/_vue2/dist/{render-repeated-block.900e2543.js → render-repeated-block.7b83bd13.js} +13 -12
- package/packages/_vue2/dist/{render-styles.591ca7be.js → render-styles.37cf66d9.js} +2 -2
- package/packages/_vue2/dist/{render-styles.15b8cdf0.cjs → render-styles.fe76b092.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-block.helpers.d.ts +0 -1
- package/packages/_vue2/dist/src/components/render-content/render-content.types.d.ts +2 -0
- package/packages/_vue2/dist/src/components/render-content/render-content.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/components/render-content/wrap-component-ref.d.ts +6 -0
- package/packages/_vue2/dist/src/components/render-inlined-styles.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/constants/sdk-version.d.ts +1 -0
- package/packages/_vue2/dist/src/context/builder.context.d.ts +3 -2
- package/packages/_vue2/dist/src/context/types.d.ts +17 -2
- package/packages/_vue2/dist/src/functions/evaluate.d.ts +4 -3
- package/packages/_vue2/dist/src/functions/get-block-actions-handler.d.ts +1 -1
- package/packages/_vue2/dist/src/functions/get-block-actions.d.ts +1 -1
- package/packages/_vue2/dist/src/functions/get-content/types.d.ts +6 -0
- package/packages/_vue2/dist/src/functions/get-processed-block.d.ts +2 -2
- package/packages/_vue2/dist/src/scripts/init-editing.d.ts +1 -0
- package/packages/_vue2/dist/style.css +1 -1
- package/packages/_vue3/dist/block-styles.18a1a0e6.cjs +1 -0
- package/packages/_vue3/dist/{block-styles.f06f105b.js → block-styles.c0e7bfbe.js} +19 -17
- package/packages/_vue3/dist/css.7a6108f3.cjs +6 -0
- package/packages/_vue3/dist/css.ee7d0ab8.js +74 -0
- package/packages/_vue3/dist/{index.0aed90df.js → index.c3536d81.js} +395 -359
- package/packages/_vue3/dist/index.e7a22b43.cjs +29 -0
- package/packages/_vue3/dist/render-block.bcafe494.cjs +3 -0
- package/packages/_vue3/dist/render-block.d0ed34b4.js +285 -0
- package/packages/_vue3/dist/{render-component.b4a311b8.js → render-component.268e7bd8.js} +3 -3
- package/packages/_vue3/dist/{render-component.0a7c094b.cjs → render-component.77f33093.cjs} +1 -1
- package/packages/_vue3/dist/{render-inlined-styles.454bc38b.js → render-inlined-styles.5aa04bb8.js} +1 -1
- package/packages/_vue3/dist/{render-inlined-styles.a596482a.cjs → render-inlined-styles.86c0a89d.cjs} +1 -1
- package/packages/_vue3/dist/render-repeated-block.0d46ab69.cjs +1 -0
- package/packages/_vue3/dist/{render-repeated-block.12894c71.js → render-repeated-block.b1101852.js} +12 -11
- package/packages/_vue3/dist/{render-styles.b6bf070d.cjs → render-styles.5073866f.cjs} +2 -2
- package/packages/_vue3/dist/{render-styles.90b25836.js → render-styles.7f31b369.js} +2 -2
- package/packages/_vue3/dist/sdk.cjs +1 -1
- package/packages/_vue3/dist/sdk.js +1 -1
- package/packages/_vue3/dist/src/components/render-block/render-block.helpers.d.ts +0 -1
- package/packages/_vue3/dist/src/components/render-content/render-content.types.d.ts +2 -0
- package/packages/_vue3/dist/src/components/render-content/render-content.vue.d.ts +4 -1
- package/packages/_vue3/dist/src/components/render-content/wrap-component-ref.d.ts +6 -0
- package/packages/_vue3/dist/src/components/render-inlined-styles.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/constants/sdk-version.d.ts +1 -0
- package/packages/_vue3/dist/src/context/builder.context.d.ts +3 -2
- package/packages/_vue3/dist/src/context/types.d.ts +17 -2
- package/packages/_vue3/dist/src/functions/evaluate.d.ts +4 -3
- package/packages/_vue3/dist/src/functions/get-block-actions-handler.d.ts +1 -1
- package/packages/_vue3/dist/src/functions/get-block-actions.d.ts +1 -1
- package/packages/_vue3/dist/src/functions/get-content/types.d.ts +6 -0
- package/packages/_vue3/dist/src/functions/get-processed-block.d.ts +2 -2
- package/packages/_vue3/dist/src/scripts/init-editing.d.ts +1 -0
- package/packages/_vue3/dist/style.css +1 -1
- package/packages/_vue2/dist/block-styles.5729b057.js +0 -73
- package/packages/_vue2/dist/block-styles.cb3c2dd0.cjs +0 -1
- package/packages/_vue2/dist/css.2efa95fa.cjs +0 -6
- package/packages/_vue2/dist/css.a54ddc90.js +0 -58
- package/packages/_vue2/dist/index.8547cce2.cjs +0 -29
- package/packages/_vue2/dist/render-block.753d2325.cjs +0 -3
- package/packages/_vue2/dist/render-repeated-block.f522a309.cjs +0 -1
- package/packages/_vue3/dist/block-styles.56f7b28a.cjs +0 -1
- package/packages/_vue3/dist/css.2ff361fc.js +0 -58
- package/packages/_vue3/dist/css.f83437ab.cjs +0 -6
- package/packages/_vue3/dist/index.d72bde22.cjs +0 -29
- package/packages/_vue3/dist/render-block.4e95bb8d.cjs +0 -3
- package/packages/_vue3/dist/render-block.905bcce5.js +0 -280
- package/packages/_vue3/dist/render-repeated-block.a95715ec.cjs +0 -1
|
@@ -11,6 +11,7 @@ declare const _sfc_main: import("vue").DefineComponent<Readonly<{
|
|
|
11
11
|
model?: any;
|
|
12
12
|
apiKey?: any;
|
|
13
13
|
includeRefs?: any;
|
|
14
|
+
enrich?: any;
|
|
14
15
|
apiVersion?: any;
|
|
15
16
|
}>, unknown, {
|
|
16
17
|
forceReRenderCount: number;
|
|
@@ -48,7 +49,7 @@ declare const _sfc_main: import("vue").DefineComponent<Readonly<{
|
|
|
48
49
|
}, {
|
|
49
50
|
mergeNewContent(newContent: BuilderContent): void;
|
|
50
51
|
setBreakpoints(breakpoints: Breakpoints): void;
|
|
51
|
-
|
|
52
|
+
contentSetState(newRootState: BuilderRenderState): void;
|
|
52
53
|
processMessage(event: MessageEvent): void;
|
|
53
54
|
evaluateJsCode(): void;
|
|
54
55
|
onClick(event: any): void;
|
|
@@ -69,6 +70,7 @@ declare const _sfc_main: import("vue").DefineComponent<Readonly<{
|
|
|
69
70
|
model?: any;
|
|
70
71
|
apiKey?: any;
|
|
71
72
|
includeRefs?: any;
|
|
73
|
+
enrich?: any;
|
|
72
74
|
apiVersion?: any;
|
|
73
75
|
}>>>, {
|
|
74
76
|
readonly data?: any;
|
|
@@ -80,6 +82,7 @@ declare const _sfc_main: import("vue").DefineComponent<Readonly<{
|
|
|
80
82
|
readonly model?: any;
|
|
81
83
|
readonly apiKey?: any;
|
|
82
84
|
readonly includeRefs?: any;
|
|
85
|
+
readonly enrich?: any;
|
|
83
86
|
readonly apiVersion?: any;
|
|
84
87
|
}>;
|
|
85
88
|
export default _sfc_main;
|
|
@@ -3,7 +3,7 @@ declare const _sfc_main: import("vue").DefineComponent<Readonly<{
|
|
|
3
3
|
}>, unknown, {
|
|
4
4
|
TARGET: string;
|
|
5
5
|
}, {
|
|
6
|
-
tag():
|
|
6
|
+
tag(): any;
|
|
7
7
|
injectedStyleScript(): string;
|
|
8
8
|
}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
9
9
|
styles?: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SDK_VERSION = "0.3.2-0";
|
|
@@ -11,8 +11,23 @@ export type BuilderRenderContext = Record<string, unknown>;
|
|
|
11
11
|
export interface BuilderContextInterface {
|
|
12
12
|
content: Nullable<BuilderContent>;
|
|
13
13
|
context: BuilderRenderContext;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
/**
|
|
15
|
+
* The state of the application.
|
|
16
|
+
*
|
|
17
|
+
* NOTE: see `localState` below to understand how it is different from `rootState`.
|
|
18
|
+
*/
|
|
19
|
+
rootState: BuilderRenderState;
|
|
20
|
+
/**
|
|
21
|
+
* Some frameworks have a `setState` function which needs to be invoked to notify
|
|
22
|
+
* the framework of state change. (other frameworks don't in which case it is `undefined')
|
|
23
|
+
*/
|
|
24
|
+
rootSetState: ((rootState: BuilderRenderState) => void) | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* The local state of the current component. This is different from `rootState` in that
|
|
27
|
+
* it can be a child state created by a repeater containing local state.
|
|
28
|
+
* The `rootState` is where all of the state mutations are actually stored.
|
|
29
|
+
*/
|
|
30
|
+
localState: BuilderRenderState | undefined;
|
|
16
31
|
apiKey: string | null;
|
|
17
32
|
apiVersion: ApiVersion | undefined;
|
|
18
33
|
registeredComponents: RegisteredComponents;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { BuilderContextInterface } from '../context/types.js';
|
|
2
|
-
export declare function evaluate({ code, context,
|
|
1
|
+
import type { BuilderContextInterface, BuilderRenderState } from '../context/types.js';
|
|
2
|
+
export declare function evaluate({ code, context, localState, rootState, rootSetState, event, isExpression, }: {
|
|
3
3
|
code: string;
|
|
4
4
|
event?: Event;
|
|
5
5
|
isExpression?: boolean;
|
|
6
|
-
} & Pick<BuilderContextInterface, '
|
|
6
|
+
} & Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'>): any;
|
|
7
|
+
export declare function flattenState(rootState: Record<string | symbol, any>, localState: Record<string | symbol, any> | undefined, rootSetState: ((rootState: BuilderRenderState) => void) | undefined): BuilderRenderState;
|
|
@@ -2,7 +2,7 @@ import type { BuilderContextInterface } from '../context/types.js';
|
|
|
2
2
|
import type { BuilderBlock } from '../types/builder-block.js';
|
|
3
3
|
type Options = {
|
|
4
4
|
block: BuilderBlock;
|
|
5
|
-
} & Pick<BuilderContextInterface, '
|
|
5
|
+
} & Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'>;
|
|
6
6
|
type EventHandler = (event: Event) => any;
|
|
7
7
|
export declare const createEventHandler: (value: string, options: Options) => EventHandler;
|
|
8
8
|
export {};
|
|
@@ -5,5 +5,5 @@ type Actions = {
|
|
|
5
5
|
};
|
|
6
6
|
export declare function getBlockActions(options: {
|
|
7
7
|
block: BuilderBlock;
|
|
8
|
-
} & Pick<BuilderContextInterface, '
|
|
8
|
+
} & Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'>): Actions;
|
|
9
9
|
export {};
|
|
@@ -19,6 +19,7 @@ export interface GetContentOptions {
|
|
|
19
19
|
/**
|
|
20
20
|
* If set to `true`, it will lazy load symbols/references.
|
|
21
21
|
* If set to `false`, it will render the entire content tree eagerly.
|
|
22
|
+
* @deprecated use `enrich` instead
|
|
22
23
|
*/
|
|
23
24
|
noTraverse?: boolean;
|
|
24
25
|
/**
|
|
@@ -30,8 +31,13 @@ export interface GetContentOptions {
|
|
|
30
31
|
canTrack?: boolean;
|
|
31
32
|
/**
|
|
32
33
|
* Include references in the response. Defaults to `true`.
|
|
34
|
+
* @deprecated use `enrich` instead
|
|
33
35
|
*/
|
|
34
36
|
includeRefs?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Include multilevel references in the response.
|
|
39
|
+
*/
|
|
40
|
+
enrich?: boolean;
|
|
35
41
|
/**
|
|
36
42
|
* If provided, the API will auto-resolve localized objects to the value of this `locale` key.
|
|
37
43
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { BuilderContextInterface } from '../context/types.js';
|
|
2
2
|
import type { BuilderBlock } from '../types/builder-block.js';
|
|
3
|
-
export declare function getProcessedBlock({ block, context, shouldEvaluateBindings,
|
|
3
|
+
export declare function getProcessedBlock({ block, context, shouldEvaluateBindings, localState, rootState, rootSetState, }: {
|
|
4
4
|
block: BuilderBlock;
|
|
5
5
|
/**
|
|
6
6
|
* In some cases, we want to avoid evaluating bindings and only want framework-specific block transformation. It is
|
|
7
7
|
* also sometimes too early to consider bindings, e.g. when we might be looking at a repeated block.
|
|
8
8
|
*/
|
|
9
9
|
shouldEvaluateBindings: boolean;
|
|
10
|
-
} & Pick<BuilderContextInterface, '
|
|
10
|
+
} & Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'>): BuilderBlock;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.button-1yj9n7yt24z[data-v-3b72112d]{all:unset}.div-361b1o6wv2k[data-v-
|
|
1
|
+
.button-1yj9n7yt24z[data-v-3b72112d]{all:unset}.div-361b1o6wv2k[data-v-fae985f2]{display:flex;line-height:normal}.div-361b1o6wv2k-2[data-v-fae985f2]{display:flex;flex-direction:column;align-items:stretch}.img-7jvpanrlkn[data-v-034e3c7d]{opacity:1;transition:opacity .2s ease-in-out}.div-7jvpanrlkn[data-v-034e3c7d]{width:100%;pointer-events:none;font-size:0}.div-7jvpanrlkn-2[data-v-034e3c7d]{display:flex;flex-direction:column;align-items:stretch;position:absolute;top:0;left:0;width:100%;height:100%}.div-7fq9d0i380[data-v-ff3cb99b]{display:flex;flex-direction:column;align-items:stretch}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { defineComponent as p } from "vue";
|
|
2
|
-
import { T as k, c as i, g as y, a as m, n as f } from "./index.6a9eec41.js";
|
|
3
|
-
import { g as _, c as o } from "./css.a54ddc90.js";
|
|
4
|
-
const S = () => import("./render-inlined-styles.1fa49816.js").then((e) => e.default).catch((e) => {
|
|
5
|
-
throw console.error(
|
|
6
|
-
"Error while attempting to dynamically import component RenderInlinedStyles at ../render-inlined-styles.vue",
|
|
7
|
-
e
|
|
8
|
-
), e;
|
|
9
|
-
}), B = p({
|
|
10
|
-
name: "block-styles",
|
|
11
|
-
components: { RenderInlinedStyles: S },
|
|
12
|
-
props: ["block", "context"],
|
|
13
|
-
data() {
|
|
14
|
-
return { TARGET: k };
|
|
15
|
-
},
|
|
16
|
-
computed: {
|
|
17
|
-
useBlock() {
|
|
18
|
-
return _({
|
|
19
|
-
block: this.block,
|
|
20
|
-
state: this.context.state,
|
|
21
|
-
context: this.context.context,
|
|
22
|
-
shouldEvaluateBindings: !0
|
|
23
|
-
});
|
|
24
|
-
},
|
|
25
|
-
canShowBlock() {
|
|
26
|
-
return i(this.useBlock.hide) ? !this.useBlock.hide : i(this.useBlock.show) ? this.useBlock.show : !0;
|
|
27
|
-
},
|
|
28
|
-
css() {
|
|
29
|
-
var a;
|
|
30
|
-
const e = this.useBlock.responsiveStyles, s = this.context.content, t = y(
|
|
31
|
-
((a = s == null ? void 0 : s.meta) == null ? void 0 : a.breakpoints) || {}
|
|
32
|
-
), l = e == null ? void 0 : e.large, r = e == null ? void 0 : e.medium, c = e == null ? void 0 : e.small, n = this.useBlock.id;
|
|
33
|
-
if (!n)
|
|
34
|
-
return "";
|
|
35
|
-
const u = l ? o({
|
|
36
|
-
className: n,
|
|
37
|
-
styles: l
|
|
38
|
-
}) : "", d = r ? o({
|
|
39
|
-
className: n,
|
|
40
|
-
styles: r,
|
|
41
|
-
mediaQuery: m(
|
|
42
|
-
"medium",
|
|
43
|
-
t
|
|
44
|
-
)
|
|
45
|
-
}) : "", h = c ? o({
|
|
46
|
-
className: n,
|
|
47
|
-
styles: c,
|
|
48
|
-
mediaQuery: m(
|
|
49
|
-
"small",
|
|
50
|
-
t
|
|
51
|
-
)
|
|
52
|
-
}) : "";
|
|
53
|
-
return [u, d, h].join(" ");
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
var g = function() {
|
|
58
|
-
var s = this, t = s._self._c;
|
|
59
|
-
return s._self._setupProxy, s.TARGET !== "reactNative" && s.css && s.canShowBlock ? t("render-inlined-styles", { attrs: { styles: s.css } }) : s._e();
|
|
60
|
-
}, x = [], v = /* @__PURE__ */ f(
|
|
61
|
-
B,
|
|
62
|
-
g,
|
|
63
|
-
x,
|
|
64
|
-
!1,
|
|
65
|
-
null,
|
|
66
|
-
null,
|
|
67
|
-
null,
|
|
68
|
-
null
|
|
69
|
-
);
|
|
70
|
-
const R = v.exports;
|
|
71
|
-
export {
|
|
72
|
-
R as default
|
|
73
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("vue"),t=require("./index.8547cce2.cjs"),r=require("./css.2efa95fa.cjs"),y=()=>Promise.resolve().then(()=>require("./render-inlined-styles.1999f52e.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}),k=h.defineComponent({name:"block-styles",components:{RenderInlinedStyles:y},props:["block","context"],data(){return{TARGET:t.TARGET}},computed:{useBlock(){return r.getProcessedBlock({block:this.block,state:this.context.state,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 a;const e=this.useBlock.responsiveStyles,s=this.context.content,n=t.getSizesForBreakpoints(((a=s==null?void 0:s.meta)==null?void 0:a.breakpoints)||{}),c=e==null?void 0:e.large,l=e==null?void 0:e.medium,i=e==null?void 0:e.small,o=this.useBlock.id;if(!o)return"";const u=c?r.createCssClass({className:o,styles:c}):"",d=l?r.createCssClass({className:o,styles:l,mediaQuery:t.getMaxWidthQueryForSize("medium",n)}):"",m=i?r.createCssClass({className:o,styles:i,mediaQuery:t.getMaxWidthQueryForSize("small",n)}):"";return[u,d,m].join(" ")}}});var f=function(){var s=this,n=s._self._c;return s._self._setupProxy,s.TARGET!=="reactNative"&&s.css&&s.canShowBlock?n("render-inlined-styles",{attrs:{styles:s.css}}):s._e()},p=[],S=t.normalizeComponent(k,f,p,!1,null,null,null,null);const _=S.exports;exports.default=_;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";const i=require("./index.8547cce2.cjs"),l=(e,t,r)=>{if(Object(e)!==e)return e;const s=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return s.slice(0,-1).reduce((n,c,o)=>Object(n[c])===n[c]?n[c]:n[c]=Math.abs(Number(s[o+1]))>>0===+s[o+1]?[]:{},e)[s[s.length-1]]=r,e};const d=({block:e,context:t,state:r})=>{if(!e.bindings)return e;const s=i.fastClone(e),n={...s,properties:{...s.properties},actions:{...s.actions}};for(const c in e.bindings){const o=e.bindings[c],u=i.evaluate({code:o,state:r,context:t});l(n,c,u)}return n};function f({block:e,context:t,shouldEvaluateBindings:r,state:s}){const n=e;return r?d({block:n,state:s,context:t}):n}const p=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),a=e=>Object.entries(e).map(([r,s])=>{if(typeof s=="string")return`${p(r)}: ${s};`}).filter(i.checkIsDefined),g=e=>a(e).join(`
|
|
2
|
-
`),C=({mediaQuery:e,className:t,styles:r})=>{const s=`.${t} {
|
|
3
|
-
${g(r)}
|
|
4
|
-
}`;return e?`${e} {
|
|
5
|
-
${s}
|
|
6
|
-
}`:s};exports.convertStyleMapToCSSArray=a;exports.createCssClass=C;exports.getProcessedBlock=f;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { f as a, e as u, c as f } from "./index.6a9eec41.js";
|
|
2
|
-
const l = (e, t, r) => {
|
|
3
|
-
if (Object(e) !== e)
|
|
4
|
-
return e;
|
|
5
|
-
const s = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
6
|
-
return s.slice(0, -1).reduce(
|
|
7
|
-
(n, o, c) => Object(n[o]) === n[o] ? n[o] : n[o] = Math.abs(Number(s[c + 1])) >> 0 === +s[c + 1] ? [] : {},
|
|
8
|
-
e
|
|
9
|
-
)[s[s.length - 1]] = r, e;
|
|
10
|
-
};
|
|
11
|
-
const p = ({
|
|
12
|
-
block: e,
|
|
13
|
-
context: t,
|
|
14
|
-
state: r
|
|
15
|
-
}) => {
|
|
16
|
-
if (!e.bindings)
|
|
17
|
-
return e;
|
|
18
|
-
const s = a(e), n = {
|
|
19
|
-
...s,
|
|
20
|
-
properties: { ...s.properties },
|
|
21
|
-
actions: { ...s.actions }
|
|
22
|
-
};
|
|
23
|
-
for (const o in e.bindings) {
|
|
24
|
-
const c = e.bindings[o], i = u({ code: c, state: r, context: t });
|
|
25
|
-
l(n, o, i);
|
|
26
|
-
}
|
|
27
|
-
return n;
|
|
28
|
-
};
|
|
29
|
-
function m({
|
|
30
|
-
block: e,
|
|
31
|
-
context: t,
|
|
32
|
-
shouldEvaluateBindings: r,
|
|
33
|
-
state: s
|
|
34
|
-
}) {
|
|
35
|
-
const n = e;
|
|
36
|
-
return r ? p({ block: n, state: s, context: t }) : n;
|
|
37
|
-
}
|
|
38
|
-
const g = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), d = (e) => Object.entries(e).map(([r, s]) => {
|
|
39
|
-
if (typeof s == "string")
|
|
40
|
-
return `${g(r)}: ${s};`;
|
|
41
|
-
}).filter(f), C = (e) => d(e).join(`
|
|
42
|
-
`), S = ({
|
|
43
|
-
mediaQuery: e,
|
|
44
|
-
className: t,
|
|
45
|
-
styles: r
|
|
46
|
-
}) => {
|
|
47
|
-
const s = `.${t} {
|
|
48
|
-
${C(r)}
|
|
49
|
-
}`;
|
|
50
|
-
return e ? `${e} {
|
|
51
|
-
${s}
|
|
52
|
-
}` : s;
|
|
53
|
-
};
|
|
54
|
-
export {
|
|
55
|
-
d as a,
|
|
56
|
-
S as c,
|
|
57
|
-
m as g
|
|
58
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";const h=require("vue"),he=h.defineComponent({name:"builder-button",props:["attributes","text","link","openLinkInNewTab"],methods:{filterAttrs:function(e={},n){const o="v-on:";return Object.keys(e).filter(r=>{if(!e[r])return!1;const s=r.startsWith(o);return n?s:!s}).reduce((r,s)=>({...r,[s.replace(o,"")]:e[s]}),{})},_classStringToObject(t){const e={};if(typeof t!="string")return e;const n=t.trim().split(/\s+/);for(const o of n)e[o]=!0;return e}}});function m(t,e,n,o,r,s,i,l){var a=typeof t=="function"?t.options:t;e&&(a.render=e,a.staticRenderFns=n,a._compiled=!0),o&&(a.functional=!0),s&&(a._scopeId="data-v-"+s);var c;if(i?(c=function(u){u=u||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!u&&typeof __VUE_SSR_CONTEXT__<"u"&&(u=__VUE_SSR_CONTEXT__),r&&r.call(this,u),u&&u._registeredComponents&&u._registeredComponents.add(i)},a._ssrRegister=c):r&&(c=l?function(){r.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:r),c)if(a.functional){a._injectStyles=c;var d=a.render;a.render=function(g,x){return c.call(x),d(g,x)}}else{var f=a.beforeCreate;a.beforeCreate=f?[].concat(f,c):[c]}return{exports:t,options:a}}var ge=function(){var e=this,n=e._self._c;return e._self._setupProxy,e.link?n("a",e._g(e._b({attrs:{role:"button",href:e.link,target:e.openLinkInNewTab?"_blank":void 0}},"a",e.filterAttrs(e.attributes,!1),!1),e.filterAttrs(e.attributes,!0)),[e._v(" "+e._s(e.text)+" ")]):n("button",e._g(e._b({class:e._classStringToObject(e.attributes.class+" button-2fnk003dqad")},"button",e.filterAttrs(e.attributes,!1),!1),e.filterAttrs(e.attributes,!0)),[e._v(" "+e._s(e.text)+" ")])},be=[],ye=m(he,ge,be,!1,null,"5f197ca9",null,null);const N=ye.exports,S=t=>JSON.parse(JSON.stringify(t)),L={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},ve=(t,e=L)=>`@media (max-width: ${e[t].max}px)`,z=({small:t,medium:e})=>{const n=S(L);if(!t||!e)return n;const o=Math.floor(t/2);n.small={max:t,min:o,default:o+1};const r=n.small.max+1;n.medium={max:e,min:r,default:r+1};const s=n.medium.max+1;return n.large={max:2e3,min:s,default:s+1},n},_="vue2",_e=Symbol(),k={Builder:{content:null,context:{},state:{},setState(){},apiKey:null,apiVersion:void 0,registeredComponents:{},inheritedStyles:{}},key:_e},xe=()=>Promise.resolve().then(()=>G).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",t),t}),ke=()=>Promise.resolve().then(()=>require("./render-inlined-styles.1999f52e.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderInlinedStyles at ../../components/render-inlined-styles.vue",t),t}),Se=h.defineComponent({name:"builder-columns",components:{RenderInlinedStyles:ke,RenderBlocks:xe},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:_}},inject:{builderContext:k.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(t){var e;return((e=this.cols[t])==null?void 0:e.width)||100/this.cols.length},getColumnCssWidth(t){const e=this.gutterSize*(this.cols.length-1)/this.cols.length;return`calc(${this.getWidth(t)}% - ${e}px)`},getTabletStyle({stackedStyle:t,desktopStyle:e}){return this.stackAt==="tablet"?t:e},getMobileStyle({stackedStyle:t,desktopStyle:e}){return this.stackAt==="never"?e:t},columnCssVars(t){t===0||this.gutterSize;const e=this.getColumnCssWidth(t),n=`${this.gutterSize}px`,o="100%",r=0;return{width:e,"margin-left":n,"--column-width-mobile":this.getMobileStyle({stackedStyle:o,desktopStyle:e}),"--column-margin-left-mobile":this.getMobileStyle({stackedStyle:r,desktopStyle:n}),"--column-width-tablet":this.getTabletStyle({stackedStyle:o,desktopStyle:e}),"--column-margin-left-tablet":this.getTabletStyle({stackedStyle:r,desktopStyle:n})}},getWidthForBreakpointSize(t){var n,o;return z(((o=(n=this.builderContext.content)==null?void 0:n.meta)==null?void 0:o.breakpoints)||{})[t].max},_classStringToObject(t){const e={};if(typeof t!="string")return e;const n=t.trim().split(/\s+/);for(const o of n)e[o]=!0;return e}}});var Ce=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("div",{class:e._classStringToObject(`builder-columns ${e.builderBlock.id}-breakpoints div-t9spj7joih`),style:e.columnsCssVars,attrs:{dataSet:{"builder-block-name":"builder-columns"}}},[e.TARGET!=="reactNative"?[n("render-inlined-styles",{attrs:{styles:e.columnsStyles}})]:e._e(),e._l(e.columns,function(o,r){return n("div",{key:r,staticClass:"builder-column div-t9spj7joih-2",style:e.columnCssVars(r),attrs:{dataSet:{"builder-block-name":"builder-column"}}},[n("render-blocks",{attrs:{blocks:o.blocks,path:`component.options.columns.${r}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"}}})],1)})],2)},we=[],Ie=m(Se,Ce,we,!1,null,"1a6287e9",null,null);const K=Ie.exports,Re=h.defineComponent({name:"builder-fragment-component",props:[]});var Te=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("span",[e._t("default")],2)},$e=[],Ee=m(Re,Te,$e,!1,null,null,null,null);const D=Ee.exports;function F(t){return t.replace(/http(s)?:/,"")}function Pe(t="",e,n){const o=new RegExp("([?&])"+e+"=.*?(&|$)","i"),r=t.indexOf("?")!==-1?"&":"?";return t.match(o)?t.replace(o,"$1"+e+"="+encodeURIComponent(n)+"$2"):t+r+e+"="+encodeURIComponent(n)}function Ae(t,e){if(!t||!(t!=null&&t.match(/cdn\.shopify\.com/))||!e)return t;if(e==="master")return F(t);const n=t.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const o=t.split(n[0]),r=n[3],s=e.match("x")?e:`${e}x`;return F(`${o[0]}_${s}${r}`)}return null}function w(t){if(!t)return t;const e=[100,200,400,800,1200,1600,2e3];if(t.match(/builder\.io/)){let n=t;const o=Number(t.split("?width=")[1]);return isNaN(o)||(n=`${n} ${o}w`),e.filter(r=>r!==o).map(r=>`${Pe(t,"width",r)} ${r}w`).concat([n]).join(", ")}return t.match(/cdn\.shopify\.com/)?e.map(n=>[Ae(t,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,o])=>`${n} ${o}w`).concat([t]).join(", "):t}const Fe=h.defineComponent({name:"builder-image",props:["image","src","srcset","noWebp","aspectRatio","altText","backgroundPosition","backgroundSize","className","sizes","builderBlock","fitContent"],computed:{srcSetToUse(){var n;const e=this.image||this.src;if(!e||!(e.match(/builder\.io/)||e.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"),w(e)}else if(this.image&&!this.srcset)return w(e);return w(e)},webpSrcSet(){var t;return((t=this.srcSetToUse)==null?void 0:t.match(/builder\.io/))&&!this.noWebp?this.srcSetToUse.replace(/\?/g,"?format=webp&"):""},aspectRatioCss(){const t={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return this.aspectRatio?t:void 0}},methods:{_classStringToObject(t){const e={};if(typeof t!="string")return e;const n=t.trim().split(/\s+/);for(const o of n)e[o]=!0;return e}}});var je=function(){var o,r,s,i;var e=this,n=e._self._c;return e._self._setupProxy,n("div",[n("picture",[e.webpSrcSet?[n("source",{attrs:{type:"image/webp",srcset:e.webpSrcSet}})]:e._e(),n("img",{class:e._classStringToObject("builder-image"+(e.className?" "+e.className:"")+" img-1pl23ac79ld"),style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...e.aspectRatioCss},attrs:{loading:"lazy",alt:e.altText,role:e.altText?"presentation":void 0,src:e.image,srcset:e.srcSetToUse,sizes:e.sizes}})],2),e.aspectRatio&&!(((r=(o=e.builderBlock)==null?void 0:o.children)==null?void 0:r.length)&&e.fitContent)?[n("div",{staticClass:"builder-image-sizer div-1pl23ac79ld",style:{paddingTop:e.aspectRatio*100+"%"}})]:e._e(),((i=(s=e.builderBlock)==null?void 0:s.children)==null?void 0:i.length)&&e.fitContent?[e._t("default")]:e._e(),!e.fitContent&&e.children?[n("div",{staticClass:"div-1pl23ac79ld-2"},[e._t("default")],2)]:e._e()],2)},Oe=[],Ve=m(Fe,je,Oe,!1,null,"0d553173",null,null);const H=Ve.exports;function p(){return typeof window<"u"&&typeof document<"u"}function Be(){return p()&&window.self!==window.top}function b(){return Be()&&window.location.search.indexOf("builder.frameEditing=")!==-1}const Ue=()=>Promise.resolve().then(()=>require("./block-styles.cb3c2dd0.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",t),t}),We=()=>Promise.resolve().then(()=>require("./render-block.753d2325.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",t),t}),Me=h.defineComponent({name:"render-blocks",components:{RenderBlock:We,BlockStyles:Ue},props:["blocks","parent","path","styleProp"],inject:{builderContext:k.key},computed:{className(){var t;return"builder-blocks"+((t=this.blocks)!=null&&t.length?"":" no-blocks")}},methods:{onClick(){var t,e;b()&&!((t=this.blocks)!=null&&t.length)&&((e=window.parent)==null||e.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:this.parent,dataPath:this.path}},"*"))},onMouseEnter(){var t,e;b()&&!((t=this.blocks)!=null&&t.length)&&((e=window.parent)==null||e.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:this.parent,dataPath:this.path}},"*"))},_classStringToObject(t){const e={};if(typeof t!="string")return e;const n=t.trim().split(/\s+/);for(const o of n)e[o]=!0;return e}}});var Ne=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("div",{class:e._classStringToObject(e.className+" div-21azgz5avex"),style:e.styleProp,attrs:{"builder-path":e.path,"builder-parent-id":e.parent,dataSet:{class:e.className}},on:{click:function(o){return e.onClick()},mouseenter:function(o){return e.onMouseEnter()}}},[e.blocks?e._l(e.blocks,function(o,r){return n("render-block",{key:"render-block-"+o.id,attrs:{block:o,context:e.builderContext}})}):e._e(),e.blocks?e._l(e.blocks,function(o,r){return n("block-styles",{key:"block-style-"+o.id,attrs:{block:o,context:e.builderContext}})}):e._e()],2)},Le=[],ze=m(Me,Ne,Le,!1,null,"e4c3b2b6",null,null);const q=ze.exports,G=Object.freeze(Object.defineProperty({__proto__:null,default:q},Symbol.toStringTag,{value:"Module"})),Ke={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=t=>{const e=t.toString().trim();return`return (${!e.startsWith("function")&&!e.startsWith("(")?"function ":""}${e}).apply(this, arguments)`},De={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:C(t=>{function e(){n.forEach(o=>{o.delete("width")})}const n=t.get("columns");Array.isArray(n)&&!!n.find(r=>r.get("width"))&&(!!n.find(s=>!s.get("width"))||n.reduce((l,a)=>l+a.get("width"),0)!==100)&&e()})},{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}]},He={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},qe={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:C(t=>{t.delete("srcset"),t.delete("noWebp");function n(i,l=6e4){return new Promise((a,c)=>{const d=document.createElement("img");let f=!1;d.onload=()=>{f=!0,a(d)},d.addEventListener("error",u=>{console.warn("Image load failed",u.error),c(u.error)}),d.src=i,setTimeout(()=>{f||c(new Error("Image load timed out"))},l)})}function o(i){return Math.round(i*1e3)/1e3}const r=t.get("image"),s=t.get("aspectRatio");if(fetch(r).then(i=>i.blob()).then(i=>{i.type.includes("svg")&&t.set("noWebp",!0)}),r&&(!s||s===.7041))return n(r).then(i=>{const l=t.get("aspectRatio");t.get("image")===r&&(!l||l===.7041)&&i.width&&i.height&&(t.set("aspectRatio",o(i.height/i.width)),t.set("height",i.height),t.set("width",i.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}]},Ge={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>"}}}]},Je=h.defineComponent({name:"builder-section-component",props:["maxWidth","attributes"],methods:{filterAttrs:function(e={},n){const o="v-on:";return Object.keys(e).filter(r=>{if(!e[r])return!1;const s=r.startsWith(o);return n?s:!s}).reduce((r,s)=>({...r,[s.replace(o,"")]:e[s]}),{})}}});var Xe=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("section",e._g(e._b({style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:e.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"}},"section",e.filterAttrs(e.attributes,!1),!1),e.filterAttrs(e.attributes,!0)),[e._t("default")],2)},Ye=[],Qe=m(Je,Xe,Ye,!1,null,null,null,null);const J=Qe.exports,Ze={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"}]},I="[Builder.io]: ",v={log:(...t)=>console.log(I,...t),error:(...t)=>console.error(I,...t),warn:(...t)=>console.warn(I,...t)};function et(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:globalThis}function tt(){const t=et().fetch;if(typeof t>"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 t}const X=tt(),y=t=>t!=null,nt=t=>{if(t==="localhost"||t==="127.0.0.1")return t;const e=t.split(".");return e.length>2?e.slice(1).join("."):t},Y=async({name:t,canTrack:e})=>{var n;try{return e?(n=document.cookie.split("; ").find(o=>o.startsWith(`${t}=`)))==null?void 0:n.split("=")[1]:void 0}catch(o){console.debug("[COOKIE] GET error: ",o);return}},ot=t=>t.map(([e,n])=>n?`${e}=${n}`:e).filter(y).join("; "),rt=[["secure",""],["SameSite","None"]],st=({name:t,value:e,expires:n})=>{const r=(p()?location.protocol==="https:":!0)?rt:[[]],s=n?[["expires",n.toUTCString()]]:[[]],i=[[t,e],...s,["path","/"],["domain",nt(window.location.hostname)],...r];return ot(i)},Q=async({name:t,value:e,expires:n,canTrack:o})=>{try{if(!o)return;const r=st({name:t,value:e,expires:n});document.cookie=r}catch(r){console.warn("[COOKIE] SET error: ",r)}},it="builderio.variations",Z=t=>`${it}.${t}`,at=({contentId:t,canTrack:e})=>Y({name:Z(t),canTrack:e}),lt=({contentId:t,canTrack:e,value:n})=>Q({name:Z(t),value:n,canTrack:e}),ct=t=>y(t.id)&&y(t.variations)&&Object.keys(t.variations).length>0,dt=({id:t,variations:e})=>{var r;let n=0;const o=Math.random();for(const s in e){const i=(r=e[s])==null?void 0:r.testRatio;if(n+=i,o<n)return s}return t},j=({item:t,testGroupId:e})=>{const n=t.variations[e];return e===t.id||!n?{testVariationId:t.id,testVariationName:"Default"}:{data:n.data,testVariationId:n.id,testVariationName:n.name||(n.id===t.id?"Default":"")}},ut=async({item:t,canTrack:e})=>{const n=await at({canTrack:e,contentId:t.id}),o=n?j({item:t,testGroupId:n}):void 0;if(o)return o;{const r=dt({variations:t.variations,id:t.id});return lt({contentId:t.id,value:r,canTrack:e}).catch(s=>{console.error("could not store A/B test variation: ",s)}),j({item:t,testGroupId:r})}},pt=async({item:t,canTrack:e})=>{if(!ct(t))return;const n=await ut({item:t,canTrack:e});Object.assign(t,n)};function R(t,e=null,n="."){return Object.keys(t).reduce((o,r)=>{const s=t[r],i=[e,r].filter(Boolean).join(n);return[typeof s=="object",s!==null,!(Array.isArray(s)&&s.length===0)].every(Boolean)?{...o,...R(s,i,n)}:{...o,[i]:s}},{})}const O="builder.",mt="options.",ee=t=>{const e={};return t.forEach((n,o)=>{e[o]=n}),e},te=t=>{if(!t)return{};const e=E(t),n={};return Object.keys(e).forEach(o=>{if(o.startsWith(O)){const r=o.replace(O,"").replace(mt,"");n[r]=e[o]}}),n},ne=()=>{if(!p())return{};const t=new URLSearchParams(window.location.search);return te(t)},E=t=>t instanceof URLSearchParams?ee(t):t,ft="v3",ht=t=>{const{limit:e=30,userAttributes:n,query:o,noTraverse:r=!1,model:s,apiKey:i,includeRefs:l=!0,locale:a,apiVersion:c=ft}=t;if(!i)throw new Error("Missing API key");if(!["v2","v3"].includes(c))throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${c}'`);const d=new URL(`https://cdn.builder.io/api/${c}/content/${s}?apiKey=${i}&limit=${e}&noTraverse=${r}&includeRefs=${l}${a?`&locale=${a}`:""}`),f={...ne(),...E(t.options||{})},u=R(f);for(const g in u)d.searchParams.set(g,String(u[g]));if(n&&d.searchParams.set("userAttributes",JSON.stringify(n)),o){const g=R({query:o});for(const x in g)d.searchParams.set(x,JSON.stringify(g[x]))}return d};async function P(t){const e=await oe({...t,limit:1});return e&&"results"in e&&(e==null?void 0:e.results[0])||null}async function oe(t){try{const e=ht(t),o=await(await X(e.href)).json();if("status"in o&&!("results"in o))return v.error("Error fetching data. ",{url:e,content:o,options:t}),o;const r=t.canTrack!==!1;try{if(r&&Array.isArray(o.results))for(const s of o.results)await pt({item:s,canTrack:r})}catch(s){v.error("Could not setup A/B testing. ",s)}return o}catch(e){return v.error("Error fetching data. ",e),null}}const gt=()=>Promise.resolve().then(()=>En).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderContent at ../../components/render-content/render-content.vue",t),t}),bt=h.defineComponent({name:"builder-symbol",components:{RenderContent:gt},props:["attributes","symbol","dynamic"],data(){var t,e,n;return{className:[...Object.keys(this.attributes.class),"builder-symbol",(t=this.symbol)!=null&&t.inline?"builder-inline-symbol":void 0,((e=this.symbol)==null?void 0:e.dynamic)||this.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" "),contentToUse:(n=this.symbol)==null?void 0:n.content}},inject:{builderContext:k.key},mounted(){this.fetchContent()},watch:{onUpdateHook0:{handler(){this.fetchContent()},immediate:!0}},computed:{onUpdateHook0(){return{0:this.symbol}}},methods:{fetchContent(){var t,e;!this.contentToUse&&((t=this.symbol)==null?void 0:t.model)&&((e=this.builderContext)==null?void 0:e.apiKey)&&P({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=>{v.error("Could not fetch symbol content: ",n)})},filterAttrs:function(e={},n){const o="v-on:";return Object.keys(e).filter(r=>{if(!e[r])return!1;const s=r.startsWith(o);return n?s:!s}).reduce((r,s)=>({...r,[s.replace(o,"")]:e[s]}),{})},_classStringToObject(t){const e={};if(typeof t!="string")return e;const n=t.trim().split(/\s+/);for(const o of n)e[o]=!0;return e}}});var yt=function(){var o,r,s,i;var e=this,n=e._self._c;return e._self._setupProxy,n("div",e._g(e._b({class:e._classStringToObject(e.className),attrs:{dataSet:{class:e.className}}},"div",e.filterAttrs(e.attributes,!1),!1),e.filterAttrs(e.attributes,!0)),[n("render-content",{attrs:{apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:e.builderContext.context,customComponents:Object.values(e.builderContext.registeredComponents),data:{...(o=e.symbol)==null?void 0:o.data,...e.builderContext.state,...(s=(r=e.contentToUse)==null?void 0:r.data)==null?void 0:s.state},model:(i=e.symbol)==null?void 0:i.model,content:e.contentToUse}})],1)},vt=[],_t=m(bt,yt,vt,!1,null,null,null,null);const re=_t.exports,xt={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"}},kt=h.defineComponent({name:"builder-text",props:["text"]});var St=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("span",{staticClass:"builder-text",style:{outline:"none"},domProps:{innerHTML:e._s(e.text)}})},Ct=[],wt=m(kt,St,Ct,!1,null,null,null,null);const se=wt.exports,It={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}]},Rt=h.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}}}});var Tt=function(){var o;var e=this,n=e._self._c;return e._self._setupProxy,n("video",e._b({style:{width:"100%",height:"100%",...(o=e.attributes)==null?void 0:o.style,objectFit:e.fit,objectPosition:e.position,borderRadius:1},attrs:{src:e.video||"no-src",poster:e.posterImage}},"video",e.spreadProps,!1))},$t=[],Et=m(Rt,Tt,$t,!1,null,null,null,null);const ie=Et.exports,Pt={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:C(t=>{const e=t.get("url");if(e)return t.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${e}&api_key=ae0e60e78201a3f2b0de4b`).then(o=>o.json()).then(o=>{t.get("url")===e&&(o.html?t.set("content",o.html):t.set("content","Invalid url, please try another"))}).catch(o=>{t.set("content","There was an error embedding this URL, please try again or another URL")});t.delete("content")})},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},At=["text/javascript","application/javascript","application/ecmascript"],Ft=t=>At.includes(t.type),jt=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 t=this.$refs.elem.getElementsByTagName("script");for(let e=0;e<t.length;e++){const n=t[e];if(n.src&&!this.scriptsInserted.includes(n.src)){this.scriptsInserted.push(n.src);const o=document.createElement("script");o.async=!0,o.src=n.src,document.head.appendChild(o)}else if(Ft(n)&&!this.scriptsRun.includes(n.innerText))try{this.scriptsRun.push(n.innerText),new Function(n.innerText)()}catch(o){console.warn("`Embed`: Error running script:",o)}}}}});var Ot=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("div",{ref:"elem",staticClass:"builder-embed",domProps:{innerHTML:e._s(e.content)}})},Vt=[],Bt=m(jt,Ot,Vt,!1,null,null,null,null);const Ut=Bt.exports,Wt=h.defineComponent({name:"builder-img-component",props:["backgroundSize","backgroundPosition","imgSrc","altText","image","attributes"],data(){return{isEditing:b}},methods:{filterAttrs:function(e={},n){const o="v-on:";return Object.keys(e).filter(r=>{if(!e[r])return!1;const s=r.startsWith(o);return n?s:!s}).reduce((r,s)=>({...r,[s.replace(o,"")]:e[s]}),{})}}});var Mt=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("img",e._g(e._b({key:e.isEditing()&&e.imgSrc||"default-key",style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},attrs:{alt:e.altText,src:e.imgSrc||e.image}},"img",e.filterAttrs(e.attributes,!1),!1),e.filterAttrs(e.attributes,!0)))},Nt=[],Lt=m(Wt,Mt,Nt,!1,null,null,null,null);const zt=Lt.exports,Kt={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},Dt=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 t=this.$refs.elem.getElementsByTagName("script");for(let e=0;e<t.length;e++){const n=t[e];if(n.src){if(this.scriptsInserted.includes(n.src))continue;this.scriptsInserted.push(n.src);const o=document.createElement("script");o.async=!0,o.src=n.src,document.head.appendChild(o)}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(o){console.warn("`CustomCode`: Error running script:",o)}}}}},_classStringToObject(t){const e={};if(typeof t!="string")return e;const n=t.trim().split(/\s+/);for(const o of n)e[o]=!0;return e}}});var Ht=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("div",{ref:"elem",class:e._classStringToObject("builder-custom-code"+(e.replaceNodes?" replace-nodes":"")),domProps:{innerHTML:e._s(e.code)}})},qt=[],Gt=m(Dt,Ht,qt,!1,null,null,null,null);const Jt=Gt.exports,Xt={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}]},Yt=()=>[{component:N,...Ke},{component:K,...De},{component:Jt,...Xt},{component:Ut,...Pt},{component:D,...He},{component:H,...qe},{component:zt,...Kt},{component:J,...Ge},{component:re,...Ze},{component:se,...xt},{component:ie,...It}];function T({code:t,context:e,state:n,event:o,isExpression:r=!0}){if(t===""){console.warn("Skipping evaluation of empty code block.");return}const s={isEditing:b(),isBrowser:p(),isServer:!p()},l=r&&!(t.includes(";")||t.includes(" return ")||t.trim().startsWith("return "))?`return (${t});`:t;try{return new Function("builder","Builder","state","context","event",l)(s,s,n,e,o)}catch(a){console.warn(`Builder custom code error:
|
|
27
|
-
While Evaluating:
|
|
28
|
-
`,l,`
|
|
29
|
-
`,a)}}function ae(){return!p()||b()?!1:Boolean(location.search.indexOf("builder.preview=")!==-1)}const A=[];function Qt(t,e){return A.push({component:t,...e}),console.warn("registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK."),t}const le=({component:t,...e})=>({type:"builder.registerComponent",data:en(e)}),Zt=t=>typeof t=="function"?C(t):S(t),en=({inputs:t,...e})=>({...S(e),inputs:t==null?void 0:t.map(n=>Object.entries(n).reduce((o,[r,s])=>({...o,[r]:Zt(s)}),{}))});function tn(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t=="x"?e:e&3|8).toString(16)})}function ce(){return tn().replace(/-/g,"")}const de="builderSessionId",nn=async({canTrack:t})=>{if(!t)return;const e=await Y({name:de,canTrack:t});if(y(e))return e;{const n=on();return rn({id:n,canTrack:t}),n}},on=()=>ce(),rn=({id:t,canTrack:e})=>Q({name:de,value:t,canTrack:e}),ue=()=>p()&&typeof localStorage<"u"?localStorage:void 0,sn=({key:t,canTrack:e})=>{var n;try{return e?(n=ue())==null?void 0:n.getItem(t):void 0}catch(o){console.debug("[LocalStorage] GET error: ",o);return}},an=({key:t,canTrack:e,value:n})=>{var o;try{e&&((o=ue())==null||o.setItem(t,n))}catch(r){console.debug("[LocalStorage] SET error: ",r)}},pe="builderVisitorId",ln=({canTrack:t})=>{if(!t)return;const e=sn({key:pe,canTrack:t});if(y(e))return e;{const n=cn();return dn({id:n,canTrack:t}),n}},cn=()=>ce(),dn=({id:t,canTrack:e})=>an({key:pe,value:t,canTrack:e}),un=()=>{if(p()){const t=new URL(location.href);return t.pathname===""&&(t.pathname="/"),t}else return console.warn("Cannot get location for tracking in non-browser environment"),null},pn=()=>typeof navigator=="object"&&navigator.userAgent||"",mn=()=>{const t=pn(),e={Android(){return t.match(/Android/i)},BlackBerry(){return t.match(/BlackBerry/i)},iOS(){return t.match(/iPhone|iPod/i)},Opera(){return t.match(/Opera Mini/i)},Windows(){return t.match(/IEMobile/i)||t.match(/WPDesktop/i)},any(){return e.Android()||e.BlackBerry()||e.iOS()||e.Opera()||e.Windows()||_==="reactNative"}},n=t.match(/Tablet|iPad/i),o=un();return{urlPath:o==null?void 0:o.pathname,host:(o==null?void 0:o.host)||(o==null?void 0:o.hostname),device:n?"tablet":e.any()?"mobile":"desktop"}},fn=async({canTrack:t})=>{if(!t)return{visitorId:void 0,sessionId:void 0};const e=await nn({canTrack:t}),n=ln({canTrack:t});return{sessionId:e,visitorId:n}},hn=async({type:t,canTrack:e,apiKey:n,metadata:o,...r})=>({type:t,data:{...r,metadata:{url:location.href,...o},...await fn({canTrack:e}),userAttributes:mn(),ownerId:n}});async function $(t){if(!t.apiKey){v.error("Missing API key for track call. Please provide your API key.");return}if(!!t.canTrack&&!b()&&!!(p()||_==="reactNative"))return fetch("https://builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await hn(t)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(e=>{console.error("Failed to track: ",e)})}const gn=t=>$({...t,canTrack:!0}),V={};function me(t,e){let n=V[t];if(n||(n=V[t]=[]),n.push(e),p()){const o={type:"builder.register",data:{type:t,info:e}};try{parent.postMessage(o,"*"),parent!==window&&window.postMessage(o,"*")}catch(r){console.debug("Could not postmessage",r)}}}const bn=()=>{me("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 yn=(t={})=>{var e,n;B||(B=!0,p()&&((e=window.parent)==null||e.postMessage({type:"builder.sdkInfo",data:{target:_,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(n=window.parent)==null||n.postMessage({type:"builder.updateContent",data:{options:t}},"*"),window.addEventListener("message",({data:o})=>{var r,s;if(!!(o!=null&&o.type))switch(o.type){case"builder.evaluate":{const i=o.data.text,l=o.data.arguments||[],a=o.data.id,c=new Function(i);let d,f=null;try{d=c.apply(null,l)}catch(u){f=u}f?(r=window.parent)==null||r.postMessage({type:"builder.evaluateError",data:{id:a,error:f.message}},"*"):d&&typeof d.then=="function"?d.then(u=>{var g;(g=window.parent)==null||g.postMessage({type:"builder.evaluateResult",data:{id:a,result:u}},"*")}).catch(console.error):(s=window.parent)==null||s.postMessage({type:"builder.evaluateResult",data:{result:d,id:a}},"*");break}}})))};function U(t){return Math.round(t*1e3)/1e3}const vn=(t,e,n=!0)=>{if(!(t instanceof HTMLElement))return null;let o=n?t:t.parentElement;do{if(!o)return null;if(e(o))return o}while(o=o.parentElement);return null},_n=t=>vn(t,e=>{const n=e.getAttribute("builder-id")||e.id;return Boolean((n==null?void 0:n.indexOf("builder-"))===0)}),W=({event:t,target:e})=>{const n=e.getBoundingClientRect(),o=t.clientX-n.left,r=t.clientY-n.top,s=U(o/n.width),i=U(r/n.height);return{x:s,y:i}},xn=t=>{const e=t.target,n=e&&_n(e),o=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:o||void 0,metadata:{targetOffset:e?W({event:t,target:e}):void 0,builderTargetOffset:n?W({event:t,target:n}):void 0,builderElementIndex:n&&o?[].slice.call(document.getElementsByClassName(o)).indexOf(n):void 0}}},kn=({content:t,data:e,locale:n})=>{var s,i,l;const o={};(i=(s=t==null?void 0:t.data)==null?void 0:s.inputs)==null||i.forEach(a=>{var c;a.name&&a.defaultValue!==void 0&&((c=t==null?void 0:t.data)==null?void 0:c.state)&&t.data.state[a.name]===void 0&&(o[a.name]=a.defaultValue)});const r={...(l=t==null?void 0:t.data)==null?void 0:l.state,...e,...n?{locale:n}:{}};return{...o,...r}},Sn=({content:t,data:e})=>t?{...t,data:{...t==null?void 0:t.data,...e},meta:t==null?void 0:t.meta}:void 0,Cn=()=>Promise.resolve().then(()=>G).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",t),t}),wn=()=>Promise.resolve().then(()=>require("./render-styles.15b8cdf0.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderContentStyles at ./components/render-styles.vue",t),t}),In=h.defineComponent({name:"render-content",components:{RenderContentStyles:wn,RenderBlocks:Cn},props:["content","data","canTrack","locale","customComponents","model","context","apiKey","includeRefs","apiVersion"],data(){return{forceReRenderCount:0,overrideContent:null,useContent:Sn({content:this.content,data:this.data}),update:0,canTrackToUse:y(this.canTrack)?this.canTrack:!0,contentState:kn({content:this.content,data:this.data,locale:this.locale}),allRegisteredComponents:[...Yt(),...A,...this.customComponents||[]].reduce((t,e)=>({...t,[e.name]:e}),{}),httpReqsData:{},clicked:!1,TARGET:_}},provide(){const t=this;return{[k.key]:{content:t.useContent,state:t.contentState,setState:t.setContextState,context:t.context||{},apiKey:t.apiKey,apiVersion:t.apiVersion,registeredComponents:t.allRegisteredComponents,inheritedStyles:{}}}},mounted(){var t,e;if(this.apiKey||v.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),p()){if(b()&&(this.forceReRenderCount=this.forceReRenderCount+1,bn(),yn({...this.locale?{locale:this.locale}:{},...this.includeRefs?{includeRefs:this.includeRefs}:{}}),Object.values(this.allRegisteredComponents).forEach(n=>{var r;const o=le(n);(r=window.parent)==null||r.postMessage(o,"*")}),window.addEventListener("message",this.processMessage),window.addEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate)),this.useContent){const n=(t=this.useContent)==null?void 0:t.testVariationId,o=(e=this.useContent)==null?void 0:e.id;$({type:"impression",canTrack:this.canTrackToUse,contentId:o,apiKey:this.apiKey,variationId:n!==o?n:void 0})}if(ae()){const n=new URL(location.href).searchParams,o=n.get("builder.preview"),r=n.get(`builder.preview.${o}`),s=n.get("apiKey")||n.get("builder.space");o===this.model&&s===this.apiKey&&(!this.content||r===this.content.id)&&P({model:this.model,apiKey:this.apiKey,apiVersion:this.apiVersion}).then(i=>{i&&this.mergeNewContent(i)})}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(){p()&&(window.removeEventListener("message",this.processMessage),window.removeEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate))},computed:{onUpdateHook0(){return{0:this.content}},onUpdateHook1(){var t,e;return{0:(e=(t=this.useContent)==null?void 0:t.data)==null?void 0:e.jsCode,1:this.contentState}},onUpdateHook2(){var t,e;return{0:(e=(t=this.useContent)==null?void 0:t.data)==null?void 0:e.httpRequests}},onUpdateHook3(){return{0:this.contentState}}},methods:{mergeNewContent(t){var e,n,o,r,s;this.useContent={...this.useContent,...t,data:{...(e=this.useContent)==null?void 0:e.data,...t==null?void 0:t.data},meta:{...(n=this.useContent)==null?void 0:n.meta,...t==null?void 0:t.meta,breakpoints:((o=t==null?void 0:t.meta)==null?void 0:o.breakpoints)||((s=(r=this.useContent)==null?void 0:r.meta)==null?void 0:s.breakpoints)}}},setBreakpoints(t){var e;this.useContent={...this.useContent,meta:{...(e=this.useContent)==null?void 0:e.meta,breakpoints:t}}},setContextState(t){this.contentState=t},processMessage(t){var n;const{data:e}=t;if(e)switch(e.type){case"builder.configureSdk":{const o=e.data,{breakpoints:r,contentId:s}=o;if(!s||s!==((n=this.useContent)==null?void 0:n.id))return;r&&this.setBreakpoints(r),this.forceReRenderCount=this.forceReRenderCount+1;break}case"builder.contentUpdate":{const o=e.data,r=o.key||o.alias||o.entry||o.modelName,s=o.data;r===this.model&&(this.mergeNewContent(s),this.forceReRenderCount=this.forceReRenderCount+1);break}}},evaluateJsCode(){var e,n;const t=(n=(e=this.useContent)==null?void 0:e.data)==null?void 0:n.jsCode;t&&T({code:t,context:this.context||{},state:this.contentState})},onClick(t){var e,n;if(this.useContent){const o=(e=this.useContent)==null?void 0:e.testVariationId,r=(n=this.useContent)==null?void 0:n.id;$({type:"click",canTrack:this.canTrackToUse,contentId:r,apiKey:this.apiKey,variationId:o!==r?o:void 0,...xn(t),unique:!this.clicked})}this.clicked||(this.clicked=!0)},evalExpression(t){return t.replace(/{{([^}]+)}}/g,(e,n)=>T({code:n,context:this.context||{},state:this.contentState}))},handleRequest({url:t,key:e}){X(t).then(n=>n.json()).then(n=>{const o={...this.contentState,[e]:n};this.setContextState(o)}).catch(n=>{console.error("error fetching dynamic data",t,n)})},runHttpRequests(){var e,n,o;const t=(o=(n=(e=this.useContent)==null?void 0:e.data)==null?void 0:n.httpRequests)!=null?o:{};Object.entries(t).forEach(([r,s])=>{if(s&&(!this.httpReqsData[r]||b())){const i=this.evalExpression(s);this.handleRequest({url:i,key:r})}})},emitStateUpdate(){b()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:this.contentState,ref:{name:this.model}}}))}}});var Rn=function(){var o,r,s,i,l,a,c,d;var e=this,n=e._self._c;return e._self._setupProxy,e.useContent?n("div",{ref:"elementRef",attrs:{"builder-content-id":(o=e.useContent)==null?void 0:o.id,"builder-model":e.model},on:{click:function(f){return e.onClick(f)}}},[e.TARGET!=="reactNative"?[n("render-content-styles",{attrs:{contentId:(r=e.useContent)==null?void 0:r.id,cssCode:(i=(s=e.useContent)==null?void 0:s.data)==null?void 0:i.cssCode,customFonts:(a=(l=e.useContent)==null?void 0:l.data)==null?void 0:a.customFonts}})]:e._e(),n("render-blocks",{key:e.forceReRenderCount,attrs:{blocks:(d=(c=e.useContent)==null?void 0:c.data)==null?void 0:d.blocks}})],2):e._e()},Tn=[],$n=m(In,Rn,Tn,!1,null,null,null,null);const fe=$n.exports,En=Object.freeze(Object.defineProperty({__proto__:null,default:fe},Symbol.toStringTag,{value:"Module"})),M={};function Pn(t){if(p()){Object.assign(M,t);const e={type:"builder.settingsChange",data:M};parent.postMessage(e,"*")}}exports.BuilderContext=k;exports.Button=N;exports.Columns=K;exports.Fragment=D;exports.Image=H;exports.Section=J;exports.Symbol=re;exports.TARGET=_;exports.Text=se;exports.Video=ie;exports.checkIsDefined=y;exports.components=A;exports.convertSearchParamsToQueryObject=ee;exports.createRegisterComponentMessage=le;exports.evaluate=T;exports.fastClone=S;exports.getAllContent=oe;exports.getBuilderSearchParams=te;exports.getBuilderSearchParamsFromWindow=ne;exports.getContent=P;exports.getMaxWidthQueryForSize=ve;exports.getSizesForBreakpoints=z;exports.isEditing=b;exports.isPreviewing=ae;exports.normalizeComponent=m;exports.normalizeSearchParams=E;exports.register=me;exports.registerComponent=Qt;exports.renderBlocks=q;exports.renderContent=fe;exports.setEditorSettings=Pn;exports.track=gn;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("vue"),c=require("./index.8547cce2.cjs"),i=require("./css.2efa95fa.cjs"),d=t=>`v-on:${t.toLowerCase()}`,m=(t,e)=>n=>c.evaluate({code:t,context:e.context,state:e.state,event:n,isExpression:!1});function h(t){var r;const e={},n=(r=t.block.actions)!=null?r:{};for(const o in n){if(!n.hasOwnProperty(o))continue;const s=n[o];e[d(o)]=m(s,t)}return e}function f(t){var e;return{...(e=t.component)==null?void 0:e.options,...t.options,builderBlock:t}}function k(t){const e={};if(typeof t!="string")return e;const n=t.trim().split(/\\s+/);for(const r of n)e[r]=!0;return e}function y(t){return t.class=k(t.class),t}const b=t=>({href:t.href});function x(t){var n;const e={...b(t),...t.properties,"builder-id":t.id,style:g(t.style),class:[t.id,"builder-block",t.class,(n=t.properties)==null?void 0:n.class].filter(Boolean).join(" ")};return y(e)}function g(t){if(!!t)switch(c.TARGET){case"svelte":case"vue2":case"vue3":case"solid":return i.convertStyleMapToCSSArray(t).join(" ");case"qwik":case"reactNative":case"react":return t}}const v=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],B=t=>typeof t=="string"&&v.includes(t.toLowerCase()),C=({block:t,context:e})=>{var o;const n=(o=i.getProcessedBlock({block:t,state:e.state,context:e.context,shouldEvaluateBindings:!1}).component)==null?void 0:o.name;if(!n)return null;const r=e.registeredComponents[n];if(r)return r;console.warn(`
|
|
2
|
-
Could not find a registered component named "${n}".
|
|
3
|
-
If you registered it, is the file that registered it imported by the file that needs to render it?`)},_=({block:t,context:e})=>{const{repeat:n,...r}=t;if(!(n!=null&&n.collection))return;const o=c.evaluate({code:n.collection,state:e.state,context:e.context});if(!Array.isArray(o))return;const s=n.collection.split(".").pop(),a=n.itemName||(s?s+"Item":"item");return o.map((l,u)=>({context:{...e,state:{...e.state,$index:u,$item:l,[a]:l,[`$${a}Index`]:u}},block:r}))},S=t=>typeof Proxy>"u"?(console.error("no Proxy available in this environment, cannot proxy state."),t.state):new Proxy(t.state,{set:(n,r,o)=>{var s;return n[r]=o,(s=t.setState)==null||s.call(t,n),!0}}),P=()=>Promise.resolve().then(()=>require("./block-styles.cb3c2dd0.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./block-styles.vue",t),t}),w=()=>Promise.resolve().then(()=>require("./render-repeated-block.f522a309.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderRepeatedBlock at ./render-repeated-block.vue",t),t}),E=()=>Promise.resolve().then(()=>require("./render-component.90275cfa.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderComponent at ./render-component.vue",t),t}),R=p.defineComponent({name:"render-block",components:{RenderComponent:E,RenderRepeatedBlock:w,BlockStyles:P},props:["block","context"],data(){return{component:C({block:this.block,context:this.context}),repeatItemData:_({block:this.block,context:this.context}),tag:this.block.tagName||"div",proxyState:S(this.context),isEmptyHtmlElement:B}},computed:{useBlock(){return this.repeatItemData?this.block:i.getProcessedBlock({block:this.block,state:this.context.state,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 h({block:this.useBlock,state:this.proxyState,context:this.context.context})},attributes(){return{...x(this.useBlock)}},childrenWithoutParentComponent(){var e,n;return!((e=this.component)!=null&&e.component)&&!this.repeatItemData?(n=this.useBlock.children)!=null?n:[]:[]},childrenContext(){const t=()=>({});return{apiKey:this.context.apiKey,apiVersion:this.context.apiVersion,state:this.context.state,content:this.context.content,context:this.context.context,setState:this.context.setState,registeredComponents:this.context.registeredComponents,inheritedStyles:t()}},renderComponentProps(){var t,e,n;return{blockChildren:(t=this.useBlock.children)!=null?t:[],componentRef:(e=this.component)==null?void 0:e.component,componentOptions:{...f(this.useBlock),...(n=this.component)!=null&&n.noWrap?{attributes:{...this.attributes,...this.actions}}:{}},context:this.childrenContext}}},methods:{stripVOn:function(e={}){return Object.keys(e).reduce((n,r)=>({...n,[r.replace("v-on:","")]:e[r]}),{})}}});var O=function(){var r;var e=this,n=e._self._c;return e._self._setupProxy,!Boolean(!((r=e.component)!=null&&r.noWrap))&&e.canShowBlock?n("render-component",e._b({},"render-component",e.renderComponentProps,!1)):e.isEmptyHtmlElement(e.tag)&&e.canShowBlock?n(e.tag,e._g(e._b({tag:"component"},"component",e.attributes,!1),e.stripVOn(e.actions))):!e.isEmptyHtmlElement(e.tag)&&e.repeatItemData&&e.canShowBlock?n("div",{staticClass:"vue2-root-element-workaround"},e._l(e.repeatItemData,function(o,s){return n("render-repeated-block",{key:s,attrs:{repeatContext:o.context,block:o.block}})}),1):e.canShowBlock?n(e.tag,e._g(e._b({tag:"component"},"component",e.attributes,!1),e.stripVOn(e.actions)),[n("render-component",e._b({},"render-component",e.renderComponentProps,!1)),e._l(e.childrenWithoutParentComponent,function(o,s){return n("render-block",{key:"render-block-"+o.id,attrs:{block:o,context:e.childrenContext}})}),e._l(e.childrenWithoutParentComponent,function(o,s){return n("block-styles",{key:"block-style-"+o.id,attrs:{block:o,context:e.childrenContext}})})],2):e._e()},j=[],A=c.normalizeComponent(R,O,j,!1,null,null,null,null);const I=A.exports;exports.default=I;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),n=require("./index.8547cce2.cjs"),c=()=>Promise.resolve().then(()=>require("./render-block.753d2325.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlock at ./render-block.vue",e),e}),s=o.defineComponent({name:"render-repeated-block",components:{RenderBlock:c},props:["block","repeatContext"],provide(){const e=this;return{[n.BuilderContext.key]:{content:e.repeatContext.content,state:e.repeatContext.state,setState:e.repeatContext.setState,context:e.repeatContext.context,apiKey:e.repeatContext.apiKey,registeredComponents:e.repeatContext.registeredComponents,inheritedStyles:e.repeatContext.inheritedStyles,apiVersion:e.repeatContext.apiVersion}}}});var a=function(){var t=this,r=t._self._c;return t._self._setupProxy,r("render-block",{attrs:{block:t.block,context:t.repeatContext}})},i=[],l=n.normalizeComponent(s,a,i,!1,null,null,null,null);const p=l.exports;exports.default=p;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),s=require("./index.d72bde22.cjs"),r=require("./css.f83437ab.cjs"),y=()=>Promise.resolve().then(()=>require("./render-inlined-styles.a596482a.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}),k=n.defineComponent({name:"block-styles",components:{RenderInlinedStyles:n.defineAsyncComponent(y)},props:["block","context"],data(){return{TARGET:s.TARGET}},computed:{useBlock(){return r.getProcessedBlock({block:this.block,state:this.context.state,context:this.context.context,shouldEvaluateBindings:!0})},canShowBlock(){return s.checkIsDefined(this.useBlock.hide)?!this.useBlock.hide:s.checkIsDefined(this.useBlock.show)?this.useBlock.show:!0},css(){var d;const e=this.useBlock.responsiveStyles,o=this.context.content,c=s.getSizesForBreakpoints(((d=o==null?void 0:o.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,t=this.useBlock.id;if(!t)return"";const u=l?r.createCssClass({className:t,styles:l}):"",m=i?r.createCssClass({className:t,styles:i,mediaQuery:s.getMaxWidthQueryForSize("medium",c)}):"",h=a?r.createCssClass({className:t,styles:a,mediaQuery:s.getMaxWidthQueryForSize("small",c)}):"";return[u,m,h].join(" ")}}});function p(e,o,c,l,i,a){const t=n.resolveComponent("render-inlined-styles");return e.TARGET!=="reactNative"&&e.css&&e.canShowBlock?(n.openBlock(),n.createBlock(t,{key:0,styles:e.css},null,8,["styles"])):n.createCommentVNode("",!0)}const S=s._export_sfc(k,[["render",p]]);exports.default=S;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { f as a, e as u, c as f } from "./index.0aed90df.js";
|
|
2
|
-
const l = (e, t, r) => {
|
|
3
|
-
if (Object(e) !== e)
|
|
4
|
-
return e;
|
|
5
|
-
const s = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
6
|
-
return s.slice(0, -1).reduce(
|
|
7
|
-
(n, o, c) => Object(n[o]) === n[o] ? n[o] : n[o] = Math.abs(Number(s[c + 1])) >> 0 === +s[c + 1] ? [] : {},
|
|
8
|
-
e
|
|
9
|
-
)[s[s.length - 1]] = r, e;
|
|
10
|
-
};
|
|
11
|
-
const p = ({
|
|
12
|
-
block: e,
|
|
13
|
-
context: t,
|
|
14
|
-
state: r
|
|
15
|
-
}) => {
|
|
16
|
-
if (!e.bindings)
|
|
17
|
-
return e;
|
|
18
|
-
const s = a(e), n = {
|
|
19
|
-
...s,
|
|
20
|
-
properties: { ...s.properties },
|
|
21
|
-
actions: { ...s.actions }
|
|
22
|
-
};
|
|
23
|
-
for (const o in e.bindings) {
|
|
24
|
-
const c = e.bindings[o], i = u({ code: c, state: r, context: t });
|
|
25
|
-
l(n, o, i);
|
|
26
|
-
}
|
|
27
|
-
return n;
|
|
28
|
-
};
|
|
29
|
-
function m({
|
|
30
|
-
block: e,
|
|
31
|
-
context: t,
|
|
32
|
-
shouldEvaluateBindings: r,
|
|
33
|
-
state: s
|
|
34
|
-
}) {
|
|
35
|
-
const n = e;
|
|
36
|
-
return r ? p({ block: n, state: s, context: t }) : n;
|
|
37
|
-
}
|
|
38
|
-
const g = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), d = (e) => Object.entries(e).map(([r, s]) => {
|
|
39
|
-
if (typeof s == "string")
|
|
40
|
-
return `${g(r)}: ${s};`;
|
|
41
|
-
}).filter(f), C = (e) => d(e).join(`
|
|
42
|
-
`), S = ({
|
|
43
|
-
mediaQuery: e,
|
|
44
|
-
className: t,
|
|
45
|
-
styles: r
|
|
46
|
-
}) => {
|
|
47
|
-
const s = `.${t} {
|
|
48
|
-
${C(r)}
|
|
49
|
-
}`;
|
|
50
|
-
return e ? `${e} {
|
|
51
|
-
${s}
|
|
52
|
-
}` : s;
|
|
53
|
-
};
|
|
54
|
-
export {
|
|
55
|
-
d as a,
|
|
56
|
-
S as c,
|
|
57
|
-
m as g
|
|
58
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";const i=require("./index.d72bde22.cjs"),l=(e,t,r)=>{if(Object(e)!==e)return e;const s=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return s.slice(0,-1).reduce((n,o,c)=>Object(n[o])===n[o]?n[o]:n[o]=Math.abs(Number(s[c+1]))>>0===+s[c+1]?[]:{},e)[s[s.length-1]]=r,e};const d=({block:e,context:t,state:r})=>{if(!e.bindings)return e;const s=i.fastClone(e),n={...s,properties:{...s.properties},actions:{...s.actions}};for(const o in e.bindings){const c=e.bindings[o],u=i.evaluate({code:c,state:r,context:t});l(n,o,u)}return n};function f({block:e,context:t,shouldEvaluateBindings:r,state:s}){const n=e;return r?d({block:n,state:s,context:t}):n}const p=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),a=e=>Object.entries(e).map(([r,s])=>{if(typeof s=="string")return`${p(r)}: ${s};`}).filter(i.checkIsDefined),g=e=>a(e).join(`
|
|
2
|
-
`),C=({mediaQuery:e,className:t,styles:r})=>{const s=`.${t} {
|
|
3
|
-
${g(r)}
|
|
4
|
-
}`;return e?`${e} {
|
|
5
|
-
${s}
|
|
6
|
-
}`:s};exports.convertStyleMapToCSSArray=a;exports.createCssClass=C;exports.getProcessedBlock=f;
|