@wirestate/core 0.7.0-experimental.1 → 0.7.0-experimental.3

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 (139) hide show
  1. package/CHANGELOG.md +8 -2
  2. package/README.md +2 -2
  3. package/cjs/development/index.js +28 -26
  4. package/cjs/development/index.js.map +1 -1
  5. package/cjs/development/lib.js +234 -288
  6. package/cjs/development/lib.js.map +1 -1
  7. package/cjs/development/test-utils.js +22 -38
  8. package/cjs/development/test-utils.js.map +1 -1
  9. package/cjs/production/index.js +1 -1
  10. package/cjs/production/index.js.map +1 -1
  11. package/cjs/production/lib.js +1 -1
  12. package/cjs/production/lib.js.map +1 -1
  13. package/cjs/production/test-utils.js +1 -1
  14. package/cjs/production/test-utils.js.map +1 -1
  15. package/esm/development/bind/bind-dynamic-value.js +1 -1
  16. package/esm/development/bind/bind-dynamic-value.js.map +1 -1
  17. package/esm/development/bind/bind-entry.js +1 -4
  18. package/esm/development/bind/bind-entry.js.map +1 -1
  19. package/esm/development/bind/bind-service.js +40 -54
  20. package/esm/development/bind/bind-service.js.map +1 -1
  21. package/esm/development/commands/command-bus.js +33 -42
  22. package/esm/development/commands/command-bus.js.map +1 -1
  23. package/esm/development/commands/get-command-handler-metadata.js +3 -3
  24. package/esm/development/commands/get-command-handler-metadata.js.map +1 -1
  25. package/esm/development/commands/on-command.js +4 -4
  26. package/esm/development/commands/on-command.js.map +1 -1
  27. package/esm/development/container/create-base-container.js +2 -3
  28. package/esm/development/container/create-base-container.js.map +1 -1
  29. package/esm/development/container/create-container.js +10 -19
  30. package/esm/development/container/create-container.js.map +1 -1
  31. package/esm/development/container/wire-scope.js +41 -42
  32. package/esm/development/container/wire-scope.js.map +1 -1
  33. package/esm/development/error/error-code.js +8 -8
  34. package/esm/development/error/error-code.js.map +1 -1
  35. package/esm/development/error/wirestate-error.js +18 -17
  36. package/esm/development/error/wirestate-error.js.map +1 -1
  37. package/esm/development/events/build-event-dispatcher.js +5 -7
  38. package/esm/development/events/build-event-dispatcher.js.map +1 -1
  39. package/esm/development/events/emit-event.js +3 -3
  40. package/esm/development/events/emit-event.js.map +1 -1
  41. package/esm/development/events/event-bus.js +16 -23
  42. package/esm/development/events/event-bus.js.map +1 -1
  43. package/esm/development/events/get-event-handler-metadata.js +3 -3
  44. package/esm/development/events/get-event-handler-metadata.js.map +1 -1
  45. package/esm/development/events/on-event.js +4 -5
  46. package/esm/development/events/on-event.js.map +1 -1
  47. package/esm/development/queries/get-query-handler-metadata.js +3 -3
  48. package/esm/development/queries/get-query-handler-metadata.js.map +1 -1
  49. package/esm/development/queries/on-query.js +4 -4
  50. package/esm/development/queries/on-query.js.map +1 -1
  51. package/esm/development/queries/query-bus.js +29 -35
  52. package/esm/development/queries/query-bus.js.map +1 -1
  53. package/esm/development/registry.js +10 -10
  54. package/esm/development/registry.js.map +1 -1
  55. package/esm/development/seeds/apply-seeds.js +2 -5
  56. package/esm/development/seeds/apply-seeds.js.map +1 -1
  57. package/esm/development/seeds/tokens.js +2 -2
  58. package/esm/development/seeds/tokens.js.map +1 -1
  59. package/esm/development/seeds/unapply-seeds.js +2 -3
  60. package/esm/development/seeds/unapply-seeds.js.map +1 -1
  61. package/esm/development/service/get-activated-handler-metadata.js +3 -3
  62. package/esm/development/service/get-activated-handler-metadata.js.map +1 -1
  63. package/esm/development/service/get-deactivation-handler-metadata.js +3 -3
  64. package/esm/development/service/get-deactivation-handler-metadata.js.map +1 -1
  65. package/esm/development/service/on-activated.js +3 -3
  66. package/esm/development/service/on-activated.js.map +1 -1
  67. package/esm/development/service/on-deactivation.js +3 -3
  68. package/esm/development/service/on-deactivation.js.map +1 -1
  69. package/esm/development/test-utils/mock-bind-entry.js +4 -5
  70. package/esm/development/test-utils/mock-bind-entry.js.map +1 -1
  71. package/esm/development/test-utils/mock-bind-service.js +4 -5
  72. package/esm/development/test-utils/mock-bind-service.js.map +1 -1
  73. package/esm/development/test-utils/mock-container.js +13 -21
  74. package/esm/development/test-utils/mock-container.js.map +1 -1
  75. package/esm/development/test-utils/mock-service.js +1 -7
  76. package/esm/development/test-utils/mock-service.js.map +1 -1
  77. package/esm/production/bind/bind-dynamic-value.js +1 -1
  78. package/esm/production/bind/bind-dynamic-value.js.map +1 -1
  79. package/esm/production/bind/bind-entry.js +1 -1
  80. package/esm/production/bind/bind-entry.js.map +1 -1
  81. package/esm/production/bind/bind-service.js +1 -1
  82. package/esm/production/bind/bind-service.js.map +1 -1
  83. package/esm/production/commands/command-bus.js +1 -1
  84. package/esm/production/commands/command-bus.js.map +1 -1
  85. package/esm/production/commands/get-command-handler-metadata.js +1 -1
  86. package/esm/production/commands/get-command-handler-metadata.js.map +1 -1
  87. package/esm/production/commands/on-command.js +1 -1
  88. package/esm/production/commands/on-command.js.map +1 -1
  89. package/esm/production/container/create-base-container.js +1 -1
  90. package/esm/production/container/create-base-container.js.map +1 -1
  91. package/esm/production/container/create-container.js +1 -1
  92. package/esm/production/container/create-container.js.map +1 -1
  93. package/esm/production/container/wire-scope.js +1 -1
  94. package/esm/production/container/wire-scope.js.map +1 -1
  95. package/esm/production/error/error-code.js +1 -1
  96. package/esm/production/error/error-code.js.map +1 -1
  97. package/esm/production/error/wirestate-error.js +1 -1
  98. package/esm/production/error/wirestate-error.js.map +1 -1
  99. package/esm/production/events/build-event-dispatcher.js +1 -1
  100. package/esm/production/events/build-event-dispatcher.js.map +1 -1
  101. package/esm/production/events/emit-event.js.map +1 -1
  102. package/esm/production/events/event-bus.js +1 -1
  103. package/esm/production/events/event-bus.js.map +1 -1
  104. package/esm/production/events/get-event-handler-metadata.js +1 -1
  105. package/esm/production/events/get-event-handler-metadata.js.map +1 -1
  106. package/esm/production/events/on-event.js +1 -1
  107. package/esm/production/events/on-event.js.map +1 -1
  108. package/esm/production/queries/get-query-handler-metadata.js +1 -1
  109. package/esm/production/queries/get-query-handler-metadata.js.map +1 -1
  110. package/esm/production/queries/on-query.js +1 -1
  111. package/esm/production/queries/on-query.js.map +1 -1
  112. package/esm/production/queries/query-bus.js +1 -1
  113. package/esm/production/queries/query-bus.js.map +1 -1
  114. package/esm/production/registry.js +1 -1
  115. package/esm/production/registry.js.map +1 -1
  116. package/esm/production/seeds/apply-seeds.js +1 -1
  117. package/esm/production/seeds/apply-seeds.js.map +1 -1
  118. package/esm/production/seeds/tokens.js +1 -1
  119. package/esm/production/seeds/tokens.js.map +1 -1
  120. package/esm/production/seeds/unapply-seeds.js +1 -1
  121. package/esm/production/seeds/unapply-seeds.js.map +1 -1
  122. package/esm/production/service/get-activated-handler-metadata.js +1 -1
  123. package/esm/production/service/get-activated-handler-metadata.js.map +1 -1
  124. package/esm/production/service/get-deactivation-handler-metadata.js +1 -1
  125. package/esm/production/service/get-deactivation-handler-metadata.js.map +1 -1
  126. package/esm/production/service/on-activated.js +1 -1
  127. package/esm/production/service/on-activated.js.map +1 -1
  128. package/esm/production/service/on-deactivation.js +1 -1
  129. package/esm/production/service/on-deactivation.js.map +1 -1
  130. package/esm/production/test-utils/mock-bind-entry.js +1 -1
  131. package/esm/production/test-utils/mock-bind-entry.js.map +1 -1
  132. package/esm/production/test-utils/mock-bind-service.js +1 -1
  133. package/esm/production/test-utils/mock-bind-service.js.map +1 -1
  134. package/esm/production/test-utils/mock-container.js +1 -1
  135. package/esm/production/test-utils/mock-container.js.map +1 -1
  136. package/esm/production/test-utils/mock-service.js +1 -1
  137. package/esm/production/test-utils/mock-service.js.map +1 -1
  138. package/index.d.ts +1 -1
  139. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- ## 0.7.0
1
+ ## Unreleased
2
2
 
3
3
  - Add `useScope` in `@wirestate/react`
4
4
  - New lit elements modules - `@wirestate/lit` and `@wirestate/lit-signals`
@@ -10,13 +10,19 @@
10
10
  - Export more alias / methods from `@wirestate/react-mobx`
11
11
  - Export missing methods typing for `@wirestate/core`
12
12
  - Extensive JSDoc coverage for wirestate packages
13
- - `createIocContainer`: Added ability to instantly provide and activate entries, targeted seeds
13
+ - `createIocContainer`: Removed in favor of `createContainer`
14
+ - `createContainer`: Added ability to instantly provide and activate entries, targeted seeds
14
15
  - `createInjectablesProvider`: Removed.
15
16
  - `IocProvider`: Removed
16
17
  - `useRootContainer`: Added separate hook for store management in React tree
17
18
  - `ContainerProvider`: Simpler provider for containers.
18
19
  - `SubContainerProvider`: Added component solving problems of removed `createInjectablesProvider`
19
20
  - `ContainerActivator`: Added separate activation component
21
+ - Replace IoC-context provision APIs with `ContainerContext`, `containerProvide`, `ContainerProvider`, and `useContainerProvision`
22
+ - Replace injectables-provider APIs with `subContainerProvide`, `SubContainerProvider`, and `useSubContainerProvider`
23
+ - Provide plain `Container` values through Lit context instead of wrapper objects
24
+ - Recreate managed child containers when the parent container context changes
25
+ - Add `useContainer` and `useScope` consumers in `@wirestate/lit`
20
26
 
21
27
  ## 0.6.3
22
28
 
package/README.md CHANGED
@@ -41,9 +41,9 @@ export class CounterService {
41
41
  ## Container
42
42
 
43
43
  ```ts
44
- import { createIocContainer, bindService } from "@wirestate/core";
44
+ import { createContainer, bindService } from "@wirestate/core";
45
45
 
46
- const container = createIocContainer({
46
+ const container = createContainer({
47
47
  seed: { baseUrl: "https://example.com" },
48
48
  entries: [CounterService],
49
49
  });
@@ -2,7 +2,7 @@
2
2
 
3
3
  var inversify = require('inversify');
4
4
  var createContainer = require('./lib.js');
5
- var tslib = require('tslib');
5
+ require('tslib');
6
6
 
7
7
  /**
8
8
  * Util to resolve circular dependencies by wrapping the service identifier in a lazy identifier.
@@ -108,9 +108,9 @@ function commandOptional(container, type, data) {
108
108
  * ```
109
109
  */
110
110
  function OnCommand(type) {
111
- return function (target, propertyKey) {
112
- var constructor = target.constructor;
113
- var list = createContainer.COMMAND_HANDLER_METADATA.get(constructor);
111
+ return (target, propertyKey) => {
112
+ const constructor = target.constructor;
113
+ let list = createContainer.COMMAND_HANDLER_METADATA.get(constructor);
114
114
  if (!list) {
115
115
  list = [];
116
116
  createContainer.COMMAND_HANDLER_METADATA.set(constructor, list);
@@ -118,7 +118,7 @@ function OnCommand(type) {
118
118
  // Register handler metadata for prototype-based retrieval.
119
119
  list.push({
120
120
  methodName: propertyKey,
121
- type: type
121
+ type
122
122
  });
123
123
  };
124
124
  }
@@ -146,9 +146,9 @@ function OnCommand(type) {
146
146
  */
147
147
  function emitEvent(container, type, payload, from) {
148
148
  container.get(createContainer.EventBus).emit({
149
- type: type,
150
- payload: payload,
151
- from: from
149
+ type,
150
+ payload,
151
+ from
152
152
  });
153
153
  }
154
154
 
@@ -189,10 +189,10 @@ function emitEvent(container, type, payload, from) {
189
189
  */
190
190
  function OnEvent(types) {
191
191
  // Normalize types to an array or null for catch-all.
192
- var normalized = types === undefined ? null : Array.isArray(types) ? tslib.__spreadArray([], types, true) : [types];
193
- return function (target, propertyKey) {
194
- var constructor = target.constructor;
195
- var list = createContainer.EVENT_HANDLER_METADATA.get(constructor);
192
+ const normalized = types === undefined ? null : Array.isArray(types) ? [...types] : [types];
193
+ return (target, propertyKey) => {
194
+ const constructor = target.constructor;
195
+ let list = createContainer.EVENT_HANDLER_METADATA.get(constructor);
196
196
  if (!list) {
197
197
  list = [];
198
198
  createContainer.EVENT_HANDLER_METADATA.set(constructor, list);
@@ -292,9 +292,9 @@ function queryOptional(container, type, data) {
292
292
  * ```
293
293
  */
294
294
  function OnQuery(type) {
295
- return function (target, propertyKey) {
296
- var constructor = target.constructor;
297
- var list = createContainer.QUERY_HANDLER_METADATA.get(constructor);
295
+ return (target, propertyKey) => {
296
+ const constructor = target.constructor;
297
+ let list = createContainer.QUERY_HANDLER_METADATA.get(constructor);
298
298
  if (!list) {
299
299
  list = [];
300
300
  createContainer.QUERY_HANDLER_METADATA.set(constructor, list);
@@ -302,7 +302,7 @@ function OnQuery(type) {
302
302
  // Register handler metadata for prototype-based retrieval.
303
303
  list.push({
304
304
  methodName: propertyKey,
305
- type: type
305
+ type
306
306
  });
307
307
  };
308
308
  }
@@ -348,9 +348,8 @@ function applySharedSeed(container, seed) {
348
348
  * ```
349
349
  */
350
350
  function unapplySeeds(container, seeds) {
351
- var existing = container.get(createContainer.SEEDS_TOKEN);
352
- for (var _i = 0, seeds_1 = seeds; _i < seeds_1.length; _i++) {
353
- var key = seeds_1[_i][0];
351
+ const existing = container.get(createContainer.SEEDS_TOKEN);
352
+ for (const [key] of seeds) {
354
353
  existing.delete(key);
355
354
  }
356
355
  }
@@ -381,9 +380,9 @@ function unapplySeeds(container, seeds) {
381
380
  * ```
382
381
  */
383
382
  function OnActivated() {
384
- return function (target, propertyKey) {
385
- var constructor = target.constructor;
386
- var list = createContainer.ACTIVATED_HANDLER_METADATA.get(constructor);
383
+ return (target, propertyKey) => {
384
+ const constructor = target.constructor;
385
+ let list = createContainer.ACTIVATED_HANDLER_METADATA.get(constructor);
387
386
  if (!list) {
388
387
  list = [];
389
388
  createContainer.ACTIVATED_HANDLER_METADATA.set(constructor, list);
@@ -418,9 +417,9 @@ function OnActivated() {
418
417
  * ```
419
418
  */
420
419
  function OnDeactivation() {
421
- return function (target, propertyKey) {
422
- var constructor = target.constructor;
423
- var list = createContainer.DEACTIVATION_HANDLER_METADATA.get(constructor);
420
+ return (target, propertyKey) => {
421
+ const constructor = target.constructor;
422
+ let list = createContainer.DEACTIVATION_HANDLER_METADATA.get(constructor);
424
423
  if (!list) {
425
424
  list = [];
426
425
  createContainer.DEACTIVATION_HANDLER_METADATA.set(constructor, list);
@@ -510,7 +509,10 @@ exports.EventBus = createContainer.EventBus;
510
509
  exports.QueryBus = createContainer.QueryBus;
511
510
  exports.SEED = createContainer.SEED_TOKEN;
512
511
  exports.SEEDS = createContainer.SEEDS_TOKEN;
513
- exports.WireScope = createContainer.WireScope;
512
+ Object.defineProperty(exports, "WireScope", {
513
+ enumerable: true,
514
+ get: function () { return createContainer.WireScope; }
515
+ });
514
516
  exports.WirestateError = createContainer.WirestateError;
515
517
  exports.applySeeds = createContainer.applySeeds;
516
518
  exports.bindConstant = createContainer.bindConstant;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../../src/wirestate-core/alias.ts","../../../../../../../src/wirestate-core/commands/command.ts","../../../../../../../src/wirestate-core/commands/command-optional.ts","../../../../../../../src/wirestate-core/commands/on-command.ts","../../../../../../../src/wirestate-core/events/emit-event.ts","../../../../../../../src/wirestate-core/events/on-event.ts","../../../../../../../src/wirestate-core/queries/query.ts","../../../../../../../src/wirestate-core/queries/query-optional.ts","../../../../../../../src/wirestate-core/queries/on-query.ts","../../../../../../../src/wirestate-core/seeds/apply-shared-seed.ts","../../../../../../../src/wirestate-core/seeds/unapply-seeds.ts","../../../../../../../src/wirestate-core/service/on-activated.ts","../../../../../../../src/wirestate-core/service/on-deactivation.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["forwardRef","forward","LazyServiceIdentifier","command","container","type","data","get","CommandBus","commandOptional","OnCommand","target","propertyKey","constructor","list","COMMAND_HANDLER_METADATA","set","push","methodName","emitEvent","payload","from","EventBus","emit","OnEvent","types","normalized","undefined","Array","isArray","__spreadArray","EVENT_HANDLER_METADATA","query","QueryBus","queryOptional","OnQuery","QUERY_HANDLER_METADATA","applySharedSeed","seed","rebind","SEED_TOKEN","toConstantValue","unapplySeeds","seeds","existing","SEEDS_TOKEN","_i","seeds_1","key","delete","OnActivated","ACTIVATED_HANDLER_METADATA","OnDeactivation","DEACTIVATION_HANDLER_METADATA"],"mappings":";;;;;;AAgFA;;;;;;;;AAQG;AACG,SAAUA,UAAUA,CACxBC,OAA2C,EAAA;AAE3C,EAAA,OAAO,IAAIC,+BAAqB,CAACD,OAAO,CAAC;AAC3C;;ACpFA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;SACaE,OAAOA,CACrBC,SAAoB,EACpBC,IAAO,EACPC,IAAQ,EAAA;AAIR,EAAA,OAAOF,SAAS,CAACG,GAAG,CAACC,0BAAU,CAAC,CAACL,OAAO,CAAOE,IAAI,EAAEC,IAAI,CAAC;AAC5D;;ACpCA;;;;;;;;;;;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CAAC;AACnD,IAAA;AAEAA,IAAAA,IAAI,CAACG,IAAI,CAACL,WAAW,CAAC;EACxB,CAAC;AACH;;AC7CA;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;SACawC,cAAcA,GAAA;AAC5B,EAAA,OAAO,UAACzC,MAAM,EAAEC,WAAW,EAAA;AAQzB,IAAA,IAAMC,WAAW,GAAIF,MAAiB,CAACE,WAAW;AAElD,IAAA,IAAIC,IAAI,GAAkCuC,6CAA6B,CAAC9C,GAAG,CAACM,WAAW,CAAC;IAExF,IAAI,CAACC,IAAI,EAAE;AACTA,MAAAA,IAAI,GAAG,EAAE;AACTuC,MAAAA,6CAA6B,CAACrC,GAAG,CAACH,WAAW,EAAEC,IAAI,CAAC;AACtD,IAAA;AAEAA,IAAAA,IAAI,CAACG,IAAI,CAACL,WAAW,CAAC;EACxB,CAAC;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../../src/wirestate-core/alias.ts","../../../../../../../src/wirestate-core/commands/command.ts","../../../../../../../src/wirestate-core/commands/command-optional.ts","../../../../../../../src/wirestate-core/commands/on-command.ts","../../../../../../../src/wirestate-core/events/emit-event.ts","../../../../../../../src/wirestate-core/events/on-event.ts","../../../../../../../src/wirestate-core/queries/query.ts","../../../../../../../src/wirestate-core/queries/query-optional.ts","../../../../../../../src/wirestate-core/queries/on-query.ts","../../../../../../../src/wirestate-core/seeds/apply-shared-seed.ts","../../../../../../../src/wirestate-core/seeds/unapply-seeds.ts","../../../../../../../src/wirestate-core/service/on-activated.ts","../../../../../../../src/wirestate-core/service/on-deactivation.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["forwardRef","forward","LazyServiceIdentifier","command","container","type","data","get","CommandBus","commandOptional","OnCommand","target","propertyKey","constructor","list","COMMAND_HANDLER_METADATA","set","push","methodName","emitEvent","payload","from","EventBus","emit","OnEvent","types","normalized","undefined","Array","isArray","EVENT_HANDLER_METADATA","query","QueryBus","queryOptional","OnQuery","QUERY_HANDLER_METADATA","applySharedSeed","seed","rebind","SEED_TOKEN","toConstantValue","unapplySeeds","seeds","existing","SEEDS_TOKEN","key","delete","OnActivated","ACTIVATED_HANDLER_METADATA","OnDeactivation","DEACTIVATION_HANDLER_METADATA"],"mappings":";;;;;;AAgFA;;;;;;;;AAQG;AACG,SAAUA,UAAUA,CACxBC,OAA2C,EAAA;AAE3C,EAAA,OAAO,IAAIC,+BAAqB,CAACD,OAAO,CAAC;AAC3C;;ACpFA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;SACaE,OAAOA,CACrBC,SAAoB,EACpBC,IAAO,EACPC,IAAQ,EAAA;AAIR,EAAA,OAAOF,SAAS,CAACG,GAAG,CAACC,0BAAU,CAAC,CAACL,OAAO,CAAOE,IAAI,EAAEC,IAAI,CAAC;AAC5D;;ACpCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BG;SACaG,eAAeA,CAC7BL,SAAoB,EACpBC,IAAO,EACPC,IAAQ,EAAA;AAIR,EAAA,OAAOF,SAAS,CAACG,GAAG,CAACC,0BAAU,CAAC,CAACC,eAAe,CAAOJ,IAAI,EAAEC,IAAI,CAAC;AACpE;;AC1CA;;;;;;;;;;;;;;;;;;;;;AAqBG;AACG,SAAUI,SAASA,CAACL,IAAiB,EAAA;AACzC,EAAA,OAAO,CAACM,MAAM,EAAEC,WAAW,KAAI;AAS7B,IAAA,MAAMC,WAAW,GAAGF,MAAM,CAACE,WAAW;AAEtC,IAAA,IAAIC,IAAI,GAAyCC,wCAAwB,CAACR,GAAG,CAACM,WAAW,CAAC;IAE1F,IAAI,CAACC,IAAI,EAAE;AACTA,MAAAA,IAAI,GAAG,EAAE;AACTC,MAAAA,wCAAwB,CAACC,GAAG,CAACH,WAAW,EAAEC,IAAI,CAA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