@casual-simulation/aux-common 2.0.27 → 2.0.31
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.
- package/bots/Bot.d.ts +12 -0
- package/bots/Bot.js +15 -0
- package/bots/Bot.js.map +1 -1
- package/bots/BotEvents.d.ts +95 -6
- package/bots/BotEvents.js +47 -7
- package/bots/BotEvents.js.map +1 -1
- package/package.json +4 -4
- package/partitions/AuxPartitionConfig.d.ts +8 -8
- package/runtime/AuxLibrary.d.ts +13 -36
- package/runtime/AuxLibrary.js +121 -6
- package/runtime/AuxLibrary.js.map +1 -1
- package/runtime/AuxLibraryDefinitions.def +160 -58
- package/runtime/Utils.d.ts +1 -0
- package/runtime/Utils.js +13 -0
- package/runtime/Utils.js.map +1 -1
- package/state-machine/StateMachine.js.map +1 -1
|
@@ -2760,45 +2760,6 @@ declare interface PerformanceStats {
|
|
|
2760
2760
|
numberOfActiveTimers: number;
|
|
2761
2761
|
}
|
|
2762
2762
|
|
|
2763
|
-
/**
|
|
2764
|
-
* Defines an interface that represents the list of bots and tags that are included in a bundle.
|
|
2765
|
-
*/
|
|
2766
|
-
export interface BundleModules {
|
|
2767
|
-
[id: string]: Set<string>;
|
|
2768
|
-
}
|
|
2769
|
-
|
|
2770
|
-
/**
|
|
2771
|
-
* Defines an interface that represents a bundle of code.
|
|
2772
|
-
*/
|
|
2773
|
-
export interface CodeBundle {
|
|
2774
|
-
/**
|
|
2775
|
-
* The tag the bundle was built from.
|
|
2776
|
-
*/
|
|
2777
|
-
tag: string;
|
|
2778
|
-
|
|
2779
|
-
/**
|
|
2780
|
-
* The source code that the bundle contains.
|
|
2781
|
-
* If an error occurred, then this will be null/undefined.
|
|
2782
|
-
*/
|
|
2783
|
-
source?: string;
|
|
2784
|
-
|
|
2785
|
-
/**
|
|
2786
|
-
* The error that occurred while building the bundle.
|
|
2787
|
-
* Null/Undefined if an error did not happen.
|
|
2788
|
-
*/
|
|
2789
|
-
error?: string;
|
|
2790
|
-
|
|
2791
|
-
/**
|
|
2792
|
-
* The list of warnings that occurred while building the bundle.
|
|
2793
|
-
*/
|
|
2794
|
-
warnings: string[];
|
|
2795
|
-
|
|
2796
|
-
/**
|
|
2797
|
-
* The list of modules that the bundle contains.
|
|
2798
|
-
*/
|
|
2799
|
-
modules: BundleModules;
|
|
2800
|
-
}
|
|
2801
|
-
|
|
2802
2763
|
/**
|
|
2803
2764
|
* Defines an interface for a function that provides HTML VDOM capabilities to bots.
|
|
2804
2765
|
*/
|
|
@@ -2871,7 +2832,7 @@ export interface CreatePublicRecordKeyFailure {
|
|
|
2871
2832
|
/**
|
|
2872
2833
|
* The type of error that occurred.
|
|
2873
2834
|
*/
|
|
2874
|
-
errorCode: UnauthorizedToCreateRecordKeyError | GeneralRecordError;
|
|
2835
|
+
errorCode: UnauthorizedToCreateRecordKeyError | GeneralRecordError | NotSupportedError;
|
|
2875
2836
|
|
|
2876
2837
|
/**
|
|
2877
2838
|
* The error message.
|
|
@@ -2899,7 +2860,12 @@ export type InvalidRecordKey = 'invalid_record_key';
|
|
|
2899
2860
|
/**
|
|
2900
2861
|
* Defines an error that occurs when an unspecified error occurs while creating a public record key.
|
|
2901
2862
|
*/
|
|
2902
|
-
|
|
2863
|
+
export type ServerError = 'server_error';
|
|
2864
|
+
|
|
2865
|
+
/**
|
|
2866
|
+
* Defines an error that occurs when a feature is not supported.
|
|
2867
|
+
*/
|
|
2868
|
+
export type NotSupportedError = 'not_supported';
|
|
2903
2869
|
|
|
2904
2870
|
/**
|
|
2905
2871
|
* Defines an error that occurs when the user is not logged in but they are required to be in order to perform an action.
|
|
@@ -2925,6 +2891,8 @@ export interface RecordDataFailure {
|
|
|
2925
2891
|
| NotLoggedInError
|
|
2926
2892
|
| InvalidRecordKey
|
|
2927
2893
|
| RecordNotFoundError
|
|
2894
|
+
| NotSupportedError
|
|
2895
|
+
| 'not_authorized'
|
|
2928
2896
|
| 'data_too_large';
|
|
2929
2897
|
errorMessage: string;
|
|
2930
2898
|
}
|
|
@@ -2960,7 +2928,27 @@ export interface GetDataSuccess {
|
|
|
2960
2928
|
|
|
2961
2929
|
export interface GetDataFailure {
|
|
2962
2930
|
success: false;
|
|
2963
|
-
errorCode: ServerError | 'data_not_found';
|
|
2931
|
+
errorCode: ServerError | 'data_not_found' | 'not_authorized' | NotSupportedError;
|
|
2932
|
+
errorMessage: string;
|
|
2933
|
+
}
|
|
2934
|
+
|
|
2935
|
+
export type EraseDataResult = EraseDataSuccess | EraseDataFailure;
|
|
2936
|
+
|
|
2937
|
+
export interface EraseDataSuccess {
|
|
2938
|
+
success: true;
|
|
2939
|
+
recordName: string;
|
|
2940
|
+
address: string;
|
|
2941
|
+
}
|
|
2942
|
+
|
|
2943
|
+
export interface EraseDataFailure {
|
|
2944
|
+
success: false;
|
|
2945
|
+
errorCode: ServerError
|
|
2946
|
+
| NotLoggedInError
|
|
2947
|
+
| InvalidRecordKey
|
|
2948
|
+
| RecordNotFoundError
|
|
2949
|
+
| NotSupportedError
|
|
2950
|
+
| 'not_authorized'
|
|
2951
|
+
| 'data_not_found';
|
|
2964
2952
|
errorMessage: string;
|
|
2965
2953
|
}
|
|
2966
2954
|
|
|
@@ -2990,11 +2978,52 @@ export interface RecordFileFailure {
|
|
|
2990
2978
|
| InvalidRecordKey
|
|
2991
2979
|
| RecordNotFoundError
|
|
2992
2980
|
| 'file_already_exists'
|
|
2981
|
+
| NotSupportedError
|
|
2993
2982
|
| 'invalid_file_data';
|
|
2994
2983
|
errorMessage: string;
|
|
2995
2984
|
}
|
|
2996
2985
|
|
|
2997
2986
|
|
|
2987
|
+
export type EraseFileResult = EraseFileSuccess | EraseFileFailure;
|
|
2988
|
+
export interface EraseFileSuccess {
|
|
2989
|
+
success: true;
|
|
2990
|
+
recordName: string;
|
|
2991
|
+
fileName: string;
|
|
2992
|
+
}
|
|
2993
|
+
|
|
2994
|
+
export interface EraseFileFailure {
|
|
2995
|
+
success: false;
|
|
2996
|
+
errorCode: ServerError
|
|
2997
|
+
| InvalidRecordKey
|
|
2998
|
+
| RecordNotFoundError
|
|
2999
|
+
| NotLoggedInError
|
|
3000
|
+
| NotSupportedError
|
|
3001
|
+
| 'file_not_found';
|
|
3002
|
+
errorMessage: string;
|
|
3003
|
+
}
|
|
3004
|
+
|
|
3005
|
+
export interface AudioRecordingOptions {
|
|
3006
|
+
/**
|
|
3007
|
+
* Whether to stream the audio recording.
|
|
3008
|
+
* If streaming is enabled, then @onAudioChunk will be triggered whenever a new
|
|
3009
|
+
* piece of audio is available.
|
|
3010
|
+
*/
|
|
3011
|
+
stream?: boolean;
|
|
3012
|
+
|
|
3013
|
+
/**
|
|
3014
|
+
* The MIME type that should be produced.
|
|
3015
|
+
* Defaults to a containerized format (audio/mp3, audio/webm, etc.) if not specified.
|
|
3016
|
+
*/
|
|
3017
|
+
mimeType?: string;
|
|
3018
|
+
|
|
3019
|
+
/**
|
|
3020
|
+
* The number of samples per second (Hz) that audio/x-raw recordings should use.
|
|
3021
|
+
* Defaults to 44100 if not specified.
|
|
3022
|
+
*/
|
|
3023
|
+
sampleRate?: number;
|
|
3024
|
+
}
|
|
3025
|
+
|
|
3026
|
+
|
|
2998
3027
|
declare global {
|
|
2999
3028
|
|
|
3000
3029
|
/**
|
|
@@ -3032,6 +3061,16 @@ declare global {
|
|
|
3032
3061
|
*/
|
|
3033
3062
|
const tagName: string;
|
|
3034
3063
|
|
|
3064
|
+
/**
|
|
3065
|
+
* The tag masks that this bot has.
|
|
3066
|
+
*/
|
|
3067
|
+
const masks: BotTags;
|
|
3068
|
+
|
|
3069
|
+
/**
|
|
3070
|
+
* The links that this bot has to other bots.
|
|
3071
|
+
*/
|
|
3072
|
+
const links: BotLinks;
|
|
3073
|
+
|
|
3035
3074
|
/**
|
|
3036
3075
|
* Creates a new bot and returns it.
|
|
3037
3076
|
* @param parent The bot that should be the parent of the new bot.
|
|
@@ -4773,6 +4812,19 @@ interface Os {
|
|
|
4773
4812
|
*/
|
|
4774
4813
|
cancelSound(soundID: number): Promise<void>;
|
|
4775
4814
|
|
|
4815
|
+
/**
|
|
4816
|
+
* Starts a new audio recording.
|
|
4817
|
+
* @param options The options that should be used to record the audio.
|
|
4818
|
+
*/
|
|
4819
|
+
beginAudioRecording(options?: AudioRecordingOptions): Promise<void>;
|
|
4820
|
+
|
|
4821
|
+
/**
|
|
4822
|
+
* Finishes an audio recording.
|
|
4823
|
+
* Returns a promise that resolves with the recorded blob.
|
|
4824
|
+
* If the recording was streamed, then the resolved blob will be null.
|
|
4825
|
+
*/
|
|
4826
|
+
endAudioRecording(): Promise<Blob>;
|
|
4827
|
+
|
|
4776
4828
|
/**
|
|
4777
4829
|
* Shows a QR Code that contains a link to a inst and dimension.
|
|
4778
4830
|
* @param inst The inst that should be joined. Defaults to the current inst.
|
|
@@ -5173,7 +5225,7 @@ interface Os {
|
|
|
5173
5225
|
|
|
5174
5226
|
/**
|
|
5175
5227
|
* Requests that the current session be authorized and for a global bot to be created
|
|
5176
|
-
* to contain information about the authorized user.
|
|
5228
|
+
* to contain information about the authorized user. Resovles with a null bot if unable to login.
|
|
5177
5229
|
*/
|
|
5178
5230
|
requestAuthBot(): Promise<Bot>;
|
|
5179
5231
|
|
|
@@ -5195,7 +5247,7 @@ interface Os {
|
|
|
5195
5247
|
* @param address The address that the data should be stored at inside the record.
|
|
5196
5248
|
* @param data The data that should be stored.
|
|
5197
5249
|
*/
|
|
5198
|
-
|
|
5250
|
+
recordData(
|
|
5199
5251
|
recordKey: string,
|
|
5200
5252
|
address: string,
|
|
5201
5253
|
data: any
|
|
@@ -5211,6 +5263,48 @@ interface Os {
|
|
|
5211
5263
|
address: string
|
|
5212
5264
|
): Promise<GetDataResult>;
|
|
5213
5265
|
|
|
5266
|
+
/**
|
|
5267
|
+
* Erases the data stored in the given record at the given address.
|
|
5268
|
+
* @param recordKey The key that should be used to access the record.
|
|
5269
|
+
* @param address The address that the data should be erased from.
|
|
5270
|
+
*/
|
|
5271
|
+
eraseData(recordKey: string, address: string): Promise<EraseDataResult>;
|
|
5272
|
+
|
|
5273
|
+
/**
|
|
5274
|
+
* Records the given data to the given address inside the record for the given record key.
|
|
5275
|
+
* This data needs to be manually approved when reading, writing, or erasing it.
|
|
5276
|
+
*
|
|
5277
|
+
* @param recordKey The key that should be used to access the record.
|
|
5278
|
+
* @param address The address that the data should be stored at inside the record.
|
|
5279
|
+
* @param data The data that should be stored.
|
|
5280
|
+
*/
|
|
5281
|
+
recordManualApprovalData(
|
|
5282
|
+
recordKey: string,
|
|
5283
|
+
address: string,
|
|
5284
|
+
data: any
|
|
5285
|
+
): Promise<RecordDataResult>;
|
|
5286
|
+
|
|
5287
|
+
/**
|
|
5288
|
+
* Gets the data stored in the given record at the given address.
|
|
5289
|
+
* This data needs to be manually approved when reading, writing, or erasing it.
|
|
5290
|
+
*
|
|
5291
|
+
* @param recordKeyOrName The record that the data should be retrieved from.
|
|
5292
|
+
* @param address The address that the data is stored at.
|
|
5293
|
+
*/
|
|
5294
|
+
getManualApprovalData(
|
|
5295
|
+
recordKeyOrName: string,
|
|
5296
|
+
address: string
|
|
5297
|
+
): Promise<GetDataResult>;
|
|
5298
|
+
|
|
5299
|
+
/**
|
|
5300
|
+
* Erases the data stored in the given record at the given address.
|
|
5301
|
+
* This data needs to be manually approved when reading, writing, or erasing it.
|
|
5302
|
+
*
|
|
5303
|
+
* @param recordKey The key that should be used to access the record.
|
|
5304
|
+
* @param address The address that the data should be erased from.
|
|
5305
|
+
*/
|
|
5306
|
+
eraseManualApprovalData(recordKey: string, address: string): Promise<EraseDataResult>;
|
|
5307
|
+
|
|
5214
5308
|
/**
|
|
5215
5309
|
* Records the given data as a file.
|
|
5216
5310
|
* @param recordKey The record that the file should be recorded in.
|
|
@@ -5227,17 +5321,36 @@ interface Os {
|
|
|
5227
5321
|
* Gets the data stored in the given file.
|
|
5228
5322
|
* @param result The successful result of a os.recordFile() call.
|
|
5229
5323
|
*/
|
|
5230
|
-
|
|
5324
|
+
getFile(result: RecordFileSuccess): Promise<any>;
|
|
5231
5325
|
/**
|
|
5232
5326
|
* Gets the data stored in the given file.
|
|
5233
5327
|
* @param url The URL that the file is stored at.
|
|
5234
5328
|
*/
|
|
5235
|
-
|
|
5329
|
+
getFile(url: string): Promise<any>;
|
|
5236
5330
|
/**
|
|
5237
5331
|
* Gets the data stored in the given file.
|
|
5238
5332
|
* @param urlOrRecordFileResult The URL or the successful result of the record file operation.
|
|
5239
5333
|
*/
|
|
5240
|
-
|
|
5334
|
+
getFile(urlOrRecordFileResult: string | RecordFileSuccess): Promise<any>;
|
|
5335
|
+
|
|
5336
|
+
/**
|
|
5337
|
+
* Deletes the specified file using the given record key.
|
|
5338
|
+
* @param recordKey The key that should be used to delete the file.
|
|
5339
|
+
* @param result The successful result of a os.recordFile() call.
|
|
5340
|
+
*/
|
|
5341
|
+
eraseFile(recordKey: string, result: RecordFileSuccess): Promise<EraseFileResult>;
|
|
5342
|
+
/**
|
|
5343
|
+
* Deletes the specified file using the given record key.
|
|
5344
|
+
* @param recordKey The key that should be used to delete the file.
|
|
5345
|
+
* @param url The URL that the file is stored at.
|
|
5346
|
+
*/
|
|
5347
|
+
eraseFile(recordKey: string, url: string): Promise<EraseFileResult>;
|
|
5348
|
+
/**
|
|
5349
|
+
* Deletes the specified file using the given record key.
|
|
5350
|
+
* @param recordKey The key that should be used to delete the file.
|
|
5351
|
+
* @param urlOrRecordFileResult The URL or the successful result of the record file operation.
|
|
5352
|
+
*/
|
|
5353
|
+
eraseFile(recordKey: string, fileUrlOrRecordFileResult: string | RecordFileSuccess): Promise<EraseFileResult>;
|
|
5241
5354
|
|
|
5242
5355
|
/**
|
|
5243
5356
|
* Converts the given geolocation to a what3words (https://what3words.com/) address.
|
|
@@ -6297,17 +6410,6 @@ interface Experiment {
|
|
|
6297
6410
|
anchorPoint: BotAnchorPoint
|
|
6298
6411
|
): {x: number, y: number, z: number};
|
|
6299
6412
|
|
|
6300
|
-
/**
|
|
6301
|
-
* Starts a new audio recording.
|
|
6302
|
-
*/
|
|
6303
|
-
beginAudioRecording(): Promise<void>;
|
|
6304
|
-
|
|
6305
|
-
/**
|
|
6306
|
-
* Finishes an audio recording.
|
|
6307
|
-
* Returns a promise that resolves with the recorded blob.
|
|
6308
|
-
*/
|
|
6309
|
-
endAudioRecording(): Promise<Blob>;
|
|
6310
|
-
|
|
6311
6413
|
/**
|
|
6312
6414
|
* Starts a new recording.
|
|
6313
6415
|
* @param options The options for the recording.
|
package/runtime/Utils.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { RealtimeEditMode } from './RuntimeBot';
|
|
2
2
|
import { AuxPartitionRealtimeStrategy } from '../partitions/AuxPartition';
|
|
3
3
|
import { Easing, EaseType } from '../bots';
|
|
4
|
+
import './BlobPolyfill';
|
|
4
5
|
/**
|
|
5
6
|
* Converts the given error to a copiable value.
|
|
6
7
|
* Returns a new value that can be sent over to web workers.
|
package/runtime/Utils.js
CHANGED
|
@@ -2,6 +2,7 @@ import { RealtimeEditMode } from './RuntimeBot';
|
|
|
2
2
|
import { hasValue, isBot, isRuntimeBot } from '../bots/BotCalculations';
|
|
3
3
|
import { forOwn } from 'lodash';
|
|
4
4
|
import TWEEN from '@tweenjs/tween.js';
|
|
5
|
+
import './BlobPolyfill';
|
|
5
6
|
/**
|
|
6
7
|
* Converts the given error to a copiable value.
|
|
7
8
|
* Returns a new value that can be sent over to web workers.
|
|
@@ -65,6 +66,9 @@ function _convertToCopiableValue(value, depth, map) {
|
|
|
65
66
|
id: value.id,
|
|
66
67
|
tags: value.tags.toJSON(),
|
|
67
68
|
};
|
|
69
|
+
if (hasValue(value.space)) {
|
|
70
|
+
result.space = value.space;
|
|
71
|
+
}
|
|
68
72
|
map.set(value, result);
|
|
69
73
|
return result;
|
|
70
74
|
}
|
|
@@ -88,6 +92,15 @@ function _convertToCopiableValue(value, depth, map) {
|
|
|
88
92
|
else if (value instanceof Date) {
|
|
89
93
|
return value;
|
|
90
94
|
}
|
|
95
|
+
else if (value instanceof Blob) {
|
|
96
|
+
return value;
|
|
97
|
+
}
|
|
98
|
+
else if (value instanceof ArrayBuffer) {
|
|
99
|
+
return value;
|
|
100
|
+
}
|
|
101
|
+
else if (ArrayBuffer.isView(value)) {
|
|
102
|
+
return value;
|
|
103
|
+
}
|
|
91
104
|
else {
|
|
92
105
|
let result = {};
|
|
93
106
|
map.set(value, result);
|
package/runtime/Utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Utils.js","sourceRoot":"","sources":["Utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAExE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,KAAgC,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"Utils.js","sourceRoot":"","sources":["Utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAExE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,KAAgC,MAAM,mBAAmB,CAAC;AACjE,OAAO,gBAAgB,CAAC;AAExB;;;;GAIG;AACH,MAAM,UAAU,2BAA2B,CAAC,GAAY;IACpD,IAAI,GAAG,YAAY,KAAK,EAAE;QACtB,IAAI,GAAG,GAAQ;YACX,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,KAAK,EAAE,GAAG,CAAC,KAAK;SACnB,CAAC;QAEF,IAAU,GAAI,CAAC,QAAQ,EAAE;YACrB,IAAI,QAAQ,GAAS,GAAI,CAAC,QAAQ,CAAC;YACnC,GAAG,CAAC,QAAQ,GAAG;gBACX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,IAAI,QAAQ,GAAG,CAAC,EAAE;QACd,OAAO,IAAI,CAAC;KACf;IACD,MAAM,mBAAmB,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;IACrD,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;IAC1C,OAAO,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;AAC1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StateMachine.js","sourceRoot":"","sources":["StateMachine.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StateMachine.js","sourceRoot":"","sources":["StateMachine.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,YAAY;IAyCrB;;;OAGG;IACH,YAAY,IAAY;QA1CxB;;;WAGG;QACI,eAAU,GAAW,CAAC,CAAC;QAE9B;;WAEG;QACK,YAAO,GAEX,EAAE,CAAC;QAEP;;WAEG;QACK,iBAAY,GAEhB,EAAE,CAAC;QAyBH,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;IAVD,IAAI,YAAY;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC1C,CAAC;IAUM,KAAK,CAAC,eAAuB,EAAE,QAAgB;QAClD,IAAI,IAAI,CAAC,OAAO;YAAE,OAAO;QACzB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAEpB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;QACnC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC1B,CAAC;IAEM,KAAK;QACR,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,OAAO;QAC1B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAEM,MAAM,CAAC,QAAgB;QAC1B,IA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