// 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:{"jimu/dijit/EditorXssFilter":function(){define("dojo/_base/declare dojo/_base/array dijit/_WidgetBase dojo/_base/lang dojo/Evented libs/arcgis-html-sanitizer/arcgis-html-sanitizer".split(" "),function(J,E,A,x,F,B){var v=null,p=J([A,F],{baseClass:"jimu-editor-xss-filter",declaredClass:"jimu.dijit.EditorXssFilter",sanitizer:null,xss:null,whiteList:{},graphicsWhiteList:{},postCreate:function(){this.whiteList=this._getWhiteList();this.sanitizer=new B({whiteList:this.whiteList,safeAttrValue:x.hitch(this,
function(k,u,g,l){return"style"===u?this.xss.friendlyAttrValue(g).replace(/"/g,"'"):"img"===k&&"src"===u?this.xss.escapeAttrValue(g):this.xss.safeAttrValue(k,u,g,l)}),onTag:x.hitch(this,function(k,u,g){if(g.isWhite&&this._isInWhiteList(k,this.graphicsWhiteList))return u}),onIgnoreTagAttr:x.hitch(this,function(k,u,g,l){if("data-"===u.substr(0,5))return u+'\x3d"'+this.xss.escapeAttrValue(g)+'"'}),onIgnoreTag:x.hitch(this,function(k,u,g){if("o:"===k.substr(0,2)||"!--[if"===k||"!--[endif]--"===k)return u})},
!0);this.xss=this.sanitizer.xss},sanitize:function(k){return this.sanitizer.sanitize(k)},_getWhiteList:function(){var k="title height width class style font-family id align text-align".split(" "),u={div:k,h1:k,h2:k,h3:k,h4:k,h5:k,h6:k,span:k,p:k,s:k,strong:k,em:k,u:k,ol:k,ul:k,li:k,a:["href","target"].concat(k),img:["src","alt","border"].concat(k),blockquote:k,font:["face","size","color"].concat(k),pre:k,code:k,b:k,i:k,wbr:k,video:"autoplay controls loop muted poster preload".split(" ").concat(k),
audio:["autoplay","controls","loop","muted","preload"].concat(k),source:["media","src","type"].concat(k),table:["cellpadding","cellspacing","border"].concat(k),tbody:[].concat(k),tr:["valign"].concat(k),td:["valign","colspan","rowspan","nowrap"].concat(k),th:["valign","colspan","rowspan","nowrap"].concat(k),hr:k,html:k,title:k,link:["rel","href"],style:["type"].concat(k),body:k};this.graphicsWhiteList={animate:[],animateMotion:[],animateTransform:[],circle:[],clipPath:[],"color-profile":[],defs:[],
desc:[],discard:[],ellipse:[],feBlend:[],feColorMatrix:[],feComponentTransfer:[],feComposite:[],feConvolveMatrix:[],feDiffuseLighting:[],feDisplacementMap:[],feDistantLight:[],feDropShadow:[],feFlood:[],feFuncA:[],feFuncB:[],feFuncG:[],feFuncR:[],feGaussianBlur:[],feImage:[],feMerge:[],feMergeNode:[],feMorphology:[],feOffset:[],fePointLight:[],feSpecularLighting:[],feSpotLight:[],feTile:[],feTurbulence:[],filter:[],foreignObject:[],g:[],hatch:[],hatchpath:[],line:[],linearGradient:[],marker:[],mask:[],
mesh:[],meshgradient:[],meshpatch:[],meshrow:[],metadata:[],mpath:[],path:[],pattern:[],polygon:[],polyline:[],radialGradient:[],rect:[],set:[],solidcolor:[],stop:[],svg:[],switch:[],symbol:[],text:[],textPath:[],title:[],tspan:[],use:[],view:[],object:[],canvas:k};return this._extendObjectOfArrays([u,{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],
blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],table:["width","border","align",
"valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:"autoplay controls loop preload src height width".split(" ")},this.graphicsWhiteList])},_extendObjectOfArrays:function(k){var u={};E.forEach(k,function(g){var l=Object.keys(g);E.forEach(l,function(H){Array.isArray(g[H])&&Array.isArray(u[H])?u[H]=u[H].concat(g[H]):
u[H]=g[H]},this)},this);return u},_isInWhiteList:function(k,u){u=Object.keys(u);var g=!1;E.forEach(u,function(l){k===l&&(g=!0)},this);return g}});p.getInstance=function(){null===v&&(v=new p);return v};return p})},"widgets/GroupFilter/SaveJSON":function(){define("dojo/Evented dojo/_base/declare dojo/Deferred dojo/_base/html dojo/has jimu/utils".split(" "),function(J,E,A,x,F,B){return E([J],{declaredClass:"saveJSON",config:null,constructor:function(v){E.safeMixin(this,v)},_getDownloadUrl:function(v){return window.Blob&&
window.URL&&window.URL.createObjectURL?(v=new Blob([v],{type:"text/json"}),URL.createObjectURL(v)):"data:attachment/json;charset\x3dutf-8,"+encodeURIComponent(v)},exportsJson:function(v,p){p=JSON.stringify(p);var k=new A;try{if(F("ie")&&10>F("ie")){var u=window.top.open("about:blank","_blank");u.document.write("sep\x3d,\r\n"+p);u.document.close();u.document.execCommand("SaveAs",!0,v);u.close();this.savePrompt()}else if(10===F("ie")||this._isIE11()||this._isEdge()){var g=new Blob([p],{type:"text/json"});
navigator.msSaveBlob(g,v);this.savePrompt()}else{var l=x.create("a",{href:this._getDownloadUrl(p),target:"_blank",download:v},document.body);if(F("safari")){var H=document.createEvent("MouseEvents");H.initEvent("click",!0,!0);l.dispatchEvent(H)}else l.click();this.savePrompt();x.destroy(l)}k.resolve()}catch(f){k.reject(f)}return k},_isIE11:function(){return 11===B.has("ie")},_isEdge:function(){return B.has("edge")},savePrompt:function(){this.emit("complete",{})}})})},"widgets/GroupFilter/ReadJSON":function(){define("dojo/Evented dojo/_base/declare dojo/has dojo/_base/lang jimu/utils jimu/dijit/Message".split(" "),
function(J,E,A,x,F,B){return E([J],{declaredClass:"readJSON",config:null,jsonFile:null,constructor:function(v){E.safeMixin(this,v)},checkFileReader:function(){this.supportHTML5()?(console.log("HTML 5 loader"),this._processFiles(this.jsonFile)):this.supportHTML5()||A("safari")||!this.isEnabledFlash()?console.log("no loader"):F.file.loadFileAPI().then(x.hitch(this,function(){console.log("loading FileAPI")}))},_processFiles:function(v){0<v.length&&(v=v[0],-1!==v.name.indexOf(".json")?v&&this.handleJson(v):
new B({message:"Not a json file"}))},handleJson:function(v){if(this.supportHTML5()){var p=new FileReader;p.onload=function(k){return function(){-1<p.result.indexOf("groups")?k.completePrompt(p.result):(new B({message:"json file is Invalid"}),k.errorPrompt("error"))}}(this);p.readAsText(v)}else window.FileAPI.readAsText(v,x.hitch(this,function(k){}))},supportHTML5:function(){return window.File&&window.FileReader&&window.FileList&&window.Blob?!0:!1},supportFileAPI:function(){return A("safari")&&6>A("safari")?
!1:window.FileAPI&&window.FileAPI.readAsDataURL?!0:!1},isEnabledFlash:function(){var v=null;if(document.all)try{v=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(p){v=null}else navigator.plugins&&0<navigator.plugins.length&&(v=navigator.plugins["Shockwave Flash"]);return!!v},completePrompt:function(v){this.emit("complete",{UserSettings:v})},errorPrompt:function(){this.emit("error",{UserSettings:"error"})}})})},"widgets/GroupFilter/LayersHandler":function(){define("dojo/Evented dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/Deferred dojo/promise/all esri/request".split(" "),
function(J,E,A,x,F,B,v){return E([J],{declaredClass:"LayersHandler",layers:null,layerStore:[],fieldName:null,childList:null,validFieldTypes:"esriFieldTypeInteger esriFieldTypeSmallInteger esriFieldTypeDouble esriFieldTypeSingle esriFieldTypeString esriFieldTypeDate esriFieldTypeGeometry esriFieldTypeOID esriFieldTypeBlob esriFieldTypeGlobalID esriFieldTypeRaster esriFieldTypeGUID esriFieldTypeXML".split(" "),layersOnly:!1,constructor:function(p){E.safeMixin(this,p)},getAllMapLayers:function(){var p=
[],k=new F,u;this.layerStore=[];x.forEach(this.layers,A.hitch(this,function(g){if(!g.featureCollection)if("undefined"===typeof g.originOperLayer||!g.originOperLayer.layerType||"ArcGISFeatureLayer"!==g.originOperLayer.layerType&&"ArcGISImageServiceLayer"!==g.originOperLayer.layerType)if(0<g.newSubLayers.length){if(this.childList=[],"undefined"===typeof g.originOperLayer.layerType||"ArcGISTiledMapServiceLayer"!==g.originOperLayer.layerType&&"VectorTileLayer"!==g.originOperLayer.layerType)x.forEach(g.layerObject.layerInfos,
A.hitch(this,function(l){l={label:l.name,id:g.id+"."+l.id,url:g.originOperLayer.url+"/"+l.id,type:"Layer",fieldName:this.fieldName,checked:!1,children:[],layer:g.layerObject};this.childList.push(l);p.push(this._getLayerInfo(l))})),u={label:g.title,id:g.id,url:g.originOperLayer.url,type:"Service",checked:!1,children:this.childList,layer:g.layerObject},this.layerStore.push(u)}else("undefined"===typeof g.originOperLayer.layerType||"ArcGISTiledMapServiceLayer"!==g.originOperLayer.layerType&&"VectorTileLayer"!==
g.originOperLayer.layerType)&&"ArcGISMapServiceLayer"===g.originOperLayer.layerType&&(this.childList=[],x.forEach(g.layerObject.layerInfos,A.hitch(this,function(l){l={label:l.name,id:g.id+"."+l.id,url:g.originOperLayer.url+"/"+l.id,type:"Layer",fieldName:this.fieldName,checked:!1,children:[],layer:g.layerObject};this.childList.push(l);p.push(this._getLayerInfo(l))})),u={label:g.title,id:g.id,url:g.originOperLayer.url,type:"MapService",checked:!1,children:this.childList,layer:g.layerObject},this.layerStore.push(u));
else"undefined"===typeof g.originOperLayer.featureCollection&&(u={label:g.title,id:g.id,url:g.url,fieldName:this.fieldName,type:"Feature Layer",checked:!1,children:[],layer:g.layerObject},p.push(this._getLayerInfo(u)),this.layerStore.push(u))}));B(p).then(A.hitch(this,function(){var g=this._controlComplete();this.emit("complete",g);k.resolve(g)}),A.hitch(this,function(){k.resolve(null)}));return k.promise},_getLayerInfo:function(p){var k=new F;p.url?0===p.url.length?k.resolve():v({url:p.url,content:{f:"json"},
callbackParamName:"callback"}).then(A.hitch(this,function(u){if(u.hasOwnProperty("fields")&&!1===this.layersOnly){var g=x.map(u.fields,A.hitch(this,function(l){return{label:l.alias,id:p.id+"."+l.name,name:l.name,type:"Field",fieldType:l.type,checked:!1}}));g=x.filter(g,A.hitch(this,function(l){return 0<=x.indexOf(this.validFieldTypes,l.fieldType)}));p.children=g}p.geometryType=u.geometryType;p.visible=!0;this.geometryTypes&&!x.some(this.geometryTypes,function(l){if(l===p.geometryType)return!0})&&
(p.visible=!1);k.resolve(u)}),function(){k.resolve(null)}):k.resolve();return k.promise},_controlComplete:function(){x.forEach(this.layerStore,function(p){if(p.children&&0<p.children.length){var k=x.filter(p.children,function(u){return u.hasOwnProperty("visible")?u.visible:!0});p.children=k;0===p.children.length&&(p.visible=!1)}});return this.store={data:{identifier:"id",label:"label",items:x.filter(this.layerStore,function(p){return p.hasOwnProperty("visible")?p.visible:!0})}}}})})},"widgets/GroupFilter/_build-generate_module":function(){define(["dojo/text!./Widget.html",
"dojo/text!./css/style.css","dojo/i18n!./nls/strings"],function(){})},"url:widgets/GroupFilter/Widget.html":'\x3cdiv\x3e\r\n\t\x3cdiv class\x3d"groupContainer" data-dojo-attach-point\x3d"widgetIntro"\x3e\r\n\t\t\x3cdiv class\x3d"group-picker"\x3e\r\n\t\t\t\x3ctable width\x3d"100%" cellspacing\x3d"0" cellpadding\x3d"0"\x3e\r\n\t\t\t\t\x3ctr\x3e\r\n\t\t\t\t\t\x3ctd class\x3d"groupHeader" data-dojo-attach-point\x3d"groupSelectHeader" \x3e${nls.labels.selectGroup}\x3c/td\x3e\r\n\t\t\t\t\t\x3ctd class\x3d"saveIconHolder"\x3e\r\n            \x3cdiv class\x3d"saveTD" data-dojo-attach-point\x3d"optionsIcon" id\x3d"saveTD" tabIndex\x3d0 aria-label\x3d"${nls.labels.layerOptionHeading}" role\x3d"button"\x3e\x3c/div\x3e\r\n          \x3c/td\x3e\r\n\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\t\x3ctr\x3e\r\n\t\t\t\t\t\x3ctd colspan\x3d"2"\x3e\x3cdiv data-dojo-attach-point\x3d"groupPicker" id\x3d"groupPicker"\x3e\x3c/div\x3e\x3c/td\x3e\r\n\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\t\x3ctr\x3e\r\n\t\t\t\t\t\x3ctd colspan\x3d"2" id\x3d"groupDesc" data-dojo-attach-point\x3d"groupDesc" style\x3d"padding-top: 5px"\x3e\x3c/td\x3e\r\n\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\x3c/table\x3e\r\n\t\t\x3c/div\x3e\r\n\t\x3c/div\x3e\r\n\r\n\t\x3cdiv class\x3d"container" data-dojo-attach-point\x3d"filterBlock" id\x3d"filterBlock"\x3e\r\n\t\t\x3cdiv class\x3d"filter-block" data-dojo-attach-point\x3d"filterBlockInner" id\x3d"filterBlockInner"\x3e\r\n\t\t\t\x3ctable id\x3d"tblPredicates" class\x3d"tableFormat" border\x3d0 cellspacing\x3d"0" cellpadding\x3d"0"\x3e\x3c/table\x3e\r\n\t\t\x3c/div\x3e\r\n\t\x3c/div\x3e\r\n\r\n\t\x3cdiv class\x3d"saveContainer" data-dojo-attach-point\x3d"saveBlock" id\x3d"saveBlock"\x3e\r\n\t\t\x3cdiv class\x3d"save-block" data-dojo-attach-point\x3d"saveBlockInner" id\x3d"saveBlockInner"\x3e\r\n\t\t\t\x3ctable id\x3d"tblSave" class\x3d"tableFormat" border\x3d0 cellspacing\x3d"0" cellpadding\x3d"0"\x3e\r\n\t\t\t\t\x3ctr class\x3d"rowHeader"\x3e\r\n\t\t\t\t\t\x3ctd\x3e\x3c/td\x3e\r\n\t\t\t\t\t\x3ctd class\x3d"tdFirstLabel" aria-labelledby\x3d${nls.labels.saveHeading}\x3e${nls.labels.saveHeading}\x3c/td\x3e\r\n\t\t\t\t\t\x3ctd class\x3d"close-save" data-dojo-attach-point\x3d"closeSaveIcon" tabIndex\x3d0 aria-label\x3d"${nls.buttons.save}" role\x3d"button"\x3e\x3c/td\x3e\r\n\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\t\x3ctr\x3e\r\n\t\t\t\t\t\x3ctd\x3e\x3c/td\x3e\r\n\t\t\t\t\t\x3ctd class\x3d"tdData"\x3e\x3cdiv class\x3d"jimu-btn saveFunction" data-dojo-attach-point\x3d"btnSaveToJson" data-dojo-attach-event\x3d"click:saveJsonToFile" tabIndex\x3d0 role\x3d"button"\x3e${nls.buttons.save}\x3c/div\x3e\x3c/td\x3e\r\n\t\t\t\t\t\x3ctd\x3e\x3c/td\x3e\r\n\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\t\x3ctr class\x3d"rowHeader"\x3e\r\n\t\t\t\t\t\x3ctd\x3e\x3c/td\x3e\r\n\t\t\t\t\t\x3ctd class\x3d"tdLabel"\x3e${nls.labels.uploadHeading}\x3c/td\x3e\r\n\t\t\t\t\t\x3ctd\x3e\x3c/td\x3e\r\n\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\t\x3ctr class\x3d"rowHeader"\x3e\r\n\t\t\t\t\t\x3ctd\x3e\x3c/td\x3e\r\n\t\t\t\t\t\x3ctd class\x3d"tdData"\x3e\x3cinput type\x3d"file" id\x3d"jsonFileInput" data-dojo-attach-point\x3d"jsonFileInput" data-dojo-attach-event\x3d"change:readJsonToConfig" accept\x3d".json" aria-label\x3d"${nls.labels.uploadHeading}" role\x3d"button"\x3e\x3c/td\x3e\r\n\t\t\t\t\t\x3ctd class\x3d"loadProgressHeader" id\x3d"tdProgress"\x3e\x3c/td\x3e\r\n\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\x3c/table\x3e\r\n\t\t\t\x3cbr\x3e\r\n\t\t\t\x3ctable id\x3d"tblFIlterOptions" class\x3d"tableFormat" border\x3d0 cellspacing\x3d"0" cellpadding\x3d"0"\x3e\r\n\t\t\t\t\x3ctr class\x3d"rowHeader"\x3e\r\n\t\t\t\t\t\x3ctd class\x3d"tdLabel"\x3e${nls.labels.layerOptionHeading}\x3c/td\x3e\r\n\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\t\x3ctr style\x3d"height:0px; display:none;"\x3e\r\n\t\t\t\t\t\x3ctd class\x3d"tdData"\x3e\x3cinput type\x3d"checkbox" data-dojo-type\x3d"dijit/form/CheckBox"  data-dojo-attach-point\x3d"chkAppendToDef" data-dojo-props\x3d"value:true,checked:false"/\x3e ${nls.labels.AppendDefHeading}\r\n\t\t\t\t\t\t\x3cselect data-dojo-attach-point\x3d"slAppendChoice" data-dojo-type\x3d"dijit/form/Select"\x3e\r\n\t\t\t\t\t\t    \x3coption value\x3d"OR"\x3e${nls.inputs.optionOR}\x3c/option\x3e\r\n\t\t\t\t\t\t    \x3coption value\x3d"AND"\x3e${nls.inputs.optionAND}\x3c/option\x3e\r\n\t\t\t\t\t\t\x3c/select\x3e\r\n\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\t\x3ctr\x3e\r\n\t\t\t\t\t\x3ctd class\x3d"tdData"\x3e\x3cinput type\x3d"checkbox" data-dojo-type\x3d"dijit/form/CheckBox"  data-dojo-attach-point\x3d"chkPersistDef" data-dojo-props\x3d"value:true,checked:false" aria-label\x3d"${nls.labels.PersistDefHeading}"/\x3e ${nls.labels.PersistDefHeading}\x3c/td\x3e\r\n\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\t\x3ctr class\x3d"rowHeader"\x3e\r\n\t\t\t\t\t\x3ctd class\x3d"tdLabel"\x3e${nls.labels.RefreshHeading}\x3c/td\x3e\r\n\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\t\x3ctr\x3e\r\n\t\t\t\t\t\x3ctd class\x3d"tdData"\x3e\x3cdiv data-dojo-attach-point\x3d"refreshDataIcon" data-dojo-attach-event\x3d"click:refreshData" tabIndex\x3d0\x3e\x3ca class\x3d"refresh-icon" id\x3d"refreshDiv" role\x3d"button"\x3e\x3c/a\x3e ${nls.labels.RefreshValueList}\x3c/div\x3e\x3c/td\x3e\r\n\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\x3c/table\x3e\r\n\t\t\x3c/div\x3e\r\n\t\x3c/div\x3e\r\n\r\n\r\n\t\x3cdiv class\x3d"buttonContainer"\x3e\r\n\t\t\x3ctable class\x3d"buttonContainerTable" border\x3d0\x3e\r\n\t\t\t\x3ctr\x3e\r\n          \x3ctd class\x3d"filter-add-criteria" width\x3d"100%"\x3e\x3cdiv class\x3d"jimu-btn" data-dojo-attach-point\x3d"btnCriteria" data-dojo-attach-event\x3d"click:btnNewRowAction" tabIndex\x3d"0"\x3e${nls.buttons.addCriteria}\x3c/div\x3e\x3c/td\x3e\r\n      \x3c/tr\x3e\r\n      \x3ctr\x3e\r\n        \x3ctd width\x3d"100%"\x3e\r\n\t\t\t\t\t\x3ctable class\x3d"buttonContainerSubtable" border\x3d0 width\x3d"100%"\x3e\r\n\t\t\t\t\t\t\x3ctr\x3e\r\n\t\t\t\t\t\t\t\x3ctd class\x3d"filter-button-apply" width\x3d"50%"\x3e\x3cdiv class\x3d"jimu-btn" data-dojo-attach-point\x3d"btnApply" data-dojo-attach-event\x3d"click:setFilterLayerDef" tabIndex\x3d"0"\x3e${nls.buttons.applyCriteria}\x3c/div\x3e\x3c/td\x3e\r\n\t\t\t\t\t\t\t\x3ctd class\x3d"filter-button-cancel"  width\x3d"50%"\x3e\x3cdiv class\x3d"jimu-btn" data-dojo-attach-point\x3d"btnReset" data-dojo-attach-event\x3d"click:clearCriteria" tabIndex\x3d"0"\x3e${nls.buttons.removeCriteria}\x3c/div\x3e\x3c/td\x3e\r\n\t\t\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\t\t\x3c/table\x3e\r\n\t\t\t\t\x3c/td\x3e\r\n\t\t\t\x3c/tr\x3e\r\n\t\t\x3c/table\x3e\r\n\t\x3c/div\x3e\r\n\r\n\x3c/div\x3e',
"url:widgets/GroupFilter/css/style.css":'.jimu-widget-map-filter {width:100%; height:100%;}.jimu-widget-map-filter .groupContainer {display: block;}.jimu-widget-map-filter .container {border-color: #e1e1e1; border-top: 3px solid; width: 100%; display: block;}.jimu-widget-map-filter .saveContainer {width: 100%; height: 100%; position:absolute; top: 0px; left: 0px; overflow-y: auto; overflow-x: auto; display: none;}.jimu-widget-map-filter .save-block {position: absolute; left: 5px;}.jimu-widget-map-filter .close-save {position:relative; float: right; content: url("../images/setting_default.png"); cursor: hand; cursor: pointer;}.jimu-widget-map-filter .close-save:after {position:relative; float: right; content: url("../images/setting_default.png"); cursor: hand; cursor: pointer;}.jimu-widget-map-filter .headerTable {width: 100%;}.jimu-widget-map-filter .groupHeader {font-size: 10pt; padding-left: 0px; padding-bottom: 5px; width: 100%;}.jimu-widget-map-filter .saveIconHolder{vertical-align: top;}.jimu-widget-map-filter .saveTD {content: url("../images/setting_disabled.png"); cursor: hand; cursor: pointer;}.jimu-widget-map-filter .saveTD:after {content: url("../images/setting_disabled.png"); cursor: hand; cursor: pointer;}.jimu-widget-map-filter .saveTDClose {content: url("../images/setting_default.png"); cursor: hand; cursor: pointer;}.jimu-widget-map-filter .saveTDClose:after {content: url("../images/setting_default.png"); cursor: hand; cursor: pointer;}.jimu-widget-map-filter .group-picker {padding-bottom: 5px;}.jimu-widget-map-filter .filter-block {}.jimu-widget-map-filter .filter-row {position: relative; width: 100%;}.jimu-widget-map-filter .tableFormat {table-layout: fixed; width:100%;}.jimu-widget-map-filter .rowHeader {color: #000000;}.jimu-widget-map-filter .saveFunction {margin-top: 5px;}.jimu-widget-map-filter .tableRow {background-color: #E3E3E3;}.jimu-widget-map-filter .tdOperatorHide {display: block; width: 75px;}.jimu-widget-map-filter .operatorSelect {}.jimu-widget-map-filter .tdValue {width: 200px; height: 20px; padding-left: 5px;}.jimu-widget-map-filter .userInputNormal {width: 95%;}.jimu-widget-map-filter .tdConjunction {width: 75px;}.jimu-widget-map-filter .conjuncSelect {width: 70px;}.jimu-widget-map-filter .tdRemove {width: 16px; text-align: right;}.jimu-widget-map-filter .tdFirstLabel {text-align: left; padding-left: 5px; padding-top: 5px; padding-bottom: 0px; padding-right: 5px; width: 100%;}.jimu-widget-map-filter .tdLabel {text-align: left; padding-left: 5px; padding-top: 15px; padding-bottom: 2px; padding-right: 5px; width: 100%;}.jimu-widget-map-filter .tdData {text-align: left; padding-left: 5px; padding-top: 5px; padding-bottom: 5px; padding-right: 5px; width: 100%;}.jimu-widget-map-filter .tdUploadData {text-align: left; padding-left: 5px; padding-top: 10px; padding-bottom: 0px; padding-right: 5px; width: 100%;}.jimu-widget-map-filter .tdSave {text-align: right; padding-right: 5px; width: 100%;}.jimu-widget-map-filter .loadProgressHeader {display: none; width: 16px;}.jimu-widget-map-filter .loadProgressShow {content: url("../images/validating.gif"); display: none; width: 16px;}.jimu-widget-map-filter .loadProgressShow:after {content: url("../images/validating.gif"); display: none; width: 16px;}.jimu-widget-map-filter .advModeOffset {content: url("../images/setting_default.png"); padding-right: 10px; cursor: hand; cursor: pointer;}.jimu-widget-map-filter .advModeOffset:after {content: url("../images/setting_default.png"); padding-right: 10px; cursor: hand; cursor: pointer;}.jimu-widget-map-filter .advModeClose {content: url("../images/setting_disabled.png"); cursor: hand; cursor: pointer; width: 16px; height: 16px;}.jimu-widget-map-filter .advModeClose:after {content: url("../images/setting_disabled.png"); cursor: hand; cursor: pointer; width: 16px; height: 16px;}.jimu-widget-map-filter .advModeOpen {content: url(""); cursor: hand; cursor: pointer; width: 16px; height: 16px;}.jimu-widget-map-filter .deleteCell {content: url("../images/delete.png"); width: 16px; height: 16px; cursor: hand; cursor: pointer;}.jimu-widget-map-filter .deleteCell:after {content: url("../images/delete.png"); width: 16px; height: 16px; cursor: hand; cursor: pointer;}.jimu-widget-map-filter .deleteCell:hover {content: url("../images/delete_hover.png"); width: 16px; height: 16px; cursor: hand; cursor: pointer;}.jimu-widget-map-filter .buttonContainer {position: relative; bottom: 0px; width: 100%;}.jimu-widget-map-filter .buttonContainerTable {width: 100%;}.jimu-widget-map-filter .buttonContainerSubtable {float: left;}.jimu-widget-map-filter .filter-add-criteria {text-align: left;}.jimu-widget-map-filter .filter-button-apply {text-align: left; padding-right: 5px;}.jimu-widget-map-filter .filter-button-cancel {text-align: right;}.jimu-widget-map-filter .criteriaCellSize {width: 90%; vertical-align: top; padding-top: 5px; padding-left: 2px;}.jimu-widget-map-filter .deleteCellSize {width: 20px; text-align: right; vertical-align: top; padding-top: 5px;}.jimu-widget-map-filter .hide-items {display: none;}.jimu-widget-map-filter .refresh-icon:after {content: url("../images/refresh.png"); width: 16px; height: 16px; cursor: hand; cursor: pointer;}.jimu-widget-map-filter .refresh-done-icon:after {content: url("../images/check.png"); width: 16px; height: 16px; cursor: hand; cursor: pointer;}.jimu-widget-map-filter .operator-class {}.jimu-widget-map-filter .value-class {}',
"*now":function(J){J(['dojo/i18n!*preload*widgets/GroupFilter/nls/Widget*["ar","bs","ca","cs","da","de","en","el","es","et","fi","fr","he","hr","hu","id","it","ja","ko","lt","lv","nb","nl","pl","pt-br","pt-pt","ro","ru","sk","sl","sr","sv","th","tr","zh-cn","uk","vi","zh-hk","zh-tw","ROOT"]'])},"*noref":1}});
define("dojo/_base/declare dijit/_WidgetsInTemplateMixin jimu/BaseWidget dijit jimu/dijit/FilterParameters dojo/dom dojo/dom-construct dojo/dom-class dojo/dom-attr dojo/dom-style dojo/on dojo/query dojo/string dojo/_base/lang dojo/_base/array dojo/date/locale dojo/keys dojo/Deferred dojo/topic dijit/form/Select dijit/form/TextBox dijit/form/DateTextBox dijit/form/NumberTextBox dijit/registry jimu/LayerInfos/LayerInfos jimu/utils jimu/FilterManager jimu/dijit/EditorXssFilter esri/tasks/query esri/tasks/QueryTask esri/geometry/geometryEngine esri/layers/FeatureLayer ./SaveJSON ./ReadJSON ./LayersHandler dojox/html/entities dijit/form/CheckBox".split(" "),function(J,
E,A,x,F,B,v,p,k,u,g,l,H,f,m,K,z,ba,ca,N,R,S,T,L,U,w,V,W,O,P,M,X,Y,Z,aa,Q){return J([A,E],{baseClass:"jimu-widget-map-filter",layerList:null,msLayersDesc:null,grpSelect:null,groupCounter:0,groupCurrVal:null,groupMatrix:[],w2wHistory:[],defaultDef:null,runTimeConfig:null,useDomain:null,useDate:null,useValue:null,useCaseSearch:null,runInitial:!1,graphicsHolder:null,slAppendChoice:null,chkAppendToDef:null,persistOnClose:!0,filterExt:null,isHosted:null,firstOpen:!0,bypassActive:!1,dayInMS:86399E3,urlParameters:null,
urlLoadHandler:null,postCreate:function(){this.inherited(arguments);this.defaultDef=[];this.graphicsHolder=[];this.editorXssFilter=W.getInstance();this.urlParameters=this.getUrlParam("groupfilter","");this.handleKeyDownEvents();this.registerEventHandler();this.config.hasOwnProperty("headerText")&&""!==this.config.headerText&&(this.groupSelectHeader.innerHTML=this.editorXssFilter.sanitize(this.config.headerText));this.config.hasOwnProperty("hideHeaderSelection")&&this.config.hideHeaderSelection&&1===
this.config.groups.length&&(u.set(this.groupSelectHeader,"display","none"),u.set(this.groupPicker,"display","none"))},startup:function(){this.inherited(arguments);this.config.optionsMode&&p.add(this.optionsIcon,"hide-items");null!==this.urlParameters&&""!==this.urlParameters?this.runInitial=!0:""!==this.config.groups[0].defaultVal&&""!==this.config.groups[0].operator&&(this.runInitial=!0);"undefined"!==typeof this.config.webmapAppendMode&&(this.chkAppendToDef.checked=this.config.webmapAppendMode,
this.slAppendChoice.value=this.config.slAppendChoice);"undefined"!==typeof this.config.persistOnClose?this.persistOnClose=this.config.persistOnClose:this.config.persistOnClose=this.persistOnClose;this.chkPersistDef.set("checked",this.persistOnClose);this.populateGroupState();this.createMapLayerList()},loadAllURLParams:function(a){if(null!==this.urlParameters&&""!==this.urlParameters){var b=[],d=Object.keys(this.urlParameters);m.forEach(this.groupMatrix,f.hitch(this,function(c){b=[];fieldList=[];valueList=
[];-1<d.indexOf(c.name)&&(m.forEach(c.layers,f.hitch(this,function(e,h){e.id===a.id&&(this._applyFilter(a.layerObject,e.expression,!1),b.push({field:e.field,value:e.value[h]?e.value[h]:"",operator:"\x3d",conjunc:this.config.slAppendChoice}))})),0<b.length&&this._publishData(b,c.name))}))}},populateGroupState:function(){this.groupMatrix=[];m.map(this.config.groups,f.hitch(this,function(a){var b=[];m.forEach(a.layers,f.hitch(this,function(d){var c="",e=[],h="";if(null!==this.urlParameters&&""!==this.urlParameters&&
-1<Object.keys(this.urlParameters).indexOf(a.name)){var n=this.urlParameters[a.name];0<n.length&&(1===n.length?(c=d.field+" \x3d '"+w.stripHTML(n[0])+"'",e.push(w.stripHTML(n[0])),h=d.field):m.forEach(n,f.hitch(this,function(q,t){c=t===n.length-1?c+" ("+d.field+" \x3d '"+w.stripHTML(q)+"')":c+" ("+d.field+" \x3d '"+w.stripHTML(q)+"') "+this.config.slAppendChoice;e.push(w.stripHTML(q));h=d.field})))}b.push({id:d.layer,expression:c,value:e,field:h})}));this.groupMatrix.push({name:a.name,layers:b})}))},
btnNewRowAction:function(){var a=m.filter(this.config.groups,f.hitch(this,function(c){return c.name===this.grpSelect.value}));if(0<a.length){var b=this.checkDefaultValue(a[0]),d=this.checkDefaultOperator(a[0]);this.createNewRow({operator:d,value:b,conjunc:"OR",state:"new",group:a[0].name})}else b=this.checkDefaultValue(this.config.groups[0]),d=this.checkDefaultOperator(this.config.groups[0]),this.createNewRow({operator:d,value:b,conjunc:"OR",state:"new",group:this.config.groups[0].name})},createMapLayerList:function(){U.getInstance(this.map,
this.map.itemInfo).then(f.hitch(this,function(a){a._layerInfos&&0<a._layerInfos.length&&(this.layerList=a._layerInfos,this._pullMapServiceFields(a._layerInfos),m.forEach(this.layerList,f.hitch(this,function(b){"ArcGISTiledMapServiceLayer"!==b.originOperLayer.layerType&&"VectorTileLayer"!==b.originOperLayer.layerType&&"undefined"===typeof b.originOperLayer.featureCollection&&("undefined"===typeof b.layerObject._defnExpr&&"undefined"!==typeof b.layerObject.defaultDefinitionExpression&&b.layerObject.getDefinitionExpression(),
this.defaultDef.push({layer:b.id,definition:"",visible:""}),this.loadAllURLParams(b))})))}))},_pullMapServiceFields:function(a){this.msLayersDesc=[];a=new aa({layers:a});this.own(g(a,"complete",f.hitch(this,function(b){m.forEach(b.data.items,f.hitch(this,function(d){0<d.children.length&&this.msLayersDesc.push(d)}));this.createGroupSelection()})));this.own(g(a,"error",f.hitch(this,function(){console.log("error")})));a.getAllMapLayers()},checkDomainUse:function(a){this.useValue=this.useDomain=null;
m.forEach(this.config.groups,f.hitch(this,function(b){b.name===a.group&&m.forEach(b.layers,f.hitch(this,function(d){m.forEach(this.layerList,f.hitch(this,function(c){"undefined"!==typeof c.newSubLayers&&(0<c.newSubLayers.length?m.forEach(this.msLayersDesc,f.hitch(this,function(e){m.forEach(e.children,f.hitch(this,function(h){h.id===d.layer&&m.forEach(h.children,f.hitch(this,function(n){n.name===d.field&&""!==d.useDomain&&(this.useValue=d.useDomain)}))}))})):d.layer===c.id&&m.forEach(c.layerObject.fields,
f.hitch(this,function(e){e.name===d.field&&""!==d.useDomain&&(this.useValue=d.useDomain,"undefined"!==typeof e.domain&&(this.useDomain=e.domain))})))}))}))}))},checkDateUse:function(a){this.useDate=null;m.forEach(this.config.groups,f.hitch(this,function(b){b.name===a.group&&m.forEach(b.layers,f.hitch(this,function(d){m.forEach(this.layerList,f.hitch(this,function(c){d.layer===c.id&&m.forEach(c.layerObject.fields,f.hitch(this,function(e){e.name===d.field&&0<=e.type.indexOf("Date")&&(this.useDate=!0)}))}))}))}))},
checkCaseSearch:function(a){this.useCaseSearch=null;m.forEach(this.config.groups,f.hitch(this,function(b){b.name===a.group&&(this.useCaseSearch=b.caseSearch)}))},checkIsHosted:function(a){this.isHosted=!1;w.isHostedService(a.url)&&(this.isHosted=!0)},createGroupSelection:function(){var a=[],b="";m.forEach(this.config.groups,f.hitch(this,function(c){null!==this.urlParameters&&""!==this.urlParameters&&Object.keys(this.urlParameters);var e={};e.value=c.name;e.label=c.name;e.selected=!1;a.push(e)}));
v.empty("groupPicker");this.removeAllRows();this.grpSelect=(new N({options:a,tabIndex:0,"aria-label":this.nls.labels.selectGroup})).placeAt(this.groupPicker);this.grpSelect.startup();this.checkDomainUse({group:this.grpSelect.value});this.checkDateUse({group:this.grpSelect.value});this.checkCaseSearch({group:this.grpSelect.value});this.groupCurrVal=this.grpSelect.value;"undefined"!==typeof this.config.groups[0]&&(b=this.config.groups[0].desc,this.groupDesc.innerHTML=w.sanitizeHTML(b));this.own(g(this.grpSelect,
"change",f.hitch(this,function(c){this.config.webmapAppendMode||this.resetLayerDef({group:this.groupCurrVal});this.removeAllRows();this.checkDomainUse({group:c});this.checkDateUse({group:c});this.checkCaseSearch({group:c});this.reconstructRows(c);this.updateGroupDesc(c);this.groupCurrVal=c;this.config.webmapAppendMode||m.forEach(this.config.groups,f.hitch(this,function(e){e.name===c&&e.hasOwnProperty("def")&&setTimeout(f.hitch(this,this.setFilterLayerDef),1E3)}))})));if(null!==this.urlParameters&&
""!==this.urlParameters)if(b=m.filter(this.config.groups,f.hitch(this,function(c){return c.name===this.grpSelect.get("value")})),0<b.length)this.addCriteriaByURL(b[0]);else{b=this.checkDefaultValue(this.config.groups[0]);var d=this.checkDefaultOperator(this.config.groups[0]);this.createNewRow({operator:d,value:b,conjunc:"OR",state:"new",group:this.config.groups[0].name})}else b=this.checkDefaultValue(this.config.groups[0]),d=this.checkDefaultOperator(this.config.groups[0]),this.createNewRow({operator:d,
value:b,conjunc:"OR",state:"new",group:this.config.groups[0].name});null!==this.urlParameters&&""!==this.urlParameters&&(b=m.map(this.config.groups,f.hitch(this,function(c){return c.name})),d=Object.keys(this.urlParameters),JSON.stringify(b),JSON.stringify(d));this._setFirstLastNodeOnMainScreen()},createNewRow:function(a){var b=B.byId("tblPredicates");if("new"===a.state){var d=0;if(1<b.rows.length){var c=b.rows[b.rows.length-1].cells[0].firstChild;c=c.rows[2].cells[0];this.createConditionSelection(c,
a);d=b.rows.length}else 1===b.rows.length&&(d=1,c=b.rows[b.rows.length-1].cells[0].firstChild,c=c.rows[2].cells[0],this.createConditionSelection(c,a));null!==this.urlParameters&&""!==this.urlParameters&&"undefined"!==typeof this.urlParameters[a.group]&&(a.value=this.urlParameters[a.group][d])}d=b.insertRow(-1);var e=d.insertCell(0);c=d.insertCell(1);p.add(e,"criteriaCellSize");p.add(c,"deleteCellSize");var h=v.create("table",{border:"0",width:"100%"},e);e=h.insertRow(-1);var n=e.insertCell(0),q=h.insertRow(-1).insertCell(0);
h=h.insertRow(-1).insertCell(0);u.set(h,{paddingLeft:"3px",paddingRight:"3px"});p.add(e,"operator-class");this.colorRows();this.createOperatorSelection(n,a);this.removeTableRow(c,d,b.rows.length);this.createInputFilter(q,a);this.resize();this.config.simpleMode&&(p.add(this.btnCriteria,"hide-items"),p.add(e,"hide-items"),l(".container").style("borderTop","0px"),u.set(q,{paddingLeft:"0px",paddingRight:"0px"}));"reload"===a.state?""!==a.conjunc&&(c=b.rows[b.rows.length-1].cells[0].firstChild,c=c.rows[2].cells[0],
this.createConditionSelection(c,a)):this.runInitial&&(this.runInitial=!1,setTimeout(f.hitch(this,this.setFilterLayerDef),1E3))},colorRows:function(){var a=B.byId("tblPredicates").rows;m.forEach(a,function(b,d){0===d%2?p.remove(b,"tableRow"):p.add(b,"tableRow")})},createOperatorSelection:function(a,b){a=(new N({options:[{value:"\x3d",label:this.nls.inputs.optionEQUAL,"aria-label":this.nls.inputs.optionEQUAL},{value:"\x3c\x3e",label:this.nls.inputs.optionNOTEQUAL,"aria-label":this.nls.inputs.optionNOTEQUAL},
{value:"\x3e",label:this.nls.inputs.optionGREATERTHAN,"aria-label":this.nls.inputs.optionGREATERTHAN},{value:"\x3e\x3d",label:this.nls.inputs.optionGREATERTHANEQUAL,"aria-label":this.nls.inputs.optionGREATERTHANEQUAL},{value:"\x3c",label:this.nls.inputs.optionLESSTHAN,"aria-label":this.nls.inputs.optionLESSTHAN},{value:"\x3c\x3d",label:this.nls.inputs.optionLESSTHANEQUAL,"aria-label":this.nls.inputs.optionLESSTHANEQUAL},{value:"START",label:this.nls.inputs.optionSTART,"aria-label":this.nls.inputs.optionSTART},
{value:"END",label:this.nls.inputs.optionEND,"aria-label":this.nls.inputs.optionEND},{value:"LIKE",label:this.nls.inputs.optionLIKE,"aria-label":this.nls.inputs.optionLIKE},{value:"NOT LIKE",label:this.nls.inputs.optionNOTLIKE,"aria-label":this.nls.inputs.optionNOTLIKE},{value:"d\x3c\x3d",label:this.nls.inputs.optionONORBEFORE,"aria-label":this.nls.inputs.optionONORBEFORE},{value:"d\x3e\x3d",label:this.nls.inputs.optionONORAFTER,"aria-label":this.nls.inputs.optionONORAFTER}],"class":"operatorSelect",
tabIndex:0,"aria-label":this.nls.labels.operatorLabel})).placeAt(a);a.startup();a.set("value",Q.decode(b.operator));this.own(g(a,"click",f.hitch(this,function(){})));this.own(g(a,"change",f.hitch(this,function(){})))},createInputFilter:function(a,b){v.empty(a);if(null!==this.useDomain)if("undefined"!==typeof this.useDomain.codedValues){var d=new F;d.placeAt(a);d.startup();this.createValueList(b,d)}else d="",""!==b.value&&(d=Number(b.value)),(new T({value:d,placeHolder:H.substitute(this.nls.inputs.textboxNumber,
{0:this.useDomain.minValue,1:this.useDomain.maxValue}),"class":"userInputNormal",constraints:{min:this.useDomain.minValue,max:this.useDomain.maxValue}})).placeAt(a).startup(),this.formatSpacing(a);else!0===this.useValue?(d=new F,d.placeAt(a),d.startup(),this.createValueList(b,d)):(!0===this.useDate?(b=K.format(""!==b.value?new Date(b.value):new Date,{selector:"date",fullYear:!0}),d=(new S({value:b,placeHolder:b,"class":"userInputNormal"})).placeAt(a),d.startup(),d.set("displayedValue",b)):(new R({value:b.value,
placeHolder:this.nls.inputs.textboxText,"class":"userInputNormal"})).placeAt(a).startup(),this.formatSpacing(a))},createValueList:function(a,b){var d={},c=[],e="";m.forEach(this.config.groups,f.hitch(this,function(h){h.name===this.grpSelect.value&&m.forEach(h.layers,f.hitch(this,function(n){e="";m.forEach(this.layerList,f.hitch(this,function(q){0<q.newSubLayers.length?m.forEach(this.msLayersDesc,f.hitch(this,function(t){m.forEach(t.children,f.hitch(this,function(G){if(G.id===n.layer){if(e!==G.id&&
!0===n.useDomain){var I=new X(G.url);this.own(g(I,"load",f.hitch(this,function(){this._callFilterDijit(n,a,G.url,I.toJson().layerDefinition,c,d,b)})))}e=G.id}}))})):n.layer===q.id&&!0===n.useDomain&&this._callFilterDijit(n,a,q.layerObject.url,q.layerObject.toJson().layerDefinition,c,d,b)}))}))}))},_callFilterDijit:function(a,b,d,c,e,h,n){var q={fieldObj:{}};q.fieldObj.name=a.field;q.fieldObj.label=a.field;q.fieldObj.shortType=a.dataType.replace("esriFieldType","").toLowerCase();if("guid"!==q.fieldObj.shortType||
"globalid"!==q.fieldObj.shortType)q.fieldObj.shortType="string";"date"!==q.fieldObj.shortType&&"string"!==q.fieldObj.shortType&&(q.fieldObj.shortType="number");q.fieldObj.type=a.dataType;q.operator=q.fieldObj.shortType+"OperatorIs";q.valueObj={};q.valueObj.isValid=!0;q.valueObj.type=this.useDomain?"value":"unique";-1<a.dataType.indexOf("Integer")||-1<a.dataType.indexOf("Double")||-1<a.dataType.indexOf("Short")?q.valueObj.value=this.useDomain?Number(b.value):b.value:q.valueObj.value=b.value;q.interactiveObj=
{};q.interactiveObj.prompt="";q.interactiveObj.hint="";q.caseSensitive=!1;e.push(q);h.logicalOperator="OR";h.expr="";h.parts=e;null!==c.id?n.build(d,c,h,c.id,this.id):(a=a.layer.replace(/.([^.]*)$/,"_$1"),n.build(d,c,h,a,this.id));d=l(".jimu-single-filter-parameter");m.forEach(d,function(t){var G=l("table",t);m.forEach(G,function(I){k.set(I,"cellpadding","1");k.set(I,"cellspacing","1")});t=l("colgroup",t);0<t.length&&k.set(t[0].childNodes[1],"width","0px")})},formatSpacing:function(a){u.set(a,{paddingLeft:"2px",
paddingRight:"2px"})},createConditionSelection:function(a,b){v.empty(a);a=(new N({options:[{value:"OR",label:this.nls.inputs.optionOR},{value:"AND",label:this.nls.inputs.optionAND}],"class":"conjuncSelect",tabIndex:0,"aria-label":this.nls.inputs.conjuncLabel})).placeAt(a);a.startup();a.set("value",b.conjunc)},removeTableRow:function(a,b,d){1<d&&(d=v.create("div",{"class":"deleteCell",innerHTML:"",tabIndex:0,"aria-label":this.nls.buttons.deleteCriteriaRow}),this.own(g(d,"click",f.hitch(this,function(){v.destroy(b);
var c=B.byId("tblPredicates");1<=c.rows.length&&v.empty(c.rows[c.rows.length-1].cells[0].firstChild.rows[2].cells[0]);this.colorRows()}))),this.own(g(d,"keydown",f.hitch(this,function(c){if(c.keyCode===z.ENTER||c.keyCode===z.SPACE)v.destroy(b),c=B.byId("tblPredicates"),1<=c.rows.length&&v.empty(c.rows[c.rows.length-1].cells[0].firstChild.rows[2].cells[0]),this.colorRows()}))),v.place(d,a))},removeAllRows:function(){var a=B.byId("tblPredicates");if(1<=a.rows.length){var b=L.byNode(a.rows[0].cells[0].firstChild.rows[1].cells[0].childNodes[0]);
"undefined"!==typeof b&&x.byId(b.id).destroyRecursive(!0);v.destroy(a.rows[0]);this.removeAllRows()}},reconstructRows:function(a){""!==a?m.forEach(this.config.groups,f.hitch(this,function(b){if(b.name===a){var d="",c="\x3d";"undefined"!==typeof b.def?0<b.def.length?m.forEach(b.def,f.hitch(this,function(e){this.createNewRow({value:e.value,operator:e.operator,conjunc:e.conjunc,state:"reload",group:b.name})})):(d=this.checkDefaultValue(b),c=this.checkDefaultOperator(b),this.createNewRow({operator:c,
value:d,conjunc:"OR",state:"new",group:b.name})):null!==this.urlParameters&&""!==this.urlParameters?this.addCriteriaByURL(b):(d=this.checkDefaultValue(b),c=this.checkDefaultOperator(b),this.createNewRow({operator:c,value:d,conjunc:"OR",state:"new",group:b.name}))}})):this.createNewRow({operator:"\x3d",value:"",conjunc:"OR",state:"new",group:this.grpSelect.value})},checkDefaultValue:function(a){var b="";null!==this.urlParameters&&""!==this.urlParameters?"undefined"!==typeof this.urlParameters[a.name]&&
(b=this.urlParameters[a.name][0]):""!==a.defaultVal&&(b=a.defaultVal);return b},checkDefaultOperator:function(a){var b="\x3d";""!==a.operator&&(b=a.operator);return b},parseTable:function(){var a=[],b=B.byId("tblPredicates").rows;m.forEach(b,f.hitch(this,function(d,c){if(0<=c){var e=d.cells[0].firstChild;d=L.byNode(e.rows[0].cells[0].childNodes[0]);var h=L.byNode(e.rows[1].cells[0].childNodes[0]);c={};"undefined"!==typeof e.rows[2].cells[0].childNodes[0]?c=L.byNode(e.rows[2].cells[0].childNodes[0]):
c.value="";var n="";if("undefined"!==typeof h.partsObj){if(h=h.getValueProviders()[0].getValueObject())n=h.value}else n=h.value;e=l(".dijitReset.dijitInputInner",e.rows[1].cells[0].childNodes[0]);0<e.length&&""===e[0].value&&(n="");a.push({operator:d.value,userValue:n,conjunc:c.value})}}));return a},formatDate:function(a){a=new Date(a);var b=K.format(a,{datePattern:"yyyy-MM-dd",selector:"date"});a=K.format(a,{selector:"time",timePattern:"HH:mm:ss"});return b+" "+a},addSecond:function(a){return new Date((new Date(a)).setSeconds(59))},
substractSecond:function(a){a=new Date(a);a.setSeconds(a.getSeconds()-1);return a},addDay:function(a){a=new Date(a);return new Date(a.getTime()+this.dayInMS)},subtractDay:function(a){a=new Date(a);return new Date(a.getTime()-this.dayInMS)},createQuery:function(a,b,d,c,e,h,n){isNaN(c)&&(c=Q.decode(c.replace(/'/g,"''")));if(""===c)return"\x3c\x3e"===d||"NOT LIKE"===d?-1<h.indexOf("Double")||-1<h.indexOf("Single")?[b,"IS NOT NULL",e].join(" ")+" ":[b,"\x3c\x3e '' OR",b,"IS NOT NULL",e].join(" ")+" ":
-1<h.indexOf("Double")||-1<h.indexOf("Single")?[b,"IS NULL",e].join(" ")+" ":[b,"\x3d '' OR",b,"IS NULL",e].join(" ")+" ";if("LIKE"===d||"NOT LIKE"===d)!1===a?this.useCaseSearch?c="'%"+c+"%'":(c="UPPER('%"+c+"%')",b="UPPER("+b+")"):c="'%"+c+"%'";else if("START"===d)d="LIKE",!1===a?this.useCaseSearch?c="'"+c+"%'":(c="UPPER('"+c+"%')",b="UPPER("+b+")"):c+="%";else if("END"===d)d="LIKE",!1===a?this.useCaseSearch?c="'%"+c+"'":(c="UPPER('%"+c+"')",b="UPPER("+b+")"):c="%"+c;else if(!1===a)if(-1<h.indexOf("Date"))if("undefined"!==
typeof n.layerObject?this.checkIsHosted(n.layerObject):this.checkIsHosted(n),"\x3d"===d||"\x3c\x3e"===d)d="\x3d"===d?"BETWEEN":"NOT BETWEEN",c=this.isHosted?"'"+this.formatDate(c)+"' AND '"+this.formatDate(this.addDay(c))+"'":"timestamp '"+this.formatDate(this.substractSecond(c))+"' AND timestamp '"+this.formatDate(this.addDay(c))+"'";else if("\x3e"===d)c=this.isHosted?"'"+this.formatDate(this.addDay(c))+"'":"timestamp '"+this.formatDate(this.addDay(c))+"'";else{if("d\x3c\x3d"===d||"d\x3e\x3d"===
d)d=d.substr(1);"\x3c\x3d"===d&&(c=this.addDay(c));c=this.isHosted?"'"+this.formatDate(c)+"'":"timestamp '"+this.formatDate(c)+"'"}else this.useCaseSearch?c="'"+c+"'":(c="UPPER('"+c+"')",b="UPPER("+b+")");return[b,d,c,e].join(" ")+" "},setFilterLayerDef:function(){this.filterExt=null;this.graphicsHolder=[];var a=this.parseTable();m.forEach(this.config.groups,f.hitch(this,function(b){if(this.grpSelect.value===b.name){var d=[];m.forEach(this.layerList,f.hitch(this,function(c){var e=[],h="",n="",q="";
m.forEach(b.layers,f.hitch(this,function(t,G){"undefined"!==typeof b.appendSameLayer&&!0===b.appendSameLayer?n!==t.layer?""!==h&&(this.setupFilterToApply(c,q,h,e,b),h=""):""!==n&&(h=h+" "+b.appendSameLayerConjunc+" ",h===" "+b.appendSameLayerConjunc+" "&&(h="")):h="";if(c.id===t.layer)b.def=[],q="FeatureLayer",m.forEach(a,f.hitch(this,function(r){m.forEach(c.layerObject.fields,f.hitch(this,function(y){if(y.name===t.field){if(-1<y.type.indexOf("Integer")||-1<y.type.indexOf("Double")||-1<y.type.indexOf("Single")){var C=
w.sanitizeHTML(r.userValue);if(!1===isNaN(C)){if(0!==w.sanitizeHTML(r.userValue)%1){var D=C.split(".");6<D[1].length&&(D[1]=D[1].substring(0,6),C=D[0]+"."+D[1]);"\x3d"===r.operator?r.operator="LIKE":"\x3c\x3e"===r.operator&&(r.operator="NOT LIKE")}h+=this.createQuery(!0,t.field,r.operator,C,r.conjunc,y.type,c)}else console.log("Not a Number")}else-1<y.type.indexOf("Date")?""!==r.userValue?(C=new Date(w.sanitizeHTML(r.userValue)),-1<y.type.indexOf("Time")?K.format(C,{fullYear:!0,datePattern:"yyyy-MM-dd, HH:mm:ss a"}):
K.format(C,{fullYear:!0,datePattern:"yyyy-MM-dd"}),h+=this.createQuery(!1,t.field,r.operator,C,r.conjunc,y.type,c)):h+=this.createQuery(!1,t.field,r.operator,w.sanitizeHTML(r.userValue),r.conjunc,y.type,c):h+=this.createQuery(!1,t.field,r.operator,w.sanitizeHTML(r.userValue),r.conjunc,y.type,c);b.def.push({field:t.field,value:w.sanitizeHTML(r.userValue),operator:r.operator,conjunc:r.conjunc});d.push({field:t.field,value:w.sanitizeHTML(r.userValue),operator:r.operator,conjunc:r.conjunc})}}))}));else if(0<=
t.layer.indexOf(c.id)){b.def=[];q="MapService";var I=t.layer.split(".");m.forEach(a,f.hitch(this,function(r){if(""!==r.userValue)if(-1<t.dataType.indexOf("Integer")||-1<t.dataType.indexOf("Double"))h+=this.createQuery(!0,t.field,r.operator,w.sanitizeHTML(r.userValue),r.conjunc,t.dataType,c);else if(-1<t.dataType.indexOf("Date"))if(""!==r.userValue){var y=new Date(w.sanitizeHTML(r.userValue));y=-1<t.dataType.indexOf("Time")?K.format(y,{fullYear:!0,datePattern:"yyyy-MM-dd, HH:mm:ss a"}):K.format(y,
{fullYear:!0,datePattern:"yyyy-MM-dd"});h+=this.createQuery(!1,t.field,r.operator,y,r.conjunc,t.dataType,c)}else h+=this.createQuery(!1,t.field,r.operator,w.sanitizeHTML(r.userValue),r.conjunc,t.dataType,c);else h+=this.createQuery(!1,t.field,r.operator,w.sanitizeHTML(r.userValue),r.conjunc,t.dataType,c);else h+=this.createQuery(!1,t.field,r.operator,w.sanitizeHTML(r.userValue),r.conjunc,t.dataType,c);b.def.push({field:t.field,value:w.sanitizeHTML(r.userValue),operator:r.operator,conjunc:r.conjunc});
d.push({field:t.field,value:w.sanitizeHTML(r.userValue),operator:r.operator,conjunc:r.conjunc})}));""!==h&&(e[I[1]]=h.trim())}n=t.layer;"undefined"!==typeof b.appendSameLayer&&!1===b.appendSameLayer?this.setupFilterToApply(c,q,h,e,b):G===b.layers.length-1&&this.setupFilterToApply(c,q,h,e,b)}))}));"undefined"!==typeof d&&0<d.length&&this._publishData(d,this.grpSelect.value)}}))},setupFilterToApply:function(a,b,d,c,e){if("FeatureLayer"===b){if(""!==d){var h=d.trim();if(this.chkAppendToDef.checked){h=
"";m.forEach(this.groupMatrix,f.hitch(this,function(q){q.name===e.name&&m.forEach(q.layers,f.hitch(this,function(t,G){t.id===a.id&&(t.expression=d.trim())}))}));var n=[];m.forEach(this.groupMatrix,f.hitch(this,function(q){n=n.concat(m.filter(q.layers,f.hitch(this,function(t){return""!==t.expression&&t.id===a.id})))}));m.forEach(n,f.hitch(this,function(q,t){""!==q.expression&&(h=t<n.length-1?h+" ("+q.expression+") "+this.slAppendChoice.value+" ":h+" ("+q.expression+") ")}))}this._applyFilter(a.layerObject,
h,!1)}}else"MapService"===b&&0<c.length&&(this.chkAppendToDef.checked?m.forEach(this.defaultDef,f.hitch(this,function(q){var t=!1,G=-1;if(q.layer===a.id){for(slot in c)for(var I in q.definition)slot===I?(t=!0,G=I):""===c[slot]&&(c[slot]=d);this.newMSExprForAppend(e,a,c);var r=[];m.forEach(this.groupMatrix,f.hitch(this,function(C){r=r.concat(m.filter(C.layers,f.hitch(this,function(D){return""!==D.expression&&-1<D.id.indexOf(a.id)})))}));var y=[];m.forEach(r,f.hitch(this,function(C,D){""!==C.expression&&
(D=C.id.split("."),y[D[1]]="undefined"!==typeof y[D[1]]?t&&D[1]===G?"("+q.definition[I]+") "+this.slAppendChoice.value+" "+y[D[1]]+" "+this.slAppendChoice.value+" ("+C.expression+") ":y[D[1]]+" "+this.slAppendChoice.value+" ("+C.expression+") ":t&&D[1]===G?"("+q.definition[I]+") "+this.slAppendChoice.value+" "+C.expression:C.expression,c=y)}));this._applyFilter(a.layerObject,c,!1);this._zoomOnFilter(a.layerObject)}})):(this._applyFilter(a.layerObject,c,!1),this._zoomOnFilter(a.layerObject)))},newMSExprForAppend:function(a,
b,d){m.forEach(this.groupMatrix,f.hitch(this,function(c){c.name===a.name&&m.forEach(c.layers,f.hitch(this,function(e,h){-1<e.id.indexOf(b.id)&&m.forEach(b.layerObject.layerInfos,f.hitch(this,function(n){e.id===b.id+"."+n.id&&(e.expression=d[n.id])}))}))}))},clearCriteria:function(a){"undefined"===typeof a.group&&(a.group=this.grpSelect.value);m.forEach(this.config.groups,f.hitch(this,function(b){b.hasOwnProperty("def")&&delete b.def}));this.removeAllRows();this.w2wHistory=[];this.checkDomainUse({group:a.group});
this.checkDateUse({group:a.group});this.checkCaseSearch({group:a.group});this.reconstructRows(a.group);this.resetLayerDef(a)},resetLayerDef:function(a){"undefined"===typeof a.group&&(a.group=this.grpSelect.value);this.populateGroupState();m.forEach(this.config.groups,f.hitch(this,function(b){b.name===a.group&&m.forEach(b.layers,f.hitch(this,function(d){m.forEach(this.layerList,f.hitch(this,function(c){m.forEach(this.defaultDef,f.hitch(this,function(e){if(e.layer===c.id){if("undefined"!==typeof c.layerObject.defaultDefinitionExpression)this._applyFilter(c.layerObject,
e.definition,!0);else if("undefined"!==typeof c.layerObject.layerDefinitions){for(var h=c.layerObject.layerDefinitions,n=0;n<h.length;n++)h[n]&&(h[n]="1\x3d1");this._applyFilter(c.layerObject,h,!0)}else this._applyFilter(c.layerObject,e.definition,!0);""!==e.visible&&c.layerObject.setVisibility(e.visible)}}))}))}))}))},updateGroupDesc:function(a){m.forEach(this.config.groups,f.hitch(this,function(b){b.name===a&&(this.groupDesc.innerHTML=w.sanitizeHTML(b.desc))}))},toggleSaveFilter:function(a){0<l(".saveTD").length?
(a=l(".container"),0<a.length&&(p.replace(B.byId("saveTD"),"saveTDClose","saveTD"),a.style("display","none"),l(".saveContainer").style("display","block"),l(".groupContainer").style("display","none"),l(".buttonContainer").style("display","none"),this._updateTabNodes("save"))):(a=l(".saveTDClose"),0<a.length&&(p.replace(a[0],"saveTD","saveTDClose"),a=l(".container"),0<a.length&&(p.replace(B.byId("saveTD"),"saveTD","saveTDClose"),a.style("display","block"),l(".saveContainer").style("display","none"),
l(".groupContainer").style("display","block"),l(".buttonContainer").style("display","block"),p.replace("refreshDiv","refresh-icon","refresh-done-icon"),this._updateTabNodes("filter"))))},saveJsonToFile:function(){var a=new Y({config:this.config});this.own(g(a,"complete",f.hitch(this,function(){console.log("save done")})));a.exportsJson(this.nls.files.jsonFile+".json",this.config)},readJsonToConfig:function(){l(".loadProgressHeader").style("display","block");l(".loadProgressShow").style("display",
"block");var a=new Z({config:this.config,jsonFile:this.jsonFileInput.files});this.own(g(a,"complete",f.hitch(this,function(b){this.config=JSON.parse(b.UserSettings);this.resetLayerDef({group:this.grpSelect.value});this.removeAllRows();this.checkDomainUse({group:this.grpSelect.value});this.checkDateUse({group:this.grpSelect.value});this.reconstructRows(this.grpSelect.value);this.updateGroupDesc(this.grpSelect.value);setTimeout(f.hitch(this,this.setFilterLayerDef),1E3);l(".loadProgressHeader").style("display",
"none");l(".loadProgressShow").style("display","none");this.jsonFileInput.value=null;this.toggleSaveFilter()})));this.own(g(a,"error",f.hitch(this,function(){this.jsonFileInput.value=null;l(".loadProgressHeader").style("display","none");l(".loadProgressShow").style("display","none")})));a.checkFileReader();return!0},_publishData:function(a,b){var d=[],c=[],e=b?b:this.grpSelect.value;m.forEach(a,f.hitch(this,function(n){-1===d.indexOf(n.field)&&d.push(n.field);-1===c.indexOf(n.value)&&c.push(n.value)}));
a={fields:d,values:c,groupName:e};var h=!0;m.forEach(this.w2wHistory,f.hitch(this,function(n){n.hasOwnProperty("groupName")&&n.groupName===e&&(n.fields=d,n.values=c,h=!1)}));h&&this.w2wHistory.push(a);setTimeout(f.hitch(this,function(){this.publishData({message:this.w2wHistory})}),500)},resize:function(){var a=l(".jimu-single-filter-parameter");0<a.length&&m.forEach(a,f.hitch(this,function(b){b=l("colgroup",b);0<b.length&&k.set(b[0].childNodes[1],"width","0px")}));320>=window.innerWidth?(p.add(this.btnCriteria,
"hide-items"),l(".operator-class").style("display","none"),l(".container").style("borderTop","0px"),l(".value-class").style("paddingTop","-10px")):this.config.simpleMode||(p.remove(this.btnCriteria,"hide-items"),l(".operator-class").style("display","block"),l(".container").style("borderTop","3px solid"),l(".value-class").style("paddingTop","0px"))},_applyFilter:function(a,b,d){var c=!1;"AND"===this.slAppendChoice.value&&(c=!0);if("string"===typeof b)this._applyLayerFilter(a,a.id,b,c,d);else for(var e=
0;e<b.length;e++)b[e]&&this._applyLayerFilter(a,a.id+"_"+e,b[e],c,d)},_applyLayerFilter:function(a,b,d,c,e){var h=this.chkAppendToDef.checked;"undefined"!==typeof e&&e&&(c=h=!0);V.getInstance().applyWidgetFilter(b,this.id,d,h,c,this.config.zoomMode);e||this._zoomOnFilter(a)},_zoomOnFilter:function(a){if(this.config.zoomMode)if("undefined"!==typeof a.layerDefinitions&&0<a.layerDefinitions.length)var b=g(this.map,"update-end",f.hitch(this,function(){var e=new O;e.outFields=["*"];for(var h in a.layerDefinitions)if(a.layerDefinitions.hasOwnProperty(h)){var n=
a.url+"/"+h;e.where=a.layerDefinitions[h];e.returnGeometry=!0;e.outSpatialReference=this.map.spatialReference;(new P(n)).executeForExtent(e,f.hitch(this,this._queryExtentToZoom))}b.remove()}));else{var d=new O;d.outFields=["*"];if("ArcGISImageServiceLayer"===a.type){var c=a.url;d.where=a.getDefinitionExpression();d.returnGeometry=!0;d.outSpatialReference=this.map.spatialReference;(new P(c)).executeForExtent(d,f.hitch(this,this._queryExtentToZoom))}else a.queryExtent(d,f.hitch(this,this._queryExtentToZoom))}},
_queryExtentToZoom:function(a){if("undefined"!==typeof a.extent&&null!==a.extent){var b=102100!==a.extent.spatialReference.wkid&&102113!==a.extent.spatialReference.wkid&&3857!==a.extent.spatialReference.wkid&&4326!==a.extent.spatialReference.wkid?M.buffer(a.extent,10,9002,!1).getExtent():M.geodesicBuffer(a.extent,10,9002,!1).getExtent();null===this.filterExt&&(this.filterExt=b);b=b.update(this.filterExt.xmin<b.xmin?this.filterExt.xmin:b.xmin,this.filterExt.ymin<b.ymin?this.filterExt.ymin:b.ymin,this.filterExt.xmax>
b.xmax?this.filterExt.xmax:b.xmax,this.filterExt.ymax>b.ymax?this.filterExt.ymax:b.ymax,b.spatialReference);this.filterExt=b=102100!==a.extent.spatialReference.wkid&&102113!==a.extent.spatialReference.wkid&&3857!==a.extent.spatialReference.wkid&&4326!==a.extent.spatialReference.wkid?M.buffer(b,200,9002,!1).getExtent():M.geodesicBuffer(b,200,9002,!1).getExtent();this.map.setExtent(this.filterExt,!0)}},refreshData:function(){this.onLayerUpdate();p.replace("refreshDiv","refresh-done-icon","refresh-icon")},
onLayerUpdate:function(){this.grpSelect&&(this.removeAllRows(),this.reconstructRows(this.grpSelect.value))},getUrlVars:function(a){var b={},d=decodeURI(window.location.href);d=d.replace(/[+]/g," ");d=d.replace(/%+3+A+/g,":");d=d.replace(/%+3+D+/g,"\x3d");d=d.replace(/%+2+C+/g,",");d.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(c,e,h){e===a&&(""!==h&&(h=JSON.parse(decodeURI(h))),b[e]=h)});return b},getUrlParam:function(a,b){var d=b;-1<window.location.href.indexOf(a)&&(d=this.getUrlVars(a)[a]);return"undefined"!==
typeof d?d:b},addCriteriaByURL:function(a){if(null!==this.urlParameters&&""!==this.urlParameters){var b=this.urlParameters[a.name];if("undefined"!==typeof b)if(this.config.simpleMode)if(0<b.length)b.forEach(f.hitch(this,function(c,e){g.emit(this.btnCriteria,"click",{bubbles:!0,cancelable:!0})})),g.emit(this.btnApply,"click",{bubbles:!0,cancelable:!0});else{b=this.checkDefaultValue(a);var d=this.checkDefaultOperator(a);this.createNewRow({operator:d,value:b,conjunc:"OR",state:"new",group:a.name})}else b.forEach(f.hitch(this,
function(c,e){g.emit(this.btnCriteria,"click",{bubbles:!0,cancelable:!0})})),0<b.length?g.emit(this.btnApply,"click",{bubbles:!0,cancelable:!0}):(b=this.checkDefaultValue(a),d=this.checkDefaultOperator(a),this.createNewRow({operator:d,value:b,conjunc:"OR",state:"new",group:a.name}));else b=this.checkDefaultValue(a),d=this.checkDefaultOperator(a),this.createNewRow({operator:d,value:b,conjunc:"OR",state:"new",group:a.name})}},_setFirstLastNodeOnMainScreen:function(){this._setWidgetFirstFocusNode(this.optionsIcon.focusNode,
this.btnReset)},_setWidgetFirstFocusNode:function(a,b){w.initFirstFocusNode(this.domNode,a);w.initLastFocusNode(this.domNode,b);this.openAtStartAysn=!0;w.isAutoFocusFirstNodeWidget(this)&&this.grpSelect.focus()},_updateTabNodes:function(a){if("save"===a){a=this.closeSaveIcon.focusNode;var b=this.refreshDataIcon;this.closeSaveIcon.focus()}else a=this.optionsIcon.focusNode,b=this.btnReset,this.grpSelect.focus();this._setWidgetFirstFocusNode(a,b)},handleKeyDownEvents:function(){this.own(g(this.btnCriteria,
"keydown",f.hitch(this,function(a){a.keyCode!==z.ENTER&&a.keyCode!==z.SPACE||this.btnNewRowAction()})));this.own(g(this.btnApply,"keydown",f.hitch(this,function(a){a.keyCode!==z.ENTER&&a.keyCode!==z.SPACE||this.setFilterLayerDef()})));this.own(g(this.btnReset,"keydown",f.hitch(this,function(a){a.keyCode===z.ENTER||a.keyCode===z.SPACE?this.resetLayerDef(a):a.keyCode===z.TAB&&this.optionsIcon.focus()})));this.own(g(this.optionsIcon,"keydown",f.hitch(this,function(a){a.keyCode!==z.ENTER&&a.keyCode!==
z.SPACE||this.toggleSaveFilter()})));this.own(g(this.closeSaveIcon,"keydown",f.hitch(this,function(a){a.keyCode!==z.ENTER&&a.keyCode!==z.SPACE||this.toggleSaveFilter()})));this.own(g(this.refreshDataIcon,"keydown",f.hitch(this,function(a){a.keyCode===z.ENTER||a.keyCode===z.SPACE?this.refreshData():a.keyCode===z.TAB&&this.closeSaveIcon.focus()})));this.own(g(this.chkPersistDef,"keydown",f.hitch(this,function(a){if(a.keyCode===z.ENTER||a.keyCode===z.SPACE)this.chkPersistDef.get("checked")?this.chkPersistDef.set("checked",
!1):this.chkPersistDef.set("checked",!0)})));this.own(g(this.btnSaveToJson,"keydown",f.hitch(this,function(a){a.keyCode!==z.ENTER&&a.keyCode!==z.SPACE||this.saveJsonToFile()})))},registerEventHandler:function(){this.own(g(this.optionsIcon,"click",f.hitch(this,function(a){this.toggleSaveFilter()})));this.own(g(this.closeSaveIcon,"click",f.hitch(this,function(a){this.toggleSaveFilter()})))},onOpen:function(){this.firstOpen||(this.bypassActive=!0,this.onLayerUpdate())},onActive:function(){if(!this.firstOpen&&
!this.bypassActive)this.onLayerUpdate()},onDeActive:function(){this.bypassActive=!1},onClose:function(){this.chkPersistDef.checked||(this.resetLayerDef({group:this.grpSelect.value}),this.removeAllRows(),this.reconstructRows(this.grpSelect.value));this.bypassActive=this.firstOpen=!1},onMinimize:function(){},onMaximize:function(){},onSignIn:function(a){},onSignOut:function(){}})});