@civitai/blocks-react 0.27.0 → 0.29.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.
- package/README.md +148 -0
- package/dist/hooks/useAppWorkflows.d.ts +54 -0
- package/dist/hooks/useAppWorkflows.d.ts.map +1 -0
- package/dist/hooks/useAppWorkflows.js +82 -0
- package/dist/hooks/useAppWorkflows.js.map +1 -0
- package/dist/hooks/useBlockToken.d.ts +6 -0
- package/dist/hooks/useBlockToken.d.ts.map +1 -1
- package/dist/hooks/useBlockToken.js +24 -11
- package/dist/hooks/useBlockToken.js.map +1 -1
- package/dist/hooks/useGenerationResources.d.ts.map +1 -1
- package/dist/hooks/useGenerationResources.js +45 -8
- package/dist/hooks/useGenerationResources.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/internal/liveHost.d.ts.map +1 -1
- package/dist/internal/liveHost.js +245 -0
- package/dist/internal/liveHost.js.map +1 -1
- package/dist/internal/mockHost.d.ts +22 -2
- package/dist/internal/mockHost.d.ts.map +1 -1
- package/dist/internal/mockHost.js +141 -0
- package/dist/internal/mockHost.js.map +1 -1
- package/dist/internal/validate.d.ts +72 -0
- package/dist/internal/validate.d.ts.map +1 -1
- package/dist/internal/validate.js +475 -0
- package/dist/internal/validate.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -293,6 +293,36 @@ if (error instanceof WildcardPackError && error.code === 'busy') void refetch();
|
|
|
293
293
|
if (!loading && pack) console.log(Object.keys(pack.lists));
|
|
294
294
|
```
|
|
295
295
|
|
|
296
|
+
### `useAppWorkflows(params?)`
|
|
297
|
+
|
|
298
|
+
The calling app's **own** generator subqueue — the tag-scoped list of generations
|
|
299
|
+
**this app** produced for the viewer (newest-first), plus a fail-closed `cancel`.
|
|
300
|
+
The host self-binds the account off the block token and **forces** the per-app tag
|
|
301
|
+
filter, so a block only ever sees the queue it produced — never the viewer's
|
|
302
|
+
personal queue or another app's. Returns `{ workflows, cursor, loading, error,
|
|
303
|
+
refetch, cancel }`; each `AppWorkflow` is `{ workflowId, status, images[], cost,
|
|
304
|
+
createdAt }`. Pass the returned `cursor` back as `params.cursor` to page forward.
|
|
305
|
+
Requires `ai:write:budgeted` (same trust boundary as submit); host-mediated over
|
|
306
|
+
`QUERY_APP_WORKFLOWS` / `CANCEL_APP_WORKFLOW`.
|
|
307
|
+
|
|
308
|
+
`cancel(workflowId)` sends `CANCEL_APP_WORKFLOW`, resolves once the host confirms
|
|
309
|
+
the terminal state (which is optimistically spliced into `workflows` in place — no
|
|
310
|
+
refetch round-trip), and rejects with the host's error on failure.
|
|
311
|
+
|
|
312
|
+
```tsx
|
|
313
|
+
const { workflows, cursor, loading, error, refetch, cancel } = useAppWorkflows({ limit: 20 });
|
|
314
|
+
if (!loading && !error) {
|
|
315
|
+
workflows.forEach((w) => console.log(w.workflowId, w.status, w.images.length, w.cost));
|
|
316
|
+
}
|
|
317
|
+
async function onCancel(id: string) {
|
|
318
|
+
try {
|
|
319
|
+
await cancel(id); // optimistically flips the row to `canceled`
|
|
320
|
+
} catch (err) {
|
|
321
|
+
console.error('cancel failed', err);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
```
|
|
325
|
+
|
|
296
326
|
### `useAppStorage()`
|
|
297
327
|
|
|
298
328
|
Per-(block instance, viewer) KV datastore, host-mediated. 64 KB per value,
|
|
@@ -307,6 +337,21 @@ const { keys } = await storage.list({ prefix: 'note-' });
|
|
|
307
337
|
const quota = await storage.getQuota(); // { usedBytes, rowCount, limitBytes, limitRows }
|
|
308
338
|
```
|
|
309
339
|
|
|
340
|
+
### `useSharedStorage()`
|
|
341
|
+
|
|
342
|
+
App-scoped, append-only, community-votable SHARED datastore (every viewer sees
|
|
343
|
+
the same list). Sibling of `useAppStorage`; anonymous viewers get the read path
|
|
344
|
+
and a hard reject on mutations.
|
|
345
|
+
|
|
346
|
+
```tsx
|
|
347
|
+
const shared = useSharedStorage();
|
|
348
|
+
const { key } = await shared.append({ title: 'Add dark mode', body: 'please' });
|
|
349
|
+
const { items } = await shared.list({ limit: 20 }); // newest-first
|
|
350
|
+
const count = await shared.vote(key); // idempotent up-vote
|
|
351
|
+
await shared.unvote(key);
|
|
352
|
+
await shared.withdraw(key); // remove my own entry
|
|
353
|
+
```
|
|
354
|
+
|
|
310
355
|
### `useCheckpointPicker()`
|
|
311
356
|
|
|
312
357
|
Drive the platform Checkpoint picker + persist a viewer override.
|
|
@@ -317,6 +362,55 @@ const { selected } = await open({ baseModelGroup: 'SDXL', currentVersionId });
|
|
|
317
362
|
if (selected) await persist(selected.versionId); // null clears the override
|
|
318
363
|
```
|
|
319
364
|
|
|
365
|
+
### `useResourcePicker()`
|
|
366
|
+
|
|
367
|
+
Drive the platform resource picker for page blocks — `'Checkpoint' | 'LORA'`.
|
|
368
|
+
The viewer searches in host chrome; the block only ever sees the one resource it
|
|
369
|
+
picked. DISCOVERY ONLY — the returned `versionId` is re-validated + re-priced
|
|
370
|
+
server-side at estimate/submit.
|
|
371
|
+
|
|
372
|
+
```tsx
|
|
373
|
+
const { open } = useResourcePicker();
|
|
374
|
+
const picked = await open({ resourceType: 'LORA', baseModelGroup: 'SDXL' });
|
|
375
|
+
if (picked) {
|
|
376
|
+
const versionId = picked.versionId; // feed into body.additionalResources
|
|
377
|
+
const weight = picked.strength; // recommended default weight (may be undefined)
|
|
378
|
+
}
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
### `useImageUpload()`
|
|
382
|
+
|
|
383
|
+
Host-mediated image upload — the host opens its native upload modal and the
|
|
384
|
+
iframe never handles the bytes. Resolves with a moderated image (or `null` on
|
|
385
|
+
dismiss); pass `{ purpose: 'generationSource' }` for an unscanned img2img source
|
|
386
|
+
or `{ asyncScan: true }` for the early-resolve + `scanStatus()` flow.
|
|
387
|
+
|
|
388
|
+
```tsx
|
|
389
|
+
const { open } = useImageUpload();
|
|
390
|
+
const img = await open(); // BlockUploadedImageInfo | null
|
|
391
|
+
if (img) {
|
|
392
|
+
await submit({
|
|
393
|
+
kind: 'textToImage',
|
|
394
|
+
modelId,
|
|
395
|
+
modelVersionId,
|
|
396
|
+
sourceImage: { url: img.url, width: 1024, height: 1024 },
|
|
397
|
+
params: { prompt },
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
### `useGenerationResources()`
|
|
403
|
+
|
|
404
|
+
Rehydrate a saved set of generation resources by version id — WITHOUT re-opening
|
|
405
|
+
the picker. Returns the same widened projection `useResourcePicker` yields
|
|
406
|
+
(recommended weights, trigger words, clipSkip). DISCOVERY ONLY.
|
|
407
|
+
|
|
408
|
+
```tsx
|
|
409
|
+
const { fetch } = useGenerationResources();
|
|
410
|
+
const resources = await fetch([691639, 666002]); // by saved versionIds
|
|
411
|
+
const first = resources[0]; // .versionId / .strength / .trainedWords / .clipSkip
|
|
412
|
+
```
|
|
413
|
+
|
|
320
414
|
### `useCivitaiNavigate()`
|
|
321
415
|
|
|
322
416
|
Request a navigation within civitai.com (host-mediated; fire-and-forget).
|
|
@@ -335,6 +429,56 @@ const { track } = useBlockAnalytics();
|
|
|
335
429
|
track('generate_clicked', { modelId });
|
|
336
430
|
```
|
|
337
431
|
|
|
432
|
+
### `useRequestSignIn()`
|
|
433
|
+
|
|
434
|
+
Ask the host to open its sign-in flow for an ANONYMOUS viewer (fire-and-forget).
|
|
435
|
+
On sign-in the host re-inits the block with the now-authenticated viewer.
|
|
436
|
+
|
|
437
|
+
```tsx
|
|
438
|
+
const { requestSignIn } = useRequestSignIn();
|
|
439
|
+
// e.g. onClick of a "Sign in to generate" button:
|
|
440
|
+
requestSignIn();
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
### `useRequestConsent()`
|
|
444
|
+
|
|
445
|
+
Lazy consent: ask the host to open its consent UI when a LOGGED-IN viewer takes
|
|
446
|
+
an action whose consent-gated scope the block token is missing (e.g. Generate
|
|
447
|
+
needs `ai:write:budgeted` but the viewer hasn't granted it). Fire-and-forget —
|
|
448
|
+
on grant the host pushes a new token; observe `useBlockToken().scopes` and retry.
|
|
449
|
+
|
|
450
|
+
```tsx
|
|
451
|
+
const { requestConsent } = useRequestConsent();
|
|
452
|
+
requestConsent({ scopes: ['ai:write:budgeted', 'buzz:read:self'] });
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
### `useDomainMaturity()`
|
|
456
|
+
|
|
457
|
+
Read the surrounding color-domain's maturity ceiling (civitai #2670) so a block
|
|
458
|
+
can hide/blur mature affordances on a SFW domain. **Fail-closed SFW** until
|
|
459
|
+
`BLOCK_INIT` lands or against a host that predates the field.
|
|
460
|
+
|
|
461
|
+
```tsx
|
|
462
|
+
const { isSfw, isLevelAllowed } = useDomainMaturity();
|
|
463
|
+
const showRSlider = isLevelAllowed(BrowsingLevel.R); // false on a SFW domain
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
### `SfwGate`
|
|
467
|
+
|
|
468
|
+
Convenience component that renders `children` only when the domain permits the
|
|
469
|
+
maturity — no `level` prop gates on the SFW ceiling, a `level` prop gates on that
|
|
470
|
+
browsing-level bit. Fail-closed SFW.
|
|
471
|
+
|
|
472
|
+
```tsx
|
|
473
|
+
function MatureSection() {
|
|
474
|
+
return (
|
|
475
|
+
<SfwGate level={BrowsingLevel.R} fallback={<SafePlaceholder />}>
|
|
476
|
+
<RRatedControl />
|
|
477
|
+
</SfwGate>
|
|
478
|
+
);
|
|
479
|
+
}
|
|
480
|
+
```
|
|
481
|
+
|
|
338
482
|
## The `/ui` subexport
|
|
339
483
|
|
|
340
484
|
Opinionated components, imported separately so a transport-only block stays lean.
|
|
@@ -469,6 +613,10 @@ Runnable, minimal blocks — one per feature, each with its own README:
|
|
|
469
613
|
|
|
470
614
|
| `@civitai/blocks-react` | pairs with `@civitai/app-sdk` | adds |
|
|
471
615
|
|---|---|---|
|
|
616
|
+
| `0.29.x` | `^0.24.0` | `useAppWorkflows()` — app generator subqueue read + cancel (`QUERY_APP_WORKFLOWS` / `CANCEL_APP_WORKFLOW`) |
|
|
617
|
+
| `0.27.x`–`0.28.x` | `^0.23.0` | async-scan image upload; transport validators for all `SHARED_*` / `APP_STORAGE_*` / picker replies |
|
|
618
|
+
| `0.26.x` | `^0.22.0` | `useViewer()` (`GET_VIEWER`) |
|
|
619
|
+
| `0.25.x` | `^0.21.0` | `useBuzzTransactions`, `useBuzzAccounts`, `useDailyCompensation`, `useWildcardPack` |
|
|
472
620
|
| `0.5.0` | `^0.7.0` | `useBuzzWorkflow().cancel()` (real server-side cancel, gotcha #51) |
|
|
473
621
|
| `0.4.x` | `^0.6.0` | `useAppStorage`, `SettingsForm` (`/ui`) |
|
|
474
622
|
| `0.3.x` | `^0.5.0` | earlier hook set |
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { AppWorkflow, AppWorkflowsParams } from '@civitai/app-sdk/blocks';
|
|
2
|
+
export type { AppWorkflow, AppWorkflowsParams };
|
|
3
|
+
/**
|
|
4
|
+
* What {@link useAppWorkflows} returns.
|
|
5
|
+
*/
|
|
6
|
+
export interface UseAppWorkflows {
|
|
7
|
+
/** The current page's workflows (newest-first). `[]` until the first successful fetch. */
|
|
8
|
+
workflows: AppWorkflow[];
|
|
9
|
+
/**
|
|
10
|
+
* The next-page cursor, or `null` when there's no further page. Pass it back as
|
|
11
|
+
* `params.cursor` on a subsequent call to page forward.
|
|
12
|
+
*/
|
|
13
|
+
cursor: string | null;
|
|
14
|
+
/** `true` while a fetch (initial or `refetch`) is in flight. */
|
|
15
|
+
loading: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The last fetch's failure — a host-reported error (anon viewer / missing
|
|
18
|
+
* `ai:write:budgeted` scope / rate-limit / host failure) or the transport
|
|
19
|
+
* timeout. Free-text. Cleared at the start of the next fetch. A failed
|
|
20
|
+
* {@link cancel} does NOT set this (it rejects its own promise instead).
|
|
21
|
+
*/
|
|
22
|
+
error: Error | null;
|
|
23
|
+
/** Re-request the current page. */
|
|
24
|
+
refetch: () => void;
|
|
25
|
+
/**
|
|
26
|
+
* Cancel ONE workflow in this app's subqueue (host `CANCEL_APP_WORKFLOW`). The
|
|
27
|
+
* host is FAIL-CLOSED — it verifies the viewer/app own the workflow before the
|
|
28
|
+
* orchestrator cancel — so a block can only cancel a gen it submitted. Resolves
|
|
29
|
+
* once the host confirms the terminal state, which is OPTIMISTICALLY spliced
|
|
30
|
+
* into `workflows` in place (no refetch round-trip); rejects with the host's
|
|
31
|
+
* free-text error on failure (FORBIDDEN / transport). Unmount-safe.
|
|
32
|
+
*/
|
|
33
|
+
cancel: (workflowId: string) => Promise<void>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Read (and cancel within) the calling app's OWN generator SUBQUEUE — the
|
|
37
|
+
* tag-scoped list of generations THIS app produced for the viewer, newest-first —
|
|
38
|
+
* through the host-mediated `QUERY_APP_WORKFLOWS` → `APP_WORKFLOWS_RESULT` and
|
|
39
|
+
* `CANCEL_APP_WORKFLOW` → `CANCEL_APP_WORKFLOW_RESULT` bridges. Token-bound: the
|
|
40
|
+
* host self-binds the account off the block token and FORCES the per-app tag
|
|
41
|
+
* filter (scope `ai:write:budgeted`, same trust boundary as submit) — the block
|
|
42
|
+
* can never widen the filter or reach another user's / their personal queue.
|
|
43
|
+
*
|
|
44
|
+
* Fetches on mount and whenever `params` change (by value), and exposes `refetch`.
|
|
45
|
+
* A host that never answers surfaces as an `error` after the transport's request
|
|
46
|
+
* timeout — the hook never hangs. Late responses that arrive after unmount are
|
|
47
|
+
* ignored.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* const { workflows, cursor, loading, error, cancel } = useAppWorkflows({ limit: 20 });
|
|
51
|
+
* // …render each workflow's images; await cancel(w.workflowId) on a Cancel click.
|
|
52
|
+
*/
|
|
53
|
+
export declare function useAppWorkflows(params?: AppWorkflowsParams): UseAppWorkflows;
|
|
54
|
+
//# sourceMappingURL=useAppWorkflows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAppWorkflows.d.ts","sourceRoot":"","sources":["../../src/hooks/useAppWorkflows.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAK/E,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,0FAA0F;IAC1F,SAAS,EAAE,WAAW,EAAE,CAAC;IACzB;;;OAGG;IACH,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,gEAAgE;IAChE,OAAO,EAAE,OAAO,CAAC;IACjB;;;;;OAKG;IACH,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,mCAAmC;IACnC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;;;;;OAOG;IACH,MAAM,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/C;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,eAAe,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,eAAe,CAyE5E"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { getTransport } from '../internal/singleton.js';
|
|
3
|
+
import { sendTypedRequest } from '../internal/transport.js';
|
|
4
|
+
/**
|
|
5
|
+
* Read (and cancel within) the calling app's OWN generator SUBQUEUE — the
|
|
6
|
+
* tag-scoped list of generations THIS app produced for the viewer, newest-first —
|
|
7
|
+
* through the host-mediated `QUERY_APP_WORKFLOWS` → `APP_WORKFLOWS_RESULT` and
|
|
8
|
+
* `CANCEL_APP_WORKFLOW` → `CANCEL_APP_WORKFLOW_RESULT` bridges. Token-bound: the
|
|
9
|
+
* host self-binds the account off the block token and FORCES the per-app tag
|
|
10
|
+
* filter (scope `ai:write:budgeted`, same trust boundary as submit) — the block
|
|
11
|
+
* can never widen the filter or reach another user's / their personal queue.
|
|
12
|
+
*
|
|
13
|
+
* Fetches on mount and whenever `params` change (by value), and exposes `refetch`.
|
|
14
|
+
* A host that never answers surfaces as an `error` after the transport's request
|
|
15
|
+
* timeout — the hook never hangs. Late responses that arrive after unmount are
|
|
16
|
+
* ignored.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* const { workflows, cursor, loading, error, cancel } = useAppWorkflows({ limit: 20 });
|
|
20
|
+
* // …render each workflow's images; await cancel(w.workflowId) on a Cancel click.
|
|
21
|
+
*/
|
|
22
|
+
export function useAppWorkflows(params) {
|
|
23
|
+
const [workflows, setWorkflows] = useState([]);
|
|
24
|
+
const [cursor, setCursor] = useState(null);
|
|
25
|
+
const [loading, setLoading] = useState(true);
|
|
26
|
+
const [error, setError] = useState(null);
|
|
27
|
+
const mountedRef = useRef(true);
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
mountedRef.current = true;
|
|
30
|
+
return () => {
|
|
31
|
+
mountedRef.current = false;
|
|
32
|
+
};
|
|
33
|
+
}, []);
|
|
34
|
+
// Serialize the params to a stable key so `refetch`'s identity only changes
|
|
35
|
+
// when the params VALUE changes (not on every render's fresh object). The
|
|
36
|
+
// callback re-parses the key so it closes over NOTHING but the key.
|
|
37
|
+
const paramsKey = params ? JSON.stringify(params) : '';
|
|
38
|
+
const refetch = useCallback(() => {
|
|
39
|
+
setLoading(true);
|
|
40
|
+
setError(null);
|
|
41
|
+
const parsed = paramsKey ? JSON.parse(paramsKey) : undefined;
|
|
42
|
+
const payload = parsed ? { params: parsed } : {};
|
|
43
|
+
sendTypedRequest(getTransport(), { type: 'QUERY_APP_WORKFLOWS', payload }, 'APP_WORKFLOWS_RESULT')
|
|
44
|
+
.then((result) => {
|
|
45
|
+
if (!mountedRef.current)
|
|
46
|
+
return;
|
|
47
|
+
if (result.error || !result.result) {
|
|
48
|
+
setError(new Error(result.error ?? 'failed to fetch app workflows'));
|
|
49
|
+
setLoading(false);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
setWorkflows(result.result.workflows);
|
|
53
|
+
setCursor(result.result.cursor ?? null);
|
|
54
|
+
setLoading(false);
|
|
55
|
+
})
|
|
56
|
+
.catch((err) => {
|
|
57
|
+
if (!mountedRef.current)
|
|
58
|
+
return;
|
|
59
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
60
|
+
setLoading(false);
|
|
61
|
+
});
|
|
62
|
+
}, [paramsKey]);
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
refetch();
|
|
65
|
+
}, [refetch]);
|
|
66
|
+
const cancel = useCallback(async (workflowId) => {
|
|
67
|
+
const reply = await sendTypedRequest(getTransport(), { type: 'CANCEL_APP_WORKFLOW', payload: { workflowId } }, 'CANCEL_APP_WORKFLOW_RESULT');
|
|
68
|
+
if (reply.error || !reply.result) {
|
|
69
|
+
throw new Error(reply.error ?? 'failed to cancel workflow');
|
|
70
|
+
}
|
|
71
|
+
const canceled = reply.result.workflow;
|
|
72
|
+
// Optimistically splice the terminal (canceled) projection into the current
|
|
73
|
+
// page in place — no refetch round-trip. Functional update so it never races
|
|
74
|
+
// a concurrent refetch's stale closure. Only touches the row if it's present
|
|
75
|
+
// (the host returns the canceled workflow regardless).
|
|
76
|
+
if (mountedRef.current) {
|
|
77
|
+
setWorkflows((prev) => prev.map((w) => (w.workflowId === canceled.workflowId ? canceled : w)));
|
|
78
|
+
}
|
|
79
|
+
}, []);
|
|
80
|
+
return { workflows, cursor, loading, error, refetch, cancel };
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=useAppWorkflows.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAppWorkflows.js","sourceRoot":"","sources":["../../src/hooks/useAppWorkflows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM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AAE,OAAO,EAAE,EAAE,UAAU,EAAE,EAAE,EACxD,4BAA4B,CAC7B,CAAC;QACF,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,IAAI,2BAA2B,CAAC,CAAC;QAC9D,CAAC;QACD,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC;QACvC,4EAA4E;QAC5E,6EAA6E;QAC7E,6EAA6E;QAC7E,uDAAuD;QACvD,IAAI,UAAU,CAAC,OAAO,EAAE,CAAC;YACvB,YAAY,CAAC,CAAC,IAAI,EAAE,EAAE,CACpB,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,KAAK,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CACvE,CAAC;QACJ,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;AAChE,CAAC"}
|
|
@@ -20,4 +20,10 @@ import type { BlockToken } from '@civitai/app-sdk/blocks';
|
|
|
20
20
|
export declare function useBlockToken(): BlockToken & {
|
|
21
21
|
refresh: () => Promise<void>;
|
|
22
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* Mint/await a token refresh for one block instance, coalescing concurrent calls
|
|
25
|
+
* for the SAME `blockInstanceId`. Exported for the inline-mode multi-instance
|
|
26
|
+
* dedup test — hooks call it via `useBlockToken().refresh`.
|
|
27
|
+
*/
|
|
28
|
+
export declare function requestRefresh(blockInstanceId: string): Promise<void>;
|
|
23
29
|
//# sourceMappingURL=useBlockToken.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBlockToken.d.ts","sourceRoot":"","sources":["../../src/hooks/useBlockToken.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAS1D;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,IAAI,UAAU,GAAG;IAAE,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAwB7E"}
|
|
1
|
+
{"version":3,"file":"useBlockToken.d.ts","sourceRoot":"","sources":["../../src/hooks/useBlockToken.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAS1D;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,IAAI,UAAU,GAAG;IAAE,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAwB7E;AAiBD;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAe3E"}
|
|
@@ -47,22 +47,35 @@ export function useBlockToken() {
|
|
|
47
47
|
return { ...token, refresh: () => requestRefresh(instanceId) };
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
|
-
* In-flight dedup
|
|
51
|
-
* synchronous path can fire while a previous refresh is
|
|
52
|
-
* coalescing into a single round-trip avoids fanning out
|
|
53
|
-
* REQUEST_TOKEN messages, which would otherwise hit the host once per
|
|
50
|
+
* In-flight dedup, keyed by `blockInstanceId`. Both the scheduled-timeout path
|
|
51
|
+
* and the "already past" synchronous path can fire while a previous refresh is
|
|
52
|
+
* still pending — coalescing into a single round-trip avoids fanning out
|
|
53
|
+
* duplicate REQUEST_TOKEN messages, which would otherwise hit the host once per
|
|
54
54
|
* snapshot update.
|
|
55
|
+
*
|
|
56
|
+
* The key MUST include `blockInstanceId`: in iframe mode there is one module per
|
|
57
|
+
* iframe so any key works, but on the INLINE transport (v2) several block
|
|
58
|
+
* instances share one module context. A module-global singleton would coalesce
|
|
59
|
+
* across instances, so instance B's 401-retry `refresh()` would resolve on
|
|
60
|
+
* instance A's in-flight `REQUEST_TOKEN` and B would never mint its OWN token.
|
|
61
|
+
*/
|
|
62
|
+
const inFlightRefreshByInstance = new Map();
|
|
63
|
+
/**
|
|
64
|
+
* Mint/await a token refresh for one block instance, coalescing concurrent calls
|
|
65
|
+
* for the SAME `blockInstanceId`. Exported for the inline-mode multi-instance
|
|
66
|
+
* dedup test — hooks call it via `useBlockToken().refresh`.
|
|
55
67
|
*/
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
if (
|
|
59
|
-
return
|
|
68
|
+
export async function requestRefresh(blockInstanceId) {
|
|
69
|
+
const existing = inFlightRefreshByInstance.get(blockInstanceId);
|
|
70
|
+
if (existing)
|
|
71
|
+
return existing;
|
|
60
72
|
const transport = getTransport();
|
|
61
|
-
|
|
73
|
+
const refresh = sendTypedRequest(transport, { type: 'REQUEST_TOKEN', payload: { blockInstanceId } }, 'TOKEN_REFRESH_RESPONSE')
|
|
62
74
|
.then(() => undefined)
|
|
63
75
|
.finally(() => {
|
|
64
|
-
|
|
76
|
+
inFlightRefreshByInstance.delete(blockInstanceId);
|
|
65
77
|
});
|
|
66
|
-
|
|
78
|
+
inFlightRefreshByInstance.set(blockInstanceId, refresh);
|
|
79
|
+
return refresh;
|
|
67
80
|
}
|
|
68
81
|
//# sourceMappingURL=useBlockToken.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBlockToken.js","sourceRoot":"","sources":["../../src/hooks/useBlockToken.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D,sEAAsE;AACtE,MAAM,eAAe,GAAG,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c,CAAC,UAAU,CAAC,EAAE,CAAC;AACjE,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,yBAAyB,GAAG,IAAI,GAAG,EAAyB,CAAC;AAEnE;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,eAAuB;IAC1D,MAAM,QAAQ,GAAG,yBAAyB,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAChE,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAC;IAC9B,MAAM,SAAS,GAAG,YAAY,EAAE,CAAC;IACjC,MAAM,OAAO,GAAG,gBAAgB,CAC9B,SAAS,EACT,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,EAAE,eAAe,EAAE,EAAE,EACvD,wBAAwB,CACzB;SACE,IAAI,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC;SACrB,OAAO,CAAC,GAAG,EAAE;QACZ,yBAAyB,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IACL,yBAAyB,CAAC,GAAG,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;IACxD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGenerationResources.d.ts","sourceRoot":"","sources":["../../src/hooks/useGenerationResources.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"useGenerationResources.d.ts","sourceRoot":"","sources":["../../src/hooks/useGenerationResources.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAiBjE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,sBAAsB,IAAI;IACxC,KAAK,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC;CAC/D,CA0DA"}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
import { useCallback } from 'react';
|
|
1
|
+
import { useCallback, useEffect, useRef } from 'react';
|
|
2
2
|
import { buildGenerationResourcesUrl, responseToResources, } from '../api/generationResources.js';
|
|
3
3
|
import { useHostOrigin } from './useHostOrigin.js';
|
|
4
4
|
import { useBlockToken } from './useBlockToken.js';
|
|
5
|
+
/**
|
|
6
|
+
* Backstop timeout for the direct REST fetch. Unlike the postMessage hooks
|
|
7
|
+
* (which inherit the transport's 30s request timeout), this hook talks to the
|
|
8
|
+
* HTTP API directly, so it needs its OWN bound — otherwise a hung request never
|
|
9
|
+
* rejects. Matches the transport's default request timeout.
|
|
10
|
+
*/
|
|
11
|
+
const GENERATION_RESOURCES_TIMEOUT_MS = 30_000;
|
|
5
12
|
/**
|
|
6
13
|
* Rehydrate a saved set of generation resources by version id, WITHOUT
|
|
7
14
|
* re-opening the resource picker. `fetch(versionIds)` GETs the block-token-gated
|
|
@@ -27,19 +34,49 @@ import { useBlockToken } from './useBlockToken.js';
|
|
|
27
34
|
export function useGenerationResources() {
|
|
28
35
|
const host = useHostOrigin();
|
|
29
36
|
const { raw } = useBlockToken();
|
|
37
|
+
// In-flight AbortControllers, aborted on unmount so a pending fetch never
|
|
38
|
+
// resolves into an unmounted component (and its timer is cleared).
|
|
39
|
+
const inFlight = useRef(new Set());
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
const controllers = inFlight.current;
|
|
42
|
+
return () => {
|
|
43
|
+
for (const c of controllers)
|
|
44
|
+
c.abort();
|
|
45
|
+
controllers.clear();
|
|
46
|
+
};
|
|
47
|
+
}, []);
|
|
30
48
|
const doFetch = useCallback(async (versionIds) => {
|
|
31
49
|
if (!host) {
|
|
32
50
|
throw new Error('useGenerationResources: host origin not established yet (wait for BLOCK_INIT).');
|
|
33
51
|
}
|
|
34
52
|
const url = host + buildGenerationResourcesUrl(versionIds);
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
53
|
+
const controller = new AbortController();
|
|
54
|
+
inFlight.current.add(controller);
|
|
55
|
+
const timeoutId = setTimeout(() => controller.abort(), GENERATION_RESOURCES_TIMEOUT_MS);
|
|
56
|
+
try {
|
|
57
|
+
const res = await fetch(url, {
|
|
58
|
+
headers: { Authorization: `Bearer ${raw}` },
|
|
59
|
+
signal: controller.signal,
|
|
60
|
+
});
|
|
61
|
+
if (!res.ok) {
|
|
62
|
+
throw new Error(`generation-resources request failed (${res.status})`);
|
|
63
|
+
}
|
|
64
|
+
const body = (await res.json());
|
|
65
|
+
return responseToResources(body);
|
|
66
|
+
}
|
|
67
|
+
catch (err) {
|
|
68
|
+
// Distinguish an abort (timeout OR unmount) from a real network/HTTP
|
|
69
|
+
// failure so the caller gets an actionable message instead of a bare
|
|
70
|
+
// DOMException.
|
|
71
|
+
if (controller.signal.aborted) {
|
|
72
|
+
throw new Error(`useGenerationResources: request aborted (timed out after ${GENERATION_RESOURCES_TIMEOUT_MS}ms or the hook unmounted).`);
|
|
73
|
+
}
|
|
74
|
+
throw err;
|
|
75
|
+
}
|
|
76
|
+
finally {
|
|
77
|
+
clearTimeout(timeoutId);
|
|
78
|
+
inFlight.current.delete(controller);
|
|
40
79
|
}
|
|
41
|
-
const body = (await res.json());
|
|
42
|
-
return responseToResources(body);
|
|
43
80
|
}, [host, raw]);
|
|
44
81
|
return { fetch: doFetch };
|
|
45
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGenerationResources.js","sourceRoot":"","sources":["../../src/hooks/useGenerationResources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useGenerationResources.js","sourceRoot":"","sources":["../../src/hooks/useGenerationResources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAIvD,OAAO,EACL,2BAA2B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C,GAAG,EAAE;gBAC3B,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,GAAG,EAAE,EAAE;gBAC3C,MAAM,EAAE,UAAU,CAAC,MAAM;aAC1B,CAAC,CAAC;YACH,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;gBACZ,MAAM,IAAI,KAAK,CAAC,wCAAwC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;YACzE,CAAC;YACD,MAAM,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAY,CAAC;YAC3C,OAAO,mBAAmB,CAAC,IAAiD,CAAC,CAAC;QAChF,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,qEAAqE;YACrE,qEAAqE;YACrE,gBAAgB;YAChB,IAAI,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;gBAC9B,MAAM,IAAI,KAAK,CACb,4DAA4D,+BAA+B,4BAA4B,CACxH,CAAC;YACJ,CAAC;YACD,MAAM,GAAG,CAAC;QACZ,CAAC;gBAAS,CAAC;YACT,YAAY,CAAC,SAAS,CAAC,CAAC;YACxB,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACtC,CAAC;IACH,CAAC,EACD,CAAC,IAAI,EAAE,GAAG,CAAC,CACZ,CAAC;IAEF,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAC5B,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -32,7 +32,9 @@ export { useDailyCompensation } from './hooks/useDailyCompensation.js';
|
|
|
32
32
|
export type { UseDailyCompensation } from './hooks/useDailyCompensation.js';
|
|
33
33
|
export { useWildcardPack, WildcardPackError } from './hooks/useWildcardPack.js';
|
|
34
34
|
export type { UseWildcardPack } from './hooks/useWildcardPack.js';
|
|
35
|
-
export
|
|
35
|
+
export { useAppWorkflows } from './hooks/useAppWorkflows.js';
|
|
36
|
+
export type { UseAppWorkflows } from './hooks/useAppWorkflows.js';
|
|
37
|
+
export type { BlockBuzzTransaction, BlockBuzzAccount, BlockDailyCompensationResource, BlockWildcardPack, BlockWildcardPackErrorCode, AppWorkflow, AppWorkflowImage, AppWorkflowsParams, } from '@civitai/app-sdk/blocks';
|
|
36
38
|
export { useCheckpointPicker } from './hooks/useCheckpointPicker.js';
|
|
37
39
|
export { useResourcePicker } from './hooks/useResourcePicker.js';
|
|
38
40
|
export { useImageUpload } from './hooks/useImageUpload.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,YAAY,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAE5E,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAC3F,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,YAAY,EACV,aAAa,EACb,cAAc,EACd,eAAe,GAChB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;A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AA8B,EAC9B,iBAAiB,EACjB,0BAA0B,EAC1B,WAAW,EACX,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,EAC3B,2BAA2B,EAC3B,mBAAmB,GACpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,YAAY,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,YAAY,EACV,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,aAAa,GACd,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,YAAY,EACV,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -24,6 +24,7 @@ export { useBuzzTransactions } from './hooks/useBuzzTransactions.js';
|
|
|
24
24
|
export { useBuzzAccounts } from './hooks/useBuzzAccounts.js';
|
|
25
25
|
export { useDailyCompensation } from './hooks/useDailyCompensation.js';
|
|
26
26
|
export { useWildcardPack, WildcardPackError } from './hooks/useWildcardPack.js';
|
|
27
|
+
export { useAppWorkflows } from './hooks/useAppWorkflows.js';
|
|
27
28
|
export { useCheckpointPicker } from './hooks/useCheckpointPicker.js';
|
|
28
29
|
export { useResourcePicker } from './hooks/useResourcePicker.js';
|
|
29
30
|
export { useImageUpload } from './hooks/useImageUpload.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAGhE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAG3F,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAO3D,QAAQ;AACR,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC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