// 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
require({cache:{"url:jimu/dijit/templates/_FilterSet.html":'\x3cdiv\x3e\r\n\t\x3ctable class\x3d"header-table" cellspacing\x3d"0" cellpadding\x3d"0"\x3e\r\n\t\t\x3ctbody\x3e\r\n\t\t\t\x3ctr\x3e\r\n\t\t\t\t\x3ctd\x3e\r\n\t\t\t\t\t\x3cdiv\x3e\r\n\t\t\t\t\t\t\x3cselect data-dojo-attach-point\x3d"allAnySelect"\x3e\r\n\t\t\t\t\t\t\t\x3coption value\x3d"AND" selected\x3e${nls.matchMsgSetAll}\x3c/option\x3e\r\n\t\t\t\t\t\t\t\x3coption value\x3d"OR"\x3e${nls.matchMsgSetAny}\x3c/option\x3e\r\n\t\t\t\t\t\t\x3c/select\x3e\r\n\t\t\t\t\t\x3c/div\x3e\r\n\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\x3ctd class\x3d"jimu-filter-set-delete"\x3e\r\n\t\t\t\t\t\x3cdiv role\x3d"button" data-dojo-attach-point\x3d"btnDelete" aria-label\x3d"\'${nls.deleteText}\'" class\x3d"jimu-icon jimu-icon-delete" tabindex\x3d"0"\x3e\x3c/div\x3e\r\n\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\x3ctd class\x3d"jimu-filter-set-add"\x3e\r\n\t\t\t\t\t\x3cdiv role\x3d"button" data-dojo-attach-point\x3d"btnAdd" aria-label\x3d"\'${nls.addText}\'" class\x3d"jimu-icon jimu-icon-add" tabindex\x3d"0"\x3e\x3c/div\x3e\r\n\t\t\t\t\x3c/td\x3e\r\n\t\t\t\x3c/tr\x3e\r\n\t\t\x3c/tbody\x3e\r\n\t\x3c/table\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"allExpsBox" class\x3d"jimu-filter-exps-box"\x3e\r\n\t\x3c/div\x3e\r\n\x3c/div\x3e'}});
define("dojo/Evented dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/text!./templates/_FilterSet.html dijit/registry dojo/_base/lang dojo/_base/html dojo/_base/array dojo/on dijit/a11yclick dojo/aspect dojo/query ./_SingleFilter".split(" "),function(m,n,p,q,r,t,g,b,h,d,f,k,u,l,v){return n([p,q,r,m],{templateString:t,baseClass:"jimu-filter-set",nls:null,url:null,layerInfo:null,popupFieldsInfo:[],stringFieldType:"",dateFieldType:"",numberFieldTypes:[],partsObj:null,
OPERATORS:null,enableAskForValues:!1,isHosted:!1,valueProviderFactory:null,runtime:!1,widgetId:"",postMixInProperties:function(){this.nls=window.jimuNls.filterBuilder;this.nls.deleteText=window.jimuNls.common.deleteText;this.nls.addText=window.jimuNls.common.add;this.inherited(arguments)},postCreate:function(){this.inherited(arguments);this._initSelf()},toJson:function(){var a=l(".jimu-single-filter",this.allExpsBox);a=d.map(a,b.hitch(this,function(c){return g.byNode(c).toJson()}));return d.every(a,
b.hitch(this,function(c){return!!c}))&&0<a.length?{logicalOperator:this.allAnySelect.value,parts:a}:null},showDelteIcon:function(){h.setStyle(this.btnDelete,"display","block")},hideDeleteIcon:function(){h.setStyle(this.btnDelete,"display","none")},_initSelf:function(){this.own(f(this.btnDelete,k,b.hitch(this,function(){this._destroySelf()})));this.own(f(this.btnAdd,k,b.hitch(this,function(){this._addSingleFilter();this.emit("change")})));if(this.partsObj){this.allAnySelect.value=this.partsObj.logicalOperator;
var a=this.partsObj.parts||[];0===a.length?(this._addSingleFilter(),this._addSingleFilter()):1===a.length?(this._addSingleFilter(a[0]),this._addSingleFilter()):d.forEach(a,b.hitch(this,function(c){this._addSingleFilter(c)}))}else this._addSingleFilter(),this._addSingleFilter();setTimeout(b.hitch(this,function(){this.allAnySelect.focus()}),5)},_addSingleFilter:function(a){a=new v({widgetId:this.widgetId,url:this.url,layerInfo:this.layerInfo,popupFieldsInfo:this.popupFieldsInfo,stringFieldType:this.stringFieldType,
dateFieldType:this.dateFieldType,numberFieldTypes:this.numberFieldTypes,part:a,OPERATORS:this.OPERATORS,enableAskForValues:this.enableAskForValues,isHosted:this.isHosted,valueProviderFactory:this.valueProviderFactory,isInFilterSet:!0,runtime:this.runtime});a.placeAt(this.allExpsBox);a.startup();this.own(u.after(a,"_destroySelf",b.hitch(this,function(){this._checkFilterNumbers();this.allAnySelect.focus()})));this.own(f(a,"change",b.hitch(this,function(){this.emit("change")})));this._checkFilterNumbers();
return a},_checkFilterNumbers:function(){var a=l(".jimu-single-filter",this.allExpsBox),c=2<a.length;d.forEach(a,b.hitch(this,function(e){e=g.byNode(e);c?e.showDelteIcon():e.hideDeleteIcon()}))},_destroySelf:function(){this.destroy()}})});