UNPKG

@doegis/core

Version:

DOE GIS API

3 lines (1 loc) 41.3 kB
import{_ as e}from"../../../../../chunks/tslib.es6.js";import"../../../../../geometry.js";import{removeUnordered as t}from"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import i from"../../../../../core/Evented.js";import{HandleOwner as a}from"../../../../../core/HandleOwner.js";import o from"../../../../../core/Handles.js";import{handlesGroup as n,destroyHandle as r}from"../../../../../core/handleUtils.js";import{destroyMaybe as s,isSome as l,isNone as p,unwrap as h,removeMaybe as d}from"../../../../../core/maybe.js";import{zeroMeters as u,scale as c,createLength as m}from"../../../../../core/quantityUtils.js";import{watch as g,when as _,initial as f}from"../../../../../core/reactiveUtils.js";import{getMetersPerUnitForSR as v}from"../../../../../core/unitUtils.js";import{property as M}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/accessorSupport/ensureType.js";import{subclass as y}from"../../../../../core/accessorSupport/decorators/subclass.js";import{I as x}from"../../../../../chunks/mat4f64.js";import{l as O,b,h as E,s as G,a as S,g as w}from"../../../../../chunks/vec3.js";import{f as V,c as I}from"../../../../../chunks/vec3f64.js";import T from"../../../../../geometry/Polyline.js";import{hasCompatibleTopology as A}from"../../../../../geometry/support/coordsUtils.js";import{projectPoint as H}from"../../../../../geometry/support/plane.js";import{sv3d as D}from"../../../../../geometry/support/vectorStacks.js";import{makeDehydratedPoint as L}from"../../../../../layers/graphics/dehydratedFeatures.js";import{getGraphicEffectiveElevationInfo as j}from"../../../../../support/elevationInfoUtils.js";import{isVolumetricSymbol as P}from"../../../../../symbols/support/utils.js";import{Manipulator3D as U}from"../../Manipulator3D.js";import{createManipulatorMaterial as N,createManipulatorOutlineMaterial as C,placeAtGraphic as R}from"../../manipulatorUtils.js";import{RenderObject as k}from"../../RenderObject.js";import{SegmentLabels3D as F}from"../../SegmentLabels3D.js";import{SnappingVisualizer3D as z}from"../../SnappingVisualizer3D.js";import{screenToRenderPlaneFromEvent as X,convertToMapCoordinates as Z,screenToMapXYAtLocation as Y,screenToMapXYForGraphicAtLocation as q}from"../dragEventPipeline3D.js";import{ManipulatorType as W}from"../ManipulatorType.js";import{canMoveZ as K}from"../manipulatorUtils.js";import{settings as B,colors as J}from"../settings.js";import{createVisualElements as Q}from"../visualElementUtils.js";import{DISC_RADIUS_SMALL as $}from"../manipulations/config.js";import{ManipulationType as ee,MoveManipulation as te}from"../manipulations/MoveManipulation.js";import{shapeOrientation as ie,axisConstrainedDragSign as ae}from"../manipulations/moveUtils.js";import{MoveXYGraphicManipulation as oe}from"../manipulations/MoveXYGraphicManipulation.js";import{createEdgeOffsetIntersectionPlane as ne,createEdgeOffsetOperation as re,edgeOffsetRotationMatrix as se,screenEdgeLengthSquared as le}from"./edgeOffsetUtils.js";import{OutlineVisualElement as pe}from"../../visualElements/OutlineVisualElement.js";import{GraphicState as he}from"../../../layers/graphics/GraphicState.js";import{createExtrudedTriangle as de,createSphereGeometry as ue}from"../../../webgl-engine/lib/GeometryUtil.js";import{MouseButton as ce}from"../../../../input/IViewEvents.js";import{sceneSnappingAtLocation as me,addMapDelta as ge,createManipulatorDragEventPipeline as _e,dragAtLocation as fe,addScreenDelta as ve}from"../../../../interactive/dragEventPipeline.js";import{ManipulatorStateFlags as Me,ManipulatorStateCustomFlags as ye}from"../../../../interactive/interfaces.js";import{EditGeometryOperations as xe}from"../../../../interactive/editGeometry/EditGeometryOperations.js";import{AccumulationBehaviour as Oe}from"../../../../interactive/editGeometry/interfaces.js";import{SnappingContext as be}from"../../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as Ee}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{ReshapeEdgeOffsetTooltipInfo as Ge}from"../../../../interactive/tooltip/ReshapeTooltipInfos.js";import{Tooltip as Se}from"../../../../interactive/tooltip/Tooltip.js";import{TranslateGraphicZTooltipInfo as we,TranslateGraphicXYTooltipInfo as Ve,TranslateGraphicTooltipInfo as Ie,TranslateVertexZTooltipInfo as Te,TranslateVertexXYTooltipInfo as Ae,TranslateVertexTooltipInfo as He}from"../../../../interactive/tooltip/TranslateTooltipInfos.js";import{autoAreaByElevationMode as De}from"../../../../support/automaticAreaMeasurementUtils.js";import{autoHorizontalDistanceByElevationModeBetweenPoints as Le,autoLengthByElevationMode as je}from"../../../../support/automaticLengthMeasurementUtils.js";import{verticalSignedDistanceBetweenPoints as Pe,elevationOfPoint as Ue}from"../../../../support/euclideanLengthMeasurementUtils.js";import{geodesicDistance as Ne}from"../../../../support/geodesicLengthMeasurementUtils.js";import Ce from"../../../../../geometry/SpatialReference.js";let Re=class extends(i.EventedMixin(a)){constructor(e){super(e),this._vertexManipulatorMaterial=N(B.colorToVec4(B.reshapeManipulators.vertex.color),B.reshapeManipulators.vertex.renderOccluded),this._vertexManipulatorOutlineMaterial=C(B.colorToVec4(B.reshapeManipulators.vertex.outlineColor),B.reshapeManipulators.vertex.renderOccluded),this._vertexManipulatorHoverOutlineMaterial=C(B.colorToVec4(B.reshapeManipulators.vertex.hoverOutlineColor),B.reshapeManipulators.vertex.renderOccluded),this._edgeManipulatorMaterial=N(B.colorToVec4(B.reshapeManipulators.edge.color),B.reshapeManipulators.edge.renderOccluded),this._edgeManipulatorOutlineMaterial=C(B.colorToVec4(B.reshapeManipulators.edge.outlineColor),B.reshapeManipulators.edge.renderOccluded),this._edgeOffsetManipulatorMaterial=N(B.colorToVec4(B.reshapeManipulators.edgeOffset.color),B.reshapeManipulators.edgeOffset.renderOccluded,!1),this._edgeOffsetManipulatorHoverMaterial=N(B.colorToVec4(B.reshapeManipulators.edgeOffset.hoverColor),B.reshapeManipulators.edgeOffset.renderOccluded,!1),this._selectedManipulatorMaterial=N(B.colorToVec4(B.reshapeManipulators.selected.color),B.reshapeManipulators.selected.renderOccluded),this._selectedManipulatorOutlineMaterial=C(B.colorToVec4(B.reshapeManipulators.selected.outlineColor),B.reshapeManipulators.selected.renderOccluded),this._selectedManipulatorHoverOutlineMaterial=C(B.colorToVec4(B.reshapeManipulators.selected.hoverOutlineColor),B.reshapeManipulators.selected.renderOccluded),this._selectedIndex=0,this._manipulatorHandles=new o,this._manipulatorInfos=[],this._numGrabbing=0,this._numDragging=0,this._reshapeEventState=qe.NONE,this._recreatingManipulators=!1,this.outputGeometry=null,this._vertexLaserLineVisualElement=null}initialize(){const{graphic:e,view:t}=this,i=this._graphicState=new he({graphic:e});this._tooltip=new Se({view:t}),this.addHandles([g((()=>i.displaying),(e=>{for(const t of this._manipulatorInfos)t.manipulator.available=e})),g((()=>({labels:this._segmentLabels,enabled:this._labelOptions.enabled,edgeOffsetEnabled:this.enableEdgeOffset})),(({labels:e,enabled:t,edgeOffsetEnabled:i})=>{l(e)&&(e.visible=t,e.edgeDistance=i?"far":"default")}),f),_((()=>!this._tooltipOptions.enabled),(()=>this._tooltip.clear()),f),this.view.trackGraphicState(i)])}destroy(){this._segmentLabels=s(this._segmentLabels),this._tooltip=s(this._tooltip),this._removeManipulators()}get inputGeometry(){return l(this._editGeometryOperations)?this._editGeometryOperations.data.geometry:null}set inputGeometry(e){this._recreateEditGeometryAndManipulators(e)}get updating(){return this.updatingHandles.updating}get manipulators(){return this.tool.manipulators}get view(){return this.tool.view}get graphic(){return this.tool.graphic}get enableZShape(){return this.tool.enableZShape}get enableZVertex(){return this.tool.enableZVertex}get enableMoveGraphic(){return this.tool.enableMoveGraphic}get enableMidpoints(){return this.tool.enableMidpoints}get enableEdgeOffset(){return this.tool.enableEdgeOffset}get _labelOptions(){return this.tool.labelOptions}get _tooltipOptions(){return this.tool.tooltipOptions}removeSelectedVertices(){const e=this._manipulatorInfos.filter((e=>e.manipulator.selected&&"vertex"===e.type));this._removeVertices(e)}onManipulatorSelectionChanged(){this.emit("manipulators-changed")}_removeManipulators(){this._manipulatorHandles.removeAll(),this._moveManipulation=s(this._moveManipulation),this._graphicMoveManipulation=s(this._graphicMoveManipulation),this.manipulators.removeAll(),this._manipulatorInfos=[],this._numGrabbing=0,this._numDragging=0}_createManipulators(e){if(p(this._editGeometryOperations))return;const t=j(this.graphic);for(const i of this._editGeometryOperations.data.components){const a=e?.byComponentIndex.get(i.index);for(const e of i.vertices){const i=a?.has(e.index);this._createVertexOrEdgeManipulator(e,t,i)}for(const e of i.edges)this._createVertexOrEdgeManipulator(e,t)}this._createGraphicMoveManipulation(),this._createMoveManipulation(t),this._createVisualElements()}get canRedo(){return l(this._editGeometryOperations)&&this._editGeometryOperations.canRedo}get canUndo(){return l(this._editGeometryOperations)&&this._editGeometryOperations.canUndo}redo(){if(p(this._editGeometryOperations))return null;const e=this._editGeometryOperations.redo();return l(e)&&(this.outputGeometry=this._editGeometryOperations.data.geometry,this._recreateManipulators()),e}undo(){if(p(this._editGeometryOperations))return null;this.emit("undo");const e=this._editGeometryOperations.undo();return l(e)&&(this.outputGeometry=this._editGeometryOperations.data.geometry,this._recreateManipulators()),e}_recreateManipulators(){this._recreatingManipulators||(this._recreatingManipulators=!0,this._removeManipulators(),this._tooltip.clear(),this._createManipulators(),this._recreatingManipulators=!1)}_recreateEditGeometryAndManipulators(e){const t={byComponentIndex:new Map};if(l(e)&&l(this.inputGeometry)&&A(e,this.inputGeometry))for(const i of this._manipulatorInfos)if("vertex"===i.type&&i.manipulator.selected){const{index:e,component:{index:a}}=i.handle,{byComponentIndex:o}=t,n=o.get(a)||new Set;n.add(e),o.set(a,n)}this._recreatingManipulators=!0,this._removeManipulators(),this._tooltip.clear(),this._editGeometryOperations=s(this._editGeometryOperations),this._segmentLabels=s(this._segmentLabels),p(e)||(this._editGeometryOperations=xe.fromGeometry(e,this.view.state.viewingMode),this._createManipulators(t),this._segmentLabels=new F({context:{view:this.view,editGeometryOperations:this._editGeometryOperations,elevationInfo:j(this.graphic),labelOptions:this._labelOptions,graphic:this.graphic,graphicState:this._graphicState},visible:this._labelOptions.enabled})),this._recreatingManipulators=!1}_perGraphicManipulatorDragAction(e,t){if("end"===t.action)return t;let i=0;const a=[],o=this._manipulatorInfos.some((e=>"vertex"===e.type&&e.manipulator.selected)),n=e===We.SELECTED_OR_ALL&&o;for(const r of this._manipulatorInfos)"vertex"===r.type&&(r.manipulator.grabbing||n&&!r.manipulator.selected||a.push(r),i++);if(0===a.length)return t;this._moveVertices(a,t);if(a.length===i){if(this._updateEventState(qe.MOVING),this.destroyed)return t;this.emit("move",{type:"move",dx:t.screenDeltaX,dy:t.screenDeltaY,mover:this.graphic})}else{if(this._updateEventState(qe.RESHAPING),this.destroyed)return t;this.emit("reshape",{type:"reshape",mover:this.graphic})}return t}_isMultiVertexSelection(){return this._manipulatorInfos.reduce(((e,t)=>"vertex"===t.type&&t.manipulator.selected?e+1:e),0)>1}_perVertexManipulatorDragAction(e){if(this._updateEventState(qe.RESHAPING),this.destroyed)return;const{mapDeltaX:t,mapDeltaY:i,mapDeltaZ:a}=e;if(!t&&!i&&!a)return;const o=[];for(const n of this._manipulatorInfos)"vertex"===n.type&&(n.manipulator.selected&&!n.manipulator.grabbing||n===e.info)&&o.push(n);this._moveVertices(o,e,Oe.ACCUMULATE_STEPS),this.emit("reshape",{type:"reshape",mover:this.graphic})}_updateEventState(e){if(e===this._reshapeEventState)return!1;switch(e){case qe.NONE:if(0!==this._numGrabbing||0!==this._numDragging)return!1;switch(this._reshapeEventState){case qe.MOVING:this.emit("move",{type:"move-stop",dx:0,dy:0,mover:this.graphic});break;case qe.RESHAPING:this.emit("reshape",{type:"reshape-stop",mover:this.graphic})}break;case qe.MOVING:switch(this._reshapeEventState){case qe.NONE:this.emit("move",{type:"move-start",dx:0,dy:0,mover:this.graphic});break;case qe.RESHAPING:this.emit("reshape",{type:"reshape-stop",mover:this.graphic}),this.destroyed||this.emit("move",{type:"move-start",dx:0,dy:0,mover:this.graphic})}break;case qe.RESHAPING:switch(this._reshapeEventState){case qe.NONE:this.emit("reshape",{type:"reshape-start",mover:this.graphic});break;case qe.MOVING:this.emit("move",{type:"move-stop",dx:0,dy:0,mover:this.graphic}),this.destroyed||this.emit("reshape",{type:"reshape-start",mover:this.graphic})}}if(this.destroyed)return!1;const t=this._reshapeEventState!==e;return this._reshapeEventState=e,t}_createGraphicMoveManipulation(){const{tool:e,view:t}=this,i=this._graphicState;if(this._graphicMoveManipulation=new oe({tool:e,view:t,graphicState:i}),this.enableMoveGraphic){let e=null;this._manipulatorHandles.add(this._graphicMoveManipulation.createDragPipeline(((t,i,a)=>{i.next((e=>this._trackNumDragging(e))).next((t=>("start"===t.action&&(e=h(this._editGeometryOperations).createUndoGroup()),t))).next((e=>this._perGraphicManipulatorDragAction(We.ALL,e))).next((e=>(this._updateTranslateGraphicTooltip(ee.XY,e),e))).next((t=>{"end"===t.action&&(this._tooltip.clear(),e=d(e))})),a.next((()=>this._onDragCancel(!0,(()=>e=d(e)))))}))),this._graphicMoveManipulation.forEachManipulator((e=>this._manipulatorHandles.add(this._watchAndUpdateGrabState(e,!1))))}else this._graphicMoveManipulation.forEachManipulator((e=>{e.grabbable=!1,e.cursor=null}));this._graphicMoveManipulation.forEachManipulator((e=>this._manipulatorHandles.add(e.events.on("immediate-click",(e=>{this._manipulatorInfos.some((e=>e.manipulator.selected))?this._clearSelection():this.emit("immediate-click",{...e,graphic:this.graphic}),e.stopPropagation()})))))}_createMoveManipulation(e){const{graphic:t,handles:i,tool:a,view:o}=this,n=this._graphicState;this._moveManipulation=new te({tool:a,view:o,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:this.enableZShape&&K(t),snapToScene:!1,radius:te.radiusForSymbol(t.symbol)}),this._moveManipulation.forEachManipulator((e=>i.add([e.events.on("immediate-click",(i=>{this._moveManipulation.zManipulation.hasManipulator(e)||this._manipulatorInfos.some((e=>e.manipulator.selected))||this.emit("immediate-click",{...i,graphic:t}),i.stopPropagation()})),this._watchAndUpdateGrabState(e,!1)])));const r=e=>t=>{i.add(t.events.on("focus-changed",(({action:t})=>{"focus"===t&&this._tooltipOptions.enabled?this._updateTranslateTooltip(e):this._tooltip.clear()})))};this._moveManipulation.xyManipulation.forEachManipulator(r(ee.XY)),this._moveManipulation.xyAxisManipulation.forEachManipulator(r(ee.XY_AXIS)),this._moveManipulation.zManipulation.forEachManipulator(r(ee.Z)),this._moveManipulation.elevationInfo={mode:"absolute-height",offset:0};const s=h(t.geometry).spatialReference;i.add([this._moveManipulation.createDragPipeline(((i,o,n,r,s)=>{const{snappingStep:l,cancelSnapping:p}=Ee({predicate:e=>!!e.info,snappingManager:a.snappingManager,snappingContext:new be({editGeometryOperations:h(this._editGeometryOperations),elevationInfo:e,pointer:s,excludeFeature:t,visualizer:new z}),updatingHandles:this.updatingHandles,useZ:!1});return r=r.next((e=>(this._onDragCancel(),e))).next(p),{steps:n=n.next((e=>this._trackNumDragging(e))).next((e=>{const t=this._manipulatorInfos.filter((e=>"vertex"===e.type&&e.manipulator.selected));return e.manipulatorType===W.TRANSLATE_XY&&1===t.length?{...e,info:t[0],snapOrigin:t[0].handle.pos}:e})).next(me(this.view,e,t)).next(...l).next(ge()).next((e=>this._perGraphicManipulatorDragAction(We.SELECTED_OR_ALL,e))).next((e=>(this._updateTranslateTooltip(i,e),e))),cancel:r}}),e,s,t),g((()=>n.displaying),(()=>this._updateMoveManipulationPosition()),f),n.on("changed",(()=>{this._recreatingManipulators||this._updateMoveManipulationPosition()})),g((()=>n.isDraped),(e=>{this._updateMoveManipulationPosition();const t="align-move-manipulation";e?i.add(this.view.elevationProvider.on("elevation-change",(()=>this._updateMoveManipulationPosition())),t):i.remove(t)}),f)])}_createVisualElements(){const{graphic:e,view:t}=this,i=Q({view:t,graphic:e,forEachManipulator:e=>{if(!this.destroyed&&!this._recreatingManipulators){this._graphicMoveManipulation.forEachManipulator(e),this._moveManipulation.forEachManipulator(e);for(const t of this._manipulatorInfos)e(t.manipulator,W.TRANSLATE_XY)}},onManipulatorsChanged:e=>this.on("manipulators-changed",e)});l(i)&&(this._outlineVisualElement=i.visualElement instanceof pe?i.visualElement:null),l(this._outlineVisualElement)&&this._manipulatorHandles.add(this._outlineVisualElement.events.on("attachment-origin-changed",(()=>{this._graphicState.isDraped||this._updateMoveManipulationPosition()}))),this._manipulatorHandles.add(i)}_createEdgeOffsetManipulator(e,t=j(this.graphic)){const i=B.reshapeManipulators.edgeOffset,a=i.size/2,o=a+i.collisionPadding,r=a/o,s=r*Math.sqrt(3)/2;p(this._edgeOffsetManipulatorGeometryInside)&&(this._edgeOffsetManipulatorGeometryInside=de(this._edgeOffsetManipulatorMaterial,s,r/2,r/2,i.height,i.offset)),p(this._edgeOffsetManipulatorGeometryOutside)&&(this._edgeOffsetManipulatorGeometryOutside=de(this._edgeOffsetManipulatorMaterial,-s,r/2,r/2,i.height,-i.offset));const h=[new k(this._edgeOffsetManipulatorGeometryInside.instantiate(),Me.Unfocused),new k(this._edgeOffsetManipulatorGeometryInside.instantiate({material:this._edgeOffsetManipulatorHoverMaterial}),Me.Focused),new k(this._edgeOffsetManipulatorGeometryOutside.instantiate(),Me.Unfocused),new k(this._edgeOffsetManipulatorGeometryOutside.instantiate({material:this._edgeOffsetManipulatorHoverMaterial}),Me.Focused)],d=new U({view:this.view,renderObjects:h,elevationInfo:"on-the-ground"!==t.mode||P(this.graphic.symbol)?{mode:"absolute-height",offset:0}:t,worldOriented:!1,focusMultiplier:1,radius:o,available:!(!this.graphic.visible||!this.graphic.layer?.visible),collisionType:{type:"disc",direction:V(0,0,1)},collisionPriority:1,metadata:{deleting:!1}}),u=new U({view:this.view,worldSized:!0,worldOriented:!1,available:!(!this.graphic.visible||!this.graphic.layer?.visible),collisionPriority:-10,cursor:this.enableMoveGraphic?"move":"default",metadata:{deleting:!1}}),c={manipulator:d,handle:e,locationUpdateHandle:null,type:"edge",selectedIndex:0,edgeManipulator:u,elevationInfo:t,visibilityHandle:null};this._autoHideEdgeOffsetManipulator(c,i.minSquaredEdgeLength),this._updateEdgeOffsetManipulator(c);const m=[];for(const n of[c.handle.leftVertex,c.handle.rightVertex]){const e=this._getManipulatorInfoFromHandle(n);l(e)&&m.push(e.manipulator.events.on("location-update",(()=>this._updateEdgeOffsetManipulator(c))))}c.locationUpdateHandle=n(m),this._manipulatorHandles.add(c.locationUpdateHandle,d),this._manipulatorHandles.add([this._watchAndUpdateGrabState(d,!0),this._watchAndUpdateGrabState(u,!0)],d),this._manipulatorHandles.add(_e(d,this._createEdgeOffsetPipeline(c,t)),d),this._manipulatorHandles.add(_e(u,((e,i,a,o)=>{if("touch"===o){this._createEdgeOffsetPipeline(c,t)(e,i,a)}else if(this.enableMoveGraphic){const o=this.graphic,n=l(o.geometry)?o.geometry.spatialReference:null;i.next((e=>this._trackNumDragging(e))).next(fe(this.view,e.elevationAlignedLocation)).next(Y(this.view,e.elevationAlignedLocation,t,n,o)).next(ve()).next(ge()).next((e=>this._perGraphicManipulatorDragAction(We.ALL,e))).next((e=>(this._updateTranslateGraphicTooltip(ee.XY,e),e))).next((e=>{"end"===e.action&&this._tooltip.clear()})),a.next((()=>this._onDragCancel(!e.metadata.deleting)))}})),d);const g=e=>{this._manipulatorInfos.some((e=>e.manipulator.selected))?this._clearSelection():this.emit("immediate-click",{...e,graphic:this.graphic}),e.stopPropagation()};return this._manipulatorHandles.add([d.events.on("immediate-click",g),u.events.on("immediate-click",g),d.events.on("focus-changed",(({action:e})=>{const t=this._tooltipOptions;if("focus"===e&&t.enabled){const e=this._tooltip.info=new Ge({tooltipOptions:t});this._updateTooltipAreaOrTotalLength(e)}else this._tooltip.clear()}))],d),this._manipulatorInfos.push(c),this.manipulators.add(d),this.manipulators.add(u),this.emit("manipulators-changed"),c}_autoHideEdgeOffsetManipulator(e,t){const i=e.manipulator,a=e.edgeManipulator,o=()=>{e.visibilityHandle=d(e.visibilityHandle);const o=this._getManipulatorInfoFromHandle(e.handle.leftVertex),r=this._getManipulatorInfoFromHandle(e.handle.rightVertex),s=l(o)&&l(r)&&le(o.manipulator.renderLocation,r.manipulator.renderLocation,this.view.state.camera)<t;(!i.focused&&!a.focused||s)&&(i.grabbable=!s,a.grabbable=!s,e.visibilityHandle=n([i.disableDisplay(),{remove:()=>{i.grabbable=!0,a.grabbable=this.enableMoveGraphic}}]))};this._manipulatorHandles.add([i.events.on("focus-changed",o),a.events.on("focus-changed",o),{remove:()=>{d(e.visibilityHandle),a.metadata.deleting=!0,this.manipulators.remove(a)}}],i),o()}_updateEdgeOffsetManipulator(e){this._updateManipulatorPosition(e);const{coordinateHelper:t}=h(this._editGeometryOperations).data,i=ne(this.view,e.manipulator.elevationAlignedLocation,re(t,e.handle,h(e.manipulator.elevationInfo))),a=this._getManipulatorInfoFromHandle(e.handle.leftVertex),o=this._getManipulatorInfoFromHandle(e.handle.rightVertex);if(p(a)||p(o))return;const n=a.manipulator.renderLocation,r=o.manipulator.renderLocation,s=l(i)?se(i,n,r):x;e.manipulator.modelTransform=s,e.edgeManipulator.elevationAlignedLocation=e.manipulator.elevationAlignedLocation,e.edgeManipulator.modelTransform=s;const d=O(b(Xe,n,r))/2;e.edgeManipulator.collisionType={type:"line",paths:[[[-d,0,0],[d,0,0]]]}}_createEdgeOffsetPipeline(e,t){return(i,a,o)=>{this._clearSelection();const{step:n,cleanup:r}=this._initializeEdgeOffset(e,t);a.next((e=>this._trackNumDragging(e))).next(fe(this.view,i.elevationAlignedLocation)).next(n).next(X(this.view)).next(Z(this.view,h(this._editGeometryOperations).data.spatialReference)).next(ge()).next(this._applyComputeEdgeOffsetDistanceStep()).next(this._applyEdgeOffsetStep(e)).next(this._showEdgeOffsetTooltip()).next((e=>{"end"===e.action&&r()})),o.next((()=>{i.metadata.deleting||(r(),this._onDragCancel())}))}}_initializeEdgeOffset(e,t){const i=h(this._editGeometryOperations),a=re(i.data.coordinateHelper,e.handle,t),o=i.createUndoGroup(),s=ne(this.view,e.manipulator.elevationAlignedLocation,a);if(a.requiresSplitEdgeLeft){const t=this._getManipulatorInfoFromHandle(e.handle.leftVertex.leftEdge);l(t)&&this._splitEdgeManipulator(t,1)}if(a.requiresSplitEdgeRight){const t=this._getManipulatorInfoFromHandle(e.handle.rightVertex.rightEdge);l(t)&&this._splitEdgeManipulator(t,0)}const u=()=>new T({paths:[[e.handle.leftVertex.pos,e.handle.rightVertex.pos]],spatialReference:i.data.spatialReference}),c=new pe({view:this.view,isDraped:this._graphicState.isDraped,geometry:u(),elevationInfo:e.elevationInfo,width:B.visualElements.lineGraphics.outline.width,color:B.colorToVec4(J.main),attached:!0});let m;const _=()=>{this._cleanEdgeOffsetCollapsedEdges(e),m=d(m)},f=this.on("undo",_);return m=n([r(c),g((()=>this._graphicState.isDraped),(e=>c.isDraped=e)),this._graphicState.on("changed",(()=>c.geometry=u())),o,f]),{step:e=>p(a)||p(s)?(_(),null):{...e,operation:a,plane:s},cleanup:_}}_applyEdgeOffsetStep(e){return t=>{if(this.destroyed||p(t.operation))return t;this._updateEventState(qe.RESHAPING);const{mapDeltaX:i,mapDeltaY:a,mapDeltaZ:o}=t;return(i||a||o)&&(this._offsetEdge(e,t),this.emit("reshape",{type:"reshape",mover:this.graphic})),t}}_applyComputeEdgeOffsetDistanceStep(){return e=>{const{operation:t,mapEnd:i}=e;return p(t)||p(i)?e:("start"===e.action&&t.selectArrowFromStartPoint(i),{...e,signedDistance:t.signedDistanceToPoint(i)})}}_showEdgeOffsetTooltip(){return e=>{const{mapEnd:t,signedDistance:i,operation:a}=e,o=this._tooltip,n=this._tooltipOptions;if(!n.enabled||p(i))return o.clear(),e;let r=o.info;(p(r)||"reshape-edge-offset"!==r.type)&&(r=o.info=new Ge({tooltipOptions:n}));const{coordinateHelper:s}=h(this._editGeometryOperations).data;return r.distance="end"===e.action?u:Fe(this._graphicState.isDraped,i*a.selectedArrow,t,a.plane,s),this._updateTooltipAreaOrTotalLength(r),e}}_cleanEdgeOffsetCollapsedEdges(e){const t=e.handle.leftVertex.leftEdge?.leftVertex,i=e.handle.leftVertex,a=e.handle.rightVertex.rightEdge?.rightVertex,o=e.handle.rightVertex,n=h(this._editGeometryOperations).data.coordinateHelper,r=[];if(t&&n.distance(t.pos,i.pos)<Ze){const e=this._getManipulatorInfoFromHandle(i);l(e)&&r.push(e)}if(n.distance(i.pos,o.pos)<Ze||a&&n.distance(a.pos,o.pos)<Ze){const e=this._getManipulatorInfoFromHandle(o);l(e)&&r.push(e)}r.length&&this._removeVertices(r)}_computeVertexManipulatorSizeAndOutline(e){const t=e.size/2,i=t+e.collisionPadding;return{size:t/i,outlineSize:(t+e.outlineSize)/i}}_createVertexOrEdgeManipulator(e,t=j(this.graphic),i=!1){if("edge"===e.type){if(this.enableEdgeOffset)return this._createEdgeOffsetManipulator(e,t);if(!this.enableMidpoints)return null}if(p(this._vertexManipulatorGeometry)||p(this._vertexManipulatorOutlineGeometry)){const{size:e,outlineSize:t}=this._computeVertexManipulatorSizeAndOutline(B.reshapeManipulators.vertex);this._vertexManipulatorGeometry=ue(this._vertexManipulatorMaterial,e,16,16),this._vertexManipulatorOutlineGeometry=ue(this._vertexManipulatorOutlineMaterial,t,16,16)}if(p(this._edgeManipulatorGeometry)||p(this._edgeManipulatorOutlineGeometry)){const{size:e,outlineSize:t}=this._computeVertexManipulatorSizeAndOutline(B.reshapeManipulators.edge);this._edgeManipulatorGeometry=ue(this._edgeManipulatorMaterial,e,16,16),this._edgeManipulatorOutlineGeometry=ue(this._edgeManipulatorOutlineMaterial,t,16,16)}const a=l(this.graphic.geometry)&&"point"===this.graphic.geometry.type?[]:[new k(this._vertexManipulatorGeometry.instantiate(),Ye.Vertex|Me.Unselected),new k(this._vertexManipulatorOutlineGeometry.instantiate(),Ye.Vertex|Me.Unfocused|Me.Unselected),new k(this._vertexManipulatorOutlineGeometry.instantiate({material:this._vertexManipulatorHoverOutlineMaterial}),Ye.Vertex|Me.Focused|Me.Unselected),new k(this._vertexManipulatorGeometry.instantiate({material:this._selectedManipulatorMaterial}),Me.Selected),new k(this._vertexManipulatorOutlineGeometry.instantiate({material:this._selectedManipulatorOutlineMaterial}),Me.Selected|Me.Unfocused),new k(this._vertexManipulatorOutlineGeometry.instantiate({material:this._selectedManipulatorHoverOutlineMaterial}),Me.Selected|Me.Focused)];this.enableMidpoints&&a.push(new k(this._edgeManipulatorGeometry.instantiate({material:this._vertexManipulatorMaterial}),Ye.Edge|Me.Focused|Me.Unselected),new k(this._edgeManipulatorOutlineGeometry.instantiate({material:this._vertexManipulatorHoverOutlineMaterial}),Ye.Edge|Me.Focused|Me.Unselected),new k(this._edgeManipulatorGeometry.instantiate(),Ye.Edge|Me.Unfocused|Me.Unselected),new k(this._edgeManipulatorOutlineGeometry.instantiate(),Ye.Edge|Me.Unfocused|Me.Unselected));const o=new U({view:this.view,renderObjects:a,elevationInfo:t,focusMultiplier:1,touchMultiplier:1,available:!(!this.graphic.visible||!this.graphic.layer?.visible),metadata:{deleting:!1}});o.selected=i,this._setTypeSpecificManipulatorSettings(o,e,t);const r="edge"===e.type?{manipulator:o,handle:e,locationUpdateHandle:null,type:"edge",selectedIndex:0}:{manipulator:o,handle:e,type:"vertex",selectedIndex:0};if(this._manipulatorInfos.push(r),this.manipulators.add(o),this._updateManipulatorPosition(r),"edge"===r.type){const e=[];for(const t of[r.handle.leftVertex,r.handle.rightVertex]){const i=this._getManipulatorInfoFromHandle(t);l(i)&&e.push(i.manipulator.events.on("location-update",(()=>this._updateManipulatorPosition(r))))}r.locationUpdateHandle=n(e),this._manipulatorHandles.add(r.locationUpdateHandle,o)}this._manipulatorHandles.add(this._watchAndUpdateGrabState(o,!0),o);const s=_e(o,((e,i,a,o)=>{let n=null;const{snappingStep:s,cancelSnapping:l}=Ee({predicate:()=>!this._isMultiVertexSelection(),snappingManager:this.tool.snappingManager,snappingContext:new be({editGeometryOperations:h(this._editGeometryOperations),elevationInfo:t,pointer:o,excludeFeature:this.graphic,visualizer:new z}),updatingHandles:this.updatingHandles,useZ:!1});a=a.next((t=>(this._onDragCancel(!e.metadata.deleting,(()=>n=d(n))),t))).next(l),i.next((e=>this._trackNumDragging(e))).next((e=>{if("start"===e.action&&(n=h(this._editGeometryOperations).createUndoGroup()),"edge"===r.type){const t=this._splitEdgeManipulator(r);return{...e,info:t,snapOrigin:t.handle.pos}}return{...e,info:r,snapOrigin:r.handle.pos}})).next(fe(this.view,e.elevationAlignedLocation)).next(q(this.view,this.graphic,e.elevationAlignedLocation,e.location.spatialReference,this.graphic)).next(me(this.view,t,this.graphic)).next(...s).next(ge()).next((t=>{this._perVertexManipulatorDragAction(t),"end"===t.action&&(n=d(n)),this._updateTranslateVertexTooltip(e,ee.XY,t)}))}));return this._manipulatorHandles.add([s,o.events.on("immediate-click",(e=>this._manipulatorClickCallback(e,r))),o.events.on("select-changed",(()=>{r.selectedIndex=++this._selectedIndex,this._updateMoveManipulationPosition()})),o.events.on("focus-changed",(({action:e})=>{"focus"===e&&"edge"!==r.type?this._updateTranslateVertexTooltip(o,ee.XY):this._tooltip.clear()}))],o),this.emit("manipulators-changed"),r}_trackNumDragging(e){switch(e.action){case"start":this._numDragging++;break;case"end":this._numDragging--}return e}_onDragCancel(e=!0,t){switch(this._numDragging--,e&&(this.undo(),this.outputGeometry=l(this._editGeometryOperations)?this._editGeometryOperations.data.geometry:null),l(this.tool.snappingManager)&&this.tool.snappingManager.doneSnapping(),this._tooltip.clear(),this._reshapeEventState){case qe.NONE:break;case qe.MOVING:this.emit("move",{type:"move",dx:0,dy:0,mover:this.graphic});break;case qe.RESHAPING:this.emit("reshape",{type:"reshape",mover:this.graphic})}t&&t(),this.destroyed||this._updateEventState(qe.NONE)}_setTypeSpecificManipulatorSettings(e,t,i){switch(t.type){case"vertex":e.state=Ye.Vertex,e.selectable=!0,e.cursor="move",e.collisionPriority=2,e.radius=B.reshapeManipulators.vertex.size/2+B.reshapeManipulators.vertex.collisionPadding,e.elevationInfo=i,e.interactive=l(this.graphic.geometry)&&"point"!==this.graphic.geometry.type;break;case"edge":e.state=Ye.Edge,e.selectable=!1,e.cursor="copy",e.collisionPriority=-1,e.radius=B.reshapeManipulators.edge.size/2+B.reshapeManipulators.edge.collisionPadding,e.elevationInfo="on-the-ground"!==i.mode||P(this.graphic.symbol)?{mode:"absolute-height",offset:0}:i}}_watchAndUpdateGrabState(e,t){return e.events.on("grab-changed",(i=>this._onGrabStateChanged(e,t,i.action,i.pointerType)))}_onGrabStateChanged(e,t,i,a="mouse"){if(!this._recreatingManipulators){if("start"===i)t&&this._updateSelection(e),this._numGrabbing++;else if(this._numGrabbing--,this._updateEventState(qe.NONE),this.destroyed)return;this._moveManipulation.interactive=!this._numGrabbing,("touch"!==a||this.enableEdgeOffset)&&(this._manipulatorInfos.forEach((e=>{e.manipulator.interactive=e.manipulator.grabbing||!this._numGrabbing&&l(this.graphic.geometry)&&"point"!==this.graphic.geometry.type,"edgeManipulator"in e&&(e.edgeManipulator.interactive=e.edgeManipulator.grabbing||!this._numGrabbing)})),this._graphicMoveManipulation.forEachManipulator((e=>{e.interactive=e.grabbing||!this._numGrabbing})))}}_clearSelection(){for(const e of this._manipulatorInfos)e.manipulator.grabbing||(e.manipulator.selected=!1)}_updateSelection(e){e.grabbing&&!e.selected&&e.selectable&&(this._clearSelection(),e.selected=!0,this.emit("manipulators-changed"))}_removeManipulator(e){p(e)||(e.manipulator.metadata.deleting=!0,this.manipulators.remove(e.manipulator),this._manipulatorHandles.remove(e.manipulator),t(this._manipulatorInfos,e),this.emit("manipulators-changed"))}_getManipulatorInfoFromHandle(e){if(e)for(const t of this._manipulatorInfos)if(e===t.handle)return t;return null}_updateManipulatorPosition(e){if(p(e))return;const t=h(this._editGeometryOperations);if("vertex"===e.type)e.manipulator.location=t.data.coordinateHelper.vectorToDehydratedPoint(e.handle.pos,ze),e.manipulator.grabbing&&l(this._vertexLaserLineVisualElement)&&(this._vertexLaserLineVisualElement.visualElement.intersectsWorldUpAtLocation=e.manipulator.renderLocation);else if("edge"===e.type){const i=this._getManipulatorInfoFromHandle(e.handle.leftVertex),a=this._getManipulatorInfoFromHandle(e.handle.rightVertex);if(p(i)||p(a))return;const o=i.manipulator,n=a.manipulator;if(l(e.manipulator.elevationInfo)&&"on-the-ground"===e.manipulator.elevationInfo.mode){const i=o.location,a=n.location,r=.5,s=i.x+r*(a.x-i.x),l=i.y+r*(a.y-i.y),p=i.hasZ&&a.hasZ?0:void 0;e.manipulator.location=L(s,l,p,t.data.spatialReference)}else E(Xe,o.renderLocation,n.renderLocation,.5),e.manipulator.renderLocation=Xe}}_splitEdgeManipulator(e,t=.5){const i=h(this._editGeometryOperations),a=h(i.splitEdge(e.handle,t).createdVertex);e.locationUpdateHandle=d(e.locationUpdateHandle);const o=j(this.graphic);let n;this.enableEdgeOffset?(this._removeManipulator(e),n=this._createVertexOrEdgeManipulator(a)):(n=e,n.handle=a,n.type="vertex",this._setTypeSpecificManipulatorSettings(e.manipulator,e.handle,o)),a.leftEdge&&this._createVertexOrEdgeManipulator(a.leftEdge),a.rightEdge&&this._createVertexOrEdgeManipulator(a.rightEdge),this.outputGeometry=i.data.geometry,this._updateManipulatorPosition(n),this.enableEdgeOffset||this._updateTranslateVertexTooltip(n.manipulator,ee.XY),this._updateSelection(e.manipulator);const r=this._updateEventState(qe.RESHAPING),s=i.data.coordinateHelper.vectorToArray(n.handle.pos),l=i.data.components.indexOf(a.component);return this.emit("vertex-add",{type:"vertex-add",vertices:[{coordinates:s,componentIndex:l,vertexIndex:h(a.index)}],added:s}),r&&this._updateEventState(qe.NONE),n}_updateMoveManipulationPosition(){const e=G(Xe,0,0,0);let t=0,i=!1,a=null,o=null;for(const n of this._manipulatorInfos)"vertex"===n.type&&(n.manipulator.selected?(t++,S(e,e,n.manipulator.renderLocation),p(a)||n.selectedIndex>a.selectedIndex?(o=a,a=n):(p(o)||n.selectedIndex>o.selectedIndex)&&(o=n)):i=!0);if(0===t){const e=this._graphicState.displaying&&this.enableMoveGraphic;this._moveManipulation.xyManipulation.available=e,this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e,this._moveManipulation.zManipulation.available=e&&this.enableZShape&&K(this.graphic),this._moveManipulation.angle=ie(h(this.graphic.geometry)),this._moveManipulation.radius=te.radiusForSymbol(this.graphic.symbol)}else{const e=this._graphicState.displaying;this._moveManipulation.xyManipulation.available=e,this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.zManipulation.available=e&&this.enableZVertex&&K(this.graphic),this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e&&1!==t;let i=0;if(l(a)){const e=a.handle.pos,t=l(o)?o.handle.pos:a.handle.leftEdge&&a.handle.leftEdge.leftVertex?a.handle.leftEdge.leftVertex.pos:null,n=p(o)&&a.handle.rightEdge&&a.handle.rightEdge.rightVertex?a.handle.rightEdge.rightVertex.pos:null;t&&n?this._moveManipulation.xyAxisManipulation.available=!1:t?i=ke(t,e):n&&(i=ke(e,n))}this._moveManipulation.angle=i,this._moveManipulation.radius=$}0!==t&&i?(w(e,e,1/t),ze.spatialReference=h(this._editGeometryOperations).data.spatialReference,ze.hasZ=!0,this.view.renderCoordsHelper.fromRenderCoords(e,ze),this._moveManipulation.elevationAlignedLocation=ze):l(this._outlineVisualElement)&&!this._graphicState.isDraped&&l(this._outlineVisualElement.attachmentOrigin)?this._moveManipulation.elevationAlignedLocation=this._outlineVisualElement.attachmentOrigin:R(this.view,this._moveManipulation,this.graphic)}_removeVertices(e){const t=new Array,i=h(this._editGeometryOperations);for(const a of e)if("vertex"===a.type&&i.canRemoveVertex()){t.push(a.handle),this._removeManipulator(a),this._removeManipulator(this._getManipulatorInfoFromHandle(a.handle.leftEdge)),this._removeManipulator(this._getManipulatorInfoFromHandle(a.handle.rightEdge));const e=i.removeVertices([a.handle]),o=h(e.removedVertices?.[0].createdEdge);o&&this._createVertexOrEdgeManipulator(o)}if(t.length>0){const e=t.map((e=>{const t=i.data.components.indexOf(e.component);return{coordinates:i.data.coordinateHelper.vectorToArray(e.pos),componentIndex:t,vertexIndex:h(e.index)}}));this.outputGeometry=i.data.geometry;const a=this._updateEventState(qe.RESHAPING);if(this.destroyed)return;if(this.emit("vertex-remove",{type:"vertex-remove",removed:e.map((e=>e.coordinates)),vertices:e}),this.destroyed)return;if(a&&(this._updateEventState(qe.NONE),this.destroyed))return;this._updateMoveManipulationPosition()}}_moveVertices(e,t,i=("start"===t.action?Oe.NEW_STEP:Oe.ACCUMULATE_STEPS)){const a=h(this._editGeometryOperations);a.moveVertices(e.map((e=>e.handle)),t.mapDeltaX,t.mapDeltaY,t.mapDeltaZ,i),this.outputGeometry=a.data.geometry;for(const o of e)this._updateManipulatorPosition(o)}_offsetEdge(e,t){if(p(t.operation)||p(t.signedDistance))return;const i=h(this._editGeometryOperations),a=t.operation.clone();a.distance=t.signedDistance,i.updateVertices([e.handle.leftVertex,e.handle.rightVertex],a),this.outputGeometry=i.data.geometry,this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(e.handle.leftVertex)),this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(e.handle.rightVertex))}_manipulatorClickCallback(e,t){e.shiftKey||this._clearSelection(),"vertex"===t.type&&(t.manipulator.selected=!t.manipulator.selected,e.button===ce.Right&&this._removeVertices([t])),"edge"===t.type&&e.button===ce.Left&&this._splitEdgeManipulator(t),e.stopPropagation()}_updateTranslateTooltip(e,t){const i=this._manipulatorInfos.filter((e=>"vertex"===e.type&&e.manipulator.selected));1===i.length?this._updateTranslateVertexTooltip(i[0].manipulator,e,t):this._updateTranslateGraphicTooltip(e,t)}_updateTranslateGraphicTooltip(e,t){const i=this._tooltipOptions;if(!i.enabled)return;const a=this._graphicState.isDraped?"on-the-ground":"absolute-height";switch(e){case ee.XY:this._tooltip.info=new Ie({tooltipOptions:i}),this._updateTranslateTooltipDistance(this._tooltip.info,t,((e,t)=>Le(e,t,a)));break;case ee.XY_AXIS:this._tooltip.info=new Ve({tooltipOptions:i}),this._updateTranslateTooltipDistance(this._tooltip.info,t,((e,i)=>{const o=Le(e,i,a);return c(o,ae(t))}));break;case ee.Z:this._tooltip.info=new we({tooltipOptions:i}),this._updateTranslateTooltipDistance(this._tooltip.info,t,Pe)}}_updateTranslateVertexTooltip(e,t,i){const a=this._tooltipOptions;if(!a.enabled)return;let o;const n=this._graphicState.isDraped?"on-the-ground":"absolute-height";switch(t){case ee.XY:o=new He({tooltipOptions:a}),this._updateTranslateTooltipDistance(o,i,((e,t)=>Le(e,t,n))),this._updateTooltipAreaOrTotalLength(o);break;case ee.XY_AXIS:o=new Ae({tooltipOptions:a}),this._updateTranslateTooltipDistance(o,i,((e,t)=>{const a=Le(e,t,n);return c(a,ae(i))})),this._updateTooltipAreaOrTotalLength(o);break;case ee.Z:o=new Te({tooltipOptions:a}),this._updateTranslateTooltipDistance(o,i,Pe)}const r=Ue(e.elevationAlignedLocation);l(r)&&(o.elevation={mode:"absolute-height",...r}),this._tooltip.info=o}_updateTranslateTooltipDistance(e,t,i){if(l(t)&&"end"!==t.action){const{mapStart:a,mapEnd:o}=t,n=i(a,o);e.distance=l(n)?n:u}}_updateTooltipAreaOrTotalLength(e){const{geometry:t}=this.graphic;if(p(t))return;const i=this._graphicState.isDraped?"on-the-ground":"absolute-height";e.area="polygon"===t.type?De(t,i):null,e.totalLength="polyline"===t.type?je(t,i):null}get test(){return{segmentLabels:this._segmentLabels,tooltip:this._tooltip}}};function ke(e,t){return Math.atan2(t[1]-e[1],t[0]-e[0])+Math.PI/2}function Fe(e,t,i,a,o){if(e){const e=o.toXYZ(o.pointToVector(i)),n=H(a,e,D.get()),r=Ne(n,e,o.spatialReference);if(l(r))return m(r.value*Math.sign(t),r.unit)}return m(t*v(i.spatialReference),"meters")}e([M()],Re.prototype,"_editGeometryOperations",void 0),e([M()],Re.prototype,"_segmentLabels",void 0),e([M({constructOnly:!0})],Re.prototype,"tool",void 0),e([M()],Re.prototype,"_tooltip",void 0),e([M()],Re.prototype,"inputGeometry",null),e([M()],Re.prototype,"outputGeometry",void 0),e([M({readOnly:!0})],Re.prototype,"updating",null),e([M()],Re.prototype,"manipulators",null),e([M()],Re.prototype,"view",null),e([M()],Re.prototype,"graphic",null),e([M()],Re.prototype,"enableZShape",null),e([M()],Re.prototype,"enableZVertex",null),e([M()],Re.prototype,"enableMoveGraphic",null),e([M()],Re.prototype,"enableMidpoints",null),e([M()],Re.prototype,"enableEdgeOffset",null),e([M()],Re.prototype,"_labelOptions",null),e([M()],Re.prototype,"_tooltipOptions",null),Re=e([y("esri.views.3d.interactive.editingTools.reshapeGraphic.ReshapeOperation")],Re);const ze=L(0,0,void 0,Ce.WGS84),Xe=I(),Ze=1e-6;var Ye,qe,We;!function(e){e.Vertex=ye.Custom1,e.Edge=ye.Custom2}(Ye||(Ye={})),function(e){e[e.NONE=0]="NONE",e[e.MOVING=1]="MOVING",e[e.RESHAPING=2]="RESHAPING"}(qe||(qe={})),function(e){e[e.ALL=0]="ALL",e[e.SELECTED_OR_ALL=1]="SELECTED_OR_ALL"}(We||(We={}));export{Re as ReshapeOperation};