@builder.io/sdk-vue 0.7.0 → 0.7.1-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 +6 -2
- package/vue2/lib/browser/{block-134a618c.cjs → block-2cb52597.cjs} +2 -2
- package/vue2/lib/{node/block-169c0cf4.js → browser/block-dc97e982.js} +7 -7
- package/vue2/lib/{edge/block-styles-57f025e0.cjs → browser/block-styles-8f571c43.cjs} +1 -1
- package/vue2/lib/{node/block-styles-d8839dd9.js → browser/block-styles-bc460f14.js} +5 -5
- package/vue2/lib/browser/{block-wrapper-54cd4f6c.cjs → block-wrapper-2d901f3f.cjs} +1 -1
- package/vue2/lib/browser/{block-wrapper-ad23d63e.js → block-wrapper-b1a6d78a.js} +5 -5
- package/vue2/lib/browser/blocks/custom-code/custom-code.vue.d.ts +0 -1
- package/vue2/lib/browser/blocks/image/image.vue.d.ts +1 -1
- package/vue2/lib/{edge/blocks-wrapper-be28f72a.cjs → browser/blocks-wrapper-9e8dd7a2.cjs} +1 -1
- package/vue2/lib/{edge/blocks-wrapper-671e376d.js → browser/blocks-wrapper-fcb480f0.js} +1 -1
- package/vue2/lib/{edge/component-ref-65be9ea0.js → browser/component-ref-68e3a5b6.js} +6 -6
- package/vue2/lib/{edge/component-ref-276a92fb.cjs → browser/component-ref-bc236051.cjs} +1 -1
- package/vue2/lib/browser/components/content/components/enable-editor.vue.d.ts +2 -0
- package/vue2/lib/browser/constants/sdk-version.d.ts +1 -1
- package/vue2/lib/browser/{content-91d3070e.cjs → content-1a8d2e10.cjs} +1 -1
- package/vue2/lib/{edge/content-962ba49d.js → browser/content-76b432c4.js} +62 -64
- package/vue2/lib/browser/{css-2c9ad067.cjs → css-32f0c7fe.cjs} +1 -1
- package/vue2/lib/browser/{css-ccd5d9e3.js → css-d68fe0e5.js} +1 -1
- package/vue2/lib/browser/{enable-editor-d9f53d7d.js → enable-editor-29804f7c.js} +107 -92
- package/vue2/lib/browser/enable-editor-58cd5d33.cjs +1 -0
- package/vue2/lib/browser/evaluate-5f291a57.cjs +1 -0
- package/vue2/lib/browser/evaluate-c21703b5.js +86 -0
- package/vue2/lib/browser/functions/evaluate/choose-eval.d.ts +6 -0
- package/vue2/lib/browser/functions/evaluate/evaluate.d.ts +1 -5
- package/vue2/lib/browser/functions/evaluate/helpers.d.ts +7 -1
- package/vue2/lib/browser/functions/evaluate/node-runtime/index.d.ts +1 -1
- package/vue2/lib/browser/functions/evaluate/node-runtime/node-runtime.d.ts +2 -0
- package/vue2/lib/browser/functions/get-content/types.d.ts +94 -3
- package/vue2/lib/browser/functions/is-node-runtime.d.ts +4 -0
- package/vue2/lib/{node/get-block-actions-e6c36554.js → browser/get-block-actions-47eb8bee.js} +2 -2
- package/vue2/lib/browser/{get-block-actions-7a5e8d90.cjs → get-block-actions-4f4fdc14.cjs} +1 -1
- package/vue2/lib/browser/{get-block-properties-fded8311.js → get-block-properties-14335b2d.js} +2 -2
- package/vue2/lib/{node/get-block-properties-088a8d57.cjs → browser/get-block-properties-4c2072d0.cjs} +1 -1
- package/vue2/lib/browser/{get-processed-block-cb418829.cjs → get-processed-block-7dbd0508.cjs} +1 -1
- package/vue2/lib/browser/{get-processed-block-28afdbdd.js → get-processed-block-9c43bb30.js} +2 -2
- package/vue2/lib/browser/index-7528c088.cjs +32 -0
- package/vue2/lib/{node/index-8b428b10.js → browser/index-bb14138e.js} +382 -367
- package/vue2/lib/browser/index.cjs +1 -1
- package/vue2/lib/browser/index.js +4 -4
- package/vue2/lib/{edge/inlined-script-45e42092.js → browser/inlined-script-431b5967.js} +1 -1
- package/vue2/lib/browser/{inlined-script-36c7686b.cjs → inlined-script-cc25d25c.cjs} +1 -1
- package/vue2/lib/{node/inlined-styles-48c2284e.js → browser/inlined-styles-1717d4f0.js} +1 -1
- package/vue2/lib/{node/inlined-styles-f49a7f1a.cjs → browser/inlined-styles-da08b05d.cjs} +1 -1
- package/vue2/lib/{node/interactive-element-2463f839.cjs → browser/interactive-element-03353733.cjs} +1 -1
- package/vue2/lib/{node/interactive-element-b479db6b.js → browser/interactive-element-ac3e10b7.js} +5 -5
- package/vue2/lib/{node/repeated-block-284f31d8.js → browser/repeated-block-51e74834.js} +2 -2
- package/vue2/lib/browser/{repeated-block-d5a07fb8.cjs → repeated-block-ba80a339.cjs} +1 -1
- package/vue2/lib/browser/style.css +1 -1
- package/vue2/lib/{node/styles-4803ecb4.js → browser/styles-5eb21cb8.js} +2 -2
- package/vue2/lib/{node/styles-f19bff73.cjs → browser/styles-931da5e8.cjs} +2 -2
- package/vue2/lib/{browser/block-169c0cf4.js → edge/block-2c7301d0.js} +7 -7
- package/vue2/lib/{node/block-134a618c.cjs → edge/block-40b0f7b5.cjs} +2 -2
- package/vue2/lib/{node/block-styles-dd554acd.cjs → edge/block-styles-ba691a55.cjs} +1 -1
- package/vue2/lib/edge/{block-styles-9d313184.js → block-styles-bd09453c.js} +5 -5
- package/vue2/lib/{node/block-wrapper-ad23d63e.js → edge/block-wrapper-4210f268.js} +5 -5
- package/vue2/lib/edge/{block-wrapper-252f3467.cjs → block-wrapper-8e1bd00b.cjs} +1 -1
- package/vue2/lib/edge/blocks/custom-code/custom-code.vue.d.ts +0 -1
- package/vue2/lib/edge/blocks/image/image.vue.d.ts +1 -1
- package/vue2/lib/{browser/blocks-wrapper-051a6973.cjs → edge/blocks-wrapper-7e831b51.cjs} +1 -1
- package/vue2/lib/{browser/blocks-wrapper-ba3f831e.js → edge/blocks-wrapper-9c7effa2.js} +1 -1
- package/vue2/lib/{node/component-ref-73bbe275.cjs → edge/component-ref-02d30d18.cjs} +1 -1
- package/vue2/lib/{node/component-ref-7c67cc85.js → edge/component-ref-0404fc38.js} +6 -6
- package/vue2/lib/edge/components/content/components/enable-editor.vue.d.ts +2 -0
- package/vue2/lib/edge/constants/sdk-version.d.ts +1 -1
- package/vue2/lib/{browser/content-c3064d9d.js → edge/content-173f7be0.js} +62 -64
- package/vue2/lib/{node/content-91d3070e.cjs → edge/content-36b34b86.cjs} +1 -1
- package/vue2/lib/{node/css-2c9ad067.cjs → edge/css-00393f8a.cjs} +1 -1
- package/vue2/lib/edge/{css-9d2e1bcb.js → css-081095c1.js} +1 -1
- package/vue2/lib/edge/enable-editor-c36df3b5.cjs +1 -0
- package/vue2/lib/{node/enable-editor-d9f53d7d.js → edge/enable-editor-d3f018c6.js} +107 -92
- package/vue2/lib/edge/evaluate-47aeba42.cjs +21 -0
- package/vue2/lib/edge/{evaluate-becf2384.js → evaluate-d31c253f.js} +379 -346
- package/vue2/lib/edge/functions/evaluate/choose-eval.d.ts +6 -0
- package/vue2/lib/edge/functions/evaluate/evaluate.d.ts +1 -5
- package/vue2/lib/edge/functions/evaluate/helpers.d.ts +7 -1
- package/vue2/lib/edge/functions/evaluate/node-runtime/index.d.ts +1 -1
- package/vue2/lib/edge/functions/evaluate/node-runtime/node-runtime.d.ts +2 -0
- package/vue2/lib/edge/functions/get-content/types.d.ts +94 -3
- package/vue2/lib/edge/functions/is-node-runtime.d.ts +4 -0
- package/vue2/lib/{browser/get-block-actions-e6c36554.js → edge/get-block-actions-33002e58.js} +2 -2
- package/vue2/lib/edge/{get-block-actions-0ed7b9a3.cjs → get-block-actions-fc18e691.cjs} +1 -1
- package/vue2/lib/{browser/get-block-properties-088a8d57.cjs → edge/get-block-properties-c1a43e4b.cjs} +1 -1
- package/vue2/lib/edge/{get-block-properties-c460b7ad.js → get-block-properties-d0176121.js} +2 -2
- package/vue2/lib/edge/{get-processed-block-23aa8a9f.js → get-processed-block-1280c9d5.js} +2 -2
- package/vue2/lib/edge/{get-processed-block-fe5c136a.cjs → get-processed-block-2d9f33f5.cjs} +1 -1
- package/vue2/lib/edge/{index-8d71df29.js → index-6e4d121e.js} +382 -367
- package/vue2/lib/edge/index-ca5baf07.cjs +32 -0
- package/vue2/lib/edge/index.cjs +1 -1
- package/vue2/lib/edge/index.js +4 -4
- package/vue2/lib/{node/inlined-script-de7385eb.js → edge/inlined-script-7a7207fd.js} +1 -1
- package/vue2/lib/{node/inlined-script-36c7686b.cjs → edge/inlined-script-e57329a5.cjs} +1 -1
- package/vue2/lib/{browser/inlined-styles-f49a7f1a.cjs → edge/inlined-styles-9a96b77e.cjs} +1 -1
- package/vue2/lib/edge/{inlined-styles-411ade32.js → inlined-styles-f109793f.js} +1 -1
- package/vue2/lib/{browser/interactive-element-b479db6b.js → edge/interactive-element-6a866621.js} +5 -5
- package/vue2/lib/{browser/interactive-element-2463f839.cjs → edge/interactive-element-9c12c501.cjs} +1 -1
- package/vue2/lib/edge/{repeated-block-8eefee0f.cjs → repeated-block-1093b757.cjs} +1 -1
- package/vue2/lib/{browser/repeated-block-284f31d8.js → edge/repeated-block-f7b967cf.js} +2 -2
- package/vue2/lib/edge/style.css +1 -1
- package/vue2/lib/{browser/styles-f19bff73.cjs → edge/styles-a211b4e1.cjs} +2 -2
- package/vue2/lib/{browser/styles-4803ecb4.js → edge/styles-aa2c087b.js} +2 -2
- package/vue2/lib/{edge/block-04a014ef.js → node/block-979d66e1.js} +7 -7
- package/vue2/lib/{edge/block-7f6b0f80.cjs → node/block-d7e689a7.cjs} +2 -2
- package/vue2/lib/{browser/block-styles-dd554acd.cjs → node/block-styles-00a3a4d7.cjs} +1 -1
- package/vue2/lib/{browser/block-styles-d8839dd9.js → node/block-styles-50528f05.js} +5 -5
- package/vue2/lib/{edge/block-wrapper-e16ccd29.js → node/block-wrapper-8bd5d40b.js} +5 -5
- package/vue2/lib/node/{block-wrapper-54cd4f6c.cjs → block-wrapper-d7b449f1.cjs} +1 -1
- package/vue2/lib/node/blocks/custom-code/custom-code.vue.d.ts +0 -1
- package/vue2/lib/node/blocks/image/image.vue.d.ts +1 -1
- package/vue2/lib/node/{blocks-wrapper-ba3f831e.js → blocks-wrapper-50937fc2.js} +1 -1
- package/vue2/lib/node/{blocks-wrapper-051a6973.cjs → blocks-wrapper-d425bec5.cjs} +1 -1
- package/vue2/lib/{browser/component-ref-7c67cc85.js → node/component-ref-123ffd3c.js} +6 -6
- package/vue2/lib/{browser/component-ref-73bbe275.cjs → node/component-ref-3ba26510.cjs} +1 -1
- package/vue2/lib/node/components/content/components/enable-editor.vue.d.ts +2 -0
- package/vue2/lib/node/constants/sdk-version.d.ts +1 -1
- package/vue2/lib/node/{content-c3064d9d.js → content-d31377e7.js} +62 -64
- package/vue2/lib/{edge/content-6d81d16f.cjs → node/content-d8e76f5c.cjs} +1 -1
- package/vue2/lib/node/{css-ccd5d9e3.js → css-469bd1df.js} +1 -1
- package/vue2/lib/{edge/css-88f2410f.cjs → node/css-c566c7a4.cjs} +1 -1
- package/vue2/lib/node/enable-editor-8c4e460a.cjs +1 -0
- package/vue2/lib/{edge/enable-editor-b6040943.js → node/enable-editor-96dbd852.js} +107 -92
- package/vue2/lib/node/evaluate-45bac138.cjs +41 -0
- package/vue2/lib/node/evaluate-946bbbf4.js +187 -0
- package/vue2/lib/node/functions/evaluate/choose-eval.d.ts +6 -0
- package/vue2/lib/node/functions/evaluate/evaluate.d.ts +1 -5
- package/vue2/lib/node/functions/evaluate/helpers.d.ts +7 -1
- package/vue2/lib/node/functions/evaluate/node-runtime/index.d.ts +1 -1
- package/vue2/lib/node/functions/evaluate/node-runtime/node-runtime.d.ts +2 -0
- package/vue2/lib/node/functions/get-content/types.d.ts +94 -3
- package/vue2/lib/node/functions/is-node-runtime.d.ts +4 -0
- package/vue2/lib/{edge/get-block-actions-046a80d0.js → node/get-block-actions-a7c25deb.js} +2 -2
- package/vue2/lib/node/{get-block-actions-7a5e8d90.cjs → get-block-actions-fa0f60c5.cjs} +1 -1
- package/vue2/lib/node/{get-block-properties-fded8311.js → get-block-properties-5524be2a.js} +2 -2
- package/vue2/lib/{edge/get-block-properties-a9ab7e30.cjs → node/get-block-properties-75f3f91a.cjs} +1 -1
- package/vue2/lib/node/get-processed-block-231c050b.js +52 -0
- package/vue2/lib/node/get-processed-block-e246d1ed.cjs +1 -0
- package/vue2/lib/{browser/index-8b428b10.js → node/index-7ce12494.js} +382 -367
- package/vue2/lib/node/index-ea4df31a.cjs +32 -0
- package/vue2/lib/node/index.cjs +1 -1
- package/vue2/lib/node/index.js +4 -4
- package/vue2/lib/{browser/inlined-script-de7385eb.js → node/inlined-script-073d04d2.js} +1 -1
- package/vue2/lib/{edge/inlined-script-f370acdf.cjs → node/inlined-script-dccfb7fc.cjs} +1 -1
- package/vue2/lib/{edge/inlined-styles-375c218f.cjs → node/inlined-styles-08dbb945.cjs} +1 -1
- package/vue2/lib/{browser/inlined-styles-48c2284e.js → node/inlined-styles-8982c8a6.js} +1 -1
- package/vue2/lib/{edge/interactive-element-0e97e5ad.js → node/interactive-element-caabd2d9.js} +5 -5
- package/vue2/lib/{edge/interactive-element-92851fbe.cjs → node/interactive-element-fc5a4f1d.cjs} +1 -1
- package/vue2/lib/{edge/repeated-block-c41268e9.js → node/repeated-block-0ab8e6be.js} +2 -2
- package/vue2/lib/node/{repeated-block-d5a07fb8.cjs → repeated-block-f65d29a5.cjs} +1 -1
- package/vue2/lib/node/style.css +1 -1
- package/vue2/lib/{edge/styles-633d9689.js → node/styles-6e09a0cc.js} +2 -2
- package/vue2/lib/{edge/styles-f2039a70.cjs → node/styles-96606872.cjs} +2 -2
- package/vue2/package.json +3 -0
- package/vue3/lib/{node/block-wrapper.b3297452.js → browser/block-wrapper.09b54dd3.js} +8 -8
- package/vue3/lib/browser/{block-wrapper.c00ddfcb.cjs → block-wrapper.49af98a6.cjs} +1 -1
- package/vue3/lib/browser/blocks/custom-code/custom-code.vue.d.ts +0 -1
- package/vue3/lib/browser/blocks/image/image.vue.d.ts +1 -1
- package/vue3/lib/{edge/component-ref.f5eef526.js → browser/component-ref.63194b25.js} +17 -17
- package/vue3/lib/browser/component-ref.78f795cd.cjs +1 -0
- package/vue3/lib/browser/components/content/components/enable-editor.vue.d.ts +8 -6
- package/vue3/lib/browser/components/content/content.vue.d.ts +6 -6
- package/vue3/lib/browser/constants/sdk-version.d.ts +1 -1
- package/vue3/lib/browser/functions/evaluate/choose-eval.d.ts +6 -0
- package/vue3/lib/browser/functions/evaluate/evaluate.d.ts +1 -5
- package/vue3/lib/browser/functions/evaluate/helpers.d.ts +7 -1
- package/vue3/lib/browser/functions/evaluate/node-runtime/index.d.ts +1 -1
- package/vue3/lib/browser/functions/evaluate/node-runtime/node-runtime.d.ts +2 -0
- package/vue3/lib/browser/functions/get-content/types.d.ts +94 -3
- package/vue3/lib/browser/functions/is-node-runtime.d.ts +4 -0
- package/vue3/lib/{edge/get-block-actions.c5c7e487.cjs → browser/get-block-actions.2e99e179.cjs} +1 -1
- package/vue3/lib/{edge/get-block-actions.f1dcfc47.js → browser/get-block-actions.4f330889.js} +1 -1
- package/vue3/lib/{node/index.c51504ff.js → browser/index.88b433c6.js} +826 -795
- package/vue3/lib/browser/index.c04232f6.cjs +69 -0
- package/vue3/lib/browser/index.cjs +1 -1
- package/vue3/lib/browser/index.js +1 -1
- package/vue3/lib/{edge/repeated-block.e2eb73cd.js → browser/repeated-block.067ee555.js} +6 -6
- package/vue3/lib/browser/{repeated-block.2245fce7.cjs → repeated-block.ef8176d8.cjs} +1 -1
- package/vue3/lib/edge/{block-wrapper.6e434dc7.cjs → block-wrapper.2d4ec833.cjs} +1 -1
- package/vue3/lib/{browser/block-wrapper.b3297452.js → edge/block-wrapper.4b2f2fb3.js} +8 -8
- package/vue3/lib/edge/blocks/custom-code/custom-code.vue.d.ts +0 -1
- package/vue3/lib/edge/blocks/image/image.vue.d.ts +1 -1
- package/vue3/lib/{node/component-ref.88102d68.js → edge/component-ref.98beaea3.js} +17 -17
- package/vue3/lib/edge/component-ref.d8514fb0.cjs +1 -0
- package/vue3/lib/edge/components/content/components/enable-editor.vue.d.ts +8 -6
- package/vue3/lib/edge/components/content/content.vue.d.ts +6 -6
- package/vue3/lib/edge/constants/sdk-version.d.ts +1 -1
- package/vue3/lib/edge/functions/evaluate/choose-eval.d.ts +6 -0
- package/vue3/lib/edge/functions/evaluate/evaluate.d.ts +1 -5
- package/vue3/lib/edge/functions/evaluate/helpers.d.ts +7 -1
- package/vue3/lib/edge/functions/evaluate/node-runtime/index.d.ts +1 -1
- package/vue3/lib/edge/functions/evaluate/node-runtime/node-runtime.d.ts +2 -0
- package/vue3/lib/edge/functions/get-content/types.d.ts +94 -3
- package/vue3/lib/edge/functions/is-node-runtime.d.ts +4 -0
- package/vue3/lib/{node/get-block-actions.703f8554.cjs → edge/get-block-actions.407fbfa9.cjs} +1 -1
- package/vue3/lib/{browser/get-block-actions.1865148e.js → edge/get-block-actions.b460cca3.js} +1 -1
- package/vue3/lib/edge/index.8bdc4716.cjs +89 -0
- package/vue3/lib/edge/{index.f80ab661.js → index.a8ffb479.js} +1352 -1293
- package/vue3/lib/edge/index.cjs +1 -1
- package/vue3/lib/edge/index.js +1 -1
- package/vue3/lib/{browser/repeated-block.f6fdedb6.js → edge/repeated-block.cc9bbed2.js} +6 -6
- package/vue3/lib/edge/{repeated-block.8292d33a.cjs → repeated-block.f5d444e9.cjs} +1 -1
- package/vue3/lib/node/block-wrapper.25e28ca3.cjs +1 -0
- package/vue3/lib/{edge/block-wrapper.dad1bb39.js → node/block-wrapper.56bce6c4.js} +7 -6
- package/vue3/lib/node/blocks/custom-code/custom-code.vue.d.ts +0 -1
- package/vue3/lib/node/blocks/image/image.vue.d.ts +1 -1
- package/vue3/lib/node/component-ref.c35ae123.cjs +1 -0
- package/vue3/lib/{browser/component-ref.88102d68.js → node/component-ref.cd59ca4d.js} +18 -17
- package/vue3/lib/node/components/content/components/enable-editor.vue.d.ts +8 -6
- package/vue3/lib/node/components/content/content.vue.d.ts +6 -6
- package/vue3/lib/node/constants/sdk-version.d.ts +1 -1
- package/vue3/lib/node/functions/evaluate/choose-eval.d.ts +6 -0
- package/vue3/lib/node/functions/evaluate/evaluate.d.ts +1 -5
- package/vue3/lib/node/functions/evaluate/helpers.d.ts +7 -1
- package/vue3/lib/node/functions/evaluate/node-runtime/index.d.ts +1 -1
- package/vue3/lib/node/functions/evaluate/node-runtime/node-runtime.d.ts +2 -0
- package/vue3/lib/node/functions/get-content/types.d.ts +94 -3
- package/vue3/lib/node/functions/is-node-runtime.d.ts +4 -0
- package/vue3/lib/{browser/get-block-actions.703f8554.cjs → node/get-block-actions.0d715e21.cjs} +1 -1
- package/vue3/lib/node/{get-block-actions.1865148e.js → get-block-actions.3df391e9.js} +1 -1
- package/vue3/lib/{browser/index.c51504ff.js → node/index.88589866.js} +977 -852
- package/vue3/lib/node/index.b2d2bb5e.cjs +109 -0
- package/vue3/lib/node/index.cjs +1 -1
- package/vue3/lib/node/index.js +27 -26
- package/vue3/lib/node/{repeated-block.f6fdedb6.js → repeated-block.57ca2ba1.js} +7 -6
- package/vue3/lib/node/repeated-block.78ed5bbb.cjs +1 -0
- package/vue3/package.json +3 -0
- package/vue2/lib/browser/enable-editor-f87e3e48.cjs +0 -1
- package/vue2/lib/browser/evaluate-043734e5.cjs +0 -1
- package/vue2/lib/browser/evaluate-b309ef11.js +0 -81
- package/vue2/lib/browser/index-7b952a40.cjs +0 -32
- package/vue2/lib/edge/enable-editor-617a4b09.cjs +0 -1
- package/vue2/lib/edge/evaluate-e31fc7a4.cjs +0 -21
- package/vue2/lib/edge/index-cb2684cd.cjs +0 -32
- package/vue2/lib/node/enable-editor-f87e3e48.cjs +0 -1
- package/vue2/lib/node/evaluate-043734e5.cjs +0 -1
- package/vue2/lib/node/evaluate-b309ef11.js +0 -81
- package/vue2/lib/node/get-processed-block-28afdbdd.js +0 -58
- package/vue2/lib/node/get-processed-block-cb418829.cjs +0 -1
- package/vue2/lib/node/index-7b952a40.cjs +0 -32
- package/vue3/lib/browser/component-ref.5446db23.cjs +0 -1
- package/vue3/lib/browser/index.403011b1.cjs +0 -69
- package/vue3/lib/edge/component-ref.94b009f1.cjs +0 -1
- package/vue3/lib/edge/index.61c09215.cjs +0 -89
- package/vue3/lib/node/block-wrapper.c00ddfcb.cjs +0 -1
- package/vue3/lib/node/component-ref.5446db23.cjs +0 -1
- package/vue3/lib/node/index.403011b1.cjs +0 -69
- package/vue3/lib/node/repeated-block.2245fce7.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("vue"),m=require("./evaluate-5f291a57.cjs"),r=require("./index-7528c088.cjs"),v="0.7.1-1",x=()=>{r.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,r.isBrowser()&&((e=window.parent)==null||e.postMessage({type:"builder.sdkInfo",data:{target:r.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 a=i.data.text,l=i.data.arguments||[],c=i.data.id,C=new Function(a);let d,u=null;try{d=C.apply(null,l)}catch(h){u=h}u?(o=window.parent)==null||o.postMessage({type:"builder.evaluateError",data:{id:c,error:u.message}},"*"):d&&typeof d.then=="function"?d.then(h=>{var p;(p=window.parent)==null||p.postMessage({type:"builder.evaluateResult",data:{id:c,result:h}},"*")}).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 k=(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=>k(n,e=>{const t=e.getAttribute("builder-id")||e.id;return(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),a=g(o/t.height);return{x:s,y:a}},y=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}}},_=S.defineComponent({name:"enable-editor",props:["builderContextSignal","model","context","canTrack","apiKey","locale","includeRefs","enrich","content","showContent","classNameProp"],data(){return{forceReRenderCount:0,lastUpdated:0,shouldSendResetCookie:!1,httpReqsData:{},clicked:!1,builderContext:r.builderContext}},provide(){const n=this;return{[r.builderContext.key]:n.builderContextSignal}},mounted(){(()=>{var t,i;if(r.isBrowser()){if(r.isEditing()&&this.$refs.elementRef&&this.$refs.elementRef.dispatchEvent(new CustomEvent("initeditingbldr")),this.builderContextSignal.content&&r.getDefaultCanTrack(this.canTrack)){const s=(t=this.builderContextSignal.content)==null?void 0:t.testVariationId,a=(i=this.builderContextSignal.content)==null?void 0:i.id,l=this.apiKey;r._track({type:"impression",canTrack:!0,contentId:a,apiKey:l,variationId:s!==a?s:void 0})}r.isPreviewing()&&this.$refs.elementRef&&this.$refs.elementRef.dispatchEvent(new CustomEvent("initpreviewingbldr"))}})(),(()=>{this.apiKey||r.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),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(){r.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,a;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)||((a=(s=this.builderContextSignal.content)==null?void 0:s.meta)==null?void 0:a.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&&m.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;r._track({type:"click",canTrack:r.getDefaultCanTrack(this.canTrack),contentId:o,apiKey:this.apiKey,variationId:i!==o?i:void 0,...y(n),unique:!this.clicked})}this.clicked||(this.clicked=!0)},evalExpression(n){return n.replace(/{{([^}]+)}}/g,(e,t)=>m.evaluate({code:t,context:this.context||{},localState:void 0,rootState:this.builderContextSignal.rootState,rootSetState:this.builderContextSignal.rootSetState}))},handleRequest({url:n,key:e}){r.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;const n=((t=(e=this.builderContextSignal.content)==null?void 0:e.data)==null?void 0:t.httpRequests)??{};Object.entries(n).forEach(([i,o])=>{if(o&&(!this.httpReqsData[i]||r.isEditing())){const s=this.evalExpression(o);this.handleRequest({url:s,key:i})}})},emitStateUpdate(){r.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:r.fastClone(this.builderContextSignal.rootState),ref:{name:this.model}}}))},elementRef_onIniteditingbldr(n){this.forceReRenderCount=this.forceReRenderCount+1,window.addEventListener("message",this.processMessage),x(),R({...this.locale?{locale:this.locale}:{},...this.includeRefs?{includeRefs:this.includeRefs}:{},...this.enrich?{enrich:this.enrich}:{}}),Object.values(this.builderContextSignal.componentInfos).forEach(e=>{var i;const t=r.createRegisterComponentMessage(e);(i=window.parent)==null||i.postMessage(t,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate)},elementRef_onInitpreviewingbldr(n){const e=new URL(location.href).searchParams,t=e.get("builder.preview"),i=e.get(`builder.preview.${t}`),o=e.get("apiKey")||e.get("builder.space");t===this.model&&o===this.apiKey&&(!this.content||i===this.content.id)&&r.fetchOneEntry({model:this.model,apiKey:this.apiKey,apiVersion:this.builderContextSignal.apiVersion}).then(s=>{s&&this.mergeNewContent(s)})},_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 E=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)},initeditingbldr:function(o){return e.elementRef_onIniteditingbldr(o)},initpreviewingbldr:function(o){return e.elementRef_onInitpreviewingbldr(o)}}},"div",{...e.showContent?{}:{hidden:!0,"aria-hidden":!0}},!1),[e._t("default")],2):e._e()},I=[],M=r.normalizeComponent(_,E,I,!1,null,null,null,null);const U=M.exports;exports.default=U;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("./index-7528c088.cjs"),l=({builder:r,context:e,event:n,state:i})=>Object.entries({state:i,Builder:r,builder:r,context:e,event:n}),a=()=>({isEditing:t.isEditing(),isBrowser:t.isBrowser(),isServer:!t.isBrowser(),getUserAttributes:()=>t.getUserAttributes()}),d=(r,{isExpression:e=!0})=>e&&!(r.includes(";")||r.includes(" return ")||r.trim().startsWith("return "))?`return (${r});`:r,w=({code:r,builder:e,context:n,event:i,localState:s,rootSetState:u,rootState:g})=>{const c=l({builder:e,context:n,event:i,state:f(g,s,u)});return new Function(...c.map(([o])=>o),r)(...c.map(([,o])=>o))};function f(r,e,n){if(r===e)throw new Error("rootState === localState");return new Proxy(r,{get:(i,s)=>e&&s in e?e[s]:r[s],set:(i,s,u)=>{if(e&&s in e)throw new Error("Writing to local state is not allowed as it is read-only.");return r[s]=u,n==null||n(r),!0}})}const v=r=>(t.isBrowser(),w(r));function B({code:r,context:e,localState:n,rootState:i,rootSetState:s,event:u,isExpression:g=!0}){if(r===""){t.logger.warn("Skipping evaluation of empty code block.");return}const c={code:d(r,{isExpression:g}),builder:a(),context:e,event:u,rootSetState:s,rootState:i,localState:n};try{return v(c)}catch(o){t.logger.error("Failed code evaluation: "+o.message,{code:r});return}}exports.evaluate=B;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { i as l, m as a, w as d, v as g } from "./index-bb14138e.js";
|
|
2
|
+
const f = ({
|
|
3
|
+
builder: r,
|
|
4
|
+
context: e,
|
|
5
|
+
event: n,
|
|
6
|
+
state: i
|
|
7
|
+
}) => Object.entries({
|
|
8
|
+
state: i,
|
|
9
|
+
Builder: r,
|
|
10
|
+
// legacy
|
|
11
|
+
builder: r,
|
|
12
|
+
context: e,
|
|
13
|
+
event: n
|
|
14
|
+
}), m = () => ({
|
|
15
|
+
isEditing: l(),
|
|
16
|
+
isBrowser: a(),
|
|
17
|
+
isServer: !a(),
|
|
18
|
+
getUserAttributes: () => d()
|
|
19
|
+
}), v = (r, {
|
|
20
|
+
isExpression: e = !0
|
|
21
|
+
}) => /* we disable this for cases where we definitely don't want a return */ e && !(r.includes(";") || r.includes(" return ") || r.trim().startsWith("return ")) ? `return (${r});` : r, w = ({
|
|
22
|
+
code: r,
|
|
23
|
+
builder: e,
|
|
24
|
+
context: n,
|
|
25
|
+
event: i,
|
|
26
|
+
localState: s,
|
|
27
|
+
rootSetState: t,
|
|
28
|
+
rootState: c
|
|
29
|
+
}) => {
|
|
30
|
+
const o = f({
|
|
31
|
+
builder: e,
|
|
32
|
+
context: n,
|
|
33
|
+
event: i,
|
|
34
|
+
state: B(c, s, t)
|
|
35
|
+
});
|
|
36
|
+
return new Function(...o.map(([u]) => u), r)(...o.map(([, u]) => u));
|
|
37
|
+
};
|
|
38
|
+
function B(r, e, n) {
|
|
39
|
+
if (r === e)
|
|
40
|
+
throw new Error("rootState === localState");
|
|
41
|
+
return new Proxy(r, {
|
|
42
|
+
get: (i, s) => e && s in e ? e[s] : r[s],
|
|
43
|
+
set: (i, s, t) => {
|
|
44
|
+
if (e && s in e)
|
|
45
|
+
throw new Error("Writing to local state is not allowed as it is read-only.");
|
|
46
|
+
return r[s] = t, n == null || n(r), !0;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
const b = (r) => (a(), w(r));
|
|
51
|
+
function E({
|
|
52
|
+
code: r,
|
|
53
|
+
context: e,
|
|
54
|
+
localState: n,
|
|
55
|
+
rootState: i,
|
|
56
|
+
rootSetState: s,
|
|
57
|
+
event: t,
|
|
58
|
+
isExpression: c = !0
|
|
59
|
+
}) {
|
|
60
|
+
if (r === "") {
|
|
61
|
+
g.warn("Skipping evaluation of empty code block.");
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const o = {
|
|
65
|
+
code: v(r, {
|
|
66
|
+
isExpression: c
|
|
67
|
+
}),
|
|
68
|
+
builder: m(),
|
|
69
|
+
context: e,
|
|
70
|
+
event: t,
|
|
71
|
+
rootSetState: s,
|
|
72
|
+
rootState: i,
|
|
73
|
+
localState: n
|
|
74
|
+
};
|
|
75
|
+
try {
|
|
76
|
+
return b(o);
|
|
77
|
+
} catch (u) {
|
|
78
|
+
g.error("Failed code evaluation: " + u.message, {
|
|
79
|
+
code: r
|
|
80
|
+
});
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
export {
|
|
85
|
+
E as e
|
|
86
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ExecutorArgs } from './helpers.js';
|
|
2
|
+
/**
|
|
3
|
+
* Even though we have separate runtimes for browser/node/edge, sometimes frameworks will
|
|
4
|
+
* end up sending the server runtime code to the browser (most notably in dev mode).
|
|
5
|
+
*/
|
|
6
|
+
export declare const chooseBrowserOrServerEval: (args: ExecutorArgs) => any;
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type EvaluatorArgs = Omit<ExecutorArgs, 'builder' | 'event'> & {
|
|
3
|
-
event?: Event;
|
|
4
|
-
isExpression?: boolean;
|
|
5
|
-
};
|
|
1
|
+
import type { EvaluatorArgs } from './helpers.js';
|
|
6
2
|
export declare function evaluate({ code, context, localState, rootState, rootSetState, event, isExpression }: EvaluatorArgs): any;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { BuilderContextInterface, BuilderRenderState } from '../../context/types.js';
|
|
2
|
-
import
|
|
2
|
+
import { getUserAttributes } from '../track/helpers.js';
|
|
3
|
+
export type EvaluatorArgs = Omit<ExecutorArgs, 'builder' | 'event'> & {
|
|
4
|
+
event?: Event;
|
|
5
|
+
isExpression?: boolean;
|
|
6
|
+
};
|
|
3
7
|
export type BuilderGlobals = {
|
|
4
8
|
isEditing: boolean | undefined;
|
|
5
9
|
isBrowser: boolean | undefined;
|
|
@@ -16,3 +20,5 @@ export type FunctionArguments = ReturnType<typeof getFunctionArguments>;
|
|
|
16
20
|
export declare const getFunctionArguments: ({ builder, context, event, state }: Pick<ExecutorArgs, "context" | "builder" | "event"> & {
|
|
17
21
|
state: BuilderRenderState;
|
|
18
22
|
}) => any;
|
|
23
|
+
export declare const getBuilderGlobals: () => BuilderGlobals;
|
|
24
|
+
export declare const parseCode: (code: string, { isExpression }: Pick<EvaluatorArgs, 'isExpression'>) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { evaluator } from '
|
|
1
|
+
export { runInNode as evaluator } from './node-runtime.js';
|
|
@@ -5,11 +5,42 @@ export interface GetContentOptions {
|
|
|
5
5
|
apiKey: string;
|
|
6
6
|
/** Number of items to fetch. Default is 1 */
|
|
7
7
|
limit?: number;
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* Use to specify an offset for pagination of results. The default is 0.
|
|
10
|
+
*/
|
|
11
|
+
offset?: number;
|
|
12
|
+
/**
|
|
13
|
+
* User attribute key value pairs to be used for targeting
|
|
14
|
+
* https://www.builder.io/c/docs/custom-targeting-attributes
|
|
15
|
+
*
|
|
16
|
+
* e.g.
|
|
17
|
+
* ```js
|
|
18
|
+
* userAttributes: {
|
|
19
|
+
* urlPath: '/',
|
|
20
|
+
* returnVisitor: true,
|
|
21
|
+
* device: 'mobile'
|
|
22
|
+
* }
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
9
25
|
userAttributes?: (Record<string, string> & {
|
|
10
26
|
urlPath?: string;
|
|
11
27
|
}) | null;
|
|
12
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Mongodb style query of your data. E.g.:
|
|
30
|
+
*
|
|
31
|
+
* ```js
|
|
32
|
+
* query: {
|
|
33
|
+
* id: 'abc123',
|
|
34
|
+
* data: {
|
|
35
|
+
* myCustomField: { $gt: 20 },
|
|
36
|
+
* }
|
|
37
|
+
* }
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* See more info on MongoDB's query operators and format.
|
|
41
|
+
*
|
|
42
|
+
* @see {@link https://docs.mongodb.com/manual/reference/operator/query/}
|
|
43
|
+
*/
|
|
13
44
|
query?: Record<string, any>;
|
|
14
45
|
/**
|
|
15
46
|
* Any other API options.
|
|
@@ -30,7 +61,7 @@ export interface GetContentOptions {
|
|
|
30
61
|
*/
|
|
31
62
|
canTrack?: boolean;
|
|
32
63
|
/**
|
|
33
|
-
* Include references in the response. Defaults to `true`.
|
|
64
|
+
* Include content of references in the response. Defaults to `true`.
|
|
34
65
|
* @deprecated use `enrich` instead
|
|
35
66
|
*/
|
|
36
67
|
includeRefs?: boolean;
|
|
@@ -48,4 +79,64 @@ export interface GetContentOptions {
|
|
|
48
79
|
* Defaults to `v3`.
|
|
49
80
|
*/
|
|
50
81
|
apiVersion?: 'v2' | 'v3';
|
|
82
|
+
/**
|
|
83
|
+
* Only include these fields.
|
|
84
|
+
* Note: 'omit' takes precedence over 'fields'
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```
|
|
88
|
+
* fields: 'id, name, data.customField'
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
fields?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Omit only these fields.
|
|
94
|
+
* Note: 'omit' takes precedence over 'fields'
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```
|
|
98
|
+
* omit: 'data.bigField,data.blocks'
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
omit?: string;
|
|
102
|
+
/**
|
|
103
|
+
* Seconds to cache content. Sets the max-age of the cache-control header
|
|
104
|
+
* response header.
|
|
105
|
+
*
|
|
106
|
+
* Use a higher value for better performance, lower for content that will change more frequently
|
|
107
|
+
*
|
|
108
|
+
* @see {@link https://www.builder.io/c/docs/query-api#__next:~:text=%26includeRefs%3Dtrue-,cacheSeconds,-No}
|
|
109
|
+
*/
|
|
110
|
+
cacheSeconds?: number;
|
|
111
|
+
/**
|
|
112
|
+
* Builder.io uses stale-while-revalidate caching at the CDN level. This means we always serve
|
|
113
|
+
* from edge cache and update caches in the background for maximum possible performance. This also
|
|
114
|
+
* means that the more frequently content is requested, the more fresh it will be. The longest we
|
|
115
|
+
* will ever hold something in stale cache is 1 day by default, and you can set this to be shorter
|
|
116
|
+
* yourself as well. We suggest keeping this high unless you have content that must change rapidly
|
|
117
|
+
* and gets very little traffic.
|
|
118
|
+
*
|
|
119
|
+
* @see {@link https://www.fastly.com/blog/prevent-application-network-instability-serve-stale-content}
|
|
120
|
+
*/
|
|
121
|
+
staleCacheSeconds?: number;
|
|
122
|
+
/**
|
|
123
|
+
* Property to order results by.
|
|
124
|
+
* Use 1 for ascending and -1 for descending.
|
|
125
|
+
*
|
|
126
|
+
* The key is what you're sorting on, so the following example sorts by createdDate
|
|
127
|
+
* and because the value is 1, the sort is ascending.
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```
|
|
131
|
+
* createdDate: 1
|
|
132
|
+
* ```
|
|
133
|
+
*/
|
|
134
|
+
sort?: {
|
|
135
|
+
[key: string]: 1 | -1;
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* Include content entries in a response that are still in
|
|
139
|
+
* draft mode and un-archived. Default is false.
|
|
140
|
+
*/
|
|
141
|
+
includeUnpublished?: boolean;
|
|
51
142
|
}
|
package/vue2/lib/{node/get-block-actions-e6c36554.js → browser/get-block-actions-47eb8bee.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as n } from "./index-
|
|
2
|
-
import { e as s } from "./evaluate-
|
|
1
|
+
import { T as n } from "./index-bb14138e.js";
|
|
2
|
+
import { e as s } from "./evaluate-c21703b5.js";
|
|
3
3
|
const l = (e) => `v-on:${e.toLowerCase()}`, i = (e, t) => (o) => s({
|
|
4
4
|
code: e,
|
|
5
5
|
context: t.context,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("./index-
|
|
1
|
+
"use strict";const r=require("./index-7528c088.cjs"),s=require("./evaluate-5f291a57.cjs"),l=e=>`v-on:${e.toLowerCase()}`,i=(e,t)=>o=>s.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:o,isExpression:!1});function u(e){const t={},o=e.block.actions??{};for(const c in o){if(!o.hasOwnProperty(c))continue;const n=o[c];let a=l(c);if(e.stripPrefix)switch(r.TARGET){case"vue2":case"vue3":a=a.replace("v-on:","");break;case"svelte":a=a.replace("on:","");break}t[a]=i(n,e)}return t}exports.getBlockActions=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const c=require("./index-
|
|
1
|
+
"use strict";const c=require("./index-7528c088.cjs"),n=require("./css-32f0c7fe.cjs");function i(e){const t={};if(typeof e!="string")return t;const s=e.trim().split(/\\s+/);for(const r of s)t[r]=!0;return t}function o(e){return e.class=i(e.class),e}const a=e=>({href:e.href});function u({block:e,context:t}){var r;const s={...a(e),...e.properties,"builder-id":e.id,style:e.style?l(e.style):void 0,class:[e.id,"builder-block",e.class,(r=e.properties)==null?void 0:r.class].filter(Boolean).join(" ")};return o(s)}function l(e){switch(c.TARGET){case"svelte":case"vue2":case"vue3":case"solid":return n.convertStyleMapToCSSArray(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}exports.getBlockProperties=u;
|
package/vue2/lib/browser/{get-processed-block-cb418829.cjs → get-processed-block-7dbd0508.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const d=require("./evaluate-
|
|
1
|
+
"use strict";const d=require("./evaluate-5f291a57.cjs"),g=require("./index-7528c088.cjs"),f=(e,i,o)=>{if(Object(e)!==e)return e;const t=Array.isArray(i)?i:i.toString().match(/[^.[\]]+/g);return t.slice(0,-1).reduce((r,n,s)=>Object(r[n])===r[n]?r[n]:r[n]=Math.abs(Number(t[s+1]))>>0===+t[s+1]?[]:{},e)[t[t.length-1]]=o,e};const l=({block:e,context:i,localState:o,rootState:t,rootSetState:r})=>{if(!e.bindings)return e;const n=g.fastClone(e),s={...n,properties:{...n.properties},actions:{...n.actions}};for(const c in e.bindings){const u=e.bindings[c],a=d.evaluate({code:u,localState:o,rootState:t,rootSetState:r,context:i});f(s,c,a)}return s};function p({block:e,context:i,shouldEvaluateBindings:o,localState:t,rootState:r,rootSetState:n}){const s=e;return o?l({block:s,localState:t,rootState:r,rootSetState:n,context:i}):s}exports.getProcessedBlock=p;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";const v=require("vue");function A(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 yt=v.defineComponent({name:"builder-button",props:["attributes","text","link","openLinkInNewTab"],data(){return{filterAttrs:A}},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 g(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(l){l=l||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!l&&typeof __VUE_SSR_CONTEXT__<"u"&&(l=__VUE_SSR_CONTEXT__),r&&r.call(this,l),l&&l._registeredComponents&&l._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 p=a.render;a.render=function(f,m){return d.call(m),p(f,m)}}else{var b=a.beforeCreate;a.beforeCreate=b?[].concat(b,d):[d]}return{exports:e,options:a}}var vt=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)+" ")])},St=[],kt=g(yt,vt,St,!1,null,"d03c6eb1",null,null);const Ct=kt.exports,E=e=>JSON.parse(JSON.stringify(e)),H={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},xt=(e,t=H)=>`@media (max-width: ${t[e].max}px)`,J=({small:e,medium:t})=>{const n=E(H);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",wt=()=>Promise.resolve().then(()=>Y).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-da08b05d.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}),Tt=v.defineComponent({name:"builder-columns",components:{"inlined-styles":$t,blocks:wt},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 J(((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 Rt=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:{path:`component.options.columns.${r}.blocks`,parent:t.builderBlock.id,styleProp:{flexGrow:"1"},context:t.builderContext,registeredComponents:t.builderComponents,blocks:o.blocks}})],1)})],2)},It=[],Pt=g(Tt,Rt,It,!1,null,"c700504e",null,null);const At=Pt.exports,Et=v.defineComponent({name:"builder-fragment-component",props:[]});var Ot=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("span",[t._t("default")],2)},Vt=[],Bt=g(Et,Ot,Vt,!1,null,null,null,null);const Nt=Bt.exports;function K(e){return e.replace(/http(s)?:/,"")}function jt(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 Ft(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return K(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 K(`${o[0]}_${s}${r}`)}return null}function V(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=>`${jt(e,"width",r)} ${r}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[Ft(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,o])=>`${n} ${o}w`).concat([e]).join(", "):e}const Ut=v.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&&n.includes("builder.io/api/v1/image"))){if(!this.srcset.includes(this.image.split("?")[0]))return console.debug("Removed given srcset"),V(t)}else if(this.image&&!this.srcset)return V(t);return V(t)},webpSrcSet(){var e;return(e=this.srcSetToUse)!=null&&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 Mt=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&&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&&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)},Wt=[],Lt=g(Ut,Mt,Wt,!1,null,"aae97bc7",null,null);const Kt=Lt.exports,zt=v.defineComponent({name:"builder-section-component",props:["attributes","maxWidth"],data(){return{filterAttrs:A}}});var Gt=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)},Dt=[],qt=g(zt,Gt,Dt,!1,null,null,null,null);const Ht=qt.exports,T="[Builder.io]: ",k={log:(...e)=>console.log(T,...e),error:(...e)=>console.error(T,...e),warn:(...e)=>console.warn(T,...e),debug:(...e)=>console.debug(T,...e)},Jt=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return O({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{k.error("Could not fetch symbol content: ",n)})},Qt=()=>Promise.resolve().then(()=>De).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}),Xt=v.defineComponent({name:"builder-symbol",components:{"content-variants":Qt},props:["js","attributes","symbol","dynamic","builderContext","builderComponents"],data(){var e;return{contentToUse:(e=this.symbol)==null?void 0:e.content,filterAttrs:A}},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&&t.dynamic||this.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")},onUpdateHook0(){return{0:this.symbol}}},methods:{setContent(){this.contentToUse||Jt({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 Yt=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)},Zt=[],te=g(Xt,Yt,Zt,!1,null,null,null,null);const ee=te.exports,ne=v.defineComponent({name:"builder-text",props:["text"]});var oe=function(){var o;var t=this,n=t._self._c;return t._self._setupProxy,n("div",{staticClass:"builder-text",style:{outline:"none"},domProps:{innerHTML:t._s(((o=t.text)==null?void 0:o.toString())||"")}})},re=[],se=g(ne,oe,re,!1,null,null,null,null);const ie=se.exports,ae=v.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))},le=[],ue=g(ae,ce,le,!1,null,null,null,null);const de=ue.exports,me=Symbol(),Q={Builder:{content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{}},key:me},fe=Symbol(),X={Components:{registeredComponents:{}},key:fe},pe=()=>Promise.resolve().then(()=>require("./block-styles-8f571c43.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}),he=()=>Promise.resolve().then(()=>require("./block-2cb52597.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component Block at ../block/block.vue",e),e}),ge=()=>Promise.resolve().then(()=>require("./blocks-wrapper-9e8dd7a2.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component BlocksWrapper at ./blocks-wrapper.vue",e),e}),_e=v.defineComponent({name:"builder-blocks",components:{"blocks-wrapper":ge,block:he,"block-styles":pe},props:["blocks","parent","path","styleProp","context","registeredComponents"],inject:{builderContext:Q.key,componentsContext:X.key}});var be=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||t.builderContext,registeredComponents:t.registeredComponents||t.componentsContext.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.builderContext}})}):t._e()],2)},ye=[],ve=g(_e,be,ye,!1,null,null,null,null);const B=ve.exports,Y=Object.freeze(Object.defineProperty({__proto__:null,default:B},Symbol.toStringTag,{value:"Module"}));function _(){return typeof window<"u"&&typeof document<"u"}const R=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),Se=({canTrack:e,content:t})=>!(!(R(t).length>0)||!e);function ke(e,t,n){var i;function o(){function u(m,h,y){let S="";if(y){const c=new Date;c.setTime(c.getTime()+y*24*60*60*1e3),S="; expires="+c.toUTCString()}document.cookie=m+"="+(h||"")+S+"; path=/; Secure; SameSite=None"}function a(m){const h=m+"=",y=document.cookie.split(";");for(let S=0;S<y.length;S++){let c=y[S];for(;c.charAt(0)===" ";)c=c.substring(1,c.length);if(c.indexOf(h)===0)return c.substring(h.length,c.length)}return null}const d=`builder.tests.${e}`,p=a(d),b=t.map(m=>m.id).concat(e);if(p&&b.includes(p))return p;let l=0;const f=Math.random();for(let m=0;m<t.length;m++){const h=t[m],y=h.testRatio;if(l+=y,f<l)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; }
|
|
26
|
+
`).join("");s.innerHTML=u}}function Ce(e,t,n){var a;if(!navigator.cookieEnabled)return;function o(d){const p=d+"=",b=document.cookie.split(";");for(let l=0;l<b.length;l++){let f=b[l];for(;f.charAt(0)===" ";)f=f.substring(1,f.length);if(f.indexOf(p)===0)return f.substring(p.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 xe=e=>e==="react"||e==="reactNative",Z=xe(w),tt="builderIoAbTest",et="builderIoRenderContent",we=()=>{const e=ke.toString().replace(/\s+/g," "),t=Ce.toString().replace(/\s+/g," ");return`
|
|
27
|
+
window.${tt} = ${e}
|
|
28
|
+
window.${et} = ${t}
|
|
29
|
+
`},$e=(e,t)=>`
|
|
30
|
+
window.${tt}("${t}",${JSON.stringify(e)}, ${Z})`,Te=({contentId:e,variationId:t})=>`
|
|
31
|
+
window.${et}("${t}", "${e}", ${Z})`,x=e=>e!=null,P=e=>x(e)?e:!0,Re=e=>{if(e==="localhost"||e==="127.0.0.1")return e;const t=e.split(".");return t.length>2?t.slice(1).join("."):e},nt=({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){k.warn("[COOKIE] GET error: ",(o==null?void 0:o.message)||o);return}},ot=async e=>nt(e),Ie=e=>e.map(([t,n])=>n?`${t}=${n}`:t).filter(x).join("; "),Pe=[["secure",""],["SameSite","None"]],Ae=({name:e,value:t,expires:n})=>{const r=(_()?location.protocol==="https:":!0)?Pe:[[]],s=n?[["expires",n.toUTCString()]]:[[]],i=[[e,t],...s,["path","/"],["domain",Re(window.location.hostname)],...r];return Ie(i)},rt=async({name:e,value:t,expires:n,canTrack:o})=>{try{if(!o)return;const r=Ae({name:e,value:t,expires:n});document.cookie=r}catch(r){k.warn("[COOKIE] SET error: ",(r==null?void 0:r.message)||r)}},Ee="builder.tests",N=e=>`${Ee}.${e}`,Oe=({contentId:e})=>ot({name:N(e),canTrack:!0}),Ve=({contentId:e})=>nt({name:N(e),canTrack:!0}),Be=({contentId:e,value:t})=>rt({name:N(e),value:t,canTrack:!0}),st=e=>x(e.id)&&x(e.variations)&&Object.keys(e.variations).length>0,Ne=({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},it=e=>{const t=Ne(e);return Be({contentId:e.id,value:t}).catch(n=>{k.error("could not store A/B test variation: ",n)}),t},at=({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":"")}},je=({item:e,canTrack:t})=>{if(!t)return e;if(!e)return;if(!st(e))return e;const n=Ve({contentId:e.id})||it({variations:e.variations,id:e.id}),o=at({item:e,testGroupId:n});return{...e,...o}},Fe=async({item:e,canTrack:t})=>{if(!t||!st(e))return e;const o=await Oe({contentId:e.id})||it({variations:e.variations,id:e.id}),r=at({item:e,testGroupId:o});return{...e,...r}},Ue=()=>Promise.resolve().then(()=>require("./content-1a8d2e10.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component ContentComponent at ../content/content.vue",e),e}),Me=()=>Promise.resolve().then(()=>require("./inlined-styles-da08b05d.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component InlinedStyles at ../inlined-styles.vue",e),e}),We=()=>Promise.resolve().then(()=>require("./inlined-script-cc25d25c.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component InlinedScript at ../inlined-script.vue",e),e}),Le=v.defineComponent({name:"content-variants",components:{"inlined-script":We,"inlined-styles":Me,"content-component":Ue},props:["canTrack","content","__isNestedRender","model","data","context","apiKey","apiVersion","customComponents","locale","includeRefs","enrich"],data(){return{shouldRenderVariants:Se({canTrack:P(this.canTrack),content:this.content}),getScriptString:we,getVariants:R,TARGET:w}},mounted(){this.shouldRenderVariants=!1},computed:{variantScriptStr(){var e;return $e(R(this.content).map(t=>({id:t.testVariationId,testRatio:t.testRatio})),((e=this.content)==null?void 0:e.id)||"")},hideVariantsStyleString(){return R(this.content).map(e=>`.variant-${e.testVariationId} { display: none; } `).join("")},defaultContent(){var e;return this.shouldRenderVariants?{...this.content,testVariationId:(e=this.content)==null?void 0:e.id}:je({item:this.content,canTrack:P(this.canTrack)})}}});var Ke=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.defaultContent,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)},ze=[],Ge=g(Le,Ke,ze,!1,null,null,null,null);const j=Ge.exports,De=Object.freeze(Object.defineProperty({__proto__:null,default:j},Symbol.toStringTag,{value:"Module"})),qe=B,He=j;function Je(){return _()&&window.self!==window.top}function F(){return Je()&&window.location.search.indexOf("builder.frameEditing=")!==-1}function Qe(){return!_()||F()?!1:location.search.indexOf("builder.preview=")!==-1}const Xe=[],Ye=e=>({type:"builder.registerComponent",data:ct(e)}),Ze=e=>{const t=e.toString().trim();return`return (${!t.startsWith("function")&&!t.startsWith("(")?"function ":""}${t}).apply(this, arguments)`},tn=e=>typeof e=="function"?Ze(e):E(e),ct=({inputs:e,...t})=>({...E(t),inputs:e==null?void 0:e.map(n=>Object.entries(n).reduce((o,[r,s])=>({...o,[r]:tn(s)}),{}))}),z={};function en(e,t){let n=z[e];if(n||(n=z[e]=[]),n.push(t),_()){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 G={};function nn(e){if(_()){Object.assign(G,e);const t={type:"builder.settingsChange",data:G};parent.postMessage(t,"*")}}function on(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:globalThis}function rn(){const e=on().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.
|
|
32
|
+
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 lt=rn();function I(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,...I(s,i,n)}:{...o,[i]:s}},{})}const D="builder.",sn="options.",an=e=>{const t={};return e.forEach((n,o)=>{t[o]=n}),t},U=e=>{if(!e)return{};const t=ut(e),n={};return Object.keys(t).forEach(o=>{if(o.startsWith(D)){const r=o.replace(D,"").replace(sn,"");n[r]=t[o]}}),n},cn=()=>{if(!_())return{};const e=new URLSearchParams(window.location.search);return U(e)},ut=e=>e instanceof URLSearchParams?an(e):e,ln="v3",q=e=>typeof e=="number"&&!isNaN(e)&&e>=0,M=e=>{let{noTraverse:t=!1}=e;const{limit:n=30,userAttributes:o,query:r,model:s,apiKey:i,includeRefs:u=!0,enrich:a,locale:d,apiVersion:p=ln,fields:b,omit:l,offset:f,cacheSeconds:m,staleCacheSeconds:h,sort:y,includeUnpublished:S}=e;if(!i)throw new Error("Missing API key");if(!["v2","v3"].includes(p))throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${p}'`);(e.limit===void 0||e.limit>1)&&!("noTraverse"in e)&&(t=!0);const c=new URL(`https://cdn.builder.io/api/${p}/content/${s}?apiKey=${i}&limit=${n}&noTraverse=${t}&includeRefs=${u}${d?`&locale=${d}`:""}${a?`&enrich=${a}`:""}`);if(c.searchParams.set("omit",l||"meta.componentsUsed"),b&&c.searchParams.set("fields",b),Number.isFinite(f)&&f>-1&&c.searchParams.set("offset",String(Math.floor(f))),typeof S=="boolean"&&c.searchParams.set("includeUnpublished",String(S)),m&&q(m)&&c.searchParams.set("cacheSeconds",String(m)),h&&q(h)&&c.searchParams.set("staleCacheSeconds",String(h)),y){const C=I({sort:y});for(const $ in C)c.searchParams.set($,JSON.stringify(C[$]))}const bt={...cn(),...ut(e.options||{})},L=I(bt);for(const C in L)c.searchParams.set(C,String(L[C]));if(o&&c.searchParams.set("userAttributes",JSON.stringify(o)),r){const C=I({query:r});for(const $ in C)c.searchParams.set($,JSON.stringify(C[$]))}return c},un=e=>"results"in e;async function O(e){const t=await W({...e,limit:1});return t&&t.results[0]||null}const dn=O,mn=async e=>{const t=M(e);return await(await lt(t.href)).json()},dt=async(e,t,n=M(e))=>{const o=P(e.canTrack);if(n.search.includes("preview="),!o||!(_()||w==="reactNative"))return t;try{const r=[];for(const s of t.results)r.push(await Fe({item:s,canTrack:o}));t.results=r}catch(r){k.error("Could not process A/B tests. ",r)}return t};async function W(e){try{const t=M(e),n=await mn(e);return un(n)?dt(e,n):(k.error("Error fetching data. ",{url:t,content:n,options:e}),null)}catch(t){return k.error("Error fetching data. ",t),null}}const fn=W;function pn(){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 mt(){return pn().replace(/-/g,"")}const ft="builderSessionId",hn=async({canTrack:e})=>{if(!e)return;const t=await ot({name:ft,canTrack:e});if(x(t))return t;{const n=gn();return _n({id:n,canTrack:e}),n}},gn=()=>mt(),_n=({id:e,canTrack:t})=>rt({name:ft,value:e,canTrack:t}),pt=()=>_()&&typeof localStorage<"u"?localStorage:void 0,bn=({key:e,canTrack:t})=>{var n;try{return t?(n=pt())==null?void 0:n.getItem(e):void 0}catch(o){console.debug("[LocalStorage] GET error: ",o);return}},yn=({key:e,canTrack:t,value:n})=>{var o;try{t&&((o=pt())==null||o.setItem(e,n))}catch(r){console.debug("[LocalStorage] SET error: ",r)}},ht="builderVisitorId",vn=({canTrack:e})=>{if(!e)return;const t=bn({key:ht,canTrack:e});if(x(t))return t;{const n=Sn();return kn({id:n,canTrack:e}),n}},Sn=()=>mt(),kn=({id:e,canTrack:t})=>yn({key:ht,value:e,canTrack:t}),Cn=()=>{if(_()){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},xn=()=>typeof navigator=="object"&&navigator.userAgent||"",gt=()=>{const e=xn(),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=Cn();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"}},wn=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const t=await hn({canTrack:e}),n=vn({canTrack:e});return{sessionId:t,visitorId:n}},$n=async({type:e,canTrack:t,apiKey:n,metadata:o,...r})=>({type:e,data:{...r,metadata:{url:location.href,...o},...await wn({canTrack:t}),userAttributes:gt(),ownerId:n}});async function _t(e){if(!e.apiKey){k.error("Missing API key for track call. Please provide your API key.");return}if(e.canTrack&&!F()&&(_()||w==="reactNative"))return fetch("https://cdn.builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await $n(e)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(t=>{console.error("Failed to track: ",t)})}const Tn=e=>_t({...e,canTrack:!0}),Rn=async e=>{var o,r,s;const t=e.path||((o=e.url)==null?void 0:o.pathname)||((r=e.userAttributes)==null?void 0:r.urlPath),n={...e,apiKey:e.apiKey,model:e.model||"page",userAttributes:{...e.userAttributes,...t?{urlPath:t}:{}},options:U(e.searchParams||((s=e.url)==null?void 0:s.searchParams)||e.options)};return{apiKey:n.apiKey,model:n.model,content:await O(n)}};exports.Blocks=B;exports.Button=Ct;exports.Columns=At;exports.ComponentsContext=X;exports.Content=j;exports.Fragment=Nt;exports.Image=Kt;exports.RenderBlocks=qe;exports.RenderContent=He;exports.Section=Ht;exports.Symbol=ee;exports.TARGET=w;exports.Text=ie;exports.Video=de;exports._processContentResult=dt;exports._track=_t;exports.blocks=Y;exports.builderContext=Q;exports.checkIsDefined=x;exports.components=Xe;exports.createRegisterComponentMessage=Ye;exports.fastClone=E;exports.fetch=lt;exports.fetchBuilderProps=Rn;exports.fetchEntries=W;exports.fetchOneEntry=O;exports.filterAttrs=A;exports.getAllContent=fn;exports.getBuilderSearchParams=U;exports.getContent=dn;exports.getDefaultCanTrack=P;exports.getMaxWidthQueryForSize=xt;exports.getRenderContentScriptString=Te;exports.getSizesForBreakpoints=J;exports.getUserAttributes=gt;exports.isBrowser=_;exports.isEditing=F;exports.isPreviewing=Qe;exports.logger=k;exports.normalizeComponent=g;exports.register=en;exports.serializeComponentInfo=ct;exports.setEditorSettings=nn;exports.track=Tn;
|