@navios/di-react 1.0.0-alpha.3 → 2.0.0-alpha.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 (58) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +45 -665
  3. package/lib/{index.js → index.cjs} +249 -255
  4. package/lib/index.cjs.map +1 -0
  5. package/lib/{index.d.ts → index.d.cts} +94 -123
  6. package/lib/index.d.cts.map +1 -0
  7. package/lib/index.d.mts +93 -122
  8. package/lib/index.d.mts.map +1 -1
  9. package/lib/index.mjs +248 -255
  10. package/lib/index.mjs.map +1 -1
  11. package/package.json +32 -18
  12. package/coverage/base.css +0 -224
  13. package/coverage/block-navigation.js +0 -87
  14. package/coverage/clover.xml +0 -270
  15. package/coverage/coverage-final.json +0 -10
  16. package/coverage/favicon.png +0 -0
  17. package/coverage/hooks/index.html +0 -191
  18. package/coverage/hooks/use-container.mts.html +0 -268
  19. package/coverage/hooks/use-invalidate.mts.html +0 -208
  20. package/coverage/hooks/use-optional-service.mts.html +0 -910
  21. package/coverage/hooks/use-scope.mts.html +0 -346
  22. package/coverage/hooks/use-service.mts.html +0 -760
  23. package/coverage/hooks/use-suspense-service.mts.html +0 -784
  24. package/coverage/index.html +0 -131
  25. package/coverage/prettify.css +0 -1
  26. package/coverage/prettify.js +0 -2
  27. package/coverage/providers/container-provider.mts.html +0 -139
  28. package/coverage/providers/context.mts.html +0 -130
  29. package/coverage/providers/index.html +0 -146
  30. package/coverage/providers/scope-provider.mts.html +0 -355
  31. package/coverage/sort-arrow-sprite.png +0 -0
  32. package/coverage/sorter.js +0 -210
  33. package/lib/index.d.ts.map +0 -1
  34. package/lib/index.js.map +0 -1
  35. package/project.json +0 -61
  36. package/src/hooks/__tests__/use-container.spec.mts +0 -143
  37. package/src/hooks/__tests__/use-invalidate.spec.mts +0 -80
  38. package/src/hooks/__tests__/use-optional-service.spec.mts +0 -233
  39. package/src/hooks/__tests__/use-scope.spec.mts +0 -293
  40. package/src/hooks/__tests__/use-service.spec.mts +0 -212
  41. package/src/hooks/__tests__/use-suspense-service.spec.mts +0 -286
  42. package/src/hooks/index.mts +0 -14
  43. package/src/hooks/use-container.mts +0 -61
  44. package/src/hooks/use-invalidate.mts +0 -41
  45. package/src/hooks/use-optional-service.mts +0 -275
  46. package/src/hooks/use-scope.mts +0 -87
  47. package/src/hooks/use-service.mts +0 -225
  48. package/src/hooks/use-suspense-service.mts +0 -233
  49. package/src/index.mts +0 -8
  50. package/src/providers/__tests__/scope-provider.spec.mts +0 -366
  51. package/src/providers/container-provider.mts +0 -18
  52. package/src/providers/context.mts +0 -15
  53. package/src/providers/index.mts +0 -5
  54. package/src/providers/scope-provider.mts +0 -90
  55. package/src/types.mts +0 -21
  56. package/tsconfig.json +0 -13
  57. package/tsdown.config.mts +0 -14
  58. package/vitest.config.mts +0 -12
package/lib/index.d.mts CHANGED
@@ -1,31 +1,40 @@
1
- import * as react1 from "react";
1
+ import { BoundInjectionToken, ClassType, Container, FactoryInjectionToken, InferInput, InjectionToken, MissingArgsError, ResolvedInstance, ScopedContainer, StandardSchemaV1 } from "@navios/di";
2
2
  import { ReactNode } from "react";
3
- import { BoundInjectionToken, ClassType, Container, Factorable, FactoryInjectionToken, InjectionToken, InjectionTokenSchemaType, ScopedContainer } from "@navios/di";
4
- import { ZodType, z } from "zod/v4";
5
-
6
- //#region src/providers/context.d.mts
7
3
  /**
8
4
  * Context for the root Container.
9
5
  * This is set by ContainerProvider and provides the base container.
10
6
  */
11
- declare const ContainerContext: react1.Context<Container | null>;
7
+ export declare const ContainerContext: import("react").Context<Container | null>;
12
8
  /**
13
9
  * Context for the current ScopedContainer (if inside a ScopeProvider).
14
10
  * This allows nested components to access request-scoped services.
15
11
  */
16
- declare const ScopedContainerContext: react1.Context<ScopedContainer | null>;
17
- //#endregion
18
- //#region src/providers/container-provider.d.mts
12
+ export declare const ScopedContainerContext: import("react").Context<ScopedContainer | null>;
19
13
  interface ContainerProviderProps {
20
14
  container: Container;
21
15
  children: ReactNode;
22
16
  }
23
- declare function ContainerProvider({
24
- container,
25
- children
26
- }: ContainerProviderProps): react1.ReactElement<unknown, string | react1.JSXElementConstructor<any>>;
27
- //#endregion
28
- //#region src/providers/scope-provider.d.mts
17
+ export declare function ContainerProvider({ container, children }: ContainerProviderProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
18
+ /**
19
+ * Hook to get the current container (ScopedContainer if inside ScopeProvider, otherwise Container).
20
+ *
21
+ * This is the primary hook for accessing the DI container. It automatically
22
+ * returns the correct container based on context:
23
+ * - Inside a ScopeProvider: returns the ScopedContainer for request-scoped services
24
+ * - Outside a ScopeProvider: returns the root Container
25
+ *
26
+ * @returns The current container (ScopedContainer or Container)
27
+ */
28
+ export declare function useContainer(): Container | ScopedContainer;
29
+ /**
30
+ * Hook to get the root Container, regardless of whether we're inside a ScopeProvider.
31
+ *
32
+ * Use this when you need access to the root container specifically,
33
+ * for example to create new request scopes programmatically.
34
+ *
35
+ * @returns The root Container
36
+ */
37
+ export declare function useRootContainer(): Container;
29
38
  interface ScopeProviderProps {
30
39
  /**
31
40
  * Optional explicit scope ID. If not provided, a unique ID will be generated.
@@ -33,7 +42,8 @@ interface ScopeProviderProps {
33
42
  */
34
43
  scopeId?: string;
35
44
  /**
36
- * Optional metadata to attach to the request context.
45
+ * Optional metadata to attach to the scope.
46
+ * The key `scopeId` is reserved: it always holds the effective scope ID.
37
47
  * Can be used to pass data like user info, request headers, etc.
38
48
  */
39
49
  metadata?: Record<string, unknown>;
@@ -61,40 +71,58 @@ interface ScopeProviderProps {
61
71
  * ))}
62
72
  * ```
63
73
  */
64
- declare function ScopeProvider({
65
- scopeId,
66
- metadata,
67
- children
68
- }: ScopeProviderProps): react1.ReactElement<unknown, string | react1.JSXElementConstructor<any>> | null;
69
- //#endregion
70
- //#region src/hooks/use-container.d.mts
74
+ export declare function ScopeProvider({ scopeId, metadata, children }: ScopeProviderProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
71
75
  /**
72
- * Hook to get the current container (ScopedContainer if inside ScopeProvider, otherwise Container).
76
+ * Hook to get the current scope ID.
77
+ * Returns null if not inside a ScopeProvider.
78
+ */
79
+ export declare function useScope(): string | null;
80
+ /**
81
+ * Hook to get the current scope ID, throwing if not inside a ScopeProvider.
82
+ * Use this when your component requires a scope to function correctly.
83
+ */
84
+ export declare function useScopeOrThrow(): string;
85
+ /**
86
+ * Hook to get the current ScopedContainer.
87
+ * Returns null if not inside a ScopeProvider.
73
88
  *
74
- * This is the primary hook for accessing the DI container. It automatically
75
- * returns the correct container based on context:
76
- * - Inside a ScopeProvider: returns the ScopedContainer for request-scoped services
77
- * - Outside a ScopeProvider: returns the root Container
89
+ * Use this to access scope metadata or other ScopedContainer methods.
78
90
  *
79
- * @returns The current container (ScopedContainer or Container)
91
+ * @example
92
+ * ```tsx
93
+ * function TableRow() {
94
+ * const scope = useScopedContainer()
95
+ * const rowData = scope?.getMetadata('rowData')
96
+ * // ...
97
+ * }
98
+ * ```
80
99
  */
81
- declare function useContainer(): Container | ScopedContainer;
100
+ export declare function useScopedContainer(): ScopedContainer | null;
82
101
  /**
83
- * Hook to get the root Container, regardless of whether we're inside a ScopeProvider.
102
+ * Hook to get the current ScopedContainer, throwing if not inside a ScopeProvider.
103
+ * Use this when your component requires a scope to function correctly.
104
+ */
105
+ export declare function useScopedContainerOrThrow(): ScopedContainer;
106
+ /**
107
+ * Hook to get metadata from the current scope.
108
+ * Returns undefined if not inside a ScopeProvider or if the key doesn't exist.
84
109
  *
85
- * Use this when you need access to the root container specifically,
86
- * for example to create new request scopes programmatically.
110
+ * @example
111
+ * ```tsx
112
+ * // In parent component:
113
+ * <ScopeProvider metadata={{ userId: '123', theme: 'dark' }}>
114
+ * <ChildComponent />
115
+ * </ScopeProvider>
87
116
  *
88
- * @returns The root Container
117
+ * // In child component:
118
+ * function ChildComponent() {
119
+ * const userId = useScopeMetadata<string>('userId')
120
+ * const theme = useScopeMetadata<'light' | 'dark'>('theme')
121
+ * // ...
122
+ * }
123
+ * ```
89
124
  */
90
- declare function useRootContainer(): Container;
91
- //#endregion
92
- //#region src/types.d.mts
93
- type UnionToArray<T> = UnionToArrayImpl<T, never>;
94
- type UnionToArrayImpl<T, L extends any[]> = T extends any ? UnionToArrayImpl<Exclude<T, T>, [...L, T]> : L;
95
- type Join<T extends any[], Delimiter extends string> = T extends [] ? '' : T extends [infer First extends string | number | symbol] ? First extends string | number ? `${First}` : never : T extends [infer First extends string | number | symbol, ...infer Rest extends any[]] ? First extends string | number ? `${First}${Delimiter}${Join<Rest, Delimiter>}` : never : '';
96
- //#endregion
97
- //#region src/hooks/use-service.d.mts
125
+ export declare function useScopeMetadata<T = unknown>(key: string): T | undefined;
98
126
  interface UseServiceResult<T> {
99
127
  data: T | undefined;
100
128
  error: Error | undefined;
@@ -103,22 +131,18 @@ interface UseServiceResult<T> {
103
131
  isError: boolean;
104
132
  refetch: () => void;
105
133
  }
106
- declare function useService<T extends ClassType>(token: T): UseServiceResult<InstanceType<T> extends Factorable<infer R> ? R : InstanceType<T>>;
107
- declare function useService<T, S extends InjectionTokenSchemaType>(token: InjectionToken<T, S>, args: z.input<S>): UseServiceResult<T>;
108
- declare function useService<T, S extends InjectionTokenSchemaType, R extends boolean>(token: InjectionToken<T, S, R>): R extends false ? UseServiceResult<T> : S extends ZodType<infer Type> ? `Error: Your token requires args: ${Join<UnionToArray<keyof Type>, ', '>}` : 'Error: Your token requires args';
109
- declare function useService<T>(token: InjectionToken<T, undefined>): UseServiceResult<T>;
110
- declare function useService<T>(token: BoundInjectionToken<T, any>): UseServiceResult<T>;
111
- declare function useService<T>(token: FactoryInjectionToken<T, any>): UseServiceResult<T>;
112
- //#endregion
113
- //#region src/hooks/use-suspense-service.d.mts
114
- declare function useSuspenseService<T extends ClassType>(token: T): InstanceType<T> extends Factorable<infer R> ? R : InstanceType<T>;
115
- declare function useSuspenseService<T, S extends InjectionTokenSchemaType>(token: InjectionToken<T, S>, args: z.input<S>): T;
116
- declare function useSuspenseService<T, S extends InjectionTokenSchemaType, R extends boolean>(token: InjectionToken<T, S, R>): R extends false ? T : S extends ZodType<infer Type> ? `Error: Your token requires args: ${Join<UnionToArray<keyof Type>, ', '>}` : 'Error: Your token requires args';
117
- declare function useSuspenseService<T>(token: InjectionToken<T, undefined>): T;
118
- declare function useSuspenseService<T>(token: BoundInjectionToken<T, any>): T;
119
- declare function useSuspenseService<T>(token: FactoryInjectionToken<T, any>): T;
120
- //#endregion
121
- //#region src/hooks/use-optional-service.d.mts
134
+ export declare function useService<T extends ClassType>(token: T): UseServiceResult<ResolvedInstance<T>>;
135
+ export declare function useService<T, S extends StandardSchemaV1>(token: InjectionToken<T, S>, args: InferInput<S>): UseServiceResult<T>;
136
+ export declare function useService<T, S extends StandardSchemaV1, R extends boolean>(token: InjectionToken<T, S, R>): R extends false ? UseServiceResult<T> : MissingArgsError<S>;
137
+ export declare function useService<T>(token: InjectionToken<T, unknown>): UseServiceResult<T>;
138
+ export declare function useService<T>(token: BoundInjectionToken<T, any>): UseServiceResult<T>;
139
+ export declare function useService<T>(token: FactoryInjectionToken<T, any>): UseServiceResult<T>;
140
+ export declare function useSuspenseService<T extends ClassType>(token: T): ResolvedInstance<T>;
141
+ export declare function useSuspenseService<T, S extends StandardSchemaV1>(token: InjectionToken<T, S>, args: InferInput<S>): T;
142
+ export declare function useSuspenseService<T, S extends StandardSchemaV1, R extends boolean>(token: InjectionToken<T, S, R>): R extends false ? T : MissingArgsError<S>;
143
+ export declare function useSuspenseService<T>(token: InjectionToken<T, unknown>): T;
144
+ export declare function useSuspenseService<T>(token: BoundInjectionToken<T, any>): T;
145
+ export declare function useSuspenseService<T>(token: FactoryInjectionToken<T, any>): T;
122
146
  interface UseOptionalServiceResult<T> {
123
147
  /**
124
148
  * The service instance if found and loaded successfully, otherwise undefined.
@@ -149,14 +173,12 @@ interface UseOptionalServiceResult<T> {
149
173
  */
150
174
  refetch: () => void;
151
175
  }
152
- declare function useOptionalService<T extends ClassType>(token: T): UseOptionalServiceResult<InstanceType<T> extends Factorable<infer R> ? R : InstanceType<T>>;
153
- declare function useOptionalService<T, S extends InjectionTokenSchemaType>(token: InjectionToken<T, S>, args: z.input<S>): UseOptionalServiceResult<T>;
154
- declare function useOptionalService<T, S extends InjectionTokenSchemaType, R extends boolean>(token: InjectionToken<T, S, R>): R extends false ? UseOptionalServiceResult<T> : S extends ZodType<infer Type> ? `Error: Your token requires args: ${Join<UnionToArray<keyof Type>, ', '>}` : 'Error: Your token requires args';
155
- declare function useOptionalService<T>(token: InjectionToken<T, undefined>): UseOptionalServiceResult<T>;
156
- declare function useOptionalService<T>(token: BoundInjectionToken<T, any>): UseOptionalServiceResult<T>;
157
- declare function useOptionalService<T>(token: FactoryInjectionToken<T, any>): UseOptionalServiceResult<T>;
158
- //#endregion
159
- //#region src/hooks/use-invalidate.d.mts
176
+ export declare function useOptionalService<T extends ClassType>(token: T): UseOptionalServiceResult<ResolvedInstance<T>>;
177
+ export declare function useOptionalService<T, S extends StandardSchemaV1>(token: InjectionToken<T, S>, args: InferInput<S>): UseOptionalServiceResult<T>;
178
+ export declare function useOptionalService<T, S extends StandardSchemaV1, R extends boolean>(token: InjectionToken<T, S, R>): R extends false ? UseOptionalServiceResult<T> : MissingArgsError<S>;
179
+ export declare function useOptionalService<T>(token: InjectionToken<T, unknown>): UseOptionalServiceResult<T>;
180
+ export declare function useOptionalService<T>(token: BoundInjectionToken<T, any>): UseOptionalServiceResult<T>;
181
+ export declare function useOptionalService<T>(token: FactoryInjectionToken<T, any>): UseOptionalServiceResult<T>;
160
182
  /**
161
183
  * Hook that returns a function to invalidate a service instance directly.
162
184
  *
@@ -184,60 +206,9 @@ declare function useOptionalService<T>(token: FactoryInjectionToken<T, any>): Us
184
206
  * }
185
207
  * ```
186
208
  */
187
- declare function useInvalidateInstance(): (instance: unknown) => Promise<void>;
188
- //#endregion
189
- //#region src/hooks/use-scope.d.mts
190
- /**
191
- * Hook to get the current scope ID.
192
- * Returns null if not inside a ScopeProvider.
193
- */
194
- declare function useScope(): string | null;
195
- /**
196
- * Hook to get the current scope ID, throwing if not inside a ScopeProvider.
197
- * Use this when your component requires a scope to function correctly.
198
- */
199
- declare function useScopeOrThrow(): string;
200
- /**
201
- * Hook to get the current ScopedContainer.
202
- * Returns null if not inside a ScopeProvider.
203
- *
204
- * Use this to access scope metadata or other ScopedContainer methods.
205
- *
206
- * @example
207
- * ```tsx
208
- * function TableRow() {
209
- * const scope = useScopedContainer()
210
- * const rowData = scope?.getMetadata('rowData')
211
- * // ...
212
- * }
213
- * ```
214
- */
215
- declare function useScopedContainer(): ScopedContainer | null;
216
- /**
217
- * Hook to get the current ScopedContainer, throwing if not inside a ScopeProvider.
218
- * Use this when your component requires a scope to function correctly.
219
- */
220
- declare function useScopedContainerOrThrow(): ScopedContainer;
221
- /**
222
- * Hook to get metadata from the current scope.
223
- * Returns undefined if not inside a ScopeProvider or if the key doesn't exist.
224
- *
225
- * @example
226
- * ```tsx
227
- * // In parent component:
228
- * <ScopeProvider metadata={{ userId: '123', theme: 'dark' }}>
229
- * <ChildComponent />
230
- * </ScopeProvider>
231
- *
232
- * // In child component:
233
- * function ChildComponent() {
234
- * const userId = useScopeMetadata<string>('userId')
235
- * const theme = useScopeMetadata<'light' | 'dark'>('theme')
236
- * // ...
237
- * }
238
- * ```
239
- */
240
- declare function useScopeMetadata<T = unknown>(key: string): T | undefined;
241
- //#endregion
242
- export { ContainerContext, ContainerProvider, type ContainerProviderProps, Join, ScopeProvider, type ScopeProviderProps, ScopedContainerContext, UnionToArray, type UseOptionalServiceResult, type UseServiceResult, useContainer, useInvalidateInstance, useOptionalService, useRootContainer, useScope, useScopeMetadata, useScopeOrThrow, useScopedContainer, useScopedContainerOrThrow, useService, useSuspenseService };
209
+ export declare function useInvalidateInstance(): (instance: unknown) => Promise<void>;
210
+ type UnionToArray<T> = UnionToArrayImpl<T, never>;
211
+ type UnionToArrayImpl<T, L extends any[]> = T extends any ? UnionToArrayImpl<Exclude<T, T>, [...L, T]> : L;
212
+ type Join<T extends any[], Delimiter extends string> = T extends [] ? '' : T extends [infer First extends string | number | symbol] ? First extends string | number ? `${First}` : never : T extends [infer First extends string | number | symbol, ...infer Rest extends any[]] ? First extends string | number ? `${First}${Delimiter}${Join<Rest, Delimiter>}` : never : '';
213
+ export type { ContainerProviderProps, Join, ScopeProviderProps, UnionToArray, UseOptionalServiceResult, UseServiceResult };
243
214
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/providers/context.mts","../src/providers/container-provider.mts","../src/providers/scope-provider.mts","../src/hooks/use-container.mts","../src/types.mts","../src/hooks/use-service.mts","../src/hooks/use-suspense-service.mts","../src/hooks/use-optional-service.mts","../src/hooks/use-invalidate.mts","../src/hooks/use-scope.mts"],"sourcesContent":[],"mappings":";;;;;;;;;;cAQa,kBAAgB,MAAA,CAAA,QAAA;AAA7B;AAMA;;;cAAa,wBAAsB,MAAA,CAAA,QAAA;;;UCPlB,sBAAA;aACJ;YACD;;ADDC,iBCIG,iBAAA,CDJa;EAAA,SAAA;EAAA;AAAA,CAAA,ECO1B,sBDP0B,CAAA,ECOJ,MAAA,CAAA,YDPI,CAAA,OAAA,EAAA,MAAA,GCOJ,MAAA,CAAA,qBDPI,CAAA,GAAA,CAAA,CAAA;;;UEAZ,kBAAA;;;;;EFAJ,OAAA,CAAA,EAAA,MAAA;EAMA;;;;ECPI,QAAA,CAAA,ECWJ,MDXI,CAAA,MAAA,EAAsB,OAAA,CAAA;EAKvB,QAAA,ECOJ,SDPI;;;;;;;;;;ACJhB;AAoCA;;;;;;;;;;;ACzBA;AAwBA;iBDCgB,aAAA;;;;GAIb,qBAAkB,MAAA,CAAA,+BAAA,MAAA,CAAA;;;;;;;;AFxCrB;AAMA;;;;ACPiB,iBEYD,YAAA,CAAA,CFZuB,EEYP,SFXnB,GEW+B,eFVvB;AAGrB;;;;;;;;iBE+BgB,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[],"sources":["../src/container/context.mts","../src/container/container-provider.mts","../src/container/use-container.mts","../src/scope/scope-provider.mts","../src/scope/use-scope.mts","../src/service/use-service.mts","../src/service/use-suspense-service.mts","../src/service/use-optional-service.mts","../src/service/use-invalidate-instance.mts","../src/union-to-array.mts"],"mappings":";;;;;;qBAQa,kCAAgB,QAAA;;;;;qBAMhB,wCAAsB,QAAA;UCPlB;EACf,WAAW;EACX,UAAU;;wBAGI,oBAAoB,WAAW,YAAY,yCAAsB,+CAAA;;;;;;;;;;;wBCIjE,gBAAgB,YAAY;;;;;;;;;wBAwB5B,oBAAoB;UChCnB;;;;;EAKf;;;;;;EAMA,WAAW;EACX,UAAU;;;;;;;;;;;;;;;;;;;;;;;;wBAyBI,gBAAgB,SAAS,UAAU,YAAY,qCAAkB,+CAAA;;;;;wBCnCjE;;;;;wBASA;;;;;;;;;;;;;;;;wBA0BA,sBAAsB;;;;;wBAQtB,6BAA6B;;;;;;;;;;;;;;;;;;;;wBA8B7B,iBAAiB,aAAa,cAAc;UCpC3C,iBAAiB;EAChC,MAAM;EACN,OAAO;EACP;EACA;EACA;EACA;;wBAIc,WAAW,UAAU,WAAW,OAAO,IAAI,iBAAiB,iBAAiB;wBAG7E,WAAW,GAAG,UAAU,kBACtC,OAAO,eAAe,GAAG,IACzB,MAAM,WAAW,KAChB,iBAAiB;wBAGJ,WAAW,GAAG,UAAU,kBAAkB,mBACxD,OAAO,eAAe,GAAG,GAAG,KAC3B,kBAAkB,iBAAiB,KAAK,iBAAiB;wBAG5C,WAAW,GAAG,OAAO,eAAe,cAAc,iBAAiB;wBAEnE,WAAW,GAAG,OAAO,oBAAoB,UAAU,iBAAiB;wBAEpE,WAAW,GAAG,OAAO,sBAAsB,UAAU,iBAAiB;wBCKtE,mBAAmB,UAAU,WAAW,OAAO,IAAI,iBAAiB;wBAGpE,mBAAmB,GAAG,UAAU,kBAC9C,OAAO,eAAe,GAAG,IACzB,MAAM,WAAW,KAChB;wBAGa,mBAAmB,GAAG,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