@builder.io/sdk-vue 0.7.1-1 → 0.7.2

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.
Files changed (285) hide show
  1. package/package.json +4 -4
  2. package/vue2/lib/browser/block-750d8ed7.cjs +3 -0
  3. package/vue2/lib/{node/block-979d66e1.js → browser/block-86d82810.js} +62 -62
  4. package/vue2/lib/{node/block-styles-50528f05.js → browser/block-styles-132270d0.js} +5 -5
  5. package/vue2/lib/{edge/block-styles-ba691a55.cjs → browser/block-styles-5b5e9888.cjs} +1 -1
  6. package/vue2/lib/browser/{block-wrapper-2d901f3f.cjs → block-wrapper-571b134c.cjs} +1 -1
  7. package/vue2/lib/browser/{block-wrapper-b1a6d78a.js → block-wrapper-f011d1f2.js} +5 -5
  8. package/vue2/lib/browser/blocks/button/button.vue.d.ts +2 -1
  9. package/vue2/lib/browser/blocks/columns/columns.vue.d.ts +2 -2
  10. package/vue2/lib/browser/blocks/img/img.vue.d.ts +2 -1
  11. package/vue2/lib/browser/blocks/section/section.vue.d.ts +2 -1
  12. package/vue2/lib/browser/blocks/symbol/symbol.vue.d.ts +4 -2
  13. package/vue2/lib/{edge/blocks-wrapper-7e831b51.cjs → browser/blocks-wrapper-1d620d76.cjs} +1 -1
  14. package/vue2/lib/{edge/blocks-wrapper-9c7effa2.js → browser/blocks-wrapper-33f35ea5.js} +1 -1
  15. package/vue2/lib/{edge/component-ref-02d30d18.cjs → browser/component-ref-26a164ea.cjs} +1 -1
  16. package/vue2/lib/{edge/component-ref-0404fc38.js → browser/component-ref-d6254a68.js} +10 -10
  17. package/vue2/lib/browser/components/block/block.vue.d.ts +3 -3
  18. package/vue2/lib/browser/components/block/components/block-styles.vue.d.ts +3 -3
  19. package/vue2/lib/browser/components/block/components/block-wrapper.vue.d.ts +3 -3
  20. package/vue2/lib/browser/components/block/components/interactive-element.vue.d.ts +3 -3
  21. package/vue2/lib/browser/components/blocks/blocks.vue.d.ts +2 -2
  22. package/vue2/lib/browser/components/content-variants/content-variants.vue.d.ts +4 -4
  23. package/vue2/lib/browser/components/inlined-styles.vue.d.ts +3 -3
  24. package/vue2/lib/browser/constants/sdk-version.d.ts +1 -1
  25. package/vue2/lib/browser/content-859f190b.cjs +1 -0
  26. package/vue2/lib/{edge/content-173f7be0.js → browser/content-dc49d77b.js} +232 -232
  27. package/vue2/lib/browser/context/types.d.ts +1 -1
  28. package/vue2/lib/browser/{css-d68fe0e5.js → css-67efb2d0.js} +1 -1
  29. package/vue2/lib/browser/{css-32f0c7fe.cjs → css-a19d330c.cjs} +1 -1
  30. package/vue2/lib/browser/{enable-editor-29804f7c.js → enable-editor-4054558e.js} +59 -60
  31. package/vue2/lib/browser/enable-editor-ed3f647e.cjs +1 -0
  32. package/vue2/lib/browser/{evaluate-c21703b5.js → evaluate-28c12253.js} +1 -1
  33. package/vue2/lib/browser/{evaluate-5f291a57.cjs → evaluate-6cd69c12.cjs} +1 -1
  34. package/vue2/lib/{node/get-block-actions-a7c25deb.js → browser/get-block-actions-63de56e5.js} +2 -2
  35. package/vue2/lib/browser/{get-block-actions-4f4fdc14.cjs → get-block-actions-f19965b6.cjs} +1 -1
  36. package/vue2/lib/{node/get-block-properties-75f3f91a.cjs → browser/get-block-properties-21c833e6.cjs} +1 -1
  37. package/vue2/lib/browser/{get-block-properties-14335b2d.js → get-block-properties-a5f2574c.js} +2 -2
  38. package/vue2/lib/browser/{get-processed-block-7dbd0508.cjs → get-processed-block-981ce262.cjs} +1 -1
  39. package/vue2/lib/browser/{get-processed-block-9c43bb30.js → get-processed-block-9b23550f.js} +2 -2
  40. package/vue2/lib/browser/helpers/ab-tests.d.ts +1 -1
  41. package/vue2/lib/{node/index-ea4df31a.cjs → browser/index-63eb9f8d.cjs} +9 -9
  42. package/vue2/lib/{node/index-7ce12494.js → browser/index-f82eab8f.js} +170 -170
  43. package/vue2/lib/browser/index-helpers/blocks-exports.d.ts +4 -4
  44. package/vue2/lib/browser/index.cjs +1 -1
  45. package/vue2/lib/browser/index.js +1 -1
  46. package/vue2/lib/{edge/inlined-script-7a7207fd.js → browser/inlined-script-2d16b8db.js} +1 -1
  47. package/vue2/lib/browser/{inlined-script-cc25d25c.cjs → inlined-script-95114af2.cjs} +1 -1
  48. package/vue2/lib/{node/inlined-styles-08dbb945.cjs → browser/inlined-styles-9637cb58.cjs} +1 -1
  49. package/vue2/lib/{node/inlined-styles-8982c8a6.js → browser/inlined-styles-fbbf7fd9.js} +1 -1
  50. package/vue2/lib/{node/interactive-element-caabd2d9.js → browser/interactive-element-c87a6c35.js} +5 -5
  51. package/vue2/lib/{node/interactive-element-fc5a4f1d.cjs → browser/interactive-element-d37313e0.cjs} +1 -1
  52. package/vue2/lib/{node/repeated-block-0ab8e6be.js → browser/repeated-block-231b11b1.js} +2 -2
  53. package/vue2/lib/browser/{repeated-block-ba80a339.cjs → repeated-block-49fef627.cjs} +1 -1
  54. package/vue2/lib/browser/server-index.d.ts +2 -2
  55. package/vue2/lib/browser/style.css +1 -1
  56. package/vue2/lib/{node/styles-6e09a0cc.js → browser/styles-28f7ec70.js} +2 -2
  57. package/vue2/lib/{node/styles-96606872.cjs → browser/styles-6a6b8114.cjs} +2 -2
  58. package/vue2/lib/edge/block-85fe2549.cjs +3 -0
  59. package/vue2/lib/{browser/block-dc97e982.js → edge/block-88cc78c4.js} +62 -62
  60. package/vue2/lib/{node/block-styles-00a3a4d7.cjs → edge/block-styles-65d9a724.cjs} +1 -1
  61. package/vue2/lib/edge/{block-styles-bd09453c.js → block-styles-9140aecf.js} +5 -5
  62. package/vue2/lib/{node/block-wrapper-8bd5d40b.js → edge/block-wrapper-36a4a767.js} +5 -5
  63. package/vue2/lib/edge/{block-wrapper-8e1bd00b.cjs → block-wrapper-e6392713.cjs} +1 -1
  64. package/vue2/lib/edge/blocks/button/button.vue.d.ts +2 -1
  65. package/vue2/lib/edge/blocks/columns/columns.vue.d.ts +2 -2
  66. package/vue2/lib/edge/blocks/img/img.vue.d.ts +2 -1
  67. package/vue2/lib/edge/blocks/section/section.vue.d.ts +2 -1
  68. package/vue2/lib/edge/blocks/symbol/symbol.vue.d.ts +4 -2
  69. package/vue2/lib/{browser/blocks-wrapper-9e8dd7a2.cjs → edge/blocks-wrapper-96489519.cjs} +1 -1
  70. package/vue2/lib/{browser/blocks-wrapper-fcb480f0.js → edge/blocks-wrapper-dcd7b27a.js} +1 -1
  71. package/vue2/lib/{node/component-ref-3ba26510.cjs → edge/component-ref-0bf4a838.cjs} +1 -1
  72. package/vue2/lib/{node/component-ref-123ffd3c.js → edge/component-ref-9b2c6138.js} +10 -10
  73. package/vue2/lib/edge/components/block/block.vue.d.ts +3 -3
  74. package/vue2/lib/edge/components/block/components/block-styles.vue.d.ts +3 -3
  75. package/vue2/lib/edge/components/block/components/block-wrapper.vue.d.ts +3 -3
  76. package/vue2/lib/edge/components/block/components/interactive-element.vue.d.ts +3 -3
  77. package/vue2/lib/edge/components/blocks/blocks.vue.d.ts +2 -2
  78. package/vue2/lib/edge/components/content-variants/content-variants.vue.d.ts +4 -4
  79. package/vue2/lib/edge/components/inlined-styles.vue.d.ts +3 -3
  80. package/vue2/lib/edge/constants/sdk-version.d.ts +1 -1
  81. package/vue2/lib/edge/content-199e7143.cjs +1 -0
  82. package/vue2/lib/{browser/content-76b432c4.js → edge/content-ad722031.js} +232 -232
  83. package/vue2/lib/edge/context/types.d.ts +1 -1
  84. package/vue2/lib/{node/css-c566c7a4.cjs → edge/css-05af2335.cjs} +1 -1
  85. package/vue2/lib/edge/{css-081095c1.js → css-5bd5388a.js} +1 -1
  86. package/vue2/lib/{node/enable-editor-96dbd852.js → edge/enable-editor-a32a425e.js} +59 -60
  87. package/vue2/lib/edge/enable-editor-ee8b2ba3.cjs +1 -0
  88. package/vue2/lib/edge/{evaluate-47aeba42.cjs → evaluate-7661cdf7.cjs} +1 -1
  89. package/vue2/lib/edge/{evaluate-d31c253f.js → evaluate-79ba5368.js} +1 -1
  90. package/vue2/lib/edge/{get-block-actions-fc18e691.cjs → get-block-actions-4ed31703.cjs} +1 -1
  91. package/vue2/lib/{browser/get-block-actions-47eb8bee.js → edge/get-block-actions-5ae9dffc.js} +2 -2
  92. package/vue2/lib/edge/{get-block-properties-d0176121.js → get-block-properties-c72eb3c0.js} +2 -2
  93. package/vue2/lib/{browser/get-block-properties-4c2072d0.cjs → edge/get-block-properties-e0553a33.cjs} +1 -1
  94. package/vue2/lib/edge/{get-processed-block-2d9f33f5.cjs → get-processed-block-e8256b7e.cjs} +1 -1
  95. package/vue2/lib/{node/get-processed-block-231c050b.js → edge/get-processed-block-f3dbc4e7.js} +2 -2
  96. package/vue2/lib/edge/helpers/ab-tests.d.ts +1 -1
  97. package/vue2/lib/edge/{index-6e4d121e.js → index-4cf9f60c.js} +170 -170
  98. package/vue2/lib/edge/{index-ca5baf07.cjs → index-946de873.cjs} +9 -9
  99. package/vue2/lib/edge/index-helpers/blocks-exports.d.ts +4 -4
  100. package/vue2/lib/edge/index.cjs +1 -1
  101. package/vue2/lib/edge/index.js +1 -1
  102. package/vue2/lib/{node/inlined-script-073d04d2.js → edge/inlined-script-58b1138d.js} +1 -1
  103. package/vue2/lib/{node/inlined-script-dccfb7fc.cjs → edge/inlined-script-cd8bf7d3.cjs} +1 -1
  104. package/vue2/lib/edge/{inlined-styles-f109793f.js → inlined-styles-8c6cdbc5.js} +1 -1
  105. package/vue2/lib/{browser/inlined-styles-da08b05d.cjs → edge/inlined-styles-a1951810.cjs} +1 -1
  106. package/vue2/lib/edge/{interactive-element-9c12c501.cjs → interactive-element-1a5ee50b.cjs} +1 -1
  107. package/vue2/lib/{browser/interactive-element-ac3e10b7.js → edge/interactive-element-2f0d2294.js} +5 -5
  108. package/vue2/lib/edge/{repeated-block-1093b757.cjs → repeated-block-8721baa8.cjs} +1 -1
  109. package/vue2/lib/{browser/repeated-block-51e74834.js → edge/repeated-block-a32b01bc.js} +2 -2
  110. package/vue2/lib/edge/server-index.d.ts +2 -2
  111. package/vue2/lib/edge/style.css +1 -1
  112. package/vue2/lib/{browser/styles-931da5e8.cjs → edge/styles-b2c8a706.cjs} +2 -2
  113. package/vue2/lib/{browser/styles-5eb21cb8.js → edge/styles-eab59896.js} +2 -2
  114. package/vue2/lib/node/block-575160ba.cjs +3 -0
  115. package/vue2/lib/{edge/block-2c7301d0.js → node/block-6c3981dc.js} +62 -62
  116. package/vue2/lib/{browser/block-styles-8f571c43.cjs → node/block-styles-258f0e47.cjs} +1 -1
  117. package/vue2/lib/{browser/block-styles-bc460f14.js → node/block-styles-b1b9a610.js} +5 -5
  118. package/vue2/lib/{edge/block-wrapper-4210f268.js → node/block-wrapper-1bdc3ca4.js} +5 -5
  119. package/vue2/lib/node/{block-wrapper-d7b449f1.cjs → block-wrapper-fed00059.cjs} +1 -1
  120. package/vue2/lib/node/blocks/button/button.vue.d.ts +2 -1
  121. package/vue2/lib/node/blocks/columns/columns.vue.d.ts +2 -2
  122. package/vue2/lib/node/blocks/img/img.vue.d.ts +2 -1
  123. package/vue2/lib/node/blocks/section/section.vue.d.ts +2 -1
  124. package/vue2/lib/node/blocks/symbol/symbol.vue.d.ts +4 -2
  125. package/vue2/lib/node/{blocks-wrapper-50937fc2.js → blocks-wrapper-031887f0.js} +1 -1
  126. package/vue2/lib/node/{blocks-wrapper-d425bec5.cjs → blocks-wrapper-80b3a22f.cjs} +1 -1
  127. package/vue2/lib/{browser/component-ref-bc236051.cjs → node/component-ref-5be913d9.cjs} +1 -1
  128. package/vue2/lib/{browser/component-ref-68e3a5b6.js → node/component-ref-ccb3e639.js} +10 -10
  129. package/vue2/lib/node/components/block/block.vue.d.ts +3 -3
  130. package/vue2/lib/node/components/block/components/block-styles.vue.d.ts +3 -3
  131. package/vue2/lib/node/components/block/components/block-wrapper.vue.d.ts +3 -3
  132. package/vue2/lib/node/components/block/components/interactive-element.vue.d.ts +3 -3
  133. package/vue2/lib/node/components/blocks/blocks.vue.d.ts +2 -2
  134. package/vue2/lib/node/components/content-variants/content-variants.vue.d.ts +4 -4
  135. package/vue2/lib/node/components/inlined-styles.vue.d.ts +3 -3
  136. package/vue2/lib/node/constants/sdk-version.d.ts +1 -1
  137. package/vue2/lib/node/content-8b7678bc.cjs +1 -0
  138. package/vue2/lib/node/{content-d31377e7.js → content-f80acd05.js} +232 -232
  139. package/vue2/lib/node/context/types.d.ts +1 -1
  140. package/vue2/lib/{edge/css-00393f8a.cjs → node/css-44cbcf3f.cjs} +1 -1
  141. package/vue2/lib/node/{css-469bd1df.js → css-ad18a8ab.js} +1 -1
  142. package/vue2/lib/node/enable-editor-405441b9.cjs +1 -0
  143. package/vue2/lib/{edge/enable-editor-d3f018c6.js → node/enable-editor-8b4a5b45.js} +59 -60
  144. package/vue2/lib/node/{evaluate-45bac138.cjs → evaluate-19fac854.cjs} +1 -1
  145. package/vue2/lib/node/{evaluate-946bbbf4.js → evaluate-52887aac.js} +8 -8
  146. package/vue2/lib/{edge/get-block-actions-33002e58.js → node/get-block-actions-1a6b19ce.js} +2 -2
  147. package/vue2/lib/node/{get-block-actions-fa0f60c5.cjs → get-block-actions-65751661.cjs} +1 -1
  148. package/vue2/lib/{edge/get-block-properties-c1a43e4b.cjs → node/get-block-properties-2204d735.cjs} +1 -1
  149. package/vue2/lib/node/{get-block-properties-5524be2a.js → get-block-properties-cbc0612e.js} +2 -2
  150. package/vue2/lib/{edge/get-processed-block-1280c9d5.js → node/get-processed-block-78fabb02.js} +2 -2
  151. package/vue2/lib/node/{get-processed-block-e246d1ed.cjs → get-processed-block-902c8e72.cjs} +1 -1
  152. package/vue2/lib/node/helpers/ab-tests.d.ts +1 -1
  153. package/vue2/lib/{browser/index-bb14138e.js → node/index-43273102.js} +170 -170
  154. package/vue2/lib/{browser/index-7528c088.cjs → node/index-d8e34fec.cjs} +9 -9
  155. package/vue2/lib/node/index-helpers/blocks-exports.d.ts +4 -4
  156. package/vue2/lib/node/index.cjs +1 -1
  157. package/vue2/lib/node/index.js +1 -1
  158. package/vue2/lib/{edge/inlined-script-e57329a5.cjs → node/inlined-script-82af82d4.cjs} +1 -1
  159. package/vue2/lib/{browser/inlined-script-431b5967.js → node/inlined-script-da97caa2.js} +1 -1
  160. package/vue2/lib/{edge/inlined-styles-9a96b77e.cjs → node/inlined-styles-73c1efea.cjs} +1 -1
  161. package/vue2/lib/{browser/inlined-styles-1717d4f0.js → node/inlined-styles-f35650e9.js} +1 -1
  162. package/vue2/lib/{browser/interactive-element-03353733.cjs → node/interactive-element-07235e63.cjs} +1 -1
  163. package/vue2/lib/{edge/interactive-element-6a866621.js → node/interactive-element-22405343.js} +5 -5
  164. package/vue2/lib/{edge/repeated-block-f7b967cf.js → node/repeated-block-53bf7a45.js} +2 -2
  165. package/vue2/lib/node/{repeated-block-f65d29a5.cjs → repeated-block-771e5e8b.cjs} +1 -1
  166. package/vue2/lib/node/server-index.d.ts +2 -2
  167. package/vue2/lib/node/style.css +1 -1
  168. package/vue2/lib/{edge/styles-a211b4e1.cjs → node/styles-6a9d7ee1.cjs} +2 -2
  169. package/vue2/lib/{edge/styles-aa2c087b.js → node/styles-c2fd2724.js} +2 -2
  170. package/vue2/package.json +1 -0
  171. package/vue3/lib/{edge/block-wrapper.4b2f2fb3.js → browser/block-wrapper.32fa4b39.js} +8 -8
  172. package/vue3/lib/browser/{block-wrapper.49af98a6.cjs → block-wrapper.fc71d4d3.cjs} +1 -1
  173. package/vue3/lib/browser/blocks/button/button.vue.d.ts +2 -1
  174. package/vue3/lib/browser/blocks/columns/columns.vue.d.ts +2 -2
  175. package/vue3/lib/browser/blocks/image/image.vue.d.ts +3 -3
  176. package/vue3/lib/browser/blocks/img/img.vue.d.ts +2 -1
  177. package/vue3/lib/browser/blocks/section/section.vue.d.ts +2 -1
  178. package/vue3/lib/browser/blocks/symbol/symbol.vue.d.ts +4 -2
  179. package/vue3/lib/{edge/component-ref.98beaea3.js → browser/component-ref.52b4ab91.js} +17 -17
  180. package/vue3/lib/browser/component-ref.f8946ad7.cjs +1 -0
  181. package/vue3/lib/browser/components/block/block.vue.d.ts +3 -3
  182. package/vue3/lib/browser/components/block/components/block-styles.vue.d.ts +3 -3
  183. package/vue3/lib/browser/components/block/components/block-wrapper.vue.d.ts +3 -3
  184. package/vue3/lib/browser/components/block/components/component-ref/component-ref.vue.d.ts +4 -4
  185. package/vue3/lib/browser/components/block/components/interactive-element.vue.d.ts +3 -3
  186. package/vue3/lib/browser/components/blocks/blocks.vue.d.ts +1 -1
  187. package/vue3/lib/browser/components/content/components/enable-editor.vue.d.ts +3 -3
  188. package/vue3/lib/browser/components/content/content.vue.d.ts +3 -3
  189. package/vue3/lib/browser/components/content-variants/content-variants.vue.d.ts +7 -5
  190. package/vue3/lib/browser/components/inlined-styles.vue.d.ts +3 -3
  191. package/vue3/lib/browser/constants/sdk-version.d.ts +1 -1
  192. package/vue3/lib/browser/context/types.d.ts +1 -1
  193. package/vue3/lib/{edge/get-block-actions.b460cca3.js → browser/get-block-actions.33a95ae9.js} +1 -1
  194. package/vue3/lib/{edge/get-block-actions.407fbfa9.cjs → browser/get-block-actions.720b385e.cjs} +1 -1
  195. package/vue3/lib/browser/helpers/ab-tests.d.ts +1 -1
  196. package/vue3/lib/browser/index-helpers/blocks-exports.d.ts +4 -4
  197. package/vue3/lib/browser/index.abbd01ce.cjs +69 -0
  198. package/vue3/lib/browser/{index.88b433c6.js → index.bd816233.js} +1303 -1285
  199. package/vue3/lib/browser/index.cjs +1 -1
  200. package/vue3/lib/browser/index.js +1 -1
  201. package/vue3/lib/{edge/repeated-block.cc9bbed2.js → browser/repeated-block.41d43763.js} +6 -6
  202. package/vue3/lib/{edge/repeated-block.f5d444e9.cjs → browser/repeated-block.4bb78d4d.cjs} +1 -1
  203. package/vue3/lib/browser/server-index.d.ts +2 -2
  204. package/vue3/lib/{browser/block-wrapper.09b54dd3.js → edge/block-wrapper.4bb452b4.js} +8 -8
  205. package/vue3/lib/edge/{block-wrapper.2d4ec833.cjs → block-wrapper.d36a195b.cjs} +1 -1
  206. package/vue3/lib/edge/blocks/button/button.vue.d.ts +2 -1
  207. package/vue3/lib/edge/blocks/columns/columns.vue.d.ts +2 -2
  208. package/vue3/lib/edge/blocks/image/image.vue.d.ts +3 -3
  209. package/vue3/lib/edge/blocks/img/img.vue.d.ts +2 -1
  210. package/vue3/lib/edge/blocks/section/section.vue.d.ts +2 -1
  211. package/vue3/lib/edge/blocks/symbol/symbol.vue.d.ts +4 -2
  212. package/vue3/lib/edge/component-ref.09c0c561.cjs +1 -0
  213. package/vue3/lib/{browser/component-ref.63194b25.js → edge/component-ref.215d8eb3.js} +17 -17
  214. package/vue3/lib/edge/components/block/block.vue.d.ts +3 -3
  215. package/vue3/lib/edge/components/block/components/block-styles.vue.d.ts +3 -3
  216. package/vue3/lib/edge/components/block/components/block-wrapper.vue.d.ts +3 -3
  217. package/vue3/lib/edge/components/block/components/component-ref/component-ref.vue.d.ts +4 -4
  218. package/vue3/lib/edge/components/block/components/interactive-element.vue.d.ts +3 -3
  219. package/vue3/lib/edge/components/blocks/blocks.vue.d.ts +1 -1
  220. package/vue3/lib/edge/components/content/components/enable-editor.vue.d.ts +3 -3
  221. package/vue3/lib/edge/components/content/content.vue.d.ts +3 -3
  222. package/vue3/lib/edge/components/content-variants/content-variants.vue.d.ts +7 -5
  223. package/vue3/lib/edge/components/inlined-styles.vue.d.ts +3 -3
  224. package/vue3/lib/edge/constants/sdk-version.d.ts +1 -1
  225. package/vue3/lib/edge/context/types.d.ts +1 -1
  226. package/vue3/lib/{browser/get-block-actions.4f330889.js → edge/get-block-actions.32987a91.js} +1 -1
  227. package/vue3/lib/{browser/get-block-actions.2e99e179.cjs → edge/get-block-actions.b7d0a3c2.cjs} +1 -1
  228. package/vue3/lib/edge/helpers/ab-tests.d.ts +1 -1
  229. package/vue3/lib/edge/index-helpers/blocks-exports.d.ts +4 -4
  230. package/vue3/lib/edge/{index.a8ffb479.js → index.cc0efb3b.js} +1526 -1507
  231. package/vue3/lib/edge/index.ceec697c.cjs +89 -0
  232. package/vue3/lib/edge/index.cjs +1 -1
  233. package/vue3/lib/edge/index.js +1 -1
  234. package/vue3/lib/{browser/repeated-block.ef8176d8.cjs → edge/repeated-block.b5d1a5b6.cjs} +1 -1
  235. package/vue3/lib/{browser/repeated-block.067ee555.js → edge/repeated-block.d1e4f878.js} +6 -6
  236. package/vue3/lib/edge/server-index.d.ts +2 -2
  237. package/vue3/lib/node/{block-wrapper.25e28ca3.cjs → block-wrapper.027e2e58.cjs} +1 -1
  238. package/vue3/lib/node/{block-wrapper.56bce6c4.js → block-wrapper.1f5bec88.js} +5 -5
  239. package/vue3/lib/node/blocks/button/button.vue.d.ts +2 -1
  240. package/vue3/lib/node/blocks/columns/columns.vue.d.ts +2 -2
  241. package/vue3/lib/node/blocks/image/image.vue.d.ts +3 -3
  242. package/vue3/lib/node/blocks/img/img.vue.d.ts +2 -1
  243. package/vue3/lib/node/blocks/section/section.vue.d.ts +2 -1
  244. package/vue3/lib/node/blocks/symbol/symbol.vue.d.ts +4 -2
  245. package/vue3/lib/node/component-ref.5c293120.cjs +1 -0
  246. package/vue3/lib/node/{component-ref.cd59ca4d.js → component-ref.d2c6eedf.js} +17 -17
  247. package/vue3/lib/node/components/block/block.vue.d.ts +3 -3
  248. package/vue3/lib/node/components/block/components/block-styles.vue.d.ts +3 -3
  249. package/vue3/lib/node/components/block/components/block-wrapper.vue.d.ts +3 -3
  250. package/vue3/lib/node/components/block/components/component-ref/component-ref.vue.d.ts +4 -4
  251. package/vue3/lib/node/components/block/components/interactive-element.vue.d.ts +3 -3
  252. package/vue3/lib/node/components/blocks/blocks.vue.d.ts +1 -1
  253. package/vue3/lib/node/components/content/components/enable-editor.vue.d.ts +3 -3
  254. package/vue3/lib/node/components/content/content.vue.d.ts +3 -3
  255. package/vue3/lib/node/components/content-variants/content-variants.vue.d.ts +7 -5
  256. package/vue3/lib/node/components/inlined-styles.vue.d.ts +3 -3
  257. package/vue3/lib/node/constants/sdk-version.d.ts +1 -1
  258. package/vue3/lib/node/context/types.d.ts +1 -1
  259. package/vue3/lib/node/{get-block-actions.0d715e21.cjs → get-block-actions.3bf73664.cjs} +1 -1
  260. package/vue3/lib/node/{get-block-actions.3df391e9.js → get-block-actions.68279ccf.js} +1 -1
  261. package/vue3/lib/node/helpers/ab-tests.d.ts +1 -1
  262. package/vue3/lib/node/index-helpers/blocks-exports.d.ts +4 -4
  263. package/vue3/lib/node/index.44e0d18b.cjs +109 -0
  264. package/vue3/lib/node/{index.88589866.js → index.bb1871d7.js} +1402 -1384
  265. package/vue3/lib/node/index.cjs +1 -1
  266. package/vue3/lib/node/index.js +1 -1
  267. package/vue3/lib/node/{repeated-block.78ed5bbb.cjs → repeated-block.6533598e.cjs} +1 -1
  268. package/vue3/lib/node/{repeated-block.57ca2ba1.js → repeated-block.c5b9936f.js} +5 -5
  269. package/vue3/lib/node/server-index.d.ts +2 -2
  270. package/vue3/package.json +1 -0
  271. package/vue2/lib/browser/block-2cb52597.cjs +0 -3
  272. package/vue2/lib/browser/content-1a8d2e10.cjs +0 -1
  273. package/vue2/lib/browser/enable-editor-58cd5d33.cjs +0 -1
  274. package/vue2/lib/edge/block-40b0f7b5.cjs +0 -3
  275. package/vue2/lib/edge/content-36b34b86.cjs +0 -1
  276. package/vue2/lib/edge/enable-editor-c36df3b5.cjs +0 -1
  277. package/vue2/lib/node/block-d7e689a7.cjs +0 -3
  278. package/vue2/lib/node/content-d8e76f5c.cjs +0 -1
  279. package/vue2/lib/node/enable-editor-8c4e460a.cjs +0 -1
  280. package/vue3/lib/browser/component-ref.78f795cd.cjs +0 -1
  281. package/vue3/lib/browser/index.c04232f6.cjs +0 -69
  282. package/vue3/lib/edge/component-ref.d8514fb0.cjs +0 -1
  283. package/vue3/lib/edge/index.8bdc4716.cjs +0 -89
  284. package/vue3/lib/node/component-ref.c35ae123.cjs +0 -1
  285. package/vue3/lib/node/index.b2d2bb5e.cjs +0 -109
@@ -1,15 +1,15 @@
1
- import { defineComponent as g, openBlock as d, createElementBlock as p, mergeProps as I, toHandlers as O, toDisplayString as ie, h as Ce, resolveComponent as k, createBlock as v, createCommentVNode as S, defineAsyncComponent as W, Fragment as R, renderList as B, withCtx as te, createVNode as V, normalizeProps as ae, guardReactiveProps as Ye, renderSlot as U, createElementVNode as le, normalizeStyle as ce, normalizeClass as we, markRaw as Xe } from "vue";
1
+ import { defineComponent as g, openBlock as d, createElementBlock as p, mergeProps as I, toHandlers as F, toDisplayString as ie, defineAsyncComponent as W, resolveComponent as k, Fragment as T, createBlock as v, createCommentVNode as S, renderList as V, withCtx as te, createVNode as O, h as Se, renderSlot as N, createElementVNode as ae, normalizeStyle as le, normalizeClass as Ce, markRaw as Je } from "vue";
2
2
  function q(e = {}, t, n) {
3
3
  const o = {};
4
- for (const s in e) {
5
- if (!e[s] || n && !s.startsWith(t))
4
+ for (const r in e) {
5
+ if (!e[r] || n && !r.startsWith(t))
6
6
  continue;
7
- const r = n ? s.replace(t, "") : s;
8
- o[r] = e[s];
7
+ const s = n ? r.replace(t, "") : r;
8
+ o[s] = e[r];
9
9
  }
10
10
  return o;
11
11
  }
12
- const Qe = g({
12
+ const Ye = g({
13
13
  name: "builder-button",
14
14
  props: ["attributes", "text", "link", "openLinkInNewTab"],
15
15
  data() {
@@ -29,64 +29,64 @@ const Qe = g({
29
29
  });
30
30
  const y = (e, t) => {
31
31
  const n = e.__vccOpts || e;
32
- for (const [o, s] of t)
33
- n[o] = s;
32
+ for (const [o, r] of t)
33
+ n[o] = r;
34
34
  return n;
35
- }, Ze = ["href", "target"];
36
- function et(e, t, n, o, s, r) {
35
+ }, Xe = ["href", "target"];
36
+ function Qe(e, t, n, o, r, s) {
37
37
  return e.link ? (d(), p("a", I({
38
38
  key: 0,
39
- role: "button",
40
39
  href: e.link,
41
- target: e.openLinkInNewTab ? "_blank" : void 0
42
- }, e.filterAttrs(e.attributes, "v-on:", !1), O(e.filterAttrs(e.attributes, "v-on:", !0), !0)), ie(e.text), 17, Ze)) : (d(), p("button", I({
40
+ target: e.openLinkInNewTab ? "_blank" : void 0,
41
+ role: "button"
42
+ }, e.filterAttrs(e.attributes, "v-on:", !1), F(e.filterAttrs(e.attributes, "v-on:", !0), !0)), ie(e.text), 17, Xe)) : (d(), p("button", I({
43
43
  key: 1,
44
44
  style: e.attributes.style,
45
45
  class: e._classStringToObject(e.attributes.class + " button-21azgz5avex")
46
- }, e.filterAttrs(e.attributes, "v-on:", !1), O(e.filterAttrs(e.attributes, "v-on:", !0), !0)), ie(e.text), 17));
46
+ }, e.filterAttrs(e.attributes, "v-on:", !1), F(e.filterAttrs(e.attributes, "v-on:", !0), !0)), ie(e.text), 17));
47
47
  }
48
- const tt = /* @__PURE__ */ y(Qe, [["render", et], ["__scopeId", "data-v-becdf225"], ["__file", "/Users/samijaber/code/work/builder/packages/sdks/output/vue/vue3/src/blocks/button/button.vue"]]), M = (e) => JSON.parse(JSON.stringify(e)), $e = {
49
- small: {
50
- min: 320,
51
- default: 321,
52
- max: 640
53
- },
54
- medium: {
55
- min: 641,
56
- default: 642,
57
- max: 991
48
+ const Ze = /* @__PURE__ */ y(Ye, [["render", Qe], ["__scopeId", "data-v-becdf225"], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/button/button.vue"]]), et = Symbol(), Q = {
49
+ Builder: {
50
+ content: null,
51
+ context: {},
52
+ localState: void 0,
53
+ rootSetState() {
54
+ },
55
+ rootState: {},
56
+ apiKey: null,
57
+ apiVersion: void 0,
58
+ componentInfos: {},
59
+ inheritedStyles: {}
58
60
  },
59
- large: {
60
- min: 990,
61
- default: 991,
62
- max: 1200
63
- }
64
- }, de = (e, t = $e) => `@media (max-width: ${t[e].max}px)`, Te = ({
65
- small: e,
66
- medium: t
67
- }) => {
68
- const n = M($e);
69
- if (!e || !t)
70
- return n;
71
- const o = Math.floor(e / 2);
72
- n.small = {
73
- max: e,
74
- min: o,
75
- default: o + 1
76
- };
77
- const s = n.small.max + 1;
78
- n.medium = {
79
- max: t,
80
- min: s,
81
- default: s + 1
61
+ key: et
62
+ }, tt = Symbol(), we = {
63
+ Components: { registeredComponents: {} },
64
+ key: tt
65
+ };
66
+ function nt(e) {
67
+ var t;
68
+ return {
69
+ ...(t = e.component) == null ? void 0 : t.options,
70
+ ...e.options,
71
+ builderBlock: e
82
72
  };
83
- const r = n.medium.max + 1;
84
- return n.large = {
85
- max: 2e3,
86
- min: r,
87
- default: r + 1
88
- }, n;
89
- }, P = "vue3", L = "[Builder.io]: ", x = {
73
+ }
74
+ const A = "vue3", ot = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), B = (e) => e != null, rt = (e) => Object.entries(e).map(([n, o]) => {
75
+ if (typeof o == "string")
76
+ return `${ot(n)}: ${o};`;
77
+ }).filter(B), st = (e) => rt(e).join(`
78
+ `), Y = ({
79
+ mediaQuery: e,
80
+ className: t,
81
+ styles: n
82
+ }) => {
83
+ const o = `.${t} {
84
+ ${st(n)}
85
+ }`;
86
+ return e ? `${e} {
87
+ ${o}
88
+ }` : o;
89
+ }, L = "[Builder.io]: ", x = {
90
90
  log: (...e) => console.log(L, ...e),
91
91
  error: (...e) => console.error(L, ...e),
92
92
  warn: (...e) => console.warn(L, ...e),
@@ -95,20 +95,20 @@ const tt = /* @__PURE__ */ y(Qe, [["render", et], ["__scopeId", "data-v-becdf225
95
95
  function w() {
96
96
  return typeof window < "u" && typeof document < "u";
97
97
  }
98
- function nt() {
98
+ function it() {
99
99
  return w() && window.self !== window.top;
100
100
  }
101
- function _() {
102
- return nt() && window.location.search.indexOf("builder.frameEditing=") !== -1;
101
+ function P() {
102
+ return it() && window.location.search.indexOf("builder.frameEditing=") !== -1;
103
103
  }
104
- const ot = () => {
104
+ const at = () => {
105
105
  if (w()) {
106
106
  const e = new URL(location.href);
107
107
  return e.pathname === "" && (e.pathname = "/"), e;
108
108
  } else
109
109
  return console.warn("Cannot get location for tracking in non-browser environment"), null;
110
- }, st = () => typeof navigator == "object" && navigator.userAgent || "", Ie = () => {
111
- const e = st(), t = {
110
+ }, lt = () => typeof navigator == "object" && navigator.userAgent || "", $e = () => {
111
+ const e = lt(), t = {
112
112
  Android() {
113
113
  return e.match(/Android/i);
114
114
  },
@@ -125,15 +125,15 @@ const ot = () => {
125
125
  return e.match(/IEMobile/i) || e.match(/WPDesktop/i);
126
126
  },
127
127
  any() {
128
- return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || P === "reactNative";
128
+ return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || A === "reactNative";
129
129
  }
130
- }, n = e.match(/Tablet|iPad/i), o = ot();
130
+ }, n = e.match(/Tablet|iPad/i), o = at();
131
131
  return {
132
132
  urlPath: o == null ? void 0 : o.pathname,
133
133
  host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
134
134
  device: n ? "tablet" : t.any() ? "mobile" : "desktop"
135
135
  };
136
- }, rt = ({
136
+ }, ct = ({
137
137
  builder: e,
138
138
  context: t,
139
139
  event: n,
@@ -144,50 +144,50 @@ const ot = () => {
144
144
  builder: e,
145
145
  context: t,
146
146
  event: n
147
- }), it = () => ({
148
- isEditing: _(),
147
+ }), dt = () => ({
148
+ isEditing: P(),
149
149
  isBrowser: w(),
150
150
  isServer: !w(),
151
- getUserAttributes: () => Ie()
152
- }), at = (e, {
151
+ getUserAttributes: () => $e()
152
+ }), ut = (e, {
153
153
  isExpression: t = !0
154
- }) => t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e, ue = ({
154
+ }) => t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e, ce = ({
155
155
  code: e,
156
156
  builder: t,
157
157
  context: n,
158
158
  event: o,
159
- localState: s,
160
- rootSetState: r,
159
+ localState: r,
160
+ rootSetState: s,
161
161
  rootState: i
162
162
  }) => {
163
- const a = rt({
163
+ const a = ct({
164
164
  builder: t,
165
165
  context: n,
166
166
  event: o,
167
- state: lt(i, s, r)
167
+ state: pt(i, r, s)
168
168
  });
169
169
  return new Function(...a.map(([l]) => l), e)(...a.map(([, l]) => l));
170
170
  };
171
- function lt(e, t, n) {
171
+ function pt(e, t, n) {
172
172
  if (e === t)
173
173
  throw new Error("rootState === localState");
174
174
  return new Proxy(e, {
175
- get: (o, s) => t && s in t ? t[s] : e[s],
176
- set: (o, s, r) => {
177
- if (t && s in t)
175
+ get: (o, r) => t && r in t ? t[r] : e[r],
176
+ set: (o, r, s) => {
177
+ if (t && r in t)
178
178
  throw new Error("Writing to local state is not allowed as it is read-only.");
179
- return e[s] = r, n == null || n(e), !0;
179
+ return e[r] = s, n == null || n(e), !0;
180
180
  }
181
181
  });
182
182
  }
183
- const ct = (e) => (w(), ue(e));
183
+ const mt = (e) => (w(), ce(e));
184
184
  function z({
185
185
  code: e,
186
186
  context: t,
187
187
  localState: n,
188
188
  rootState: o,
189
- rootSetState: s,
190
- event: r,
189
+ rootSetState: r,
190
+ event: s,
191
191
  isExpression: i = !0
192
192
  }) {
193
193
  if (e === "") {
@@ -195,18 +195,18 @@ function z({
195
195
  return;
196
196
  }
197
197
  const a = {
198
- code: at(e, {
198
+ code: ut(e, {
199
199
  isExpression: i
200
200
  }),
201
- builder: it(),
201
+ builder: dt(),
202
202
  context: t,
203
- event: r,
204
- rootSetState: s,
203
+ event: s,
204
+ rootSetState: r,
205
205
  rootState: o,
206
206
  localState: n
207
207
  };
208
208
  try {
209
- return ct(a);
209
+ return mt(a);
210
210
  } catch (l) {
211
211
  x.error("Failed code evaluation: " + l.message, {
212
212
  code: e
@@ -214,28 +214,28 @@ function z({
214
214
  return;
215
215
  }
216
216
  }
217
- const dt = (e, t, n) => {
217
+ const M = (e) => JSON.parse(JSON.stringify(e)), ht = (e, t, n) => {
218
218
  if (Object(e) !== e)
219
219
  return e;
220
220
  const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
221
- return o.slice(0, -1).reduce((s, r, i) => Object(s[r]) === s[r] ? s[r] : s[r] = Math.abs(Number(o[i + 1])) >> 0 === +o[i + 1] ? [] : {}, e)[o[o.length - 1]] = n, e;
221
+ return o.slice(0, -1).reduce((r, s, i) => Object(r[s]) === r[s] ? r[s] : r[s] = Math.abs(Number(o[i + 1])) >> 0 === +o[i + 1] ? [] : {}, e)[o[o.length - 1]] = n, e;
222
222
  };
223
- const ut = ({
223
+ const ft = ({
224
224
  block: e,
225
225
  context: t,
226
226
  localState: n,
227
227
  rootState: o,
228
- rootSetState: s
228
+ rootSetState: r
229
229
  }) => {
230
230
  if (!e.bindings)
231
231
  return e;
232
- const r = M(e), i = {
233
- ...r,
232
+ const s = M(e), i = {
233
+ ...s,
234
234
  properties: {
235
- ...r.properties
235
+ ...s.properties
236
236
  },
237
237
  actions: {
238
- ...r.actions
238
+ ...s.actions
239
239
  }
240
240
  };
241
241
  for (const a in e.bindings) {
@@ -243,10 +243,10 @@ const ut = ({
243
243
  code: l,
244
244
  localState: n,
245
245
  rootState: o,
246
- rootSetState: s,
246
+ rootSetState: r,
247
247
  context: t
248
248
  });
249
- dt(i, a, c);
249
+ ht(i, a, c);
250
250
  }
251
251
  return i;
252
252
  };
@@ -255,136 +255,41 @@ function D({
255
255
  context: t,
256
256
  shouldEvaluateBindings: n,
257
257
  localState: o,
258
- rootState: s,
259
- rootSetState: r
258
+ rootState: r,
259
+ rootSetState: s
260
260
  }) {
261
261
  const i = e;
262
- return n ? ut({
262
+ return n ? ft({
263
263
  block: i,
264
264
  localState: o,
265
- rootState: s,
266
- rootSetState: r,
265
+ rootState: r,
266
+ rootSetState: s,
267
267
  context: t
268
268
  }) : i;
269
269
  }
270
- const pt = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), A = (e) => e != null, mt = (e) => Object.entries(e).map(([n, o]) => {
271
- if (typeof o == "string")
272
- return `${pt(n)}: ${o};`;
273
- }).filter(A), ht = (e) => mt(e).join(`
274
- `), Y = ({
275
- mediaQuery: e,
276
- className: t,
277
- styles: n
278
- }) => {
279
- const o = `.${t} {
280
- ${ht(n)}
281
- }`;
282
- return e ? `${e} {
283
- ${o}
284
- }` : o;
285
- }, ft = g({
286
- render() {
287
- return Ce("style", { id: this.id, innerHTML: this.styles });
288
- },
289
- name: "inlined-styles",
290
- props: ["styles", "id"]
291
- }), G = /* @__PURE__ */ y(ft, [["__file", "/Users/samijaber/code/work/builder/packages/sdks/output/vue/vue3/src/components/inlined-styles.vue"]]), bt = g({
292
- name: "block-styles",
293
- components: { InlinedStyles: G },
294
- props: ["block", "context"],
295
- data() {
296
- return { TARGET: P };
297
- },
298
- computed: {
299
- canShowBlock() {
300
- const e = D({
301
- block: this.block,
302
- localState: this.context.localState,
303
- rootState: this.context.rootState,
304
- rootSetState: this.context.rootSetState,
305
- context: this.context.context,
306
- shouldEvaluateBindings: !0
307
- });
308
- return A(e.hide) ? !e.hide : A(e.show) ? e.show : !0;
309
- },
310
- css() {
311
- var h;
312
- const e = D({
313
- block: this.block,
314
- localState: this.context.localState,
315
- rootState: this.context.rootState,
316
- rootSetState: this.context.rootSetState,
317
- context: this.context.context,
318
- shouldEvaluateBindings: !0
319
- }), t = e.responsiveStyles, n = this.context.content, o = Te(
320
- ((h = n == null ? void 0 : n.meta) == null ? void 0 : h.breakpoints) || {}
321
- ), s = t == null ? void 0 : t.large, r = t == null ? void 0 : t.medium, i = t == null ? void 0 : t.small, a = e.id;
322
- if (!a)
323
- return "";
324
- const l = s ? Y({
325
- className: a,
326
- styles: s
327
- }) : "", c = r ? Y({
328
- className: a,
329
- styles: r,
330
- mediaQuery: de(
331
- "medium",
332
- o
333
- )
334
- }) : "", u = i ? Y({
335
- className: a,
336
- styles: i,
337
- mediaQuery: de(
338
- "small",
339
- o
340
- )
341
- }) : "";
342
- return [l, c, u].join(" ");
343
- }
344
- }
345
- });
346
- function gt(e, t, n, o, s, r) {
347
- const i = k("inlined-styles");
348
- return e.TARGET !== "reactNative" && e.css && e.canShowBlock ? (d(), v(i, {
349
- key: 0,
350
- styles: e.css
351
- }, null, 8, ["styles"])) : S("v-if", !0);
352
- }
353
- const Re = /* @__PURE__ */ y(bt, [["render", gt], ["__file", "/Users/samijaber/code/work/builder/packages/sdks/output/vue/vue3/src/components/block/components/block-styles.vue"]]), yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
354
- __proto__: null,
355
- default: Re
356
- }, Symbol.toStringTag, { value: "Module" }));
357
- function kt(e) {
358
- var t;
359
- return {
360
- ...(t = e.component) == null ? void 0 : t.options,
361
- ...e.options,
362
- builderBlock: e
363
- };
364
- }
365
- const vt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], St = (e) => typeof e == "string" && vt.includes(e.toLowerCase()), Ct = ({
270
+ const bt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], gt = (e) => typeof e == "string" && bt.includes(e.toLowerCase()), yt = ({
366
271
  block: e,
367
272
  context: t,
368
273
  registeredComponents: n
369
274
  }) => {
370
- var r;
371
- const o = (r = D({
275
+ var s;
276
+ const o = (s = D({
372
277
  block: e,
373
278
  localState: t.localState,
374
279
  rootState: t.rootState,
375
280
  rootSetState: t.rootSetState,
376
281
  context: t.context,
377
282
  shouldEvaluateBindings: !1
378
- }).component) == null ? void 0 : r.name;
283
+ }).component) == null ? void 0 : s.name;
379
284
  if (!o)
380
285
  return null;
381
- const s = n[o];
382
- if (s)
383
- return s;
286
+ const r = n[o];
287
+ if (r)
288
+ return r;
384
289
  console.warn(`
385
290
  Could not find a registered component named "${o}".
386
291
  If you registered it, is the file that registered it imported by the file that needs to render it?`);
387
- }, wt = ({
292
+ }, kt = ({
388
293
  block: e,
389
294
  context: t
390
295
  }) => {
@@ -394,17 +299,17 @@ const vt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
394
299
  } = e;
395
300
  if (!(n != null && n.collection))
396
301
  return;
397
- const s = z({
302
+ const r = z({
398
303
  code: n.collection,
399
304
  localState: t.localState,
400
305
  rootState: t.rootState,
401
306
  rootSetState: t.rootSetState,
402
307
  context: t.context
403
308
  });
404
- if (!Array.isArray(s))
309
+ if (!Array.isArray(r))
405
310
  return;
406
- const r = n.collection.split(".").pop(), i = n.itemName || (r ? r + "Item" : "item");
407
- return s.map((l, c) => ({
311
+ const s = n.collection.split(".").pop(), i = n.itemName || (s ? s + "Item" : "item");
312
+ return r.map((l, c) => ({
408
313
  context: {
409
314
  ...t,
410
315
  localState: {
@@ -417,48 +322,48 @@ const vt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
417
322
  },
418
323
  block: o
419
324
  }));
420
- }, $t = () => Promise.resolve().then(() => yt).then((e) => e.default).catch((e) => {
325
+ }, vt = () => Promise.resolve().then(() => Et).then((e) => e.default).catch((e) => {
421
326
  throw console.error(
422
327
  "Error while attempting to dynamically import component BlockStyles at ./components/block-styles.vue",
423
328
  e
424
329
  ), e;
425
- }), Tt = () => import("./repeated-block.067ee555.js").then((e) => e.default).catch((e) => {
330
+ }), St = () => import("./block-wrapper.32fa4b39.js").then((e) => e.default).catch((e) => {
426
331
  throw console.error(
427
- "Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",
332
+ "Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",
428
333
  e
429
334
  ), e;
430
- }), It = () => import("./component-ref.63194b25.js").then((e) => e.default).catch((e) => {
335
+ }), Ct = () => import("./component-ref.52b4ab91.js").then((e) => e.default).catch((e) => {
431
336
  throw console.error(
432
337
  "Error while attempting to dynamically import component ComponentRef at ./components/component-ref/component-ref.vue",
433
338
  e
434
339
  ), e;
435
- }), Rt = () => import("./block-wrapper.09b54dd3.js").then((e) => e.default).catch((e) => {
340
+ }), wt = () => import("./repeated-block.41d43763.js").then((e) => e.default).catch((e) => {
436
341
  throw console.error(
437
- "Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",
342
+ "Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",
438
343
  e
439
344
  ), e;
440
- }), xt = g({
345
+ }), $t = g({
441
346
  name: "block",
442
347
  components: {
443
- ComponentRef: W(It),
444
- BlockWrapper: W(Rt),
445
- RepeatedBlock: W(Tt),
446
- BlockStyles: W($t)
348
+ ComponentRef: W(Ct),
349
+ BlockWrapper: W(St),
350
+ RepeatedBlock: W(wt),
351
+ BlockStyles: W(vt)
447
352
  },
448
353
  props: ["block", "context", "registeredComponents"],
449
354
  data() {
450
- return { childrenContext: this.context, isEmptyHtmlElement: St };
355
+ return { childrenContext: this.context, isEmptyHtmlElement: gt };
451
356
  },
452
357
  computed: {
453
358
  blockComponent() {
454
- return Ct({
359
+ return yt({
455
360
  block: this.block,
456
361
  context: this.context,
457
362
  registeredComponents: this.registeredComponents
458
363
  });
459
364
  },
460
365
  repeatItem() {
461
- return wt({
366
+ return kt({
462
367
  block: this.block,
463
368
  context: this.context
464
369
  });
@@ -484,12 +389,12 @@ const vt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
484
389
  return !((t = this.blockComponent) != null && t.component) && !this.repeatItem ? (n = this.processedBlock.children) != null ? n : [] : [];
485
390
  },
486
391
  componentRefProps() {
487
- var e, t, n, o, s, r;
392
+ var e, t, n, o, r, s;
488
393
  return {
489
394
  blockChildren: (e = this.processedBlock.children) != null ? e : [],
490
395
  componentRef: (t = this.blockComponent) == null ? void 0 : t.component,
491
396
  componentOptions: {
492
- ...kt(this.processedBlock),
397
+ ...nt(this.processedBlock),
493
398
  builderContext: this.context,
494
399
  ...((n = this.blockComponent) == null ? void 0 : n.name) === "Symbol" || ((o = this.blockComponent) == null ? void 0 : o.name) === "Columns" ? {
495
400
  builderComponents: this.registeredComponents
@@ -498,17 +403,27 @@ const vt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
498
403
  context: this.childrenContext,
499
404
  registeredComponents: this.registeredComponents,
500
405
  builderBlock: this.processedBlock,
501
- includeBlockProps: ((s = this.blockComponent) == null ? void 0 : s.noWrap) === !0,
502
- isInteractive: !((r = this.blockComponent) != null && r.isRSC)
406
+ includeBlockProps: ((r = this.blockComponent) == null ? void 0 : r.noWrap) === !0,
407
+ isInteractive: !((s = this.blockComponent) != null && s.isRSC)
503
408
  };
504
409
  }
505
410
  }
506
411
  });
507
- function Et(e, t, n, o, s, r) {
412
+ function Rt(e, t, n, o, r, s) {
508
413
  var h;
509
414
  const i = k("block-wrapper"), a = k("repeated-block"), l = k("component-ref"), c = k("block", !0), u = k("block-styles");
510
- return e.canShowBlock ? (d(), p(R, { key: 0 }, [
511
- (h = e.blockComponent) != null && h.noWrap ? (d(), v(l, ae(I({ key: 1 }, e.componentRefProps)), null, 16)) : (d(), p(R, { key: 0 }, [
415
+ return e.canShowBlock ? (d(), p(T, { key: 0 }, [
416
+ (h = e.blockComponent) != null && h.noWrap ? (d(), v(l, {
417
+ key: 1,
418
+ componentRef: e.componentRefProps.componentRef,
419
+ componentOptions: e.componentRefProps.componentOptions,
420
+ blockChildren: e.componentRefProps.blockChildren,
421
+ context: e.componentRefProps.context,
422
+ registeredComponents: e.componentRefProps.registeredComponents,
423
+ builderBlock: e.componentRefProps.builderBlock,
424
+ includeBlockProps: e.componentRefProps.includeBlockProps,
425
+ isInteractive: e.componentRefProps.isInteractive
426
+ }, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "builderBlock", "includeBlockProps", "isInteractive"])) : (d(), p(T, { key: 0 }, [
512
427
  e.isEmptyHtmlElement(e.Tag) ? (d(), v(i, {
513
428
  key: 0,
514
429
  Wrapper: e.Tag,
@@ -516,7 +431,7 @@ function Et(e, t, n, o, s, r) {
516
431
  context: e.context,
517
432
  hasChildren: !1
518
433
  }, null, 8, ["Wrapper", "block", "context"])) : S("v-if", !0),
519
- !e.isEmptyHtmlElement(e.Tag) && e.repeatItem ? (d(!0), p(R, { key: 1 }, B(e.repeatItem, (m, f) => (d(), v(a, {
434
+ !e.isEmptyHtmlElement(e.Tag) && e.repeatItem ? (d(!0), p(T, { key: 1 }, V(e.repeatItem, (m, f) => (d(), v(a, {
520
435
  key: f,
521
436
  repeatContext: m.context,
522
437
  block: m.block,
@@ -530,14 +445,23 @@ function Et(e, t, n, o, s, r) {
530
445
  hasChildren: !0
531
446
  }, {
532
447
  default: te(() => [
533
- V(l, ae(Ye(e.componentRefProps)), null, 16),
534
- (d(!0), p(R, null, B(e.childrenWithoutParentComponent, (m, f) => (d(), v(c, {
448
+ O(l, {
449
+ componentRef: e.componentRefProps.componentRef,
450
+ componentOptions: e.componentRefProps.componentOptions,
451
+ blockChildren: e.componentRefProps.blockChildren,
452
+ context: e.componentRefProps.context,
453
+ registeredComponents: e.componentRefProps.registeredComponents,
454
+ builderBlock: e.componentRefProps.builderBlock,
455
+ includeBlockProps: e.componentRefProps.includeBlockProps,
456
+ isInteractive: e.componentRefProps.isInteractive
457
+ }, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "builderBlock", "includeBlockProps", "isInteractive"]),
458
+ (d(!0), p(T, null, V(e.childrenWithoutParentComponent, (m, f) => (d(), v(c, {
535
459
  key: "block-" + m.id,
536
460
  block: m,
537
461
  context: e.childrenContext,
538
462
  registeredComponents: e.registeredComponents
539
463
  }, null, 8, ["block", "context", "registeredComponents"]))), 128)),
540
- (d(!0), p(R, null, B(e.childrenWithoutParentComponent, (m, f) => (d(), v(u, {
464
+ (d(!0), p(T, null, V(e.childrenWithoutParentComponent, (m, f) => (d(), v(u, {
541
465
  key: "block-style-" + m.id,
542
466
  block: m,
543
467
  context: e.childrenContext
@@ -548,10 +472,122 @@ function Et(e, t, n, o, s, r) {
548
472
  ], 64))
549
473
  ], 64)) : S("v-if", !0);
550
474
  }
551
- const xe = /* @__PURE__ */ y(xt, [["render", Et], ["__file", "/Users/samijaber/code/work/builder/packages/sdks/output/vue/vue3/src/components/block/block.vue"]]), ts = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
475
+ const Re = /* @__PURE__ */ y($t, [["render", Rt], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/block/block.vue"]]), Zo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
476
+ __proto__: null,
477
+ default: Re
478
+ }, Symbol.toStringTag, { value: "Module" })), Te = {
479
+ small: {
480
+ min: 320,
481
+ default: 321,
482
+ max: 640
483
+ },
484
+ medium: {
485
+ min: 641,
486
+ default: 642,
487
+ max: 991
488
+ },
489
+ large: {
490
+ min: 990,
491
+ default: 991,
492
+ max: 1200
493
+ }
494
+ }, de = (e, t = Te) => `@media (max-width: ${t[e].max}px)`, Ie = ({
495
+ small: e,
496
+ medium: t
497
+ }) => {
498
+ const n = M(Te);
499
+ if (!e || !t)
500
+ return n;
501
+ const o = Math.floor(e / 2);
502
+ n.small = {
503
+ max: e,
504
+ min: o,
505
+ default: o + 1
506
+ };
507
+ const r = n.small.max + 1;
508
+ n.medium = {
509
+ max: t,
510
+ min: r,
511
+ default: r + 1
512
+ };
513
+ const s = n.medium.max + 1;
514
+ return n.large = {
515
+ max: 2e3,
516
+ min: s,
517
+ default: s + 1
518
+ }, n;
519
+ }, Tt = g({
520
+ render() {
521
+ return Se("style", { id: this.id, innerHTML: this.styles });
522
+ },
523
+ name: "inlined-styles",
524
+ props: ["styles", "id"]
525
+ }), G = /* @__PURE__ */ y(Tt, [["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/inlined-styles.vue"]]), It = g({
526
+ name: "block-styles",
527
+ components: { InlinedStyles: G },
528
+ props: ["block", "context"],
529
+ data() {
530
+ return { TARGET: A };
531
+ },
532
+ computed: {
533
+ canShowBlock() {
534
+ const e = D({
535
+ block: this.block,
536
+ localState: this.context.localState,
537
+ rootState: this.context.rootState,
538
+ rootSetState: this.context.rootSetState,
539
+ context: this.context.context,
540
+ shouldEvaluateBindings: !0
541
+ });
542
+ return B(e.hide) ? !e.hide : B(e.show) ? e.show : !0;
543
+ },
544
+ css() {
545
+ var h;
546
+ const e = D({
547
+ block: this.block,
548
+ localState: this.context.localState,
549
+ rootState: this.context.rootState,
550
+ rootSetState: this.context.rootSetState,
551
+ context: this.context.context,
552
+ shouldEvaluateBindings: !0
553
+ }), t = e.responsiveStyles, n = this.context.content, o = Ie(
554
+ ((h = n == null ? void 0 : n.meta) == null ? void 0 : h.breakpoints) || {}
555
+ ), r = t == null ? void 0 : t.large, s = t == null ? void 0 : t.medium, i = t == null ? void 0 : t.small, a = e.id;
556
+ if (!a)
557
+ return "";
558
+ const l = r ? Y({
559
+ className: a,
560
+ styles: r
561
+ }) : "", c = s ? Y({
562
+ className: a,
563
+ styles: s,
564
+ mediaQuery: de(
565
+ "medium",
566
+ o
567
+ )
568
+ }) : "", u = i ? Y({
569
+ className: a,
570
+ styles: i,
571
+ mediaQuery: de(
572
+ "small",
573
+ o
574
+ )
575
+ }) : "";
576
+ return [l, c, u].join(" ");
577
+ }
578
+ }
579
+ });
580
+ function xt(e, t, n, o, r, s) {
581
+ const i = k("inlined-styles");
582
+ return e.TARGET !== "reactNative" && e.css && e.canShowBlock ? (d(), v(i, {
583
+ key: 0,
584
+ styles: e.css
585
+ }, null, 8, ["styles"])) : S("v-if", !0);
586
+ }
587
+ const xe = /* @__PURE__ */ y(It, [["render", xt], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/block/components/block-styles.vue"]]), Et = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
552
588
  __proto__: null,
553
589
  default: xe
554
- }, Symbol.toStringTag, { value: "Module" })), _t = g({
590
+ }, Symbol.toStringTag, { value: "Module" })), Pt = g({
555
591
  name: "builder-blocks-wrapper",
556
592
  props: ["blocks", "parent", "path", "styleProp"],
557
593
  computed: {
@@ -563,7 +599,7 @@ const xe = /* @__PURE__ */ y(xt, [["render", Et], ["__file", "/Users/samijaber/c
563
599
  methods: {
564
600
  onClick() {
565
601
  var e, t;
566
- _() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
602
+ P() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
567
603
  {
568
604
  type: "builder.clickEmptyBlocks",
569
605
  data: {
@@ -576,7 +612,7 @@ const xe = /* @__PURE__ */ y(xt, [["render", Et], ["__file", "/Users/samijaber/c
576
612
  },
577
613
  onMouseEnter() {
578
614
  var e, t;
579
- _() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
615
+ P() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
580
616
  {
581
617
  type: "builder.hoverEmptyBlocks",
582
618
  data: {
@@ -598,8 +634,8 @@ const xe = /* @__PURE__ */ y(xt, [["render", Et], ["__file", "/Users/samijaber/c
598
634
  }
599
635
  }
600
636
  });
601
- const At = ["builder-path", "builder-parent-id"];
602
- function Pt(e, t, n, o, s, r) {
637
+ const Bt = ["builder-path", "builder-parent-id"];
638
+ function At(e, t, n, o, r, s) {
603
639
  return d(), p("div", I({
604
640
  class: e._classStringToObject(e.className + " div-178o76acnws"),
605
641
  "builder-path": e.path,
@@ -609,32 +645,15 @@ function Pt(e, t, n, o, s, r) {
609
645
  onMouseenter: t[1] || (t[1] = (i) => e.onMouseEnter()),
610
646
  onKeypress: t[2] || (t[2] = (i) => e.onClick())
611
647
  }, {}), [
612
- U(e.$slots, "default", {}, void 0, !0)
613
- ], 16, At);
648
+ N(e.$slots, "default", {}, void 0, !0)
649
+ ], 16, Bt);
614
650
  }
615
- const jt = /* @__PURE__ */ y(_t, [["render", Pt], ["__scopeId", "data-v-1f8aab9f"], ["__file", "/Users/samijaber/code/work/builder/packages/sdks/output/vue/vue3/src/components/blocks/blocks-wrapper.vue"]]), Bt = Symbol(), Q = {
616
- Builder: {
617
- content: null,
618
- context: {},
619
- localState: void 0,
620
- rootSetState() {
621
- },
622
- rootState: {},
623
- apiKey: null,
624
- apiVersion: void 0,
625
- componentInfos: {},
626
- inheritedStyles: {}
627
- },
628
- key: Bt
629
- }, Vt = Symbol(), Ee = {
630
- Components: { registeredComponents: {} },
631
- key: Vt
632
- }, Ut = g({
651
+ const _t = /* @__PURE__ */ y(Pt, [["render", At], ["__scopeId", "data-v-1f8aab9f"], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/blocks/blocks-wrapper.vue"]]), Vt = g({
633
652
  name: "builder-blocks",
634
653
  components: {
635
- BlocksWrapper: jt,
636
- Block: xe,
637
- BlockStyles: Re
654
+ BlocksWrapper: _t,
655
+ Block: Re,
656
+ BlockStyles: xe
638
657
  },
639
658
  props: [
640
659
  "blocks",
@@ -646,10 +665,10 @@ const jt = /* @__PURE__ */ y(_t, [["render", Pt], ["__scopeId", "data-v-1f8aab9f
646
665
  ],
647
666
  inject: {
648
667
  builderContext: Q.key,
649
- componentsContext: Ee.key
668
+ componentsContext: we.key
650
669
  }
651
670
  });
652
- function Nt(e, t, n, o, s, r) {
671
+ function Ot(e, t, n, o, r, s) {
653
672
  const i = k("block"), a = k("block-styles"), l = k("blocks-wrapper");
654
673
  return d(), v(l, {
655
674
  blocks: e.blocks,
@@ -658,13 +677,13 @@ function Nt(e, t, n, o, s, r) {
658
677
  styleProp: e.styleProp
659
678
  }, {
660
679
  default: te(() => [
661
- e.blocks ? (d(!0), p(R, { key: 0 }, B(e.blocks, (c, u) => (d(), v(i, {
680
+ e.blocks ? (d(!0), p(T, { key: 0 }, V(e.blocks, (c, u) => (d(), v(i, {
662
681
  key: "render-block-" + c.id,
663
682
  block: c,
664
683
  context: e.context || e.builderContext,
665
684
  registeredComponents: e.registeredComponents || e.componentsContext.registeredComponents
666
685
  }, null, 8, ["block", "context", "registeredComponents"]))), 128)) : S("v-if", !0),
667
- e.blocks ? (d(!0), p(R, { key: 1 }, B(e.blocks, (c, u) => (d(), v(a, {
686
+ e.blocks ? (d(!0), p(T, { key: 1 }, V(e.blocks, (c, u) => (d(), v(a, {
668
687
  key: "block-style-" + c.id,
669
688
  block: c,
670
689
  context: e.context || e.builderContext
@@ -673,7 +692,7 @@ function Nt(e, t, n, o, s, r) {
673
692
  _: 1
674
693
  }, 8, ["blocks", "parent", "path", "styleProp"]);
675
694
  }
676
- const ne = /* @__PURE__ */ y(Ut, [["render", Nt], ["__file", "/Users/samijaber/code/work/builder/packages/sdks/output/vue/vue3/src/components/blocks/blocks.vue"]]), Ot = g({
695
+ const ne = /* @__PURE__ */ y(Vt, [["render", Ot], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/blocks/blocks.vue"]]), Nt = g({
677
696
  name: "builder-columns",
678
697
  components: { InlinedStyles: G, Blocks: ne },
679
698
  props: [
@@ -692,7 +711,7 @@ const ne = /* @__PURE__ */ y(Ut, [["render", Nt], ["__file", "/Users/samijaber/c
692
711
  cols: this.columns || [],
693
712
  stackAt: this.stackColumnsAt || "tablet",
694
713
  flexDir: this.stackColumnsAt === "never" ? "row" : this.reverseColumnsWhenStacked ? "column-reverse" : "column",
695
- TARGET: P
714
+ TARGET: A
696
715
  };
697
716
  },
698
717
  computed: {
@@ -755,31 +774,31 @@ const ne = /* @__PURE__ */ y(Ut, [["render", Nt], ["__file", "/Users/samijaber/c
755
774
  return this.stackAt === "never" ? t : e;
756
775
  },
757
776
  columnCssVars(e) {
758
- const t = e === 0 ? 0 : this.gutterSize, n = this.getColumnCssWidth(e), o = `${t}px`, s = "100%", r = 0;
777
+ const t = e === 0 ? 0 : this.gutterSize, n = this.getColumnCssWidth(e), o = `${t}px`, r = "100%", s = 0;
759
778
  return {
760
779
  width: n,
761
780
  ["margin-left"]: o,
762
781
  "--column-width-mobile": this.getMobileStyle({
763
- stackedStyle: s,
782
+ stackedStyle: r,
764
783
  desktopStyle: n
765
784
  }),
766
785
  "--column-margin-left-mobile": this.getMobileStyle({
767
- stackedStyle: r,
786
+ stackedStyle: s,
768
787
  desktopStyle: o
769
788
  }),
770
789
  "--column-width-tablet": this.getTabletStyle({
771
- stackedStyle: s,
790
+ stackedStyle: r,
772
791
  desktopStyle: n
773
792
  }),
774
793
  "--column-margin-left-tablet": this.getTabletStyle({
775
- stackedStyle: r,
794
+ stackedStyle: s,
776
795
  desktopStyle: o
777
796
  })
778
797
  };
779
798
  },
780
799
  getWidthForBreakpointSize(e) {
781
800
  var n, o;
782
- return Te(
801
+ return Ie(
783
802
  ((o = (n = this.builderContext.content) == null ? void 0 : n.meta) == null ? void 0 : o.breakpoints) || {}
784
803
  )[e].max;
785
804
  },
@@ -794,7 +813,7 @@ const ne = /* @__PURE__ */ y(Ut, [["render", Nt], ["__file", "/Users/samijaber/c
794
813
  }
795
814
  }
796
815
  });
797
- function Ft(e, t, n, o, s, r) {
816
+ function jt(e, t, n, o, r, s) {
798
817
  const i = k("inlined-styles"), a = k("blocks");
799
818
  return d(), p("div", I({
800
819
  class: e._classStringToObject(
@@ -806,12 +825,12 @@ function Ft(e, t, n, o, s, r) {
806
825
  key: 0,
807
826
  styles: e.columnsStyles
808
827
  }, null, 8, ["styles"])) : S("v-if", !0),
809
- (d(!0), p(R, null, B(e.columns, (l, c) => (d(), p("div", I({
828
+ (d(!0), p(T, null, V(e.columns, (l, c) => (d(), p("div", I({
810
829
  key: c,
811
830
  class: "builder-column div-16nol0lwi20-2",
812
831
  style: e.columnCssVars(c)
813
832
  }, {}), [
814
- V(a, {
833
+ O(a, {
815
834
  path: `component.options.columns.${c}.blocks`,
816
835
  parent: e.builderBlock.id,
817
836
  styleProp: {
@@ -824,32 +843,32 @@ function Ft(e, t, n, o, s, r) {
824
843
  ], 16))), 128))
825
844
  ], 16);
826
845
  }
827
- const Mt = /* @__PURE__ */ y(Ot, [["render", Ft], ["__scopeId", "data-v-7be099dc"], ["__file", "/Users/samijaber/code/work/builder/packages/sdks/output/vue/vue3/src/blocks/columns/columns.vue"]]), Wt = g({
846
+ const Ft = /* @__PURE__ */ y(Nt, [["render", jt], ["__scopeId", "data-v-7be099dc"], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/columns/columns.vue"]]), Ut = g({
828
847
  name: "builder-fragment-component",
829
848
  props: []
830
849
  });
831
- function Lt(e, t, n, o, s, r) {
850
+ function Mt(e, t, n, o, r, s) {
832
851
  return d(), p("span", null, [
833
- U(e.$slots, "default")
852
+ N(e.$slots, "default")
834
853
  ]);
835
854
  }
836
- const Kt = /* @__PURE__ */ y(Wt, [["render", Lt], ["__file", "/Users/samijaber/code/work/builder/packages/sdks/output/vue/vue3/src/blocks/fragment/fragment.vue"]]);
837
- function pe(e) {
855
+ const Wt = /* @__PURE__ */ y(Ut, [["render", Mt], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/fragment/fragment.vue"]]);
856
+ function ue(e) {
838
857
  return e.replace(/http(s)?:/, "");
839
858
  }
840
- function Ht(e = "", t, n) {
841
- const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), s = e.indexOf("?") !== -1 ? "&" : "?";
842
- return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + s + t + "=" + encodeURIComponent(n);
859
+ function Lt(e = "", t, n) {
860
+ const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), r = e.indexOf("?") !== -1 ? "&" : "?";
861
+ return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + r + t + "=" + encodeURIComponent(n);
843
862
  }
844
- function zt(e, t) {
863
+ function Kt(e, t) {
845
864
  if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
846
865
  return e;
847
866
  if (t === "master")
848
- return pe(e);
867
+ return ue(e);
849
868
  const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
850
869
  if (n) {
851
- const o = e.split(n[0]), s = n[3], r = t.match("x") ? t : `${t}x`;
852
- return pe(`${o[0]}_${r}${s}`);
870
+ const o = e.split(n[0]), r = n[3], s = t.match("x") ? t : `${t}x`;
871
+ return ue(`${o[0]}_${s}${r}`);
853
872
  }
854
873
  return null;
855
874
  }
@@ -860,11 +879,11 @@ function X(e) {
860
879
  if (e.match(/builder\.io/)) {
861
880
  let n = e;
862
881
  const o = Number(e.split("?width=")[1]);
863
- return isNaN(o) || (n = `${n} ${o}w`), t.filter((s) => s !== o).map((s) => `${Ht(e, "width", s)} ${s}w`).concat([n]).join(", ");
882
+ return isNaN(o) || (n = `${n} ${o}w`), t.filter((r) => r !== o).map((r) => `${Lt(e, "width", r)} ${r}w`).concat([n]).join(", ");
864
883
  }
865
- return e.match(/cdn\.shopify\.com/) ? t.map((n) => [zt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
884
+ return e.match(/cdn\.shopify\.com/) ? t.map((n) => [Kt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
866
885
  }
867
- const Dt = g({
886
+ const Ht = g({
868
887
  name: "builder-image",
869
888
  props: [
870
889
  "image",
@@ -920,29 +939,29 @@ const Dt = g({
920
939
  }
921
940
  }
922
941
  });
923
- const qt = ["srcset"], Gt = ["alt", "role", "src", "srcset", "sizes"], Jt = {
942
+ const zt = ["srcset"], Dt = ["alt", "role", "src", "srcset", "sizes"], qt = {
924
943
  key: 2,
925
944
  class: "div-1be3j8m9ewb-2"
926
945
  };
927
- function Yt(e, t, n, o, s, r) {
946
+ function Gt(e, t, n, o, r, s) {
928
947
  var i, a, l, c;
929
- return d(), p(R, null, [
930
- le("picture", null, [
948
+ return d(), p(T, null, [
949
+ ae("picture", null, [
931
950
  e.webpSrcSet ? (d(), p("source", {
932
951
  key: 0,
933
952
  type: "image/webp",
934
953
  srcset: e.webpSrcSet
935
- }, null, 8, qt)) : S("v-if", !0),
936
- le("img", {
954
+ }, null, 8, zt)) : S("v-if", !0),
955
+ ae("img", {
937
956
  loading: "lazy",
938
957
  alt: e.altText,
939
958
  role: e.altText ? "presentation" : void 0,
940
- style: ce({
959
+ style: le({
941
960
  objectPosition: e.backgroundPosition || "center",
942
961
  objectFit: e.backgroundSize || "cover",
943
962
  ...e.aspectRatioCss
944
963
  }),
945
- class: we(
964
+ class: Ce(
946
965
  e._classStringToObject(
947
966
  "builder-image" + (e.className ? " " + e.className : "") + " img-1be3j8m9ewb"
948
967
  )
@@ -950,29 +969,29 @@ function Yt(e, t, n, o, s, r) {
950
969
  src: e.image,
951
970
  srcset: e.srcSetToUse,
952
971
  sizes: e.sizes
953
- }, null, 14, Gt)
972
+ }, null, 14, Dt)
954
973
  ]),
955
974
  e.aspectRatio && !(((a = (i = e.builderBlock) == null ? void 0 : i.children) == null ? void 0 : a.length) && e.fitContent) ? (d(), p("div", {
956
975
  key: 0,
957
976
  class: "builder-image-sizer div-1be3j8m9ewb",
958
- style: ce({
977
+ style: le({
959
978
  paddingTop: e.aspectRatio * 100 + "%"
960
979
  })
961
980
  }, null, 4)) : S("v-if", !0),
962
- ((c = (l = e.builderBlock) == null ? void 0 : l.children) == null ? void 0 : c.length) && e.fitContent ? U(e.$slots, "default", { key: 1 }, void 0, !0) : S("v-if", !0),
963
- !e.fitContent && e.$slots.default ? (d(), p("div", Jt, [
964
- U(e.$slots, "default", {}, void 0, !0)
981
+ ((c = (l = e.builderBlock) == null ? void 0 : l.children) == null ? void 0 : c.length) && e.fitContent ? N(e.$slots, "default", { key: 1 }, void 0, !0) : S("v-if", !0),
982
+ !e.fitContent && e.$slots.default ? (d(), p("div", qt, [
983
+ N(e.$slots, "default", {}, void 0, !0)
965
984
  ])) : S("v-if", !0)
966
985
  ], 64);
967
986
  }
968
- const Xt = /* @__PURE__ */ y(Dt, [["render", Yt], ["__scopeId", "data-v-58ca75d1"], ["__file", "/Users/samijaber/code/work/builder/packages/sdks/output/vue/vue3/src/blocks/image/image.vue"]]), Qt = g({
987
+ const Jt = /* @__PURE__ */ y(Ht, [["render", Gt], ["__scopeId", "data-v-58ca75d1"], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/image/image.vue"]]), Yt = g({
969
988
  name: "builder-section-component",
970
989
  props: ["attributes", "maxWidth"],
971
990
  data() {
972
991
  return { filterAttrs: q };
973
992
  }
974
993
  });
975
- function Zt(e, t, n, o, s, r) {
994
+ function Xt(e, t, n, o, r, s) {
976
995
  return d(), p("section", I({
977
996
  style: {
978
997
  width: "100%",
@@ -986,102 +1005,145 @@ function Zt(e, t, n, o, s, r) {
986
1005
  marginLeft: "auto",
987
1006
  marginRight: "auto"
988
1007
  }
989
- }, e.filterAttrs(e.attributes, "v-on:", !1), O(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
990
- U(e.$slots, "default")
1008
+ }, e.filterAttrs(e.attributes, "v-on:", !1), F(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
1009
+ N(e.$slots, "default")
991
1010
  ], 16);
992
1011
  }
993
- const en = /* @__PURE__ */ y(Qt, [["render", Zt], ["__file", "/Users/samijaber/code/work/builder/packages/sdks/output/vue/vue3/src/blocks/section/section.vue"]]), K = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
994
- ...t,
995
- testVariationId: t.id,
996
- id: e == null ? void 0 : e.id
997
- })), tn = ({
998
- canTrack: e,
999
- content: t
1000
- }) => !(!(K(t).length > 0) || !e);
1001
- function nn(e, t, n) {
1002
- var i;
1003
- function o() {
1004
- function a(C, $, T) {
1005
- let E = "";
1006
- if (T) {
1007
- const b = new Date();
1008
- b.setTime(b.getTime() + T * 24 * 60 * 60 * 1e3), E = "; expires=" + b.toUTCString();
1009
- }
1010
- document.cookie = C + "=" + ($ || "") + E + "; path=/; Secure; SameSite=None";
1011
- }
1012
- function l(C) {
1013
- const $ = C + "=", T = document.cookie.split(";");
1014
- for (let E = 0; E < T.length; E++) {
1015
- let b = T[E];
1016
- for (; b.charAt(0) === " "; )
1017
- b = b.substring(1, b.length);
1018
- if (b.indexOf($) === 0)
1019
- return b.substring($.length, b.length);
1020
- }
1021
- return null;
1022
- }
1023
- const c = `builder.tests.${e}`, u = l(c), h = t.map((C) => C.id).concat(e);
1024
- if (u && h.includes(u))
1025
- return u;
1026
- let m = 0;
1027
- const f = Math.random();
1028
- for (let C = 0; C < t.length; C++) {
1029
- const $ = t[C], T = $.testRatio;
1030
- if (m += T, f < m)
1031
- return a(c, $.id), $.id;
1032
- }
1033
- return a(c, e), e;
1034
- }
1035
- const s = o(), r = (i = document.currentScript) == null ? void 0 : i.previousElementSibling;
1036
- if (n) {
1037
- r.remove();
1038
- const a = document.currentScript;
1039
- a == null || a.remove();
1040
- } else {
1041
- const a = t.concat({
1042
- id: e
1043
- }).filter((l) => l.id !== s).map((l) => `.variant-${l.id} { display: none; }
1044
- `).join("");
1045
- r.innerHTML = a;
1046
- }
1047
- }
1048
- function on(e, t, n) {
1049
- var l;
1050
- if (!navigator.cookieEnabled)
1012
+ const Qt = /* @__PURE__ */ y(Yt, [["render", Xt], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/section/section.vue"]]), Zt = (e) => {
1013
+ if (e === "localhost" || e === "127.0.0.1")
1014
+ return e;
1015
+ const t = e.split(".");
1016
+ return t.length > 2 ? t.slice(1).join(".") : e;
1017
+ }, Ee = ({
1018
+ name: e,
1019
+ canTrack: t
1020
+ }) => {
1021
+ var n;
1022
+ try {
1023
+ return t ? (n = document.cookie.split("; ").find((o) => o.startsWith(`${e}=`))) == null ? void 0 : n.split("=")[1] : void 0;
1024
+ } catch (o) {
1025
+ x.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
1051
1026
  return;
1052
- function o(c) {
1053
- const u = c + "=", h = document.cookie.split(";");
1054
- for (let m = 0; m < h.length; m++) {
1055
- let f = h[m];
1056
- for (; f.charAt(0) === " "; )
1057
- f = f.substring(1, f.length);
1058
- if (f.indexOf(u) === 0)
1059
- return f.substring(u.length, f.length);
1060
- }
1061
- return null;
1062
1027
  }
1063
- const s = `builder.tests.${t}`, r = o(s), i = (l = document.currentScript) == null ? void 0 : l.parentElement, a = e === t;
1064
- if (r === e) {
1065
- if (a)
1028
+ }, Pe = async (e) => Ee(e), en = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(B).join("; "), tn = [["secure", ""], ["SameSite", "None"]], nn = ({
1029
+ name: e,
1030
+ value: t,
1031
+ expires: n
1032
+ }) => {
1033
+ const r = (w() ? location.protocol === "https:" : !0) ? tn : [[]], s = n ? [["expires", n.toUTCString()]] : [[]], i = [[e, t], ...s, ["path", "/"], ["domain", Zt(window.location.hostname)], ...r];
1034
+ return en(i);
1035
+ }, Be = async ({
1036
+ name: e,
1037
+ value: t,
1038
+ expires: n,
1039
+ canTrack: o
1040
+ }) => {
1041
+ try {
1042
+ if (!o)
1066
1043
  return;
1067
- i == null || i.removeAttribute("hidden"), i == null || i.removeAttribute("aria-hidden");
1068
- } else {
1069
- a && (n ? i == null || i.remove() : (i == null || i.setAttribute("hidden", "true"), i == null || i.setAttribute("aria-hidden", "true")));
1070
- return;
1044
+ const r = nn({
1045
+ name: e,
1046
+ value: t,
1047
+ expires: n
1048
+ });
1049
+ document.cookie = r;
1050
+ } catch (r) {
1051
+ x.warn("[COOKIE] SET error: ", (r == null ? void 0 : r.message) || r);
1071
1052
  }
1072
- }
1073
- const sn = (e) => e === "react" || e === "reactNative", _e = sn(P), Ae = "builderIoAbTest", Pe = "builderIoRenderContent", rn = () => {
1074
- const e = nn.toString().replace(/\s+/g, " "), t = on.toString().replace(/\s+/g, " ");
1075
- return `
1076
- window.${Ae} = ${e}
1077
- window.${Pe} = ${t}
1078
- `;
1079
- }, an = (e, t) => `
1080
- window.${Ae}("${t}",${JSON.stringify(e)}, ${_e})`, ln = ({
1053
+ }, on = "builder.tests", oe = (e) => `${on}.${e}`, rn = ({
1054
+ contentId: e
1055
+ }) => Pe({
1056
+ name: oe(e),
1057
+ canTrack: !0
1058
+ }), sn = ({
1059
+ contentId: e
1060
+ }) => Ee({
1061
+ name: oe(e),
1062
+ canTrack: !0
1063
+ }), an = ({
1081
1064
  contentId: e,
1082
- variationId: t
1083
- }) => `
1084
- window.${Pe}("${t}", "${e}", ${_e})`, cn = {
1065
+ value: t
1066
+ }) => Be({
1067
+ name: oe(e),
1068
+ value: t,
1069
+ canTrack: !0
1070
+ }), Ae = (e) => B(e.id) && B(e.variations) && Object.keys(e.variations).length > 0, ln = ({
1071
+ id: e,
1072
+ variations: t
1073
+ }) => {
1074
+ var r;
1075
+ let n = 0;
1076
+ const o = Math.random();
1077
+ for (const s in t) {
1078
+ const i = (r = t[s]) == null ? void 0 : r.testRatio;
1079
+ if (n += i, o < n)
1080
+ return s;
1081
+ }
1082
+ return e;
1083
+ }, _e = (e) => {
1084
+ const t = ln(e);
1085
+ return an({
1086
+ contentId: e.id,
1087
+ value: t
1088
+ }).catch((n) => {
1089
+ x.error("could not store A/B test variation: ", n);
1090
+ }), t;
1091
+ }, Ve = ({
1092
+ item: e,
1093
+ testGroupId: t
1094
+ }) => {
1095
+ const n = e.variations[t];
1096
+ return t === e.id || !n ? {
1097
+ testVariationId: e.id,
1098
+ testVariationName: "Default"
1099
+ } : {
1100
+ data: n.data,
1101
+ testVariationId: n.id,
1102
+ testVariationName: n.name || (n.id === e.id ? "Default" : "")
1103
+ };
1104
+ }, cn = ({
1105
+ item: e,
1106
+ canTrack: t
1107
+ }) => {
1108
+ if (!t)
1109
+ return e;
1110
+ if (!e)
1111
+ return;
1112
+ if (!Ae(e))
1113
+ return e;
1114
+ const n = sn({
1115
+ contentId: e.id
1116
+ }) || _e({
1117
+ variations: e.variations,
1118
+ id: e.id
1119
+ }), o = Ve({
1120
+ item: e,
1121
+ testGroupId: n
1122
+ });
1123
+ return {
1124
+ ...e,
1125
+ ...o
1126
+ };
1127
+ }, dn = async ({
1128
+ item: e,
1129
+ canTrack: t
1130
+ }) => {
1131
+ if (!t || !Ae(e))
1132
+ return e;
1133
+ const o = await rn({
1134
+ contentId: e.id
1135
+ }) || _e({
1136
+ variations: e.variations,
1137
+ id: e.id
1138
+ }), r = Ve({
1139
+ item: e,
1140
+ testGroupId: o
1141
+ });
1142
+ return {
1143
+ ...e,
1144
+ ...r
1145
+ };
1146
+ }, U = (e) => B(e) ? e : !0, un = {
1085
1147
  name: "Core:Button",
1086
1148
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
1087
1149
  defaultStyles: {
@@ -1113,7 +1175,7 @@ const sn = (e) => e === "react" || e === "reactNative", _e = sn(P), Ae = "builde
1113
1175
  }],
1114
1176
  static: !0,
1115
1177
  noWrap: !0
1116
- }, dn = {
1178
+ }, pn = {
1117
1179
  name: "Columns",
1118
1180
  isRSC: !0,
1119
1181
  inputs: [{
@@ -1291,7 +1353,7 @@ const sn = (e) => e === "react" || e === "reactNative", _e = sn(P), Ae = "builde
1291
1353
  });
1292
1354
  }
1293
1355
  const n = e.get("columns");
1294
- Array.isArray(n) && !!n.find((s) => s.get("width")) && (!!n.find((r) => !r.get("width")) || n.reduce((a, l) => a + l.get("width"), 0) !== 100) && t();
1356
+ Array.isArray(n) && !!n.find((r) => r.get("width")) && (!!n.find((s) => !s.get("width")) || n.reduce((a, l) => a + l.get("width"), 0) !== 100) && t();
1295
1357
  }
1296
1358
  }, {
1297
1359
  name: "space",
@@ -1313,85 +1375,239 @@ const sn = (e) => e === "react" || e === "reactNative", _e = sn(P), Ae = "builde
1313
1375
  helperText: "When stacking columns for mobile devices, reverse the ordering",
1314
1376
  advanced: !0
1315
1377
  }]
1316
- }, un = {
1317
- name: "Fragment",
1318
- static: !0,
1319
- hidden: !0,
1320
- canHaveChildren: !0,
1321
- noWrap: !0
1322
- }, pn = {
1323
- name: "Image",
1378
+ }, mn = {
1379
+ name: "Custom Code",
1324
1380
  static: !0,
1325
- image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
1326
- defaultStyles: {
1327
- position: "relative",
1328
- minHeight: "20px",
1329
- minWidth: "20px",
1330
- overflow: "hidden"
1331
- },
1332
- canHaveChildren: !0,
1381
+ requiredPermissions: ["editCode"],
1333
1382
  inputs: [{
1334
- name: "image",
1335
- type: "file",
1336
- bubble: !0,
1337
- allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
1383
+ name: "code",
1384
+ type: "html",
1338
1385
  required: !0,
1339
- defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
1340
- onChange: (e) => {
1341
- e.delete("srcset"), e.delete("noWebp");
1342
- function n(i, a = 6e4) {
1343
- return new Promise((l, c) => {
1344
- const u = document.createElement("img");
1345
- let h = !1;
1346
- u.onload = () => {
1347
- h = !0, l(u);
1348
- }, u.addEventListener("error", (m) => {
1349
- console.warn("Image load failed", m.error), c(m.error);
1350
- }), u.src = i, setTimeout(() => {
1351
- h || c(new Error("Image load timed out"));
1352
- }, a);
1353
- });
1354
- }
1355
- function o(i) {
1356
- return Math.round(i * 1e3) / 1e3;
1357
- }
1358
- const s = e.get("image"), r = e.get("aspectRatio");
1359
- if (fetch(s).then((i) => i.blob()).then((i) => {
1360
- i.type.includes("svg") && e.set("noWebp", !0);
1361
- }), s && (!r || r === 0.7041))
1362
- return n(s).then((i) => {
1363
- const a = e.get("aspectRatio");
1364
- e.get("image") === s && (!a || a === 0.7041) && i.width && i.height && (e.set("aspectRatio", o(i.height / i.width)), e.set("height", i.height), e.set("width", i.width));
1365
- });
1366
- }
1367
- }, {
1368
- name: "backgroundSize",
1369
- type: "text",
1370
- defaultValue: "cover",
1371
- enum: [{
1372
- label: "contain",
1373
- value: "contain",
1374
- helperText: "The image should never get cropped"
1375
- }, {
1376
- label: "cover",
1377
- value: "cover",
1378
- helperText: "The image should fill it's box, cropping when needed"
1379
- }]
1380
- }, {
1381
- name: "backgroundPosition",
1382
- type: "text",
1383
- defaultValue: "center",
1384
- enum: ["center", "top", "left", "right", "bottom", "top left", "top right", "bottom left", "bottom right"]
1385
- }, {
1386
- name: "altText",
1387
- type: "string",
1388
- helperText: "Text to display when the user has images off"
1386
+ defaultValue: "<p>Hello there, I am custom HTML code!</p>",
1387
+ code: !0
1389
1388
  }, {
1390
- name: "height",
1391
- type: "number",
1392
- hideFromUI: !0
1389
+ name: "replaceNodes",
1390
+ type: "boolean",
1391
+ helperText: "Preserve server rendered dom nodes",
1392
+ advanced: !0
1393
1393
  }, {
1394
- name: "width",
1394
+ name: "scriptsClientOnly",
1395
+ type: "boolean",
1396
+ defaultValue: !1,
1397
+ helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
1398
+ advanced: !0
1399
+ }]
1400
+ }, hn = g({
1401
+ name: "builder-custom-code",
1402
+ props: ["replaceNodes", "code"],
1403
+ data() {
1404
+ return { scriptsInserted: [], scriptsRun: [] };
1405
+ },
1406
+ mounted() {
1407
+ var t;
1408
+ if (!((t = this.$refs.elementRef) != null && t.getElementsByTagName) || typeof window > "u")
1409
+ return;
1410
+ const e = this.$refs.elementRef.getElementsByTagName("script");
1411
+ for (let n = 0; n < e.length; n++) {
1412
+ const o = e[n];
1413
+ if (o.src) {
1414
+ if (this.scriptsInserted.includes(o.src))
1415
+ continue;
1416
+ this.scriptsInserted.push(o.src);
1417
+ const r = document.createElement("script");
1418
+ r.async = !0, r.src = o.src, document.head.appendChild(r);
1419
+ } else if (!o.type || [
1420
+ "text/javascript",
1421
+ "application/javascript",
1422
+ "application/ecmascript"
1423
+ ].includes(o.type)) {
1424
+ if (this.scriptsRun.includes(o.innerText))
1425
+ continue;
1426
+ try {
1427
+ this.scriptsRun.push(o.innerText), new Function(o.innerText)();
1428
+ } catch (r) {
1429
+ console.warn("`CustomCode`: Error running script:", r);
1430
+ }
1431
+ }
1432
+ }
1433
+ },
1434
+ methods: {
1435
+ _classStringToObject(e) {
1436
+ const t = {};
1437
+ if (typeof e != "string")
1438
+ return t;
1439
+ const n = e.trim().split(/\s+/);
1440
+ for (const o of n)
1441
+ t[o] = !0;
1442
+ return t;
1443
+ }
1444
+ }
1445
+ }), fn = ["innerHTML"];
1446
+ function bn(e, t, n, o, r, s) {
1447
+ return d(), p("div", {
1448
+ ref: "elementRef",
1449
+ class: Ce(
1450
+ e._classStringToObject(
1451
+ "builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")
1452
+ )
1453
+ ),
1454
+ innerHTML: e.code
1455
+ }, null, 10, fn);
1456
+ }
1457
+ const gn = /* @__PURE__ */ y(hn, [["render", bn], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/custom-code/custom-code.vue"]]), yn = {
1458
+ name: "Embed",
1459
+ static: !0,
1460
+ inputs: [{
1461
+ name: "url",
1462
+ type: "url",
1463
+ required: !0,
1464
+ defaultValue: "",
1465
+ helperText: "e.g. enter a youtube url, google map, etc",
1466
+ onChange: (e) => {
1467
+ const t = e.get("url");
1468
+ if (t)
1469
+ return e.set("content", "Loading..."), fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then((o) => o.json()).then((o) => {
1470
+ e.get("url") === t && (o.html ? e.set("content", o.html) : e.set("content", "Invalid url, please try another"));
1471
+ }).catch((o) => {
1472
+ e.set("content", "There was an error embedding this URL, please try again or another URL");
1473
+ });
1474
+ e.delete("content");
1475
+ }
1476
+ }, {
1477
+ name: "content",
1478
+ type: "html",
1479
+ defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
1480
+ hideFromUI: !0
1481
+ }]
1482
+ }, kn = ["text/javascript", "application/javascript", "application/ecmascript"], vn = (e) => kn.includes(e.type), Sn = g({
1483
+ name: "builder-embed",
1484
+ props: ["content"],
1485
+ data() {
1486
+ return { scriptsInserted: [], scriptsRun: [], ranInitFn: !1 };
1487
+ },
1488
+ watch: {
1489
+ onUpdateHook0: {
1490
+ handler() {
1491
+ this.$refs.elem && !this.ranInitFn && (this.ranInitFn = !0, this.findAndRunScripts());
1492
+ },
1493
+ immediate: !0
1494
+ }
1495
+ },
1496
+ computed: {
1497
+ onUpdateHook0() {
1498
+ return {
1499
+ 0: this.$refs.elem,
1500
+ 1: this.ranInitFn
1501
+ };
1502
+ }
1503
+ },
1504
+ methods: {
1505
+ findAndRunScripts() {
1506
+ if (!this.$refs.elem || !this.$refs.elem.getElementsByTagName)
1507
+ return;
1508
+ const e = this.$refs.elem.getElementsByTagName("script");
1509
+ for (let t = 0; t < e.length; t++) {
1510
+ const n = e[t];
1511
+ if (n.src && !this.scriptsInserted.includes(n.src)) {
1512
+ this.scriptsInserted.push(n.src);
1513
+ const o = document.createElement("script");
1514
+ o.async = !0, o.src = n.src, document.head.appendChild(o);
1515
+ } else if (vn(n) && !this.scriptsRun.includes(n.innerText))
1516
+ try {
1517
+ this.scriptsRun.push(n.innerText), new Function(n.innerText)();
1518
+ } catch (o) {
1519
+ console.warn("`Embed`: Error running script:", o);
1520
+ }
1521
+ }
1522
+ }
1523
+ }
1524
+ }), Cn = ["innerHTML"];
1525
+ function wn(e, t, n, o, r, s) {
1526
+ return d(), p("div", {
1527
+ class: "builder-embed",
1528
+ ref: "elem",
1529
+ innerHTML: e.content
1530
+ }, null, 8, Cn);
1531
+ }
1532
+ const $n = /* @__PURE__ */ y(Sn, [["render", wn], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/embed/embed.vue"]]), Rn = {
1533
+ name: "Fragment",
1534
+ static: !0,
1535
+ hidden: !0,
1536
+ canHaveChildren: !0,
1537
+ noWrap: !0
1538
+ }, Tn = {
1539
+ name: "Image",
1540
+ static: !0,
1541
+ image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
1542
+ defaultStyles: {
1543
+ position: "relative",
1544
+ minHeight: "20px",
1545
+ minWidth: "20px",
1546
+ overflow: "hidden"
1547
+ },
1548
+ canHaveChildren: !0,
1549
+ inputs: [{
1550
+ name: "image",
1551
+ type: "file",
1552
+ bubble: !0,
1553
+ allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
1554
+ required: !0,
1555
+ defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
1556
+ onChange: (e) => {
1557
+ e.delete("srcset"), e.delete("noWebp");
1558
+ function n(i, a = 6e4) {
1559
+ return new Promise((l, c) => {
1560
+ const u = document.createElement("img");
1561
+ let h = !1;
1562
+ u.onload = () => {
1563
+ h = !0, l(u);
1564
+ }, u.addEventListener("error", (m) => {
1565
+ console.warn("Image load failed", m.error), c(m.error);
1566
+ }), u.src = i, setTimeout(() => {
1567
+ h || c(new Error("Image load timed out"));
1568
+ }, a);
1569
+ });
1570
+ }
1571
+ function o(i) {
1572
+ return Math.round(i * 1e3) / 1e3;
1573
+ }
1574
+ const r = e.get("image"), s = e.get("aspectRatio");
1575
+ if (fetch(r).then((i) => i.blob()).then((i) => {
1576
+ i.type.includes("svg") && e.set("noWebp", !0);
1577
+ }), r && (!s || s === 0.7041))
1578
+ return n(r).then((i) => {
1579
+ const a = e.get("aspectRatio");
1580
+ e.get("image") === r && (!a || a === 0.7041) && i.width && i.height && (e.set("aspectRatio", o(i.height / i.width)), e.set("height", i.height), e.set("width", i.width));
1581
+ });
1582
+ }
1583
+ }, {
1584
+ name: "backgroundSize",
1585
+ type: "text",
1586
+ defaultValue: "cover",
1587
+ enum: [{
1588
+ label: "contain",
1589
+ value: "contain",
1590
+ helperText: "The image should never get cropped"
1591
+ }, {
1592
+ label: "cover",
1593
+ value: "cover",
1594
+ helperText: "The image should fill it's box, cropping when needed"
1595
+ }]
1596
+ }, {
1597
+ name: "backgroundPosition",
1598
+ type: "text",
1599
+ defaultValue: "center",
1600
+ enum: ["center", "top", "left", "right", "bottom", "top left", "top right", "bottom left", "bottom right"]
1601
+ }, {
1602
+ name: "altText",
1603
+ type: "string",
1604
+ helperText: "Text to display when the user has images off"
1605
+ }, {
1606
+ name: "height",
1607
+ type: "number",
1608
+ hideFromUI: !0
1609
+ }, {
1610
+ name: "width",
1395
1611
  type: "number",
1396
1612
  hideFromUI: !0
1397
1613
  }, {
@@ -1419,7 +1635,45 @@ const sn = (e) => e === "react" || e === "reactNative", _e = sn(P), Ae = "builde
1419
1635
  advanced: !0,
1420
1636
  defaultValue: 0.7041
1421
1637
  }]
1422
- }, mn = {
1638
+ }, In = {
1639
+ name: "Raw:Img",
1640
+ hideFromInsertMenu: !0,
1641
+ image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
1642
+ inputs: [{
1643
+ name: "image",
1644
+ bubble: !0,
1645
+ type: "file",
1646
+ allowedFileTypes: ["jpeg", "jpg", "png", "svg", "gif", "webp"],
1647
+ required: !0
1648
+ }],
1649
+ noWrap: !0,
1650
+ static: !0
1651
+ }, xn = g({
1652
+ name: "builder-img-component",
1653
+ props: [
1654
+ "backgroundSize",
1655
+ "backgroundPosition",
1656
+ "imgSrc",
1657
+ "altText",
1658
+ "image",
1659
+ "attributes"
1660
+ ],
1661
+ data() {
1662
+ return { isEditing: P, filterAttrs: q };
1663
+ }
1664
+ }), En = ["alt", "src"];
1665
+ function Pn(e, t, n, o, r, s) {
1666
+ return d(), p("img", I({
1667
+ style: {
1668
+ objectFit: e.backgroundSize || "cover",
1669
+ objectPosition: e.backgroundPosition || "center"
1670
+ },
1671
+ key: e.isEditing() && e.imgSrc || "default-key",
1672
+ alt: e.altText,
1673
+ src: e.imgSrc || e.image
1674
+ }, e.filterAttrs(e.attributes, "v-on:", !1), F(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, En);
1675
+ }
1676
+ const Bn = /* @__PURE__ */ y(xn, [["render", Pn], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/img/img.vue"]]), An = {
1423
1677
  name: "Core:Section",
1424
1678
  static: !0,
1425
1679
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -1458,7 +1712,7 @@ const sn = (e) => e === "react" || e === "reactNative", _e = sn(P), Ae = "builde
1458
1712
  }
1459
1713
  }
1460
1714
  }]
1461
- }, hn = {
1715
+ }, _n = {
1462
1716
  name: "Symbol",
1463
1717
  noWrap: !0,
1464
1718
  static: !0,
@@ -1491,7 +1745,7 @@ const sn = (e) => e === "react" || e === "reactNative", _e = sn(P), Ae = "builde
1491
1745
  hideFromUI: !0,
1492
1746
  type: "boolean"
1493
1747
  }]
1494
- }, fn = {
1748
+ }, Vn = {
1495
1749
  name: "Text",
1496
1750
  static: !0,
1497
1751
  isRSC: !0,
@@ -1509,11 +1763,11 @@ const sn = (e) => e === "react" || e === "reactNative", _e = sn(P), Ae = "builde
1509
1763
  height: "auto",
1510
1764
  textAlign: "center"
1511
1765
  }
1512
- }, bn = g({
1766
+ }, On = g({
1513
1767
  name: "builder-text",
1514
1768
  props: ["text"]
1515
- }), gn = ["innerHTML"];
1516
- function yn(e, t, n, o, s, r) {
1769
+ }), Nn = ["innerHTML"];
1770
+ function jn(e, t, n, o, r, s) {
1517
1771
  var i;
1518
1772
  return d(), p("div", {
1519
1773
  class: "builder-text",
@@ -1521,9 +1775,9 @@ function yn(e, t, n, o, s, r) {
1521
1775
  style: {
1522
1776
  outline: "none"
1523
1777
  }
1524
- }, null, 8, gn);
1778
+ }, null, 8, Nn);
1525
1779
  }
1526
- const kn = /* @__PURE__ */ y(bn, [["render", yn], ["__file", "/Users/samijaber/code/work/builder/packages/sdks/output/vue/vue3/src/blocks/text/text.vue"]]), vn = {
1780
+ const Fn = /* @__PURE__ */ y(On, [["render", jn], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/text/text.vue"]]), Un = {
1527
1781
  name: "Video",
1528
1782
  canHaveChildren: !0,
1529
1783
  defaultStyles: {
@@ -1604,7 +1858,7 @@ const kn = /* @__PURE__ */ y(bn, [["render", yn], ["__file", "/Users/samijaber/c
1604
1858
  defaultValue: !0,
1605
1859
  advanced: !0
1606
1860
  }]
1607
- }, Sn = g({
1861
+ }, Mn = g({
1608
1862
  name: "builder-video",
1609
1863
  props: [
1610
1864
  "autoPlay",
@@ -1646,8 +1900,8 @@ const kn = /* @__PURE__ */ y(bn, [["render", yn], ["__file", "/Users/samijaber/c
1646
1900
  };
1647
1901
  }
1648
1902
  }
1649
- }), Cn = ["preload", "src", "poster"];
1650
- function wn(e, t, n, o, s, r) {
1903
+ }), Wn = ["preload", "src", "poster"];
1904
+ function Ln(e, t, n, o, r, s) {
1651
1905
  var i;
1652
1906
  return d(), p("video", I({
1653
1907
  preload: e.preload || "metadata",
@@ -1661,484 +1915,372 @@ function wn(e, t, n, o, s, r) {
1661
1915
  },
1662
1916
  src: e.video || "no-src",
1663
1917
  poster: e.posterImage
1664
- }, e.spreadProps), null, 16, Cn);
1918
+ }, e.spreadProps), null, 16, Wn);
1665
1919
  }
1666
- const $n = /* @__PURE__ */ y(Sn, [["render", wn], ["__file", "/Users/samijaber/code/work/builder/packages/sdks/output/vue/vue3/src/blocks/video/video.vue"]]), Tn = {
1667
- name: "Embed",
1668
- static: !0,
1669
- inputs: [{
1670
- name: "url",
1671
- type: "url",
1672
- required: !0,
1673
- defaultValue: "",
1674
- helperText: "e.g. enter a youtube url, google map, etc",
1675
- onChange: (e) => {
1676
- const t = e.get("url");
1677
- if (t)
1678
- return e.set("content", "Loading..."), fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then((o) => o.json()).then((o) => {
1679
- e.get("url") === t && (o.html ? e.set("content", o.html) : e.set("content", "Invalid url, please try another"));
1680
- }).catch((o) => {
1681
- e.set("content", "There was an error embedding this URL, please try again or another URL");
1682
- });
1683
- e.delete("content");
1684
- }
1685
- }, {
1686
- name: "content",
1687
- type: "html",
1688
- defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
1689
- hideFromUI: !0
1690
- }]
1691
- }, In = ["text/javascript", "application/javascript", "application/ecmascript"], Rn = (e) => In.includes(e.type), xn = g({
1692
- name: "builder-embed",
1693
- props: ["content"],
1694
- data() {
1695
- return { scriptsInserted: [], scriptsRun: [], ranInitFn: !1 };
1696
- },
1697
- watch: {
1698
- onUpdateHook0: {
1699
- handler() {
1700
- this.$refs.elem && !this.ranInitFn && (this.ranInitFn = !0, this.findAndRunScripts());
1701
- },
1702
- immediate: !0
1703
- }
1704
- },
1705
- computed: {
1706
- onUpdateHook0() {
1707
- return {
1708
- 0: this.$refs.elem,
1709
- 1: this.ranInitFn
1710
- };
1711
- }
1712
- },
1713
- methods: {
1714
- findAndRunScripts() {
1715
- if (!this.$refs.elem || !this.$refs.elem.getElementsByTagName)
1716
- return;
1717
- const e = this.$refs.elem.getElementsByTagName("script");
1718
- for (let t = 0; t < e.length; t++) {
1719
- const n = e[t];
1720
- if (n.src && !this.scriptsInserted.includes(n.src)) {
1721
- this.scriptsInserted.push(n.src);
1722
- const o = document.createElement("script");
1723
- o.async = !0, o.src = n.src, document.head.appendChild(o);
1724
- } else if (Rn(n) && !this.scriptsRun.includes(n.innerText))
1725
- try {
1726
- this.scriptsRun.push(n.innerText), new Function(n.innerText)();
1727
- } catch (o) {
1728
- console.warn("`Embed`: Error running script:", o);
1729
- }
1730
- }
1731
- }
1732
- }
1733
- }), En = ["innerHTML"];
1734
- function _n(e, t, n, o, s, r) {
1735
- return d(), p("div", {
1736
- class: "builder-embed",
1737
- ref: "elem",
1738
- innerHTML: e.content
1739
- }, null, 8, En);
1740
- }
1741
- const An = /* @__PURE__ */ y(xn, [["render", _n], ["__file", "/Users/samijaber/code/work/builder/packages/sdks/output/vue/vue3/src/blocks/embed/embed.vue"]]), Pn = g({
1742
- name: "builder-img-component",
1743
- props: [
1744
- "backgroundSize",
1745
- "backgroundPosition",
1746
- "imgSrc",
1747
- "altText",
1748
- "image",
1749
- "attributes"
1750
- ],
1751
- data() {
1752
- return { isEditing: _, filterAttrs: q };
1753
- }
1754
- }), jn = ["alt", "src"];
1755
- function Bn(e, t, n, o, s, r) {
1756
- return d(), p("img", I({
1757
- style: {
1758
- objectFit: e.backgroundSize || "cover",
1759
- objectPosition: e.backgroundPosition || "center"
1760
- },
1761
- key: e.isEditing() && e.imgSrc || "default-key",
1762
- alt: e.altText,
1763
- src: e.imgSrc || e.image
1764
- }, e.filterAttrs(e.attributes, "v-on:", !1), O(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, jn);
1765
- }
1766
- const Vn = /* @__PURE__ */ y(Pn, [["render", Bn], ["__file", "/Users/samijaber/code/work/builder/packages/sdks/output/vue/vue3/src/blocks/img/img.vue"]]), Un = {
1767
- name: "Raw:Img",
1768
- hideFromInsertMenu: !0,
1769
- image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
1770
- inputs: [{
1771
- name: "image",
1772
- bubble: !0,
1773
- type: "file",
1774
- allowedFileTypes: ["jpeg", "jpg", "png", "svg", "gif", "webp"],
1775
- required: !0
1776
- }],
1777
- noWrap: !0,
1778
- static: !0
1779
- }, Nn = g({
1780
- name: "builder-custom-code",
1781
- props: ["replaceNodes", "code"],
1782
- data() {
1783
- return { scriptsInserted: [], scriptsRun: [] };
1784
- },
1785
- mounted() {
1786
- var t;
1787
- if (!((t = this.$refs.elementRef) != null && t.getElementsByTagName) || typeof window > "u")
1788
- return;
1789
- const e = this.$refs.elementRef.getElementsByTagName("script");
1790
- for (let n = 0; n < e.length; n++) {
1791
- const o = e[n];
1792
- if (o.src) {
1793
- if (this.scriptsInserted.includes(o.src))
1794
- continue;
1795
- this.scriptsInserted.push(o.src);
1796
- const s = document.createElement("script");
1797
- s.async = !0, s.src = o.src, document.head.appendChild(s);
1798
- } else if (!o.type || [
1799
- "text/javascript",
1800
- "application/javascript",
1801
- "application/ecmascript"
1802
- ].includes(o.type)) {
1803
- if (this.scriptsRun.includes(o.innerText))
1804
- continue;
1805
- try {
1806
- this.scriptsRun.push(o.innerText), new Function(o.innerText)();
1807
- } catch (s) {
1808
- console.warn("`CustomCode`: Error running script:", s);
1809
- }
1810
- }
1811
- }
1812
- },
1813
- methods: {
1814
- _classStringToObject(e) {
1815
- const t = {};
1816
- if (typeof e != "string")
1817
- return t;
1818
- const n = e.trim().split(/\s+/);
1819
- for (const o of n)
1820
- t[o] = !0;
1821
- return t;
1822
- }
1823
- }
1824
- }), On = ["innerHTML"];
1825
- function Fn(e, t, n, o, s, r) {
1826
- return d(), p("div", {
1827
- ref: "elementRef",
1828
- class: we(
1829
- e._classStringToObject(
1830
- "builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")
1831
- )
1832
- ),
1833
- innerHTML: e.code
1834
- }, null, 10, On);
1835
- }
1836
- const Mn = /* @__PURE__ */ y(Nn, [["render", Fn], ["__file", "/Users/samijaber/code/work/builder/packages/sdks/output/vue/vue3/src/blocks/custom-code/custom-code.vue"]]), Wn = {
1837
- name: "Custom Code",
1838
- static: !0,
1839
- requiredPermissions: ["editCode"],
1840
- inputs: [{
1841
- name: "code",
1842
- type: "html",
1843
- required: !0,
1844
- defaultValue: "<p>Hello there, I am custom HTML code!</p>",
1845
- code: !0
1846
- }, {
1847
- name: "replaceNodes",
1848
- type: "boolean",
1849
- helperText: "Preserve server rendered dom nodes",
1850
- advanced: !0
1851
- }, {
1852
- name: "scriptsClientOnly",
1853
- type: "boolean",
1854
- defaultValue: !1,
1855
- helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
1856
- advanced: !0
1857
- }]
1858
- }, me = () => [{
1859
- component: tt,
1860
- ...cn
1920
+ const Kn = /* @__PURE__ */ y(Mn, [["render", Ln], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/video/video.vue"]]), pe = () => [{
1921
+ component: Ze,
1922
+ ...un
1861
1923
  }, {
1862
- component: Mt,
1863
- ...dn
1924
+ component: Ft,
1925
+ ...pn
1864
1926
  }, {
1865
- component: Mn,
1866
- ...Wn
1927
+ component: gn,
1928
+ ...mn
1867
1929
  }, {
1868
- component: An,
1869
- ...Tn
1930
+ component: $n,
1931
+ ...yn
1870
1932
  }, {
1871
- component: Kt,
1872
- ...un
1933
+ component: Wt,
1934
+ ...Rn
1873
1935
  }, {
1874
- component: Xt,
1875
- ...pn
1936
+ component: Jt,
1937
+ ...Tn
1876
1938
  }, {
1877
- component: Vn,
1878
- ...Un
1939
+ component: Bn,
1940
+ ...In
1879
1941
  }, {
1880
- component: en,
1881
- ...mn
1942
+ component: Qt,
1943
+ ...An
1882
1944
  }, {
1883
- component: Zo,
1884
- ...hn
1945
+ component: Xo,
1946
+ ..._n
1885
1947
  }, {
1886
- component: kn,
1887
- ...fn
1948
+ component: Fn,
1949
+ ...Vn
1888
1950
  }, {
1889
- component: $n,
1890
- ...vn
1891
- }], he = [], Ln = (e) => ({
1951
+ component: Kn,
1952
+ ...Un
1953
+ }], me = [], Hn = (e) => ({
1892
1954
  type: "builder.registerComponent",
1893
1955
  data: Z(e)
1894
- }), Kn = (e) => {
1956
+ }), zn = (e) => {
1895
1957
  const t = e.toString().trim();
1896
1958
  return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
1897
- }, Hn = (e) => typeof e == "function" ? Kn(e) : M(e), Z = ({
1959
+ }, Dn = (e) => typeof e == "function" ? zn(e) : M(e), Z = ({
1898
1960
  inputs: e,
1899
1961
  ...t
1900
1962
  }) => ({
1901
1963
  ...M(t),
1902
- inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [s, r]) => ({
1964
+ inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [r, s]) => ({
1903
1965
  ...o,
1904
- [s]: Hn(r)
1966
+ [r]: Dn(s)
1905
1967
  }), {}))
1906
- }), zn = (e) => {
1907
- var r, i;
1908
- const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = (i = e.fileUrl) != null ? i : (r = e == null ? void 0 : e.files) == null ? void 0 : r.regular;
1909
- let s = "";
1910
- if (o && t && n && (s += `
1911
- @font-face {
1912
- font-family: "${t}";
1913
- src: local("${n}"), url('${o}') format('woff2');
1914
- font-display: fallback;
1915
- font-weight: 400;
1916
- }
1917
- `.trim()), e.files)
1918
- for (const a in e.files) {
1919
- if (!(String(Number(a)) === a))
1920
- continue;
1921
- const c = e.files[a];
1922
- c && c !== o && (s += `
1923
- @font-face {
1924
- font-family: "${t}";
1925
- src: url('${c}') format('woff2');
1926
- font-display: fallback;
1927
- font-weight: ${a};
1928
- }
1929
- `.trim());
1968
+ }), K = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1969
+ ...t,
1970
+ testVariationId: t.id,
1971
+ id: e == null ? void 0 : e.id
1972
+ })), qn = ({
1973
+ canTrack: e,
1974
+ content: t
1975
+ }) => !(!(K(t).length > 0) || !e);
1976
+ function Gn(e, t, n) {
1977
+ var i;
1978
+ function o() {
1979
+ function a(C, $, R) {
1980
+ let E = "";
1981
+ if (R) {
1982
+ const b = new Date();
1983
+ b.setTime(b.getTime() + R * 24 * 60 * 60 * 1e3), E = "; expires=" + b.toUTCString();
1984
+ }
1985
+ document.cookie = C + "=" + ($ || "") + E + "; path=/; Secure; SameSite=None";
1930
1986
  }
1931
- return s;
1932
- }, Dn = ({
1933
- customFonts: e
1934
- }) => {
1935
- var t;
1936
- return ((t = e == null ? void 0 : e.map((n) => zn(n))) == null ? void 0 : t.join(" ")) || "";
1937
- }, qn = ({
1938
- cssCode: e,
1939
- contentId: t
1940
- }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", Gn = g({
1941
- name: "content-styles",
1942
- components: { InlinedStyles: G },
1943
- props: ["cssCode", "contentId", "customFonts"],
1944
- data() {
1945
- return {
1946
- injectedStyles: `
1947
- ${qn({
1948
- cssCode: this.cssCode,
1949
- contentId: this.contentId
1950
- })}
1951
- ${Dn({
1952
- customFonts: this.customFonts
1953
- })}
1954
-
1955
- .builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
1956
- margin: 0;
1957
- }
1958
- .builder-text > p, .builder-text > .builder-paragraph {
1959
- color: inherit;
1960
- line-height: inherit;
1961
- letter-spacing: inherit;
1962
- font-weight: inherit;
1963
- font-size: inherit;
1964
- text-align: inherit;
1965
- font-family: inherit;
1987
+ function l(C) {
1988
+ const $ = C + "=", R = document.cookie.split(";");
1989
+ for (let E = 0; E < R.length; E++) {
1990
+ let b = R[E];
1991
+ for (; b.charAt(0) === " "; )
1992
+ b = b.substring(1, b.length);
1993
+ if (b.indexOf($) === 0)
1994
+ return b.substring($.length, b.length);
1995
+ }
1996
+ return null;
1997
+ }
1998
+ const c = `builder.tests.${e}`, u = l(c), h = t.map((C) => C.id).concat(e);
1999
+ if (u && h.includes(u))
2000
+ return u;
2001
+ let m = 0;
2002
+ const f = Math.random();
2003
+ for (let C = 0; C < t.length; C++) {
2004
+ const $ = t[C], R = $.testRatio;
2005
+ if (m += R, f < m)
2006
+ return a(c, $.id), $.id;
2007
+ }
2008
+ return a(c, e), e;
2009
+ }
2010
+ const r = o(), s = (i = document.currentScript) == null ? void 0 : i.previousElementSibling;
2011
+ if (n) {
2012
+ s.remove();
2013
+ const a = document.currentScript;
2014
+ a == null || a.remove();
2015
+ } else {
2016
+ const a = t.concat({
2017
+ id: e
2018
+ }).filter((l) => l.id !== r).map((l) => `.variant-${l.id} { display: none; }
2019
+ `).join("");
2020
+ s.innerHTML = a;
2021
+ }
1966
2022
  }
1967
- `.trim()
1968
- };
2023
+ function Jn(e, t, n) {
2024
+ var l;
2025
+ if (!navigator.cookieEnabled)
2026
+ return;
2027
+ function o(c) {
2028
+ const u = c + "=", h = document.cookie.split(";");
2029
+ for (let m = 0; m < h.length; m++) {
2030
+ let f = h[m];
2031
+ for (; f.charAt(0) === " "; )
2032
+ f = f.substring(1, f.length);
2033
+ if (f.indexOf(u) === 0)
2034
+ return f.substring(u.length, f.length);
2035
+ }
2036
+ return null;
2037
+ }
2038
+ const r = `builder.tests.${t}`, s = o(r), i = (l = document.currentScript) == null ? void 0 : l.parentElement, a = e === t;
2039
+ if (s === e) {
2040
+ if (a)
2041
+ return;
2042
+ i == null || i.removeAttribute("hidden"), i == null || i.removeAttribute("aria-hidden");
2043
+ } else {
2044
+ a && (n ? i == null || i.remove() : (i == null || i.setAttribute("hidden", "true"), i == null || i.setAttribute("aria-hidden", "true")));
2045
+ return;
1969
2046
  }
1970
- });
1971
- function Jn(e, t, n, o, s, r) {
1972
- const i = k("inlined-styles");
1973
- return d(), v(i, { styles: e.injectedStyles }, null, 8, ["styles"]);
1974
2047
  }
1975
- const Yn = /* @__PURE__ */ y(Gn, [["render", Jn], ["__file", "/Users/samijaber/code/work/builder/packages/sdks/output/vue/vue3/src/components/content/components/styles.vue"]]), Xn = ({
1976
- content: e,
1977
- data: t,
1978
- locale: n
1979
- }) => {
1980
- var r, i, a;
1981
- const o = {};
1982
- (i = (r = e == null ? void 0 : e.data) == null ? void 0 : r.inputs) == null || i.forEach((l) => {
1983
- var c;
1984
- l.name && l.defaultValue !== void 0 && ((c = e == null ? void 0 : e.data) == null ? void 0 : c.state) && e.data.state[l.name] === void 0 && (o[l.name] = l.defaultValue);
1985
- });
1986
- const s = {
1987
- ...(a = e == null ? void 0 : e.data) == null ? void 0 : a.state,
1988
- ...t,
1989
- ...n ? {
1990
- locale: n
1991
- } : {}
1992
- };
1993
- return {
1994
- ...o,
1995
- ...s
1996
- };
1997
- }, Qn = ({
1998
- content: e,
1999
- data: t
2000
- }) => e ? {
2001
- ...e,
2002
- data: {
2003
- ...e == null ? void 0 : e.data,
2004
- ...t
2048
+ const Yn = (e) => e === "react" || e === "reactNative", Oe = Yn(A), Ne = "builderIoAbTest", je = "builderIoRenderContent", Xn = () => {
2049
+ const e = Gn.toString().replace(/\s+/g, " "), t = Jn.toString().replace(/\s+/g, " ");
2050
+ return `
2051
+ window.${Ne} = ${e}
2052
+ window.${je} = ${t}
2053
+ `;
2054
+ }, Qn = (e, t) => `
2055
+ window.${Ne}("${t}",${JSON.stringify(e)}, ${Oe})`, Zn = ({
2056
+ contentId: e,
2057
+ variationId: t
2058
+ }) => `
2059
+ window.${je}("${t}", "${e}", ${Oe})`, eo = g({
2060
+ render() {
2061
+ return Se("script", { id: this.id, innerHTML: this.scriptStr });
2005
2062
  },
2006
- meta: e == null ? void 0 : e.meta
2007
- } : void 0;
2008
- function Zn() {
2063
+ name: "inlined-script",
2064
+ props: ["scriptStr", "id"]
2065
+ }), Fe = /* @__PURE__ */ y(eo, [["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/inlined-script.vue"]]);
2066
+ function to() {
2009
2067
  return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
2010
2068
  }
2011
- function eo() {
2012
- const e = Zn().fetch;
2069
+ function no() {
2070
+ const e = to().fetch;
2013
2071
  if (typeof e > "u")
2014
2072
  throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
2015
2073
  For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
2016
2074
  return e;
2017
2075
  }
2018
- const je = eo(), to = (e) => {
2019
- if (e === "localhost" || e === "127.0.0.1")
2020
- return e;
2021
- const t = e.split(".");
2022
- return t.length > 2 ? t.slice(1).join(".") : e;
2023
- }, Be = ({
2024
- name: e,
2025
- canTrack: t
2026
- }) => {
2027
- var n;
2028
- try {
2029
- return t ? (n = document.cookie.split("; ").find((o) => o.startsWith(`${e}=`))) == null ? void 0 : n.split("=")[1] : void 0;
2030
- } catch (o) {
2031
- x.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
2032
- return;
2076
+ const Ue = no();
2077
+ function H(e, t = null, n = ".") {
2078
+ return Object.keys(e).reduce((o, r) => {
2079
+ const s = e[r], i = [t, r].filter(Boolean).join(n);
2080
+ return [typeof s == "object", s !== null, !(Array.isArray(s) && s.length === 0)].every(Boolean) ? {
2081
+ ...o,
2082
+ ...H(s, i, n)
2083
+ } : {
2084
+ ...o,
2085
+ [i]: s
2086
+ };
2087
+ }, {});
2088
+ }
2089
+ const oo = "v3", he = "builder.", ro = "options.", so = (e) => {
2090
+ const t = {};
2091
+ return e.forEach((n, o) => {
2092
+ t[o] = n;
2093
+ }), t;
2094
+ }, Me = (e) => {
2095
+ if (!e)
2096
+ return {};
2097
+ const t = We(e), n = {};
2098
+ return Object.keys(t).forEach((o) => {
2099
+ if (o.startsWith(he)) {
2100
+ const r = o.replace(he, "").replace(ro, "");
2101
+ n[r] = t[o];
2102
+ }
2103
+ }), n;
2104
+ }, io = () => {
2105
+ if (!w())
2106
+ return {};
2107
+ const e = new URLSearchParams(window.location.search);
2108
+ return Me(e);
2109
+ }, We = (e) => e instanceof URLSearchParams ? so(e) : e, fe = (e) => typeof e == "number" && !isNaN(e) && e >= 0, re = (e) => {
2110
+ let {
2111
+ noTraverse: t = !1
2112
+ } = e;
2113
+ const {
2114
+ limit: n = 30,
2115
+ userAttributes: o,
2116
+ query: r,
2117
+ model: s,
2118
+ apiKey: i,
2119
+ includeRefs: a = !0,
2120
+ enrich: l,
2121
+ locale: c,
2122
+ apiVersion: u = oo,
2123
+ fields: h,
2124
+ omit: m,
2125
+ offset: f,
2126
+ cacheSeconds: C,
2127
+ staleCacheSeconds: $,
2128
+ sort: R,
2129
+ includeUnpublished: E
2130
+ } = e;
2131
+ if (!i)
2132
+ throw new Error("Missing API key");
2133
+ if (!["v2", "v3"].includes(u))
2134
+ throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${u}'`);
2135
+ (e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
2136
+ const b = new URL(`https://cdn.builder.io/api/${u}/content/${s}?apiKey=${i}&limit=${n}&noTraverse=${t}&includeRefs=${a}${c ? `&locale=${c}` : ""}${l ? `&enrich=${l}` : ""}`);
2137
+ if (b.searchParams.set("omit", m || "meta.componentsUsed"), h && b.searchParams.set("fields", h), Number.isFinite(f) && f > -1 && b.searchParams.set("offset", String(Math.floor(f))), typeof E == "boolean" && b.searchParams.set("includeUnpublished", String(E)), C && fe(C) && b.searchParams.set("cacheSeconds", String(C)), $ && fe($) && b.searchParams.set("staleCacheSeconds", String($)), R) {
2138
+ const _ = H({
2139
+ sort: R
2140
+ });
2141
+ for (const j in _)
2142
+ b.searchParams.set(j, JSON.stringify(_[j]));
2033
2143
  }
2034
- }, Ve = async (e) => Be(e), no = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(A).join("; "), oo = [["secure", ""], ["SameSite", "None"]], so = ({
2035
- name: e,
2036
- value: t,
2037
- expires: n
2038
- }) => {
2039
- const s = (w() ? location.protocol === "https:" : !0) ? oo : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], i = [[e, t], ...r, ["path", "/"], ["domain", to(window.location.hostname)], ...s];
2040
- return no(i);
2041
- }, Ue = async ({
2042
- name: e,
2043
- value: t,
2044
- expires: n,
2045
- canTrack: o
2046
- }) => {
2047
- try {
2048
- if (!o)
2049
- return;
2050
- const s = so({
2051
- name: e,
2052
- value: t,
2053
- expires: n
2144
+ const Ge = {
2145
+ ...io(),
2146
+ ...We(e.options || {})
2147
+ }, se = H(Ge);
2148
+ for (const _ in se)
2149
+ b.searchParams.set(_, String(se[_]));
2150
+ if (o && b.searchParams.set("userAttributes", JSON.stringify(o)), r) {
2151
+ const _ = H({
2152
+ query: r
2054
2153
  });
2055
- document.cookie = s;
2056
- } catch (s) {
2057
- x.warn("[COOKIE] SET error: ", (s == null ? void 0 : s.message) || s);
2154
+ for (const j in _)
2155
+ b.searchParams.set(j, JSON.stringify(_[j]));
2156
+ }
2157
+ return b;
2158
+ }, ao = (e) => "results" in e;
2159
+ async function J(e) {
2160
+ const t = await Le({
2161
+ ...e,
2162
+ limit: 1
2163
+ });
2164
+ return t && t.results[0] || null;
2165
+ }
2166
+ const er = J, lo = async (e) => {
2167
+ const t = re(e);
2168
+ return await (await Ue(t.href)).json();
2169
+ }, co = async (e, t, n = re(e)) => {
2170
+ const o = U(e.canTrack);
2171
+ if (n.search.includes("preview="), !o || !(w() || A === "reactNative"))
2172
+ return t;
2173
+ try {
2174
+ const r = [];
2175
+ for (const s of t.results)
2176
+ r.push(await dn({
2177
+ item: s,
2178
+ canTrack: o
2179
+ }));
2180
+ t.results = r;
2181
+ } catch (r) {
2182
+ x.error("Could not process A/B tests. ", r);
2058
2183
  }
2184
+ return t;
2059
2185
  };
2060
- function ro() {
2186
+ async function Le(e) {
2187
+ try {
2188
+ const t = re(e), n = await lo(e);
2189
+ return ao(n) ? co(e, n) : (x.error("Error fetching data. ", {
2190
+ url: t,
2191
+ content: n,
2192
+ options: e
2193
+ }), null);
2194
+ } catch (t) {
2195
+ return x.error("Error fetching data. ", t), null;
2196
+ }
2197
+ }
2198
+ const tr = Le;
2199
+ function uo() {
2200
+ return !w() || P() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
2201
+ }
2202
+ function po() {
2061
2203
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
2062
2204
  const t = Math.random() * 16 | 0;
2063
2205
  return (e == "x" ? t : t & 3 | 8).toString(16);
2064
2206
  });
2065
2207
  }
2066
- function Ne() {
2067
- return ro().replace(/-/g, "");
2208
+ function Ke() {
2209
+ return po().replace(/-/g, "");
2068
2210
  }
2069
- const Oe = "builderSessionId", io = async ({
2211
+ const He = "builderSessionId", mo = async ({
2070
2212
  canTrack: e
2071
2213
  }) => {
2072
2214
  if (!e)
2073
2215
  return;
2074
- const t = await Ve({
2075
- name: Oe,
2216
+ const t = await Pe({
2217
+ name: He,
2076
2218
  canTrack: e
2077
2219
  });
2078
- if (A(t))
2220
+ if (B(t))
2079
2221
  return t;
2080
2222
  {
2081
- const n = ao();
2082
- return lo({
2223
+ const n = ho();
2224
+ return fo({
2083
2225
  id: n,
2084
2226
  canTrack: e
2085
2227
  }), n;
2086
2228
  }
2087
- }, ao = () => Ne(), lo = ({
2229
+ }, ho = () => Ke(), fo = ({
2088
2230
  id: e,
2089
2231
  canTrack: t
2090
- }) => Ue({
2091
- name: Oe,
2232
+ }) => Be({
2233
+ name: He,
2092
2234
  value: e,
2093
2235
  canTrack: t
2094
- }), Fe = () => w() && typeof localStorage < "u" ? localStorage : void 0, co = ({
2236
+ }), ze = () => w() && typeof localStorage < "u" ? localStorage : void 0, bo = ({
2095
2237
  key: e,
2096
2238
  canTrack: t
2097
2239
  }) => {
2098
2240
  var n;
2099
2241
  try {
2100
- return t ? (n = Fe()) == null ? void 0 : n.getItem(e) : void 0;
2242
+ return t ? (n = ze()) == null ? void 0 : n.getItem(e) : void 0;
2101
2243
  } catch (o) {
2102
2244
  console.debug("[LocalStorage] GET error: ", o);
2103
2245
  return;
2104
2246
  }
2105
- }, uo = ({
2247
+ }, go = ({
2106
2248
  key: e,
2107
2249
  canTrack: t,
2108
2250
  value: n
2109
2251
  }) => {
2110
2252
  var o;
2111
2253
  try {
2112
- t && ((o = Fe()) == null || o.setItem(e, n));
2113
- } catch (s) {
2114
- console.debug("[LocalStorage] SET error: ", s);
2254
+ t && ((o = ze()) == null || o.setItem(e, n));
2255
+ } catch (r) {
2256
+ console.debug("[LocalStorage] SET error: ", r);
2115
2257
  }
2116
- }, Me = "builderVisitorId", po = ({
2258
+ }, De = "builderVisitorId", yo = ({
2117
2259
  canTrack: e
2118
2260
  }) => {
2119
2261
  if (!e)
2120
2262
  return;
2121
- const t = co({
2122
- key: Me,
2263
+ const t = bo({
2264
+ key: De,
2123
2265
  canTrack: e
2124
2266
  });
2125
- if (A(t))
2267
+ if (B(t))
2126
2268
  return t;
2127
2269
  {
2128
- const n = mo();
2129
- return ho({
2270
+ const n = ko();
2271
+ return vo({
2130
2272
  id: n,
2131
2273
  canTrack: e
2132
2274
  }), n;
2133
2275
  }
2134
- }, mo = () => Ne(), ho = ({
2276
+ }, ko = () => Ke(), vo = ({
2135
2277
  id: e,
2136
2278
  canTrack: t
2137
- }) => uo({
2138
- key: Me,
2279
+ }) => go({
2280
+ key: De,
2139
2281
  value: e,
2140
2282
  canTrack: t
2141
- }), fo = async ({
2283
+ }), So = async ({
2142
2284
  canTrack: e
2143
2285
  }) => {
2144
2286
  if (!e)
@@ -2146,33 +2288,33 @@ const Oe = "builderSessionId", io = async ({
2146
2288
  visitorId: void 0,
2147
2289
  sessionId: void 0
2148
2290
  };
2149
- const t = await io({
2291
+ const t = await mo({
2150
2292
  canTrack: e
2151
- }), n = po({
2293
+ }), n = yo({
2152
2294
  canTrack: e
2153
2295
  });
2154
2296
  return {
2155
2297
  sessionId: t,
2156
2298
  visitorId: n
2157
2299
  };
2158
- }, bo = async ({
2300
+ }, Co = async ({
2159
2301
  type: e,
2160
2302
  canTrack: t,
2161
2303
  apiKey: n,
2162
2304
  metadata: o,
2163
- ...s
2305
+ ...r
2164
2306
  }) => ({
2165
2307
  type: e,
2166
2308
  data: {
2167
- ...s,
2309
+ ...r,
2168
2310
  metadata: {
2169
2311
  url: location.href,
2170
2312
  ...o
2171
2313
  },
2172
- ...await fo({
2314
+ ...await So({
2173
2315
  canTrack: t
2174
2316
  }),
2175
- userAttributes: Ie(),
2317
+ userAttributes: $e(),
2176
2318
  ownerId: n
2177
2319
  }
2178
2320
  });
@@ -2181,11 +2323,11 @@ async function ee(e) {
2181
2323
  x.error("Missing API key for track call. Please provide your API key.");
2182
2324
  return;
2183
2325
  }
2184
- if (!!e.canTrack && !_() && !!(w() || P === "reactNative"))
2326
+ if (!!e.canTrack && !P() && !!(w() || A === "reactNative"))
2185
2327
  return fetch("https://cdn.builder.io/api/v1/track", {
2186
2328
  method: "POST",
2187
2329
  body: JSON.stringify({
2188
- events: [await bo(e)]
2330
+ events: [await Co(e)]
2189
2331
  }),
2190
2332
  headers: {
2191
2333
  "content-type": "application/json"
@@ -2195,13 +2337,56 @@ async function ee(e) {
2195
2337
  console.error("Failed to track: ", t);
2196
2338
  });
2197
2339
  }
2198
- const ns = (e) => ee({
2340
+ const nr = (e) => ee({
2199
2341
  ...e,
2200
2342
  canTrack: !0
2201
- }), go = "0.7.1-1", fe = {};
2202
- function yo(e, t) {
2203
- let n = fe[e];
2204
- if (n || (n = fe[e] = []), n.push(t), w()) {
2343
+ });
2344
+ function be(e) {
2345
+ return Math.round(e * 1e3) / 1e3;
2346
+ }
2347
+ const wo = (e, t, n = !0) => {
2348
+ if (!(e instanceof HTMLElement))
2349
+ return null;
2350
+ let o = n ? e : e.parentElement;
2351
+ do {
2352
+ if (!o)
2353
+ return null;
2354
+ if (t(o))
2355
+ return o;
2356
+ } while (o = o.parentElement);
2357
+ return null;
2358
+ }, $o = (e) => wo(e, (t) => {
2359
+ const n = t.getAttribute("builder-id") || t.id;
2360
+ return Boolean((n == null ? void 0 : n.indexOf("builder-")) === 0);
2361
+ }), ge = ({
2362
+ event: e,
2363
+ target: t
2364
+ }) => {
2365
+ const n = t.getBoundingClientRect(), o = e.clientX - n.left, r = e.clientY - n.top, s = be(o / n.width), i = be(r / n.height);
2366
+ return {
2367
+ x: s,
2368
+ y: i
2369
+ };
2370
+ }, Ro = (e) => {
2371
+ const t = e.target, n = t && $o(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
2372
+ return {
2373
+ targetBuilderElement: o || void 0,
2374
+ metadata: {
2375
+ targetOffset: t ? ge({
2376
+ event: e,
2377
+ target: t
2378
+ }) : void 0,
2379
+ builderTargetOffset: n ? ge({
2380
+ event: e,
2381
+ target: n
2382
+ }) : void 0,
2383
+ builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
2384
+ }
2385
+ };
2386
+ }, To = "0.7.2", ye = {};
2387
+ function Io(e, t) {
2388
+ let n = ye[e];
2389
+ if (n || (n = ye[e] = []), n.push(t), w()) {
2205
2390
  const o = {
2206
2391
  type: "builder.register",
2207
2392
  data: {
@@ -2211,13 +2396,13 @@ function yo(e, t) {
2211
2396
  };
2212
2397
  try {
2213
2398
  parent.postMessage(o, "*"), parent !== window && window.postMessage(o, "*");
2214
- } catch (s) {
2215
- console.debug("Could not postmessage", s);
2399
+ } catch (r) {
2400
+ console.debug("Could not postmessage", r);
2216
2401
  }
2217
2402
  }
2218
2403
  }
2219
- const ko = () => {
2220
- yo("insertMenu", {
2404
+ const xo = () => {
2405
+ Io("insertMenu", {
2221
2406
  name: "_default",
2222
2407
  default: !0,
2223
2408
  items: [{
@@ -2239,14 +2424,14 @@ const ko = () => {
2239
2424
  }]
2240
2425
  });
2241
2426
  };
2242
- let be = !1;
2243
- const vo = (e = {}) => {
2427
+ let ke = !1;
2428
+ const Eo = (e = {}) => {
2244
2429
  var t, n;
2245
- be || (be = !0, w() && ((t = window.parent) == null || t.postMessage({
2430
+ ke || (ke = !0, w() && ((t = window.parent) == null || t.postMessage({
2246
2431
  type: "builder.sdkInfo",
2247
2432
  data: {
2248
- target: P,
2249
- version: go,
2433
+ target: A,
2434
+ version: To,
2250
2435
  supportsPatchUpdates: !1,
2251
2436
  supportsAddBlockScoping: !0,
2252
2437
  supportsCustomBreakpoints: !0
@@ -2259,7 +2444,7 @@ const vo = (e = {}) => {
2259
2444
  }, "*"), window.addEventListener("message", ({
2260
2445
  data: o
2261
2446
  }) => {
2262
- var s, r;
2447
+ var r, s;
2263
2448
  if (!!(o != null && o.type))
2264
2449
  switch (o.type) {
2265
2450
  case "builder.evaluate": {
@@ -2270,7 +2455,7 @@ const vo = (e = {}) => {
2270
2455
  } catch (m) {
2271
2456
  h = m;
2272
2457
  }
2273
- h ? (s = window.parent) == null || s.postMessage({
2458
+ h ? (r = window.parent) == null || r.postMessage({
2274
2459
  type: "builder.evaluateError",
2275
2460
  data: {
2276
2461
  id: l,
@@ -2285,7 +2470,7 @@ const vo = (e = {}) => {
2285
2470
  result: m
2286
2471
  }
2287
2472
  }, "*");
2288
- }).catch(console.error) : (r = window.parent) == null || r.postMessage({
2473
+ }).catch(console.error) : (s = window.parent) == null || s.postMessage({
2289
2474
  type: "builder.evaluateResult",
2290
2475
  data: {
2291
2476
  result: u,
@@ -2296,269 +2481,7 @@ const vo = (e = {}) => {
2296
2481
  }
2297
2482
  }
2298
2483
  })));
2299
- };
2300
- function ge(e) {
2301
- return Math.round(e * 1e3) / 1e3;
2302
- }
2303
- const So = (e, t, n = !0) => {
2304
- if (!(e instanceof HTMLElement))
2305
- return null;
2306
- let o = n ? e : e.parentElement;
2307
- do {
2308
- if (!o)
2309
- return null;
2310
- if (t(o))
2311
- return o;
2312
- } while (o = o.parentElement);
2313
- return null;
2314
- }, Co = (e) => So(e, (t) => {
2315
- const n = t.getAttribute("builder-id") || t.id;
2316
- return Boolean((n == null ? void 0 : n.indexOf("builder-")) === 0);
2317
- }), ye = ({
2318
- event: e,
2319
- target: t
2320
- }) => {
2321
- const n = t.getBoundingClientRect(), o = e.clientX - n.left, s = e.clientY - n.top, r = ge(o / n.width), i = ge(s / n.height);
2322
- return {
2323
- x: r,
2324
- y: i
2325
- };
2326
- }, wo = (e) => {
2327
- const t = e.target, n = t && Co(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
2328
- return {
2329
- targetBuilderElement: o || void 0,
2330
- metadata: {
2331
- targetOffset: t ? ye({
2332
- event: e,
2333
- target: t
2334
- }) : void 0,
2335
- builderTargetOffset: n ? ye({
2336
- event: e,
2337
- target: n
2338
- }) : void 0,
2339
- builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
2340
- }
2341
- };
2342
- }, $o = "builder.tests", oe = (e) => `${$o}.${e}`, To = ({
2343
- contentId: e
2344
- }) => Ve({
2345
- name: oe(e),
2346
- canTrack: !0
2347
- }), Io = ({
2348
- contentId: e
2349
- }) => Be({
2350
- name: oe(e),
2351
- canTrack: !0
2352
- }), Ro = ({
2353
- contentId: e,
2354
- value: t
2355
- }) => Ue({
2356
- name: oe(e),
2357
- value: t,
2358
- canTrack: !0
2359
- }), We = (e) => A(e.id) && A(e.variations) && Object.keys(e.variations).length > 0, xo = ({
2360
- id: e,
2361
- variations: t
2362
- }) => {
2363
- var s;
2364
- let n = 0;
2365
- const o = Math.random();
2366
- for (const r in t) {
2367
- const i = (s = t[r]) == null ? void 0 : s.testRatio;
2368
- if (n += i, o < n)
2369
- return r;
2370
- }
2371
- return e;
2372
- }, Le = (e) => {
2373
- const t = xo(e);
2374
- return Ro({
2375
- contentId: e.id,
2376
- value: t
2377
- }).catch((n) => {
2378
- x.error("could not store A/B test variation: ", n);
2379
- }), t;
2380
- }, Ke = ({
2381
- item: e,
2382
- testGroupId: t
2383
- }) => {
2384
- const n = e.variations[t];
2385
- return t === e.id || !n ? {
2386
- testVariationId: e.id,
2387
- testVariationName: "Default"
2388
- } : {
2389
- data: n.data,
2390
- testVariationId: n.id,
2391
- testVariationName: n.name || (n.id === e.id ? "Default" : "")
2392
- };
2393
- }, Eo = ({
2394
- item: e,
2395
- canTrack: t
2396
- }) => {
2397
- if (!t)
2398
- return e;
2399
- if (!e)
2400
- return;
2401
- if (!We(e))
2402
- return e;
2403
- const n = Io({
2404
- contentId: e.id
2405
- }) || Le({
2406
- variations: e.variations,
2407
- id: e.id
2408
- }), o = Ke({
2409
- item: e,
2410
- testGroupId: n
2411
- });
2412
- return {
2413
- ...e,
2414
- ...o
2415
- };
2416
- }, _o = async ({
2417
- item: e,
2418
- canTrack: t
2419
- }) => {
2420
- if (!t || !We(e))
2421
- return e;
2422
- const o = await To({
2423
- contentId: e.id
2424
- }) || Le({
2425
- variations: e.variations,
2426
- id: e.id
2427
- }), s = Ke({
2428
- item: e,
2429
- testGroupId: o
2430
- });
2431
- return {
2432
- ...e,
2433
- ...s
2434
- };
2435
- }, F = (e) => A(e) ? e : !0;
2436
- function H(e, t = null, n = ".") {
2437
- return Object.keys(e).reduce((o, s) => {
2438
- const r = e[s], i = [t, s].filter(Boolean).join(n);
2439
- return [typeof r == "object", r !== null, !(Array.isArray(r) && r.length === 0)].every(Boolean) ? {
2440
- ...o,
2441
- ...H(r, i, n)
2442
- } : {
2443
- ...o,
2444
- [i]: r
2445
- };
2446
- }, {});
2447
- }
2448
- const ke = "builder.", Ao = "options.", Po = (e) => {
2449
- const t = {};
2450
- return e.forEach((n, o) => {
2451
- t[o] = n;
2452
- }), t;
2453
- }, He = (e) => {
2454
- if (!e)
2455
- return {};
2456
- const t = ze(e), n = {};
2457
- return Object.keys(t).forEach((o) => {
2458
- if (o.startsWith(ke)) {
2459
- const s = o.replace(ke, "").replace(Ao, "");
2460
- n[s] = t[o];
2461
- }
2462
- }), n;
2463
- }, jo = () => {
2464
- if (!w())
2465
- return {};
2466
- const e = new URLSearchParams(window.location.search);
2467
- return He(e);
2468
- }, ze = (e) => e instanceof URLSearchParams ? Po(e) : e, Bo = "v3", ve = (e) => typeof e == "number" && !isNaN(e) && e >= 0, se = (e) => {
2469
- let {
2470
- noTraverse: t = !1
2471
- } = e;
2472
- const {
2473
- limit: n = 30,
2474
- userAttributes: o,
2475
- query: s,
2476
- model: r,
2477
- apiKey: i,
2478
- includeRefs: a = !0,
2479
- enrich: l,
2480
- locale: c,
2481
- apiVersion: u = Bo,
2482
- fields: h,
2483
- omit: m,
2484
- offset: f,
2485
- cacheSeconds: C,
2486
- staleCacheSeconds: $,
2487
- sort: T,
2488
- includeUnpublished: E
2489
- } = e;
2490
- if (!i)
2491
- throw new Error("Missing API key");
2492
- if (!["v2", "v3"].includes(u))
2493
- throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${u}'`);
2494
- (e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
2495
- const b = new URL(`https://cdn.builder.io/api/${u}/content/${r}?apiKey=${i}&limit=${n}&noTraverse=${t}&includeRefs=${a}${c ? `&locale=${c}` : ""}${l ? `&enrich=${l}` : ""}`);
2496
- if (b.searchParams.set("omit", m || "meta.componentsUsed"), h && b.searchParams.set("fields", h), Number.isFinite(f) && f > -1 && b.searchParams.set("offset", String(Math.floor(f))), typeof E == "boolean" && b.searchParams.set("includeUnpublished", String(E)), C && ve(C) && b.searchParams.set("cacheSeconds", String(C)), $ && ve($) && b.searchParams.set("staleCacheSeconds", String($)), T) {
2497
- const j = H({
2498
- sort: T
2499
- });
2500
- for (const N in j)
2501
- b.searchParams.set(N, JSON.stringify(j[N]));
2502
- }
2503
- const Je = {
2504
- ...jo(),
2505
- ...ze(e.options || {})
2506
- }, re = H(Je);
2507
- for (const j in re)
2508
- b.searchParams.set(j, String(re[j]));
2509
- if (o && b.searchParams.set("userAttributes", JSON.stringify(o)), s) {
2510
- const j = H({
2511
- query: s
2512
- });
2513
- for (const N in j)
2514
- b.searchParams.set(N, JSON.stringify(j[N]));
2515
- }
2516
- return b;
2517
- }, Vo = (e) => "results" in e;
2518
- async function J(e) {
2519
- const t = await De({
2520
- ...e,
2521
- limit: 1
2522
- });
2523
- return t && t.results[0] || null;
2524
- }
2525
- const os = J, Uo = async (e) => {
2526
- const t = se(e);
2527
- return await (await je(t.href)).json();
2528
- }, No = async (e, t, n = se(e)) => {
2529
- const o = F(e.canTrack);
2530
- if (n.search.includes("preview="), !o || !(w() || P === "reactNative"))
2531
- return t;
2532
- try {
2533
- const s = [];
2534
- for (const r of t.results)
2535
- s.push(await _o({
2536
- item: r,
2537
- canTrack: o
2538
- }));
2539
- t.results = s;
2540
- } catch (s) {
2541
- x.error("Could not process A/B tests. ", s);
2542
- }
2543
- return t;
2544
- };
2545
- async function De(e) {
2546
- try {
2547
- const t = se(e), n = await Uo(e);
2548
- return Vo(n) ? No(e, n) : (x.error("Error fetching data. ", {
2549
- url: t,
2550
- content: n,
2551
- options: e
2552
- }), null);
2553
- } catch (t) {
2554
- return x.error("Error fetching data. ", t), null;
2555
- }
2556
- }
2557
- const ss = De;
2558
- function Oo() {
2559
- return !w() || _() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
2560
- }
2561
- const Fo = g({
2484
+ }, Po = g({
2562
2485
  name: "enable-editor",
2563
2486
  props: [
2564
2487
  "builderContextSignal",
@@ -2593,19 +2516,19 @@ const Fo = g({
2593
2516
  (() => {
2594
2517
  var n, o;
2595
2518
  if (w()) {
2596
- if (_() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
2519
+ if (P() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
2597
2520
  new CustomEvent("initeditingbldr")
2598
- ), this.builderContextSignal.content && F(this.canTrack)) {
2599
- const r = (n = this.builderContextSignal.content) == null ? void 0 : n.testVariationId, i = (o = this.builderContextSignal.content) == null ? void 0 : o.id, a = this.apiKey;
2521
+ ), this.builderContextSignal.content && U(this.canTrack)) {
2522
+ const s = (n = this.builderContextSignal.content) == null ? void 0 : n.testVariationId, i = (o = this.builderContextSignal.content) == null ? void 0 : o.id, a = this.apiKey;
2600
2523
  ee({
2601
2524
  type: "impression",
2602
2525
  canTrack: !0,
2603
2526
  contentId: i,
2604
2527
  apiKey: a,
2605
- variationId: r !== i ? r : void 0
2528
+ variationId: s !== i ? s : void 0
2606
2529
  });
2607
2530
  }
2608
- Oo() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
2531
+ uo() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
2609
2532
  new CustomEvent("initpreviewingbldr")
2610
2533
  );
2611
2534
  }
@@ -2681,7 +2604,7 @@ const Fo = g({
2681
2604
  },
2682
2605
  methods: {
2683
2606
  mergeNewContent(e) {
2684
- var n, o, s, r, i;
2607
+ var n, o, r, s, i;
2685
2608
  const t = {
2686
2609
  ...this.builderContextSignal.content,
2687
2610
  ...e,
@@ -2692,7 +2615,7 @@ const Fo = g({
2692
2615
  meta: {
2693
2616
  ...(o = this.builderContextSignal.content) == null ? void 0 : o.meta,
2694
2617
  ...e == null ? void 0 : e.meta,
2695
- breakpoints: ((s = e == null ? void 0 : e.meta) == null ? void 0 : s.breakpoints) || ((i = (r = this.builderContextSignal.content) == null ? void 0 : r.meta) == null ? void 0 : i.breakpoints)
2618
+ breakpoints: ((r = e == null ? void 0 : e.meta) == null ? void 0 : r.breakpoints) || ((i = (s = this.builderContextSignal.content) == null ? void 0 : s.meta) == null ? void 0 : i.breakpoints)
2696
2619
  }
2697
2620
  };
2698
2621
  this.builderContextSignal.content = t;
@@ -2703,19 +2626,19 @@ const Fo = g({
2703
2626
  if (t)
2704
2627
  switch (t.type) {
2705
2628
  case "builder.configureSdk": {
2706
- const o = t.data, { breakpoints: s, contentId: r } = o;
2707
- if (!r || r !== ((n = this.builderContextSignal.content) == null ? void 0 : n.id))
2629
+ const o = t.data, { breakpoints: r, contentId: s } = o;
2630
+ if (!s || s !== ((n = this.builderContextSignal.content) == null ? void 0 : n.id))
2708
2631
  return;
2709
- s && this.mergeNewContent({
2632
+ r && this.mergeNewContent({
2710
2633
  meta: {
2711
- breakpoints: s
2634
+ breakpoints: r
2712
2635
  }
2713
2636
  }), this.forceReRenderCount = this.forceReRenderCount + 1;
2714
2637
  break;
2715
2638
  }
2716
2639
  case "builder.contentUpdate": {
2717
- const o = t.data, s = o.key || o.alias || o.entry || o.modelName, r = o.data;
2718
- s === this.model && (this.mergeNewContent(r), this.forceReRenderCount = this.forceReRenderCount + 1);
2640
+ const o = t.data, r = o.key || o.alias || o.entry || o.modelName, s = o.data;
2641
+ r === this.model && (this.mergeNewContent(s), this.forceReRenderCount = this.forceReRenderCount + 1);
2719
2642
  break;
2720
2643
  }
2721
2644
  }
@@ -2734,14 +2657,14 @@ const Fo = g({
2734
2657
  onClick(e) {
2735
2658
  var t, n;
2736
2659
  if (this.builderContextSignal.content) {
2737
- const o = (t = this.builderContextSignal.content) == null ? void 0 : t.testVariationId, s = (n = this.builderContextSignal.content) == null ? void 0 : n.id;
2660
+ const o = (t = this.builderContextSignal.content) == null ? void 0 : t.testVariationId, r = (n = this.builderContextSignal.content) == null ? void 0 : n.id;
2738
2661
  ee({
2739
2662
  type: "click",
2740
- canTrack: F(this.canTrack),
2741
- contentId: s,
2663
+ canTrack: U(this.canTrack),
2664
+ contentId: r,
2742
2665
  apiKey: this.apiKey,
2743
- variationId: o !== s ? o : void 0,
2744
- ...wo(e),
2666
+ variationId: o !== r ? o : void 0,
2667
+ ...Ro(e),
2745
2668
  unique: !this.clicked
2746
2669
  });
2747
2670
  }
@@ -2760,13 +2683,13 @@ const Fo = g({
2760
2683
  );
2761
2684
  },
2762
2685
  handleRequest({ url: e, key: t }) {
2763
- je(e).then((n) => n.json()).then((n) => {
2764
- var s, r;
2686
+ Ue(e).then((n) => n.json()).then((n) => {
2687
+ var r, s;
2765
2688
  const o = {
2766
2689
  ...this.builderContextSignal.rootState,
2767
2690
  [t]: n
2768
2691
  };
2769
- (r = (s = this.builderContextSignal).rootSetState) == null || r.call(s, o), this.httpReqsData[t] = !0;
2692
+ (s = (r = this.builderContextSignal).rootSetState) == null || s.call(r, o), this.httpReqsData[t] = !0;
2770
2693
  }).catch((n) => {
2771
2694
  console.error("error fetching dynamic data", e, n);
2772
2695
  });
@@ -2774,18 +2697,18 @@ const Fo = g({
2774
2697
  runHttpRequests() {
2775
2698
  var t, n, o;
2776
2699
  const e = (o = (n = (t = this.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : n.httpRequests) != null ? o : {};
2777
- Object.entries(e).forEach(([s, r]) => {
2778
- if (r && (!this.httpReqsData[s] || _())) {
2779
- const i = this.evalExpression(r);
2700
+ Object.entries(e).forEach(([r, s]) => {
2701
+ if (s && (!this.httpReqsData[r] || P())) {
2702
+ const i = this.evalExpression(s);
2780
2703
  this.handleRequest({
2781
2704
  url: i,
2782
- key: s
2705
+ key: r
2783
2706
  });
2784
2707
  }
2785
2708
  });
2786
2709
  },
2787
2710
  emitStateUpdate() {
2788
- _() && window.dispatchEvent(
2711
+ P() && window.dispatchEvent(
2789
2712
  new CustomEvent(
2790
2713
  "builder:component:stateChange",
2791
2714
  {
@@ -2800,7 +2723,7 @@ const Fo = g({
2800
2723
  );
2801
2724
  },
2802
2725
  elementRef_onIniteditingbldr(e) {
2803
- this.forceReRenderCount = this.forceReRenderCount + 1, window.addEventListener("message", this.processMessage), ko(), vo({
2726
+ this.forceReRenderCount = this.forceReRenderCount + 1, window.addEventListener("message", this.processMessage), xo(), Eo({
2804
2727
  ...this.locale ? {
2805
2728
  locale: this.locale
2806
2729
  } : {},
@@ -2814,7 +2737,7 @@ const Fo = g({
2814
2737
  this.builderContextSignal.componentInfos
2815
2738
  ).forEach((t) => {
2816
2739
  var o;
2817
- const n = Ln(t);
2740
+ const n = Hn(t);
2818
2741
  (o = window.parent) == null || o.postMessage(n, "*");
2819
2742
  }), window.addEventListener(
2820
2743
  "builder:component:stateChangeListenerActivated",
@@ -2824,13 +2747,13 @@ const Fo = g({
2824
2747
  elementRef_onInitpreviewingbldr(e) {
2825
2748
  const t = new URL(location.href).searchParams, n = t.get("builder.preview"), o = t.get(
2826
2749
  `builder.preview.${n}`
2827
- ), s = t.get("apiKey") || t.get("builder.space");
2828
- n === this.model && s === this.apiKey && (!this.content || o === this.content.id) && J({
2750
+ ), r = t.get("apiKey") || t.get("builder.space");
2751
+ n === this.model && r === this.apiKey && (!this.content || o === this.content.id) && J({
2829
2752
  model: this.model,
2830
2753
  apiKey: this.apiKey,
2831
2754
  apiVersion: this.builderContextSignal.apiVersion
2832
- }).then((r) => {
2833
- r && this.mergeNewContent(r);
2755
+ }).then((s) => {
2756
+ s && this.mergeNewContent(s);
2834
2757
  });
2835
2758
  },
2836
2759
  _classStringToObject(e) {
@@ -2843,8 +2766,8 @@ const Fo = g({
2843
2766
  return t;
2844
2767
  }
2845
2768
  }
2846
- }), Mo = ["builder-content-id", "builder-model"];
2847
- function Wo(e, t, n, o, s, r) {
2769
+ }), Bo = ["builder-content-id", "builder-model"];
2770
+ function Ao(e, t, n, o, r, s) {
2848
2771
  var i;
2849
2772
  return e.builderContextSignal.content ? (d(), p("div", I({
2850
2773
  key: e.forceReRenderCount,
@@ -2861,21 +2784,116 @@ function Wo(e, t, n, o, s, r) {
2861
2784
  "aria-hidden": !0
2862
2785
  }
2863
2786
  }), [
2864
- U(e.$slots, "default")
2865
- ], 16, Mo)) : S("v-if", !0);
2787
+ N(e.$slots, "default")
2788
+ ], 16, Bo)) : S("v-if", !0);
2866
2789
  }
2867
- const Lo = /* @__PURE__ */ y(Fo, [["render", Wo], ["__file", "/Users/samijaber/code/work/builder/packages/sdks/output/vue/vue3/src/components/content/components/enable-editor.vue"]]), Ko = g({
2868
- render() {
2869
- return Ce("script", { id: this.id, innerHTML: this.scriptStr });
2790
+ const _o = /* @__PURE__ */ y(Po, [["render", Ao], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/content/components/enable-editor.vue"]]), Vo = (e) => {
2791
+ var s, i;
2792
+ const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = (i = e.fileUrl) != null ? i : (s = e == null ? void 0 : e.files) == null ? void 0 : s.regular;
2793
+ let r = "";
2794
+ if (o && t && n && (r += `
2795
+ @font-face {
2796
+ font-family: "${t}";
2797
+ src: local("${n}"), url('${o}') format('woff2');
2798
+ font-display: fallback;
2799
+ font-weight: 400;
2800
+ }
2801
+ `.trim()), e.files)
2802
+ for (const a in e.files) {
2803
+ if (!(String(Number(a)) === a))
2804
+ continue;
2805
+ const c = e.files[a];
2806
+ c && c !== o && (r += `
2807
+ @font-face {
2808
+ font-family: "${t}";
2809
+ src: url('${c}') format('woff2');
2810
+ font-display: fallback;
2811
+ font-weight: ${a};
2812
+ }
2813
+ `.trim());
2814
+ }
2815
+ return r;
2816
+ }, Oo = ({
2817
+ customFonts: e
2818
+ }) => {
2819
+ var t;
2820
+ return ((t = e == null ? void 0 : e.map((n) => Vo(n))) == null ? void 0 : t.join(" ")) || "";
2821
+ }, No = ({
2822
+ cssCode: e,
2823
+ contentId: t
2824
+ }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", jo = g({
2825
+ name: "content-styles",
2826
+ components: { InlinedStyles: G },
2827
+ props: ["cssCode", "contentId", "customFonts"],
2828
+ data() {
2829
+ return {
2830
+ injectedStyles: `
2831
+ ${No({
2832
+ cssCode: this.cssCode,
2833
+ contentId: this.contentId
2834
+ })}
2835
+ ${Oo({
2836
+ customFonts: this.customFonts
2837
+ })}
2838
+
2839
+ .builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
2840
+ margin: 0;
2841
+ }
2842
+ .builder-text > p, .builder-text > .builder-paragraph {
2843
+ color: inherit;
2844
+ line-height: inherit;
2845
+ letter-spacing: inherit;
2846
+ font-weight: inherit;
2847
+ font-size: inherit;
2848
+ text-align: inherit;
2849
+ font-family: inherit;
2850
+ }
2851
+ `.trim()
2852
+ };
2853
+ }
2854
+ });
2855
+ function Fo(e, t, n, o, r, s) {
2856
+ const i = k("inlined-styles");
2857
+ return d(), v(i, { styles: e.injectedStyles }, null, 8, ["styles"]);
2858
+ }
2859
+ const Uo = /* @__PURE__ */ y(jo, [["render", Fo], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/content/components/styles.vue"]]), Mo = ({
2860
+ content: e,
2861
+ data: t,
2862
+ locale: n
2863
+ }) => {
2864
+ var s, i, a;
2865
+ const o = {};
2866
+ (i = (s = e == null ? void 0 : e.data) == null ? void 0 : s.inputs) == null || i.forEach((l) => {
2867
+ var c;
2868
+ l.name && l.defaultValue !== void 0 && ((c = e == null ? void 0 : e.data) == null ? void 0 : c.state) && e.data.state[l.name] === void 0 && (o[l.name] = l.defaultValue);
2869
+ });
2870
+ const r = {
2871
+ ...(a = e == null ? void 0 : e.data) == null ? void 0 : a.state,
2872
+ ...t,
2873
+ ...n ? {
2874
+ locale: n
2875
+ } : {}
2876
+ };
2877
+ return {
2878
+ ...o,
2879
+ ...r
2880
+ };
2881
+ }, Wo = ({
2882
+ content: e,
2883
+ data: t
2884
+ }) => e ? {
2885
+ ...e,
2886
+ data: {
2887
+ ...e == null ? void 0 : e.data,
2888
+ ...t
2870
2889
  },
2871
- name: "inlined-script",
2872
- props: ["scriptStr", "id"]
2873
- }), qe = /* @__PURE__ */ y(Ko, [["__file", "/Users/samijaber/code/work/builder/packages/sdks/output/vue/vue3/src/components/inlined-script.vue"]]), Ho = Xe, zo = g({
2890
+ meta: e == null ? void 0 : e.meta
2891
+ } : void 0, Lo = Je, Ko = g({
2874
2892
  name: "content-component",
2875
2893
  components: {
2876
- EnableEditor: Lo,
2877
- InlinedScript: qe,
2878
- ContentStyles: Yn,
2894
+ EnableEditor: _o,
2895
+ InlinedScript: Fe,
2896
+ ContentStyles: Uo,
2879
2897
  Blocks: ne
2880
2898
  },
2881
2899
  props: [
@@ -2897,31 +2915,31 @@ const Lo = /* @__PURE__ */ y(Fo, [["render", Wo], ["__file", "/Users/samijaber/c
2897
2915
  data() {
2898
2916
  var e, t;
2899
2917
  return {
2900
- scriptStr: ln({
2918
+ scriptStr: Zn({
2901
2919
  variationId: (e = this.content) == null ? void 0 : e.testVariationId,
2902
2920
  contentId: (t = this.content) == null ? void 0 : t.id
2903
2921
  }),
2904
2922
  registeredComponents: [
2905
- ...me(),
2906
- ...he,
2923
+ ...pe(),
2924
+ ...me,
2907
2925
  ...this.customComponents || []
2908
2926
  ].reduce(
2909
- (n, { component: o, ...s }) => ({
2927
+ (n, { component: o, ...r }) => ({
2910
2928
  ...n,
2911
- [s.name]: {
2912
- component: Ho(o),
2913
- ...Z(s)
2929
+ [r.name]: {
2930
+ component: Lo(o),
2931
+ ...Z(r)
2914
2932
  }
2915
2933
  }),
2916
2934
  {}
2917
2935
  ),
2918
2936
  builderContextSignal: {
2919
- content: Qn({
2937
+ content: Wo({
2920
2938
  content: this.content,
2921
2939
  data: this.data
2922
2940
  }),
2923
2941
  localState: void 0,
2924
- rootState: Xn({
2942
+ rootState: Mo({
2925
2943
  content: this.content,
2926
2944
  data: this.data,
2927
2945
  locale: this.locale
@@ -2931,25 +2949,25 @@ const Lo = /* @__PURE__ */ y(Fo, [["render", Wo], ["__file", "/Users/samijaber/c
2931
2949
  apiKey: this.apiKey,
2932
2950
  apiVersion: this.apiVersion,
2933
2951
  componentInfos: [
2934
- ...me(),
2935
- ...he,
2952
+ ...pe(),
2953
+ ...me,
2936
2954
  ...this.customComponents || []
2937
2955
  ].reduce(
2938
- (n, { component: o, ...s }) => ({
2956
+ (n, { component: o, ...r }) => ({
2939
2957
  ...n,
2940
- [s.name]: Z(s)
2958
+ [r.name]: Z(r)
2941
2959
  }),
2942
2960
  {}
2943
2961
  ),
2944
2962
  inheritedStyles: {}
2945
2963
  },
2946
- TARGET: P
2964
+ TARGET: A
2947
2965
  };
2948
2966
  },
2949
2967
  provide() {
2950
2968
  const e = this;
2951
2969
  return {
2952
- [Ee.key]: {
2970
+ [we.key]: {
2953
2971
  registeredComponents: e.registeredComponents
2954
2972
  }
2955
2973
  };
@@ -2960,7 +2978,7 @@ const Lo = /* @__PURE__ */ y(Fo, [["render", Wo], ["__file", "/Users/samijaber/c
2960
2978
  }
2961
2979
  }
2962
2980
  });
2963
- function Do(e, t, n, o, s, r) {
2981
+ function Ho(e, t, n, o, r, s) {
2964
2982
  const i = k("inlined-script"), a = k("content-styles"), l = k("blocks"), c = k("enable-editor");
2965
2983
  return d(), v(c, I({
2966
2984
  content: e.content,
@@ -2976,7 +2994,7 @@ function Do(e, t, n, o, s, r) {
2976
2994
  builderContextSignal: e.builderContextSignal
2977
2995
  }, {}), {
2978
2996
  default: te(() => {
2979
- var u, h, m, f, C, $, T;
2997
+ var u, h, m, f, C, $, R;
2980
2998
  return [
2981
2999
  e.isSsrAbTest ? (d(), v(i, {
2982
3000
  key: 0,
@@ -2988,8 +3006,8 @@ function Do(e, t, n, o, s, r) {
2988
3006
  cssCode: (m = (h = e.builderContextSignal.content) == null ? void 0 : h.data) == null ? void 0 : m.cssCode,
2989
3007
  customFonts: (C = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : C.customFonts
2990
3008
  }, null, 8, ["contentId", "cssCode", "customFonts"])) : S("v-if", !0),
2991
- V(l, {
2992
- blocks: (T = ($ = e.builderContextSignal.content) == null ? void 0 : $.data) == null ? void 0 : T.blocks,
3009
+ O(l, {
3010
+ blocks: (R = ($ = e.builderContextSignal.content) == null ? void 0 : $.data) == null ? void 0 : R.blocks,
2993
3011
  context: e.builderContextSignal,
2994
3012
  registeredComponents: e.registeredComponents
2995
3013
  }, null, 8, ["blocks", "context", "registeredComponents"])
@@ -2998,12 +3016,12 @@ function Do(e, t, n, o, s, r) {
2998
3016
  _: 1
2999
3017
  }, 16, ["content", "model", "context", "apiKey", "canTrack", "locale", "includeRefs", "enrich", "classNameProp", "showContent", "builderContextSignal"]);
3000
3018
  }
3001
- const qo = /* @__PURE__ */ y(zo, [["render", Do], ["__file", "/Users/samijaber/code/work/builder/packages/sdks/output/vue/vue3/src/components/content/content.vue"]]), Go = g({
3019
+ const zo = /* @__PURE__ */ y(Ko, [["render", Ho], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/content/content.vue"]]), Do = g({
3002
3020
  name: "content-variants",
3003
3021
  components: {
3004
- InlinedScript: qe,
3022
+ InlinedScript: Fe,
3005
3023
  InlinedStyles: G,
3006
- ContentComponent: qo
3024
+ ContentComponent: zo
3007
3025
  },
3008
3026
  props: [
3009
3027
  "canTrack",
@@ -3021,13 +3039,13 @@ const qo = /* @__PURE__ */ y(zo, [["render", Do], ["__file", "/Users/samijaber/c
3021
3039
  ],
3022
3040
  data() {
3023
3041
  return {
3024
- shouldRenderVariants: tn({
3025
- canTrack: F(this.canTrack),
3042
+ shouldRenderVariants: qn({
3043
+ canTrack: U(this.canTrack),
3026
3044
  content: this.content
3027
3045
  }),
3028
- getScriptString: rn,
3029
- getVariants: K,
3030
- TARGET: P
3046
+ TARGET: A,
3047
+ getScriptString: Xn,
3048
+ getVariants: K
3031
3049
  };
3032
3050
  },
3033
3051
  mounted() {
@@ -3036,7 +3054,7 @@ const qo = /* @__PURE__ */ y(zo, [["render", Do], ["__file", "/Users/samijaber/c
3036
3054
  computed: {
3037
3055
  variantScriptStr() {
3038
3056
  var e;
3039
- return an(
3057
+ return Qn(
3040
3058
  K(this.content).map((t) => ({
3041
3059
  id: t.testVariationId,
3042
3060
  testRatio: t.testRatio
@@ -3052,28 +3070,28 @@ const qo = /* @__PURE__ */ y(zo, [["render", Do], ["__file", "/Users/samijaber/c
3052
3070
  return this.shouldRenderVariants ? {
3053
3071
  ...this.content,
3054
3072
  testVariationId: (e = this.content) == null ? void 0 : e.id
3055
- } : Eo({
3073
+ } : cn({
3056
3074
  item: this.content,
3057
- canTrack: F(this.canTrack)
3075
+ canTrack: U(this.canTrack)
3058
3076
  });
3059
3077
  }
3060
3078
  }
3061
3079
  });
3062
- function Jo(e, t, n, o, s, r) {
3080
+ function qo(e, t, n, o, r, s) {
3063
3081
  var c, u;
3064
3082
  const i = k("inlined-script"), a = k("inlined-styles"), l = k("content-component");
3065
- return d(), p(R, null, [
3083
+ return d(), p(T, null, [
3066
3084
  !e.__isNestedRender && e.TARGET !== "reactNative" ? (d(), v(i, {
3067
3085
  key: 0,
3068
3086
  scriptStr: e.getScriptString()
3069
3087
  }, null, 8, ["scriptStr"])) : S("v-if", !0),
3070
- e.shouldRenderVariants ? (d(), p(R, { key: 1 }, [
3071
- V(a, {
3088
+ e.shouldRenderVariants ? (d(), p(T, { key: 1 }, [
3089
+ O(a, {
3072
3090
  id: `variants-styles-${(c = e.content) == null ? void 0 : c.id}`,
3073
3091
  styles: e.hideVariantsStyleString
3074
3092
  }, null, 8, ["id", "styles"]),
3075
- V(i, { scriptStr: e.variantScriptStr }, null, 8, ["scriptStr"]),
3076
- (d(!0), p(R, null, B(e.getVariants(e.content), (h, m) => (d(), v(l, {
3093
+ O(i, { scriptStr: e.variantScriptStr }, null, 8, ["scriptStr"]),
3094
+ (d(!0), p(T, null, V(e.getVariants(e.content), (h, m) => (d(), v(l, {
3077
3095
  key: h.testVariationId,
3078
3096
  content: h,
3079
3097
  showContent: !1,
@@ -3091,7 +3109,7 @@ function Jo(e, t, n, o, s, r) {
3091
3109
  isSsrAbTest: e.shouldRenderVariants
3092
3110
  }, null, 8, ["content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "canTrack", "locale", "includeRefs", "enrich", "isSsrAbTest"]))), 128))
3093
3111
  ], 64)) : S("v-if", !0),
3094
- V(l, I({
3112
+ O(l, I({
3095
3113
  content: e.defaultContent,
3096
3114
  classNameProp: `variant-${(u = e.content) == null ? void 0 : u.id}`,
3097
3115
  showContent: !0,
@@ -3111,7 +3129,7 @@ function Jo(e, t, n, o, s, r) {
3111
3129
  }), null, 16, ["content", "classNameProp", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "canTrack", "locale", "includeRefs", "enrich", "isSsrAbTest"])
3112
3130
  ], 64);
3113
3131
  }
3114
- const Ge = /* @__PURE__ */ y(Go, [["render", Jo], ["__file", "/Users/samijaber/code/work/builder/packages/sdks/output/vue/vue3/src/components/content-variants/content-variants.vue"]]), Yo = async ({
3132
+ const qe = /* @__PURE__ */ y(Do, [["render", qo], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/components/content-variants/content-variants.vue"]]), Go = async ({
3115
3133
  builderContextValue: e,
3116
3134
  symbol: t
3117
3135
  }) => {
@@ -3128,9 +3146,9 @@ const Ge = /* @__PURE__ */ y(Go, [["render", Jo], ["__file", "/Users/samijaber/c
3128
3146
  }).catch((n) => {
3129
3147
  x.error("Could not fetch symbol content: ", n);
3130
3148
  });
3131
- }, Xo = g({
3149
+ }, Jo = g({
3132
3150
  name: "builder-symbol",
3133
- components: { ContentVariants: Ge },
3151
+ components: { ContentVariants: qe },
3134
3152
  props: [
3135
3153
  "js",
3136
3154
  "attributes",
@@ -3172,7 +3190,7 @@ const Ge = /* @__PURE__ */ y(Go, [["render", Jo], ["__file", "/Users/samijaber/c
3172
3190
  },
3173
3191
  methods: {
3174
3192
  setContent() {
3175
- this.contentToUse || Yo({
3193
+ this.contentToUse || Go({
3176
3194
  symbol: this.symbol,
3177
3195
  builderContextValue: this.builderContext
3178
3196
  }).then((e) => {
@@ -3190,13 +3208,13 @@ const Ge = /* @__PURE__ */ y(Go, [["render", Jo], ["__file", "/Users/samijaber/c
3190
3208
  }
3191
3209
  }
3192
3210
  });
3193
- function Qo(e, t, n, o, s, r) {
3211
+ function Yo(e, t, n, o, r, s) {
3194
3212
  var a, l, c, u;
3195
3213
  const i = k("content-variants");
3196
3214
  return d(), p("div", I({
3197
3215
  class: e._classStringToObject(e.className)
3198
- }, { ...e.filterAttrs(e.attributes, "v-on:", !1) }, O(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
3199
- V(i, {
3216
+ }, { ...e.filterAttrs(e.attributes, "v-on:", !1) }, F(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
3217
+ O(i, {
3200
3218
  __isNestedRender: !0,
3201
3219
  apiVersion: e.builderContext.apiVersion,
3202
3220
  apiKey: e.builderContext.apiKey,
@@ -3212,20 +3230,20 @@ function Qo(e, t, n, o, s, r) {
3212
3230
  }, null, 8, ["apiVersion", "apiKey", "context", "customComponents", "data", "model", "content"])
3213
3231
  ], 16);
3214
3232
  }
3215
- const Zo = /* @__PURE__ */ y(Xo, [["render", Qo], ["__file", "/Users/samijaber/code/work/builder/packages/sdks/output/vue/vue3/src/blocks/symbol/symbol.vue"]]), rs = ne, is = Ge, Se = {};
3216
- function as(e) {
3233
+ const Xo = /* @__PURE__ */ y(Jo, [["render", Yo], ["__file", "/home/runner/work/builder/builder/packages/sdks/output/vue/vue3/src/blocks/symbol/symbol.vue"]]), or = ne, rr = qe, ve = {};
3234
+ function sr(e) {
3217
3235
  if (w()) {
3218
- Object.assign(Se, e);
3236
+ Object.assign(ve, e);
3219
3237
  const t = {
3220
3238
  type: "builder.settingsChange",
3221
- data: Se
3239
+ data: ve
3222
3240
  };
3223
3241
  parent.postMessage(t, "*");
3224
3242
  }
3225
3243
  }
3226
- const ls = async (e) => {
3227
- var o, s, r;
3228
- const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((s = e.userAttributes) == null ? void 0 : s.urlPath), n = {
3244
+ const ir = async (e) => {
3245
+ var o, r, s;
3246
+ const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((r = e.userAttributes) == null ? void 0 : r.urlPath), n = {
3229
3247
  ...e,
3230
3248
  apiKey: e.apiKey,
3231
3249
  model: e.model || "page",
@@ -3235,7 +3253,7 @@ const ls = async (e) => {
3235
3253
  urlPath: t
3236
3254
  } : {}
3237
3255
  },
3238
- options: He(e.searchParams || ((r = e.url) == null ? void 0 : r.searchParams) || e.options)
3256
+ options: Me(e.searchParams || ((s = e.url) == null ? void 0 : s.searchParams) || e.options)
3239
3257
  };
3240
3258
  return {
3241
3259
  apiKey: n.apiKey,
@@ -3244,38 +3262,38 @@ const ls = async (e) => {
3244
3262
  };
3245
3263
  };
3246
3264
  export {
3247
- Q as B,
3248
- Ge as C,
3249
- Kt as F,
3250
- Xt as I,
3251
- rs as R,
3252
- en as S,
3253
- P as T,
3254
- $n as V,
3265
+ Re as B,
3266
+ qe as C,
3267
+ Wt as F,
3268
+ Jt as I,
3269
+ or as R,
3270
+ Qt as S,
3271
+ A as T,
3272
+ Kn as V,
3255
3273
  y as _,
3256
3274
  xe as a,
3257
- Re as b,
3258
- mt as c,
3275
+ Q as b,
3276
+ rt as c,
3259
3277
  ne as d,
3260
3278
  z as e,
3261
- is as f,
3262
- tt as g,
3263
- Mt as h,
3264
- Zo as i,
3265
- kn as j,
3266
- _ as k,
3267
- Oo as l,
3268
- Ln as m,
3269
- De as n,
3270
- J as o,
3271
- ss as p,
3272
- os as q,
3273
- yo as r,
3274
- as as s,
3275
- No as t,
3276
- He as u,
3277
- ns as v,
3278
- Ho as w,
3279
- ls as x,
3280
- ts as y
3279
+ rr as f,
3280
+ Ze as g,
3281
+ Ft as h,
3282
+ Xo as i,
3283
+ Fn as j,
3284
+ P as k,
3285
+ uo as l,
3286
+ Hn as m,
3287
+ co as n,
3288
+ Le as o,
3289
+ J as p,
3290
+ tr as q,
3291
+ Io as r,
3292
+ sr as s,
3293
+ er as t,
3294
+ Me as u,
3295
+ nr as v,
3296
+ Lo as w,
3297
+ ir as x,
3298
+ Zo as y
3281
3299
  };