@mlightcad/cad-simple-viewer 1.5.5 → 1.5.7
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/LICENSE +1 -1
- package/README.md +69 -1
- package/dist/{index.js → cad-simple-viewer.js} +34247 -29923
- package/dist/cad-simple-viewer.umd.cjs +913 -0
- package/dist/dxf-parser-worker.js +2091 -0
- package/dist/libredwg-parser-worker.js +5388 -5122
- package/dist/mtext-renderer-worker.js +3061 -2858
- package/lib/app/AcApContext.d.ts.map +1 -1
- package/lib/app/AcApContext.js +15 -2
- package/lib/app/AcApContext.js.map +1 -1
- package/lib/app/AcApDocManager.d.ts +63 -0
- package/lib/app/AcApDocManager.d.ts.map +1 -1
- package/lib/app/AcApDocManager.js +195 -23
- package/lib/app/AcApDocManager.js.map +1 -1
- package/lib/app/AcApDocument.d.ts +81 -0
- package/lib/app/AcApDocument.d.ts.map +1 -1
- package/lib/app/AcApDocument.js +154 -0
- package/lib/app/AcApDocument.js.map +1 -1
- package/lib/app/AcApLayerSessionState.d.ts +15 -0
- package/lib/app/AcApLayerSessionState.d.ts.map +1 -0
- package/lib/app/AcApLayerSessionState.js +2 -0
- package/lib/app/AcApLayerSessionState.js.map +1 -0
- package/lib/app/AcApOpenFileDialog.d.ts +35 -0
- package/lib/app/AcApOpenFileDialog.d.ts.map +1 -0
- package/lib/app/AcApOpenFileDialog.js +192 -0
- package/lib/app/AcApOpenFileDialog.js.map +1 -0
- package/lib/app/AcApWebworkerReadiness.d.ts +18 -0
- package/lib/app/AcApWebworkerReadiness.d.ts.map +1 -0
- package/lib/app/AcApWebworkerReadiness.js +126 -0
- package/lib/app/AcApWebworkerReadiness.js.map +1 -0
- package/lib/app/AcDbOpenDatabaseOptions.d.ts +29 -0
- package/lib/app/AcDbOpenDatabaseOptions.d.ts.map +1 -1
- package/lib/app/AcDbOpenDatabaseOptions.js +10 -1
- package/lib/app/AcDbOpenDatabaseOptions.js.map +1 -1
- package/lib/app/index.d.ts +4 -0
- package/lib/app/index.d.ts.map +1 -1
- package/lib/app/index.js +3 -0
- package/lib/app/index.js.map +1 -1
- package/lib/command/AcApCacheFontCmd.d.ts +25 -0
- package/lib/command/AcApCacheFontCmd.d.ts.map +1 -0
- package/lib/command/AcApCacheFontCmd.js +142 -0
- package/lib/command/AcApCacheFontCmd.js.map +1 -0
- package/lib/command/AcApOpenCmd.d.ts +3 -22
- package/lib/command/AcApOpenCmd.d.ts.map +1 -1
- package/lib/command/AcApOpenCmd.js +3 -22
- package/lib/command/AcApOpenCmd.js.map +1 -1
- package/lib/command/AcApRedoCmd.d.ts +10 -0
- package/lib/command/AcApRedoCmd.d.ts.map +1 -0
- package/lib/command/AcApRedoCmd.js +85 -0
- package/lib/command/AcApRedoCmd.js.map +1 -0
- package/lib/command/AcApSysVarCmd.d.ts.map +1 -1
- package/lib/command/AcApSysVarCmd.js +5 -11
- package/lib/command/AcApSysVarCmd.js.map +1 -1
- package/lib/command/AcApUndoCmd.d.ts +10 -0
- package/lib/command/AcApUndoCmd.d.ts.map +1 -0
- package/lib/command/AcApUndoCmd.js +85 -0
- package/lib/command/AcApUndoCmd.js.map +1 -0
- package/lib/command/convert/AcApPngConvertor.d.ts +1 -1
- package/lib/command/convert/AcApPngConvertor.d.ts.map +1 -1
- package/lib/command/convert/AcApPngConvertor.js +5 -2
- package/lib/command/convert/AcApPngConvertor.js.map +1 -1
- package/lib/command/draw/AcApArcCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApArcCmd.js +2 -5
- package/lib/command/draw/AcApArcCmd.js.map +1 -1
- package/lib/command/draw/AcApEllipseCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApEllipseCmd.js +14 -9
- package/lib/command/draw/AcApEllipseCmd.js.map +1 -1
- package/lib/command/draw/AcApHatchCmd.d.ts +1 -1
- package/lib/command/draw/AcApLineCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApLineCmd.js +8 -2
- package/lib/command/draw/AcApLineCmd.js.map +1 -1
- package/lib/command/draw/AcApMLineCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApMLineCmd.js +4 -2
- package/lib/command/draw/AcApMLineCmd.js.map +1 -1
- package/lib/command/draw/AcApPolygonCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApPolygonCmd.js +2 -5
- package/lib/command/draw/AcApPolygonCmd.js.map +1 -1
- package/lib/command/draw/AcApPolylineCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApPolylineCmd.js +3 -0
- package/lib/command/draw/AcApPolylineCmd.js.map +1 -1
- package/lib/command/draw/AcApRectCmd.d.ts +6 -0
- package/lib/command/draw/AcApRectCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApRectCmd.js +12 -10
- package/lib/command/draw/AcApRectCmd.js.map +1 -1
- package/lib/command/draw/AcApSplineCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApSplineCmd.js +2 -0
- package/lib/command/draw/AcApSplineCmd.js.map +1 -1
- package/lib/command/draw/AcApXLineCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApXLineCmd.js +1 -1
- package/lib/command/draw/AcApXLineCmd.js.map +1 -1
- package/lib/command/index.d.ts +3 -0
- package/lib/command/index.d.ts.map +1 -1
- package/lib/command/index.js +3 -0
- package/lib/command/index.js.map +1 -1
- package/lib/command/layer/AcApLayerCmd.d.ts +3 -194
- package/lib/command/layer/AcApLayerCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerCmd.js +64 -398
- package/lib/command/layer/AcApLayerCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerCurCmd.d.ts +2 -34
- package/lib/command/layer/AcApLayerCurCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerCurCmd.js +18 -77
- package/lib/command/layer/AcApLayerCurCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerDelCmd.d.ts +2 -32
- package/lib/command/layer/AcApLayerDelCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerDelCmd.js +26 -169
- package/lib/command/layer/AcApLayerDelCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerFreezeCmd.d.ts +2 -16
- package/lib/command/layer/AcApLayerFreezeCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerFreezeCmd.js +32 -54
- package/lib/command/layer/AcApLayerFreezeCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerIsoCmd.d.ts +2 -31
- package/lib/command/layer/AcApLayerIsoCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerIsoCmd.js +19 -198
- package/lib/command/layer/AcApLayerIsoCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerLockCmd.d.ts +2 -40
- package/lib/command/layer/AcApLayerLockCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerLockCmd.js +18 -65
- package/lib/command/layer/AcApLayerLockCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerMutationCmd.d.ts +13 -0
- package/lib/command/layer/AcApLayerMutationCmd.d.ts.map +1 -0
- package/lib/command/layer/AcApLayerMutationCmd.js +42 -0
- package/lib/command/layer/AcApLayerMutationCmd.js.map +1 -0
- package/lib/command/layer/AcApLayerOffCmd.d.ts +2 -9
- package/lib/command/layer/AcApLayerOffCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerOffCmd.js +32 -43
- package/lib/command/layer/AcApLayerOffCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerOnCmd.d.ts +2 -22
- package/lib/command/layer/AcApLayerOnCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerOnCmd.js +8 -62
- package/lib/command/layer/AcApLayerOnCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerPCmd.d.ts +2 -75
- package/lib/command/layer/AcApLayerPCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerPCmd.js +6 -165
- package/lib/command/layer/AcApLayerPCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerThawCmd.d.ts +2 -29
- package/lib/command/layer/AcApLayerThawCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerThawCmd.js +8 -74
- package/lib/command/layer/AcApLayerThawCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerUnisoCmd.d.ts +2 -44
- package/lib/command/layer/AcApLayerUnisoCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerUnisoCmd.js +10 -122
- package/lib/command/layer/AcApLayerUnisoCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerUnlockCmd.d.ts +2 -40
- package/lib/command/layer/AcApLayerUnlockCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerUnlockCmd.js +18 -65
- package/lib/command/layer/AcApLayerUnlockCmd.js.map +1 -1
- package/lib/command/modify/AcApCopyCmd.d.ts +12 -0
- package/lib/command/modify/AcApCopyCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApCopyCmd.js +67 -177
- package/lib/command/modify/AcApCopyCmd.js.map +1 -1
- package/lib/command/modify/AcApCopyPreviewJig.d.ts +21 -0
- package/lib/command/modify/AcApCopyPreviewJig.d.ts.map +1 -0
- package/lib/command/modify/AcApCopyPreviewJig.js +61 -0
- package/lib/command/modify/AcApCopyPreviewJig.js.map +1 -0
- package/lib/command/modify/AcApEraseCmd.d.ts +0 -6
- package/lib/command/modify/AcApEraseCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApEraseCmd.js +11 -38
- package/lib/command/modify/AcApEraseCmd.js.map +1 -1
- package/lib/command/modify/AcApHideObjectsCmd.d.ts +0 -7
- package/lib/command/modify/AcApHideObjectsCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApHideObjectsCmd.js +1 -8
- package/lib/command/modify/AcApHideObjectsCmd.js.map +1 -1
- package/lib/command/modify/AcApMoveCmd.d.ts +0 -6
- package/lib/command/modify/AcApMoveCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApMoveCmd.js +26 -105
- package/lib/command/modify/AcApMoveCmd.js.map +1 -1
- package/lib/command/modify/AcApMovePreviewJig.d.ts +18 -0
- package/lib/command/modify/AcApMovePreviewJig.d.ts.map +1 -0
- package/lib/command/modify/AcApMovePreviewJig.js +45 -0
- package/lib/command/modify/AcApMovePreviewJig.js.map +1 -0
- package/lib/command/modify/AcApOffsetCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApOffsetCmd.js +14 -37
- package/lib/command/modify/AcApOffsetCmd.js.map +1 -1
- package/lib/command/modify/AcApRotateCmd.d.ts +2 -2
- package/lib/command/modify/AcApRotateCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApRotateCmd.js +38 -204
- package/lib/command/modify/AcApRotateCmd.js.map +1 -1
- package/lib/command/modify/AcApRotatePreviewJig.d.ts +47 -0
- package/lib/command/modify/AcApRotatePreviewJig.d.ts.map +1 -0
- package/lib/command/modify/AcApRotatePreviewJig.js +97 -0
- package/lib/command/modify/AcApRotatePreviewJig.js.map +1 -0
- package/lib/command/modify/AcApUnisolateObjectsCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApUnisolateObjectsCmd.js +3 -3
- package/lib/command/modify/AcApUnisolateObjectsCmd.js.map +1 -1
- package/lib/editor/command/AcEdCommand.d.ts +24 -0
- package/lib/editor/command/AcEdCommand.d.ts.map +1 -1
- package/lib/editor/command/AcEdCommand.js +71 -5
- package/lib/editor/command/AcEdCommand.js.map +1 -1
- package/lib/editor/global/AcEdUiColor.d.ts +13 -13
- package/lib/editor/global/AcEdUiColor.d.ts.map +1 -1
- package/lib/editor/global/AcEdUiColor.js +21 -20
- package/lib/editor/global/AcEdUiColor.js.map +1 -1
- package/lib/editor/global/eventBus.d.ts +16 -2
- package/lib/editor/global/eventBus.d.ts.map +1 -1
- package/lib/editor/global/eventBus.js.map +1 -1
- package/lib/editor/grip/AcEdGripAppearance.d.ts +18 -0
- package/lib/editor/grip/AcEdGripAppearance.d.ts.map +1 -0
- package/lib/editor/grip/AcEdGripAppearance.js +30 -0
- package/lib/editor/grip/AcEdGripAppearance.js.map +1 -0
- package/lib/editor/grip/AcEdGripEditSession.d.ts +29 -0
- package/lib/editor/grip/AcEdGripEditSession.d.ts.map +1 -0
- package/lib/editor/grip/AcEdGripEditSession.js +83 -0
- package/lib/editor/grip/AcEdGripEditSession.js.map +1 -0
- package/lib/editor/grip/AcEdGripHandle.d.ts +21 -0
- package/lib/editor/grip/AcEdGripHandle.d.ts.map +1 -0
- package/lib/editor/grip/AcEdGripHandle.js +62 -0
- package/lib/editor/grip/AcEdGripHandle.js.map +1 -0
- package/lib/editor/grip/AcEdGripManager.d.ts +171 -0
- package/lib/editor/grip/AcEdGripManager.d.ts.map +1 -0
- package/lib/editor/grip/AcEdGripManager.js +376 -0
- package/lib/editor/grip/AcEdGripManager.js.map +1 -0
- package/lib/editor/grip/AcEdGripPolicy.d.ts +6 -0
- package/lib/editor/grip/AcEdGripPolicy.d.ts.map +1 -0
- package/lib/editor/grip/AcEdGripPolicy.js +30 -0
- package/lib/editor/grip/AcEdGripPolicy.js.map +1 -0
- package/lib/editor/grip/AcEdGripPreviewJig.d.ts +21 -0
- package/lib/editor/grip/AcEdGripPreviewJig.d.ts.map +1 -0
- package/lib/editor/grip/AcEdGripPreviewJig.js +73 -0
- package/lib/editor/grip/AcEdGripPreviewJig.js.map +1 -0
- package/lib/editor/grip/index.d.ts +5 -0
- package/lib/editor/grip/index.d.ts.map +1 -0
- package/lib/editor/grip/index.js +5 -0
- package/lib/editor/grip/index.js.map +1 -0
- package/lib/editor/index.d.ts +1 -0
- package/lib/editor/index.d.ts.map +1 -1
- package/lib/editor/index.js +1 -0
- package/lib/editor/index.js.map +1 -1
- package/lib/editor/input/AcEdBatchPreview.d.ts +96 -0
- package/lib/editor/input/AcEdBatchPreview.d.ts.map +1 -0
- package/lib/editor/input/AcEdBatchPreview.js +125 -0
- package/lib/editor/input/AcEdBatchPreview.js.map +1 -0
- package/lib/editor/input/AcEdCursorManager.d.ts.map +1 -1
- package/lib/editor/input/AcEdCursorManager.js +2 -2
- package/lib/editor/input/AcEdCursorManager.js.map +1 -1
- package/lib/editor/input/AcEdOsnapResolver.d.ts +34 -0
- package/lib/editor/input/AcEdOsnapResolver.d.ts.map +1 -0
- package/lib/editor/input/AcEdOsnapResolver.js +117 -0
- package/lib/editor/input/AcEdOsnapResolver.js.map +1 -0
- package/lib/editor/input/AcEdPreviewJig.d.ts +1 -1
- package/lib/editor/input/AcEdPreviewJig.d.ts.map +1 -1
- package/lib/editor/input/AcEdPreviewJig.js +14 -0
- package/lib/editor/input/AcEdPreviewJig.js.map +1 -1
- package/lib/editor/input/AcEdSelectionPreviewJig.d.ts +109 -0
- package/lib/editor/input/AcEdSelectionPreviewJig.d.ts.map +1 -0
- package/lib/editor/input/AcEdSelectionPreviewJig.js +185 -0
- package/lib/editor/input/AcEdSelectionPreviewJig.js.map +1 -0
- package/lib/editor/input/handler/AcEdAngleHandler.d.ts +2 -1
- package/lib/editor/input/handler/AcEdAngleHandler.d.ts.map +1 -1
- package/lib/editor/input/handler/AcEdAngleHandler.js +6 -0
- package/lib/editor/input/handler/AcEdAngleHandler.js.map +1 -1
- package/lib/editor/input/handler/AcEdInputHandler.d.ts +20 -1
- package/lib/editor/input/handler/AcEdInputHandler.d.ts.map +1 -1
- package/lib/editor/input/handler/AcEdKeywordHandler.d.ts +2 -1
- package/lib/editor/input/handler/AcEdKeywordHandler.d.ts.map +1 -1
- package/lib/editor/input/handler/AcEdKeywordHandler.js +3 -0
- package/lib/editor/input/handler/AcEdKeywordHandler.js.map +1 -1
- package/lib/editor/input/handler/AcEdNumericalHandler.d.ts +2 -1
- package/lib/editor/input/handler/AcEdNumericalHandler.d.ts.map +1 -1
- package/lib/editor/input/handler/AcEdNumericalHandler.js +6 -0
- package/lib/editor/input/handler/AcEdNumericalHandler.js.map +1 -1
- package/lib/editor/input/handler/AcEdPointHandler.d.ts +17 -1
- package/lib/editor/input/handler/AcEdPointHandler.d.ts.map +1 -1
- package/lib/editor/input/handler/AcEdPointHandler.js +89 -0
- package/lib/editor/input/handler/AcEdPointHandler.js.map +1 -1
- package/lib/editor/input/handler/AcEdStringHandler.d.ts +2 -1
- package/lib/editor/input/handler/AcEdStringHandler.d.ts.map +1 -1
- package/lib/editor/input/handler/AcEdStringHandler.js +3 -0
- package/lib/editor/input/handler/AcEdStringHandler.js.map +1 -1
- package/lib/editor/input/index.d.ts +3 -0
- package/lib/editor/input/index.d.ts.map +1 -1
- package/lib/editor/input/index.js +3 -0
- package/lib/editor/input/index.js.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts +7 -0
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.js +17 -0
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.js.map +1 -1
- package/lib/editor/input/session/AcEdInputSession.d.ts +11 -1
- package/lib/editor/input/session/AcEdInputSession.d.ts.map +1 -1
- package/lib/editor/input/session/AcEdInputSession.js.map +1 -1
- package/lib/editor/input/session/AcEdPromptInputSession.d.ts +51 -0
- package/lib/editor/input/session/AcEdPromptInputSession.d.ts.map +1 -0
- package/lib/editor/input/session/AcEdPromptInputSession.js +109 -0
- package/lib/editor/input/session/AcEdPromptInputSession.js.map +1 -0
- package/lib/editor/input/session/index.d.ts +1 -0
- package/lib/editor/input/session/index.d.ts.map +1 -1
- package/lib/editor/input/session/index.js +1 -0
- package/lib/editor/input/session/index.js.map +1 -1
- package/lib/editor/input/ui/AcEdCommandLine.d.ts +10 -0
- package/lib/editor/input/ui/AcEdCommandLine.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdCommandLine.js +67 -35
- package/lib/editor/input/ui/AcEdCommandLine.js.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInput.d.ts +0 -11
- package/lib/editor/input/ui/AcEdFloatingInput.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInput.js +9 -119
- package/lib/editor/input/ui/AcEdFloatingInput.js.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputBox.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputBox.js +10 -2
- package/lib/editor/input/ui/AcEdFloatingInputBox.js.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.js +9 -4
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.js.map +1 -1
- package/lib/editor/input/ui/AcEdInputManager.d.ts +26 -23
- package/lib/editor/input/ui/AcEdInputManager.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdInputManager.js +135 -83
- package/lib/editor/input/ui/AcEdInputManager.js.map +1 -1
- package/lib/editor/input/ui/AcEdMTextEditor.js +2 -2
- package/lib/editor/input/ui/AcEdMTextEditor.js.map +1 -1
- package/lib/editor/view/AcEdBaseView.d.ts +44 -2
- package/lib/editor/view/AcEdBaseView.d.ts.map +1 -1
- package/lib/editor/view/AcEdBaseView.js +26 -12
- package/lib/editor/view/AcEdBaseView.js.map +1 -1
- package/lib/editor/view/AcEdSpatialQueryResult.d.ts +28 -0
- package/lib/editor/view/AcEdSpatialQueryResult.d.ts.map +1 -1
- package/lib/editor/view/AcEdSpatialQueryResult.js +65 -1
- package/lib/editor/view/AcEdSpatialQueryResult.js.map +1 -1
- package/lib/i18n/AcApI18n.d.ts +42 -0
- package/lib/i18n/AcApI18n.d.ts.map +1 -1
- package/lib/i18n/AcApI18n.js +56 -4
- package/lib/i18n/AcApI18n.js.map +1 -1
- package/lib/i18n/en/command.d.ts +26 -0
- package/lib/i18n/en/command.d.ts.map +1 -1
- package/lib/i18n/en/command.js +26 -0
- package/lib/i18n/en/command.js.map +1 -1
- package/lib/i18n/en/jig.d.ts +26 -0
- package/lib/i18n/en/jig.d.ts.map +1 -1
- package/lib/i18n/en/jig.js +134 -108
- package/lib/i18n/en/jig.js.map +1 -1
- package/lib/i18n/en/main.d.ts +3 -0
- package/lib/i18n/en/main.d.ts.map +1 -1
- package/lib/i18n/en/main.js +4 -1
- package/lib/i18n/en/main.js.map +1 -1
- package/lib/i18n/zh/command.d.ts +26 -0
- package/lib/i18n/zh/command.d.ts.map +1 -1
- package/lib/i18n/zh/command.js +26 -0
- package/lib/i18n/zh/command.js.map +1 -1
- package/lib/i18n/zh/jig.d.ts +26 -0
- package/lib/i18n/zh/jig.d.ts.map +1 -1
- package/lib/i18n/zh/jig.js +134 -108
- package/lib/i18n/zh/jig.js.map +1 -1
- package/lib/i18n/zh/main.d.ts +3 -0
- package/lib/i18n/zh/main.d.ts.map +1 -1
- package/lib/i18n/zh/main.js +4 -1
- package/lib/i18n/zh/main.js.map +1 -1
- 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/plugin/AcApLazyPluginRegistration.d.ts +3 -8
- package/lib/plugin/AcApLazyPluginRegistration.d.ts.map +1 -1
- package/lib/service/AcApEntitySelection.d.ts +42 -0
- package/lib/service/AcApEntitySelection.d.ts.map +1 -0
- package/lib/service/AcApEntitySelection.js +156 -0
- package/lib/service/AcApEntitySelection.js.map +1 -0
- package/lib/service/AcApEntityService.d.ts +115 -0
- package/lib/service/AcApEntityService.d.ts.map +1 -0
- package/lib/service/AcApEntityService.js +194 -0
- package/lib/service/AcApEntityService.js.map +1 -0
- package/lib/{command/layer → service}/AcApLayerIsoState.d.ts +6 -24
- package/lib/service/AcApLayerIsoState.d.ts.map +1 -0
- package/lib/service/AcApLayerIsoState.js +28 -0
- package/lib/service/AcApLayerIsoState.js.map +1 -0
- package/lib/service/AcApLayerService.d.ts +400 -0
- package/lib/service/AcApLayerService.d.ts.map +1 -0
- package/lib/service/AcApLayerService.js +1240 -0
- package/lib/service/AcApLayerService.js.map +1 -0
- package/lib/service/AcApLayerStore.d.ts +198 -0
- package/lib/service/AcApLayerStore.d.ts.map +1 -0
- package/lib/service/AcApLayerStore.js +335 -0
- package/lib/service/AcApLayerStore.js.map +1 -0
- package/lib/service/AcApServiceEdit.d.ts +18 -0
- package/lib/service/AcApServiceEdit.d.ts.map +1 -0
- package/lib/service/AcApServiceEdit.js +34 -0
- package/lib/service/AcApServiceEdit.js.map +1 -0
- package/lib/service/index.d.ts +16 -0
- package/lib/service/index.d.ts.map +1 -0
- package/lib/service/index.js +16 -0
- package/lib/service/index.js.map +1 -0
- package/lib/service/types.d.ts +116 -0
- package/lib/service/types.d.ts.map +1 -0
- package/lib/service/types.js +5 -0
- package/lib/service/types.js.map +1 -0
- package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.d.ts +22 -7
- package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.d.ts.map +1 -1
- package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.js +58 -12
- package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.js.map +1 -1
- package/lib/spatialIndex/AcTrLinearSpatialIndex.d.ts +2 -2
- package/lib/spatialIndex/AcTrLinearSpatialIndex.d.ts.map +1 -1
- package/lib/spatialIndex/AcTrLinearSpatialIndex.js +9 -3
- package/lib/spatialIndex/AcTrLinearSpatialIndex.js.map +1 -1
- package/lib/spatialIndex/AcTrRBushSpatialIndex.d.ts +2 -2
- package/lib/spatialIndex/AcTrRBushSpatialIndex.d.ts.map +1 -1
- package/lib/spatialIndex/AcTrRBushSpatialIndex.js +19 -5
- package/lib/spatialIndex/AcTrRBushSpatialIndex.js.map +1 -1
- package/lib/spatialIndex/AcTrSpatialIndex.d.ts +10 -1
- package/lib/spatialIndex/AcTrSpatialIndex.d.ts.map +1 -1
- package/lib/spatialIndex/AcTrSpatialIndex.js +7 -1
- package/lib/spatialIndex/AcTrSpatialIndex.js.map +1 -1
- package/lib/util/AcApDatabaseEdit.d.ts +11 -0
- package/lib/util/AcApDatabaseEdit.d.ts.map +1 -0
- package/lib/util/AcApDatabaseEdit.js +20 -0
- package/lib/util/AcApDatabaseEdit.js.map +1 -0
- package/lib/util/AcApFontUtil.d.ts +14 -2
- package/lib/util/AcApFontUtil.d.ts.map +1 -1
- package/lib/util/AcApFontUtil.js +18 -0
- package/lib/util/AcApFontUtil.js.map +1 -1
- package/lib/util/AcApGeTransform.d.ts +10 -0
- package/lib/util/AcApGeTransform.d.ts.map +1 -0
- package/lib/util/AcApGeTransform.js +15 -0
- package/lib/util/AcApGeTransform.js.map +1 -0
- package/lib/util/index.d.ts +2 -0
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +2 -0
- package/lib/util/index.js.map +1 -1
- package/lib/view/AcEdViewKeyHandler.d.ts +32 -0
- package/lib/view/AcEdViewKeyHandler.d.ts.map +1 -0
- package/lib/view/AcEdViewKeyHandler.js +101 -0
- package/lib/view/AcEdViewKeyHandler.js.map +1 -0
- package/lib/view/AcTrEntityDisplayController.d.ts +46 -0
- package/lib/view/AcTrEntityDisplayController.d.ts.map +1 -0
- package/lib/view/AcTrEntityDisplayController.js +114 -0
- package/lib/view/AcTrEntityDisplayController.js.map +1 -0
- package/lib/view/AcTrGroupWcsBboxAssert.d.ts +43 -0
- package/lib/view/AcTrGroupWcsBboxAssert.d.ts.map +1 -0
- package/lib/view/AcTrGroupWcsBboxAssert.js +84 -0
- package/lib/view/AcTrGroupWcsBboxAssert.js.map +1 -0
- package/lib/view/AcTrInheritedLayerMaterialMapper.d.ts +49 -0
- package/lib/view/AcTrInheritedLayerMaterialMapper.d.ts.map +1 -0
- package/lib/view/AcTrInheritedLayerMaterialMapper.js +138 -0
- package/lib/view/AcTrInheritedLayerMaterialMapper.js.map +1 -0
- package/lib/view/AcTrLayer.d.ts +33 -2
- package/lib/view/AcTrLayer.d.ts.map +1 -1
- package/lib/view/AcTrLayer.js +75 -2
- package/lib/view/AcTrLayer.js.map +1 -1
- package/lib/view/AcTrLayerAppearanceController.d.ts +55 -0
- package/lib/view/AcTrLayerAppearanceController.d.ts.map +1 -0
- package/lib/view/AcTrLayerAppearanceController.js +86 -0
- package/lib/view/AcTrLayerAppearanceController.js.map +1 -0
- package/lib/view/AcTrLayout.d.ts +37 -2
- package/lib/view/AcTrLayout.d.ts.map +1 -1
- package/lib/view/AcTrLayout.js +161 -15
- package/lib/view/AcTrLayout.js.map +1 -1
- package/lib/view/AcTrProgressiveOpenFitController.d.ts +64 -0
- package/lib/view/AcTrProgressiveOpenFitController.d.ts.map +1 -0
- package/lib/view/AcTrProgressiveOpenFitController.js +209 -0
- package/lib/view/AcTrProgressiveOpenFitController.js.map +1 -0
- package/lib/view/AcTrScene.d.ts +47 -1
- package/lib/view/AcTrScene.d.ts.map +1 -1
- package/lib/view/AcTrScene.js +78 -3
- package/lib/view/AcTrScene.js.map +1 -1
- package/lib/view/AcTrView2d.d.ts +118 -27
- package/lib/view/AcTrView2d.d.ts.map +1 -1
- package/lib/view/AcTrView2d.js +584 -362
- package/lib/view/AcTrView2d.js.map +1 -1
- package/lib/view/index.d.ts +3 -0
- package/lib/view/index.d.ts.map +1 -1
- package/lib/view/index.js +3 -0
- package/lib/view/index.js.map +1 -1
- package/package.json +13 -11
- package/dist/index.umd.cjs +0 -897
- package/lib/command/layer/AcApLayerIsoState.d.ts.map +0 -1
- package/lib/command/layer/AcApLayerIsoState.js +0 -53
- package/lib/command/layer/AcApLayerIsoState.js.map +0 -1
|
@@ -1,50 +1,12 @@
|
|
|
1
1
|
import { AcApContext } from '../../app';
|
|
2
|
-
import {
|
|
2
|
+
import { AcApLayerMutationCmd } from './AcApLayerMutationCmd';
|
|
3
3
|
/**
|
|
4
4
|
* AutoCAD-like `LAYLCK` command.
|
|
5
|
-
*
|
|
6
|
-
* The command repeatedly asks the user to pick an entity and locks the
|
|
7
|
-
* corresponding layer. It intentionally works by selection instead of layer
|
|
8
|
-
* name entry, matching AutoCAD's `LAYLCK` workflow.
|
|
9
5
|
*/
|
|
10
|
-
export declare class AcApLayerLockCmd extends
|
|
11
|
-
/**
|
|
12
|
-
* Creates a write-enabled `LAYLCK` command instance.
|
|
13
|
-
*/
|
|
6
|
+
export declare class AcApLayerLockCmd extends AcApLayerMutationCmd {
|
|
14
7
|
constructor();
|
|
15
|
-
/**
|
|
16
|
-
* Runs the interactive lock-layer workflow until the user cancels.
|
|
17
|
-
*
|
|
18
|
-
* @param context - Active application context used to read and update the current drawing.
|
|
19
|
-
* @returns Resolves when the command loop ends.
|
|
20
|
-
*/
|
|
21
8
|
execute(context: AcApContext): Promise<void>;
|
|
22
|
-
/**
|
|
23
|
-
* Prompts for one entity whose layer should be locked.
|
|
24
|
-
*
|
|
25
|
-
* @returns Picked entity identifier, or `undefined` when the user cancels.
|
|
26
|
-
*/
|
|
27
9
|
private promptSelection;
|
|
28
|
-
/**
|
|
29
|
-
* Sets or clears the locked bit in `standardFlags`.
|
|
30
|
-
*
|
|
31
|
-
* @param layer - Target layer table record.
|
|
32
|
-
* @param locked - `true` to lock, `false` to unlock.
|
|
33
|
-
*/
|
|
34
|
-
private setLayerLocked;
|
|
35
|
-
/**
|
|
36
|
-
* Resolves the picked entity's layer and locks it when needed.
|
|
37
|
-
*
|
|
38
|
-
* @param context - Active application context containing the current database and view.
|
|
39
|
-
* @param objectId - Identifier of the entity selected by the user.
|
|
40
|
-
*/
|
|
41
10
|
private lockEntityLayer;
|
|
42
|
-
/**
|
|
43
|
-
* Sends a localized status message through the command-line output.
|
|
44
|
-
*
|
|
45
|
-
* @param message - Text to display to the user.
|
|
46
|
-
* @param type - Visual severity mapped to command-line message styles.
|
|
47
|
-
*/
|
|
48
|
-
private notify;
|
|
49
11
|
}
|
|
50
12
|
//# sourceMappingURL=AcApLayerLockCmd.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApLayerLockCmd.d.ts","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerLockCmd.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAkB,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"AcApLayerLockCmd.d.ts","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerLockCmd.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAkB,MAAM,WAAW,CAAA;AAQvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,oBAAoB;;IAMlD,OAAO,CAAC,OAAO,EAAE,WAAW;YASpB,eAAe;IAc7B,OAAO,CAAC,eAAe;CA+BxB"}
|
|
@@ -50,31 +50,20 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
import { AcApDocManager } from '../../app';
|
|
53
|
-
import {
|
|
53
|
+
import { AcEdOpenMode, AcEdPromptEntityOptions, AcEdPromptStatus } from '../../editor';
|
|
54
54
|
import { AcApI18n } from '../../i18n';
|
|
55
|
+
import { AcApLayerService } from '../../service';
|
|
56
|
+
import { AcApLayerMutationCmd } from './AcApLayerMutationCmd';
|
|
55
57
|
/**
|
|
56
58
|
* AutoCAD-like `LAYLCK` command.
|
|
57
|
-
*
|
|
58
|
-
* The command repeatedly asks the user to pick an entity and locks the
|
|
59
|
-
* corresponding layer. It intentionally works by selection instead of layer
|
|
60
|
-
* name entry, matching AutoCAD's `LAYLCK` workflow.
|
|
61
59
|
*/
|
|
62
60
|
var AcApLayerLockCmd = /** @class */ (function (_super) {
|
|
63
61
|
__extends(AcApLayerLockCmd, _super);
|
|
64
|
-
/**
|
|
65
|
-
* Creates a write-enabled `LAYLCK` command instance.
|
|
66
|
-
*/
|
|
67
62
|
function AcApLayerLockCmd() {
|
|
68
63
|
var _this = _super.call(this) || this;
|
|
69
64
|
_this.mode = AcEdOpenMode.Write;
|
|
70
65
|
return _this;
|
|
71
66
|
}
|
|
72
|
-
/**
|
|
73
|
-
* Runs the interactive lock-layer workflow until the user cancels.
|
|
74
|
-
*
|
|
75
|
-
* @param context - Active application context used to read and update the current drawing.
|
|
76
|
-
* @returns Resolves when the command loop ends.
|
|
77
|
-
*/
|
|
78
67
|
AcApLayerLockCmd.prototype.execute = function (context) {
|
|
79
68
|
return __awaiter(this, void 0, void 0, function () {
|
|
80
69
|
var objectId;
|
|
@@ -94,11 +83,6 @@ var AcApLayerLockCmd = /** @class */ (function (_super) {
|
|
|
94
83
|
});
|
|
95
84
|
});
|
|
96
85
|
};
|
|
97
|
-
/**
|
|
98
|
-
* Prompts for one entity whose layer should be locked.
|
|
99
|
-
*
|
|
100
|
-
* @returns Picked entity identifier, or `undefined` when the user cancels.
|
|
101
|
-
*/
|
|
102
86
|
AcApLayerLockCmd.prototype.promptSelection = function () {
|
|
103
87
|
return __awaiter(this, void 0, void 0, function () {
|
|
104
88
|
var prompt, result;
|
|
@@ -120,56 +104,25 @@ var AcApLayerLockCmd = /** @class */ (function (_super) {
|
|
|
120
104
|
});
|
|
121
105
|
});
|
|
122
106
|
};
|
|
123
|
-
/**
|
|
124
|
-
* Sets or clears the locked bit in `standardFlags`.
|
|
125
|
-
*
|
|
126
|
-
* @param layer - Target layer table record.
|
|
127
|
-
* @param locked - `true` to lock, `false` to unlock.
|
|
128
|
-
*/
|
|
129
|
-
AcApLayerLockCmd.prototype.setLayerLocked = function (layer, locked) {
|
|
130
|
-
var _a;
|
|
131
|
-
var flags = (_a = layer.standardFlags) !== null && _a !== void 0 ? _a : 0;
|
|
132
|
-
layer.standardFlags = locked ? flags | 0x04 : flags & ~0x04;
|
|
133
|
-
};
|
|
134
|
-
/**
|
|
135
|
-
* Resolves the picked entity's layer and locks it when needed.
|
|
136
|
-
*
|
|
137
|
-
* @param context - Active application context containing the current database and view.
|
|
138
|
-
* @param objectId - Identifier of the entity selected by the user.
|
|
139
|
-
*/
|
|
140
107
|
AcApLayerLockCmd.prototype.lockEntityLayer = function (context, objectId) {
|
|
141
|
-
var
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
if (layer.isLocked) {
|
|
155
|
-
this.notify("".concat(AcApI18n.t('jig.laylck.alreadyLocked'), ": ").concat(layer.name), 'info');
|
|
156
|
-
return;
|
|
108
|
+
var result = new AcApLayerService(context.doc.database).lockLayerByEntity(objectId);
|
|
109
|
+
if (!result.ok) {
|
|
110
|
+
switch (result.reason) {
|
|
111
|
+
case 'invalid_selection':
|
|
112
|
+
this.showMessage(AcApI18n.t('jig.laylck.invalidSelection'), 'warning');
|
|
113
|
+
return;
|
|
114
|
+
case 'layer_not_found':
|
|
115
|
+
this.showMessage("".concat(AcApI18n.t('jig.laylck.layerNotFound'), ": ").concat(result.layerName), 'warning');
|
|
116
|
+
return;
|
|
117
|
+
case 'already_locked':
|
|
118
|
+
this.showMessage("".concat(AcApI18n.t('jig.laylck.alreadyLocked'), ": ").concat(result.layerName), 'info');
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
157
121
|
}
|
|
158
|
-
this.setLayerLocked(layer, true);
|
|
159
122
|
context.view.selectionSet.clear();
|
|
160
|
-
this.
|
|
161
|
-
};
|
|
162
|
-
/**
|
|
163
|
-
* Sends a localized status message through the command-line output.
|
|
164
|
-
*
|
|
165
|
-
* @param message - Text to display to the user.
|
|
166
|
-
* @param type - Visual severity mapped to command-line message styles.
|
|
167
|
-
*/
|
|
168
|
-
AcApLayerLockCmd.prototype.notify = function (message, type) {
|
|
169
|
-
if (type === void 0) { type = 'info'; }
|
|
170
|
-
AcApDocManager.instance.editor.showMessage(message, type);
|
|
123
|
+
this.showMessage("".concat(AcApI18n.t('jig.laylck.locked'), ": ").concat(result.layerName), 'success');
|
|
171
124
|
};
|
|
172
125
|
return AcApLayerLockCmd;
|
|
173
|
-
}(
|
|
126
|
+
}(AcApLayerMutationCmd));
|
|
174
127
|
export { AcApLayerLockCmd };
|
|
175
128
|
//# sourceMappingURL=AcApLayerLockCmd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApLayerLockCmd.js","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerLockCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,EAAe,cA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|
|
|
1
|
+
import { AcApContext } from '../../app';
|
|
2
|
+
import { AcEdCommand } from '../../editor';
|
|
3
|
+
/**
|
|
4
|
+
* Base class for commands that mutate the layer table.
|
|
5
|
+
*
|
|
6
|
+
* Overrides undo recording so layer changes are undoable even in Write mode.
|
|
7
|
+
* Captures layer state before execution so {@link AcApLayerPCmd} can restore it.
|
|
8
|
+
*/
|
|
9
|
+
export declare abstract class AcApLayerMutationCmd extends AcEdCommand {
|
|
10
|
+
protected shouldRecordUndoStack(_context: AcApContext): boolean;
|
|
11
|
+
protected onCommandWillStart(context: AcApContext): void;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=AcApLayerMutationCmd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApLayerMutationCmd.d.ts","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerMutationCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAK1C;;;;;GAKG;AACH,8BAAsB,oBAAqB,SAAQ,WAAW;IAC5D,SAAS,CAAC,qBAAqB,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO;IAI/D,SAAS,CAAC,kBAAkB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;CAMzD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
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 { AcEdCommand } from '../../editor';
|
|
17
|
+
/** Global command name for `LAYERP`; excluded from pre-operation capture. */
|
|
18
|
+
var LAYERP_COMMAND_NAME = 'layerp';
|
|
19
|
+
/**
|
|
20
|
+
* Base class for commands that mutate the layer table.
|
|
21
|
+
*
|
|
22
|
+
* Overrides undo recording so layer changes are undoable even in Write mode.
|
|
23
|
+
* Captures layer state before execution so {@link AcApLayerPCmd} can restore it.
|
|
24
|
+
*/
|
|
25
|
+
var AcApLayerMutationCmd = /** @class */ (function (_super) {
|
|
26
|
+
__extends(AcApLayerMutationCmd, _super);
|
|
27
|
+
function AcApLayerMutationCmd() {
|
|
28
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
29
|
+
}
|
|
30
|
+
AcApLayerMutationCmd.prototype.shouldRecordUndoStack = function (_context) {
|
|
31
|
+
return this.recordsUndoStack;
|
|
32
|
+
};
|
|
33
|
+
AcApLayerMutationCmd.prototype.onCommandWillStart = function (context) {
|
|
34
|
+
if (this.globalName.toLowerCase() === LAYERP_COMMAND_NAME) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
context.doc.captureLayerPreviousState();
|
|
38
|
+
};
|
|
39
|
+
return AcApLayerMutationCmd;
|
|
40
|
+
}(AcEdCommand));
|
|
41
|
+
export { AcApLayerMutationCmd };
|
|
42
|
+
//# sourceMappingURL=AcApLayerMutationCmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApLayerMutationCmd.js","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerMutationCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE1C,6EAA6E;AAC7E,IAAM,mBAAmB,GAAG,QAAQ,CAAA;AAEpC;;;;;GAKG;AACH;IAAmD,wCAAW;IAA9D;;IAWA,CAAC;IAVW,oDAAqB,GAA/B,UAAgC,QAAqB;QACnD,OAAO,IAAI,CAAC,gBAAgB,CAAA;IAC9B,CAAC;IAES,iDAAkB,GAA5B,UAA6B,OAAoB;QAC/C,IAAI,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,KAAK,mBAAmB,EAAE,CAAC;YAC1D,OAAM;QACR,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE,CAAA;IACzC,CAAC;IACH,2BAAC;AAAD,CAAC,AAXD,CAAmD,WAAW,GAW7D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AcApContext } from '../../app';
|
|
2
|
-
import {
|
|
2
|
+
import { AcApLayerMutationCmd } from './AcApLayerMutationCmd';
|
|
3
3
|
/**
|
|
4
4
|
* AutoCAD-like `LAYOFF` command.
|
|
5
5
|
*
|
|
@@ -13,7 +13,7 @@ import { AcEdCommand } from '../../editor';
|
|
|
13
13
|
* selection setting is stored for future use but does not currently change
|
|
14
14
|
* the resolved target layer.
|
|
15
15
|
*/
|
|
16
|
-
export declare class AcApLayoffCmd extends
|
|
16
|
+
export declare class AcApLayoffCmd extends AcApLayerMutationCmd {
|
|
17
17
|
private static _settings;
|
|
18
18
|
private _history;
|
|
19
19
|
private _vpfreezeHintShown;
|
|
@@ -31,13 +31,6 @@ export declare class AcApLayoffCmd extends AcEdCommand {
|
|
|
31
31
|
* @returns Resolves when the command loop ends.
|
|
32
32
|
*/
|
|
33
33
|
execute(context: AcApContext): Promise<void>;
|
|
34
|
-
/**
|
|
35
|
-
* Sends a localized status message through the command-line output.
|
|
36
|
-
*
|
|
37
|
-
* @param message - Text to display to the user.
|
|
38
|
-
* @param type - Visual severity mapped to command-line message styles.
|
|
39
|
-
*/
|
|
40
|
-
private notify;
|
|
41
34
|
/**
|
|
42
35
|
* Registers a localized keyword on an entity or keyword prompt.
|
|
43
36
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApLayerOffCmd.d.ts","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerOffCmd.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAkB,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"AcApLayerOffCmd.d.ts","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerOffCmd.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAkB,MAAM,WAAW,CAAA;AASvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AA2E7D;;;;;;;;;;;;GAYG;AACH,qBAAa,aAAc,SAAQ,oBAAoB;IACrD,OAAO,CAAC,MAAM,CAAC,SAAS,CAA0C;IAElE,OAAO,CAAC,QAAQ,CAA2B;IAC3C,OAAO,CAAC,kBAAkB,CAAQ;IAElC;;OAEG;;IAMH;;;;;;;;OAQG;IACG,OAAO,CAAC,OAAO,EAAE,WAAW;IAsBlC;;;;;OAKG;IACH,OAAO,CAAC,UAAU;IAoBlB;;;;OAIG;YACW,eAAe;IA8B7B;;;;OAIG;YACW,WAAW;IAwBzB;;;;;;;OAOG;YACW,kBAAkB;IAmChC;;;;;;;OAOG;YACW,wBAAwB;IAuCtC;;;;;;;;OAQG;IACH,OAAO,CAAC,kBAAkB;IAmD1B;;;;OAIG;IACH,OAAO,CAAC,OAAO;CAsBhB"}
|
|
@@ -61,8 +61,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
import { AcApDocManager } from '../../app';
|
|
64
|
-
import {
|
|
64
|
+
import { AcEdOpenMode, AcEdPromptEntityOptions, AcEdPromptKeywordOptions, AcEdPromptStatus } from '../../editor';
|
|
65
65
|
import { AcApI18n } from '../../i18n';
|
|
66
|
+
import { AcApLayerService } from '../../service';
|
|
67
|
+
import { AcApLayerMutationCmd } from './AcApLayerMutationCmd';
|
|
66
68
|
var DEFAULT_SETTINGS = {
|
|
67
69
|
viewportMode: 'Off',
|
|
68
70
|
blockSelectionMode: 'None'
|
|
@@ -136,16 +138,6 @@ var AcApLayoffCmd = /** @class */ (function (_super) {
|
|
|
136
138
|
});
|
|
137
139
|
});
|
|
138
140
|
};
|
|
139
|
-
/**
|
|
140
|
-
* Sends a localized status message through the command-line output.
|
|
141
|
-
*
|
|
142
|
-
* @param message - Text to display to the user.
|
|
143
|
-
* @param type - Visual severity mapped to command-line message styles.
|
|
144
|
-
*/
|
|
145
|
-
AcApLayoffCmd.prototype.notify = function (message, type) {
|
|
146
|
-
if (type === void 0) { type = 'info'; }
|
|
147
|
-
AcApDocManager.instance.editor.showMessage(message, type);
|
|
148
|
-
};
|
|
149
141
|
/**
|
|
150
142
|
* Registers a localized keyword on an entity or keyword prompt.
|
|
151
143
|
*
|
|
@@ -263,7 +255,7 @@ var AcApLayoffCmd = /** @class */ (function (_super) {
|
|
|
263
255
|
AcApLayoffCmd._settings.viewportMode = keyword;
|
|
264
256
|
if (keyword === 'Vpfreeze') {
|
|
265
257
|
this._vpfreezeHintShown = true;
|
|
266
|
-
this.
|
|
258
|
+
this.showMessage(AcApI18n.t('jig.layoff.vpfreezeFallback'));
|
|
267
259
|
}
|
|
268
260
|
else {
|
|
269
261
|
this._vpfreezeHintShown = false;
|
|
@@ -307,7 +299,7 @@ var AcApLayoffCmd = /** @class */ (function (_super) {
|
|
|
307
299
|
if (!keyword)
|
|
308
300
|
return [2 /*return*/];
|
|
309
301
|
AcApLayoffCmd._settings.blockSelectionMode = keyword;
|
|
310
|
-
this.
|
|
302
|
+
this.showMessage(AcApI18n.t('jig.layoff.nestedSelectionLimited'));
|
|
311
303
|
return [2 /*return*/];
|
|
312
304
|
}
|
|
313
305
|
});
|
|
@@ -324,38 +316,36 @@ var AcApLayoffCmd = /** @class */ (function (_super) {
|
|
|
324
316
|
*/
|
|
325
317
|
AcApLayoffCmd.prototype.turnOffEntityLayer = function (context, objectId) {
|
|
326
318
|
var _a;
|
|
327
|
-
var
|
|
328
|
-
var
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
this.notify("".concat(AcApI18n.t('jig.layoff.alreadyOff'), ": ").concat(layer.name), 'info');
|
|
319
|
+
var service = new AcApLayerService(context.doc.database);
|
|
320
|
+
var result = service.turnOffLayerByEntity(objectId);
|
|
321
|
+
if (!result.ok) {
|
|
322
|
+
switch (result.reason) {
|
|
323
|
+
case 'invalid_selection':
|
|
324
|
+
this.showMessage(AcApI18n.t('jig.layoff.invalidSelection'), 'warning');
|
|
325
|
+
return;
|
|
326
|
+
case 'layer_not_found':
|
|
327
|
+
this.showMessage("".concat(AcApI18n.t('jig.layoff.layerNotFound'), ": ").concat(result.layerName), 'warning');
|
|
328
|
+
return;
|
|
329
|
+
case 'cannot_change_current':
|
|
330
|
+
this.showMessage(AcApI18n.t('jig.layoff.cannotTurnOffCurrent'), 'warning');
|
|
331
|
+
return;
|
|
332
|
+
case 'already_off':
|
|
333
|
+
this.showMessage("".concat(AcApI18n.t('jig.layoff.alreadyOff'), ": ").concat(result.layerName), 'info');
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
345
336
|
return;
|
|
346
337
|
}
|
|
347
338
|
if (AcApLayoffCmd._settings.viewportMode === 'Vpfreeze' &&
|
|
348
339
|
!this._vpfreezeHintShown) {
|
|
349
|
-
this.
|
|
340
|
+
this.showMessage(AcApI18n.t('jig.layoff.vpfreezeFallback'));
|
|
350
341
|
this._vpfreezeHintShown = true;
|
|
351
342
|
}
|
|
352
343
|
this._history.push({
|
|
353
|
-
layerName:
|
|
354
|
-
wasOff:
|
|
344
|
+
layerName: result.layerName,
|
|
345
|
+
wasOff: (_a = result.previousOff) !== null && _a !== void 0 ? _a : false
|
|
355
346
|
});
|
|
356
|
-
layer.isOff = true;
|
|
357
347
|
context.view.selectionSet.clear();
|
|
358
|
-
this.
|
|
348
|
+
this.showMessage("".concat(AcApI18n.t('jig.layoff.turnedOff'), ": ").concat(result.layerName), 'success');
|
|
359
349
|
};
|
|
360
350
|
/**
|
|
361
351
|
* Restores the most recently changed layer-off state captured during this run.
|
|
@@ -365,20 +355,19 @@ var AcApLayoffCmd = /** @class */ (function (_super) {
|
|
|
365
355
|
AcApLayoffCmd.prototype.runUndo = function (context) {
|
|
366
356
|
var history = this._history.pop();
|
|
367
357
|
if (!history) {
|
|
368
|
-
this.
|
|
358
|
+
this.showMessage(AcApI18n.t('jig.layoff.nothingToUndo'), 'warning');
|
|
369
359
|
return;
|
|
370
360
|
}
|
|
371
|
-
var
|
|
372
|
-
if (!
|
|
373
|
-
this.
|
|
361
|
+
var service = new AcApLayerService(context.doc.database);
|
|
362
|
+
if (!service.setLayerOffByName(history.layerName, history.wasOff)) {
|
|
363
|
+
this.showMessage("".concat(AcApI18n.t('jig.layoff.layerNotFound'), ": ").concat(history.layerName), 'warning');
|
|
374
364
|
return;
|
|
375
365
|
}
|
|
376
|
-
layer.isOff = history.wasOff;
|
|
377
366
|
context.view.selectionSet.clear();
|
|
378
|
-
this.
|
|
367
|
+
this.showMessage("".concat(AcApI18n.t('jig.layoff.restored'), ": ").concat(history.layerName), 'success');
|
|
379
368
|
};
|
|
380
369
|
AcApLayoffCmd._settings = __assign({}, DEFAULT_SETTINGS);
|
|
381
370
|
return AcApLayoffCmd;
|
|
382
|
-
}(
|
|
371
|
+
}(AcApLayerMutationCmd));
|
|
383
372
|
export { AcApLayoffCmd };
|
|
384
373
|
//# sourceMappingURL=AcApLayerOffCmd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApLayerOffCmd.js","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerOffCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,EAAe,cAAc,EAAE,MAAM,WAAW,CAAA;AACvD,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"AcApLayerOffCmd.js","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerOffCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,EAAe,cAAc,EAAE,MAAM,WAAW,CAAA;AACvD,OAAO,EACL,YAAY,EACZ,uBAAuB,EACvB,wBAAwB,EACxB,gBAAgB,EACjB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAsE7D,IAAM,gBAAgB,GAAmB;IACvC,YAAY,EAAE,KAAK;IACnB,kBAAkB,EAAE,MAAM;CAC3B,CAAA;AAED;;;;;;;;;;;;GAYG;AACH;IAAmC,iCAAoB;IAMrD;;OAEG;IACH;QACE,YAAA,MAAK,WAAE,SAAA;QAPD,cAAQ,GAAyB,EAAE,CAAA;QACnC,wBAAkB,GAAG,KAAK,CAAA;QAOhC,KAAI,CAAC,IAAI,GAAG,YAAY,CAAC,KAAK,CAAA;;IAChC,CAAC;IAED;;;;;;;;OAQG;IACG,+BAAO,GAAb,UAAc,OAAoB;;;;;;wBAChC,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAA;wBAClB,IAAI,CAAC,kBAAkB;4BACrB,aAAa,CAAC,SAAS,CAAC,YAAY,KAAK,UAAU,CAAA;;;6BAE9C,IAAI;wBACM,qBAAM,IAAI,CAAC,eAAe,EAAE,EAAA;;wBAArC,MAAM,GAAG,SAA4B;wBAC3C,IAA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ED,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAA;QACjC,IAAI,CAAC,WAAW,CACd,UAAG,QAAQ,CAAC,CAAC,CAAC,qBAAqB,CAAC,eAAK,OAAO,CAAC,SAAS,CAAE,EAC5D,SAAS,CACV,CAAA;IACH,CAAC;IAtTc,uBAAS,gBAAwB,gBAAgB,CAAxC,CAA0C;IAuTpE,oBAAC;CAAA,AAxTD,CAAmC,oBAAoB,GAwTtD;SAxTY,aAAa"}
|
|
@@ -1,30 +1,10 @@
|
|
|
1
1
|
import { AcApContext } from '../../app';
|
|
2
|
-
import {
|
|
2
|
+
import { AcApLayerMutationCmd } from './AcApLayerMutationCmd';
|
|
3
3
|
/**
|
|
4
4
|
* AutoCAD-like `LAYON` command.
|
|
5
|
-
*
|
|
6
|
-
* The command turns on every layer in the current drawing by clearing the
|
|
7
|
-
* layer-off flag. Frozen layers remain frozen, which matches the AutoCAD
|
|
8
|
-
* command's responsibility of restoring only off layers.
|
|
9
5
|
*/
|
|
10
|
-
export declare class AcApLayerOnCmd extends
|
|
11
|
-
/**
|
|
12
|
-
* Creates a write-enabled `LAYON` command instance.
|
|
13
|
-
*/
|
|
6
|
+
export declare class AcApLayerOnCmd extends AcApLayerMutationCmd {
|
|
14
7
|
constructor();
|
|
15
|
-
/**
|
|
16
|
-
* Runs the turn-on-all-layers workflow.
|
|
17
|
-
*
|
|
18
|
-
* @param context - Active application context used to update the current drawing.
|
|
19
|
-
* @returns Resolves when all layer states have been processed.
|
|
20
|
-
*/
|
|
21
8
|
execute(context: AcApContext): Promise<void>;
|
|
22
|
-
/**
|
|
23
|
-
* Sends a localized status message through the command-line output.
|
|
24
|
-
*
|
|
25
|
-
* @param message - Text to display to the user.
|
|
26
|
-
* @param type - Visual severity mapped to command-line message styles.
|
|
27
|
-
*/
|
|
28
|
-
private notify;
|
|
29
9
|
}
|
|
30
10
|
//# sourceMappingURL=AcApLayerOnCmd.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApLayerOnCmd.d.ts","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerOnCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"AcApLayerOnCmd.d.ts","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerOnCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAIvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D;;GAEG;AACH,qBAAa,cAAe,SAAQ,oBAAoB;;IAMhD,OAAO,CAAC,OAAO,EAAE,WAAW;CAcnC"}
|
|
@@ -49,90 +49,36 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
49
49
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
|
|
53
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
54
|
-
if (!m) return o;
|
|
55
|
-
var i = m.call(o), r, ar = [], e;
|
|
56
|
-
try {
|
|
57
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
58
|
-
}
|
|
59
|
-
catch (error) { e = { error: error }; }
|
|
60
|
-
finally {
|
|
61
|
-
try {
|
|
62
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
63
|
-
}
|
|
64
|
-
finally { if (e) throw e.error; }
|
|
65
|
-
}
|
|
66
|
-
return ar;
|
|
67
|
-
};
|
|
68
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
69
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
70
|
-
if (ar || !(i in from)) {
|
|
71
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
72
|
-
ar[i] = from[i];
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
76
|
-
};
|
|
77
|
-
import { AcApDocManager } from '../../app';
|
|
78
|
-
import { AcEdCommand, AcEdOpenMode } from '../../editor';
|
|
52
|
+
import { AcEdOpenMode } from '../../editor';
|
|
79
53
|
import { AcApI18n } from '../../i18n';
|
|
54
|
+
import { AcApLayerService } from '../../service';
|
|
55
|
+
import { AcApLayerMutationCmd } from './AcApLayerMutationCmd';
|
|
80
56
|
/**
|
|
81
57
|
* AutoCAD-like `LAYON` command.
|
|
82
|
-
*
|
|
83
|
-
* The command turns on every layer in the current drawing by clearing the
|
|
84
|
-
* layer-off flag. Frozen layers remain frozen, which matches the AutoCAD
|
|
85
|
-
* command's responsibility of restoring only off layers.
|
|
86
58
|
*/
|
|
87
59
|
var AcApLayerOnCmd = /** @class */ (function (_super) {
|
|
88
60
|
__extends(AcApLayerOnCmd, _super);
|
|
89
|
-
/**
|
|
90
|
-
* Creates a write-enabled `LAYON` command instance.
|
|
91
|
-
*/
|
|
92
61
|
function AcApLayerOnCmd() {
|
|
93
62
|
var _this = _super.call(this) || this;
|
|
94
63
|
_this.mode = AcEdOpenMode.Write;
|
|
95
64
|
return _this;
|
|
96
65
|
}
|
|
97
|
-
/**
|
|
98
|
-
* Runs the turn-on-all-layers workflow.
|
|
99
|
-
*
|
|
100
|
-
* @param context - Active application context used to update the current drawing.
|
|
101
|
-
* @returns Resolves when all layer states have been processed.
|
|
102
|
-
*/
|
|
103
66
|
AcApLayerOnCmd.prototype.execute = function (context) {
|
|
104
67
|
return __awaiter(this, void 0, void 0, function () {
|
|
105
|
-
var
|
|
68
|
+
var turnedOn;
|
|
106
69
|
return __generator(this, function (_a) {
|
|
107
|
-
|
|
108
|
-
turnedOn = 0;
|
|
109
|
-
layers.forEach(function (layer) {
|
|
110
|
-
if (!layer.isOff)
|
|
111
|
-
return;
|
|
112
|
-
layer.isOff = false;
|
|
113
|
-
turnedOn++;
|
|
114
|
-
});
|
|
70
|
+
turnedOn = new AcApLayerService(context.doc.database).setAllLayersOn();
|
|
115
71
|
context.view.selectionSet.clear();
|
|
116
72
|
if (turnedOn === 0) {
|
|
117
|
-
this.
|
|
73
|
+
this.showMessage(AcApI18n.t('jig.layon.alreadyOn'));
|
|
118
74
|
return [2 /*return*/];
|
|
119
75
|
}
|
|
120
|
-
this.
|
|
76
|
+
this.showMessage("".concat(AcApI18n.t('jig.layon.turnedOn'), ": ").concat(turnedOn), 'success');
|
|
121
77
|
return [2 /*return*/];
|
|
122
78
|
});
|
|
123
79
|
});
|
|
124
80
|
};
|
|
125
|
-
/**
|
|
126
|
-
* Sends a localized status message through the command-line output.
|
|
127
|
-
*
|
|
128
|
-
* @param message - Text to display to the user.
|
|
129
|
-
* @param type - Visual severity mapped to command-line message styles.
|
|
130
|
-
*/
|
|
131
|
-
AcApLayerOnCmd.prototype.notify = function (message, type) {
|
|
132
|
-
if (type === void 0) { type = 'info'; }
|
|
133
|
-
AcApDocManager.instance.editor.showMessage(message, type);
|
|
134
|
-
};
|
|
135
81
|
return AcApLayerOnCmd;
|
|
136
|
-
}(
|
|
82
|
+
}(AcApLayerMutationCmd));
|
|
137
83
|
export { AcApLayerOnCmd };
|
|
138
84
|
//# sourceMappingURL=AcApLayerOnCmd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApLayerOnCmd.js","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerOnCmd.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AcApLayerOnCmd.js","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerOnCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D;;GAEG;AACH;IAAoC,kCAAoB;IACtD;QACE,YAAA,MAAK,WAAE,SAAA;QACP,KAAI,CAAC,IAAI,GAAG,YAAY,CAAC,KAAK,CAAA;;IAChC,CAAC;IAEK,gCAAO,GAAb,UAAc,OAAoB;;;;gBAC1B,QAAQ,GAAG,IAAI,gBAAgB,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,cAAc,EAAE,CAAA;gBAC5E,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAA;gBAEjC,IAAI,QAAQ,KAAK,CAAC,EAAE,CAAC;oBACnB,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAA;oBACnD,sBAAM;gBACR,CAAC;gBAED,IAAI,CAAC,WAAW,CACd,UAAG,QAAQ,CAAC,CAAC,CAAC,oBAAoB,CAAC,eAAK,QAAQ,CAAE,EAClD,SAAS,CACV,CAAA;;;;KACF;IACH,qBAAC;AAAD,CAAC,AApBD,CAAoC,oBAAoB,GAoBvD"}
|