@angular-architects/ngrx-toolkit 19.1.0 → 19.2.1

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.
@@ -37,10 +37,10 @@ class SignalReduxStore {
37
37
  }
38
38
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
39
39
  connectFeatureStore(mappers) {
40
- mappers.forEach(mapper => mapper.types.forEach(action => this.mapperDict[action] = {
40
+ mappers.forEach((mapper) => mapper.types.forEach((action) => (this.mapperDict[action] = {
41
41
  storeMethod: mapper.storeMethod,
42
- resultMethod: mapper.resultMethod
43
- }));
42
+ resultMethod: mapper.resultMethod,
43
+ })));
44
44
  }
45
45
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SignalReduxStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
46
46
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SignalReduxStore, providedIn: 'root' }); }
@@ -48,7 +48,7 @@ class SignalReduxStore {
48
48
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SignalReduxStore, decorators: [{
49
49
  type: Injectable,
50
50
  args: [{
51
- providedIn: 'root'
51
+ providedIn: 'root',
52
52
  }]
53
53
  }] });
54
54
  function injectReduxDispatch() {
@@ -99,7 +99,7 @@ function reduxMethod(generator, resultMethodOrConfig, config) {
99
99
  const inputResultFn = ((input, resultMethod = resultMethodOrConfig) => {
100
100
  const rxMethodWithResult = rxMethod(pipe(generator, map(resultMethod)), {
101
101
  ...(config || {}),
102
- injector: config?.injector || injector
102
+ injector: config?.injector || injector,
103
103
  });
104
104
  const rxWithInput = rxMethodWithResult(input);
105
105
  unsubscribable = { unsubscribe: rxWithInput.destroy.bind(rxWithInput) };
@@ -1 +1 @@
1
- {"version":3,"file":"angular-architects-ngrx-toolkit-redux-connector.mjs","sources":["../../../../libs/ngrx-toolkit/redux-connector/src/lib/util.ts","../../../../libs/ngrx-toolkit/redux-connector/src/lib/signal-redux-store.ts","../../../../libs/ngrx-toolkit/redux-connector/src/lib/create-redux.ts","../../../../libs/ngrx-toolkit/redux-connector/src/lib/rxjs-interop/redux-method.ts","../../../../libs/ngrx-toolkit/redux-connector/angular-architects-ngrx-toolkit-redux-connector.ts"],"sourcesContent":["import { ActionCreator } from '@ngrx/store';\nimport { Unsubscribable } from 'rxjs';\n\nexport function isUnsubscribable<F extends (...args: unknown[]) => unknown>(\n fn: F | (F & Unsubscribable)\n): fn is F & Unsubscribable {\n return !!(fn as F & Unsubscribable)?.unsubscribe;\n}\n\nexport function capitalize(str: string): string {\n return str ? str[0].toUpperCase() + str.substring(1) : str;\n}\n\nexport function isActionCreator(action: unknown): action is ActionCreator {\n return Boolean(\n typeof action === 'function' &&\n action &&\n 'type' in action &&\n action.type &&\n typeof action.type === 'string'\n );\n}\n","import { Injectable, inject } from \"@angular/core\";\nimport { rxMethod } from \"@ngrx/signals/rxjs-interop\";\nimport { Action, ActionCreator } from \"@ngrx/store\";\nimport { pipe, tap } from \"rxjs\";\nimport { MapperTypes } from \"./model\";\nimport { isUnsubscribable } from \"./util\";\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SignalReduxStore {\n private mapperDict: Record<string, {\n storeMethod: (...args: unknown[]) => unknown,\n resultMethod?: (...args: unknown[]) => unknown,\n }> = {};\n\n dispatch = rxMethod<Action>(pipe(\n tap((action: Action) => {\n const callbacks = this.mapperDict[action.type];\n if (callbacks?.storeMethod) {\n if (\n isUnsubscribable(callbacks.storeMethod) &&\n callbacks.resultMethod\n ) {\n return callbacks.storeMethod(action, (a: Action) => {\n const resultAction = callbacks.resultMethod?.(a) as Action;\n this.dispatch(resultAction);\n });\n }\n\n return callbacks?.storeMethod(action);\n }\n\n return;\n })\n ));\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n connectFeatureStore(mappers: MapperTypes<ActionCreator<any, any>[]>[]): void {\n mappers.forEach(\n mapper => mapper.types.forEach(\n action => this.mapperDict[action] = {\n storeMethod: mapper.storeMethod,\n resultMethod: mapper.resultMethod\n }\n )\n );\n }\n}\n\nexport function injectReduxDispatch() {\n return inject(SignalReduxStore).dispatch;\n}\n","import {\n inject,\n makeEnvironmentProviders,\n provideEnvironmentInitializer,\n} from '@angular/core';\nimport { ActionCreator, ActionType } from '@ngrx/store/src/models';\nimport {\n CreateReduxState,\n ExtractActionTypes,\n MapperTypes,\n ServiceWithDecorator,\n Store,\n} from './model';\nimport { SignalReduxStore, injectReduxDispatch } from './signal-redux-store';\nimport { capitalize, isActionCreator } from './util';\n\nexport function mapAction<Creators extends readonly ActionCreator[]>(\n ...args: [\n ...creators: Creators,\n storeMethod: (action: ActionType<Creators[number]>) => unknown\n ]\n): MapperTypes<Creators>;\nexport function mapAction<Creators extends readonly ActionCreator[], T>(\n ...args: [\n ...creators: Creators,\n storeMethod: (\n action: ActionType<Creators[number]>,\n resultMethod: (input: T) => unknown\n ) => unknown,\n resultMethod: (input: T) => unknown\n ]\n): MapperTypes<Creators>;\nexport function mapAction<Creators extends readonly ActionCreator[]>(\n ...args: [\n ...creators: Creators,\n storeMethod: (action: ActionType<Creators[number]>) => unknown,\n resultMethod?: (input: unknown) => unknown\n ]\n): MapperTypes<Creators> {\n let resultMethod = args.pop() as unknown as\n | ((input: unknown) => unknown)\n | undefined;\n let storeMethod = args.pop() as unknown as (\n action: ActionType<Creators[number]>\n ) => unknown;\n\n if (isActionCreator(storeMethod)) {\n args.push(storeMethod);\n storeMethod = resultMethod || storeMethod;\n resultMethod = undefined;\n }\n\n const types = (args as unknown as Creators).map(\n (creator) => creator.type\n ) as unknown as ExtractActionTypes<Creators>;\n\n return {\n types,\n storeMethod,\n resultMethod,\n };\n}\n\nexport function withActionMappers(\n ...mappers: MapperTypes<ActionCreator[]>[]\n): MapperTypes<ActionCreator[]>[] {\n return mappers;\n}\n\nexport function createReduxState<StoreName extends string, STORE extends Store>(\n storeName: StoreName,\n signalStore: STORE,\n withActionMappers: (\n store: InstanceType<STORE>\n ) => MapperTypes<ActionCreator[]>[]\n): CreateReduxState<StoreName, STORE> {\n const isRootProvider =\n (signalStore as ServiceWithDecorator)?.ɵprov?.providedIn === 'root';\n return {\n [`provide${capitalize(storeName)}Store`]: (connectReduxDevtools = false) =>\n makeEnvironmentProviders([\n isRootProvider ? [] : signalStore,\n provideEnvironmentInitializer(() => {\n const initializerFn = (\n (\n signalReduxStore = inject(SignalReduxStore),\n store = inject(signalStore)\n ) =>\n () => {\n if (connectReduxDevtools) {\n // addStoreToReduxDevtools(store, storeName, false);\n }\n signalReduxStore.connectFeatureStore(withActionMappers(store));\n }\n )();\n return initializerFn();\n }),\n ]),\n [`inject${capitalize(storeName)}Store`]: () =>\n Object.assign(inject(signalStore), { dispatch: injectReduxDispatch() }),\n } as CreateReduxState<StoreName, STORE>;\n}\n","import { Injector, Signal, inject } from \"@angular/core\";\nimport { rxMethod } from \"@ngrx/signals/rxjs-interop\";\nimport { Observable, Unsubscribable, map, pipe } from \"rxjs\";\n\n\ntype RxMethodInput<Input> = Input | Observable<Input> | Signal<Input>;\n\ntype RxMethodRef = {\n destroy: () => void;\n}\n\ntype RxMethod<Input, MethodInput = Input, MethodResult = unknown> = ((\n input: RxMethodInput<Input>,\n resultMethod: (input: MethodInput) => MethodResult\n) => RxMethodRef) & RxMethodRef;\n\nexport function reduxMethod<Input, MethodInput = Input>(\n generator: (source$: Observable<Input>) => Observable<MethodInput>,\n config?: { injector?: Injector }\n): RxMethod<Input, MethodInput>;\nexport function reduxMethod<Input, MethodInput = Input, MethodResult = unknown>(\n generator: (source$: Observable<Input>) => Observable<MethodInput>,\n resultMethod: (input: MethodInput) => MethodResult,\n config?: {\n injector?: Injector\n }\n): RxMethod<Input, MethodInput, MethodResult>;\nexport function reduxMethod<Input, MethodInput = Input, MethodResult = unknown>(\n generator: (source$: Observable<Input>) => Observable<MethodInput>,\n resultMethodOrConfig?: ((input: MethodInput) => MethodResult) | {\n injector?: Injector\n },\n config?: {\n injector?: Injector\n }\n): RxMethod<Input, MethodInput, MethodResult> {\n const injector = inject(Injector);\n\n if (typeof resultMethodOrConfig === 'function') {\n let unsubscribable: Unsubscribable;\n const inputResultFn = ((\n input: RxMethodInput<Input>,\n resultMethod = resultMethodOrConfig\n ) => {\n\n const rxMethodWithResult = rxMethod<Input>(pipe(\n generator,\n map(resultMethod)\n ), {\n ...(config || {}),\n injector: config?.injector || injector\n });\n const rxWithInput = rxMethodWithResult(input);\n unsubscribable = { unsubscribe: rxWithInput.destroy.bind(rxWithInput) };\n\n return rxWithInput;\n }) as RxMethod<Input, MethodInput, MethodResult>;\n\n inputResultFn.destroy = () => unsubscribable?.unsubscribe();\n\n return inputResultFn;\n }\n\n return rxMethod<Input>(generator, resultMethodOrConfig);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGM,SAAU,gBAAgB,CAC9B,EAA4B,EAAA;AAE5B,IAAA,OAAO,CAAC,CAAE,EAAyB,EAAE,WAAW;AAClD;AAEM,SAAU,UAAU,CAAC,GAAW,EAAA;IACpC,OAAO,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,GAAG;AAC5D;AAEM,SAAU,eAAe,CAAC,MAAe,EAAA;AAC7C,IAAA,OAAO,OAAO,CACZ,OAAO,MAAM,KAAK,UAAU;QAC1B,MAAM;AACN,QAAA,MAAM,IAAI,MAAM;AAChB,QAAA,MAAM,CAAC,IAAI;AACX,QAAA,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAClC;AACH;;MCVa,gBAAgB,CAAA;AAH7B,IAAA,WAAA,GAAA;QAIU,IAAU,CAAA,UAAA,GAGb,EAAE;QAEP,IAAQ,CAAA,QAAA,GAAG,QAAQ,CAAS,IAAI,CAC9B,GAAG,CAAC,CAA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CAAC,CAAA,MAAA,EAAS,UAAU,CAAC,SAAS,CAAC,CAAO,KAAA,CAAA,GAAG,MACvC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,EAAE,QAAQ,EAAE,mBAAmB,EAAE,EAAE,CAAC;KACpC;AACzC;;SC1EgB,WAAW,CACzB,SAAkE,EAClE,oBAEC,EACD,MAEC,EAAA;AAED,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAEjC,IAAA,IAAI,OAAO,oBAAoB,KAAK,UAAU,EAAE;AAC9C,QAAA,IAAI,cAA8B;QAClC,MAAM,aAAa,IAAI,CACrB,KAA2B,EAC3B,YAAY,GAAG,oBAAoB,KACjC;AAEF,YAAA,MAAM,kBAAkB,GAAG,QAAQ,CAAQ,IAAI,CAC7C,SAAS,EACT,GAAG,CAAC,YAAY,CAAC,CAClB,EAAE;AACD,gBAAA,IAAI,MAAM,IAAI,EAAE,CAAC;AACjB,gBAAA,QAAQ,EAAE,MAAM,EAAE,QAAQ,IAAI;AAC/B,aAAA,CAAC;AACF,YAAA,MAAM,WAAW,GAAG,kBAAkB,CAAC,KAAK,CAAC;AAC7C,YAAA,cAAc,GAAG,EAAE,WAAW,EAAE,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;AAEvE,YAAA,OAAO,WAAW;AACpB,SAAC,CAA+C;QAEhD,aAAa,CAAC,OAAO,GAAG,MAAM,cAAc,EAAE,WAAW,EAAE;AAE3D,QAAA,OAAO,aAAa;;AAGtB,IAAA,OAAO,QAAQ,CAAQ,SAAS,EAAE,oBAAoB,CAAC;AACzD;;AChEA;;AAEG;;;;"}
1
+ {"version":3,"file":"angular-architects-ngrx-toolkit-redux-connector.mjs","sources":["../../../../libs/ngrx-toolkit/redux-connector/src/lib/util.ts","../../../../libs/ngrx-toolkit/redux-connector/src/lib/signal-redux-store.ts","../../../../libs/ngrx-toolkit/redux-connector/src/lib/create-redux.ts","../../../../libs/ngrx-toolkit/redux-connector/src/lib/rxjs-interop/redux-method.ts","../../../../libs/ngrx-toolkit/redux-connector/angular-architects-ngrx-toolkit-redux-connector.ts"],"sourcesContent":["import { ActionCreator } from '@ngrx/store';\nimport { Unsubscribable } from 'rxjs';\n\nexport function isUnsubscribable<F extends (...args: unknown[]) => unknown>(\n fn: F | (F & Unsubscribable),\n): fn is F & Unsubscribable {\n return !!(fn as F & Unsubscribable)?.unsubscribe;\n}\n\nexport function capitalize(str: string): string {\n return str ? str[0].toUpperCase() + str.substring(1) : str;\n}\n\nexport function isActionCreator(action: unknown): action is ActionCreator {\n return Boolean(\n typeof action === 'function' &&\n action &&\n 'type' in action &&\n action.type &&\n typeof action.type === 'string',\n );\n}\n","import { Injectable, inject } from '@angular/core';\nimport { rxMethod } from '@ngrx/signals/rxjs-interop';\nimport { Action, ActionCreator } from '@ngrx/store';\nimport { pipe, tap } from 'rxjs';\nimport { MapperTypes } from './model';\nimport { isUnsubscribable } from './util';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SignalReduxStore {\n private mapperDict: Record<\n string,\n {\n storeMethod: (...args: unknown[]) => unknown;\n resultMethod?: (...args: unknown[]) => unknown;\n }\n > = {};\n\n dispatch = rxMethod<Action>(\n pipe(\n tap((action: Action) => {\n const callbacks = this.mapperDict[action.type];\n if (callbacks?.storeMethod) {\n if (\n isUnsubscribable(callbacks.storeMethod) &&\n callbacks.resultMethod\n ) {\n return callbacks.storeMethod(action, (a: Action) => {\n const resultAction = callbacks.resultMethod?.(a) as Action;\n this.dispatch(resultAction);\n });\n }\n\n return callbacks?.storeMethod(action);\n }\n\n return;\n }),\n ),\n );\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n connectFeatureStore(mappers: MapperTypes<ActionCreator<any, any>[]>[]): void {\n mappers.forEach((mapper) =>\n mapper.types.forEach(\n (action) =>\n (this.mapperDict[action] = {\n storeMethod: mapper.storeMethod,\n resultMethod: mapper.resultMethod,\n }),\n ),\n );\n }\n}\n\nexport function injectReduxDispatch() {\n return inject(SignalReduxStore).dispatch;\n}\n","import {\n inject,\n makeEnvironmentProviders,\n provideEnvironmentInitializer,\n} from '@angular/core';\nimport { ActionCreator, ActionType } from '@ngrx/store/src/models';\nimport {\n CreateReduxState,\n ExtractActionTypes,\n MapperTypes,\n ServiceWithDecorator,\n Store,\n} from './model';\nimport { SignalReduxStore, injectReduxDispatch } from './signal-redux-store';\nimport { capitalize, isActionCreator } from './util';\n\nexport function mapAction<Creators extends readonly ActionCreator[]>(\n ...args: [\n ...creators: Creators,\n storeMethod: (action: ActionType<Creators[number]>) => unknown,\n ]\n): MapperTypes<Creators>;\nexport function mapAction<Creators extends readonly ActionCreator[], T>(\n ...args: [\n ...creators: Creators,\n storeMethod: (\n action: ActionType<Creators[number]>,\n resultMethod: (input: T) => unknown,\n ) => unknown,\n resultMethod: (input: T) => unknown,\n ]\n): MapperTypes<Creators>;\nexport function mapAction<Creators extends readonly ActionCreator[]>(\n ...args: [\n ...creators: Creators,\n storeMethod: (action: ActionType<Creators[number]>) => unknown,\n resultMethod?: (input: unknown) => unknown,\n ]\n): MapperTypes<Creators> {\n let resultMethod = args.pop() as unknown as\n | ((input: unknown) => unknown)\n | undefined;\n let storeMethod = args.pop() as unknown as (\n action: ActionType<Creators[number]>,\n ) => unknown;\n\n if (isActionCreator(storeMethod)) {\n args.push(storeMethod);\n storeMethod = resultMethod || storeMethod;\n resultMethod = undefined;\n }\n\n const types = (args as unknown as Creators).map(\n (creator) => creator.type,\n ) as unknown as ExtractActionTypes<Creators>;\n\n return {\n types,\n storeMethod,\n resultMethod,\n };\n}\n\nexport function withActionMappers(\n ...mappers: MapperTypes<ActionCreator[]>[]\n): MapperTypes<ActionCreator[]>[] {\n return mappers;\n}\n\nexport function createReduxState<StoreName extends string, STORE extends Store>(\n storeName: StoreName,\n signalStore: STORE,\n withActionMappers: (\n store: InstanceType<STORE>,\n ) => MapperTypes<ActionCreator[]>[],\n): CreateReduxState<StoreName, STORE> {\n const isRootProvider =\n (signalStore as ServiceWithDecorator)?.ɵprov?.providedIn === 'root';\n return {\n [`provide${capitalize(storeName)}Store`]: (connectReduxDevtools = false) =>\n makeEnvironmentProviders([\n isRootProvider ? [] : signalStore,\n provideEnvironmentInitializer(() => {\n const initializerFn = (\n (\n signalReduxStore = inject(SignalReduxStore),\n store = inject(signalStore),\n ) =>\n () => {\n if (connectReduxDevtools) {\n // addStoreToReduxDevtools(store, storeName, false);\n }\n signalReduxStore.connectFeatureStore(withActionMappers(store));\n }\n )();\n return initializerFn();\n }),\n ]),\n [`inject${capitalize(storeName)}Store`]: () =>\n Object.assign(inject(signalStore), { dispatch: injectReduxDispatch() }),\n } as CreateReduxState<StoreName, STORE>;\n}\n","import { Injector, Signal, inject } from '@angular/core';\nimport { rxMethod } from '@ngrx/signals/rxjs-interop';\nimport { Observable, Unsubscribable, map, pipe } from 'rxjs';\n\ntype RxMethodInput<Input> = Input | Observable<Input> | Signal<Input>;\n\ntype RxMethodRef = {\n destroy: () => void;\n};\n\ntype RxMethod<Input, MethodInput = Input, MethodResult = unknown> = ((\n input: RxMethodInput<Input>,\n resultMethod: (input: MethodInput) => MethodResult,\n) => RxMethodRef) &\n RxMethodRef;\n\nexport function reduxMethod<Input, MethodInput = Input>(\n generator: (source$: Observable<Input>) => Observable<MethodInput>,\n config?: { injector?: Injector },\n): RxMethod<Input, MethodInput>;\nexport function reduxMethod<Input, MethodInput = Input, MethodResult = unknown>(\n generator: (source$: Observable<Input>) => Observable<MethodInput>,\n resultMethod: (input: MethodInput) => MethodResult,\n config?: {\n injector?: Injector;\n },\n): RxMethod<Input, MethodInput, MethodResult>;\nexport function reduxMethod<Input, MethodInput = Input, MethodResult = unknown>(\n generator: (source$: Observable<Input>) => Observable<MethodInput>,\n resultMethodOrConfig?:\n | ((input: MethodInput) => MethodResult)\n | {\n injector?: Injector;\n },\n config?: {\n injector?: Injector;\n },\n): RxMethod<Input, MethodInput, MethodResult> {\n const injector = inject(Injector);\n\n if (typeof resultMethodOrConfig === 'function') {\n let unsubscribable: Unsubscribable;\n const inputResultFn = ((\n input: RxMethodInput<Input>,\n resultMethod = resultMethodOrConfig,\n ) => {\n const rxMethodWithResult = rxMethod<Input>(\n pipe(generator, map(resultMethod)),\n {\n ...(config || {}),\n injector: config?.injector || injector,\n },\n );\n const rxWithInput = rxMethodWithResult(input);\n unsubscribable = { unsubscribe: rxWithInput.destroy.bind(rxWithInput) };\n\n return rxWithInput;\n }) as RxMethod<Input, MethodInput, MethodResult>;\n\n inputResultFn.destroy = () => unsubscribable?.unsubscribe();\n\n return inputResultFn;\n }\n\n return rxMethod<Input>(generator, resultMethodOrConfig);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGM,SAAU,gBAAgB,CAC9B,EAA4B,EAAA;AAE5B,IAAA,OAAO,CAAC,CAAE,EAAyB,EAAE,WAAW;AAClD;AAEM,SAAU,UAAU,CAAC,GAAW,EAAA;IACpC,OAAO,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,GAAG;AAC5D;AAEM,SAAU,eAAe,CAAC,MAAe,EAAA;AAC7C,IAAA,OAAO,OAAO,CACZ,OAAO,MAAM,KAAK,UAAU;QAC1B,MAAM;AACN,QAAA,MAAM,IAAI,MAAM;AAChB,QAAA,MAAM,CAAC,IAAI;AACX,QAAA,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAClC;AACH;;MCXa,gBAAgB,CAAA;AAH7B,IAAA,WAAA,GAAA;QAIU,IAAU,CAAA,UAAA,GAMd,EAAE;QAEN,IAAQ,CAAA,QAAA,GAAG,QAAQ,CACjB,IAAI,CACF,GAAG,CAAC,CAAC,MAAc,KAAI;YACrB,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC;AAC9C,YAAA,IAAI,SAAS,E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