@angular/router 14.2.0-next.1 → 14.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.
Files changed (34) hide show
  1. package/esm2020/src/components/empty_outlet.mjs +3 -3
  2. package/esm2020/src/directives/router_link.mjs +101 -23
  3. package/esm2020/src/directives/router_link_active.mjs +3 -3
  4. package/esm2020/src/directives/router_outlet.mjs +3 -3
  5. package/esm2020/src/index.mjs +3 -2
  6. package/esm2020/src/page_title_strategy.mjs +6 -6
  7. package/esm2020/src/patchable_relative_link_resolution.mjs +12 -0
  8. package/esm2020/src/private_export.mjs +3 -2
  9. package/esm2020/src/provide_router.mjs +420 -0
  10. package/esm2020/src/router.mjs +6 -4
  11. package/esm2020/src/router_config.mjs +1 -1
  12. package/esm2020/src/router_config_loader.mjs +3 -3
  13. package/esm2020/src/router_module.mjs +28 -185
  14. package/esm2020/src/router_outlet_context.mjs +3 -3
  15. package/esm2020/src/router_preloader.mjs +12 -11
  16. package/esm2020/src/router_scroller.mjs +3 -3
  17. package/esm2020/src/url_tree.mjs +3 -3
  18. package/esm2020/src/version.mjs +1 -1
  19. package/esm2020/testing/src/provide_router_for_testing.mjs +51 -0
  20. package/esm2020/testing/src/router_testing_module.mjs +8 -8
  21. package/fesm2015/router.mjs +626 -279
  22. package/fesm2015/router.mjs.map +1 -1
  23. package/fesm2015/testing.mjs +8 -8
  24. package/fesm2015/testing.mjs.map +1 -1
  25. package/fesm2015/upgrade.mjs +1 -1
  26. package/fesm2020/router.mjs +624 -277
  27. package/fesm2020/router.mjs.map +1 -1
  28. package/fesm2020/testing.mjs +8 -8
  29. package/fesm2020/testing.mjs.map +1 -1
  30. package/fesm2020/upgrade.mjs +1 -1
  31. package/index.d.ts +505 -147
  32. package/package.json +4 -4
  33. package/testing/index.d.ts +1 -1
  34. package/upgrade/index.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.2.0-next.1
2
+ * @license Angular v14.2.1
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -8,7 +8,7 @@ import { Location, LocationStrategy } from '@angular/common';
8
8
  import { SpyLocation, MockLocationStrategy } from '@angular/common/testing';
9
9
  import * as i0 from '@angular/core';
10
10
  import { Compiler, Injector, Optional, NgModule } from '@angular/core';
11
- import { Router, ɵflatten, ɵassignExtraOptionsToRouter, provideRoutes, ROUTER_CONFIGURATION, RouterModule, ɵROUTER_PROVIDERS, UrlSerializer, ChildrenOutletContexts, ROUTES, TitleStrategy, UrlHandlingStrategy, RouteReuseStrategy, ɵprovidePreloading, NoPreloading } from '@angular/router';
11
+ import { Router, ɵflatten, ɵassignExtraOptionsToRouter, provideRoutes, ROUTER_CONFIGURATION, RouterModule, ɵROUTER_PROVIDERS, UrlSerializer, ChildrenOutletContexts, ROUTES, TitleStrategy, UrlHandlingStrategy, RouteReuseStrategy, ɵwithPreloading, NoPreloading } from '@angular/router';
12
12
 
13
13
  /**
14
14
  * @license
@@ -101,9 +101,9 @@ class RouterTestingModule {
101
101
  };
102
102
  }
103
103
  }
104
- RouterTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
105
- RouterTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterTestingModule, exports: [RouterModule] });
106
- RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterTestingModule, providers: [
104
+ RouterTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: RouterTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
105
+ RouterTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: RouterTestingModule, exports: [RouterModule] });
106
+ RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: RouterTestingModule, providers: [
107
107
  ɵROUTER_PROVIDERS,
108
108
  EXTRA_ROUTER_TESTING_PROVIDERS,
109
109
  { provide: Location, useClass: SpyLocation },
@@ -124,10 +124,10 @@ RouterTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ver
124
124
  [RouteReuseStrategy, new Optional()],
125
125
  ]
126
126
  },
127
- ɵprovidePreloading(NoPreloading),
127
+ ɵwithPreloading(NoPreloading).ɵproviders,
128
128
  provideRoutes([]),
129
129
  ], imports: [RouterModule] });
130
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1", ngImport: i0, type: RouterTestingModule, decorators: [{
130
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: RouterTestingModule, decorators: [{
131
131
  type: NgModule,
132
132
  args: [{
133
133
  exports: [RouterModule],
@@ -152,7 +152,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-next.1",
152
152
  [RouteReuseStrategy, new Optional()],
153
153
  ]
154
154
  },
155
- ɵprovidePreloading(NoPreloading),
155
+ ɵwithPreloading(NoPreloading).ɵproviders,
156
156
  provideRoutes([]),
157
157
  ]
158
158
  }]
@@ -1 +1 @@
1
- {"version":3,"file":"testing.mjs","sources":["../../../../../../packages/router/testing/src/extra_router_testing_providers.ts","../../../../../../packages/router/testing/src/router_testing_module.ts","../../../../../../packages/router/testing/src/spy_ng_module_factory_loader.ts","../../../../../../packages/router/testing/src/testing.ts","../../../../../../packages/router/testing/public_api.ts","../../../../../../packages/router/testing/index.ts","../../../../../../packages/router/testing/testing.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file exists to easily patch the SpyNgModuleFactoryLoader into g3\nexport const EXTRA_ROUTER_TESTING_PROVIDERS = [];\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location, LocationStrategy} from '@angular/common';\nimport {MockLocationStrategy, SpyLocation} from '@angular/common/testing';\nimport {Compiler, Injector, ModuleWithProviders, NgModule, Optional} from '@angular/core';\nimport {ChildrenOutletContexts, ExtraOptions, NoPreloading, provideRoutes, Route, Router, ROUTER_CONFIGURATION, RouteReuseStrategy, RouterModule, ROUTES, Routes, TitleStrategy, UrlHandlingStrategy, UrlSerializer, ɵassignExtraOptionsToRouter as assignExtraOptionsToRouter, ɵflatten as flatten, ɵprovidePreloading as providePreloading, ɵROUTER_PROVIDERS as ROUTER_PROVIDERS} from '@angular/router';\n\nimport {EXTRA_ROUTER_TESTING_PROVIDERS} from './extra_router_testing_providers';\n\nfunction isUrlHandlingStrategy(opts: ExtraOptions|\n UrlHandlingStrategy): opts is UrlHandlingStrategy {\n // This property check is needed because UrlHandlingStrategy is an interface and doesn't exist at\n // runtime.\n return 'shouldProcessUrl' in opts;\n}\n\n/**\n * Router setup factory function used for testing. Only used internally to keep the factory that's\n * marked as publicApi cleaner (i.e. not having _both_ `TitleStrategy` and `DefaultTitleStrategy`).\n */\nexport function setupTestingRouterInternal(\n urlSerializer: UrlSerializer,\n contexts: ChildrenOutletContexts,\n location: Location,\n compiler: Compiler,\n injector: Injector,\n routes: Route[][],\n titleStrategy: TitleStrategy,\n opts?: ExtraOptions|UrlHandlingStrategy,\n urlHandlingStrategy?: UrlHandlingStrategy,\n routeReuseStrategy?: RouteReuseStrategy,\n) {\n return setupTestingRouter(\n urlSerializer, contexts, location, compiler, injector, routes, opts, urlHandlingStrategy,\n routeReuseStrategy, titleStrategy);\n}\n\n/**\n * Router setup factory function used for testing.\n *\n * @publicApi\n */\nexport function setupTestingRouter(\n urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n compiler: Compiler, injector: Injector, routes: Route[][],\n opts?: ExtraOptions|UrlHandlingStrategy|null, urlHandlingStrategy?: UrlHandlingStrategy,\n routeReuseStrategy?: RouteReuseStrategy, titleStrategy?: TitleStrategy) {\n const router =\n new Router(null!, urlSerializer, contexts, location, injector, compiler, flatten(routes));\n if (opts) {\n // Handle deprecated argument ordering.\n if (isUrlHandlingStrategy(opts)) {\n router.urlHandlingStrategy = opts;\n } else {\n // Handle ExtraOptions\n assignExtraOptionsToRouter(opts, router);\n }\n }\n\n if (urlHandlingStrategy) {\n router.urlHandlingStrategy = urlHandlingStrategy;\n }\n\n if (routeReuseStrategy) {\n router.routeReuseStrategy = routeReuseStrategy;\n }\n\n router.titleStrategy = titleStrategy;\n\n return router;\n}\n\n/**\n * @description\n *\n * Sets up the router to be used for testing.\n *\n * The modules sets up the router to be used for testing.\n * It provides spy implementations of `Location` and `LocationStrategy`.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * beforeEach(() => {\n * TestBed.configureTestingModule({\n * imports: [\n * RouterTestingModule.withRoutes(\n * [{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}]\n * )\n * ]\n * });\n * });\n * ```\n *\n * @publicApi\n */\n@NgModule({\n exports: [RouterModule],\n providers: [\n ROUTER_PROVIDERS,\n EXTRA_ROUTER_TESTING_PROVIDERS,\n {provide: Location, useClass: SpyLocation},\n {provide: LocationStrategy, useClass: MockLocationStrategy},\n {\n provide: Router,\n useFactory: setupTestingRouterInternal,\n deps: [\n UrlSerializer,\n ChildrenOutletContexts,\n Location,\n Compiler,\n Injector,\n ROUTES,\n TitleStrategy,\n ROUTER_CONFIGURATION,\n [UrlHandlingStrategy, new Optional()],\n [RouteReuseStrategy, new Optional()],\n ]\n },\n providePreloading(NoPreloading),\n provideRoutes([]),\n ]\n})\nexport class RouterTestingModule {\n static withRoutes(routes: Routes, config?: ExtraOptions):\n ModuleWithProviders<RouterTestingModule> {\n return {\n ngModule: RouterTestingModule,\n providers: [\n provideRoutes(routes),\n {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n ]\n };\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file exists for easily patching SpyNgModuleFactoryLoader in g3\nexport default {};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the router/testing package.\n */\nexport * from './router_testing_module';\nexport * from './spy_ng_module_factory_loader';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/testing';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["flatten","assignExtraOptionsToRouter","ROUTER_PROVIDERS","providePreloading"],"mappings":";;;;;;;;;;;;AAAA;;;;;;AAMG;AAEH;AACO,MAAM,8BAA8B,GAAG,EAAE;;ACThD;;;;;;AAMG;AASH,SAAS,qBAAqB,CAAC,IACmB,EAAA;;;IAGhD,OAAO,kBAAkB,IAAI,IAAI,CAAC;AACpC,CAAC;AAED;;;AAGG;AACG,SAAU,0BAA0B,CACtC,aAA4B,EAC5B,QAAgC,EAChC,QAAkB,EAClB,QAAkB,EAClB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B,CAAC,YAAY,CAAC;QAC/B,aAAa,CAAC,EAAE,CAAC;AAClB,KAAA,EAAA,OAAA,EAAA,CAxBS,YAAY,CAAA,EAAA,CAAA,CAAA;sGA0BX,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBA3B/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,SAAS,EAAE;wBACTD,iBAAgB;wBAChB,8BAA8B;AAC9B,wBAAA,EAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAC;AAC1C,wBAAA,EAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,oBAAoB,EAAC;AAC3D,wBAAA;AACE,4BAAA,OAAO,EAAE,MAAM;AACf,4BAAA,UAAU,EAAE,0BAA0B;AACtC,4BAAA,IAAI,EAAE;gCACJ,aAAa;gCACb,sBAAsB;gCACtB,QAAQ;gCACR,QAAQ;gCACR,QAAQ;gCACR,MAAM;gCACN,aAAa;gCACb,oBAAoB;AACpB,gCAAA,CAAC,mBAAmB,EAAE,IAAI,QAAQ,EAAE,CAAC;AACrC,gCAAA,CAAC,kBAAkB,EAAE,IAAI,QAAQ,EAAE,CAAC;AACrC,6BAAA;AACF,yBAAA;wBACDC,kBAAiB,CAAC,YAAY,CAAC;wBAC/B,aAAa,CAAC,EAAE,CAAC;AAClB,qBAAA;AACF,iBAAA,CAAA;;;ACjID;;;;;;AAMG;AAEH;AACA,mCAAe,EAAE;;ACTjB;;;;;;AAMG;;ACNH;;;;;;AAMG;AASH;;ACfA;;;;;;AAMG;;ACNH;;AAEG;;;;"}
1
+ {"version":3,"file":"testing.mjs","sources":["../../../../../../packages/router/testing/src/extra_router_testing_providers.ts","../../../../../../packages/router/testing/src/router_testing_module.ts","../../../../../../packages/router/testing/src/spy_ng_module_factory_loader.ts","../../../../../../packages/router/testing/src/testing.ts","../../../../../../packages/router/testing/public_api.ts","../../../../../../packages/router/testing/index.ts","../../../../../../packages/router/testing/testing.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file exists to easily patch the SpyNgModuleFactoryLoader into g3\nexport const EXTRA_ROUTER_TESTING_PROVIDERS = [];\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location, LocationStrategy} from '@angular/common';\nimport {MockLocationStrategy, SpyLocation} from '@angular/common/testing';\nimport {Compiler, Injector, ModuleWithProviders, NgModule, Optional} from '@angular/core';\nimport {ChildrenOutletContexts, ExtraOptions, NoPreloading, provideRoutes, Route, Router, ROUTER_CONFIGURATION, RouteReuseStrategy, RouterModule, ROUTES, Routes, TitleStrategy, UrlHandlingStrategy, UrlSerializer, ɵassignExtraOptionsToRouter as assignExtraOptionsToRouter, ɵflatten as flatten, ɵROUTER_PROVIDERS as ROUTER_PROVIDERS, ɵwithPreloading as withPreloading} from '@angular/router';\n\nimport {EXTRA_ROUTER_TESTING_PROVIDERS} from './extra_router_testing_providers';\n\nfunction isUrlHandlingStrategy(opts: ExtraOptions|\n UrlHandlingStrategy): opts is UrlHandlingStrategy {\n // This property check is needed because UrlHandlingStrategy is an interface and doesn't exist at\n // runtime.\n return 'shouldProcessUrl' in opts;\n}\n\n/**\n * Router setup factory function used for testing. Only used internally to keep the factory that's\n * marked as publicApi cleaner (i.e. not having _both_ `TitleStrategy` and `DefaultTitleStrategy`).\n */\nexport function setupTestingRouterInternal(\n urlSerializer: UrlSerializer,\n contexts: ChildrenOutletContexts,\n location: Location,\n compiler: Compiler,\n injector: Injector,\n routes: Route[][],\n titleStrategy: TitleStrategy,\n opts?: ExtraOptions|UrlHandlingStrategy,\n urlHandlingStrategy?: UrlHandlingStrategy,\n routeReuseStrategy?: RouteReuseStrategy,\n) {\n return setupTestingRouter(\n urlSerializer, contexts, location, compiler, injector, routes, opts, urlHandlingStrategy,\n routeReuseStrategy, titleStrategy);\n}\n\n/**\n * Router setup factory function used for testing.\n *\n * @publicApi\n */\nexport function setupTestingRouter(\n urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n compiler: Compiler, injector: Injector, routes: Route[][],\n opts?: ExtraOptions|UrlHandlingStrategy|null, urlHandlingStrategy?: UrlHandlingStrategy,\n routeReuseStrategy?: RouteReuseStrategy, titleStrategy?: TitleStrategy) {\n const router =\n new Router(null!, urlSerializer, contexts, location, injector, compiler, flatten(routes));\n if (opts) {\n // Handle deprecated argument ordering.\n if (isUrlHandlingStrategy(opts)) {\n router.urlHandlingStrategy = opts;\n } else {\n // Handle ExtraOptions\n assignExtraOptionsToRouter(opts, router);\n }\n }\n\n if (urlHandlingStrategy) {\n router.urlHandlingStrategy = urlHandlingStrategy;\n }\n\n if (routeReuseStrategy) {\n router.routeReuseStrategy = routeReuseStrategy;\n }\n\n router.titleStrategy = titleStrategy;\n\n return router;\n}\n\n/**\n * @description\n *\n * Sets up the router to be used for testing.\n *\n * The modules sets up the router to be used for testing.\n * It provides spy implementations of `Location` and `LocationStrategy`.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * beforeEach(() => {\n * TestBed.configureTestingModule({\n * imports: [\n * RouterTestingModule.withRoutes(\n * [{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}]\n * )\n * ]\n * });\n * });\n * ```\n *\n * @publicApi\n */\n@NgModule({\n exports: [RouterModule],\n providers: [\n ROUTER_PROVIDERS,\n EXTRA_ROUTER_TESTING_PROVIDERS,\n {provide: Location, useClass: SpyLocation},\n {provide: LocationStrategy, useClass: MockLocationStrategy},\n {\n provide: Router,\n useFactory: setupTestingRouterInternal,\n deps: [\n UrlSerializer,\n ChildrenOutletContexts,\n Location,\n Compiler,\n Injector,\n ROUTES,\n TitleStrategy,\n ROUTER_CONFIGURATION,\n [UrlHandlingStrategy, new Optional()],\n [RouteReuseStrategy, new Optional()],\n ]\n },\n withPreloading(NoPreloading).ɵproviders,\n provideRoutes([]),\n ]\n})\nexport class RouterTestingModule {\n static withRoutes(routes: Routes, config?: ExtraOptions):\n ModuleWithProviders<RouterTestingModule> {\n return {\n ngModule: RouterTestingModule,\n providers: [\n provideRoutes(routes),\n {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n ]\n };\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file exists for easily patching SpyNgModuleFactoryLoader in g3\nexport default {};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the router/testing package.\n */\nexport * from './router_testing_module';\nexport * from './spy_ng_module_factory_loader';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/testing';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["flatten","assignExtraOptionsToRouter","ROUTER_PROVIDERS","withPreloading"],"mappings":";;;;;;;;;;;;AAAA;;;;;;AAMG;AAEH;AACO,MAAM,8BAA8B,GAAG,EAAE;;ACThD;;;;;;AAMG;AASH,SAAS,qBAAqB,CAAC,IACmB,EAAA;;;IAGhD,OAAO,kBAAkB,IAA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