isaacscript-common 30.4.6 → 30.5.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.
@@ -1002,9 +1002,24 @@ export declare type AnyGridEntity = GridEntity | GridEntityDoor | GridEntityPit
1002
1002
  */
1003
1003
  export declare function anyPlayerCloserThan(position: Vector, distance: float): boolean;
1004
1004
 
1005
- export declare function anyPlayerHasCollectible(collectibleType: CollectibleType): boolean;
1005
+ /**
1006
+ * Helper function to check to see if any player has a particular collectible.
1007
+ *
1008
+ * @param collectibleType The collectible type to check for.
1009
+ * @param ignoreModifiers If set to true, only counts collectibles the player actually owns and
1010
+ * ignores effects granted by items like Zodiac, 3 Dollar Bill and Lemegeton.
1011
+ * Default is false.
1012
+ */
1013
+ export declare function anyPlayerHasCollectible(collectibleType: CollectibleType, ignoreModifiers?: boolean): boolean;
1006
1014
 
1007
- export declare function anyPlayerHasTrinket(trinketType: TrinketType): boolean;
1015
+ /**
1016
+ * Helper function to check to see if any player has a particular trinket.
1017
+ *
1018
+ * @param trinketType The trinket type to check for.
1019
+ * @param ignoreModifiers If set to true, only counts trinkets the player actually holds and ignores
1020
+ * effects granted by other items. Default is false.
1021
+ */
1022
+ export declare function anyPlayerHasTrinket(trinketType: TrinketType, ignoreModifiers?: boolean): boolean;
1008
1023
 
1009
1024
  /**
1010
1025
  * Helper function to determine if the given character is present.
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 30.4.6
3
+ isaacscript-common 30.5.0
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -21644,18 +21644,18 @@ function ____exports.addTrinketCostume(self, player, trinketType)
21644
21644
  end
21645
21645
  player:AddCostume(itemConfigTrinket, false)
21646
21646
  end
21647
- function ____exports.anyPlayerHasCollectible(self, collectibleType)
21647
+ function ____exports.anyPlayerHasCollectible(self, collectibleType, ignoreModifiers)
21648
21648
  local players = getAllPlayers(nil)
21649
21649
  return __TS__ArraySome(
21650
21650
  players,
21651
- function(____, player) return player:HasCollectible(collectibleType) end
21651
+ function(____, player) return player:HasCollectible(collectibleType, ignoreModifiers) end
21652
21652
  )
21653
21653
  end
21654
- function ____exports.anyPlayerHasTrinket(self, trinketType)
21654
+ function ____exports.anyPlayerHasTrinket(self, trinketType, ignoreModifiers)
21655
21655
  local players = getAllPlayers(nil)
21656
21656
  return __TS__ArraySome(
21657
21657
  players,
21658
- function(____, player) return player:HasTrinket(trinketType) end
21658
+ function(____, player) return player:HasTrinket(trinketType, ignoreModifiers) end
21659
21659
  )
21660
21660
  end
21661
21661
  function ____exports.anyPlayerIs(self, ...)
@@ -8,8 +8,23 @@ import { ActiveSlot, CollectibleType, ControllerIndex, PlayerForm, PlayerType, T
8
8
  export declare function addCollectible(player: EntityPlayer, ...collectibleTypes: CollectibleType[]): void;
9
9
  export declare function addCollectibleCostume(player: EntityPlayer, collectibleType: CollectibleType): void;
10
10
  export declare function addTrinketCostume(player: EntityPlayer, trinketType: TrinketType): void;
11
- export declare function anyPlayerHasCollectible(collectibleType: CollectibleType): boolean;
12
- export declare function anyPlayerHasTrinket(trinketType: TrinketType): boolean;
11
+ /**
12
+ * Helper function to check to see if any player has a particular collectible.
13
+ *
14
+ * @param collectibleType The collectible type to check for.
15
+ * @param ignoreModifiers If set to true, only counts collectibles the player actually owns and
16
+ * ignores effects granted by items like Zodiac, 3 Dollar Bill and Lemegeton.
17
+ * Default is false.
18
+ */
19
+ export declare function anyPlayerHasCollectible(collectibleType: CollectibleType, ignoreModifiers?: boolean): boolean;
20
+ /**
21
+ * Helper function to check to see if any player has a particular trinket.
22
+ *
23
+ * @param trinketType The trinket type to check for.
24
+ * @param ignoreModifiers If set to true, only counts trinkets the player actually holds and ignores
25
+ * effects granted by other items. Default is false.
26
+ */
27
+ export declare function anyPlayerHasTrinket(trinketType: TrinketType, ignoreModifiers?: boolean): boolean;
13
28
  /**
14
29
  * Helper function to determine if the given character is present.
15
30
  *
@@ -1 +1 @@
1
- {"version":3,"file":"players.d.ts","sourceRoot":"","sources":["../../../src/functions/players.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAEV,eAAe,EACf,eAAe,EAEf,UAAU,EACV,UAAU,EACV,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAkBtC;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,YAAY,EACpB,GAAG,gBAAgB,EAAE,eAAe,EAAE,GACrC,IAAI,CAIN;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAON;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,WAAW,EAAE,WAAW,GACvB,IAAI,CAON;AAED,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,eAAe,GAC/B,OAAO,CAGT;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAGrE;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,kBAAkB,EAAE,UAAU,EAAE,GAAG,OAAO,CAIxE;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CASjE;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAWzD;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,UAAU,EAAE,CAKd;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,kBAAkB,EAAE,YAAY,GAAG,KAAK,GACvC,KAAK,CAMP;AAED,+FAA+F;AAC/F,wBAAgB,aAAa,IAAI,UAAU,EAAE,CAG5C;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,CAiB/D;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC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EAAE,GAAG,EACZ,WAAW,UAAQ,GAClB,IAAI,CA6DN;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,OAAO,EAChB,aAAa,UAAO,GACnB,IAAI,CAsBN;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAEN"}
1
+ {"version":3,"file":"players.d.ts","sourceRoot":"","sources":["../../../src/functions/players.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAEV,eAAe,EACf,eAAe,EAEf,UAAU,EACV,UAAU,EACV,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAkBtC;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,YAAY,EACpB,GAAG,gBAAgB,EAAE,eAAe,EAAE,GACrC,IAAI,CAIN;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAON;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,WAAW,EAAE,WAAW,GACvB,IAAI,CAON;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,eAAe,EAChC,eAAe,CAAC,EAAE,OAAO,GACxB,OAAO,CAKT;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,WAAW,EACxB,eAAe,CAAC,EAAE,OAAO,GACxB,OAAO,CAKT;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,kBAAkB,EAAE,UAAU,EAAE,GAAG,OAAO,CAIxE;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CASjE;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAWzD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C,GAAG,gBAAgB,EAAE,eAAe,EAAE,GACrC,IAAI,CAQN;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAIlE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,YAAY,EACpB,WAAW,EAAE,WAAW,GACvB,IAAI,CAON;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,EAChC,UAAU,aAAqB,EAC/B,MAAM,CAAC,EAAE,GAAG,EACZ,WAAW,UAAQ,GAClB,IAAI,CA6DN;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,OAAO,EAChB,aAAa,UAAO,GACnB,IAAI,CAsBN;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAEN"}
@@ -88,18 +88,29 @@ function ____exports.addTrinketCostume(self, player, trinketType)
88
88
  end
89
89
  player:AddCostume(itemConfigTrinket, false)
90
90
  end
91
- function ____exports.anyPlayerHasCollectible(self, collectibleType)
91
+ --- Helper function to check to see if any player has a particular collectible.
92
+ --
93
+ -- @param collectibleType The collectible type to check for.
94
+ -- @param ignoreModifiers If set to true, only counts collectibles the player actually owns and
95
+ -- ignores effects granted by items like Zodiac, 3 Dollar Bill and Lemegeton.
96
+ -- Default is false.
97
+ function ____exports.anyPlayerHasCollectible(self, collectibleType, ignoreModifiers)
92
98
  local players = getAllPlayers(nil)
93
99
  return __TS__ArraySome(
94
100
  players,
95
- function(____, player) return player:HasCollectible(collectibleType) end
101
+ function(____, player) return player:HasCollectible(collectibleType, ignoreModifiers) end
96
102
  )
97
103
  end
98
- function ____exports.anyPlayerHasTrinket(self, trinketType)
104
+ --- Helper function to check to see if any player has a particular trinket.
105
+ --
106
+ -- @param trinketType The trinket type to check for.
107
+ -- @param ignoreModifiers If set to true, only counts trinkets the player actually holds and ignores
108
+ -- effects granted by other items. Default is false.
109
+ function ____exports.anyPlayerHasTrinket(self, trinketType, ignoreModifiers)
99
110
  local players = getAllPlayers(nil)
100
111
  return __TS__ArraySome(
101
112
  players,
102
- function(____, player) return player:HasTrinket(trinketType) end
113
+ function(____, player) return player:HasTrinket(trinketType, ignoreModifiers) end
103
114
  )
104
115
  end
105
116
  --- Helper function to determine if the given character is present.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "30.4.6",
3
+ "version": "30.5.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -64,16 +64,39 @@ export function addTrinketCostume(
64
64
  player.AddCostume(itemConfigTrinket, false);
65
65
  }
66
66
 
67
+ /**
68
+ * Helper function to check to see if any player has a particular collectible.
69
+ *
70
+ * @param collectibleType The collectible type to check for.
71
+ * @param ignoreModifiers If set to true, only counts collectibles the player actually owns and
72
+ * ignores effects granted by items like Zodiac, 3 Dollar Bill and Lemegeton.
73
+ * Default is false.
74
+ */
67
75
  export function anyPlayerHasCollectible(
68
76
  collectibleType: CollectibleType,
77
+ ignoreModifiers?: boolean,
69
78
  ): boolean {
70
79
  const players = getAllPlayers();
71
- return players.some((player) => player.HasCollectible(collectibleType));
80
+ return players.some((player) =>
81
+ player.HasCollectible(collectibleType, ignoreModifiers),
82
+ );
72
83
  }
73
84
 
74
- export function anyPlayerHasTrinket(trinketType: TrinketType): boolean {
85
+ /**
86
+ * Helper function to check to see if any player has a particular trinket.
87
+ *
88
+ * @param trinketType The trinket type to check for.
89
+ * @param ignoreModifiers If set to true, only counts trinkets the player actually holds and ignores
90
+ * effects granted by other items. Default is false.
91
+ */
92
+ export function anyPlayerHasTrinket(
93
+ trinketType: TrinketType,
94
+ ignoreModifiers?: boolean,
95
+ ): boolean {
75
96
  const players = getAllPlayers();
76
- return players.some((player) => player.HasTrinket(trinketType));
97
+ return players.some((player) =>
98
+ player.HasTrinket(trinketType, ignoreModifiers),
99
+ );
77
100
  }
78
101
 
79
102
  /**
@@ -1,186 +0,0 @@
1
- export * from "./classes/DefaultMap";
2
- export * from "./classes/ModFeature";
3
- export * from "./classes/ModUpgraded";
4
- export * from "./core/cachedClasses";
5
- export * from "./core/constants";
6
- export * from "./core/constantsFirstLast";
7
- export * from "./core/upgradeMod";
8
- export * from "./enums/AmbushType";
9
- export * from "./enums/CornerType";
10
- export * from "./enums/HealthType";
11
- export * from "./enums/ISCFeature";
12
- export * from "./enums/LadderSubTypeCustom";
13
- export * from "./enums/ModCallbackCustom";
14
- export * from "./enums/MysteriousPaperEffect";
15
- export * from "./enums/PocketItemType";
16
- export * from "./enums/RockAltType";
17
- export * from "./enums/SaveDataKey";
18
- export * from "./enums/SerializationType";
19
- export * from "./enums/SlotDestructionType";
20
- export * from "./enums/StatType";
21
- export * from "./functions/ambush";
22
- export * from "./functions/array";
23
- export * from "./functions/arrayLua";
24
- export * from "./functions/benchmark";
25
- export * from "./functions/bitSet128";
26
- export * from "./functions/bitwise";
27
- export * from "./functions/bombs";
28
- export * from "./functions/bosses";
29
- export * from "./functions/cards";
30
- export * from "./functions/challenges";
31
- export * from "./functions/characters";
32
- export * from "./functions/charge";
33
- export * from "./functions/chargeBar";
34
- export * from "./functions/collectibles";
35
- export * from "./functions/collectibleTag";
36
- export * from "./functions/color";
37
- export * from "./functions/console";
38
- export * from "./functions/curses";
39
- export * from "./functions/debugFunctions";
40
- export * from "./functions/decorators";
41
- export * from "./functions/deepCopy";
42
- export * from "./functions/deepCopyTests";
43
- export * from "./functions/dimensions";
44
- export * from "./functions/direction";
45
- export * from "./functions/doors";
46
- export * from "./functions/easing";
47
- export * from "./functions/effects";
48
- export * from "./functions/emptyRoom";
49
- export * from "./functions/entities";
50
- export * from "./functions/entitiesSpecific";
51
- export * from "./functions/entityTypes";
52
- export * from "./functions/enums";
53
- export * from "./functions/familiars";
54
- export * from "./functions/flag";
55
- export * from "./functions/globals";
56
- export * from "./functions/gridEntities";
57
- export * from "./functions/gridEntitiesSpecific";
58
- export * from "./functions/gridIndex";
59
- export * from "./functions/hex";
60
- export * from "./functions/initArray";
61
- export * from "./functions/input";
62
- export * from "./functions/isaacAPIClass";
63
- export * from "./functions/itemPool";
64
- export * from "./functions/jsonHelpers";
65
- export * from "./functions/jsonRoom";
66
- export * from "./functions/kColor";
67
- export * from "./functions/language";
68
- export * from "./functions/level";
69
- export * from "./functions/levelGrid";
70
- export * from "./functions/log";
71
- export * from "./functions/logEntities";
72
- export * from "./functions/logMisc";
73
- export * from "./functions/map";
74
- export * from "./functions/math";
75
- export * from "./functions/merge";
76
- export * from "./functions/mergeTests";
77
- export * from "./functions/minimap";
78
- export * from "./functions/modFeatures";
79
- export * from "./functions/nextStage";
80
- export * from "./functions/npcs";
81
- export * from "./functions/pickups";
82
- export * from "./functions/pickupsSpecific";
83
- export * from "./functions/pickupVariants";
84
- export * from "./functions/pills";
85
- export * from "./functions/playerCenter";
86
- export * from "./functions/playerDataStructures";
87
- export * from "./functions/playerHealth";
88
- export * from "./functions/playerIndex";
89
- export * from "./functions/players";
90
- export * from "./functions/playerStats";
91
- export * from "./functions/pocketItems";
92
- export * from "./functions/positionVelocity";
93
- export * from "./functions/pressurePlate";
94
- export * from "./functions/projectiles";
95
- export * from "./functions/random";
96
- export * from "./functions/readOnly";
97
- export * from "./functions/revive";
98
- export * from "./functions/rng";
99
- export * from "./functions/rockAlt";
100
- export * from "./functions/roomData";
101
- export * from "./functions/roomGrid";
102
- export * from "./functions/rooms";
103
- export * from "./functions/roomShape";
104
- export * from "./functions/roomShapeWalls";
105
- export * from "./functions/roomTransition";
106
- export * from "./functions/run";
107
- export * from "./functions/seeds";
108
- export * from "./functions/serialization";
109
- export * from "./functions/set";
110
- export * from "./functions/slots";
111
- export * from "./functions/sort";
112
- export * from "./functions/sound";
113
- export * from "./functions/spawnCollectible";
114
- export * from "./functions/sprites";
115
- export * from "./functions/stage";
116
- export * from "./functions/stats";
117
- export * from "./functions/string";
118
- export * from "./functions/table";
119
- export * from "./functions/tears";
120
- export * from "./functions/transformations";
121
- export * from "./functions/trinketGive";
122
- export * from "./functions/trinkets";
123
- export * from "./functions/tstlClass";
124
- export * from "./functions/types";
125
- export * from "./functions/ui";
126
- export * from "./functions/utils";
127
- export * from "./functions/vector";
128
- export * from "./functions/weighted";
129
- export * from "./interfaces/ChargeBarSprites";
130
- export * from "./interfaces/Corner";
131
- export * from "./interfaces/CustomStageTSConfig";
132
- export * from "./interfaces/GridEntityCustomData";
133
- export * from "./interfaces/JSONRoomsFile";
134
- export * from "./interfaces/PlayerHealth";
135
- export * from "./interfaces/PocketItemDescription";
136
- export * from "./interfaces/RoomDescription";
137
- export * from "./interfaces/SaveData";
138
- export * from "./interfaces/StageHistoryEntry";
139
- export * from "./interfaces/StatTypeType";
140
- export * from "./interfaces/TrinketSituation";
141
- export * from "./interfaces/TSTLClassMetatable";
142
- export * from "./maps/cardNameToTypeMap";
143
- export * from "./maps/characterNameToTypeMap";
144
- export * from "./maps/pillNameToEffectMap";
145
- export * from "./maps/roomNameToTypeMap";
146
- export * from "./maps/transformationNameToPlayerFormMap";
147
- export * from "./objects/colors";
148
- export * from "./objects/kColors";
149
- export * from "./types/AllButFirst";
150
- export * from "./types/AllButLast";
151
- export * from "./types/AnyClass";
152
- export * from "./types/AnyEntity";
153
- export * from "./types/AnyFunction";
154
- export * from "./types/AnyGridEntity";
155
- export * from "./types/ConversionHeartSubType";
156
- export * from "./types/Decrement";
157
- export * from "./types/EntityID";
158
- export * from "./types/FunctionTuple";
159
- export * from "./types/GridEntityID";
160
- export * from "./types/HasFunction";
161
- export * from "./types/Immutable";
162
- export * from "./types/Increment";
163
- export * from "./types/LowercaseKeys";
164
- export * from "./types/NaturalNumbersLessThan";
165
- export * from "./types/NaturalNumbersLessThanOrEqualTo";
166
- export * from "./types/PickingUpItem";
167
- export * from "./types/PickupIndex";
168
- export * from "./types/PlayerIndex";
169
- export * from "./types/PossibleStatType";
170
- export * from "./types/PublicInterface";
171
- export * from "./types/Range";
172
- export * from "./types/ReadonlyMap";
173
- export * from "./types/ReadonlySet";
174
- export * from "./types/StartsWithLowercase";
175
- export * from "./types/StartsWithUppercase";
176
- export * from "./types/TSTLClass";
177
- export * from "./types/Tuple";
178
- export * from "./types/TupleToIntersection";
179
- export * from "./types/TupleToUnion";
180
- export * from "./types/TupleWithMaxLength";
181
- export * from "./types/UnionToIntersection";
182
- export * from "./types/UppercaseKeys";
183
- export * from "./types/WeightedArray";
184
- export * from "./types/Writable";
185
- export * from "isaac-typescript-definitions";
186
- //# sourceMappingURL=indexLua.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"indexLua.d.ts","sourceRoot":"","sources":["../../../../../packages/isaacscript-common/src/indexLua.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC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