@mlightcad/cad-simple-viewer 1.3.1 → 1.3.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.
- package/dist/index.js +3034 -3014
- package/dist/index.umd.cjs +19 -19
- package/dist/libredwg-parser-worker.js +13 -5
- package/lib/app/AcApDocManager.d.ts.map +1 -1
- package/lib/app/AcApDocManager.js +3 -2
- package/lib/app/AcApDocManager.js.map +1 -1
- package/lib/command/AcApCircleCmd.d.ts +3 -3
- package/lib/command/AcApCircleCmd.js +3 -3
- package/lib/command/AcApDimLinearCmd.d.ts +26 -0
- package/lib/command/AcApDimLinearCmd.d.ts.map +1 -0
- package/lib/command/AcApDimLinearCmd.js +182 -0
- package/lib/command/AcApDimLinearCmd.js.map +1 -0
- package/lib/command/AcApLineCmd.d.ts +21 -0
- package/lib/command/AcApLineCmd.d.ts.map +1 -0
- package/lib/command/AcApLineCmd.js +118 -0
- package/lib/command/AcApLineCmd.js.map +1 -0
- package/lib/command/AcApSvgConvertor.js +1 -1
- package/lib/command/AcApSvgConvertor.js.map +1 -1
- package/lib/command/index.d.ts +2 -1
- package/lib/command/index.d.ts.map +1 -1
- package/lib/command/index.js +2 -1
- package/lib/command/index.js.map +1 -1
- package/lib/editor/input/marker/AcEdMarker.d.ts +1 -1
- package/lib/editor/input/marker/AcEdMarker.d.ts.map +1 -1
- package/lib/editor/input/marker/AcEdOSnapMarkerManager.d.ts +1 -1
- package/lib/editor/input/marker/AcEdOSnapMarkerManager.d.ts.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.js +2 -2
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.js.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptDistanceOptions.d.ts.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptDistanceOptions.js +3 -3
- package/lib/editor/input/prompt/AcEdPromptDistanceOptions.js.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInput.d.ts +65 -6
- package/lib/editor/input/ui/AcEdFloatingInput.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInput.js +131 -9
- package/lib/editor/input/ui/AcEdFloatingInput.js.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputTypes.d.ts +16 -2
- package/lib/editor/input/ui/AcEdFloatingInputTypes.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdInputManager.d.ts +0 -43
- package/lib/editor/input/ui/AcEdInputManager.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdInputManager.js +43 -137
- package/lib/editor/input/ui/AcEdInputManager.js.map +1 -1
- package/lib/editor/input/ui/AcEdRubberBand.d.ts +3 -3
- package/lib/editor/input/ui/AcEdRubberBand.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdRubberBand.js.map +1 -1
- package/lib/i18n/en/command.d.ts +2 -0
- package/lib/i18n/en/command.d.ts.map +1 -1
- package/lib/i18n/en/command.js +2 -0
- package/lib/i18n/en/command.js.map +1 -1
- package/lib/i18n/en/jig.d.ts +9 -0
- package/lib/i18n/en/jig.d.ts.map +1 -1
- package/lib/i18n/en/jig.js +10 -1
- package/lib/i18n/en/jig.js.map +1 -1
- package/lib/i18n/zh/command.d.ts +2 -0
- package/lib/i18n/zh/command.d.ts.map +1 -1
- package/lib/i18n/zh/command.js +2 -0
- package/lib/i18n/zh/command.js.map +1 -1
- package/lib/i18n/zh/jig.d.ts +9 -0
- package/lib/i18n/zh/jig.d.ts.map +1 -1
- package/lib/i18n/zh/jig.js +10 -1
- package/lib/i18n/zh/jig.js.map +1 -1
- package/lib/view/AcTrView2d.d.ts.map +1 -1
- package/lib/view/AcTrView2d.js +2 -13
- package/lib/view/AcTrView2d.js.map +1 -1
- package/package.json +5 -5
- package/lib/command/AcApDimCmd.d.ts +0 -57
- package/lib/command/AcApDimCmd.d.ts.map +0 -1
- package/lib/command/AcApDimCmd.js +0 -228
- package/lib/command/AcApDimCmd.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcEdPromptAngleOptions.d.ts","sourceRoot":"","sources":["../../../../src/editor/input/prompt/AcEdPromptAngleOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAEvD;;;;;GAKG;AACH,qBAAa,sBAAuB,SAAQ,iBAAiB,CAAC,MAAM,CAAC;IACnE,OAAO,CAAC,UAAU,CAAC,CAAa;IAChC,OAAO,CAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"AcEdPromptAngleOptions.d.ts","sourceRoot":"","sources":["../../../../src/editor/input/prompt/AcEdPromptAngleOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAEvD;;;;;GAKG;AACH,qBAAa,sBAAuB,SAAQ,iBAAiB,CAAC,MAAM,CAAC;IACnE,OAAO,CAAC,UAAU,CAAC,CAAa;IAChC,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,cAAc,CAAgB;IACtC,OAAO,CAAC,aAAa,CAAiB;IACtC,OAAO,CAAC,aAAa,CAAY;IACjC,OAAO,CAAC,gBAAgB,CAAiB;IACzC,OAAO,CAAC,UAAU,CAAgB;IAClC,OAAO,CAAC,cAAc,CAAiB;IAEvC;;;OAGG;gBACS,OAAO,EAAE,MAAM;IAI3B;;;OAGG;IACH,IAAI,SAAS,IAAI,WAAW,GAAG,SAAS,CAEvC;IACD,IAAI,SAAS,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,EAU3C;IAED;;;;OAIG;IACH,IAAI,YAAY,IAAI,OAAO,CAE1B;IACD,IAAI,YAAY,CAAC,IAAI,EAAE,OAAO,EAI7B;IAED;;;OAGG;IACH,IAAI,aAAa,IAAI,OAAO,CAE3B;IACD,IAAI,aAAa,CAAC,IAAI,EAAE,OAAO,EAI9B;IAED;;;OAGG;IACH,IAAI,YAAY,IAAI,OAAO,CAE1B;IACD,IAAI,YAAY,CAAC,IAAI,EAAE,OAAO,EAI7B;IAED;;;;OAIG;IACH,IAAI,YAAY,IAAI,MAAM,CAEzB;IACD,IAAI,YAAY,CAAC,GAAG,EAAE,MAAM,EAI3B;IAED;;;OAGG;IACH,IAAI,eAAe,IAAI,OAAO,CAE7B;IACD,IAAI,eAAe,CAAC,IAAI,EAAE,OAAO,EAIhC;IAED;;;OAGG;IACH,IAAI,SAAS,IAAI,OAAO,CAEvB;IACD,IAAI,SAAS,CAAC,IAAI,EAAE,OAAO,EAI1B;IAED;;;;OAIG;IACH,IAAI,aAAa,IAAI,OAAO,CAE3B;IACD,IAAI,aAAa,CAAC,IAAI,EAAE,OAAO,EAI9B;CACF"}
|
|
@@ -29,8 +29,8 @@ var AcEdPromptAngleOptions = /** @class */ (function (_super) {
|
|
|
29
29
|
*/
|
|
30
30
|
function AcEdPromptAngleOptions(message) {
|
|
31
31
|
var _this = _super.call(this, message) || this;
|
|
32
|
-
_this._useBasePoint =
|
|
33
|
-
_this._useDashedLine =
|
|
32
|
+
_this._useBasePoint = true;
|
|
33
|
+
_this._useDashedLine = true;
|
|
34
34
|
_this._useAngleBase = false;
|
|
35
35
|
_this._defaultValue = 0;
|
|
36
36
|
_this._useDefaultValue = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcEdPromptAngleOptions.js","sourceRoot":"","sources":["../../../../src/editor/input/prompt/AcEdPromptAngleOptions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAEvD;;;;;GAKG;AACH;IAA4C,0CAAyB;IAUnE;;;OAGG;IACH,gCAAY,OAAe;QACzB,YAA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AAG,IAAI,CAAA;YACxB,CAAC;QACH,CAAC;;;OALA;IAYD,sBAAI,iDAAa;QALjB;;;;WAIG;aACH;YACE,OAAO,IAAI,CAAC,cAAc,CAAA;QAC5B,CAAC;aACD,UAAkB,IAAa;YAC7B,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;gBACrB,IAAI,CAAC,cAAc,GAAG,IAAI,CAAA;YAC5B,CAAC;QACH,CAAC;;;OALA;IAMH,6BAAC;AAAD,CAAC,AAlID,CAA4C,iBAAiB,GAkI5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcEdPromptDistanceOptions.d.ts","sourceRoot":"","sources":["../../../../src/editor/input/prompt/AcEdPromptDistanceOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEnD,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAA;AAEzE;;;;;GAKG;AACH,qBAAa,yBAA0B,SAAQ,0BAA0B;IACvE,OAAO,CAAC,UAAU,CAAC,CAAa;IAChC,OAAO,CAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"AcEdPromptDistanceOptions.d.ts","sourceRoot":"","sources":["../../../../src/editor/input/prompt/AcEdPromptDistanceOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEnD,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAA;AAEzE;;;;;GAKG;AACH,qBAAa,yBAA0B,SAAQ,0BAA0B;IACvE,OAAO,CAAC,UAAU,CAAC,CAAa;IAChC,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,cAAc,CAAgB;IACtC,OAAO,CAAC,OAAO,CAAgB;IAE/B;;;OAGG;gBACS,OAAO,EAAE,MAAM;IAK3B;;;OAGG;IACH,IAAI,SAAS,IAAI,WAAW,GAAG,SAAS,CAEvC;IACD,IAAI,SAAS,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,EAU3C;IAED;;;;OAIG;IACH,IAAI,YAAY,IAAI,OAAO,CAE1B;IACD,IAAI,YAAY,CAAC,IAAI,EAAE,OAAO,EAI7B;IAED;;;OAGG;IACH,IAAI,aAAa,IAAI,OAAO,CAE3B;IACD,IAAI,aAAa,CAAC,IAAI,EAAE,OAAO,EAI9B;IAED;;;;OAIG;IACH,IAAI,MAAM,IAAI,OAAO,CAEpB;IACD,IAAI,MAAM,CAAC,IAAI,EAAE,OAAO,EAIvB;CACF"}
|
|
@@ -29,9 +29,9 @@ var AcEdPromptDistanceOptions = /** @class */ (function (_super) {
|
|
|
29
29
|
*/
|
|
30
30
|
function AcEdPromptDistanceOptions(message) {
|
|
31
31
|
var _this = _super.call(this, message) || this;
|
|
32
|
-
_this._useBasePoint =
|
|
33
|
-
_this._useDashedLine =
|
|
34
|
-
_this._only2d =
|
|
32
|
+
_this._useBasePoint = true;
|
|
33
|
+
_this._useDashedLine = true;
|
|
34
|
+
_this._only2d = true;
|
|
35
35
|
_this.allowNegative = false;
|
|
36
36
|
return _this;
|
|
37
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcEdPromptDistanceOptions.js","sourceRoot":"","sources":["../../../../src/editor/input/prompt/AcEdPromptDistanceOptions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEnD,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAA;AAEzE;;;;;GAKG;AACH;IAA+C,6CAA0B;IAMvE;;;OAGG;IACH,mCAAY,OAAe;QACzB,YAAA,MAAK,YAAC,OAAO,CAAC,SAAA;QATR,mBAAa,GAAY,
|
|
1
|
+
{"version":3,"file":"AcEdPromptDistanceOptions.js","sourceRoot":"","sources":["../../../../src/editor/input/prompt/AcEdPromptDistanceOptions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAE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rB,IAAI,CAAC,cAAc,GAAG,IAAI,CAAA;YAC5B,CAAC;QACH,CAAC;;;OALA;IAYD,sBAAI,6CAAM;QALV;;;;WAIG;aACH;YACE,OAAO,IAAI,CAAC,OAAO,CAAA;QACrB,CAAC;aACD,UAAW,IAAa;YACtB,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;gBACrB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA;YACrB,CAAC;QACH,CAAC;;;OALA;IAMH,gCAAC;AAAD,CAAC,AA1ED,CAA+C,0BAA0B,GA0ExE"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { AcGePoint2dLike } from '@mlightcad/data-model';
|
|
1
|
+
import { AcGePoint2d, AcGePoint2dLike } from '@mlightcad/data-model';
|
|
2
|
+
import { AcEdBaseView } from '../../view';
|
|
2
3
|
import { AcEdFloatingInputOptions } from './AcEdFloatingInputTypes';
|
|
3
4
|
/**
|
|
4
5
|
* A UI component providing a small floating input box used inside CAD editing
|
|
@@ -17,10 +18,10 @@ import { AcEdFloatingInputOptions } from './AcEdFloatingInputTypes';
|
|
|
17
18
|
* remain clean and free from DOM-handling logic.
|
|
18
19
|
*/
|
|
19
20
|
export declare class AcEdFloatingInput<T> {
|
|
20
|
-
/**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
/** Stores last confirmed point */
|
|
22
|
+
lastPoint: AcGePoint2d | null;
|
|
23
|
+
/** The view associated with this input operation */
|
|
24
|
+
protected view: AcEdBaseView;
|
|
24
25
|
/** Inject styles only once */
|
|
25
26
|
private static stylesInjected;
|
|
26
27
|
/**
|
|
@@ -35,6 +36,16 @@ export declare class AcEdFloatingInput<T> {
|
|
|
35
36
|
* X and Y Input elements.
|
|
36
37
|
*/
|
|
37
38
|
private inputs;
|
|
39
|
+
/**
|
|
40
|
+
* Provides a temporary CAD-style rubber-band preview.
|
|
41
|
+
*/
|
|
42
|
+
private rubberBand?;
|
|
43
|
+
/**
|
|
44
|
+
* OSNAP marker manager to display and hide OSNAP marker
|
|
45
|
+
*/
|
|
46
|
+
private osnapMarkerManager?;
|
|
47
|
+
/** Stores last confirmed osnap point */
|
|
48
|
+
private lastOSnapPoint?;
|
|
38
49
|
/**
|
|
39
50
|
* Callback functions
|
|
40
51
|
*/
|
|
@@ -67,10 +78,11 @@ export declare class AcEdFloatingInput<T> {
|
|
|
67
78
|
/**
|
|
68
79
|
* Constructs a new floating input widget with the given options.
|
|
69
80
|
*
|
|
81
|
+
* @param view - The view associated with the floating input
|
|
70
82
|
* @param options Configuration object controlling behavior, callbacks,
|
|
71
83
|
* validation, and display mode.
|
|
72
84
|
*/
|
|
73
|
-
constructor(options: AcEdFloatingInputOptions<T>);
|
|
85
|
+
constructor(view: AcEdBaseView, options: AcEdFloatingInputOptions<T>);
|
|
74
86
|
/**
|
|
75
87
|
* Injects minimal CSS required for the floating input and preview rectangle.
|
|
76
88
|
* Useful when you do not have a separate CSS file.
|
|
@@ -147,5 +159,52 @@ export declare class AcEdFloatingInput<T> {
|
|
|
147
159
|
* @param e The click event containing the current cursor position.
|
|
148
160
|
*/
|
|
149
161
|
private handleClick;
|
|
162
|
+
/**
|
|
163
|
+
* Gets the position after considering window size and osnap
|
|
164
|
+
* @param e - Mouse event
|
|
165
|
+
* @returns The position after considering window size and osnap
|
|
166
|
+
*/
|
|
167
|
+
private getPosition;
|
|
168
|
+
/**
|
|
169
|
+
* Picks entities that intersect a hit-region centered at the specified point
|
|
170
|
+
* in world coordinates.
|
|
171
|
+
*
|
|
172
|
+
* The hit-region is defined as a square (or bounding box) centered at the
|
|
173
|
+
* input point, whose half-size is determined by the `hitRadius` parameter.
|
|
174
|
+
* Only entities whose geometry intersects this region are returned.
|
|
175
|
+
*
|
|
176
|
+
* @param point The center point of the hit-region in world coordinates.
|
|
177
|
+
* If omitted, the current cursor position is used.
|
|
178
|
+
*
|
|
179
|
+
* @param hitRadius The half-width (in world coordinate system) of the
|
|
180
|
+
* hit-region around the point. This creates a square bounding box:
|
|
181
|
+
* [point.x ± hitRadius, point.y ± hitRadius].
|
|
182
|
+
* A larger value increases the pick sensitivity. If omitted, a reasonable
|
|
183
|
+
* default is used.
|
|
184
|
+
* @returns - Returns The OSNAP point in the specified position in world coordinate system
|
|
185
|
+
* if found. Return undefined if no OSNAP point found.
|
|
186
|
+
*/
|
|
187
|
+
/**
|
|
188
|
+
* Gets OSNAP point of entities that intersect a hit-region centered at the
|
|
189
|
+
* specified point in world coordinates.
|
|
190
|
+
*
|
|
191
|
+
* The hit-region is defined as a square (or bounding box) centered at the
|
|
192
|
+
* input point, whose half-size is determined by the `hitRadius` parameter.
|
|
193
|
+
* Only entities whose geometry intersects this region are returned.
|
|
194
|
+
*
|
|
195
|
+
* @param point The center point of the hit-region in world coordinates.
|
|
196
|
+
* If omitted, the current cursor position is used.
|
|
197
|
+
*
|
|
198
|
+
* @param hitRadius The half-width (in pixel size) of the hit-region around
|
|
199
|
+
* the point. It will be converted on one value in the world
|
|
200
|
+
* coordinate 'wcsHitRadius' and creates a square bounding box:
|
|
201
|
+
* [point.x ± wcsHitRadius, point.y ± wcsHitRadius].
|
|
202
|
+
* A larger value increases the pick sensitivity. If omitted, a reasonable
|
|
203
|
+
* default is used.
|
|
204
|
+
*
|
|
205
|
+
* @returns An array of object IDs representing the entities that intersect
|
|
206
|
+
* the hit-region.
|
|
207
|
+
*/
|
|
208
|
+
private getOSnapPoint;
|
|
150
209
|
}
|
|
151
210
|
//# sourceMappingURL=AcEdFloatingInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcEdFloatingInput.d.ts","sourceRoot":"","sources":["../../../../src/editor/input/ui/AcEdFloatingInput.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"AcEdFloatingInput.d.ts","sourceRoot":"","sources":["../../../../src/editor/input/ui/AcEdFloatingInput.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,WAAW,EACX,eAAe,EAGhB,MAA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AC,CAAC;IA2DpE;;;OAGG;IACH,OAAO,CAAC,SAAS;IAyCjB;;;OAGG;IACH,IAAI,SAAS,YAEZ;IAED;;;OAGG;IACH,MAAM,CAAC,GAAG,EAAE,eAAe,GAAG,IAAI;IAYlC;;;;;;;;OAQG;IACH,IAAI;IAOJ;;;;;;;;OAQG;IACH,OAAO;IAWP;;;;OAIG;IACH,WAAW,CAAC,GAAG,EAAE,eAAe;;;;IAyBhC;;;;OAIG;IACH,OAAO,CAAC,cAAc;IAUtB;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAIxB;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAIxB;;;;;;;;OAQG;IACH,OAAO,CAAC,eAAe;IAgBvB;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAUnB;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAiBnB;;;;;;;;;;;;;;;;;;OAkBG;IACH;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,OAAO,CAAC,aAAa;CAoCtB"}
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { acdbHostApplicationServices, AcDbOsnapMode } from '@mlightcad/data-model';
|
|
13
|
+
import { AcEdMarkerManager } from '../marker';
|
|
1
14
|
import { AcEdFloatingInputBoxes } from './AcEdFloatingInputBoxes';
|
|
15
|
+
import { AcEdRubberBand } from './AcEdRubberBand';
|
|
2
16
|
/**
|
|
3
17
|
* A UI component providing a small floating input box used inside CAD editing
|
|
4
18
|
* workflows. It supports both single-input (distance, angle, etc.) and
|
|
@@ -22,16 +36,30 @@ var AcEdFloatingInput = /** @class */ (function () {
|
|
|
22
36
|
/**
|
|
23
37
|
* Constructs a new floating input widget with the given options.
|
|
24
38
|
*
|
|
39
|
+
* @param view - The view associated with the floating input
|
|
25
40
|
* @param options Configuration object controlling behavior, callbacks,
|
|
26
41
|
* validation, and display mode.
|
|
27
42
|
*/
|
|
28
|
-
function AcEdFloatingInput(options) {
|
|
43
|
+
function AcEdFloatingInput(view, options) {
|
|
29
44
|
var _this = this;
|
|
30
45
|
var _a, _b;
|
|
46
|
+
/** Stores last confirmed point */
|
|
47
|
+
this.lastPoint = null;
|
|
31
48
|
/** Whether the widget is currently visible. */
|
|
32
49
|
this.visible = false;
|
|
33
50
|
/** Whether this instance has been disposed. */
|
|
34
51
|
this.disposed = false;
|
|
52
|
+
this.view = view;
|
|
53
|
+
if (!options.disableOSnap) {
|
|
54
|
+
this.osnapMarkerManager = new AcEdMarkerManager(view);
|
|
55
|
+
}
|
|
56
|
+
if (options.basePoint) {
|
|
57
|
+
this.rubberBand = new AcEdRubberBand(this.view);
|
|
58
|
+
this.rubberBand.start(options.basePoint, {
|
|
59
|
+
color: '#0f0',
|
|
60
|
+
showBaseLineOnly: options.showBaseLineOnly
|
|
61
|
+
});
|
|
62
|
+
}
|
|
35
63
|
this.parent = (_a = options.parent) !== null && _a !== void 0 ? _a : document.body;
|
|
36
64
|
this.validateFn = options.validate;
|
|
37
65
|
this.getDynamicValue = options.getDynamicValue;
|
|
@@ -132,10 +160,13 @@ var AcEdFloatingInput = /** @class */ (function () {
|
|
|
132
160
|
* Safe to call multiple times; subsequent calls have no effect.
|
|
133
161
|
*/
|
|
134
162
|
AcEdFloatingInput.prototype.dispose = function () {
|
|
163
|
+
var _a, _b;
|
|
135
164
|
if (this.disposed)
|
|
136
165
|
return;
|
|
137
166
|
this.disposed = true;
|
|
167
|
+
(_a = this.osnapMarkerManager) === null || _a === void 0 ? void 0 : _a.clear();
|
|
138
168
|
this.inputs.dispose();
|
|
169
|
+
(_b = this.rubberBand) === null || _b === void 0 ? void 0 : _b.dispose();
|
|
139
170
|
this.removeListener(true);
|
|
140
171
|
this.container.remove();
|
|
141
172
|
};
|
|
@@ -151,7 +182,6 @@ var AcEdFloatingInput = /** @class */ (function () {
|
|
|
151
182
|
x: pos.x - parentRect.left,
|
|
152
183
|
y: pos.y - parentRect.top
|
|
153
184
|
};
|
|
154
|
-
this.mousePos = mousePos;
|
|
155
185
|
// Compute position within parent bounds
|
|
156
186
|
var left = mousePos.x + 10;
|
|
157
187
|
var top = mousePos.y + 10;
|
|
@@ -205,18 +235,18 @@ var AcEdFloatingInput = /** @class */ (function () {
|
|
|
205
235
|
* @param e The mouse move event containing the current cursor position.
|
|
206
236
|
*/
|
|
207
237
|
AcEdFloatingInput.prototype.handleMouseMove = function (e) {
|
|
208
|
-
var _a;
|
|
238
|
+
var _a, _b;
|
|
209
239
|
if (!this.visible)
|
|
210
240
|
return;
|
|
211
|
-
var
|
|
212
|
-
|
|
213
|
-
var defaults = this.getDynamicValue(mousePos.x, mousePos.y);
|
|
241
|
+
var wcsMousePos = this.getPosition(e);
|
|
242
|
+
var defaults = this.getDynamicValue(wcsMousePos);
|
|
214
243
|
this.inputs.setValue(defaults.raw);
|
|
244
|
+
(_a = this.rubberBand) === null || _a === void 0 ? void 0 : _a.update(wcsMousePos);
|
|
215
245
|
// If inputs lost focus due to some reason, let's try to focus them again.
|
|
216
246
|
if (!this.inputs.focused) {
|
|
217
247
|
this.inputs.focus();
|
|
218
248
|
}
|
|
219
|
-
(
|
|
249
|
+
(_b = this.drawPreview) === null || _b === void 0 ? void 0 : _b.call(this, wcsMousePos);
|
|
220
250
|
};
|
|
221
251
|
/**
|
|
222
252
|
* Handles click events to commit inputs.
|
|
@@ -227,10 +257,102 @@ var AcEdFloatingInput = /** @class */ (function () {
|
|
|
227
257
|
var _a;
|
|
228
258
|
if (!this.visible)
|
|
229
259
|
return;
|
|
230
|
-
var
|
|
231
|
-
var defaults = this.getDynamicValue(
|
|
260
|
+
var wcsMousePos = this.getPosition(e);
|
|
261
|
+
var defaults = this.getDynamicValue(wcsMousePos);
|
|
262
|
+
this.lastPoint = wcsMousePos;
|
|
232
263
|
(_a = this.onCommit) === null || _a === void 0 ? void 0 : _a.call(this, defaults.value);
|
|
233
264
|
};
|
|
265
|
+
/**
|
|
266
|
+
* Gets the position after considering window size and osnap
|
|
267
|
+
* @param e - Mouse event
|
|
268
|
+
* @returns The position after considering window size and osnap
|
|
269
|
+
*/
|
|
270
|
+
AcEdFloatingInput.prototype.getPosition = function (e) {
|
|
271
|
+
var mousePos = this.setPosition(e);
|
|
272
|
+
var wcsMousePos = this.view.cwcs2Wcs(mousePos);
|
|
273
|
+
// Show OSNAP Point
|
|
274
|
+
if (this.osnapMarkerManager) {
|
|
275
|
+
this.osnapMarkerManager.hideMarker();
|
|
276
|
+
this.lastOSnapPoint = this.getOSnapPoint();
|
|
277
|
+
if (this.lastOSnapPoint) {
|
|
278
|
+
wcsMousePos.x = this.lastOSnapPoint.x;
|
|
279
|
+
wcsMousePos.y = this.lastOSnapPoint.y;
|
|
280
|
+
this.osnapMarkerManager.showMarker(this.lastOSnapPoint);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
return wcsMousePos;
|
|
284
|
+
};
|
|
285
|
+
/**
|
|
286
|
+
* Picks entities that intersect a hit-region centered at the specified point
|
|
287
|
+
* in world coordinates.
|
|
288
|
+
*
|
|
289
|
+
* The hit-region is defined as a square (or bounding box) centered at the
|
|
290
|
+
* input point, whose half-size is determined by the `hitRadius` parameter.
|
|
291
|
+
* Only entities whose geometry intersects this region are returned.
|
|
292
|
+
*
|
|
293
|
+
* @param point The center point of the hit-region in world coordinates.
|
|
294
|
+
* If omitted, the current cursor position is used.
|
|
295
|
+
*
|
|
296
|
+
* @param hitRadius The half-width (in world coordinate system) of the
|
|
297
|
+
* hit-region around the point. This creates a square bounding box:
|
|
298
|
+
* [point.x ± hitRadius, point.y ± hitRadius].
|
|
299
|
+
* A larger value increases the pick sensitivity. If omitted, a reasonable
|
|
300
|
+
* default is used.
|
|
301
|
+
* @returns - Returns The OSNAP point in the specified position in world coordinate system
|
|
302
|
+
* if found. Return undefined if no OSNAP point found.
|
|
303
|
+
*/
|
|
304
|
+
/**
|
|
305
|
+
* Gets OSNAP point of entities that intersect a hit-region centered at the
|
|
306
|
+
* specified point in world coordinates.
|
|
307
|
+
*
|
|
308
|
+
* The hit-region is defined as a square (or bounding box) centered at the
|
|
309
|
+
* input point, whose half-size is determined by the `hitRadius` parameter.
|
|
310
|
+
* Only entities whose geometry intersects this region are returned.
|
|
311
|
+
*
|
|
312
|
+
* @param point The center point of the hit-region in world coordinates.
|
|
313
|
+
* If omitted, the current cursor position is used.
|
|
314
|
+
*
|
|
315
|
+
* @param hitRadius The half-width (in pixel size) of the hit-region around
|
|
316
|
+
* the point. It will be converted on one value in the world
|
|
317
|
+
* coordinate 'wcsHitRadius' and creates a square bounding box:
|
|
318
|
+
* [point.x ± wcsHitRadius, point.y ± wcsHitRadius].
|
|
319
|
+
* A larger value increases the pick sensitivity. If omitted, a reasonable
|
|
320
|
+
* default is used.
|
|
321
|
+
*
|
|
322
|
+
* @returns An array of object IDs representing the entities that intersect
|
|
323
|
+
* the hit-region.
|
|
324
|
+
*/
|
|
325
|
+
AcEdFloatingInput.prototype.getOSnapPoint = function (point, hitRadius) {
|
|
326
|
+
if (hitRadius === void 0) { hitRadius = 20; }
|
|
327
|
+
var results = this.view.pick(point, hitRadius);
|
|
328
|
+
if (results.length > 0) {
|
|
329
|
+
// TODO: Is there one better way to get current working database
|
|
330
|
+
var db = acdbHostApplicationServices().workingDatabase;
|
|
331
|
+
var entity = db.tables.blockTable.modelSpace.getIdAt(results[0]);
|
|
332
|
+
if (entity) {
|
|
333
|
+
var snapPoints = [];
|
|
334
|
+
entity.subGetOsnapPoints(AcDbOsnapMode.EndPoint, __assign(__assign({}, this.view.curPos), { z: 0 }), this.lastPoint, snapPoints);
|
|
335
|
+
// Find the nearest osnap point
|
|
336
|
+
var minDist = Number.MAX_VALUE;
|
|
337
|
+
var minDistIndex = -1;
|
|
338
|
+
for (var i = 0; i < snapPoints.length; ++i) {
|
|
339
|
+
var distance = this.view.curPos.distanceTo(snapPoints[i]);
|
|
340
|
+
if (distance < minDist) {
|
|
341
|
+
minDist = distance;
|
|
342
|
+
minDistIndex = i;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
if (minDistIndex != -1) {
|
|
346
|
+
var p1 = this.view.cwcs2Wcs({ x: 0, y: 0 });
|
|
347
|
+
var p2 = this.view.cwcs2Wcs({ x: hitRadius, y: 0 });
|
|
348
|
+
if (minDist < p2.x - p1.x) {
|
|
349
|
+
return snapPoints[minDistIndex];
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
return undefined;
|
|
355
|
+
};
|
|
234
356
|
/** Inject styles only once */
|
|
235
357
|
AcEdFloatingInput.stylesInjected = false;
|
|
236
358
|
return AcEdFloatingInput;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcEdFloatingInput.js","sourceRoot":"","sources":["../../../../src/editor/input/ui/AcEdFloatingInput.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AcEdFloatingInput.js","sourceRoot":"","sources":["../../../../src/editor/input/ui/AcEdFloatingInput.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EACL,2BAA2B,EAC3B,aAAa,EAKd,MAAM,uBAAuB,CAAA;AAG9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AAUjE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD;;;;;;;;;;;;;;;GAeG;AACH;IA0EE,8EAA8E;IAC9E,cAAc;IACd,8EAA8E;IAE9E;;;;;;OAMG;IACH,2BAAY,IAAkB,EAAE,OAAo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,CAAC;gBACH,CAAC;gBACD,IAAI,YAAY,IAAI,CAAC,CAAC,EAAE,CAAC;oBACvB,IAAM,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAA;oBAC7C,IAAM,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAA;oBACrD,IAAI,OAAO,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;wBAC1B,OAAO,UAAU,CAAC,YAAY,CAAC,CAAA;oBACjC,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;IAxbD,8BAA8B;IACf,gCAAc,GAAG,KAAK,AAAR,CAAQ;IAwbvC,wBAAC;CAAA,AAhcD,IAgcC;SAhcY,iBAAiB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AcGePoint2dLike } from '@mlightcad/data-model';
|
|
1
2
|
/**
|
|
2
3
|
* Describes the raw text values from the X and Y fields in {@link AcEdFloatingInput}.
|
|
3
4
|
*/
|
|
@@ -57,11 +58,11 @@ export type AcEdFloatingInputCancelCallback = () => void;
|
|
|
57
58
|
/**
|
|
58
59
|
* Callback invoked on mousemove to update the preview geometry.
|
|
59
60
|
*/
|
|
60
|
-
export type AcEdFloatingInputDrawPreviewCallback = (
|
|
61
|
+
export type AcEdFloatingInputDrawPreviewCallback = (pos: AcGePoint2dLike) => void;
|
|
61
62
|
/**
|
|
62
63
|
* Callback used to dynamically compute input values for the floating input fields.
|
|
63
64
|
*/
|
|
64
|
-
export type AcEdFloatingInputDynamicValueCallback<T> = (
|
|
65
|
+
export type AcEdFloatingInputDynamicValueCallback<T> = (pos: AcGePoint2dLike) => AcEdFloatingInputDynamicValue<T>;
|
|
65
66
|
/**
|
|
66
67
|
* Construction options for {@link AcEdFloatingInput}.
|
|
67
68
|
*/
|
|
@@ -83,6 +84,19 @@ export interface AcEdFloatingInputOptions<T> {
|
|
|
83
84
|
* Useful for describing expected input (e.g., "Specify next point").
|
|
84
85
|
*/
|
|
85
86
|
message?: string;
|
|
87
|
+
/**
|
|
88
|
+
* The flag to indicate whether to disable osnap.
|
|
89
|
+
*/
|
|
90
|
+
disableOSnap?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* The base point used to draw rubber band or base line
|
|
93
|
+
*/
|
|
94
|
+
basePoint?: AcGePoint2dLike | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* The flag to indicate whether to show base line only instead of showing the whole
|
|
97
|
+
* rubber band. The flog takes effect only if 'basePoint' is specified in options.
|
|
98
|
+
*/
|
|
99
|
+
showBaseLineOnly?: boolean;
|
|
86
100
|
/**
|
|
87
101
|
* Custom validation function.
|
|
88
102
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcEdFloatingInputTypes.d.ts","sourceRoot":"","sources":["../../../../src/editor/input/ui/AcEdFloatingInputTypes.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,wCAAwC;IACxC,CAAC,EAAE,MAAM,CAAA;IACT,wCAAwC;IACxC,CAAC,CAAC,EAAE,MAAM,CAAA;CACX;AAED,MAAM,WAAW,6BAA6B,CAAC,CAAC;IAC9C,wBAAwB;IACxB,KAAK,EAAE,CAAC,CAAA;IACR,8EAA8E;IAC9E,GAAG,EAAE,wBAAwB,CAAA;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,iCAAiC,CAAC,CAAC;IAClD,wBAAwB;IACxB,KAAK,CAAC,EAAE,CAAC,CAAA;IACT,wCAAwC;IACxC,OAAO,EAAE,OAAO,CAAA;CACjB;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,mCAAmC,CAAC,CAAC,IAAI,CACnD,GAAG,EAAE,wBAAwB,KAC1B,iCAAiC,CAAC,CAAC,CAAC,CAAA;AAEzC;;;;;GAKG;AACH,MAAM,MAAM,+BAA+B,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAA;AAEnE;;;;;GAKG;AACH,MAAM,MAAM,+BAA+B,CAAC,CAAC,IAAI,CAC/C,KAAK,EAAE,iCAAiC,CAAC,CAAC,CAAC,KACxC,IAAI,CAAA;AAET;;;GAGG;AACH,MAAM,MAAM,+BAA+B,GAAG,MAAM,IAAI,CAAA;AAExD;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,CACjD,
|
|
1
|
+
{"version":3,"file":"AcEdFloatingInputTypes.d.ts","sourceRoot":"","sources":["../../../../src/editor/input/ui/AcEdFloatingInputTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEvD;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,wCAAwC;IACxC,CAAC,EAAE,MAAM,CAAA;IACT,wCAAwC;IACxC,CAAC,CAAC,EAAE,MAAM,CAAA;CACX;AAED,MAAM,WAAW,6BAA6B,CAAC,CAAC;IAC9C,wBAAwB;IACxB,KAAK,EAAE,CAAC,CAAA;IACR,8EAA8E;IAC9E,GAAG,EAAE,wBAAwB,CAAA;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,iCAAiC,CAAC,CAAC;IAClD,wBAAwB;IACxB,KAAK,CAAC,EAAE,CAAC,CAAA;IACT,wCAAwC;IACxC,OAAO,EAAE,OAAO,CAAA;CACjB;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,mCAAmC,CAAC,CAAC,IAAI,CACnD,GAAG,EAAE,wBAAwB,KAC1B,iCAAiC,CAAC,CAAC,CAAC,CAAA;AAEzC;;;;;GAKG;AACH,MAAM,MAAM,+BAA+B,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAA;AAEnE;;;;;GAK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int() or getBox() */
|
|
17
17
|
private lastPoint;
|
|
18
|
-
/** Stores last confirmed osnap point */
|
|
19
|
-
private lastOSnapPoint?;
|
|
20
18
|
/**
|
|
21
19
|
* The flag to indicate whether it is currently in an “input acquisition” mode (e.g., point
|
|
22
20
|
* selection, distance/angle prompt, string prompt, etc.),
|
|
@@ -87,46 +85,5 @@ export declare class AcEdInputManager {
|
|
|
87
85
|
* values, and guaranteeing cleanup of UI elements and event handlers.
|
|
88
86
|
*/
|
|
89
87
|
private makePromise;
|
|
90
|
-
/**
|
|
91
|
-
* Picks entities that intersect a hit-region centered at the specified point
|
|
92
|
-
* in world coordinates.
|
|
93
|
-
*
|
|
94
|
-
* The hit-region is defined as a square (or bounding box) centered at the
|
|
95
|
-
* input point, whose half-size is determined by the `hitRadius` parameter.
|
|
96
|
-
* Only entities whose geometry intersects this region are returned.
|
|
97
|
-
*
|
|
98
|
-
* @param point The center point of the hit-region in world coordinates.
|
|
99
|
-
* If omitted, the current cursor position is used.
|
|
100
|
-
*
|
|
101
|
-
* @param hitRadius The half-width (in world coordinate system) of the
|
|
102
|
-
* hit-region around the point. This creates a square bounding box:
|
|
103
|
-
* [point.x ± hitRadius, point.y ± hitRadius].
|
|
104
|
-
* A larger value increases the pick sensitivity. If omitted, a reasonable
|
|
105
|
-
* default is used.
|
|
106
|
-
* @returns - Returns The OSNAP point in the specified position in world coordinate system
|
|
107
|
-
* if found. Return undefined if no OSNAP point found.
|
|
108
|
-
*/
|
|
109
|
-
/**
|
|
110
|
-
* Gets OSNAP point of entities that intersect a hit-region centered at the
|
|
111
|
-
* specified point in world coordinates.
|
|
112
|
-
*
|
|
113
|
-
* The hit-region is defined as a square (or bounding box) centered at the
|
|
114
|
-
* input point, whose half-size is determined by the `hitRadius` parameter.
|
|
115
|
-
* Only entities whose geometry intersects this region are returned.
|
|
116
|
-
*
|
|
117
|
-
* @param point The center point of the hit-region in world coordinates.
|
|
118
|
-
* If omitted, the current cursor position is used.
|
|
119
|
-
*
|
|
120
|
-
* @param hitRadius The half-width (in pixel size) of the hit-region around
|
|
121
|
-
* the point. It will be converted on one value in the world
|
|
122
|
-
* coordinate 'wcsHitRadius' and creates a square bounding box:
|
|
123
|
-
* [point.x ± wcsHitRadius, point.y ± wcsHitRadius].
|
|
124
|
-
* A larger value increases the pick sensitivity. If omitted, a reasonable
|
|
125
|
-
* default is used.
|
|
126
|
-
*
|
|
127
|
-
* @returns An array of object IDs representing the entities that intersect
|
|
128
|
-
* the hit-region.
|
|
129
|
-
*/
|
|
130
|
-
private getOSnapPoint;
|
|
131
88
|
}
|
|
132
89
|
//# sourceMappingURL=AcEdInputManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcEdInputManager.d.ts","sourceRoot":"","sources":["../../../../src/editor/input/ui/AcEdInputManager.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"AcEdInputManager.d.ts","sourceRoot":"","sources":["../../../../src/editor/input/ui/AcEdInputManager.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAET,eAAe,EAChB,MAAM,uBAAuB,CAAA;AAG9B,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAYzC,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EAExB,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,WAAW,CAAA;AAQlB;;;;;;GAMG;AACH,qBAAa,gBAAgB;IAC3B,8BAA8B;IAC9B,OAAO,CAAC,MAAM,CAAC,cAAc,CAAQ;IAErC,oDAAoD;IACpD,SAAS,CAAC,IAAI,EAAE,YAAY,CAAA;IAE5B,8DAA8D;IAC9D,OAAO,CAAC,SAAS,CAA+B;IAEhD;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAiB;IAE/B;;;;;OAKG;gBACS,IAAI,EAAE,YAAY;IAK9B;;;OAGG;IACH,IAAI,QAAQ,YAEX;IAED;;;OAGG;IACH,OAAO,CAAC,SAAS;IA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