// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://@sbaseurl@/jsapi/jsapi/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details.

//>>built
define(["dojo/_base/declare","dojo/_base/array"],function(a,e){var f="INCHES FOOT FOOT_US YARDS MILES NAUTICAL_MILES MILLIMETERS CENTIMETERS METER KILOMETERS DECIMETERS LINK_CLARKE FOOT_GOLD_COAST FOOT_CLARKE CHAIN_SEARS_1992_TRUNCATED YARD_INDIAN CHAIN_BENOIT_1895_B YARD_SEARS CHAIN_SEARS FOOT_SEARS YARD_INDIAN_1937 50_KILOMETERS 150_KILOMETERS".split(" "),g="DECIMAL_DEGREES DEGREE_MINUTE_SECONDS DEGREE GRAD MGRS USNG".split(" "),c={INCHES:.0254,FOOT:.3048,FOOT_US:.3048006096012192,YARDS:.9144,MILES:1609.344,
NAUTICAL_MILES:1852,MILLIMETERS:.001,CENTIMETERS:.01,METER:1,KILOMETERS:1E3,DECIMETERS:.1,LINK_CLARKE:.2011661949,FOOT_GOLD_COAST:.3047997101815088,FOOT_CLARKE:.304797265,CHAIN_SEARS_1922_TRUNCATED:20.116756,YARD_INDIAN:.9143985307444408,CHAIN_BENOIT_1895_B:20.11678249437587,YARD_SEARS:.9143984146160287,CHAIN_SEARS:20.11676512155263,FOOT_SEARS:.3047994715386762,YARD_INDIAN_1937:.91439523,"50_KILOMETERS":5E4,"150_KILOMETERS":15E4,DEGREE:.0174532925199433,DECIMAL_DEGREES:.0174532925199433,MGRS:.0174532925199433,
USNG:.0174532925199433,DEGREE_MINUTE_SECONDS:.0174532925199433,GRAD:.01570796326794897};a=a(null,function(){});a.convertUnit=function(b,d,h){return c[b.toUpperCase()]/c[d.toUpperCase()]*h};a.getUnitRate=function(b,d){return c[b.toUpperCase()]/c[d.toUpperCase()]};a.isProjectUnit=function(b){return-1<e.indexOf(f,b.toUpperCase())};a.isGeographicUnit=function(b){return-1<e.indexOf(g,b.toUpperCase())};a.getGeographicUnits=function(){return g};a.getProjectUnits=function(){return f};return a});