@builder.io/sdk-vue 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/packages/_vue2/dist/{block-styles.982735c2.js → block-styles.1cc420e2.js} +5 -5
- package/packages/_vue2/dist/{block-styles.6a14fec4.cjs → block-styles.2b3d669b.cjs} +1 -1
- package/packages/_vue2/dist/{block-wrapper.701626ff.cjs → block-wrapper.563cc17f.cjs} +1 -1
- package/packages/_vue2/dist/{block-wrapper.fbaeab1b.js → block-wrapper.ea9a7e90.js} +5 -5
- package/packages/_vue2/dist/{block.a18a495f.cjs → block.0f28da5b.cjs} +2 -2
- package/packages/_vue2/dist/{block.e9484073.js → block.7a80ed18.js} +7 -7
- package/packages/_vue2/dist/{blocks-wrapper.4afaccc5.js → blocks-wrapper.9aacce51.js} +1 -1
- package/packages/_vue2/dist/{blocks-wrapper.e0086c60.cjs → blocks-wrapper.c53a5f23.cjs} +1 -1
- package/packages/_vue2/dist/{component-ref.8772e5f7.cjs → component-ref.a631e3d7.cjs} +1 -1
- package/packages/_vue2/dist/{component-ref.ad8ecffe.js → component-ref.af9c1a83.js} +6 -6
- package/packages/_vue2/dist/{content.fb93079e.cjs → content.2c7fa09f.cjs} +1 -1
- package/packages/_vue2/dist/{content.697b2fbd.js → content.cb96a18a.js} +66 -58
- package/packages/_vue2/dist/{css.1aff1efe.js → css.22755cda.js} +1 -1
- package/packages/_vue2/dist/{css.daac46ac.cjs → css.30299cfb.cjs} +1 -1
- package/packages/_vue2/dist/{enable-editor.8d1c24b0.js → enable-editor.852e9797.js} +9 -10
- package/packages/_vue2/dist/enable-editor.c1b99af3.cjs +1 -0
- package/packages/_vue2/dist/{evaluate.d1bef2c5.cjs → evaluate.80a7f105.cjs} +1 -1
- package/packages/_vue2/dist/{evaluate.b0496c3f.js → evaluate.ce05cec9.js} +1 -1
- package/packages/_vue2/dist/{get-block-actions.88b6dbbf.cjs → get-block-actions.93f4e72e.cjs} +1 -1
- package/packages/_vue2/dist/{get-block-actions.a39f0f6b.js → get-block-actions.c73f00d1.js} +2 -2
- package/packages/_vue2/dist/{get-block-properties.316bbdf9.js → get-block-properties.15a37ec1.js} +2 -2
- package/packages/_vue2/dist/{get-block-properties.3ab4b67f.cjs → get-block-properties.d0235e56.cjs} +1 -1
- package/packages/_vue2/dist/{get-processed-block.2c6787e1.js → get-processed-block.d59ca820.js} +2 -2
- package/packages/_vue2/dist/{get-processed-block.deb6b33a.cjs → get-processed-block.d8938868.cjs} +1 -1
- package/packages/_vue2/dist/index.1021dd83.cjs +32 -0
- package/packages/_vue2/dist/{index.8352d880.js → index.ed62d736.js} +234 -211
- package/packages/_vue2/dist/{inlined-script.874c7b5a.cjs → inlined-script.3e3c93e8.cjs} +1 -1
- package/packages/_vue2/dist/{inlined-script.b4595308.js → inlined-script.cf733bda.js} +1 -1
- package/packages/_vue2/dist/{inlined-styles.dd4a079a.js → inlined-styles.2709172e.js} +1 -1
- package/packages/_vue2/dist/{inlined-styles.d8b2af39.cjs → inlined-styles.cf1e15e1.cjs} +1 -1
- package/packages/_vue2/dist/{interactive-element.e2f7ca88.js → interactive-element.d51dde5a.js} +5 -5
- package/packages/_vue2/dist/{interactive-element.12db10c4.cjs → interactive-element.ea2a7d23.cjs} +1 -1
- package/packages/_vue2/dist/{repeated-block.c74334c2.js → repeated-block.9a46bc14.js} +4 -5
- package/packages/_vue2/dist/repeated-block.a299d789.cjs +1 -0
- package/packages/_vue2/dist/sdk.cjs +1 -1
- package/packages/_vue2/dist/sdk.js +6 -6
- package/packages/_vue2/dist/src/components/blocks/blocks.vue.d.ts +2 -2
- package/packages/_vue2/dist/src/constants/sdk-version.d.ts +1 -1
- package/packages/_vue2/dist/src/context/components.context.d.ts +7 -0
- package/packages/_vue2/dist/{styles.367c17da.js → styles.40b9604d.js} +2 -2
- package/packages/_vue2/dist/{styles.716893e3.cjs → styles.f4f6200a.cjs} +3 -3
- package/packages/_vue3/dist/{block-wrapper.0590efed.js → block-wrapper.33cc2e78.js} +2 -2
- package/packages/_vue3/dist/{block-wrapper.caa27b4d.cjs → block-wrapper.d1ace9c6.cjs} +1 -1
- package/packages/_vue3/dist/{component-ref.9039745a.js → component-ref.20d41b64.js} +2 -2
- package/packages/_vue3/dist/{component-ref.7c88b254.cjs → component-ref.7c98446d.cjs} +1 -1
- package/packages/_vue3/dist/{get-block-actions.cc5999ea.js → get-block-actions.1279eafb.js} +1 -1
- package/packages/_vue3/dist/{get-block-actions.a8cbb712.cjs → get-block-actions.9d2cfc9a.cjs} +1 -1
- package/packages/_vue3/dist/{index.52e5e57e.js → index.a657fd9d.js} +583 -568
- package/packages/_vue3/dist/{index.a789f147.cjs → index.c5eee389.cjs} +26 -26
- package/packages/_vue3/dist/{repeated-block.1eba0fc4.js → repeated-block.48916c9e.js} +2 -2
- package/packages/_vue3/dist/{repeated-block.e0f9db51.cjs → repeated-block.5aa51bc7.cjs} +1 -1
- package/packages/_vue3/dist/sdk.cjs +1 -1
- package/packages/_vue3/dist/sdk.js +1 -1
- package/packages/_vue3/dist/src/blocks/columns/columns.vue.d.ts +3 -3
- package/packages/_vue3/dist/src/blocks/symbol/symbol.vue.d.ts +3 -3
- package/packages/_vue3/dist/src/components/blocks/blocks.vue.d.ts +2 -2
- package/packages/_vue3/dist/src/constants/sdk-version.d.ts +1 -1
- package/packages/_vue3/dist/src/context/components.context.d.ts +7 -0
- package/packages/_vue2/dist/builder.context.29ec27bd.js +0 -18
- package/packages/_vue2/dist/builder.context.e22f06a0.cjs +0 -1
- package/packages/_vue2/dist/enable-editor.12c3716b.cjs +0 -1
- package/packages/_vue2/dist/index.051a3d7b.cjs +0 -32
- package/packages/_vue2/dist/repeated-block.0343c63e.cjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as t, defineAsyncComponent as n, resolveComponent as r, openBlock as c, createBlock as s } from "vue";
|
|
2
|
-
import { B as p, _ as l } from "./index.
|
|
3
|
-
const a = () => import("./index.
|
|
2
|
+
import { B as p, _ as l } from "./index.a657fd9d.js";
|
|
3
|
+
const a = () => import("./index.a657fd9d.js").then((e) => e.q).then((e) => e.default).catch((e) => {
|
|
4
4
|
throw console.error(
|
|
5
5
|
"Error while attempting to dynamically import component Block at ../block.vue",
|
|
6
6
|
e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),t=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),t=require("./index.c5eee389.cjs"),r=()=>Promise.resolve().then(()=>require("./index.c5eee389.cjs")).then(e=>e.block).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component Block at ../block.vue",e),e}),c=o.defineComponent({name:"repeated-block",components:{Block:o.defineAsyncComponent(r)},props:["repeatContext","block","registeredComponents"],data(){return{store:this.repeatContext}},provide(){const e=this;return{[t.BuilderContext.key]:e.store}}});function s(e,i,p,d,a,u){const n=o.resolveComponent("block");return o.openBlock(),o.createBlock(n,{block:e.block,context:e.store,registeredComponents:e.registeredComponents},null,8,["block","context","registeredComponents"])}const l=t._export_sfc(c,[["render",s]]);exports.default=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index.c5eee389.cjs");require("vue");exports.Button=e.Button;exports.Columns=e.Columns;exports.Fragment=e.Fragment;exports.Image=e.Image;exports.RenderBlocks=e.Blocks;exports.RenderContent=e.ContentVariants;exports.Section=e.Section;exports.Symbol=e.Symbol;exports.Text=e.Text;exports.Video=e.Video;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.getAllContent=e.getAllContent;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.getContent=e.getContent;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.processContentResult=e.processContentResult;exports.register=e.register;exports.setEditorSettings=e.setEditorSettings;exports.track=e.track;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { k as a, C as n, F as o, I as r, l as i, o as g, S as m, m as l, n as d, V as C, f as c, g as p, j as S, h as u, i as R, d as k, p as B, r as f, s as h, t as x } from "./index.
|
|
1
|
+
import { k as a, C as n, F as o, I as r, l as i, o as g, S as m, m as l, n as d, V as C, f as c, g as p, j as S, h as u, i as R, d as k, p as B, r as f, s as h, t as x } from "./index.a657fd9d.js";
|
|
2
2
|
import "vue";
|
|
3
3
|
export {
|
|
4
4
|
a as Button,
|
|
@@ -18,11 +18,11 @@ export interface ColumnProps extends BuilderComponentsProp {
|
|
|
18
18
|
declare const _sfc_main: import("vue").DefineComponent<Readonly<{
|
|
19
19
|
builderBlock?: any;
|
|
20
20
|
columns?: any;
|
|
21
|
+
builderContext?: any;
|
|
21
22
|
js?: any;
|
|
22
23
|
space?: any;
|
|
23
24
|
stackColumnsAt?: any;
|
|
24
25
|
reverseColumnsWhenStacked?: any;
|
|
25
|
-
builderContext?: any;
|
|
26
26
|
builderComponents?: any;
|
|
27
27
|
}>, unknown, {
|
|
28
28
|
gutterSize: number;
|
|
@@ -50,20 +50,20 @@ declare const _sfc_main: import("vue").DefineComponent<Readonly<{
|
|
|
50
50
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
51
51
|
builderBlock?: any;
|
|
52
52
|
columns?: any;
|
|
53
|
+
builderContext?: any;
|
|
53
54
|
js?: any;
|
|
54
55
|
space?: any;
|
|
55
56
|
stackColumnsAt?: any;
|
|
56
57
|
reverseColumnsWhenStacked?: any;
|
|
57
|
-
builderContext?: any;
|
|
58
58
|
builderComponents?: any;
|
|
59
59
|
}>>>, {
|
|
60
60
|
readonly builderBlock?: any;
|
|
61
61
|
readonly columns?: any;
|
|
62
|
+
readonly builderContext?: any;
|
|
62
63
|
readonly js?: any;
|
|
63
64
|
readonly space?: any;
|
|
64
65
|
readonly stackColumnsAt?: any;
|
|
65
66
|
readonly reverseColumnsWhenStacked?: any;
|
|
66
|
-
readonly builderContext?: any;
|
|
67
67
|
readonly builderComponents?: any;
|
|
68
68
|
}>;
|
|
69
69
|
export default _sfc_main;
|
|
@@ -23,8 +23,8 @@ import { filterAttrs } from "../helpers.js";
|
|
|
23
23
|
declare const _sfc_main: import("vue").DefineComponent<Readonly<{
|
|
24
24
|
symbol?: any;
|
|
25
25
|
attributes?: any;
|
|
26
|
-
js?: any;
|
|
27
26
|
builderContext?: any;
|
|
27
|
+
js?: any;
|
|
28
28
|
builderComponents?: any;
|
|
29
29
|
dynamic?: any;
|
|
30
30
|
}>, unknown, {
|
|
@@ -41,15 +41,15 @@ declare const _sfc_main: import("vue").DefineComponent<Readonly<{
|
|
|
41
41
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
42
42
|
symbol?: any;
|
|
43
43
|
attributes?: any;
|
|
44
|
-
js?: any;
|
|
45
44
|
builderContext?: any;
|
|
45
|
+
js?: any;
|
|
46
46
|
builderComponents?: any;
|
|
47
47
|
dynamic?: any;
|
|
48
48
|
}>>>, {
|
|
49
49
|
readonly symbol?: any;
|
|
50
50
|
readonly attributes?: any;
|
|
51
|
-
readonly js?: any;
|
|
52
51
|
readonly builderContext?: any;
|
|
52
|
+
readonly js?: any;
|
|
53
53
|
readonly builderComponents?: any;
|
|
54
54
|
readonly dynamic?: any;
|
|
55
55
|
}>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { BlocksWrapperProps } from "./blocks-wrapper.vue";
|
|
2
2
|
import type { BuilderContextInterface, RegisteredComponents } from "../../context/types.js";
|
|
3
3
|
export type BlocksProps = Partial<BlocksWrapperProps> & {
|
|
4
|
-
context
|
|
5
|
-
registeredComponents
|
|
4
|
+
context?: BuilderContextInterface;
|
|
5
|
+
registeredComponents?: RegisteredComponents;
|
|
6
6
|
};
|
|
7
7
|
declare const _sfc_main: import("vue").DefineComponent<Readonly<{
|
|
8
8
|
blocks?: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.5.
|
|
1
|
+
export declare const SDK_VERSION = "0.5.1";
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
const t = Symbol(), o = {
|
|
2
|
-
Builder: {
|
|
3
|
-
content: null,
|
|
4
|
-
context: {},
|
|
5
|
-
localState: void 0,
|
|
6
|
-
rootSetState() {
|
|
7
|
-
},
|
|
8
|
-
rootState: {},
|
|
9
|
-
apiKey: null,
|
|
10
|
-
apiVersion: void 0,
|
|
11
|
-
componentInfos: {},
|
|
12
|
-
inheritedStyles: {}
|
|
13
|
-
},
|
|
14
|
-
key: t
|
|
15
|
-
};
|
|
16
|
-
export {
|
|
17
|
-
o as b
|
|
18
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const t=Symbol(),e={Builder:{content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{}},key:t};exports.builderContext=e;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("vue"),p=require("./evaluate.d1bef2c5.cjs"),a=require("./index.051a3d7b.cjs"),m=require("./builder.context.e22f06a0.cjs"),v="0.5.0",k=()=>{a.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 f=!1;const R=(n={})=>{var e,t;f||(f=!0,a.isBrowser()&&((e=window.parent)==null||e.postMessage({type:"builder.sdkInfo",data:{target:a.TARGET,version:v,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(t=window.parent)==null||t.postMessage({type:"builder.updateContent",data:{options:n}},"*"),window.addEventListener("message",({data:i})=>{var o,s;if(!!(i!=null&&i.type))switch(i.type){case"builder.evaluate":{const r=i.data.text,S=i.data.arguments||[],c=i.data.id,C=new Function(r);let d,l=null;try{d=C.apply(null,S)}catch(u){l=u}l?(o=window.parent)==null||o.postMessage({type:"builder.evaluateError",data:{id:c,error:l.message}},"*"):d&&typeof d.then=="function"?d.then(u=>{var h;(h=window.parent)==null||h.postMessage({type:"builder.evaluateResult",data:{id:c,result:u}},"*")}).catch(console.error):(s=window.parent)==null||s.postMessage({type:"builder.evaluateResult",data:{result:d,id:c}},"*");break}}})))};function g(n){return Math.round(n*1e3)/1e3}const y=(n,e,t=!0)=>{if(!(n instanceof HTMLElement))return null;let i=t?n:n.parentElement;do{if(!i)return null;if(e(i))return i}while(i=i.parentElement);return null},w=n=>y(n,e=>{const t=e.getAttribute("builder-id")||e.id;return Boolean((t==null?void 0:t.indexOf("builder-"))===0)}),b=({event:n,target:e})=>{const t=e.getBoundingClientRect(),i=n.clientX-t.left,o=n.clientY-t.top,s=g(i/t.width),r=g(o/t.height);return{x:s,y:r}},_=n=>{const e=n.target,t=e&&w(e),i=(t==null?void 0:t.getAttribute("builder-id"))||(t==null?void 0:t.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:e?b({event:n,target:e}):void 0,builderTargetOffset:t?b({event:n,target:t}):void 0,builderElementIndex:t&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(t):void 0}}},E=x.defineComponent({name:"enable-editor",props:["canTrack","builderContextSignal","model","context","apiKey","showContent","classNameProp","content","locale","includeRefs","enrich"],data(){return{canTrackToUse:a.checkIsDefined(this.canTrack)?this.canTrack:!0,forceReRenderCount:0,lastUpdated:0,shouldSendResetCookie:!1,httpReqsData:{},clicked:!1,builderContext:m.builderContext}},provide(){const n=this;return{[m.builderContext.key]:n.builderContextSignal}},mounted(){var n,e;if(this.apiKey||a.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),a.isBrowser()){if(a.isEditing()&&(this.forceReRenderCount=this.forceReRenderCount+1,window.addEventListener("message",this.processMessage),k(),R({...this.locale?{locale:this.locale}:{},...this.includeRefs?{includeRefs:this.includeRefs}:{},...this.enrich?{enrich:this.enrich}:{}}),Object.values(this.builderContextSignal.componentInfos).forEach(t=>{var o;const i=a.createRegisterComponentMessage(t);(o=window.parent)==null||o.postMessage(i,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate)),this.builderContextSignal.content){const t=(n=this.builderContextSignal.content)==null?void 0:n.testVariationId,i=(e=this.builderContextSignal.content)==null?void 0:e.id;a._track({type:"impression",canTrack:this.canTrackToUse,contentId:i,apiKey:this.apiKey,variationId:t!==i?t:void 0})}if(a.isPreviewing()){const t=new URL(location.href).searchParams,i=t.get("builder.preview"),o=t.get(`builder.preview.${i}`),s=t.get("apiKey")||t.get("builder.space");i===this.model&&s===this.apiKey&&(!this.content||o===this.content.id)&&a.getContent({model:this.model,apiKey:this.apiKey,apiVersion:this.builderContextSignal.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(){},immediate:!0},onUpdateHook2:{handler(){this.evaluateJsCode()},immediate:!0},onUpdateHook3:{handler(){this.runHttpRequests()},immediate:!0},onUpdateHook4:{handler(){this.emitStateUpdate()},immediate:!0}},unmounted(){a.isBrowser()&&(window.removeEventListener("message",this.processMessage),window.removeEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate))},computed:{onUpdateHook0(){return{0:this.content}},onUpdateHook1(){return{0:this.shouldSendResetCookie}},onUpdateHook2(){var n,e;return{0:(e=(n=this.builderContextSignal.content)==null?void 0:n.data)==null?void 0:e.jsCode,1:this.builderContextSignal.rootState}},onUpdateHook3(){var n,e;return{0:(e=(n=this.builderContextSignal.content)==null?void 0:n.data)==null?void 0:e.httpRequests}},onUpdateHook4(){return{0:this.builderContextSignal.rootState}}},methods:{mergeNewContent(n){var t,i,o,s,r;const e={...this.builderContextSignal.content,...n,data:{...(t=this.builderContextSignal.content)==null?void 0:t.data,...n==null?void 0:n.data},meta:{...(i=this.builderContextSignal.content)==null?void 0:i.meta,...n==null?void 0:n.meta,breakpoints:((o=n==null?void 0:n.meta)==null?void 0:o.breakpoints)||((r=(s=this.builderContextSignal.content)==null?void 0:s.meta)==null?void 0:r.breakpoints)}};this.builderContextSignal.content=e},processMessage(n){var t;const{data:e}=n;if(e)switch(e.type){case"builder.configureSdk":{const i=e.data,{breakpoints:o,contentId:s}=i;if(!s||s!==((t=this.builderContextSignal.content)==null?void 0:t.id))return;o&&this.mergeNewContent({meta:{breakpoints:o}}),this.forceReRenderCount=this.forceReRenderCount+1;break}case"builder.contentUpdate":{const i=e.data,o=i.key||i.alias||i.entry||i.modelName,s=i.data;o===this.model&&(this.mergeNewContent(s),this.forceReRenderCount=this.forceReRenderCount+1);break}}},evaluateJsCode(){var e,t;const n=(t=(e=this.builderContextSignal.content)==null?void 0:e.data)==null?void 0:t.jsCode;n&&p.evaluate({code:n,context:this.context||{},localState:void 0,rootState:this.builderContextSignal.rootState,rootSetState:this.builderContextSignal.rootSetState})},onClick(n){var e,t;if(this.builderContextSignal.content){const i=(e=this.builderContextSignal.content)==null?void 0:e.testVariationId,o=(t=this.builderContextSignal.content)==null?void 0:t.id;a._track({type:"click",canTrack:this.canTrackToUse,contentId:o,apiKey:this.apiKey,variationId:i!==o?i:void 0,..._(n),unique:!this.clicked})}this.clicked||(this.clicked=!0)},evalExpression(n){return n.replace(/{{([^}]+)}}/g,(e,t)=>p.evaluate({code:t,context:this.context||{},localState:void 0,rootState:this.builderContextSignal.rootState,rootSetState:this.builderContextSignal.rootSetState}))},handleRequest({url:n,key:e}){a.fetch(n).then(t=>t.json()).then(t=>{var o,s;const i={...this.builderContextSignal.rootState,[e]:t};(s=(o=this.builderContextSignal).rootSetState)==null||s.call(o,i),this.httpReqsData[e]=!0}).catch(t=>{console.error("error fetching dynamic data",n,t)})},runHttpRequests(){var e,t,i;const n=(i=(t=(e=this.builderContextSignal.content)==null?void 0:e.data)==null?void 0:t.httpRequests)!=null?i:{};Object.entries(n).forEach(([o,s])=>{if(s&&(!this.httpReqsData[o]||a.isEditing())){const r=this.evalExpression(s);this.handleRequest({url:r,key:o})}})},emitStateUpdate(){a.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:this.builderContextSignal.rootState,ref:{name:this.model}}}))},_classStringToObject(n){const e={};if(typeof n!="string")return e;const t=n.trim().split(/\s+/);for(const i of t)e[i]=!0;return e}}});var U=function(){var i;var e=this,t=e._self._c;return e._self._setupProxy,e.builderContextSignal.content?t("div",e._b({key:e.forceReRenderCount,ref:"elementRef",class:e._classStringToObject(e.classNameProp),attrs:{"builder-content-id":(i=e.builderContextSignal.content)==null?void 0:i.id,"builder-model":e.model},on:{click:function(o){return e.onClick(o)}}},"div",{...e.showContent?{}:{hidden:!0,"aria-hidden":!0}},!1),[e._t("default")],2):e._e()},I=[],T=a.normalizeComponent(E,U,I,!1,null,null,null,null);const P=T.exports;exports.default=P;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";const y=require("vue");function T(e={},t,n){const o={};for(const r in e){if(!e[r]||n&&!r.startsWith(t))continue;const s=n?r.replace(t,""):r;o[s]=e[r]}return o}const ut=y.defineComponent({name:"builder-button",props:["attributes","text","link","openLinkInNewTab"],data(){return{filterAttrs:T}},methods:{_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const o of n)t[o]=!0;return t}}});function _(e,t,n,o,r,s,i,u){var a=typeof e=="function"?e.options:e;t&&(a.render=t,a.staticRenderFns=n,a._compiled=!0),o&&(a.functional=!0),s&&(a._scopeId="data-v-"+s);var d;if(i?(d=function(c){c=c||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!c&&typeof __VUE_SSR_CONTEXT__<"u"&&(c=__VUE_SSR_CONTEXT__),r&&r.call(this,c),c&&c._registeredComponents&&c._registeredComponents.add(i)},a._ssrRegister=d):r&&(d=u?function(){r.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:r),d)if(a.functional){a._injectStyles=d;var m=a.render;a.render=function(f,l){return d.call(l),m(f,l)}}else{var p=a.beforeCreate;a.beforeCreate=p?[].concat(p,d):[d]}return{exports:e,options:a}}var dt=function(){var t=this,n=t._self._c;return t._self._setupProxy,t.link?n("a",t._g(t._b({attrs:{role:"button",href:t.link,target:t.openLinkInNewTab?"_blank":void 0}},"a",t.filterAttrs(t.attributes,"v-on:",!1),!1),t.filterAttrs(t.attributes,"v-on:",!0)),[t._v(" "+t._s(t.text)+" ")]):n("button",t._g(t._b({class:t._classStringToObject(t.attributes.class+" button-2fnk003dqad"),style:t.attributes.style},"button",t.filterAttrs(t.attributes,"v-on:",!1),!1),t.filterAttrs(t.attributes,"v-on:",!0)),[t._v(" "+t._s(t.text)+" ")])},ft=[],mt=_(ut,dt,ft,!1,null,"d03c6eb1",null,null);const pt=mt.exports,I=e=>JSON.parse(JSON.stringify(e)),U={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},ht=(e,t=U)=>`@media (max-width: ${t[e].max}px)`,M=({small:e,medium:t})=>{const n=I(U);if(!e||!t)return n;const o=Math.floor(e/2);n.small={max:e,min:o,default:o+1};const r=n.small.max+1;n.medium={max:t,min:r,default:r+1};const s=n.medium.max+1;return n.large={max:2e3,min:s,default:s+1},n},w="vue2",gt=()=>Promise.resolve().then(()=>L).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component Blocks at ../../components/blocks/blocks.vue",e),e}),_t=()=>Promise.resolve().then(()=>require("./inlined-styles.d8b2af39.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component InlinedStyles at ../../components/inlined-styles.vue",e),e}),bt=y.defineComponent({name:"builder-columns",components:{"inlined-styles":_t,blocks:gt},props:["js","space","columns","stackColumnsAt","reverseColumnsWhenStacked","builderContext","builderBlock","builderComponents"],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}},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),o=`${t}px`,r="100%",s=0;return{width:n,["margin-left"]:o,"--column-width-mobile":this.getMobileStyle({stackedStyle:r,desktopStyle:n}),"--column-margin-left-mobile":this.getMobileStyle({stackedStyle:s,desktopStyle:o}),"--column-width-tablet":this.getTabletStyle({stackedStyle:r,desktopStyle:n}),"--column-margin-left-tablet":this.getTabletStyle({stackedStyle:s,desktopStyle:o})}},getWidthForBreakpointSize(e){var n,o;return M(((o=(n=this.builderContext.content)==null?void 0:n.meta)==null?void 0:o.breakpoints)||{})[e].max},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const o of n)t[o]=!0;return t}}});var yt=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",t._b({class:t._classStringToObject(`builder-columns ${t.builderBlock.id}-breakpoints div-t9spj7joih`),style:t.columnsCssVars},"div",{},!1),[t.TARGET!=="reactNative"?[n("inlined-styles",{attrs:{styles:t.columnsStyles}})]:t._e(),t._l(t.columns,function(o,r){return n("div",t._b({key:r,staticClass:"builder-column div-t9spj7joih-2",style:t.columnCssVars(r)},"div",{},!1),[n("blocks",{attrs:{blocks:o.blocks,path:`component.options.columns.${r}.blocks`,parent:t.builderBlock.id,styleProp:{flexGrow:"1"},context:t.builderContext,registeredComponents:t.builderComponents}})],1)})],2)},vt=[],St=_(bt,yt,vt,!1,null,"b1c2e5e0",null,null);const kt=St.exports,wt=y.defineComponent({name:"builder-fragment-component",props:[]});var xt=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("span",[t._t("default")],2)},Ct=[],$t=_(wt,xt,Ct,!1,null,null,null,null);const Tt=$t.exports;function j(e){return e.replace(/http(s)?:/,"")}function It(e="",t,n){const o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),r=e.indexOf("?")!==-1?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+r+t+"="+encodeURIComponent(n)}function Rt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return j(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const o=e.split(n[0]),r=n[3],s=t.match("x")?t:`${t}x`;return j(`${o[0]}_${s}${r}`)}return null}function R(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const o=Number(e.split("?width=")[1]);return isNaN(o)||(n=`${n} ${o}w`),t.filter(r=>r!==o).map(r=>`${It(e,"width",r)} ${r}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[Rt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,o])=>`${n} ${o}w`).concat([e]).join(", "):e}const Pt=y.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"),R(t)}else if(this.image&&!this.srcset)return R(t);return R(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 o of n)t[o]=!0;return t}}});var At=function(){var o,r,s,i;var t=this,n=t._self._c;return t._self._setupProxy,n("div",[n("picture",[t.webpSrcSet?[n("source",{attrs:{type:"image/webp",srcset:t.webpSrcSet}})]:t._e(),n("img",{class:t._classStringToObject("builder-image"+(t.className?" "+t.className:"")+" img-1pl23ac79ld"),style:{objectPosition:t.backgroundPosition||"center",objectFit:t.backgroundSize||"cover",...t.aspectRatioCss},attrs:{loading:"lazy",alt:t.altText,role:t.altText?"presentation":void 0,src:t.image,srcset:t.srcSetToUse,sizes:t.sizes}})],2),t.aspectRatio&&!(((r=(o=t.builderBlock)==null?void 0:o.children)==null?void 0:r.length)&&t.fitContent)?[n("div",{staticClass:"builder-image-sizer div-1pl23ac79ld",style:{paddingTop:t.aspectRatio*100+"%"}})]:t._e(),((i=(s=t.builderBlock)==null?void 0:s.children)==null?void 0:i.length)&&t.fitContent?[t._t("default")]:t._e(),!t.fitContent&&t.$slots.default?[n("div",{staticClass:"div-1pl23ac79ld-2"},[t._t("default")],2)]:t._e()],2)},Vt=[],Et=_(Pt,At,Vt,!1,null,"29cdebee",null,null);const Ot=Et.exports,jt=()=>Promise.resolve().then(()=>require("./block-styles.6a14fec4.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ../block/components/block-styles.vue",e),e}),Bt=()=>Promise.resolve().then(()=>require("./block.a18a495f.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component Block at ../block/block.vue",e),e}),Nt=()=>Promise.resolve().then(()=>require("./blocks-wrapper.e0086c60.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component BlocksWrapper at ./blocks-wrapper.vue",e),e}),Ft=y.defineComponent({name:"builder-blocks",components:{"blocks-wrapper":Nt,block:Bt,"block-styles":jt},props:["blocks","parent","path","styleProp","context","registeredComponents"]});var Ut=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("blocks-wrapper",{attrs:{blocks:t.blocks,parent:t.parent,path:t.path,styleProp:t.styleProp}},[t.blocks?t._l(t.blocks,function(o,r){return n("block",{key:"render-block-"+o.id,attrs:{block:o,context:t.context,registeredComponents:t.registeredComponents}})}):t._e(),t.blocks?t._l(t.blocks,function(o,r){return n("block-styles",{key:"block-style-"+o.id,attrs:{block:o,context:t.context}})}):t._e()],2)},Mt=[],Wt=_(Ft,Ut,Mt,!1,null,null,null,null);const W=Wt.exports,L=Object.freeze(Object.defineProperty({__proto__:null,default:W},Symbol.toStringTag,{value:"Module"})),Lt=y.defineComponent({name:"builder-section-component",props:["attributes","maxWidth"],data(){return{filterAttrs:T}}});var zt=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("section",t._g(t._b({style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:t.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"}},"section",t.filterAttrs(t.attributes,"v-on:",!1),!1),t.filterAttrs(t.attributes,"v-on:",!0)),[t._t("default")],2)},Kt=[],Gt=_(Lt,zt,Kt,!1,null,null,null,null);const Dt=Gt.exports;function b(){return typeof window<"u"&&typeof document<"u"}const C="[Builder.io]: ",v={log:(...e)=>console.log(C,...e),error:(...e)=>console.error(C,...e),warn:(...e)=>console.warn(C,...e),debug:(...e)=>console.debug(C,...e)},k=e=>e!=null,qt=e=>{if(e==="localhost"||e==="127.0.0.1")return e;const t=e.split(".");return t.length>2?t.slice(1).join("."):e},z=({name:e,canTrack:t})=>{var n;try{return t?(n=document.cookie.split("; ").find(o=>o.startsWith(`${e}=`)))==null?void 0:n.split("=")[1]:void 0}catch(o){v.warn("[COOKIE] GET error: ",(o==null?void 0:o.message)||o);return}},K=async e=>z(e),Ht=e=>e.map(([t,n])=>n?`${t}=${n}`:t).filter(k).join("; "),Jt=[["secure",""],["SameSite","None"]],Qt=({name:e,value:t,expires:n})=>{const r=(b()?location.protocol==="https:":!0)?Jt:[[]],s=n?[["expires",n.toUTCString()]]:[[]],i=[[e,t],...s,["path","/"],["domain",qt(window.location.hostname)],...r];return Ht(i)},G=async({name:e,value:t,expires:n,canTrack:o})=>{try{if(!o)return;const r=Qt({name:e,value:t,expires:n});document.cookie=r}catch(r){v.warn("[COOKIE] SET error: ",(r==null?void 0:r.message)||r)}},Xt="builder.tests",V=e=>`${Xt}.${e}`,Yt=({contentId:e})=>K({name:V(e),canTrack:!0}),Zt=({contentId:e})=>z({name:V(e),canTrack:!0}),te=({contentId:e,value:t})=>G({name:V(e),value:t,canTrack:!0}),D=e=>k(e.id)&&k(e.variations)&&Object.keys(e.variations).length>0,ee=({id:e,variations:t})=>{var r;let n=0;const o=Math.random();for(const s in t){const i=(r=t[s])==null?void 0:r.testRatio;if(n+=i,o<n)return s}return e},q=e=>{const t=ee(e);return te({contentId:e.id,value:t}).catch(n=>{v.error("could not store A/B test variation: ",n)}),t},H=({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":"")}},ne=({item:e,canTrack:t})=>{if(!t)return e;if(!e)return;if(!D(e))return e;const n=Zt({contentId:e.id})||q({variations:e.variations,id:e.id}),o=H({item:e,testGroupId:n});return{...e,...o}},oe=async({item:e,canTrack:t})=>{if(!t||!D(e))return e;const o=await Yt({contentId:e.id})||q({variations:e.variations,id:e.id}),r=H({item:e,testGroupId:o});return{...e,...r}},P=e=>k(e)?e:!0;function re(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:globalThis}function se(){const e=re().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=se();function A(e,t=null,n="."){return Object.keys(e).reduce((o,r)=>{const s=e[r],i=[t,r].filter(Boolean).join(n);return[typeof s=="object",s!==null,!(Array.isArray(s)&&s.length===0)].every(Boolean)?{...o,...A(s,i,n)}:{...o,[i]:s}},{})}const B="builder.",ie="options.",ae=e=>{const t={};return e.forEach((n,o)=>{t[o]=n}),t},Q=e=>{if(!e)return{};const t=X(e),n={};return Object.keys(t).forEach(o=>{if(o.startsWith(B)){const r=o.replace(B,"").replace(ie,"");n[r]=t[o]}}),n},ce=()=>{if(!b())return{};const e=new URLSearchParams(window.location.search);return Q(e)},X=e=>e instanceof URLSearchParams?ae(e):e,le="v3",E=e=>{const{limit:t=30,userAttributes:n,query:o,noTraverse:r=!1,model:s,apiKey:i,includeRefs:u=!0,enrich:a,locale:d,apiVersion:m=le}=e;if(!i)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/${s}?apiKey=${i}&limit=${t}&noTraverse=${r}&includeRefs=${u}${d?`&locale=${d}`:""}${a?`&enrich=${a}`:""}`),c={...ce(),...X(e.options||{})},f=A(c);for(const l in f)p.searchParams.set(l,String(f[l]));if(n&&p.searchParams.set("userAttributes",JSON.stringify(n)),o){const l=A({query:o});for(const h in l)p.searchParams.set(h,JSON.stringify(l[h]))}return p},ue=e=>"results"in e;async function Y(e){const t=await tt({...e,limit:1});return t&&t.results[0]||null}const de=async e=>{const t=E(e);return await(await J(t.href)).json()},Z=async(e,t,n=E(e))=>{const o=P(e.canTrack);if(n.search.includes("preview="),!o||!(b()||w==="reactNative"))return t;try{const r=[];for(const s of t.results)r.push(await oe({item:s,canTrack:o}));t.results=r}catch(r){v.error("Could not process A/B tests. ",r)}return t};async function tt(e){try{const t=E(e),n=await de(e);return ue(n)?Z(e,n):(v.error("Error fetching data. ",{url:t,content:n,options:e}),null)}catch(t){return v.error("Error fetching data. ",t),null}}const fe=async({builderContextValue:e,symbol:t})=>{if((t==null?void 0:t.model)&&(e==null?void 0:e.apiKey))return Y({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{v.error("Could not fetch symbol content: ",n)})},me=()=>Promise.resolve().then(()=>ze).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component ContentVariants at ../../components/content-variants/content-variants.vue",e),e}),pe=y.defineComponent({name:"builder-symbol",components:{"content-variants":me},props:["js","attributes","symbol","dynamic","builderContext","builderComponents"],data(){var e;return{contentToUse:(e=this.symbol)==null?void 0:e.content,filterAttrs:T}},mounted(){this.setContent()},watch:{onUpdateHook0:{handler(){this.setContent()},immediate:!0}},computed:{className(){var e,t;return[...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(" ")},onUpdateHook0(){return{0:this.symbol}}},methods:{setContent(){this.contentToUse||fe({symbol:this.symbol,builderContextValue:this.builderContext}).then(e=>{e&&(this.contentToUse=e)})},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const o of n)t[o]=!0;return t}}});var he=function(){var o,r,s,i;var t=this,n=t._self._c;return t._self._setupProxy,n("div",t._g(t._b({class:t._classStringToObject(t.className)},"div",{...t.filterAttrs(t.attributes,"v-on:",!1)},!1),t.filterAttrs(t.attributes,"v-on:",!0)),[n("content-variants",{attrs:{__isNestedRender:!0,apiVersion:t.builderContext.apiVersion,apiKey:t.builderContext.apiKey,context:t.builderContext.context,customComponents:Object.values(t.builderComponents),data:{...(o=t.symbol)==null?void 0:o.data,...t.builderContext.localState,...(s=(r=t.contentToUse)==null?void 0:r.data)==null?void 0:s.state},model:(i=t.symbol)==null?void 0:i.model,content:t.contentToUse}})],1)},ge=[],_e=_(pe,he,ge,!1,null,null,null,null);const be=_e.exports,ye=y.defineComponent({name:"builder-text",props:["text"]});var ve=function(){var o;var t=this,n=t._self._c;return t._self._setupProxy,n("span",{staticClass:"builder-text",style:{outline:"none"},domProps:{innerHTML:t._s(((o=t.text)==null?void 0:o.toString())||"")}})},Se=[],ke=_(ye,ve,Se,!1,null,null,null,null);const we=ke.exports,xe=y.defineComponent({name:"builder-video",props:["autoPlay","muted","controls","loop","playsInline","attributes","preload","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 Ce=function(){var o;var t=this,n=t._self._c;return t._self._setupProxy,n("video",t._b({style:{width:"100%",height:"100%",...(o=t.attributes)==null?void 0:o.style,objectFit:t.fit,objectPosition:t.position,borderRadius:1},attrs:{preload:t.preload||"metadata",src:t.video||"no-src",poster:t.posterImage}},"video",t.spreadProps,!1))},$e=[],Te=_(xe,Ce,$e,!1,null,null,null,null);const Ie=Te.exports,$=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),Re=({canTrack:e,content:t})=>!(!($(t).length>0)||!e);function Pe(e,t,n){var i;function o(){function u(l,h,S){let x="";if(S){const g=new Date;g.setTime(g.getTime()+S*24*60*60*1e3),x="; expires="+g.toUTCString()}document.cookie=l+"="+(h||"")+x+"; path=/; Secure; SameSite=None"}function a(l){const h=l+"=",S=document.cookie.split(";");for(let x=0;x<S.length;x++){let g=S[x];for(;g.charAt(0)===" ";)g=g.substring(1,g.length);if(g.indexOf(h)===0)return g.substring(h.length,g.length)}return null}const d=`builder.tests.${e}`,m=a(d),p=t.map(l=>l.id).concat(e);if(m&&p.includes(m))return m;let c=0;const f=Math.random();for(let l=0;l<t.length;l++){const h=t[l],S=h.testRatio;if(c+=S,f<c)return u(d,h.id),h.id}return u(d,e),e}const r=o(),s=(i=document.currentScript)==null?void 0:i.previousElementSibling;if(n){s.remove();const u=document.currentScript;u==null||u.remove()}else{const u=t.concat({id:e}).filter(a=>a.id!==r).map(a=>`.variant-${a.id} { display: none; }
|
|
27
|
-
`).join("");s.innerHTML=u}}function Ae(e,t,n){var a;if(!navigator.cookieEnabled)return;function o(d){const m=d+"=",p=document.cookie.split(";");for(let c=0;c<p.length;c++){let f=p[c];for(;f.charAt(0)===" ";)f=f.substring(1,f.length);if(f.indexOf(m)===0)return f.substring(m.length,f.length)}return null}const r=`builder.tests.${t}`,s=o(r),i=(a=document.currentScript)==null?void 0:a.parentElement,u=e===t;if(s===e){if(u)return;i==null||i.removeAttribute("hidden"),i==null||i.removeAttribute("aria-hidden")}else{u&&(n?i==null||i.remove():(i==null||i.setAttribute("hidden","true"),i==null||i.setAttribute("aria-hidden","true")));return}}const Ve=e=>e==="react"||e==="reactNative",et=Ve(w),nt="builderIoAbTest",ot="builderIoRenderContent",Ee=()=>{const e=Pe.toString().replace(/\s+/g," "),t=Ae.toString().replace(/\s+/g," ");return`
|
|
28
|
-
window.${nt} = ${e}
|
|
29
|
-
window.${ot} = ${t}
|
|
30
|
-
`},Oe=(e,t)=>`
|
|
31
|
-
window.${nt}("${t}",${JSON.stringify(e)}, ${et})`,je=({contentId:e,variationId:t})=>`
|
|
32
|
-
window.${ot}("${t}", "${e}", ${et})`,Be=()=>Promise.resolve().then(()=>require("./content.fb93079e.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component ContentComponent at ../content/content.vue",e),e}),Ne=()=>Promise.resolve().then(()=>require("./inlined-styles.d8b2af39.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component InlinedStyles at ../inlined-styles.vue",e),e}),Fe=()=>Promise.resolve().then(()=>require("./inlined-script.874c7b5a.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component InlinedScript at ../inlined-script.vue",e),e}),Ue=y.defineComponent({name:"content-variants",components:{"inlined-script":Fe,"inlined-styles":Ne,"content-component":Be},props:["canTrack","content","__isNestedRender","model","data","context","apiKey","apiVersion","customComponents","locale","includeRefs","enrich"],data(){return{shouldRenderVariants:Re({canTrack:P(this.canTrack),content:this.content}),getScriptString:Ee,getVariants:$,getDefaultCanTrack:P,handleABTestingSync:ne,TARGET:w}},mounted(){this.shouldRenderVariants=!1},computed:{variantScriptStr(){var e;return Oe($(this.content).map(t=>({id:t.testVariationId,testRatio:t.testRatio})),((e=this.content)==null?void 0:e.id)||"")},hideVariantsStyleString(){return $(this.content).map(e=>`.variant-${e.testVariationId} { display: none; } `).join("")}}});var Me=function(){var o,r;var t=this,n=t._self._c;return t._self._setupProxy,n("div",[!t.__isNestedRender&&t.TARGET!=="reactNative"?[n("inlined-script",{attrs:{scriptStr:t.getScriptString()}})]:t._e(),t.shouldRenderVariants?[n("inlined-styles",{attrs:{id:`variants-styles-${(o=t.content)==null?void 0:o.id}`,styles:t.hideVariantsStyleString}}),n("inlined-script",{attrs:{scriptStr:t.variantScriptStr}}),t._l(t.getVariants(t.content),function(s,i){return n("content-component",{key:s.testVariationId,attrs:{content:s,showContent:!1,classNameProp:void 0,model:t.model,data:t.data,context:t.context,apiKey:t.apiKey,apiVersion:t.apiVersion,customComponents:t.customComponents,canTrack:t.canTrack,locale:t.locale,includeRefs:t.includeRefs,enrich:t.enrich,isSsrAbTest:t.shouldRenderVariants}})})]:t._e(),n("content-component",t._b({attrs:{content:t.shouldRenderVariants?t.content:t.handleABTestingSync({item:t.content,canTrack:t.getDefaultCanTrack(t.canTrack)}),classNameProp:`variant-${(r=t.content)==null?void 0:r.id}`,showContent:!0,model:t.model,data:t.data,context:t.context,apiKey:t.apiKey,apiVersion:t.apiVersion,customComponents:t.customComponents,canTrack:t.canTrack,locale:t.locale,includeRefs:t.includeRefs,enrich:t.enrich,isSsrAbTest:t.shouldRenderVariants}},"content-component",{key:t.shouldRenderVariants.toString()},!1))],2)},We=[],Le=_(Ue,Me,We,!1,null,null,null,null);const rt=Le.exports,ze=Object.freeze(Object.defineProperty({__proto__:null,default:rt},Symbol.toStringTag,{value:"Module"}));function Ke(){return b()&&window.self!==window.top}function O(){return Ke()&&window.location.search.indexOf("builder.frameEditing=")!==-1}function Ge(){return!b()||O()?!1:Boolean(location.search.indexOf("builder.preview=")!==-1)}const De=[],qe=e=>({type:"builder.registerComponent",data:e}),He=e=>{const t=e.toString().trim();return`return (${!t.startsWith("function")&&!t.startsWith("(")?"function ":""}${t}).apply(this, arguments)`},Je=e=>typeof e=="function"?He(e):I(e),Qe=({inputs:e,...t})=>({...I(t),inputs:e==null?void 0:e.map(n=>Object.entries(n).reduce((o,[r,s])=>({...o,[r]:Je(s)}),{}))}),N={};function Xe(e,t){let n=N[e];if(n||(n=N[e]=[]),n.push(t),b()){const o={type:"builder.register",data:{type:e,info:t}};try{parent.postMessage(o,"*"),parent!==window&&window.postMessage(o,"*")}catch(r){console.debug("Could not postmessage",r)}}}const F={};function Ye(e){if(b()){Object.assign(F,e);const t={type:"builder.settingsChange",data:F};parent.postMessage(t,"*")}}function Ze(){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 st(){return Ze().replace(/-/g,"")}const it="builderSessionId",tn=async({canTrack:e})=>{if(!e)return;const t=await K({name:it,canTrack:e});if(k(t))return t;{const n=en();return nn({id:n,canTrack:e}),n}},en=()=>st(),nn=({id:e,canTrack:t})=>G({name:it,value:e,canTrack:t}),at=()=>b()&&typeof localStorage<"u"?localStorage:void 0,on=({key:e,canTrack:t})=>{var n;try{return t?(n=at())==null?void 0:n.getItem(e):void 0}catch(o){console.debug("[LocalStorage] GET error: ",o);return}},rn=({key:e,canTrack:t,value:n})=>{var o;try{t&&((o=at())==null||o.setItem(e,n))}catch(r){console.debug("[LocalStorage] SET error: ",r)}},ct="builderVisitorId",sn=({canTrack:e})=>{if(!e)return;const t=on({key:ct,canTrack:e});if(k(t))return t;{const n=an();return cn({id:n,canTrack:e}),n}},an=()=>st(),cn=({id:e,canTrack:t})=>rn({key:ct,value:e,canTrack:t}),ln=()=>{if(b()){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},un=()=>typeof navigator=="object"&&navigator.userAgent||"",dn=()=>{const e=un(),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),o=ln();return{urlPath:o==null?void 0:o.pathname,host:(o==null?void 0:o.host)||(o==null?void 0:o.hostname),device:n?"tablet":t.any()?"mobile":"desktop"}},fn=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const t=await tn({canTrack:e}),n=sn({canTrack:e});return{sessionId:t,visitorId:n}},mn=async({type:e,canTrack:t,apiKey:n,metadata:o,...r})=>({type:e,data:{...r,metadata:{url:location.href,...o},...await fn({canTrack:t}),userAttributes:dn(),ownerId:n}});async function lt(e){if(!e.apiKey){v.error("Missing API key for track call. Please provide your API key.");return}if(!!e.canTrack&&!O()&&!!(b()||w==="reactNative"))return fetch("https://cdn.builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await mn(e)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(t=>{console.error("Failed to track: ",t)})}const pn=e=>lt({...e,canTrack:!0});exports.Button=pt;exports.Columns=kt;exports.Fragment=Tt;exports.Image=Ot;exports.Section=Dt;exports.Symbol=be;exports.TARGET=w;exports.Text=we;exports.Video=Ie;exports._track=lt;exports.blocks=W;exports.blocks$1=L;exports.checkIsDefined=k;exports.components=De;exports.contentVariants=rt;exports.createRegisterComponentMessage=qe;exports.fastClone=I;exports.fetch=J;exports.filterAttrs=T;exports.getAllContent=tt;exports.getBuilderSearchParams=Q;exports.getContent=Y;exports.getMaxWidthQueryForSize=ht;exports.getRenderContentScriptString=je;exports.getSizesForBreakpoints=M;exports.isBrowser=b;exports.isEditing=O;exports.isPreviewing=Ge;exports.logger=v;exports.normalizeComponent=_;exports.processContentResult=Z;exports.register=Xe;exports.serializeComponentInfo=Qe;exports.setEditorSettings=Ye;exports.track=pn;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),n=require("./builder.context.e22f06a0.cjs"),s=require("./index.051a3d7b.cjs"),c=()=>Promise.resolve().then(()=>require("./block.a18a495f.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component Block at ../block.vue",e),e}),l=r.defineComponent({name:"repeated-block",components:{block:c},props:["repeatContext","block","registeredComponents"],data(){return{store:this.repeatContext}},provide(){const e=this;return{[n.builderContext.key]:e.store}}});var i=function(){var t=this,o=t._self._c;return t._self._setupProxy,o("block",{attrs:{block:t.block,context:t.store,registeredComponents:t.registeredComponents}})},a=[],u=s.normalizeComponent(l,i,a,!1,null,null,null,null);const d=u.exports;exports.default=d;
|