@builder.io/sdk-qwik 0.0.12 → 0.0.13

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 (143) hide show
  1. package/.yarn/cache/@builder.io-qwik-npm-0.0.103-bdc7786a46-98363e9103.zip +0 -0
  2. package/.yarn/cache/@gar-promisify-npm-1.1.3-ac1a325862-4059f790e2.zip +0 -0
  3. package/.yarn/cache/@npmcli-fs-npm-2.1.2-08d434e77b-405074965e.zip +0 -0
  4. package/.yarn/cache/@npmcli-move-file-npm-2.0.1-b593d8f741-52dc02259d.zip +0 -0
  5. package/.yarn/cache/@tootallnate-once-npm-2.0.0-e36cf4f140-ad87447820.zip +0 -0
  6. package/.yarn/cache/@types-node-npm-18.7.6-c1eafa3d9a-5122988c32.zip +0 -0
  7. package/.yarn/cache/abbrev-npm-1.1.1-3659247eab-a4a97ec07d.zip +0 -0
  8. package/.yarn/cache/agent-base-npm-6.0.2-428f325a93-f52b6872cc.zip +0 -0
  9. package/.yarn/cache/agentkeepalive-npm-4.2.1-b86a9fb343-39cb49ed8c.zip +0 -0
  10. package/.yarn/cache/aggregate-error-npm-3.1.0-415a406f4e-1101a33f21.zip +0 -0
  11. package/.yarn/cache/ansi-regex-npm-5.0.1-c963a48615-2aa4bb54ca.zip +0 -0
  12. package/.yarn/cache/aproba-npm-2.0.0-8716bcfde6-5615cadcfb.zip +0 -0
  13. package/.yarn/cache/are-we-there-yet-npm-3.0.1-3395b1512f-52590c2486.zip +0 -0
  14. package/.yarn/cache/balanced-match-npm-1.0.2-a53c126459-9706c088a2.zip +0 -0
  15. package/.yarn/cache/brace-expansion-npm-1.1.11-fb95eb05ad-faf34a7bb0.zip +0 -0
  16. package/.yarn/cache/brace-expansion-npm-2.0.1-17aa2616f9-a61e7cd2e8.zip +0 -0
  17. package/.yarn/cache/cacache-npm-16.1.2-0d36d1aaf1-defe1d6f55.zip +0 -0
  18. package/.yarn/cache/chownr-npm-2.0.0-638f1c9c61-c57cf9dd07.zip +0 -0
  19. package/.yarn/cache/clean-stack-npm-2.2.0-a8ce435a5c-2ac8cd2b2f.zip +0 -0
  20. package/.yarn/cache/color-support-npm-1.1.3-3be5c53455-9b73568176.zip +0 -0
  21. package/.yarn/cache/concat-map-npm-0.0.1-85a921b7ee-902a9f5d89.zip +0 -0
  22. package/.yarn/cache/console-control-strings-npm-1.1.0-e3160e5275-8755d76787.zip +0 -0
  23. package/.yarn/cache/debug-npm-4.3.4-4513954577-3dbad3f94e.zip +0 -0
  24. package/.yarn/cache/delegates-npm-1.0.0-9b1942d75f-a51744d9b5.zip +0 -0
  25. package/.yarn/cache/depd-npm-1.1.2-b0c8414da7-6b406620d2.zip +0 -0
  26. package/.yarn/cache/emoji-regex-npm-8.0.0-213764015c-d4c5c39d5a.zip +0 -0
  27. package/.yarn/cache/encoding-npm-0.1.13-82a1837d30-bb98632f8f.zip +0 -0
  28. package/.yarn/cache/env-paths-npm-2.2.1-7c7577428c-65b5df55a8.zip +0 -0
  29. package/.yarn/cache/err-code-npm-2.0.3-082e0ff9a7-8b7b1be20d.zip +0 -0
  30. package/.yarn/cache/esbuild-darwin-arm64-npm-0.14.54-ec53803fa6-8.zip +0 -0
  31. package/.yarn/cache/esbuild-npm-0.14.54-b3dcd8a41e-49e360b118.zip +0 -0
  32. package/.yarn/cache/fs-minipass-npm-2.1.0-501ef87306-1b8d128dae.zip +0 -0
  33. package/.yarn/cache/fs.realpath-npm-1.0.0-c8f05d8126-99ddea01a7.zip +0 -0
  34. package/.yarn/cache/fsevents-npm-2.3.2-a881d6ac9f-97ade64e75.zip +0 -0
  35. package/.yarn/cache/fsevents-patch-3340e2eb10-8.zip +0 -0
  36. package/.yarn/cache/function-bind-npm-1.1.1-b56b322ae9-b32fbaebb3.zip +0 -0
  37. package/.yarn/cache/gauge-npm-4.0.4-8f878385e9-788b6bfe52.zip +0 -0
  38. package/.yarn/cache/glob-npm-7.2.3-2d866d17a5-29452e97b3.zip +0 -0
  39. package/.yarn/cache/glob-npm-8.0.3-750f909025-50bcdea19d.zip +0 -0
  40. package/.yarn/cache/graceful-fs-npm-4.2.10-79c70989ca-3f109d70ae.zip +0 -0
  41. package/.yarn/cache/has-npm-1.0.3-b7f00631c1-b9ad53d53b.zip +0 -0
  42. package/.yarn/cache/has-unicode-npm-2.0.1-893adb4747-1eab07a743.zip +0 -0
  43. package/.yarn/cache/http-cache-semantics-npm-4.1.0-860520a31f-974de94a81.zip +0 -0
  44. package/.yarn/cache/http-proxy-agent-npm-5.0.0-7f1f121b83-e2ee1ff165.zip +0 -0
  45. package/.yarn/cache/https-proxy-agent-npm-5.0.1-42d65f358e-571fccdf38.zip +0 -0
  46. package/.yarn/cache/humanize-ms-npm-1.2.1-e942bd7329-9c7a74a282.zip +0 -0
  47. package/.yarn/cache/iconv-lite-npm-0.6.3-24b8aae27e-3f60d47a5c.zip +0 -0
  48. package/.yarn/cache/imurmurhash-npm-0.1.4-610c5068a0-7cae75c8cd.zip +0 -0
  49. package/.yarn/cache/indent-string-npm-4.0.0-7b717435b2-824cfb9929.zip +0 -0
  50. package/.yarn/cache/infer-owner-npm-1.0.4-685ac3d2af-181e732764.zip +0 -0
  51. package/.yarn/cache/inflight-npm-1.0.6-ccedb4b908-f4f76aa072.zip +0 -0
  52. package/.yarn/cache/inherits-npm-2.0.4-c66b3957a0-4a48a73384.zip +0 -0
  53. package/.yarn/cache/ip-npm-2.0.0-204facb3cc-cfcfac6b87.zip +0 -0
  54. package/.yarn/cache/is-core-module-npm-2.10.0-6dff9310aa-0f3f77811f.zip +0 -0
  55. package/.yarn/cache/is-fullwidth-code-point-npm-3.0.0-1ecf4ebee5-44a30c2945.zip +0 -0
  56. package/.yarn/cache/is-lambda-npm-1.0.1-7ab55bc8a8-93a32f0194.zip +0 -0
  57. package/.yarn/cache/isexe-npm-2.0.0-b58870bd2e-26bf6c5480.zip +0 -0
  58. package/.yarn/cache/lru-cache-npm-6.0.0-b4c8668fe1-f97f499f89.zip +0 -0
  59. package/.yarn/cache/lru-cache-npm-7.14.0-354cf654ec-efdd329f2c.zip +0 -0
  60. package/.yarn/cache/make-fetch-happen-npm-10.2.1-f1cc7cd2df-2332eb9a8e.zip +0 -0
  61. package/.yarn/cache/minimatch-npm-3.1.2-9405269906-c154e56640.zip +0 -0
  62. package/.yarn/cache/minimatch-npm-5.1.0-34f6240621-15ce53d31a.zip +0 -0
  63. package/.yarn/cache/minipass-collect-npm-1.0.2-3b4676eab5-14df761028.zip +0 -0
  64. package/.yarn/cache/minipass-fetch-npm-2.1.1-c4a8efdb09-1aae0c2240.zip +0 -0
  65. package/.yarn/cache/minipass-flush-npm-1.0.5-efe79d9826-56269a0b22.zip +0 -0
  66. package/.yarn/cache/minipass-npm-3.3.5-a555b091e7-f89f02bcaa.zip +0 -0
  67. package/.yarn/cache/minipass-pipeline-npm-1.2.4-5924cb077f-b14240dac0.zip +0 -0
  68. package/.yarn/cache/minipass-sized-npm-1.0.3-306d86f432-79076749fc.zip +0 -0
  69. package/.yarn/cache/minizlib-npm-2.1.2-ea89cd0cfb-f1fdeac0b0.zip +0 -0
  70. package/.yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-a96865108c.zip +0 -0
  71. package/.yarn/cache/ms-npm-2.1.2-ec0c1512ff-673cdb2c31.zip +0 -0
  72. package/.yarn/cache/ms-npm-2.1.3-81ff3cfac1-aa92de6080.zip +0 -0
  73. package/.yarn/cache/nanoid-npm-3.3.4-3d250377d6-2fddd6dee9.zip +0 -0
  74. package/.yarn/cache/negotiator-npm-0.6.3-9d50e36171-b8ffeb1e26.zip +0 -0
  75. package/.yarn/cache/node-gyp-npm-9.1.0-2091059b31-1437fa4a87.zip +0 -0
  76. package/.yarn/cache/nopt-npm-5.0.0-304b40fbfe-d35fdec187.zip +0 -0
  77. package/.yarn/cache/npmlog-npm-6.0.2-e0e69455c7-ae238cd264.zip +0 -0
  78. package/.yarn/cache/once-npm-1.4.0-ccf03ef07a-cd0a885013.zip +0 -0
  79. package/.yarn/cache/p-map-npm-4.0.0-4677ae07c7-cb0ab21ec0.zip +0 -0
  80. package/.yarn/cache/path-is-absolute-npm-1.0.1-31bc695ffd-060840f92c.zip +0 -0
  81. package/.yarn/cache/path-parse-npm-1.0.7-09564527b7-49abf3d811.zip +0 -0
  82. package/.yarn/cache/picocolors-npm-1.0.0-d81e0b1927-a2e8092dd8.zip +0 -0
  83. package/.yarn/cache/postcss-npm-8.4.16-7367383579-10eee25efd.zip +0 -0
  84. package/.yarn/cache/promise-inflight-npm-1.0.1-5bb925afac-2274948309.zip +0 -0
  85. package/.yarn/cache/promise-retry-npm-2.0.1-871f0b01b7-f96a3f6d90.zip +0 -0
  86. package/.yarn/cache/readable-stream-npm-3.6.0-23a4a5eb56-d4ea81502d.zip +0 -0
  87. package/.yarn/cache/resolve-npm-1.22.1-3980488690-07af5fc1e8.zip +0 -0
  88. package/.yarn/cache/resolve-patch-46f9469d0d-5656f4d0be.zip +0 -0
  89. package/.yarn/cache/retry-npm-0.12.0-72ac7fb4cc-623bd7d2e5.zip +0 -0
  90. package/.yarn/cache/rimraf-npm-3.0.2-2cb7dac69a-87f4164e39.zip +0 -0
  91. package/.yarn/cache/rollup-npm-2.78.0-09284f4c78-01b5a7ae08.zip +0 -0
  92. package/.yarn/cache/safe-buffer-npm-5.2.1-3481c8aa9b-b99c4b41fd.zip +0 -0
  93. package/.yarn/cache/safer-buffer-npm-2.1.2-8d5c0b705e-cab8f25ae6.zip +0 -0
  94. package/.yarn/cache/semver-npm-7.3.7-3bfe704194-2fa3e87756.zip +0 -0
  95. package/.yarn/cache/set-blocking-npm-2.0.0-49e2cffa24-6e65a05f7c.zip +0 -0
  96. package/.yarn/cache/signal-exit-npm-3.0.7-bd270458a3-a2f098f247.zip +0 -0
  97. package/.yarn/cache/smart-buffer-npm-4.2.0-5ac3f668bb-b5167a7142.zip +0 -0
  98. package/.yarn/cache/socks-npm-2.7.0-cc1cb019db-0b5d94e2b3.zip +0 -0
  99. package/.yarn/cache/socks-proxy-agent-npm-7.0.0-7aacf32ea0-7205543701.zip +0 -0
  100. package/.yarn/cache/source-map-js-npm-1.0.2-ee4f9f9b30-c049a7fc4d.zip +0 -0
  101. package/.yarn/cache/ssri-npm-9.0.1-33ce27f4f8-fb58f5e46b.zip +0 -0
  102. package/.yarn/cache/string-width-npm-4.2.3-2c27177bae-e52c10dc3f.zip +0 -0
  103. package/.yarn/cache/string_decoder-npm-1.3.0-2422117fd0-8417646695.zip +0 -0
  104. package/.yarn/cache/strip-ansi-npm-6.0.1-caddc7cb40-f3cd25890a.zip +0 -0
  105. package/.yarn/cache/supports-preserve-symlinks-flag-npm-1.0.0-f17c4d0028-53b1e247e6.zip +0 -0
  106. package/.yarn/cache/tar-npm-6.1.11-e6ac3cba9c-a04c07bb9e.zip +0 -0
  107. package/.yarn/cache/typescript-npm-4.7.4-65aa6ffb42-5750181b1c.zip +0 -0
  108. package/.yarn/cache/typescript-patch-ae154b3216-96d3030cb0.zip +0 -0
  109. package/.yarn/cache/unique-filename-npm-1.1.1-c885c5095b-cf4998c922.zip +0 -0
  110. package/.yarn/cache/unique-slug-npm-2.0.2-f6ba1ddeb7-5b6876a645.zip +0 -0
  111. package/.yarn/cache/util-deprecate-npm-1.0.2-e3fe1a219c-474acf1146.zip +0 -0
  112. package/.yarn/cache/vite-npm-3.0.2-a17ab24a12-10aebec0df.zip +0 -0
  113. package/.yarn/cache/which-npm-2.0.2-320ddf72f7-1a5c563d3c.zip +0 -0
  114. package/.yarn/cache/wide-align-npm-1.1.5-889d77e592-d5fc37cd56.zip +0 -0
  115. package/.yarn/cache/wrappy-npm-1.0.2-916de4d4b3-159da4805f.zip +0 -0
  116. package/.yarn/cache/yallist-npm-4.0.0-b493d9e907-343617202a.zip +0 -0
  117. package/.yarn/install-state.gz +0 -0
  118. package/README.md +7 -3
  119. package/lib/index.qwik.cjs +421 -186
  120. package/lib/index.qwik.mjs +421 -186
  121. package/package.json +4 -3
  122. package/src/blocks/button/button.jsx +7 -2
  123. package/src/blocks/columns/columns.jsx +7 -3
  124. package/src/blocks/form/builder-blocks.jsx +1 -1
  125. package/src/blocks/symbol/symbol.jsx +1 -3
  126. package/src/components/render-block/block-styles.jsx +1 -1
  127. package/src/components/render-block/render-block.jsx +2 -3
  128. package/src/components/render-block/render-repeated-block.jsx +4 -1
  129. package/src/components/render-content/render-content.jsx +14 -5
  130. package/src/components/render-inlined-styles.jsx +4 -3
  131. package/src/functions/get-processed-block.js +10 -6
  132. package/src/functions/get-processed-block.test.js +1 -1
  133. package/src/functions/track.js +71 -2
  134. package/src/helpers/cookie.js +59 -0
  135. package/src/helpers/localStorage.js +34 -0
  136. package/src/helpers/nullable.js +4 -0
  137. package/src/helpers/sessionId.js +26 -0
  138. package/src/helpers/time.js +5 -0
  139. package/src/helpers/url.js +10 -0
  140. package/src/helpers/url.test.js +15 -0
  141. package/src/helpers/uuid.js +13 -0
  142. package/src/helpers/visitorId.js +33 -0
  143. package/src/types/can-track.js +0 -0
@@ -175,36 +175,36 @@ const set = (obj, _path, value) => {
175
175
  function transformBlock(block) {
176
176
  return block;
177
177
  }
178
- var __defProp$7 = Object.defineProperty;
179
- var __defProps$5 = Object.defineProperties;
180
- var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
181
- var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
182
- var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
183
- var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
184
- var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, {
178
+ var __defProp$8 = Object.defineProperty;
179
+ var __defProps$6 = Object.defineProperties;
180
+ var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
181
+ var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
182
+ var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
183
+ var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
184
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, {
185
185
  enumerable: true,
186
186
  configurable: true,
187
187
  writable: true,
188
188
  value
189
189
  }) : obj[key] = value;
190
- var __spreadValues$7 = (a, b) => {
190
+ var __spreadValues$8 = (a, b) => {
191
191
  for (var prop in b || (b = {}))
192
- if (__hasOwnProp$7.call(b, prop))
193
- __defNormalProp$7(a, prop, b[prop]);
194
- if (__getOwnPropSymbols$7) {
195
- for (var prop of __getOwnPropSymbols$7(b))
196
- if (__propIsEnum$7.call(b, prop))
197
- __defNormalProp$7(a, prop, b[prop]);
192
+ if (__hasOwnProp$8.call(b, prop))
193
+ __defNormalProp$8(a, prop, b[prop]);
194
+ if (__getOwnPropSymbols$8) {
195
+ for (var prop of __getOwnPropSymbols$8(b))
196
+ if (__propIsEnum$8.call(b, prop))
197
+ __defNormalProp$8(a, prop, b[prop]);
198
198
  }
199
199
  return a;
200
200
  };
201
- var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
201
+ var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
202
202
  const evaluateBindings = ({ block, context, state }) => {
203
203
  if (!block.bindings)
204
204
  return block;
205
- const copied = __spreadProps$5(__spreadValues$7({}, block), {
206
- properties: __spreadValues$7({}, block.properties),
207
- actions: __spreadValues$7({}, block.actions)
205
+ const copied = __spreadProps$6(__spreadValues$8({}, block), {
206
+ properties: __spreadValues$8({}, block.properties),
207
+ actions: __spreadValues$8({}, block.actions)
208
208
  });
209
209
  for (const binding in block.bindings) {
210
210
  const expression = block.bindings[binding];
@@ -217,17 +217,16 @@ const evaluateBindings = ({ block, context, state }) => {
217
217
  }
218
218
  return copied;
219
219
  };
220
- function getProcessedBlock(options) {
221
- const { state, context } = options;
222
- const block = transformBlock(options.block);
223
- if (evaluateBindings)
220
+ function getProcessedBlock({ block, context, shouldEvaluateBindings, state }) {
221
+ const transformedBlock = transformBlock(block);
222
+ if (shouldEvaluateBindings)
224
223
  return evaluateBindings({
225
- block,
224
+ block: transformedBlock,
226
225
  state,
227
226
  context
228
227
  });
229
228
  else
230
- return block;
229
+ return transformedBlock;
231
230
  }
232
231
  const camelToKebabCase = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
233
232
  const convertStyleMaptoCSS = (style) => {
@@ -237,21 +236,25 @@ const convertStyleMaptoCSS = (style) => {
237
236
  });
238
237
  return cssProps.join("\n");
239
238
  };
240
- const RenderInlinedStyles = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
239
+ const tagName$1 = function tagName(props, state) {
240
+ return "style";
241
+ };
242
+ const RenderInlinedStyles = (props) => {
241
243
  const state = {};
244
+ state.tagName = tagName$1();
242
245
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {
243
246
  children: /* @__PURE__ */ jsxRuntime.jsx(state.tagName, {
244
247
  children: props.styles
245
248
  })
246
249
  });
247
- }, "RenderInlinedStyles_component_0sD5UmyM3Rg"));
250
+ };
248
251
  const RenderInlinedStyles$1 = RenderInlinedStyles;
249
252
  const useBlock$1 = function useBlock(props, state) {
250
253
  return getProcessedBlock({
251
254
  block: props.block,
252
255
  state: props.context.state,
253
256
  context: props.context.context,
254
- evaluateBindings: true
257
+ shouldEvaluateBindings: true
255
258
  });
256
259
  };
257
260
  const css = function css2(props, state) {
@@ -298,6 +301,36 @@ function getBlockActions(options) {
298
301
  }
299
302
  return obj;
300
303
  }
304
+ var __defProp$7 = Object.defineProperty;
305
+ var __defProps$5 = Object.defineProperties;
306
+ var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
307
+ var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
308
+ var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
309
+ var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
310
+ var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, {
311
+ enumerable: true,
312
+ configurable: true,
313
+ writable: true,
314
+ value
315
+ }) : obj[key] = value;
316
+ var __spreadValues$7 = (a, b) => {
317
+ for (var prop in b || (b = {}))
318
+ if (__hasOwnProp$7.call(b, prop))
319
+ __defNormalProp$7(a, prop, b[prop]);
320
+ if (__getOwnPropSymbols$7) {
321
+ for (var prop of __getOwnPropSymbols$7(b))
322
+ if (__propIsEnum$7.call(b, prop))
323
+ __defNormalProp$7(a, prop, b[prop]);
324
+ }
325
+ return a;
326
+ };
327
+ var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
328
+ function getBlockComponentOptions(block) {
329
+ var _a;
330
+ return __spreadProps$5(__spreadValues$7(__spreadValues$7({}, (_a = block.component) == null ? void 0 : _a.options), block.options), {
331
+ builderBlock: block
332
+ });
333
+ }
301
334
  var __defProp$6 = Object.defineProperty;
302
335
  var __defProps$4 = Object.defineProperties;
303
336
  var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
@@ -322,39 +355,9 @@ var __spreadValues$6 = (a, b) => {
322
355
  return a;
323
356
  };
324
357
  var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
325
- function getBlockComponentOptions(block) {
326
- var _a;
327
- return __spreadProps$4(__spreadValues$6(__spreadValues$6({}, (_a = block.component) == null ? void 0 : _a.options), block.options), {
328
- builderBlock: block
329
- });
330
- }
331
- var __defProp$5 = Object.defineProperty;
332
- var __defProps$3 = Object.defineProperties;
333
- var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
334
- var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
335
- var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
336
- var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
337
- var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, {
338
- enumerable: true,
339
- configurable: true,
340
- writable: true,
341
- value
342
- }) : obj[key] = value;
343
- var __spreadValues$5 = (a, b) => {
344
- for (var prop in b || (b = {}))
345
- if (__hasOwnProp$5.call(b, prop))
346
- __defNormalProp$5(a, prop, b[prop]);
347
- if (__getOwnPropSymbols$5) {
348
- for (var prop of __getOwnPropSymbols$5(b))
349
- if (__propIsEnum$5.call(b, prop))
350
- __defNormalProp$5(a, prop, b[prop]);
351
- }
352
- return a;
353
- };
354
- var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
355
358
  function getBlockProperties(block) {
356
359
  var _a;
357
- return __spreadProps$3(__spreadValues$5({}, block.properties), {
360
+ return __spreadProps$4(__spreadValues$6({}, block.properties), {
358
361
  "builder-id": block.id,
359
362
  class: [
360
363
  block.id,
@@ -369,30 +372,30 @@ const convertStyleObject = (obj) => {
369
372
  };
370
373
  const sanitizeBlockStyles = (_styles) => {
371
374
  };
372
- var __defProp$4 = Object.defineProperty;
373
- var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
374
- var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
375
- var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
376
- var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, {
375
+ var __defProp$5 = Object.defineProperty;
376
+ var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
377
+ var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
378
+ var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
379
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, {
377
380
  enumerable: true,
378
381
  configurable: true,
379
382
  writable: true,
380
383
  value
381
384
  }) : obj[key] = value;
382
- var __spreadValues$4 = (a, b) => {
385
+ var __spreadValues$5 = (a, b) => {
383
386
  for (var prop in b || (b = {}))
384
- if (__hasOwnProp$4.call(b, prop))
385
- __defNormalProp$4(a, prop, b[prop]);
386
- if (__getOwnPropSymbols$4) {
387
- for (var prop of __getOwnPropSymbols$4(b))
388
- if (__propIsEnum$4.call(b, prop))
389
- __defNormalProp$4(a, prop, b[prop]);
387
+ if (__hasOwnProp$5.call(b, prop))
388
+ __defNormalProp$5(a, prop, b[prop]);
389
+ if (__getOwnPropSymbols$5) {
390
+ for (var prop of __getOwnPropSymbols$5(b))
391
+ if (__propIsEnum$5.call(b, prop))
392
+ __defNormalProp$5(a, prop, b[prop]);
390
393
  }
391
394
  return a;
392
395
  };
393
396
  function getBlockStyles(block) {
394
397
  var _a, _b, _c, _d, _e;
395
- const styles = __spreadValues$4(__spreadValues$4({}, convertStyleObject((_a = block.responsiveStyles) == null ? void 0 : _a.large)), block.styles);
398
+ const styles = __spreadValues$5(__spreadValues$5({}, convertStyleObject((_a = block.responsiveStyles) == null ? void 0 : _a.large)), block.styles);
396
399
  if ((_b = block.responsiveStyles) == null ? void 0 : _b.medium)
397
400
  styles[getMaxWidthQueryForSize("medium")] = convertStyleObject((_c = block.responsiveStyles) == null ? void 0 : _c.medium);
398
401
  if ((_d = block.responsiveStyles) == null ? void 0 : _d.small)
@@ -420,8 +423,8 @@ const EMPTY_HTML_ELEMENTS = [
420
423
  "track",
421
424
  "wbr"
422
425
  ];
423
- const isEmptyHtmlElement = (tagName3) => {
424
- return typeof tagName3 === "string" && EMPTY_HTML_ELEMENTS.includes(tagName3.toLowerCase());
426
+ const isEmptyHtmlElement = (tagName4) => {
427
+ return typeof tagName4 === "string" && EMPTY_HTML_ELEMENTS.includes(tagName4.toLowerCase());
425
428
  };
426
429
  const RenderComponent = (props) => {
427
430
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {
@@ -465,7 +468,7 @@ const RenderRepeatedBlock = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((p
465
468
  }));
466
469
  return /* @__PURE__ */ jsxRuntime.jsx(RenderBlock$1, {
467
470
  block: props.block,
468
- context: props.context
471
+ context: props.repeatContext
469
472
  });
470
473
  }, "RenderRepeatedBlock_component_fV0PdmPN990"));
471
474
  const RenderRepeatedBlock$1 = RenderRepeatedBlock;
@@ -474,7 +477,7 @@ const component = function component2(props, state) {
474
477
  block: props.block,
475
478
  state: props.context.state,
476
479
  context: props.context.context,
477
- evaluateBindings: false
480
+ shouldEvaluateBindings: false
478
481
  }).component?.name;
479
482
  if (!componentName)
480
483
  return null;
@@ -497,7 +500,7 @@ const componentInfo$a = function componentInfo(props, state) {
497
500
  const componentRef = function componentRef2(props, state) {
498
501
  return component(props)?.component;
499
502
  };
500
- const tagName = function tagName2(props, state) {
503
+ const tagName2 = function tagName3(props, state) {
501
504
  return getBlockTag(useBlock2(props));
502
505
  };
503
506
  const useBlock2 = function useBlock3(props, state) {
@@ -505,7 +508,7 @@ const useBlock2 = function useBlock3(props, state) {
505
508
  block: props.block,
506
509
  state: props.context.state,
507
510
  context: props.context.context,
508
- evaluateBindings: true
511
+ shouldEvaluateBindings: true
509
512
  });
510
513
  };
511
514
  const attributes = function attributes2(props, state) {
@@ -575,16 +578,15 @@ const repeatItemData = function repeatItemData2(props, state) {
575
578
  };
576
579
  const RenderBlock = (props) => {
577
580
  const state = {};
578
- state.tagName = tagName(props);
581
+ state.tagName = tagName2(props);
579
582
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {
580
- children: shouldWrap(props) ? !isEmptyHtmlElement(tagName(props)) ? /* @__PURE__ */ jsxRuntime.jsxs(state.tagName, {
583
+ children: shouldWrap(props) ? !isEmptyHtmlElement(tagName2(props)) ? /* @__PURE__ */ jsxRuntime.jsxs(state.tagName, {
581
584
  ...attributes(props),
582
585
  children: [
583
586
  repeatItemData(props) ? (repeatItemData(props) || []).map((data, index) => {
584
587
  return /* @__PURE__ */ jsxRuntime.jsx(RenderRepeatedBlock$1, {
585
588
  repeatContext: data.context,
586
- block: data.block,
587
- context: props.context
589
+ block: data.block
588
590
  }, index);
589
591
  }) : null,
590
592
  !repeatItemData(props) ? /* @__PURE__ */ jsxRuntime.jsx(RenderComponent$1, {
@@ -636,7 +638,7 @@ const onMouseEnter = function onMouseEnter2(props, state, builderContext) {
636
638
  }, "*");
637
639
  };
638
640
  const RenderBlocks = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
639
- qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES$2, "RenderBlocks_component_useStylesScoped_QNti2s7juQc"));
641
+ qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES$3, "RenderBlocks_component_useStylesScoped_QNti2s7juQc"));
640
642
  const builderContext = qwik.useContext(stdin_default);
641
643
  const state = {};
642
644
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
@@ -679,7 +681,7 @@ const RenderBlocks = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) =
679
681
  });
680
682
  }, "RenderBlocks_component_SXGwmVyEM0s"));
681
683
  const RenderBlocks$1 = RenderBlocks;
682
- const STYLES$2 = `.div-RenderBlocks {
684
+ const STYLES$3 = `.div-RenderBlocks {
683
685
  display: flex;
684
686
  flex-direction: column;
685
687
  align-items: stretch; }`;
@@ -721,7 +723,7 @@ const columnCssVars = function columnCssVars2(props, state) {
721
723
  };
722
724
  };
723
725
  const Columns = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
724
- qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES$1, "Columns_component_useStylesScoped_704fWXyHORo"));
726
+ qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES$2, "Columns_component_useStylesScoped_704fWXyHORo"));
725
727
  const state = {};
726
728
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
727
729
  class: "builder-columns div-Columns",
@@ -735,20 +737,22 @@ const Columns = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
735
737
  ...columnCssVars(props, state)
736
738
  },
737
739
  children: /* @__PURE__ */ jsxRuntime.jsx(RenderBlocks$1, {
738
- blocks: column.blocks
740
+ blocks: column.blocks,
741
+ path: `component.options.columns.${index}.blocks`,
742
+ parent: props.builderBlock.id
739
743
  })
740
744
  }, index);
741
745
  })
742
746
  });
743
747
  }, "Columns_component_0PeVQGTMczc"));
744
748
  const Columns$1 = Columns;
745
- const STYLES$1 = `.div-Columns {
749
+ const STYLES$2 = `.div-Columns {
746
750
  display: flex;
747
751
  align-items: stretch;
748
- line-height: normal; }@media (max-width: 999px) { .div-Columns {
752
+ line-height: normal; }@media (max-width: 991px) { .div-Columns {
749
753
  flex-direction: var(--flex-dir-tablet); } }@media (max-width: 639px) { .div-Columns {
750
754
  flex-direction: var(--flex-dir); } }.div-Columns-2 {
751
- flex-grow: 1; }@media (max-width: 999px) { .div-Columns-2 {
755
+ flex-grow: 1; }@media (max-width: 991px) { .div-Columns-2 {
752
756
  width: var(--column-width-tablet) !important;
753
757
  margin-left: var(--column-margin-left-tablet) !important; } }@media (max-width: 639px) { .div-Columns-2 {
754
758
  width: var(--column-width) !important;
@@ -828,7 +832,7 @@ const webpSrcSet = function webpSrcSet2(props, state) {
828
832
  return "";
829
833
  };
830
834
  const Image = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
831
- qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES, "Image_component_useStylesScoped_gRbO7w7SeZA"));
835
+ qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES$1, "Image_component_useStylesScoped_gRbO7w7SeZA"));
832
836
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
833
837
  class: "div-Image",
834
838
  children: [
@@ -871,7 +875,7 @@ const Image = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
871
875
  });
872
876
  }, "Image_component_y3S3Zox9wEo"));
873
877
  const Image$1 = Image;
874
- const STYLES = `.div-Image {
878
+ const STYLES$1 = `.div-Image {
875
879
  position: relative; }.img-Image {
876
880
  opacity: 1;
877
881
  transition: opacity 0.2s ease-in-out;
@@ -934,6 +938,7 @@ const Video = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
934
938
  }, "Video_component_O5sPuWlrTvk"));
935
939
  const Video$1 = Video;
936
940
  const Button = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
941
+ qwik.useStylesScopedQrl(qwik.inlinedQrl(STYLES, "Button_component_useStylesScoped_vN61mfeURXY"));
937
942
  return /* @__PURE__ */ jsxRuntime.jsx(qwik.Fragment, {
938
943
  children: props.link ? /* @__PURE__ */ jsxRuntime.jsx("a", {
939
944
  role: "button",
@@ -941,13 +946,16 @@ const Button = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
941
946
  href: props.link,
942
947
  target: props.openLinkInNewTab ? "_blank" : void 0,
943
948
  children: props.text
944
- }) : /* @__PURE__ */ jsxRuntime.jsx("span", {
949
+ }) : /* @__PURE__ */ jsxRuntime.jsx("button", {
950
+ class: "button-Button",
945
951
  ...props.attributes,
946
952
  children: props.text
947
953
  })
948
954
  });
949
955
  }, "Button_component_FtjCELjtKF4"));
950
956
  const Button$1 = Button;
957
+ const STYLES = `.button-Button {
958
+ all: unset; }`;
951
959
  const componentInfo$9 = {
952
960
  name: "Core:Button",
953
961
  builtIn: true,
@@ -1747,83 +1755,83 @@ const componentInfo2 = {
1747
1755
  noWrap: true,
1748
1756
  static: true
1749
1757
  };
1750
- var __defProp$3 = Object.defineProperty;
1751
- var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
1752
- var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
1753
- var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
1754
- var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, {
1758
+ var __defProp$4 = Object.defineProperty;
1759
+ var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
1760
+ var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
1761
+ var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
1762
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, {
1755
1763
  enumerable: true,
1756
1764
  configurable: true,
1757
1765
  writable: true,
1758
1766
  value
1759
1767
  }) : obj[key] = value;
1760
- var __spreadValues$3 = (a, b) => {
1768
+ var __spreadValues$4 = (a, b) => {
1761
1769
  for (var prop in b || (b = {}))
1762
- if (__hasOwnProp$3.call(b, prop))
1763
- __defNormalProp$3(a, prop, b[prop]);
1764
- if (__getOwnPropSymbols$3) {
1765
- for (var prop of __getOwnPropSymbols$3(b))
1766
- if (__propIsEnum$3.call(b, prop))
1767
- __defNormalProp$3(a, prop, b[prop]);
1770
+ if (__hasOwnProp$4.call(b, prop))
1771
+ __defNormalProp$4(a, prop, b[prop]);
1772
+ if (__getOwnPropSymbols$4) {
1773
+ for (var prop of __getOwnPropSymbols$4(b))
1774
+ if (__propIsEnum$4.call(b, prop))
1775
+ __defNormalProp$4(a, prop, b[prop]);
1768
1776
  }
1769
1777
  return a;
1770
1778
  };
1771
1779
  const getDefaultRegisteredComponents = () => [
1772
- __spreadValues$3({
1780
+ __spreadValues$4({
1773
1781
  component: Columns$1
1774
1782
  }, componentInfo$8),
1775
- __spreadValues$3({
1783
+ __spreadValues$4({
1776
1784
  component: Image$1
1777
1785
  }, componentInfo$6),
1778
- __spreadValues$3({
1786
+ __spreadValues$4({
1779
1787
  component: Img
1780
1788
  }, componentInfo2),
1781
- __spreadValues$3({
1789
+ __spreadValues$4({
1782
1790
  component: Text$1
1783
1791
  }, componentInfo$3),
1784
- __spreadValues$3({
1792
+ __spreadValues$4({
1785
1793
  component: Video$1
1786
1794
  }, componentInfo$2),
1787
- __spreadValues$3({
1795
+ __spreadValues$4({
1788
1796
  component: Symbol$2
1789
1797
  }, componentInfo$4),
1790
- __spreadValues$3({
1798
+ __spreadValues$4({
1791
1799
  component: Button$1
1792
1800
  }, componentInfo$9),
1793
- __spreadValues$3({
1801
+ __spreadValues$4({
1794
1802
  component: Section
1795
1803
  }, componentInfo$5),
1796
- __spreadValues$3({
1804
+ __spreadValues$4({
1797
1805
  component: Fragment
1798
1806
  }, componentInfo$7),
1799
- __spreadValues$3({
1807
+ __spreadValues$4({
1800
1808
  component: embed
1801
1809
  }, componentInfo$1)
1802
1810
  ];
1803
- var __defProp$2 = Object.defineProperty;
1804
- var __defProps$2 = Object.defineProperties;
1805
- var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
1806
- var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
1807
- var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
1808
- var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
1809
- var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, {
1811
+ var __defProp$3 = Object.defineProperty;
1812
+ var __defProps$3 = Object.defineProperties;
1813
+ var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
1814
+ var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
1815
+ var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
1816
+ var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
1817
+ var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, {
1810
1818
  enumerable: true,
1811
1819
  configurable: true,
1812
1820
  writable: true,
1813
1821
  value
1814
1822
  }) : obj[key] = value;
1815
- var __spreadValues$2 = (a, b) => {
1823
+ var __spreadValues$3 = (a, b) => {
1816
1824
  for (var prop in b || (b = {}))
1817
- if (__hasOwnProp$2.call(b, prop))
1818
- __defNormalProp$2(a, prop, b[prop]);
1819
- if (__getOwnPropSymbols$2) {
1820
- for (var prop of __getOwnPropSymbols$2(b))
1821
- if (__propIsEnum$2.call(b, prop))
1822
- __defNormalProp$2(a, prop, b[prop]);
1825
+ if (__hasOwnProp$3.call(b, prop))
1826
+ __defNormalProp$3(a, prop, b[prop]);
1827
+ if (__getOwnPropSymbols$3) {
1828
+ for (var prop of __getOwnPropSymbols$3(b))
1829
+ if (__propIsEnum$3.call(b, prop))
1830
+ __defNormalProp$3(a, prop, b[prop]);
1823
1831
  }
1824
1832
  return a;
1825
1833
  };
1826
- var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
1834
+ var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
1827
1835
  function flatten(object, path = null, separator = ".") {
1828
1836
  return Object.keys(object).reduce((acc, key) => {
1829
1837
  const value = object[key];
@@ -1836,7 +1844,7 @@ function flatten(object, path = null, separator = ".") {
1836
1844
  value !== null,
1837
1845
  !(Array.isArray(value) && value.length === 0)
1838
1846
  ].every(Boolean);
1839
- return isObject ? __spreadValues$2(__spreadValues$2({}, acc), flatten(value, newPath, separator)) : __spreadProps$2(__spreadValues$2({}, acc), {
1847
+ return isObject ? __spreadValues$3(__spreadValues$3({}, acc), flatten(value, newPath, separator)) : __spreadProps$3(__spreadValues$3({}, acc), {
1840
1848
  [newPath]: value
1841
1849
  });
1842
1850
  }, {});
@@ -1941,30 +1949,30 @@ const handleABTesting = (item, testGroups) => {
1941
1949
  }
1942
1950
  }
1943
1951
  };
1944
- var __defProp$1 = Object.defineProperty;
1945
- var __defProps$1 = Object.defineProperties;
1946
- var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
1947
- var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
1948
- var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
1949
- var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
1950
- var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, {
1952
+ var __defProp$2 = Object.defineProperty;
1953
+ var __defProps$2 = Object.defineProperties;
1954
+ var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
1955
+ var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
1956
+ var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
1957
+ var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
1958
+ var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, {
1951
1959
  enumerable: true,
1952
1960
  configurable: true,
1953
1961
  writable: true,
1954
1962
  value
1955
1963
  }) : obj[key] = value;
1956
- var __spreadValues$1 = (a, b) => {
1964
+ var __spreadValues$2 = (a, b) => {
1957
1965
  for (var prop in b || (b = {}))
1958
- if (__hasOwnProp$1.call(b, prop))
1959
- __defNormalProp$1(a, prop, b[prop]);
1960
- if (__getOwnPropSymbols$1) {
1961
- for (var prop of __getOwnPropSymbols$1(b))
1962
- if (__propIsEnum$1.call(b, prop))
1963
- __defNormalProp$1(a, prop, b[prop]);
1966
+ if (__hasOwnProp$2.call(b, prop))
1967
+ __defNormalProp$2(a, prop, b[prop]);
1968
+ if (__getOwnPropSymbols$2) {
1969
+ for (var prop of __getOwnPropSymbols$2(b))
1970
+ if (__propIsEnum$2.call(b, prop))
1971
+ __defNormalProp$2(a, prop, b[prop]);
1964
1972
  }
1965
1973
  return a;
1966
1974
  };
1967
- var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
1975
+ var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
1968
1976
  var __async = (__this, __arguments, generator) => {
1969
1977
  return new Promise((resolve, reject) => {
1970
1978
  var fulfilled = (value) => {
@@ -1988,7 +1996,7 @@ var __async = (__this, __arguments, generator) => {
1988
1996
  const fetch$ = getFetch();
1989
1997
  function getContent(options) {
1990
1998
  return __async(this, null, function* () {
1991
- return (yield getAllContent(__spreadProps$1(__spreadValues$1({}, options), {
1999
+ return (yield getAllContent(__spreadProps$2(__spreadValues$2({}, options), {
1992
2000
  limit: 1
1993
2001
  }))).results[0] || null;
1994
2002
  });
@@ -1996,7 +2004,7 @@ function getContent(options) {
1996
2004
  const generateContentUrl = (options) => {
1997
2005
  const { limit = 1, userAttributes, query, noTraverse = false, model, apiKey } = options;
1998
2006
  const url = new URL(`https://cdn.builder.io/api/v2/content/${model}?apiKey=${apiKey}&limit=${limit}&noTraverse=${noTraverse}`);
1999
- const queryOptions = __spreadValues$1(__spreadValues$1({}, getBuilderSearchParamsFromWindow()), normalizeSearchParams(options.options || {}));
2007
+ const queryOptions = __spreadValues$2(__spreadValues$2({}, getBuilderSearchParamsFromWindow()), normalizeSearchParams(options.options || {}));
2000
2008
  const flattened = flatten(queryOptions);
2001
2009
  for (const key in flattened)
2002
2010
  url.searchParams.set(key, String(flattened[key]));
@@ -2029,52 +2037,52 @@ function isPreviewing() {
2029
2037
  return false;
2030
2038
  return Boolean(location.search.indexOf("builder.preview=") !== -1);
2031
2039
  }
2032
- var __defProp = Object.defineProperty;
2033
- var __defProps = Object.defineProperties;
2034
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
2035
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
2036
- var __hasOwnProp = Object.prototype.hasOwnProperty;
2037
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
2038
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
2040
+ var __defProp$1 = Object.defineProperty;
2041
+ var __defProps$1 = Object.defineProperties;
2042
+ var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
2043
+ var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
2044
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
2045
+ var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
2046
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, {
2039
2047
  enumerable: true,
2040
2048
  configurable: true,
2041
2049
  writable: true,
2042
2050
  value
2043
2051
  }) : obj[key] = value;
2044
- var __spreadValues = (a, b) => {
2052
+ var __spreadValues$1 = (a, b) => {
2045
2053
  for (var prop in b || (b = {}))
2046
- if (__hasOwnProp.call(b, prop))
2047
- __defNormalProp(a, prop, b[prop]);
2048
- if (__getOwnPropSymbols) {
2049
- for (var prop of __getOwnPropSymbols(b))
2050
- if (__propIsEnum.call(b, prop))
2051
- __defNormalProp(a, prop, b[prop]);
2054
+ if (__hasOwnProp$1.call(b, prop))
2055
+ __defNormalProp$1(a, prop, b[prop]);
2056
+ if (__getOwnPropSymbols$1) {
2057
+ for (var prop of __getOwnPropSymbols$1(b))
2058
+ if (__propIsEnum$1.call(b, prop))
2059
+ __defNormalProp$1(a, prop, b[prop]);
2052
2060
  }
2053
2061
  return a;
2054
2062
  };
2055
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
2056
- var __objRest = (source, exclude) => {
2063
+ var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
2064
+ var __objRest$1 = (source, exclude) => {
2057
2065
  var target = {};
2058
2066
  for (var prop in source)
2059
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
2067
+ if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
2060
2068
  target[prop] = source[prop];
2061
- if (source != null && __getOwnPropSymbols) {
2062
- for (var prop of __getOwnPropSymbols(source))
2063
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
2069
+ if (source != null && __getOwnPropSymbols$1) {
2070
+ for (var prop of __getOwnPropSymbols$1(source))
2071
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
2064
2072
  target[prop] = source[prop];
2065
2073
  }
2066
2074
  return target;
2067
2075
  };
2068
2076
  const components = [];
2069
2077
  function registerComponent(component3, info) {
2070
- components.push(__spreadValues({
2078
+ components.push(__spreadValues$1({
2071
2079
  component: component3
2072
2080
  }, info));
2073
2081
  console.warn("registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK.");
2074
2082
  return component3;
2075
2083
  }
2076
2084
  const createRegisterComponentMessage = (_a) => {
2077
- var info = __objRest(_a, [
2085
+ var info = __objRest$1(_a, [
2078
2086
  "component"
2079
2087
  ]);
2080
2088
  return {
@@ -2090,16 +2098,239 @@ const serializeFn = (fnValue) => {
2090
2098
  return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
2091
2099
  };
2092
2100
  const prepareComponentInfoToSend = (_c) => {
2093
- var { inputs } = _c, info = __objRest(_c, [
2101
+ var { inputs } = _c, info = __objRest$1(_c, [
2094
2102
  "inputs"
2095
2103
  ]);
2096
- return __spreadProps(__spreadValues({}, fastClone(info)), {
2097
- inputs: inputs == null ? void 0 : inputs.map((input) => Object.entries(input).reduce((acc, [key, value]) => __spreadProps(__spreadValues({}, acc), {
2104
+ return __spreadProps$1(__spreadValues$1({}, fastClone(info)), {
2105
+ inputs: inputs == null ? void 0 : inputs.map((input) => Object.entries(input).reduce((acc, [key, value]) => __spreadProps$1(__spreadValues$1({}, acc), {
2098
2106
  [key]: serializeValue(value)
2099
2107
  }), {}))
2100
2108
  });
2101
2109
  };
2102
- function track(event, properties) {
2110
+ const getTopLevelDomain = (host) => {
2111
+ const parts = host.split(".");
2112
+ if (parts.length > 2)
2113
+ return parts.slice(1).join(".");
2114
+ return host;
2115
+ };
2116
+ const getCookie = ({ name, canTrack }) => {
2117
+ var _a;
2118
+ try {
2119
+ if (!canTrack)
2120
+ return void 0;
2121
+ return (_a = document.cookie.split("; ").find((row) => row.startsWith(`${name}=`))) == null ? void 0 : _a.split("=")[1];
2122
+ } catch (err) {
2123
+ console.debug("[COOKIE] GET error: ", err);
2124
+ }
2125
+ };
2126
+ const stringifyCookie = (cookie) => cookie.map(([key, value]) => value ? `${key}=${value}` : key).join("; ");
2127
+ const SECURE_CONFIG = [
2128
+ [
2129
+ "secure",
2130
+ ""
2131
+ ],
2132
+ [
2133
+ "SameSite",
2134
+ "None"
2135
+ ]
2136
+ ];
2137
+ const createCookieString = ({ name, value, expires }) => {
2138
+ const secure = isBrowser() ? location.protocol === "https:" : true;
2139
+ const secureObj = secure ? SECURE_CONFIG : [
2140
+ []
2141
+ ];
2142
+ const expiresObj = expires ? [
2143
+ [
2144
+ "expires",
2145
+ expires.toUTCString()
2146
+ ]
2147
+ ] : [
2148
+ []
2149
+ ];
2150
+ const cookieValue = [
2151
+ [
2152
+ name,
2153
+ value
2154
+ ],
2155
+ ...expiresObj,
2156
+ [
2157
+ "path",
2158
+ "/"
2159
+ ],
2160
+ [
2161
+ "domain",
2162
+ getTopLevelDomain(window.location.hostname)
2163
+ ],
2164
+ ...secureObj
2165
+ ];
2166
+ const cookie = stringifyCookie(cookieValue);
2167
+ return cookie;
2168
+ };
2169
+ const setCookie = ({ name, value, expires, canTrack }) => {
2170
+ try {
2171
+ if (!canTrack)
2172
+ return void 0;
2173
+ const cookie = createCookieString({
2174
+ name,
2175
+ value,
2176
+ expires
2177
+ });
2178
+ document.cookie = cookie;
2179
+ } catch (err) {
2180
+ console.warn("[COOKIE] SET error: ", err);
2181
+ }
2182
+ };
2183
+ const checkIsDefined = (maybeT) => maybeT !== null && maybeT !== void 0;
2184
+ function uuidv4() {
2185
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
2186
+ const r = Math.random() * 16 | 0, v = c == "x" ? r : r & 3 | 8;
2187
+ return v.toString(16);
2188
+ });
2189
+ }
2190
+ function uuid() {
2191
+ return uuidv4().replace(/-/g, "");
2192
+ }
2193
+ const SESSION_LOCAL_STORAGE_KEY = "builderSessionId";
2194
+ const getSessionId = ({ canTrack }) => {
2195
+ if (!canTrack)
2196
+ return void 0;
2197
+ const sessionId = getCookie({
2198
+ name: SESSION_LOCAL_STORAGE_KEY,
2199
+ canTrack
2200
+ });
2201
+ if (checkIsDefined(sessionId))
2202
+ return sessionId;
2203
+ else {
2204
+ const newSessionId = createSessionId();
2205
+ setSessionId({
2206
+ id: newSessionId,
2207
+ canTrack
2208
+ });
2209
+ }
2210
+ };
2211
+ const createSessionId = () => uuid();
2212
+ const setSessionId = ({ id, canTrack }) => setCookie({
2213
+ name: SESSION_LOCAL_STORAGE_KEY,
2214
+ value: id,
2215
+ canTrack
2216
+ });
2217
+ const getLocalStorage = () => isBrowser() && typeof localStorage !== "undefined" ? localStorage : void 0;
2218
+ const getLocalStorageItem = ({ key, canTrack }) => {
2219
+ var _a;
2220
+ try {
2221
+ if (canTrack)
2222
+ return (_a = getLocalStorage()) == null ? void 0 : _a.getItem(key);
2223
+ return void 0;
2224
+ } catch (err) {
2225
+ console.debug("[LocalStorage] GET error: ", err);
2226
+ }
2227
+ };
2228
+ const setLocalStorageItem = ({ key, canTrack, value }) => {
2229
+ var _a;
2230
+ try {
2231
+ if (canTrack)
2232
+ (_a = getLocalStorage()) == null || _a.setItem(key, value);
2233
+ } catch (err) {
2234
+ console.debug("[LocalStorage] SET error: ", err);
2235
+ }
2236
+ };
2237
+ const VISITOR_LOCAL_STORAGE_KEY = "builderVisitorId";
2238
+ const getVisitorId = ({ canTrack }) => {
2239
+ if (!canTrack)
2240
+ return void 0;
2241
+ const visitorId = getLocalStorageItem({
2242
+ key: VISITOR_LOCAL_STORAGE_KEY,
2243
+ canTrack
2244
+ });
2245
+ if (checkIsDefined(visitorId))
2246
+ return visitorId;
2247
+ else {
2248
+ const newVisitorId = createVisitorId();
2249
+ setVisitorId({
2250
+ id: newVisitorId,
2251
+ canTrack
2252
+ });
2253
+ }
2254
+ };
2255
+ const createVisitorId = () => uuid();
2256
+ const setVisitorId = ({ id, canTrack }) => setLocalStorageItem({
2257
+ key: VISITOR_LOCAL_STORAGE_KEY,
2258
+ value: id,
2259
+ canTrack
2260
+ });
2261
+ var __defProp = Object.defineProperty;
2262
+ var __defProps = Object.defineProperties;
2263
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
2264
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
2265
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
2266
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
2267
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
2268
+ enumerable: true,
2269
+ configurable: true,
2270
+ writable: true,
2271
+ value
2272
+ }) : obj[key] = value;
2273
+ var __spreadValues = (a, b) => {
2274
+ for (var prop in b || (b = {}))
2275
+ if (__hasOwnProp.call(b, prop))
2276
+ __defNormalProp(a, prop, b[prop]);
2277
+ if (__getOwnPropSymbols) {
2278
+ for (var prop of __getOwnPropSymbols(b))
2279
+ if (__propIsEnum.call(b, prop))
2280
+ __defNormalProp(a, prop, b[prop]);
2281
+ }
2282
+ return a;
2283
+ };
2284
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
2285
+ var __objRest = (source, exclude) => {
2286
+ var target = {};
2287
+ for (var prop in source)
2288
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
2289
+ target[prop] = source[prop];
2290
+ if (source != null && __getOwnPropSymbols) {
2291
+ for (var prop of __getOwnPropSymbols(source))
2292
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
2293
+ target[prop] = source[prop];
2294
+ }
2295
+ return target;
2296
+ };
2297
+ const getTrackingEventData = ({ canTrack }) => {
2298
+ if (!canTrack)
2299
+ return {
2300
+ visitorId: void 0,
2301
+ sessionId: void 0
2302
+ };
2303
+ const sessionId = getSessionId({
2304
+ canTrack
2305
+ });
2306
+ const visitorId = getVisitorId({
2307
+ canTrack
2308
+ });
2309
+ return {
2310
+ sessionId,
2311
+ visitorId
2312
+ };
2313
+ };
2314
+ const createEvent = (_a) => {
2315
+ var { type: eventType, canTrack, orgId, contentId } = _a, properties = __objRest(_a, [
2316
+ "type",
2317
+ "canTrack",
2318
+ "orgId",
2319
+ "contentId"
2320
+ ]);
2321
+ return {
2322
+ type: eventType,
2323
+ data: __spreadProps(__spreadValues(__spreadValues({}, properties), getTrackingEventData({
2324
+ canTrack
2325
+ })), {
2326
+ ownerId: orgId,
2327
+ contentId
2328
+ })
2329
+ };
2330
+ };
2331
+ function track(eventProps) {
2332
+ if (!eventProps.canTrack)
2333
+ return;
2103
2334
  if (isEditing())
2104
2335
  return;
2105
2336
  if (!(isBrowser() || TARGET === "reactNative"))
@@ -2108,10 +2339,7 @@ function track(event, properties) {
2108
2339
  method: "POST",
2109
2340
  body: JSON.stringify({
2110
2341
  events: [
2111
- {
2112
- type: event,
2113
- data: properties
2114
- }
2342
+ createEvent(eventProps)
2115
2343
  ]
2116
2344
  }),
2117
2345
  headers: {
@@ -2181,6 +2409,9 @@ const useContent = function useContent2(props, state, elementRef) {
2181
2409
  };
2182
2410
  return mergedContent;
2183
2411
  };
2412
+ const canTrackToUse = function canTrackToUse2(props, state, elementRef) {
2413
+ return props.canTrack || true;
2414
+ };
2184
2415
  const contentState = function contentState2(props, state, elementRef) {
2185
2416
  return {
2186
2417
  ...props.content?.data?.state,
@@ -2230,9 +2461,12 @@ const httpReqsData = function httpReqsData2(props, state, elementRef) {
2230
2461
  return {};
2231
2462
  };
2232
2463
  const onClick2 = function onClick3(props, state, elementRef, _event) {
2233
- if (useContent(props, state) && props.canTrack !== false)
2234
- track("click", {
2235
- contentId: useContent(props, state).id
2464
+ if (useContent(props, state))
2465
+ track({
2466
+ type: "click",
2467
+ canTrack: canTrackToUse(props),
2468
+ contentId: useContent(props, state).id,
2469
+ orgId: props.apiKey
2236
2470
  });
2237
2471
  };
2238
2472
  const evalExpression = function evalExpression2(props, state, elementRef, expression) {
@@ -2310,7 +2544,7 @@ const RenderContent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props)
2310
2544
  const [elementRef2, props2, state2] = qwik.useLexicalScope();
2311
2545
  if (isBrowser()) {
2312
2546
  if (isEditing()) {
2313
- state2.forceReRenderCount++;
2547
+ state2.forceReRenderCount = state2.forceReRenderCount + 1;
2314
2548
  qwik._useMutableProps(elementRef2.current, true);
2315
2549
  registerInsertMenu();
2316
2550
  setupBrowserForEditing();
@@ -2321,9 +2555,12 @@ const RenderContent = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props)
2321
2555
  window.addEventListener("message", processMessage.bind(null, props2, state2, elementRef2));
2322
2556
  window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate.bind(null, props2, state2, elementRef2));
2323
2557
  }
2324
- if (useContent(props2, state2) && props2.canTrack !== false)
2325
- track("impression", {
2326
- contentId: useContent(props2, state2).id
2558
+ if (useContent(props2, state2))
2559
+ track({
2560
+ type: "impression",
2561
+ canTrack: canTrackToUse(props2),
2562
+ contentId: useContent(props2, state2).id,
2563
+ orgId: props2.apiKey
2327
2564
  });
2328
2565
  if (isPreviewing()) {
2329
2566
  const searchParams = new URL(location.href).searchParams;
@@ -2426,9 +2663,7 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(qwik.inlinedQrl((props) => {
2426
2663
  ]));
2427
2664
  qwik.useWatchQrl(qwik.inlinedQrl(({ track: track2 }) => {
2428
2665
  const [builderContext2, props2, state2] = qwik.useLexicalScope();
2429
- props2.symbol && track2(props2.symbol, "content");
2430
- props2.symbol && track2(props2.symbol, "model");
2431
- props2.symbol && track2(props2.symbol, "entry");
2666
+ props2 && track2(props2, "symbol");
2432
2667
  state2 && track2(state2, "content");
2433
2668
  const symbolToUse = props2.symbol;
2434
2669
  if (symbolToUse && !symbolToUse.content && !state2.content && symbolToUse.model)