// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.23/esri/copyright.txt for details.
//>>built
define("esri/styles/predominance","dojo/_base/array dojo/_base/lang dojo/has ../kernel ../Color ./colors ./size".split(" "),function(l,p,u,v,d,w,q){function r(b,a){return l.map(b,function(b){b=new d(b);null!=a&&(b.a=a);return b})}function t(b,a,f,e){var c;if(b=w[b])switch(c={},c.colors=r(b.stops),c.noDataColor=new d(a.noDataColor),c.opacity=a.fillOpacity||1,c.sizeInfo=e,f){case "point":c.outline={color:new d(a.outline.color),width:a.outline.width};c.size=a.size;break;case "line":c.width=a.width;break;
case "polygon":c.outline={color:new d(a.outline.color),width:a.outline.width},e&&e.marker&&null!=a.markerSize&&(e.marker.size=a.markerSize)}return c}function x(b){if("esriGeometryPoint"===b||"esriGeometryMultipoint"===b)b="point";else if("esriGeometryPolyline"===b)b="line";else if("esriGeometryPolygon"===b||"esriGeometryMultiPatch"===b)b="polygon";return b}var h={color:[153,153,153,1],width:1},k={"default":{name:"default",label:"Default",description:"Default theme for visualizing features by their predominant category.",
basemapGroups:{light:"streets gray topo terrain national-geographic oceans osm".split(" "),dark:["satellite","hybrid","dark-gray"]},pointSchemes:{light:{common:{noDataColor:"#aaaaaa",outline:h,size:8},primary:"predominant-v1",secondary:["predominant-v2","predominant-v3","predominant-v4","predominant-v5"]},dark:{common:{noDataColor:"#aaaaaa",outline:{color:[26,26,26,1],width:1},size:8},primary:"predominant-v2",secondary:["predominant-v1","predominant-v3","predominant-v4","predominant-v5"]}},lineSchemes:{light:{common:{noDataColor:"#aaaaaa",
width:2},primary:"predominant-v1",secondary:["predominant-v2","predominant-v3","predominant-v4","predominant-v5"]},dark:{common:{noDataColor:"#aaaaaa",width:2},primary:"predominant-v2",secondary:["predominant-v1","predominant-v3","predominant-v4","predominant-v5"]}},polygonSchemes:{light:{common:{noDataColor:"#aaaaaa",outline:h,fillOpacity:.8,markerSize:8},primary:"predominant-v1",secondary:["predominant-v2","predominant-v3","predominant-v4","predominant-v5"]},dark:{common:{noDataColor:"#aaaaaa",
outline:{color:[51,51,51,1],width:1},fillOpacity:.8,markerSize:8},primary:"predominant-v2",secondary:["predominant-v1","predominant-v3","predominant-v4","predominant-v5"]}}}},m={};(function(){var b,a,f,e,c,n,g,d;for(b in k)for(e in a=k[b],f=a.basemapGroups,c=m[b]={basemaps:[].concat(f.light).concat(f.dark),point:{},line:{},polygon:{}},f)for(n=f[e],g=0;g<n.length;g++)d=n[g],a.pointSchemes&&(c.point[d]=a.pointSchemes[e]),a.lineSchemes&&(c.line[d]=a.lineSchemes[e]),a.polygonSchemes&&(c.polygon[d]=a.polygonSchemes[e])})();
h={getAvailableThemes:function(b){var a=[],f,e,c;for(f in k)e=k[f],c=m[f],b&&-1===l.indexOf(c.basemaps,b)||a.push({name:e.name,label:e.label,description:e.description,basemaps:c.basemaps.slice(0)});return a},getSchemes:function(b){var a=b.theme,f=b.basemap,e=x(b.geometryType),c=(b=q.getSchemes({theme:"default",basemap:b.basemap,geometryType:b.geometryType}))&&b.primaryScheme,a=m[a],d,g;(d=(d=a&&a[e])&&d[f])&&(g={primaryScheme:t(d.primary,d.common,e,c),secondarySchemes:l.map(d.secondary,function(a){return t(a,
d.common,e,c)})});return g},cloneScheme:function(b){var a;b&&(a=p.mixin({},b),a.colors=r(a.colors),a.noDataColor&&(a.noDataColor=new d(a.noDataColor)),a.outline&&(a.outline={color:a.outline.color&&new d(a.outline.color),width:a.outline.width}),a.sizeInfo&&(a.sizeInfo=q.cloneScheme(a.sizeInfo)));return a}};u("extend-esri")&&p.setObject("styles.predominance",h,v);return h});