kaafil-react-uikit 0.1.0-beta.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/README.md +12 -6
  2. package/dist/admin/index.cjs +343 -343
  3. package/dist/admin/index.cjs.map +1 -1
  4. package/dist/admin/index.js +6 -6
  5. package/dist/admin/index.js.map +1 -1
  6. package/dist/{chunk-VHTSTUCJ.cjs → chunk-2MWTLYVP.cjs} +17 -114
  7. package/dist/chunk-2MWTLYVP.cjs.map +1 -0
  8. package/dist/{chunk-6FPAGGFL.js → chunk-2SRBJ4H7.js} +13 -6
  9. package/dist/chunk-2SRBJ4H7.js.map +1 -0
  10. package/dist/{chunk-UYJ6LIWP.js → chunk-7WXE5SUS.js} +3 -3
  11. package/dist/{chunk-UYJ6LIWP.js.map → chunk-7WXE5SUS.js.map} +1 -1
  12. package/dist/{chunk-YDGR7JSY.js → chunk-CURTZGHY.js} +16 -11
  13. package/dist/chunk-CURTZGHY.js.map +1 -0
  14. package/dist/{chunk-WUAFL77X.js → chunk-E42K6UMM.js} +7 -101
  15. package/dist/chunk-E42K6UMM.js.map +1 -0
  16. package/dist/{chunk-UUGMNP27.js → chunk-FFXGZZGJ.js} +5 -5
  17. package/dist/{chunk-UUGMNP27.js.map → chunk-FFXGZZGJ.js.map} +1 -1
  18. package/dist/{chunk-XI7MK4Y7.js → chunk-JMWXQTE3.js} +3 -3
  19. package/dist/{chunk-XI7MK4Y7.js.map → chunk-JMWXQTE3.js.map} +1 -1
  20. package/dist/{chunk-PJRZCOFF.cjs → chunk-M2D6CZK2.cjs} +37 -37
  21. package/dist/{chunk-PJRZCOFF.cjs.map → chunk-M2D6CZK2.cjs.map} +1 -1
  22. package/dist/{chunk-ACVU55PZ.cjs → chunk-PCDEJHWL.cjs} +12 -12
  23. package/dist/{chunk-ACVU55PZ.cjs.map → chunk-PCDEJHWL.cjs.map} +1 -1
  24. package/dist/chunk-PDQVVJCS.js +105 -0
  25. package/dist/chunk-PDQVVJCS.js.map +1 -0
  26. package/dist/{chunk-IIPQ4JNC.js → chunk-PYETPKTT.js} +3 -3
  27. package/dist/{chunk-IIPQ4JNC.js.map → chunk-PYETPKTT.js.map} +1 -1
  28. package/dist/{chunk-QHUDOVKW.cjs → chunk-TF3GCIDK.cjs} +21 -16
  29. package/dist/chunk-TF3GCIDK.cjs.map +1 -0
  30. package/dist/{chunk-EM7JV3D7.cjs → chunk-V36WWMTF.cjs} +13 -6
  31. package/dist/chunk-V36WWMTF.cjs.map +1 -0
  32. package/dist/{chunk-PTQ2CJKE.cjs → chunk-W5PG3IUJ.cjs} +4 -4
  33. package/dist/{chunk-PTQ2CJKE.cjs.map → chunk-W5PG3IUJ.cjs.map} +1 -1
  34. package/dist/{chunk-LL243STJ.cjs → chunk-WS2DKREI.cjs} +79 -79
  35. package/dist/{chunk-LL243STJ.cjs.map → chunk-WS2DKREI.cjs.map} +1 -1
  36. package/dist/chunk-YHOQRKDJ.cjs +110 -0
  37. package/dist/chunk-YHOQRKDJ.cjs.map +1 -0
  38. package/dist/core/index.cjs +126 -120
  39. package/dist/core/index.cjs.map +1 -1
  40. package/dist/core/index.js +19 -13
  41. package/dist/core/index.js.map +1 -1
  42. package/dist/index.css +1 -1
  43. package/dist/manager/index.cjs +278 -283
  44. package/dist/manager/index.cjs.map +1 -1
  45. package/dist/manager/index.js +48 -52
  46. package/dist/manager/index.js.map +1 -1
  47. package/dist/traveller/index.cjs +35 -35
  48. package/dist/traveller/index.js +5 -5
  49. package/package.json +4 -3
  50. package/dist/chunk-6FPAGGFL.js.map +0 -1
  51. package/dist/chunk-EM7JV3D7.cjs.map +0 -1
  52. package/dist/chunk-PZKXLQSU.js +0 -10
  53. package/dist/chunk-PZKXLQSU.js.map +0 -1
  54. package/dist/chunk-QHUDOVKW.cjs.map +0 -1
  55. package/dist/chunk-TOBZFADB.cjs +0 -12
  56. package/dist/chunk-TOBZFADB.cjs.map +0 -1
  57. package/dist/chunk-VHTSTUCJ.cjs.map +0 -1
  58. package/dist/chunk-WUAFL77X.js.map +0 -1
  59. package/dist/chunk-YDGR7JSY.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { OfflineEngineContext } from './chunk-6FPAGGFL.js';
1
+ import { OfflineEngineContext } from './chunk-2SRBJ4H7.js';
2
2
  import { useContext, useState, useRef, useEffect } from 'react';
3
3
 
4
4
  var TICK_INTERVAL_MS = 1e3;
@@ -34,5 +34,5 @@ function useServerTime() {
34
34
  }
35
35
 
36
36
  export { useServerTime };
37
- //# sourceMappingURL=chunk-XI7MK4Y7.js.map
38
- //# sourceMappingURL=chunk-XI7MK4Y7.js.map
37
+ //# sourceMappingURL=chunk-JMWXQTE3.js.map
38
+ //# sourceMappingURL=chunk-JMWXQTE3.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/core/hooks/useServerTime.ts"],"names":[],"mappings":";;;AA8BA,IAAM,gBAAA,GAAmB,GAAA;AAElB,SAAS,aAAA,GAA+B;AAC7C,EAAA,MAAM,MAAA,GAAS,WAAW,oBAAoB,CAAA;AAC9C,EAAA,MAAM,CAAC,cAAA,EAAgB,iBAAiB,CAAA,GAAI,SAA6B,MAAS,CAAA;AAClF,EAAA,MAAM,iBAAA,GAAoB,OAA2B,MAAS,CAAA;AAC9D,EAAA,MAAM,GAAG,SAAS,CAAA,GAAI,SAAS,CAAC,CAAA;AAEhC,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,WAAW,IAAA,EAAM;AACnB,MAAA;AAAA,IACF;AAKA,IAAA,MAAM,cAAc,MAAA,CAAO,MAAA,CAAO,EAAA,CAAG,kBAAA,EAAoB,CAAC,KAAA,KAAU;AAClE,MAAA,iBAAA,CAAkB,OAAA,GAAU,YAAY,GAAA,EAAI;AAC5C,MAAA,iBAAA,CAAkB,MAAM,UAAU,CAAA;AAAA,IACpC,CAAC,CAAA;AACD,IAAA,OAAO,WAAA;AAAA,EACT,CAAA,EAAG,CAAC,MAAM,CAAC,CAAA;AAEX,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,MAAM,EAAA,GAAK,YAAY,MAAM,SAAA,CAAU,CAAC,IAAA,KAAS,IAAA,GAAO,CAAC,CAAA,EAAG,gBAAgB,CAAA;AAC5E,IAAA,OAAO,MAAM,cAAc,EAAE,CAAA;AAAA,EAC/B,CAAA,EAAG,EAAE,CAAA;AAEL,EAAA,SAAS,GAAA,GAAc;AACrB,IAAA,IAAI,cAAA,KAAmB,MAAA,IAAa,iBAAA,CAAkB,OAAA,KAAY,MAAA,EAAW;AAY3E,MAAA,MAAM,IAAI,KAAA;AAAA,QACR;AAAA,OAEF;AAAA,IACF;AACA,IAAA,MAAM,SAAA,GAAY,WAAA,CAAY,GAAA,EAAI,GAAI,iBAAA,CAAkB,OAAA;AACxD,IAAA,OAAO,IAAI,KAAK,IAAA,CAAK,KAAA,CAAM,cAAc,CAAA,GAAI,SAAS,EAAE,WAAA,EAAY;AAAA,EACtE;AAEA,EAAA,OAAO,EAAE,GAAA,EAAK,aAAA,EAAe,cAAA,EAAe;AAC9C","file":"chunk-XI7MK4Y7.js","sourcesContent":["'use client';\n\n// `08-core-hooks.md §1.6`. The single place that turns the stream of\n// `meta.serverTime` stamps into a usable clock, so no composite reads\n// `meta.serverTime` off an individual response by hand.\n//\n// Hard rule #6 (\"Zero `Date.now()`/`new Date()` local getters in\n// `src/core`\") bans exactly the two calls that fabricate \"now\" from the\n// local wall clock: `Date.now()` and no-argument `new Date()`. This file\n// never calls either. Advancing a SERVER-supplied timestamp by an elapsed\n// delta necessarily needs SOME measure of \"how much local time passed\" —\n// this file measures that with `performance.now()`, a monotonic clock with\n// no relationship to wall-clock \"now\" (it cannot be read as a date, only as\n// a duration), and applies the delta with `new Date(<epoch-ms>)` /\n// `Date.parse(<iso-string>)` — both single-argument forms that operate on a\n// value already anchored to `meta.serverTime`, never on the local clock.\n\nimport { useContext, useEffect, useRef, useState } from 'react';\nimport { OfflineEngineContext } from '../internal/contexts';\n\nexport interface ServerTimeApi {\n now: () => string;\n sinceLastSync: string | undefined;\n}\n\n/** Re-renders any hook consumer often enough for a mounted countdown to look\n * live, without pretending the underlying value moved forward on its own\n * merits (`08-core-hooks.md §1.6`'s sandbox time-travel caveat: this timer\n * forces a re-render, it never advances the stamp past what the last real\n * response justified). */\nconst TICK_INTERVAL_MS = 1000;\n\nexport function useServerTime(): ServerTimeApi {\n const engine = useContext(OfflineEngineContext);\n const [lastServerTime, setLastServerTime] = useState<string | undefined>(undefined);\n const observedAtPerfRef = useRef<number | undefined>(undefined);\n const [, forceTick] = useState(0);\n\n useEffect(() => {\n if (engine === null) {\n return;\n }\n // `snapshot.updated` is the one event in `OfflineEventMap` that carries\n // `serverTime` (`kaafil-js/src/offline/events.ts`, verified this\n // session) — the engine's other five events do not, so this is the only\n // subscription this hook can build without inventing a stamp.\n const unsubscribe = engine.events.on('snapshot.updated', (event) => {\n observedAtPerfRef.current = performance.now();\n setLastServerTime(event.serverTime);\n });\n return unsubscribe;\n }, [engine]);\n\n useEffect(() => {\n const id = setInterval(() => forceTick((tick) => tick + 1), TICK_INTERVAL_MS);\n return () => clearInterval(id);\n }, []);\n\n function now(): string {\n if (lastServerTime === undefined || observedAtPerfRef.current === undefined) {\n // No response has ever landed in this session yet. Fabricating a\n // value from the local wall clock is exactly what hard rule #6\n // forbids — this is the one case this hook cannot silently satisfy\n // its own non-optional return type, so it says so loudly instead.\n // CALLERS: this is a real, expected window — React runs an effect\n // (which is how this hook's own subscription above starts) strictly\n // AFTER the render that needs `now()`'s result has already committed,\n // so a component's very FIRST render can hit this throw even when\n // wired up correctly. Guard the call site, matching\n // `useStaleness.ts`'s own precedent, rather than reaching for a\n // device-clock fallback here (hard rule #6 forbids exactly that).\n throw new Error(\n 'useServerTime().now() was called before any response carrying meta.serverTime ' +\n 'had been observed — there is no server timestamp yet to advance from.',\n );\n }\n const elapsedMs = performance.now() - observedAtPerfRef.current;\n return new Date(Date.parse(lastServerTime) + elapsedMs).toISOString();\n }\n\n return { now, sinceLastSync: lastServerTime };\n}\n"]}
1
+ {"version":3,"sources":["../src/core/hooks/useServerTime.ts"],"names":[],"mappings":";;;AA8BA,IAAM,gBAAA,GAAmB,GAAA;AAElB,SAAS,aAAA,GAA+B;AAC7C,EAAA,MAAM,MAAA,GAAS,WAAW,oBAAoB,CAAA;AAC9C,EAAA,MAAM,CAAC,cAAA,EAAgB,iBAAiB,CAAA,GAAI,SAA6B,MAAS,CAAA;AAClF,EAAA,MAAM,iBAAA,GAAoB,OAA2B,MAAS,CAAA;AAC9D,EAAA,MAAM,GAAG,SAAS,CAAA,GAAI,SAAS,CAAC,CAAA;AAEhC,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,WAAW,IAAA,EAAM;AACnB,MAAA;AAAA,IACF;AAKA,IAAA,MAAM,cAAc,MAAA,CAAO,MAAA,CAAO,EAAA,CAAG,kBAAA,EAAoB,CAAC,KAAA,KAAU;AAClE,MAAA,iBAAA,CAAkB,OAAA,GAAU,YAAY,GAAA,EAAI;AAC5C,MAAA,iBAAA,CAAkB,MAAM,UAAU,CAAA;AAAA,IACpC,CAAC,CAAA;AACD,IAAA,OAAO,WAAA;AAAA,EACT,CAAA,EAAG,CAAC,MAAM,CAAC,CAAA;AAEX,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,MAAM,EAAA,GAAK,YAAY,MAAM,SAAA,CAAU,CAAC,IAAA,KAAS,IAAA,GAAO,CAAC,CAAA,EAAG,gBAAgB,CAAA;AAC5E,IAAA,OAAO,MAAM,cAAc,EAAE,CAAA;AAAA,EAC/B,CAAA,EAAG,EAAE,CAAA;AAEL,EAAA,SAAS,GAAA,GAAc;AACrB,IAAA,IAAI,cAAA,KAAmB,MAAA,IAAa,iBAAA,CAAkB,OAAA,KAAY,MAAA,EAAW;AAY3E,MAAA,MAAM,IAAI,KAAA;AAAA,QACR;AAAA,OAEF;AAAA,IACF;AACA,IAAA,MAAM,SAAA,GAAY,WAAA,CAAY,GAAA,EAAI,GAAI,iBAAA,CAAkB,OAAA;AACxD,IAAA,OAAO,IAAI,KAAK,IAAA,CAAK,KAAA,CAAM,cAAc,CAAA,GAAI,SAAS,EAAE,WAAA,EAAY;AAAA,EACtE;AAEA,EAAA,OAAO,EAAE,GAAA,EAAK,aAAA,EAAe,cAAA,EAAe;AAC9C","file":"chunk-JMWXQTE3.js","sourcesContent":["'use client';\n\n// `08-core-hooks.md §1.6`. The single place that turns the stream of\n// `meta.serverTime` stamps into a usable clock, so no composite reads\n// `meta.serverTime` off an individual response by hand.\n//\n// Hard rule #6 (\"Zero `Date.now()`/`new Date()` local getters in\n// `src/core`\") bans exactly the two calls that fabricate \"now\" from the\n// local wall clock: `Date.now()` and no-argument `new Date()`. This file\n// never calls either. Advancing a SERVER-supplied timestamp by an elapsed\n// delta necessarily needs SOME measure of \"how much local time passed\" —\n// this file measures that with `performance.now()`, a monotonic clock with\n// no relationship to wall-clock \"now\" (it cannot be read as a date, only as\n// a duration), and applies the delta with `new Date(<epoch-ms>)` /\n// `Date.parse(<iso-string>)` — both single-argument forms that operate on a\n// value already anchored to `meta.serverTime`, never on the local clock.\n\nimport { useContext, useEffect, useRef, useState } from 'react';\nimport { OfflineEngineContext } from '../internal/contexts';\n\nexport interface ServerTimeApi {\n now: () => string;\n sinceLastSync: string | undefined;\n}\n\n/** Re-renders any hook consumer often enough for a mounted countdown to look\n * live, without pretending the underlying value moved forward on its own\n * merits (`08-core-hooks.md §1.6`'s sandbox time-travel caveat: this timer\n * forces a re-render, it never advances the stamp past what the last real\n * response justified). */\nconst TICK_INTERVAL_MS = 1000;\n\nexport function useServerTime(): ServerTimeApi {\n const engine = useContext(OfflineEngineContext);\n const [lastServerTime, setLastServerTime] = useState<string | undefined>(undefined);\n const observedAtPerfRef = useRef<number | undefined>(undefined);\n const [, forceTick] = useState(0);\n\n useEffect(() => {\n if (engine === null) {\n return;\n }\n // `snapshot.updated` is the one event in `OfflineEventMap` that carries\n // `serverTime` (`kaafil-js/src/offline/events.ts`, verified this\n // session) — the engine's other five events do not, so this is the only\n // subscription this hook can build without inventing a stamp.\n const unsubscribe = engine.events.on('snapshot.updated', (event) => {\n observedAtPerfRef.current = performance.now();\n setLastServerTime(event.serverTime);\n });\n return unsubscribe;\n }, [engine]);\n\n useEffect(() => {\n const id = setInterval(() => forceTick((tick) => tick + 1), TICK_INTERVAL_MS);\n return () => clearInterval(id);\n }, []);\n\n function now(): string {\n if (lastServerTime === undefined || observedAtPerfRef.current === undefined) {\n // No response has ever landed in this session yet. Fabricating a\n // value from the local wall clock is exactly what hard rule #6\n // forbids — this is the one case this hook cannot silently satisfy\n // its own non-optional return type, so it says so loudly instead.\n // CALLERS: this is a real, expected window — React runs an effect\n // (which is how this hook's own subscription above starts) strictly\n // AFTER the render that needs `now()`'s result has already committed,\n // so a component's very FIRST render can hit this throw even when\n // wired up correctly. Guard the call site, matching\n // `useStaleness.ts`'s own precedent, rather than reaching for a\n // device-clock fallback here (hard rule #6 forbids exactly that).\n throw new Error(\n 'useServerTime().now() was called before any response carrying meta.serverTime ' +\n 'had been observed — there is no server timestamp yet to advance from.',\n );\n }\n const elapsedMs = performance.now() - observedAtPerfRef.current;\n return new Date(Date.parse(lastServerTime) + elapsedMs).toISOString();\n }\n\n return { now, sinceLastSync: lastServerTime };\n}\n"]}
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunkLL243STJ_cjs = require('./chunk-LL243STJ.cjs');
4
- var chunkPTQ2CJKE_cjs = require('./chunk-PTQ2CJKE.cjs');
5
- var chunkEM7JV3D7_cjs = require('./chunk-EM7JV3D7.cjs');
3
+ var chunkWS2DKREI_cjs = require('./chunk-WS2DKREI.cjs');
4
+ var chunkW5PG3IUJ_cjs = require('./chunk-W5PG3IUJ.cjs');
5
+ var chunkV36WWMTF_cjs = require('./chunk-V36WWMTF.cjs');
6
6
  var react = require('react');
7
7
  var client = require('kaafil-js/client');
8
8
 
9
9
  function useAgencyAdminMe() {
10
- const client = chunkEM7JV3D7_cjs.useKaafilClient();
10
+ const client = chunkV36WWMTF_cjs.useKaafilClient();
11
11
  const [result, setResult] = react.useState({ status: "loading" });
12
12
  react.useEffect(() => {
13
13
  let cancelled = false;
@@ -29,7 +29,7 @@ function useAgencyAdminMe() {
29
29
  return result;
30
30
  }
31
31
  function useAgencyChecklistTemplates() {
32
- const client = chunkEM7JV3D7_cjs.useKaafilClient();
32
+ const client = chunkV36WWMTF_cjs.useKaafilClient();
33
33
  const [templates, setTemplates] = react.useState([]);
34
34
  const [loaded, setLoaded] = react.useState(false);
35
35
  const [lastFetchFailed, setLastFetchFailed] = react.useState(false);
@@ -89,7 +89,7 @@ function useAgencyChecklistTemplates() {
89
89
  };
90
90
  }
91
91
  function useAgencyForms() {
92
- const client = chunkEM7JV3D7_cjs.useKaafilClient();
92
+ const client = chunkV36WWMTF_cjs.useKaafilClient();
93
93
  const [forms, setForms] = react.useState([]);
94
94
  const [loaded, setLoaded] = react.useState(false);
95
95
  const [lastFetchFailed, setLastFetchFailed] = react.useState(false);
@@ -245,7 +245,7 @@ function useAgencyForms() {
245
245
  };
246
246
  }
247
247
  function useAgencyJourneyTriggers() {
248
- const client = chunkEM7JV3D7_cjs.useKaafilClient();
248
+ const client = chunkV36WWMTF_cjs.useKaafilClient();
249
249
  const [triggers, setTriggers] = react.useState([]);
250
250
  const [loaded, setLoaded] = react.useState(false);
251
251
  const [lastFetchFailed, setLastFetchFailed] = react.useState(false);
@@ -273,7 +273,7 @@ function useAgencyJourneyTriggers() {
273
273
  return { triggers, loaded, lastFetchFailed, refresh, patchTrigger };
274
274
  }
275
275
  function useAgencyManagerProfile(managerRef) {
276
- const client = chunkEM7JV3D7_cjs.useKaafilClient();
276
+ const client = chunkV36WWMTF_cjs.useKaafilClient();
277
277
  const [read, setRead] = react.useState(void 0);
278
278
  const [readFailed, setReadFailed] = react.useState(false);
279
279
  const refresh = react.useCallback(async () => {
@@ -291,7 +291,7 @@ function useAgencyManagerProfile(managerRef) {
291
291
  return { read, readFailed, refresh };
292
292
  }
293
293
  function useAgencySettings() {
294
- const client = chunkEM7JV3D7_cjs.useKaafilClient();
294
+ const client = chunkV36WWMTF_cjs.useKaafilClient();
295
295
  const [document, setDocument] = react.useState(void 0);
296
296
  const [loaded, setLoaded] = react.useState(false);
297
297
  const [lastFetchFailed, setLastFetchFailed] = react.useState(false);
@@ -319,7 +319,7 @@ function useAgencySettings() {
319
319
  return { document, loaded, lastFetchFailed, refresh, patchSettings };
320
320
  }
321
321
  function useAgencyTrip(tripRef) {
322
- const client = chunkEM7JV3D7_cjs.useKaafilClient();
322
+ const client = chunkV36WWMTF_cjs.useKaafilClient();
323
323
  const [read, setRead] = react.useState(void 0);
324
324
  const [readFailed, setReadFailed] = react.useState(false);
325
325
  const refresh = react.useCallback(async () => {
@@ -339,7 +339,7 @@ function useAgencyTrip(tripRef) {
339
339
  var DEFAULT_PAGE_LIMIT = 20;
340
340
  var GROUPED_PAGE_LIMIT = 200;
341
341
  function useAgencyTripManifest(tripRef) {
342
- const client = chunkEM7JV3D7_cjs.useKaafilClient();
342
+ const client = chunkV36WWMTF_cjs.useKaafilClient();
343
343
  const [facets, setFacets] = react.useState(void 0);
344
344
  const mountedRef = react.useRef(true);
345
345
  react.useEffect(() => {
@@ -370,7 +370,7 @@ function useAgencyTripManifest(tripRef) {
370
370
  }
371
371
  var DEFAULT_PAGE_LIMIT2 = 20;
372
372
  function useAgencyTrips() {
373
- const client = chunkEM7JV3D7_cjs.useKaafilClient();
373
+ const client = chunkV36WWMTF_cjs.useKaafilClient();
374
374
  const [segmentCounts, setSegmentCounts] = react.useState(
375
375
  void 0
376
376
  );
@@ -400,18 +400,18 @@ function useAgencyTrips() {
400
400
  );
401
401
  return { makeTripsFetch, segmentCounts };
402
402
  }
403
- var useBookingsInternal = chunkLL243STJ_cjs.createDomainHook("bookings", (tripRef) => {
403
+ var useBookingsInternal = chunkWS2DKREI_cjs.createDomainHook("bookings", (tripRef) => {
404
404
  const {
405
405
  rows: bookings,
406
406
  syncedAt,
407
407
  refreshLive
408
- } = chunkLL243STJ_cjs.useSnapshotList(tripRef, "bookings", {
408
+ } = chunkWS2DKREI_cjs.useSnapshotList(tripRef, "bookings", {
409
409
  live: async (liveClient, ref) => {
410
410
  const response = await liveClient.bookings.list({ tripRef: ref });
411
411
  return { rows: [...response], syncedAt: response.meta.serverTime };
412
412
  }
413
413
  });
414
- const vouchersMutation = chunkEM7JV3D7_cjs.useOfflineMutation({
414
+ const vouchersMutation = chunkV36WWMTF_cjs.useOfflineMutation({
415
415
  tripRef,
416
416
  enqueue: (engine, input) => engine.enqueue({
417
417
  tripRef,
@@ -448,10 +448,10 @@ function useBookings(tripRef) {
448
448
  return useBookingsInternal(tripRef);
449
449
  }
450
450
  function useCapabilityStatuses(tripRef) {
451
- const { rows, loaded } = chunkEM7JV3D7_cjs.useCapabilityRows(tripRef);
451
+ const { rows, loaded } = chunkV36WWMTF_cjs.useCapabilityRows(tripRef);
452
452
  const statuses = react.useMemo(() => {
453
453
  const map = /* @__PURE__ */ new Map();
454
- for (const row of rows) map.set(row.capability, chunkEM7JV3D7_cjs.deriveCapabilityTriple(row).status);
454
+ for (const row of rows) map.set(row.capability, chunkV36WWMTF_cjs.deriveCapabilityTriple(row).status);
455
455
  return map;
456
456
  }, [rows]);
457
457
  return { statuses, loaded };
@@ -469,8 +469,8 @@ var DirectoriesWriteError = class _DirectoriesWriteError extends Error {
469
469
  }
470
470
  };
471
471
  function useDirectories(agencyRef) {
472
- const client = chunkEM7JV3D7_cjs.useKaafilClient();
473
- const serverTime = chunkPTQ2CJKE_cjs.useServerTime();
472
+ const client = chunkV36WWMTF_cjs.useKaafilClient();
473
+ const serverTime = chunkW5PG3IUJ_cjs.useServerTime();
474
474
  const makeManagersFetch = react.useCallback(
475
475
  (filters) => async (cursor) => {
476
476
  const page = await client.agencies.managers.listPage({
@@ -517,7 +517,7 @@ function useDirectories(agencyRef) {
517
517
  isLead: input.isLead
518
518
  });
519
519
  } catch (error) {
520
- throw new DirectoriesWriteError(chunkLL243STJ_cjs.classifyError(error));
520
+ throw new DirectoriesWriteError(chunkWS2DKREI_cjs.classifyError(error));
521
521
  }
522
522
  },
523
523
  [client]
@@ -532,7 +532,7 @@ function useDirectories(agencyRef) {
532
532
  ...input.isLead === void 0 ? {} : { isLead: input.isLead }
533
533
  });
534
534
  } catch (error) {
535
- throw new DirectoriesWriteError(chunkLL243STJ_cjs.classifyError(error));
535
+ throw new DirectoriesWriteError(chunkWS2DKREI_cjs.classifyError(error));
536
536
  }
537
537
  },
538
538
  [client]
@@ -545,7 +545,7 @@ function useDirectories(agencyRef) {
545
545
  managerRef: input.managerRef
546
546
  });
547
547
  } catch (error) {
548
- throw new DirectoriesWriteError(chunkLL243STJ_cjs.classifyError(error));
548
+ throw new DirectoriesWriteError(chunkWS2DKREI_cjs.classifyError(error));
549
549
  }
550
550
  },
551
551
  [client]
@@ -581,7 +581,7 @@ function useDirectories(agencyRef) {
581
581
  if (error instanceof DirectoriesWriteError) {
582
582
  throw error;
583
583
  }
584
- throw new DirectoriesWriteError(chunkLL243STJ_cjs.classifyError(error));
584
+ throw new DirectoriesWriteError(chunkWS2DKREI_cjs.classifyError(error));
585
585
  }
586
586
  },
587
587
  [client, serverTime]
@@ -597,7 +597,7 @@ function useDirectories(agencyRef) {
597
597
  externalTravellerId: input.externalTravellerId
598
598
  });
599
599
  } catch (error) {
600
- throw new DirectoriesWriteError(chunkLL243STJ_cjs.classifyError(error));
600
+ throw new DirectoriesWriteError(chunkWS2DKREI_cjs.classifyError(error));
601
601
  }
602
602
  },
603
603
  [client]
@@ -610,7 +610,7 @@ function useDirectories(agencyRef) {
610
610
  travellerRef: input.travellerRef
611
611
  });
612
612
  } catch (error) {
613
- throw new DirectoriesWriteError(chunkLL243STJ_cjs.classifyError(error));
613
+ throw new DirectoriesWriteError(chunkWS2DKREI_cjs.classifyError(error));
614
614
  }
615
615
  },
616
616
  [client]
@@ -625,7 +625,7 @@ function useDirectories(agencyRef) {
625
625
  travellerRefs: [...input.travellerRefs]
626
626
  });
627
627
  } catch (error) {
628
- throw new DirectoriesWriteError(chunkLL243STJ_cjs.classifyError(error));
628
+ throw new DirectoriesWriteError(chunkWS2DKREI_cjs.classifyError(error));
629
629
  }
630
630
  },
631
631
  [client]
@@ -642,7 +642,7 @@ function useDirectories(agencyRef) {
642
642
  ...input.travellerRefs !== void 0 ? { travellerRefs: [...input.travellerRefs] } : {}
643
643
  });
644
644
  } catch (error) {
645
- throw new DirectoriesWriteError(chunkLL243STJ_cjs.classifyError(error));
645
+ throw new DirectoriesWriteError(chunkWS2DKREI_cjs.classifyError(error));
646
646
  }
647
647
  },
648
648
  [client]
@@ -652,7 +652,7 @@ function useDirectories(agencyRef) {
652
652
  try {
653
653
  await client.trips.parties.remove({ tripRef: input.tripRef, partyId: input.partyId });
654
654
  } catch (error) {
655
- throw new DirectoriesWriteError(chunkLL243STJ_cjs.classifyError(error));
655
+ throw new DirectoriesWriteError(chunkWS2DKREI_cjs.classifyError(error));
656
656
  }
657
657
  },
658
658
  [client]
@@ -666,7 +666,7 @@ function useDirectories(agencyRef) {
666
666
  body: input.body
667
667
  });
668
668
  } catch (error) {
669
- throw new DirectoriesWriteError(chunkLL243STJ_cjs.classifyError(error));
669
+ throw new DirectoriesWriteError(chunkWS2DKREI_cjs.classifyError(error));
670
670
  }
671
671
  },
672
672
  [client]
@@ -750,7 +750,7 @@ var ShareLinkWriteError = class extends Error {
750
750
  }
751
751
  };
752
752
  function useShareLinks(tripRef, travellerRef) {
753
- const client = chunkEM7JV3D7_cjs.useKaafilClient();
753
+ const client = chunkV36WWMTF_cjs.useKaafilClient();
754
754
  const [links, setLinks] = react.useState(void 0);
755
755
  const [readFailed, setReadFailed] = react.useState(false);
756
756
  const refresh = react.useCallback(async () => {
@@ -781,7 +781,7 @@ function useShareLinks(tripRef, travellerRef) {
781
781
  await refresh();
782
782
  return minted;
783
783
  } catch (error) {
784
- throw new ShareLinkWriteError(chunkLL243STJ_cjs.classifyError(error));
784
+ throw new ShareLinkWriteError(chunkWS2DKREI_cjs.classifyError(error));
785
785
  }
786
786
  },
787
787
  [client, tripRef, refresh]
@@ -792,7 +792,7 @@ function useShareLinks(tripRef, travellerRef) {
792
792
  await client.shareTokens.revoke({ id });
793
793
  await refresh();
794
794
  } catch (error) {
795
- throw new ShareLinkWriteError(chunkLL243STJ_cjs.classifyError(error));
795
+ throw new ShareLinkWriteError(chunkWS2DKREI_cjs.classifyError(error));
796
796
  }
797
797
  },
798
798
  [client, refresh]
@@ -808,7 +808,7 @@ function useShareLinks(tripRef, travellerRef) {
808
808
  });
809
809
  await refresh();
810
810
  } catch (error) {
811
- throw new ShareLinkWriteError(chunkLL243STJ_cjs.classifyError(error));
811
+ throw new ShareLinkWriteError(chunkWS2DKREI_cjs.classifyError(error));
812
812
  }
813
813
  },
814
814
  [client, refresh]
@@ -820,7 +820,7 @@ function useShareLinks(tripRef, travellerRef) {
820
820
  await refresh();
821
821
  return minted;
822
822
  } catch (error) {
823
- throw new ShareLinkWriteError(chunkLL243STJ_cjs.classifyError(error));
823
+ throw new ShareLinkWriteError(chunkWS2DKREI_cjs.classifyError(error));
824
824
  }
825
825
  },
826
826
  [client, refresh]
@@ -828,7 +828,7 @@ function useShareLinks(tripRef, travellerRef) {
828
828
  return { links, readFailed, refresh, mint, revoke, patch, regenerate };
829
829
  }
830
830
  function useTravellerFormResponses(tripRef, travellerRef) {
831
- const client = chunkEM7JV3D7_cjs.useKaafilClient();
831
+ const client = chunkV36WWMTF_cjs.useKaafilClient();
832
832
  const [responses, setResponses] = react.useState(
833
833
  void 0
834
834
  );
@@ -954,5 +954,5 @@ exports.useDirectories = useDirectories;
954
954
  exports.usePaginatedList = usePaginatedList;
955
955
  exports.useShareLinks = useShareLinks;
956
956
  exports.useTravellerFormResponses = useTravellerFormResponses;
957
- //# sourceMappingURL=chunk-PJRZCOFF.cjs.map
958
- //# sourceMappingURL=chunk-PJRZCOFF.cjs.map
957
+ //# sourceMappingURL=chunk-M2D6CZK2.cjs.map
958
+ //# sourceMappingURL=chunk-M2D6CZK2.cjs.map