@limrun/api 0.17.4 → 0.18.0-rc.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.
- package/CHANGELOG.md +8 -0
- package/ios-client.d.mts +117 -9
- package/ios-client.d.mts.map +1 -1
- package/ios-client.d.ts +117 -9
- package/ios-client.d.ts.map +1 -1
- package/ios-client.js +160 -192
- package/ios-client.js.map +1 -1
- package/ios-client.mjs +160 -192
- package/ios-client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/ios-instances.d.mts +1 -0
- package/resources/ios-instances.d.mts.map +1 -1
- package/resources/ios-instances.d.ts +1 -0
- package/resources/ios-instances.d.ts.map +1 -1
- package/src/ios-client.ts +364 -285
- package/src/resources/ios-instances.ts +2 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.17.5 (2025-12-18)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.17.4...v0.17.5](https://github.com/limrun-inc/typescript-sdk/compare/v0.17.4...v0.17.5)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** add status.mcpUrl for ios ([d19a102](https://github.com/limrun-inc/typescript-sdk/commit/d19a102ea6ec8c4745352671f41f7bbfbdf449f7))
|
|
10
|
+
|
|
3
11
|
## 0.17.4 (2025-12-15)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v0.17.3...v0.17.4](https://github.com/limrun-inc/typescript-sdk/compare/v0.17.3...v0.17.4)
|
package/ios-client.d.mts
CHANGED
|
@@ -18,15 +18,131 @@ export interface SimctlExecutionEvents {
|
|
|
18
18
|
exit: (code: number) => void;
|
|
19
19
|
error: (error: Error) => void;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Selector criteria for finding accessibility elements.
|
|
23
|
+
* All non-undefined fields must match for an element to be selected.
|
|
24
|
+
*/
|
|
25
|
+
export type AccessibilitySelector = {
|
|
26
|
+
/** Match by AXUniqueId (accessibilityIdentifier) - exact match */
|
|
27
|
+
accessibilityId?: string;
|
|
28
|
+
/** Match by AXLabel - exact match */
|
|
29
|
+
label?: string;
|
|
30
|
+
/** Match by AXLabel - contains (case-insensitive) */
|
|
31
|
+
labelContains?: string;
|
|
32
|
+
/** Match by element type/role (e.g., "Button", "TextField") - case-insensitive */
|
|
33
|
+
elementType?: string;
|
|
34
|
+
/** Match by title - exact match */
|
|
35
|
+
title?: string;
|
|
36
|
+
/** Match by title - contains (case-insensitive) */
|
|
37
|
+
titleContains?: string;
|
|
38
|
+
/** Match by AXValue - exact match */
|
|
39
|
+
value?: string;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* A point on the screen for accessibility queries
|
|
43
|
+
*/
|
|
44
|
+
export type AccessibilityPoint = {
|
|
45
|
+
x: number;
|
|
46
|
+
y: number;
|
|
47
|
+
};
|
|
48
|
+
export type ScreenshotData = {
|
|
49
|
+
/** Base64-encoded JPEG image data */
|
|
50
|
+
base64: string;
|
|
51
|
+
/** Width in points (for tap coordinates) */
|
|
52
|
+
width: number;
|
|
53
|
+
/** Height in points (for tap coordinates) */
|
|
54
|
+
height: number;
|
|
55
|
+
};
|
|
56
|
+
export type TapElementResult = {
|
|
57
|
+
elementLabel?: string;
|
|
58
|
+
elementType?: string;
|
|
59
|
+
};
|
|
60
|
+
export type ElementResult = {
|
|
61
|
+
elementLabel?: string;
|
|
62
|
+
};
|
|
63
|
+
export type InstalledApp = {
|
|
64
|
+
bundleId: string;
|
|
65
|
+
name: string;
|
|
66
|
+
installType: string;
|
|
67
|
+
};
|
|
68
|
+
export type LsofEntry = {
|
|
69
|
+
kind: 'unix';
|
|
70
|
+
path: string;
|
|
71
|
+
};
|
|
21
72
|
/**
|
|
22
73
|
* A client for interacting with a Limrun iOS instance
|
|
23
74
|
*/
|
|
24
75
|
export type InstanceClient = {
|
|
25
76
|
/**
|
|
26
77
|
* Take a screenshot of the current screen
|
|
27
|
-
* @returns A promise that resolves to the screenshot data
|
|
78
|
+
* @returns A promise that resolves to the screenshot data with base64 image and dimensions
|
|
28
79
|
*/
|
|
29
80
|
screenshot: () => Promise<ScreenshotData>;
|
|
81
|
+
/**
|
|
82
|
+
* Get the element tree (accessibility hierarchy) of the current screen
|
|
83
|
+
* @param point Optional point to get the element at that specific location
|
|
84
|
+
* @returns A promise that resolves to the JSON string of the accessibility tree
|
|
85
|
+
*/
|
|
86
|
+
elementTree: (point?: AccessibilityPoint) => Promise<string>;
|
|
87
|
+
/**
|
|
88
|
+
* Tap at the specified coordinates
|
|
89
|
+
* @param x X coordinate in points
|
|
90
|
+
* @param y Y coordinate in points
|
|
91
|
+
*/
|
|
92
|
+
tap: (x: number, y: number) => Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* Tap an accessibility element by selector
|
|
95
|
+
* @param selector The selector criteria to find the element
|
|
96
|
+
* @returns Information about the tapped element
|
|
97
|
+
*/
|
|
98
|
+
tapElement: (selector: AccessibilitySelector) => Promise<TapElementResult>;
|
|
99
|
+
/**
|
|
100
|
+
* Increment an accessibility element (useful for sliders, steppers, etc.)
|
|
101
|
+
* @param selector The selector criteria to find the element
|
|
102
|
+
* @returns Information about the incremented element
|
|
103
|
+
*/
|
|
104
|
+
incrementElement: (selector: AccessibilitySelector) => Promise<ElementResult>;
|
|
105
|
+
/**
|
|
106
|
+
* Decrement an accessibility element (useful for sliders, steppers, etc.)
|
|
107
|
+
* @param selector The selector criteria to find the element
|
|
108
|
+
* @returns Information about the decremented element
|
|
109
|
+
*/
|
|
110
|
+
decrementElement: (selector: AccessibilitySelector) => Promise<ElementResult>;
|
|
111
|
+
/**
|
|
112
|
+
* Set the value of an accessibility element (useful for text fields, etc.)
|
|
113
|
+
* This is much faster than typing character by character.
|
|
114
|
+
* @param text The text value to set
|
|
115
|
+
* @param selector The selector criteria to find the element
|
|
116
|
+
* @returns Information about the modified element
|
|
117
|
+
*/
|
|
118
|
+
setElementValue: (text: string, selector: AccessibilitySelector) => Promise<ElementResult>;
|
|
119
|
+
/**
|
|
120
|
+
* Type text into the currently focused input field
|
|
121
|
+
* @param text The text to type
|
|
122
|
+
* @param pressEnter If true, press Enter after typing
|
|
123
|
+
*/
|
|
124
|
+
typeText: (text: string, pressEnter?: boolean) => Promise<void>;
|
|
125
|
+
/**
|
|
126
|
+
* Press a key on the keyboard, optionally with modifiers
|
|
127
|
+
* @param key The key to press (e.g., 'a', 'enter', 'backspace', 'up', 'f1')
|
|
128
|
+
* @param modifiers Optional modifier keys (e.g., ['shift'], ['command', 'shift'])
|
|
129
|
+
*/
|
|
130
|
+
pressKey: (key: string, modifiers?: string[]) => Promise<void>;
|
|
131
|
+
/**
|
|
132
|
+
* Launch an installed app by bundle identifier
|
|
133
|
+
* @param bundleId Bundle identifier of the app to launch
|
|
134
|
+
*/
|
|
135
|
+
launchApp: (bundleId: string) => Promise<void>;
|
|
136
|
+
/**
|
|
137
|
+
* List installed apps on the simulator
|
|
138
|
+
* @returns Array of installed apps with bundleId, name, and installType
|
|
139
|
+
*/
|
|
140
|
+
listApps: () => Promise<InstalledApp[]>;
|
|
141
|
+
/**
|
|
142
|
+
* Open a URL in the simulator (web URLs open in Safari, deep links open corresponding apps)
|
|
143
|
+
* @param url The URL to open
|
|
144
|
+
*/
|
|
145
|
+
openUrl: (url: string) => Promise<void>;
|
|
30
146
|
/**
|
|
31
147
|
* Disconnect from the Limrun instance
|
|
32
148
|
*/
|
|
@@ -97,10 +213,6 @@ export type InstanceClient = {
|
|
|
97
213
|
*/
|
|
98
214
|
lsof: () => Promise<LsofEntry[]>;
|
|
99
215
|
};
|
|
100
|
-
export type LsofEntry = {
|
|
101
|
-
kind: 'unix';
|
|
102
|
-
path: string;
|
|
103
|
-
};
|
|
104
216
|
/**
|
|
105
217
|
* Controls the verbosity of logging in the client
|
|
106
218
|
*/
|
|
@@ -138,9 +250,6 @@ export type InstanceClientOptions = {
|
|
|
138
250
|
*/
|
|
139
251
|
maxReconnectDelay?: number;
|
|
140
252
|
};
|
|
141
|
-
type ScreenshotData = {
|
|
142
|
-
dataUri: string;
|
|
143
|
-
};
|
|
144
253
|
/**
|
|
145
254
|
* Handle for a running simctl command execution.
|
|
146
255
|
*
|
|
@@ -223,5 +332,4 @@ export declare class SimctlExecution extends EventEmitter {
|
|
|
223
332
|
* @returns An InstanceClient for controlling the instance
|
|
224
333
|
*/
|
|
225
334
|
export declare function createInstanceClient(options: InstanceClientOptions): Promise<InstanceClient>;
|
|
226
|
-
export {};
|
|
227
335
|
//# sourceMappingURL=ios-client.d.mts.map
|
package/ios-client.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ios-client.d.mts","sourceRoot":"","sources":["src/ios-client.ts"],"names":[],"mappings":"OAEO,EAAE,YAAY,EAAE,MAAM,QAAQ;AAGrC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG,WAAW,GAAG,cAAc,GAAG,cAAc,CAAC;AAE3F;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,KAAK,EAAE,CA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,QAAQ,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,IAAI;IAIxG;;;;OAIG;IACM,GAAG,CAAC,CAAC,SAAS,MAAM,qBAAqB,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,IAAI;IAIvG;;;;OAIG;IACH,IAAI,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IA+BjE;;;OAGG;IACH,IAAI,IAAI,IAAI;IAMZ,iDAAiD;IACjD,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAgBjC,iDAAiD;IACjD,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAgBjC,+CAA+C;IAC/C,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAgB/B,0DAA0D;IAC1D,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;CAIjC;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,cAAc,CAAC,CA4elG"}
|
package/ios-client.d.ts
CHANGED
|
@@ -18,15 +18,131 @@ export interface SimctlExecutionEvents {
|
|
|
18
18
|
exit: (code: number) => void;
|
|
19
19
|
error: (error: Error) => void;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Selector criteria for finding accessibility elements.
|
|
23
|
+
* All non-undefined fields must match for an element to be selected.
|
|
24
|
+
*/
|
|
25
|
+
export type AccessibilitySelector = {
|
|
26
|
+
/** Match by AXUniqueId (accessibilityIdentifier) - exact match */
|
|
27
|
+
accessibilityId?: string;
|
|
28
|
+
/** Match by AXLabel - exact match */
|
|
29
|
+
label?: string;
|
|
30
|
+
/** Match by AXLabel - contains (case-insensitive) */
|
|
31
|
+
labelContains?: string;
|
|
32
|
+
/** Match by element type/role (e.g., "Button", "TextField") - case-insensitive */
|
|
33
|
+
elementType?: string;
|
|
34
|
+
/** Match by title - exact match */
|
|
35
|
+
title?: string;
|
|
36
|
+
/** Match by title - contains (case-insensitive) */
|
|
37
|
+
titleContains?: string;
|
|
38
|
+
/** Match by AXValue - exact match */
|
|
39
|
+
value?: string;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* A point on the screen for accessibility queries
|
|
43
|
+
*/
|
|
44
|
+
export type AccessibilityPoint = {
|
|
45
|
+
x: number;
|
|
46
|
+
y: number;
|
|
47
|
+
};
|
|
48
|
+
export type ScreenshotData = {
|
|
49
|
+
/** Base64-encoded JPEG image data */
|
|
50
|
+
base64: string;
|
|
51
|
+
/** Width in points (for tap coordinates) */
|
|
52
|
+
width: number;
|
|
53
|
+
/** Height in points (for tap coordinates) */
|
|
54
|
+
height: number;
|
|
55
|
+
};
|
|
56
|
+
export type TapElementResult = {
|
|
57
|
+
elementLabel?: string;
|
|
58
|
+
elementType?: string;
|
|
59
|
+
};
|
|
60
|
+
export type ElementResult = {
|
|
61
|
+
elementLabel?: string;
|
|
62
|
+
};
|
|
63
|
+
export type InstalledApp = {
|
|
64
|
+
bundleId: string;
|
|
65
|
+
name: string;
|
|
66
|
+
installType: string;
|
|
67
|
+
};
|
|
68
|
+
export type LsofEntry = {
|
|
69
|
+
kind: 'unix';
|
|
70
|
+
path: string;
|
|
71
|
+
};
|
|
21
72
|
/**
|
|
22
73
|
* A client for interacting with a Limrun iOS instance
|
|
23
74
|
*/
|
|
24
75
|
export type InstanceClient = {
|
|
25
76
|
/**
|
|
26
77
|
* Take a screenshot of the current screen
|
|
27
|
-
* @returns A promise that resolves to the screenshot data
|
|
78
|
+
* @returns A promise that resolves to the screenshot data with base64 image and dimensions
|
|
28
79
|
*/
|
|
29
80
|
screenshot: () => Promise<ScreenshotData>;
|
|
81
|
+
/**
|
|
82
|
+
* Get the element tree (accessibility hierarchy) of the current screen
|
|
83
|
+
* @param point Optional point to get the element at that specific location
|
|
84
|
+
* @returns A promise that resolves to the JSON string of the accessibility tree
|
|
85
|
+
*/
|
|
86
|
+
elementTree: (point?: AccessibilityPoint) => Promise<string>;
|
|
87
|
+
/**
|
|
88
|
+
* Tap at the specified coordinates
|
|
89
|
+
* @param x X coordinate in points
|
|
90
|
+
* @param y Y coordinate in points
|
|
91
|
+
*/
|
|
92
|
+
tap: (x: number, y: number) => Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* Tap an accessibility element by selector
|
|
95
|
+
* @param selector The selector criteria to find the element
|
|
96
|
+
* @returns Information about the tapped element
|
|
97
|
+
*/
|
|
98
|
+
tapElement: (selector: AccessibilitySelector) => Promise<TapElementResult>;
|
|
99
|
+
/**
|
|
100
|
+
* Increment an accessibility element (useful for sliders, steppers, etc.)
|
|
101
|
+
* @param selector The selector criteria to find the element
|
|
102
|
+
* @returns Information about the incremented element
|
|
103
|
+
*/
|
|
104
|
+
incrementElement: (selector: AccessibilitySelector) => Promise<ElementResult>;
|
|
105
|
+
/**
|
|
106
|
+
* Decrement an accessibility element (useful for sliders, steppers, etc.)
|
|
107
|
+
* @param selector The selector criteria to find the element
|
|
108
|
+
* @returns Information about the decremented element
|
|
109
|
+
*/
|
|
110
|
+
decrementElement: (selector: AccessibilitySelector) => Promise<ElementResult>;
|
|
111
|
+
/**
|
|
112
|
+
* Set the value of an accessibility element (useful for text fields, etc.)
|
|
113
|
+
* This is much faster than typing character by character.
|
|
114
|
+
* @param text The text value to set
|
|
115
|
+
* @param selector The selector criteria to find the element
|
|
116
|
+
* @returns Information about the modified element
|
|
117
|
+
*/
|
|
118
|
+
setElementValue: (text: string, selector: AccessibilitySelector) => Promise<ElementResult>;
|
|
119
|
+
/**
|
|
120
|
+
* Type text into the currently focused input field
|
|
121
|
+
* @param text The text to type
|
|
122
|
+
* @param pressEnter If true, press Enter after typing
|
|
123
|
+
*/
|
|
124
|
+
typeText: (text: string, pressEnter?: boolean) => Promise<void>;
|
|
125
|
+
/**
|
|
126
|
+
* Press a key on the keyboard, optionally with modifiers
|
|
127
|
+
* @param key The key to press (e.g., 'a', 'enter', 'backspace', 'up', 'f1')
|
|
128
|
+
* @param modifiers Optional modifier keys (e.g., ['shift'], ['command', 'shift'])
|
|
129
|
+
*/
|
|
130
|
+
pressKey: (key: string, modifiers?: string[]) => Promise<void>;
|
|
131
|
+
/**
|
|
132
|
+
* Launch an installed app by bundle identifier
|
|
133
|
+
* @param bundleId Bundle identifier of the app to launch
|
|
134
|
+
*/
|
|
135
|
+
launchApp: (bundleId: string) => Promise<void>;
|
|
136
|
+
/**
|
|
137
|
+
* List installed apps on the simulator
|
|
138
|
+
* @returns Array of installed apps with bundleId, name, and installType
|
|
139
|
+
*/
|
|
140
|
+
listApps: () => Promise<InstalledApp[]>;
|
|
141
|
+
/**
|
|
142
|
+
* Open a URL in the simulator (web URLs open in Safari, deep links open corresponding apps)
|
|
143
|
+
* @param url The URL to open
|
|
144
|
+
*/
|
|
145
|
+
openUrl: (url: string) => Promise<void>;
|
|
30
146
|
/**
|
|
31
147
|
* Disconnect from the Limrun instance
|
|
32
148
|
*/
|
|
@@ -97,10 +213,6 @@ export type InstanceClient = {
|
|
|
97
213
|
*/
|
|
98
214
|
lsof: () => Promise<LsofEntry[]>;
|
|
99
215
|
};
|
|
100
|
-
export type LsofEntry = {
|
|
101
|
-
kind: 'unix';
|
|
102
|
-
path: string;
|
|
103
|
-
};
|
|
104
216
|
/**
|
|
105
217
|
* Controls the verbosity of logging in the client
|
|
106
218
|
*/
|
|
@@ -138,9 +250,6 @@ export type InstanceClientOptions = {
|
|
|
138
250
|
*/
|
|
139
251
|
maxReconnectDelay?: number;
|
|
140
252
|
};
|
|
141
|
-
type ScreenshotData = {
|
|
142
|
-
dataUri: string;
|
|
143
|
-
};
|
|
144
253
|
/**
|
|
145
254
|
* Handle for a running simctl command execution.
|
|
146
255
|
*
|
|
@@ -223,5 +332,4 @@ export declare class SimctlExecution extends EventEmitter {
|
|
|
223
332
|
* @returns An InstanceClient for controlling the instance
|
|
224
333
|
*/
|
|
225
334
|
export declare function createInstanceClient(options: InstanceClientOptions): Promise<InstanceClient>;
|
|
226
|
-
export {};
|
|
227
335
|
//# sourceMappingURL=ios-client.d.ts.map
|
package/ios-client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ios-client.d.ts","sourceRoot":"","sources":["src/ios-client.ts"],"names":[],"mappings":"OAEO,EAAE,YAAY,EAAE,MAAM,QAAQ;AAGrC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG,WAAW,GAAG,cAAc,GAAG,cAAc,CAAC;AAE3F;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,KAAK,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAC/B;
|
|
1
|
+
{"version":3,"file":"ios-client.d.ts","sourceRoot":"","sources":["src/ios-client.ts"],"names":[],"mappings":"OAEO,EAAE,YAAY,EAAE,MAAM,QAAQ;AAGrC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG,WAAW,GAAG,cAAc,GAAG,cAAc,CAAC;AAE3F;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC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