@builder.io/sdk-qwik 0.0.11 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.yarn/cache/@builder.io-qwik-npm-0.0.103-bdc7786a46-98363e9103.zip +0 -0
- package/.yarn/cache/@gar-promisify-npm-1.1.3-ac1a325862-4059f790e2.zip +0 -0
- package/.yarn/cache/@npmcli-fs-npm-2.1.2-08d434e77b-405074965e.zip +0 -0
- package/.yarn/cache/@npmcli-move-file-npm-2.0.1-b593d8f741-52dc02259d.zip +0 -0
- package/.yarn/cache/@tootallnate-once-npm-2.0.0-e36cf4f140-ad87447820.zip +0 -0
- package/.yarn/cache/@types-node-npm-18.7.6-c1eafa3d9a-5122988c32.zip +0 -0
- package/.yarn/cache/abbrev-npm-1.1.1-3659247eab-a4a97ec07d.zip +0 -0
- package/.yarn/cache/agent-base-npm-6.0.2-428f325a93-f52b6872cc.zip +0 -0
- package/.yarn/cache/agentkeepalive-npm-4.2.1-b86a9fb343-39cb49ed8c.zip +0 -0
- package/.yarn/cache/aggregate-error-npm-3.1.0-415a406f4e-1101a33f21.zip +0 -0
- package/.yarn/cache/ansi-regex-npm-5.0.1-c963a48615-2aa4bb54ca.zip +0 -0
- package/.yarn/cache/aproba-npm-2.0.0-8716bcfde6-5615cadcfb.zip +0 -0
- package/.yarn/cache/are-we-there-yet-npm-3.0.1-3395b1512f-52590c2486.zip +0 -0
- package/.yarn/cache/balanced-match-npm-1.0.2-a53c126459-9706c088a2.zip +0 -0
- package/.yarn/cache/brace-expansion-npm-1.1.11-fb95eb05ad-faf34a7bb0.zip +0 -0
- package/.yarn/cache/brace-expansion-npm-2.0.1-17aa2616f9-a61e7cd2e8.zip +0 -0
- package/.yarn/cache/cacache-npm-16.1.2-0d36d1aaf1-defe1d6f55.zip +0 -0
- package/.yarn/cache/chownr-npm-2.0.0-638f1c9c61-c57cf9dd07.zip +0 -0
- package/.yarn/cache/clean-stack-npm-2.2.0-a8ce435a5c-2ac8cd2b2f.zip +0 -0
- package/.yarn/cache/color-support-npm-1.1.3-3be5c53455-9b73568176.zip +0 -0
- package/.yarn/cache/concat-map-npm-0.0.1-85a921b7ee-902a9f5d89.zip +0 -0
- package/.yarn/cache/console-control-strings-npm-1.1.0-e3160e5275-8755d76787.zip +0 -0
- package/.yarn/cache/debug-npm-4.3.4-4513954577-3dbad3f94e.zip +0 -0
- package/.yarn/cache/delegates-npm-1.0.0-9b1942d75f-a51744d9b5.zip +0 -0
- package/.yarn/cache/depd-npm-1.1.2-b0c8414da7-6b406620d2.zip +0 -0
- package/.yarn/cache/emoji-regex-npm-8.0.0-213764015c-d4c5c39d5a.zip +0 -0
- package/.yarn/cache/encoding-npm-0.1.13-82a1837d30-bb98632f8f.zip +0 -0
- package/.yarn/cache/env-paths-npm-2.2.1-7c7577428c-65b5df55a8.zip +0 -0
- package/.yarn/cache/err-code-npm-2.0.3-082e0ff9a7-8b7b1be20d.zip +0 -0
- package/.yarn/cache/esbuild-darwin-arm64-npm-0.14.54-ec53803fa6-8.zip +0 -0
- package/.yarn/cache/esbuild-npm-0.14.54-b3dcd8a41e-49e360b118.zip +0 -0
- package/.yarn/cache/fs-minipass-npm-2.1.0-501ef87306-1b8d128dae.zip +0 -0
- package/.yarn/cache/fs.realpath-npm-1.0.0-c8f05d8126-99ddea01a7.zip +0 -0
- package/.yarn/cache/fsevents-npm-2.3.2-a881d6ac9f-97ade64e75.zip +0 -0
- package/.yarn/cache/fsevents-patch-3340e2eb10-8.zip +0 -0
- package/.yarn/cache/function-bind-npm-1.1.1-b56b322ae9-b32fbaebb3.zip +0 -0
- package/.yarn/cache/gauge-npm-4.0.4-8f878385e9-788b6bfe52.zip +0 -0
- package/.yarn/cache/glob-npm-7.2.3-2d866d17a5-29452e97b3.zip +0 -0
- package/.yarn/cache/glob-npm-8.0.3-750f909025-50bcdea19d.zip +0 -0
- package/.yarn/cache/graceful-fs-npm-4.2.10-79c70989ca-3f109d70ae.zip +0 -0
- package/.yarn/cache/has-npm-1.0.3-b7f00631c1-b9ad53d53b.zip +0 -0
- package/.yarn/cache/has-unicode-npm-2.0.1-893adb4747-1eab07a743.zip +0 -0
- package/.yarn/cache/http-cache-semantics-npm-4.1.0-860520a31f-974de94a81.zip +0 -0
- package/.yarn/cache/http-proxy-agent-npm-5.0.0-7f1f121b83-e2ee1ff165.zip +0 -0
- package/.yarn/cache/https-proxy-agent-npm-5.0.1-42d65f358e-571fccdf38.zip +0 -0
- package/.yarn/cache/humanize-ms-npm-1.2.1-e942bd7329-9c7a74a282.zip +0 -0
- package/.yarn/cache/iconv-lite-npm-0.6.3-24b8aae27e-3f60d47a5c.zip +0 -0
- package/.yarn/cache/imurmurhash-npm-0.1.4-610c5068a0-7cae75c8cd.zip +0 -0
- package/.yarn/cache/indent-string-npm-4.0.0-7b717435b2-824cfb9929.zip +0 -0
- package/.yarn/cache/infer-owner-npm-1.0.4-685ac3d2af-181e732764.zip +0 -0
- package/.yarn/cache/inflight-npm-1.0.6-ccedb4b908-f4f76aa072.zip +0 -0
- package/.yarn/cache/inherits-npm-2.0.4-c66b3957a0-4a48a73384.zip +0 -0
- package/.yarn/cache/ip-npm-2.0.0-204facb3cc-cfcfac6b87.zip +0 -0
- package/.yarn/cache/is-core-module-npm-2.10.0-6dff9310aa-0f3f77811f.zip +0 -0
- package/.yarn/cache/is-fullwidth-code-point-npm-3.0.0-1ecf4ebee5-44a30c2945.zip +0 -0
- package/.yarn/cache/is-lambda-npm-1.0.1-7ab55bc8a8-93a32f0194.zip +0 -0
- package/.yarn/cache/isexe-npm-2.0.0-b58870bd2e-26bf6c5480.zip +0 -0
- package/.yarn/cache/lru-cache-npm-6.0.0-b4c8668fe1-f97f499f89.zip +0 -0
- package/.yarn/cache/lru-cache-npm-7.14.0-354cf654ec-efdd329f2c.zip +0 -0
- package/.yarn/cache/make-fetch-happen-npm-10.2.1-f1cc7cd2df-2332eb9a8e.zip +0 -0
- package/.yarn/cache/minimatch-npm-3.1.2-9405269906-c154e56640.zip +0 -0
- package/.yarn/cache/minimatch-npm-5.1.0-34f6240621-15ce53d31a.zip +0 -0
- package/.yarn/cache/minipass-collect-npm-1.0.2-3b4676eab5-14df761028.zip +0 -0
- package/.yarn/cache/minipass-fetch-npm-2.1.1-c4a8efdb09-1aae0c2240.zip +0 -0
- package/.yarn/cache/minipass-flush-npm-1.0.5-efe79d9826-56269a0b22.zip +0 -0
- package/.yarn/cache/minipass-npm-3.3.5-a555b091e7-f89f02bcaa.zip +0 -0
- package/.yarn/cache/minipass-pipeline-npm-1.2.4-5924cb077f-b14240dac0.zip +0 -0
- package/.yarn/cache/minipass-sized-npm-1.0.3-306d86f432-79076749fc.zip +0 -0
- package/.yarn/cache/minizlib-npm-2.1.2-ea89cd0cfb-f1fdeac0b0.zip +0 -0
- package/.yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-a96865108c.zip +0 -0
- package/.yarn/cache/ms-npm-2.1.2-ec0c1512ff-673cdb2c31.zip +0 -0
- package/.yarn/cache/ms-npm-2.1.3-81ff3cfac1-aa92de6080.zip +0 -0
- package/.yarn/cache/nanoid-npm-3.3.4-3d250377d6-2fddd6dee9.zip +0 -0
- package/.yarn/cache/negotiator-npm-0.6.3-9d50e36171-b8ffeb1e26.zip +0 -0
- package/.yarn/cache/node-gyp-npm-9.1.0-2091059b31-1437fa4a87.zip +0 -0
- package/.yarn/cache/nopt-npm-5.0.0-304b40fbfe-d35fdec187.zip +0 -0
- package/.yarn/cache/npmlog-npm-6.0.2-e0e69455c7-ae238cd264.zip +0 -0
- package/.yarn/cache/once-npm-1.4.0-ccf03ef07a-cd0a885013.zip +0 -0
- package/.yarn/cache/p-map-npm-4.0.0-4677ae07c7-cb0ab21ec0.zip +0 -0
- package/.yarn/cache/path-is-absolute-npm-1.0.1-31bc695ffd-060840f92c.zip +0 -0
- package/.yarn/cache/path-parse-npm-1.0.7-09564527b7-49abf3d811.zip +0 -0
- package/.yarn/cache/picocolors-npm-1.0.0-d81e0b1927-a2e8092dd8.zip +0 -0
- package/.yarn/cache/postcss-npm-8.4.16-7367383579-10eee25efd.zip +0 -0
- package/.yarn/cache/promise-inflight-npm-1.0.1-5bb925afac-2274948309.zip +0 -0
- package/.yarn/cache/promise-retry-npm-2.0.1-871f0b01b7-f96a3f6d90.zip +0 -0
- package/.yarn/cache/readable-stream-npm-3.6.0-23a4a5eb56-d4ea81502d.zip +0 -0
- package/.yarn/cache/resolve-npm-1.22.1-3980488690-07af5fc1e8.zip +0 -0
- package/.yarn/cache/resolve-patch-46f9469d0d-5656f4d0be.zip +0 -0
- package/.yarn/cache/retry-npm-0.12.0-72ac7fb4cc-623bd7d2e5.zip +0 -0
- package/.yarn/cache/rimraf-npm-3.0.2-2cb7dac69a-87f4164e39.zip +0 -0
- package/.yarn/cache/rollup-npm-2.78.0-09284f4c78-01b5a7ae08.zip +0 -0
- package/.yarn/cache/safe-buffer-npm-5.2.1-3481c8aa9b-b99c4b41fd.zip +0 -0
- package/.yarn/cache/safer-buffer-npm-2.1.2-8d5c0b705e-cab8f25ae6.zip +0 -0
- package/.yarn/cache/semver-npm-7.3.7-3bfe704194-2fa3e87756.zip +0 -0
- package/.yarn/cache/set-blocking-npm-2.0.0-49e2cffa24-6e65a05f7c.zip +0 -0
- package/.yarn/cache/signal-exit-npm-3.0.7-bd270458a3-a2f098f247.zip +0 -0
- package/.yarn/cache/smart-buffer-npm-4.2.0-5ac3f668bb-b5167a7142.zip +0 -0
- package/.yarn/cache/socks-npm-2.7.0-cc1cb019db-0b5d94e2b3.zip +0 -0
- package/.yarn/cache/socks-proxy-agent-npm-7.0.0-7aacf32ea0-7205543701.zip +0 -0
- package/.yarn/cache/source-map-js-npm-1.0.2-ee4f9f9b30-c049a7fc4d.zip +0 -0
- package/.yarn/cache/ssri-npm-9.0.1-33ce27f4f8-fb58f5e46b.zip +0 -0
- package/.yarn/cache/string-width-npm-4.2.3-2c27177bae-e52c10dc3f.zip +0 -0
- package/.yarn/cache/string_decoder-npm-1.3.0-2422117fd0-8417646695.zip +0 -0
- package/.yarn/cache/strip-ansi-npm-6.0.1-caddc7cb40-f3cd25890a.zip +0 -0
- package/.yarn/cache/supports-preserve-symlinks-flag-npm-1.0.0-f17c4d0028-53b1e247e6.zip +0 -0
- package/.yarn/cache/tar-npm-6.1.11-e6ac3cba9c-a04c07bb9e.zip +0 -0
- package/.yarn/cache/typescript-npm-4.7.4-65aa6ffb42-5750181b1c.zip +0 -0
- package/.yarn/cache/typescript-patch-ae154b3216-96d3030cb0.zip +0 -0
- package/.yarn/cache/unique-filename-npm-1.1.1-c885c5095b-cf4998c922.zip +0 -0
- package/.yarn/cache/unique-slug-npm-2.0.2-f6ba1ddeb7-5b6876a645.zip +0 -0
- package/.yarn/cache/util-deprecate-npm-1.0.2-e3fe1a219c-474acf1146.zip +0 -0
- package/.yarn/cache/vite-npm-3.0.2-a17ab24a12-10aebec0df.zip +0 -0
- package/.yarn/cache/which-npm-2.0.2-320ddf72f7-1a5c563d3c.zip +0 -0
- package/.yarn/cache/wide-align-npm-1.1.5-889d77e592-d5fc37cd56.zip +0 -0
- package/.yarn/cache/wrappy-npm-1.0.2-916de4d4b3-159da4805f.zip +0 -0
- package/.yarn/cache/yallist-npm-4.0.0-b493d9e907-343617202a.zip +0 -0
- package/.yarn/install-state.gz +0 -0
- package/README.md +15 -16
- package/lib/index.qwik.cjs +505 -224
- package/lib/index.qwik.mjs +506 -225
- package/package.json +4 -3
- package/src/blocks/button/button.jsx +7 -2
- package/src/blocks/columns/columns.jsx +9 -4
- package/src/blocks/embed/embed.jsx +1 -1
- package/src/blocks/form/builder-blocks.jsx +1 -1
- package/src/blocks/form/form.jsx +2 -2
- package/src/blocks/img/img.jsx +2 -2
- package/src/blocks/select/select.jsx +1 -1
- package/src/blocks/symbol/symbol.jsx +8 -7
- package/src/components/render-block/block-styles.jsx +1 -1
- package/src/components/render-block/render-block.jsx +28 -26
- package/src/components/render-block/render-component.jsx +4 -3
- package/src/components/render-block/render-repeated-block.jsx +4 -1
- package/src/components/render-blocks.jsx +2 -2
- package/src/components/render-content/render-content.jsx +19 -7
- package/src/components/render-inlined-styles.jsx +4 -3
- package/src/constants/builder-registered-components.js +3 -0
- package/src/functions/evaluate.js +1 -1
- package/src/functions/get-processed-block.js +10 -6
- package/src/functions/get-processed-block.test.js +1 -1
- package/src/functions/mark-mutable.js +14 -0
- package/src/functions/track.js +71 -2
- package/src/helpers/cookie.js +59 -0
- package/src/helpers/localStorage.js +34 -0
- package/src/helpers/nullable.js +4 -0
- package/src/helpers/sessionId.js +26 -0
- package/src/helpers/time.js +5 -0
- package/src/helpers/url.js +10 -0
- package/src/helpers/url.test.js +15 -0
- package/src/helpers/uuid.js +13 -0
- package/src/helpers/visitorId.js +33 -0
- package/src/types/can-track.js +0 -0
package/lib/index.qwik.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createContext, componentQrl, inlinedQrl, useContextProvider, useStore, useStylesScopedQrl, useContext, useLexicalScope, Slot, Fragment as Fragment$2, useRef, useWatchQrl, useClientEffectQrl, _useMutableProps, useCleanupQrl } from "@builder.io/qwik";
|
|
1
|
+
import { createContext, mutable, componentQrl, inlinedQrl, useContextProvider, useStore, useStylesScopedQrl, useContext, useLexicalScope, Slot, Fragment as Fragment$2, useRef, useWatchQrl, useClientEffectQrl, _useMutableProps, useCleanupQrl } from "@builder.io/qwik";
|
|
2
2
|
import { jsx, Fragment as Fragment$1, jsxs } from "@builder.io/qwik/jsx-runtime";
|
|
3
3
|
const TARGET = "qwik";
|
|
4
4
|
function isBrowser() {
|
|
@@ -160,7 +160,7 @@ function evaluate({ code, context, state, event }) {
|
|
|
160
160
|
try {
|
|
161
161
|
return new Function("builder", "Builder", "state", "context", "event", useCode)(builder, builder, state, context, event);
|
|
162
162
|
} catch (e) {
|
|
163
|
-
console.warn("Builder custom code error: ", e);
|
|
163
|
+
console.warn("Builder custom code error: \n While Evaluating: \n ", useCode, "\n", e.message || e);
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
const set = (obj, _path, value) => {
|
|
@@ -173,36 +173,36 @@ const set = (obj, _path, value) => {
|
|
|
173
173
|
function transformBlock(block) {
|
|
174
174
|
return block;
|
|
175
175
|
}
|
|
176
|
-
var __defProp$
|
|
177
|
-
var __defProps$
|
|
178
|
-
var __getOwnPropDescs$
|
|
179
|
-
var __getOwnPropSymbols$
|
|
180
|
-
var __hasOwnProp$
|
|
181
|
-
var __propIsEnum$
|
|
182
|
-
var __defNormalProp$
|
|
176
|
+
var __defProp$8 = Object.defineProperty;
|
|
177
|
+
var __defProps$6 = Object.defineProperties;
|
|
178
|
+
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
179
|
+
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
180
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
181
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
182
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, {
|
|
183
183
|
enumerable: true,
|
|
184
184
|
configurable: true,
|
|
185
185
|
writable: true,
|
|
186
186
|
value
|
|
187
187
|
}) : obj[key] = value;
|
|
188
|
-
var __spreadValues$
|
|
188
|
+
var __spreadValues$8 = (a, b) => {
|
|
189
189
|
for (var prop in b || (b = {}))
|
|
190
|
-
if (__hasOwnProp$
|
|
191
|
-
__defNormalProp$
|
|
192
|
-
if (__getOwnPropSymbols$
|
|
193
|
-
for (var prop of __getOwnPropSymbols$
|
|
194
|
-
if (__propIsEnum$
|
|
195
|
-
__defNormalProp$
|
|
190
|
+
if (__hasOwnProp$8.call(b, prop))
|
|
191
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
192
|
+
if (__getOwnPropSymbols$8) {
|
|
193
|
+
for (var prop of __getOwnPropSymbols$8(b))
|
|
194
|
+
if (__propIsEnum$8.call(b, prop))
|
|
195
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
196
196
|
}
|
|
197
197
|
return a;
|
|
198
198
|
};
|
|
199
|
-
var __spreadProps$
|
|
199
|
+
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
200
200
|
const evaluateBindings = ({ block, context, state }) => {
|
|
201
201
|
if (!block.bindings)
|
|
202
202
|
return block;
|
|
203
|
-
const copied = __spreadProps$
|
|
204
|
-
properties: __spreadValues$
|
|
205
|
-
actions: __spreadValues$
|
|
203
|
+
const copied = __spreadProps$6(__spreadValues$8({}, block), {
|
|
204
|
+
properties: __spreadValues$8({}, block.properties),
|
|
205
|
+
actions: __spreadValues$8({}, block.actions)
|
|
206
206
|
});
|
|
207
207
|
for (const binding in block.bindings) {
|
|
208
208
|
const expression = block.bindings[binding];
|
|
@@ -215,17 +215,16 @@ const evaluateBindings = ({ block, context, state }) => {
|
|
|
215
215
|
}
|
|
216
216
|
return copied;
|
|
217
217
|
};
|
|
218
|
-
function getProcessedBlock(
|
|
219
|
-
const
|
|
220
|
-
|
|
221
|
-
if (evaluateBindings)
|
|
218
|
+
function getProcessedBlock({ block, context, shouldEvaluateBindings, state }) {
|
|
219
|
+
const transformedBlock = transformBlock(block);
|
|
220
|
+
if (shouldEvaluateBindings)
|
|
222
221
|
return evaluateBindings({
|
|
223
|
-
block,
|
|
222
|
+
block: transformedBlock,
|
|
224
223
|
state,
|
|
225
224
|
context
|
|
226
225
|
});
|
|
227
226
|
else
|
|
228
|
-
return
|
|
227
|
+
return transformedBlock;
|
|
229
228
|
}
|
|
230
229
|
const camelToKebabCase = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
|
|
231
230
|
const convertStyleMaptoCSS = (style) => {
|
|
@@ -235,21 +234,25 @@ const convertStyleMaptoCSS = (style) => {
|
|
|
235
234
|
});
|
|
236
235
|
return cssProps.join("\n");
|
|
237
236
|
};
|
|
238
|
-
const
|
|
237
|
+
const tagName$1 = function tagName(props, state) {
|
|
238
|
+
return "style";
|
|
239
|
+
};
|
|
240
|
+
const RenderInlinedStyles = (props) => {
|
|
239
241
|
const state = {};
|
|
242
|
+
state.tagName = tagName$1();
|
|
240
243
|
return /* @__PURE__ */ jsx(Fragment$1, {
|
|
241
244
|
children: /* @__PURE__ */ jsx(state.tagName, {
|
|
242
245
|
children: props.styles
|
|
243
246
|
})
|
|
244
247
|
});
|
|
245
|
-
}
|
|
248
|
+
};
|
|
246
249
|
const RenderInlinedStyles$1 = RenderInlinedStyles;
|
|
247
250
|
const useBlock$1 = function useBlock(props, state) {
|
|
248
251
|
return getProcessedBlock({
|
|
249
252
|
block: props.block,
|
|
250
253
|
state: props.context.state,
|
|
251
254
|
context: props.context.context,
|
|
252
|
-
|
|
255
|
+
shouldEvaluateBindings: true
|
|
253
256
|
});
|
|
254
257
|
};
|
|
255
258
|
const css = function css2(props, state) {
|
|
@@ -296,6 +299,36 @@ function getBlockActions(options) {
|
|
|
296
299
|
}
|
|
297
300
|
return obj;
|
|
298
301
|
}
|
|
302
|
+
var __defProp$7 = Object.defineProperty;
|
|
303
|
+
var __defProps$5 = Object.defineProperties;
|
|
304
|
+
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
305
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
306
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
307
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
308
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, {
|
|
309
|
+
enumerable: true,
|
|
310
|
+
configurable: true,
|
|
311
|
+
writable: true,
|
|
312
|
+
value
|
|
313
|
+
}) : obj[key] = value;
|
|
314
|
+
var __spreadValues$7 = (a, b) => {
|
|
315
|
+
for (var prop in b || (b = {}))
|
|
316
|
+
if (__hasOwnProp$7.call(b, prop))
|
|
317
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
318
|
+
if (__getOwnPropSymbols$7) {
|
|
319
|
+
for (var prop of __getOwnPropSymbols$7(b))
|
|
320
|
+
if (__propIsEnum$7.call(b, prop))
|
|
321
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
322
|
+
}
|
|
323
|
+
return a;
|
|
324
|
+
};
|
|
325
|
+
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
326
|
+
function getBlockComponentOptions(block) {
|
|
327
|
+
var _a;
|
|
328
|
+
return __spreadProps$5(__spreadValues$7(__spreadValues$7({}, (_a = block.component) == null ? void 0 : _a.options), block.options), {
|
|
329
|
+
builderBlock: block
|
|
330
|
+
});
|
|
331
|
+
}
|
|
299
332
|
var __defProp$6 = Object.defineProperty;
|
|
300
333
|
var __defProps$4 = Object.defineProperties;
|
|
301
334
|
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
@@ -320,39 +353,9 @@ var __spreadValues$6 = (a, b) => {
|
|
|
320
353
|
return a;
|
|
321
354
|
};
|
|
322
355
|
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
323
|
-
function getBlockComponentOptions(block) {
|
|
324
|
-
var _a;
|
|
325
|
-
return __spreadProps$4(__spreadValues$6(__spreadValues$6({}, (_a = block.component) == null ? void 0 : _a.options), block.options), {
|
|
326
|
-
builderBlock: block
|
|
327
|
-
});
|
|
328
|
-
}
|
|
329
|
-
var __defProp$5 = Object.defineProperty;
|
|
330
|
-
var __defProps$3 = Object.defineProperties;
|
|
331
|
-
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
332
|
-
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
333
|
-
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
334
|
-
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
335
|
-
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, {
|
|
336
|
-
enumerable: true,
|
|
337
|
-
configurable: true,
|
|
338
|
-
writable: true,
|
|
339
|
-
value
|
|
340
|
-
}) : obj[key] = value;
|
|
341
|
-
var __spreadValues$5 = (a, b) => {
|
|
342
|
-
for (var prop in b || (b = {}))
|
|
343
|
-
if (__hasOwnProp$5.call(b, prop))
|
|
344
|
-
__defNormalProp$5(a, prop, b[prop]);
|
|
345
|
-
if (__getOwnPropSymbols$5) {
|
|
346
|
-
for (var prop of __getOwnPropSymbols$5(b))
|
|
347
|
-
if (__propIsEnum$5.call(b, prop))
|
|
348
|
-
__defNormalProp$5(a, prop, b[prop]);
|
|
349
|
-
}
|
|
350
|
-
return a;
|
|
351
|
-
};
|
|
352
|
-
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
353
356
|
function getBlockProperties(block) {
|
|
354
357
|
var _a;
|
|
355
|
-
return __spreadProps$
|
|
358
|
+
return __spreadProps$4(__spreadValues$6({}, block.properties), {
|
|
356
359
|
"builder-id": block.id,
|
|
357
360
|
class: [
|
|
358
361
|
block.id,
|
|
@@ -367,30 +370,30 @@ const convertStyleObject = (obj) => {
|
|
|
367
370
|
};
|
|
368
371
|
const sanitizeBlockStyles = (_styles) => {
|
|
369
372
|
};
|
|
370
|
-
var __defProp$
|
|
371
|
-
var __getOwnPropSymbols$
|
|
372
|
-
var __hasOwnProp$
|
|
373
|
-
var __propIsEnum$
|
|
374
|
-
var __defNormalProp$
|
|
373
|
+
var __defProp$5 = Object.defineProperty;
|
|
374
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
375
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
376
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
377
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, {
|
|
375
378
|
enumerable: true,
|
|
376
379
|
configurable: true,
|
|
377
380
|
writable: true,
|
|
378
381
|
value
|
|
379
382
|
}) : obj[key] = value;
|
|
380
|
-
var __spreadValues$
|
|
383
|
+
var __spreadValues$5 = (a, b) => {
|
|
381
384
|
for (var prop in b || (b = {}))
|
|
382
|
-
if (__hasOwnProp$
|
|
383
|
-
__defNormalProp$
|
|
384
|
-
if (__getOwnPropSymbols$
|
|
385
|
-
for (var prop of __getOwnPropSymbols$
|
|
386
|
-
if (__propIsEnum$
|
|
387
|
-
__defNormalProp$
|
|
385
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
386
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
387
|
+
if (__getOwnPropSymbols$5) {
|
|
388
|
+
for (var prop of __getOwnPropSymbols$5(b))
|
|
389
|
+
if (__propIsEnum$5.call(b, prop))
|
|
390
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
388
391
|
}
|
|
389
392
|
return a;
|
|
390
393
|
};
|
|
391
394
|
function getBlockStyles(block) {
|
|
392
395
|
var _a, _b, _c, _d, _e;
|
|
393
|
-
const styles = __spreadValues$
|
|
396
|
+
const styles = __spreadValues$5(__spreadValues$5({}, convertStyleObject((_a = block.responsiveStyles) == null ? void 0 : _a.large)), block.styles);
|
|
394
397
|
if ((_b = block.responsiveStyles) == null ? void 0 : _b.medium)
|
|
395
398
|
styles[getMaxWidthQueryForSize("medium")] = convertStyleObject((_c = block.responsiveStyles) == null ? void 0 : _c.medium);
|
|
396
399
|
if ((_d = block.responsiveStyles) == null ? void 0 : _d.small)
|
|
@@ -418,21 +421,30 @@ const EMPTY_HTML_ELEMENTS = [
|
|
|
418
421
|
"track",
|
|
419
422
|
"wbr"
|
|
420
423
|
];
|
|
421
|
-
const isEmptyHtmlElement = (
|
|
422
|
-
return typeof
|
|
424
|
+
const isEmptyHtmlElement = (tagName4) => {
|
|
425
|
+
return typeof tagName4 === "string" && EMPTY_HTML_ELEMENTS.includes(tagName4.toLowerCase());
|
|
423
426
|
};
|
|
427
|
+
function markMutable(value) {
|
|
428
|
+
return mutable(value);
|
|
429
|
+
}
|
|
430
|
+
function markPropsMutable(props) {
|
|
431
|
+
Object.keys(props).forEach((key) => {
|
|
432
|
+
props[key] = mutable(props[key]);
|
|
433
|
+
});
|
|
434
|
+
return props;
|
|
435
|
+
}
|
|
424
436
|
const RenderComponent = (props) => {
|
|
425
437
|
return /* @__PURE__ */ jsx(Fragment$1, {
|
|
426
438
|
children: props.componentRef ? /* @__PURE__ */ jsxs(props.componentRef, {
|
|
427
|
-
...props.componentOptions,
|
|
439
|
+
...markPropsMutable(props.componentOptions),
|
|
428
440
|
children: [
|
|
429
|
-
(props.blockChildren || []).map((child)
|
|
441
|
+
(props.blockChildren || []).map(function(child) {
|
|
430
442
|
return /* @__PURE__ */ jsx(RenderBlock$1, {
|
|
431
443
|
block: child,
|
|
432
444
|
context: props.context
|
|
433
445
|
}, "render-block-" + child.id);
|
|
434
446
|
}),
|
|
435
|
-
(props.blockChildren || []).map((child)
|
|
447
|
+
(props.blockChildren || []).map(function(child) {
|
|
436
448
|
return /* @__PURE__ */ jsx(BlockStyles$1, {
|
|
437
449
|
block: child,
|
|
438
450
|
context: props.context
|
|
@@ -463,7 +475,7 @@ const RenderRepeatedBlock = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
463
475
|
}));
|
|
464
476
|
return /* @__PURE__ */ jsx(RenderBlock$1, {
|
|
465
477
|
block: props.block,
|
|
466
|
-
context: props.
|
|
478
|
+
context: props.repeatContext
|
|
467
479
|
});
|
|
468
480
|
}, "RenderRepeatedBlock_component_fV0PdmPN990"));
|
|
469
481
|
const RenderRepeatedBlock$1 = RenderRepeatedBlock;
|
|
@@ -472,7 +484,7 @@ const component = function component2(props, state) {
|
|
|
472
484
|
block: props.block,
|
|
473
485
|
state: props.context.state,
|
|
474
486
|
context: props.context.context,
|
|
475
|
-
|
|
487
|
+
shouldEvaluateBindings: false
|
|
476
488
|
}).component?.name;
|
|
477
489
|
if (!componentName)
|
|
478
490
|
return null;
|
|
@@ -485,7 +497,7 @@ const component = function component2(props, state) {
|
|
|
485
497
|
} else
|
|
486
498
|
return ref;
|
|
487
499
|
};
|
|
488
|
-
const componentInfo$
|
|
500
|
+
const componentInfo$a = function componentInfo(props, state) {
|
|
489
501
|
if (component(props)) {
|
|
490
502
|
const { component: _, ...info } = component(props);
|
|
491
503
|
return info;
|
|
@@ -495,7 +507,7 @@ const componentInfo$9 = function componentInfo(props, state) {
|
|
|
495
507
|
const componentRef = function componentRef2(props, state) {
|
|
496
508
|
return component(props)?.component;
|
|
497
509
|
};
|
|
498
|
-
const
|
|
510
|
+
const tagName2 = function tagName3(props, state) {
|
|
499
511
|
return getBlockTag(useBlock2(props));
|
|
500
512
|
};
|
|
501
513
|
const useBlock2 = function useBlock3(props, state) {
|
|
@@ -503,7 +515,7 @@ const useBlock2 = function useBlock3(props, state) {
|
|
|
503
515
|
block: props.block,
|
|
504
516
|
state: props.context.state,
|
|
505
517
|
context: props.context.context,
|
|
506
|
-
|
|
518
|
+
shouldEvaluateBindings: true
|
|
507
519
|
});
|
|
508
520
|
};
|
|
509
521
|
const attributes = function attributes2(props, state) {
|
|
@@ -518,7 +530,7 @@ const attributes = function attributes2(props, state) {
|
|
|
518
530
|
};
|
|
519
531
|
};
|
|
520
532
|
const shouldWrap = function shouldWrap2(props, state) {
|
|
521
|
-
return !componentInfo$
|
|
533
|
+
return !componentInfo$a(props)?.noWrap;
|
|
522
534
|
};
|
|
523
535
|
const componentOptions = function componentOptions2(props, state) {
|
|
524
536
|
return {
|
|
@@ -573,28 +585,27 @@ const repeatItemData = function repeatItemData2(props, state) {
|
|
|
573
585
|
};
|
|
574
586
|
const RenderBlock = (props) => {
|
|
575
587
|
const state = {};
|
|
576
|
-
state.tagName =
|
|
588
|
+
state.tagName = tagName2(props);
|
|
577
589
|
return /* @__PURE__ */ jsx(Fragment$1, {
|
|
578
|
-
children: shouldWrap(props) ? !isEmptyHtmlElement(
|
|
590
|
+
children: shouldWrap(props) ? !isEmptyHtmlElement(tagName2(props)) ? /* @__PURE__ */ jsxs(state.tagName, {
|
|
579
591
|
...attributes(props),
|
|
580
592
|
children: [
|
|
581
|
-
repeatItemData(props) ? (repeatItemData(props) || []).map((data, index)
|
|
593
|
+
repeatItemData(props) ? (repeatItemData(props) || []).map(function(data, index) {
|
|
582
594
|
return /* @__PURE__ */ jsx(RenderRepeatedBlock$1, {
|
|
583
595
|
repeatContext: data.context,
|
|
584
|
-
block: data.block
|
|
585
|
-
context: props.context
|
|
596
|
+
block: data.block
|
|
586
597
|
}, index);
|
|
587
598
|
}) : null,
|
|
588
599
|
!repeatItemData(props) ? /* @__PURE__ */ jsx(RenderComponent$1, {
|
|
589
600
|
...renderComponentProps(props)
|
|
590
601
|
}) : null,
|
|
591
|
-
(childrenWithoutParentComponent(props) || []).map((child)
|
|
602
|
+
(childrenWithoutParentComponent(props) || []).map(function(child) {
|
|
592
603
|
return /* @__PURE__ */ jsx(RenderBlock, {
|
|
593
604
|
block: child,
|
|
594
605
|
context: props.context
|
|
595
606
|
}, "render-block-" + child.id);
|
|
596
607
|
}),
|
|
597
|
-
(childrenWithoutParentComponent(props) || []).map((child)
|
|
608
|
+
(childrenWithoutParentComponent(props) || []).map(function(child) {
|
|
598
609
|
return /* @__PURE__ */ jsx(BlockStyles$1, {
|
|
599
610
|
block: child,
|
|
600
611
|
context: props.context
|
|
@@ -634,7 +645,7 @@ const onMouseEnter = function onMouseEnter2(props, state, builderContext) {
|
|
|
634
645
|
}, "*");
|
|
635
646
|
};
|
|
636
647
|
const RenderBlocks = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
637
|
-
useStylesScopedQrl(inlinedQrl(STYLES$
|
|
648
|
+
useStylesScopedQrl(inlinedQrl(STYLES$3, "RenderBlocks_component_useStylesScoped_QNti2s7juQc"));
|
|
638
649
|
const builderContext = useContext(stdin_default);
|
|
639
650
|
const state = {};
|
|
640
651
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -661,13 +672,13 @@ const RenderBlocks = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
661
672
|
state
|
|
662
673
|
]),
|
|
663
674
|
children: [
|
|
664
|
-
props.blocks ? (props.blocks || []).map((block)
|
|
675
|
+
props.blocks ? (props.blocks || []).map(function(block) {
|
|
665
676
|
return /* @__PURE__ */ jsx(RenderBlock$1, {
|
|
666
677
|
block,
|
|
667
678
|
context: builderContext
|
|
668
679
|
}, "render-block-" + block.id);
|
|
669
680
|
}) : null,
|
|
670
|
-
props.blocks ? (props.blocks || []).map((block)
|
|
681
|
+
props.blocks ? (props.blocks || []).map(function(block) {
|
|
671
682
|
return /* @__PURE__ */ jsx(BlockStyles$1, {
|
|
672
683
|
block,
|
|
673
684
|
context: builderContext
|
|
@@ -677,7 +688,7 @@ const RenderBlocks = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
677
688
|
});
|
|
678
689
|
}, "RenderBlocks_component_SXGwmVyEM0s"));
|
|
679
690
|
const RenderBlocks$1 = RenderBlocks;
|
|
680
|
-
const STYLES$
|
|
691
|
+
const STYLES$3 = `.div-RenderBlocks {
|
|
681
692
|
display: flex;
|
|
682
693
|
flex-direction: column;
|
|
683
694
|
align-items: stretch; }`;
|
|
@@ -719,12 +730,12 @@ const columnCssVars = function columnCssVars2(props, state) {
|
|
|
719
730
|
};
|
|
720
731
|
};
|
|
721
732
|
const Columns = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
722
|
-
useStylesScopedQrl(inlinedQrl(STYLES$
|
|
733
|
+
useStylesScopedQrl(inlinedQrl(STYLES$2, "Columns_component_useStylesScoped_704fWXyHORo"));
|
|
723
734
|
const state = {};
|
|
724
735
|
return /* @__PURE__ */ jsx("div", {
|
|
725
736
|
class: "builder-columns div-Columns",
|
|
726
737
|
style: columnsCssVars(props, state),
|
|
727
|
-
children: (props.columns || []).map((column, index)
|
|
738
|
+
children: (props.columns || []).map(function(column, index) {
|
|
728
739
|
return /* @__PURE__ */ jsx("div", {
|
|
729
740
|
class: "builder-column div-Columns-2",
|
|
730
741
|
style: {
|
|
@@ -733,20 +744,22 @@ const Columns = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
733
744
|
...columnCssVars(props, state)
|
|
734
745
|
},
|
|
735
746
|
children: /* @__PURE__ */ jsx(RenderBlocks$1, {
|
|
736
|
-
blocks: column.blocks
|
|
747
|
+
blocks: markMutable(column.blocks),
|
|
748
|
+
path: `component.options.columns.${index}.blocks`,
|
|
749
|
+
parent: props.builderBlock.id
|
|
737
750
|
})
|
|
738
751
|
}, index);
|
|
739
752
|
})
|
|
740
753
|
});
|
|
741
754
|
}, "Columns_component_0PeVQGTMczc"));
|
|
742
755
|
const Columns$1 = Columns;
|
|
743
|
-
const STYLES$
|
|
756
|
+
const STYLES$2 = `.div-Columns {
|
|
744
757
|
display: flex;
|
|
745
758
|
align-items: stretch;
|
|
746
|
-
line-height: normal; }@media (max-width:
|
|
759
|
+
line-height: normal; }@media (max-width: 991px) { .div-Columns {
|
|
747
760
|
flex-direction: var(--flex-dir-tablet); } }@media (max-width: 639px) { .div-Columns {
|
|
748
761
|
flex-direction: var(--flex-dir); } }.div-Columns-2 {
|
|
749
|
-
flex-grow: 1; }@media (max-width:
|
|
762
|
+
flex-grow: 1; }@media (max-width: 991px) { .div-Columns-2 {
|
|
750
763
|
width: var(--column-width-tablet) !important;
|
|
751
764
|
margin-left: var(--column-margin-left-tablet) !important; } }@media (max-width: 639px) { .div-Columns-2 {
|
|
752
765
|
width: var(--column-width) !important;
|
|
@@ -826,7 +839,7 @@ const webpSrcSet = function webpSrcSet2(props, state) {
|
|
|
826
839
|
return "";
|
|
827
840
|
};
|
|
828
841
|
const Image = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
829
|
-
useStylesScopedQrl(inlinedQrl(STYLES, "Image_component_useStylesScoped_gRbO7w7SeZA"));
|
|
842
|
+
useStylesScopedQrl(inlinedQrl(STYLES$1, "Image_component_useStylesScoped_gRbO7w7SeZA"));
|
|
830
843
|
return /* @__PURE__ */ jsxs("div", {
|
|
831
844
|
class: "div-Image",
|
|
832
845
|
children: [
|
|
@@ -869,7 +882,7 @@ const Image = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
869
882
|
});
|
|
870
883
|
}, "Image_component_y3S3Zox9wEo"));
|
|
871
884
|
const Image$1 = Image;
|
|
872
|
-
const STYLES = `.div-Image {
|
|
885
|
+
const STYLES$1 = `.div-Image {
|
|
873
886
|
position: relative; }.img-Image {
|
|
874
887
|
opacity: 1;
|
|
875
888
|
transition: opacity 0.2s ease-in-out;
|
|
@@ -932,6 +945,7 @@ const Video = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
932
945
|
}, "Video_component_O5sPuWlrTvk"));
|
|
933
946
|
const Video$1 = Video;
|
|
934
947
|
const Button = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
948
|
+
useStylesScopedQrl(inlinedQrl(STYLES, "Button_component_useStylesScoped_vN61mfeURXY"));
|
|
935
949
|
return /* @__PURE__ */ jsx(Fragment$2, {
|
|
936
950
|
children: props.link ? /* @__PURE__ */ jsx("a", {
|
|
937
951
|
role: "button",
|
|
@@ -939,14 +953,17 @@ const Button = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
939
953
|
href: props.link,
|
|
940
954
|
target: props.openLinkInNewTab ? "_blank" : void 0,
|
|
941
955
|
children: props.text
|
|
942
|
-
}) : /* @__PURE__ */ jsx("
|
|
956
|
+
}) : /* @__PURE__ */ jsx("button", {
|
|
957
|
+
class: "button-Button",
|
|
943
958
|
...props.attributes,
|
|
944
959
|
children: props.text
|
|
945
960
|
})
|
|
946
961
|
});
|
|
947
962
|
}, "Button_component_FtjCELjtKF4"));
|
|
948
963
|
const Button$1 = Button;
|
|
949
|
-
const
|
|
964
|
+
const STYLES = `.button-Button {
|
|
965
|
+
all: unset; }`;
|
|
966
|
+
const componentInfo$9 = {
|
|
950
967
|
name: "Core:Button",
|
|
951
968
|
builtIn: true,
|
|
952
969
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
@@ -988,7 +1005,7 @@ function markSerializable(fn) {
|
|
|
988
1005
|
fn.__qwik_serializable__ = true;
|
|
989
1006
|
return fn;
|
|
990
1007
|
}
|
|
991
|
-
const componentInfo$
|
|
1008
|
+
const componentInfo$8 = {
|
|
992
1009
|
name: "Columns",
|
|
993
1010
|
builtIn: true,
|
|
994
1011
|
inputs: [
|
|
@@ -1229,7 +1246,7 @@ const componentInfo$7 = {
|
|
|
1229
1246
|
}
|
|
1230
1247
|
]
|
|
1231
1248
|
};
|
|
1232
|
-
const componentInfo$
|
|
1249
|
+
const componentInfo$7 = {
|
|
1233
1250
|
name: "Fragment",
|
|
1234
1251
|
static: true,
|
|
1235
1252
|
hidden: true,
|
|
@@ -1243,7 +1260,7 @@ const FragmentComponent = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
1243
1260
|
});
|
|
1244
1261
|
}, "FragmentComponent_component_FJmqlA66Rjg"));
|
|
1245
1262
|
const Fragment = FragmentComponent;
|
|
1246
|
-
const componentInfo$
|
|
1263
|
+
const componentInfo$6 = {
|
|
1247
1264
|
name: "Image",
|
|
1248
1265
|
static: true,
|
|
1249
1266
|
builtIn: true,
|
|
@@ -1392,7 +1409,7 @@ const componentInfo$5 = {
|
|
|
1392
1409
|
}
|
|
1393
1410
|
]
|
|
1394
1411
|
};
|
|
1395
|
-
const componentInfo$
|
|
1412
|
+
const componentInfo$5 = {
|
|
1396
1413
|
name: "Core:Section",
|
|
1397
1414
|
static: true,
|
|
1398
1415
|
builtIn: true,
|
|
@@ -1448,7 +1465,7 @@ const SectionComponent = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
1448
1465
|
});
|
|
1449
1466
|
}, "SectionComponent_component_m1CcjCwgHug"));
|
|
1450
1467
|
const Section = SectionComponent;
|
|
1451
|
-
const componentInfo$
|
|
1468
|
+
const componentInfo$4 = {
|
|
1452
1469
|
name: "Symbol",
|
|
1453
1470
|
noWrap: true,
|
|
1454
1471
|
static: true,
|
|
@@ -1488,7 +1505,7 @@ const componentInfo$3 = {
|
|
|
1488
1505
|
}
|
|
1489
1506
|
]
|
|
1490
1507
|
};
|
|
1491
|
-
const componentInfo$
|
|
1508
|
+
const componentInfo$3 = {
|
|
1492
1509
|
name: "Text",
|
|
1493
1510
|
static: true,
|
|
1494
1511
|
builtIn: true,
|
|
@@ -1509,7 +1526,7 @@ const componentInfo$2 = {
|
|
|
1509
1526
|
textAlign: "center"
|
|
1510
1527
|
}
|
|
1511
1528
|
};
|
|
1512
|
-
const componentInfo$
|
|
1529
|
+
const componentInfo$2 = {
|
|
1513
1530
|
name: "Video",
|
|
1514
1531
|
canHaveChildren: true,
|
|
1515
1532
|
builtIn: true,
|
|
@@ -1622,7 +1639,7 @@ const componentInfo$1 = {
|
|
|
1622
1639
|
}
|
|
1623
1640
|
]
|
|
1624
1641
|
};
|
|
1625
|
-
const
|
|
1642
|
+
const componentInfo$1 = {
|
|
1626
1643
|
name: "Embed",
|
|
1627
1644
|
static: true,
|
|
1628
1645
|
builtIn: true,
|
|
@@ -1688,9 +1705,9 @@ const findAndRunScripts = function findAndRunScripts2(props, state, elem) {
|
|
|
1688
1705
|
const Embed = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
1689
1706
|
const elem = useRef();
|
|
1690
1707
|
const state = useStore({
|
|
1708
|
+
ranInitFn: false,
|
|
1691
1709
|
scriptsInserted: [],
|
|
1692
|
-
scriptsRun: []
|
|
1693
|
-
ranInitFn: false
|
|
1710
|
+
scriptsRun: []
|
|
1694
1711
|
});
|
|
1695
1712
|
useWatchQrl(inlinedQrl(({ track: track2 }) => {
|
|
1696
1713
|
const [elem2, props2, state2] = useLexicalScope();
|
|
@@ -1711,80 +1728,117 @@ const Embed = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
1711
1728
|
});
|
|
1712
1729
|
}, "Embed_component_CP6B8Y76ylw"));
|
|
1713
1730
|
const embed = Embed;
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1731
|
+
const ImgComponent = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
1732
|
+
return /* @__PURE__ */ jsx("img", {
|
|
1733
|
+
style: {
|
|
1734
|
+
objectFit: props.backgroundSize || "cover",
|
|
1735
|
+
objectPosition: props.backgroundPosition || "center"
|
|
1736
|
+
},
|
|
1737
|
+
alt: props.altText,
|
|
1738
|
+
src: props.imgSrc || props.image,
|
|
1739
|
+
...props.attributes
|
|
1740
|
+
}, isEditing() && props.imgSrc || "default-key");
|
|
1741
|
+
}, "ImgComponent_component_b8FkE9OcVN8"));
|
|
1742
|
+
const Img = ImgComponent;
|
|
1743
|
+
const componentInfo2 = {
|
|
1744
|
+
name: "Raw:Img",
|
|
1745
|
+
hideFromInsertMenu: true,
|
|
1746
|
+
builtIn: true,
|
|
1747
|
+
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",
|
|
1748
|
+
inputs: [
|
|
1749
|
+
{
|
|
1750
|
+
name: "image",
|
|
1751
|
+
bubble: true,
|
|
1752
|
+
type: "file",
|
|
1753
|
+
allowedFileTypes: [
|
|
1754
|
+
"jpeg",
|
|
1755
|
+
"jpg",
|
|
1756
|
+
"png",
|
|
1757
|
+
"svg"
|
|
1758
|
+
],
|
|
1759
|
+
required: true
|
|
1760
|
+
}
|
|
1761
|
+
],
|
|
1762
|
+
noWrap: true,
|
|
1763
|
+
static: true
|
|
1764
|
+
};
|
|
1765
|
+
var __defProp$4 = Object.defineProperty;
|
|
1766
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
1767
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
1768
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
1769
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, {
|
|
1719
1770
|
enumerable: true,
|
|
1720
1771
|
configurable: true,
|
|
1721
1772
|
writable: true,
|
|
1722
1773
|
value
|
|
1723
1774
|
}) : obj[key] = value;
|
|
1724
|
-
var __spreadValues$
|
|
1775
|
+
var __spreadValues$4 = (a, b) => {
|
|
1725
1776
|
for (var prop in b || (b = {}))
|
|
1726
|
-
if (__hasOwnProp$
|
|
1727
|
-
__defNormalProp$
|
|
1728
|
-
if (__getOwnPropSymbols$
|
|
1729
|
-
for (var prop of __getOwnPropSymbols$
|
|
1730
|
-
if (__propIsEnum$
|
|
1731
|
-
__defNormalProp$
|
|
1777
|
+
if (__hasOwnProp$4.call(b, prop))
|
|
1778
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
1779
|
+
if (__getOwnPropSymbols$4) {
|
|
1780
|
+
for (var prop of __getOwnPropSymbols$4(b))
|
|
1781
|
+
if (__propIsEnum$4.call(b, prop))
|
|
1782
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
1732
1783
|
}
|
|
1733
1784
|
return a;
|
|
1734
1785
|
};
|
|
1735
1786
|
const getDefaultRegisteredComponents = () => [
|
|
1736
|
-
__spreadValues$
|
|
1787
|
+
__spreadValues$4({
|
|
1737
1788
|
component: Columns$1
|
|
1738
|
-
}, componentInfo$
|
|
1739
|
-
__spreadValues$
|
|
1789
|
+
}, componentInfo$8),
|
|
1790
|
+
__spreadValues$4({
|
|
1740
1791
|
component: Image$1
|
|
1741
|
-
}, componentInfo$
|
|
1742
|
-
__spreadValues$
|
|
1792
|
+
}, componentInfo$6),
|
|
1793
|
+
__spreadValues$4({
|
|
1794
|
+
component: Img
|
|
1795
|
+
}, componentInfo2),
|
|
1796
|
+
__spreadValues$4({
|
|
1743
1797
|
component: Text$1
|
|
1744
|
-
}, componentInfo$
|
|
1745
|
-
__spreadValues$
|
|
1798
|
+
}, componentInfo$3),
|
|
1799
|
+
__spreadValues$4({
|
|
1746
1800
|
component: Video$1
|
|
1747
|
-
}, componentInfo$
|
|
1748
|
-
__spreadValues$
|
|
1801
|
+
}, componentInfo$2),
|
|
1802
|
+
__spreadValues$4({
|
|
1749
1803
|
component: Symbol$2
|
|
1750
|
-
}, componentInfo$
|
|
1751
|
-
__spreadValues$
|
|
1804
|
+
}, componentInfo$4),
|
|
1805
|
+
__spreadValues$4({
|
|
1752
1806
|
component: Button$1
|
|
1753
|
-
}, componentInfo$
|
|
1754
|
-
__spreadValues$
|
|
1807
|
+
}, componentInfo$9),
|
|
1808
|
+
__spreadValues$4({
|
|
1755
1809
|
component: Section
|
|
1756
|
-
}, componentInfo$
|
|
1757
|
-
__spreadValues$
|
|
1810
|
+
}, componentInfo$5),
|
|
1811
|
+
__spreadValues$4({
|
|
1758
1812
|
component: Fragment
|
|
1759
|
-
}, componentInfo$
|
|
1760
|
-
__spreadValues$
|
|
1813
|
+
}, componentInfo$7),
|
|
1814
|
+
__spreadValues$4({
|
|
1761
1815
|
component: embed
|
|
1762
|
-
},
|
|
1816
|
+
}, componentInfo$1)
|
|
1763
1817
|
];
|
|
1764
|
-
var __defProp$
|
|
1765
|
-
var __defProps$
|
|
1766
|
-
var __getOwnPropDescs$
|
|
1767
|
-
var __getOwnPropSymbols$
|
|
1768
|
-
var __hasOwnProp$
|
|
1769
|
-
var __propIsEnum$
|
|
1770
|
-
var __defNormalProp$
|
|
1818
|
+
var __defProp$3 = Object.defineProperty;
|
|
1819
|
+
var __defProps$3 = Object.defineProperties;
|
|
1820
|
+
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
1821
|
+
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
1822
|
+
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
1823
|
+
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
1824
|
+
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, {
|
|
1771
1825
|
enumerable: true,
|
|
1772
1826
|
configurable: true,
|
|
1773
1827
|
writable: true,
|
|
1774
1828
|
value
|
|
1775
1829
|
}) : obj[key] = value;
|
|
1776
|
-
var __spreadValues$
|
|
1830
|
+
var __spreadValues$3 = (a, b) => {
|
|
1777
1831
|
for (var prop in b || (b = {}))
|
|
1778
|
-
if (__hasOwnProp$
|
|
1779
|
-
__defNormalProp$
|
|
1780
|
-
if (__getOwnPropSymbols$
|
|
1781
|
-
for (var prop of __getOwnPropSymbols$
|
|
1782
|
-
if (__propIsEnum$
|
|
1783
|
-
__defNormalProp$
|
|
1832
|
+
if (__hasOwnProp$3.call(b, prop))
|
|
1833
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
1834
|
+
if (__getOwnPropSymbols$3) {
|
|
1835
|
+
for (var prop of __getOwnPropSymbols$3(b))
|
|
1836
|
+
if (__propIsEnum$3.call(b, prop))
|
|
1837
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
1784
1838
|
}
|
|
1785
1839
|
return a;
|
|
1786
1840
|
};
|
|
1787
|
-
var __spreadProps$
|
|
1841
|
+
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
1788
1842
|
function flatten(object, path = null, separator = ".") {
|
|
1789
1843
|
return Object.keys(object).reduce((acc, key) => {
|
|
1790
1844
|
const value = object[key];
|
|
@@ -1797,7 +1851,7 @@ function flatten(object, path = null, separator = ".") {
|
|
|
1797
1851
|
value !== null,
|
|
1798
1852
|
!(Array.isArray(value) && value.length === 0)
|
|
1799
1853
|
].every(Boolean);
|
|
1800
|
-
return isObject ? __spreadValues$
|
|
1854
|
+
return isObject ? __spreadValues$3(__spreadValues$3({}, acc), flatten(value, newPath, separator)) : __spreadProps$3(__spreadValues$3({}, acc), {
|
|
1801
1855
|
[newPath]: value
|
|
1802
1856
|
});
|
|
1803
1857
|
}, {});
|
|
@@ -1902,30 +1956,30 @@ const handleABTesting = (item, testGroups) => {
|
|
|
1902
1956
|
}
|
|
1903
1957
|
}
|
|
1904
1958
|
};
|
|
1905
|
-
var __defProp$
|
|
1906
|
-
var __defProps$
|
|
1907
|
-
var __getOwnPropDescs$
|
|
1908
|
-
var __getOwnPropSymbols$
|
|
1909
|
-
var __hasOwnProp$
|
|
1910
|
-
var __propIsEnum$
|
|
1911
|
-
var __defNormalProp$
|
|
1959
|
+
var __defProp$2 = Object.defineProperty;
|
|
1960
|
+
var __defProps$2 = Object.defineProperties;
|
|
1961
|
+
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
1962
|
+
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
|
|
1963
|
+
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
|
|
1964
|
+
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
|
|
1965
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, {
|
|
1912
1966
|
enumerable: true,
|
|
1913
1967
|
configurable: true,
|
|
1914
1968
|
writable: true,
|
|
1915
1969
|
value
|
|
1916
1970
|
}) : obj[key] = value;
|
|
1917
|
-
var __spreadValues$
|
|
1971
|
+
var __spreadValues$2 = (a, b) => {
|
|
1918
1972
|
for (var prop in b || (b = {}))
|
|
1919
|
-
if (__hasOwnProp$
|
|
1920
|
-
__defNormalProp$
|
|
1921
|
-
if (__getOwnPropSymbols$
|
|
1922
|
-
for (var prop of __getOwnPropSymbols$
|
|
1923
|
-
if (__propIsEnum$
|
|
1924
|
-
__defNormalProp$
|
|
1973
|
+
if (__hasOwnProp$2.call(b, prop))
|
|
1974
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
1975
|
+
if (__getOwnPropSymbols$2) {
|
|
1976
|
+
for (var prop of __getOwnPropSymbols$2(b))
|
|
1977
|
+
if (__propIsEnum$2.call(b, prop))
|
|
1978
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
1925
1979
|
}
|
|
1926
1980
|
return a;
|
|
1927
1981
|
};
|
|
1928
|
-
var __spreadProps$
|
|
1982
|
+
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
1929
1983
|
var __async = (__this, __arguments, generator) => {
|
|
1930
1984
|
return new Promise((resolve, reject) => {
|
|
1931
1985
|
var fulfilled = (value) => {
|
|
@@ -1949,7 +2003,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
1949
2003
|
const fetch$ = getFetch();
|
|
1950
2004
|
function getContent(options) {
|
|
1951
2005
|
return __async(this, null, function* () {
|
|
1952
|
-
return (yield getAllContent(__spreadProps$
|
|
2006
|
+
return (yield getAllContent(__spreadProps$2(__spreadValues$2({}, options), {
|
|
1953
2007
|
limit: 1
|
|
1954
2008
|
}))).results[0] || null;
|
|
1955
2009
|
});
|
|
@@ -1957,7 +2011,7 @@ function getContent(options) {
|
|
|
1957
2011
|
const generateContentUrl = (options) => {
|
|
1958
2012
|
const { limit = 1, userAttributes, query, noTraverse = false, model, apiKey } = options;
|
|
1959
2013
|
const url = new URL(`https://cdn.builder.io/api/v2/content/${model}?apiKey=${apiKey}&limit=${limit}&noTraverse=${noTraverse}`);
|
|
1960
|
-
const queryOptions = __spreadValues$
|
|
2014
|
+
const queryOptions = __spreadValues$2(__spreadValues$2({}, getBuilderSearchParamsFromWindow()), normalizeSearchParams(options.options || {}));
|
|
1961
2015
|
const flattened = flatten(queryOptions);
|
|
1962
2016
|
for (const key in flattened)
|
|
1963
2017
|
url.searchParams.set(key, String(flattened[key]));
|
|
@@ -1990,52 +2044,52 @@ function isPreviewing() {
|
|
|
1990
2044
|
return false;
|
|
1991
2045
|
return Boolean(location.search.indexOf("builder.preview=") !== -1);
|
|
1992
2046
|
}
|
|
1993
|
-
var __defProp = Object.defineProperty;
|
|
1994
|
-
var __defProps = Object.defineProperties;
|
|
1995
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
1996
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
1997
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
1998
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
1999
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
2047
|
+
var __defProp$1 = Object.defineProperty;
|
|
2048
|
+
var __defProps$1 = Object.defineProperties;
|
|
2049
|
+
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
2050
|
+
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
2051
|
+
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
2052
|
+
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
2053
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, {
|
|
2000
2054
|
enumerable: true,
|
|
2001
2055
|
configurable: true,
|
|
2002
2056
|
writable: true,
|
|
2003
2057
|
value
|
|
2004
2058
|
}) : obj[key] = value;
|
|
2005
|
-
var __spreadValues = (a, b) => {
|
|
2059
|
+
var __spreadValues$1 = (a, b) => {
|
|
2006
2060
|
for (var prop in b || (b = {}))
|
|
2007
|
-
if (__hasOwnProp.call(b, prop))
|
|
2008
|
-
__defNormalProp(a, prop, b[prop]);
|
|
2009
|
-
if (__getOwnPropSymbols) {
|
|
2010
|
-
for (var prop of __getOwnPropSymbols(b))
|
|
2011
|
-
if (__propIsEnum.call(b, prop))
|
|
2012
|
-
__defNormalProp(a, prop, b[prop]);
|
|
2061
|
+
if (__hasOwnProp$1.call(b, prop))
|
|
2062
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
2063
|
+
if (__getOwnPropSymbols$1) {
|
|
2064
|
+
for (var prop of __getOwnPropSymbols$1(b))
|
|
2065
|
+
if (__propIsEnum$1.call(b, prop))
|
|
2066
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
2013
2067
|
}
|
|
2014
2068
|
return a;
|
|
2015
2069
|
};
|
|
2016
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
2017
|
-
var __objRest = (source, exclude) => {
|
|
2070
|
+
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
2071
|
+
var __objRest$1 = (source, exclude) => {
|
|
2018
2072
|
var target = {};
|
|
2019
2073
|
for (var prop in source)
|
|
2020
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2074
|
+
if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2021
2075
|
target[prop] = source[prop];
|
|
2022
|
-
if (source != null && __getOwnPropSymbols) {
|
|
2023
|
-
for (var prop of __getOwnPropSymbols(source))
|
|
2024
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
2076
|
+
if (source != null && __getOwnPropSymbols$1) {
|
|
2077
|
+
for (var prop of __getOwnPropSymbols$1(source))
|
|
2078
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
|
|
2025
2079
|
target[prop] = source[prop];
|
|
2026
2080
|
}
|
|
2027
2081
|
return target;
|
|
2028
2082
|
};
|
|
2029
2083
|
const components = [];
|
|
2030
2084
|
function registerComponent(component3, info) {
|
|
2031
|
-
components.push(__spreadValues({
|
|
2085
|
+
components.push(__spreadValues$1({
|
|
2032
2086
|
component: component3
|
|
2033
2087
|
}, info));
|
|
2034
2088
|
console.warn("registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK.");
|
|
2035
2089
|
return component3;
|
|
2036
2090
|
}
|
|
2037
2091
|
const createRegisterComponentMessage = (_a) => {
|
|
2038
|
-
var info = __objRest(_a, [
|
|
2092
|
+
var info = __objRest$1(_a, [
|
|
2039
2093
|
"component"
|
|
2040
2094
|
]);
|
|
2041
2095
|
return {
|
|
@@ -2051,16 +2105,239 @@ const serializeFn = (fnValue) => {
|
|
|
2051
2105
|
return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
|
|
2052
2106
|
};
|
|
2053
2107
|
const prepareComponentInfoToSend = (_c) => {
|
|
2054
|
-
var { inputs } = _c, info = __objRest(_c, [
|
|
2108
|
+
var { inputs } = _c, info = __objRest$1(_c, [
|
|
2055
2109
|
"inputs"
|
|
2056
2110
|
]);
|
|
2057
|
-
return __spreadProps(__spreadValues({}, fastClone(info)), {
|
|
2058
|
-
inputs: inputs == null ? void 0 : inputs.map((input) => Object.entries(input).reduce((acc, [key, value]) => __spreadProps(__spreadValues({}, acc), {
|
|
2111
|
+
return __spreadProps$1(__spreadValues$1({}, fastClone(info)), {
|
|
2112
|
+
inputs: inputs == null ? void 0 : inputs.map((input) => Object.entries(input).reduce((acc, [key, value]) => __spreadProps$1(__spreadValues$1({}, acc), {
|
|
2059
2113
|
[key]: serializeValue(value)
|
|
2060
2114
|
}), {}))
|
|
2061
2115
|
});
|
|
2062
2116
|
};
|
|
2063
|
-
|
|
2117
|
+
const getTopLevelDomain = (host) => {
|
|
2118
|
+
const parts = host.split(".");
|
|
2119
|
+
if (parts.length > 2)
|
|
2120
|
+
return parts.slice(1).join(".");
|
|
2121
|
+
return host;
|
|
2122
|
+
};
|
|
2123
|
+
const getCookie = ({ name, canTrack }) => {
|
|
2124
|
+
var _a;
|
|
2125
|
+
try {
|
|
2126
|
+
if (!canTrack)
|
|
2127
|
+
return void 0;
|
|
2128
|
+
return (_a = document.cookie.split("; ").find((row) => row.startsWith(`${name}=`))) == null ? void 0 : _a.split("=")[1];
|
|
2129
|
+
} catch (err) {
|
|
2130
|
+
console.debug("[COOKIE] GET error: ", err);
|
|
2131
|
+
}
|
|
2132
|
+
};
|
|
2133
|
+
const stringifyCookie = (cookie) => cookie.map(([key, value]) => value ? `${key}=${value}` : key).join("; ");
|
|
2134
|
+
const SECURE_CONFIG = [
|
|
2135
|
+
[
|
|
2136
|
+
"secure",
|
|
2137
|
+
""
|
|
2138
|
+
],
|
|
2139
|
+
[
|
|
2140
|
+
"SameSite",
|
|
2141
|
+
"None"
|
|
2142
|
+
]
|
|
2143
|
+
];
|
|
2144
|
+
const createCookieString = ({ name, value, expires }) => {
|
|
2145
|
+
const secure = isBrowser() ? location.protocol === "https:" : true;
|
|
2146
|
+
const secureObj = secure ? SECURE_CONFIG : [
|
|
2147
|
+
[]
|
|
2148
|
+
];
|
|
2149
|
+
const expiresObj = expires ? [
|
|
2150
|
+
[
|
|
2151
|
+
"expires",
|
|
2152
|
+
expires.toUTCString()
|
|
2153
|
+
]
|
|
2154
|
+
] : [
|
|
2155
|
+
[]
|
|
2156
|
+
];
|
|
2157
|
+
const cookieValue = [
|
|
2158
|
+
[
|
|
2159
|
+
name,
|
|
2160
|
+
value
|
|
2161
|
+
],
|
|
2162
|
+
...expiresObj,
|
|
2163
|
+
[
|
|
2164
|
+
"path",
|
|
2165
|
+
"/"
|
|
2166
|
+
],
|
|
2167
|
+
[
|
|
2168
|
+
"domain",
|
|
2169
|
+
getTopLevelDomain(window.location.hostname)
|
|
2170
|
+
],
|
|
2171
|
+
...secureObj
|
|
2172
|
+
];
|
|
2173
|
+
const cookie = stringifyCookie(cookieValue);
|
|
2174
|
+
return cookie;
|
|
2175
|
+
};
|
|
2176
|
+
const setCookie = ({ name, value, expires, canTrack }) => {
|
|
2177
|
+
try {
|
|
2178
|
+
if (!canTrack)
|
|
2179
|
+
return void 0;
|
|
2180
|
+
const cookie = createCookieString({
|
|
2181
|
+
name,
|
|
2182
|
+
value,
|
|
2183
|
+
expires
|
|
2184
|
+
});
|
|
2185
|
+
document.cookie = cookie;
|
|
2186
|
+
} catch (err) {
|
|
2187
|
+
console.warn("[COOKIE] SET error: ", err);
|
|
2188
|
+
}
|
|
2189
|
+
};
|
|
2190
|
+
const checkIsDefined = (maybeT) => maybeT !== null && maybeT !== void 0;
|
|
2191
|
+
function uuidv4() {
|
|
2192
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
|
|
2193
|
+
const r = Math.random() * 16 | 0, v = c == "x" ? r : r & 3 | 8;
|
|
2194
|
+
return v.toString(16);
|
|
2195
|
+
});
|
|
2196
|
+
}
|
|
2197
|
+
function uuid() {
|
|
2198
|
+
return uuidv4().replace(/-/g, "");
|
|
2199
|
+
}
|
|
2200
|
+
const SESSION_LOCAL_STORAGE_KEY = "builderSessionId";
|
|
2201
|
+
const getSessionId = ({ canTrack }) => {
|
|
2202
|
+
if (!canTrack)
|
|
2203
|
+
return void 0;
|
|
2204
|
+
const sessionId = getCookie({
|
|
2205
|
+
name: SESSION_LOCAL_STORAGE_KEY,
|
|
2206
|
+
canTrack
|
|
2207
|
+
});
|
|
2208
|
+
if (checkIsDefined(sessionId))
|
|
2209
|
+
return sessionId;
|
|
2210
|
+
else {
|
|
2211
|
+
const newSessionId = createSessionId();
|
|
2212
|
+
setSessionId({
|
|
2213
|
+
id: newSessionId,
|
|
2214
|
+
canTrack
|
|
2215
|
+
});
|
|
2216
|
+
}
|
|
2217
|
+
};
|
|
2218
|
+
const createSessionId = () => uuid();
|
|
2219
|
+
const setSessionId = ({ id, canTrack }) => setCookie({
|
|
2220
|
+
name: SESSION_LOCAL_STORAGE_KEY,
|
|
2221
|
+
value: id,
|
|
2222
|
+
canTrack
|
|
2223
|
+
});
|
|
2224
|
+
const getLocalStorage = () => isBrowser() && typeof localStorage !== "undefined" ? localStorage : void 0;
|
|
2225
|
+
const getLocalStorageItem = ({ key, canTrack }) => {
|
|
2226
|
+
var _a;
|
|
2227
|
+
try {
|
|
2228
|
+
if (canTrack)
|
|
2229
|
+
return (_a = getLocalStorage()) == null ? void 0 : _a.getItem(key);
|
|
2230
|
+
return void 0;
|
|
2231
|
+
} catch (err) {
|
|
2232
|
+
console.debug("[LocalStorage] GET error: ", err);
|
|
2233
|
+
}
|
|
2234
|
+
};
|
|
2235
|
+
const setLocalStorageItem = ({ key, canTrack, value }) => {
|
|
2236
|
+
var _a;
|
|
2237
|
+
try {
|
|
2238
|
+
if (canTrack)
|
|
2239
|
+
(_a = getLocalStorage()) == null || _a.setItem(key, value);
|
|
2240
|
+
} catch (err) {
|
|
2241
|
+
console.debug("[LocalStorage] SET error: ", err);
|
|
2242
|
+
}
|
|
2243
|
+
};
|
|
2244
|
+
const VISITOR_LOCAL_STORAGE_KEY = "builderVisitorId";
|
|
2245
|
+
const getVisitorId = ({ canTrack }) => {
|
|
2246
|
+
if (!canTrack)
|
|
2247
|
+
return void 0;
|
|
2248
|
+
const visitorId = getLocalStorageItem({
|
|
2249
|
+
key: VISITOR_LOCAL_STORAGE_KEY,
|
|
2250
|
+
canTrack
|
|
2251
|
+
});
|
|
2252
|
+
if (checkIsDefined(visitorId))
|
|
2253
|
+
return visitorId;
|
|
2254
|
+
else {
|
|
2255
|
+
const newVisitorId = createVisitorId();
|
|
2256
|
+
setVisitorId({
|
|
2257
|
+
id: newVisitorId,
|
|
2258
|
+
canTrack
|
|
2259
|
+
});
|
|
2260
|
+
}
|
|
2261
|
+
};
|
|
2262
|
+
const createVisitorId = () => uuid();
|
|
2263
|
+
const setVisitorId = ({ id, canTrack }) => setLocalStorageItem({
|
|
2264
|
+
key: VISITOR_LOCAL_STORAGE_KEY,
|
|
2265
|
+
value: id,
|
|
2266
|
+
canTrack
|
|
2267
|
+
});
|
|
2268
|
+
var __defProp = Object.defineProperty;
|
|
2269
|
+
var __defProps = Object.defineProperties;
|
|
2270
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2271
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
2272
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
2273
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
2274
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
2275
|
+
enumerable: true,
|
|
2276
|
+
configurable: true,
|
|
2277
|
+
writable: true,
|
|
2278
|
+
value
|
|
2279
|
+
}) : obj[key] = value;
|
|
2280
|
+
var __spreadValues = (a, b) => {
|
|
2281
|
+
for (var prop in b || (b = {}))
|
|
2282
|
+
if (__hasOwnProp.call(b, prop))
|
|
2283
|
+
__defNormalProp(a, prop, b[prop]);
|
|
2284
|
+
if (__getOwnPropSymbols) {
|
|
2285
|
+
for (var prop of __getOwnPropSymbols(b))
|
|
2286
|
+
if (__propIsEnum.call(b, prop))
|
|
2287
|
+
__defNormalProp(a, prop, b[prop]);
|
|
2288
|
+
}
|
|
2289
|
+
return a;
|
|
2290
|
+
};
|
|
2291
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
2292
|
+
var __objRest = (source, exclude) => {
|
|
2293
|
+
var target = {};
|
|
2294
|
+
for (var prop in source)
|
|
2295
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2296
|
+
target[prop] = source[prop];
|
|
2297
|
+
if (source != null && __getOwnPropSymbols) {
|
|
2298
|
+
for (var prop of __getOwnPropSymbols(source))
|
|
2299
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
2300
|
+
target[prop] = source[prop];
|
|
2301
|
+
}
|
|
2302
|
+
return target;
|
|
2303
|
+
};
|
|
2304
|
+
const getTrackingEventData = ({ canTrack }) => {
|
|
2305
|
+
if (!canTrack)
|
|
2306
|
+
return {
|
|
2307
|
+
visitorId: void 0,
|
|
2308
|
+
sessionId: void 0
|
|
2309
|
+
};
|
|
2310
|
+
const sessionId = getSessionId({
|
|
2311
|
+
canTrack
|
|
2312
|
+
});
|
|
2313
|
+
const visitorId = getVisitorId({
|
|
2314
|
+
canTrack
|
|
2315
|
+
});
|
|
2316
|
+
return {
|
|
2317
|
+
sessionId,
|
|
2318
|
+
visitorId
|
|
2319
|
+
};
|
|
2320
|
+
};
|
|
2321
|
+
const createEvent = (_a) => {
|
|
2322
|
+
var { type: eventType, canTrack, orgId, contentId } = _a, properties = __objRest(_a, [
|
|
2323
|
+
"type",
|
|
2324
|
+
"canTrack",
|
|
2325
|
+
"orgId",
|
|
2326
|
+
"contentId"
|
|
2327
|
+
]);
|
|
2328
|
+
return {
|
|
2329
|
+
type: eventType,
|
|
2330
|
+
data: __spreadProps(__spreadValues(__spreadValues({}, properties), getTrackingEventData({
|
|
2331
|
+
canTrack
|
|
2332
|
+
})), {
|
|
2333
|
+
ownerId: orgId,
|
|
2334
|
+
contentId
|
|
2335
|
+
})
|
|
2336
|
+
};
|
|
2337
|
+
};
|
|
2338
|
+
function track(eventProps) {
|
|
2339
|
+
if (!eventProps.canTrack)
|
|
2340
|
+
return;
|
|
2064
2341
|
if (isEditing())
|
|
2065
2342
|
return;
|
|
2066
2343
|
if (!(isBrowser() || TARGET === "reactNative"))
|
|
@@ -2069,10 +2346,7 @@ function track(event, properties) {
|
|
|
2069
2346
|
method: "POST",
|
|
2070
2347
|
body: JSON.stringify({
|
|
2071
2348
|
events: [
|
|
2072
|
-
|
|
2073
|
-
type: event,
|
|
2074
|
-
data: properties
|
|
2075
|
-
}
|
|
2349
|
+
createEvent(eventProps)
|
|
2076
2350
|
]
|
|
2077
2351
|
}),
|
|
2078
2352
|
headers: {
|
|
@@ -2142,6 +2416,9 @@ const useContent = function useContent2(props, state, elementRef) {
|
|
|
2142
2416
|
};
|
|
2143
2417
|
return mergedContent;
|
|
2144
2418
|
};
|
|
2419
|
+
const canTrackToUse = function canTrackToUse2(props, state, elementRef) {
|
|
2420
|
+
return props.canTrack || true;
|
|
2421
|
+
};
|
|
2145
2422
|
const contentState = function contentState2(props, state, elementRef) {
|
|
2146
2423
|
return {
|
|
2147
2424
|
...props.content?.data?.state,
|
|
@@ -2191,9 +2468,12 @@ const httpReqsData = function httpReqsData2(props, state, elementRef) {
|
|
|
2191
2468
|
return {};
|
|
2192
2469
|
};
|
|
2193
2470
|
const onClick2 = function onClick3(props, state, elementRef, _event) {
|
|
2194
|
-
if (useContent(props, state)
|
|
2195
|
-
track(
|
|
2196
|
-
|
|
2471
|
+
if (useContent(props, state))
|
|
2472
|
+
track({
|
|
2473
|
+
type: "click",
|
|
2474
|
+
canTrack: canTrackToUse(props),
|
|
2475
|
+
contentId: useContent(props, state).id,
|
|
2476
|
+
orgId: props.apiKey
|
|
2197
2477
|
});
|
|
2198
2478
|
};
|
|
2199
2479
|
const evalExpression = function evalExpression2(props, state, elementRef, expression) {
|
|
@@ -2247,8 +2527,8 @@ const RenderContent = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
2247
2527
|
const state = useStore({
|
|
2248
2528
|
forceReRenderCount: 0,
|
|
2249
2529
|
overrideContent: null,
|
|
2250
|
-
|
|
2251
|
-
|
|
2530
|
+
overrideState: {},
|
|
2531
|
+
update: 0
|
|
2252
2532
|
});
|
|
2253
2533
|
useContextProvider(stdin_default, useStore({
|
|
2254
2534
|
content: (() => {
|
|
@@ -2271,7 +2551,7 @@ const RenderContent = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
2271
2551
|
const [elementRef2, props2, state2] = useLexicalScope();
|
|
2272
2552
|
if (isBrowser()) {
|
|
2273
2553
|
if (isEditing()) {
|
|
2274
|
-
state2.forceReRenderCount
|
|
2554
|
+
state2.forceReRenderCount = state2.forceReRenderCount + 1;
|
|
2275
2555
|
_useMutableProps(elementRef2.current, true);
|
|
2276
2556
|
registerInsertMenu();
|
|
2277
2557
|
setupBrowserForEditing();
|
|
@@ -2282,9 +2562,12 @@ const RenderContent = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
2282
2562
|
window.addEventListener("message", processMessage.bind(null, props2, state2, elementRef2));
|
|
2283
2563
|
window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate.bind(null, props2, state2, elementRef2));
|
|
2284
2564
|
}
|
|
2285
|
-
if (useContent(props2, state2)
|
|
2286
|
-
track(
|
|
2287
|
-
|
|
2565
|
+
if (useContent(props2, state2))
|
|
2566
|
+
track({
|
|
2567
|
+
type: "impression",
|
|
2568
|
+
canTrack: canTrackToUse(props2),
|
|
2569
|
+
contentId: useContent(props2, state2).id,
|
|
2570
|
+
orgId: props2.apiKey
|
|
2288
2571
|
});
|
|
2289
2572
|
if (isPreviewing()) {
|
|
2290
2573
|
const searchParams = new URL(location.href).searchParams;
|
|
@@ -2365,7 +2648,7 @@ const RenderContent = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
2365
2648
|
customFonts: useContent(props, state)?.data?.customFonts
|
|
2366
2649
|
}) : null,
|
|
2367
2650
|
/* @__PURE__ */ jsx(RenderBlocks$1, {
|
|
2368
|
-
blocks: useContent(props, state)?.data?.blocks
|
|
2651
|
+
blocks: markMutable(useContent(props, state)?.data?.blocks)
|
|
2369
2652
|
}, state.forceReRenderCount)
|
|
2370
2653
|
]
|
|
2371
2654
|
}) : null
|
|
@@ -2387,9 +2670,7 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
2387
2670
|
]));
|
|
2388
2671
|
useWatchQrl(inlinedQrl(({ track: track2 }) => {
|
|
2389
2672
|
const [builderContext2, props2, state2] = useLexicalScope();
|
|
2390
|
-
props2
|
|
2391
|
-
props2.symbol && track2(props2.symbol, "model");
|
|
2392
|
-
props2.symbol && track2(props2.symbol, "entry");
|
|
2673
|
+
props2 && track2(props2, "symbol");
|
|
2393
2674
|
state2 && track2(state2, "content");
|
|
2394
2675
|
const symbolToUse = props2.symbol;
|
|
2395
2676
|
if (symbolToUse && !symbolToUse.content && !state2.content && symbolToUse.model)
|
|
@@ -2416,14 +2697,14 @@ const Symbol$1 = /* @__PURE__ */ componentQrl(inlinedQrl((props) => {
|
|
|
2416
2697
|
children: /* @__PURE__ */ jsx(RenderContent$1, {
|
|
2417
2698
|
apiKey: builderContext.apiKey,
|
|
2418
2699
|
context: builderContext.context,
|
|
2419
|
-
customComponents: Object.values(builderContext.registeredComponents),
|
|
2420
|
-
data: {
|
|
2700
|
+
customComponents: markMutable(Object.values(builderContext.registeredComponents)),
|
|
2701
|
+
data: markMutable({
|
|
2421
2702
|
...props.symbol?.data,
|
|
2422
2703
|
...builderContext.state,
|
|
2423
2704
|
...props.symbol?.content?.data?.state
|
|
2424
|
-
},
|
|
2705
|
+
}),
|
|
2425
2706
|
model: props.symbol?.model,
|
|
2426
|
-
content: state.content
|
|
2707
|
+
content: markMutable(state.content)
|
|
2427
2708
|
})
|
|
2428
2709
|
});
|
|
2429
2710
|
}, "Symbol_component_Dn8mGpai87I"));
|