text: // All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  // See http://js.arcgis.com/3.15/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details.
  
  //>>built
  require({cache:{"url:widgets/DistanceAndDirection/templates/TabEllipse.html":'\x3cdiv class\x3d"tabPanel" data-dojo-attach-point\x3d"ellipseContainer"\x3e\r\n  \x3cdiv class\x3d"controls"\x3e\r\n    \x3cdiv class\x3d"controlGroup"\x3e\r\n      \x3clabel\x3e${nls.ellipseTypeLabel}\x3c/label\x3e\r\n      \x3cdiv class\x3d"controlItem"\x3e\r\n        \x3cselect aria-label\x3d"${nls.ellipseTypeLabel}" style\x3d"width: 100%;" data-dojo-type\x3d"jimu/dijit/formSelect"\r\n          data-dojo-attach-point\x3d"ellipseType" class\x3d"esriCTDropdownObj"\x3e\r\n          \x3coption value\x3d"semi"\x3e${nls.ellipseSemiLabel}\x3c/option\x3e\r\n          \x3coption value\x3d"full"\x3e${nls.ellipseFullLabel}\x3c/option\x3e\r\n        \x3c/select\x3e\r\n      \x3c/div\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv class\x3d"controlGroup"\x3e\r\n      \x3clabel data-dojo-attach-point\x3d"coordInputLabel"\x3e${nls.centerPointLabel}\x3c/label\x3e\r\n      \x3cdiv class\x3d"controlItem"\x3e\r\n        \x3cdiv class\x3d"jimu-input coordInput" data-dojo-attach-point\x3d"startPointCoords"\r\n          placeholder\x3d"${nls.startPointPlaceHolderLabel}"\x3e\r\n        \x3c/div\x3e\r\n        \x3cdiv class\x3d"controlItem paddedLeft"\x3e\r\n          \x3cdiv class\x3d\'add-with-icon\'\x3e\r\n            \x3cspan title\x3d"${nls.formatInputLabel}" class\x3d"jimu-icon settingBtn safariOnly"\r\n              data-dojo-attach-point\x3d"coordinateFormatButton" tabindex\x3d"0" role\x3d"button"\r\n              aria-label\x3d"${nls.formatInputLabel}"\x3e\x3c/span\x3e\r\n          \x3c/div\x3e\r\n          \x3cdiv class\x3d\'add-with-icon\'\x3e\r\n            \x3cdiv title\x3d"${nls.drawEllipseLabel}" class\x3d"drawPointBtn" data-dojo-attach-point\x3d"addPointBtn" tabindex\x3d"0"\r\n              role\x3d"button" aria-label\x3d"${nls.drawEllipseLabel}"\x3e\x3c/div\x3e\r\n          \x3c/div\x3e\r\n        \x3c/div\x3e\r\n      \x3c/div\x3e\r\n      \x3cdiv class\x3d"controlGroup"\x3e\r\n        \x3cinput aria-label\x3d"${nls.createEllipseInteractively}" class\x3d"interactive-checkbox esriCTCheckboxObj"\r\n          type\x3d"checkbox" data-dojo-attach-point\x3d"interactiveEllipse" aria-label\x3d"${nls.createEllipseInteractively}" /\x3e\r\n        \x3clabel data-dojo-attach-point\x3d"interactiveLabel"\x3e${nls.createEllipseInteractively}\x3c/label\x3e\r\n      \x3c/div\x3e\r\n    \x3c/div\x3e\r\n    \x3cfieldset\x3e\r\n      \x3clegend\x3e${nls.axisLabel}\x3c/legend\x3e\r\n      \x3cdiv class\x3d"controlGroup" data-dojo-attach-point\x3d"majorAxisInputDiv"\x3e\r\n        \x3clabel data-dojo-attach-point\x3d"majorAxisLabel"\x3e${nls.majorRadiusLabel}\x3c/label\x3e\r\n        \x3cdiv class\x3d"controlItem"\x3e\r\n          \x3cinput aria-label\x3d"${nls.majorRadiusLabel}" data-dojo-type\x3d"dijit/form/NumberTextBox" required\x3d\'true\' ,\r\n            value\x3d\'100\' , data-dojo-props\x3d"constraints:{min:0.1}" data-dojo-attach-point\x3d"majorAxisInput"\r\n            style\x3d"width: 100%;" /\x3e\r\n        \x3c/div\x3e\r\n      \x3c/div\x3e\r\n      \x3cdiv class\x3d"controlGroup" data-dojo-attach-point\x3d"minorAxisInputDiv"\x3e\r\n        \x3clabel data-dojo-attach-point\x3d"minorAxisLabel"\x3e${nls.minorRadiusLabel}\x3c/label\x3e\r\n        \x3cdiv class\x3d"controlItem"\x3e\r\n          \x3cinput aria-label\x3d"${nls.minorRadiusLabel}" data-dojo-type\x3d"dijit/form/NumberTextBox" required\x3d\'true\' ,\r\n            value\x3d\'50\' , data-dojo-props\x3d"constraints:{min:0.1}" data-dojo-attach-point\x3d"minorAxisInput"\r\n            style\x3d"width: 100%;" /\x3e\r\n        \x3c/div\x3e\r\n      \x3c/div\x3e\r\n      \x3cdiv class\x3d"controlGroup"\x3e\r\n        \x3clabel\x3e${nls.unitLabel}\x3c/label\x3e\r\n        \x3cdiv class\x3d"controlItem"\x3e\r\n          \x3cselect aria-label\x3d"${nls.unitLabel}" style\x3d"width: 100%;" data-dojo-type\x3d"jimu/dijit/formSelect"\r\n            id\x3d"lengthUnitDD" data-dojo-attach-point\x3d"lengthUnitDD"\x3e\r\n            \x3coption value\x3d"feet"\x3e${nls.units.feet}\x3c/option\x3e\r\n            \x3coption value\x3d"kilometers" selected\x3d"selected"\x3e${nls.units.kilometers}\x3c/option\x3e\r\n            \x3coption value\x3d"miles"\x3e${nls.units.miles}\x3c/option\x3e\r\n            \x3coption value\x3d"meters"\x3e${nls.units.meters}\x3c/option\x3e\r\n            \x3coption value\x3d"nautical-miles"\x3e${nls.units.nauticalMiles}\x3c/option\x3e\r\n            \x3coption value\x3d"yards"\x3e${nls.units.yards}\x3c/option\x3e\r\n          \x3c/select\x3e\r\n        \x3c/div\x3e\r\n      \x3c/div\x3e\r\n    \x3c/fieldset\x3e\r\n    \x3cdiv class\x3d"controlGroup"\x3e\r\n      \x3clabel\x3e${nls.orientationLabel}\x3c/label\x3e\r\n      \x3cdiv class\x3d"controlItem" data-dojo-attach-point\x3d"angleInputDiv"\x3e\r\n        \x3cinput aria-label\x3d"${nls.orientationLabel}" data-dojo-type\x3d"dijit/form/NumberTextBox" style\x3d"width: calc(100% - 108px);"\r\n          required\x3d\'true\' , value\x3d\'0\' , data-dojo-props\x3d"constraints:{min:0, max:360}"\r\n          data-dojo-attach-point\x3d"angleInput" /\x3e\r\n        \x3cselect aria-label\x3d"${nls.orientationLabel}" style\x3d"width: 100px" class\x3d"controlSpace noResize"\r\n          data-dojo-type\x3d"jimu/dijit/formSelect" id\x3d"angleUnitDD" data-dojo-attach-point\x3d"angleUnitDD"\x3e\r\n          \x3coption value\x3d"degrees"\x3e${nls.degreesLabel}\x3c/option\x3e\r\n          \x3coption value\x3d"mils"\x3e${nls.milsLabel}\x3c/option\x3e\r\n        \x3c/select\x3e\r\n      \x3c/div\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv class\x3d"controlGroup"\x3e\r\n      \x3clabel class\x3d"warning"\x3e${nls.warningMessage}\x3c/label\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv class\x3d"buttonContainer"\x3e\r\n      \x3cdiv class\x3d\'jimu-btn jimu-state-disabled\' data-dojo-attach-point\x3d\'okButton\' style\x3d"width: 49%;"\r\n        data-dojo-attach-event\x3d"onclick: okButtonClicked" aria-label\x3d"${nls.common.ok}" role\x3d"button"\x3e${nls.common.ok}\r\n      \x3c/div\x3e\r\n      \x3cdiv class\x3d\'jimu-btn\' tabindex\x3d"0" role\x3d"button" aria-label\x3d"${nls.clearGraphicsLabel}" style\x3d"width: 49%;"\r\n        data-dojo-attach-point\x3d\'clearGraphicsButton\'\x3e${nls.clearGraphicsLabel}\x3c/div\x3e\r\n    \x3c/div\x3e\r\n  \x3c/div\x3e\r\n\x3c/div\x3e'}});
  define("dojo/_base/declare dojo/_base/lang dojo/_base/kernel dojo/on dojo/topic dojo/has dojo/touch dojo/dom-attr dojo/dom-class dojo/string dojo/number dojo/mouse dojo/keys dijit/_WidgetBase dijit/_TemplatedMixin dijit/TooltipDialog dijit/_WidgetsInTemplateMixin dijit/popup jimu/dijit/Message jimu/LayerInfos/LayerInfos jimu/utils esri/layers/GraphicsLayer esri/layers/FeatureLayer esri/layers/LabelClass esri/symbols/SimpleMarkerSymbol esri/symbols/SimpleFillSymbol esri/symbols/TextSymbol esri/graphic esri/tasks/FeatureSet ../models/EllipseFeedback ../views/CoordinateInput ../views/EditOutputCoordinate dojo/text!../templates/TabEllipse.html dijit/focus dojo/_base/event dojo/aspect dijit/form/NumberTextBox jimu/dijit/formSelect jimu/dijit/CheckBox".split(" "),
  function(y,c,t,d,m,B,C,h,n,D,u,v,e,E,F,G,H,k,I,z,w,J,K,x,A,L,M,p,N,q,O,P,Q,g,l,R){return y([E,F,H],{templateString:Q,baseClass:"jimu-widget-TabEllipse",centerPointGraphic:null,_restrictFocusOnAddCenterPointBtn:!1,_centerPointInputKeyPressed:!1,constructor:function(a){y.safeMixin(this,a)},postCreate:function(){this._centerPointInputKeyPressed=this._restrictFocusOnAddCenterPointBtn=!1;this.currentAngleUnit=this.angleUnitDD.get("value");this.currentLengthUnit=this.lengthUnitDD.get("value");this._labelSym=
  new M(this.labelSymbol);this._ptSym=new A(this.pointSymbol);this._ellipseSym=new L(this.ellipseSymbol);this._textGL=new J;this.map.addLayer(this._textGL);this.map.addLayer(this.getLayer());if(this._gl.loaded){var a=z.getInstanceSync().getLayerInfoById("Distance \x26 Direction - Ellipse Graphics");a.showLabels();a.enablePopup()}else this._gl.on("load",c.hitch(this,function(){var b=z.getInstanceSync().getLayerInfoById("Distance \x26 Direction - Ellipse Graphics");b.showLabels();b.enablePopup()}));this.coordTool=
  new O({appConfig:this.appConfig,nls:this.nls,"aria-label":this.nls.centerPointLabel},this.startPointCoords);this.coordTool.inputCoordinate.formatType="DD";this.coordinateFormat=new G({content:new P({nls:this.nls}),style:"width: 400px"});R.after(this.coordinateFormat,"onClose",c.hitch(this,function(){g.focus(this.coordinateFormatButton);if(this._restrictFocusOnAddCenterPointBtn){var b=this.coordTool.getValue();if(""===b||null===b||void 0===b)this._restrictFocusOnAddCenterPointBtn=!1}}));"DartTheme"===
  this.appConfig.theme.name&&n.add(this.coordinateFormat.domNode,"dartThemeClaroDijitTooltipContainerOverride");this.dt=new q({appConfig:this.appConfig,map:this.map,coordTool:this.coordTool.inputCoordinate.util,nls:this.nls,parentWidget:this});this.dt.setLineSymbol(this._ellipseSym);this.dt.set("lengthUnit","kilometers");this.dt.set("angle",0);this.dt.set("ellipseType","semi");this.syncEvents();this.checkValidInputs();this.majorAxisInput.invalidMessage=this.nls.numericInvalidMessage;this.majorAxisInput.rangeMessage=
  this.nls.axisErrorMessage;this.minorAxisInput.invalidMessage=this.nls.numericInvalidMessage;this.minorAxisInput.rangeMessage=this.nls.axisErrorMessage;this.angleInput.invalidMessage=this.nls.numericInvalidMessage;this.angleInput.rangeMessage=this.nls.orientationErrorMessage},getLayer:function(){if(!this._gl){var a=[],b={labelExpressionInfo:{value:this.nls.ellipseMajorAxis+" {MAJOR}"}};b=new x(b);b.labelPlacement="above-along";b.symbol=c.clone(this._labelSym).setOffset(0,20);a.push(b);b={labelExpressionInfo:{value:this.nls.ellipseMinorAxis+
  " {MINOR}"}};b=new x(b);b.labelPlacement="center-along";b.symbol=this._labelSym;a.push(b);b={labelExpressionInfo:{value:this.nls.angleLabel+": {ORIENTATION_ANGLE}"}};b=new x(b);b.labelPlacement="below-along";b.symbol=c.clone(this._labelSym).setOffset(0,-20);a.push(b);a={layerDefinition:{extent:{xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:{wkid:102100,latestWkid:102100}},geometryType:"esriGeometryPolygon",objectIdField:"ObjectID",fields:[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},
  {name:"MAJOR",type:"esriFieldTypeText",alias:"Major Axis"},{name:"MINOR",type:"esriFieldTypeText",alias:"Minor Axis"},{name:"ORIENTATION_ANGLE",type:"esriFieldTypeText",alias:"Orientation Angle"}]},featureSet:new N};this._gl=new K(a,{id:"Distance \x26 Direction - Ellipse Graphics",showLabels:!0});this.own(d(this._gl,"visibility-change",c.hitch(this,function(f){this._textGL.setVisibility(f.visible)})));return this._gl}},syncEvents:function(){m.subscribe("TAB_SWITCHED",c.hitch(this,this.tabSwitched));
  m.subscribe("DD-WIDGET-CLOSED",c.hitch(this,this._closeDijit));m.subscribe(q.DD_ELLIPSE_MINOR_LENGTH_CHANGE,c.hitch(this,this.minorLengthDidChange));m.subscribe(q.DD_ELLIPSE_MAJOR_LENGTH_CHANGE,c.hitch(this,this.majorLengthDidChange));m.subscribe(q.DD_ELLIPSE_ANGLE_CHANGE,c.hitch(this,this.angleDidChange));this.dt.watch("startPoint",c.hitch(this,function(a,b,f){this.dt.addStartGraphic(f,this._ptSym)}));this.dt.watch("startPointDD",c.hitch(this,function(a,b,f){this.coordTool.inputCoordinate.set("coordinateEsriGeometry",
  f)}));this.coordTool.inputCoordinate.watch("outputString",c.hitch(this,function(a,b,f){this.coordTool.manualInput||(this.coordTool.set("value",f),this.currentEllipse=null,this._restrictFocusOnAddCenterPointBtn?this._restrictFocusOnAddCenterPointBtn=!1:this._centerPointInputKeyPressed?this._centerPointInputKeyPressed=!1:g.focus(this.addPointBtn))}));this.own(this.dt.on("draw-complete",c.hitch(this,this.feedbackDidComplete)),this.ellipseType.on("change",c.hitch(this,this.ellipseTypeDDDidChange)),this.angleUnitDD.on("change",
  c.hitch(this,this.angleUnitDDDidChange)),this.lengthUnitDD.on("change",c.hitch(this,this.lengthUnitDDDidChange)),d(this.coordinateFormatButton,"click",c.hitch(this,this.coordinateFormatButtonWasClicked)),d(this.coordinateFormatButton,"keydown",c.hitch(this,function(a){if(a.keyCode===e.ENTER||a.keyCode===e.SPACE)l.stop(a),this.coordinateFormatButtonWasClicked()})),d(this.coordinateFormat.content.applyButton,"click",c.hitch(this,function(){this._restrictFocusOnAddCenterPointBtn=!0;var a=this.coordinateFormat.content.formats[this.coordinateFormat.content.ct],
  b=a.defaultFormat,f=this.coordinateFormat.content.frmtSelect.get("value");a.useCustom&&(b=a.customFormat);this.coordTool.inputCoordinate.set("formatPrefix",this.coordinateFormat.content.addSignChkBox.checked);this.coordTool.inputCoordinate.set("formatString",b);this.coordTool.inputCoordinate.set("formatType",f);this.setCoordLabel(f);k.close(this.coordinateFormat);g.focus(this.coordinateFormatButton)})),d(this.coordinateFormat.content.applyButton,"keydown",c.hitch(this,function(a){if(a.keyCode===e.ENTER||
  a.keyCode===e.SPACE){l.stop(a);this._restrictFocusOnAddCenterPointBtn=!0;var b=this.coordinateFormat.content.formats[this.coordinateFormat.content.ct],f=b.defaultFormat,r=this.coordinateFormat.content.frmtSelect.get("value");b.useCustom&&(f=b.customFormat);this.coordTool.inputCoordinate.set("formatPrefix",this.coordinateFormat.content.addSignChkBox.checked);this.coordTool.inputCoordinate.set("formatString",f);this.coordTool.inputCoordinate.set("formatType",r);this.setCoordLabel(r);k.close(this.coordinateFormat);
  g.focus(this.coordinateFormatButton)}a.keyCode===e.ESCAPE&&(l.stop(a),k.close(this.coordinateFormat),g.focus(this.coordinateFormatButton))})),d(this.addPointBtn,"keydown",c.hitch(this,function(a){if(a.keyCode===e.ENTER||a.keyCode===e.SPACE)l.stop(a),this.pointButtonWasClicked()})),d(this.interactiveEllipse,"change",c.hitch(this,this.interactiveCheckBoxChanged)),d(this.interactiveEllipse,"keydown",c.hitch(this,function(a){a.keyCode===e.ENTER&&(this.interactiveEllipse.checked=this.interactiveEllipse.checked?
  !1:!0,this.interactiveCheckBoxChanged())})),d(this.coordTool,"keydown",c.hitch(this,this.coordToolKeyWasPressed)),d(this.majorAxisInput,"change",c.hitch(this,function(){this.currentEllipse=null})),d(this.minorAxisInput,"change",c.hitch(this,function(){this.currentEllipse=null})),d(this.angleInput,"change",c.hitch(this,this.angleDidChange)),d(this.coordinateFormat.content.cancelButton,"click",c.hitch(this,function(){k.close(this.coordinateFormat)})),d(this.coordinateFormat.content.cancelButton,"keydown",
  c.hitch(this,function(a){if(a.keyCode===e.ENTER||a.keyCode===e.SPACE)l.stop(a),k.close(this.coordinateFormat),g.focus(this.coordinateFormatButton);a.keyCode===e.ESCAPE&&(l.stop(a),k.close(this.coordinateFormat),g.focus(this.coordinateFormatButton))})),d(this.clearGraphicsButton,"click",c.hitch(this,this.clearGraphics)),d(this.clearGraphicsButton,"keydown",c.hitch(this,function(a){if(a.keyCode===e.ENTER||a.keyCode===e.SPACE)l.stop(a),this.clearGraphics()})),d(this.majorAxisInputDiv,v.leave,c.hitch(this,
  this.checkValidInputs)),d(this.minorAxisInputDiv,v.leave,c.hitch(this,this.checkValidInputs)),d(this.coordinateFormat.content.frmtSelect,"keydown",c.hitch(this,function(a){a.keyCode===e.ESCAPE&&(l.stop(a),k.close(this.coordinateFormat),g.focus(this.coordinateFormatButton))})),d(this.coordinateFormat.content.frmtVal,"keydown",c.hitch(this,function(a){a.keyCode===e.ESCAPE&&(l.stop(a),k.close(this.coordinateFormat),g.focus(this.coordinateFormatButton))})),d(this.coordinateFormat.content.addSignChkBox,
  "keydown",c.hitch(this,function(a){a.keyCode===e.ESCAPE&&(l.stop(a),k.close(this.coordinateFormat),g.focus(this.coordinateFormatButton));a.keyCode===e.ENTER&&(l.stop(a),this.coordinateFormat.content.addSignChkBox.checked=this.coordinateFormat.content.addSignChkBox.checked?!1:!0)})),d(this.angleInputDiv,v.leave,c.hitch(this,this.checkValidInputs)),d(this.okButton,"keydown",c.hitch(this,function(a){if(a.keyCode===e.ENTER||a.keyCode===e.SPACE)l.stop(a),this.okButtonClicked()})));B("esri-touch")?this.own(d(this.addPointBtn,
  C.press,c.hitch(this,this.pointButtonWasClicked))):this.own(d(this.addPointBtn,"click",c.hitch(this,this.pointButtonWasClicked)))},okButtonClicked:function(){n.contains(this.okButton,"jimu-state-disabled")||(this._restrictFocusOnAddCenterPointBtn=!0,this.currentEllipse||("full"===h.get(this.ellipseType,"value")?m.publish("create-manual-ellipse",this.majorAxisInput.get("value")/2,this.minorAxisInput.get("value")/2,this.angleInput.get("value"),this.coordTool.inputCoordinate.coordinateEsriGeometry):
  m.publish("create-manual-ellipse",this.majorAxisInput.get("value"),this.minorAxisInput.get("value"),this.angleInput.get("value"),this.coordTool.inputCoordinate.coordinateEsriGeometry)),this.emit("show-publish",this._gl))},majorLengthDidChange:function(a){"full"===h.get(this.ellipseType,"value")&&(a*=2);var b=u.format(a,{places:2,locale:t.locale});this.majorAxisInput.set("value",a);this.majorAxisInput.set("displayedValue",b)},minorLengthDidChange:function(a){"full"===h.get(this.ellipseType,"value")&&
  (a*=2);var b=u.format(a,{places:2,locale:t.locale});this.minorAxisInput.set("value",a);this.minorAxisInput.set("displayedValue",b)},angleDidChange:function(a){var b=u.format(a,{places:2,locale:t.locale});this.angleInput.set("value",a);this.angleInput.set("displayedValue",b);this.dt.set("angle",a);this.currentEllipse=null},interactiveCheckBoxChanged:function(){this.tabSwitched();this.interactiveEllipse.checked?(this.majorAxisInput.set("disabled",!0),this.minorAxisInput.set("disabled",!0),this.angleInput.set("disabled",
  !0)):(this.majorAxisInput.set("disabled",!1),this.minorAxisInput.set("disabled",!1),this.angleInput.set("disabled",!1));this.checkValidInputs()},coordToolKeyWasPressed:function(a){this.dt.removeStartGraphic();a.keyCode===e.ENTER&&(this._centerPointInputKeyPressed=this._restrictFocusOnAddCenterPointBtn=!0,this.currentEllipse=null,this.coordTool.inputCoordinate.getInputType().then(c.hitch(this,function(b){"UNKNOWN"===b.inputType?(new I({message:this.nls.invalidCoordinateTypeMessage}),this.coordTool.inputCoordinate.coordinateEsriGeometry=
  null):this.dt.getProjectedGeometry(b.coordinateEsriGeometry,this.map.spatialReference).then(c.hitch(this,c.hitch(this,function(f){m.publish("manual-ellipse-center-point-input",f);this.setCoordLabel(b.inputType);this.coordTool.inputCoordinate.set("formatString",this.coordinateFormat.content.formats[b.inputType].defaultFormat);this.coordTool.inputCoordinate.set("formatType",b.inputType);this.dt.addStartGraphic(f,this._ptSym)})));this.checkValidInputs()})))},coordinateFormatButtonWasClicked:function(){this.coordinateFormat.content.set("ct",
  this.coordTool.inputCoordinate.formatType);k.open({popup:this.coordinateFormat,around:this.coordinateFormatButton});g.focus(this.coordinateFormat.content.frmtSelect.focusNode)},_closeDijit:function(){this.coordinateFormat&&this.coordinateFormat.domNode.offsetParent&&k.close(this.coordinateFormat)},pointButtonWasClicked:function(){n.contains(this.addPointBtn,"drawPointBtn-active")?(this.dt.deactivate(),this._setMapNavigation(!0)):(this.coordTool.manualInput=!1,m.publish("clear-points"),this._setMapNavigation(!1),
  this.interactiveEllipse.checked?this.dt.activate("polyline"):this.dt.activate("point"));n.toggle(this.addPointBtn,"drawPointBtn-active")},lengthUnitDDDidChange:function(){this.currentLengthUnit=this.lengthUnitDD.get("value");this.dt.set("lengthUnit",this.currentLengthUnit);this.currentEllipse=null},ellipseTypeDDDidChange:function(){var a="full"===h.get(this.ellipseType,"value")?this.nls.majorDiameterLabel:this.nls.majorRadiusLabel;var b="full"===h.get(this.ellipseType,"value")?this.nls.minorDiameterLabel:
  this.nls.minorRadiusLabel;this.majorAxisLabel.textContent="full"===h.get(this.ellipseType,"value")?this.nls.majorDiameterLabel:this.nls.majorRadiusLabel;this.minorAxisLabel.textContent="full"===h.get(this.ellipseType,"value")?this.nls.minorDiameterLabel:this.nls.minorRadiusLabel;h.set(this.majorAxisInput,"aria-label",a);h.set(this.minorAxisInput,"aria-label",b)},angleUnitDDDidChange:function(){this.currentAngleUnit=this.angleUnitDD.get("value");this.dt.set("angleUnit",this.currentAngleUnit);"degrees"===
  this.currentAngleUnit?(this.angleInput.constraints.max=360,this.angleInput.rangeMessage=this.nls.degreesRangeMessage):(this.angleInput.constraints.max=6400,this.angleInput.rangeMessage=this.nls.millsRangeMessage);this.currentEllipse=null},feedbackDidComplete:function(a){if("polygon"===a.geometry.type){this.currentEllipse=new p(a.geometry.geometry,this._ellipseSym);var b=this.majorAxisLabel.textContent.split(" ")[1];var f="semi"===this.ellipseType.get("value")?2*parseFloat(this.majorAxisInput.value):
  parseFloat(this.majorAxisInput.value);var r="semi"===this.ellipseType.get("value")?2*parseFloat(this.minorAxisInput.value):parseFloat(this.minorAxisInput.value);this.currentEllipse.setAttributes({MINOR:b+": "+this.minorAxisInput.get("displayedValue")+" "+this.lengthUnitDD.get("displayedValue"),MAJOR:b+": "+this.majorAxisInput.get("displayedValue")+" "+dijit.byId("lengthUnitDD").get("displayedValue"),ORIENTATION_ANGLE:this.angleInput.get("displayedValue")+" "+this.angleUnitDD.get("displayedValue"),
  CenterPoint:this.coordTool.get("value"),MajorAxis:f,MinorAxis:r,Unit:this.currentLengthUnit,Orientation:parseFloat(this.angleInput.get("value")),OrientationUnit:this.currentAngleUnit});this._gl.add(this.currentEllipse);a=a.geometry.geometry.getCentroid();b=window.isRTL?this.minorAxisInput.get("displayedValue")+" "+this._getLengthAbbrevation(this.lengthUnitDD.get("value"))+" "+this.nls.minorRadiusLabel:this.minorAxisLabel.textContent+" "+this.minorAxisInput.get("displayedValue")+" "+this._getLengthAbbrevation(this.lengthUnitDD.get("value"));
  this._textGL.add(new p(a,c.clone(this._labelSym).setOffset(0,20).setText(b)));b=window.isRTL?this.majorAxisInput.get("displayedValue")+" "+this._getLengthAbbrevation(dijit.byId("lengthUnitDD").get("value"))+" "+this.nls.majorRadiusLabel:this.majorAxisLabel.textContent+" "+this.majorAxisInput.get("displayedValue")+" "+this._getLengthAbbrevation(dijit.byId("lengthUnitDD").get("value"));this._textGL.add(new p(a,c.clone(this._labelSym).setText(b)));b=window.isRTL?this.angleInput.get("displayedValue")+
  " "+this._getDegreeAbbreviation(this.angleUnitDD.get("value"))+" "+this.nls.angleLabel:this.nls.angleLabel+" "+this.angleInput.get("displayedValue")+" "+this._getDegreeAbbreviation(this.angleUnitDD.get("value"));this._textGL.add(new p(a,c.clone(this._labelSym).setOffset(0,-20).setText(b)));this._gl.refresh();this.map.setExtent(this.currentEllipse.geometry.getExtent().expand(3))}this.checkValidInputs();this._setMapNavigation(!0);this.dt.deactivate();n.remove(this.addPointBtn,"drawPointBtn-active");
  this._restrictFocusOnAddCenterPointBtn?this._restrictFocusOnAddCenterPointBtn=!1:g.focus(this.addPointBtn)},clearGraphics:function(){this._gl&&(this._gl.clear(),this.coordTool.clear(),this._textGL.clear());this.tabSwitched();n.remove(this.addPointBtn,"drawPointBtn-active");this.currentEllipse=null;this.checkValidInputs();for(var a=0;a<this.map.graphicsLayerIds.length;a++)this.map.getLayer(this.map.graphicsLayerIds[a]).refresh()},setGraphicsHidden:function(){this._gl&&this._gl.hide()},setGraphicsShown:function(){this._gl&&
  this._gl.show()},createCenterPointGraphic:function(){null!==this.centerPointGraphic&&this._gl.remove(this.centerPointGraphic);var a=this.coordTool.inputCoordinate.coordinateEsriGeometry;a&&(this.centerPointGraphic=new p(a,new A),this._gl.add(this.centerPointGraphic))},removeCenterPointGraphic:function(){this.centerPointGraphic&&this._gl.remove(this.centerPointGraphic)},setCoordLabel:function(a){a=w.sanitizeHTML(D.substitute(this.nls.centerPointLabel+" (${crdType})",{crdType:a}));this.coordInputLabel.innerHTML=
  a;h.set(this.coordTool.textbox,"aria-label",a)},checkValidInputs:function(){n.add(this.okButton,"jimu-state-disabled");h.set(this.okButton,"tabindex",-1);null!==this.coordTool.inputCoordinate.coordinateEsriGeometry&&this.majorAxisInput.isValid()&&this.minorAxisInput.isValid()&&this.angleInput.isValid()&&(n.remove(this.okButton,"jimu-state-disabled"),h.set(this.okButton,"tabindex",0));this.okButton.innerHTML=this.interactiveEllipse.checked?this.nls.publishDDBtn:this.nls.common.ok},tabSwitched:function(){this.dt.deactivate();
  this.dt.cleanup();this.dt.disconnectOnMouseMoveHandler();this._setMapNavigation(!0);this.dt.removeStartGraphic();this.addPointBtn&&n.remove(this.addPointBtn,"drawPointBtn-active");k.close(this.coordinateFormat)},_setMapNavigation:function(a){a?this.map.enableMapNavigation():(this.map.disableMapNavigation(),this.map.enableScrollWheelZoom())},_getLengthAbbrevation:function(a){var b=null;if(a)switch(a){case "feet":b=this.nls.abbrevFeetLabel;break;case "kilometers":b=this.nls.abbrevKmLabel;break;case "miles":b=
  this.nls.abbrevMilesLabel;break;case "meters":b=this.nls.abbrevMetersLabel;break;case "nautical-miles":b=this.nls.abbrevNauticalMilesLabel;break;case "yards":b=this.nls.abbrevYardsLabel;break;default:b=a}return b},_getDegreeAbbreviation:function(a){var b=null;if(a)switch(a){case "degrees":b=this.nls.abbrevDegreesLabel;break;case "mils":b=this.nls.abbrevMilsLabel;break;default:b=a}return b},setFirstFocusNode:function(){w.initFirstFocusNode(this.domNodeObj,this.ellipseType.domNode)},focusFirstNodeOfSelectedTab:function(){g.focus(this.ellipseType.focusNode)},
  setLastFocusNode:function(){w.initLastFocusNode(this.domNodeObj,this.clearGraphicsButton)}})});