@mlightcad/cad-simple-viewer 1.2.4 → 1.2.5
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 +11406 -8892
- package/dist/index.umd.cjs +314 -24
- package/dist/libredwg-parser-worker.js +7267 -7238
- package/dist/mtext-renderer-worker.js +32 -9
- package/lib/app/AcApDocManager.d.ts +20 -3
- package/lib/app/AcApDocManager.d.ts.map +1 -1
- package/lib/app/AcApDocManager.js +66 -11
- package/lib/app/AcApDocManager.js.map +1 -1
- package/lib/app/AcApProgress.d.ts +133 -0
- package/lib/app/AcApProgress.d.ts.map +1 -0
- package/lib/app/AcApProgress.js +148 -0
- package/lib/app/AcApProgress.js.map +1 -0
- package/lib/app/AcApSettingManager.d.ts +42 -0
- package/lib/app/AcApSettingManager.d.ts.map +1 -1
- package/lib/app/AcApSettingManager.js +63 -0
- package/lib/app/AcApSettingManager.js.map +1 -1
- package/lib/app/index.d.ts +0 -1
- package/lib/app/index.d.ts.map +1 -1
- package/lib/app/index.js +0 -1
- package/lib/app/index.js.map +1 -1
- package/lib/command/AcApCircleCmd.d.ts +21 -0
- package/lib/command/AcApCircleCmd.d.ts.map +1 -0
- package/lib/command/AcApCircleCmd.js +115 -0
- package/lib/command/AcApCircleCmd.js.map +1 -0
- package/lib/command/AcApDimCmd.d.ts +57 -0
- package/lib/command/AcApDimCmd.d.ts.map +1 -0
- package/lib/command/AcApDimCmd.js +228 -0
- package/lib/command/AcApDimCmd.js.map +1 -0
- package/lib/command/AcApLogCmd.d.ts +13 -0
- package/lib/command/AcApLogCmd.d.ts.map +1 -0
- package/lib/command/AcApLogCmd.js +97 -0
- package/lib/command/AcApLogCmd.js.map +1 -0
- package/lib/command/AcApSysVarCmd.d.ts +15 -0
- package/lib/command/AcApSysVarCmd.d.ts.map +1 -0
- package/lib/command/AcApSysVarCmd.js +94 -0
- package/lib/command/AcApSysVarCmd.js.map +1 -0
- package/lib/command/AcApZoomToBoxCmd.d.ts +0 -36
- package/lib/command/AcApZoomToBoxCmd.d.ts.map +1 -1
- package/lib/command/AcApZoomToBoxCmd.js +4 -61
- package/lib/command/AcApZoomToBoxCmd.js.map +1 -1
- package/lib/command/index.d.ts +4 -0
- package/lib/command/index.d.ts.map +1 -1
- package/lib/command/index.js +4 -0
- package/lib/command/index.js.map +1 -1
- package/lib/editor/command/AcEdCommandStack.d.ts +19 -1
- package/lib/editor/command/AcEdCommandStack.d.ts.map +1 -1
- package/lib/editor/command/AcEdCommandStack.js +40 -0
- package/lib/editor/command/AcEdCommandStack.js.map +1 -1
- package/lib/editor/input/AcEdCursorManager.d.ts +14 -30
- package/lib/editor/input/AcEdCursorManager.d.ts.map +1 -1
- package/lib/editor/input/AcEdCursorManager.js +32 -31
- package/lib/editor/input/AcEdCursorManager.js.map +1 -1
- package/lib/editor/input/AcEdPreviewJig.d.ts +103 -0
- package/lib/editor/input/AcEdPreviewJig.d.ts.map +1 -0
- package/lib/editor/input/AcEdPreviewJig.js +82 -0
- package/lib/editor/input/AcEdPreviewJig.js.map +1 -0
- package/lib/editor/input/AcEditor.d.ts +58 -11
- package/lib/editor/input/AcEditor.d.ts.map +1 -1
- package/lib/editor/input/AcEditor.js +86 -22
- package/lib/editor/input/AcEditor.js.map +1 -1
- package/lib/editor/input/handler/AcEdAngleHandler.d.ts +12 -0
- package/lib/editor/input/handler/AcEdAngleHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdAngleHandler.js +25 -0
- package/lib/editor/input/handler/AcEdAngleHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdDistanceHandler.d.ts +8 -0
- package/lib/editor/input/handler/AcEdDistanceHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdDistanceHandler.js +29 -0
- package/lib/editor/input/handler/AcEdDistanceHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdDoubleHandler.d.ts +7 -0
- package/lib/editor/input/handler/AcEdDoubleHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdDoubleHandler.js +28 -0
- package/lib/editor/input/handler/AcEdDoubleHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdInputHandler.d.ts +14 -0
- package/lib/editor/input/handler/AcEdInputHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdInputHandler.js +2 -0
- package/lib/editor/input/handler/AcEdInputHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdIntegerHandler.d.ts +11 -0
- package/lib/editor/input/handler/AcEdIntegerHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdIntegerHandler.js +44 -0
- package/lib/editor/input/handler/AcEdIntegerHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdNumericalHandler.d.ts +11 -0
- package/lib/editor/input/handler/AcEdNumericalHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdNumericalHandler.js +24 -0
- package/lib/editor/input/handler/AcEdNumericalHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdPointHandler.d.ts +16 -0
- package/lib/editor/input/handler/AcEdPointHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdPointHandler.js +19 -0
- package/lib/editor/input/handler/AcEdPointHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdStringHandler.d.ts +12 -0
- package/lib/editor/input/handler/AcEdStringHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdStringHandler.js +24 -0
- package/lib/editor/input/handler/AcEdStringHandler.js.map +1 -0
- package/lib/editor/input/handler/index.d.ts +9 -0
- package/lib/editor/input/handler/index.d.ts.map +1 -0
- package/lib/editor/input/handler/index.js +9 -0
- package/lib/editor/input/handler/index.js.map +1 -0
- package/lib/editor/input/index.d.ts +4 -1
- package/lib/editor/input/index.d.ts.map +1 -1
- package/lib/editor/input/index.js +4 -1
- package/lib/editor/input/index.js.map +1 -1
- package/lib/editor/input/marker/AcEdMarker.d.ts +72 -0
- package/lib/editor/input/marker/AcEdMarker.d.ts.map +1 -0
- package/lib/editor/input/marker/AcEdMarker.js +124 -0
- package/lib/editor/input/marker/AcEdMarker.js.map +1 -0
- package/lib/editor/input/marker/AcEdOSnapMarkerManager.d.ts +52 -0
- package/lib/editor/input/marker/AcEdOSnapMarkerManager.d.ts.map +1 -0
- package/lib/editor/input/marker/AcEdOSnapMarkerManager.js +91 -0
- package/lib/editor/input/marker/AcEdOSnapMarkerManager.js.map +1 -0
- package/lib/editor/input/marker/index.d.ts +3 -0
- package/lib/editor/input/marker/index.d.ts.map +1 -0
- package/lib/editor/input/marker/index.js +3 -0
- package/lib/editor/input/marker/index.js.map +1 -0
- package/lib/editor/input/prompt/AcEdKeyword.d.ts +63 -0
- package/lib/editor/input/prompt/AcEdKeyword.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdKeyword.js +120 -0
- package/lib/editor/input/prompt/AcEdKeyword.js.map +1 -0
- package/lib/editor/input/prompt/AcEdKeywordCollection.d.ts +52 -0
- package/lib/editor/input/prompt/AcEdKeywordCollection.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdKeywordCollection.js +103 -0
- package/lib/editor/input/prompt/AcEdKeywordCollection.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts +75 -0
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.js +182 -0
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptDistanceOptions.d.ts +46 -0
- package/lib/editor/input/prompt/AcEdPromptDistanceOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptDistanceOptions.js +114 -0
- package/lib/editor/input/prompt/AcEdPromptDistanceOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptDoubleOptions.d.ts +10 -0
- package/lib/editor/input/prompt/AcEdPromptDoubleOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptDoubleOptions.js +31 -0
- package/lib/editor/input/prompt/AcEdPromptDoubleOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptIntegerOptions.d.ts +39 -0
- package/lib/editor/input/prompt/AcEdPromptIntegerOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptIntegerOptions.js +84 -0
- package/lib/editor/input/prompt/AcEdPromptIntegerOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalOptions.d.ts +59 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalOptions.js +140 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalResult.d.ts +19 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalResult.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalResult.js +36 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalResult.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptOptions.d.ts +61 -0
- package/lib/editor/input/prompt/AcEdPromptOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptOptions.js +179 -0
- package/lib/editor/input/prompt/AcEdPromptOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptPointOptions.d.ts +46 -0
- package/lib/editor/input/prompt/AcEdPromptPointOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptPointOptions.js +113 -0
- package/lib/editor/input/prompt/AcEdPromptPointOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptPointResult.d.ts +25 -0
- package/lib/editor/input/prompt/AcEdPromptPointResult.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptPointResult.js +38 -0
- package/lib/editor/input/prompt/AcEdPromptPointResult.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptResult.d.ts +27 -0
- package/lib/editor/input/prompt/AcEdPromptResult.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptResult.js +19 -0
- package/lib/editor/input/prompt/AcEdPromptResult.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptStatus.d.ts +22 -0
- package/lib/editor/input/prompt/AcEdPromptStatus.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptStatus.js +23 -0
- package/lib/editor/input/prompt/AcEdPromptStatus.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptStringOptions.d.ts +54 -0
- package/lib/editor/input/prompt/AcEdPromptStringOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptStringOptions.js +124 -0
- package/lib/editor/input/prompt/AcEdPromptStringOptions.js.map +1 -0
- package/lib/editor/input/prompt/index.d.ts +11 -0
- package/lib/editor/input/prompt/index.d.ts.map +1 -0
- package/lib/editor/input/prompt/index.js +11 -0
- package/lib/editor/input/prompt/index.js.map +1 -0
- package/lib/editor/input/ui/AcEdCommandLine.d.ts +114 -0
- package/lib/editor/input/ui/AcEdCommandLine.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdCommandLine.js +453 -0
- package/lib/editor/input/ui/AcEdCommandLine.js.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInput.d.ts +151 -0
- package/lib/editor/input/ui/AcEdFloatingInput.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInput.js +239 -0
- package/lib/editor/input/ui/AcEdFloatingInput.js.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInputBox.d.ts +60 -0
- package/lib/editor/input/ui/AcEdFloatingInputBox.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInputBox.js +113 -0
- package/lib/editor/input/ui/AcEdFloatingInputBox.js.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.d.ts +104 -0
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.js +154 -0
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.js.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInputTypes.d.ts +113 -0
- package/lib/editor/input/ui/AcEdFloatingInputTypes.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInputTypes.js +2 -0
- package/lib/editor/input/ui/AcEdFloatingInputTypes.js.map +1 -0
- package/lib/editor/input/ui/AcEdInputManager.d.ts +132 -0
- package/lib/editor/input/ui/AcEdInputManager.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdInputManager.js +477 -0
- package/lib/editor/input/ui/AcEdInputManager.js.map +1 -0
- package/lib/editor/input/ui/AcEdRubberBand.d.ts +66 -0
- package/lib/editor/input/ui/AcEdRubberBand.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdRubberBand.js +276 -0
- package/lib/editor/input/ui/AcEdRubberBand.js.map +1 -0
- package/lib/editor/input/ui/index.d.ts +3 -0
- package/lib/editor/input/ui/index.d.ts.map +1 -0
- package/lib/editor/input/ui/index.js +3 -0
- package/lib/editor/input/ui/index.js.map +1 -0
- package/lib/editor/view/AcEdBaseView.d.ts +35 -11
- package/lib/editor/view/AcEdBaseView.d.ts.map +1 -1
- package/lib/editor/view/AcEdBaseView.js +14 -11
- package/lib/editor/view/AcEdBaseView.js.map +1 -1
- package/lib/i18n/AcApI18n.d.ts +135 -0
- package/lib/i18n/AcApI18n.d.ts.map +1 -0
- package/lib/i18n/AcApI18n.js +208 -0
- package/lib/i18n/AcApI18n.js.map +1 -0
- package/lib/i18n/en/command.d.ts +18 -0
- package/lib/i18n/en/command.d.ts.map +1 -0
- package/lib/i18n/en/command.js +17 -0
- package/lib/i18n/en/command.js.map +1 -0
- package/lib/i18n/en/jig.d.ts +11 -0
- package/lib/i18n/en/jig.d.ts.map +1 -0
- package/lib/i18n/en/jig.js +10 -0
- package/lib/i18n/en/jig.js.map +1 -0
- package/lib/i18n/en/main.d.ts +37 -0
- package/lib/i18n/en/main.d.ts.map +1 -0
- package/lib/i18n/en/main.js +36 -0
- package/lib/i18n/en/main.js.map +1 -0
- package/lib/i18n/index.d.ts +6 -0
- package/lib/i18n/index.d.ts.map +1 -0
- package/lib/i18n/index.js +31 -0
- package/lib/i18n/index.js.map +1 -0
- package/lib/i18n/zh/command.d.ts +18 -0
- package/lib/i18n/zh/command.d.ts.map +1 -0
- package/lib/i18n/zh/command.js +17 -0
- package/lib/i18n/zh/command.js.map +1 -0
- package/lib/i18n/zh/jig.d.ts +11 -0
- package/lib/i18n/zh/jig.d.ts.map +1 -0
- package/lib/i18n/zh/jig.js +10 -0
- package/lib/i18n/zh/jig.js.map +1 -0
- package/lib/i18n/zh/main.d.ts +37 -0
- package/lib/i18n/zh/main.d.ts.map +1 -0
- package/lib/i18n/zh/main.js +36 -0
- package/lib/i18n/zh/main.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/view/AcTrScene.d.ts +19 -6
- package/lib/view/AcTrScene.d.ts.map +1 -1
- package/lib/view/AcTrScene.js +25 -6
- package/lib/view/AcTrScene.js.map +1 -1
- package/lib/view/AcTrView2d.d.ts +11 -1
- package/lib/view/AcTrView2d.d.ts.map +1 -1
- package/lib/view/AcTrView2d.js +73 -35
- package/lib/view/AcTrView2d.js.map +1 -1
- package/package.json +7 -7
- package/lib/editor/input/AcEdBaseInput.d.ts +0 -89
- package/lib/editor/input/AcEdBaseInput.d.ts.map +0 -1
- package/lib/editor/input/AcEdBaseInput.js +0 -166
- package/lib/editor/input/AcEdBaseInput.js.map +0 -1
- package/lib/editor/input/AcEdBoxSelector.d.ts +0 -108
- package/lib/editor/input/AcEdBoxSelector.d.ts.map +0 -1
- package/lib/editor/input/AcEdBoxSelector.js +0 -220
- package/lib/editor/input/AcEdBoxSelector.js.map +0 -1
- package/lib/editor/input/AcEdInputPoint.d.ts +0 -51
- package/lib/editor/input/AcEdInputPoint.d.ts.map +0 -1
- package/lib/editor/input/AcEdInputPoint.js +0 -78
- package/lib/editor/input/AcEdInputPoint.js.map +0 -1
- package/lib/editor/input/AcEdJig.d.ts +0 -180
- package/lib/editor/input/AcEdJig.d.ts.map +0 -1
- package/lib/editor/input/AcEdJig.js +0 -256
- package/lib/editor/input/AcEdJig.js.map +0 -1
- package/lib/editor/input/AcEdJigLoop.d.ts +0 -63
- package/lib/editor/input/AcEdJigLoop.d.ts.map +0 -1
- package/lib/editor/input/AcEdJigLoop.js +0 -91
- package/lib/editor/input/AcEdJigLoop.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApLogCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApLogCmd.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAGxC;;;GAGG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACzC,OAAO,CAAC,OAAO,EAAE,WAAW;IAM5B,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,UAAU;IAqDlB,OAAO,CAAC,oBAAoB;CAG7B"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
import { AcCmPerformanceCollector } from '@mlightcad/data-model';
|
|
17
|
+
import { AcEdCommand } from '../command';
|
|
18
|
+
/**
|
|
19
|
+
* This is an internal command used to log some debug information in console.
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
var AcApLogCmd = /** @class */ (function (_super) {
|
|
23
|
+
__extends(AcApLogCmd, _super);
|
|
24
|
+
function AcApLogCmd() {
|
|
25
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
+
}
|
|
27
|
+
AcApLogCmd.prototype.execute = function (context) {
|
|
28
|
+
this.printSelectionSet(context);
|
|
29
|
+
this.printStats(context);
|
|
30
|
+
this.printPerformanceData();
|
|
31
|
+
};
|
|
32
|
+
AcApLogCmd.prototype.printSelectionSet = function (context) {
|
|
33
|
+
var modelSpace = context.doc.database.tables.blockTable.modelSpace;
|
|
34
|
+
context.view.selectionSet.ids.forEach(function (id) {
|
|
35
|
+
var entity = modelSpace.getIdAt(id);
|
|
36
|
+
if (entity)
|
|
37
|
+
console.log(entity);
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
AcApLogCmd.prototype.printStats = function (context) {
|
|
41
|
+
var layouts = context.view.stats.layouts;
|
|
42
|
+
console.log('Geometry information in current drawing:');
|
|
43
|
+
var _loop_1 = function (index) {
|
|
44
|
+
console.group("Layout: ".concat(index));
|
|
45
|
+
var layout = layouts[index];
|
|
46
|
+
var sizes = [0, 0, 0, 0, 0, 0];
|
|
47
|
+
var totals = [0, 0, 0, 0, 0, 0];
|
|
48
|
+
var data = layout.layers.map(function (layer) {
|
|
49
|
+
sizes[0] = layer.line.indexed.geometrySize / 1024;
|
|
50
|
+
sizes[1] = layer.line.nonIndexed.geometrySize / 1024;
|
|
51
|
+
sizes[2] = layer.mesh.indexed.geometrySize / 1024;
|
|
52
|
+
sizes[3] = layer.mesh.nonIndexed.geometrySize / 1024;
|
|
53
|
+
sizes[4] = layer.point.indexed.geometrySize / 1024;
|
|
54
|
+
sizes[5] = layer.point.nonIndexed.geometrySize / 1024;
|
|
55
|
+
totals[0] += sizes[0];
|
|
56
|
+
totals[1] += sizes[1];
|
|
57
|
+
totals[2] += sizes[2];
|
|
58
|
+
totals[3] += sizes[3];
|
|
59
|
+
totals[4] += sizes[4];
|
|
60
|
+
totals[5] += sizes[5];
|
|
61
|
+
return {
|
|
62
|
+
name: layer.name,
|
|
63
|
+
'idx line (KB)': sizes[0].toFixed(1),
|
|
64
|
+
'line (KB)': sizes[1].toFixed(1),
|
|
65
|
+
'idx mesh (KB)': sizes[2].toFixed(1),
|
|
66
|
+
'mesh (KB)': sizes[3].toFixed(1),
|
|
67
|
+
'idx point (KB)': sizes[4].toFixed(1),
|
|
68
|
+
'point (KB)': sizes[5].toFixed(1),
|
|
69
|
+
'total geo (KB)': (layer.summary.totalGeometrySize / 1024).toFixed(1),
|
|
70
|
+
'total mapping (KB)': (layer.summary.totalMappingSize / 1024).toFixed(1)
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
data.push({
|
|
74
|
+
name: 'total',
|
|
75
|
+
'idx line (KB)': totals[0].toFixed(1),
|
|
76
|
+
'line (KB)': totals[1].toFixed(1),
|
|
77
|
+
'idx mesh (KB)': totals[2].toFixed(1),
|
|
78
|
+
'mesh (KB)': totals[3].toFixed(1),
|
|
79
|
+
'idx point (KB)': totals[4].toFixed(1),
|
|
80
|
+
'point (KB)': totals[5].toFixed(1),
|
|
81
|
+
'total geo (KB)': (layout.summary.totalSize.geometry / 1024).toFixed(1),
|
|
82
|
+
'total mapping (KB)': (layout.summary.totalSize.mapping / 1024).toFixed(1)
|
|
83
|
+
});
|
|
84
|
+
console.table(data);
|
|
85
|
+
console.groupEnd();
|
|
86
|
+
};
|
|
87
|
+
for (var index = 0; index < layouts.length; ++index) {
|
|
88
|
+
_loop_1(index);
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
AcApLogCmd.prototype.printPerformanceData = function () {
|
|
92
|
+
AcCmPerformanceCollector.getInstance().printAll();
|
|
93
|
+
};
|
|
94
|
+
return AcApLogCmd;
|
|
95
|
+
}(AcEdCommand));
|
|
96
|
+
export { AcApLogCmd };
|
|
97
|
+
//# sourceMappingURL=AcApLogCmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApLogCmd.js","sourceRoot":"","sources":["../../src/command/AcApLogCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAGhE,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAGxC;;;GAGG;AACH;IAAgC,8BAAW;IAA3C;;IAuEA,CAAC;IAtEC,4BAAO,GAAP,UAAQ,OAAoB;QAC1B,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAA;QAC/B,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;QACxB,IAAI,CAAC,oBAAoB,EAAE,CAAA;IAC7B,CAAC;IAEO,sCAAiB,GAAzB,UAA0B,OAAoB;QAC5C,IAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAA;QACpE,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,UAAA,EAAE;YACtC,IAAM,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;YACrC,IAAI,MAAM;gBAAE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QACjC,CAAC,CAAC,CAAA;IACJ,CAAC;IAEO,+BAAU,GAAlB,UAAmB,OAAoB;QACrC,IAAM,OAAO,GAAI,OAAO,CAAC,IAAmB,CAAC,KAAK,CAAC,OAAO,CAAA;QAC1D,OAAO,CAAC,GAAG,CAAC,0CAA0C,CAAC,CAAA;gCAC9C,KAAK;YACZ,OAAO,CAAC,KAAK,CAAC,kBAAW,KAAK,CAAE,CAAC,CAAA;YACjC,IA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C,OAAO,CAAC,CAAC,CAAC;gBACtC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;gBAClC,gBAAgB,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;gBACvE,oBAAoB,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC,OAAO,CACrE,CAAC,CACF;aACF,CAAC,CAAA;YACF,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;YACnB,OAAO,CAAC,QAAQ,EAAE,CAAA;;QA9CpB,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,KAAK;oBAA1C,KAAK;SA+Cb;IACH,CAAC;IAEO,yCAAoB,GAA5B;QACE,wBAAwB,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE,CAAA;IACnD,CAAC;IACH,iBAAC;AAAD,CAAC,AAvED,CAAgC,WAAW,GAuE1C"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AcApContext } from '../app';
|
|
2
|
+
import { AcEdCommand } from '../editor';
|
|
3
|
+
/**
|
|
4
|
+
* Command for modifying value of one system variable. All of system variables share
|
|
5
|
+
* this command.
|
|
6
|
+
*/
|
|
7
|
+
export declare class AcApSysVarCmd extends AcEdCommand {
|
|
8
|
+
/**
|
|
9
|
+
* Executes the command to modify the value of one system variable.
|
|
10
|
+
*
|
|
11
|
+
* @param context - The application context containing the view
|
|
12
|
+
*/
|
|
13
|
+
execute(_context: AcApContext): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=AcApSysVarCmd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApSysVarCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApSysVarCmd.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAkB,MAAM,QAAQ,CAAA;AACpD,OAAO,EAAE,WAAW,EAA2B,MAAM,WAAW,CAAA;AAGhE;;;GAGG;AACH,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;OAIG;IACG,OAAO,CAAC,QAAQ,EAAE,WAAW;CAUpC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
26
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
27
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
28
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
29
|
+
function step(op) {
|
|
30
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
31
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
32
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
33
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
34
|
+
switch (op[0]) {
|
|
35
|
+
case 0: case 1: t = op; break;
|
|
36
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
37
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
38
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
39
|
+
default:
|
|
40
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
41
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
42
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
43
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
44
|
+
if (t[2]) _.ops.pop();
|
|
45
|
+
_.trys.pop(); continue;
|
|
46
|
+
}
|
|
47
|
+
op = body.call(thisArg, _);
|
|
48
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
49
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
import { AcDbSysVarManager } from '@mlightcad/data-model';
|
|
53
|
+
import { AcApDocManager } from '../app';
|
|
54
|
+
import { AcEdCommand, AcEdPromptStringOptions } from '../editor';
|
|
55
|
+
import { AcApI18n } from '../i18n';
|
|
56
|
+
/**
|
|
57
|
+
* Command for modifying value of one system variable. All of system variables share
|
|
58
|
+
* this command.
|
|
59
|
+
*/
|
|
60
|
+
var AcApSysVarCmd = /** @class */ (function (_super) {
|
|
61
|
+
__extends(AcApSysVarCmd, _super);
|
|
62
|
+
function AcApSysVarCmd() {
|
|
63
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Executes the command to modify the value of one system variable.
|
|
67
|
+
*
|
|
68
|
+
* @param context - The application context containing the view
|
|
69
|
+
*/
|
|
70
|
+
AcApSysVarCmd.prototype.execute = function (_context) {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
72
|
+
var prompt, value, sysVarManager, sysVar;
|
|
73
|
+
return __generator(this, function (_a) {
|
|
74
|
+
switch (_a.label) {
|
|
75
|
+
case 0:
|
|
76
|
+
prompt = new AcEdPromptStringOptions(AcApI18n.t('jig.sysvar.prompt'));
|
|
77
|
+
AcEdPromptStringOptions;
|
|
78
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getString(prompt)];
|
|
79
|
+
case 1:
|
|
80
|
+
value = _a.sent();
|
|
81
|
+
sysVarManager = AcDbSysVarManager.instance();
|
|
82
|
+
sysVar = sysVarManager.getDescriptor(this.globalName);
|
|
83
|
+
if (sysVar) {
|
|
84
|
+
sysVarManager.setVar(this.globalName, value);
|
|
85
|
+
}
|
|
86
|
+
return [2 /*return*/];
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
return AcApSysVarCmd;
|
|
92
|
+
}(AcEdCommand));
|
|
93
|
+
export { AcApSysVarCmd };
|
|
94
|
+
//# sourceMappingURL=AcApSysVarCmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApSysVarCmd.js","sourceRoot":"","sources":["../../src/command/AcApSysVarCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAEzD,OAAO,EAAe,cAAc,EAAE,MAAM,QAAQ,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAA;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAElC;;;GAGG;AACH;IAAmC,iCAAW;IAA9C;;IAgBA,CAAC;IAfC;;;;OAIG;IACG,+BAAO,GAAb,UAAc,QAAqB;;;;;;wBAC3B,MAAM,GAAG,IAAI,uBAAuB,CAAC,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAA;wBAC3E,uBAAuB,CAAA;wBACT,qBAAM,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,EAAA;;wBAA9D,KAAK,GAAG,SAAsD;wBAC9D,aAAa,GAAG,iBAAiB,CAAC,QAAQ,EAAE,CAAA;wBAC5C,MAAM,GAAG,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;wBAC3D,IAAI,MAAM,EAAE,CAAC;4BACX,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,CAAA;wBAC9C,CAAC;;;;;KACF;IACH,oBAAC;AAAD,CAAC,AAhBD,CAAmC,WAAW,GAgB7C"}
|
|
@@ -1,41 +1,5 @@
|
|
|
1
1
|
import { AcApContext } from '../app';
|
|
2
2
|
import { AcEdCommand } from '../command';
|
|
3
|
-
import { AcEdBaseView, AcEdJig } from '../editor';
|
|
4
|
-
/**
|
|
5
|
-
* Jig for handling zoom-to-box selection interaction.
|
|
6
|
-
*
|
|
7
|
-
* This jig handles the user interaction for selecting a rectangular
|
|
8
|
-
* area to zoom to. It extends {@link AcEdJig} to provide interactive
|
|
9
|
-
* selection capabilities.
|
|
10
|
-
*
|
|
11
|
-
* The jig allows users to:
|
|
12
|
-
* - Select a rectangular area on the drawing
|
|
13
|
-
* - Zoom the view to fit the selected area
|
|
14
|
-
* - Provide visual feedback during selection
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```typescript
|
|
18
|
-
* const jig = new AcApZoomToBoxJig(view);
|
|
19
|
-
* await jig.drag(); // User selects area to zoom to
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
export declare class AcApZoomToBoxJig extends AcEdJig<boolean> {
|
|
23
|
-
/**
|
|
24
|
-
* Creates a new zoom-to-box jig.
|
|
25
|
-
*
|
|
26
|
-
* @param view - The view that will be zoomed
|
|
27
|
-
*/
|
|
28
|
-
constructor(view: AcEdBaseView);
|
|
29
|
-
/**
|
|
30
|
-
* Handles the selection sampling and zooming operation.
|
|
31
|
-
*
|
|
32
|
-
* This method gets the user's selection box and applies
|
|
33
|
-
* the zoom operation to fit that area in the view.
|
|
34
|
-
*
|
|
35
|
-
* @returns Promise that resolves when the zoom operation completes
|
|
36
|
-
*/
|
|
37
|
-
sampler(): Promise<void>;
|
|
38
|
-
}
|
|
39
3
|
/**
|
|
40
4
|
* Command for zooming to a user-selected rectangular area.
|
|
41
5
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApZoomToBoxCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApZoomToBoxCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"AcApZoomToBoxCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApZoomToBoxCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAkB,MAAM,QAAQ,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAExC;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C;;;;;;;;OAQG;IACG,OAAO,CAAC,OAAO,EAAE,WAAW;CAInC"}
|
|
@@ -51,61 +51,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
51
51
|
};
|
|
52
52
|
import { AcApDocManager } from '../app';
|
|
53
53
|
import { AcEdCommand } from '../command';
|
|
54
|
-
import { AcEdJig } from '../editor';
|
|
55
|
-
/**
|
|
56
|
-
* Jig for handling zoom-to-box selection interaction.
|
|
57
|
-
*
|
|
58
|
-
* This jig handles the user interaction for selecting a rectangular
|
|
59
|
-
* area to zoom to. It extends {@link AcEdJig} to provide interactive
|
|
60
|
-
* selection capabilities.
|
|
61
|
-
*
|
|
62
|
-
* The jig allows users to:
|
|
63
|
-
* - Select a rectangular area on the drawing
|
|
64
|
-
* - Zoom the view to fit the selected area
|
|
65
|
-
* - Provide visual feedback during selection
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
* ```typescript
|
|
69
|
-
* const jig = new AcApZoomToBoxJig(view);
|
|
70
|
-
* await jig.drag(); // User selects area to zoom to
|
|
71
|
-
* ```
|
|
72
|
-
*/
|
|
73
|
-
var AcApZoomToBoxJig = /** @class */ (function (_super) {
|
|
74
|
-
__extends(AcApZoomToBoxJig, _super);
|
|
75
|
-
/**
|
|
76
|
-
* Creates a new zoom-to-box jig.
|
|
77
|
-
*
|
|
78
|
-
* @param view - The view that will be zoomed
|
|
79
|
-
*/
|
|
80
|
-
function AcApZoomToBoxJig(view) {
|
|
81
|
-
return _super.call(this, view) || this;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Handles the selection sampling and zooming operation.
|
|
85
|
-
*
|
|
86
|
-
* This method gets the user's selection box and applies
|
|
87
|
-
* the zoom operation to fit that area in the view.
|
|
88
|
-
*
|
|
89
|
-
* @returns Promise that resolves when the zoom operation completes
|
|
90
|
-
*/
|
|
91
|
-
AcApZoomToBoxJig.prototype.sampler = function () {
|
|
92
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
93
|
-
var _this = this;
|
|
94
|
-
return __generator(this, function (_a) {
|
|
95
|
-
switch (_a.label) {
|
|
96
|
-
case 0: return [4 /*yield*/, AcApDocManager.instance.editor.getSelection().then(function (box) {
|
|
97
|
-
return _this.view.zoomTo(box, 1);
|
|
98
|
-
})];
|
|
99
|
-
case 1:
|
|
100
|
-
_a.sent();
|
|
101
|
-
return [2 /*return*/];
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
};
|
|
106
|
-
return AcApZoomToBoxJig;
|
|
107
|
-
}(AcEdJig));
|
|
108
|
-
export { AcApZoomToBoxJig };
|
|
109
54
|
/**
|
|
110
55
|
* Command for zooming to a user-selected rectangular area.
|
|
111
56
|
*
|
|
@@ -139,15 +84,13 @@ var AcApZoomToBoxCmd = /** @class */ (function (_super) {
|
|
|
139
84
|
*/
|
|
140
85
|
AcApZoomToBoxCmd.prototype.execute = function (context) {
|
|
141
86
|
return __awaiter(this, void 0, void 0, function () {
|
|
142
|
-
var
|
|
87
|
+
var box;
|
|
143
88
|
return __generator(this, function (_a) {
|
|
144
89
|
switch (_a.label) {
|
|
145
|
-
case 0:
|
|
146
|
-
jig = new AcApZoomToBoxJig(context.view);
|
|
147
|
-
return [4 /*yield*/, jig.drag()];
|
|
90
|
+
case 0: return [4 /*yield*/, AcApDocManager.instance.editor.getSelection()];
|
|
148
91
|
case 1:
|
|
149
|
-
_a.sent();
|
|
150
|
-
return [2 /*return
|
|
92
|
+
box = _a.sent();
|
|
93
|
+
return [2 /*return*/, context.view.zoomTo(box, 1)];
|
|
151
94
|
}
|
|
152
95
|
});
|
|
153
96
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApZoomToBoxCmd.js","sourceRoot":"","sources":["../../src/command/AcApZoomToBoxCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"AcApZoomToBoxCmd.js","sourceRoot":"","sources":["../../src/command/AcApZoomToBoxCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAe,cAAc,EAAE,MAAM,QAAQ,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAExC;;;;;;;;;;;;;;;;GAgBG;AACH;IAAsC,oCAAW;IAAjD;;IAcA,CAAC;IAbC;;;;;;;;OAQG;IACG,kCAAO,GAAb,UAAc,OAAoB;;;;;4BACpB,qBAAM,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,YAAY,EAAE,EAAA;;wBAAzD,GAAG,GAAG,SAAmD;wBAC/D,sBAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,EAAA;;;;KACnC;IACH,uBAAC;AAAD,CAAC,AAdD,CAAsC,WAAW,GAchD"}
|
package/lib/command/index.d.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
export * from '../editor/command/AcEdCommand';
|
|
2
2
|
export * from '../editor/command/AcEdCommandStack';
|
|
3
|
+
export * from './AcApCircleCmd';
|
|
3
4
|
export * from './AcApConvertToSvgCmd';
|
|
5
|
+
export * from './AcApDimCmd';
|
|
6
|
+
export * from './AcApLogCmd';
|
|
4
7
|
export * from './AcApOpenCmd';
|
|
5
8
|
export * from './AcApQNewCmd';
|
|
6
9
|
export * from './AcApRegenCmd';
|
|
7
10
|
export * from './AcApSelectCmd';
|
|
11
|
+
export * from './AcApSysVarCmd';
|
|
8
12
|
export * from './AcApZoomCmd';
|
|
9
13
|
export * from './AcApZoomToBoxCmd';
|
|
10
14
|
export * from './AcApPanCmd';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/command/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,oCAAoC,CAAA;AAClD,cAAc,uBAAuB,CAAA;AACrC,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/command/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,oCAAoC,CAAA;AAClD,cAAc,iBAAiB,CAAA;AAC/B,cAAc,uBAAuB,CAAA;AACrC,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA"}
|
package/lib/command/index.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
export * from '../editor/command/AcEdCommand';
|
|
2
2
|
export * from '../editor/command/AcEdCommandStack';
|
|
3
|
+
export * from './AcApCircleCmd';
|
|
3
4
|
export * from './AcApConvertToSvgCmd';
|
|
5
|
+
export * from './AcApDimCmd';
|
|
6
|
+
export * from './AcApLogCmd';
|
|
4
7
|
export * from './AcApOpenCmd';
|
|
5
8
|
export * from './AcApQNewCmd';
|
|
6
9
|
export * from './AcApRegenCmd';
|
|
7
10
|
export * from './AcApSelectCmd';
|
|
11
|
+
export * from './AcApSysVarCmd';
|
|
8
12
|
export * from './AcApZoomCmd';
|
|
9
13
|
export * from './AcApZoomToBoxCmd';
|
|
10
14
|
export * from './AcApPanCmd';
|
package/lib/command/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/command/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,oCAAoC,CAAA;AAClD,cAAc,uBAAuB,CAAA;AACrC,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/command/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,oCAAoC,CAAA;AAClD,cAAc,iBAAiB,CAAA;AAC/B,cAAc,uBAAuB,CAAA;AACrC,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AcEdCommand } from './AcEdCommand';
|
|
2
|
-
import { AcEdCommandIterator } from './AcEdCommandIterator';
|
|
2
|
+
import { AcEdCommandIterator, AcEdCommandIteratorItem } from './AcEdCommandIterator';
|
|
3
3
|
/**
|
|
4
4
|
* Interface representing a command group in the command stack.
|
|
5
5
|
* Groups commands by name and provides maps for both global and local command lookups.
|
|
@@ -75,6 +75,24 @@ export declare class AcEdCommandStack {
|
|
|
75
75
|
* stack.
|
|
76
76
|
*/
|
|
77
77
|
iterator(): AcEdCommandIterator;
|
|
78
|
+
/**
|
|
79
|
+
* Fuzzy search for commands by prefix using the command iterator.
|
|
80
|
+
*
|
|
81
|
+
* This method iterates through all commands in all command groups and returns those
|
|
82
|
+
* whose global or local names start with the provided prefix. The search is case-insensitive.
|
|
83
|
+
*
|
|
84
|
+
* @param prefix - The prefix string to search for. Case-insensitive.
|
|
85
|
+
* @returns An array of objects containing matched commands and their corresponding group names.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```typescript
|
|
89
|
+
* const matches = commandStack.searchCommandsByPrefix('LI');
|
|
90
|
+
* matches.forEach(item => {
|
|
91
|
+
* console.log(item.groupName, item.command.globalName);
|
|
92
|
+
* });
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
searchCommandsByPrefix(prefix: string): AcEdCommandIteratorItem[];
|
|
78
96
|
/**
|
|
79
97
|
* Search through all of the global and untranslated names in all of the command groups in the command
|
|
80
98
|
* stack starting at the top of the stack trying to find a match with cmdName. If a match is found, the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcEdCommandStack.d.ts","sourceRoot":"","sources":["../../../src/editor/command/AcEdCommandStack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,
|
|
1
|
+
{"version":3,"file":"AcEdCommandStack.d.ts","sourceRoot":"","sources":["../../../src/editor/command/AcEdCommandStack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACxB,MAAM,uBAAuB,CAAA;AAE9B;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,oCAAoC;IACpC,SAAS,EAAE,MAAM,CAAA;IACjB,oDAAoD;IACpD,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;IAC9C,mDAAmD;IACnD,mBAAmB,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;CAC9C;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,gBAAgB;IAC3B,2CAA2C;IAC3C,MAAM,CAAC,0BAA0B,SAAS;IAC1C,iDAAiD;IACjD,MAAM,CAAC,yBAAyB,SAAS;IAEzC,+CAA+C;IAC/C,OAAO,CAAC,gBAAgB,CAAoB;IAC5C,4CAA4C;IAC5C,OAAO,CAAC,mBAAmB,CAAkB;IAC7C,kDAAkD;IAClD,OAAO,CAAC,oBAAoB,CAAkB;IAC9C,8CAA8C;IAC9C,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAkB;IAE3C;;;OAGG;IACH,OAAO;IAgBP;;;;;OAKG;IACH,MAAM,KAAK,QAAQ,qBAKlB;IAED;;;;;;;;;;;;;;OAcG;IACH,UAAU,CACR,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,WAAW;IA+ClB;;;;;;OAMG;IACH,QAAQ;IAIR;;;;;;;;;;;;;;;;OAgBG;IACH,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,uBAAuB,EAAE;IAoBjE;;;;;;;;;OASG;IACH,eAAe,CAAC,OAAO,EAAE,MAAM;IAU/B;;;;;;;;;OASG;IACH,cAAc,CAAC,OAAO,EAAE,MAAM;IAU9B;;;;;;;;;OASG;IACH,SAAS,CAAC,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM;IAWrD;;;;;;OAMG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM;CAa9B"}
|
|
@@ -76,6 +76,9 @@ var AcEdCommandStack = /** @class */ (function () {
|
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
78
|
AcEdCommandStack.prototype.addCommand = function (cmdGroupName, cmdGlobalName, cmdLocalName, cmd) {
|
|
79
|
+
cmdGroupName = cmdGroupName.toUpperCase();
|
|
80
|
+
cmdGlobalName = cmdGlobalName.toUpperCase();
|
|
81
|
+
cmdLocalName = cmdLocalName.toUpperCase();
|
|
79
82
|
if (!cmdGlobalName) {
|
|
80
83
|
throw new Error('[AcEdCommandStack] The global name of the command is required!');
|
|
81
84
|
}
|
|
@@ -117,6 +120,38 @@ var AcEdCommandStack = /** @class */ (function () {
|
|
|
117
120
|
AcEdCommandStack.prototype.iterator = function () {
|
|
118
121
|
return new AcEdCommandIterator(this._commandsByGroup);
|
|
119
122
|
};
|
|
123
|
+
/**
|
|
124
|
+
* Fuzzy search for commands by prefix using the command iterator.
|
|
125
|
+
*
|
|
126
|
+
* This method iterates through all commands in all command groups and returns those
|
|
127
|
+
* whose global or local names start with the provided prefix. The search is case-insensitive.
|
|
128
|
+
*
|
|
129
|
+
* @param prefix - The prefix string to search for. Case-insensitive.
|
|
130
|
+
* @returns An array of objects containing matched commands and their corresponding group names.
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* ```typescript
|
|
134
|
+
* const matches = commandStack.searchCommandsByPrefix('LI');
|
|
135
|
+
* matches.forEach(item => {
|
|
136
|
+
* console.log(item.groupName, item.command.globalName);
|
|
137
|
+
* });
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
AcEdCommandStack.prototype.searchCommandsByPrefix = function (prefix) {
|
|
141
|
+
prefix = prefix.toUpperCase();
|
|
142
|
+
var results = [];
|
|
143
|
+
var iter = this.iterator();
|
|
144
|
+
var item = iter.next();
|
|
145
|
+
while (!item.done) {
|
|
146
|
+
var command = item.value.command;
|
|
147
|
+
if (command.globalName.startsWith(prefix) ||
|
|
148
|
+
command.localName.startsWith(prefix)) {
|
|
149
|
+
results.push(item.value);
|
|
150
|
+
}
|
|
151
|
+
item = iter.next();
|
|
152
|
+
}
|
|
153
|
+
return results;
|
|
154
|
+
};
|
|
120
155
|
/**
|
|
121
156
|
* Search through all of the global and untranslated names in all of the command groups in the command
|
|
122
157
|
* stack starting at the top of the stack trying to find a match with cmdName. If a match is found, the
|
|
@@ -129,6 +164,7 @@ var AcEdCommandStack = /** @class */ (function () {
|
|
|
129
164
|
*/
|
|
130
165
|
AcEdCommandStack.prototype.lookupGlobalCmd = function (cmdName) {
|
|
131
166
|
var e_1, _a;
|
|
167
|
+
cmdName = cmdName.toUpperCase();
|
|
132
168
|
var result = undefined;
|
|
133
169
|
try {
|
|
134
170
|
for (var _b = __values(this._commandsByGroup), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
@@ -159,6 +195,7 @@ var AcEdCommandStack = /** @class */ (function () {
|
|
|
159
195
|
*/
|
|
160
196
|
AcEdCommandStack.prototype.lookupLocalCmd = function (cmdName) {
|
|
161
197
|
var e_2, _a;
|
|
198
|
+
cmdName = cmdName.toUpperCase();
|
|
162
199
|
var result = undefined;
|
|
163
200
|
try {
|
|
164
201
|
for (var _b = __values(this._commandsByGroup), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
@@ -189,6 +226,8 @@ var AcEdCommandStack = /** @class */ (function () {
|
|
|
189
226
|
*/
|
|
190
227
|
AcEdCommandStack.prototype.removeCmd = function (cmdGroupName, cmdGlobalName) {
|
|
191
228
|
var e_3, _a;
|
|
229
|
+
cmdGroupName = cmdGroupName.toUpperCase();
|
|
230
|
+
cmdGlobalName = cmdGlobalName.toUpperCase();
|
|
192
231
|
try {
|
|
193
232
|
for (var _b = __values(this._commandsByGroup), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
194
233
|
var group = _c.value;
|
|
@@ -214,6 +253,7 @@ var AcEdCommandStack = /** @class */ (function () {
|
|
|
214
253
|
* @returns Return true if successful. Return false if no command group is found with the name `GroupName`.
|
|
215
254
|
*/
|
|
216
255
|
AcEdCommandStack.prototype.removeGroup = function (groupName) {
|
|
256
|
+
groupName = groupName.toUpperCase();
|
|
217
257
|
var tmp = -1;
|
|
218
258
|
this._commandsByGroup.some(function (group, index) {
|
|
219
259
|
tmp = index;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcEdCommandStack.js","sourceRoot":"","sources":["../../../src/editor/command/AcEdCommandStack.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"AcEdCommandStack.js","sourceRoot":"","sources":["../../../src/editor/command/AcEdCommandStack.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,EACL,mBAAmB,EAEpB,MAAM,uBAAuB,CAAA;AAe9B;;;;;;;;;;;;;GAaG;AACH;IAeE;;;OAGG;IACH;QACE,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAA;QAC1B,IAAI,CAAC,mBAAmB,GAAG;YACzB,SAAS,EAAE,gBAAgB,CAAC,0BAA0B;YACtD,oBAAoB,EAAE,IAAI,GAAG,EAAE;YAC/B,mBAAmB,EAAE,IAAI,GAAG,EAAE;SAC/B,CAAA;QACD,IAAI,CAAC,oBAAoB,GAAG;YAC1B,SAAS,EAAE,gBAAgB,CAAC,yBAAyB;YACrD,oBAAoB,EAAE,IAAI,GAAG,EAAE;YAC/B,mBAAmB,EAAE,IAAI,GAAG,EAAE;SAC/B,CAAA;QACD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAA;QACpD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAA;IACvD,CAAC;IAQD,sBAAW,4BAAQ;QANnB;;;;;WAKG;aACH;YACE,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC;gBAChC,gBAAgB,CAAC,SAAS,GAAG,IAAI,gBAAgB,EAAE,CAAA;YACrD,CAAC;YACD,OAAO,gBAAgB,CAAC,SAAS,CAAA;QACnC,CAAC;;;OAAA;IAED;;;;;;;;;;;;;;OAcG;IACH,qCAAU,GAAV,UACE,YAAoB,EACpB,aAAqB,EACrB,YAAoB,EACpB,GAAgB;QAEhB,YAAY,GAAG,YAAY,CAAC,WAAW,EAAE,CAAA;QACzC,aAAa,GAAG,aAAa,CAAC,WAAW,EAAE,CAAA;QAC3C,YAAY,GAAG,YAAY,C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,IAAI,CAAA;QACb,CAAC;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAjPD,2CAA2C;IACpC,2CAA0B,GAAG,MAAM,CAAA;IAC1C,iDAAiD;IAC1C,0CAAyB,GAAG,MAAM,CAAA;IA+O3C,uBAAC;CAAA,AAnPD,IAmPC;SAnPY,gBAAgB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AcEdBaseView } from '../view';
|
|
1
2
|
/**
|
|
2
3
|
* Enumeration of cursor types available in the CAD editor.
|
|
3
4
|
*
|
|
@@ -58,47 +59,30 @@ export declare enum AcEdCorsorType {
|
|
|
58
59
|
*
|
|
59
60
|
* The cursor manager maintains a cache of cursor definitions to avoid
|
|
60
61
|
* recreating them repeatedly, improving performance.
|
|
61
|
-
*
|
|
62
|
-
* @internal This class is for internal use by the editor system
|
|
63
|
-
*
|
|
64
|
-
* @example
|
|
65
|
-
* ```typescript
|
|
66
|
-
* const cursorManager = new AcEdCursorManager();
|
|
67
|
-
* const canvas = document.getElementById('canvas') as HTMLCanvasElement;
|
|
68
|
-
*
|
|
69
|
-
* // Set crosshair cursor
|
|
70
|
-
* cursorManager.setCursor(AcEdCorsorType.Crosshair, canvas);
|
|
71
|
-
*
|
|
72
|
-
* // Set grab cursor for panning
|
|
73
|
-
* cursorManager.setCursor(AcEdCorsorType.Grab, canvas);
|
|
74
|
-
* ```
|
|
75
62
|
*/
|
|
76
63
|
export declare class AcEdCursorManager {
|
|
64
|
+
/** The view associated with the cursor manager */
|
|
65
|
+
private _view;
|
|
66
|
+
/** The current curos type in the associated view */
|
|
67
|
+
private _currentCursor;
|
|
77
68
|
/** Cache of cursor definitions mapped by cursor type */
|
|
78
69
|
private _cursorMap;
|
|
79
70
|
/**
|
|
80
71
|
* Creates a new cursor manager instance.
|
|
81
|
-
*
|
|
82
|
-
*
|
|
72
|
+
* Initializes the cursor and creates default cursor definitions.
|
|
73
|
+
* @param view - The view associated with the cursor manager
|
|
83
74
|
*/
|
|
84
|
-
constructor();
|
|
75
|
+
constructor(view: AcEdBaseView);
|
|
85
76
|
/**
|
|
86
|
-
*
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
*
|
|
77
|
+
* The current cursor type for the associated view.
|
|
78
|
+
*/
|
|
79
|
+
get currentCursor(): AcEdCorsorType;
|
|
80
|
+
/**
|
|
81
|
+
* Sets the current cursor for the associated view.
|
|
91
82
|
*
|
|
92
83
|
* @param cursorType - The type of cursor to set
|
|
93
|
-
* @param element - The HTML element to apply the cursor to
|
|
94
|
-
*
|
|
95
|
-
* @example
|
|
96
|
-
* ```typescript
|
|
97
|
-
* const canvas = document.getElementById('canvas') as HTMLCanvasElement;
|
|
98
|
-
* cursorManager.setCursor(AcEdCorsorType.Crosshair, canvas);
|
|
99
|
-
* ```
|
|
100
84
|
*/
|
|
101
|
-
setCursor(cursorType: AcEdCorsorType
|
|
85
|
+
setCursor(cursorType: AcEdCorsorType): void;
|
|
102
86
|
/**
|
|
103
87
|
* Encodes an SVG string into a CSS cursor URL.
|
|
104
88
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcEdCursorManager.d.ts","sourceRoot":"","sources":["../../../src/editor/input/AcEdCursorManager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AcEdCursorManager.d.ts","sourceRoot":"","sources":["../../../src/editor/input/AcEdCursorManager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAEtC;;;;;;;;;;;;;;;;;;GAkBG;AACH,oBAAY,cAAc;IACxB,+CAA+C;IAC/C,eAAe,KAAK;IACpB,mDAAmD;IACnD,SAAS,IAAI;IACb,0CAA0C;IAC1C,UAAU,IAAA;IACV,6CAA6C;IAC7C,UAAU,IAAA;IACV,yBAAyB;IACzB,UAAU,IAAA;IACV,4CAA4C;IAC5C,SAAS,IAAA;IACT,+BAA+B;IAC/B,gBAAgB,IAAA;IAChB,8CAA8C;IAC9C,iBAAiB,IAAA;IACjB,yCAAyC;IACzC,SAAS,IAAA;IACT,8BAA8B;IAC9B,YAAY,IAAA;IACZ,iDAAiD;IACjD,aAAa,IAAA;IACb,+CAA+C;IAC/C,mBAAmB,KAAA;IACnB,gDAAgD;IAChD,cAAc,KAAA;IACd,8BAA8B;IAC9B,eAAe,KAAA;IACf,mCAAmC;IACnC,IAAI,KAAA;CACL;AAED;;;;;;;;;GASG;AACH,qBAAa,iBAAiB;IAC5B,kDAAkD;IAClD,OAAO,CAAC,KAAK,CAAc;IAE3B,oDAAoD;IACpD,OAAO,CAAC,cAAc,CAAiB;IAEvC,wDAAwD;IACxD,OAAO,CAAC,UAAU,CAA6B;IAE/C;;;;OAIG;gBACS,IAAI,EAAE,YAAY;IAuB9B;;OAEG;IACH,IAAI,aAAa,mBAEhB;IAED;;;;OAIG;IACH,SAAS,CAAC,UAAU,EAAE,cAAc;IAepC;;;;;;;;;;;;;;;;;OAiBG;IACH,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAIrE;;;;;;OAMG;IACH,OAAO,CAAC,mBAAmB;CAsB5B"}
|