// 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:widgets/SmartEditor/setting/FilterPage.html":'\x3cdiv\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"submitWhenHidden"\x3e\x3c/div\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"filterControl"\x3e\x3c/div\x3e\r\n\x3c/div\x3e'}});
define("dojo/_base/declare dojo/Evented dojo/_base/lang dojo/json dojo/text!./FilterPage.html dijit/_TemplatedMixin jimu/BaseWidgetSetting jimu/dijit/Popup jimu/dijit/Filter esri/lang dijit/form/CheckBox dojo/dom-construct".split(" "),function(k,l,g,f,m,n,p,q,r,t,u,v){return k([p,l,n],{baseClass:"jimu-widget-smartEditor-filter-page",templateString:m,_filter:null,_url:null,_layerId:null,_layerDefinition:null,_validationTable:null,postCreate:function(){this.inherited(arguments);this._init()},_init:function(){this._origNLS=
window.jimuNls.filterBuilder.matchMsg;window.jimuNls.filterBuilder.matchMsg=this.nls.filterPage.filterBuilder},destroy:function(){window.jimuNls.filterBuilder.matchMsg=this._origNLS;this._filter&&(this._filter.destroyRecursive(),this._filter=null,delete this._filter);this._submitHidden&&(this._submitHidden.destroyRecursive(),this._submitHidden=null,delete this._submitHidden)},popup:function(e){var a;e&&this._validationTable&&(a=this._validationTable.getRowData(e));if(a&&a.label===this.nls.actionPage.actions.hide){this.submitWhenHidden.style.display=
"block";this._submitHidden=new u({id:"submitHidden",checked:void 0===a.submitWhenHidden?!1:a.submitWhenHidden,value:this.nls.filterPage.submitHidden},null);this.submitWhenHidden.appendChild(this._submitHidden.domNode);var w=g.replace("\x3clabel class\x3d'submithide' for\x3d'submitWhenHidden'\x3e{replace}\x3c/label\x3e\x3c/br\x3e\x3c/br\x3e",{replace:this.nls.filterPage.submitHidden});v.place(w,this._submitHidden.domNode,"after")}else this.submitWhenHidden.style.display="none";this._filter=new r({style:"width:100%;margin-top:22px;",
noFilterTip:this.nls.filterPage.noFilterTip});this._filter.placeAt(this.filterControl);var h=new q({titleLabel:t.substitute({action:a?a.label:this._groupName},this.nls.filterPage.title),width:850,height:485,content:this,rowData:a,buttons:[{label:this.nls.ok,onClick:g.hitch(this,function(){var c=this._filter.toJson(),d=!1;this._submitHidden&&this._submitHidden.checked&&(d=this._submitHidden.checked);c&&c.expr&&("1\x3d1"===c.expr?this._validationTable?this._validationTable.editRow(e,{expression:"",
filter:null,submitWhenHidden:d}):(this._filterInfo={expression:"",filter:null,submitWhenHidden:d},this.emit("filterInfo",this._filterInfo)):this._validationTable?this._validationTable.editRow(e,{expression:c.displaySQL,filter:f.stringify(c),submitWhenHidden:d}):(this._filterInfo={expression:c.displaySQL,filter:f.stringify(c),submitWhenHidden:d},this.emit("filterInfo",this._filterInfo)),h.close())})},{label:this.nls.cancel,classNames:["jimu-btn jimu-btn-vacation"],onClick:function(){h.close()}}]});
if(a)var b=a;else this._filterInfo&&(b=this._filterInfo);b&&(void 0===b.filter||null===b.filter||""===b.filter?this._filter.build({url:this._url,partsObj:null,layerDefinition:this._layerDefinition,featureLayerId:this._layerId}):b.filter.parts?this._filter.build({url:this._url,partsObj:b.filter,layerDefinition:this._layerDefinition,featureLayerId:this._layerId}):this._filter.build({url:this._url,partsObj:f.parse(b.filter),layerDefinition:this._layerDefinition,featureLayerId:this._layerId}))}})});