@flamingo-stack/openframe-frontend-core 0.0.854 → 0.0.855
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/dist/build/export-map.json +1 -1
- package/dist/{case-study-card-WP5Z234Q.cjs → case-study-card-6VAMNHLU.cjs} +8 -8
- package/dist/{chunk-FBANHIAG.cjs → chunk-2JCA7BRK.cjs} +19 -19
- package/dist/{chunk-7MOBD44H.cjs → chunk-2MCPK6AX.cjs} +28 -28
- package/dist/{chunk-GVHCQRUE.cjs → chunk-2P72KAG5.cjs} +23 -23
- package/dist/{chunk-YY3WP2YQ.cjs → chunk-3GJ75OUL.cjs} +183 -183
- package/dist/{chunk-FJXSKMQJ.cjs → chunk-4H3J57AN.cjs} +25 -25
- package/dist/{chunk-6GWRPW6B.cjs → chunk-5NK3FUHY.cjs} +4 -4
- package/dist/{chunk-DLTPSP5F.cjs → chunk-5TYG5JNB.cjs} +2 -2
- package/dist/{chunk-63ZV3UGG.cjs → chunk-65NMKAPQ.cjs} +12 -12
- package/dist/{chunk-IGVAPIEW.cjs → chunk-6C4OR4MZ.cjs} +2 -2
- package/dist/{chunk-GG466XFQ.cjs → chunk-6DMH4GXN.cjs} +30 -5
- package/dist/{chunk-S5P6CF5R.cjs → chunk-6VVQJU76.cjs} +54 -54
- package/dist/{chunk-2IJMHBOK.cjs → chunk-77GX573I.cjs} +9 -9
- package/dist/{chunk-D2XGRWPW.cjs → chunk-AOOHJLXS.cjs} +90 -90
- package/dist/{chunk-O3EKOXFZ.cjs → chunk-AYMY2VNB.cjs} +37 -43
- package/dist/{chunk-RMI6O3AE.cjs → chunk-BSPIGZCC.cjs} +36 -36
- package/dist/{chunk-JKBNK5U6.cjs → chunk-D6GEMVHD.cjs} +3 -3
- package/dist/{chunk-7J5NSWJG.cjs → chunk-DPNFI5XM.cjs} +100 -100
- package/dist/{chunk-TMPLHUUU.cjs → chunk-DTZ6KASI.cjs} +6 -6
- package/dist/{chunk-SSKMGH5O.cjs → chunk-DXVGGWLG.cjs} +10 -10
- package/dist/{chunk-5TXE7BXT.cjs → chunk-EOUEUYCQ.cjs} +54 -54
- package/dist/{chunk-EIHMPQRQ.cjs → chunk-ESGE7CUX.cjs} +14 -14
- package/dist/{chunk-ETZFBB7O.cjs → chunk-EXQSIX2I.cjs} +4 -4
- package/dist/{chunk-3WXHPD6N.cjs → chunk-F33EAPD2.cjs} +124 -124
- package/dist/{chunk-4SSJ3T3N.cjs → chunk-GK577ZLJ.cjs} +3 -13
- package/dist/{chunk-BAA3YCLT.cjs → chunk-GZYRDLJW.cjs} +103 -103
- package/dist/{chunk-VMAOZA2V.cjs → chunk-HML3JUXF.cjs} +324 -322
- package/dist/{chunk-4O5N5CGK.cjs → chunk-J3CFRGZ2.cjs} +17 -17
- package/dist/{chunk-LQDAB5V5.cjs → chunk-KZAQPRTA.cjs} +9 -11
- package/dist/{chunk-6DCUGIGU.cjs → chunk-LSLRJJFP.cjs} +2 -2
- package/dist/{chunk-ETQNMR2K.cjs → chunk-MINFN3IG.cjs} +8 -8
- package/dist/{chunk-ONYANAMA.cjs → chunk-MX52LZ6M.cjs} +6 -6
- package/dist/{chunk-OH5TXFRR.cjs → chunk-O4CPT3RK.cjs} +7 -7
- package/dist/{chunk-ZDPPNHA2.cjs → chunk-OTHQ2KQW.cjs} +3 -3
- package/dist/{chunk-5HMENXSR.cjs → chunk-PCQ2HKU3.cjs} +5 -5
- package/dist/{chunk-6XU3RCK3.cjs → chunk-QPHXYE5P.cjs} +27 -27
- package/dist/{chunk-UPQ4MAR7.cjs → chunk-QZXCUY36.cjs} +53 -53
- package/dist/{chunk-5OENPMRU.cjs → chunk-RIJU4HZ2.cjs} +51 -55
- package/dist/{chunk-KKFDRCQF.cjs → chunk-RY7INTYU.cjs} +14 -1
- package/dist/{chunk-GI3MMBP3.cjs → chunk-SQ7YHWEP.cjs} +228 -15
- package/dist/{chunk-ACPOJE32.cjs → chunk-STV6VJ3U.cjs} +21 -21
- package/dist/{chunk-QD727QFI.cjs → chunk-T54I5ZZY.cjs} +7 -7
- package/dist/{chunk-4LTLEUY5.cjs → chunk-TW5Y4D5I.cjs} +7 -7
- package/dist/{chunk-FX35L4Y6.cjs → chunk-XCQ5I27Z.cjs} +3 -3
- package/dist/{chunk-AZEO7HBB.cjs → chunk-Y44EF4JW.cjs} +2 -2
- package/dist/{chunk-KA3L6D5N.cjs → chunk-YSXVRTGT.cjs} +9 -12
- package/dist/{chunk-PRJZMZ3X.cjs → chunk-ZUGJLCYP.cjs} +678 -678
- package/dist/{chunk-H3GBPYPS.cjs → chunk-ZYAVIRQV.cjs} +25 -25
- package/dist/{cloud-tenants-5RNK4ZAT.cjs → cloud-tenants-2XFIDDGU.cjs} +28 -29
- package/dist/components/case-studies/index.cjs +44 -45
- package/dist/components/chat/chat-message-row.d.ts +1 -1
- package/dist/components/chat/chat-message-row.d.ts.map +1 -1
- package/dist/components/chat/chat-message-row.js +4 -4
- package/dist/components/chat/entity-cards/use-cover-image-fallback.d.ts +7 -13
- package/dist/components/chat/entity-cards/use-cover-image-fallback.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/use-cover-image-fallback.js +2 -8
- package/dist/components/chat/hooks/use-chat-attachment-image-gallery.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-chat-attachment-image-gallery.js +8 -4
- package/dist/components/chat/index.cjs +22 -23
- package/dist/components/contact/index.cjs +29 -30
- package/dist/components/docs/index.cjs +32 -33
- package/dist/components/embeds/index.cjs +29 -30
- package/dist/components/faq/index.cjs +30 -31
- package/dist/components/features/index.cjs +28 -29
- package/dist/components/help-center-pages/index.cjs +134 -135
- package/dist/components/index.cjs +112 -113
- package/dist/components/meeting-scheduler/index.cjs +102 -103
- package/dist/components/navigation/index.cjs +31 -32
- package/dist/components/onboarding-guides/index.cjs +31 -32
- package/dist/components/product-demo/index.cjs +39 -40
- package/dist/components/related-content/index.cjs +16 -17
- package/dist/components/tickets/index.cjs +35 -36
- package/dist/components/ui/entity-image.d.ts +1 -2
- package/dist/components/ui/entity-image.d.ts.map +1 -1
- package/dist/components/ui/entity-image.js +4 -8
- package/dist/components/ui/index.cjs +28 -29
- package/dist/components/ui/markdown/base-components.d.ts +0 -13
- package/dist/components/ui/markdown/base-components.d.ts.map +1 -1
- package/dist/components/ui/markdown/base-components.js +7 -7
- package/dist/components/ui/square-avatar.d.ts.map +1 -1
- package/dist/components/ui/square-avatar.js +3 -8
- package/dist/{devices-44O5PZOW.cjs → devices-O3DYGIZB.cjs} +29 -30
- package/dist/embed-shims/index.cjs +3 -2
- package/dist/embed-shims/next-image.cjs +3 -2
- package/dist/embed-shims/next-image.d.ts +2 -0
- package/dist/embed-shims/next-image.d.ts.map +1 -1
- package/dist/embed-shims/next-image.js +14 -4
- package/dist/{embeddable-chat-W3CLMGC3.cjs → embeddable-chat-QD7NFD2H.cjs} +100 -101
- package/dist/hooks/index.cjs +23 -16
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/use-authed-asset-src.d.ts +77 -2
- package/dist/hooks/use-authed-asset-src.d.ts.map +1 -1
- package/dist/hooks/use-authed-asset-src.js +185 -73
- package/dist/hooks/use-authed-image-src.d.ts +11 -4
- package/dist/hooks/use-authed-image-src.d.ts.map +1 -1
- package/dist/hooks/use-authed-image-src.js +6 -2
- package/dist/hooks/use-image-fallback.d.ts +16 -0
- package/dist/hooks/use-image-fallback.d.ts.map +1 -0
- package/dist/hooks/use-image-fallback.js +14 -0
- package/dist/index.cjs +40 -36
- package/dist/{knowledge-UUU3WVO3.cjs → knowledge-K7AFNZNO.cjs} +29 -30
- package/dist/{logs-DFHNSODA.cjs → logs-MZ3BR2FR.cjs} +35 -36
- package/dist/{policies-RGFUGDBP.cjs → policies-XVKQ2W7S.cjs} +32 -33
- package/dist/{remote-session-U3H77HKR.cjs → remote-session-VOZJXDM4.cjs} +13 -14
- package/dist/{scripts-KOVO5DHW.cjs → scripts-IBPMBS6G.cjs} +35 -36
- package/dist/{software-update-4EKHVV5W.cjs → software-update-PXTANMAO.cjs} +32 -33
- package/dist/{tickets-board-YIFOVMDX.cjs → tickets-board-POYZS7BW.cjs} +16 -17
- package/dist/utils/app-origins.d.ts +3 -6
- package/dist/utils/app-origins.d.ts.map +1 -1
- package/dist/utils/app-origins.js +8 -1
- package/dist/utils/embed-authed-fetch.d.ts +46 -26
- package/dist/utils/embed-authed-fetch.d.ts.map +1 -1
- package/dist/utils/embed-authed-fetch.js +24 -8
- package/dist/utils/index.cjs +4 -1
- package/dist/{video-file-player-XMOB234V.cjs → video-file-player-RIOT24NT.cjs} +3 -4
- package/package.json +1 -1
- package/src/components/chat/chat-message-row.tsx +8 -7
- package/src/components/chat/entity-cards/use-cover-image-fallback.ts +8 -28
- package/src/components/chat/hooks/use-chat-attachment-image-gallery.tsx +19 -8
- package/src/components/ui/entity-image.tsx +4 -12
- package/src/components/ui/markdown/base-components.tsx +15 -20
- package/src/components/ui/square-avatar.tsx +5 -8
- package/src/embed-shims/next-image.tsx +34 -3
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-authed-asset-src.ts +323 -107
- package/src/hooks/use-authed-image-src.ts +15 -5
- package/src/hooks/use-image-fallback.ts +31 -0
- package/src/utils/app-origins.ts +12 -7
- package/src/utils/embed-authed-fetch.ts +71 -32
- package/dist/chunk-YSDB6HGQ.cjs +0 -102
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkPCQ2HKU3cjs = require('./chunk-PCQ2HKU3.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -27,7 +27,7 @@ var _chunkMZ4KBSH7cjs = require('./chunk-MZ4KBSH7.cjs');
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _chunkO4CPT3RKcjs = require('./chunk-O4CPT3RK.cjs');
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
@@ -39,10 +39,10 @@ var _chunkOH5TXFRRcjs = require('./chunk-OH5TXFRR.cjs');
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
var
|
|
42
|
+
var _chunk77GX573Icjs = require('./chunk-77GX573I.cjs');
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
var
|
|
45
|
+
var _chunk6C4OR4MZcjs = require('./chunk-6C4OR4MZ.cjs');
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
var _chunkJKX2C3I2cjs = require('./chunk-JKX2C3I2.cjs');
|
|
@@ -64,11 +64,11 @@ var _chunk7DNL734Scjs = require('./chunk-7DNL734S.cjs');
|
|
|
64
64
|
var _chunkBLH2SFOOcjs = require('./chunk-BLH2SFOO.cjs');
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
var
|
|
67
|
+
var _chunkEXQSIX2Icjs = require('./chunk-EXQSIX2I.cjs');
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
|
|
71
|
-
var
|
|
71
|
+
var _chunkXCQ5I27Zcjs = require('./chunk-XCQ5I27Z.cjs');
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
var _chunkUJ7AXHRZcjs = require('./chunk-UJ7AXHRZ.cjs');
|
|
@@ -334,7 +334,7 @@ function useOnboardingState(storageKey = "openframe-onboarding-state") {
|
|
|
334
334
|
const [, forceUpdate] = _react.useState.call(void 0, 0);
|
|
335
335
|
_react.useEffect.call(void 0, () => {
|
|
336
336
|
const handleStorageUpdate = (event) => {
|
|
337
|
-
const detail =
|
|
337
|
+
const detail = _chunkPCQ2HKU3cjs.readLocalStorageUpdateDetail.call(void 0, event);
|
|
338
338
|
if (_optionalChain([detail, 'optionalAccess', _14 => _14.key]) !== storageKey) return;
|
|
339
339
|
const newState = loadOnboardingState(storageKey);
|
|
340
340
|
setState(newState);
|
|
@@ -425,7 +425,7 @@ function useSearch(config) {
|
|
|
425
425
|
searchFnRef.current = searchFn;
|
|
426
426
|
mapResultRef.current = mapResult;
|
|
427
427
|
});
|
|
428
|
-
const debouncedQuery =
|
|
428
|
+
const debouncedQuery = _chunk77GX573Icjs.useDebounce.call(void 0, query, debounceMs);
|
|
429
429
|
const clearResults = _react.useCallback.call(void 0, () => {
|
|
430
430
|
setResults(NO_RESULTS);
|
|
431
431
|
setError(null);
|
|
@@ -815,7 +815,7 @@ function usePlatformConfig() {
|
|
|
815
815
|
label: platform.label
|
|
816
816
|
}))
|
|
817
817
|
];
|
|
818
|
-
const selectableOptions =
|
|
818
|
+
const selectableOptions = _chunkO4CPT3RKcjs.transformPlatformConfigsToOptions.call(void 0, platforms);
|
|
819
819
|
return {
|
|
820
820
|
platforms,
|
|
821
821
|
platformOptions,
|
|
@@ -995,7 +995,7 @@ function CommandApprovalToast({
|
|
|
995
995
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "overflow-hidden", children: [
|
|
996
996
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex h-11 w-full items-center gap-2 border-b border-ods-border bg-ods-card px-3 py-2", children: [
|
|
997
997
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "min-w-0 flex-1 truncate text-ods-text-primary text-h6", title: command, children: command }),
|
|
998
|
-
toolType ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
998
|
+
toolType ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6C4OR4MZcjs.ToolIcon, { toolType, size: 16 }) : null
|
|
999
999
|
] }),
|
|
1000
1000
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2 bg-ods-bg p-3", children: [
|
|
1001
1001
|
approvalDescription ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-secondary text-h6", children: approvalDescription }) : null,
|
|
@@ -1163,7 +1163,7 @@ function useContactSubmission(options = {}) {
|
|
|
1163
1163
|
if (isSubmitting) return;
|
|
1164
1164
|
setIsSubmitting(true);
|
|
1165
1165
|
try {
|
|
1166
|
-
const response = await
|
|
1166
|
+
const response = await _chunkXCQ5I27Zcjs.contentFetch.call(void 0, contactUrl, {
|
|
1167
1167
|
method: "POST",
|
|
1168
1168
|
headers: { "Content-Type": "application/json" },
|
|
1169
1169
|
body: JSON.stringify({
|
|
@@ -1173,7 +1173,7 @@ function useContactSubmission(options = {}) {
|
|
|
1173
1173
|
});
|
|
1174
1174
|
if (!response.ok) {
|
|
1175
1175
|
const failure = await response.json().catch(() => null);
|
|
1176
|
-
throw new Error(
|
|
1176
|
+
throw new Error(_chunkXCQ5I27Zcjs.apiErrorMessage.call(void 0, failure, "Failed to submit contact form"));
|
|
1177
1177
|
}
|
|
1178
1178
|
setIsSuccess(true);
|
|
1179
1179
|
const message = successToastMessage ? `Thank you! Your message has been sent. ${successToastMessage}` : "Thank you! Your message has been sent successfully.";
|
|
@@ -1201,11 +1201,11 @@ function useContactSubmission(options = {}) {
|
|
|
1201
1201
|
console.log("\u{1F680} Contact submission successful, redirecting to:", successRedirectUrl);
|
|
1202
1202
|
const timer = setTimeout(() => {
|
|
1203
1203
|
console.log("\u{1F3AF} Performing redirect now to:", successRedirectUrl);
|
|
1204
|
-
|
|
1204
|
+
_chunk77GX573Icjs.executeNavigationImperative.call(void 0, {
|
|
1205
1205
|
runtime,
|
|
1206
1206
|
href: successRedirectUrl,
|
|
1207
1207
|
openIn: "same-tab",
|
|
1208
|
-
hostRoute:
|
|
1208
|
+
hostRoute: _chunkEXQSIX2Icjs.isRelativeHref.call(void 0, successRedirectUrl)
|
|
1209
1209
|
});
|
|
1210
1210
|
}, 1500);
|
|
1211
1211
|
return () => clearTimeout(timer);
|
|
@@ -1284,7 +1284,7 @@ function load(endpoint, force = false) {
|
|
|
1284
1284
|
const entry = entryFor(endpoint);
|
|
1285
1285
|
if (entry.request || entry.state.data && !force) return;
|
|
1286
1286
|
publish(endpoint, { data: entry.state.data, isLoading: true, error: false });
|
|
1287
|
-
entry.request =
|
|
1287
|
+
entry.request = _chunkXCQ5I27Zcjs.contentFetch.call(void 0, endpoint).then(async (response) => {
|
|
1288
1288
|
if (!response.ok) throw new Error(`Request failed (${response.status})`);
|
|
1289
1289
|
publish(endpoint, { data: await response.json(), isLoading: false, error: false });
|
|
1290
1290
|
}).catch(() => publish(endpoint, { data: entry.state.data, isLoading: false, error: true })).finally(() => {
|
|
@@ -1332,10 +1332,10 @@ function useDownloads({
|
|
|
1332
1332
|
}
|
|
1333
1333
|
function useVisitorDesktopDownload(options = {}) {
|
|
1334
1334
|
const enabled = _nullishCoalesce(options.enabled, () => ( true));
|
|
1335
|
-
const visitor =
|
|
1335
|
+
const visitor = _chunk77GX573Icjs.useVisitorOs.call(void 0, );
|
|
1336
1336
|
const { data, error } = useDownloads(options);
|
|
1337
1337
|
if (!enabled || !visitor.known || !data && !error) return { known: false, download: null };
|
|
1338
|
-
const os =
|
|
1338
|
+
const os = _chunk77GX573Icjs.desktopOsOf.call(void 0, visitor.os);
|
|
1339
1339
|
const download = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _22 => _22.desktop, 'access', _23 => _23.find, 'call', _24 => _24((row) => row.kind === "binary" && row.url && row.os === os)]), () => ( null));
|
|
1340
1340
|
return { known: true, download };
|
|
1341
1341
|
}
|
|
@@ -2585,7 +2585,7 @@ function useScenarioPlayer({
|
|
|
2585
2585
|
startAtEnd = false,
|
|
2586
2586
|
emptyFirstStep = true
|
|
2587
2587
|
}) {
|
|
2588
|
-
const auto =
|
|
2588
|
+
const auto = _chunk77GX573Icjs.useAutoplay.call(void 0, enabled);
|
|
2589
2589
|
const { reducedMotion, held, holdProps, release } = auto;
|
|
2590
2590
|
const [scenario, setScenario] = _react.useState.call(void 0, initialScenario);
|
|
2591
2591
|
const [rawStep, setRawStep] = _react.useState.call(void 0, startAtEnd ? Number.MAX_SAFE_INTEGER : 0);
|
|
@@ -2637,7 +2637,7 @@ function useAccessCodeIntegration() {
|
|
|
2637
2637
|
const validate = async (email, code) => {
|
|
2638
2638
|
setIsValidating(true);
|
|
2639
2639
|
try {
|
|
2640
|
-
return await
|
|
2640
|
+
return await _chunkO4CPT3RKcjs.validateAccessCode.call(void 0, email, code, endpoints);
|
|
2641
2641
|
} finally {
|
|
2642
2642
|
setIsValidating(false);
|
|
2643
2643
|
}
|
|
@@ -2645,7 +2645,7 @@ function useAccessCodeIntegration() {
|
|
|
2645
2645
|
const consume = async (email, code) => {
|
|
2646
2646
|
setIsConsuming(true);
|
|
2647
2647
|
try {
|
|
2648
|
-
return await
|
|
2648
|
+
return await _chunkO4CPT3RKcjs.consumeAccessCode.call(void 0, email, code, endpoints);
|
|
2649
2649
|
} finally {
|
|
2650
2650
|
setIsConsuming(false);
|
|
2651
2651
|
}
|
|
@@ -2654,7 +2654,7 @@ function useAccessCodeIntegration() {
|
|
|
2654
2654
|
setIsValidating(true);
|
|
2655
2655
|
setIsConsuming(true);
|
|
2656
2656
|
try {
|
|
2657
|
-
return await
|
|
2657
|
+
return await _chunkO4CPT3RKcjs.validateAndConsumeAccessCode.call(void 0, email, code, endpoints);
|
|
2658
2658
|
} finally {
|
|
2659
2659
|
setIsValidating(false);
|
|
2660
2660
|
setIsConsuming(false);
|
|
@@ -2684,7 +2684,7 @@ async function revalidateMirror(mirrorPath) {
|
|
|
2684
2684
|
}
|
|
2685
2685
|
function useClaudeMirrorSrc(url) {
|
|
2686
2686
|
const endpoints = _chunkMZ4KBSH7cjs.useEndpointsRuntime.call(void 0, );
|
|
2687
|
-
const mirrorPath =
|
|
2687
|
+
const mirrorPath = _chunkO4CPT3RKcjs.toClaudeMirrorPath.call(void 0, url, _optionalChain([endpoints, 'optionalAccess', _32 => _32.storageViewBaseUrl]));
|
|
2688
2688
|
const [resolved, setResolved] = _react.useState.call(void 0, null);
|
|
2689
2689
|
const state = resolved && resolved.key === mirrorPath ? resolved.value : { src: null, status: mirrorPath ? "probing" : "absent" };
|
|
2690
2690
|
_react.useEffect.call(void 0, () => {
|
|
@@ -2715,7 +2715,7 @@ function useClaudeMirrorSrc(url) {
|
|
|
2715
2715
|
|
|
2716
2716
|
// src/hooks/use-location-hash.ts
|
|
2717
2717
|
|
|
2718
|
-
var HASH_EVENTS = ["hashchange", "popstate",
|
|
2718
|
+
var HASH_EVENTS = ["hashchange", "popstate", _chunk77GX573Icjs.LOCATION_HASH_SYNC_EVENT];
|
|
2719
2719
|
function subscribe(onChange) {
|
|
2720
2720
|
for (const event of HASH_EVENTS) window.addEventListener(event, onChange);
|
|
2721
2721
|
return () => {
|
|
@@ -2723,7 +2723,7 @@ function subscribe(onChange) {
|
|
|
2723
2723
|
};
|
|
2724
2724
|
}
|
|
2725
2725
|
function readHash() {
|
|
2726
|
-
const raw =
|
|
2726
|
+
const raw = _chunk77GX573Icjs.normalizeHashFragment.call(void 0, window.location.hash).replace(/^#/, "");
|
|
2727
2727
|
try {
|
|
2728
2728
|
return decodeURIComponent(raw);
|
|
2729
2729
|
} catch (e7) {
|
|
@@ -2750,16 +2750,16 @@ function useScrollToHash(readyDep = true, options) {
|
|
|
2750
2750
|
}
|
|
2751
2751
|
};
|
|
2752
2752
|
const tryScrollToHash = () => {
|
|
2753
|
-
if (
|
|
2754
|
-
const hash =
|
|
2753
|
+
if (_chunk77GX573Icjs.isScrollSyncedHash.call(void 0, )) return;
|
|
2754
|
+
const hash = _chunk77GX573Icjs.normalizeHashFragment.call(void 0, window.location.hash).slice(1);
|
|
2755
2755
|
if (!hash) return;
|
|
2756
2756
|
cancelPoll();
|
|
2757
2757
|
let frames = 0;
|
|
2758
2758
|
const tick = () => {
|
|
2759
|
-
const el =
|
|
2759
|
+
const el = _chunk77GX573Icjs.getHashTargetElement.call(void 0, hash);
|
|
2760
2760
|
if (el) {
|
|
2761
2761
|
rafId = null;
|
|
2762
|
-
|
|
2762
|
+
_chunk77GX573Icjs.scrollElementIntoView.call(void 0, el, { headerOffset });
|
|
2763
2763
|
return;
|
|
2764
2764
|
}
|
|
2765
2765
|
if (frames++ < MAX_POLL_FRAMES) {
|
|
@@ -2787,8 +2787,8 @@ function useHumanitySignals() {
|
|
|
2787
2787
|
const startedAtRef = _react.useRef.call(void 0, mountedAt);
|
|
2788
2788
|
const getSignals = _react.useCallback.call(void 0,
|
|
2789
2789
|
() => ({
|
|
2790
|
-
[
|
|
2791
|
-
[
|
|
2790
|
+
[_chunkO4CPT3RKcjs.HONEYPOT_FIELD]: _nullishCoalesce(_optionalChain([ref, 'access', _34 => _34.current, 'optionalAccess', _35 => _35.value]), () => ( "")),
|
|
2791
|
+
[_chunkO4CPT3RKcjs.ELAPSED_MS_FIELD]: typeof performance !== "undefined" ? Math.round(performance.now() - startedAtRef.current) : 0
|
|
2792
2792
|
}),
|
|
2793
2793
|
[]
|
|
2794
2794
|
);
|
|
@@ -2796,7 +2796,7 @@ function useHumanitySignals() {
|
|
|
2796
2796
|
if (ref.current) ref.current.value = "";
|
|
2797
2797
|
if (typeof performance !== "undefined") startedAtRef.current = performance.now();
|
|
2798
2798
|
}, []);
|
|
2799
|
-
return { honeypotInputProps: { ref, name:
|
|
2799
|
+
return { honeypotInputProps: { ref, name: _chunkO4CPT3RKcjs.HONEYPOT_FIELD }, getSignals, resetSignals };
|
|
2800
2800
|
}
|
|
2801
2801
|
|
|
2802
2802
|
// src/hooks/use-form-rescue.ts
|
|
@@ -2809,9 +2809,9 @@ function readLocalDraft(formId) {
|
|
|
2809
2809
|
const raw = window.localStorage.getItem(STORAGE_PREFIX + formId);
|
|
2810
2810
|
if (!raw) return null;
|
|
2811
2811
|
const parsed = JSON.parse(raw);
|
|
2812
|
-
if (!
|
|
2812
|
+
if (!_chunkO4CPT3RKcjs.isFormAttemptId.call(void 0, parsed.attemptId) || typeof parsed.savedAt !== "number") return null;
|
|
2813
2813
|
if (Date.now() - parsed.savedAt > LOCAL_DRAFT_TTL_MS) return null;
|
|
2814
|
-
return { attemptId: parsed.attemptId, values:
|
|
2814
|
+
return { attemptId: parsed.attemptId, values: _chunkO4CPT3RKcjs.sanitizeRescueValues.call(void 0, parsed.values), savedAt: parsed.savedAt };
|
|
2815
2815
|
} catch (e8) {
|
|
2816
2816
|
return null;
|
|
2817
2817
|
}
|
|
@@ -2831,9 +2831,9 @@ function clearLocalDraft(formId) {
|
|
|
2831
2831
|
function completeFormRescue(form, attemptId) {
|
|
2832
2832
|
if (!form || typeof window === "undefined") return;
|
|
2833
2833
|
const local = readLocalDraft(form.id);
|
|
2834
|
-
|
|
2834
|
+
_chunkO4CPT3RKcjs.captureFormRescueEvent.call(void 0, _chunkO4CPT3RKcjs.FORM_RESCUE_EVENTS.submitted, {
|
|
2835
2835
|
form_id: form.id,
|
|
2836
|
-
attempt_id:
|
|
2836
|
+
attempt_id: _chunkO4CPT3RKcjs.isFormAttemptId.call(void 0, attemptId) ? attemptId : _nullishCoalesce(_optionalChain([local, 'optionalAccess', _36 => _36.attemptId]), () => ( null))
|
|
2837
2837
|
});
|
|
2838
2838
|
clearLocalDraft(form.id);
|
|
2839
2839
|
}
|
|
@@ -2886,7 +2886,7 @@ function useFormRescue({ form, fieldNames, onRestore, getSignals }) {
|
|
|
2886
2886
|
...resumeTokenRef.current ? { resume_token: resumeTokenRef.current } : {}
|
|
2887
2887
|
};
|
|
2888
2888
|
try {
|
|
2889
|
-
void
|
|
2889
|
+
void _chunkXCQ5I27Zcjs.contentFetch.call(void 0, draftsUrl, {
|
|
2890
2890
|
method: "POST",
|
|
2891
2891
|
headers: { "Content-Type": "application/json" },
|
|
2892
2892
|
body: JSON.stringify({ ...body, ..._nullishCoalesce(_optionalChain([getSignalsRef, 'access', _39 => _39.current, 'optionalCall', _40 => _40()]), () => ( {})) }),
|
|
@@ -2894,7 +2894,7 @@ function useFormRescue({ form, fieldNames, onRestore, getSignals }) {
|
|
|
2894
2894
|
}).catch(() => void 0);
|
|
2895
2895
|
} catch (e12) {
|
|
2896
2896
|
}
|
|
2897
|
-
|
|
2897
|
+
_chunkO4CPT3RKcjs.captureFormRescueEvent.call(void 0, _chunkO4CPT3RKcjs.FORM_RESCUE_EVENTS.progress, {
|
|
2898
2898
|
form_id: formId,
|
|
2899
2899
|
attempt_id: attemptId(),
|
|
2900
2900
|
fields_filled: body.fields_filled,
|
|
@@ -2907,23 +2907,23 @@ function useFormRescue({ form, fieldNames, onRestore, getSignals }) {
|
|
|
2907
2907
|
_react.useEffect.call(void 0, () => {
|
|
2908
2908
|
if (!formId || typeof window === "undefined") return void 0;
|
|
2909
2909
|
let cancelled = false;
|
|
2910
|
-
const token = new URLSearchParams(window.location.search).get(
|
|
2910
|
+
const token = new URLSearchParams(window.location.search).get(_chunkO4CPT3RKcjs.FORM_RESCUE_RESUME_PARAM);
|
|
2911
2911
|
const restoreLocal = () => {
|
|
2912
2912
|
const local = readLocalDraft(formId);
|
|
2913
2913
|
if (!local) return;
|
|
2914
2914
|
attemptIdRef.current = local.attemptId;
|
|
2915
2915
|
if (Object.keys(local.values).length) _optionalChain([onRestoreRef, 'access', _41 => _41.current, 'optionalCall', _42 => _42(local.values)]);
|
|
2916
2916
|
};
|
|
2917
|
-
if (
|
|
2918
|
-
|
|
2917
|
+
if (_chunkO4CPT3RKcjs.isResumeToken.call(void 0, token) && draftsUrl) {
|
|
2918
|
+
_chunkXCQ5I27Zcjs.contentFetch.call(void 0, `${draftsUrl}/resume/${encodeURIComponent(token)}`).then(async (res) => res.ok ? await res.json() : null).then((data) => {
|
|
2919
2919
|
if (cancelled) return;
|
|
2920
2920
|
if (!data || data.form_id !== formId) {
|
|
2921
2921
|
restoreLocal();
|
|
2922
2922
|
return;
|
|
2923
2923
|
}
|
|
2924
2924
|
resumeTokenRef.current = token;
|
|
2925
|
-
_optionalChain([onRestoreRef, 'access', _43 => _43.current, 'optionalCall', _44 => _44(
|
|
2926
|
-
|
|
2925
|
+
_optionalChain([onRestoreRef, 'access', _43 => _43.current, 'optionalCall', _44 => _44(_chunkO4CPT3RKcjs.sanitizeRescueValues.call(void 0, data.values))]);
|
|
2926
|
+
_chunkO4CPT3RKcjs.captureFormRescueEvent.call(void 0, _chunkO4CPT3RKcjs.FORM_RESCUE_EVENTS.resumed, { form_id: formId, attempt_id: attemptId() });
|
|
2927
2927
|
}).catch(() => {
|
|
2928
2928
|
if (!cancelled) restoreLocal();
|
|
2929
2929
|
});
|
|
@@ -2943,7 +2943,7 @@ function useFormRescue({ form, fieldNames, onRestore, getSignals }) {
|
|
|
2943
2943
|
timerRef.current = null;
|
|
2944
2944
|
}
|
|
2945
2945
|
send(true);
|
|
2946
|
-
|
|
2946
|
+
_chunkO4CPT3RKcjs.captureFormRescueEvent.call(void 0, _chunkO4CPT3RKcjs.FORM_RESCUE_EVENTS.abandoned, {
|
|
2947
2947
|
form_id: formId,
|
|
2948
2948
|
attempt_id: attemptId(),
|
|
2949
2949
|
last_field: _nullishCoalesce(_optionalChain([latestRef, 'access', _45 => _45.current, 'optionalAccess', _46 => _46.last_field]), () => ( null)),
|
|
@@ -2967,22 +2967,22 @@ function useFormRescue({ form, fieldNames, onRestore, getSignals }) {
|
|
|
2967
2967
|
const names = fieldNamesRef.current;
|
|
2968
2968
|
const visible = {};
|
|
2969
2969
|
for (const name of names) visible[name] = values[name];
|
|
2970
|
-
const filled =
|
|
2970
|
+
const filled = _chunkO4CPT3RKcjs.filledRescueFields.call(void 0, visible, names);
|
|
2971
2971
|
if (!filled.length) return;
|
|
2972
2972
|
if (!startedRef.current) {
|
|
2973
2973
|
startedRef.current = true;
|
|
2974
|
-
|
|
2974
|
+
_chunkO4CPT3RKcjs.captureFormRescueEvent.call(void 0, _chunkO4CPT3RKcjs.FORM_RESCUE_EVENTS.started, { form_id: formId, attempt_id: attemptId() });
|
|
2975
2975
|
}
|
|
2976
|
-
const clean =
|
|
2977
|
-
if (!leadCapturedRef.current &&
|
|
2976
|
+
const clean = _chunkO4CPT3RKcjs.sanitizeRescueValues.call(void 0, visible);
|
|
2977
|
+
if (!leadCapturedRef.current && _chunkO4CPT3RKcjs.isRescueEmail.call(void 0, clean.email)) {
|
|
2978
2978
|
leadCapturedRef.current = true;
|
|
2979
|
-
|
|
2979
|
+
_chunkO4CPT3RKcjs.captureFormRescueEvent.call(void 0, _chunkO4CPT3RKcjs.FORM_RESCUE_EVENTS.leadCaptured, { form_id: formId, attempt_id: attemptId() });
|
|
2980
2980
|
}
|
|
2981
2981
|
latestRef.current = {
|
|
2982
2982
|
values: clean,
|
|
2983
2983
|
fields_filled: filled,
|
|
2984
|
-
last_field:
|
|
2985
|
-
completion_pct:
|
|
2984
|
+
last_field: _chunkO4CPT3RKcjs.sanitizeRescueFieldName.call(void 0, lastField),
|
|
2985
|
+
completion_pct: _chunkO4CPT3RKcjs.rescueCompletionPct.call(void 0, filled.length, names.length)
|
|
2986
2986
|
};
|
|
2987
2987
|
dirtyRef.current = true;
|
|
2988
2988
|
writeLocalDraft(formId, { attemptId: attemptId(), values: clean, savedAt: Date.now() });
|
|
@@ -2990,15 +2990,15 @@ function useFormRescue({ form, fieldNames, onRestore, getSignals }) {
|
|
|
2990
2990
|
timerRef.current = setTimeout(() => {
|
|
2991
2991
|
timerRef.current = null;
|
|
2992
2992
|
send(false);
|
|
2993
|
-
},
|
|
2993
|
+
}, _chunkO4CPT3RKcjs.FORM_RESCUE_DEBOUNCE_MS);
|
|
2994
2994
|
},
|
|
2995
2995
|
[attemptId, formId, send]
|
|
2996
2996
|
);
|
|
2997
2997
|
const submitFields = _react.useCallback.call(void 0, () => {
|
|
2998
2998
|
if (!formId) return {};
|
|
2999
2999
|
return {
|
|
3000
|
-
[
|
|
3001
|
-
...resumeTokenRef.current ? { [
|
|
3000
|
+
[_chunkO4CPT3RKcjs.FORM_RESCUE_ATTEMPT_FIELD]: attemptId(),
|
|
3001
|
+
...resumeTokenRef.current ? { [_chunkO4CPT3RKcjs.FORM_RESCUE_RESUME_FIELD]: resumeTokenRef.current } : {}
|
|
3002
3002
|
};
|
|
3003
3003
|
}, [attemptId, formId]);
|
|
3004
3004
|
const complete = _react.useCallback.call(void 0, () => {
|