/*
 COPYRIGHT 2009 ESRI

 TRADE SECRETS: ESRI PROPRIETARY AND CONFIDENTIAL
 Unpublished material - all rights reserved under the
 Copyright Laws of the United States and applicable international
 laws, treaties, and conventions.

 For additional information, contact:
 Environmental Systems Research Institute, Inc.
 Attn: Contracts and Legal Services Department
 380 New York Street
 Redlands, California, 92373
 USA

 email: contracts@esri.com
 */

window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","esri.symbol"],["require","dojo._base.Color"],["require","dojox.gfx._base"],["require","esri.utils"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["esri.symbol"]){_4._hasResource["esri.symbol"]=true;_4.provide("esri.symbol");_4.require("dojo._base.Color");_4.require("dojox.gfx._base");_4.require("esri.utils");_4.mixin(esri.symbol,{toDojoColor:function(_7){return _7&&new _4.Color([_7[0],_7[1],_7[2],_7[3]/255]);},toJsonColor:function(_8){return _8&&[_8.r,_8.g,_8.b,Math.round(_8.a*255)];},fromJson:function(_9){var _a=_9.type,_b=null;switch(_a.substring(0,"esriXX".length)){case "esriSM":_b=new esri.symbol.SimpleMarkerSymbol(_9);break;case "esriPM":_b=new esri.symbol.PictureMarkerSymbol(_9);break;case "esriTS":_b=new esri.symbol.TextSymbol(_9);break;case "esriSL":if(_9.cap!==undefined){_b=new esri.symbol.CartographicLineSymbol(_9);}else{_b=new esri.symbol.SimpleLineSymbol(_9);}break;case "esriSF":_b=new esri.symbol.SimpleFillSymbol(_9);break;case "esriPF":_b=new esri.symbol.PictureFillSymbol(_9);break;}return _b;}});_4.declare("esri.symbol.Symbol",null,{color:new _4.Color([0,0,0,1]),type:null,_stroke:null,_fill:null,constructor:function(_c){if(_c&&_4.isObject(_c)){_4.mixin(this,_c);if(this.color&&esri._isDefined(this.color[0])){this.color=esri.symbol.toDojoColor(this.color);}var _d=this.type;if(_d&&_d.indexOf("esri")===0){this.type={"esriSMS":"simplemarkersymbol","esriPMS":"picturemarkersymbol","esriSLS":"simplelinesymbol","esriCLS":"cartographiclinesymbol","esriSFS":"simplefillsymbol","esriPFS":"picturefillsymbol","esriTS":"textsymbol"}[_d];}}},setColor:function(_e){this.color=_e;return this;},toJson:function(){return {color:esri.symbol.toJsonColor(this.color)};}});_4.declare("esri.symbol.MarkerSymbol",esri.symbol.Symbol,{constructor:function(_f){if(_f&&_4.isObject(_f)){this.size=_6.gfx.pt2px(this.size);this.xoffset=_6.gfx.pt2px(this.xoffset);this.yoffset=_6.gfx.pt2px(this.yoffset);}},setAngle:function(_10){this.angle=_10;return this;},setSize:function(_11){this.size=_11;return this;},setOffset:function(x,y){this.xoffset=x;this.yoffset=y;return this;},toJson:function(){var _12=_6.gfx.px2pt(this.size);_12=isNaN(_12)?undefined:_12;var _13=_6.gfx.px2pt(this.xoffset);_13=isNaN(_13)?undefined:_13;var _14=_6.gfx.px2pt(this.yoffset);_14=isNaN(_14)?undefined:_14;return _4.mixin(this.inherited("toJson",arguments),{size:_12,angle:this.angle,xoffset:_13,yoffset:_14});},angle:0,xoffset:0,yoffset:0,size:12});_4.declare("esri.symbol.SimpleMarkerSymbol",esri.symbol.MarkerSymbol,{constructor:function(_15,_16,_17,_18){if(_15){if(_4.isString(_15)){this.style=_15;if(_16){this.size=_16;}if(_17){this.outline=_17;}if(_18){this.color=_18;}}else{this.style=esri.valueOf(this._styles,this.style);if(_15.outline){this.outline=new esri.symbol.SimpleLineSymbol(_15.outline);}}}else{_4.mixin(this,esri.symbol.defaultSimpleMarkerSymbol);this.size=_6.gfx.pt2px(this.size);this.outline=new esri.symbol.SimpleLineSymbol(this.outline);this.color=new _4.Color(this.color);}if(!this.style){this.style=esri.symbol.SimpleMarkerSymbol.STYLE_CIRCLE;}},type:"simplemarkersymbol",setStyle:function(_19){this.style=_19;return this;},setOutline:function(_1a){this.outline=_1a;return this;},getStroke:function(){return this.outline&&this.outline.getStroke();},getFill:function(){return this.color;},_setDim:function(_1b,_1c,_1d){this._targetWidth=_1b;this._targetHeight=_1c;this._spikeSize=_1d;},toJson:function(){var _1e=_4.mixin(this.inherited("toJson",arguments),{type:"esriSMS",style:this._styles[this.style]}),_1f=this.outline;if(_1f){_1e.outline=_1f.toJson();}return esri._sanitize(_1e);},_styles:{circle:"esriSMSCircle",square:"esriSMSSquare",cross:"esriSMSCross",x:"esriSMSX",diamond:"esriSMSDiamond"}});_4.mixin(esri.symbol.SimpleMarkerSymbol,{STYLE_CIRCLE:"circle",STYLE_SQUARE:"square",STYLE_CROSS:"cross",STYLE_X:"x",STYLE_DIAMOND:"diamond",STYLE_TARGET:"target"});_4.declare("esri.symbol.PictureMarkerSymbol",esri.symbol.MarkerSymbol,{constructor:function(_20,_21,_22){if(_20){if(_4.isString(_20)){this.url=_20;if(_21){this.width=_21;}if(_22){this.height=_22;}}else{this.width=_6.gfx.pt2px(_20.width);this.height=_6.gfx.pt2px(_20.height);var _23=_20.imageData;if((!esri.vml)&&_23){var _24=this.url;this.url="data:"+(_20.contentType||"image")+";base64,"+_23;this.imageData=_24;}}}else{_4.mixin(this,esri.symbol.defaultPictureMarkerSymbol);this.width=_6.gfx.pt2px(this.width);this.height=_6.gfx.pt2px(this.height);}},type:"picturemarkersymbol",getStroke:function(){return null;},getFill:function(){return null;},setWidth:function(_25){this.width=_25;return this;},setHeight:function(_26){this.height=_26;return this;},setUrl:function(url){if(url!==this.url){delete this.imageData;delete this.contentType;}this.url=url;return this;},toJson:function(){var url=this.url,_27=this.imageData;if(url.indexOf("data:")===0){var _28=url;url=_27;var _29=_28.indexOf(";base64,")+8;_27=_28.substr(_29);}url=esri._getAbsoluteUrl(url);var _2a=_6.gfx.px2pt(this.width);_2a=isNaN(_2a)?undefined:_2a;var _2b=_6.gfx.px2pt(this.height);_2b=isNaN(_2b)?undefined:_2b;var _2c=esri._sanitize(_4.mixin(this.inherited("toJson",arguments),{type:"esriPMS",url:url,imageData:_27,contentType:this.contentType,width:_2a,height:_2b}));delete _2c.color;delete _2c.size;return _2c;}});_4.declare("esri.symbol.LineSymbol",esri.symbol.Symbol,{constructor:function(_2d){if(_4.isObject(_2d)){this.width=_6.gfx.pt2px(this.width);}else{this.width=12;}},setWidth:function(_2e){this.width=_2e;return this;},toJson:function(){var _2f=_6.gfx.px2pt(this.width);_2f=isNaN(_2f)?undefined:_2f;return _4.mixin(this.inherited("toJson",arguments),{width:_2f});}});_4.declare("esri.symbol.SimpleLineSymbol",esri.symbol.LineSymbol,{constructor:function(_30,_31,_32){if(_30){if(_4.isString(_30)){this.style=_30;if(_31){this.color=_31;}if(_32){this.width=_32;}}else{this.style=esri.valueOf(this._styles,_30.style)||esri.symbol.SimpleLineSymbol.STYLE_SOLID;}}else{_4.mixin(this,esri.symbol.defaultSimpleLineSymbol);this.color=new _4.Color(this.color);this.width=_6.gfx.pt2px(this.width);}},type:"simplelinesymbol",setStyle:function(_33){this.style=_33;return this;},getStroke:function(){return (this.style===esri.symbol.SimpleLineSymbol.STYLE_NULL||this.width===0)?null:{color:this.color,style:this.style,width:this.width};},getFill:function(){return null;},toJson:function(){return esri._sanitize(_4.mixin(this.inherited("toJson",arguments),{type:"esriSLS",style:this._styles[this.style]}));},_styles:{solid:"esriSLSSolid",dash:"esriSLSDash",dot:"esriSLSDot",dashdot:"esriSLSDashDot",longdashdotdot:"esriSLSDashDotDot",none:"esriSLSNull",insideframe:"esriSLSInsideFrame"}});_4.mixin(esri.symbol.SimpleLineSymbol,{STYLE_SOLID:"solid",STYLE_DASH:"dash",STYLE_DOT:"dot",STYLE_DASHDOT:"dashdot",STYLE_DASHDOTDOT:"longdashdotdot",STYLE_NULL:"none"});_4.declare("esri.symbol.CartographicLineSymbol",esri.symbol.SimpleLineSymbol,{constructor:function(_34,_35,_36,cap,_37,_38){if(_34){if(_4.isString(_34)){this.style=_34;if(_35){this.color=_35;}if(_36!==undefined){this.width=_36;}if(cap){this.cap=cap;}if(_37){this.join=_37;}if(_38!==undefined){this.miterLimit=_38;}}else{this.cap=esri.valueOf(this._caps,_34.cap);this.join=esri.valueOf(this._joins,_34.join);this.width=_6.gfx.pt2px(_34.width);this.miterLimit=_6.gfx.pt2px(_34.miterLimit);}}else{_4.mixin(this,esri.symbol.defaultCartographicLineSymbol);this.color=new _4.Color(this.color);this.width=_6.gfx.pt2px(this.width);this.miterLimit=_6.gfx.pt2px(this.miterLimit);}},type:"cartographiclinesymbol",setCap:function(cap){this.cap=cap;return this;},setJoin:function(_39){this.join=_39;return this;},setMiterLimit:function(_3a){this.miterLimit=_3a;return this;},getStroke:function(){return _4.mixin(this.inherited("getStroke",arguments),{cap:this.cap,join:(this.join===esri.symbol.CartographicLineSymbol.JOIN_MITER?this.miterLimit:this.join)});},getFill:function(){return null;},toJson:function(){var _3b=_6.gfx.px2pt(this.miterLimit);_3b=isNaN(_3b)?undefined:_3b;return esri._sanitize(_4.mixin(this.inherited("toJson",arguments),{type:"esriCLS",cap:this._caps[this.cap],join:this._joins[this.join],miterLimit:_3b}));},_caps:{butt:"esriLCSButt",round:"esriLCSRound",square:"esriLCSSquare"},_joins:{miter:"esriLJSMiter",round:"esriLJSRound",bevel:"esriLJSBevel"}});_4.mixin(esri.symbol.CartographicLineSymbol,{STYLE_SOLID:"solid",STYLE_DASH:"dash",STYLE_DOT:"dot",STYLE_DASHDOT:"dashdot",STYLE_DASHDOTDOT:"longdashdotdot",STYLE_NULL:"none",STYLE_INSIDE_FRAME:"insideframe",CAP_BUTT:"butt",CAP_ROUND:"round",CAP_SQUARE:"square",JOIN_MITER:"miter",JOIN_ROUND:"round",JOIN_BEVEL:"bevel"});_4.declare("esri.symbol.FillSymbol",esri.symbol.Symbol,{constructor:function(_3c){if(_3c&&_4.isObject(_3c)&&_3c.outline){this.outline=new esri.symbol.SimpleLineSymbol(_3c.outline);}},setOutline:function(_3d){this.outline=_3d;return this;},toJson:function(){var _3e=this.inherited("toJson",arguments);if(this.outline){_3e.outline=this.outline.toJson();}return _3e;}});_4.declare("esri.symbol.SimpleFillSymbol",esri.symbol.FillSymbol,{constructor:function(_3f,_40,_41){if(_3f){if(_4.isString(_3f)){this.style=_3f;if(_40!==undefined){this.outline=_40;}if(_41!==undefined){this.color=_41;}}else{this.style=esri.valueOf(this._styles,_3f.style);}}else{_4.mixin(this,esri.symbol.defaultSimpleFillSymbol);this.outline=new esri.symbol.SimpleLineSymbol(this.outline);this.color=new _4.Color(this.color);}var _42=this.style;if(_42!=="solid"&&_42!=="none"){this._src=_4.moduleUrl("esri","../../images/symbol/sfs/"+_42+".png").toString();}},type:"simplefillsymbol",setStyle:function(_43){this.style=_43;return this;},getStroke:function(){return this.outline&&this.outline.getStroke();},getFill:function(){var _44=this.style;if(_44===esri.symbol.SimpleFillSymbol.STYLE_NULL){return null;}else{if(_44===esri.symbol.SimpleFillSymbol.STYLE_SOLID){return this.color;}else{return _4.mixin(_4.mixin({},_6.gfx.defaultPattern),{src:this._src,width:10,height:10});}}},toJson:function(){return esri._sanitize(_4.mixin(this.inherited("toJson",arguments),{type:"esriSFS",style:this._styles[this.style]}));},_styles:{solid:"esriSFSSolid",none:"esriSFSNull",horizontal:"esriSFSHorizontal",vertical:"esriSFSVertical",forwarddiagonal:"esriSFSForwardDiagonal",backwarddiagonal:"esriSFSBackwardDiagonal",cross:"esriSFSCross",diagonalcross:"esriSFSDiagonalCross"}});_4.mixin(esri.symbol.SimpleFillSymbol,{STYLE_SOLID:"solid",STYLE_NULL:"none",STYLE_HORIZONTAL:"horizontal",STYLE_VERTICAL:"vertical",STYLE_FORWARD_DIAGONAL:"forwarddiagonal",STYLE_BACKWARD_DIAGONAL:"backwarddiagonal",STYLE_CROSS:"cross",STYLE_DIAGONAL_CROSS:"diagonalcross",STYLE_FORWARDDIAGONAL:"forwarddiagonal",STYLE_BACKWARDDIAGONAL:"backwarddiagonal",STYLE_DIAGONALCROSS:"diagonalcross"});_4.declare("esri.symbol.PictureFillSymbol",esri.symbol.FillSymbol,{constructor:function(_45,_46,_47,_48){if(_45){if(_4.isString(_45)){this.url=_45;if(_46!==undefined){this.outline=_46;}if(_47!==undefined){this.width=_47;}if(_48!==undefined){this.height=_48;}}else{this.xoffset=_6.gfx.pt2px(_45.xoffset);this.yoffset=_6.gfx.pt2px(_45.yoffset);this.width=_6.gfx.pt2px(_45.width);this.height=_6.gfx.pt2px(_45.height);var _49=_45.imageData;if((!esri.vml)&&_49){var _4a=this.url;this.url="data:"+(_45.contentType||"image")+";base64,"+_49;this.imageData=_4a;}}}else{_4.mixin(this,esri.symbol.defaultPictureFillSymbol);this.width=_6.gfx.pt2px(this.width);this.height=_6.gfx.pt2px(this.height);}},type:"picturefillsymbol",xscale:1,yscale:1,xoffset:0,yoffset:0,setWidth:function(_4b){this.width=_4b;return this;},setHeight:function(_4c){this.height=_4c;return this;},setOffset:function(x,y){this.xoffset=x;this.yoffset=y;return this;},setUrl:function(url){if(url!==this.url){delete this.imageData;delete this.contentType;}this.url=url;return this;},setXScale:function(_4d){this.xscale=_4d;return this;},setYScale:function(_4e){this.yscale=_4e;return this;},getStroke:function(){return this.outline&&this.outline.getStroke();},getFill:function(){return _4.mixin({},_6.gfx.defaultPattern,{src:this.url,width:(this.width*this.xscale),height:(this.height*this.yscale),x:this.xoffset,y:this.yoffset});},toJson:function(){var url=this.url,_4f=this.imageData;if(url.indexOf("data:")===0){var _50=url;url=_4f;var _51=_50.indexOf(";base64,")+8;_4f=_50.substr(_51);}url=esri._getAbsoluteUrl(url);var _52=_6.gfx.px2pt(this.width);_52=isNaN(_52)?undefined:_52;var _53=_6.gfx.px2pt(this.height);_53=isNaN(_53)?undefined:_53;var _54=_6.gfx.px2pt(this.xoffset);_54=isNaN(_54)?undefined:_54;var _55=_6.gfx.px2pt(this.yoffset);_55=isNaN(_55)?undefined:_55;return esri._sanitize(_4.mixin(this.inherited("toJson",arguments),{type:"esriPFS",url:url,imageData:_4f,contentType:this.contentType,width:_52,height:_53,xoffset:_54,yoffset:_55,xscale:this.xscale,yscale:this.yscale}));}});_4.declare("esri.symbol.Font",null,{constructor:function(_56,_57,_58,_59,_5a){if(_56){if(_4.isObject(_56)){_4.mixin(this,_56);}else{this.size=_56;if(_57!==undefined){this.style=_57;}if(_58!==undefined){this.variant=_58;}if(_59!==undefined){this.weight=_59;}if(_5a!==undefined){this.family=_5a;}}}else{_4.mixin(this,_6.gfx.defaultFont);}},setSize:function(_5b){this.size=_5b;return this;},setStyle:function(_5c){this.style=_5c;return this;},setVariant:function(_5d){this.variant=_5d;return this;},setWeight:function(_5e){this.weight=_5e;return this;},setFamily:function(_5f){this.family=_5f;return this;},toJson:function(){return esri._sanitize({size:this.size,style:this.style,variant:this.variant,decoration:this.decoration,weight:this.weight,family:this.family});}});_4.mixin(esri.symbol.Font,{STYLE_NORMAL:"normal",STYLE_ITALIC:"italic",STYLE_OBLIQUE:"oblique",VARIANT_NORMAL:"normal",VARIANT_SMALLCAPS:"small-caps",WEIGHT_NORMAL:"normal",WEIGHT_BOLD:"bold",WEIGHT_BOLDER:"bolder",WEIGHT_LIGHTER:"lighter"});_4.declare("esri.symbol.TextSymbol",esri.symbol.Symbol,{constructor:function(_60,_61,_62){_4.mixin(this,esri.symbol.defaultTextSymbol);this.font=new esri.symbol.Font(this.font);this.color=new _4.Color(this.color);if(_60){if(_4.isObject(_60)){_4.mixin(this,_60);if(this.color&&esri._isDefined(this.color[0])){this.color=esri.symbol.toDojoColor(this.color);}this.type="textsymbol";this.font=new esri.symbol.Font(this.font);this.xoffset=_6.gfx.pt2px(this.xoffset);this.yoffset=_6.gfx.pt2px(this.yoffset);}else{this.text=_60;if(_61){this.font=_61;}if(_62){this.color=_62;}}}},angle:0,xoffset:0,yoffset:0,setFont:function(_63){this.font=_63;return this;},setAngle:function(_64){this.angle=_64;return this;},setOffset:function(x,y){this.xoffset=x;this.yoffset=y;return this;},setAlign:function(_65){this.align=_65;return this;},setDecoration:function(_66){this.decoration=_66;return this;},setRotated:function(_67){this.rotated=_67;return this;},setKerning:function(_68){this.kerning=_68;return this;},setText:function(_69){this.text=_69;return this;},getStroke:function(){return null;},getFill:function(){return this.color;},toJson:function(){var _6a=_6.gfx.px2pt(this.xoffset);_6a=isNaN(_6a)?undefined:_6a;var _6b=_6.gfx.px2pt(this.yoffset);_6b=isNaN(_6b)?undefined:_6b;return esri._sanitize(_4.mixin(this.inherited("toJson",arguments),{type:"esriTS",backgroundColor:this.backgroundColor,borderLineColor:this.borderLineColor,verticalAlignment:this.verticalAlignment,horizontalAlignment:this.horizontalAlignment,rightToLeft:this.rightToLeft,width:this.width,angle:this.angle,xoffset:_6a,yoffset:_6b,text:this.text,align:this.align,decoration:this.decoration,rotated:this.rotated,kerning:this.kerning,font:this.font.toJson()}));}});_4.mixin(esri.symbol.TextSymbol,{ALIGN_START:"start",ALIGN_MIDDLE:"middle",ALIGN_END:"end",DECORATION_NONE:"none",DECORATION_UNDERLINE:"underline",DECORATION_OVERLINE:"overline",DECORATION_LINETHROUGH:"line-through"});_4.mixin(esri.symbol,{defaultSimpleLineSymbol:{color:[0,0,0,1],style:esri.symbol.SimpleLineSymbol.STYLE_SOLID,width:1},defaultSimpleMarkerSymbol:{style:esri.symbol.SimpleMarkerSymbol.STYLE_CIRCLE,color:[255,255,255,0.25],outline:esri.symbol.defaultSimpleLineSymbol,size:12,angle:0,xoffset:0,yoffset:0},defaultPictureMarkerSymbol:{url:"",width:12,height:12,angle:0,xoffset:0,yoffset:0},defaultCartographicLineSymbol:{color:[0,0,0,1],style:esri.symbol.CartographicLineSymbol.STYLE_SOLID,width:1,cap:esri.symbol.CartographicLineSymbol.CAP_BUTT,join:esri.symbol.CartographicLineSymbol.JOIN_MITER,miterLimit:10},defaultSimpleFillSymbol:{style:esri.symbol.SimpleFillSymbol.STYLE_SOLID,color:[0,0,0,0.25],outline:esri.symbol.defaultSimpleLineSymbol},defaultPictureFillSymbol:{xoffset:0,yoffset:0,width:12,height:12},defaultTextSymbol:{color:[0,0,0,1],font:_6.gfx.defaultFont,angle:0,xoffset:0,yoffset:0},getShapeDescriptors:function(_6c){var _6d,_6e,_6f;var _70=_6c.type;switch(_70){case "simplemarkersymbol":var _71=_6c.style,SMS=esri.symbol.SimpleMarkerSymbol;var _72=_6c.size||_6.gfx.pt2px(esri.symbol.defaultSimpleMarkerSymbol.size),cx=0,cy=0,_73=_72/2;var _74=cx-_73,_75=cx+_73,top=cy-_73,_76=cy+_73;switch(_71){case SMS.STYLE_CIRCLE:_6d={type:"circle",cx:cx,cy:cy,r:_73};_6e=_6c.getFill();_6f=_6c.getStroke();if(_6f){_6f.style=_6f.style||"Solid";}break;case SMS.STYLE_CROSS:_6d={type:"path",path:"M "+_74+",0 L "+_75+",0 M 0,"+top+" L 0,"+_76+" E"};_6e=null;_6f=_6c.getStroke();break;case SMS.STYLE_DIAMOND:_6d={type:"path",path:"M "+_74+",0 L 0,"+top+" L "+_75+",0 L 0,"+_76+" L "+_74+",0 E"};_6e=_6c.getFill();_6f=_6c.getStroke();break;case SMS.STYLE_SQUARE:_6d={type:"path",path:"M "+_74+","+_76+" L "+_74+","+top+" L "+_75+","+top+" L "+_75+","+_76+" L "+_74+","+_76+" E"};_6e=_6c.getFill();_6f=_6c.getStroke();break;case SMS.STYLE_X:_6d={type:"path",path:"M "+_74+","+_76+" L "+_75+","+top+" M "+_74+","+top+" L "+_75+","+_76+" E"};_6e=null;_6f=_6c.getStroke();break;}break;case "picturemarkersymbol":_6d={type:"image",x:0,y:0,width:16,height:16,src:""};_6d.x=_6d.x-Math.round(_6c.width/2);_6d.y=_6d.y-Math.round(_6c.height/2);_6d.width=_6c.width;_6d.height=_6c.height;_6d.src=_6c.url;break;case "simplelinesymbol":case "cartographiclinesymbol":_6d={type:"path",path:"M -15,0 L 15,0 E"};_6e=null;_6f=_6c.getStroke();break;case "simplefillsymbol":case "picturefillsymbol":_6d={type:"path",path:"M -10,-10 L 10,0 L 10,10 L -10,10 L -10,-10 E"};_6e=_6c.getFill();_6f=_6c.getStroke();break;}return {defaultShape:_6d,fill:_6e,stroke:_6f};}});_4.mixin(esri.symbol.defaultTextSymbol,_6.gfx.defaultText,{type:"textsymbol",align:"middle"});}}};});