/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../chunks/_rollupPluginBabelHelpers","../../../geometry","../../../Graphic","../../../symbols","../../../core/handleUtils","../../../core/screenUtils","../../../chunks/vec2","../../../chunks/vec2f64","../../../chunks/vec3f64","../../../symbols/cim/enums","../../draw/support/settings","../../interactive/snapping/Settings","../../interactive/snapping/SnappingVisualizer","../../../symbols/SimpleMarkerSymbol","../../../symbols/SimpleLineSymbol","../../../symbols/CIMSymbol","../../../geometry/Point","../../../geometry/Polyline"],(function(e,t,i,n,r,a,o,l,s,c,p,y,m,u,b,S,d,h,g){"use strict";let M=function(e){function i(t){var i;return(i=e.call(this)||this).graphicsLayer=t,i}t._inheritsLoose(i,e);var r=i.prototype;return r.visualizeIntersectionPoint=function(e,t){return this._visualizeSnappingIndicator(new h({x:e.intersectionPoint[0],y:e.intersectionPoint[1],spatialReference:t.coordinateHelper.spatialReference}),I)},r.visualizePoint=function(e,t){return this._visualizeSnappingIndicator(new h({x:e.point[0],y:e.point[1],spatialReference:t.coordinateHelper.spatialReference}),x)},r.visualizeLine=function(e,t){return this._visualizeSnappingIndicator(new g({paths:[[e.lineStart,e.lineEnd]],spatialReference:t.coordinateHelper.spatialReference}),v)},r.visualizeParallelSign=function(e,t){return this._visualizeSnappingIndicator(new g({paths:[[e.lineStart,e.lineEnd]],spatialReference:t.coordinateHelper.spatialReference}),L)},r.visualizeRightAngleQuad=function(e,t){return this._visualizeSnappingIndicator(new g({paths:[[e.previousVertex,e.centerVertex,e.nextVertex]],spatialReference:t.coordinateHelper.spatialReference}),R(e))},r._visualizeSnappingIndicator=function(e,t){const i=new n({geometry:e,symbol:t});return this.graphicsLayer.add(i),a.makeHandle((()=>{this.graphicsLayer.remove(i)}))},i}(u.SnappingVisualizer);const P=y.colors.main.toArray(),f=[...y.colors.main.toRgb(),100],I=new b({outline:new S({width:1.5,color:P}),size:15,color:[0,0,0,0]}),x=new b({outline:{width:.5,color:[0,0,0,1]},size:10,color:P}),v=new d({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,capStyle:p.LineCapStyle.Butt,joinStyle:p.LineJoinStyle.Round,miterLimit:10,width:o.px2pt(m.defaults.lineHintWidthTarget),color:P}]}}}),L=new d({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,anchorPoint:{x:0,y:-1,z:0},anchorPointUnits:"Relative",size:5,markerPlacement:{type:"CIMMarkerPlacementOnLine",placePerPart:!0,angleToLine:!0,relativeTo:"LineMiddle"},frame:{xmin:-5,ymin:-1.5,xmax:5,ymax:1.5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[7,0],[-7,0],[-7,1.5],[7,1.5]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:P}]}}],scaleSymbolsProportionally:!0,respectFrame:!0},{type:"CIMVectorMarker",enable:!0,anchorPoint:{x:0,y:1,z:0},anchorPointUnits:"Relative",size:5,markerPlacement:{type:"CIMMarkerPlacementOnLine",placePerPart:!0,angleToLine:!0,relativeTo:"LineMiddle"},frame:{xmin:-5,ymin:-1.5,xmax:5,ymax:1.5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[7,0],[-7,0],[-7,-1.5],[7,-1.5]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:P}]}}],scaleSymbolsProportionally:!0,respectFrame:!0}]}}}),C=e=>new d({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,anchorPoint:{x:.5,y:.5,z:0},anchorPointUnits:"Relative",size:o.px2pt(m.defaults.rightAngleHintSize),rotation:e,markerPlacement:{type:"CIMMarkerPlacementOnVertices",placePerPart:!0,angleToLine:!0,placeOnEndPoints:!1},frame:{xmin:-5,ymin:-5,xmax:5,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{paths:[[[5,-5],[-5,-5],[-5,5],[5,5],[5,-5]]]},symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,capStyle:"Butt",joinStyle:"Round",miterLimit:10,width:o.px2pt(m.defaults.rightAngleHintOutlineSize),color:P},{type:"CIMSolidFill",enable:!0,color:f}]}}],scaleSymbolsProportionally:!0,respectFrame:!0}]}}}),z=C(45),k=C(225),R=(()=>{const e=s.create(),t=s.create(),i=c.create();return n=>(l.subtract(e,n.centerVertex,n.previousVertex),l.subtract(t,n.nextVertex,n.previousVertex),l.cross(i,e,t),i[2]<0?z:k)})();e.SnappingVisualizer2D=M,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
