@flamingo-stack/openframe-frontend-core 0.0.720 → 0.0.722
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/{chunk-3HZ6XSZC.js → chunk-2TXGR7IK.js} +136 -59
- package/dist/{chunk-WSDT7LYL.js → chunk-3UBWDR65.js} +1 -1
- package/dist/{chunk-CMZ3QTFQ.js → chunk-4I3K6LEH.js} +24 -0
- package/dist/{chunk-4SIZCHVZ.cjs → chunk-4LY6R4TN.cjs} +126 -49
- package/dist/{chunk-2NASBO7O.js → chunk-5D2K7TFT.js} +3 -3
- package/dist/{chunk-HFEYEPOG.cjs → chunk-5K6YKRP5.cjs} +29 -29
- package/dist/{chunk-7HYEQKN6.js → chunk-65C4WHG4.js} +6 -6
- package/dist/{chunk-DOPOHO6H.cjs → chunk-6HRQLM6T.cjs} +20 -20
- package/dist/{chunk-B2N4YX66.js → chunk-6YBUQAOH.js} +1 -1
- package/dist/{chunk-GANIUMRU.js → chunk-7UZ2JZJY.js} +3 -3
- package/dist/{chunk-4HJRHEXD.cjs → chunk-ABSWD4PQ.cjs} +27 -27
- package/dist/{chunk-VYVPII4W.js → chunk-AWWLEYAU.js} +6 -6
- package/dist/{chunk-V6B2FBZK.js → chunk-BCU6UUNQ.js} +8 -8
- package/dist/{chunk-LO3KCLEF.js → chunk-BUDZWXRG.js} +4 -4
- package/dist/{chunk-WBNAEYTQ.cjs → chunk-BYUIFT7Q.cjs} +6 -6
- package/dist/{chunk-KSGMZHVV.cjs → chunk-DFM572VH.cjs} +2 -2
- package/dist/{chunk-YDPKUAP4.js → chunk-DJ4IFQNQ.js} +2 -0
- package/dist/{chunk-DYDDAA6O.cjs → chunk-DWSBTGKT.cjs} +816 -798
- package/dist/{chunk-PSMJYZMV.js → chunk-DX3W7DPC.js} +2 -2
- package/dist/{chunk-PXAKSPLZ.js → chunk-E7NIZXDT.js} +20 -8
- package/dist/{chunk-6W46LVK4.js → chunk-ETQVXIYW.js} +6 -6
- package/dist/{chunk-742BGXNX.js → chunk-EWED6ISQ.js} +1 -1
- package/dist/{chunk-Q5327DXK.js → chunk-F33RMJOL.js} +11 -11
- package/dist/{chunk-RZQGIWK3.cjs → chunk-FDWYBJYD.cjs} +8 -8
- package/dist/{chunk-QF464PPL.cjs → chunk-GAFK3WNT.cjs} +62 -62
- package/dist/{chunk-6BLN5WDS.cjs → chunk-GYSTZD6X.cjs} +40 -40
- package/dist/{chunk-TORERAXD.js → chunk-HA2ASGJM.js} +6 -6
- package/dist/{chunk-KT3U3ZRP.cjs → chunk-HP4UUBJC.cjs} +16 -16
- package/dist/{chunk-DFQYAYBH.cjs → chunk-HQIOMFJH.cjs} +2 -0
- package/dist/{chunk-AZRI4XBP.js → chunk-I3UUMRO7.js} +1 -1
- package/dist/{chunk-VYZCKY5K.js → chunk-IF72N4PE.js} +7 -7
- package/dist/{chunk-RFUOIQSG.cjs → chunk-IITZ6JSC.cjs} +37 -37
- package/dist/{chunk-7LPR4RZ3.cjs → chunk-JQ55FFIK.cjs} +31 -31
- package/dist/{chunk-GQ7JJUIT.cjs → chunk-K2JUJ37D.cjs} +25 -1
- package/dist/{chunk-URW23QUM.js → chunk-K76ACBR3.js} +2 -2
- package/dist/{chunk-7IOU6BJE.js → chunk-KBPGSPXQ.js} +2387 -2369
- package/dist/{chunk-ILNN6QRW.js → chunk-KS3YLYVL.js} +4 -4
- package/dist/{chunk-2C72EWQR.cjs → chunk-KWBH63GV.cjs} +26 -26
- package/dist/{chunk-IYVFSLWJ.js → chunk-KZQO5EJQ.js} +4 -0
- package/dist/{chunk-IMTY3GRR.cjs → chunk-LV6UJD2K.cjs} +2 -2
- package/dist/{chunk-UWJMDFDO.cjs → chunk-MJ4SXOG2.cjs} +28 -28
- package/dist/{chunk-VF2CJXZ2.cjs → chunk-NFABAOMD.cjs} +77 -79
- package/dist/{chunk-B5LNX4GZ.js → chunk-NMGWNUKB.js} +3 -3
- package/dist/{chunk-RDP5UZXQ.cjs → chunk-P7Y626YJ.cjs} +370 -358
- package/dist/{chunk-P3JMAMHP.js → chunk-REETLEL5.js} +1 -1
- package/dist/{chunk-FFT56TYB.cjs → chunk-RUZIICXT.cjs} +2 -2
- package/dist/{chunk-ISCZ6UNF.cjs → chunk-RVQV6J5K.cjs} +75 -75
- package/dist/{chunk-VBHGJFA3.js → chunk-SZ3CBFSH.js} +13 -13
- package/dist/{chunk-O3MKJU6A.js → chunk-SZF7ENIW.js} +4 -4
- package/dist/{chunk-F5BPGWGT.cjs → chunk-TKFTWM3V.cjs} +5 -1
- package/dist/{chunk-YK3X74SF.js → chunk-UYMTAFHG.js} +6 -8
- package/dist/{chunk-DHNJSQGX.cjs → chunk-VC7COEWF.cjs} +105 -105
- package/dist/{chunk-XW3Q623Q.js → chunk-VSYQJCNR.js} +2 -2
- package/dist/{chunk-IL3ZWNM2.cjs → chunk-VU7RU3LL.cjs} +7 -7
- package/dist/{chunk-XSM46FHD.cjs → chunk-VV5INIQB.cjs} +3 -3
- package/dist/{chunk-HTS46FFY.cjs → chunk-VYHCN5NU.cjs} +16 -16
- package/dist/{chunk-ZPHOQDAE.js → chunk-WY4SLTMZ.js} +3 -3
- package/dist/{chunk-5XDCCQ4A.cjs → chunk-XJYAUIOL.cjs} +13 -13
- package/dist/{chunk-ZHD3F2TH.cjs → chunk-XR7NVJXS.cjs} +13 -13
- package/dist/{chunk-EVMM3JE6.cjs → chunk-ZHC6MDGF.cjs} +43 -43
- package/dist/{chunk-K2BYVPGR.js → chunk-ZMHP4Y6M.js} +5 -5
- package/dist/{chunk-NYSMDM4J.cjs → chunk-ZSOFLPQN.cjs} +7 -7
- package/dist/{cloud-tenants-RKQRSDNE.js → cloud-tenants-4Z36KWSX.js} +14 -14
- package/dist/{cloud-tenants-UQZASXUB.cjs → cloud-tenants-5NIC5VXK.cjs} +15 -15
- package/dist/components/calendar.cjs +4 -4
- package/dist/components/calendar.js +1 -1
- package/dist/components/case-studies/index.cjs +29 -29
- package/dist/components/case-studies/index.js +15 -15
- package/dist/components/chat/index.cjs +10 -10
- package/dist/components/chat/index.js +9 -9
- package/dist/components/contact/index.cjs +16 -16
- package/dist/components/contact/index.js +15 -15
- package/dist/components/docs/index.cjs +19 -19
- package/dist/components/docs/index.js +18 -18
- package/dist/components/embeds/index.cjs +16 -16
- package/dist/components/embeds/index.js +15 -15
- package/dist/components/faq/index.cjs +16 -16
- package/dist/components/faq/index.js +15 -15
- package/dist/components/features/index.cjs +15 -15
- package/dist/components/features/index.js +14 -14
- package/dist/components/features/remote-session/remote-access-request-card.d.ts.map +1 -1
- package/dist/components/help-center-pages/download-apps-page.d.ts +68 -0
- package/dist/components/help-center-pages/download-apps-page.d.ts.map +1 -0
- package/dist/components/help-center-pages/index.cjs +347 -117
- package/dist/components/help-center-pages/index.d.ts +1 -0
- package/dist/components/help-center-pages/index.d.ts.map +1 -1
- package/dist/components/help-center-pages/index.js +260 -30
- package/dist/components/index.cjs +87 -85
- package/dist/components/index.js +30 -28
- package/dist/components/meeting-scheduler/index.cjs +67 -67
- package/dist/components/meeting-scheduler/index.js +16 -16
- package/dist/components/navigation/index.cjs +18 -18
- package/dist/components/navigation/index.js +17 -17
- package/dist/components/onboarding-guides/index.cjs +18 -18
- package/dist/components/onboarding-guides/index.js +17 -17
- package/dist/components/product-demo/index.cjs +8 -8
- package/dist/components/product-demo/index.js +8 -8
- package/dist/components/related-content/index.cjs +7 -7
- package/dist/components/related-content/index.js +6 -6
- package/dist/components/tickets/index.cjs +20 -20
- package/dist/components/tickets/index.js +19 -19
- package/dist/components/ui/button/button.d.ts.map +1 -1
- package/dist/components/ui/file-manager/index.cjs +11 -11
- package/dist/components/ui/file-manager/index.js +1 -1
- package/dist/components/ui/index.cjs +17 -15
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +16 -14
- package/dist/components/ui/mobile-app-qr.d.ts +21 -0
- package/dist/components/ui/mobile-app-qr.d.ts.map +1 -0
- package/dist/components/ui/store-badges.d.ts +7 -4
- package/dist/components/ui/store-badges.d.ts.map +1 -1
- package/dist/{devices-U3Y4IIW4.js → devices-2TK3LAKM.js} +14 -14
- package/dist/{devices-7Q2EUM7B.cjs → devices-7IKT72DK.cjs} +16 -16
- package/dist/hooks/index.cjs +9 -3
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +8 -2
- package/dist/hooks/use-downloads.d.ts +41 -0
- package/dist/hooks/use-downloads.d.ts.map +1 -0
- package/dist/index.cjs +52 -20
- package/dist/index.js +50 -18
- package/dist/{knowledge-NST53EXE.js → knowledge-3GJ4MU3V.js} +14 -14
- package/dist/{knowledge-UYIZ74MA.cjs → knowledge-HYSEV35H.cjs} +16 -16
- package/dist/{logs-JVTRG232.js → logs-TATVM62H.js} +14 -14
- package/dist/{logs-HTH7X7KV.cjs → logs-ZX3NADQC.cjs} +24 -24
- package/dist/{policies-MXK2HB4W.cjs → policies-J4FSDKPI.cjs} +19 -19
- package/dist/{policies-DTXTRK56.js → policies-MRRKLF4Q.js} +14 -14
- package/dist/{remote-session-LAJZKQBN.js → remote-session-WCLR47RN.js} +6 -6
- package/dist/{remote-session-SKKF4PBV.cjs → remote-session-Z2YCUPHU.cjs} +8 -8
- package/dist/{software-update-P6BSM6HX.cjs → software-update-CXUBWYD2.cjs} +19 -19
- package/dist/{software-update-6RHMPM3W.js → software-update-KM46WUVQ.js} +14 -14
- package/dist/{tickets-board-BHLPAVNJ.cjs → tickets-board-R5OQSEEC.cjs} +10 -10
- package/dist/{tickets-board-PYDNELSK.js → tickets-board-U3RF3AO4.js} +5 -5
- package/dist/types/downloads.d.ts +83 -0
- package/dist/types/downloads.d.ts.map +1 -0
- package/dist/types/index.cjs +24 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +16 -1
- package/dist/utils/format.d.ts +11 -0
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/index.cjs +15 -0
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +13 -1
- package/dist/utils/mobile-app.cjs +37 -0
- package/dist/utils/mobile-app.d.ts +23 -0
- package/dist/utils/mobile-app.d.ts.map +1 -0
- package/dist/utils/mobile-app.js +34 -0
- package/package.json +7 -1
- package/src/components/features/remote-session/remote-access-request-card.tsx +6 -6
- package/src/components/help-center-pages/download-apps-page.tsx +388 -0
- package/src/components/help-center-pages/index.ts +1 -0
- package/src/components/ui/button/button.tsx +3 -0
- package/src/components/ui/index.ts +1 -0
- package/src/components/ui/mobile-app-qr.tsx +35 -0
- package/src/components/ui/store-badges.tsx +17 -9
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-downloads.ts +138 -0
- package/src/types/downloads.ts +99 -0
- package/src/types/index.ts +1 -0
- package/src/utils/format.ts +15 -0
- package/src/utils/index.ts +3 -1
- package/src/utils/mobile-app.ts +34 -0
|
@@ -34,7 +34,10 @@ var _chunkMZ4KBSH7cjs = require('./chunk-MZ4KBSH7.cjs');
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
var _chunkK2JUJ37Dcjs = require('./chunk-K2JUJ37D.cjs');
|
|
38
41
|
|
|
39
42
|
|
|
40
43
|
|
|
@@ -403,7 +406,7 @@ function useSearch(config) {
|
|
|
403
406
|
searchFnRef.current = searchFn;
|
|
404
407
|
mapResultRef.current = mapResult;
|
|
405
408
|
});
|
|
406
|
-
const debouncedQuery =
|
|
409
|
+
const debouncedQuery = _chunkK2JUJ37Dcjs.useDebounce.call(void 0, query, debounceMs);
|
|
407
410
|
const clearResults = _react.useCallback.call(void 0, () => {
|
|
408
411
|
setResults(NO_RESULTS);
|
|
409
412
|
setError(null);
|
|
@@ -770,7 +773,7 @@ function usePlatformConfig() {
|
|
|
770
773
|
label: platform.label
|
|
771
774
|
}))
|
|
772
775
|
];
|
|
773
|
-
const selectableOptions =
|
|
776
|
+
const selectableOptions = _chunkK2JUJ37Dcjs.transformPlatformConfigsToOptions.call(void 0, platforms);
|
|
774
777
|
return {
|
|
775
778
|
platforms,
|
|
776
779
|
platformOptions,
|
|
@@ -1202,6 +1205,77 @@ function useCopyToClipboard({
|
|
|
1202
1205
|
return { copy, copied };
|
|
1203
1206
|
}
|
|
1204
1207
|
|
|
1208
|
+
// src/hooks/use-downloads.ts
|
|
1209
|
+
|
|
1210
|
+
var IDLE = { data: null, isLoading: false, error: false };
|
|
1211
|
+
var entries = /* @__PURE__ */ new Map();
|
|
1212
|
+
function entryFor(endpoint) {
|
|
1213
|
+
let entry = entries.get(endpoint);
|
|
1214
|
+
if (!entry) {
|
|
1215
|
+
entry = { state: IDLE, request: null, listeners: /* @__PURE__ */ new Set() };
|
|
1216
|
+
entries.set(endpoint, entry);
|
|
1217
|
+
}
|
|
1218
|
+
return entry;
|
|
1219
|
+
}
|
|
1220
|
+
function publish(endpoint, state) {
|
|
1221
|
+
const entry = entryFor(endpoint);
|
|
1222
|
+
entry.state = state;
|
|
1223
|
+
for (const listener of entry.listeners) listener();
|
|
1224
|
+
}
|
|
1225
|
+
function load(endpoint, force = false) {
|
|
1226
|
+
const entry = entryFor(endpoint);
|
|
1227
|
+
if (entry.request || entry.state.data && !force) return;
|
|
1228
|
+
publish(endpoint, { data: entry.state.data, isLoading: true, error: false });
|
|
1229
|
+
entry.request = _chunk7GRPR7XAcjs.contentFetch.call(void 0, endpoint).then(async (response) => {
|
|
1230
|
+
if (!response.ok) throw new Error(`Request failed (${response.status})`);
|
|
1231
|
+
publish(endpoint, { data: await response.json(), isLoading: false, error: false });
|
|
1232
|
+
}).catch(() => publish(endpoint, { data: entry.state.data, isLoading: false, error: true })).finally(() => {
|
|
1233
|
+
entry.request = null;
|
|
1234
|
+
});
|
|
1235
|
+
}
|
|
1236
|
+
function resetDownloadsStore() {
|
|
1237
|
+
entries.clear();
|
|
1238
|
+
}
|
|
1239
|
+
function useDownloads({ endpoint = _chunkK2JUJ37Dcjs.DOWNLOADS_API_PATH, initialData, enabled = true } = {}) {
|
|
1240
|
+
const entry = entryFor(endpoint);
|
|
1241
|
+
if (initialData && entry.state.data !== initialData && !entry.request) {
|
|
1242
|
+
entry.state = { data: initialData, isLoading: false, error: false };
|
|
1243
|
+
}
|
|
1244
|
+
_react.useEffect.call(void 0, () => {
|
|
1245
|
+
if (!initialData) return;
|
|
1246
|
+
for (const listener of entry.listeners) listener();
|
|
1247
|
+
}, [entry, initialData]);
|
|
1248
|
+
const subscribe2 = _react.useCallback.call(void 0,
|
|
1249
|
+
(listener) => {
|
|
1250
|
+
entry.listeners.add(listener);
|
|
1251
|
+
return () => {
|
|
1252
|
+
entry.listeners.delete(listener);
|
|
1253
|
+
};
|
|
1254
|
+
},
|
|
1255
|
+
[entry]
|
|
1256
|
+
);
|
|
1257
|
+
const state = _react.useSyncExternalStore.call(void 0,
|
|
1258
|
+
subscribe2,
|
|
1259
|
+
() => entry.state,
|
|
1260
|
+
() => entry.state
|
|
1261
|
+
);
|
|
1262
|
+
_react.useEffect.call(void 0, () => {
|
|
1263
|
+
if (enabled) load(endpoint);
|
|
1264
|
+
}, [enabled, endpoint]);
|
|
1265
|
+
const reload = _react.useCallback.call(void 0, () => load(endpoint, true), [endpoint]);
|
|
1266
|
+
const isLoading = state.isLoading || enabled && !state.data && !state.error;
|
|
1267
|
+
return { data: state.data, isLoading, error: state.error, reload };
|
|
1268
|
+
}
|
|
1269
|
+
function useVisitorDesktopDownload(options = {}) {
|
|
1270
|
+
const enabled = _nullishCoalesce(options.enabled, () => ( true));
|
|
1271
|
+
const visitor = _chunkK2JUJ37Dcjs.useVisitorOs.call(void 0, );
|
|
1272
|
+
const { data, error } = useDownloads(options);
|
|
1273
|
+
if (!enabled || !visitor.known || !data && !error) return { known: false, download: null };
|
|
1274
|
+
const os = _chunkK2JUJ37Dcjs.desktopOsOf.call(void 0, visitor.os);
|
|
1275
|
+
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));
|
|
1276
|
+
return { known: true, download };
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1205
1279
|
// src/hooks/use-batch-images.ts
|
|
1206
1280
|
|
|
1207
1281
|
var globalBatchImageConfig = {};
|
|
@@ -1450,12 +1524,12 @@ function useAuthenticatedImage(imageUrl, refreshKey, config) {
|
|
|
1450
1524
|
};
|
|
1451
1525
|
}, []);
|
|
1452
1526
|
const active = settled && settled.key === cacheKey ? settled : null;
|
|
1453
|
-
const cachedBlobUrl = cacheKey === null ? void 0 : _optionalChain([imageCache, 'access',
|
|
1454
|
-
const resolvedBlobUrl = _nullishCoalesce(_nullishCoalesce(_optionalChain([active, 'optionalAccess',
|
|
1527
|
+
const cachedBlobUrl = cacheKey === null ? void 0 : _optionalChain([imageCache, 'access', _25 => _25.get, 'call', _26 => _26(cacheKey), 'optionalAccess', _27 => _27.blobUrl]);
|
|
1528
|
+
const resolvedBlobUrl = _nullishCoalesce(_nullishCoalesce(_optionalChain([active, 'optionalAccess', _28 => _28.blobUrl]), () => ( cachedBlobUrl)), () => ( _optionalChain([settled, 'optionalAccess', _29 => _29.blobUrl])));
|
|
1455
1529
|
return {
|
|
1456
1530
|
imageUrl: cacheKey === null ? void 0 : resolvedBlobUrl,
|
|
1457
1531
|
isLoading: cacheKey !== null && active === null && cachedBlobUrl === void 0,
|
|
1458
|
-
error: _nullishCoalesce((cacheKey === null ? void 0 : _optionalChain([active, 'optionalAccess',
|
|
1532
|
+
error: _nullishCoalesce((cacheKey === null ? void 0 : _optionalChain([active, 'optionalAccess', _30 => _30.error])), () => ( null))
|
|
1459
1533
|
};
|
|
1460
1534
|
}
|
|
1461
1535
|
|
|
@@ -2446,7 +2520,7 @@ function useScenarioPlayer({
|
|
|
2446
2520
|
initialScenario = 0,
|
|
2447
2521
|
startAtEnd = false
|
|
2448
2522
|
}) {
|
|
2449
|
-
const auto =
|
|
2523
|
+
const auto = _chunkK2JUJ37Dcjs.useAutoplay.call(void 0, enabled);
|
|
2450
2524
|
const { reducedMotion, paused, setPaused } = auto;
|
|
2451
2525
|
const [scenario, setScenario] = _react.useState.call(void 0, initialScenario);
|
|
2452
2526
|
const [rawStep, setRawStep] = _react.useState.call(void 0, startAtEnd ? Number.MAX_SAFE_INTEGER : 0);
|
|
@@ -2503,7 +2577,7 @@ function useAccessCodeIntegration() {
|
|
|
2503
2577
|
const validate = async (email, code) => {
|
|
2504
2578
|
setIsValidating(true);
|
|
2505
2579
|
try {
|
|
2506
|
-
return await
|
|
2580
|
+
return await _chunkK2JUJ37Dcjs.validateAccessCode.call(void 0, email, code, endpoints);
|
|
2507
2581
|
} finally {
|
|
2508
2582
|
setIsValidating(false);
|
|
2509
2583
|
}
|
|
@@ -2511,7 +2585,7 @@ function useAccessCodeIntegration() {
|
|
|
2511
2585
|
const consume = async (email, code) => {
|
|
2512
2586
|
setIsConsuming(true);
|
|
2513
2587
|
try {
|
|
2514
|
-
return await
|
|
2588
|
+
return await _chunkK2JUJ37Dcjs.consumeAccessCode.call(void 0, email, code, endpoints);
|
|
2515
2589
|
} finally {
|
|
2516
2590
|
setIsConsuming(false);
|
|
2517
2591
|
}
|
|
@@ -2520,7 +2594,7 @@ function useAccessCodeIntegration() {
|
|
|
2520
2594
|
setIsValidating(true);
|
|
2521
2595
|
setIsConsuming(true);
|
|
2522
2596
|
try {
|
|
2523
|
-
return await
|
|
2597
|
+
return await _chunkK2JUJ37Dcjs.validateAndConsumeAccessCode.call(void 0, email, code, endpoints);
|
|
2524
2598
|
} finally {
|
|
2525
2599
|
setIsValidating(false);
|
|
2526
2600
|
setIsConsuming(false);
|
|
@@ -2543,14 +2617,14 @@ async function revalidateMirror(mirrorPath) {
|
|
|
2543
2617
|
const res = await fetch(`${mirrorPath}?revalidate=1`);
|
|
2544
2618
|
if (!res.ok) return null;
|
|
2545
2619
|
const body = await res.json();
|
|
2546
|
-
return _optionalChain([body, 'optionalAccess',
|
|
2620
|
+
return _optionalChain([body, 'optionalAccess', _31 => _31.updated]) ? String(_nullishCoalesce(body.version, () => ( Date.now()))) : null;
|
|
2547
2621
|
} catch (e6) {
|
|
2548
2622
|
return null;
|
|
2549
2623
|
}
|
|
2550
2624
|
}
|
|
2551
2625
|
function useClaudeMirrorSrc(url) {
|
|
2552
2626
|
const endpoints = _chunkMZ4KBSH7cjs.useEndpointsRuntime.call(void 0, );
|
|
2553
|
-
const mirrorPath =
|
|
2627
|
+
const mirrorPath = _chunkK2JUJ37Dcjs.toClaudeMirrorPath.call(void 0, url, _optionalChain([endpoints, 'optionalAccess', _32 => _32.storageViewBaseUrl]));
|
|
2554
2628
|
const [resolved, setResolved] = _react.useState.call(void 0, null);
|
|
2555
2629
|
const state = resolved && resolved.key === mirrorPath ? resolved.value : { src: null, status: mirrorPath ? "probing" : "absent" };
|
|
2556
2630
|
_react.useEffect.call(void 0, () => {
|
|
@@ -2581,7 +2655,7 @@ function useClaudeMirrorSrc(url) {
|
|
|
2581
2655
|
|
|
2582
2656
|
// src/hooks/use-location-hash.ts
|
|
2583
2657
|
|
|
2584
|
-
var HASH_EVENTS = ["hashchange", "popstate",
|
|
2658
|
+
var HASH_EVENTS = ["hashchange", "popstate", _chunkK2JUJ37Dcjs.LOCATION_HASH_SYNC_EVENT];
|
|
2585
2659
|
function subscribe(onChange) {
|
|
2586
2660
|
for (const event of HASH_EVENTS) window.addEventListener(event, onChange);
|
|
2587
2661
|
return () => {
|
|
@@ -2589,7 +2663,7 @@ function subscribe(onChange) {
|
|
|
2589
2663
|
};
|
|
2590
2664
|
}
|
|
2591
2665
|
function readHash() {
|
|
2592
|
-
const raw =
|
|
2666
|
+
const raw = _chunkK2JUJ37Dcjs.normalizeHashFragment.call(void 0, window.location.hash).replace(/^#/, "");
|
|
2593
2667
|
try {
|
|
2594
2668
|
return decodeURIComponent(raw);
|
|
2595
2669
|
} catch (e7) {
|
|
@@ -2604,7 +2678,7 @@ function useLocationHash() {
|
|
|
2604
2678
|
|
|
2605
2679
|
var MAX_POLL_FRAMES = 60;
|
|
2606
2680
|
function useScrollToHash(readyDep = true, options) {
|
|
2607
|
-
const headerOffset = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2681
|
+
const headerOffset = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _33 => _33.headerOffset]), () => ( 0));
|
|
2608
2682
|
_react.useEffect.call(void 0, () => {
|
|
2609
2683
|
if (typeof window === "undefined") return void 0;
|
|
2610
2684
|
if (readyDep === null || readyDep === false) return void 0;
|
|
@@ -2616,16 +2690,16 @@ function useScrollToHash(readyDep = true, options) {
|
|
|
2616
2690
|
}
|
|
2617
2691
|
};
|
|
2618
2692
|
const tryScrollToHash = () => {
|
|
2619
|
-
if (
|
|
2620
|
-
const hash =
|
|
2693
|
+
if (_chunkK2JUJ37Dcjs.isScrollSyncedHash.call(void 0, )) return;
|
|
2694
|
+
const hash = _chunkK2JUJ37Dcjs.normalizeHashFragment.call(void 0, window.location.hash).slice(1);
|
|
2621
2695
|
if (!hash) return;
|
|
2622
2696
|
cancelPoll();
|
|
2623
2697
|
let frames = 0;
|
|
2624
2698
|
const tick = () => {
|
|
2625
|
-
const el =
|
|
2699
|
+
const el = _chunkK2JUJ37Dcjs.getHashTargetElement.call(void 0, hash);
|
|
2626
2700
|
if (el) {
|
|
2627
2701
|
rafId = null;
|
|
2628
|
-
|
|
2702
|
+
_chunkK2JUJ37Dcjs.scrollElementIntoView.call(void 0, el, { headerOffset });
|
|
2629
2703
|
return;
|
|
2630
2704
|
}
|
|
2631
2705
|
if (frames++ < MAX_POLL_FRAMES) {
|
|
@@ -2653,8 +2727,8 @@ function useHumanitySignals() {
|
|
|
2653
2727
|
const startedAtRef = _react.useRef.call(void 0, mountedAt);
|
|
2654
2728
|
const getSignals = _react.useCallback.call(void 0,
|
|
2655
2729
|
() => ({
|
|
2656
|
-
[
|
|
2657
|
-
[
|
|
2730
|
+
[_chunkK2JUJ37Dcjs.HONEYPOT_FIELD]: _nullishCoalesce(_optionalChain([ref, 'access', _34 => _34.current, 'optionalAccess', _35 => _35.value]), () => ( "")),
|
|
2731
|
+
[_chunkK2JUJ37Dcjs.ELAPSED_MS_FIELD]: typeof performance !== "undefined" ? Math.round(performance.now() - startedAtRef.current) : 0
|
|
2658
2732
|
}),
|
|
2659
2733
|
[]
|
|
2660
2734
|
);
|
|
@@ -2662,7 +2736,7 @@ function useHumanitySignals() {
|
|
|
2662
2736
|
if (ref.current) ref.current.value = "";
|
|
2663
2737
|
if (typeof performance !== "undefined") startedAtRef.current = performance.now();
|
|
2664
2738
|
}, []);
|
|
2665
|
-
return { honeypotInputProps: { ref, name:
|
|
2739
|
+
return { honeypotInputProps: { ref, name: _chunkK2JUJ37Dcjs.HONEYPOT_FIELD }, getSignals, resetSignals };
|
|
2666
2740
|
}
|
|
2667
2741
|
|
|
2668
2742
|
// src/hooks/use-form-rescue.ts
|
|
@@ -2684,9 +2758,9 @@ function readLocalDraft(formId) {
|
|
|
2684
2758
|
const raw = window.localStorage.getItem(STORAGE_PREFIX + formId);
|
|
2685
2759
|
if (!raw) return null;
|
|
2686
2760
|
const parsed = JSON.parse(raw);
|
|
2687
|
-
if (!
|
|
2761
|
+
if (!_chunkK2JUJ37Dcjs.isFormAttemptId.call(void 0, parsed.attemptId) || typeof parsed.savedAt !== "number") return null;
|
|
2688
2762
|
if (Date.now() - parsed.savedAt > LOCAL_DRAFT_TTL_MS) return null;
|
|
2689
|
-
return { attemptId: parsed.attemptId, values:
|
|
2763
|
+
return { attemptId: parsed.attemptId, values: _chunkK2JUJ37Dcjs.sanitizeRescueValues.call(void 0, parsed.values), savedAt: parsed.savedAt };
|
|
2690
2764
|
} catch (e8) {
|
|
2691
2765
|
return null;
|
|
2692
2766
|
}
|
|
@@ -2706,9 +2780,9 @@ function clearLocalDraft(formId) {
|
|
|
2706
2780
|
function completeFormRescue(form, attemptId) {
|
|
2707
2781
|
if (!form || typeof window === "undefined") return;
|
|
2708
2782
|
const local = readLocalDraft(form.id);
|
|
2709
|
-
|
|
2783
|
+
_chunkK2JUJ37Dcjs.captureFormRescueEvent.call(void 0, _chunkK2JUJ37Dcjs.FORM_RESCUE_EVENTS.submitted, {
|
|
2710
2784
|
form_id: form.id,
|
|
2711
|
-
attempt_id:
|
|
2785
|
+
attempt_id: _chunkK2JUJ37Dcjs.isFormAttemptId.call(void 0, attemptId) ? attemptId : _nullishCoalesce(_optionalChain([local, 'optionalAccess', _36 => _36.attemptId]), () => ( null))
|
|
2712
2786
|
});
|
|
2713
2787
|
clearLocalDraft(form.id);
|
|
2714
2788
|
}
|
|
@@ -2726,8 +2800,8 @@ function readUtm() {
|
|
|
2726
2800
|
}
|
|
2727
2801
|
}
|
|
2728
2802
|
function useFormRescue({ form, fieldNames, onRestore, getSignals }) {
|
|
2729
|
-
const draftsUrl = _optionalChain([_chunkMZ4KBSH7cjs.useEndpointsRuntime.call(void 0, ), 'optionalAccess',
|
|
2730
|
-
const formId = _nullishCoalesce(_optionalChain([form, 'optionalAccess',
|
|
2803
|
+
const draftsUrl = _optionalChain([_chunkMZ4KBSH7cjs.useEndpointsRuntime.call(void 0, ), 'optionalAccess', _37 => _37.formDraftsUrl]);
|
|
2804
|
+
const formId = _nullishCoalesce(_optionalChain([form, 'optionalAccess', _38 => _38.id]), () => ( null));
|
|
2731
2805
|
const attemptIdRef = _react.useRef.call(void 0, null);
|
|
2732
2806
|
const resumeTokenRef = _react.useRef.call(void 0, null);
|
|
2733
2807
|
const latestRef = _react.useRef.call(void 0, null);
|
|
@@ -2764,12 +2838,12 @@ function useFormRescue({ form, fieldNames, onRestore, getSignals }) {
|
|
|
2764
2838
|
void _chunk7GRPR7XAcjs.contentFetch.call(void 0, draftsUrl, {
|
|
2765
2839
|
method: "POST",
|
|
2766
2840
|
headers: { "Content-Type": "application/json" },
|
|
2767
|
-
body: JSON.stringify({ ...body, ..._nullishCoalesce(_optionalChain([getSignalsRef, 'access',
|
|
2841
|
+
body: JSON.stringify({ ...body, ..._nullishCoalesce(_optionalChain([getSignalsRef, 'access', _39 => _39.current, 'optionalCall', _40 => _40()]), () => ( {})) }),
|
|
2768
2842
|
keepalive
|
|
2769
2843
|
}).catch(() => void 0);
|
|
2770
2844
|
} catch (e12) {
|
|
2771
2845
|
}
|
|
2772
|
-
|
|
2846
|
+
_chunkK2JUJ37Dcjs.captureFormRescueEvent.call(void 0, _chunkK2JUJ37Dcjs.FORM_RESCUE_EVENTS.progress, {
|
|
2773
2847
|
form_id: formId,
|
|
2774
2848
|
attempt_id: attemptId(),
|
|
2775
2849
|
fields_filled: body.fields_filled,
|
|
@@ -2782,14 +2856,14 @@ function useFormRescue({ form, fieldNames, onRestore, getSignals }) {
|
|
|
2782
2856
|
_react.useEffect.call(void 0, () => {
|
|
2783
2857
|
if (!formId || typeof window === "undefined") return void 0;
|
|
2784
2858
|
let cancelled = false;
|
|
2785
|
-
const token = new URLSearchParams(window.location.search).get(
|
|
2859
|
+
const token = new URLSearchParams(window.location.search).get(_chunkK2JUJ37Dcjs.FORM_RESCUE_RESUME_PARAM);
|
|
2786
2860
|
const restoreLocal = () => {
|
|
2787
2861
|
const local = readLocalDraft(formId);
|
|
2788
2862
|
if (!local) return;
|
|
2789
2863
|
attemptIdRef.current = local.attemptId;
|
|
2790
|
-
if (Object.keys(local.values).length) _optionalChain([onRestoreRef, 'access',
|
|
2864
|
+
if (Object.keys(local.values).length) _optionalChain([onRestoreRef, 'access', _41 => _41.current, 'optionalCall', _42 => _42(local.values)]);
|
|
2791
2865
|
};
|
|
2792
|
-
if (
|
|
2866
|
+
if (_chunkK2JUJ37Dcjs.isResumeToken.call(void 0, token) && draftsUrl) {
|
|
2793
2867
|
_chunk7GRPR7XAcjs.contentFetch.call(void 0, `${draftsUrl}/resume/${encodeURIComponent(token)}`).then(async (res) => res.ok ? await res.json() : null).then((data) => {
|
|
2794
2868
|
if (cancelled) return;
|
|
2795
2869
|
if (!data || data.form_id !== formId) {
|
|
@@ -2797,8 +2871,8 @@ function useFormRescue({ form, fieldNames, onRestore, getSignals }) {
|
|
|
2797
2871
|
return;
|
|
2798
2872
|
}
|
|
2799
2873
|
resumeTokenRef.current = token;
|
|
2800
|
-
_optionalChain([onRestoreRef, 'access',
|
|
2801
|
-
|
|
2874
|
+
_optionalChain([onRestoreRef, 'access', _43 => _43.current, 'optionalCall', _44 => _44(_chunkK2JUJ37Dcjs.sanitizeRescueValues.call(void 0, data.values))]);
|
|
2875
|
+
_chunkK2JUJ37Dcjs.captureFormRescueEvent.call(void 0, _chunkK2JUJ37Dcjs.FORM_RESCUE_EVENTS.resumed, { form_id: formId, attempt_id: attemptId() });
|
|
2802
2876
|
}).catch(() => {
|
|
2803
2877
|
if (!cancelled) restoreLocal();
|
|
2804
2878
|
});
|
|
@@ -2818,11 +2892,11 @@ function useFormRescue({ form, fieldNames, onRestore, getSignals }) {
|
|
|
2818
2892
|
timerRef.current = null;
|
|
2819
2893
|
}
|
|
2820
2894
|
send(true);
|
|
2821
|
-
|
|
2895
|
+
_chunkK2JUJ37Dcjs.captureFormRescueEvent.call(void 0, _chunkK2JUJ37Dcjs.FORM_RESCUE_EVENTS.abandoned, {
|
|
2822
2896
|
form_id: formId,
|
|
2823
2897
|
attempt_id: attemptId(),
|
|
2824
|
-
last_field: _nullishCoalesce(_optionalChain([latestRef, 'access',
|
|
2825
|
-
completion_pct: _nullishCoalesce(_optionalChain([latestRef, 'access',
|
|
2898
|
+
last_field: _nullishCoalesce(_optionalChain([latestRef, 'access', _45 => _45.current, 'optionalAccess', _46 => _46.last_field]), () => ( null)),
|
|
2899
|
+
completion_pct: _nullishCoalesce(_optionalChain([latestRef, 'access', _47 => _47.current, 'optionalAccess', _48 => _48.completion_pct]), () => ( 0))
|
|
2826
2900
|
});
|
|
2827
2901
|
};
|
|
2828
2902
|
const onVisibility = () => {
|
|
@@ -2842,22 +2916,22 @@ function useFormRescue({ form, fieldNames, onRestore, getSignals }) {
|
|
|
2842
2916
|
const names = fieldNamesRef.current;
|
|
2843
2917
|
const visible = {};
|
|
2844
2918
|
for (const name of names) visible[name] = values[name];
|
|
2845
|
-
const filled =
|
|
2919
|
+
const filled = _chunkK2JUJ37Dcjs.filledRescueFields.call(void 0, visible, names);
|
|
2846
2920
|
if (!filled.length) return;
|
|
2847
2921
|
if (!startedRef.current) {
|
|
2848
2922
|
startedRef.current = true;
|
|
2849
|
-
|
|
2923
|
+
_chunkK2JUJ37Dcjs.captureFormRescueEvent.call(void 0, _chunkK2JUJ37Dcjs.FORM_RESCUE_EVENTS.started, { form_id: formId, attempt_id: attemptId() });
|
|
2850
2924
|
}
|
|
2851
|
-
const clean =
|
|
2852
|
-
if (!leadCapturedRef.current &&
|
|
2925
|
+
const clean = _chunkK2JUJ37Dcjs.sanitizeRescueValues.call(void 0, visible);
|
|
2926
|
+
if (!leadCapturedRef.current && _chunkK2JUJ37Dcjs.isRescueEmail.call(void 0, clean.email)) {
|
|
2853
2927
|
leadCapturedRef.current = true;
|
|
2854
|
-
|
|
2928
|
+
_chunkK2JUJ37Dcjs.captureFormRescueEvent.call(void 0, _chunkK2JUJ37Dcjs.FORM_RESCUE_EVENTS.leadCaptured, { form_id: formId, attempt_id: attemptId() });
|
|
2855
2929
|
}
|
|
2856
2930
|
latestRef.current = {
|
|
2857
2931
|
values: clean,
|
|
2858
2932
|
fields_filled: filled,
|
|
2859
|
-
last_field:
|
|
2860
|
-
completion_pct:
|
|
2933
|
+
last_field: _chunkK2JUJ37Dcjs.sanitizeRescueFieldName.call(void 0, lastField),
|
|
2934
|
+
completion_pct: _chunkK2JUJ37Dcjs.rescueCompletionPct.call(void 0, filled.length, names.length)
|
|
2861
2935
|
};
|
|
2862
2936
|
dirtyRef.current = true;
|
|
2863
2937
|
writeLocalDraft(formId, { attemptId: attemptId(), values: clean, savedAt: Date.now() });
|
|
@@ -2865,15 +2939,15 @@ function useFormRescue({ form, fieldNames, onRestore, getSignals }) {
|
|
|
2865
2939
|
timerRef.current = setTimeout(() => {
|
|
2866
2940
|
timerRef.current = null;
|
|
2867
2941
|
send(false);
|
|
2868
|
-
},
|
|
2942
|
+
}, _chunkK2JUJ37Dcjs.FORM_RESCUE_DEBOUNCE_MS);
|
|
2869
2943
|
},
|
|
2870
2944
|
[attemptId, formId, send]
|
|
2871
2945
|
);
|
|
2872
2946
|
const submitFields = _react.useCallback.call(void 0, () => {
|
|
2873
2947
|
if (!formId) return {};
|
|
2874
2948
|
return {
|
|
2875
|
-
[
|
|
2876
|
-
...resumeTokenRef.current ? { [
|
|
2949
|
+
[_chunkK2JUJ37Dcjs.FORM_RESCUE_ATTEMPT_FIELD]: attemptId(),
|
|
2950
|
+
...resumeTokenRef.current ? { [_chunkK2JUJ37Dcjs.FORM_RESCUE_RESUME_FIELD]: resumeTokenRef.current } : {}
|
|
2877
2951
|
};
|
|
2878
2952
|
}, [attemptId, formId]);
|
|
2879
2953
|
const complete = _react.useCallback.call(void 0, () => {
|
|
@@ -2992,4 +3066,7 @@ function useRescuedForm(form, { rescue, fields, getSignals, fieldPath }) {
|
|
|
2992
3066
|
|
|
2993
3067
|
|
|
2994
3068
|
|
|
2995
|
-
|
|
3069
|
+
|
|
3070
|
+
|
|
3071
|
+
|
|
3072
|
+
exports.useDeferredError = useDeferredError; exports.useFocusTrap = useFocusTrap; exports.useStickyToolbar = useStickyToolbar; exports.useMemoizedCallback = useMemoizedCallback; exports.useNotificationPermission = useNotificationPermission; exports.useOnboardingState = useOnboardingState; exports.useSearch = useSearch; exports.useTablePagination = useTablePagination; exports.useThrottle = useThrottle; exports.useWindowSize = useWindowSize; exports.resolveActiveSection = resolveActiveSection; exports.useActiveSection = useActiveSection; exports.useNavMenus = useNavMenus; exports.usePreventScroll = _overlays.usePreventScroll; exports.usePlatformConfig = usePlatformConfig; exports.usePlatformByValue = usePlatformByValue; exports.useValidatePlatform = useValidatePlatform; exports.dotColorByVariant = dotColorByVariant; exports.progressColorByVariant = progressColorByVariant; exports.ToastCard = ToastCard; exports.CommandApprovalToast = CommandApprovalToast; exports.Toaster = Toaster; exports.showToast = showToast; exports.showCommandApprovalToast = showCommandApprovalToast; exports.toast = toast; exports.useToast = useToast; exports.useContactSubmission = useContactSubmission; exports.useCopyToClipboard = useCopyToClipboard; exports.resetDownloadsStore = resetDownloadsStore; exports.useDownloads = useDownloads; exports.useVisitorDesktopDownload = useVisitorDesktopDownload; exports.configureBatchImageFetch = configureBatchImageFetch; exports.batchFetchAuthenticatedImages = batchFetchAuthenticatedImages; exports.useBatchImages = useBatchImages; exports.configureAuthenticatedImage = configureAuthenticatedImage; exports.useAuthenticatedImage = useAuthenticatedImage; exports.flattenQueryVariables = flattenQueryVariables; exports.mergeDefaults = mergeDefaults; exports.validateSchema = validateSchema; exports.getArrayParams = getArrayParams; exports.getRequiredParams = getRequiredParams; exports.extractVariablesFromQuery = extractVariablesFromQuery; exports.isScalarType = isScalarType; exports.isInputObjectType = isInputObjectType; exports.GraphQLIntrospector = GraphQLIntrospector; exports.introspector = introspector; exports.urlParamsToVariables = urlParamsToVariables; exports.variablesToUrlParams = variablesToUrlParams; exports.coerceValue = coerceValue; exports.setNestedValue = setNestedValue; exports.getNestedValue = getNestedValue; exports.mergeVariables = mergeVariables; exports.clearParams = clearParams; exports.validateVariables = validateVariables; exports.useQueryParams = useQueryParams; exports.useApiParams = useApiParams; exports.useCursorPaginationState = useCursorPaginationState; exports.useNatsClient = useNatsClient; exports.useScenarioPlayer = useScenarioPlayer; exports.useAccessCodeIntegration = useAccessCodeIntegration; exports.useClaudeMirrorSrc = useClaudeMirrorSrc; exports.useLocationHash = useLocationHash; exports.useScrollToHash = useScrollToHash; exports.useHumanitySignals = useHumanitySignals; exports.completeFormRescue = completeFormRescue; exports.useFormRescue = useFormRescue; exports.useRescuedForm = useRescuedForm;
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
TooltipContent,
|
|
6
6
|
TooltipProvider,
|
|
7
7
|
TooltipTrigger
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-REETLEL5.js";
|
|
9
9
|
import {
|
|
10
10
|
ToolIcon,
|
|
11
11
|
clamp
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
Tag,
|
|
15
15
|
formatDateWithTimezone,
|
|
16
16
|
tagVariants
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KZQO5EJQ.js";
|
|
18
18
|
import {
|
|
19
19
|
PLATFORM_THEME,
|
|
20
20
|
getPlatformAccentColor,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
} from "./chunk-NCPTID44.js";
|
|
29
29
|
import {
|
|
30
30
|
Button
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-DJ4IFQNQ.js";
|
|
32
32
|
import {
|
|
33
33
|
cn
|
|
34
34
|
} from "./chunk-7RXWKTAP.js";
|
|
@@ -2,29 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkDWSBTGKTcjs = require('./chunk-DWSBTGKT.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkNFABAOMDcjs = require('./chunk-NFABAOMD.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunk4LY6R4TNcjs = require('./chunk-4LY6R4TN.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkP7Y626YJcjs = require('./chunk-P7Y626YJ.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkIITZ6JSCcjs = require('./chunk-IITZ6JSC.cjs');
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
@@ -32,7 +32,7 @@ var _chunkRFUOIQSGcjs = require('./chunk-RFUOIQSG.cjs');
|
|
|
32
32
|
var _chunkXXBLN4BPcjs = require('./chunk-XXBLN4BP.cjs');
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
var
|
|
35
|
+
var _chunkHQIOMFJHcjs = require('./chunk-HQIOMFJH.cjs');
|
|
36
36
|
|
|
37
37
|
// src/components/contact/contact-form.tsx
|
|
38
38
|
var _zod = require('@hookform/resolvers/zod');
|
|
@@ -115,14 +115,14 @@ function ContactForm({
|
|
|
115
115
|
successToastMessage = "Redirecting you to join our community...",
|
|
116
116
|
rescue: rescueForm = null
|
|
117
117
|
} = {}) {
|
|
118
|
-
const attachments =
|
|
119
|
-
const builtInSubmission =
|
|
118
|
+
const attachments = _chunkP7Y626YJcjs.useChatAttachments.call(void 0, );
|
|
119
|
+
const builtInSubmission = _chunk4LY6R4TNcjs.useContactSubmission.call(void 0, {
|
|
120
120
|
userId,
|
|
121
121
|
successRedirectUrl,
|
|
122
122
|
successToastMessage
|
|
123
123
|
});
|
|
124
124
|
const [customSubmitting, setCustomSubmitting] = _react.useState.call(void 0, false);
|
|
125
|
-
const { honeypotInputProps, getSignals, resetSignals } =
|
|
125
|
+
const { honeypotInputProps, getSignals, resetSignals } = _chunk4LY6R4TNcjs.useHumanitySignals.call(void 0, );
|
|
126
126
|
const isSubmitting = onCustomSubmit ? customSubmitting : builtInSubmission.isSubmitting;
|
|
127
127
|
const isSuccess = onCustomSubmit ? false : builtInSubmission.isSuccess;
|
|
128
128
|
const form = _reacthookform.useForm.call(void 0, {
|
|
@@ -148,7 +148,7 @@ function ContactForm({
|
|
|
148
148
|
),
|
|
149
149
|
[hideFields]
|
|
150
150
|
);
|
|
151
|
-
const rescue =
|
|
151
|
+
const rescue = _chunk4LY6R4TNcjs.useRescuedForm.call(void 0, form, { rescue: rescueForm, fields: rescueFieldNames, getSignals });
|
|
152
152
|
const handleFormSubmit = async (data) => {
|
|
153
153
|
if (isSubmitting) return;
|
|
154
154
|
if (attachmentsEnabled && attachments.hasInflightUploads) return;
|
|
@@ -186,7 +186,7 @@ function ContactForm({
|
|
|
186
186
|
className: `flex h-full flex-col ${!noBorder ? "rounded-2xl border border-ods-border content-md:rounded-3xl" : ""} ${!noPadding ? "p-6 content-md:p-8 content-lg:p-10" : ""}`,
|
|
187
187
|
children: [
|
|
188
188
|
(title || subtitle) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mb-6 content-md:mb-8", children: [
|
|
189
|
-
title && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: `${
|
|
189
|
+
title && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: `${_chunkIITZ6JSCcjs.SECTION_HEADING_CLASS} mb-3 content-md:mb-4`, children: _chunkIITZ6JSCcjs.accentSentenceMarks.call(void 0, title) }),
|
|
190
190
|
subtitle && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-primary text-h4", children: subtitle })
|
|
191
191
|
] }),
|
|
192
192
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -199,13 +199,13 @@ function ContactForm({
|
|
|
199
199
|
);
|
|
200
200
|
}),
|
|
201
201
|
className: "flex flex-grow flex-col space-y-4 content-md:space-y-6",
|
|
202
|
-
...
|
|
202
|
+
..._chunkP7Y626YJcjs.HUBSPOT_DO_NOT_COLLECT_FORM_PROPS,
|
|
203
203
|
children: [
|
|
204
204
|
!showName && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "input", { type: "hidden", ...register("name") }),
|
|
205
205
|
!showEmail && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "input", { type: "hidden", ...register("email") }),
|
|
206
206
|
!showHelpCategory && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "input", { type: "hidden", ...register("helpCategory") }),
|
|
207
207
|
!showMessage && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "input", { type: "hidden", ...register("message") }),
|
|
208
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
208
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDWSBTGKTcjs.HoneypotField, { ...honeypotInputProps }),
|
|
209
209
|
extraTopField,
|
|
210
210
|
showNameEmailRow && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 content-md:grid-cols-2 content-md:gap-6", children: [
|
|
211
211
|
showName && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
|
|
@@ -257,17 +257,17 @@ function ContactForm({
|
|
|
257
257
|
{
|
|
258
258
|
control,
|
|
259
259
|
name: "companySize",
|
|
260
|
-
render: ({ field }) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
260
|
+
render: ({ field }) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFABAOMDcjs.Select, { onValueChange: field.onChange, value: _nullishCoalesce(field.value, () => ( "")), children: [
|
|
261
261
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
262
|
-
|
|
262
|
+
_chunkNFABAOMDcjs.SelectTrigger,
|
|
263
263
|
{
|
|
264
264
|
id: "companySize",
|
|
265
265
|
"aria-label": "Company Size",
|
|
266
266
|
className: "h-12 border-ods-border bg-ods-card px-3 text-ods-text-primary",
|
|
267
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
267
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFABAOMDcjs.SelectValue, { placeholder: "Select company size" })
|
|
268
268
|
}
|
|
269
269
|
),
|
|
270
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
270
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFABAOMDcjs.SelectContent, { children: companySizeOptions.map((opt) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFABAOMDcjs.SelectItem, { value: opt, children: opt }, opt)) })
|
|
271
271
|
] })
|
|
272
272
|
}
|
|
273
273
|
),
|
|
@@ -280,17 +280,17 @@ function ContactForm({
|
|
|
280
280
|
{
|
|
281
281
|
control,
|
|
282
282
|
name: "referralSource",
|
|
283
|
-
render: ({ field }) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
283
|
+
render: ({ field }) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFABAOMDcjs.Select, { onValueChange: field.onChange, value: _nullishCoalesce(field.value, () => ( "")), children: [
|
|
284
284
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
285
|
-
|
|
285
|
+
_chunkNFABAOMDcjs.SelectTrigger,
|
|
286
286
|
{
|
|
287
287
|
id: "referralSource",
|
|
288
288
|
"aria-label": "Referral Source",
|
|
289
289
|
className: "h-12 border-ods-border bg-ods-card px-3 text-ods-text-primary",
|
|
290
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
290
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFABAOMDcjs.SelectValue, { placeholder: "Select an option" })
|
|
291
291
|
}
|
|
292
292
|
),
|
|
293
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
293
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFABAOMDcjs.SelectContent, { children: referralSourceOptions.map((opt) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFABAOMDcjs.SelectItem, { value: opt, children: opt }, opt)) })
|
|
294
294
|
] })
|
|
295
295
|
}
|
|
296
296
|
),
|
|
@@ -307,18 +307,18 @@ function ContactForm({
|
|
|
307
307
|
{
|
|
308
308
|
control,
|
|
309
309
|
name: "helpCategory",
|
|
310
|
-
render: ({ field }) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
310
|
+
render: ({ field }) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFABAOMDcjs.Select, { onValueChange: field.onChange, value: _nullishCoalesce(field.value, () => ( "")), children: [
|
|
311
311
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
312
|
-
|
|
312
|
+
_chunkNFABAOMDcjs.SelectTrigger,
|
|
313
313
|
{
|
|
314
314
|
id: "helpCategory",
|
|
315
315
|
"aria-label": "Help Category",
|
|
316
316
|
"aria-required": true,
|
|
317
317
|
className: "h-12 border-ods-border bg-ods-card px-3 text-ods-text-primary",
|
|
318
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
318
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFABAOMDcjs.SelectValue, { placeholder: "Choose your main interest" })
|
|
319
319
|
}
|
|
320
320
|
),
|
|
321
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
321
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFABAOMDcjs.SelectContent, { children: helpCategoryOptions.map((opt) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFABAOMDcjs.SelectItem, { value: opt, children: opt }, opt)) })
|
|
322
322
|
] })
|
|
323
323
|
}
|
|
324
324
|
),
|
|
@@ -330,7 +330,7 @@ function ContactForm({
|
|
|
330
330
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXXBLN4BPcjs.RequiredMark, {})
|
|
331
331
|
] }),
|
|
332
332
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
333
|
-
|
|
333
|
+
_chunkDWSBTGKTcjs.Textarea,
|
|
334
334
|
{
|
|
335
335
|
id: "message",
|
|
336
336
|
...register("message"),
|
|
@@ -345,7 +345,7 @@ function ContactForm({
|
|
|
345
345
|
] }),
|
|
346
346
|
attachmentsEnabled && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
347
347
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
348
|
-
|
|
348
|
+
_chunkP7Y626YJcjs.ChatAttachmentChipStrip,
|
|
349
349
|
{
|
|
350
350
|
attachments: attachments.attachments,
|
|
351
351
|
onRemove: attachments.removeAttachment,
|
|
@@ -354,7 +354,7 @@ function ContactForm({
|
|
|
354
354
|
),
|
|
355
355
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
|
|
356
356
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
357
|
-
|
|
357
|
+
_chunkP7Y626YJcjs.ChatAttachmentAddButton,
|
|
358
358
|
{
|
|
359
359
|
attachmentsEnabled: true,
|
|
360
360
|
attachmentsCount: attachments.attachments.length,
|
|
@@ -368,7 +368,7 @@ function ContactForm({
|
|
|
368
368
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mt-auto flex w-full flex-col items-center justify-end gap-4 pt-2 content-md:flex-row content-md:gap-6", children: [
|
|
369
369
|
footerText && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-center text-ods-text-secondary text-h6 content-md:text-left", children: footerText }),
|
|
370
370
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
371
|
-
|
|
371
|
+
_chunkHQIOMFJHcjs.Button,
|
|
372
372
|
{
|
|
373
373
|
type: "submit",
|
|
374
374
|
loading: isSubmitting,
|