// 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:{"widgets/BusinessAnalyst/BAWizard":function(){define("dojo/_base/array dojo/_base/declare dojo/on dojo/when esri/dijit/geoenrichment/_Wizard esri/geometry/webMercatorUtils ./CreateBuffersPage ./ErrorPage ./RunReportsPage ./SelectPointPolygonPage ./utils/GEUtil ./utils/GeocodeUtil".split(" "),function(t,p,l,k,f,d,c,a,e,b,g,h){return p([f],{selectedPoint:{tradeAreas:[]},selectedPolygon:{},selectedCountryID:"",availableCountries:[],drawnPolygonGraphic:null,name:"BusinessAnalystWizard",
baseClass:"jimu-widget-business-analyst-wizard",postCreate:function(){this.inherited(arguments);var m=this;k(g.checkCapabilities(this.appConfig),function(n){n.hasPrivilege&&n.geServiceConfigured&&n.dirRoutingServiceConfigured?(m.pages.SELECT_POINT_POLYGON=new b({map:m.map,nls:m.nls,wizard:m,config:m.config,onNext:function(){m._loadCreateBuffersPage()}}),m.pages.CREATE_BUFFERS=new c({map:m.map,nls:m.nls,wizard:m,config:m.config,onBack:function(){m._loadSelectPointPolygonPage()},onNext:function(){m._loadRunReportsPage()}}),
m.pages.CREATE_BUFFERS.startup(),m.pages.RUN_REPORTS=new e({map:m.map,nls:m.nls,wizard:m,appConfig:m.appConfig,config:m.config,onBack:function(){m.selectedPoint.geometry?m._loadCreateBuffersPage():m._loadSelectPointPolygonPage()}}),m.loadPage("SELECT_POINT_POLYGON"),m.own(l(m.map.infoWindow,"Show",function(){m._featureSelected()})),m.own(l(m.map.infoWindow,"Hide",function(){m._featureUnselected()})),m.own(l(m.map.infoWindow,"set-features",function(){m._featureSelected()})),m.own(l(m.map.infoWindow,
"selection-change",function(){m._featureSelected()})),m.selectedCountryID=m.config.defaultCountryID,k(g.getAvailableCountries(),function(q){m.availableCountries=q.countries;m.setSelectedCountry(m.selectedCountryID)}),m.map.infoWindow&&m.map.infoWindow.features&&0<m.map.infoWindow.features.length&&m._featureSelected()):(m.pages.ERROR_PAGE=new a({nls:m.nls,displayErrors:{gePrivilege:!n.hasPrivilege,geServiceNotConfigured:!n.geServiceConfigured,dirRoutingServiceNotConfigured:!n.dirRoutingServiceConfigured}}),
m.pages.ERROR_PAGE.startup(),m.loadPage("ERROR_PAGE"))})},startup:function(){},resize:function(){this.pages.SELECT_POINT_POLYGON&&this.pages.SELECT_POINT_POLYGON.resize()},clearSelectedPointBuffers:function(){var m=this;t.forEach(this.selectedPoint.tradeAreas,function(n){n&&n.graphic&&m.map.graphics.remove(n.graphic)});this.selectedPoint.tradeAreas=[]},clearSelectedPoint:function(){this.clearSelectedPointBuffers();this.map.graphics.remove(this.selectedPoint.pointGraphic);this.selectedPoint={tradeAreas:[]}},
clearSelectedPolygon:function(){this.selectedPolygon={};this.drawnPolygonGraphic&&(this.map.infoWindow.clearFeatures(),this.map.graphics.remove(this.drawnPolygonGraphic),this.drawnPolygonGraphic=null)},setSelectedCountry:function(m){var n=this;3==m.length?t.forEach(this.availableCountries,function(q){q.abbr3==m&&(n.selectedCountryID=q.id)}):2==m.length&&(this.selectedCountryID=m);this.pages.RUN_REPORTS.loadReportsInfographicsForCountry(this.selectedCountryID)},_loadSelectPointPolygonPage:function(){this.clearSelectedPoint();
this.clearSelectedPolygon();this.loadPage("SELECT_POINT_POLYGON");this.resize()},_loadCreateBuffersPage:function(){this.loadPage("CREATE_BUFFERS");this.pages.CREATE_BUFFERS.refresh()},_loadRunReportsPage:function(){this.loadPage("RUN_REPORTS");this.pages.RUN_REPORTS.refresh()},refreshPage:function(){this.currentPage&&this.currentPage.refresh&&this.currentPage.refresh()},_featureSelected:function(){var m=this,n=-1<this.map.infoWindow.selectedIndex&&this.map.infoWindow.features&&this.map.infoWindow.features[this.map.infoWindow.selectedIndex];
if(!n)this.clearSelectedPoint(),this.clearSelectedPolygon();else if((this.selectedPoint.geometry?this.selectedPoint.geometry:this.selectedPolygon.geometry)!==n.geometry)if(this.clearSelectedPoint(),this.clearSelectedPolygon(),"point"===n.geometry.type){this.selectedPoint.geometry=n.geometry;this.selectedPoint.locationName=this._getFeatureName(n);this.selectedPoint.attributes=n.attributes?n.attributes:{};var q=d.xyToLngLat(n.geometry.x,n.geometry.y);this.selectedPoint.long=q[0].toFixed(5);this.selectedPoint.lat=
q[1].toFixed(5);k(h.reverseGeocode({x:q[0],y:q[1]}),function(r){m.setSelectedCountry(r.address.CountryCode);m._loadCreateBuffersPage()})}else"polygon"==n.geometry.type?(this.selectedPolygon.geometry=n.geometry,this.selectedPolygon.locationName=this._getFeatureName(n),this.selectedPolygon.feature=n,q=n.geometry.getCentroid(),q=d.xyToLngLat(q.x,q.y),k(g.getCountryForPolygon(n.geometry,this.config,this.selectedCountryID),function(r){m.setSelectedCountry(r);m._loadRunReportsPage()})):m._loadSelectPointPolygonPage()},
_featureUnselected:function(){this.clearSelectedPoint();this.clearSelectedPolygon();this.pages.SELECT_POINT_POLYGON.search&&this.pages.SELECT_POINT_POLYGON.search.clear();this._loadSelectPointPolygonPage()},_getFeatureName:function(m){return m.getTitle()?m.getTitle():m._layer.displayField&&m.attributes[m._layer.displayField]?m.attributes[m._layer.displayField]:""}})})},"esri/dijit/geoenrichment/_Wizard":function(){define(["esri/declare","dojo/_base/lang","dojo/dom-construct","dijit/_WidgetBase","./utils/animation/AnimationHelper"],
function(t,p,l,k,f){return t("esri.dijit.geoenrichment._Wizard",k,{currentPage:null,currentPageId:null,_anim:null,pages:null,stacking:"stretch",constructor:function(){this.pages={};this._anim=new f},buildRendering:function(){this.domNode=l.create("div",{"class":"_Wizard_Root"})},loadPage:function(d){var c=this.pages[d],a=this.currentPage;c!==a&&(this._anim.finish(),a&&this._animPage("Anim_FadeOut").then(p.hitch(this.domNode,"removeChild",a.domNode)),this.currentPage=c,this.currentPageId=d,l.place(this.currentPage.domNode,
this.domNode,"first"),a&&this._animPage("Anim_FadeIn"),c._started||(c.set("stacking",this.stacking),c.startup()),c.resize())},_animPage:function(d){return this._anim.start([{node:this.currentPage.domNode,classes:[d,"Wizard_FadeAnim"]}])},resize:function(){this.currentPage&&this.currentPage.resize()},destroy:function(){for(var d in this.pages)this.hasOwnProperty(d)&&this.pages[d].destroyRecursive();this.pages={};this.inherited(arguments)}})})},"esri/declare":function(){define(["dojo/_base/declare",
"dojo/_base/lang","./extend"],function(t,p,l){return function(k,f,d){var c=p.isString(k);c?d.declaredClass=k:(d=f,f=k);f=t(f,d);c&&l(k,f);return f}})},"esri/extend":function(){define(["dojo/_base/lang","dojo/has","./kernel"],function(t,p,l){return function(k,f){p("extend-esri")&&(k=k.substring(k.indexOf(".")+1),t.setObject(k,f,l))}})},"esri/dijit/geoenrichment/utils/animation/AnimationHelper":function(){define("esri/declare dojo/_base/array dojo/_base/lang dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/sniff dojo/on esri/dijit/geoenrichment/Deferred".split(" "),
function(t,p,l,k,f,d,c,a,e){var b=!(29>c("chrome")||23>c("ff")||6>c("safari")||10>c("ie"));var g=function(m,n){for(var q=function(w){var A=w.type;g=A;for(var E in r)E!==A&&(r[E].remove(),delete r[E]);n.apply(this,arguments)},r={},u=["animationend","webkitAnimationEnd"],v=0;v<u.length;v++)r[u[v]]=a(m,u[v],q);return{remove:function(){for(var w in r)r.hasOwnProperty(w)&&r[w].remove()}}};var h=t(null,{_oldNode:null,_targets:null,_deferred:null,start:function(m,n){this._oldNode=n;this._deferred=new e;
if(!b||!m.length||!m[0].node)return this.finish(),this._deferred.promise;this._targets=m;a.once(m[0].node,g,l.hitch(this,this.finish));for(n=0;n<m.length;n++){var q=m[n];k.add(q.node,q.classes);k.add(q.node,"Anim_Common")}return this._deferred.promise},finish:function(){if(this._targets){for(var m=0;m<this._targets.length;m++){var n=this._targets[m];n.node&&(k.remove(n.node,n.classes),k.remove(n.node,"Anim_Common"))}this._targets=null}this._oldNode&&(this.onNodePreDestroy(this._oldNode),f.destroy(this._oldNode),
this._oldNode=null);this._deferred.resolve()},onNodePreDestroy:function(m){}});return t(null,{progress:null,_items:null,_flySurfaceNode:null,_ltr:d.isBodyLtr(),constructor:function(m){this._flySurfaceNode=m;this._items=[]},start:function(m,n){var q=this,r=new h;r.onNodePreDestroy=function(u){q.onNodePreDestroy(u)};this._items.push(r);this.progress||(this.progress=new e);return r.start(m,n).then(l.hitch(this,this._onItemFinished,r))},_onItemFinished:function(m){m=p.indexOf(this._items,m);0<=m&&(this._items.splice(m,
1),0===this._items.length&&this.progress&&(this.progress.resolve(),this.progress=null))},finish:function(){for(var m=this._items;0<m.length;)m.pop().finish()},fly:function(m,n,q,r){r=r||m.cloneNode(!0);q||(q=["top",this._ltr?"left":"right"]);if(!b)return r;m=m.getBoundingClientRect();var u=this._flySurfaceNode.getBoundingClientRect();k.add(r,"Anim_FlyingObj");for(var v,w,A=0;A<q.length;A++){var E=q[A],F=m[E]-u[E];if("right"===E||"bottom"===E)F=-F;if("left"===E&&!this._ltr||"right"===E&&this._ltr)v=
E,w=F;r.style[E]=F+"px"}this._flySurfaceNode.appendChild(r);v&&(w+=m.width-r.getBoundingClientRect().width,r.style[v]=w+"px");this.start([{node:r,classes:[n]}],r);return r},onNodePreDestroy:function(m){}})})},"esri/dijit/geoenrichment/Deferred":function(){define(["dojo/Deferred"],function(t){return t})},"widgets/BusinessAnalyst/CreateBuffersPage":function(){define("dojo/_base/declare dijit/_TemplatedMixin dijit/_WidgetBase dijit/_WidgetsInTemplateMixin esri/dijit/geoenrichment/_WizardPage esri/geometry/Polygon esri/symbols/SimpleFillSymbol esri/symbols/SimpleLineSymbol esri/Color esri/graphic ./utils/GEUtil ./utils/TravelModeUtil ./utils/ValidationUtil ./utils/SiteUtil dojo/text!./CreateBuffersPage.html jimu/dijit/TabContainer3 dijit/form/TextBox".split(" "),
function(t,p,l,k,f,d,c,a,e,b,g,h,m,n,q,r){return t([l,p,f,k],{templateString:q,postCreate:function(){this.inherited(arguments);this.tab=new r({tabs:[{title:this.nls.rings,content:this.ringsContentPane},{title:this.nls.driveTime,content:this.driveTimeContentPane},{title:this.nls.walkTime,content:this.walkTimeContentPane}],selected:this.nls.rings});this.tab.placeAt(this.ringDtWtTabContainer);this.tab.startup();this._setConfigDefaults()},startup:function(){this.inherited(arguments)},refresh:function(){this._showHideTabs()},
_setConfigDefaults:function(){this._setRadii(this.config.ringDefaults,this.ringsBufferRadii1,this.ringsBufferRadii2,this.ringsBufferRadii3);this.ringsBufferUnits.set("value",this.config.ringUnitDefault);this._setRadii(this.config.driveTimeDefaults,this.driveTimeBufferRadii1,this.driveTimeBufferRadii2,this.driveTimeBufferRadii3);this.driveTimeBufferUnits.set("value",this.config.driveTimeUnitDefault);this._setRadii(this.config.walkTimeDefaults,this.walkTimeBufferRadii1,this.walkTimeBufferRadii2,this.walkTimeBufferRadii3);
this.walkTimeBufferUnits.set("value",this.config.walkTimeUnitDefault)},_showHideTabs:function(){this.config.ringDisabled&&this.tab.removeTab(this.nls.rings);this.config.driveTimeDisabled&&this.tab.removeTab(this.nls.driveTime);this.config.walkTimeDisabled&&this.tab.removeTab(this.nls.walkTime);this.tab.getSelectedTitle()===this.nls.rings&&this.config.ringDisabled&&this.tab.selectTab(this.nls.driveTime);this.tab.getSelectedTitle()===this.nls.driveTime&&this.config.driveTimeDisabled&&this.tab.selectTab(this.nls.walkTime);
this.tab.getSelectedTitle()===this.nls.walkTime&&this.config.walkTimeDisabled&&this.tab.selectTab(this.nls.driveTime)},applyBuffer:function(){if(this._validateInput()){this.shelter.show();var u=this,v=[[16,59,143,1],[0,204,51,1],[204,51,0,1]],w=0,A={},E="",F="",D="",B=10,y;this.tab.getSelectedTitle()===this.nls.rings?(A.areaType="RingBuffer",A.bufferUnits=this.ringsBufferUnits.get("value"),D=this.ringsBufferUnits._getDisplayedValueAttr(),A.bufferRadii=this._getRadii(this.ringsBufferRadii1,this.ringsBufferRadii2,
this.ringsBufferRadii3),E=this.nls.ring):this.tab.getSelectedTitle()===this.nls.driveTime?(A.areaType="NetworkServiceArea",A.bufferUnits=this.driveTimeBufferUnits.get("value"),D=this.driveTimeBufferUnits._getDisplayedValueAttr(),A.bufferRadii=this._getRadii(this.driveTimeBufferRadii1,this.driveTimeBufferRadii2,this.driveTimeBufferRadii3),E=this.nls.driveTime,F="Driving "+("Minutes"===A.bufferUnits?"Time":"Distance"),B=(y=A.bufferRadii?n.getMaxRadiusInKilometers(A,!1):0)&&Math.max(1,Math.log(y/8)*
Math.LOG2E),B=y*Math.min(B,5)):(A.areaType="NetworkServiceArea",A.bufferUnits=this.walkTimeBufferUnits.get("value"),D=this.walkTimeBufferUnits._getDisplayedValueAttr(),A.bufferRadii=this._getRadii(this.walkTimeBufferRadii1,this.walkTimeBufferRadii2,this.walkTimeBufferRadii3),E=this.nls.walkTime,F="Walking "+("Minutes"===A.bufferUnits?"Time":"Distance"),B=(y=A.bufferRadii?n.getMaxRadiusInKilometers(A,!0):0)&&Math.max(1,Math.log(y/8)*Math.LOG2E),B=y*Math.min(B,3));var z=[];h.getTravelMode(F,B).then(function(H){H&&
(A.travelMode=H);g.createRingOrDriveTimes({geometry:u.wizard.selectedPoint.geometry,studyAreasOptions:A,sourceCountry:u.wizard.selectedCountryID}).then(function(G){u.wizard.clearSelectedPointBuffers();u.wizard.selectedPoint.areadesc2=E+u.nls.colon+" "+A.bufferRadii.join(", ")+" "+u.nls["headerDescription_"+D]+" "+u.nls.radii;G=G.results[0].value.FeatureSet[0].features.reverse();var I=A.bufferRadii.reverse(),L;for(L in G){var N=new d({rings:G[L].geometry.rings,spatialReference:{wkid:102100}});if(u.tab.getSelectedTitle()==
u.nls.rings)var O=new c(a.STYLE_SOLID,new a(a.STYLE_SOLID,new e(v[w]),2),new e([255,0,15,0]));else O=new e(v[w]),O.a=.5,O=new c(a.STYLE_SOLID,new a(a.STYLE_SOLID,new e(v[w]),2),O);N=new b(N,O);O={};O.graphic=N;O.name=u.wizard.selectedPoint.locationName+" - "+I[w]+" "+D;O.shortName=I[w]+" "+D;O.AREA_DESC=I[w]+" "+D;O.AREA_DESC2=E+u.nls.colon+" "+I[w]+" "+u.nls["headerDescription_"+D]+" "+u.nls.radius_lowercase;u.wizard.selectedPoint.tradeAreas.push(O);u.map.graphics.add(N);z.push(N);w++}u.wizard.selectedPoint.tradeAreas=
u.wizard.selectedPoint.tradeAreas.reverse();u.map.setExtent(u.wizard.selectedPoint.tradeAreas[u.wizard.selectedPoint.tradeAreas.length-1].graphic._extent);u.shelter.hide();u.onNext()},function(G){alert("Error: "+G);u.shelter.hide()})})}},backOnClick:function(){this.onBack()},_getRadii:function(u,v,w){u=u.get("value");v=v.get("value");w=w.get("value");var A=[];""!==u&&A.push(u);""!==v&&A.push(v);""!==w&&A.push(w);return A},_setRadii:function(u,v,w,A){0<u.length?v.set("value",u[0]):v.set("value","");
1<u.length?w.set("value",u[1]):w.set("value","");2<u.length?A.set("value",u[2]):A.set("value","")},_validateInput:function(){var u=!0;u=this.tab.getSelectedTitle()===this.nls.rings?m.validateInvalidValues(this.ringsBufferRadii1,this.ringsBufferRadii2,this.ringsBufferRadii3,this.ringValidationErrorMessage,this.nls.thisEntryIsNotValid):this.tab.getSelectedTitle()===this.nls.driveTime?m.validateInvalidValues(this.driveTimeBufferRadii1,this.driveTimeBufferRadii2,this.driveTimeBufferRadii3,this.driveTimeValidationErrorMessage,
this.nls.thisEntryIsNotValid):m.validateInvalidValues(this.walkTimeBufferRadii1,this.walkTimeBufferRadii2,this.walkTimeBufferRadii3,this.walkTimeValidationErrorMessage,this.nls.thisEntryIsNotValid);return u?(u=this.tab.getSelectedTitle()===this.nls.rings?m.validateMinMaxValues(this.ringsBufferRadii1,this.ringsBufferRadii2,this.ringsBufferRadii3,m.MIN_RINGS_VALUE,m.MAX_RINGS_VALUE,this.ringValidationErrorMessage,this.nls.invalidValueRing):this.tab.getSelectedTitle()===this.nls.driveTime?m.validateMinMaxValues(this.driveTimeBufferRadii1,
this.driveTimeBufferRadii2,this.driveTimeBufferRadii3,m.MIN_DTWT_VALUE,m.MAX_DTWT_VALUE,this.driveTimeValidationErrorMessage,this.nls.invalidValueDTWT):m.validateMinMaxValues(this.walkTimeBufferRadii1,this.walkTimeBufferRadii2,this.walkTimeBufferRadii3,m.MIN_DTWT_VALUE,m.MAX_DTWT_VALUE,this.walkTimeValidationErrorMessage,this.nls.invalidValueDTWT))?!0:!1:!1}})})},"esri/dijit/geoenrichment/_WizardPage":function(){define("esri/declare dojo/_base/lang dojo/string dojox/mvc/Templated ./Grid ./ProgressHandler dojo/text!./templates/_WizardPage.html".split(" "),
function(t,p,l,k,f,d,c){return t("esri.dijit.geoenrichment._WizardPage",k,{buttonsNode:null,_progressHandler:null,buildRendering:function(){var a=this.templateString;a&&"\ufeff"==a[0]&&(a=a.substr(1));this.templateString=l.substitute(c,{content:a});this.inherited(arguments);this.layoutGrid.rows=[f.AUTO,f.AUTO,f.AUTO]},resize:function(){this.layoutGrid.resize()},_setStackingAttr:function(a){switch(a){case "stretch":this.layoutGrid.rows[1]=f.STRETCH;break;case "stack":this.layoutGrid.rows[1]=f.STACK}},
showProgress:function(a,e){this._progressHandler||(this._progressHandler=new d(this.progressDiv,{queryNode:this.domNode}),this.own(this._progressHandler));a=this._progressHandler.showProgress(a,"string"==typeof e?e:"");e=e?"function"==typeof e?e:this[e]:null;"function"==typeof e&&a.then(p.hitch(this,e));return a},cancelProgress:function(a){this._progressHandler&&this._progressHandler.cancelProgress("string"==typeof a?a:"")}})})},"dojox/mvc/Templated":function(){define("dojo/_base/declare dojo/_base/lang dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin ./at".split(" "),
function(t,p,l,k,f){return t("dojox.mvc.Templated",[l,k,f],{bindings:null,startup:function(){var d=p.isFunction(this.bindings)&&this.bindings.call(this)||this.bindings,c;for(c in d){var a=this[c],e=d[c];if(a)for(var b in e)a.set(b,e[b]);else console.warn("Widget with the following attach point was not found: "+c)}this.inherited(arguments)}})})},"dojox/mvc/at":function(){define(["dojo/_base/kernel","dojo/_base/lang","./sync","./_atBindingExtension"],function(t,p,l){t.experimental("dojox.mvc");t=function(k,
f){return{atsignature:"dojox.mvc.at",target:k,targetProp:f,bindDirection:l.both,direction:function(d){this.bindDirection=d;return this},transform:function(d){this.converter=d;return this},equals:function(d){this.equalsCallback=d;return this}}};t.from=l.from;t.to=l.to;t.both=l.both;return p.setObject("dojox.mvc.at",t)})},"dojox/mvc/sync":function(){define(["dojo/_base/lang","dojo/_base/config","dojo/_base/array","dojo/has"],function(t,p,l,k){function f(e,b,g,h,m,n,q,r,u,v){if(!(g(u,r)||"*"==m&&0>l.indexOf(h.get("properties")||
[q],q)||"*"==m&&q in(v||{}))){g="*"==m?q:m;if(k("mvc-bindings-log-api"))var w=c(h,g,n,q);try{u=e?e(u,b):u}catch(A){k("mvc-bindings-log-api")&&console.log("Copy from"+w.join(" to ")+" was not done as an error is thrown in the converter.");return}k("mvc-bindings-log-api")&&console.log(w.reverse().join(" is being copied from: ")+" (Value: "+u+" from "+r+")");t.isFunction(h.set)?h.set(g,u):h[g]=u}}var d=t.getObject("dojox.mvc",!0);k.add("mvc-bindings-log-api",(p.mvc||{}).debugBindings);var c=k("mvc-bindings-log-api")?
function(e,b,g,h){return[[g.canConvertToLoggable||!g.declaredClass?g:g.declaredClass,h].join(":"),[e.canConvertToLoggable||!e.declaredClass?e:e.declaredClass,b].join(":")]}:"";p={from:1,to:2,both:3};var a=function(e,b,g,h,m){var n=(m||{}).converter;if(n){var q={source:e,target:g};var r=n.format&&t.hitch(q,n.format);var u=n.parse&&t.hitch(q,n.parse)}var v=[],w=[],A=t.mixin({},e.constraints,g.constraints);n=(m||{}).bindDirection||d.both;var E=(m||{}).equals||a.equals;if(k("mvc-bindings-log-api"))var F=
c(e,b,g,h);if("*"==h){if("*"!=b)throw Error("Unmatched wildcard is specified between source and target.");m=g.get("properties");if(!m){m=[];for(var D in g)g.hasOwnProperty(D)&&"_watchCallbacks"!=D&&m.push(D)}w=g.get("excludes")}else m=[b];n&d.from&&(t.isFunction(e.set)&&t.isFunction(e.watch)?v.push(e.watch.apply(e,("*"!=b?[b]:[]).concat([function(B,y,z){f(r,A,E,g,h,e,B,y,z,w)}]))):k("mvc-bindings-log-api")&&console.log(F.reverse().join(" is not a stateful property. Its change is not reflected to ")+
"."),l.forEach(m,function(B){if("*"!=h||!(B in(w||{}))){var y=t.isFunction(e.get)?e.get(B):e[B];f(r,A,E,g,"*"==h?B:h,e,B,void 0,y)}}));n&d.to&&(n&d.from||l.forEach(m,function(B){if("*"!=h||!(B in(w||{}))){var y=t.isFunction(g.get)?g.get(h):g[h];f(u,A,E,e,B,g,"*"==h?B:h,void 0,y)}}),t.isFunction(g.set)&&t.isFunction(g.watch)?v.push(g.watch.apply(g,("*"!=h?[h]:[]).concat([function(B,y,z){f(u,A,E,e,b,g,B,y,z,w)}]))):k("mvc-bindings-log-api")&&console.log(F.join(" is not a stateful property. Its change is not reflected to ")+
"."));k("mvc-bindings-log-api")&&console.log(F.join(" is bound to: "));D={};D.unwatch=D.remove=function(){for(var B=null;B=v.pop();)B.unwatch();k("mvc-bindings-log-api")&&console.log(F.join(" is unbound from: "))};return D};t.mixin(d,p);return t.setObject("dojox.mvc.sync",t.mixin(a,{equals:function(e,b){return e===b||"number"==typeof e&&isNaN(e)&&"number"==typeof b&&isNaN(b)||t.isFunction((e||{}).getTime)&&t.isFunction((b||{}).getTime)&&e.getTime()==b.getTime()||(t.isFunction((e||{}).equals)?e.equals(b):
t.isFunction((b||{}).equals)?b.equals(e):!1)}},p))})},"dojox/mvc/_atBindingExtension":function(){define(["dojo/_base/config","dojo/has","dijit/_WidgetBase","./atBindingExtension"],function(t,p,l,k){p.add("mvc-extension-per-widget",(t.mvc||{}).extensionPerWidget);p("mvc-extension-per-widget")||k(l.prototype)})},"dojox/mvc/atBindingExtension":function(){define("dojo/aspect dojo/_base/array dojo/_base/lang dijit/_WidgetBase ./_atBindingMixin dijit/registry".split(" "),function(t,p,l,k,f){return function(d){p.forEach(arguments,
function(c){c.dataBindAttr?console.warn("Detected a widget or a widget class that has already been applied data binding extension. Skipping..."):(l._mixin(c,f.mixin),t.before(c,"postscript",function(a,e){this._dbpostscript(a,e)}),t.before(c,"startup",function(){this._started||this._startAtWatchHandles()}),t.before(c,"destroy",function(){this._stopAtWatchHandles()}),t.around(c,"set",function(a){return function(e,b){return e==f.prototype.dataBindAttr?this._setBind(b):"dojox.mvc.at"==(b||{}).atsignature?
this._setAtWatchHandle(e,b):a.apply(this,l._toArray(arguments))}}))});return arguments}})},"dojox/mvc/_atBindingMixin":function(){define("dojo/_base/array dojo/_base/lang dojo/_base/declare dojo/has dojo/Stateful ./resolve ./sync".split(" "),function(t,p,l,k,f,d,c){function a(m){try{var n=require("dijit/registry")}catch(r){return}for(m=m.domNode&&m.domNode.parentNode;m;){if(m=n.getEnclosingWidget(m)){var q=m._relTargetProp||"target";if((p.isFunction(m.get)?m.get(q):m[q])||q in m.constructor.prototype)return m}m=
m&&m.domNode.parentNode}}function e(m,n,q,r,u){function v(){w.Two&&w.Two.unwatch();delete w.Two;var D=A&&(p.isFunction(A.get)?A.get(E):A[E]),B=d(m,D);D=d(q,D);k("mvc-bindings-log-api")&&(!B||/^rel:/.test(m)&&!A)&&g(m,n);k("mvc-bindings-log-api")&&(!D||/^rel:/.test(q)&&!A)&&g(q,r);B&&D&&(!/^rel:/.test(m)&&!/^rel:/.test(q)||A)&&(B.set&&B.watch||"*"!=n?null==n?(p.isFunction(D.set)?D.set(r,B):D[r]=B,k("mvc-bindings-log-api")&&console.log("dojox/mvc/_atBindingMixin set "+B+" to: "+b(D,r))):w.Two=c(B,n,
D,r,u):k("mvc-bindings-log-api")&&g(m,n))}var w={},A=a(q),E=A&&A._relTargetProp||"target";v();if(A&&/^rel:/.test(m)||/^rel:/.test(q)&&p.isFunction(A.set)&&p.isFunction(A.watch))w.rel=A.watch(E,function(D,B,y){B!==y&&(k("mvc-bindings-log-api")&&console.log("Change in relative data binding target: "+A),v())});var F={};F.unwatch=F.remove=function(){for(var D in w)w[D]&&w[D].unwatch(),delete w[D]};return F}var b=k("mvc-bindings-log-api")?function(m,n){return[m._setIdAttr||!m.declaredClass?m:m.declaredClass,
n].join(":")}:"",g=k("mvc-bindings-log-api")?function(m,n){console.warn(n+" could not be resolved"+("string"==typeof m?" with "+m:"")+".")}:"",h={dataBindAttr:"data-mvc-bindings",_dbpostscript:function(m,n){n=this._refs=(m||{}).refs||{};for(var q in m)if("dojox.mvc.at"==(m[q]||{}).atsignature){var r=m[q];delete m[q];n[q]=r}r=new f;var u=this;r.toString=function(){return"[Mixin value of widget "+u.declaredClass+", "+(u.id||"NO ID")+"]"};r.canConvertToLoggable=!0;this._startAtWatchHandles(r);for(q in n)void 0!==
r[q]&&((m=m||{})[q]=r[q]);this._stopAtWatchHandles()},_startAtWatchHandles:function(m){this.canConvertToLoggable=!0;var n=this._refs;if(n){var q=this._atWatchHandles=this._atWatchHandles||{};this._excludes=null;for(var r in n)n[r]&&"*"!=r&&(q[r]=e(n[r].target,n[r].targetProp,m||this,r,{bindDirection:n[r].bindDirection,converter:n[r].converter,equals:n[r].equalsCallback}));"dojox.mvc.at"==(n["*"]||{}).atsignature&&(q["*"]=e(n["*"].target,n["*"].targetProp,m||this,"*",{bindDirection:n["*"].bindDirection,
converter:n["*"].converter,equals:n["*"].equalsCallback}))}},_stopAtWatchHandles:function(){for(var m in this._atWatchHandles)this._atWatchHandles[m].unwatch(),delete this._atWatchHandles[m]},_setAtWatchHandle:function(m,n){if("ref"==m)throw Error(this+": 1.7 ref syntax used in conjunction with 1.8 dojox/mvc/at syntax, which is not supported.");var q=this._atWatchHandles=this._atWatchHandles||{};q[m]&&(q[m].unwatch(),delete q[m]);this._excludes=this[m]=null;this._started?q[m]=e(n.target,n.targetProp,
this,m,{bindDirection:n.bindDirection,converter:n.converter,equals:n.equalsCallback}):this._refs[m]=n},_setBind:function(m){m=eval("({"+m+"})");for(var n in m){var q=m[n];"dojox.mvc.at"!=(q||{}).atsignature?console.warn(n+" in "+dataBindAttr+" is not a data binding handle."):this._setAtWatchHandle(n,q)}},_getExcludesAttr:function(){if(this._excludes)return this._excludes;var m=[],n;for(n in this._atWatchHandles)"*"!=n&&m.push(n);return m},_getPropertiesAttr:function(){if(this.constructor._attribs)return this.constructor._attribs;
var m=["onClick"].concat(this.constructor._setterAttrs);t.forEach(["id","excludes","properties","ref","binding"],function(n){n=t.indexOf(m,n);0<=n&&m.splice(n,1)});return this.constructor._attribs=m}};h[h.dataBindAttr]="";l=l("dojox/mvc/_atBindingMixin",null,h);l.mixin=h;return l})},"dojox/mvc/resolve":function(){define(["dojo/_base/lang","dijit/registry","dojo/Stateful"],function(t,p){return t.setObject("dojox.mvc.resolve",function(l,k){if("string"==typeof l){var f=l.match(/^(expr|rel|widget):(.*)$/)||
[];try{l="rel"==f[1]?t.getObject(f[2]||"",!1,k):"widget"==f[1]?p.byId(f[2]):t.getObject(f[2]||l,!1,k)}catch(d){}}return l})})},"esri/dijit/geoenrichment/Grid":function(){define(["../../declare","dojo/dom-class","dojo/dom-construct","dojo/dom-geometry","dijit/layout/_LayoutWidget"],function(t,p,l,k,f){var d=t("esri.dijit.geoenrichment.Grid",[f],{_placeholder:null,layout:function(){var c=this.getChildren(),a=[],e;for(e=0;e<this.rows.length;e++)a.push(0);p.add(this.domNode,"Grid_Measure");var b=[];for(e=
0;e<c.length;e++){var g=c[e];var h=g.row;g=g.domNode;g.style.position="absolute";p.add(g,"GridCell_Measure");var m=g.scrollHeight;p.remove(g,"GridCell_Measure");g=m;b.push(g);g>a[h]&&(a[h]=g)}h=k.getContentBox(this.domNode).h;p.remove(this.domNode,"Grid_Measure");e=this.rows;for(g=b=0;g<a.length;g++)switch(e[g]){case d.AUTO:h-=a[g];break;case d.STRETCH:case d.STACK:b++}if(1<b)throw Error("Multiple rows with flexible heights are not supported");b=[0];for(g=0;g<a.length;g++){switch(e[g]){case d.AUTO:var n=
a[g];break;case d.STRETCH:n=h;break;case d.STACK:n=Math.min(h,a[g])}b.push(b[g]+n)}for(e=0;e<c.length;e++)g=c[e],h=g.row,a=b[h+1]-b[h],n=g.domNode.style,n.top=b[h]+"px",n.height=a+"px";this._placeholder||(this._placeholder=l.create("div",null,this.domNode));this._placeholder.style.height=b[b.length-1]+"px"}});d.AUTO="auto";d.STRETCH="stretch";d.STACK="stack";return d})},"esri/dijit/geoenrichment/ProgressHandler":function(){define(["dojo/_base/declare","esri/dijit/geoenrichment/when","dojo/dom-class",
"dojo/query"],function(t,p,l,k){return t(null,{progressNode:null,progressPromises:null,busyClass:null,errorClass:null,_allStates:null,constructor:function(f,d){d=d||{};this.busyClass=d.busyClass||"Wizard_Loading";this.errorClass=d.errorClass||"Wizard_Error";this._allStates=[this.busyClass,this.errorClass];var c=d.progressClass||"Wizard_Progress";f?(this.progressNode=f,l.add(this.progressNode,c)):d.queryNode&&(this.progressNode=k("."+c,d.queryNode)[0]);this.progressPromises={}},showProgress:function(f,
d){function c(){if(a.progressPromises[d]===f)return delete a.progressPromises[d],!0}d=d||"";f=p(f);if(f.isFulfilled())return this.progressPromises[d]&&(delete this.progressPromises[d],this._setState("done")),f;this.progressPromises[d]=f;var a=this;this._setState("busy");f.then(function(){c()&&a._setState("done")},function(e){c()&&("CancelError"==e.name?a._setState("done"):a._setState("error",e.toString()))});return f},cancelProgress:function(f){f=f||"";this.progressPromises[f]&&this.progressPromises[f].cancel()},
_setState:function(f,d){!this.progressNode||"done"==f&&Object.keys(this.progressPromises).length||(this.progressNode.innerHTML=d||"",l.remove(this.progressNode,this._allStates),"done"!=f&&l.add(this.progressNode,this[f+"Class"]))},destroy:function(){for(var f=Object.keys(this.progressPromises),d=0;d<f.length;d++)this.cancelProgress(f[d])}})})},"esri/dijit/geoenrichment/when":function(){define(["dojo/when"],function(t){return t})},"widgets/BusinessAnalyst/utils/GEUtil":function(){define("dojo/_base/array dojo/when esri/request ./GeocodeUtil esri/geometry/webMercatorUtils esri/dijit/geoenrichment/utils/FileUtil jimu/portalUtils".split(" "),
function(t,p,l,k,f,d,c){return{getAvailableCountries:function(){return c.getPortal(portalUrl).loadSelfInfo().then(function(a){return l({url:(a&&a.helperServices&&a.helperServices.geoenrichment&&a.helperServices.geoenrichment.url?a.helperServices.geoenrichment.url:"https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver")+"/Geoenrichment/Countries",content:{appID:"webappbuilder",f:"json",langCode:"en-us"},handleAs:"json"})})},createRingOrDriveTimes:function(a){return c.getPortal(portalUrl).loadSelfInfo().then(function(e){return l({url:(e&&
e.helperServices&&e.helperServices.geoenrichment&&e.helperServices.geoenrichment.url?e.helperServices.geoenrichment.url:"https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver")+"/Geoenrichment/Enrich",content:{appID:"webappbuilder",f:"json",langCode:"en-us",useData:JSON.stringify({sourceCountry:a.sourceCountry}),studyAreasOptions:JSON.stringify(a.studyAreasOptions),dataCollections:JSON.stringify(["GlobalIntersect"]),returnGeometry:!0,outSR:JSON.stringify({wkid:102100}),studyAreas:JSON.stringify([{geometry:a.geometry}]),
token:esri.id.credentials[0].token},handleAs:"json"})})},createReport:function(a){var e={appID:"webappbuilder",langCode:"en-us",report:"string"===typeof a.report?a.report:JSON.stringify(a.report),format:"pdf",f:"bin",token:esri.id.credentials[0].token,useData:JSON.stringify({sourceCountry:a.sourceCountry}),studyAreas:JSON.stringify(a.studyAreas),reportFields:JSON.stringify({locationname:a.locationName,latitude:a.lat,longitude:a.long,subtitle:"Prepared by Esri",areadesc2:a.areadesc2})};return c.getPortal(portalUrl).loadSelfInfo().then(function(b){return l({url:(b&&
b.helperServices&&b.helperServices.geoenrichment&&b.helperServices.geoenrichment.url?b.helperServices.geoenrichment.url:"https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver")+"/Geoenrichment/createReport",content:e,handleAs:"blob"}).then(function(g){return d.saveAs(g,a.reportDownloadName+".pdf")}).otherwise(function(g){alert("Error: "+g)})})},checkCapabilities:function(a){return c.getPortal(portalUrl).loadSelfInfo().then(function(e){var b=!1,g=!1,h=e&&e.user&&e.user.privileges,
m=e&&e.helperServices;e=m.geoenrichment&&m.geoenrichment.url;m=m.routingUtilities&&m.routingUtilities.url;var n=e?e:"https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver";!window.isBuilder&&!a.mode&&a.appProxies&&0<a.appProxies.length&&t.some(a.appProxies,function(q){return n.toLowerCase()===q.sourceUrl.toLowerCase()})?g=b=!0:t.forEach(h,function(q){"premium:user:geoenrichment"===q?b=!0:"premium:user:networkanalysis"===q&&(g=!0)});return{hasPrivilege:b&&g,geServiceConfigured:!!e,
dirRoutingServiceConfigured:!!m}})},getCountryForPolygon:function(a,e,b){return c.getPortal(portalUrl).loadSelfInfo().then(function(g){return l({url:(g&&g.helperServices&&g.helperServices.geoenrichment&&g.helperServices.geoenrichment.url?g.helperServices.geoenrichment.url:"https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver")+"/Geoenrichment/Enrich",content:{appID:"webappbuilder",f:"json",langCode:"en-us",dataCollections:JSON.stringify(["GlobalIntersect"]),outSR:JSON.stringify({wkid:102100}),
studyAreas:JSON.stringify([{geometry:a.toJson()}]),token:esri.id.credentials[0].token},handleAs:"json"}).then(function(h){if(h&&h.results&&1===h.results.length&&1===h.results[0].value.FeatureSet[0].features.length)return h.results[0].value.FeatureSet[0].features[0].attributes.sourceCountry;if(h&&h.results&&1===h.results.length&&1<h.results[0].value.FeatureSet[0].features.length){var m=a.getCentroid();m=f.xyToLngLat(m.x,m.y);var n=function(q){var r="";t.forEach(q,function(u){u.attributes.sourceCountry==
b&&(r=b)});if(r)return r;t.forEach(q,function(u){u.attributes.sourceCountry==e.defaultCountryID&&(r=defaultCountryID)});return r?r:q[0].attributes.sourceCountry};return p(k.reverseGeocode({x:m[0],y:m[1]})).then(function(q){return q&&q.address&&q.address.CountryCode?q.address.CountryCode:n(h.results[0].value.FeatureSet[0].features)}).otherwise(function(){return n(h.results[0].value.FeatureSet[0].features)})}return e.defaultCountryID})})},getGEProxyUrl:function(a){var e=!1;return c.getPortal(portalUrl).loadSelfInfo().then(function(b){geUrl=
b&&b.helperServices&&b.helperServices.geoenrichment&&b.helperServices.geoenrichment.url?b.helperServices.geoenrichment.url:"https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver";!window.isBuilder&&!a.mode&&a.appProxies&&0<a.appProxies.length&&t.forEach(a.appProxies,function(g){geUrl.toLowerCase()===g.sourceUrl.toLowerCase()&&(e=g.proxyUrl)});return e})}}})},"widgets/BusinessAnalyst/utils/GeocodeUtil":function(){define(["esri/request","jimu/portalUtils"],function(t,p){return{reverseGeocode:function(l){return p.getPortal(portalUrl).loadSelfInfo().then(function(k){return t({url:(k&&
k.isPortal&&k.helperServices&&k.helperServices.geocode&&0<k.helperServices.geocode.length?k.helperServices.geocode[0].url:"https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer")+"/reverseGeocode",content:{appID:"webappbuilder",f:"json",langCode:"en-us",location:JSON.stringify({x:l.x,y:l.y}),distance:250},handleAs:"json"})})}}})},"esri/dijit/geoenrichment/utils/FileUtil":function(){define(["esri/dijit/geoenrichment/Deferred","esri/dijit/geoenrichment/when","./DataUtil","./ImageUtil"],
function(t,p,l,k){function f(){return new t.reject(Error("Saving not supported."))}var d=f,c=/[\\/:*?"<>|]/g,a={savingSupported:function(){return void 0!==window.Blob},saveTextFile:function(g,h,m,n){return a.savingSupported()?a.saveAs(new Blob([g],{type:m||"text/plain"}),h||"text.txt",n):f()},saveImageFile:function(g,h){if(a.savingSupported()){if("string"===typeof g){var m=k.base64DataFromDataURL(g);m=l.binaryStringToByteArray(atob(m)).buffer}else g instanceof ArrayBuffer&&(m=g);return a.saveAs(m?
l.arrayBuffersToBlob([m],"image/png"):g,h)}f()},_queue:[],_isSavePendingFlag:!1,_saveTimeoutH:null,saveAs:function(g,h,m){return m&&m.addDownloadIntervals?(m=new t,a._queue.push({blob:g,name:h||"download",dfd:m}),a._trySaveAsNext(),m.promise):d(g,a.validateName(h||"download"))},_trySaveAsNext:function(){if(a._queue.length&&!a._isSavePendingFlag){var g=a._queue.shift();a._isSavePendingFlag=!0;p(d(g.blob,a.validateName(g.name))).then(g.dfd.resolve,g.dfd.reject).always(function(){setTimeout(function(){a._isSavePendingFlag=
!1;a._trySaveAsNext()},100)})}},validateName:function(g){return String(g).trim().replace(c,"")}};if(!a.savingSupported())return a;if(window.navigator&&window.navigator.msSaveOrOpenBlob)return d=function(g,h){var m=new t;window.navigator.msSaveOrOpenBlob(g,h)?m.resolve():m.reject(Error("Failed to save or open downloaded file."));return m.promise},a;var e=window.URL||window.webkitURL;if("download"in window.document.createElement("a")){var b=function(g){if(void 0!==window.MouseEvent)var h=new MouseEvent("click",
{bubbles:!0,cancelable:!1});else h=document.createEvent("MouseEvent"),h.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null);g.dispatchEvent(h)};d=function(g,h){var m=new t,n=e.createObjectURL(g),q=window.document.createElement("a");q.href=n;q.download=h;b(q);setTimeout(function(){e.revokeObjectURL(n);q=null;m.resolve();m=null},1E3);return m.promise};return a}d=function(g,h){var m=new t;g=new File([g],h,{type:g.type});var n=e.createObjectURL(g);window.open(n,"_blank");setTimeout(function(){e.revokeObjectURL(n);
m.resolve()},1E3);return m.promise};return a})},"esri/dijit/geoenrichment/utils/DataUtil":function(){define(["esri/dijit/geoenrichment/Deferred","esri/dijit/geoenrichment/when"],function(t,p){function l(c){return"string"==typeof c?{source:c,getLength:function(){return this.source.length},getByte:function(a){return this.source.charCodeAt(a)&255}}:window.ArrayBuffer&&c instanceof ArrayBuffer?{source:new Uint8Array(c),getLength:function(){return this.source.byteLength},getByte:function(a){return this.source[a]}}:
c}function k(c){for(var a=c.length,e=new Uint8Array(c.length),b=0;b<a;b++)e[b]=c.charCodeAt(b);return e}function f(c,a){c=new Uint8Array(c);a=Math.min(a,c.byteLength);for(var e="",b=0;b<a;b++)e+=String.fromCharCode(c[b]);return e}var d={arrayBufferFromBlob:function(c){var a=new t,e=new FileReader;e.onloadend=function(){e.error?a.reject(e.error):a.resolve(e.result)};e.readAsArrayBuffer(c);return a.promise},arrayBuffersToBlob:function(c,a){return new Blob(c,{type:a||"application/octet-stream"})},binaryStringFromByteSource:function(c){if("string"==
typeof c)return c;c=l(c);var a=c.getLength(),e=a%4;a-=e;for(var b="",g=0,h,m,n,q;g<a;)h=c.getByte(g++),m=c.getByte(g++),n=c.getByte(g++),q=c.getByte(g++),b+=String.fromCharCode(h,m,n,q);1==e?b+=String.fromCharCode(c.getByte(g)):2==e?b+=String.fromCharCode(c.getByte(g),c.getByte(g+1)):3==e&&(b+=String.fromCharCode(c.getByte(g),c.getByte(g+1),c.getByte(g+2)));return b},base64FromByteSource:function(c){c=l(c);var a=c.getLength(),e=a%3;a-=e;for(var b,g,h,m,n="",q=0;q<a;q+=3)m=c.getByte(q)<<16|c.getByte(q+
1)<<8|c.getByte(q+2),b=m>>18&63,g=m>>12&63,h=m>>6&63,m&=63,n+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[b]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[g]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[h]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[m];1==e?(m=c.getByte(q),n+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[m>>2&63]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[m<<
4&63]+"\x3d\x3d"):2==e&&(m=c.getByte(q)<<8|c.getByte(q+1),n+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[m>>10&63]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[m>>4&63]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[m<<2&63]+"\x3d");return n},base64FromJson:function(c){return btoa(unescape(encodeURIComponent("string"===typeof c?c:JSON.stringify(c))))}};d.binaryStringToByteArray=k;d.base64ToByteArray=function(c){return k(atob(c))};d.getFirstBytes=
function(c,a){if("string"==typeof c)var e=c.substr(0,a);else if(window.ArrayBuffer&&c instanceof ArrayBuffer)e=f(c,a);else if(window.Blob&&c instanceof Blob){e=new t;var b=new FileReader;b.onloadend=function(){b.error?e.resolve(""):e.resolve(f(b.result,a))};b.readAsArrayBuffer(c.slice(0,a))}return p(e||"")};d.isBase64=function(c){return c&&0==c.length%4&&/^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+\/]+$/.test(c.replace(/={0,2}$/,""))};d.base64ToJson=function(c){return JSON.parse(decodeURIComponent(escape(atob(c))))};
d.getContentType=function(c){c=d.getFileExtension(c);if(null===c)return null;switch(c){case "png":return"image/png";case "jpg":case "jpeg":return"image/jpeg";case "gif":return"image/gif";case "svg":return"image/svg+xml";case "json":return"application/json";case "txt":return"text/plain";case "xml":return"text/xml";default:return null}};d.getFileExtension=function(c){var a=c.lastIndexOf(".")+1;return a?c.substr(a).toLowerCase():null};return d})},"esri/dijit/geoenrichment/utils/ImageUtil":function(){define(["esri/dijit/geoenrichment/Deferred",
"esri/dijit/geoenrichment/when","./UrlUtil"],function(t,p,l){var k={base64DataToDataURL:function(f,d){if(/^data:image/.test(f))return f;d||(d=atob(f.substr(0,16)),d=k.getImageContentType(d));return"data:"+(d||"image/png")+";base64,"+f},getImageContentType:function(f){if("\u00ff\u00d8\u00ff"===f.substr(0,3)&&"JFIF"===f.substr(6,4))return"image/jpeg";if("\u0089PNG\r\n\u001a\n"===f.substr(0,8))return"image/png";if("GIF89a"===f.substr(0,6)||"GIF87a"===f.substr(0,6))return"image/gif"},base64DataFromDataURL:function(f){0==
f.indexOf("data:")&&(f=f.substr(f.indexOf(",")+1));return f},getBase64DataIndex:function(f){f=0==f.indexOf("data:")?f.indexOf(";base64,"):-1;return 0<f?f+8:0},getContentType:function(f){var d=k.getBase64DataIndex(f);return d?f.substring(5,d-8):null},checkBase64FileSize:function(f,d){return k.getBase64FileSize(f)<=d},getBase64FileSize:function(f){return.75*f.length},imageToDataURL:function(f,d){d=d||{};var c=document.createElement("canvas"),a=c.getContext("2d");c.width=d.width||f.width;c.height=d.height||
f.height;var e=d.opacity;null!=e&&!isNaN(e)&&0<=e&&1>e&&(a.globalAlpha=+e,d.format="image/png");(e=d.pos)?a.drawImage(f,e.x||0,e.y||0):a.drawImage(f,0,0,c.width,c.height);return c.toDataURL(d.format)},imageFromUrl:function(f,d){var c=new t,a=new Image;0!==f.indexOf("data:")&&d&&d.crossOrigin&&a.setAttribute("crossOrigin",d.crossOrigin);a.onload=function(){if(a.width&&a.height)c.resolve(a);else{var e=Error("Error of reading an image from URL.");d&&d.ignoreError?c.resolve(null):c.reject(e)}a.onload=
a.onerror=null};a.onerror=function(e){d&&d.ignoreError?c.resolve(null):c.reject(e);a.onload=a.onerror=null};f=require.toUrl(f);/^http:/i.test(f)&&/^https/i.test(window.location.protocol)&&(f=l.toHttpsUrl(f));a.src=f;return c.promise},scaleImage:function(f,d){if("string"===typeof f){var c=k.base64DataToDataURL(f),a=k.getContentType(c);c=k.imageFromUrl(c)}return p(c||f).then(function(e){var b=1,g=e.width,h=e.height;if(d.factor)b=d.factor;else if(d.maxDim)b=d.maxDim/Math.max(g,h);else if(d.imageDim){var m=
d.imageDim.w,n=d.imageDim.h;d.imageDim.preserveRatio?(b=Math.min(m/g,n/h),d.imageDim.reduceOnly&&1<b&&(b=1)):d.imageDim.reduceOnly?(g=Math.min(g,m),h=Math.min(h,n)):(g=m,h=n)}return k.imageToDataURL(e,{width:g*b,height:h*b,format:d.format||a,opacity:d.opacity})})},getImageViewType:function(f,d){return 1E3<=d?(f/=d,.025>=Math.abs(f-2)?"360":2<f?"pano":null):null}};return k})},"esri/dijit/geoenrichment/utils/UrlUtil":function(){define(["dojo/_base/url","esri/config","esri/kernel","esri/urlUtils","esri/arcgis/utils"],
function(t,p,l,k,f){var d={getDomain:function(a){if("string"!==typeof a)return null;a=a.replace(/^(http:\/\/|https:\/\/)/i,"");var e=a.indexOf("/");return 0>e?a:a.substr(0,e)},getPortalUrl:function(a){if("string"!==typeof a)return null;a=a.replace(/\?.*$/,"");var e=a.match(/^(.+)\/sharing(\/|$)/i);return e||(e=a.match(/^(.+)\/home$/i))?e[1]:(e=a.match(/^(.+)\/portal(\/|$)/i))?e[1]+"/portal":a},getProxyUrl:function(a){var e=p.defaults.io.proxyUrl;e&&!/^http/i.test(e)&&(e=k.getAbsoluteUrl(e));e&&a&&
(e=d.toHttpsUrl(e));return e},registerCORS:function(a){(a=d.getDomain(a))&&-1==p.defaults.io.corsEnabledServers.indexOf(a)&&p.defaults.io.corsEnabledServers.push(a);d._fixCORS()},_fixCORS:function(){p.defaults.io.corsEnabledServers=p.defaults.io.corsEnabledServers.filter(function(a){return a.indexOf&&0===a.indexOf("null://")?(console.log("WARNING: incorrect CORS URL detected: "+a),!1):!0})},indexOfQuery:function(a){var e=a.indexOf("?");0<=e&&(a=a.substr(e+1),/^(http:\/\/|https:\/\/)/i.test(a)&&(a=
a.indexOf("?"),e=0<=a?e+1+a:-1));return e},removeQuery:function(a){var e=d.indexOfQuery(a);return 0>e?a:a.substr(0,e)},addQueryPart:function(a,e){var b=0>d.indexOfQuery(a)?"?":"\x26";return a+b+e},getVariableValue:function(a,e){if(a&&"string"===typeof e){var b=k.urlToObject(a);if(b.query){var g={};Object.keys(b.query).forEach(function(h){g[h.toLowerCase()]=b.query[h]});return g[e.toLowerCase()]}}},addUrlVariable:function(a,e,b){e=encodeURIComponent(e);b=encodeURIComponent(b);return d.addQueryPart(a,
e+"\x3d"+b)},securePortsMap:{80:"443",8080:"8443"},toHttpUrl:function(a){return!a||/^http/i.test(a)?a:"http://"+a},toHttpsUrl:function(a){a&&(a=d.toHttpUrl(a));if(!a||!/^http:\/\//i.test(a))return a;var e=new t(a);a=a.replace(/^http/i,"https");var b=d.securePortsMap[e.port];b&&(a=a.replace(":"+e.port,":"+b));return a},combine:function(a,e){"number"===typeof e&&(e+="");if(e){if(/^(http:\/\/|https:\/\/)/i.test(e)||!a)return e;"/"!=e.charAt(0)&&(e="/"+e);if(1==e.length)return a;var b=a.length-1;"/"==
a.charAt(b)&&(a=a.substr(0,b));var g=k.urlToObject(a);a=d.removeQuery(a);b=a.length-e.length;0<=b&&a.substr(b).toLowerCase()==e.toLowerCase()&&(a=a.substr(0,b));a+=e;for(var h in g.query)d.addQueryPart(a,g.query[h])}return a},combineMulti:function(a){for(var e=a[0],b=1;b<a.length;b++)e=d.combine(e,a[b]);return e},openUrl:function(a,e){if(e)return window.open(a,"_blank");e=window.open();e.opener=null;e.referrer=null;e.location=a;return e},isPageRunOnWebService:function(){return/^http/i.test(window.location.protocol)},
getToken:function(a){return(a=a&&l.id.findCredential(a)||l.id.credentials[0])&&a.token}},c;d.getArcgisUrl=function(){return c};d.setArcgisUrl=function(a){a&&(c=a,f.arcgisUrl=d.combine(a,"/sharing/rest/content/items"))};return d})},"widgets/BusinessAnalyst/utils/TravelModeUtil":function(){define(["esri/request","jimu/portalUtils","dojo/_base/array","dojo/Deferred","dojo/when"],function(t,p,l,k,f){var d=null;return{getTravelMode:function(c,a){return f(this._getTravelModes(),function(e){var b="";l.forEach(e.results,
function(g){"supportedTravelModes"===g.paramName&&l.forEach(g.value.features,function(h){h.attributes&&h.attributes.Name===c&&(b=h.attributes.TravelMode)})});if(!b)return b;a=Number(a);if(!a||10>=a)return b;e=JSON.parse(b);e.simplificationTolerance=a;return JSON.stringify(e)})},_getTravelModes:function(){d||(d=new k,p.getPortal(portalUrl).loadSelfInfo().then(function(c){t({url:c.helperServices.routingUtilities.url+"/GetTravelModes/execute",content:{appID:"webappbuilder",f:"json",langCode:"en-us"},
handleAs:"json"}).then(function(a){d.resolve(a)})}));return d}}})},"widgets/BusinessAnalyst/utils/ValidationUtil":function(){define(["dojo/dom-class"],function(t){return{MIN_RINGS_VALUE:0,MAX_RINGS_VALUE:1E3,MIN_DTWT_VALUE:0,MAX_DTWT_VALUE:300,validateInvalidValues:function(p,l,k,f,d){var c=p.get("value"),a=l.get("value"),e=k.get("value"),b=!0;0<c.length&&null===this._tryParseFloat(c)?(b=!1,t.remove(f,"hidden"),f.innerHTML=d,t.add(p.domNode,"invalidValue")):t.remove(p.domNode,"invalidValue");0<a.length&&
null===this._tryParseFloat(a)?(b=!1,t.remove(f,"hidden"),f.innerHTML=d,t.add(l.domNode,"invalidValue")):t.remove(l.domNode,"invalidValue");0<e.length&&null===this._tryParseFloat(e)?(b=!1,t.remove(f,"hidden"),f.innerHTML=d,t.add(k.domNode,"invalidValue")):t.remove(k.domNode,"invalidValue");b&&t.add(f,"hidden");return b},validateMinMaxValues:function(p,l,k,f,d,c,a){var e=p.get("value"),b=l.get("value"),g=k.get("value"),h=!0;0<e.length?(e=parseFloat(e),e<f||e>d?(h=!1,t.remove(c,"hidden"),c.innerHTML=
a,t.add(p.domNode,"invalidValue")):t.remove(p.domNode,"invalidValue")):t.remove(p.domNode,"invalidValue");0<b.length?(e=parseFloat(b),e<f||e>d?(h=!1,t.remove(c,"hidden"),c.innerHTML=a,t.add(l.domNode,"invalidValue")):t.remove(l.domNode,"invalidValue")):t.remove(l.domNode,"invalidValue");0<g.length?(e=parseFloat(g),e<f||e>d?(h=!1,t.remove(c,"hidden"),c.innerHTML=a,t.add(k.domNode,"invalidValue")):t.remove(k.domNode,"invalidValue")):t.remove(k.domNode,"invalidValue");h&&t.add(c,"hidden");return h},
_tryParseFloat:function(p){var l=null;null!==p&&0<p.length&&(isNaN(p)||(l=parseFloat(p)));return l}}})},"widgets/BusinessAnalyst/utils/SiteUtil":function(){define(["esri/units","dojo/_base/array"],function(t,p){var l={testTimeUnits:function(f){return"Hours"===f||"Seconds"===f||"Minutes"===f}},k={};k[t.FEET]=.3048;k[t.YARDS]=.9144;k[t.METERS]=1;k[t.KILOMETERS]=1E3;k[t.MILES]=1609.3472186944373;k[t.NAUTICAL_MILES]=1852;k.Hours=6E4;k.Seconds=16.66666666666667;k.Minutes=1E3;k[t.SQUARE_FEET]=k[t.FEET]*
k[t.FEET];k[t.SQUARE_YARDS]=k[t.YARDS]*k[t.YARDS];k[t.SQUARE_METERS]=1;k[t.SQUARE_KILOMETERS]=k[t.KILOMETERS]*k[t.KILOMETERS];k[t.SQUARE_MILES]=k[t.MILES]*k[t.MILES];k[t.ACRES]=4046.8564224;k[t.HECTARES]=1E4;l.convertUnits=function(f,d,c){return f*(k[d]||0)/(c&&k[c]||1)};l.getMaxRadiusInKilometers=function(f,d){var c=0;f&&f.bufferRadii&&(p.forEach(f.bufferRadii,function(a){a>c&&(c=a)}),c=l.convertUnits(c,f.bufferUnits||t.MILES,t.KILOMETERS),d&&l.testTimeUnits(f.bufferUnits)&&(c/=12));return c};return l})},
"widgets/BusinessAnalyst/ErrorPage":function(){define(["dojo/_base/declare","dijit/_TemplatedMixin","dijit/_WidgetBase","esri/dijit/geoenrichment/_WizardPage","dojo/text!./ErrorPage.html"],function(t,p,l,k,f){return t([l,p,k],{templateString:f,postCreate:function(){this.inherited(arguments);var d=this.displayErrors;d.gePrivilege?this.noPermissionsErrorDiv.innerHTML=this.nls.noPermissions:this.noPermissionsErrorDiv.parentNode.removeChild(this.noPermissionsErrorDiv);d.geServiceNotConfigured||d.dirRoutingServiceNotConfigured?
this.servicesErrorDiv.innerHTML=d.geServiceNotConfigured?d.dirRoutingServiceNotConfigured?this.nls.geAndDirRoutingServicesNotConfigured:this.nls.geServiceNotConfigured:this.nls.dirRoutingServiceNotConfigured:this.servicesErrorDiv.parentNode.removeChild(this.servicesErrorDiv)},startup:function(){this.inherited(arguments)}})})},"widgets/BusinessAnalyst/RunReportsPage":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/lang dojo/dom-class dojo/dom-construct dojo/dom-style dojo/query dojo/when dijit/_TemplatedMixin dijit/_WidgetBase dijit/_WidgetsInTemplateMixin esri/geometry/webMercatorUtils esri/dijit/geoenrichment/SelectableTree esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/GEUtil esri/dijit/geoenrichment/ReportPlayer/ReportPlayer esri/dijit/geoenrichment/ReportPlayer/PlayerResizeModes esri/dijit/geoenrichment/ReportPlayer/PlayerThemes esri/dijit/geoenrichment/ReportPlayer/DataProviderGE esri/dijit/geoenrichment/ReportPlayer/PlayerCommands esri/dijit/geoenrichment/_WizardPage esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/ReportTemplateTypes ./utils/GEUtil ./utils/ReportUtil ./esriAnalystX/widgets/Selects/FilteringSelectTree dojo/text!./RunReportsPage.html jimu/dijit/TabContainer3 jimu/utils".split(" "),
function(t,p,l,k,f,d,c,a,e,b,g,h,m,n,q,r,u,v,w,A,E,F,D,B,y,z,H){return p([b,e,A,g],{templateString:y,infographicsTabHidden:!1,reportsTabHidden:!1,_infograpicReports:null,_configForLightTheme:[{name:"DashboardTheme",style:"light"}],postCreate:function(){this.inherited(arguments);this.tab=new z({tabs:[{title:this.nls.infographics,content:this.infographicsContentPane},{title:this.nls.reports,content:this.reportsContentPane}],selected:this.nls.infographics});this.tab.placeAt(this.runReportTabContainer);
this.tab.startup()},startup:function(){this.inherited(arguments)},loadReportsInfographicsForCountry:function(G){var I=this;a(D.getAvailableClassicReports(G,this.config),function(L){var N=I._getSingleReportID(L),O=I._getCountryConfig(I.config,G);O&&O.defaultReportID&&(N=O.defaultReportID);I.filteredReportDropDown?I.filteredReportDropDown.set("tree",new m(L)):(I.filteredReportDropDown=new B({name:"filteredReportSelect",tree:new m(L),defaultExpand:N?I._getDefaultExpandedTreeForSelectedReport(L,N):I._getDefaultExpandedTree(L),
placeHolder:I.nls.selectReport,onChange:function(S){I._enableDisableButton(I.runReportBtn,S)}},I.reportFilteringSelectDropDownContainer),I.filteredReportDropDown.startup());N&&I.filteredReportDropDown.set("value",N);I.reportsTabHidden=I.config.reportsDisabled||!I._areReportsAvailable(L)});a(D.getAvailableInfographicReports(G,this.config),function(L){var N=I._getSingleReportID(L),O=I._getCountryConfig(I.config,G);O&&O.defaultInfographicID&&(N=O.defaultInfographicID);I.infographicDropDown?I.infographicDropDown.set("tree",
new m(L)):(I.infographicDropDown=new B({name:"filteredInfographicReportSelect",tree:new m(L),defaultExpand:N?I._getDefaultExpandedTreeForSelectedReport(L,N):I._getDefaultExpandedTree(L),placeHolder:I.nls.selectTemplate,onChange:function(S){I._enableDisableButton(I.runInfographicBtn,S)}},I.infographicDropDownContainer),I.infographicDropDown.startup());N&&I.infographicDropDown.set("value",N);I.infographicsTabHidden=I.config.infographicsDisabled||!I._areReportsAvailable(L);I._infograpicReports=L})},
_getCountryConfig:function(G,I){var L=-1;t.forEach(G.countryConfig,function(N,O){N.countryID==I&&(L=O)});return-1!=L?G.countryConfig[L]:null},_areReportsAvailable:function(G){if(0==G.length)return!1;var I=!1;t.forEach(G,function(L){0<L.children.length&&(I=!0)});return I},_getDefaultExpandedTree:function(G){if(0==G.length)return{esriReports:!0};var I={};I[G[0].value]=!0;return I},_getDefaultExpandedTreeForSelectedReport:function(G,I){if(0==G.length)return{esriReports:!0};returnVal={};t.forEach(G,function(L){t.forEach(L.children,
function(N){N.value===I&&(returnVal[L.value]=!0)})});return returnVal},_getSingleReportID:function(G){if(1!=G.length)return!1;var I=!1;t.forEach(G,function(L){1===L.children.length&&(I=L.children[0].value)});return I},refresh:function(){this._hideOrShowTabs()},_hideOrShowTabs:function(){this._hideOrShowTab(this.nls.infographics,this.infographicsTabHidden);this._hideOrShowTab(this.nls.reports,this.reportsTabHidden);this.infographicsTabHidden?this.tab.selectTab(this.nls.reports):this.tab.selectTab(this.nls.infographics)},
_hideOrShowTab:function(G,I){var L=c("td",this.tab.tabTr),N;t.some(L,function(O){if(O.label===G)return N=O,!0})&&d.set(N,"display",I?"none":"")},runInfographic:function(){if(!k.contains(this.runInfographicBtn,"jimu-state-disabled")){var G=this,I=this.infographicDropDown.get("value");this.reportPlayer&&this.reportPlayer.destroy();this.playerDiv&&f.destroy(this.playerDiv);this.playerDiv=f.create("div",null,document.body);var L=new v;this.config.exportInfographicsPrintOption&&L.registerCommand(w.PRINT);
this.config.exportInfographicsPDFOption&&L.registerCommand(w.PDF);this.config.exportInfographicsImageOption&&L.registerCommand(w.IMAGE);this.config.exportInfographicsDynamicHTMLOption&&L.registerCommand(w.DYNAMIC_HTML);var N=H.isMobileUa();this.reportPlayer=(new q({isSlidesView:N?!0:!1,theme:this._useLightTheme()?u.LIGHT:u.DARK,dataProvider:L,resizeMode:r.FIT_WINDOW,showCloseButton:!0,config:{esriDijitCssUrl:"https://@sbaseurl@/jsapi/jsapi/dijit/themes/claro/claro.css",esriCssUrl:"https://@sbaseurl@/jsapi/jsapi/esri/css/esri.css",
playerSourceRootUrl:"https://@sbaseurl@/jsapi/jsapi/"},onClose:function(){G.reportPlayer.destroy();f.destroy(G.playerDiv)}})).placeAt(this.playerDiv);var O=!0;L=new B({name:"filteredInfographicReportSelect",tree:new m(this._infograpicReports),defaultExpand:G._getDefaultExpandedTreeForSelectedReport(this._infograpicReports,I),placeHolder:G.nls.selectTemplate,value:I,onChange:function(R){O?O=!1:(G.infographicDropDown.set("value",R),S(R))}});this._useLightTheme()||k.add(this.reportPlayer.playerToolbar.domNode,
"jimu-main-background");L.startup();L.set("value",I);this.reportPlayer.playerToolbar.addInfographicsSelect(L);var S=function(R){var U=[];if(G.wizard.selectedPoint.long)t.forEach(G.wizard.selectedPoint.tradeAreas,function(da,X){var ea={};ea.name=da.name;ea.shortName=da.shortName;ea.feature=da.graphic;"undefined"===typeof ea.feature.attributes&&(ea.feature.attributes="undefined"!==typeof G.wizard.selectedPoint.attributes?G.wizard.selectedPoint.attributes:{});ea.feature.attributes.STORE_LONG=G.wizard.selectedPoint.long;
ea.feature.attributes.STORE_LAT=G.wizard.selectedPoint.lat;ea.feature.attributes.radiusIndex=X;U.push(ea)});else if(G.wizard.selectedPolygon.geometry){U=[];var Z={};G.isPolygonFIPS(G.wizard.selectedPolygon)?Z=G.GetFIPSAnalysisArea(G.wizard.selectedPolygon):(Z.name=G.wizard.selectedPolygon.locationName,Z.shortName=G.wizard.selectedPolygon.locationName,Z.feature=G.wizard.selectedPolygon.feature);U.push(Z)}G.reportPlayer.playReport({portalUrl:portalUrl,countryID:G.wizard.selectedCountryID,reportID:R,
analysisAreas:U})};a(F.getGEProxyUrl(this.appConfig),function(R){R&&(n.setGeoenrichmentUrl(R),n.getClient());S(I)})}},isPolygonFIPS:function(G){return G&&G.feature&&G.feature.attributes&&G.feature.attributes.FIPS||G&&G.feature&&G.feature.attributes&&G.feature.attributes.STATE_FIPS?!0:!1},GetFIPSAnalysisArea:function(G){var I={geographies:[]},L={sourceCountry:"US"},N="";if(G.feature.attributes.FIPS)switch(G.feature.attributes.FIPS.length){case 2:N="US.States";break;case 5:N="US.Counties";break;case 11:N=
"US.Tracts"}else G.feature.attributes.STATE_FIPS&&(N="US.States");L.levelId=N;L.id=G.feature.attributes.FIPS?G.feature.attributes.FIPS.toString():G.feature.attributes.STATE_FIPS.toString();L.attributes=G.feature.attributes;G=G.geometry.getCentroid();G=h.xyToLngLat(G.x,G.y);L.attributes.STORE_ID="0";L.attributes.STORE_LONG=G[0].toString();L.attributes.STORE_LAT=G[1].toString();I.geographies.push(L);return I},GetFIPSStudyArea:function(G){var I={sourceCountry:"US"},L="";if(G.feature.attributes.FIPS)switch(G.feature.attributes.FIPS.length){case 2:L=
"US.States";break;case 5:L="US.Counties";break;case 11:L="US.Tracts"}else G.feature.attributes.STATE_FIPS&&(L="US.States");I.layer=L;I.ids=[G.feature.attributes.FIPS?G.feature.attributes.FIPS.toString():G.feature.attributes.STATE_FIPS.toString()];I.attributes=G.feature.attributes;return I},_useLightTheme:function(){var G=!1,I=self.getAppConfig();t.forEach(this._configForLightTheme,function(L){I&&I.theme&&I.theme.name==L.name&&I.theme.styles&&0<I.theme.styles.length&&t.forEach(I.theme.styles,function(N){N==
L.style&&(G=!0)})});I&&I.theme&&I.theme.customStyles&&I.theme.customStyles.mainBackgroundColor&&"#FFFFFF"==I.theme.customStyles.mainBackgroundColor.toUpperCase()&&(G=!0);return G},runReport:function(){if(!k.contains(this.runReportBtn,"jimu-state-disabled")){k.add(this.runReportBtn,"jimu-state-disabled");this.shelter.show();var G=this;this.wizard.selectedPoint.long?this.runReportForPoint().then(function(){G.shelter.hide();k.remove(G.runReportBtn,"jimu-state-disabled")}).otherwise(function(){G.shelter.hide();
k.remove(G.runReportBtn,"jimu-state-disabled")}):this.wizard.selectedPolygon.geometry&&this.runReportForPolygon().then(function(){G.shelter.hide();k.remove(G.runReportBtn,"jimu-state-disabled")}).otherwise(function(){G.shelter.hide();k.remove(G.runReportBtn,"jimu-state-disabled")})}},_enableDisableButton:function(G,I){"string"===typeof I&&"None"!==I?k.remove(G,"jimu-state-disabled"):k.add(G,"jimu-state-disabled")},runReportForPoint:function(){var G=this,I={studyAreas:[]},L={featureSet:{fields:[{name:"OBJECTID",
alias:"Object ID",type:"esriFieldTypeOID"},{name:"STORE_ID",alias:"STORE_ID",type:"esriFieldTypeString",length:1,nullable:!0},{name:"STORE_LONG",alias:"STORE_LONG",type:"esriFieldTypeDouble"},{name:"STORE_LAT",alias:"STORE_LAT",type:"esriFieldTypeDouble"},{name:"AREA_DESC",alias:"AREA_DESC",type:"esriFieldTypeString",length:7,nullable:!0},{name:"AREA_DESC2",alias:"AREA_DESC2",type:"esriFieldTypeString",length:19,nullable:!0}],spatialReference:this.map.spatialReference.toJson(),geometryType:"esriGeometryPolygon",
features:[]}};t.forEach(this.wizard.selectedPoint.tradeAreas,function(N){var O={};O.geometry=N.graphic.geometry;N.graphic.attributes?O.attributes=N.graphic.attributes:G.wizard.selectedPoint.attributes&&(O.attributes=l.clone(G.wizard.selectedPoint.attributes));O.attributes||(O.attributes={});O.attributes.OBJECTID=1;O.attributes.STORE_ID="1";O.attributes.STORE_LONG=G.wizard.selectedPoint.long;O.attributes.STORE_LAT=G.wizard.selectedPoint.lat;O.attributes.AREA_DESC=N.AREA_DESC;O.attributes.AREA_DESC2=
N.AREA_DESC2;L.featureSet.features.push(O)});I.studyAreas.push(L);this.filteredReportDropDown.getSelectedItem().reportType!=E.STANDARD&&(I.areadesc2=this.wizard.selectedPoint.areadesc2);I.locationName=this.wizard.selectedPoint.locationName;I.lat=this.wizard.selectedPoint.lat;I.long=this.wizard.selectedPoint.long;I.sourceCountry=this.wizard.selectedCountryID;I.report=this.filteredReportDropDown.getSelectedItem().item?this.filteredReportDropDown.getSelectedItem().item:this.filteredReportDropDown.getSelectedItem().value;
I.reportDownloadName=this.filteredReportDropDown.getSelectedItem().label;return F.createReport(I)},runReportForPolygon:function(){var G={studyAreas:[]},I={};I=this.isPolygonFIPS(this.wizard.selectedPolygon)?this.GetFIPSStudyArea(this.wizard.selectedPolygon):{geometry:this.wizard.selectedPolygon.geometry.toJson()};this.wizard.selectedPolygon.feature&&this.wizard.selectedPolygon.feature.attributes&&(I.attributes=this.wizard.selectedPolygon.feature.attributes);G.studyAreas.push(I);G.locationName=this.wizard.selectedPolygon.locationName;
G.sourceCountry=this.wizard.selectedCountryID;G.report=this.filteredReportDropDown.getSelectedItem().item?this.filteredReportDropDown.getSelectedItem().item:this.filteredReportDropDown.getSelectedItem().value;G.reportDownloadName=this.filteredReportDropDown.getSelectedItem().label;return F.createReport(G)},backOnClick:function(){this.onBack()}})})},"esri/dijit/geoenrichment/SelectableTree":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/Evented ./when dojo/store/util/QueryResults dojo/store/util/SimpleQueryEngine dstore/QueryResults".split(" "),
function(t,p,l,k,f,d,c,a){var e=function(b,g){this.storage=b;this.data=g};e.prototype={storage:null,data:null,filter:function(b){return this.storage._filter(this.data,b)},sort:function(b,g){return this.storage._sort(this.data,b,g)},fetch:function(){return this.storage._fetchRange(this.data)},fetchRange:function(b){return this.storage._fetchRange(this.data,b)},mayHaveChildren:function(b){return this.storage.mayHaveChildren(b)},getChildren:function(b){return this.storage.getChildren(b,{returnCollection:!0})}};
return t(k,{idProperty:"id",bindingProperty:null,autoIdentify:!0,queryEngine:c,isDstoreTree:!1,root:null,data:null,_hash:null,_autoId:null,storage:null,constructor:function(b,g){p.mixin(this,g);this.storage=this;this.root={children:b||[]};p.mixin(this._provideBinding(this.root),{deepness:-1,selectCount:0,leafCount:0});this._hash={};this.idProperty&&this.autoIdentify&&(this._autoId=1);this._initializeNode(this.root,0);this.data=this.root.children},_provideBinding:function(b){var g=this._getBinding(b);
g||(b[this.bindingProperty]=g={});return g},_getBinding:function(b){return this.bindingProperty?b[this.bindingProperty]:b},_initializeNode:function(b,g){var h=this._provideBinding(b);h.selected=!!h.selected;b.children?(h.selectCount=0,h.leafCount=0,l.forEach(b.children,function(m){this._registerNode(m);var n=this._provideBinding(m);n.parent=b;n.deepness=g;this._initializeNode(m,g+1);h.selectCount+=n.selectCount;h.leafCount+=n.leafCount},this),h.selectCount)?h.selectCount===h.leafCount&&(h.selected=
!0):h.selected=!1:("number"!==typeof h.leafCount&&(h.leafCount=1),h.selectCount=h.selected?h.leafCount:0)},isOwned:function(b,g){return g||b!==this.root?this.get(this.getIdentity(b))===b:!0},_registerNode:function(b){this._autoId&&void 0===b[this.idProperty]&&(b[this.idProperty]=this._autoId++);this.idProperty&&(this._hash[b[this.idProperty]]=b)},_unregisterNode:function(b){this.isOwned(b,!0)&&delete this._hash[b[this.idProperty]]},clear:function(){this.root.children.length&&(l.forEach(this.root.children,
function(b){this._unbindNode(b)},this),this.data=this.root.children=[])},destroy:function(){this.clear()},_unbindNode:function(b){b.children&&l.forEach(b.children,function(h){delete this._getBinding(h).parent;this._unbindNode(h)},this);this._unregisterNode(b);var g=this._getBinding(b);g.parent&&(this._incrementCounts(g.parent,-g.selectCount,-g.leafCount),delete g.parent);g!==b&&delete b[this.bindingProperty]},removeNodes:function(b,g){l.forEach(b&&b.slice(),function(h){if(this.isOwned(h,!0)){var m=
this._getBinding(h).parent,n=l.indexOf(m.children,h);0<=n&&m.children.splice(n,1);this._unbindNode(h)}},this);!g&&this.emit("updated")},addNodes:function(b,g,h){if(!g)g=this.root;else if(!this.isOwned(g)||!g.children)return!1;var m=this._getBinding(g).deepness+1,n=0,q=0;l.forEach(b,function(r){if(!this.isOwned(r)){g.children.push(r);this._registerNode(r);var u=this._provideBinding(r);u.parent=g;u.deepness=m;this._initializeNode(r,m+1);n+=u.selectCount;q+=u.leafCount}},this);this._incrementCounts(g,
n,q);!h&&this.emit("updated");return!0},select:function(b,g){return this.changeSelect(b,!0,g)},deselect:function(b){this.changeSelect(b,!1)},changeSelect:function(b,g,h){h=h||this.root.leafCount;var m=b&&this._getBinding(b);if(m){g=!!g;var n=(g?m.leafCount:0)-m.selectCount,q=0>n||this.root.selectCount+n<=h;if(!b.children)return q&&(m.selected=g,n&&this._incrementCounts(b,n)),q;q&&(m.selected=g);l.forEach(b.children,function(r){this.changeSelect(r,g,h)},this);return q}},_incrementCounts:function(b,
g,h){b=this._getBinding(b);b.selectCount+=g;h&&(b.leafCount+=h);b.selectCount?b.selectCount==b.leafCount&&(b.selected=!0):b.selected=!1;b.parent&&this._incrementCounts(b.parent,g,h)},getSelectionState:function(b){if(!this.isOwned(b))return!1;b=this._getBinding(b);return b.selectCount&&b.selectCount!=b.leafCount?"mixed":b.selected=!!b.selectCount},getSelectedNodes:function(b){return this.getDescendingNodes(this.root,!0,b)},getDescendingNodes:function(b,g,h){if(!this.isOwned(b))return[];var m=[];this._collectNodes(b.children,
m,g,h);return m},_collectNodes:function(b,g,h,m){l.forEach(b,function(n){var q=this._getBinding(n),r=null===h||void 0===h?q.leafCount:h?q.selectCount:q.leafCount-q.selectCount;r&&(!n.children||!m&&r==q.leafCount?g.push(n):this._collectNodes(n.children,g,h,m))},this)},inspectChildren:function(b,g,h,m){m&&(g=p.hitch(m,g));b=b||this.root;(b=b.children)&&h&&(b=b.slice(),b.sort(h));return l.every(b,function(n){var q=g(n);return null===q?!1:!1!==q&&n.children?this.inspectChildren(n,g,h):!0},this)},updateExpandedNodes:function(b,
g){for(var h in this._hash)this.updateExpand(this._hash[h],!!b[h]);this._updateOddEven(null,g)},updateExpand:function(b,g,h,m){if(b){var n=!1;b.children&&(b=this._getBinding(b),b.expanded!==g&&(n=!0,b.expanded=g));g={};n&&h&&this._updateOddEven(g,m);return g}},_updateOddEven:function(b,g){var h=1;this.inspectChildren(null,function(m){!1!==m.visible&&(h=1-h);var n=this._getBinding(m);b&&n.isOdd!==h&&(b[this.getIdentity(m)]=h);n.isOdd=h;return!(!m.children||!n.expanded)},g,this)},isOdd:function(b){return(b=
this._getBinding(b))&&b.isOdd},get:function(b){return this._hash[b]},getIdentity:function(b){return this.idProperty?b[this.idProperty]:null},query:function(b,g){return d(this._query(this.data,b,g))},_query:function(b,g,h){return this.queryEngine(g,h)(b)},filter:function(b){return this._filter(this.data,b)},_filter:function(b,g){b=this._query(b,g);return new e(this.storage,b)},sort:function(b,g){return this._sort(this.data,b,g)},_sort:function(b,g,h){"function"===typeof g?(b=b.slice(),b.sort(g)):(g=
Array.isArray(g)?g.map(function(m){return{attribute:m.property,descending:m.descending}}):[{attribute:g,descending:h}],b=this._query(b,{},{sort:g}));return new e(this.storage,b)},mayHaveChildren:function(b){return!!b.children},getChildren:function(b,g){var h=this.isOwned(b,!0)?b.children:null;b=this.isDstoreTree||g&&g.returnCollection;g=this.queryEngine({},b?null:g)(h||[]);return b?new e(this.storage,g):d(g)},fetch:function(){return this._fetchRange(this.data)},fetchRange:function(b){return this._fetchRange(this.data,
b)},_fetchRange:function(b,g){return a(f(g?b.slice(g.start,g.end):b.slice()),{totalLength:f(b.length)})}})})},"dstore/QueryResults":function(){define(["dojo/_base/lang","dojo/when"],function(t,p){function l(k,f){return p(this,function(d){for(var c=0,a=d.length;c<a;c++)k.call(f,d[c],c,d)})}return function(k,f){var d=f&&"totalLength"in f;if(k.then){k=t.delegate(k);var c=k.then(function(a){var e=d?f.totalLength:a.totalLength||a.length;a.totalLength=e;return!d&&e});k.totalLength=d?f.totalLength:c;k.response=
f&&f.response}else k.totalLength=d?f.totalLength:k.length;k.forEach=l;return k}})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/GEUtil":function(){define("dojo/_base/declare dojo/_base/lang esri/dijit/geoenrichment/Deferred esri/dijit/geoenrichment/when esri/dijit/geoenrichment/promise/all dojox/uuid/generateRandomUuid esri/kernel esri/request esri/urlUtils esri/dijit/geoenrichment/utils/CacheUtil esri/dijit/geoenrichment/utils/requests/FileContent esri/dijit/geoenrichment/utils/requests/UniversalClient esri/dijit/geoenrichment/utils/UrlUtil ./stdGeographies/StdGeographiesModel".split(" "),
function(t,p,l,k,f,d,c,a,e,b,g,h,m,n){function q(B){return E?E:(B=B&&c.id.findCredential(B)||c.id.credentials[0])&&B.token}function r(B,y){var z=e.urlToObject(B);y=p.mixin({f:"json",token:q(B),langCode:dojo.locale},z.query||{},y);for(var H in y)B=y[H],B instanceof g||B&&"object"===typeof B&&(y[H]=JSON.stringify("function"===typeof B.toJson?B.toJson():B));return{url:z.path,taskParams:y}}function u(B){D||(D=new v(A));return!B||D.initialized?D:D.initialize()}var v=t(null,{url:null,_geInfo:null,_capabilities:null,
_supportedOperations:null,constructor:function(B){this._capabilities={};this._supportedOperations={};this.url=B},_initDfd:null,initialized:!1,initialize:function(){var B=this;if(this._initDfd)return this._initDfd.promise;this._initDfd=new l;h.requestPublicFirst(r(this.url).url+"/Geoenrichment",{content:{f:"json"},handleAs:"json"},{retryOnAnyError:!0}).then(function(y){B.initWithJson(y)});return this._initDfd.promise},initWithJson:function(B){this._geInfo=B;this._capabilities={};this._supportedOperations=
{};B.capabilities&&B.capabilities.forEach(function(y){this._capabilities[y.toLowerCase()]=!0},this);B.supportedOperations&&B.supportedOperations.forEach(function(y){this._supportedOperations[y.toLowerCase()]=!0},this);this._initDfd=this._initDfd||new l;this._initDfd.resolve();this.initialized=!0},hasCapability:function(B){return!!this._capabilities[B.toLowerCase()]},addCapability:function(B){this._capabilities[B.toLowerCase()]=!0},supportsOperation:function(B){return!!this._supportedOperations[B.toLowerCase()]},
enrich:function(B){B=r(this.url,B);B.taskParams.AddDerivativeVariables="all";return a({url:B.url+"/Geoenrichment/Enrich",content:B.taskParams,handleAs:"json"}).then(function(y){return y.results[0].value.FeatureSet||[]})},stdGeographyQuery:function(B){B=r(this.url,B);return a({url:B.url+"/StandardGeographyQuery/execute",content:B.taskParams,handleAs:"json"}).then(function(y){return y.results[0].value.features||[]})},getDataCollections:function(B,y,z){z=r(this.url,z);return a({url:z.url+"/Geoenrichment/DataCollections/"+
B+(y?"/"+y:""),content:z.taskParams,handleAs:"json"}).then(function(H){return H.DataCollections})},getCountries:function(){var B=r(this.url);return a({url:B.url+"/Geoenrichment/Countries",content:B.taskParams,handleAs:"json"}).then(function(y){return y.countries})},getCountryInfo:function(B){var y=this,z=b.get("GEUtil.countries");if(!z[B]){var H=r(this.url);z[B]=a({url:H.url+"/Geoenrichment/Countries/"+B,content:H.taskParams,handleAs:"json"}).then(function(G){var I=G.countries[0],L={};return f(I.hierarchies.map(function(N){return k(y._getStdGeographyModel(B,
N.ID),function(O){L[N.ID]=O})})).then(function(){return{country:I,geographiesModels:L}})})}return z[B]},_getStdGeographyModel:function(B,y){var z=b.get("GEUtil.stdModels"),H=B+y;if(!z[H]){var G=r(this.url);z[H]=a({url:G.url+"/Geoenrichment/StandardGeographyLevels/"+B+"/"+y,content:G.taskParams,handleAs:"json"}).then(function(I){return new n({countryID:B,hierarchyID:y,levels:I.geographyLevels[0].hierarchies[0].levels})})}return z[H]},formatReport:function(B){B=r(this.url,B);return h.request({url:B.url,
urlSuffix:"Geoenrichment/FormatReport"},{handleAs:"bin",content:B.taskParams}).then(function(y){return y&&y.data&&"text/plain"===y.data.type?null:y})},getReports:function(B){var y=r(this.url);return a({url:y.url+"/Geoenrichment/reports/"+B,content:y.taskParams,handleAs:"json"}).then(function(z){return z.reports})},createReport:function(B){var y=r(this.url,B),z=d();!1===B.forStorage&&(b.get("GEUtil.tasks")[z]={taskName:"createReport",taskParams:p.clone(B)});return h.request({url:y.url,urlSuffix:"Geoenrichment/createReport"},
{handleAs:"xml"===B.format?"text":"bin",content:y.taskParams}).then(function(H){return{taskID:z,result:H}})},consumeCredits:function(B){var y=b.get("GEUtil.tasks")[B];if(y)return delete y.taskParams.forStorage,delete b.get("GEUtil.tasks")[B],this[y.taskName](y.taskParams)},getLayerInfos:function(B){var y=b.get("GEUtil.dataLayers");y[B]||(y[B]=this._getLayerInfos(B));return y[B]},_getLayerInfos:function(B){var y=r(this.url);return a({url:y.url+"/Geoenrichment/DataLayers/"+B,content:y.taskParams,handleAs:"json"}).then(function(z){return z&&
z.layers||[]}).otherwise(function(z){console.log(z);return[]})},getLayerInfo:function(B,y){var z=b.get("GEUtil.dataLayers"),H=B+"_"+y;z[H]||(z[H]=this._getLayerInfo(B,y));return z[H]},_getLayerInfo:function(B,y){var z=r(this.url);return a({url:z.url+"/Geoenrichment/DataLayers/"+B+"/"+y,content:z.taskParams,handleAs:"json"}).then(function(H){return H&&H.layer}).otherwise(function(H){console.log(H);return null})}}),w={},A,E,F=new l;w.setGeoenrichmentUrl=function(B,y){(A=B||A)&&m.registerCORS(A);E=y||
E;!F.promise.isFulfilled()&&F.resolve()};w.canMakeRequests=function(){return!!A};w.getInitPromise=function(){return F.promise};w.GEClient=v;var D;w.getClient=function(){return u()};w.initialize=function(){return k(u(!0))};w.initWithJson=function(B,y){w.setGeoenrichmentUrl(B);u().initWithJson(y)};w.enrich=function(B){return u().enrich(B)};w.stdGeographyQuery=function(B){return u().stdGeographyQuery(B)};w.getDataCollections=function(B,y,z){return u().getDataCollections(B,y,z)};w.formatReport=function(B){return u().formatReport(B)};
w.createReport=function(B){return u().createReport(B)};w.consumeCredits=function(B){return u().consumeCredits(B)};w.getLayerInfos=function(B){return u().getLayerInfos(B)};w.hasCapability=function(B){return k(u(!0),function(){return D&&D.hasCapability(B)})};w.addCapability=function(B){return u().addCapability(B)};w.supportsOperation=function(B){return k(u(!0),function(){return D&&D.supportsOperation(B)})};w.getCountryInfo=function(B){return u().getCountryInfo(B)};return w})},"esri/dijit/geoenrichment/promise/all":function(){define(["dojo/promise/all"],
function(t){return t})},"dojox/uuid/generateRandomUuid":function(){define(["./_base"],function(){dojox.uuid.generateRandomUuid=function(){function t(){for(var d=Math.floor(Math.random()%1*Math.pow(2,32)).toString(16);8>d.length;)d="0"+d;return d}var p=t(),l=t();l=l.substring(0,4)+"-4"+l.substring(5,8);var k=t();k="8"+k.substring(1,4)+"-"+k.substring(4,8);var f=t();return(p+"-"+l+"-"+k+f).toLowerCase()};return dojox.uuid.generateRandomUuid})},"dojox/uuid/_base":function(){define(["dojo/_base/kernel",
"dojo/_base/lang"],function(t){t.getObject("uuid",!0,dojox);dojox.uuid.NIL_UUID="00000000-0000-0000-0000-000000000000";dojox.uuid.version={UNKNOWN:0,TIME_BASED:1,DCE_SECURITY:2,NAME_BASED_MD5:3,RANDOM:4,NAME_BASED_SHA1:5};dojox.uuid.variant={NCS:"0",DCE:"10",MICROSOFT:"110",UNKNOWN:"111"};dojox.uuid.assert=function(p,l){if(!p)throw l||(l="An assert statement failed.\nThe method dojox.uuid.assert() was called with a 'false' value.\n"),Error(l);};dojox.uuid.generateNilUuid=function(){return dojox.uuid.NIL_UUID};
dojox.uuid.isValid=function(p){p=p.toString();var l=t.isString(p)&&36==p.length&&p==p.toLowerCase();if(l){p=p.split("-");l=5==p.length&&8==p[0].length&&4==p[1].length&&4==p[2].length&&4==p[3].length&&12==p[4].length;for(var k in p){var f=parseInt(p[k],16);l=l&&isFinite(f)}}return l};dojox.uuid.getVariant=function(p){if(!dojox.uuid._ourVariantLookupTable){var l=dojox.uuid.variant,k=[];k[0]=l.NCS;k[1]=l.NCS;k[2]=l.NCS;k[3]=l.NCS;k[4]=l.NCS;k[5]=l.NCS;k[6]=l.NCS;k[7]=l.NCS;k[8]=l.DCE;k[9]=l.DCE;k[10]=
l.DCE;k[11]=l.DCE;k[12]=l.MICROSOFT;k[13]=l.MICROSOFT;k[14]=l.UNKNOWN;k[15]=l.UNKNOWN;dojox.uuid._ourVariantLookupTable=k}p=p.toString();p=p.charAt(19);p=parseInt(p,16);dojox.uuid.assert(0<=p&&16>=p);return dojox.uuid._ourVariantLookupTable[p]};dojox.uuid.getVersion=function(p){dojox.uuid.assert(dojox.uuid.getVariant(p)==dojox.uuid.variant.DCE,"dojox.uuid.getVersion() was not passed a DCE Variant UUID.");p=p.toString();p=p.charAt(14);return parseInt(p,16)};dojox.uuid.getNode=function(p){dojox.uuid.assert(dojox.uuid.getVersion(p)==
dojox.uuid.version.TIME_BASED,"dojox.uuid.getNode() was not passed a TIME_BASED UUID.");p=p.toString();return p.split("-")[4]};dojox.uuid.getTimestamp=function(p,l){dojox.uuid.assert(dojox.uuid.getVersion(p)==dojox.uuid.version.TIME_BASED,"dojox.uuid.getTimestamp() was not passed a TIME_BASED UUID.");p=p.toString();l||(l=null);switch(l){case "string":case String:return dojox.uuid.getTimestamp(p,Date).toUTCString();case "hex":var k=p.split("-");p=k[0];l=k[1];k=k[2];k=k.slice(1);p=k+l+p;dojox.uuid.assert(15==
p.length);return p;case null:case "date":case Date:return k=p.split("-"),p=parseInt(k[0],16),l=parseInt(k[1],16),k=(parseInt(k[2],16)&4095)<<16,k=4294967296*(k+l),k+=p,new Date(k/1E4-122192928E5);default:dojox.uuid.assert(!1,"dojox.uuid.getTimestamp was not passed a valid returnType: "+l)}};return dojox.uuid})},"esri/dijit/geoenrichment/utils/CacheUtil":function(){define([],function(){var t={},p={};t.get=function(l,k){var f=p[l];f||k||(f=p[l]={});return f};t.set=function(l,k){return p[l]=k};t.clear=
function(l,k){p={}};return t})},"esri/dijit/geoenrichment/utils/requests/FileContent":function(){define(["dojo/_base/declare","esri/dijit/geoenrichment/utils/DataUtil"],function(t,p){function l(f){return f?/^image\//.test(f)?"base64":/^text\//.test(f)?"text":/application\/json/.test(f)?"json":"bin":"bin"}var k=t(null,{data:null,filename:null,contentType:"application/octet-stream",contentTransferEncoding:"binary",constructor:function(f,d,c){this.data=f;d&&(this.contentType=d);c&&(this.contentTransferEncoding=
c)},getBase64Data:function(){return this.data?"base64"==this.contentTransferEncoding?this.data:p.base64FromByteSource(this.data):null},toString:function(){return this.filename||"\x3cunknown\x3e"}});k.fromArrayBuffer=function(f,d){return new k(p.binaryStringFromByteSource(f),d)};k.fromBlob=function(f,d){return p.arrayBufferFromBlob(f).then(function(c){return new k(p.binaryStringFromByteSource(c),d||f.type)})};k.fromFileData=function(f,d,c){c=c||p.getContentType(f);if("object"==typeof d&&window.ArrayBuffer&&
(d instanceof ArrayBuffer||d.buffer instanceof ArrayBuffer))d=p.binaryStringFromByteSource(d.buffer||d);else{var a=l(c);"json"==a&&"object"==typeof d&&(d=JSON.stringify(d));if("string"!=typeof d)throw Error("Wrong file data.");switch(a){case "base64":d=atob(d);break;case "text":case "json":d=unescape(encodeURIComponent(d))}}d=new k(d,c);d.filename=f;return d};k.getContentConversionType=l;return k})},"esri/dijit/geoenrichment/utils/requests/UniversalClient":function(){define("dojo/_base/lang esri/dijit/geoenrichment/Deferred dojo/request/xhr dojo/io-query dojo/sniff esri/dijit/geoenrichment/when esri/kernel esri/config esri/lang esri/urlUtils ../UrlUtil ./BinaryData ./FileContent ./MultipartDataBuilder ./ErrorUtil".split(" "),
function(t,p,l,k,f,d,c,a,e,b,g,h,m,n,q){function r(E,F){if(F)this.reject(F);else{F=E.xhr;var D=F.getResponseHeader&&F.getResponseHeader("Content-Type");E.status=F.status;E.data=new h(F.response||F.responseBody||F.responseText,D);this.resolve(E)}}var u=0,v=f("safari"),w=function(E){"string"===typeof E?this.url=E:"object"===typeof E&&t.mixin(this,E)};w.prototype={url:null,preventCache:null,usePost:!1,timeout:0,multipartThreshold:0,useCommonAuth:!1,useProxy:!1,allowSSL:null,send:function(E,F){return this.sendUrlRequest(this.prepareUrlRequest(E,
F),"UniversalClient.send")},prepareUrlRequest:function(E,F){"string"===typeof E?E={urlSuffix:E}:E||(E={});F||(F={});var D=E.url||this.url;E=E.urlSuffix;D||(D=E,E=null);if(!D)throw Error("URL is missing.");var B=b.urlToObject(D);D=g.combine(B.path,E);E=B.query||{};"object"===typeof F.content&&(E=t.mixin(E,F.content));B=F.requireSSL;!0!==B&&!1===this.allowSSL&&(B=!1);!1!==B&&!0===this.allowSSL&&/^https/i.test(window.location.protocol)&&(B=!0);var y=this.getCredential(D,!0);y&&(E.token||!1===E.token||
(E.token=y.token),y.ssl&&!1!==B&&(B=!0));!0===B&&(D=g.toHttpsUrl(D));!1===E.token&&delete E.token;var z=F.handleAs||"json";"json"===z&&(E.f="json");y=(F.sendAs||(F.usePost||this.usePost||E.token?"post":"get")).toLowerCase();B="multipart"==y?!0:F.sendAs||F.sizeLimit?!1:null;var H=0,G=F.multipartThreshold||this.multipartThreshold;for(S in E){var I=E[S];if(I instanceof m)B=!0;else{var L=0,N=S.length;"object"===typeof I?F.allowMultipleValues&&Array.isArray(I)?E[S]=I.map(function(R){R="object"===typeof R?
JSON.stringify(R):R;L+=N+R+2;return R}):(E[S]=JSON.stringify(I),L+=N+E[S].length+2):L=N+(I?I.length:0)+2;!B&&0<G&&(H+=L)}}!1!==B&&0<G&&H>G&&(B=!0);if(F.useProxy||!b.hasSameOrigin(D,window.location.href)&&this.useProxy&&!F.hasOwnProperty("useProxy")){var O=g.getProxyUrl();O&&(D=O+"?"+D)}else b.getProxyRule(D)&&(D=b.getProxyRule(D).proxyUrl+"?"+D);var S=(S=F.hasOwnProperty("preventCache")?F.preventCache:this.preventCache)||null===S&&O||v?"_ts\x3d"+(new Date).getTime()+u++:"";O={handleAs:z};if(z=Number(e.isDefined(F.timeout)?
F.timeout:this.timeout))O.timeout=z;z="get"!==y||B;y=B?null:k.objectToQuery(E);z||(z=y.length+D.length+S.length+1>=a.defaults.io.postLength);O.method=z?"POST":"GET";O.headers={"X-Requested-With":null};O.headers["Content-Type"]="undefined"!==typeof F.contentType?F.contentType:"application/x-www-form-urlencoded; charset\x3dutf-8";B?(B=new n,B.addVariables(E),B.build(O)):z?O.data=y:y&&(D+="?"+y,S&&(D+="\x26"+S),S=null);!y&&S&&(D+="?"+S);return{url:D,options:O,sizeLimit:F.sizeLimit}},getCredential:function(E,
F){if(c.id){var D=c.id.findCredential(E);!D&&this.useCommonAuth&&(D="string"==typeof this.useCommonAuth?c.id.findCredential(this.useCommonAuth):c.id.credentials[0]);if(D){var B={token:D.token};F?B.ssl=D.ssl:B.url=D.ssl?g.toHttpsUrl(E):E;return B}}},sendUrlRequest:function(E,F){var D="string"===typeof E.options.data?E.options.data.length:null;if(E.sizeLimit&&D&&("function"===typeof E.sizeLimit?E.sizeLimit(D):D>E.sizeLimit))return(new p).reject(Error("SIZE_LIMIT_EXCEEDED"));F=F||"UniversalClient.sendUrlRequest";
var B=E.deferred||new p;if(D="bin"===E.options.handleAs)E.options.handleAs="blob";var y=l(E.url,E.options,!0);D&&(y.handleResponse=r);var z=this;y.then(function(H){H="json"===E.options.handleAs&&H&&q.parseError(H)||H;if(H instanceof Error){var G;!0===z.useCommonAuth&&498===H.code&&(G=w.handleInvalidTokenError(H));d(G)["finally"](function(){B.reject(H)})}else B.resolve(z._makeResponse(F,H))},function(H){B.reject(q.makeError(H))});return B.promise},requestToUrl:function(E){if(E.options.headers&&E.options.headers["Content-Type"]&&
0==E.options.headers["Content-Type"].indexOf("multipart/form-data"))return null;var F=E.url;if(E=E.options.data){if(F.length+E.length>=a.defaults.io.postLength)return null;F+="?"+E}return F},_makeResponse:function(E,F){return F}};w.makeError=q.makeError;w.handleInvalidTokenError=function(E){};var A=new w({useCommonAuth:!0,allowSSL:!0});w.request=function(E,F){return A.send(E,F).otherwise(function(D){var B=F&&F.content&&F.content.token;if(498!==D.code||null!=B)return(new p).reject(D);F=t.mixin({},
F);F.content=t.mixin({},F.content);F.content.token=!1;return A.send(E,F)})};w.requestPublicFirst=function(E,F,D){var B=t.mixin({},F);B.content=t.mixin({},F.content);B.content.token=!1;return A.send(E,B).otherwise(function(y){return D&&D.retryOnAnyError||499===y.code||403===y.code?A.send(E,F):(new p).reject(y)})};return w})},"esri/dijit/geoenrichment/utils/requests/BinaryData":function(){define(["dojo/_base/declare"],function(t){return t(null,{data:null,type:null,constructor:function(p,l){this.type=
l||p&&p.type||null;this.data=p}})})},"esri/dijit/geoenrichment/utils/requests/MultipartDataBuilder":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/request/util","esri/lang","./FileContent"],function(t,p,l,k,f){function d(e,b){for(var g in b){var h=e[g],m=b[g];h!==m&&(h&&"object"===typeof h&&m&&"object"===typeof m?m instanceof Date?e[g]=new Date(m):d(h,m):e[g]=m)}return e}var c=t(null,{data:null,constructor:function(e){this.data=e}}),a=l.parseArgs;l.parseArgs=function(e,b,g){b.data&&
b.data instanceof c&&(b.data=b.data.data,g=!0);return a(e,b,g)};l.deepCreate=function(e,b){if(b instanceof c)return new c(b.data);b=b||{};var g=p.delegate(e),h,m;for(h in e)(m=e[h])&&"object"===typeof m&&(g[h]=l.deepCreate(m,b[h]));return d(g,b)};return t(null,{addVariables:function(e){for(var b in e)this.addVariable(b,e[b])},addVariable:function(e,b){k.isDefined(b)&&(b instanceof f?this._writeFileContent(e,b):this._writeVariable(e,b.toString()))},build:function(e){this._writeBoundary(!0);e.data=
new c(this._prepareBinaryData());var b=e.headers||{};b["Content-Type"]="multipart/form-data; boundary\x3d"+this._dataProvider.boundary;e.headers=b;this._dataProvider=null},_prepareBinaryData:function(){var e=this._dataProvider.buffer;if(!window.Uint8Array)return e;for(var b=e.length,g=new Uint8Array(new ArrayBuffer(b)),h=0;h<b;h++)g[h]=e.charCodeAt(h);return g},_dataProvider:null,_getDataProvider:function(){if(!this._dataProvider){for(var e="",b=0;32>b;b++)e+=String.fromCharCode(Math.floor(97+25*
Math.random()));this._dataProvider={buffer:"",boundary:e}}return this._dataProvider},_writeVariable:function(e,b){this._writeBoundary();this._writeContentDisposition(e);this._writeLineBreak();this._writeData(this._toUTF8(b));this._writeLineBreak()},_writeFileContent:function(e,b){this._writeBoundary();this._writeContentDisposition(e,b.filename);b.contentType&&(this._writeData("Content-Type: "+b.contentType),this._writeLineBreak());b.contentTransferEncoding&&(this._writeData("Content-Transfer-Encoding: "+
b.contentTransferEncoding),this._writeLineBreak());this._writeLineBreak();this._writeData(b.data);this._writeLineBreak()},_writeBoundary:function(e){this._writeDoubleDash();this._writeData(this._getDataProvider().boundary);e?this._writeDoubleDash():this._writeLineBreak()},_writeContentDisposition:function(e,b){b=b?'"; filename\x3d"'+this._toUTF8(b.replace(/"/g,"'")):"";this._writeData('Content-Disposition: form-data; name\x3d"'+this._toUTF8(e)+b+'"');this._writeLineBreak()},_writeDoubleDash:function(){this._writeData("--")},
_writeLineBreak:function(){this._writeData("\r\n")},_writeData:function(e){this._getDataProvider().buffer+=e},_toUTF8:function(e){return unescape(encodeURIComponent(e))}})})},"esri/dijit/geoenrichment/utils/requests/ErrorUtil":function(){define(["esri/dijit/geoenrichment/Deferred","esri/dijit/geoenrichment/when","require"],function(t,p,l){function k(d){var c=new t;l(["./DataResource"],function(a){p((new a(d)).getFileContent(),c.resolve,c.reject)});return c.promise}var f={getErrorFromBin:function(d){var c=
/^text\/|^application\/json/;return d&&d.type&&!c.test(d.type)?null:p(d&&k(d),function(a){if(a){if(a.hasOwnProperty("contentType")&&!c.test(a.contentType))return null;try{var e=JSON.parse(decodeURIComponent(escape(a.data))),b=f.parseError(e);if(b)return b;if(e.messages&&e.messages.length){var g=e.messages[0];if("esriJobMessageTypeError"==g.type)return Error(g.description)}}catch(h){}}return Error("Binary data error.")})},parseError:function(d){var c;d.error?c=f.makeError(d.error):"error"===d.status&&
(c=f.makeError(d));c&&c.code&&null==c.httpCode&&(c.httpCode=c.code);return c},makeError:function(d){null==d?d=Error():"string"===typeof d&&(d={message:d});if(!(d instanceof Error)&&"object"===typeof d){var c=d;d=Error();c.code&&(d.code=c.code);c.message&&(d.message=c.message);c.details&&(d.details=c.details)}d.log=dojoConfig.isDebug;return d}};return f})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/stdGeographies/StdGeographiesModel":function(){define(["dojo/_base/declare"],
function(t){return t(null,{_levelsCache:null,_levels:null,constructor:function(p){this._initWithLevels(p.levels)},_initWithLevels:function(p){this._levels=p;this._levelsCache={};this._levels.forEach(function(l){delete l.description;this._levelsCache[l.id]=l;l.adminLevel&&(this._levelsCache[l.adminLevel]=l)},this)},getLevels:function(p){return p?this._levels.filter(function(l){return!l.isWholeCountry}):this._levels.slice()},getLevel:function(p){return this._levelsCache[p]},getLevelPluralName:function(p){return(p=
this.getLevel(p))?p.name||p.pluralName:null},toJson:function(){return{levels:this._levels}}})})},"esri/dijit/geoenrichment/ReportPlayer/ReportPlayer":function(){define("dojo/_base/declare dojo/_base/lang esri/dijit/geoenrichment/promise/all esri/dijit/geoenrichment/Deferred esri/dijit/geoenrichment/when dojo/on dojo/keys dojo/dom-class dijit/_WidgetBase dijit/_TemplatedMixin ./config ./playerSupports/_CommandSupport ./playerSupports/_LogoSupport ./playerSupports/_MapSupport ./playerSupports/_PageNavigationSupport ./playerSupports/_PrintSupport ./playerSupports/_ReportContainersSwitcher ./playerSupports/_SmartLayoutSupport ./playerSupports/_ZoomSupport ./playerSupports/_WaitingSupport ./supportClasses/PlayerConfigurator ./supportClasses/PlayerToFullScreenAnimator ./toolbar/PlayerToolbar ./ReportPlayerViewModel ./PlayerResizeModes ./PlayerThemes ./PlayerViewModes ./ReportPlayerState ./PlayerZoomBehaviors ./DataProviderGE ./dataProvider/commands/supportClasses/LayoutXMLBuilder esri/dijit/geoenrichment/utils/DelayUtil esri/dijit/geoenrichment/utils/DeviceUtil esri/dijit/geoenrichment/utils/DomUtil esri/dijit/geoenrichment/utils/InvokeUtil esri/dijit/geoenrichment/utils/async/AsyncQueue dojo/text!./templates/ReportPlayer.html dojo/i18n!esri/nls/jsapi ./_devConfig".split(" "),
function(t,p,l,k,f,d,c,a,e,b,g,h,m,n,q,r,u,v,w,A,E,F,D,B,y,z,H,G,I,L,N,O,S,R,U,Z,da,X,ea){X=X.geoenrichment.dijit.ReportPlayer.ReportPlayer;return t([e,b,h,m,n,r,u,v,w,q,A],{templateString:da,nls:X,isPlayer:!0,dataProvider:null,exportCommands:null,config:null,theme:void 0,viewMode:void 0,enableDataDrilling:!0,showToolbarInPopup:!1,showAreaTitle:void 0,showReportTitle:!1,scaleSlidesToFitWindow:void 0,showCloseButton:!1,showToFullScreenAnimation:!1,canAddMoreAreas:!1,areasSelectButtons:null,comparisonSettings:null,
resizeMode:void 0,printConfig:{subtitle:X.preparedByEsri,printDialogClass:"esri/dijit/geoenrichment/ReportPlayer/printing/PageOptionsDialog/PageOptionsDialog"},showProgressBar:!0,defaultZoomBehavior:void 0,nlsMap:null,isDataDrillingPlayer:!1,isPlayerOnServer:!1,_viewModel:null,_reportData:null,_analysisAreaIndex:0,_originalAreaViewMode:null,_showAllAreasSideBySide:!1,playerToolbar:null,postCreate:function(){this.config=p.mixin(g,this.config);if(g.isPlayerOnServer=this.isPlayerOnServer)g.maps.maxNumberOfMapsShownAtTheSameTime=
1E6,this.defaultZoomBehavior=I.RESET;this._viewModel=new (this._getViewModelClass());this._setUpDataProvider();E.configurePlayer(this);!this.isPlayerOnServer&&this._initToolbar();this._initContainerSwither();!this.isPlayerOnServer&&this._initSmartLayout();!this.isPlayerOnServer&&this._initCommands();!this.isPlayerOnServer&&this._initPageNavigationControls();!this.isPlayerOnServer&&this._initZoomControls();!this.isPlayerOnServer&&this._applyTheme();!this.isPlayerOnServer&&this._showError(!1);!this.isPlayerOnServer&&
this._initProgressController();S.isMobileDevice()&&(a.add(this.domNode,"esriGEReportPlayerMobile"),this._setUpMobileOrientationHandling());this._updateElementsVisibility()},_setUpDataProvider:function(){this.dataProvider=this.dataProvider||new L;this.exportCommands&&this.exportCommands.forEach(function(Q){this.dataProvider.registerCommand(Q)},this)},_orientationDfd:null,_setUpMobileOrientationHandling:function(){var Q=this;this.own(d(window,"orientationchange",function(){Q._orientationDfd&&Q._orientationDfd.resolve("cancel");
var W=Q._orientationDfd=new k;Q._showWaiting(W.promise,"orientationchange");W.promise.then(function(V){"cancel"!==V&&(Q._setViewMode(null),Q.refresh())});f(Q.getRenderPromise(),function(){O.delay(500).then(W.resolve,W.resolve)})}))},_getViewModelClass:function(){return B},_setViewMode:function(Q){E.configurePlayer(this,Q);this._refreshZoomControls()},_initToolbar:function(){var Q=this;this.playerToolbar=(new D({player:this,popupButtonDiv:this.playerAfterToolbarDiv,showToolbarInPopup:this.showToolbarInPopup,
showAreaTitle:this.showAreaTitle,stretchToolbarNode:!this.showToolbarInPopup&&(this.resizeMode===y.FIT_WINDOW?document.body:this.domNode),showCloseButton:this.showCloseButton,canAddMoreAreas:this.canAddMoreAreas,areasSelectButtons:this.areasSelectButtons,onShowAnalysisAreaAt:function(W){Q.showAnalysisAreaAt(W)},onCompareAreasSideBySide:function(){Q.showAllAnalysisAreasSideBySide()},onShowPageAt:function(W){Q.showPageAt(W)},isScrollShown:function(){var W=Q.getCurrentReportContainer();return W&&W.isScrollShown&&
W.isScrollShown()},onClose:function(){Q._onClose()},onAddMoreAreas:function(){Q.onAddMoreAreas()},onRemoveAreas:function(W){Q.onAreasPreRemoved(W);W.forEach(function(ka){ka.hidden=!0});if(Q.viewMode===H.PANELS_IN_STACK_ALL)if(2>Q.getAnalysisAreas().filter(function(ka){return!ka.hidden}).length)Q._setAllAreasVisible(!1);else{var V={};W.forEach(function(ka){V[ka.index]=!1});Q.getCurrentReportContainer().setAreasVisibilityState(V,{append:!0});Q._updateAreaSelect()}else if(Q.getCurrentAnalysisArea().hidden){var fa=
Q.getAnalysisAreas().filter(function(ka){return!ka.hidden})[0];fa?Q.showAnalysisAreaAt(fa.index):Q.refresh()}else Q._updateAreaSelect();Q.onAreasRemoved(W)}})).placeAt(this.playerToolbarDiv);this.own(this.playerToolbar);this.showCloseButton&&this.own(d(window,"keyup",function(W){Q.getWaitingPromise()||G.isViewingDataDrillingZoom||G.isImageViewerShown||W.keyCode===c.ESCAPE&&Q._onClose()}))},_applyTheme:function(){a.remove(this.domNode,"playerThemeDark playerThemeLight");a.add(this.domNode,this.theme===
z.DARK?"playerThemeDark":"playerThemeLight");this.playerToolbar.setTheme(this.theme)},playReport:function(Q,W){return this._showWaiting(this._callAfterRendering("_doPlayReport",[Q,W]),"playReport")},_doPlayReport:function(Q,W){this.playerToolbar&&this.playerToolbar.closePopup();var V=this;this._showError(!1);this._progressController&&this._progressController.reset();this.showToFullScreenAnimation&&this.resizeMode===y.FIT_WINDOW&&F.animateTo(this);this.dataProvider._onCreateReportStarted=function(){V._viewModel.preInitialize()};
this._viewModel.reset();return f(this.dataProvider.getReportData(Q,{progressCallback:function(fa){V._progressController&&V._progressController.setLoadDataProgress(fa)}}),function(fa){if(V.viewMode===H.PANELS_IN_STACK_ALL){var ka=V.viewMode;1<fa.analysisAreas.length&&!fa.isMultiFeature?V._originalAreaViewMode||(V._showAllAreasSideBySide=!0,V._originalAreaViewMode=E.getDefaultViewMode(V)):(V._showAllAreasSideBySide=!1,ka=V._originalAreaViewMode||E.getDefaultViewMode(V));V._setViewMode(ka)}return V.setReportData(fa,
W)},function(fa){V._showError(fa)})},refresh:function(Q){return this._reportData&&f(this.setReportData(this._reportData,{waitUntilAllContentIsReady:!(!Q||!Q.waitUntilAllContentIsReady)}),function(){this.showPageAt(0);return this.resize()}.bind(this))},_isDataBeingSetFlag:!1,_notifyShownPendingFlag:!1,setReportData:function(Q,W){return this._showWaiting(this._callAfterRendering("_doSetReportData",[Q,W]),"setReportData")},setReportDataAndExport:function(Q,W){var V=this;if(Q.reportObject.isMultiFeature)return this.setReportData(Q,
{waitUntilAllContentIsReady:!0,disableAnimation:!0}).then(function(){return V.executeCommand(W.commandId,W.commandParams)});var fa=new k,ka=0,oa=[],C=function(){var J=V.dataProvider.reportDataToSingleAreaReportData(Q,{currentFeatureIndex:ka,reportTitle:Q.reportTitle,templateJson:Q.templateJson});V.setReportData(J,{waitUntilAllContentIsReady:!0,disableAnimation:!0}).then(function(){var M=p.mixin({},W.commandParams);M.pageNumerationInfo={startAreaIndex:ka,numAreas:Q.analysisAreas.length};return f(V.executeCommand(W.commandId,
M)).then(function(K){oa.push(K);++ka===Q.analysisAreas.length?fa.resolve(N.stitchDocuments(oa)):setTimeout(C)})})};C();return fa.promise},_doSetReportData:function(Q,W){var V=this;W=W||{};this._reportData=Q;ea.emulateErrors.playerError&&(Q=null);if(!Q||ea.emulateErrors.emptyDataProviderResponse)this._showError(!0);else{this._isDataBeingSetFlag=!0;G.isAnimationSuspended=!0;this.onSetReportDataStart();var fa=new k;this._viewModel.setAnimationAllowed(!W.disableAnimation);this._configureViewModel(Q);
(V.isPlayerOnServer?f():O.delay(0)).then(function(){if(1===Q.analysisAreas.length||Q.isMultiFeature)V._destroyAllContainers(),V._resetMapBuilder(),V._applyReportData({analysisAreaIndex:0,rerenderContent:!0}).then(fa.resolve,fa.reject);else{!1!==W._resetLoadedContents&&(V._destroyAllContainers(),V._resetMapBuilder());var ka=Q.analysisAreas.length-1,oa=function(){for(;0<=ka&&Q.analysisAreas[ka].hidden;)ka--;0>ka?fa.resolve():V._applyReportData({analysisAreaIndex:ka--,rerenderContent:!1,isFinalArea:0>
ka}).then(function(){(V.isPlayerOnServer?f():O.delay(0)).then(oa)},fa.reject)};oa()}});this._progressController&&this._progressController.setNumAreas(Q.analysisAreas.length);this._progressController&&this._progressController.setLoadDataProgress(1);return fa.promise.then(function(){return V._progressController&&V._progressController.finalize()}).otherwise(function(ka){V._showError(ka)}).always(function(){var ka=V.getCurrentReportContainer();if(ka&&ka.domNode)return(V.isPlayerOnServer?f():O.delay(300)).then(function(){V._isDataBeingSetFlag=
!1;V._notifyShownPendingFlag=!R.isNodeInLayout(V.domNode);G.isAnimationSuspended=V.isPlayerOnServer;V.onSetReportDataEnd();V._emitPendingResizedEvent();V._progressController&&V._progressController.reset();if(W.waitUntilAllContentIsReady)return V.getRenderPromise()})})}},showAnalysisAreaAt:function(Q){return this._callAfterRendering("_doShowAnalysisAreaAt",[Q])},_doShowAnalysisAreaAt:function(Q){var W=this;return f(this._setAllAreasVisible(!1),function(){if(W._analysisAreaIndex!==Q&&W.getAnalysisAreas()[Q]&&
!W.getAnalysisAreas()[Q].hidden)return W._applyReportData({analysisAreaIndex:Q,rerenderContent:!1})})},showAllAnalysisAreasSideBySide:function(){return this._callAfterRendering("_doShowAllAnalysisAreasSideBySide")},_doShowAllAnalysisAreasSideBySide:function(){return this._setAllAreasVisible(!0)},_setAllAreasVisible:function(Q){if(this._showAllAreasSideBySide!==Q)return Q?(this._showAllAreasSideBySide=!0,this._originalAreaViewMode=this.viewMode===H.PANELS_IN_STACK_ALL?E.getDefaultViewMode(this):this.viewMode,
this._setViewMode(H.PANELS_IN_STACK_ALL)):(this._showAllAreasSideBySide=!1,this._setViewMode(this._originalAreaViewMode),this._originalAreaViewMode=null),this.refresh()},_applyReportData:function(Q){var W=this;Q=Q||{};var V=this._reportData&&this._reportData.isMultiFeature?0:Q.analysisAreaIndex||0,fa=!1!==Q.rerenderContent;this._analysisAreaIndex=V;this._showError(!this._reportData);if(this._reportData)return f(this._viewModel.initialize(!this._reportData.reportObject.isGraphicReport,this.viewMode),
function(){return W._setReportContainer(fa)?W._doApplyTemplateJson({analysisAreaIndex:V,isFinalArea:Q.isFinalArea}):W._updateAreaSelect()})},_doApplyTemplateJson:function(Q){var W=this,V=this.getCurrentReportContainer(),fa=p.clone(this._reportData.templateJson);ea.emulateErrors.emptyTemplateJson&&(fa.sectionsTables.length=0);var ka=V.fromJson(fa,{waitUntilAllContentIsReady:!0,progressCallback:function(oa){W._progressController&&W._progressController.setProgressForAreaAt(oa,Q.analysisAreaIndex)},analysisAreaIndex:Q.analysisAreaIndex,
isFinalArea:Q.isFinalArea,renderSync:this.isPlayerOnServer});fa=V.getPagePromise?V.getPagePromise():ka;V=V.getContentPromise?V.getContentPromise():ka;this._registerContainerLoadPromise(V||fa);this._updateAreaSelect();return f(fa,function(){W._setCurrentContainerLoaded();W.showPageAt(W._currentPageIndex);return W.resize()})},_updateAreaSelect:function(){this.playerToolbar&&this.playerToolbar.updateAreaSelect({analysisAreas:this._reportData.analysisAreas,combinedAreasInfo:this._reportData.combinedAreasInfo,
currentAreaIndex:this._showAllAreasSideBySide?"all":this.getCurrentAnalysisAreaIndex(),isMultiFeature:this._reportData.isMultiFeature})},getReportData:function(){return this._reportData},getReportTitle:function(){return this._reportData&&this._reportData.reportTitle||""},getCurrentAnalysisAreaIndex:function(){return this._analysisAreaIndex},getCurrentAnalysisArea:function(){return this._reportData&&this._reportData.analysisAreas[this._analysisAreaIndex]},getAnalysisAreas:function(){return this._reportData&&
this._reportData.analysisAreas},reportDataToJson:function(Q){return this._showWaiting(this.dataProvider.reportDataToJson(this.getReportData(),Q),"reportDataToJson")},reportDataFromJson:function(Q,W){var V=this;this._showError(!1);return this._showWaiting(f(this.dataProvider.reportDataFromJson(Q),function(fa){return V.setReportData(fa,W)}),"reportDataFromJson")},_configureViewModel:function(Q){this._viewModel.setTheme(this._reportData.templateJson.theme);this._viewModel.enableDataDrilling=!this.isPlayerOnServer&&
this.enableDataDrilling;this._viewModel.setDynamicReportInfo({fieldData:this._reportData.fieldData,analysisAreas:this._reportData.analysisAreas,combinedAreasInfo:this._reportData.combinedAreasInfo,attachmentsStore:this._reportData.attachmentsStore,createMapFunc:p.hitch(this,this._createMap),reportObject:this._reportData.reportObject,isMultiFeature:this._reportData.isMultiFeature,isFixedDataMode:!this._reportData.config.geoenrichmentUrl,geClient:this._reportData.geClient,templateVariableProvider:this._reportData.templateVariableProvider,
countryID:this._reportData.config.countryID,hierarchy:this._reportData.config.hierarchy,templateJson:this._reportData.templateJson});this._viewModel.getDynamicImageFunc=p.hitch(this,this._getReportLogo)},notifyShown:function(){!this._isDataBeingSetFlag&&this._notifyShownPendingFlag&&(this.getCurrentReportContainer()&&this.getCurrentReportContainer().notifyShown(),this._notifyShownPendingFlag=!1)},_isErrorShown:!1,_showError:function(Q){this.errorViewDiv&&R.destroy(this.errorViewDiv);this.errorViewDiv=
null;R[Q?"hide":"show"](this.printableDivContainer);a[Q?"add":"remove"](this.domNode,"esriGEReportPlayerError");this._isErrorShown=!!Q;this._updateElementsVisibility();Q?(this.errorViewDiv=R.create("div",{"class":"esriGEReportPlayerErrorMessage",innerHTML:X.cantPlayReportError},this.domNode),this.playerToolbar&&this.playerToolbar.setErrorShown(!0),this._progressController&&this._progressController.reset(),console.log(Q),this.onError(Q)):this.playerToolbar&&this.playerToolbar.setErrorShown(!1)},isErrorShown:function(){return this._isErrorShown},
_updateElementsVisibility:function(){var Q=0<this._waitingCount?!1:this._reportData||this._isErrorShown,W=0<this._waitingCount||this._isErrorShown?!1:!0,V=0<this._waitingCount||this._isErrorShown?!1:!0;this.playerToolbarDiv&&(this.playerToolbarDiv.style.opacity=Q?"":"0.001");this.sidePageNavigator&&(this.sidePageNavigator.style.opacity=W?"":"0.001");this.reportContainerDiv.style.opacity=V?"":"0.001"},setPrintMode:function(Q){a[Q?"add":"remove"](this.domNode,"esriGEReportPlayerInPrinting")},resize:function(Q,
W){this._resize({width:Q,height:W});this._updatePageNavigator();this._updateZoomControls();this.playerToolbar&&this.playerToolbar.update()},_pendingResizeEvent:null,_emitResizedEvent:function(Q){this._pendingResizeEvent={isPaginating:!!Q};this._isDataBeingSetFlag||this._emitPendingResizedEvent()},_emitPendingResizedEvent:function(){this._pendingResizeEvent&&(this.onResized(this._pendingResizeEvent.isPaginating),this._pendingResizeEvent=null)},_onClose:function(){var Q;this.showToFullScreenAnimation&&
this.resizeMode===y.FIT_WINDOW&&(Q=F.animateFrom(this));f(Q,function(){this.onClose()}.bind(this))},getVisualState:function(){return{type:"reportPlayer",viewMode:this.viewMode,reportContainers:this.getAllReportContainers().map(function(Q){return Q.getVisualState&&Q.getVisualState()})}},setVisualState:function(Q){return this._callAfterRendering("_doSetVisualState",[Q])},_doSetVisualState:function(Q){var W=Q&&this.getAllReportContainers().map(function(V,fa){return V.setVisualState&&V.setVisualState(Q.reportContainers[fa])});
return l(W)},_renderQueue:null,getRenderPromise:function(){return this._renderQueue&&this._renderQueue.getPromise()},_registerContainerLoadPromise:function(Q){this._renderQueue=this._renderQueue||new Z;this._renderQueue.add(Q);this.playerToolbar&&this.playerToolbar.setContentLoadPromise(this.getRenderPromise())},_safeFuncCaller:null,_callAfterRendering:function(Q,W){if(this.isPlayerOnServer)return this[Q].apply(this,W);var V=this;this._safeFuncCaller=this._safeFuncCaller||{};this._safeFuncCaller[Q]=
function(){return V[Q].apply(V,W)};return f(this.getRenderPromise(),function(){return U.invoke(V._safeFuncCaller,Q)})},onSetReportDataStart:function(){},onSetReportDataEnd:function(){},onResized:function(Q){},onClose:function(){},onError:function(Q){},onAddMoreAreas:function(){},onAreasPreRemoved:function(Q){},onAreasRemoved:function(Q){},destroy:function(){this._destroyAllContainers();this.inherited(arguments)}})})},"esri/dijit/geoenrichment/ReportPlayer/config":function(){define(["esri/kernel"],
function(t){function p(l){l=l.split(".");return Number((Number(l[0])+Number(l[1])/100).toFixed(2))}t=Math.max(p("3.36"),p(t.version)).toFixed(2);return{jsapiVersion:t,esriDijitCssUrl:"https://js.arcgis.com/"+t+"/dijit/themes/claro/claro.css",esriCssUrl:"https://js.arcgis.com/"+t+"/esri/css/esri.css",playerSourceRootUrl:"https://js.arcgis.com/"+t+"/",configScriptText:null,env:"prod",isPlayerOnServer:!1,updateVariableInfoFromDataXml:!0,runReportTask:{cacheResult:!0,ignoreErrors:!0,secondAttempt:!0},
maps:{maxNumberOfMapsShownAtTheSameTime:6},charts:{showErrorIfHasUnavailableData:!1},tables:{leaveEmptyCellsUponError:!0,showUnavailableData:!0},createImageCommand:{skipSavingFile:!1},createPDFCommand:{skipSavingFile:!1,skipCreditConsumption:!1},createPlayerCommand:{loadMapPortalItems:!0,compressData:!1,prettifyDataJson:!1,skipCreditConsumption:!1},exportToExcel:{skipSavingFile:!1},modules:{exportCommands:!0,complexCellTooltips:!0,paths:{panoramicViewer:null}},generalization:{factor:-1,maxVerticesInAllFeatures:1E5,
numVerticesPerFeature:5E4}}})},"esri/dijit/geoenrichment/ReportPlayer/playerSupports/_CommandSupport":function(){define("dojo/_base/declare dojo/_base/lang esri/dijit/geoenrichment/Deferred esri/dijit/geoenrichment/when esri/dijit/geoenrichment/ReportPlayer/PlayerCommands esri/dijit/geoenrichment/ReportPlayer/config esri/dijit/geoenrichment/utils/DeviceUtil".split(" "),function(t,p,l,k,f,d,c){return t(null,{_initCommands:function(){c.isMobileDevice()||!d.modules.exportCommands?this.playerToolbar.notifyCommandButtonsAdded():
k(this.dataProvider.getCommands&&this.dataProvider.getCommands(),function(a){this._createCommandButtons(a);this.playerToolbar&&this.playerToolbar.notifyCommandButtonsAdded()}.bind(this))},_lastNonPrintCommandId:null,_executeExportCallback:null,_executePrintCallback:null,_createCommandButtons:function(a){function e(m){var n=new l,q=new l;b.onCommandSettingsShown(n.promise);b._saveVisualState();k(b._getPrintableContainer({commandId:m,showDialog:!0}),function(r){if(r){var u=r.getSelectedCommandId();
u&&u!==f.PRINT&&(b._lastNonPrintCommandId=u);k(b._executeCommand(u,{printableContainer:r}),q.resolve,q.reject)}else k(b._applySavedVisualState(),function(){b.onCommandCanceled();q.resolve()})}).always(n.resolve);return q.promise}var b=this;if(a&&a.length){var g,h=a.filter(function(m){return m.id===f.PRINT?(g=m,!1):!0});h.length&&(this._executeExportCallback=function(){return e(b._lastNonPrintCommandId||h[0].id)},this._createCommandButton(h[0],this._executeExportCallback));g&&(this._executePrintCallback=
function(){return e(g.id)},this._createCommandButton(g,this._executePrintCallback))}},executeExport:function(){return this._executeExportCallback&&this._executeExportCallback()},executePrint:function(){return this._executePrintCallback&&this._executePrintCallback()},_createCommandButton:function(a,e){return this.playerToolbar&&this.playerToolbar.createCommandButton(a,e)},getCommandExportDialogSettings:function(){return this._getPrintDialogSettings()},executeCommand:function(a,e){e=e||{};this._saveVisualState();
var b=this._viewModel.dynamicReportInfo.fieldData;!this.isPlayerOnServer||a!==f.PDF&&a!==f.IMAGE||(e.exportSettings=p.mixin({},b.reportInfo&&b.reportInfo.exportSettings,e.exportSettings));var g=this;return k(this._getPrintableContainer({commandId:a,showDialog:!1,exportSettings:e.exportSettings}),function(h){return g._executeCommand(a,p.mixin({printableContainer:h},e))})},_executeCommand:function(a,e){function b(){k(g.dataProvider.executeCommand&&g.dataProvider.executeCommand(a,g,e,function(q){g.onCommandProgress(q)}),
m.resolve,m.reject)}var g=this,h=this._viewModel.dynamicReportInfo.fieldData;a!==f.PDF&&a!==f.DYNAMIC_HTML||!h.runReportTaskIDs||(e.creditsTaskIDs=h.runReportTaskIDs);var m=new l;this.isPlayerOnServer?b():setTimeout(b);var n=m.promise.then(function(q){return k(g._applySavedVisualState(),function(){return q})});this.onCommandStart(n,a);this._showWaiting(n,"executeCommand");n.always(function(){g.onCommandEnd(n)});return n},_visualStateMemo:null,_saveVisualState:function(){this._visualStateMemo=this.getVisualState()},
_applySavedVisualState:function(){var a=this;return this.setVisualState(this._visualStateMemo).then(function(){a._visualStateMemo=null})},onCommandSettingsShown:function(a){},onCommandCanceled:function(){},onCommandStart:function(a,e){},onCommandProgress:function(a){},onCommandEnd:function(a){}})})},"esri/dijit/geoenrichment/ReportPlayer/PlayerCommands":function(){define([],function(){var t={HTML:"createHTML",PDF:"createPDF",PRINT:"print",DYNAMIC_HTML:"createDynamicHTML",IMAGE:"createImage",EXCEL:"exportToExcel",
isSupported:function(p){for(var l in t)if(t[l]===p)return!0;return!1}};return t})},"esri/dijit/geoenrichment/utils/DeviceUtil":function(){define(["dojo/sniff","dojo/domReady!"],function(t){var p={},l=function(){var f=window,d=f.navigator.platform,c=f.navigator.userAgent,a={ios:!1,android:!1,androidChrome:!1,desktop:!1,iphone:!1,ipod:!1,ipad:!1,edge:!1,ie:!1,firefox:!1,macos:!1,windows:!1,cordova:!(!f.cordova&&!f.phonegap),phonegap:!(!f.cordova&&!f.phonegap),electron:!1,nwjs:!1},e=f.screen.width,b=
f.screen.height,g=c.match(/(Android);?[\s\/]+([\d.]+)?/),h=c.match(/(iPad).*OS\s([\d_]+)/),m=c.match(/(iPod)(.*OS\s([\d_]+))?/),n=!h&&c.match(/(iPhone\sOS|iOS)\s([\d_]+)/),q=0<=c.indexOf("MSIE ")||0<=c.indexOf("Trident/"),r=0<=c.indexOf("Edge/"),u=0<=c.indexOf("Gecko/")&&0<=c.indexOf("Firefox/"),v="Win32"===d,w=0<=c.toLowerCase().indexOf("electron"),A="undefined"!==typeof nw&&"undefined"!==typeof process&&"undefined"!==typeof process.versions&&"undefined"!==typeof process.versions.nw;d="MacIntel"===
d;var E="1024x1366 1366x1024 834x1194 1194x834 834x1112 1112x834 768x1024 1024x768".split(" ");!h&&d&&t("touch")&&0<=E.indexOf(e+"x"+b)&&((h=c.match(/(Version)\/([\d.]+)/))||(h=[0,1,"13_0_0"]),d=!1);a.ie=q;a.edge=r;a.firefox=u;g&&!v&&(a.os="android",a.osVersion=g[2],a.android=!0,a.androidChrome=0<=c.toLowerCase().indexOf("chrome"));if(h||n||m)a.os="ios",a.ios=!0;n&&!m&&(a.osVersion=n[2].replace(/_/g,"."),a.iphone=!0);h&&(a.osVersion=h[2].replace(/_/g,"."),a.ipad=!0);m&&(a.osVersion=m[3]?m[3].replace(/_/g,
"."):null,a.ipod=!0);a.ios&&a.osVersion&&0<=c.indexOf("Version/")&&"10"===a.osVersion.split(".")[0]&&(a.osVersion=c.toLowerCase().split("version/")[1].split(" ")[0]);a.webView=!(!(n||h||m)||!c.match(/.*AppleWebKit(?!.*Safari)/i)&&!f.navigator.standalone)||f.matchMedia&&f.matchMedia("(display-mode: standalone)").matches;a.webview=a.webView;a.standalone=a.webView;a.desktop=!(a.ios||a.android)||w||A;a.desktop&&(a.electron=w,a.nwjs=A,a.macos=d,a.windows=v,a.macos&&(a.os="macos"),a.windows&&(a.os="windows"));
a.pixelRatio=f.devicePixelRatio||1;return a}();p.device=l;p.isMobileDevice=function(){return!l.desktop};p.isPCWithTouchScreen=function(){return l.desktop&&t("touch")};p.isLandscape=function(){return 90===Math.abs(window.orientation)};var k=null;p.isWebLayout=function(){if(!k){var f=document.createElement("div");f.style="visibility:hidden;height:1in;width:1in;position:absolute;left: -100%;top:-100%;";document.body.appendChild(f);k=f.offsetHeight;f.parentNode.removeChild(f)}f=k;f*=7;var d=document.body.offsetWidth;
if(d>=f)return!0;var c=document.body.offsetHeight;return d>=c&&Math.sqrt(d*d+c*c)>=f?!0:!1};p.press=l.desktop?"mousedown":"touchstart";p.release=l.desktop?"mouseup":"touchend";p.click=l.desktop?"click":"touchend";p.clickOrRelease=l.desktop?"click, mouseup":"touchend";p.move=l.desktop?"mousemove":"touchmove";return p})},"esri/dijit/geoenrichment/ReportPlayer/playerSupports/_LogoSupport":function(){define(["dojo/_base/declare","esri/dijit/geoenrichment/when","../core/annotations/supportClasses/DynamicBehaviors",
"../core/supportClasses/images/DefaultLogoLoader"],function(t,p,l,k){return t(null,{_getReportLogo:function(f,d,c){function a(){return p(e._reportData.attachmentsStore&&e._reportData.attachmentsStore.getImages(),function(b){return p(b&&b[0]&&b[0].getThumbnail(),function(g){return g||e._getDefaultLogo(d,c)})})}var e=this;switch(f){case l.ATTACHMENTS:return a();default:return this._getDefaultLogo(d,c)}},_getDefaultLogo:function(f,d){return this._reportData.customLogo||d||k.getDefaultLogo(this._viewModel.getDocumentDefaultStyles())}})})},
"esri/dijit/geoenrichment/ReportPlayer/core/annotations/supportClasses/DynamicBehaviors":function(){define([],function(){var t={ATTACHMENTS:"attachments",LOGO:"logo",toSupportedValue:function(p,l){return p===t.ATTACHMENTS?p:p||l?t.LOGO:null}};return t})},"esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/images/DefaultLogoLoader":function(){define(["require","esri/dijit/geoenrichment/Deferred","esri/dijit/geoenrichment/utils/ColorUtil"],function(t,p,l){return{_identifyDefaultLogoBackground:function(k){return!k||
l.isTransparent(k.backgroundColor)?"transparent":l.isLightColor(k.backgroundColor)?"light":"dark"},_loadLogo:function(k){var f=new p;t(["./"+k],function(d){f.resolve(d)});return f.promise},getDefaultLogo:function(k){switch(this._identifyDefaultLogoBackground(k)){case "light":return this._loadLogo("DefaultLogoGraphicReportDark");case "dark":return this._loadLogo("DefaultLogoGraphicReportLight");default:return this._loadLogo("DefaultLogoGraphicReportGeneric")}}}})},"esri/dijit/geoenrichment/utils/ColorUtil":function(){define(["dojo/_base/Color",
"dojox/color/_base","dojox/color/Palette"],function(t,p,l){function k(d,c,a){return Math.round((d&255)*(1-a)+(c&255)*a)}var f={toCSSColor:function(d,c,a){"string"!==typeof d||/^0x/i.test(d)||(d=t.fromString(d));if(d instanceof t)return c||1===d.a?d.toHex():d.toCss(!0);if(null==d||isNaN(d))return a?f.toCSSColor(a,c):"#000000";d="00000"+Number(d).toString(16);return"#"+d.substr(d.length-6)},toColor:function(d,c){return"object"===typeof d?(new t).setColor(d):t.fromString(f.toCSSColor(d,!1,c))},getCSSColorWithAlpha:function(d,
c){return f.toCSSColor(f.getColorWithAlpha(d,c))},getColorWithAlpha:function(d,c){d=(new t).setColor(d);d.a=c;return d},transform:function(d,c){var a=new l;a.colors=[new t(d)];return a.transform({use:void 0!==c.dl?"hsl":"hsv",dh:c.dh||0,ds:c.ds||0,dv:c.dv||0,dl:c.dl||0}).colors[0]},generateAnalogousColorScheme:function(d,c,a){return l.generators.analogous({base:d,high:c,low:a}).colors},applyColorHue:function(d,c){d=new p.Color(d);c=new p.Color(c);d=d.toHsl();var a=c.toHsl();d=p.fromHsl({h:d.h,s:0===
d.s?0:0===a.s?d.s:a.s,l:a.l});d.a=c.a;return d},getColorParams:function(d){d=new p.Color(d);var c=d.toHsv();c.l=d.toHsl().l;return c},generateGradient:function(d,c){d=d.map(f.toRGBColor);var a=[];if(0===d.length-1||1===c){d=d[0];for(var e=0;e<c;e++)a.push(d);return a}var b=1/(c-1);for(e=0;e<c;e++)a.push(f.getGradientRGBColor(d,e*b));return a},getGradientRGBColor:function(d,c,a){var e=d.length-1,b=1>e||0>=c?0:1<=c?e:-1;if(0<=b)return d[b];c*=e;b=Math.floor(c);b===e&&b--;return f.mixRGBColors(d[b],
d[b+1],c-b,a)},mixRGBColors:function(d,c,a,e){1<a?a=1:0>a&&(a=0);var b=k(d,c,a),g=k(d>>8,c>>8,a),h=k(d>>16,c>>16,a);return((e?k(d>>24,c>>24,a):0)<<24)+(h<<16)+(g<<8)+b},toRGBColor:function(d,c){d=f.toCSSColor(d,!0,c);return parseInt("0x"+d.substr(1))},getContrastColor:function(d,c,a,e){return f.isLightColor(d,e)?f.toColor(c,"#000000"):f.toColor(a,"#FFFFFF")},getHighlightColor:function(d,c){c=c||{};d=new p.Color(d);x=d.toHsl();if("darker"===c.method)x.l=50>x.l?x.l+30:x.l-20,0<x.s&&(x.s+=30);else{var a=
c.saturation||100,e=c.luminosity1||75;c=c.luminosity2||50;0===x.s?x.l=50>x.l?x.l+30:x.l-20:(x.s=a,x.l=x.l<c?e:x.l>e?c:x.l-c>e-x.l?c:e)}c=p.fromHsl(x);c.a=d.a;return c},getLightness:function(d){d=f.toRGBColor(d);return(299*(d>>16&255)+587*(d>>8&255)+114*(d&255))/1E3},isLightColor:function(d,c){return f.getLightness(d)>=(void 0===c?128:c)},colorsEqual:function(d,c){d instanceof t||(d=f.toColor(d));c instanceof t||(c=f.toColor(c));return d.a==c.a&&d.r==c.r&&d.g==c.g&&d.b==c.b},isTransparent:function(d){d=
f.toCSSColor(d);return"rgba(0,0,0,0)"===d.toLowerCase().replace(/\s/g,"")},generateRandomColor:function(d){function c(){return a+Math.round((e-a)*Math.random())}d=d||{};var a=d.min||0,e=d.max||255,b=d.randomizeAlpha?c():1;return d.grayScheme?(d=c(),new t([d,d,d,b])):new t([c(),c(),c(),b])}};return f})},"dojox/color/Palette":function(){define(["dojo/_base/lang","dojo/_base/array","./_base"],function(t,p,l){function k(e,b,g){var h=new l.Palette;h.colors=[];p.forEach(e.colors,function(m){h.colors.push(new l.Color({r:Math.min(255,
Math.max(0,"dr"==b?m.r+g:m.r)),g:Math.min(255,Math.max(0,"dg"==b?m.g+g:m.g)),b:Math.min(255,Math.max(0,"db"==b?m.b+g:m.b)),a:Math.min(1,Math.max(0,"da"==b?m.a+g:m.a))}))});return h}function f(e,b,g){var h=new l.Palette;h.colors=[];p.forEach(e.colors,function(m){m=m.toCmy();h.colors.push(l.fromCmy(Math.min(100,Math.max(0,"dc"==b?m.c+g:m.c)),Math.min(100,Math.max(0,"dm"==b?m.m+g:m.m)),Math.min(100,Math.max(0,"dy"==b?m.y+g:m.y))))});return h}function d(e,b,g){var h=new l.Palette;h.colors=[];p.forEach(e.colors,
function(m){m=m.toCmyk();h.colors.push(l.fromCmyk(Math.min(100,Math.max(0,"dc"==b?m.c+g:m.c)),Math.min(100,Math.max(0,"dm"==b?m.m+g:m.m)),Math.min(100,Math.max(0,"dy"==b?m.y+g:m.y)),Math.min(100,Math.max(0,"dk"==b?m.b+g:m.b))))});return h}function c(e,b,g){var h=new l.Palette;h.colors=[];p.forEach(e.colors,function(m){m=m.toHsl();h.colors.push(l.fromHsl(("dh"==b?m.h+g:m.h)%360,Math.min(100,Math.max(0,"ds"==b?m.s+g:m.s)),Math.min(100,Math.max(0,"dl"==b?m.l+g:m.l))))});return h}function a(e,b,g){var h=
new l.Palette;h.colors=[];p.forEach(e.colors,function(m){m=m.toHsv();h.colors.push(l.fromHsv(("dh"==b?m.h+g:m.h)%360,Math.min(100,Math.max(0,"ds"==b?m.s+g:m.s)),Math.min(100,Math.max(0,"dv"==b?m.v+g:m.v))))});return h}l.Palette=function(e){this.colors=[];e instanceof l.Palette?this.colors=e.colors.slice(0):e instanceof l.Color?this.colors=[null,null,e,null,null]:t.isArray(e)?this.colors=p.map(e.slice(0),function(b){return t.isString(b)?new l.Color(b):b}):t.isString(e)&&(this.colors=[null,null,new l.Color(e),
null,null])};t.extend(l.Palette,{transform:function(e){var b=k;if(e.use){var g=e.use.toLowerCase();0==g.indexOf("hs")?b="l"==g.charAt(2)?c:a:0==g.indexOf("cmy")&&(b="k"==g.charAt(3)?d:f)}else if("dc"in e||"dm"in e||"dy"in e)b="dk"in e?d:f;else if("dh"in e||"ds"in e)b="dv"in e?a:c;g=this;for(var h in e)"use"!=h&&(g=b(g,h,e[h]));return g},clone:function(){return new l.Palette(this)}});t.mixin(l.Palette,{generators:{analogous:function(e){var b=e.high||60,g=e.low||18;e=(t.isString(e.base)?new l.Color(e.base):
e.base).toHsv();var h=Math.max(10,95>=e.s?e.s+5:100-(e.s-95)),m=92<=e.v?e.v-9:Math.max(e.v+9,20),n=90>=e.v?Math.max(e.v+5,20):95+Math.ceil((e.v-90)/2),q=[h,1<e.s?e.s-1:21-e.s,e.s,h,h],r=[m,n,e.v,m,n];return new l.Palette(p.map([(e.h+g+360)%360,(e.h+Math.round(g/2)+360)%360,e.h,(e.h-Math.round(b/2)+360)%360,(e.h-b+360)%360],function(u,v){return l.fromHsv(u,q[v],r[v])}))},monochromatic:function(e){e=t.isString(e.base)?new l.Color(e.base):e.base;var b=e.toHsv(),g=9<b.s-30?b.s-30:b.s+30,h=b.s,m=20<b.v-
20?b.v-20:b.v+60,n=20<b.v-50?b.v-50:b.v+30;return new l.Palette([l.fromHsv(b.h,g,100-.8*(100-b.v)),l.fromHsv(b.h,h,n),e,l.fromHsv(b.h,g,n),l.fromHsv(b.h,h,m)])},triadic:function(e){e=t.isString(e.base)?new l.Color(e.base):e.base;var b=e.toHsv(),g=(b.h-157+360)%360,h=90<b.s?b.s-10:b.s+10,m=95<b.s?b.s-5:b.s+5,n=20<b.v-20?b.v-20:b.v+20,q=20<b.v-30?b.v-30:b.v+30,r=70<b.v-30?b.v-30:b.v+30;return new l.Palette([l.fromHsv((b.h+57+360)%360,20<b.s?b.s-10:b.s+10,b.v),l.fromHsv(b.h,h,q),e,l.fromHsv(g,h,n),l.fromHsv(g,
m,r)])},complementary:function(e){e=t.isString(e.base)?new l.Color(e.base):e.base;var b=e.toHsv(),g=360>2*b.h+137?2*b.h+137:Math.floor(b.h/2)-137,h=100-.9*(100-b.s),m=Math.min(100,b.s+20),n=20<b.v?b.v-30:b.v+30;return new l.Palette([l.fromHsv(b.h,Math.max(b.s-10,0),Math.min(100,b.v+30)),l.fromHsv(b.h,h,n),e,l.fromHsv(g,m,n),l.fromHsv(g,b.s,b.v)])},splitComplementary:function(e){var b=t.isString(e.base)?new l.Color(e.base):e.base,g=e.da||30;e=b.toHsv();var h=360>2*e.h+137?2*e.h+137:Math.floor(e.h/
2)-137,m=(h-g+360)%360;g=(h+g)%360;h=100-.9*(100-e.s);var n=Math.min(100,e.s+20),q=20<e.v?e.v-30:e.v+30;return new l.Palette([l.fromHsv(m,Math.max(e.s-10,0),Math.min(100,e.v+30)),l.fromHsv(m,h,q),b,l.fromHsv(g,n,q),l.fromHsv(g,e.s,e.v)])},compound:function(e){e=t.isString(e.base)?new l.Color(e.base):e.base;var b=e.toHsv(),g=360>2*b.h+18?2*b.h+18:Math.floor(b.h/2)-18,h=360>2*b.h+120?2*b.h+120:Math.floor(b.h/2)-120,m=360>2*b.h+99?2*b.h+99:Math.floor(b.h/2)-99,n=80<b.s-10?b.s-10:b.s+10,q=10<b.s-25?b.s-
25:b.s+25,r=80<b.v-20?b.v-20:b.v+20,u=Math.max(b.v,20);return new l.Palette([l.fromHsv(g,10<b.s-40?b.s-40:b.s+40,10<b.v-40?b.v-40:b.v+40),l.fromHsv(g,n,r),e,l.fromHsv(h,q,u),l.fromHsv(m,n,r)])},shades:function(e){e=t.isString(e.base)?new l.Color(e.base):e.base;var b=e.toHsv(),g=100==b.s&&0==b.v?0:b.s,h=20<=b.v-25?b.v-25:b.v+55,m=20<=b.v-75?b.v-75:b.v+5,n=Math.max(b.v-10,20);return new l.Palette([new l.fromHsv(b.h,g,20<b.v-50?b.v-50:b.v+30),new l.fromHsv(b.h,g,h),e,new l.fromHsv(b.h,g,m),new l.fromHsv(b.h,
g,n)])}},generate:function(e,b){if(t.isFunction(b))return b({base:e});if(l.Palette.generators[b])return l.Palette.generators[b]({base:e});throw Error("dojox.color.Palette.generate: the specified generator ('"+b+"') does not exist.");}});return l.Palette})},"esri/dijit/geoenrichment/ReportPlayer/playerSupports/_MapSupport":function(){define(["require","dojo/_base/declare","esri/dijit/geoenrichment/Deferred","esri/dijit/geoenrichment/when"],function(t,p,l,k){return p(null,{_initBuilderPromise:null,
_mapBuilder:null,_initMapBuilder:function(){var f=this;if(this._initBuilderPromise)return this._initBuilderPromise;var d=new l;t([f.isPlayerOnServer?"../core/supportClasses/map/ServerMapBuilder":"../core/supportClasses/map/MapBuilder"],function(c){f._mapBuilder=new c({getPlayerZoomScale:function(a){var e=f.getCurrentReportContainer();return e&&e.getPanelZoomScale?e.getPanelZoomScale(a):e&&e.getZoomInfo&&e.getZoomInfo().scale}});d.resolve()});return this._initBuilderPromise=d.promise},collectMaps:function(f){return this._mapBuilder?
f&&f.allAreas?this._mapBuilder.collectAllAreasMaps():this._mapBuilder.collectAreaMaps(this.getCurrentAnalysisAreaIndex()):[]},_resetMapBuilder:function(){this._mapBuilder&&this._mapBuilder.reset()},_createMap:function(f,d){d=d||{};return k(this._initMapBuilder(),function(){this._mapBuilder.setFallbackMapImageInfos(this._reportData.mapImageInfos);return this._mapBuilder.createMap(f,{reportData:this._reportData,areaIndex:d.areaIndex,defaultBasemapId:this._getDefaultBasemapId()||d.defaultBasemapId,defaultBasemapName:d.defaultBasemapName,
webMapId:d.webMapId,webMapName:d.webMapName,additionalLayerInfos:d.additionalLayerInfos,calculatorFieldName:d.calculatorFieldName,pinSymbolJson:d.pinSymbolJson,areaSymbolJsons:d.areaSymbolJsons,areaSymbolRamp:d.areaSymbolRamp,locatorPointsControllers:d.locatorPointsControllers,stdPolygonsControllers:d.stdPolygonsControllers,thisAreasHighlightController:d.thisAreasHighlightController,legendController:d.legendController,fieldData:this._viewModel.dynamicReportInfo.fieldData,geClient:this._viewModel.dynamicReportInfo.geClient,
countryID:this._viewModel.dynamicReportInfo.countryID,hierarchy:this._viewModel.dynamicReportInfo.hierarchy,waitForLoad:d.waitForLoad,extent:d.extent,attachmentsStore:this._viewModel.dynamicReportInfo.attachmentsStore,onPanContainer:function(c,a){}})}.bind(this))},_getDefaultBasemapId:function(){return null}})})},"esri/dijit/geoenrichment/ReportPlayer/playerSupports/_PageNavigationSupport":function(){define("dojo/_base/declare dojo/on dojo/dom-class dojo/dom-geometry dojo/dom-style ../PlayerResizeModes ../PlayerViewModes esri/dijit/geoenrichment/utils/DomUtil esri/dijit/geoenrichment/utils/TooltipUtil dojo/i18n!esri/nls/jsapi".split(" "),
function(t,p,l,k,f,d,c,a,e,b){b=b.geoenrichment.dijit.ReportPlayer.ReportPlayer;return t(null,{_currentPageIndex:null,_initPageNavigationControls:function(){var g=this;p(this.prevPageButton,"click",function(){g._showPrevPage()});p(this.nextPageButton,"click",function(){g._showNextPage()});a.hide(this.sidePageNavigator);e.setTooltipToNode(this.prevPageButton,b.previousPage);e.setTooltipToNode(this.nextPageButton,b.nextPage)},showPageAt:function(g){this.viewMode!==c.FULL_PAGES||this.isPlayerOnServer||
(g=Math.max(0,g),this._currentPageIndex=g=Math.min(this.getCurrentReportContainer().getNumberOfPages()-1,g),this.getCurrentReportContainer().showPageAt(g),this._updatePageNavigator())},_updatePageNavigator:function(){if(this.playerToolbar){var g=this.getCurrentReportContainer()&&this.getCurrentReportContainer().getNumberOfPages&&this.viewMode===c.FULL_PAGES;this.playerToolbar.setPageControlsVisible(g);if(g){g=this.getCurrentReportContainer().getNumberOfPages();var h=1<g;h&&this._provideSideNavigationNodes();
a.display(this.sidePageNavigator,h);h&&(l[0===this._currentPageIndex?"add":"remove"](this.prevPageButton,"disabled"),l[this._currentPageIndex===g-1?"add":"remove"](this.nextPageButton,"disabled"),this.resizeMode===d.FIT_WINDOW&&(h=k.position(this.getCurrentReportContainer().stackContainer),f.set(this.sidePageNavigator,"left",Math.min(h.x+h.w+20,document.body.clientWidth-70)+"px"),f.set(this.sidePageNavigator,"top",Math.max(60,h.y+10)+"px")));this.playerToolbar.updatePageSelect(g,this._currentPageIndex)}else a.hide(this.sidePageNavigator)}},
_provideSideNavigationNodes:function(){var g=this;this.sidePageNavigator||(this.sidePageNavigator=a.create("div",{"class":"reportPlayer_sidePageNavigator"},this.domNode),this.prevPageButton=a.create("div",{"class":"reportPlayer_paginationArrowUp"},this.sidePageNavigator),this.nextPageButton=a.create("div",{"class":"reportPlayer_paginationArrowDown"},this.sidePageNavigator),p(this.prevPageButton,"click",function(){g._showPrevPage()}),p(this.nextPageButton,"click",function(){g._showNextPage()}),e.setTooltipToNode(this.prevPageButton,
b.previousPage),e.setTooltipToNode(this.nextPageButton,b.nextPage))},_showPrevPage:function(){0!==this._currentPageIndex&&(this._currentPageIndex--,this.showPageAt(this._currentPageIndex))},_showNextPage:function(){this._currentPageIndex!==this.getCurrentReportContainer().getNumberOfPages()-1&&(this._currentPageIndex++,this.showPageAt(this._currentPageIndex))}})})},"esri/dijit/geoenrichment/ReportPlayer/PlayerResizeModes":function(){define([],function(){var t={AUTO:"auto",FIT_WINDOW:"fitWindow",MANUAL:"manual",
isSupported:function(p){for(var l in t)if(t[l]===p)return!0;return!1},toSupportedValue:function(p){return t.isSupported(p)?p:t.FIT_WINDOW}};return t})},"esri/dijit/geoenrichment/ReportPlayer/PlayerViewModes":function(){define([],function(){var t={FULL_PAGES:"fullPages",PANELS_IN_SLIDES:"panelsInSlides",PANELS_IN_STACK:"panelsInStack",PANELS_IN_STACK_ALL:"panelsInStackAll",isSupported:function(p){for(var l in t)if(t[l]===p)return!0;return!1},toSupportedValue:function(p){return t.isSupported(p)?p:t.FULL_PAGES},
isMobileSupported:function(p){return p===t.PANELS_IN_SLIDES||p===t.PANELS_IN_STACK||p===t.PANELS_IN_STACK_ALL},isStackLike:function(p){return p===t.PANELS_IN_STACK||p===t.PANELS_IN_STACK_ALL},isStack:function(p){return p===t.PANELS_IN_STACK||p===t.PANELS_IN_STACK_ALL}};return t})},"esri/dijit/geoenrichment/utils/DomUtil":function(){define("dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/query esri/dijit/geoenrichment/Deferred dojo/domReady!".split(" "),function(t,
p,l,k,f,d,c){function a(q,r){Array.isArray(q)?q.forEach(r):r(q);return q}function e(q,r,u){var v=!1,w=function(A){!A||u&&!u(A)||(A.parentNode===r?v=!0:w(A.parentNode))};w(q);return v}function b(q){return!h.isHidden(q)&&"none"!==f.get(q,"display")&&!p.contains(q,"dijitHidden")}function g(){m||(m=l.create("div",{"class":"esriGEOffscreen"},document.body));return m}var h={isHidden:function(q){return q&&p.contains(q,"esriGEHidden")},hasVisibleChildren:function(q){if(!q||!q.children.length)return!1;for(var r=
0;r<q.children.length;r++)if(!h.isHidden(q.children[r]))return!0;return!1},hide:function(q){return h.addTag(q,"esriGEHidden")},show:function(q){return h.removeTag(q,"esriGEHidden")},display:function(q,r){return h[r?"show":"hide"](q)},addTag:function(q,r){return a(q,function(u){u&&p.add(u,r)})},removeTag:function(q,r){return a(q,function(u){u&&p.remove(u,r)})},getChildIndex:function(q,r){if(!q||!q.children||!r)return-1;for(var u=0;u<q.children.length;u++)if(q.children[u]===r)return u;return-1},isChildOf:function(q,
r){return e(q,r)},isNodeInLayout:function(q){return e(q,document.body,function(r){return b(r)})},isNodeVisible:function(q){return e(q,document.body,function(r){return b(r)&&"hidden"!==f.get(r,"visibility")})},isNodeOnscreen:function(q){return e(q,document.body,function(r){return!p.contains(r,"esriGEOffscreen")})},enableContent:function(q,r,u){if(q){u=u||{};var v=q.children.length-1;if(!(0>v||(v=q.children[v],p.contains(v,"esriGEDisabledContent")||(v=null),v&&q.removeChild(v),r)))return v=l.create("div",
{"class":"esriGEDisabledContent"+(u.overlayClass?" "+u.overlayClass:"")},q),u.textContent&&(v.textContent=u.textContent),!1!==u.fitParent&&(q=k[u.marginBox?"getMarginBox":"getContentBox"](q).h)&&f.set(v,{height:q+"px",marginTop:-q+"px"}),v}},enableContentAbsolute:function(q,r,u){if(q){u=u||{};var v=f.get(q,"position");"relative"===v||"absolute"===v||r||f.set(q,"position","relative");return h.enableContent(q,r,{overlayClass:"esriGEAbsoluteStretched"+(u.overlayClass?" "+u.overlayClass:"")+(u.isTransparent?
" esriGEDisabledContentTransparent":""),fitParent:!1,textContent:u.textContent})}}},m;h.hideNodeInBackground=function(q,r){if(q){if(q._hideNodeInBackgroundUndoController)return q._hideNodeInBackgroundUndoController;var u=l.create("div",null,q,"after"),v=l.create("div",{style:"position: absolute; left: 0px; top: 0px;"},g());l.place(q,v);r="DomUtil.hideNodeInBackground"+(r?"."+r:"");t.set(u,"_bg_memo_node",r);t.set(v,"_bg_temp_node",r);r={remove:function(){u&&(u.parentNode&&l.place(q,u,"replace"),l.destroy(u),
l.destroy(v),m.children.length||(l.destroy(m),m=null),u=null,delete q._hideNodeInBackgroundUndoController)}};return q._hideNodeInBackgroundUndoController=r}};h.showNodeFromBackground=function(q){q&&q._hideNodeInBackgroundUndoController&&q._hideNodeInBackgroundUndoController.remove()};h.noTransformPosition=function(q){function r(A){for(var E={x:0,y:0};A.offsetParent;)E.x+=A.offsetLeft,E.y+=A.offsetTop,A=A.offsetParent,E.x+=f.get(A,"borderLeftWidth"),E.y+=f.get(A,"borderTopWidth");return E}function u(A){return f.get(A,
"width")+f.get(A,"paddingLeft")+f.get(A,"paddingRight")+f.get(A,"borderLeftWidth")+f.get(A,"borderRightWidth")}function v(A){return f.get(A,"height")+f.get(A,"paddingTop")+f.get(A,"paddingBottom")+f.get(A,"borderTopWidth")+f.get(A,"borderBottomWidth")}if(q){if(q instanceof SVGElement&&q.getBBox){var w=(w=q.ownerSVGElement&&q.ownerSVGElement.parentNode)&&r(w);q=q.getBBox();return{x:(q.x||0)+w.x,y:(q.y||0)+w.y,w:q.width||0,h:q.height||0}}w=r(q);return{x:w.x,y:w.y,w:u(q),h:v(q)}}};h.getNodesBox=function(q,
r){if(!q||!q.length)return null;r=r||{};for(var u=1E6,v=-1E6,w=1E6,A=-1E6,E=0;E<q.length;E++){var F=q[E];F=r.ignoreTransformation?h.noTransformPosition(F):k.position(F);u=Math.min(u,F.x);w=Math.min(w,F.y);v=Math.max(v,F.x+F.w);A=Math.max(A,F.y+F.h)}q={x:u,y:w,w:v-u,h:A-w};r.originNode&&(r=r.ignoreTransformation?h.noTransformPosition(r.originNode):k.position(r.originNode),q.x-=r.x,q.y-=r.y);return q};h.traverseChildren=function(q,r){function u(v){if(v&&v.children)for(var w=0;w<v.children.length;w++){var A=
v.children[w];if(r(A))break;u(A)}}u(q)};h.scrollToListNode=function(q,r,u){var v=r.offsetTop+r.clientHeight,w=v-(q.scrollTop+q.clientHeight);0<w&&(q.scrollTop+=w);u&&(v-=r.clientHeight-u.offsetTop,w=q.scrollTop-v,0<w&&(q.scrollTop-=w))};var n;h.getScrollbarSize=function(){if(!n){var q=l.create("div",null,document.body);q.style.width="100px";q.style.height="100px";q.style.overflow="scroll";q.style.position="absolute";q.style.top="9999px";n={w:q.offsetWidth-q.clientWidth,h:q.offsetHeight-q.clientHeight};
l.destroy(q)}return n};h.hasScrollbars=function(q){var r=f.getComputedStyle(q);return{w:"scroll"===r.overflowX||q.offsetWidth>q.clientWidth&&"auto"===r.overflowX,h:"scroll"===r.overflowY||q.offsetHeight>q.clientHeight&&"auto"===r.overflowY}};h.getMeasureContext=function(q){q=q||{};q.style=q.style?q.style+" ":"";q.style+="display: inline-block; position: absolute; left: 0; top: 0;";return{div:l.create("div",q,document.body),measureText:function(r){this.div.innerHTML=r;r=k.getMarginBox(this.div);delete r.l;
delete r.t;return r},destroy:function(){l.destroy(this.div)}}};h.getTextBox=function(q,r){r=h.getMeasureContext(r);q=r.measureText(q);r.destroy();return q};h.getNodeFontFamily=function(q){return(q=f.get(q,"fontFamily")||f.getComputedStyle(q).fontFamily)&&q.replace(/'|"/g,"").split(",")[0]};h.getNodeFontSize=function(q){return f.toPixelValue(q,f.get(q,"fontSize"))};h.stealFocus=function(){var q=new c;try{var r=l.create("input",{type:"text",style:"position: absolute; left: 0px; top: 0px;"});l.place(r,
document.body);r.select();l.destroy(r)}catch(u){}setTimeout(q.resolve,0);return q.promise};h.getWindowBox=function(){for(var q=[],r=0,u=document.body.children.length;r<u;r++){var v=document.body.children[r];h.isHidden(v)||(h.hide(v),q.push(v))}r={w:document.body.clientWidth,h:document.body.clientHeight};q.forEach(function(w){h.show(w)});return r};h.isBodyLtr=function(){return"ltr"===(document.body.dir||"ltr").toLowerCase()};h.setAttribute=function(q,r,u){return 2===arguments.length?t.set(q,r):t.set(q,
r,u)};h.getAttribute=function(q,r,u){return 2===arguments.length?t.get(q,r):t.get(q,r,u)};h.addClass=function(q,r){p.add(q,r)};h.removeClass=function(q,r){p.remove(q,r||"")};h.toggleClass=function(q,r,u){p[u?"add":"remove"](q,r||"")};h.replaceClass=function(q,r,u){return p.replace(q,r,u)};h.containsClass=function(q,r){return p.contains(q,r)};h.getStyle=function(q,r){return f.get(q,r)};h.setStyle=function(q,r,u){return 2===arguments.length?f.set(q,r):f.set(q,r,u)};h.getStylePixelValue=function(q,r){q=
h.getStyle(q,r);return"number"===typeof q?q:parseFloat(q)||0};h.getComputedStyle=function(q){return q&&1===q.nodeType&&window.getComputedStyle(q)};h.position=function(q,r){return k.position(q,r)};h.getMarginBox=function(q,r){return k.getMarginBox(q,r)};h.getMarginExtents=function(q,r){return k.getMarginExtents(q,r)};h.getContentBox=function(q,r){return k.getContentBox(q,r)};h.getPadBorderExtents=function(q,r){return k.getPadBorderExtents(q,r)};h.getPadExtents=function(q,r){return k.getPadExtents(q,
r)};h.getBorderExtents=function(q,r){return k.getBorderExtents(q,r)};h.docScroll=function(){return k.docScroll()};h.create=function(q,r,u,v){return l.create(q,r,u,v)};h.toDom=function(q){return l.toDom(q)};h.place=function(q,r,u){return l.place(q,r,u)};h.empty=function(q){return l.empty(q)};h.destroy=function(q){return l.destroy(q)};h.query=function(q,r){q=d(q,r);r=[];for(var u=0,v=q.length;u<v;u++)r.push(q[u]);return r};return h})},"esri/dijit/geoenrichment/utils/TooltipUtil":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/on dojo/mouse dojo/sniff dijit/Tooltip dijit/place dojox/gfx ./DeviceUtil ./DnDUtil ./DomUtil ./MouseUtil esri/dijit/geoenrichment/ReportPlayer/config dojo/domReady!".split(" "),
function(t,p,l,k,f,d,c,a,e,b,g,h,m,n,q,r,u){function v(){}var w={},A=t(b._MasterTooltip,{_customClasses:null,_customStyle:null,_orientKey:null,addCustomClasses:function(z){z&&(l.add(this.domNode,z),this._customClasses=z)},setCustomStyle:function(z){this._customStyle=z},show:function(z,H,G,I,L,N,O){if(!this.aroundNode||this.aroundNode!==H||this.containerNode.innerHTML!=z)if("playing"==this.fadeOut.status())this._onDeck=arguments;else{"string"===typeof z?this.containerNode.innerHTML=z:(this.containerNode.innerHTML=
"",k.place(z.domNode||z,this.containerNode));L&&this.set("textDir",L);this.containerNode.align=I?"right":"left";var S=g.around(this.domNode,H,G&&G.length?G:b.defaultPosition,!I,p.hitch(this,"orient")),R=S.aroundNodePos;"M"==S.corner.charAt(0)&&"M"==S.aroundCorner.charAt(0)?(this.connectorNode.style.top=R.y+(R.h-this.connectorNode.offsetHeight>>1)-S.y+"px",this.connectorNode.style.left=""):"M"==S.corner.charAt(1)&&"M"==S.aroundCorner.charAt(1)?this.connectorNode.style.left=R.x+(R.w-this.connectorNode.offsetWidth>>
1)-S.x+"px":(this.connectorNode.style.left="",this.connectorNode.style.top="");this._drawBackground();this.domNode.style.opacity="0";this.fadeIn.play();this.isShowingNow=!0;this.aroundNode=H;this.onMouseEnter=N||v;this.onMouseLeave=O||v}},orient:function(z,H,G,I,L){this.connectorNode.style.top="";var N=I.h;I=I.w;z.className="dijitTooltip "+{"MR-ML":"dijitTooltipRight","ML-MR":"dijitTooltipLeft","TM-BM":"dijitTooltipAbove","BM-TM":"dijitTooltipBelow","BL-TL":"dijitTooltipBelow dijitTooltipABLeft",
"TL-BL":"dijitTooltipAbove dijitTooltipABLeft","BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft"}[this._orientKey=H+"-"+G];this.addCustomClasses(this._customClasses);this.domNode.style.width="auto";var O=f.position(this.domNode);O.w=Math.ceil(O.w);if(e("ie")||e("trident"))O.w+=2;f.setMarginBox(this.domNode,{w:Math.min(Math.max(I,1),O.w)});"B"==G.charAt(0)&&"B"==H.charAt(0)?(z=f.position(z),H=this.connectorNode.offsetHeight,
z.h>N?(this.connectorNode.style.top=N-(L.h+H>>1)+"px",this.connectorNode.style.bottom=""):(this.connectorNode.style.bottom=Math.min(Math.max(L.h/2-H/2,0),z.h-H)+"px",this.connectorNode.style.top="")):(this.connectorNode.style.top="",this.connectorNode.style.bottom="");this._drawBackground();return Math.max(0,O.w-I)},_surface:null,_surfaceContainer:null,_drawBackground:function(){if(this._orientKey){var z=this.domNode.clientWidth,H=this.domNode.clientHeight,G=f.position(this.domNode),I=f.position(this.connectorNode),
L=f.position(this.containerNode);I.x-=G.x;I.y-=G.y;L.x-=G.x;L.y-=G.y;L.x+=1;L.y+=1;L.w-=2;L.h-=2;this._surface&&this._surface.destroy();this._surfaceContainer&&k.destroy(this._surfaceContainer);G=this._surfaceContainer=k.create("div",{"class":"esriGEAbsoluteStretched"},this.domNode,"first");G.style.pointerEvents="none";z=this._surface=h.createSurface(G,z,H);H=[{x:L.x,y:L.y},{x:L.x+L.w,y:L.y},{x:L.x+L.w,y:L.y+L.h},{x:L.x,y:L.y+L.h},{x:L.x,y:L.y}];G=I.x+I.w/2;I=I.y+I.h/2;switch(this._orientKey){case "BL-TL":case "BM-TM":case "BR-TR":L=
[{x:G-5,y:L.y},{x:G,y:I},{x:G+5,y:L.y}];H.splice.apply(H,[1,0].concat(L));break;case "ML-MR":case "BL-BR":L=[{x:L.x+L.w,y:I-5},{x:G,y:I},{x:L.x+L.w,y:I+5}];H.splice.apply(H,[2,0].concat(L));break;case "TM-BM":case "TL-BL":case "TR-BR":L=[{x:G+5,y:L.y+L.h},{x:G,y:I},{x:G-5,y:L.y+L.h}];H.splice.apply(H,[3,0].concat(L));break;case "MR-ML":case "BR-BL":L=[{x:L.x,y:I+5},{x:G,y:I},{x:L.x,y:I-5}],H.splice.apply(H,[4,0].concat(L))}L=z.createPolyline(H);I="function"===typeof this._customStyle?this._customStyle():
this._customStyle;L.setFill(I&&I.backgroundColor||"white").setStroke({color:"#d3d3d3",width:1,join:"round"});I&&I.color&&(this.containerNode.style.color=I.color)}}}),E={show:function(z,H,G,I,L){"string"===typeof G&&(G=[G]);G=G&&G.map(function(O){return{after:"after-centered",before:"before-centered"}[O]||O});var N=new A;L&&N.setCustomStyle(L);N.addCustomClasses(I);N.show(z,H,G);return N}};w.setTooltipToNode=function(z,H,G){function I(){!L&&w.showTooltipForNode(z,H,G)}G=G||{};if(z&&!u.isPlayerOnServer&&
(w.hideTooltipForNode(z),z.__setTooltipToNodeMouseEnterHandle&&z.__setTooltipToNodeMouseEnterHandle.remove(),H)){var L=!1;m.isMobileDevice()?z.__setTooltipToNodeMouseEnterHandle=n.addNoDragClickHandler(z,I):z.__setTooltipToNodeMouseEnterHandle=c(z,a.enter,I);G.showTooltip&&I();return{remove:function(){H=null;w.hideTooltipForNode(z)},suspend:function(){w.hideTooltipForNode(z);L=!0},resume:function(){L=!1},refresh:function(){z._shownTooltip&&I()}}}};w.showTooltipForNode=function(z,H,G){function I(){w.hideTooltipForNode(z);
var S=Array.isArray(G.classes)?G.classes.join(" "):G.classes;S=(S||"")+" esriGETooltip";G.notRestricted&&(S+=" notRestricted");z._shownTooltip=N=E.show(L,z,G.position||["after","before"],S,G.style)}G=G||{};if(z&&!u.isPlayerOnServer){z.title="";w.hideTooltipForNode(z);var L="function"==typeof H?H():H;if(L){"string"===typeof L&&G.textAlign&&(L="\x3cdiv class\x3d'"+("start"===G.textAlign?"esriGEStart":"end"===G.textAlign?"esriGEEnd":"")+"'\x3e"+L+"\x3c/div\x3e");l.add(z,"esriGESimpleTextTooltip");var N;
I();var O=w.hideTooltipForNode.bind(w,z);H=function(S,R){var U=setInterval(S,R);N.own({remove:function(){clearInterval(U)}})};m.isMobileDevice()?N.own(c(document.body,"touchstart",function(S){!r.isMouseOver(z,{event:S})&&O()})):N.own(c.once(z,a.leave,function(){!G.stayOnHover&&O()}));G.ignoreNodeRemoval||H(function(){!q.isNodeInLayout(z)&&O()},300);m.isMobileDevice()||(H(function(){G.stayOnHover&&r.isMouseOver(N.domNode)||r.isMouseOver(z)||O()},300),N.own(c(z,"click",function(S){G.hideOnClick?O():
!z._shownTooltip&&I()})),G.stayOnHover&&N.own(c(N.domNode,a.leave,O)));return z._shownTooltip}}};w.hideTooltipForNode=function(z){z&&z._shownTooltip&&(l.remove(z,"esriGESimpleTextTooltip"),z._shownTooltip.destroy(),delete z._shownTooltip)};var F,D;w.autoTooltip=function(z){u.isPlayerOnServer||c(z,".TrimWithEllipses:mouseover",function(){if(this!==F&&this.offsetWidth<this.scrollWidth){var H=function(){F=null;D&&(D.tooltip.destroy(),D.mouseOutH.remove(),D.mouseMoveH.remove(),D=null)};H();F=this;D={tooltip:E.show(F.textContent,
F,["above","below"]),mouseOutH:c.once(F,"mouseout, mousedown, touchstart",H),mouseMoveH:c(document.body,"mousemove",function(){r.isMouseOver(F)||H()})}}})};w.showClosableTooltip=function(z){var H="rtl"===document.dir&&"after"!==z.position||"rtl"!==document.dir&&"after"===z.position,G=B(z.message,z.tooltipClass,z.position,H);return y(G,z.node,z.timeout,H,z.onClosed)};w.removeClosableTooltip=function(z){z&&z._removeFunc&&z._removeFunc()};var B=function(z,H,G,I){function L(){var U=k.create("div",{"class":"esriGEClosableTooltipTip"},
O);l.add(U,I?"esriGEClosableTooltipTipRight":"esriGEClosableTooltipTipLeft")}function N(){S=k.create("div",{"class":"esriGEClosableTooltipBody"},O);k.create("div",{innerHTML:z,"class":"esriGEClosableTooltipLabel"},S);R=k.create("div",{"class":"esriGEClosableTooltipCloseButton"},S)}var O=k.create("div",{"class":"esriGEClosableTooltip esriGENonSelectable"+(H?" "+H:"")},document.body),S,R;"after"!==G?(N(),L()):(L(),N());O.style.position="fixed";return{tooltip:O,body:S,closeButton:R}},y=function(z,H,
G,I,L){function N(){var ea=f.position(H),Q=ea.x+";"+ea.y+";"+ea.w+";"+ea.h;Q!==O&&(O=Q,Q=f.getMarginBox(z.tooltip),d.set(z.tooltip,{left:(I?ea.x+ea.w:ea.x-Q.w)+"px",top:ea.y+ea.h/2-Q.h/2+"px"}))}var O;N();var S,R,U=function(){S&&clearTimeout(S);Z&&clearInterval(Z);da&&clearInterval(da);X&&X.remove();z.tooltip.parentNode&&z.tooltip.parentNode.removeChild(z.tooltip)};var Z=setInterval(function(){q.isNodeInLayout(H)&&H.parentNode||(R=!1,U());q.isNodeVisible(H)&&q.isNodeOnscreen(H)?(R=!0,q.show(z.tooltip)):
(R=!1,q.hide(z.tooltip))},0);var da=setInterval(function(){R&&N()},0);G&&(S=setTimeout(U,G));var X=c(z.closeButton,"click",function(){U();L&&L()});z.tooltip._removeFunc=U;return z.tooltip};w.showTooltipForNode(document.body,"Normal \x3cb\x3eBold\x3c/b\x3e \x3ci\x3eItalic\x3c/i\x3e",{});w.hideTooltipForNode(document.body);return w})},"esri/dijit/geoenrichment/utils/DnDUtil":function(){define(["dojo/on","dojo/sniff","./DeviceUtil","./KeyboardUtil"],function(t,p,l,k){var f={MOBILE_TOLERANCE:10,LONG_PRESS_TIMEOUT:500,
addNoDragClickHandler:function(d,c,a){a=a||{};return l.isMobileDevice()?f._addMobile(d,c,a):f._addPC(d,c,a)},_addPC:function(d,c,a){var e=a.tolerance||0,b,g,h=t(d,"mousedown",function(m){g&&g.remove();var n=m.clientX,q=m.clientY,r;b=t(document.body,"mousemove",function(u){if(!u.shiftKey&&!k.isCtrl(u)){var v=u.clientY;if(0<Math.abs(u.clientX-n)||0<Math.abs(v-q))r=!0}});g=t.once(document.body,"mouseup",function(u){b.remove();var v=u.clientX,w=u.clientY;!r&&Math.abs(v-n)<=e&&Math.abs(w-q)<=e&&c(u)})});
return{remove:function(){b&&b.remove();g&&g.remove();h&&h.remove()}}},_addMobile:function(d,c,a){function e(){g&&g.remove();h&&h.remove();m&&m.remove();clearTimeout(n)}var b=a.tolerance||f.MOBILE_TOLERANCE,g,h,m,n;var q=t(d,"touchstart",function(r){function u(A){return Math.abs(r.clientX-A.clientX)<b&&Math.abs(r.clientY-A.clientY)<b}e();var v;if(a.detectLongPress){var w;h=t(d,"touchmove",function(A){w=A});n=setTimeout(function(){u(w||r)&&(a.ignoreReleaseIfLongPressHappened&&(v=!0),a.longPressCallback(r))},
a.longPressTimeout||f.LONG_PRESS_TIMEOUT)}g=t.once(d,"touchend",function(A){!v&&u(A)&&c(A);e()});m=t.once(d,"touchcancel",e)});return{remove:function(){q&&q.remove();e()}}},addGlobalDragHanlder:function(d){function c(){a&&a.remove();e&&e.remove();b&&b.remove();g&&g.remove();h&&d.destroyDnDBox&&d.destroyDnDBox(h)}d.tolerance=0<d.tolerance?d.tolerance:5;var a,e,b,g,h;return t(d.node,d.downEventName||l.press,function(m){c();if(!d.onMouseDown||d.onMouseDown(m)){var n=m.clientX,q=m.clientY,r=n,u=q;a=t(document.body,
l.move,function(v){function w(){c();d.dragEnded&&d.dragEnded()}v.shiftKey||k.isCtrl(v)||!(Math.abs(n-v.clientX)>=d.tolerance||Math.abs(q-v.clientY)>=d.tolerance)||(a.remove(),d.dragStarted&&!d.dragStarted(v,v.clientX-r,v.clientY-u))||(r=v.clientX,u=v.clientY,h=d.createDnDBox&&d.createDnDBox(),e=t(document.body,l.move,function(A){d.dragMoved&&d.dragMoved(A,A.clientX-r,A.clientY-u,w);r=A.clientX;u=A.clientY}),b=t.once(document.body,p("ie")||p("trident")?"mouseup, touchend, click":"mouseup, touchend",
function(){w()}),g=t(document.body,"keyup",function(A){27==A.keyCode&&(c(),d.dragCanceled&&d.dragCanceled())}))});t.once(document.body,p("ie")||p("trident")?"mouseup, touchend, click":"mouseup, touchend",function(){a.remove()})}})}};return f})},"esri/dijit/geoenrichment/utils/KeyboardUtil":function(){define(["dojo/on","dojo/sniff","./DomUtil"],function(t,p,l){var k={listenToKeyboardCombinationOverNode:function(f){return t(document.body,"keydown",function(d){if(!f.isCtrl||k.isCtrl(d))if(!f.isShift||
d.shiftKey)if(!f.isAlt||d.altKey)String.fromCharCode(d.keyCode).toLowerCase()!==f["char"]||f.node&&!l.isNodeInLayout(f.node)||f.callback(d)})},isCtrl:function(f){return p("mac")?f.metaKey:f.ctrlKey}};return k})},"esri/dijit/geoenrichment/utils/MouseUtil":function(){define("dojo/_base/lang dojo/on dojo/sniff dojo/touch dojo/dom-geometry ./DomUtil dojo/domReady!".split(" "),function(t,p,l,k,f,d){var c={_latestEvent:null,_setLatestEvent:function(g){c._latestEvent=g},_getLatestEvent:function(){return c._latestEvent}};
l("touch")?(p(document.body,k.press,function(g){c._setLatestEvent(b(g))}),p(document.body,k.move,function(g){c._setLatestEvent(b(g))})):p(document.body,"mousemove",function(g){c._setLatestEvent(b(g))});var a;p(document.body,"mousedown",function(){a||(a=!0,p.once(document.body,"mouseup, click",function(){a=!1}))});c.getCursorPosition=function(){return c._latestEvent};c.isMouseOver=function(g,h){var m=h&&h.event||c._latestEvent;if(!(g&&g.parentNode&&g.getBoundingClientRect&&m))return!1;if(h&&h.checkAllChildren){h=
t.mixin({},h);delete h.checkAllChildren;var n=!1;d.traverseChildren(g,function(q){if(c.isMouseOver(q,h))return n=!0});return n}return c.isMouseOverBox(f.position(g),h)};c.isMouseOverBox=function(g,h){if(!g)return!1;var m=h&&h.event||c._latestEvent;h&&h.ignoreBorderTolerance&&(h=h.ignoreBorderTolerance,g=t.mixin({},g),g.x+=h,g.y+=h,g.w-=2*h,g.h-=2*h);return g.x<=m.clientX&&g.x+g.w>=m.clientX&&g.y<=m.clientY&&g.y+g.h>=m.clientY};var e=function(g){if(g.touches){if(!g.touches.length)return g.changedTouches[0];
for(var h=g.touches[0].identifier,m,n=0;n<g.changedTouches.length;n++)if(g.changedTouches[n].identifier===h){m=g.changedTouches[n];break}return m||g.touches[0]}},b=function(g){var h=e(g);h&&(h.type=g.type);return h||g};c.fixTouchEvent=function(g){var h=e(g);h&&(g.screenX=h.screenX,g.screenY=h.screenY,g.clientX=h.clientX,g.clientY=h.clientY,g.pageX=h.pageX,g.pageY=h.pageY);return g};c.isBeingDragged=function(){return a};c.addOverOutHandler=function(g){function h(){clearTimeout(n);m&&m.remove()}var m,
n,q=p(g.node,"mouseover",function(r){function u(){c.isMouseOver(g.node)&&(g.onMouseOver(r),m=p(document.body,"mousemove",function(v){c.isMouseOver(g.node)||(h(),g.onMouseOut(v))}))}h();g.delayTimeout?n=setTimeout(u,g.delayTimeout):u()});return{remove:function(){q.remove();h()}}};c.addOutHandler=function(g,h){return p(document.body,"mousemove",function(m){c.isMouseOver(g,{checkAllChildren:!0})||h(m)})};return c})},"esri/dijit/geoenrichment/ReportPlayer/playerSupports/_PrintSupport":function(){define(["require",
"dojo/_base/declare","esri/dijit/geoenrichment/Deferred","esri/dijit/geoenrichment/when","../ReportPlayerState"],function(t,p,l,k,f){function d(){var c=new l;t(["../printing/PrintableContainer"],function(a){c.resolve(a)});return c.promise}return p(null,{_getPrintableContainer:function(c){var a=this;f.isAnimationSuspended=!0;return a._showWaiting(d(),"loadPrintModules").then(function(e){var b=new e(a,a._viewModel);c.onShowWaiting=function(g){a._showWaiting(g,"initPrintContainer")};return k(b.initialize(c),
function(g){f.isAnimationSuspended=!1;return g?g:k(b.stop(),function(){return null})})})},_getPrintDialogSettings:function(){var c=this;return d().then(function(a){return(new a(c,c._viewModel)).getPrintDialogSettings()})}})})},"esri/dijit/geoenrichment/ReportPlayer/ReportPlayerState":function(){define([],function(){return{isImageViewerShown:!1,isViewingDataDrillingZoom:!1,isViewingDynamicSettings:!1,isAnimationSuspended:!1}})},"esri/dijit/geoenrichment/ReportPlayer/playerSupports/_ReportContainersSwitcher":function(){define("dojo/_base/declare dojo/dom-attr dojo/dom-class dojo/dom-construct ../PlayerViewModes esri/dijit/geoenrichment/utils/DomUtil".split(" "),
function(t,p,l,k,f,d){var c={createContainer:function(b,g){var h=b.getCurrentAnalysisAreaIndex();b.viewMode===f.PANELS_IN_STACK_ALL&&(h=0);var m=g.getContainer(h);if(!m){switch(b.viewMode){case f.PANELS_IN_SLIDES:m=this._createPaginationReportContainer(b);break;case f.PANELS_IN_STACK:m=this._createStackReportContainer(b);break;case f.PANELS_IN_STACK_ALL:m=this._createStackReportContainerAll(b);break;default:m=this._createFullPageReportContainer(b)}m.isCurrentContainer=function(){return b.getCurrentReportContainer()===
m}}g.setContainer(m,h);return m},_createPaginationReportContainer:function(b){var g=b._viewModel;return g.layoutBuilder.createElement("reportContainerPagination",{viewModel:g,parentWidget:b,currentFeatureIndex:b.getCurrentAnalysisAreaIndex(),scaleSectionsToFit:b.scaleSlidesToFitWindow,onResized:function(h){b.playerToolbar.update();b._emitResizedEvent(h)},onPendingDataApplied:function(){b._emitResizedEvent()}},b.reportContainerDiv)},_createStackReportContainer:function(b){var g=b._viewModel,h={center:!0,
minRight:10,minBottom:10,minLeft:10,minTop:b.showToolbarInPopup?43:10};return g.layoutBuilder.createElement("reportContainerStack",{viewModel:g,parentWidget:b,currentFeatureIndex:b.getCurrentAnalysisAreaIndex(),isVertical:!0,renderOptions:h,onPendingDataApplied:function(){b._emitResizedEvent()}},b.reportContainerDiv)},_createStackReportContainerAll:function(b){var g=b._viewModel;return g.layoutBuilder.createElement("reportContainerStackAll",{viewModel:g,parentWidget:b,isVertical:!0,renderOptions:{center:!0,
minRight:10,minBottom:10,minLeft:10,minTop:b.showToolbarInPopup?43:0},comparisonSettings:b.comparisonSettings,onPendingDataApplied:function(){b._emitResizedEvent()},onSwitchToSingleAreaView:function(){b.showAnalysisAreaAt(0)}},b.reportContainerDiv)},_createFullPageReportContainer:function(b){var g=b._viewModel,h={viewModel:g,parentWidget:b,currentFeatureIndex:b.getCurrentAnalysisAreaIndex(),onPendingDataApplied:function(){b._emitResizedEvent()}};h.renderOptions={center:!0,minRight:10,minBottom:10,
minLeft:10,minTop:b.showToolbarInPopup?43:10};return g.layoutBuilder.createElement(b.getReportData().reportObject.isGraphicReport?"reportContainerGrid":"reportContainer",h,b.reportContainerDiv)}},a=t(null,{_containerInfos:null,constructor:function(){this._containerInfos=[]},getContainer:function(b){return this._getInfo(b,"container")},getContainers:function(){return this._containerInfos.map(function(b){return b.container})},getContainerIndex:function(b){return this.getContainers().indexOf(b)},setContainer:function(b,
g){p.set(b.domNode,"area-index",g);this._getInfo(g,null,b)},isLoaded:function(b){return this._getInfo(b,"loaded")},setLoaded:function(b){if(b=this._getInfo(b))b.loaded=!0},resetAllLoaded:function(){this._containerInfos.forEach(function(b){b.loaded=!1})},destroyAllContainers:function(){this._containerInfos.forEach(function(b){b.container.destroy()});this._containerInfos.length=0},_getInfo:function(b,g,h){var m=this._containerInfos[b];!m&&h&&(m=this._containerInfos[b]={container:h,loaded:!1});return g?
m&&m[g]:m}}),e=t(null,{_lastVisuals:null,reset:function(){this._lastVisuals=null},rememberCurrentContainerVisuals:function(b){this._lastVisuals=b?{scrollTop:b.getScrollableContainer&&b.getScrollableContainer().scrollTop||0,pageIndex:b.getCurrentPageIndex&&b.getCurrentPageIndex()||0,slideIndex:b.getCurrentSlideIndex&&b.getCurrentSlideIndex()||0,zoomInfo:b.getZoomInfo&&b.getZoomInfo()}:null},applyCurrentContainerVisuals:function(b){this._lastVisuals&&(b.getScrollableContainer&&(b.getScrollableContainer().scrollTop=
this._lastVisuals.scrollTop||0),b.showSlideAt&&b.showSlideAt(this._lastVisuals.slideIndex||0),b.showPageAt?b.showPageAt(this._lastVisuals.pageIndex||0):b.notifyShown(),b.setZoomInfo&&b.setZoomInfo(this._lastVisuals.zoomInfo))}});return t(null,{_containerDict:null,_visualsHelper:null,_initContainerSwither:function(){this._containerDict=new a;this._visualsHelper=new e},getCurrentReportContainer:function(){return this._currentReportContainer},getAllReportContainers:function(){return this._containerDict.getContainers()},
_destroyAllContainers:function(){this._containerDict.destroyAllContainers();this._currentReportContainer=null},_setReportContainer:function(b){b?this._resetLoadedFlags():this._visualsHelper.rememberCurrentContainerVisuals(this._currentReportContainer);this._switchToCurrentReportContainer();return!b&&this._containerDict.isLoaded(this.getCurrentAnalysisAreaIndex())?(this._resize({isPaginating:!0}),this._visualsHelper.applyCurrentContainerVisuals(this._currentReportContainer),!1):!0},_switchToCurrentReportContainer:function(){this._currentReportContainer&&
this._hideContainer(this._currentReportContainer);this._currentReportContainer=c.createContainer(this,this._containerDict);l.remove(this.domNode,"esriGEReportPlayerFullView esriGEReportPlayerPaginationView esriGEReportPlayerStackView");switch(this.viewMode){case f.PANELS_IN_SLIDES:l.add(this.domNode,"esriGEReportPlayerPaginationView");break;case f.PANELS_IN_STACK:l.add(this.domNode,"esriGEReportPlayerStackView");break;case f.PANELS_IN_STACK_ALL:l.add(this.domNode,"esriGEReportPlayerStackAllView");
break;default:l.add(this.domNode,"esriGEReportPlayerFullView")}this._showContainer(this._currentReportContainer);this._connectZoomToCurrentContainer();this.notifyShown()},_hideContainer:function(b){this.isPlayerOnServer||(b.__undoHideContainerHandle=d.hideNodeInBackground(b.domNode,"reportContainer_"+this._containerDict.getContainerIndex(b)),b.own(b.__undoHideContainerHandle))},_showContainer:function(b){!this.isPlayerOnServer&&b.__undoHideContainerHandle&&(b.__undoHideContainerHandle.remove(),delete b.__undoHideContainerHandle)},
_showAllContainers:function(){var b=this;this.getAllReportContainers().forEach(function(g){b._showContainer(g);b.reportContainerDiv.removeChild(g.domNode);k.place(g.domNode,b.reportContainerDiv)});return{undo:function(){b.getAllReportContainers().forEach(function(g){b._hideContainer(g)});b._switchToCurrentReportContainer()}}},_resetLoadedFlags:function(){this._visualsHelper.reset();this._containerDict.resetAllLoaded()},_setCurrentContainerLoaded:function(){this._visualsHelper.applyCurrentContainerVisuals(this._currentReportContainer);
this._containerDict.setLoaded(this.getCurrentAnalysisAreaIndex())}})})},"esri/dijit/geoenrichment/ReportPlayer/playerSupports/_SmartLayoutSupport":function(){define("dojo/_base/declare dojo/dom-class dojo/on esri/dijit/geoenrichment/utils/DeviceUtil esri/dijit/geoenrichment/utils/DomUtil ../PlayerResizeModes ../PlayerViewModes".split(" "),function(t,p,l,k,f,d,c){return t(null,{_width:0,_height:0,_measuredWinBox:null,_initSmartLayout:function(){var a=this;this.resizeMode===d.FIT_WINDOW&&this.own(l(window,
"resize, orientationchange",function(){setTimeout(function(){a._measuredWinBox=null;a.resize()})}));this._resize()},_resize:function(a){a=a||{};p.remove(this.domNode,"esriGEReportPlayerFullScreen esriGEReportPlayerAutoResize esriGEReportPlayerManualResize");switch(this.resizeMode){case d.FIT_WINDOW:return this._resize_fitWindow(a);case d.AUTO:return this._resize_auto(a);case d.MANUAL:return this._resize_manual(a)}},_resize_fitWindow:function(a){this._measuredWinBox=this._measuredWinBox||f.getWindowBox();
this._width=this._maxWidth=this._measuredWinBox.w;this._height=this._maxHeight=this._measuredWinBox.h;p.add(this.domNode,"esriGEReportPlayerFullScreen");this.domNode.style.width=this._width+"px";this.domNode.style.height=this._height+"px";this._currentReportContainer&&(this._currentReportContainer.setMaxWidth&&this._currentReportContainer.setMaxWidth(this._maxWidth),this._currentReportContainer.setMaxHeight&&this._currentReportContainer.setMaxHeight(this._maxHeight-this._getToolbarHeight()),this._currentReportContainer.resize(this._width,
this._height-this._getToolbarHeight()),this._emitResizedEvent(a.isPaginating))},_resize_auto:function(a){this._height=this._width=0;p.add(this.domNode,"esriGEReportPlayerAutoResize");this.domNode.style.width="auto";this.domNode.style.height="auto";this._currentReportContainer&&(this._currentReportContainer.setMaxWidth&&this._currentReportContainer.setMaxWidth(this._maxWidth),this._currentReportContainer.setMaxHeight&&this._currentReportContainer.setMaxHeight(this._maxHeight-this._getToolbarHeight()),
this._currentReportContainer.resize(0,0),this._emitResizedEvent(a.isPaginating))},_resize_manual:function(a){this._width=void 0!==a.width?a.width:this._width;this._height=void 0!==a.height?a.height:this._height;this._width&&this._height&&(this._maxWidth&&(this._width=Math.min(this._maxWidth,this._width)),this._maxHeight&&(this._height=Math.min(this._maxHeight,this._height)),p.add(this.domNode,"esriGEReportPlayerManualResize"),this.domNode.style.width=this._width+"px",this.domNode.style.height=this._height+
"px",this._currentReportContainer&&(this._currentReportContainer.setMaxWidth&&this._currentReportContainer.setMaxWidth(this._maxWidth||this._width),this._currentReportContainer.setMaxHeight&&this._currentReportContainer.setMaxHeight((this._maxHeight||this._height)-this._getToolbarHeight()),this._currentReportContainer.resize(this._width,this._height-this._getToolbarHeight()),this._emitResizedEvent(a.isPaginating)))},_getToolbarHeight:function(){if(this.showToolbarInPopup)return 0;var a=this.playerToolbar&&
0===this.playerToolbar.toolbarHolder.infographicsSelectDiv.children.length,e=!this.showAreaTitle,b=this._reportData&&(this._reportData.isMultiFeature||1===this._reportData.analysisAreas.length),g=this.viewMode===c.PANELS_IN_SLIDES,h=k.isMobileDevice();return a&&e&&b&&g&&h?0:50},_maxWidth:0,_maxHeight:0,setMaxWidth:function(a){this._maxWidth=a},setMaxHeight:function(a){this._maxHeight=a}})})},"esri/dijit/geoenrichment/ReportPlayer/playerSupports/_ZoomSupport":function(){define(["dojo/_base/declare",
"dojo/aspect","../PlayerResizeModes","../PlayerViewModes","../PlayerZoomBehaviors"],function(t,p,l,k,f){return t(null,{_initZoomControls:function(){var d=this;this.playerToolbar.onZoomToFitPage=function(){d.getCurrentReportContainer().zoomToFitPage({showAnimation:!0})};this.playerToolbar.onZoomToFitPageWidth=function(){d.getCurrentReportContainer().zoomToFitPageWidth({showAnimation:!0})};this.playerToolbar.onZoomToFitPageHeight=function(){d.getCurrentReportContainer().zoomToFitPageHeight({showAnimation:!0})};
this.playerToolbar.onSetZoomPercent=function(c){d.getCurrentReportContainer().setZoomPercent(c,{showAnimation:!0})};this._refreshZoomControls()},_refreshZoomControls:function(){this.playerToolbar&&this.playerToolbar.setZoomSupportsInfo(this._getZoomSupportsInfo())},setBestZoom:function(){this._callZoomMethod("setBestZoom")},zoomToFitPage:function(){this._callZoomMethod("zoomToFitPage")},zoomToFitPageWidth:function(){this._callZoomMethod("zoomToFitPageWidth")},zoomToFitPageHeight:function(){this._callZoomMethod("zoomToFitPageHeight")},
resetZoom:function(){this._callZoomMethod("resetZoom")},_callZoomMethod:function(d){if(this._getZoomSupportsInfo().supported){var c=this.getCurrentReportContainer();c&&c[d]&&c[d]()}},_getZoomSupportsInfo:function(){var d={supported:!1,canFitPage:!1,canFitPageWidth:!1,canFitPageHeight:!1};this.viewMode!==k.PANELS_IN_SLIDES&&(d.supported=!0,this.resizeMode!==l.AUTO&&(d.canFitPage=!k.isStackLike(this.viewMode),d.canFitPageWidth=!0,d.canFitPageHeight=!1));return d},_updateZoomControls:function(){this._connectZoomToCurrentContainer();
this._applyDefaultZoomBehavior()},_reportContainerZoomChangedHandle:null,_connectZoomToCurrentContainer:function(){var d=this.getCurrentReportContainer();this._reportContainerZoomChangedHandle&&this._reportContainerZoomChangedHandle.remove();this._reportContainerZoomChangedHandle=d&&p.after(d,"onZoomChanged",function(){if(this.playerToolbar){var c=this.getCurrentReportContainer();c&&c.getZoomInfo&&this.playerToolbar.setZoomInfo(this.getCurrentReportContainer().getZoomInfo());this._updatePageNavigator();
this.playerToolbar.update()}}.bind(this));d&&d.own(this._reportContainerZoomChangedHandle)},_applyDefaultZoomBehavior:function(){var d=this._getZoomSupportsInfo();d.supported&&d.canFitPage&&this.defaultZoomBehavior===f.FIT_PAGE?this.zoomToFitPage():d.supported&&d.canFitPageWidth&&this.defaultZoomBehavior===f.FIT_PAGE_WIDTH?this.zoomToFitPageWidth():d.supported&&d.canFitPageHeight&&this.defaultZoomBehavior===f.FIT_PAGE_HEIGHT?this.zoomToFitPageHeight():this.resetZoom()}})})},"esri/dijit/geoenrichment/ReportPlayer/PlayerZoomBehaviors":function(){define([],
function(){var t={RESET:"reset",FIT_PAGE:"fitPage",FIT_PAGE_WIDTH:"fitPageWidth",FIT_PAGE_HEIGHT:"fitPageHeight",isSupported:function(p){for(var l in t)if(t[l]===p)return!0;return!1},toSupportedValue:function(p){return t.isSupported(p)?p:t.RESET}};return t})},"esri/dijit/geoenrichment/ReportPlayer/playerSupports/_WaitingSupport":function(){define("dojo/_base/declare dojo/_base/lang esri/dijit/geoenrichment/when dojo/dom-class dojo/dom-construct ../PlayerResizeModes esri/dijit/geoenrichment/utils/DelayUtil esri/dijit/geoenrichment/utils/DomUtil esri/dijit/geoenrichment/utils/WaitingUtil esri/dijit/geoenrichment/utils/progress/SmoothProgress".split(" "),
function(t,p,l,k,f,d,c,a,e,b){var g=t(null,{_dataProgress:0,_areaProgresses:null,_numAreas:0,constructor:function(h){p.mixin(this,h);this.reset()},reset:function(){this._dataProgress=0;this._areaProgresses={};this._fireProgress()},setLoadDataProgress:function(h){this._dataProgress=h;this._fireProgress()},setNumAreas:function(h){this._numAreas=h},setProgressForAreaAt:function(h,m){this._areaProgresses[m]=h;this._fireProgress()},finalize:function(){this.onChange(1);return c.delay(300)},_fireProgress:function(){var h=
.25*this._dataProgress,m=.75/this._numAreas,n;for(n in this._areaProgresses)h+=m*(this._areaProgresses[n]||0);h=Math.min(.999999,Math.max(0,h));this.onChange(h);this._printProgress()},_printProgress:function(){},onChange:function(h){}});return t(null,{_progressController:null,_initProgressController:function(){var h=this;this.showProgressBar&&(this._progressController=new g,(new b(this._progressController)).onChange=function(m){e.showProgressBar({value:m,node:h.domNode,position:"top"})})},_waitingCount:0,
_hideUndoHandle:null,_waitNode:null,getWaitingPromise:function(){return e.getProgressPromiseForNode(this._waitNode||this.domNode)},_showWaiting:function(h,m){var n=this;if(this.isPlayerOnServer)return h;this.onWaitingShown(h);return this.resizeMode!==d.FIT_WINDOW?(0===this._waitingCount++&&(this._updateElementsVisibility(),this._waitNode=f.create("div",{"class":"esriGEReportPlayerWaitingNode"},this.domNode.parentNode),this._waitNode.style.width=this.domNode.clientWidth?this.domNode.clientWidth+"px":
"",this._waitNode.style.height=this.domNode.clientHeight?this.domNode.clientHeight+"px":"",this._waitNode.style.position="relative",this._hideUndoHandle=a.hideNodeInBackground(this.domNode)),l(h)["finally"](function(){0===--n._waitingCount&&(n._hideUndoHandle.remove(),n._hideUndoHandle=null,f.destroy(n._waitNode),n._updateElementsVisibility())}),e.showProgressPromise(this._waitNode,h,{progressClass:"esriGEReportPlayerProgress"})):this._showWaitingFullScreen(h,m)},_showWaitingFullScreen:function(h,
m){return e.showProgressPromise(this.domNode,h,{progressClass:"esriGEReportPlayerProgress",onShowProgress:function(){this._waitingCount++;this._updateElementsVisibility()}.bind(this),onRemoveProgress:function(){if(this.domNode){this._waitingCount--;this._updateElementsVisibility();var n=this.getCurrentReportContainer();n&&!n.__isBeingAnimated&&(n.__isBeingAnimated=!0,n.domNode&&k.add(n.domNode,"esriGEReportPlayer_fadeIn1000"),n.notifyShown(),c.delay(1500).then(function(){n.__isBeingAnimated=!1;n.domNode&&
k.remove(n.domNode,"esriGEReportPlayer_fadeIn1000")}))}}.bind(this)})},onWaitingShown:function(h){}})})},"esri/dijit/geoenrichment/utils/DelayUtil":function(){define(["esri/dijit/geoenrichment/Deferred","esri/dijit/geoenrichment/when"],function(t,p){return{delay:function(l,k,f){var d=new t;k="number"===typeof l?l:k;var c="function"===typeof l?l:null,a=f&&c&&c();setTimeout(function(){p(f?a:c&&c()).then(d.resolve,d.reject)},k||0);return d.promise}}})},"esri/dijit/geoenrichment/utils/WaitingUtil":function(){define("esri/dijit/geoenrichment/Deferred esri/dijit/geoenrichment/when dojo/dom-construct dojo/dom-geometry dojo/dom-style esri/dijit/geoenrichment/ReportPlayer/config".split(" "),
function(t,p,l,k,f,d){var c={showProgress:function(a,e){d.isPlayerOnServer||a&&!a["esri.dijit.geoenrichment.util.WaitingUtil.waitingDiv"]&&(a["esri.dijit.geoenrichment.util.WaitingUtil.waitingDiv"]=l.create("div",{"class":"esriGEProgress esriGEProgressAbsolute "+(e||"")},a))},removeProgress:function(a){a&&a["esri.dijit.geoenrichment.util.WaitingUtil.waitingDiv"]&&(l.destroy(a["esri.dijit.geoenrichment.util.WaitingUtil.waitingDiv"]),delete a["esri.dijit.geoenrichment.util.WaitingUtil.waitingDiv"])},
showProgressBar:function(a){var e=a.node;if(e){e._progressBar&&l.destroy(e._progressBar);delete e._progressBar;var b=Number(a.value);0>=b||isNaN(b)||(b=Math.min(b,1),e._progressBar=l.create("div",{"class":"esriGEWaitingMessageProgressBar esriGEWaitingMessageProgressBar_"+(a.position||"bottom")},e),f.set(e._progressBar,"width",k.position(e).w*b+"px"))}},showProgressPromise:function(a,e,b){if(!a)return e;b=b||{};void 0===a.__progressIndex&&(a.__progressIndex=0);0===a.__progressIndex&&(a.__progressDfd=
new t,c.showProgress(a,b.progressClass),b.onShowProgress&&b.onShowProgress());a.__progressIndex++;p(e)["finally"](function(){a.__progressIndex=Math.max(0,--a.__progressIndex);0===a.__progressIndex&&(a.__progressDfd&&a.__progressDfd.resolve(),delete a.__progressDfd,c.removeProgress(a),b.onRemoveProgress&&b.onRemoveProgress())});return e},getProgressPromiseForNode:function(a){return a&&a.__progressDfd&&a.__progressDfd.promise}};return c})},"esri/dijit/geoenrichment/utils/progress/SmoothProgress":function(){define(["dojo/_base/declare",
"dojo/aspect"],function(t,p){return t(null,{elasticTime:1E3,fireInterval:30,_intervalHandle:null,_progressHandle:null,_realProgress:0,_smoothProgress:0,_runAheadSpeed:2.5E-4,_currentSpeed:0,constructor:function(l){0<l.fireInterval&&(this.fireInterval=l.fireInterval);0<l.elasticTime&&(this.elasticTime=l.elasticTime);0<l.timeEstimate&&(this._runAheadSpeed=Math.min(this.fireInterval/l.timeEstimate,.5));var k=this;this._progressHandle=p.after(l,"onChange",function(f){1<=f?k._finalize():k._updateProgress(f)},
!0)},start:function(){this._updateProgress(0,!0)},_updateProgress:function(l,k){this._realProgress=Math.max(l,0);if(0===this._realProgress&&(this._smoothProgress=0,this._setIntervalHandle(!1),this.onChange(0),!k))return;this._setIntervalHandle(!0);this._currentSpeed=this._smoothProgress>=this._realProgress?this._runAheadSpeed:(this._realProgress-this._smoothProgress)*this.fireInterval/this.elasticTime},_setIntervalHandle:function(l){l!==!!this._intervalHandle&&(l?this._intervalHandle=setInterval(this._tryFireProgress.bind(this),
this.fireInterval):(clearInterval(this._intervalHandle),this._intervalHandle=null))},_tryFireProgress:function(){0!==this._currentSpeed&&(this._smoothProgress+=this._currentSpeed,this._smoothProgress=Math.min(1-this._runAheadSpeed,this._smoothProgress),this._smoothProgress>=this._realProgress&&(this._currentSpeed=this._runAheadSpeed),this.onChange(this._smoothProgress))},_finalize:function(){this._smoothProgress=this._realProgress=1;this.onChange(1)},onChange:function(l){},destroy:function(){this._progressHandle.remove();
this._setIntervalHandle(!1)}})})},"esri/dijit/geoenrichment/ReportPlayer/supportClasses/PlayerConfigurator":function(){define("../PlayerResizeModes ../PlayerZoomBehaviors ../PlayerThemes ../PlayerViewModes ../config esri/dijit/geoenrichment/utils/DeviceUtil".split(" "),function(t,p,l,k,f,d){var c={configurePlayer:function(a,e){a._originalConfigurationSettings||(a.theme=a.theme&&l.toSupportedValue(a.theme)||l.DARK,a.viewMode=a.viewMode&&k.toSupportedValue(a.viewMode),a.resizeMode=a.resizeMode&&t.toSupportedValue(a.resizeMode)||
t.FIT_WINDOW,a.defaultZoomBehavior=a.defaultZoomBehavior&&p.toSupportedValue(a.defaultZoomBehavior),a._originalConfigurationSettings={viewMode:a.viewMode,defaultZoomBehavior:a.defaultZoomBehavior,scaleSlidesToFitWindow:a.scaleSlidesToFitWindow,showAreaTitle:a.showAreaTitle});a.viewMode=e||a._originalConfigurationSettings.viewMode||c.getDefaultViewMode(a);switch(a.viewMode){case k.FULL_PAGES:c._configure_fullPages(a);break;case k.PANELS_IN_SLIDES:c._configure_panelsInSlides(a);break;case k.PANELS_IN_STACK:c._configure_panelsInStack(a);
break;case k.PANELS_IN_STACK_ALL:c._configure_panelsInStackAll(a)}a._viewModel.setAnimationSuspended(a.viewMode===k.PANELS_IN_STACK_ALL);d.isMobileDevice()&&(f.modules.exportCommands=!1);f.modules.complexCellTooltips=a.viewMode===k.FULL_PAGES||a.viewMode===k.PANELS_IN_STACK_ALL},getDefaultViewMode:function(a){return d.isMobileDevice()&&!d.isWebLayout()?d.isLandscape()?k.PANELS_IN_SLIDES:k.PANELS_IN_STACK:k.FULL_PAGES},_configure_fullPages:function(a){a.showAreaTitle=!1!==a._originalConfigurationSettings.showAreaTitle;
a.scaleSlidesToFitWindow=!1;switch(a.resizeMode){case t.FIT_WINDOW:a.defaultZoomBehavior=a._originalConfigurationSettings.defaultZoomBehavior||(d.isMobileDevice()?p.FIT_PAGE_WIDTH:null)||p.FIT_PAGE;break;case t.AUTO:a.defaultZoomBehavior=p.RESET;break;case t.MANUAL:a.defaultZoomBehavior=a._originalConfigurationSettings.defaultZoomBehavior||p.FIT_PAGE}},_configure_panelsInSlides:function(a){a.showAreaTitle=!!a._originalConfigurationSettings.showAreaTitle;a.defaultZoomBehavior=null;switch(a.resizeMode){case t.FIT_WINDOW:a.scaleSlidesToFitWindow=
!1!==a._originalConfigurationSettings.scaleSlidesToFitWindow;break;case t.AUTO:a.scaleSlidesToFitWindow=!1;break;case t.MANUAL:a.scaleSlidesToFitWindow=!1!==a._originalConfigurationSettings.scaleSlidesToFitWindow}},_configure_panelsInStack:function(a){a.showAreaTitle=!!a._originalConfigurationSettings.showAreaTitle;a.scaleSlidesToFitWindow=!1;switch(a.resizeMode){case t.FIT_WINDOW:a.defaultZoomBehavior=p.FIT_PAGE_WIDTH;break;case t.AUTO:a.defaultZoomBehavior=p.RESET;break;case t.MANUAL:a.defaultZoomBehavior=
p.FIT_PAGE_WIDTH}},_configure_panelsInStackAll:function(a){a.showAreaTitle=!1!==a._originalConfigurationSettings.showAreaTitle;a.scaleSlidesToFitWindow=!1;switch(a.resizeMode){case t.FIT_WINDOW:a.defaultZoomBehavior=p.FIT_PAGE_WIDTH;break;case t.AUTO:a.defaultZoomBehavior=p.RESET;break;case t.MANUAL:a.defaultZoomBehavior=p.FIT_PAGE_WIDTH}},configurePlayerForCustomBuild:function(a,e){e=e||f;e.esriDijitCssUrl=a+"/dijit/themes/claro/claro.css";e.esriCssUrl=a+"/esri/css/esri.css";e.playerSourceRootUrl=
a+"/dojo/dojo.js";e.configScriptText='var dojoConfig \x3d { baseUrl: "'+a+'/", waitSeconds: 60, async: true, locale: typeof dojoConfig !\x3d\x3d "undefined" \x26\x26 dojoConfig.locale || null, packages: [{ name: "dojo", location: "./dojo" }, { name: "dijit", location: "./dijit" }, { name: "dojox", location: "./dojox" }, { name: "dgrid1", location: "./dgrid1" }, { name: "dstore", location: "./dstore" }, { name: "xstyle", location: "./xstyle" }, { name: "esri", location: "./esri" }, { name: "moment", location: "./moment", main: "moment/moment" }] }'}};
return c})},"esri/dijit/geoenrichment/ReportPlayer/PlayerThemes":function(){define([],function(){var t={LIGHT:"light",DARK:"dark",isSupported:function(p){for(var l in t)if(t[l]===p)return!0;return!1},toSupportedValue:function(p){return t.isSupported(p)?p:t.DARK}};return t})},"esri/dijit/geoenrichment/ReportPlayer/supportClasses/PlayerToFullScreenAnimator":function(){define(["esri/dijit/geoenrichment/utils/animation/AnimationUtil","esri/dijit/geoenrichment/utils/DelayUtil"],function(t,p){return{animateTo:function(l){if(!l._isAnimatedTo){l._isAnimatedTo=
!0;var k=t.animateResize({duration:300,domNode:l.domNode,startScaleX:.3,startScaleY:.3,fromOffset:{x:"c",y:"c"},toBox:{x:0,y:0,w:document.body.clientWidth,h:document.body.clientHeight}});t.animateFadeIn({domNode:l.domNode,duration:300});return k.then(function(){return p.delay(100)})}},animateFrom:function(l){if(l._isAnimatedTo){l._isAnimatedTo=!1;var k=t.animateResize({duration:300,domNode:l.domNode,endScaleX:.3,endScaleY:.3,toOffset:{x:"c",y:"c"},toBox:{x:(document.body.clientWidth-300)/2,y:(document.body.clientHeight-
200)/2,w:300,h:200}});t.animateFadeOut({domNode:l.domNode,duration:300});return k.then(function(){return p.delay(100)})}}}})},"esri/dijit/geoenrichment/utils/animation/AnimationUtil":function(){define(["dojo/dom-construct","dojo/dom-style","dojo/sniff","./Animator","esri/dijit/geoenrichment/utils/DomUtil"],function(t,p,l,k,f){var d={animateResize:function(c){function a(r){c.domNode=t.create("div",{"class":c.ghostClass},document.body);p.set(c.domNode,{width:r.w+"px",height:r.h+"px"})}function e(r,
u,v){var w=c.fromOffset.x,A=c.fromOffset.y;if("number"!==typeof w){var E=u.w*v.x;switch(w){case "l":w=0;break;case "r":w=(r.w||0)-E;break;default:w=((r.w||0)-E)/2}}if("number"!==typeof A)switch(E=u.h*v.y,A){case "t":A=0;break;case "b":A=(r.h||0)-E;break;default:A=((r.h||0)-E)/2}return{x:r.x+w,y:r.y+A}}function b(r,u,v){var w=c.toOffset.x,A=c.toOffset.y;if("number"!==typeof w){var E=r.w*v.x;switch(w){case "l":w=0;break;case "r":w=(u.w||0)-E;break;default:w=((u.w||0)-E)/2}}if("number"!==typeof A)switch(E=
r.h*v.y,A){case "t":A=0;break;case "b":A=(u.h||0)-E;break;default:A=((u.h||0)-E)/2}return{x:u.x+w,y:u.y+A}}var g=c.fromBox||(c.domFrom||c.domNode)&&f.noTransformPosition(c.domFrom||c.domNode);c.animateGhost&&a(g);var h=c.toBox||f.noTransformPosition(c.domTo);if(g&&h){var m=function(r,u){var v={x:c.startScaleX,y:c.startScaleY},w=0;"fit"===v.x&&(r.w?w=v.x=r.w/u.w:v.x=0);"fit"===v.y&&(r.h?w=Math.max(v.y=r.h/u.h,w):v.y=0);v.x=v.x||w||1;v.y=v.y||w||1;return v}(g,h),n=function(r,u){var v={x:c.endScaleX,
y:c.endScaleY},w=0;"fit"===v.x&&(u.w?w=v.x=u.w/r.w:v.x=0);"fit"===v.y&&(u.h?w=Math.max(v.y=u.h/r.h,w):v.y=0);v.x=v.x||w||1;v.y=v.y||w||1;return v}(g,h);c.fromOffset&&(g=e(g,h,m));c.toOffset&&(h=b(g,h,n));var q=l("webkit")?"webkitTransformOrigin":"transformOrigin";c.domNode.style[q]="0% 0%";return k.animateProperty({obj:c.domNode,duration:c.duration||250,properties:{__x:{start:g.x,end:h.x},__y:{start:g.y,end:h.y},__scaleX:{start:m.x||1,end:n.x},__scaleY:{start:m.y||1,end:n.y}},endFunction:function(){c.animateGhost&&
t.destroy(c.domNode);c.onEnd&&c.onEnd()},progressFunction:function(r,u){var v=l("webkit")?"webkitTransform":"transform";"__x"==r?c.domNode.style.left=u+"px":"__y"==r?c.domNode.style.top=u+"px":"__scaleX"==r?c.domNode.style[v]="scaleX("+u+") scaleY("+(c.domNode.__scaleY||1)+")":"__scaleY"==r&&(c.domNode.style[v]="scaleX("+(c.domNode.__scaleX||1)+") scaleY("+u+")")}}).promise}c.onEnd&&c.onEnd()},animateShrinkResize:function(c){c.endScaleX=c.endScaleX||.1;c.endScaleY=c.endScaleY||.05;return d.animateResize(c)},
animateFadeIn:function(c){return k.animateProperty({obj:c.domNode.style,duration:c.duration||250,properties:{opacity:{start:0,end:1}},endFunction:function(){c.onEnd&&c.onEnd()}}).promise},animateFadeOut:function(c){return k.animateProperty({obj:c.domNode.style,duration:c.duration||250,properties:{opacity:{start:1,end:0}},endFunction:function(){c.onEnd&&c.onEnd()}}).promise},animateSlide:function(c,a,e){var b=e.width;k.animateProperty({obj:c.style,duration:e.duration||250,properties:{left:{start:e.leftToRight?
0:-b,end:e.leftToRight?-b:0,units:"px"},right:{start:e.leftToRight?0:b,end:e.leftToRight?b:0,units:"px"}},endFunction:function(){e.onEnd&&e.onEnd()}});return k.animateProperty({obj:a.style,duration:e.duration||250,properties:{left:{start:e.leftToRight?b:0,end:e.leftToRight?0:b,units:"px"},right:{start:e.leftToRight?-b:0,end:e.leftToRight?0:-b,units:"px"}}}).promise},animateExpand:function(c,a,e){e=e||{};c.style.overflow="hidden";a&&f.show(c);var b=p.get(c,"height");return k.animateProperty({obj:c.style,
duration:e.duration,properties:{height:{start:a?0:b,end:a?b:0,units:"px"}},progressFunction:e.progressFunction,endFunction:function(){!a&&f.hide(c);p.set(c,"height","");p.set(c,"overflow","")}}).promise}};return d})},"esri/dijit/geoenrichment/utils/animation/Animator":function(){define(["esri/dijit/geoenrichment/Deferred","dojo/fx/easing","dojox/gfx/matrix"],function(t,p,l){function k(a){1>a.progress&&!a.isStopped?c.setTimeout(function(){if(a.isStopped)a.endFunction();else{var e=(new Date).getTime();
a.progress=1-(a.endTime-e)/a.duration;a.progress=Math.min(1,a.progress);f(a);k(a)}}):a.endFunction()}function f(a){for(var e in a.params.properties){var b=a.params.properties[e],g=b.easing?"function"===typeof b.easing?b.easing:p[b.easing]:null;g=g?g(a.progress):a.progress;var h=b.start+g*(b.end-b.start);a.obj[e]=b.units?h+b.units:h;a.progressFunction&&a.progressFunction(e,h,g)}}var d={},c={_funcs:null,setTimeout:function(a){var e=this;this._funcs?this._funcs.push(a):(this._funcs=[a],setTimeout(function(){var b=
e._funcs;e._funcs=null;b.forEach(function(g){g()})},33))}};d.animateProperty=function(a){var e={},b=new t;e.promise=b.promise;e.params=a;e.obj=a.obj||a.node||{};e.duration=void 0!==a.duration?a.duration:1E3;e.startTime=(new Date).getTime();e.endTime=e.startTime+e.duration;e.progress=0;e.endFunction=function(){a.endFunction&&a.endFunction();b.resolve()};e.progressFunction=a.progressFunction;e.stop=function(){e.isStopped=!0};f(e);k(e);return e};d.animateTransform=function(a){var e=a.shape;e.setTransform(null);
return d.animateProperty({duration:a.duration,properties:{p:{start:0,end:1,easing:a.easing}},progressFunction:function(b,g,h){var m,n,q,r;a.transform.forEach(function(u){var v=u.start[0]+(u.end[0]-u.start[0])*h,w=u.start[1]+(u.end[1]-u.start[1])*h;"translate"===u.name?(m=v,n=w):"scale"===u.name&&(q=v,r=w)});e.setTransform(new l.Matrix2D({dx:m,dy:n,xx:q,yy:r}))},endFunction:function(){e.setTransform(null);a.onEnd&&a.onEnd()}}).promise};return d})},"dojo/fx/easing":function(){define(["../_base/lang"],
function(t){var p={linear:function(l){return l},quadIn:function(l){return Math.pow(l,2)},quadOut:function(l){return l*(l-2)*-1},quadInOut:function(l){l*=2;return 1>l?Math.pow(l,2)/2:-1*(--l*(l-2)-1)/2},cubicIn:function(l){return Math.pow(l,3)},cubicOut:function(l){return Math.pow(l-1,3)+1},cubicInOut:function(l){l*=2;return 1>l?Math.pow(l,3)/2:(Math.pow(l-2,3)+2)/2},quartIn:function(l){return Math.pow(l,4)},quartOut:function(l){return-1*(Math.pow(l-1,4)-1)},quartInOut:function(l){l*=2;return 1>l?
Math.pow(l,4)/2:-.5*(Math.pow(l-2,4)-2)},quintIn:function(l){return Math.pow(l,5)},quintOut:function(l){return Math.pow(l-1,5)+1},quintInOut:function(l){l*=2;return 1>l?Math.pow(l,5)/2:(Math.pow(l-2,5)+2)/2},sineIn:function(l){return-1*Math.cos(Math.PI/2*l)+1},sineOut:function(l){return Math.sin(Math.PI/2*l)},sineInOut:function(l){return-1*(Math.cos(Math.PI*l)-1)/2},expoIn:function(l){return 0==l?0:Math.pow(2,10*(l-1))},expoOut:function(l){return 1==l?1:-1*Math.pow(2,-10*l)+1},expoInOut:function(l){if(0==
l)return 0;if(1==l)return 1;l*=2;if(1>l)return Math.pow(2,10*(l-1))/2;--l;return(-1*Math.pow(2,-10*l)+2)/2},circIn:function(l){return-1*(Math.sqrt(1-Math.pow(l,2))-1)},circOut:function(l){return Math.sqrt(1-Math.pow(l-1,2))},circInOut:function(l){l*=2;return 1>l?-.5*(Math.sqrt(1-Math.pow(l,2))-1):.5*(Math.sqrt(1-Math.pow(l-2,2))+1)},backIn:function(l){return Math.pow(l,2)*(2.70158*l-1.70158)},backOut:function(l){--l;return Math.pow(l,2)*(2.70158*l+1.70158)+1},backInOut:function(l){l*=2;if(1>l)return Math.pow(l,
2)*(3.5949095*l-2.5949095)/2;l-=2;return(Math.pow(l,2)*(3.5949095*l+2.5949095)+2)/2},elasticIn:function(l){if(0==l||1==l)return l;--l;return-1*Math.pow(2,10*l)*Math.sin(2*(l-.075)*Math.PI/.3)},elasticOut:function(l){return 0==l||1==l?l:Math.pow(2,-10*l)*Math.sin(2*(l-.075)*Math.PI/.3)+1},elasticInOut:function(l){if(0==l)return 0;l*=2;if(2==l)return 1;var k=.3*1.5,f=k/4;if(1>l)return--l,-.5*Math.pow(2,10*l)*Math.sin(2*(l-f)*Math.PI/k);--l;return.5*Math.pow(2,-10*l)*Math.sin(2*(l-f)*Math.PI/k)+1},bounceIn:function(l){return 1-
p.bounceOut(1-l)},bounceOut:function(l){return l<1/2.75?7.5625*Math.pow(l,2):l<2/2.75?7.5625*Math.pow(l-1.5/2.75,2)+.75:l<2.5/2.75?7.5625*Math.pow(l-2.25/2.75,2)+.9375:7.5625*Math.pow(l-2.625/2.75,2)+.984375},bounceInOut:function(l){return.5>l?p.bounceIn(2*l)/2:p.bounceOut(2*l-1)/2+.5}};t.setObject("dojo.fx.easing",p);return p})},"esri/dijit/geoenrichment/ReportPlayer/toolbar/PlayerToolbar":function(){define("dojo/_base/declare dojo/on dojo/string esri/dijit/geoenrichment/when dojo/dom-class dojo/dom-construct dijit/_WidgetBase dijit/_TemplatedMixin ../PlayerCommands ../PlayerThemes ./Select ./AreasSelect ./ZoomSelect ./ToolbarArranger ./ZoomUtil esri/dijit/geoenrichment/utils/DeviceUtil esri/dijit/geoenrichment/utils/DomUtil esri/dijit/geoenrichment/utils/InvokeUtil esri/dijit/geoenrichment/utils/MouseUtil esri/dijit/geoenrichment/utils/PopupUtil esri/dijit/geoenrichment/utils/TooltipUtil dojo/text!../templates/PlayerToolbarHolder.html dojo/i18n!esri/nls/jsapi".split(" "),
function(t,p,l,k,f,d,c,a,e,b,g,h,m,n,q,r,u,v,w,A,E,F,D){D=D.geoenrichment.dijit.ReportPlayer.PlayerToolbar;var B=t([c,a],{templateString:F,nls:D,player:null,areaTitleFormatter:null,areaTitleMultiFormatter:null,showAreaTitle:!1,stretchToolbarNode:null,canAddMoreAreas:!1,areasSelectButtons:null,areasSelect:null,pageSelect:null,zoomSelect:null,_toolbarArranger:null,_infographicSelect:null,postCreate:function(){u.hide(this.commandButtonsContainer);this._toolbarArranger=new n({showAreaTitle:this.showAreaTitle,
stretchToolbarNode:this.stretchToolbarNode,domNode:this.domNode,infographicsSelectDiv:this.infographicsSelectDiv,areaTitleDiv:this.areaTitleDiv,areaTitleInnerDiv:this.areaTitleInnerDiv,rightSideControlsBlock:this.rightSideControlsBlock,areasSelectDiv:this.areasSelectDiv,zoomSelectDiv:this.zoomSelectDiv,pageSelectDiv:this.pageSelectDiv,commandButtonsContainer:this.commandButtonsContainer});this._initAreaSelect();this._initPageSelect();this._initZoomSelect();E.autoTooltip(this.domNode)},_initAreaSelect:function(){var y=
this;this.areasSelect=(new h({player:this.player,canAddMoreAreas:this.canAddMoreAreas,areasSelectButtons:this.areasSelectButtons,onChange:function(z){y.onShowAnalysisAreaAt(z.value);y.onClosePopup()},onAddMoreAreas:function(){y.onAddMoreAreas();y.onClosePopup()},onRemoveAreas:function(z,H){y.onRemoveAreas(z);H&&y.onClosePopup()},onCompareAreasSideBySide:function(){y.onCompareAreasSideBySide();y.onClosePopup()},onStopComparison:function(z){y.onShowAnalysisAreaAt(z);y.onClosePopup()}})).placeAt(this.areasSelectDiv);
this.own(this.areasSelect)},updateAreaSelect:function(y){var z=y.analysisAreas,H=y.combinedAreasInfo,G=y.currentAreaIndex,I=y.isMultiFeature;this.areasSelect.buildAreaOptions(y);this.areasSelect.set("value",G);y=1<this.areasSelect.get("options").length&&!I;u[y?"show":"hide"](this.areasSelectDiv);this._toolbarArranger.syncRightSideVisibility();this.player.showReportTitle?500<document.body.clientWidth||!y?(this.infographicsSelectDiv.innerHTML="\x3cdiv class\x3d'TrimWithEllipses' style\x3d'max-width:"+
.4*document.body.clientWidth+"px;'\x3e"+this.player.getReportTitle()+"\x3c/div\x3e",this._toolbarArranger.showAreaTitle=!0):(this.infographicsSelectDiv.innerHTML="",this._toolbarArranger.showAreaTitle=!1):I?this.areaTitleMultiFormatter?this.areaTitleMultiFormatter(this.areaTitleInnerDiv,H):this._formatAreaTitleMulti(H):(z=z["all"===G?0:G],this.areaTitleFormatter?this.areaTitleFormatter(this.areaTitleInnerDiv,z):this._formatAreaTitle(z,G))},_formatAreaTitle:function(y,z){this.areaTitleInnerDiv.innerHTML=
"all"===z?D.allAreas:y.locationName||y.name},_formatAreaTitleMulti:function(y){this.areaTitleInnerDiv.innerHTML=y.locationName||y.name||y.shortName||""},_pageControlsVisible:!0,_initPageSelect:function(){var y=this;this.pageSelect=(new g({onChange:function(z){y.onShowPageAt(z.value);y.onClosePopup()}})).placeAt(this.pageSelectDiv);this.own(this.pageSelect)},setPageControlsVisible:function(y){this._pageControlsVisible=y;u[y?"show":"hide"](this.pageSelectDiv)},updatePageSelect:function(y,z){for(var H=
[],G=0;G<y;G++)H.push({label:l.substitute(D.pageIndex,{index:G+1}),value:G});this.pageSelect.set("options",H);this.pageSelect.set("value",z);u[this._pageControlsVisible&&1<y&&500<document.body.clientWidth?"show":"hide"](this.pageSelectDiv)},_initZoomSelect:function(){var y=this;this.zoomSelect=(new m({onChange:function(z){if(z.value===q.FIT_PAGE)y.onZoomToFitPage();else if(z.value===q.FIT_PAGE_WIDTH)y.onZoomToFitPageWidth();else if(z.value===q.FIT_PAGE_HEIGHT)y.onZoomToFitPageHeight();else y.onSetZoomPercent(z.value);
y.onClosePopup()}})).placeAt(this.zoomSelectDiv);this.own(this.zoomSelect)},setZoomSupportsInfo:function(y){u[y.supported?"show":"hide"](this.zoomSelectDiv);this._toolbarArranger.syncRightSideVisibility();this.zoomSelect.options.forEach(function(z){z.hidden=!1;z.value!==q.FIT_PAGE||y.canFitPage?z.value!==q.FIT_PAGE_WIDTH||y.canFitPageWidth?z.value!==q.FIT_PAGE_HEIGHT||y.canFitPageHeight||(z.hidden=!0):z.hidden=!0:z.hidden=!0})},setZoomInfo:function(y){y=y.isFitPageScale?q.FIT_PAGE:y.isFitPageWidthScale?
q.FIT_PAGE_WIDTH:y.isFitPageHeightScale?q.FIT_PAGE_HEIGHT:q.getClosestZoomAndUpdateOptions(100*y.scale,this.zoomSelect.get("options"));y!==this.zoomSelect.get("value")&&this.zoomSelect.set("value",y)},createCommandButton:function(y,z){return this.createCustomCommandButton({callback:z,buttonClass:y.id===e.PRINT?"playerPrintButton":"playerExportButton",tooltip:y.id===e.PRINT?D.printInfographic:D.exportInfographic,visibleOnError:!1})},createCustomCommandButton:function(y){u.show(this.commandButtonsContainer);
var z=d.create("div",{"class":"playerToolbar_commandButtonContainer dijitInline"},this.commandButtonsContainer,y.addFirst?"first":"last");z.__visibleOnError=y.visibleOnError;z=d.create("div",{"class":"playerToolbar_commandButton"},z);y.buttonClass&&f.add(z,y.buttonClass);y.tooltip&&E.setTooltipToNode(z,y.tooltip);p(z,"click",y.callback);return z},setTheme:function(y){f.remove(this.domNode,"playerThemeDark playerThemeLight");f.add(this.domNode,y===b.DARK?"playerThemeDark":"playerThemeLight");this.areasSelect.setTheme(y);
this.pageSelect.setTheme(y);this.zoomSelect.setTheme(y)},setErrorShown:function(y){if(y)for(u.hide([this.areaTitleDiv,this.areasSelectDiv,this.pageSelectDiv,this.zoomSelectDiv]),y=0;y<this.commandButtonsContainer.children.length;y++){var z=this.commandButtonsContainer.children[y];u[z.__visibleOnError?"show":"hide"](z)}},arrangeControls:function(){this._toolbarArranger.arrangeControls()},hasVisibleControls:function(){return this._toolbarArranger.hasVisibleControls()},addInfographicsSelect:function(y){this._infographicSelect=
y;y.placeAt(this.infographicsSelectDiv)},isMouseOver:function(){return w.isMouseOver(this.domNode)||this.areasSelect&&this.areasSelect.isMouseOver()||this.pageSelect&&this.pageSelect.isMouseOver()||this.zoomSelect&&this.zoomSelect.isMouseOver()||this._infographicSelect&&this._infographicSelect.isMouseOver&&this._infographicSelect.isMouseOver()},setContentLoadPromise:function(y){u.enableContentAbsolute(this.commandButtonsContainer,!1);u.enableContentAbsolute(this.infographicsSelectDiv,!1);k(y,function(){u.enableContentAbsolute(this.commandButtonsContainer,
!0);u.enableContentAbsolute(this.infographicsSelectDiv,!0)}.bind(this))},onShowPageAt:function(y){},onShowAnalysisAreaAt:function(y){},onCompareAreasSideBySide:function(){},onZoomToFitPage:function(){},onZoomToFitPageWidth:function(){},onZoomToFitPageHeight:function(){},onSetZoomPercent:function(y){},onClosePopup:function(){},onAddMoreAreas:function(){},onRemoveAreas:function(y){}});return t([c,a],{templateString:"\x3cdiv class\x3d'esriGEPlayerToolbarOuter'\x3e\x3c/div\x3e",player:null,popupButtonDiv:null,
areaTitleFormatter:null,areaTitleMultiFormatter:null,showToolbarInPopup:!1,showAreaTitle:!1,stretchToolbarNode:null,showCloseButton:!1,canAddMoreAreas:!1,areasSelectButtons:null,toolbarHolder:null,postCreate:function(){var y=this;this.inherited(arguments);this.toolbarHolder=(new B({player:this.player,showAreaTitle:this.showAreaTitle,stretchToolbarNode:this.stretchToolbarNode,canAddMoreAreas:this.canAddMoreAreas,areasSelectButtons:this.areasSelectButtons,onShowPageAt:function(z){y.onShowPageAt(z)},
onShowAnalysisAreaAt:function(z){y.onShowAnalysisAreaAt(z)},onCompareAreasSideBySide:function(){y.onCompareAreasSideBySide()},onZoomToFitPage:function(){y.onZoomToFitPage()},onZoomToFitPageWidth:function(){y.onZoomToFitPageWidth()},onZoomToFitPageHeight:function(){y.onZoomToFitPageHeight()},onSetZoomPercent:function(z){y.onSetZoomPercent(z)},onClosePopup:function(){y.closePopup()},onAddMoreAreas:function(){y.onAddMoreAreas()},onRemoveAreas:function(z){y.onRemoveAreas(z)}})).placeAt(this.domNode);
this.own(this.toolbarHolder)},updateAreaSelect:function(y){this.toolbarHolder.areaTitleFormatter=this.areaTitleFormatter;this.toolbarHolder.areaTitleMultiFormatter=this.areaTitleMultiFormatter;this.toolbarHolder.updateAreaSelect(y)},setPageControlsVisible:function(y){this.toolbarHolder.setPageControlsVisible(y)},updatePageSelect:function(y,z){this.toolbarHolder.updatePageSelect(y,z)},setZoomSupportsInfo:function(y){this.toolbarHolder.setZoomSupportsInfo(y)},setZoomInfo:function(y){this.toolbarHolder.setZoomInfo(y)},
createCommandButton:function(y,z){return this.toolbarHolder.createCommandButton(y,z)},setTheme:function(y){this.toolbarHolder.setTheme(y)},setErrorShown:function(y){this.toolbarHolder.setErrorShown(y);this._arrangeControls()},_arrangeControls:function(){u.show(this.domNode);this.toolbarHolder.arrangeControls();u[this.toolbarHolder.hasVisibleControls()?"show":"hide"]([this._popupButton,this.domNode])},_popupHandle:null,_popupButton:null,update:function(){v.invoke(this,"_doUpdateToolbar")},_doUpdateToolbar:function(){f[this.isScrollShown()?
"add":"remove"](this.popupButtonDiv,"playerToolbar_parentHasScroll");f[r.isMobileDevice()?"add":"remove"](this.popupButtonDiv,"isMobileDevice");f[r.isMobileDevice()?"add":"remove"](this.toolbarHolder.domNode,"isMobileDevice");this._resetToolbarNode();var y=A.isOpen(this.toolbarHolder);this._popupHandle&&this._popupHandle.remove();this._popupHandle=null;this.showToolbarInPopup?(this._popupButton=d.create("div",{"class":"dijitInline playerToolbar_outerButton playerToolbar_settingsButton"},this.popupButtonDiv,
"first"),this._popupHandle=A.makePopup(this.toolbarHolder,this,this._popupButton,{orient:["before","below"],openPopup:y})):d.place(this.toolbarHolder.domNode,this.domNode);this._arrangeControls()},_resetToolbarNode:function(){this.toolbarHolder.domNode.parentNode&&this.toolbarHolder.domNode.parentNode.removeChild(this.toolbarHolder.domNode);this.domNode.innerHTML="";this._popupButton&&d.destroy(this._popupButton);this._popupButton=null},closePopup:function(){this.showToolbarInPopup&&A.close(this.toolbarHolder)},
isScrollShown:function(){return!1},createCustomCommandButton:function(y){return this.toolbarHolder.createCustomCommandButton(y)},notifyCommandButtonsAdded:function(){if(this.showCloseButton)if(this.showToolbarInPopup){var y=d.create("div",{"class":"dijitInline playerToolbar_outerButton playerToolbar_closeButtonOuter"},this.popupButtonDiv);E.setTooltipToNode(y,D.close);p(y,"click",function(){this.onClose()}.bind(this))}else this.createCustomCommandButton({buttonClass:"playerToolbar_closeButton",tooltip:D.close,
callback:function(){this.closePopup();this.onClose()}.bind(this),visibleOnError:!0})},addInfographicsSelect:function(y){this.toolbarHolder.addInfographicsSelect(y)},isMouseOver:function(){return w.isMouseOver(this.domNode)||this.toolbarHolder.isMouseOver()},setContentLoadPromise:function(y){this.toolbarHolder.setContentLoadPromise(y)},onShowPageAt:function(y){},onShowAnalysisAreaAt:function(y){},onCompareAreasSideBySide:function(){},onZoomToFitPage:function(){},onZoomToFitPageWidth:function(){},onZoomToFitPageHeight:function(){},
onSetZoomPercent:function(y){},onClose:function(){},onAddMoreAreas:function(){},onRemoveAreas:function(y){}})})},"esri/dijit/geoenrichment/ReportPlayer/toolbar/Select":function(){define(["dojo/_base/declare","dojo/dom-class","esri/dijit/geoenrichment/OnDemandSelect","../PlayerThemes"],function(t,p,l,k){return t(l,{"class":"esriGEOnDemandSelectNoBackground",listClass:"esriGEOnDemandSelectVeryTallList esriGEOnDemandSelectSpacedOut",allowRepetitiveSelection:!1,setTheme:function(f){p[f===k.DARK?"add":
"remove"](this.domNode,"esriGEOnDemandSelectWhite")}})})},"esri/dijit/geoenrichment/OnDemandSelect":function(){define("dojo/_base/declare dojo/_base/lang dojo/on dojo/dom-construct dojo/dom-class dojo/dom-style dojo/dom-geometry dojo/store/Memory dijit/_WidgetBase dijit/_TemplatedMixin ./lists/FlowList ./lists/FlowListDefaultItemRenderer ./lists/_FlowListHoverSupport ./utils/DeviceUtil ./utils/DomUtil ./utils/MouseUtil ./utils/PopupUtil ./utils/TooltipUtil ./utils/AccessibilityUtils dojo/text!./templates/OnDemandSelect.html".split(" "),
function(t,p,l,k,f,d,c,a,e,b,g,h,m,n,q,r,u,v,w,A){var E=t([g,m]),F={_currentSelect:null,_keyHandler:null,_mouseMoveHandler:null,_currentItemIndex:-1,_currentSearchLetter:null,setFocusedSelect:function(D){this._currentSelect=D;this._updateHandlers()},_updateHandlers:function(){var D=this;this._keyHandler&&this._keyHandler.remove();this._keyHandler=null;this._mouseMoveHandler&&this._mouseMoveHandler.remove();this._mouseMoveHandler=null;this._currentItemIndex=-1;this._currentSearchLetter=null;this._setNodeFocused(null);
this._currentSelect&&(this._keyHandler=l(document.body,"keyup",function(B){B=String.fromCharCode(B.keyCode);1===B.length&&(B=B.toLowerCase(),D._tryHighlightNextItemForKey(B))}),this._mouseMoveHandler=l(this._currentSelect.popupList.domNode,"mousemove",function(){D._setNodeFocused(null)}))},_tryHighlightNextItemForKey:function(D){D===this._currentSearchLetter?this._currentItemIndex++:this._currentItemIndex=0;this._currentSearchLetter=D;var B=this,y=this._currentSelect.store.query(function(H){return(H=
H[B._currentSelect.labelProperty])&&H.toLowerCase().charAt(0)===D});if(y.length){this._currentItemIndex>y.length-1&&(this._currentItemIndex=0);var z=(y=y[this._currentItemIndex])&&this._currentSelect.popupList.getItemNode(y);y&&this._currentSelect.popupList.scrollToItem(y);this._setNodeFocused(z)}},_currentFocusedNode:null,_setNodeFocused:function(D){this._currentFocusedNode&&(f.remove(this._currentFocusedNode,"listItemFocused"),this._currentFocusedNode=null);D&&(f.add(D,"listItemFocused"),this._currentFocusedNode=
D)}};return t([e,b],{templateString:A,value:null,popupList:null,listClass:null,placeHolderClass:"placeHolder",idProperty:"value",labelProperty:"label",options:null,store:null,itemRenderer:null,itemClass:null,placeHolder:null,requireSelection:!0,renderSelectionAsItem:!1,makePopupListWidthMatchOpenButtonWidth:!0,orient:null,noPopupOverflow:!1,stopOpenEventPropagation:!1,stopPopupInteractionEventPropagation:!0,onClickComponent:null,clearPopupOnClose:!0,detectItemHover:!1,hasSelectableItems:!0,allowRepetitiveSelection:!0,
labelTextToKeep:null,nodeToKeepAsSelected:null,openMouseEvent:null,toggleOnClick:!0,supportsKeyNavigation:!0,_closePopupOnChangeFunc:null,enableTabbing:!1,_lastPopupListScrollTop:0,postCreate:function(){var D=this;this.inherited(arguments);this._normalizeValue();this.labelTextToKeep?this.selectedLabel.innerHTML=this.labelTextToKeep:this.requireSelection||this._tryAssignPlaceholder();this.nodeToKeepAsSelected?this._updateSelection():q.hide(this.selectedItemHolder);this._createPopupList();this.own(this.popupList);
this.listClass&&f.add(this.popupList.domNode,this.listClass);this._popupCreationHandler=l(this.openButton,this.openMouseEvent||n.click,function(B){D.stopOpenEventPropagation&&("function"===typeof D.stopOpenEventPropagation?D.stopOpenEventPropagation(B):B.stopPropagation());D.openPopup()});this.enableTabbing&&w.registerButton(this.openButton,D.openPopup.bind(D));this.popupList.startup();this._trySelectValue();l(this.popupList.domNode,n.clickOrRelease,function(B){D.stopPopupInteractionEventPropagation&&
B.stopPropagation()});l(this.popupList.domNode,"scroll",function(B){D._lastPopupListScrollTop=D.popupList.domNode.scrollTop});v.autoTooltip(this.domNode)},_createPopupList:function(){var D=this,B=this.itemRenderer||new h;this.popupList=new (this.detectItemHover?E:g)(p.mixin({"class":"esriGEOnDemandSelectFlowList",idProperty:this.idProperty,labelProperty:this.labelProperty,itemRenderer:B,itemClass:this.itemClass,stopMouseEventPropagation:this.stopPopupInteractionEventPropagation,hasSelectableItems:this.hasSelectableItems,
enableTabbing:this.enableTabbing,allowRepetitiveSelection:this.allowRepetitiveSelection,onChange:function(){D._processOnChangeEvent()},onItemHovered:function(y){D.onItemHovered(y)}},this._buildAdditionalPopupListProperties()))},_buildAdditionalPopupListProperties:function(){return null},setValueWithEvent:function(D){var B=this.get("value");this.set("value",D);this.onChange&&this.onChange({type:"change",value:this.get("value"),previousValue:B,selectedItem:this.popupList.selectedItem})},_processOnChangeEvent:function(){if(this.popupList.selectedItem){var D=
this.value,B=this.popupList.selectedItem;this.value=B[this.idProperty];this._updateSelection();this.onChange&&this.onChange({type:"change",value:this.value,previousValue:D,selectedItem:B})}this._closePopupOnChangeFunc&&!this._closePopupOnChangeFunc(this.value)||u.close(this.popupList)},_makePopup:function(){if(this._popupCreationHandler){this._popupCreationHandler.remove();delete this._popupCreationHandler;var D=this;u.makePopup(this.popupList,this,this.openButton,{openMouseEvent:this.openMouseEvent,
stopEventPropagation:this.stopOpenEventPropagation,toggleOnClick:this.toggleOnClick,wrapperClass:this.listClass?this.listClass.split(" ").map(function(B){return B+"Popup"}).join(" "):null,orient:this.orient,allowAutoOrientation:this.allowAutoOrientation,noOverflow:this.noPopupOverflow,onClickComponent:this.onClickComponent,onPreShow:function(){D.onPopupListPreBuild();D.makePopupListWidthMatchOpenButtonWidth&&d.set(D.popupList.domNode,"minWidth",c.getContentBox(D.domNode).w+"px");D._updatePopupListStore();
D.onPopupPreOpened()},onShow:function(){D.onPopupOpened();F.setFocusedSelect(D);D._onPopupOpened()},onClose:function(){D.onPopupClosed();F.setFocusedSelect(null);D.clearPopupOnClose&&D._clearPopup()},isMouseOver:function(){return D.isMouseOverList()}})}},_clearPopup:function(){this.popupList&&this.popupList.clear&&this.popupList.clear()},_tryAssignPlaceholder:function(){if(this.placeHolder&&null===this.value)return this.selectedLabel.innerHTML=this.placeHolder,f.add(this.selectedLabel,this.placeHolderClass),
!0;f.remove(this.selectedLabel,this.placeHolderClass);return!1},_normalizeValue:function(){null!==this.value&&(void 0===this.value?this.value=null:("string"===typeof this.value&&(this.value=this.value.trim()),String(this.value)||(this.value=null)))},trySelectValue:function(D){this.value=D;this._normalizeValue();return this._trySelectValue()},_trySelectValue:function(){if(null!==this.value&&this._setValueAttr(this.value,!0))return!0;if(this.requireSelection){var D=this.store&&this.store.query();if(D&&
D.length){var B=this;this.value&&D.some(function(y){return B.value===y[B.idProperty]})?this._setValueAttr(this.value,!0):this._setValueAttr(D[0][this.idProperty],!0)}}return!1},_setValueAttr:function(D,B){this.value=D;this._normalizeValue();if(!this.store||!this.popupList)return!1;var y=this;(D=this.store.query(function(z){return z[y.idProperty]===y.value})[0])&&this.popupList.setSelectedItem(D);this._updateSelection(D);return!!D},_setOptionsAttr:function(D){this.options=D;this.store=this._createStore(D);
this._updatePopupListStore();this._trySelectValue()},_setStoreAttr:function(D){this.options=(this.store=this._createStore(D))&&this.store.query();D.idProperty&&(this.idProperty=D.idProperty);this._updatePopupListStore();this._trySelectValue()},_createStore:function(D){return D instanceof Array?new a({data:D,idProperty:this.idProperty}):D},_updatePopupListStore:function(){this.popupList&&(this.popupList.store&&this.popupList.store===this.store&&!this.clearPopupOnClose||this.popupList.setStore(this.store,
!0),this.popupList.setSelectedItem(this.getSelectedItem()),this._lastPopupListScrollTop&&(this.popupList.domNode.scrollTop=this._lastPopupListScrollTop))},getSelectedItem:function(){if(!this.store)return null;var D=this.get("value"),B=this;return void 0!==D&&this.store.query(function(y){return y[B.idProperty]===D})[0]},setSelectedItem:function(D){this.store&&this.popupList&&D&&this._setValueAttr(D[this.idProperty],!0)},getSelectedIndex:function(){var D=this,B=-1;if(this.store){var y=this.get("value");
void 0!==y&&this.store.query().some(function(z,H){if(z[D.idProperty]==y)return B=H,!0})}return B},setSelectedIndex:function(D){this.setSelectedItem(this.store&&this.store.data[D])},_nodeToKeepAsSelectedPlacedFlag:!1,_updateSelection:function(D){D=D||this.getSelectedItem();this.nodeToKeepAsSelected?this._nodeToKeepAsSelectedPlacedFlag||(q.hide(this.selectedLabel),q.show(this.selectedItemHolder),this.selectedItemHolder.innerHTML="",k.place(this.nodeToKeepAsSelected,this.selectedItemHolder),this._nodeToKeepAsSelectedPlacedFlag=
!0):this.renderSelectionAsItem?(q.hide(this.selectedLabel),q.show(this.selectedItemHolder),this.selectedItemHolder.innerHTML="",D&&this.popupList.itemRenderer.createPresentation(D,!1,this.selectedItemHolder,this.popupList)):(q.hide(this.selectedItemHolder),this.labelTextToKeep?this.selectedLabel.innerHTML=this.labelTextToKeep:(this.selectedLabel.innerHTML=D?D[this.labelProperty]:"",this.selectedLabel.innerHTML&&f.remove(this.selectedLabel,this.placeHolderClass),q[this.selectedLabel.innerHTML||this._tryAssignPlaceholder()?
"show":"hide"](this.selectedLabel)))},refresh:function(){this.popupList.refresh();this._updateSelection()},isPopupOpen:function(){return u.isOpen(this.popupList)},openPopup:function(){this.isPopupOpen()||(this._makePopup(),u.open(this.popupList))},closePopup:function(){this._popupCreationHandler||u.close(this.popupList)},refreshPopup:function(){this.isPopupOpen()&&u.refresh(this.popupList)},isMouseOver:function(D){return r.isMouseOver(this.domNode,{event:D})||this.isMouseOverList(D)},isMouseOverList:function(D){return this.popupList&&
r.isMouseOver(this.popupList.domNode,{event:D})},onPopupListPreBuild:function(){},onPopupPreOpened:function(){},onPopupOpened:function(){},_onPopupOpened:function(){},onPopupClosed:function(){},onChange:function(D){},onItemHovered:function(D){},destroy:function(){this._popupCreationHandler&&this._popupCreationHandler.remove();this.closePopup(this.popupList);this.popupList.destroy();this.inherited(arguments)}})})},"esri/dijit/geoenrichment/lists/FlowList":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/dom-class dojo/on ../utils/DeviceUtil ../utils/DnDUtil ../utils/MouseUtil ../utils/TooltipUtil ./FlowListDefaultItemRenderer ../utils/PopupUtil ../utils/AccessibilityUtils dijit/_WidgetBase dijit/_TemplatedMixin".split(" "),
function(t,p,l,k,f,d,c,a,e,b,g,h,m,n){var q=t([m,n],{templateString:"\x3cdiv class\x3d'esriGEFlowList esriGENonSelectable'\x3e\x3c/div\x3e",idProperty:"value",labelProperty:"label",selectedIndex:-1,selectedItem:null,items:null,store:null,defaultItemRendererClass:b,itemRenderer:null,itemClass:null,itemClassSelected:null,keepScrollPosition:!1,allowRepetitiveSelection:!0,selectOnMouseDown:!1,noDragTolerance:0,selectionValidator:null,allowManualSelection:!0,stopMouseEventPropagation:!0,hasSelectableItems:!0,
autoDetectUrlsInLabels:!1,storeItemsInInnerDiv:!1,enableTabbing:!1,_addedWrappers:null,_clickHandles:null,_valueOnCreation:null,_isCreated:!1,itemsDiv:null,postCreate:function(){this.inherited(arguments);this.itemsDiv=this.storeItemsInInnerDiv?l.create("div",{"class":"esriGEFlowList_innerDiv"},this.domNode):this.domNode;this._clearHandlers();this._setUpItemRenderer();e.autoTooltip(this.domNode);this._isCreated=!0;this._valueOnCreation?this._setValueAttr(this._valueOnCreation):this.refresh()},_setUpItemRenderer:function(){this.itemRenderer||
(this.itemRenderer=new this.defaultItemRendererClass);this.itemClass&&(this.itemRenderer.itemClass=this.itemClass);this.itemClassSelected&&(this.itemRenderer.itemClassSelected=this.itemClassSelected)},_getValueAttr:function(){return this.selectedItem&&this.selectedItem[this.idProperty]},_setValueAttr:function(r){var u=this;if(this._isCreated){var v=this.items||this.store&&this.store.data;v&&v.some(function(w){if(w[u.idProperty]==r)return u.setSelectedItem(w),!0})}else this._valueOnCreation=r},_scrollTopMemo:0,
memoScroll:function(){this._scrollTopMemo=this.domNode.scrollTop},applyScrollFromMemo:function(){this.domNode.scrollTop=this._scrollTopMemo||0},_setItemsAttr:function(r){this.setItems(r)},setItems:function(r,u){this.keepScrollPosition&&this.memoScroll();this.clear();this.items=r;u||(this.items&&this._isCreated?(this._addItems(r),this._checkIfStillSelected(),this.keepScrollPosition&&this.applyScrollFromMemo(),this.onItemsSet()):this._checkIfStillSelected())},_checkIfStillSelected:function(){if(-1!=
this.selectedIndex||this.selectedItem){var r=this;this._addedWrappers&&this._addedWrappers.some(function(u,v){return r._isItemSelected(u,v)})||(this.selectedIndex=-1,this.selectedItem=null)}},refresh:function(){this.store?this.setStore(this.store):this.setItems(this.items)},setSelectedItem:function(r,u){this.hasSelectableItems&&(this.selectedItem=r,this.selectedIndex=-1,this.refresh(),u&&this._dispatchChangeEvent())},setSelectedIndex:function(r,u){this.hasSelectableItems&&(this.selectedIndex=r,this.selectedItem=
null,this.refresh(),u&&this._dispatchChangeEvent())},getItemNode:function(r){var u;this._addedWrappers&&this._addedWrappers.some(function(v){if(v.itemRef===r)return u=v.__itemPresentation,!0});return u},getItemByNode:function(r){var u;this._addedWrappers&&this._addedWrappers.some(function(v){if(v.__itemPresentation===r)return u=v.itemRef,!0});return u},getItemByValue:function(r){var u,v=this;this._addedWrappers&&this._addedWrappers.some(function(w){if(w[v.idProperty]===r)return u=w.itemRef,!0});return u},
__selectedPresentation:null,_addItems:function(r){this._addedWrappers=this._addedWrappers||[];var u=this;r.forEach(function(v){var w=p.mixin({},v);w.itemRef=v;u.__addWrapper(w)})},__addWrapper:function(r){var u=this._addedWrappers.length,v=this.itemRenderer.createPresentation(r.itemRef,this._isItemSelected(r,u),this.itemsDiv,this,r);v&&(v.index=u,v.item=r.itemRef,r.__itemPresentation=v,this._isItemSelected(r,u)&&(this.selectedItem=r.itemRef,this.selectedIndex=u,this.__selectedPresentation=v),this._addClickHandler(v),
this._addedWrappers.push(r),r=this._addedWrappers.length-1,k.add(v,"listItem_"+r),k.add(v,"listItem_"+(0==r%2?"even":"odd")))},_isItemSelected:function(r,u){return this.hasSelectableItems&&this._isItemClickable(r)?u==this.selectedIndex||r.itemRef===this.selectedItem?!0:r.itemRef&&this.selectedItem?(r=r.itemRef[this.idProperty],u=this.selectedItem[this.idProperty],void 0!==r&&r===u):!1:!1},_isItemClickable:function(r){return this.selectionValidator?this.selectionValidator(r):this._selectionValidatorDefault(r)},
_selectionValidatorDefault:function(r){return!!r&&!r.isSeparator&&!1!==r.enabled},_addClickHandler:function(r){function u(){(v.allowRepetitiveSelection||v.__selectedPresentation!=r)&&v._isItemClickable(r.item)&&(v.__selectedPresentation&&v.itemRenderer.selectPresentation&&v.itemRenderer.selectPresentation(v.__selectedPresentation,!1,v.__selectedPresentation.item),v.itemRenderer.selectPresentation&&v.itemRenderer.selectPresentation(r,v.hasSelectableItems,r.item),v.__selectedPresentation=r,v.selectedIndex=
r.index,v.selectedItem=r.item,v._dispatchChangeEvent())}var v=this;if(this.allowManualSelection){var w=this.selectOnMouseDown||!this.noDragTolerance?f(r,this.selectOnMouseDown?d.press:d.click,function(A){v.stopMouseEventPropagation&&A.stopPropagation();u()}):c.addNoDragClickHandler(r,u,{tolerance:this.noDragTolerance});this._clickHandles.push(w);this.enableTabbing&&h.registerButton(r,u,r.item[this.labelProperty])}},_dispatchChangeEvent:function(){this.onChange({type:"change",selectedIndex:this.selectedIndex,
selectedItem:this.selectedItem,value:this.selectedItem&&this.selectedItem[this.idProperty]})},clear:function(){this.__selectedPresentation=null;this._addedWrappers=this._addedWrappers||[],this._addedWrappers.forEach(function(r){r.destroyPresentation&&r.destroyPresentation()});this._addedWrappers.length=0;this.itemsDiv&&(this.itemsDiv.innerHTML="");this._clearHandlers()},_clearHandlers:function(){this._clickHandles=this._clickHandles||[];this._clickHandles.forEach(function(r){r.remove()});this._clickHandles.length=
0},scrollToItem:function(r){if(r=this.getItemNode(r))this.domNode.scrollTop=r.offsetTop},store:null,onDemandModeLoadStep:1E3,onDemandPopulateLimit:1E3,onDemandPopulatePeriod:200,_storeScrollHandler:null,_setStoreAttr:function(r){this.setStore(r)},setStore:function(r){if(this.domNode)if(this.keepScrollPosition&&this._memoScroll(),this.clear(),this.idProperty=(this.store=r)&&r.idProperty,this.store&&this._isCreated){this._loadNextPart();this._checkIfStillSelected();this.keepScrollPosition&&this.applyScrollFromMemo();
var u=this;this._storeScrollHandler=this._storeScrollHandler||f(this.domNode,"scroll",function(){var v=u._addedWrappers[u._addedWrappers.length-30];(v=v?v.__itemPresentation:null)&&v.offsetTop<u.domNode.scrollTop&&u._loadNextPart()})}else this._checkIfStillSelected()},_loadNextPart:function(){if(this.store&&this.store.query().length!=this._addedWrappers.length){var r=this.store.query(null,{start:this._addedWrappers.length,count:this.onDemandModeLoadStep});delete r.total;this._addItems(r);r.length&&
this._addedWrappers.length<this.onDemandPopulateLimit&&(r=this._loadNextPart.bind(this),setTimeout(r,this.onDemandPopulatePeriod))}},isMouseOver:function(r){return a.isMouseOver(this.domNode,{event:r})},onChange:function(r){},onItemsSet:function(){},destroy:function(){this.clear();this.inherited(arguments)}});q.createPopup=function(r){function u(){v||(v=new q({"class":r.listClass,itemRenderer:r.itemRenderer,items:r.options,onChange:function(w){r.onChange(w);!r.keepSelection&&v.setSelectedItem(null);
g.close(v)}}),r.doNotOwn||r.wizard.own(v),r.isDeferred&&r.isDeferred(v));return v}var v;g.makePopup(r.isDeferred?u:u(),r.wizard,r.aroundNode,r.popupOptions||{});return v};return q})},"esri/dijit/geoenrichment/lists/FlowListDefaultItemRenderer":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-class dojo/dom-construct ../utils/DomUtil ../utils/TooltipUtil ../utils/RegExpUtil ../utils/UrlUtil".split(" "),function(t,p,l,k,f,d,c,a){return t(null,{itemClass:"",itemClassSelected:"",labelClass:"",
createLabelNode:!1,createImageAfterLabel:!1,constructor:function(e){p.mixin(this,e)},createPresentation:function(e,b,g,h,m){if(e.isSeparator)return b=k.create("div",{"class":"flowList_listSeparator"},g),e.hidden&&f.hide(b),b;g=k.create("div",{"class":"listItem "+(this.itemClass||" ")+(e.itemClass||""),style:e.style},g);e.isLink&&l.add(g,"esriGELink");!1===e.enabled&&l.add(g,"disabled");this._createParts(e,g,h);this._setTooltip(e,g,h);this.selectPresentation(g,b,e);e.hidden&&f.hide(g);return g},_setTooltip:function(e,
b,g){e.tooltip&&g.own(d.setTooltipToNode(b,e.tooltip))},_createParts:function(e,b,g){if(this.createImageAfterLabel){this._createLabel(e,b,g);var h=!0}this._createImage(e,b,g);!h&&this._createLabel(e,b,g)},_createImage:function(e,b,g){if(b=this._createImageNode(e,b,g))e.imageClass&&l.add(b,e.imageClass),e.imageUrl&&(b.style="background-image: url("+e.imageUrl+");")},_createImageNode:function(e,b,g){return b},_createLabel:function(e,b,g){if(this.createLabelNode)return b=k.create("div",{innerHTML:e[g.labelProperty],
"class":"dijitInline TrimWithEllipses listItemLabel"},b),e.labelClass&&l.add(b,e.labelClass),this.labelClass&&l.add(b,this.labelClass),g.autoDetectUrlsInLabels&&this._tryConvertToUrls(b),b;e[g.labelProperty]&&(b.innerHTML=e[g.labelProperty],g.autoDetectUrlsInLabels&&this._tryConvertToUrls(b))},_tryConvertToUrls:function(e){var b=e.innerHTML.match(c.IS_URL_RE);if(b=b&&b[0])e.innerHTML=e.innerHTML.replace(b,"\x3ca href\x3d'"+a.toHttpsUrl(b)+"' target\x3d'_blank'\x3e"+b+"\x3c/a\x3e")},selectPresentation:function(e,
b,g){l[b?"add":"remove"](e,"listItemSelected "+this.itemClassSelected)}})})},"esri/dijit/geoenrichment/utils/RegExpUtil":function(){define([],function(){var t={createRegExp:function(a,e,b){a=t.trimText(a);return!a&&b?null:new RegExp(a,e)},trimText:function(a){return a?a.replace(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,"").trim():""},replace:function(a,e,b){return null==a?"":(""+a).replace(e,function(g){return b[g]||""})}},p=/&|<|>/g,l=/&|<|>|"|'/g,k={"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;",'"':"\x26quot;",
"'":"\x26apos;"};t.encodeXML=function(a,e){return t.replace(a,e?l:p,k)};var f=/&amp;|&lt;|&gt;|&quot;|&apos;/g,d={"\x26amp;":"\x26","\x26lt;":"\x3c","\x26gt;":"\x3e","\x26quot;":'"',"\x26apos;":"'"};t.decodeXML=function(a){return t.replace(a,f,d)};t.IS_RICH_TEXT_RE=/<\w/;t.IS_URL_RE=/((www\.|http:\/\/|https:\/\/)[A-Za-z0-9_.\-~]+\.[A-Za-z0-9_.\-~/]+)|([A-Za-z0-9_.\-~]+\.com[A-Za-z0-9_.\-~/]*)/;t.isRichText=function(a){return a&&t.IS_RICH_TEXT_RE.test(a)};t.isUrl=function(a){return a&&t.IS_URL_RE.test(a)};
var c=/^[0-9a-fA-F]{32}$/;t.isId=function(a){return a&&c.test(a)};return t})},"esri/dijit/geoenrichment/utils/PopupUtil":function(){define("dojo/_base/lang esri/dijit/geoenrichment/utils/onClickTouch dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style esri/dijit/geoenrichment/when esri/dijit/geoenrichment/ReportPlayer/config dijit/popup dijit/place dijit/Viewport ./DeviceUtil ./DnDUtil ./MouseUtil dojo/domReady!".split(" "),function(t,p,l,k,f,d,c,a,e,b,g,h,m,n){function q(u){if(!u)return["below"];
var v=[];u.forEach(function(w){var A=f.isBodyLtr();switch(w){case "before-alt":A=!A;case "after-alt":v.push(A?{aroundCorner:"BR",corner:"BL"}:{aroundCorner:"BL",corner:"BR"});v.push(A?{aroundCorner:"TR",corner:"TL"}:{aroundCorner:"TL",corner:"TR"});return}v.push(w)});return v}var r={makePopup:function(u,v,w,A){function E(O){if(A.overlay&&O._popupWrapper){var S=k.create("div",{"class":A.overlay.overlayClass});if(A.overlay.overlayParent)k.place(S,A.overlay.overlayParent);else{k.place(S,H,"before");
var R=d.get(O._popupWrapper,"zIndex");d.set(S,"zIndex",R)}O.__popupOverlay=S}}function F(O){O.__popupOverlay&&(k.destroy(O.__popupOverlay),O.__popupOverlay=null)}function D(O){G=!1;O.__bodyClickHandler&&O.__bodyClickHandler.remove();O.__bodyClickHandler=null;O.__popupWidgetOpenFlag=!1;F(O);A.onClose&&A.onClose()}function B(O){O&&A.stopEventPropagation&&O.stopPropagation();G||(G=!0,c(z||("function"==typeof u?u():u),function(S){z=S;z.domNode?(z.__openPopupWidgetFunc=B,H=e.moveOffScreen(z),c(A.onPreShow&&
A.onPreShow(),function(){var R=q(A.orient);if(H&&!1!==A.allowAutoOrientation){var U=R.indexOf("below");-1!==U&&-1===R.indexOf("above")&&R.splice(U+1,0,"above")}U=-1;if(-1!==R.indexOf("after")||-1!==R.indexOf("before")){U=g.getEffectiveBox(this.ownerDocument);var Z=f.position(w,!1);U=Math.floor(Math.max(Z.y+Z.h,U.h-Z.y))-10}A.noOverflow&&(z.baseClass="esriGENoOverflow "+z.baseClass);v.isLeftToRight=v.isLeftToRight=function(){return"rtl"!==document.dir};e.open({parent:v,popup:z,around:w,maxHeight:U,
orient:R,onClose:function(){D(z)}});e._stack[e._stack.length-1].handlers.forEach(function(X){X.remove()});A.suppressReposition&&clearTimeout(e._aroundMoveListener);A.noOverflow&&(z.baseClass=z.baseClass.replace("esriGENoOverflow ",""));H&&A.wrapperClass&&l.add(H,A.wrapperClass);z.__popupInfo=t.mixin({},e.getTopPopup());z.__popupInfo.orient=R;z.__popupInfo.around=w;F(z);E(z);A.onShow&&A.onShow(z);z.__popupWidgetOpenFlag=!0;N&&z.own&&z.own(N);z.__bodyClickHandler&&z.__bodyClickHandler.remove();if(!1!==
A.closeOnClickOutside){var da="function"===typeof A.closeOnClickOutside?A.closeOnClickOutside:null;setTimeout(function(){z.__bodyClickHandler&&z.__bodyClickHandler.remove();z.__bodyClickHandler=p(document.body,h.isMobileDevice()?h.press:y,function(X){G&&(n.fixTouchEvent(X),da&&!da(X)||n.isMouseOver(H)||A.isMouseOver&&A.isMouseOver()||z.isMouseOver&&z.isMouseOver()||z.__lockPopupWidgetFlag||r.close(z))})})}})):G=!1}))}if(u){if(a.isPlayerOnServer)return{remove:function(){}};A=A||{};var y=A.openMouseEvent?
A.openMouseEvent:h.clickOrRelease,z="function"!==typeof u?u:null;if(z)var H=e.moveOffScreen(z);var G=!1;z&&(z.__openPopupWidgetFunc=B);if(!1!==A.openOnMouseEvent){var I=B;if(A.toggleOnClick){var L;I=function(O){L=L||O.type;z?L===O.type&&r.toggle(z):B()}}var N=!1===A.onClickComponent?null:void 0!==A.noDragClickTolerance?m.addNoDragClickHandler(A.onClickComponent||w,I,{tolerance:A.noDragClickTolerance}):p(A.onClickComponent||w,y,I)}A.openPopup&&B();return{remove:function(){z&&"function"!==typeof z&&
(r.close(z),D(z),z._popupWrapper&&(z.domNode&&z.domNode.parentNode===z._popupWrapper&&z._popupWrapper.removeChild(z.domNode),k.destroy(z._popupWrapper),delete z._popupWrapper),delete z.__openPopupWidgetFunc,delete z.__popupWidgetOpenFlag);N&&N.remove()}}}},setLocked:function(u,v){u.__lockPopupWidgetFlag=v},open:function(u){u&&!u.__lockPopupWidgetFlag&&!u.__popupWidgetOpenFlag&&u.__openPopupWidgetFunc&&u.__openPopupWidgetFunc()},close:function(u){u&&!u.__lockPopupWidgetFlag&&e.close(u)},isOpen:function(u){return!(!u||
!u.__popupWidgetOpenFlag)},toggle:function(u){r.isOpen(u)?r.close(u):r.open(u)},refresh:function(u){if(u){u=u.__popupInfo;var v=f.isBodyLtr();u&&b.around(u.wrapper,u.around,u.orient,v)}},getWrapper:function(u){return u&&u._popupWrapper}};return r})},"esri/dijit/geoenrichment/utils/onClickTouch":function(){define(["dojo/_base/lang","dojo/on","dojo/sniff"],function(t,p,l){var k=l("touch");return t.mixin(function(f,d,c,a){if(k){switch(d){case "click":d="touchstart,click";break;case "mousedown":d="touchstart,mousedown";
break;case "mouseup":d="touchend,mouseup";break;case "clickend":d="touchend,click";break;default:return p(f,d,c,a)}var e=!1;return p(f,d,function(b){"touchstart"===b.type||"touchend"===b.type?(c.call(this,b),e=!0,setTimeout(function(){e=!1},500)):e||c.call(this,b)},a)}"clickend"===d&&(d="click");return p(f,d,c,a)},p)})},"esri/dijit/geoenrichment/utils/AccessibilityUtils":function(){define(["exports"],function(t){function p(k,f,d){var c=d?d:"AriaLabelID_"+l++;f.id=c;Array.isArray(k)?k.forEach(function(a){a.setAttribute("aria-labelledby",
c)}):k.setAttribute("aria-labelledby",c);return c}var l=0;t.setId=function(k,f){f=f?f:"AriaLabelID_"+l++;return k.id=f};t.setLabeledBy=p;t.setLabeledByToFocusNode=function(k,f,d){var c=k.focusNode;if(!c)return null;var a=f&&f.getAttribute("id");a=p(c,f,a||d);k.sliderHandleMax&&p(k.sliderHandleMax,f,a);return a};t.setLabelToFocusNode=function(k,f){var d=k.focusNode;if(!d)return null;d.setAttribute("aria-label",f);k.sliderHandleMax&&k.sliderHandleMax&&k.sliderHandleMax.setAttribute("aria-label",f);
return f};t.registerButton=function(k,f,d){k&&(k.setAttribute("tabindex","0"),d&&k.setAttribute("aria-label",d),k.addEventListener("keydown",function(c){13===c.keyCode&&f()}))}})},"esri/dijit/geoenrichment/lists/_FlowListHoverSupport":function(){define(["dojo/_base/declare","dojo/on","../utils/MouseUtil"],function(t,p,l){var k=t(null,{_list:null,_checkIntervalH:null,constructor:function(f){this._list=f},setHoveredItem:function(f){clearInterval(this._checkIntervalH);this._emitHoverEvent(f);this._checkIntervalH=
setInterval(function(){l.isMouseOver(f)||this.setHoveredItem(null)}.bind(this),100)},_emitHoverEvent:function(f){this._list.onItemHovered({type:"itemHover",index:f?f.index:-1,item:f?f.item:null,value:f?f.item[this._list.idProperty]:void 0})}});return t(null,{_mouseHelper:null,postCreate:function(){this._mouseHelper=new k(this);this.inherited(arguments)},_addClickHandler:function(f){this.inherited(arguments);this._clickHandles.push(p(f,"mouseover",function(){this._mouseHelper.setHoveredItem(f)}.bind(this)))},
onItemHovered:function(f){}})})},"esri/dijit/geoenrichment/ReportPlayer/toolbar/AreasSelect":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-class dojo/dom-construct esri/dijit/geoenrichment/TriStateItem esri/dijit/geoenrichment/ToggleButton esri/dijit/geoenrichment/lists/FlowListDefaultItemRenderer ../PlayerViewModes ./Select ./ComparisonSettings ../dataProvider/supportClasses/areas/AnalysisAreaUtil esri/dijit/geoenrichment/utils/DeviceUtil esri/dijit/geoenrichment/utils/PopupUtil esri/dijit/geoenrichment/utils/TooltipUtil dojo/i18n!esri/nls/jsapi".split(" "),
function(t,p,l,k,f,d,c,a,e,b,g,h,m,n,q){q=q.geoenrichment.dijit.ReportPlayer.PlayerToolbar;var r=t(c,{canRemoveAreas:!1,canMoveAreas:!1,wrapInCards:!1,nls:null,createPresentation:function(u,v,w,A){var E=this,F=this.inherited(arguments);if(u.isSeparator)return F;F.innerHTML="";if("all"===u.value){F.style.cursor="pointer";var D=k.create("div",{"class":"dijitInline esriGEReportPlayerToolbar_checkboxRoot"},F);(new d(D,{mode:"toggle"})).set("checked",this.isCompareAll());k.create("div",{"class":"dijitInline",
innerHTML:u.label},F);F.addEventListener("click",function(){if(E.isCompareAll())E.onStopComparison();else E.onCompareAreasSideBySide()});n.setTooltipToNode(F,this.isCompareAll()?this.nls.compareAreasSideBySideTooltipOff:this.nls.compareAreasSideBySideTooltipOn,{position:["before","after"]});return F}if("addAreas"===u.value)return F.style.cursor="pointer",k.create("div",{"class":"dijitInline esriGESpaceAfterBig esriGEReportPlayerToolbar_addMoreAreasIcon"},F),k.create("div",{"class":"dijitInline",innerHTML:u.label},
F),F.addEventListener("click",function(){E.onAddMoreAreas()}),F;if(u.isAdditional)return F.style.cursor="pointer",u.buttonInfo.imageClass&&k.create("div",{"class":"dijitInline esriGESpaceAfterBig "+u.buttonInfo.imageClass},F),k.create("div",{"class":"dijitInline",innerHTML:u.label},F),F.addEventListener("click",function(y){u.buttonInfo.callback(y);E.onClosePopup()}),u.buttonInfo.tooltip&&(D=k.create("div",{"class":"dijitInline esriGESpaceBeforeBig esriGEInfoIcon"},F),n.setTooltipToNode(D,u.buttonInfo.tooltip,
u.buttonInfo.tooltipParams)),u.buttonInfo.onCreated&&u.buttonInfo.onCreated(F),F;if(u.canSelect){D=k.create("div",{"class":"dijitInline esriGEReportPlayerToolbar_checkboxRoot"},F);var B=new f(D);B.autoToggle=!1;B.set("checked",u.selected);F.addEventListener("click",function(){u.selected=!u.selected;B.set("checked",u.selected);u.isGroup?u.children.forEach(function(y){y.selected=u.selected}):u.parent&&(u.parent.selected=u.parent.children.some(function(y){return y.selected}));E.onVisibilityChanged()})}this.canRemoveAreas&&
u.isHost&&(D=k.create("div",{"class":"esriGEFloatEnd esriGESpaceBeforeBig esriGEReportPlayerToolbar_removeAreaButton"},F),D.addEventListener("click",function(y){y.stopPropagation();E.onRemoveAreas(u.isArea?[u.analysisArea]:u.analysisAreas)}),n.setTooltipToNode(D,u.isGroup?this.nls.removeAreasFromInfographic:this.nls.removeAreaFromInfographic));this.canMoveAreas&&u.isHost&&this.isCompareAll()&&(D=k.create("div",{"class":"esriGEFloatEnd upDownArrowsBlock"},F),0<u.hostIndex&&k.create("div",{"class":"dijitInline upArrow"},
D).addEventListener("click",function(y){y.stopPropagation();E.onMoveUp(u)}),u.hostIndex<this.getNumHostItems()-1&&k.create("div",{"class":"dijitInline downArrow"},D).addEventListener("click",function(y){y.stopPropagation();E.onMoveDown(u)}));D=k.create("div",{"class":"dijitInline",innerHTML:u.label},F);u.parent&&(D.style.paddingLeft="20px");this.wrapInCards&&(u.isArea&&!u.parent?l.add(F,"areaCard_only"):u.isGroup?l.add(F,"areaCard_groupTop"):u.isArea&&l.add(F,u.parent.children.indexOf(u)===u.parent.children.length-
1?"areaCard_groupBottom":"areaCard_groupMiddle"));this.selectPresentation(F,v,u);return F},isCompareAll:function(){return!1},getNumHostItems:function(){return 0},onAddMoreAreas:function(){},onRemoveAreas:function(u){},onVisibilityChanged:function(){},onMoveUp:function(u){},onMoveDown:function(u){},onCompareAreasSideBySide:function(){},onStopComparison:function(){},onClosePopup:function(){}});return t(e,{"class":"dijitInline esriGEOnDemandSelectNoBackground",listClass:"esriGEOnDemandSelectVeryTallList800 esriGEOnDemandSelectSpacedOut esriGEReportPlayerToolbar_areasSelectList",
player:null,canAddMoreAreas:!1,areasSelectButtons:null,comparisonSettingsBlock:null,comparisonSettings:null,_nls:null,buildRendering:function(){var u=this;this.inherited(arguments);this._nls=p.mixin({},q,this.player.nlsMap);this.itemRenderer=new r({nls:this._nls,onAddMoreAreas:function(){u.onAddMoreAreas();u.closePopup()},onRemoveAreas:function(v){var w=2>=u._getNumHostItems();u.onRemoveAreas(v,w);w&&u.closePopup()},isCompareAll:function(){return u.player.viewMode===a.PANELS_IN_STACK_ALL},getNumHostItems:function(){return u._getNumHostItems()},
onVisibilityChanged:function(){var v={};u.get("options").forEach(function(w){w.isArea&&(v[w.analysisArea.index]=w.selected)});u.refresh();u.player.getCurrentReportContainer().setAreasVisibilityState(v,{append:!0})},onMoveUp:function(v){},onMoveDown:function(v){},onCompareAreasSideBySide:function(){u.onCompareAreasSideBySide();u.closePopup()},onStopComparison:function(){var v=-1;u.get("options").some(function(w){if(w.analysisArea&&!w.analysisArea.hidden)return v=w.analysisArea.index,!0});u.onStopComparison(v);
u.closePopup()},onClosePopup:function(){u.closePopup()}})},_buildAdditionalPopupListProperties:function(){var u=this;return{selectionValidator:function(v){return u.player.viewMode!==a.PANELS_IN_STACK_ALL&&!!v&&!v.isSeparator&&!1!==v.enabled}}},buildAreaOptions:function(u){var v=g.groupAreas(u),w=1<v.groupInfos.length&&!v.isOnlyAreasInOnlyGroup;this.itemRenderer.wrapInCards=w;this.itemRenderer.canRemoveAreas=w&&!h.isMobileDevice();this.itemRenderer.canMoveAreas=!1;var A=[],E=0;v.groupInfos.forEach(function(F,
D){if(F.isRealGroup){var B={isGroup:!0,isHost:!0,hostIndex:E++,label:F.label,value:"group_"+D,enabled:!1,analysisAreas:F.areas,children:[]};A.push(B)}F.areas.forEach(function(y){y={isArea:!0,label:y.shortName||y.name||"",value:y.index,analysisArea:y,parent:B,isHost:!B};y.isHost&&(y.hostIndex=E++);A.push(y);B&&B.children.push(y)})});v={isSeparator:!0};A.push(v);this.player.viewMode!==a.PANELS_IN_SLIDES&&(!h.isMobileDevice()&&1<u.analysisAreas.filter(function(F){return!F.hidden}).length&&A.push({label:this._nls.compareAreasSideBySide,
value:"all"}),this.canAddMoreAreas&&A.push({label:this._nls.addMoreAreas,value:"addAreas"}));this.areasSelectButtons&&this.areasSelectButtons.forEach(function(F){F.isVisible&&!F.isVisible()||A.push({label:F.label,value:F.id,isAdditional:!0,buttonInfo:F})});A[A.length-1]===v&&A.pop();this._updateTreeSelection(A);this.set("options",A);this._updateComparisonSettings()},_getNumHostItems:function(){var u=0;this.get("options").some(function(v){v.isHost&&u++});return u},onPopupListPreBuild:function(){this._updateTreeSelection()},
_updateTreeSelection:function(u){if(this.player.viewMode===a.PANELS_IN_STACK_ALL){var v=this.player.getCurrentReportContainer().getAreasVisibilityState();u=u||this.get("options");u.forEach(function(w){if(w.isGroup||w.isArea)w.canSelect=!0,w.isGroup?(w.children.forEach(function(A){A.selected=v[A.analysisArea.index]}),w.selected=w.children.some(function(A){return A.selected})):w.selected=v[w.analysisArea.index]})}},_updateComparisonSettings:function(){var u=this;this.comparisonSettings&&this.comparisonSettings.destroy();
this.comparisonSettings=null;this.comparisonSettingsBlock&&k.destroy(this.comparisonSettingsBlock);this.comparisonSettingsBlock=null;this.player.viewMode===a.PANELS_IN_STACK_ALL&&(this.comparisonSettingsBlock=k.create("div",{"class":"dijitInline esriGEClickable"},this.domNode.parentNode),k.create("div",{"class":"dijitInline esriGESpaceBeforeBig esriGEIcon16 esriGEReportPlayerToolbar_comparisonSettingsIcon"},this.comparisonSettingsBlock),m.makePopup(function(){u.comparisonSettings||(u.comparisonSettings=
new b({player:u.player,onChange:function(){u.player.getCurrentReportContainer().setComparisonSettings(u.comparisonSettings.getSettings())}}));u.comparisonSettings.setSettings(u.player.getCurrentReportContainer().getComparisonSettings());return u.comparisonSettings},this,this.comparisonSettingsBlock))},onAddMoreAreas:function(){},onRemoveAreas:function(u,v){},onCompareAreasSideBySide:function(){},onStopComparison:function(u){},destroy:function(){this.comparisonSettings&&this.comparisonSettings.destroy();
this.inherited(arguments)}})})},"esri/dijit/geoenrichment/TriStateItem":function(){define("dojo/_base/declare dojo/_base/event dojo/_base/lang dojo/Stateful dojo/on dojo/dom-construct dojo/dom-class ./utils/DeviceUtil ./utils/AccessibilityUtils".split(" "),function(t,p,l,k,f,d,c,a,e){return t(k,{domNode:null,checkboxNode:null,checked:!1,disabled:!1,autoToggle:!0,_currentClass:null,_lastChecked:!1,constructor:function(b,g,h,m){var n=a.isMobileDevice()?"touchstart":"click";g=g||{};var q=g["class"];
g["class"]=(q?q+" ":"")+"esriTriStateCheckBoxIcon";if(q=g.label){if(b instanceof HTMLLabelElement)b.innerHTML="\x26nbsp;"+q;else{var r=g.labelAttrs||{};r.innerHTML="\x26nbsp;"+q;r=d.create("label",r);b&&d.place(r,b);b=r}g=l.mixin({},g);delete g.label;delete g.labelAttrs}this.checkboxNode=d.create("div",g,b,b instanceof HTMLLabelElement?"first":h);this._currentClass=this._composeClass();c.add(this.checkboxNode,this._currentClass);b instanceof HTMLLabelElement?(f(b,n,l.hitch(this,this._onClick)),c.add(b,
"esriTriStateCheckBoxLabel"),m&&e.registerButton(b,this._onClick.bind(this),q)):(f(this.checkboxNode,n,l.hitch(this,this._onClick)),m&&e.registerButton(this.checkboxNode,this._onClick.bind(this),q));this.domNode=q?b:this.checkboxNode},postscript:function(){},_onClick:function(b){this.disabled||(this.autoToggle&&this.toggle(),b&&(b.checked=this.checked),this.onClick(p.fix(b)))},onClick:function(b){},toggle:function(){this.set("checked",!this._lastChecked);return this.checked},_checkedSetter:function(b){b!==
this.checked&&(this.checked="mixed"===b?b:this._lastChecked=!!b,this._updateClass())},_disabledSetter:function(b){this.disabled=!!b;this._updateClass()},_updateClass:function(){var b=this._composeClass();b!==this._currentClass&&(c.replace(this.checkboxNode,b,this._currentClass),this._currentClass=b)},_composeClass:function(){var b="esriTriStateCheckBox"+("mixed"==this.checked?"Mixed":this.checked?"Checked":"");return this.disabled?b+"Disabled":b}})})},"esri/dijit/geoenrichment/ToggleButton":function(){define(["dojo/_base/declare",
"dojo/Stateful","dojo/on","dojo/dom-construct","dojo/dom-class"],function(t,p,l,k,f){return t(p,{domNode:null,checked:!1,disabled:!1,mode:"toggle",constructor:function(d,c,a){c=c||{};var e=c["class"];this.checked=!!c.checked;this.mode=c.mode||"toggle";this.domNode=k.create("div",{"class":(e?e+" ":"")+"esriGEToggleButton"},d,a);this._updateClass();l(this.domNode,"click",function(b){this.disabled||(b.checked=this.toggle(),this.onClick(b))}.bind(this))},postscript:function(){},_checkedSetter:function(d){this.checked=
!!d;this._updateClass()},_modeSetter:function(d){this.mode=d;this._updateClass()},_disabledSetter:function(d){this.disabled=d;this._updateClass()},_updateClass:function(){f.remove(this.domNode,"checked unchecked switch toggle");f.add(this.domNode,"toggle"===this.mode?"toggle":"switch");f.add(this.domNode,this.checked?"checked":"unchecked");f[this.disabled?"add":"remove"](this.domNode,"disabled")},onClick:function(d){},toggle:function(){this.set("checked",!this.checked);return this.checked}})})},"esri/dijit/geoenrichment/ReportPlayer/toolbar/ComparisonSettings":function(){define("dojo/_base/declare esri/dijit/geoenrichment/TriStateItem dijit/_WidgetBase dijit/_TemplatedMixin esri/dijit/geoenrichment/utils/DomUtil esri/dijit/geoenrichment/utils/NodeLabelEditor esri/dijit/geoenrichment/utils/TooltipUtil dojo/text!../templates/ComparisonSettings.html dojo/i18n!esri/nls/jsapi".split(" "),
function(t,p,l,k,f,d,c,a,e){e=e.geoenrichment.dijit.ReportPlayer.PlayerToolbar;return t([l,k],{templateString:a,nls:e,player:null,showBackgroundImageCheckbox:null,splitPanelsCheckbox:null,postCreate:function(){var b=this;this.inherited(arguments);this.showBackgroundImageCheckbox=new p(this.showBackgroundImageLabel);this.showBackgroundImageCheckbox.onClick=function(){b._onChange()};this.splitPanelsCheckbox=new p(this.splitPanelsLabel);this.splitPanelsCheckbox.onClick=function(){b._update();b._onChange()};
c.setTooltipToNode(this.splitPanelsInfoIcon,e.splitPanelsTooltip);var g=this.player.nlsMap&&this.player.nlsMap.zoomPanelsTooltip||e.zoomPanelsTooltip;f[g?"show":"hide"](this.zoomPanelsInfoIcon);c.setTooltipToNode(this.zoomPanelsInfoIcon,g);this._initZoomControls();this._initZoomSplitControls()},_zoomEditor:null,_zoom:0,_initZoomControls:function(){var b=this;this._zoomEditor=new d({numericOnly:!0,onApply:function(g){b._setZoom(g)},onCancel:function(){b._updateZoomLabel()}});this.zoomLabel.addEventListener("click",
function(){b._zoomEditor.range={min:10,max:500};b._zoomEditor.editNodeLabel(b.zoomLabel,b._zoom)});this.zoomOutButton.addEventListener("click",function(){b._setZoom(Math.max(10,b._zoom-10))});this.zoomInButton.addEventListener("click",function(){b._setZoom(Math.min(500,b._zoom+10))});this.resetButton.addEventListener("click",function(){b._setZoom(100)})},_setZoom:function(b,g){b=Math.round(b);this._zoom!==b&&(this._zoom=b,this._updateZoomLabel(),this._update(),!g&&this._onChange())},_updateZoomLabel:function(){this.zoomLabel.innerHTML=
this._zoom+"%"},_zoomSplitEditor:null,_zoomSplit:0,_initZoomSplitControls:function(){var b=this;this._zoomSplitEditor=new d({numericOnly:!0,onApply:function(g){b._setZoomSplit(g)},onCancel:function(){b._updateZoomSplitLabel()}});this.zoomSplitLabel.addEventListener("click",function(){b._zoomSplitEditor.range={min:10,max:500};b._zoomSplitEditor.editNodeLabel(b.zoomSplitLabel,b._zoomSplit)});this.zoomOutSplitButton.addEventListener("click",function(){b._setZoomSplit(Math.max(10,b._zoomSplit-10))});
this.zoomInSplitButton.addEventListener("click",function(){b._setZoomSplit(Math.min(500,b._zoomSplit+10))});this.resetSplitButton.addEventListener("click",function(){b._setZoomSplit(100)})},_setZoomSplit:function(b,g){b=Math.round(b);this._zoomSplit!==b&&(this._zoomSplit=b,this._updateZoomSplitLabel(),this._update(),!g&&this._onChange())},_updateZoomSplitLabel:function(){this.zoomSplitLabel.innerHTML=this._zoomSplit+"%"},_update:function(){this.resetButton.style.visibility=100===this._zoom?"hidden":
"visible";this.resetSplitButton.style.visibility=100===this._zoomSplit?"hidden":"visible";f.hide([this.zoomBlock,this.zoomSplitBlock]);f.show(this.splitPanelsCheckbox.get("checked")?this.zoomSplitBlock:this.zoomBlock)},setSettings:function(b){this.showBackgroundImageCheckbox.set("checked",!b.hideBackgroundImage);this.splitPanelsCheckbox.set("checked",b.splitPanels);this._setZoom(100*(b.scale||1),!0);this._setZoomSplit(100*(b.scaleSplit||1),!0);this._update()},getSettings:function(){return{hideBackgroundImage:!this.showBackgroundImageCheckbox.get("checked"),
splitPanels:this.splitPanelsCheckbox.get("checked"),scale:this._zoom/100,scaleSplit:this._zoomSplit/100}},_onChange:function(){this._update();this.onChange()},onChange:function(){}})})},"esri/dijit/geoenrichment/utils/NodeLabelEditor":function(){define("dojo/_base/declare dojo/_base/lang dojo/on dojo/keys dojo/dom-construct dojo/dom-geometry dojo/dom-style esri/dijit/geoenrichment/utils/MouseUtil esri/dijit/geoenrichment/utils/ObjectUtil".split(" "),function(t,p,l,k,f,d,c,a,e){return t(null,{_textMemo:null,
_handlers:null,_textBox:null,_node:null,numericOnly:!1,range:null,keepLabelDimensions:!0,constructor:function(b){p.mixin(this,b)},editNodeLabel:function(b,g){var h=this;this._stopEdit();this._node=b;this._textMemo="string"===typeof g||"number"===typeof g?g:b.innerHTML;g=d.position(b).w;b.innerHTML="";this._textBox=f.create("input",{type:"text"},b);this._textBox.name="node-label";this._textBox.value=this._textMemo;this._textBox.focus();this._textBox.select();this.keepLabelDimensions&&c.set(this._textBox,
"width",g+"px");this._handlers=[l(document.body,"keyup",function(m){m.keyCode===k.ESCAPE?h._cancelEdit():m.keyCode===k.ENTER&&h._applyEdit()}),l(document.body,"click",function(){a.isMouseOver(b)||h._cancelEdit()})]},_checkCanApply:function(b){if(!this.numericOnly)return!0;b=e.parseNumber(b);return isNaN(b)||this.range&&void 0!==this.range.min&&this.range.min>b||this.range&&void 0!==this.range.max&&this.range.max<b?!1:!0},_applyEdit:function(){var b=this._textBox.value;this._checkCanApply(b)?(this._node.innerHTML=
b,this._stopEdit(),this.onApply(b)):this._cancelEdit()},_cancelEdit:function(){this._node.innerHTML=this._textMemo;this._stopEdit();this.onCancel()},_stopEdit:function(){this._handlers&&this._handlers.forEach(function(b){b.remove()});this._textMemo=this._handlers=null;f.destroy(this._textBox);this._node=this._textBox=null},onApply:function(b){},onCancel:function(){}})})},"esri/dijit/geoenrichment/utils/ObjectUtil":function(){define(["dojo/number","./DateUtil"],function(t,p){var l={};Math.log10=Math.log10||
function(f){return Math.log(f)*Math.LOG10E};l.populateObject=function(f,d,c){function a(e,b){function g(m){var n=e[m],q=b[m],r=n&&"object"===typeof n;void 0!==n&&(void 0===q?b[m]=n:q&&"object"===typeof q&&r?a(n,q):c&&(r?(q=b[m]={},a(n,q)):b[m]=e[m]))}if(e&&b&&!(Array.isArray(e)&&!Array.isArray(b)||Array.isArray(b)&&!Array.isArray(e)))if(Array.isArray(e))e.forEach(function(m,n){g(n)});else for(var h in e)g(h)}a(d,f);return f};l.filterByPattern=function(f,d){function c(e,b,g){for(var h in e){var m=
e[h],n=b[h];if(Array.isArray(m)){var q=m[0];if(n&&Array.isArray(n)){var r=g[h]=[];n.forEach(function(v){if(v&&"object"===typeof v){var w=Array.isArray(v)?[]:{};c(q,v,w);r.push(w)}})}}else if("object"===typeof m){if(n&&"object"===typeof n){var u=g[h]={};c(m,n,u)}}else void 0!==n&&(g[h]=n)}}var a={};c(d,f,a);return a};l.traverseObject=function(f,d){for(var c in f){var a=f[c];d(a,c,f);a&&"object"===typeof a&&l.traverseObject(a,d)}};l.copyOwnJsonProperties=function(f,d,c){d=d||{};for(var a in f){var e=
f[a];f.hasOwnProperty(a)&&"function"!=typeof e&&(e&&"object"==typeof e&&c&&(e=c(a,e)),void 0!==e&&(d[a]=e))}return d};l.removeUndefinedProperties=function(f){f&&Object.keys(f).forEach(function(d){void 0===f[d]&&delete f[d]});return f};l.getValue=function(f,d){if("string"!==typeof d)return f;d=d.split(".");for(var c=0;c<d.length;c++)f=f&&f[d[c]];return f};l.setValue=function(f,d,c){if("string"===typeof d&&(d=d.split("."),d.length)){for(var a=0;a<d.length-1;a++)f=f&&f[d[a]];f&&(f[d[d.length-1]]=c)}};
l.isNumber=function(f){return!isNaN(parseFloat(f))&&isFinite(f)};l.roundNumber=function(f,d){return"number"!==typeof f?f:parseFloat(f.toFixed(void 0!==d?d:0))};l.getBestPrecision=function(f){return 0===f?0:Math.max(0,Math.round(Math.log10(3E3/Math.abs(f))))};l.getPlaces=function(f,d){function c(h,m){var n=f.indexOf(h,a);if(0>n)return e;h=f.charAt(n+h.length);return!h||0>m.indexOf(h)?e:n-a}f=+f;if(isNaN(f))return-1;f+="";var a=f.indexOf(".")+1,e=a?f.length-a:0;if(2>=e||!d)return e;d=0;if(!+f.substr(0,
a-1))for(;"0"===f.charAt(a);)a++,d++,e--;for(var b=e-1;2<=b;b--){var g=Math.min(c("000000000000000".substr(0,b),"01234"),c("999999999999999".substr(0,b),"56789"));if(g!==e){e=g;break}}return e+d};l.formatNumber=function(f,d){d="number"===typeof d?{places:d}:d||{};var c=d.places,a={};0<=c?a.places=c:c=-1;a.locale=d.locale||p.getDateNumberLocale();f=t.format(f,a);if(d.noSeparator){a=l.getSeparator();var e;if(a)for(;0<=(e=f.indexOf(a));)f=f.substr(0,e)+f.substr(e+1)}if(d.preserveTrailingZeroes||0>=c||
!f)return f;for(d=f.length;0<c&&"0"==f.charAt(d-1);)d--,--c||d--;return f.substr(0,d)};l.formatNumberAsCurrency=function(f,d,c){return d?d.split(";")[0>f?1:0].replace("0",l.formatNumber(Math.abs(f),c)):l.formatNumber(f,c)};var k;l.getSeparator=function(){void 0===k&&(k=t.format(9999,{places:0}).replace(/9/g,""));return k};l.parseNumber=function(f,d,c,a){if(""===f)return"undefined"!==typeof c?c:NaN;if(null==f||"string"!==typeof f&&isNaN(f))return NaN;f=String(f);if(!f.trim())return void 0!==c?c:NaN;
c=t.parse(f,{strict:a,locale:p.getDateNumberLocale()});isNaN(c)&&f.trim().length&&(c=a?t.parse(f,{strict:a,locale:"en-US"}):Number(f));return isNaN(c)||void 0===d||0>d?c:t.round(c,d)};l.parsePercentOrCurrency=function(f,d,c,a,e){"string"===typeof f&&(f=f.replace("%",""),d&&(d=d.split(";")[0].replace("0",""),f=f.replace(d,"")));return l.parseNumber(f,c,a,e)};l.compareEqual=function(f,d,c){return void 0===c?f===d:Number(Number(f).toFixed(c))===Number(Number(d).toFixed(c))};return l})},"esri/dijit/geoenrichment/utils/DateUtil":function(){define(["dojo/date/locale",
"esri/moment"],function(t,p){var l={formatDate:function(k,f){k=l.objectToDate(k);f.locale=f.locale||l.getDateNumberLocale();return k?t.format(k,f):""},formatMoment:function(k,f){return(k=l.objectToTime(k))?p(k).format(f):""},formatDateShort:function(k){return l.formatMoment(k,"L")},formatDateTimeShort:function(k){return l.formatMoment(k,"L LT")},formatLiveTime:function(k){var f=l.formatMoment(k,"l, LT").replace(/\d\d\d\d/,function(d){return d.substr(2)});return f?f+" "+l.formatDate(k,{datePattern:"ZZZZ",
selector:"date"}):""},formatTypicalTime:function(k){return l.formatMoment(k,"ddd LT")},parseDateShort:function(k){return(k=+p(k,"L"))?new Date(k):null},getReportFooterDate:function(k){return t.format(k||new Date,{datePattern:"MMMM d, yyyy",selector:"date"})},getFullYear:function(){return(new Date).getFullYear()},objectToTime:function(k){if(!k)return null;k="string"===typeof k?new Date(k):k;return k.getTime?k.getTime():Number(k)||null},objectToDate:function(k){return k?k.getTime?k:new Date(k):null},
getDateNumberLocale:function(){return window.dojoConfig&&window.dojoConfig.extraLocale&&window.dojoConfig.extraLocale[0]||window.dojo.locale}};return l})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/areas/AnalysisAreaUtil":function(){define(["dojo/_base/lang","esri/geometry/webMercatorUtils","esri/dijit/geoenrichment/utils/CoordinateUtil"],function(t,p,l){var k={geometryToLatLong:function(f){var d=f.spatialReference.wkid;return d===l.WGS_84_WKID?{STORE_LONG:f.x,STORE_LAT:f.y}:
l.isWebMercator(d)?(f=p.xyToLngLat(f.x,f.y),{STORE_LONG:f[0],STORE_LAT:f[1]}):null},populateCombinedAreasInfo:function(f,d){var c={},a={};d.forEach(function(e){e.latitude&&(c[e.latitude]=1);e.longitude&&(a[e.longitude]=1)});f.name=f.name||d.map(function(e){return e.name}).join(", ");f.shortName=f.shortName||d.map(function(e){return e.shortName||e.name}).join(", ");f.description=f.description||d.map(function(e){return e.description||e.name}).join(", ");f.address=f.address||d.map(function(e){return e.address||
e.name}).join(", ");f.latitude=f.latitude||Object.keys(c).join(", ");f.longitude=f.longitude||Object.keys(a).join(", ");return f},groupAreas:function(f){function d(h){var m=h.locationName||h.name;return{isSingleAreaGroup:!0,label:m,hideGroupLabel:m===(h.shortName||h.name),areas:[h]}}var c=f.combinedAreasInfo&&f.combinedAreasInfo.groups||[],a=[],e=[],b={};f.analysisAreas.forEach(function(h){if((!f.filter||f.filter(h))&&!h.hidden)if(h.isGrouped){if(!b[h.groupIndex]){var m=c[h.groupIndex];m=b[h.groupIndex]=
{isRealGroup:!0,label:m.locationName||m.name,areas:[]};e.push(m);a.push(m)}b[h.groupIndex].areas.push(h)}else a.push(d(h))});if(1===a.length&&a[0].isRealGroup){a=a[0].areas.map(d);e.length=0;var g=!0}return{groupInfos:a,isOnlyAreasInOnlyGroup:g}},parseSites:function(f){if(f.sites){f.analysisAreas=[];f.sites.forEach(function(c){c.areas.forEach(function(a){f.analysisAreas.push(a)})});f.combinedAreasInfo={groups:f.sites.map(function(c){var a=t.mixin({},c);delete a.areas;delete a.attributes;delete a.notes;
delete a.images;a.indexes=c.areas.map(function(e){return f.analysisAreas.indexOf(e)});return a})};k.populateCombinedAreasInfo(f.combinedAreasInfo,f.sites);if(!f.attachmentsProvider||!f.attachmentsProvider.getAttributesForAreaAt){f.attachmentsProvider={};f.attachmentsProvider.supportsMultipleAreas=1<f.sites.length;var d=f.attachmentsProvider.areaAttachments=[];f.sites.forEach(function(c){c.areas.forEach(function(a){d.push({attributes:c.attributes,notes:c.notes,images:c.images})})})}delete f.sites}}};
return k})},"esri/dijit/geoenrichment/utils/CoordinateUtil":function(){define(["esri/geometry/webMercatorUtils","esri/geometry/jsonUtils"],function(t,p){var l={},k=[4326,102100,102113,3857];l.WGS_84_WKID=4326;l.WEB_MERCATOR_WKID=102100;l.getSupportedWKIDs=function(){return k.slice()};l.testSpatialReferenceWKID=function(f){f=k.indexOf(Number(f&&"object"===typeof f?f.wkid:f));return 0<=f?k[0===f?0:1]:0};l.isWebMercator=function(f){return 102100===l.testSpatialReferenceWKID(f)};l.isWGS84=function(f){return 4326===
l.testSpatialReferenceWKID(f)};l.getGeometryConverter=function(f,d){f=l.testSpatialReferenceWKID(f);d=l.testSpatialReferenceWKID(d);return f&&d&&f!==d?4326===f?t.geographicToWebMercator:t.webMercatorToGeographic:null};l.toWGS84=function(f){return l.toSpatialReference(f,4326)};l.toWebMercator=function(f){return l.toSpatialReference(f,102100)};l.toSpatialReference=function(f,d){f&&!f.toJson&&(f=p.fromJson(f));d=l.getGeometryConverter(f&&f.spatialReference,d);return null!=d?d(f):f};return l})},"esri/dijit/geoenrichment/ReportPlayer/toolbar/ZoomSelect":function(){define("dojo/_base/declare dojo/dom-construct esri/dijit/geoenrichment/lists/FlowListDefaultItemRenderer ./Select ./ZoomUtil esri/dijit/geoenrichment/utils/NodeLabelEditor dojo/i18n!esri/nls/jsapi".split(" "),
function(t,p,l,k,f,d,c){c=c.geoenrichment.dijit.ReportPlayer.PlayerToolbar;var a=t(l,{createPresentation:function(e,b,g,h){var m=this,n=this.inherited(arguments);if(e.isCustomZoom){n.innerHTML="";var q=p.create("div",{"class":"esriGELink",innerHTML:c.customZoom},n),r=new d({numericOnly:!0,onApply:function(u){m.onCustomZoomApplied(u);q.innerHTML=c.customZoom},onCancel:function(){q.innerHTML=c.customZoom}});q.addEventListener("click",function(){r.range={min:10,max:1E3};r.editNodeLabel(q,"")})}else this.selectPresentation(n,
b);return n},onCustomZoomApplied:function(e){}});return t(k,{listClass:"esriGEOnDemandSelectUnlimitedTallList esriGEOnDemandSelectSpacedOut",buildRendering:function(){var e=this;this.inherited(arguments);this.itemRenderer=new a({onCustomZoomApplied:function(b){e.set("value",b);e.onChange({value:b});e.closePopup()}})},postCreate:function(){this.inherited(arguments);var e=f.getOptions().slice();e.push({isCustomZoom:!0,enabled:!1});this.set("options",e);this.set("value",100)}})})},"esri/dijit/geoenrichment/ReportPlayer/toolbar/ZoomUtil":function(){define(["dojo/i18n!esri/nls/jsapi"],
function(t){var p={};t=t.geoenrichment.dijit.ReportPlayer.PlayerToolbar;p.FIT_PAGE="fitPage";p.FIT_PAGE_WIDTH="fitPageWidth";p.FIT_PAGE_HEIGHT="fitPageHeight";p.getOptions=function(){var l=[{value:p.FIT_PAGE,label:t.fitPage},{value:p.FIT_PAGE_WIDTH,label:t.fitPageWidth},{value:p.FIT_PAGE_HEIGHT,label:t.fitPageHeight}];[{value:400,label:"400%"},{value:200,label:"200%"},{value:150,label:"150%"},{value:125,label:"125%"},{value:100,label:"100%"},{value:90,label:"90%"},{value:80,label:"80%"},{value:70,
label:"70%"},{value:60,label:"60%"},{value:50,label:"50%"}].forEach(function(k){l.push({isCustom:!0,value:-1,label:""});l.push(k)});l.push({isCustom:!0,value:-1,label:""});return l};p.getClosestZoomAndUpdateOptions=function(l,k){k.forEach(function(a){a.isCustom&&(a.value=-1,a.hidden=!0)});var f=[];k.forEach(function(a){a.isCustom||"number"!==typeof a.value||f.push({option:a,value:a.value,score:l<a.value?l/a.value:a.value/l})});f.sort(function(a,e){return e.score-a.score});var d=f[0];if(1===d.score)return d.value;
var c=k.indexOf(d.option);k=k[c+(l>d.value?-1:1)];k.value=l;k.label=Math.round(l)+"%";k.hidden=!1;return k.value};return p})},"esri/dijit/geoenrichment/ReportPlayer/toolbar/ToolbarArranger":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/dom-style","esri/dijit/geoenrichment/utils/DomUtil"],function(t,p,l,k){return t(null,{showAreaTitle:!1,stretchToolbarNode:null,domNode:null,infographicsSelectDiv:null,areaTitleDiv:null,areaTitleInnerDiv:null,rightSideControlsBlock:null,areasSelectDiv:null,
zoomSelectDiv:null,pageSelectDiv:null,commandButtonsContainer:null,constructor:function(f){p.mixin(this,f)},arrangeControls:function(){k[0<this.infographicsSelectDiv.children.length?"show":"hide"](this.infographicsSelectDiv);k[this.showAreaTitle?"show":"hide"](this.areaTitleDiv);this.domNode.style.width="";this.areaTitleDiv.style.marginLeft="";this.areaTitleInnerDiv.style.maxWidth="";this.rightSideControlsBlock.style.position=this.stretchToolbarNode?"absolute":"static";this.stretchToolbarNode&&(this.domNode.style.width=
this.stretchToolbarNode.clientWidth+"px",this._processStretchSpecialCases(this.stretchToolbarNode));this.syncRightSideVisibility()},_processStretchSpecialCases:function(f){function d(a){return k.isHidden(a)?0:a.clientWidth+c(a)}function c(a){return k.isHidden(a)?0:l.get(a,"marginLeft")+l.get(a,"marginRight")}this.showAreaTitle&&(f=f.clientWidth,f-=d(this.infographicsSelectDiv),f-=d(this.rightSideControlsBlock),f-=d(this.areasSelectDiv),f-=c(this.areaTitleDiv),this.areaTitleInnerDiv.style.maxWidth=
f+"px",k.isHidden(this.infographicsSelectDiv)||k.isHidden(this.infographicsSelectDiv)||(this.areaTitleDiv.style.marginLeft=Math.min(f-this.areaTitleDiv.clientWidth,(this.domNode.clientWidth-this.areaTitleDiv.clientWidth)/2-d(this.infographicsSelectDiv))+"px"))},hasVisibleControls:function(){return[this.infographicsSelectDiv,this.areaTitleDiv,this.areasSelectDiv,this.pageSelectDiv,this.zoomSelectDiv,this.commandButtonsContainer].some(k.isNodeInLayout)},syncRightSideVisibility:function(){k.show(this.rightSideControlsBlock);
var f=[this.pageSelectDiv,this.zoomSelectDiv,this.commandButtonsContainer].some(k.isNodeInLayout);k[f?"show":"hide"](this.rightSideControlsBlock)}})})},"esri/dijit/geoenrichment/utils/InvokeUtil":function(){define(["esri/dijit/geoenrichment/Deferred","esri/dijit/geoenrichment/when"],function(t,p){return{invoke:function(l,k,f,d,c){l.__invokeTimeoutIDs||(l.__invokeTimeoutIDs={});var a=l.__invokeTimeoutIDs[k];if(a){if(null==f||!1===d)return a.dfd.promise;clearTimeout(a.handle)}a||(a=l.__invokeTimeoutIDs[k]=
{dfd:new t});a.handle=setTimeout(function(){delete l.__invokeTimeoutIDs[k];p(c?l[k].apply(l,c):l[k](),function(e){a.dfd.resolve(e)},function(e){a.dfd.reject(e)})},f||0);return a.dfd.promise},hasPendingInvoke:function(l,k){return!(!l.__invokeTimeoutIDs||!l.__invokeTimeoutIDs[k])},cancelInvoke:function(l,k){l.__invokeTimeoutIDs&&l.__invokeTimeoutIDs[k]&&(clearTimeout(l.__invokeTimeoutIDs[k].handle),delete l.__invokeTimeoutIDs[k])}}})},"esri/dijit/geoenrichment/ReportPlayer/ReportPlayerViewModel":function(){define("dojo/_base/declare dojo/aspect esri/dijit/geoenrichment/promise/all ./core/layout/LayoutBuilder ./core/themes/ThemeLibrary ./core/themes/ReportThemes ./core/supportClasses/map/layers/locator/LocatorPointsController ./core/supportClasses/map/layers/std/StdPolygonsController ./core/supportClasses/map/layers/thisAreas/ThisAreasHighlightController ./core/supportClasses/EditorUnits ../utils/ColorUtil".split(" "),
function(t,p,l,k,f,d,c,a,e,b,g){return t(null,{isReportPlayerViewModel:!0,layoutBuilder:null,dynamicReportInfo:null,enableDataDrilling:!1,preInitialize:function(){this.layoutBuilder=this.layoutBuilder||new k;return this.layoutBuilder.initCoreComponents()},initialize:function(h,m){this.preInitialize();return this.layoutBuilder[h?"initClassicComponents":"initGraphicComponents"](m)},_animationAllowed:!1,_animationSuspended:!1,isAnimationAllowed:function(){return this._animationAllowed&&!this._animationSuspended},
setAnimationAllowed:function(h){this._animationAllowed=h},setAnimationSuspended:function(h){this._animationSuspended=h},_theme:null,getTheme:function(h){return h||this._theme},setTheme:function(h){this._theme=h||f.getReportThemeById(d.GRAPHIC)},getTableDefaultStyles:function(h,m){h=this.getTheme(h).table.overrideStyles;return m?h[m]:h},getChartDefaultStyles:function(h){return this.getTheme(h).chart},getDocumentDefaultStyles:function(h){return this.getTheme(h).document},getInfographicDefaultStyles:function(h){return this.getTheme(h).infographic},
getStaticInfographicDefaultStyles:function(h){return(h=this.getInfographicDefaultStyles(h))&&h.staticInfographic},isLightDocumentTheme:function(h){return g.isLightColor(this.getTheme(h).document.backgroundColor)},_isGraphicStyle:!1,isGraphicStyle:function(){return this._isGraphicStyle},setDynamicReportInfo:function(h){this.dynamicReportInfo=h;this._isGraphicStyle=h.reportObject.isGraphicReport},getDynamicImageFunc:function(h,m,n){},_locatorPointsControllers:null,getLocatorPointsController:function(h,
m){var n=h.calculatorName+"_"+m;this._locatorPointsControllers=this._locatorPointsControllers||{};var q=this._locatorPointsControllers[n];q||(q=this._locatorPointsControllers[n]=new c(h,this.dynamicReportInfo.fieldData,this.dynamicReportInfo.isMultiFeature,m),p.after(q,"destroy",function(){delete this._locatorPointsControllers[n]}.bind(this)));return q},_stdPolygonsControllers:null,getStdPolygonsController:function(h,m){this._stdPolygonsControllers=this._stdPolygonsControllers||{};var n=h+"_"+(m||
0),q=this._stdPolygonsControllers[n];q||(q=this._stdPolygonsControllers[n]=new a(h,this.dynamicReportInfo.fieldData,this.dynamicReportInfo.isMultiFeature,m),p.after(q,"destroy",function(){delete this._stdPolygonsControllers[n]}.bind(this)));return q},loadAllStdFeatures:function(){var h=[],m;for(m in this._stdPolygonsControllers)h.push(this._stdPolygonsControllers[m].loadAllFeatures());return l(h)},_thisAreasHighlightController:null,getThisAreasHighlightController:function(){this._thisAreasHighlightController||
(this._thisAreasHighlightController=new e,p.after(this._thisAreasHighlightController,"destroy",function(){this._thisAreasHighlightController=null}.bind(this)));return this._thisAreasHighlightController},_legendControllers:null,registerLegendController:function(h,m,n){this._legendControllers=this._legendControllers||{};var q=this._legendControllers[m]=this._legendControllers[m]||{};q[n]=h;var r=h.addCallback(function(u,v){if(v)for(var w in q)v=q[w],v!==h&&v.setLegendVisible(u)},"viewModel");return{remove:function(){delete q[n];
r.remove()}}},_benchmarkController:null,_benchmarkDisabled:!1,getBenchmarkController:function(){return!this._benchmarkDisabled&&this._benchmarkController},registerBenchmarkController:function(h){this._benchmarkController&&this._benchmarkController.destroy();this._benchmarkController=h;p.after(this._benchmarkController,"destroy",function(){this._benchmarkController=null}.bind(this))},isBenchmarkedArea:function(h){return this._benchmarkDisabled?!1:"number"===typeof h&&this._benchmarkController&&0<=
this._benchmarkController.getAreaIndex()&&this._benchmarkController.getAreaIndex()!==h},setBenchmarkDisabled:function(h){this._benchmarkDisabled=h},reset:function(){[this._locatorPointsControllers,this._stdPolygonsControllers].forEach(function(h){h&&Object.keys(h).forEach(function(m){(m=h[m])&&m.destroy()})});this._stdPolygonsControllers=this._locatorPointsControllers=null;this._thisAreasHighlightController&&this._thisAreasHighlightController.destroy();this._thisAreasHighlightController=null},canExportToExcel:function(){return!1},
exportToExcel:function(h){},prepareExportToExcelParameters:function(h){},getUnits:function(){return"px"},provideUnits:function(h){return b.provideUnits(h,this.getUnits())},roundForUnits:function(h){return b.round(h,this.getUnits())}})})},"esri/dijit/geoenrichment/ReportPlayer/core/layout/LayoutBuilder":function(){define(["dojo/_base/declare","dojo/_base/lang","esri/dijit/geoenrichment/Deferred","dojo/dom-construct"],function(t,p,l,k){return t(null,{_moduleMap:null,_getModulePaths:function(){return{core:{section:"esri/dijit/geoenrichment/ReportPlayer/core/sections/SectionRenderer",
grid:"esri/dijit/geoenrichment/ReportPlayer/core/grid/AdjustableGrid",image:"esri/dijit/geoenrichment/ReportPlayer/core/annotations/image/ImageRenderer",chart:"esri/dijit/geoenrichment/ReportPlayer/core/charts/ChartRenderer",map:"esri/dijit/geoenrichment/ReportPlayer/core/map/MapRenderer"},classic:{reportContainer:"esri/dijit/geoenrichment/ReportPlayer/core/reportContainer/ReportContainer"},graphicCore:{shape:"esri/dijit/geoenrichment/ReportPlayer/core/annotations/shape/ShapeRenderer",infographic:"esri/dijit/geoenrichment/ReportPlayer/core/infographics/InfographicRenderer"},
graphic_fullPages:{reportContainerGrid:"esri/dijit/geoenrichment/ReportPlayer/core/reportContainerGrid/ReportContainerGrid"},graphic_panelsInSlides:{reportContainerPagination:"esri/dijit/geoenrichment/ReportPlayer/core/reportContainerPagination/ReportContainerPagination",infographicPage:"esri/dijit/geoenrichment/ReportPlayer/core/infographics/InfographicsPage"},graphic_panelsInStack:{reportContainerStack:"esri/dijit/geoenrichment/ReportPlayer/core/reportContainerStack/ReportContainerStack",infographicPageStack:"esri/dijit/geoenrichment/ReportPlayer/core/infographics/InfographicsPageStack"},
graphic_panelsInStackAll:{reportContainerStack:"esri/dijit/geoenrichment/ReportPlayer/core/reportContainerStack/ReportContainerStack",reportContainerStackAll:"esri/dijit/geoenrichment/ReportPlayer/core/reportContainerStack/ReportContainerStackAll",infographicPageStack:"esri/dijit/geoenrichment/ReportPlayer/core/infographics/InfographicsPageStack"},graphic_panelsInRow:{reportContainerStack:"esri/dijit/geoenrichment/ReportPlayer/core/reportContainerStack/ReportContainerStack",infographicPageStack:"esri/dijit/geoenrichment/ReportPlayer/core/infographics/InfographicsPageStack"}}},
initCoreComponents:function(){var f=this._getModulePaths();return this._initPaths(p.mixin({},f.core,f.graphicCore))},initClassicComponents:function(){var f=this._getModulePaths();return this._initPaths(p.mixin({},f.core,f.classic))},initGraphicComponents:function(f){var d=this._getModulePaths();return this._initPaths(p.mixin({},d.core,d.graphicCore,d["graphic_"+f]||d.graphic_fullPages))},_initPaths:function(f){var d=this;this._moduleMap=this._moduleMap||{};var c=[],a;for(a in f)c.push({id:a,path:f[a]});
var e=new l;require(c.map(function(b){return b.path}),function(){for(var b=0;b<arguments.length;b++)d._moduleMap[c[b].id]=arguments[b];e.resolve()});return e.promise},createElement:function(f,d,c,a){switch(f){case "grid":case "reportContainer":case "reportContainerGrid":case "reportContainerPagination":case "reportContainerStack":case "reportContainerStackAll":case "infographicPage":case "infographicPageStack":return new this._moduleMap[f](d,c?k.create("div",null,c,a):void 0);case "section":return this._moduleMap.section.createSection(d,
c,a);case "emptySection":return this._moduleMap.section.createEmptySection(d,c,a);case "image":return this._moduleMap.image.createImageContainer(d);case "shape":return this._moduleMap.shape.createShapeContainer(d);case "chart":return this._moduleMap.chart.createChartPage(d);case "infographic":return this._moduleMap.infographic.createInfographicPage(d);case "map":return this._moduleMap.map.createMapContainer(d)}return!1},getClass:function(f){return this._moduleMap[f]}})})},"esri/dijit/geoenrichment/ReportPlayer/core/themes/ThemeLibrary":function(){define("dojo/_base/lang ./PageBorderStyles ../charts/utils/ChartLineStyles ./ReportThemes ./ThemeUtil esri/dijit/geoenrichment/utils/ObjectUtil dojo/i18n!esri/nls/jsapi".split(" "),
function(t,p,l,k,f,d,c){function a(m){m=m||{};m=m.defaultFontFamilty||"Avenir Next";return{backgroundColor:"#FFFFFF",padding:5,icon:{backgroundColor:"#56a5d8"},highlightedIcon:{backgroundColor:"#D6851A"},iconBarBackground:{backgroundColor:"#AAAAAA",borderColor:"#AAAAAA"},titleLine:{color:"#A8A7A8"},titleStyle:{fontFamily:m,color:"#828282",fontSize:16,backgroundColor:"transparent"},variableLabelStyle:{fontFamily:m,color:"#56a5d8",fontSize:24,backgroundColor:"transparent"},variableLabelStyleHighlighted:{fontFamily:m,
fontSize:24},variableLabelStyleContrast:{fontFamily:m,fontSize:24},variableDescriptionStyle:{fontFamily:m,color:"#828282",fontSize:13,backgroundColor:"transparent"}}}function e(){return{style:p.ALL,lineStyle:"dashed",thickness:1,color:"#b2b2b2"}}function b(m){m=m||{};var n=m.defaultFontFamilty||"Avenir Next",q=m.defaultFontSize||13;return{document:{fontSize:q,fontFamily:n,backgroundImage:{data:null,position:"center",repeat:!1,scale:!0,opacity:1,size:null},border:e()},icon:{backgroundColor:"#56a5d8"},
highlightedIcon:{backgroundColor:"#D6851A"},table:{dataTablePadding:5,tooltip:{color:"#4c4c4c",backgroundColor:"#FFFFFF"},tooltipLink:{color:"#4c4c4c"}},chart:{renderSingleDataSeriesWithSameColor:!0,outlineStyle:l.SOLID,titleStyle:{fontFamily:n,fontSize:16},xAxis:{gridLinesStyle:l.SOLID,axisStyle:{fontFamily:n,fontSize:9},titleStyle:{fontFamily:n,fontSize:q}},yAxis:{gridLinesStyle:l.SOLID,baseLineStyle:l.SOLID,axisStyle:{fontFamily:n,fontSize:9},titleStyle:{fontFamily:n,fontSize:q}},dataLabelsStyle:{fontFamily:n,
fontSize:10},legendStyle:{fontFamily:n,fontSize:10},minMaxLegend:{titleStyle:{fontFamily:n,fontSize:10},minVariableLabelStyle:{fontFamily:n,fontSize:16},maxVariableLabelStyle:{fontFamily:n,fontSize:16}},icon:{backgroundColor:"#56a5d8"},line:{},column:{},bar:{},pie:{},donut:{},ring:{},pictureColumn:{},pictureBar:{},gauge:{dataLabelStyle:{fontFamily:n}},waffle:{dataValueStyle:{fontFamily:n,fontSize:30},dataLabelStyle:{fontFamily:n,fontSize:16}},tooltip:{color:"#4c4c4c",backgroundColor:"#FFFFFF"},tooltipLink:{color:"#4c4c4c"}},
infographic:{staticInfographic:a(m)}}}var g={DEFAULT_FONT_FAMILY_CLASSIC:"Verdana",DEFAULT_FONT_FAMILY_GRAPHIC:"Avenir Next",DEFAULT_FONT_SIZE_CLASSIC:10,DEFAULT_FONT_SIZE_GRAPHIC:13,CHART_DATA_FONT_SIZE:10,defaultStaticInfographic:a(),standardRamps:[{id:k.CLASSIC,colors:["#FFFFFF","#13729F","#DEA429"],additional:{table:{overrideStyles:{Default:{color:"#4C4C4C",backgroundColor:"#FFFFFF"},ReportTitle:{color:"#FFFFFF",backgroundColor:"#00436D"},TableHeader:{color:"#4C4C4C",backgroundColor:"#CCCCCC"},
GreyText:{color:"#AAAAAA",backgroundColor:"#FFFFFF"},BlueText:{color:"#00436D",backgroundColor:"#FFFFFF"},AlternatingRow:{color:"#4C4C4C",backgroundColor:"#EEEEEE"}}},chart:{renderSingleDataSeriesWithSameColor:!1,colors:"#13729F #DEA429 #6A9741 #A75523 #456E35 #D7DF22 #868686 #3C546D #829AB3 #DEDEDE #03406E #B1B1B1".split(" ")}}},{id:k.GRAPHIC,colors:["#FFFFFF","#56A5D8","#D6851A"],additional:{chart:{colors3series:["#56A5D8","#AED6F1","#2874A6"],colors:"#AED6F1 #85C1E9 #5DADE2 #3498DB #2E86C1 #2874A6 #21618C #1B4F72".split(" ")}}},
{id:"red",colors:["#d3d3d3","#8b4513","#ff4500"],additional:{chart:{colors3series:["#8b4513","#F1948A","#E74C3C"],colors:"#8b4513 #F1948A #EC7063 #E74C3C #CB4335 #B03A2E #943126 #78281F".split(" ")}}},{id:"dark",colors:["#6A6A6A","#FFFFFF","#EEEEEE"],additional:{chart:{colors3series:["#FFFFFF","#CACFD2","#A6ACAF"],colors:"#FFFFFF #D7DBDD #CACFD2 #BDC3C7 #A6ACAF #909497 #797D7F #626567 #4d4d4d #3e3e3e #262626".split(" ")}}},{id:"green",colors:["#556b2f","#90ee90","#ffffe0"],additional:{chart:{colors3series:["#E9F7EF",
"#A9DFBF","#27AE60"],colors:"#E9F7EF #A9DFBF #7DCEA0 #52BE80 #27AE60 #229954 #1E8449 #196F3D #145A32".split(" ")}}},{id:"green2",colors:["#FFFFFF","#0B7AC0","#35AC46"],additional:{chart:{colors3series:["#56A5D8","#AED6F1","#2874A6"],colors:"#56A5D8 #AED6F1 #85C1E9 #5DADE2 #3498DB #2E86C1 #2874A6 #21618C #1B4F72".split(" ")}}}]},h={};g.standardRamps.forEach(function(m){var n=t.mixin({},m.additional);n.id=m.id;var q=b({defaultFontFamilty:m.id===k.CLASSIC?"Verdana":"Avenir Next",defaultFontSize:m.id===
k.CLASSIC?10:13});f.applyThemeColorsToTheme({theme:q,colors:m.colors});d.populateObject(q,n,!0);g[m.id]=q;h[m.id]=q});g.TABLE_STYLES="Default ReportTitle TableHeader GreyText BlueText AlternatingRow".split(" ");g.getReportThemeById=function(m){return h[m]};g.isStandardTheme=function(m){return!!h[m]};g.getStandardThemes=function(){return Object.keys(h).map(function(m){return h[m]})};g.getDefaultStaticInfographicSettings=function(){return t.clone(g.defaultStaticInfographic)};g.getDefaultBorderSettings=
function(){return e()};g.getDefaultTheme=function(m){return b(m)};return g})},"esri/dijit/geoenrichment/ReportPlayer/core/themes/PageBorderStyles":function(){define([],function(){var t={NONE:"none",ALL:"all",INNER_ONLY:"innerOnly",OUTER_ONLY:"outerOnly",HORIZONTAL_INNER_ONLY:"horizontalInnerOnly",VERTICAL_INNER_ONLY:"verticalInnerOnly",isSupported:function(p){for(var l in t)if(t[l]===p)return!0;return!1},toSupportedValue:function(p){return t.isSupported(p)?p:t.ALL}};return t})},"esri/dijit/geoenrichment/ReportPlayer/core/charts/utils/ChartLineStyles":function(){define([],
function(){var t={SOLID:"Solid",DASHED:"Dashed",DOTTED:"Dotted",isSupported:function(p){for(var l in t)if(t[l]===p)return!0;return!1},toGFXValue:function(p,l){switch(p){case "Dashed":return 1>l?"LongDash":"Dash";case "Dotted":return 1>l?"Dash":"Dot";default:return"Solid"}}};return t})},"esri/dijit/geoenrichment/ReportPlayer/core/themes/ReportThemes":function(){define([],function(){return{GRAPHIC:"graphic",CLASSIC:"classic",COMPARISON:"comparison"}})},"esri/dijit/geoenrichment/ReportPlayer/core/themes/ThemeUtil":function(){define(["dojo/_base/lang",
"esri/dijit/geoenrichment/utils/ColorUtil","esri/dijit/geoenrichment/utils/ObjectUtil"],function(t,p,l){function k(a){var e=p.isLightColor(a);return p.transform(a,{dv:e?-7:7}).toHex()}var f={getPanelTitleColor:function(a){var e=p.isLightColor(a);return p.transform(a,{dv:e?-50:50}).toHex()},getChartElementBackgroundColor:function(a){var e=p.isLightColor(a);return p.transform(a,{dv:e?-13:13}).toHex()}},d={getThemeColors:function(a){return[a.document.backgroundColor,a.icon.backgroundColor,a.highlightedIcon.backgroundColor]},
generateChartColors:function(a,e,b){b=b||{};var g=b.gradientFactor||1,h=[e,p.transform(e,{dv:-20*g}).toHex(),p.transform(e,{dv:-40*g}).toHex(),p.transform(e,{dv:-50*g}).toHex(),p.transform(e,{dv:-55*g}).toHex(),p.transform(e,{dv:-60*g}).toHex(),p.transform(e,{dv:-65*g}).toHex(),p.transform(e,{dv:-70*g}).toHex()];if(b.numLighterColors)for(var m=0;m<b.numLighterColors;m++)h.unshift(p.transform(e,{dv:20*g*(m+1),ds:-20*(m+1)}).toHex());a&&a!==e&&h.unshift(a);var n={};return h.filter(function(q){return n[q]?
!1:n[q]=!0})},applyThemeColorsToTheme:function(a){var e=a.theme,b=a.colors,g=a.preserveForegroundColor,h=a.chartColors,m=a.colors3series;a=a.preprocessGeneratedThemeFunc;var n=b[0],q=b[1];b=b[2];var r=g&&e.chart&&e.chart.dataLabelsStyle&&e.chart.dataLabelsStyle.color||p.getContrastColor(n).toHex();g=g&&e.document.color||("#FFFFFF"===n.toUpperCase()?"#4C4C4C":r);var u=p.isLightColor(n),v=f.getChartElementBackgroundColor(n),w=f.getPanelTitleColor(n),A=p.transform(n,{dv:u?-33:33}).toHex(),E={overrideStyles:{Default:{color:g,
backgroundColor:"transparent"},TableHeader:{color:p.getContrastColor(q,void 0,void 0,200).toHex(),backgroundColor:q},AlternatingRow:{color:g,backgroundColor:p.transform(n,{dv:u?-7:7}).toHex()},ReportTitle:{color:b,backgroundColor:"transparent"},GreyText:{color:A,backgroundColor:"transparent"},BlueText:{color:"#56A5D8",backgroundColor:"transparent"}}},F={lineColor:r,gridLinesColor:r,gridStripesColor:k(n),gridStripesColorAlt:"transparent",axisStyle:{color:r},titleStyle:{color:r}},D={lineColor:r,gridLinesColor:r,
gridStripesColor:k(n),gridStripesColorAlt:"transparent",baseLineColor:r,axisStyle:{color:r},titleStyle:{color:r}};var B=p.isLightColor(n)?"#666666":"#BBBBBB";n={document:{color:g,backgroundColor:n,border:{color:A}},icon:{backgroundColor:q},highlightedIcon:{backgroundColor:b},table:E,chart:{backgroundColor:"transparent",outlineColor:void 0,titleStyle:{color:w},dataLabelsAltColor:r,dataLabelsStyle:{color:r},xAxis:F,yAxis:D,legendStyle:{color:r,backgroundColor:"transparent"},minMaxLegend:{titleStyle:{color:r}},
comparisonInfo:{lineColor:B},icon:{backgroundColor:q},ring:{ringBackground:{backgroundColor:v}},gauge:{dataLabelStyle:{color:q},othersColor:v,arrowIndicator:{lineColor:w,backgroundColor:w}},waffle:{dataValueStyle:{color:q},dataLabelStyle:{color:q},othersColor:v},columnBarBackground:{backgroundColor:v}},infographic:{backgroundColor:"transparent",agePyramid:{theme:u?"light":"common",male:{backgroundColor:q},female:{backgroundColor:b}},staticInfographic:{backgroundColor:"transparent",icon:{backgroundColor:q},
highlightedIcon:{backgroundColor:b},iconBarBackground:{},titleLine:{color:p.transform(n,{dv:u?-40:40}).toHex()},titleStyle:{color:w},variableLabelStyle:{color:q},variableLabelStyleHighlighted:{color:b},variableLabelStyleContrast:{color:n},variableDescriptionStyle:{color:p.transform(n,{dv:u?-50:50}).toHex()}}}};a&&a(n);l.populateObject(e,n,!0);e.chart.colors=h&&h.length?h:d.generateChartColors(q,b);e.chart.colors3series=m},applyTextStyleToTheme:function(a,e){function b(h,m){var n=t.mixin({},e);h&&
delete n.color;m||delete n.fontSize;return n}e=d.filterTextStyles(e);var g={document:b(!1,!0),table:{overrideStyles:{Default:b(!1,!0),TableHeader:b(!1,!0),AlternatingRow:b(!1,!0),ReportTitle:b(!1,!0),GreyText:b(!1,!0),BlueText:b(!1,!0)}},chart:{titleStyle:b(),dataLabelsStyle:b(),xAxis:{axisStyle:b(),titleStyle:b()},yAxis:{axisStyle:b(),titleStyle:b()},legendStyle:b(),minMaxLegend:{titleStyle:b(),minVariableLabelStyle:b(!0),maxVariableLabelStyle:b(!0)},gauge:{dataLabelStyle:b()},waffle:{dataValueStyle:b(),
dataLabelStyle:b()}},infographic:{staticInfographic:{titleStyle:b(),variableLabelStyle:b(),variableLabelStyleHighlighted:b(),variableLabelStyleContrast:b(),variableDescriptionStyle:b()}}};l.populateObject(a,g,!0)}},c={fontFamily:1,fontSize:1,fontWeight:1,fontStyle:1,textDecoration:1,color:1};d.filterTextStyles=function(a){var e={},b;for(b in c){var g=a[b];void 0!==g&&(e[b]=g)}return e};return d})},"esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/map/layers/locator/LocatorPointsController":function(){define("dojo/_base/declare dojo/on dijit/Destroyable ../../../../../dataProvider/supportClasses/data/AreaDataUtil ../../MapEventUtil esri/dijit/geoenrichment/utils/DeviceUtil".split(" "),
function(t,p,l,k,f,d){return t(l,{_info:null,_fieldData:null,_isMultiFeature:null,_calcDataArray:null,_currentFeatureIndex:null,_layerNames:null,constructor:function(c,a,e,b){this._info=c;this._fieldData=a;this._isMultiFeature=e;this._currentFeatureIndex=b;this._layerIndexes={};this._layerNames={};this._rendererJsons={};this._mapInfos={};this._graphicLayerInfos={}},_getCalculatorName:function(){return this._info.calculatorName},getVariableObjects:function(){return this._info.variableObjects},getLayerID:function(){return this._info.layerID},
getLayerUrl:function(){return this._info.layerUrl},getLayerName:function(c){return this._layerNames[c]||this._info.layerName},setLayerName:function(c,a){this._layerNames[c]=a},getCalculatorDataArray:function(){if(!this._calcDataArray)if(this._isMultiFeature){var c=k.combineAreaDataObjectCalculators(this._fieldData.areaData,this._getCalculatorName());this._calcDataArray=k.removeDuplicacatedCalcData(c.thisAreas.concat(c.comparisonLevels))}else this._calcDataArray=(c=k.getAreaDataObjectCalculator(this._fieldData.areaData[this._currentFeatureIndex],
this._getCalculatorName()))&&[c.data].concat(c.comparisonLevels);return this._calcDataArray},_rendererJsons:null,getRendererJson:function(c){return this._rendererJsons[c]},setRendererJson:function(c,a){this._rendererJsons[c]=a},_layerIndexes:null,getLayerIndex:function(c){return this._layerIndexes[c]},setLayerIndex:function(c,a){this._layerIndexes[c]=a},_mapInfos:null,getMapInfo:function(c){return this._mapInfos[c]},getMapInfos:function(){var c=[],a;for(a in this._mapInfos)c.push(this._mapInfos[a]);
return c},setMapInfo:function(c,a){this._mapInfos[c]=a},_getPointIndexForCellFunc:null,_getCellForPointAtFunc:null,_highlightedCell:null,setLocatorTableCallbacks:function(c){this._getPointIndexForCellFunc=c.getPointIndexForCellFunc;this._getCellForPointAtFunc=c.getCellForPointAtFunc},registerLocatorTable:function(c){var a=this,e;c.set("highlightRowsOnHover",!0);p(c.domNode,"mouseover,mousemove",function(){var b=c.getOverFieldCell();b&&b!==e&&(e=b,a._highlightGraphicForFieldCell(e))});p(c.domNode,
"mouseout",function(){a._highlightGraphicForFieldCell(null);e=null})},_highlightRowForGraphic:function(c,a){this._highlightedCell&&(this._highlightedCell.parentGrid&&this._highlightedCell.parentGrid.setCellRowHighlighted(this._highlightedCell,!1),this._highlightedCell=null);a&&this._getCellForPointAtFunc&&(c=c.getPointIndexForGraphicFunc(a),(c=this._getCellForPointAtFunc(c))&&c.parentGrid&&(c.parentGrid.setCellRowHighlighted(c,!0),this._highlightedCell=c))},_graphicLayerInfos:null,setLocatorPointsLayer:function(c,
a,e,b){this._unSetInfo(c);a={map:e,graphicsLayer:a,getPointIndexForGraphicFunc:b.getPointIndexForGraphicFunc,getGraphicForPointAtFunc:b.getGraphicForPointAtFunc,setGraphicHighlightedFunc:b.setGraphicHighlightedFunc,layerMouseOverHandle:null,layerMouseOutHandle:null,highlightedGraphic:null,overGraphic:null};this._graphicLayerInfos[c]=a;this._addLayerListeners(a)},_addLayerListeners:function(c){var a=this,e=c.map,b=c.graphicsLayer;c.layerMouseOverHandle=f.onLayerMouseOver(b,e,function(g){g.graphic&&
g.graphic._graphicsLayer===b&&c.overGraphic!==g.graphic&&((c.layerMouseOutHandle&&c.layerMouseOutHandle.remove(),c.layerMouseOutHandle=null,a._removeHighlight(c),c.overGraphic=g.graphic,a._highlightRowForGraphic(c,c.overGraphic),c.setGraphicHighlightedFunc(c.overGraphic,!0),d.isMobileDevice())?e.infoWindow&&(e.infoWindow.setFeatures([c.overGraphic]),e.infoWindow.show(g.mapPoint,{closestFirst:!0})):c.layerMouseOutHandle=p.once(b,"mouse-out",function(h){a._removeHighlight(c,!0)}))})},_highlightGraphicForFieldCell:function(c){for(var a in this._graphicLayerInfos){var e=
this._graphicLayerInfos[a];this._removeHighlight(e);if(c){var b=this._getPointIndexForCellFunc(c);if(b=e.getGraphicForPointAtFunc(b))e.setGraphicHighlightedFunc(b,!0),e.highlightedGraphic=b}}},_removeHighlight:function(c,a){this._highlightRowForGraphic(c,null);c.highlightedGraphic&&(c.setGraphicHighlightedFunc(c.highlightedGraphic,!1),c.highlightedGraphic=null);c.overGraphic&&c.setGraphicHighlightedFunc(c.overGraphic,!1);c.overGraphic=null;!a&&c.map.infoWindow&&c.map.infoWindow.hide()},setPointVisibleAt:function(c,
a){for(var e in this._graphicLayerInfos){var b=this._graphicLayerInfos[e].getGraphicForPointAtFunc(c);if(b)b[a?"show":"hide"]()}},_unSetInfo:function(c){var a=this._graphicLayerInfos[c];delete this._graphicLayerInfos[c];a&&(a.layerMouseOverHandle&&a.layerMouseOverHandle.remove(),a.layerMouseOutHandle&&a.layerMouseOutHandle.remove())},_unSetLayers:function(){Object.keys(this._graphicLayerInfos).forEach(this._unSetInfo.bind(this));this._graphicLayerInfos={}},destroy:function(){this._unSetLayers()}})})},
"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/data/AreaDataUtil":function(){define(["dojo/_base/lang","../../../core/supportClasses/templateJsonUtils/fieldInfo/FieldInfoNameUtil","../../../_devConfig"],function(t,p,l){var k={getAreaDataValue:function(f){function d(A){!1!==u&&(v=A[u]);void 0===v&&(v=A[a])}function c(){if(m)d(m);else{var A=b[g];A&&d(A.data)}}var a=f.fieldName,e=f.fieldData,b=f.areaDataObject,g=f.calculatorName,h=f.featureIndex,m=f.featureAttributes,n=f.ignoreMetadata,
q=f.isMultiFeature;if(!l.showAreaDataUtilUndefinedData&&a){var r=a.indexOf("."),u=!1;-1!==r&&(u=a.substr(r+1));g||-1===r||(g=a.substr(0,r));h=void 0===h?0:Number(h)||0;if((b=f.areaDataObject||e.areaData[h])||m){var v;q&&g===p.AREA_ATTRIBUTES_CALCULATOR_NAME&&!n&&e&&d(e.metadata);void 0===v&&c();if(g)return v;void 0===v&&!n&&e&&d(e.metadata);if(void 0===v&&!m)for(var w in b)if(d(b[w].data),void 0!==v)break;return v}}},getAreaDataObjectCalculator:function(f,d,c){if(!f)return null;var a=f[d];!a&&c&&
(a=f[d]=k.createCalculator());return a},createCalculator:function(f,d){return{data:f||{},comparisonLevels:d||[]}},combineAreaDataObjectCalculators:function(f,d,c){var a=[],e=[];f.forEach(function(b){if(b=k.getAreaDataObjectCalculator(b,d))a.push(b.data),e=e.concat(b.comparisonLevels)});c&&c.removeDuplicates&&(e=k.removeDuplicacatedCalcData(e));return{thisAreas:a,comparisonLevels:e}},removeDuplicacatedCalcData:function(f){if(!f.length)return f;var d=[],c={},a=Object.keys(f[0]);f.forEach(function(e){var b=
function(g){var h="";a.forEach(function(m){h+=g[m]+";"});return h}(e);c[b]||(c[b]=!0,d.push(e))});return d},setAreaDataValue:function(f,d,c,a,e){e=void 0===e?0:Number(e)||0;k.setAreaDataObjectValue(f,d,c[e],a)},setAreaDataObjectValue:function(f,d,c,a){c&&a&&null!==d&&void 0!==d&&(k.getAreaDataObjectCalculator(c,a,!0).data[f]=d)},mergeAreaData:function(f,d){d.forEach(function(c,a){(a=f[a])&&k.mergeAreaDataObjects(a,c)})},mergeAreaDataObjects:function(f,d){for(var c in f){var a=f[c],e=d[c];e?a.comparisonLevels.length!==
e.comparisonLevels.length?console.log("Error: can't merge calculators with different comparison levels!"):(t.mixin(e.data,a.data),a.comparisonLevels.forEach(function(b,g){t.mixin(e.comparisonLevels[g],b)})):d[c]=a}console.log("AreaDataUtil.js merging area data \x3d\x3e areaData");console.log(d)}};return k})},"esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/templateJsonUtils/fieldInfo/FieldInfoNameUtil":function(){define(["esri/dijit/geoenrichment/utils/MaskUtil","./FieldLibrary"],function(t,
p){var l={SCRIPT_PREFIX:"",DEFAULT_SCRIPT_NAME:"Custom",TOTAL_SCRIPT_NAME:"Total",AVG_SCRIPT_NAME:"Average",SCRIPT_PREFIX_RE:/^SCRIPT_/i,FIRST_SYMBOL_IS_NUMBER_RE:/^[0-9]/,DATA_COLLECTIONS_CALCULATOR_NAME:"dataCollectionsCalculator",MAPS_CALCULATOR_NAME:"mapsCalculator",UNITED_MAPS_CALCULATOR_NAME:"unitedMapsCalculator",AREA_ATTRIBUTES_CALCULATOR_NAME:"headers",ENRICHED_DATA_NO_LEVELS:"enrichFieldData_noLevels",SCRIPTS_CALCULATOR_NAME:"scripts",createFieldNameFromSource:function(k,f){if(!k)return"";
var d="";k.isSiteAttribute?d=k.attribute.name:k.isChartAttribute?d=k.id:k.isWebMap?d=k.webMapFieldName||k.fieldName:(k=(k.fullName||k).replace(/_|\.|\s/g,""),f=f||"n",k+="n"===f?"":"_"+f,l.FIRST_SYMBOL_IS_NUMBER_RE.test(k)&&(k="_"+k),d=k.toUpperCase());return l._validateName(d)},createFieldNameFromScript:function(k){k=k.name;l.SCRIPT_PREFIX_RE.test(k)&&(k=k.replace(l.SCRIPT_PREFIX_RE,""));return l._validateName(l.SCRIPT_PREFIX+k.replace(/\.|-/g,""))},_validateName:function(k){return l._checkXMLValidName(l._maskUnicodeInName(k))},
_XML_MASK_NAME_RE:/(_X)(\d\d\d\d)/i,_checkXMLValidName:function(k){return l._XML_MASK_NAME_RE.test(k)?k.replace(l._XML_MASK_NAME_RE,"$1_$2"):k},_XML_UNICODE_RE:/&#x|;/ig,_maskUnicodeInName:function(k){return t.maskWithUnicodeXML(k).replace(l._XML_UNICODE_RE,"")},renderScriptName:function(k){return k.replace(l.SCRIPT_PREFIX_RE,"")},provideQualifiedFieldInfoTemplateName:function(k,f){k&&(k.templateName=f?f+"."+k.name:k.isWebMap?l.AREA_ATTRIBUTES_CALCULATOR_NAME+"."+k.name:k.isSiteAttribute?l.AREA_ATTRIBUTES_CALCULATOR_NAME+
"."+k.name:l.DATA_COLLECTIONS_CALCULATOR_NAME+"."+k.name)},getCalculatorName:function(k){return k&&k.templateName&&k.templateName.substr(0,k.templateName.indexOf("."))},isAreaAttributesFieldInfo:function(k){return l.getCalculatorName(k)===l.AREA_ATTRIBUTES_CALCULATOR_NAME},updateCalculatorName:function(k,f){k&&(k.hasVariable||k.script)&&(k.templateName=f+k.templateName.substr(k.templateName.indexOf(".")))},refreshNameAndTemplateName:function(k){k.statefulName&&k.fullName&&(k.name=l.createFieldNameFromSource(k,
k.statefulName.charAt(0)),k.templateName=k.templateName.substr(0,k.templateName.lastIndexOf(".")+1)+k.name)},getFieldInfoAlias:function(k){return k?k.script?k.script.alias:k.hasVariable||k.isMissing?k.alias:p.getFieldLabel(k.name):null},getTemplateNameParts:function(k){if(!k)return null;var f=k.indexOf(".");return-1===f?{calcName:null,fieldName:k}:{calcName:k.substr(0,f),fieldName:k.substr(f+1)}}};return l})},"esri/dijit/geoenrichment/utils/MaskUtil":function(){define([],function(){function t(p,l){return"string"!==
typeof p?p:String(p).replace(/[^\x20-\x7f]/g,function(k){k=k.charCodeAt(0).toString(16).toUpperCase();return l(k)})}return{maskWithUnicode:function(p){return t(p,function(l){return"\\u000".substr(0,6-l.length)+l})},maskWithUnicodeXML:function(p){return t(p,function(l){return"\x26#x000".substr(0,7-l.length)+l+";"})},removeUnicode:function(p,l){return t(p,function(k){return l||""})},removeXMLMasks:function(p,l){return p.replace(/&#x.*?;/g,l||"")}}})},"esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/templateJsonUtils/fieldInfo/FieldLibrary":function(){define(["dojo/string",
"dojo/i18n!esri/nls/jsapi"],function(t,p){var l=p.geoenrichment.dijit.ReportPlayer.FieldInfoLabels;p=p.geoenrichment.dijit.ReportPlayer.FieldInfoPreview;l={_SPECIAL_HEADER_FIELDS_NAME_MAP:{SITE_NAME:"SiteName",STORE_ADDR:"SiteAddr",AREA_DESC2:"SiteDesc",STORE_LAT:"Latitude",STORE_LONG:"Longitude",AREA_ID:"AreaID",AREA_DESC:"AreaDesc",STORE_ID:"StoreID",RING:"Ring",STORE_NAME:"StoreName",GROUPCOUNT:"PointCount"},_ADDITIONAL_HEADER_FIELDS_MAP:{SITENOTE:"SiteNote",SITENOTE2:"SiteNote2",SITENOTE3:"SiteNote3",
SITENOTE4:"SiteNote4",SITENOTE5:"SiteNote5",SITENOTE6:"SiteNote6",SITENOTE7:"SiteNote7",SITENOTE8:"SiteNote8",SITENOTE9:"SiteNote9",SITENOTE10:"SiteNote10",SITENOTES:"SiteNotes",CHART_AREA_NAME:"ChartAreaName",CHART_SERIES_NAME:"ChartSeriesName",CHART_POINT_NAME:"ChartVariableName",CHART_POINT_VALUE:"ChartVariableValue"},_REPORT_VAR_FIELDS_MAP:{REPORTNAME:"Title",REPORTTITLE2:"Subtitle",CURRPAGE:"Page",COPYRIGHT:"Copyright",TRIALURLTEXT:"TrialUrlText",PHONENUMBER:"PhoneNumber",PRODUCTURL:"ProductUrl",
PRODUCTLABEL:"ProductLabel",SOURCE:"Source",CURRDATE:"Date",LOCATORSUMMARY:"LocatorSummary",CENSUSYEAR:"CensusYear",CURRENTYEAR:"CurrentYear",FUTUREYEAR:"FutureYear",LATITUDELABEL:"LatitudeLabel",LONGITUDELABEL:"LongitudeLabel",PAGEFORMAT:"PageFormat",BANDFROM0TO1UNIT2:"BandFrom0To1Unit2",RADIUS0UNIT1:"Radius0Unit1",AREADELIMITER:"AreaDelimiter",BANDREGIONFROM0TO1:"BandRegionFrom0To1",ET_AL:"ET_AL",LINEBUFFERSEGMENTFROM0TO1UNIT2RADIUS:"LineBufferSegmentFrom0To1Unit2Radius",LINEBUFFERRADIUS0UNIT1RADIUS:"LineBufferRadius0Unit1Radius",
RINGVALUE0UNIT1RADIUS:"RingValue0Unit1Radius",RINGSVALUES0UNIT1RADII:"RingsValues0Unit1Radii",RINGBUFFERBANDFROM0TO1UNIT2RADIUS:"RingBufferBandFrom0To1Unit2Radius",DRIVETIMEBANDFROM0TO1UNIT2RADIUS:"DriveTimeBandFrom0To1Unit2Radius",RINGBUFFERBANDSBANDS0UNIT1RADII:"RingBufferBandsBands0Unit1Radii",RINGBUFFERBANDRING0UNIT1RADIUS:"RingBufferBandRing0Unit1Radius",DRIVETIMEBANDBAND0UNIT1RADIUS:"DriveTimeBandBand0Unit1Radius",DRIVETIMESRINGS0UNIT1RADII:"DriveTimesRings0Unit1Radii",DRIVETIMERING0UNIT1RADIUS:"DriveTimeRing0Unit1Radius",
DRIVEDISTANCEVALUE0UNIT1RADIUS:"DriveDistanceValue0Unit1Radius",DRIVEDISTANCESRINGS0UNIT1RADII:"DriveDistancesRings0Unit1Radii",DRIVEDISTANCERING0UNIT1RADIUS:"DriveDistanceRing0Unit1Radius"},_SPECIAL_HEADER_FIELDS_NAME_MAP_BACK:{},_ADDITIONAL_HEADER_FIELDS_MAP_BACK:{},_REPORT_VAR_FIELDS_MAP_BACK:{},_PREVIEW:{Title:p.fieldPreviewTitle,Title_graphic:p.fieldPreviewTitleGraphic,Subtitle:p.fieldPreviewSubtitle,Date:p.fieldPreviewDate,Page:p.fieldPreviewPage,Count:p.fieldPreviewLocationsCount,Copyright:p.fieldPreviewCopyright,
TrialUrlText:p.fieldPreviewTrialUrlText,PhoneNumber:p.fieldPreviewPhoneNumber,ProductUrl:p.fieldPreviewProductUrl,ProductLabel:p.fieldPreviewProductLabel,Source:p.fieldPreviewSource,SITE_NAME:p.fieldPreviewSiteName,SITE_NAME_multi:p.fieldPreviewSiteNameMulti,STORE_LAT:p.fieldPreviewLat,STORE_LONG:p.fieldPreviewLong,AREA_DESC2:p.fieldPreviewAreaDesc2,STORE_ADDR:p.fieldPreviewStoreAddr,AREA_DESC:p.fieldPreviewAreaDesc,CHART_AREA_NAME:p.fieldPreview_chartArea,CHART_SERIES_NAME:p.fieldPreview_seriesName,
CHART_POINT_NAME:p.fieldPreview_pointName},_LABELS:{CHART_AREA_NAME:l.chartAreaName,CHART_SERIES_NAME:l.chartSeriesName,CHART_POINT_NAME:l.chartPointName,CHART_POINT_VALUE:l.chartPointValue},DATE_FIELD_NAME:"Date",DATE_FIELD_ALIAS:"Date",DATE_FIELD_DEFAULT_FORMAT:"d-MMMM dd, yyyy",GROUPCOUNT_FIELD_NAME:"PointCount",GROUPCOUNT_FIELD_ALIAS:"PointCount",LOCATORSUMMARY_FIELD_NAME:"LocatorSummary",LOCATORSUMMARY_FIELD_ALIAS:"LocatorSummary",SITENOTES_FIELD_NAME:"SiteNotes",SITENOTES_FIELD_ALIAS:"SiteNotes",
init:function(){for(var k in this._SPECIAL_HEADER_FIELDS_NAME_MAP)this._SPECIAL_HEADER_FIELDS_NAME_MAP_BACK[this._SPECIAL_HEADER_FIELDS_NAME_MAP[k].toUpperCase()]=k;for(k in this._ADDITIONAL_HEADER_FIELDS_MAP)this._ADDITIONAL_HEADER_FIELDS_MAP_BACK[this._ADDITIONAL_HEADER_FIELDS_MAP[k].toUpperCase()]=k;for(k in this._REPORT_VAR_FIELDS_MAP)this._REPORT_VAR_FIELDS_MAP_BACK[this._REPORT_VAR_FIELDS_MAP[k].toUpperCase()]=k},templateToUIHeader:function(k){k=k&&this.trimTemplateHeaderName(k).toUpperCase();
return this._SPECIAL_HEADER_FIELDS_NAME_MAP[k]||this._ADDITIONAL_HEADER_FIELDS_MAP[k]},qualifyTemplateHeaderName:function(k){return k&&0!==k.indexOf("headers.")?"headers."+k:k},trimTemplateHeaderName:function(k){if(!k)return k;0===k.indexOf("headers.")&&(k=k.substr(k.indexOf(".")+1));return k},templateToUIReportVar:function(k){k=k&&k.toUpperCase();return this._REPORT_VAR_FIELDS_MAP[k]},uiToTemplate:function(k){k=k&&k.toUpperCase();return this._SPECIAL_HEADER_FIELDS_NAME_MAP_BACK[k]||this._ADDITIONAL_HEADER_FIELDS_MAP_BACK[k]||
this._REPORT_VAR_FIELDS_MAP_BACK[k]},getPreview:function(k,f,d){k=this.trimTemplateHeaderName(k);if(!k)return null;f&&"Title"===k&&(k+="_graphic");d&&"SITE_NAME"===k&&(k+="_multi");return"SiteNotes"===k?p.fieldPreviewSiteNotes:0===k.indexOf("SiteNote")?t.substitute(p.fieldPreviewSiteNote,{index:k.replace("SiteNote","")||1}):this._PREVIEW[k]},hasField:function(k){return!!(this.uiToTemplate(k)||this.templateToUIHeader(k)||this.templateToUIReportVar(k))},isAdditionalHeadersField:function(k){k=k&&this.trimTemplateHeaderName(k).toUpperCase();
return this._ADDITIONAL_HEADER_FIELDS_MAP[k]},isChartAttribute:function(k){return this.isAdditionalHeadersField(k)&&-1!==k.toUpperCase().indexOf("CHART_")},getSiteNoteFieldNameAt:function(k){return"SiteNote"+(!k||1>=Number(k)?"":k)},getFieldLabel:function(k){k=k&&this.trimTemplateHeaderName(k).toUpperCase();return this._LABELS[k]},getReportVarSelfTagsMap:function(){return{Page:"currPage",Title:"reportName",Subtitle:"reportTitle2"}},getReportVarTextTagsMap:function(){var k=this.getReportVarSelfTagsMap(),
f={},d;for(d in this._REPORT_VAR_FIELDS_MAP){var c=this._REPORT_VAR_FIELDS_MAP[d];k[c]||(f[c]=c)}return f}};l.init();return l})},"esri/dijit/geoenrichment/ReportPlayer/_devConfig":function(){define([],function(){return{logData:!0,showAreaDataUtilUndefinedData:!1,createPlayerCommand:{saveDataJsonAsTextFile:!1,useTestBuild:!1,configUrl:"https://laci2.esri.com/jenkins/job/report-player-jsapi-pr/lastSuccessfulBuild/artifact/release/reportPlayer/config.js",baseUrl:"https://laci2.esri.com/jenkins/job/report-player-jsapi-pr/lastSuccessfulBuild/artifact/release",
mainUrl:"https://laci2.esri.com/jenkins/job/report-player-jsapi-pr/lastSuccessfulBuild/artifact/release/dojo/dojo.js",esriDijitCssUrl:"https://@sbaseurl@/jsapi/jsapi/dijit/themes/claro/claro.css",esriCssUrl:"https://laci2.esri.com/jenkins/job/report-player-jsapi-pr/lastSuccessfulBuild/artifact/release/reportPlayer/reportPlayer.css"},createPDFCommand:{removeUnicodeChars:!1},preview:{bigValues:!1},charts:{enableEffects:!1},table:{printGridRefresh:!1},emulateErrors:{playerError:!1,contentErrors:!1,themeParseError:!1,
metadataParseError:!1,layoutParseError:0,reportContainerRenderError:!1,createReportError:!1,createReportNaN:!1,createReportNull:!1,getMapItemError:!1,emptyDataProviderResponse:!1,emptyTemplateJson:!1}}})},"esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/map/MapEventUtil":function(){define(["dojo/on","dojo/sniff","esri/dijit/geoenrichment/utils/DeviceUtil"],function(t,p,l){return{onLayerMouseOver:function(k,f,d){var c=l.isMobileDevice();k=c?k:p("touch")?f:k;c=c?"mouse-over":p("touch")?"mouse-down, mouse-move":
"mouse-move";return t(k,c,d)}}})},"esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/map/layers/std/StdPolygonsController":function(){define("dojo/_base/declare esri/dijit/geoenrichment/Deferred dojo/on esri/dijit/geoenrichment/promise/all dijit/Destroyable ../../MapEventUtil ../../../../comparison/ComparisonUtil esri/dijit/geoenrichment/ReportPlayer/countryConfig".split(" "),function(t,p,l,k,f,d,c,a){return t(f,{currentFeatureIndex:null,_calculatorName:null,_fieldData:null,_isMultiFeature:null,
_hasRegisteredLayers:!1,_hasRegisteredInfographics:!1,constructor:function(e,b,g,h){this._calculatorName=e;this._fieldData=b;this._isMultiFeature=g;this.currentFeatureIndex=h;this._layerIndexes={};this._rendererJsons={};this._labelRendererJsons={};this._mapInfos={};this._graphicLayerInfos={};this._pendingLayerInfos={}},getCalculatorName:function(){return this._calculatorName},_rendererJsons:null,_labelRendererJsons:null,getRendererJson:function(e){return this._rendererJsons[e]},getLabelRendererJson:function(e){return this._labelRendererJsons[e]},
setRendererJson:function(e,b){this._rendererJsons[e]=b},setLabelRendererJson:function(e,b){this._labelRendererJsons[e]=b},_layerIndexes:null,getLayerIndex:function(e,b){var g=a.getGeographiesModel().getLevels(),h=-1;g.some(function(m,n){if(m.id===b)return h=n,!0});return this._layerIndexes[e]+h/g.length},setLayerIndex:function(e,b){this._layerIndexes[e]=b},_mapInfos:null,getMapInfo:function(e){return this._mapInfos[e]},getMapInfos:function(){var e=[],b;for(b in this._mapInfos)e.push(this._mapInfos[b]);
return e},setMapInfo:function(e,b){this._mapInfos[e]=b},_attributeFields:null,getAttributeFields:function(){return this._attributeFields},setAttributeFields:function(e){this._attributeFields=e},_shownFeatureAttributes:null,_featuresChangedHandlers:null,getShownFeatureAttributes:function(){return this._shownFeatureAttributes},setShownFeaturesChangedListener:function(e){var b=this;this._featuresChangedHandlers=this._featuresChangedHandlers||[];this._featuresChangedHandlers.push(e);return{remove:function(){var g=
b._featuresChangedHandlers;if(g){var h=g.indexOf(e);-1!==h&&g.splice(h,1)}}}},setShownFeatureAttributes:function(e){this._shownFeatureAttributes=e||[];this._featuresChangedHandlers&&this._featuresChangedHandlers.forEach(function(b){b()})},_allFeatureAttributes:null,_loadAllFeaturesHandlers:null,getAllFeatureAttributes:function(){return this._allFeatureAttributes||[]},setAllFeatureAttributes:function(e){this._allFeatureAttributes=e},setLoadAllFeaturesListener:function(e){var b=this;this._loadAllFeaturesHandlers=
this._loadAllFeaturesHandlers||[];this._loadAllFeaturesHandlers.push(e);return{remove:function(){var g=b._loadAllFeaturesHandlers;if(g){var h=g.indexOf(e);-1!==h&&g.splice(h,1)}}}},loadAllFeatures:function(){return this._loadAllFeaturesHandlers&&k(this._loadAllFeaturesHandlers.map(function(e){return e()}))},buildGeometryFieldName:function(e){return"__stdGeometry_"+e},saveGeometryInCalculatorData:function(e,b){c.copyValueToCalculatorData(e,{fieldName:b,fieldData:this._fieldData,isMultiFeature:this._isMultiFeature,
currentFeatureIndex:this.currentFeatureIndex,calculatorName:this._calculatorName})},provideGeometryFromCalculatorData:function(e,b){c.copyValueFromCalculatorData(e,{fieldName:b,fieldData:this._fieldData,isMultiFeature:this._isMultiFeature,currentFeatureIndex:this.currentFeatureIndex,calculatorName:this._calculatorName})},_highlightInfographicForAttributesFunc:null,_registerInfographicDfd:null,registerInfographic:function(e){this._highlightInfographicForAttributesFunc=e.highlightInfographicForAttributes;
this._registerInfographicDfd=new p;this._hasRegisteredLayers&&this._registerInfographicDfd.resolve();this._hasRegisteredInfographics||(this._hasRegisteredInfographics=!0,this._doRegisterLayers());return this._registerInfographicDfd.promise},_graphicLayerInfos:null,_pendingLayerInfos:null,setStdPolygonsLayer:function(e,b,g,h){this._unSetInfo(e);this._pendingLayerInfos[e]={map:g,graphicsLayer:b,getGraphicForAttributesFunc:h.getGraphicForAttributesFunc,setGraphicHighlightedFunc:h.setGraphicHighlightedFunc,
layerMouseOverHandle:null,layerMouseOutHandle:null,highlightedGraphic:null};this._hasRegisteredInfographics&&this._doRegisterLayers();this._hasRegisteredLayers||(this._hasRegisteredLayers=!0,this._registerInfographicDfd&&this._registerInfographicDfd.resolve())},_doRegisterLayers:function(){for(var e in this._pendingLayerInfos){var b=this._pendingLayerInfos[e];this._graphicLayerInfos[e]=b;this._addLayerListeners(b)}this._pendingLayerInfos={}},_addLayerListeners:function(e){var b=this,g=e.graphicsLayer,
h;e.layerMouseOverHandle=d.onLayerMouseOver(g,e.map,function(m){m.graphic&&m.graphic._graphicsLayer===g&&h!==m.graphic&&(e.layerMouseOutHandle&&e.layerMouseOutHandle.remove(),e.layerMouseOutHandle=null,h&&e.setGraphicHighlightedFunc(h,!1),h=m.graphic,b._highlightInfographicForAttributesFunc(h.attributes),e.setGraphicHighlightedFunc(h,!0),e.layerMouseOutHandle=l.once(g,"mouse-out",function(n){b._highlightInfographicForAttributesFunc(null);h&&e.setGraphicHighlightedFunc(h,!1);h=null}))})},highlightGraphicForAttributes:function(e){for(var b in this._graphicLayerInfos){var g=
this._graphicLayerInfos[b];g.highlightedGraphic&&(g.setGraphicHighlightedFunc(g.highlightedGraphic,!1),g.highlightedGraphic=null);if(e){var h=g.getGraphicForAttributesFunc(e);h&&(g.setGraphicHighlightedFunc(h,!0),g.highlightedGraphic=h)}}},_unSetInfo:function(e){var b=this._graphicLayerInfos[e];delete this._graphicLayerInfos[e];b&&(b.layerMouseOverHandle&&b.layerMouseOverHandle.remove(),b.layerMouseOutHandle&&b.layerMouseOutHandle.remove())},_unSetLayers:function(){Object.keys(this._graphicLayerInfos).forEach(this._unSetInfo.bind(this));
this._graphicLayerInfos={}},destroy:function(){this._unSetLayers()}})})},"esri/dijit/geoenrichment/ReportPlayer/core/comparison/ComparisonUtil":function(){define(["esri/dijit/geoenrichment/utils/ObjectUtil","../../dataProvider/supportClasses/data/AreaDataUtil","dojo/i18n!esri/nls/jsapi"],function(t,p,l){l=l.geoenrichment.dijit.ReportPlayer.ReportPlayer;var k={valueFormatFunction:function(f,d){return d&&d.isMissing?l.missingVariable:void 0===f||"string"===typeof f?f:t.formatNumber(f,{places:d.decimals,
preserveTrailingZeroes:!0})},copyValueToCalculatorData:function(f,d){var c=k._findAttrsInCalcData(d,f);c&&(c[d.fieldName]=f[d.fieldName])},copyValueFromCalculatorData:function(f,d){var c=k._findAttrsInCalcData(d,f);c&&(f[d.fieldName]=c[d.fieldName])},_findAttrsInCalcData:function(f,d){f=f.isMultiFeature?(f=p.combineAreaDataObjectCalculators(f.fieldData.areaData,f.calculatorName))&&f.comparisonLevels||[]:(f=p.getAreaDataObjectCalculator(f.fieldData.areaData[f.currentFeatureIndex],f.calculatorName))&&
f.comparisonLevels||[];var c;f.some(function(a){if(a.StdGeographyLevel&&a.StdGeographyLevel===d.StdGeographyLevel&&a.StdGeographyID===d.StdGeographyID)return c=a,!0});return c}};return k})},"esri/dijit/geoenrichment/ReportPlayer/countryConfig":function(){define(["./dataProvider/supportClasses/stdGeographies/StdGeographiesModel"],function(t){function p(){if(!k||!k.hierarchies)return"census";var e=k.hierarchies[0].ID;if(1==k.hierarchies.length)return e;if(k.defaultDatasetID)for(var b in k.hierarchies){var g=
k.hierarchies[b];if(g.datasets&&g.datasets.some(function(h){return h==k.defaultDatasetID})){e=g.ID;break}}return e}var l={},k;l.getCurrentCountry=function(){return k};l.getCountryID=function(){return k&&k.id};l.getCurrencySymbol=function(){return k&&k.currencySymbol||"$"};l.getCurrencyFormat=function(){if(k&&k.currencyFormat)return k.currencyFormat;var e=l.getCurrencySymbol();return e+"0;-"+e+"0"};l.setCountry=function(e){k=e};var f,d;l.getSingleUnits=function(){return f};l.getPluralUnits=function(){return d};
l.setSingleAndPluralUnits=function(e,b){f=e;d=b};var c;l.getHierarchyID=function(){return c};l.setHierarchyID=function(e){c=e||p()};var a;l.getGeographiesModel=function(){return a};l.setGeographiesModel=function(e){a=e};l.reset=function(){a=d=f=c=k=null};l.toJson=function(){return{country:{id:l.getCountryID(),currencySymbol:l.getCurrencySymbol(),currencyFormat:l.getCurrencyFormat()},hierarchy:c,geographiesModel:a&&a.toJson()}};l.fromJson=function(e){e&&(k=e.country,c=e.hierarchy,a=e.geographiesModel&&
new t(e.geographiesModel))};return l})},"esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/map/layers/thisAreas/ThisAreasHighlightController":function(){define(["dojo/_base/declare","esri/dijit/geoenrichment/Deferred","dojo/on","dijit/Destroyable","../../MapEventUtil"],function(t,p,l,k,f){return t(k,{_hasRegisteredLayers:!1,_hasRegisteredTables:!1,constructor:function(d){this._graphicLayerInfos={};this._registerTableDfds=[];this._highlightTableForAreaIndexFuncs=[];this._pendingLayerInfos=
{}},_highlightTableForAreaIndexFuncs:null,_registerTableDfds:null,registerTable:function(d){this._highlightTableForAreaIndexFuncs.push(d.highlightTableForAreaIndex);d=new p;this._registerTableDfds.push(d);this._hasRegisteredLayers&&this._doRegisterTables();this._hasRegisteredTables||(this._hasRegisteredTables=!0,this._doRegisterLayers());return d.promise},_doRegisterTables:function(){this._registerTableDfds.forEach(function(d){d.resolve()});this._registerTableDfds.length=0},_graphicLayerInfos:null,
_pendingLayerInfos:null,setThisAreaLayer:function(d,c,a,e){this._unSetInfo(d);this._pendingLayerInfos[d]={graphicsLayer:c,areaIndex:e.thisAreaIndex,getGraphicForAreaIndexFunc:e.getGraphicForAreaIndexFunc,setGraphicHighlightedFunc:e.setGraphicHighlightedFunc,layerMouseOverHandle:null,layerMouseOutHandle:null,highlightedGraphic:null,map:a};this._hasRegisteredTables&&this._doRegisterLayers();this._hasRegisteredLayers||(this._hasRegisteredLayers=!0,this._doRegisterTables())},_doRegisterLayers:function(){for(var d in this._pendingLayerInfos){var c=
this._pendingLayerInfos[d];this._graphicLayerInfos[d]=c;this._addLayerListeners(c)}this._pendingLayerInfos={}},_addLayerListeners:function(d){var c=this,a=d.graphicsLayer,e;d.layerMouseOverHandle=f.onLayerMouseOver(a,d.map,function(b){b.graphic&&b.graphic._graphicsLayer===a&&e!==b.graphic&&(d.layerMouseOutHandle&&d.layerMouseOutHandle.remove(),d.layerMouseOutHandle=null,e&&d.setGraphicHighlightedFunc(e,!1),e=b.graphic,c._highlightTableForAreaIndexFuncs.forEach(function(g){g(d.areaIndex)}),d.setGraphicHighlightedFunc(e,
!0),d.layerMouseOutHandle=l.once(a,"mouse-out",function(g){c._highlightTableForAreaIndexFuncs.forEach(function(h){h(null)});e&&d.setGraphicHighlightedFunc(e,!1);e=null}))})},highlightGraphicForAreaIndex:function(d){for(var c in this._graphicLayerInfos){var a=this._graphicLayerInfos[c];a.highlightedGraphic&&(a.setGraphicHighlightedFunc(a.highlightedGraphic,!1),a.highlightedGraphic=null);var e=a.getGraphicForAreaIndexFunc(d);e&&(a.setGraphicHighlightedFunc(e,!0),a.highlightedGraphic=e)}},_unSetInfo:function(d){var c=
this._graphicLayerInfos[d];delete this._graphicLayerInfos[d];c&&(c.layerMouseOverHandle&&c.layerMouseOverHandle.remove(),c.layerMouseOutHandle&&c.layerMouseOutHandle.remove())},_unSetLayers:function(){Object.keys(this._graphicLayerInfos).forEach(this._unSetInfo.bind(this));this._graphicLayerInfos={}},destroy:function(){this._unSetLayers()}})})},"esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/EditorUnits":function(){define(["esri/dijit/geoenrichment/utils/ObjectUtil","dojo/i18n!esri/nls/jsapi"],
function(t,p){p=p.geoenrichment.dijit.ReportPlayer.units;var l={},k=["px","pt","mm","cm","in"],f={px:0,pt:1,mm:1,cm:2,"in":2};l.getSupportedUnits=function(){return k};l.getShortName=function(d){return p.shortNames[d]};l.getLongName=function(d){return p.longNames[d]};l.getLongNameWithUnits=function(d){return p.longNamesWithUnits[d]};l.getPlaces=function(d){return f[d]||0};l.round=function(d,c){return t.roundNumber(d,l.getPlaces(c))};l.provideUnits=function(d,c){return d.replace("${units}",l.getShortName(c))};
return l})},"esri/dijit/geoenrichment/ReportPlayer/DataProviderGE":function(){define("dojo/_base/declare dojo/_base/lang esri/dijit/geoenrichment/promise/all esri/dijit/geoenrichment/when esri/kernel ./dataProvider/_CommandSupport ./dataProvider/_SerializationSupport ./dataProvider/_ServerSerializationSupport ./dataProvider/supportClasses/areas/AnalysisAreaUtil ./dataProvider/supportClasses/areas/AnalysisAreaJsonUtil ./dataProvider/supportClasses/areas/AreasPreprocessor ./dataProvider/supportClasses/CustomReportsManager ./dataProvider/supportClasses/TemplateJsonLoader ./dataProvider/supportClasses/ReportDataProcessor ./dataProvider/supportClasses/GEUtil ./dataProvider/supportClasses/attachments/DefaultAttachmentsStore ./dataProvider/supportClasses/attachments/CustomAttachmentsStore ./dataProvider/supportClasses/data/VariablesUtil ./dataProvider/commands/mapToImage/MapToURLUtil ./core/themes/ThemeLibrary ./core/themes/ReportThemes esri/dijit/geoenrichment/ReportPlayer/config esri/dijit/geoenrichment/ReportPlayer/countryConfig esri/dijit/geoenrichment/utils/ProjectionUtil esri/dijit/geoenrichment/utils/PortalUtil esri/dijit/geoenrichment/utils/UrlUtil".split(" "),
function(t,p,l,k,f,d,c,a,e,b,g,h,m,n,q,r,u,v,w,A,E,F,D,B,y,z){return t([d,c,a],{analysisAreasLimit:-1,cacheTemplates:!0,printMapTaskUrl:null,resetReportItemsCache:!0,constructor:function(H){p.mixin(this,H)},_getAttachmentsStore:function(H){return(new r(H)).initialize()},_currentContext:null,getReportData:function(H,G){var I=this,L=G&&G.progressCallback||function(){},N=p.mixin({},H);N.portalUrl=z.getPortalUrl(N.portalUrl);F.isPlayerOnServer||z.setArcgisUrl(N.portalUrl);e.parseSites(N);D.reset();N.hierarchy||
N.analysisAreas.some(function(O){if(O.geographies&&O.geographies[0].hierarchy)return N.hierarchy=O.geographies[0].hierarchy,!0});I.resetReportItemsCache&&h.resetCache();I._currentContext=N;N.analysisAreas=b.areasFromJson(N.analysisAreas);N.combinedAreasInfo=N.combinedAreasInfo&&b.combinedAreasInfoFromJson(N.combinedAreasInfo)||{};e.populateCombinedAreasInfo(N.combinedAreasInfo,N.analysisAreas);N.fieldData={specialTradeAreaCalculatorName:null,runReportTaskIDs:null,metadata:{},areaData:[],errors:[],
reportInfo:null};return l([k(h.tryFindReportIdByAlias(N),function(O){N.reportID=O||N.reportID}),this._discoverPortal(N),function(){return N.variables&&k(v.preprocessVariables(N.variables,N.portalUrl),function(O){N.variables=O})}()]).then(function(){return k(g.preprocessAreas(N,{analysisAreasLimit:I.analysisAreasLimit}),function(){L(.25);setTimeout(function(){I._onCreateReportStarted()});var O=N.attachmentsProvider?u(N.attachmentsProvider):I._getAttachmentsStore(N.analysisAreas),S={initGE:q.initialize(),
countryInfo:q.getCountryInfo(N.countryID),attachmentsStore:O};N.reportID?(S.reportObject=h.getCustomReportByID(N),S.templateJsonInfo=m.getTemplateJsonByID(N,I.cacheTemplates),S.runReportResult=n.runReportAndGetData(N,O)):N.variables&&(S.reportObject=h.getFakeCustomReportByContext(N),S.templateJsonInfo=m.createTemplateJsonFromVariables(N),S.runReportResult=n.runReportFromVariables(N));return l(S).then(function(R){var U=R.reportObject,Z=R.attachmentsStore,da=R.templateJsonInfo.templateJson,X=R.templateJsonInfo.templateVariableProvider,
ea=R.runReportResult;L(.75);if(!da||!U||!N.fieldData)return null;D.setCountry(R.countryInfo.country);D.setHierarchyID(N.hierarchy);D.setGeographiesModel(R.countryInfo.geographiesModels[D.getHierarchyID()]);da.theme||(da.theme=A.getReportThemeById(U.isGraphicReport?E.GRAPHIC:E.CLASSIC));var Q={isMultiFeature:U.isMultiFeature&&1<N.analysisAreas.length,reportTitle:N.reportTitle||U.title,templateJson:da,reportObject:U,fieldData:N.fieldData,analysisAreas:N.analysisAreas,combinedAreasInfo:N.combinedAreasInfo,
reverseAnalysisAreasOnMap:N.reverseAnalysisAreasOnMap,attachmentsStore:Z,geClient:q.getClient(),templateVariableProvider:X,customLogo:N.customLogo,config:{portalUrl:N.portalUrl,geoenrichmentUrl:N.geoenrichmentUrl,geometryServiceUrl:N.geometryServiceUrl,printMapTaskUrl:N.printMapTaskUrl,countryID:N.countryID,hierarchy:N.hierarchy,reportID:N.reportID,variables:N.variables}};return k(n.applyRunReportAndGetDataResults(ea,Q),function(){L(1);return Q})})})})},_discoverPortal:function(H){return y.getPortalSelf(H.portalUrl).then(function(G){H.geoenrichmentUrl=
H.geoenrichmentUrl||G.helperServices.geoenrichment.url;var I=f.id.findCredential(H.portalUrl);q.setGeoenrichmentUrl(H.geoenrichmentUrl,I&&I.token);H.geometryServiceUrl=H.geometryServiceUrl||G.helperServices.geometry.url;B.setGeometryServiceUrl(H.geometryServiceUrl);H.printMapTaskUrl=H.printMapTaskUrl||G.helperServices.printTask.url;w.setPrintMapTaskUrl(H.printMapTaskUrl)})},reportDataToSingleAreaReportData:function(H,G){var I=G.currentFeatureIndex||0,L=p.mixin({},H.fieldData);L.areaData=[L.areaData[I]];
var N=[p.mixin({},H.analysisAreas[I])];g.removeGroupInfo(N);var O=H.attachmentsStore;return{isMultiFeature:!1,reportTitle:G.reportTitle,templateJson:G.templateJson,reportObject:H.reportObject,fieldData:L,analysisAreas:N,combinedAreasInfo:null,reverseAnalysisAreasOnMap:!1,attachmentsStore:O&&{getImages:function(){O.supportsMultipleAreas&&O.setCurrentAnalysisAreaIndex(I);return O.getImages()},getAttributes:function(){O.supportsMultipleAreas&&O.setCurrentAnalysisAreaIndex(I);return O.getAttributes()},
getNotes:function(){O.supportsMultipleAreas&&O.setCurrentAnalysisAreaIndex(I);return O.getNotes()}},geClient:H.geClient,templateVariableProvider:H.templateVariableProvider,config:H.config}},_getCurrentContext:function(){return this._currentContext},_onCreateReportStarted:function(){}})})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/_CommandSupport":function(){define("require dojo/_base/declare dojo/_base/lang esri/dijit/geoenrichment/Deferred esri/dijit/geoenrichment/when ../PlayerCommands ./supportClasses/GEUtil esri/dijit/geoenrichment/ReportPlayer/config".split(" "),
function(t,p,l,k,f,d,c,a){var e={};return p(null,{_commands:null,_commandIndex:0,_initCommandsPromise:null,constructor:function(){this._commands={}},_initCommands:function(){var b=this;if(this._initCommandsPromise)return f(this._initCommandsPromise);var g=new k;if(a.modules.exportCommands)t(["./commands/CreateHTMLCommand","./commands/CreatePDFCommand","./commands/CreateImageCommand","./commands/PrintReportCommand","./commands/CreatePlayerCommand"],function(h,m,n,q,r){e[d.HTML]=h;e[d.PDF]=m;e[d.IMAGE]=
n;e[d.PRINT]=q;e[d.DYNAMIC_HTML]=r;c.getInitPromise().then(g.resolve)});else return g.resolve();g.promise.then(function(){b._initCommandsPromise=!0});return this._initCommandsPromise=g.promise},registerCommand:function(b,g,h){function m(q){if(!q.isBrowserSupported||q.isBrowserSupported())n._commands[b]||(n._commands[b]={index:n._commandIndex++,id:b,label:g||q.label,command:q})}var n=this;if(h)m(h);else return this._initCommands().then(function(){var q=e[b];q&&m(new q)})},getCommands:function(){return this._initCommands().then(function(){var b=
[],g=this._commands[d.PDF],h;for(h in this._commands)b.push(this._commands[h]);b.sort(function(m,n){return m.index-n.index});return(h=this._getCurrentContext())&&h.geoenrichmentUrl&&g?f(c.hasCapability("FormatInfographics"),function(m){m||(b=b.filter(function(n){return n!==g}));return b}):f(b)}.bind(this))},getCommandById:function(b){return this._commands[b]&&this._commands[b].command},executeCommand:function(b,g,h,m){return this._initCommands().then(function(){h=l.mixin({printMapTaskUrl:this.printMapTaskUrl},
h);return this._commands[b]&&this._commands[b].command&&this._commands[b].command.execute(g,h||{},m)}.bind(this))},executeCommandOnData:function(b,g,h,m){return this._initCommands().then(function(){h=l.mixin({printMapTaskUrl:this.printMapTaskUrl},h);return this._commands[b]&&this._commands[b].command&&this._commands[b].command.executeOnData(this,g,h||{},m)}.bind(this))}})})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/_SerializationSupport":function(){define("require dojo/_base/declare dojo/_base/lang esri/dijit/geoenrichment/Deferred esri/dijit/geoenrichment/when ./supportClasses/areas/AnalysisAreaJsonUtil ./supportClasses/areas/AnalysisAreaUtil ../core/infographics/InfographicTypes ../core/supportClasses/templateJsonUtils/query/TemplateJsonQueryUtil esri/dijit/geoenrichment/ReportPlayer/countryConfig esri/dijit/geoenrichment/utils/PortalUtil esri/dijit/geoenrichment/utils/UrlUtil esri/dijit/geoenrichment/ReportPlayer/config esri/dijit/geoenrichment/ReportPlayer/_devConfig".split(" "),
function(t,p,l,k,f,d,c,a,e,b,g,h,m,n){function q(){var F=new k;t("./supportClasses/attachments/AttachmentsStoreSerializer ./supportClasses/GEUtil ../core/supportClasses/templateJsonUtils/TemplateJsonSerializer ../core/supportClasses/templateJsonUtils/TemplateJsonAnalyzer ../core/infographics/utils/InfographicJsonUtil ../core/conversion/portalToEditorUtils/variables/PlayerVariableProvider ../core/infographics/InfographicTypes ./commands/mapToImage/MapToURLUtil esri/dijit/geoenrichment/utils/ProjectionUtil".split(" "),
function(D,B,y,z,H,G,I,L,N){r=D;u=B;v=y;w=G;a=I;A=L;E=N;F.resolve()});return F.promise}var r,u,v,w,A,E;return p(null,{reportDataToJson:function(F,D){var B=this;D=D||{};var y=!1;e.processTemplateFieldInfos(F.templateJson,function(z){z.isInfographic&&z.infographicJson.type===a.ATTACHMENTS&&(y=!0)});return q().then(function(){return f(F.attachmentsStore&&r.getAttachmentsStoreJson(F.attachmentsStore,{numAreas:F.analysisAreas.length,saveImages:y}),function(z){var H=l.mixin({},F.config);!1!==D.forceFixedDataMode&&
delete H.geoenrichmentUrl;z={jsapiVersion:m.jsapiVersion,isMultiFeature:F.isMultiFeature,reportTitle:F.reportTitle,templateJson:v.serialize(F.templateJson),reportObject:B._prepareReportObjectJson(F.reportObject),fieldData:F.fieldData,analysisAreas:d.areasToJson(F.analysisAreas),combinedAreasInfo:F.combinedAreasInfo&&d.combinedAreasInfoToJson(F.combinedAreasInfo),reverseAnalysisAreasOnMap:F.reverseAnalysisAreasOnMap,attachmentsStore:z,templateVariableProvider:F.templateVariableProvider&&F.templateVariableProvider.toJson(),
config:H,countryConfig:b.toJson(),mapImageInfos:D.mapImageInfos,loadedMapPortalItems:D.loadedMapPortalItems,customLogo:F.customLogo};n.logData&&(console.log("_SerializationSupport.js \x3d\x3e reportDataJson"),console.log(z));return z})})},_prepareReportObjectJson:function(F){var D={},B;for(B in F)F[B]&&"object"!==typeof F[B]&&(D[B]=F[B]);return D},reportDataFromJson:function(F){return q().then(function(){var D=F.fieldData;D.featureData&&(D.areaData=D.featureData.map(function(y){return{mainCalculator:{data:y}}}),
delete D.featureData);var B={isMultiFeature:F.isMultiFeature,reportTitle:F.reportTitle,templateJson:v.deserialize(F.templateJson),reportObject:F.reportObject,fieldData:D,analysisAreas:d.areasFromJson(F.analysisAreas),combinedAreasInfo:F.combinedAreasInfo&&d.combinedAreasInfoFromJson(F.combinedAreasInfo)||{},reverseAnalysisAreasOnMap:F.reverseAnalysisAreasOnMap,attachmentsStore:F.attachmentsStore&&r.getAttachmentsStoreFromJson(F.attachmentsStore),templateVariableProvider:F.templateVariableProvider&&
new w(F.templateVariableProvider),config:F.config||{},mapImageInfos:F.mapImageInfos,loadedMapPortalItems:F.loadedMapPortalItems,customLogo:F.customLogo};c.populateCombinedAreasInfo(B.combinedAreasInfo,B.analysisAreas);u.setGeoenrichmentUrl(null);D=!1;B.config.portalUrl&&h.setArcgisUrl(h.getPortalUrl(B.config.portalUrl));B.config.geometryServiceUrl?E.setGeometryServiceUrl(B.config.geometryServiceUrl):D=!0;B.config.printMapTaskUrl?A.setPrintMapTaskUrl(B.config.printMapTaskUrl):D=!0;b.fromJson(F.countryConfig);
return f(D&&g.tryConfigureServicesFromAGOLPublic()).then(function(){return B})})}})})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/areas/AnalysisAreaJsonUtil":function(){define(["esri/graphic","esri/dijit/PopupTemplate"],function(t,p){function l(d,c){if(!d)return null;d.getLayer()&&(d=new t(d.geometry,d.symbol,d.attributes,d.infoTemplate));d=d.toJson();c&&delete d.infoTemplate;return d}function k(d){if(!d)return null;if(d instanceof t)return d;var c=d.infoTemplate&&new p(d.infoTemplate);
delete d.infoTemplate;d=new t(d);c&&d.setInfoTemplate(c);return d}function f(d){var c={},a;for(a in d){var e=d[a];if("string"===typeof e||"number"===typeof e&&!isNaN(e))c[a]=e}return c}return{areasToJson:function(d,c){var a=c&&c.excludeInfoTemplate;return d.map(function(e){var b=f(e);b.feature=l(e.feature,a);b.location=e.location&&l(e.location,a);b.additionalFeatures=e.additionalFeatures&&e.additionalFeatures.map(function(g){return l(g,a)});b.geographies=e.geographies;b.buffer=e.buffer;b.featureServiceQueryInfos=
e.featureServiceQueryInfos;b.dynamicAttributes=e.dynamicAttributes;return b})},combinedAreasInfoToJson:function(d){var c=f(d);c.groups=d.groups&&d.groups.map(function(a){var e=f(a);e.indexes=a.indexes.slice();e.location=a.location&&l(a.location);e.additionalFeatures=a.additionalFeatures&&a.additionalFeatures.map(l);return e});return c},areasFromJson:function(d){return d.map(function(c){var a=f(c);a.feature=k(c.feature);a.location=c.location&&k(c.location);a.additionalFeatures=c.additionalFeatures&&
c.additionalFeatures.map(k);a.geographies=c.geographies;a.buffer=c.buffer;a.featureServiceQueryInfos=c.featureServiceQueryInfos;a.dynamicAttributes=c.dynamicAttributes;return a})},combinedAreasInfoFromJson:function(d){var c=f(d);c.groups=d.groups&&d.groups.map(function(a){var e=f(a);e.indexes=a.indexes.slice();e.location=a.location&&k(a.location);e.additionalFeatures=a.additionalFeatures&&a.additionalFeatures.map(k);return e});return c}}})},"esri/dijit/geoenrichment/ReportPlayer/core/infographics/InfographicTypes":function(){define(["dojo/_base/lang"],
function(t){var p={STATIC:"static",ATTACHMENTS:"attachments",AREA_DETAILS:"areaDetails",INTERESTING_FACTS:"interestingFacts",LOCATOR_TABLE:"locatorTable",COMPARISON_TABLE:"comparisonTable"},l={AGE_PYRAMID:"AgePyramid",ONE_VAR:"OneVar",RELATED_VARS:"RelatedVariables",TAPESTRY:"Tapestry",PRIZM5:"Prizm5"},k={},f;for(f in l)k[l[f]]=!0;t.mixin(p,l);var d={};for(f in p)d[p[f]]=!0;p.isDynamic=function(c){return k[c]};p.isSupported=function(c){return d[c]};p.isTableLike=function(c){return c===p.AREA_DETAILS||
c===p.LOCATOR_TABLE||c===p.COMPARISON_TABLE};p.fixTapestryNameToWidget=function(c){return"TapestryNEW"===c?"Tapestry":c};p.fixTapestryNameToData=function(c){return"Tapestry"===c?"TapestryNEW":c};p.supportsMultiFeature=function(c){return c===p.COMPARISON_TABLE||c===p.LOCATOR_TABLE||c===p.ATTACHMENTS||c===p.AREA_DETAILS};p.supportsComparison=function(c){return c===p.ONE_VAR||c===p.AGE_PYRAMID||c===p.RELATED_VARS||c===p.COMPARISON_TABLE};p.isDynamicWithFiltering=function(c){return c===p.ONE_VAR||c===
p.AGE_PYRAMID||c===p.RELATED_VARS};return p})},"esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/templateJsonUtils/query/TemplateJsonQueryUtil":function(){define(["./_SectionJsonCollector","../../../infographics/InfographicTypes"],function(t,p){var l={},k={process:function(f,d,c,a,e){var b=a;a=function(g,h,m){g&&b.apply(this,arguments)};e={processLevel:d,objJson:c,processFunc:a,ignoreComparisonCalculators:e&&e.ignoreComparisonCalculators};f!==d||"field"===f&&"field"===d?"document"===f?k._processTemplateJson(c,
e):"section"===f?k._processSectionJson(c,e):"table"===f?k._processTableJson(c,e,null):"tableRow"===f?k._processTableDataObj(c,e,null):"field"===f&&k._processFieldInfo(c,e,null):a(c)},_processTemplateJson:function(f,d){f.sectionsTables?f.sectionsTables.forEach(function(c){k._processTableJson(c,d)}):t.collectSectionJsons(f,{saveParentInfo:!1,processFieldInfoFunc:function(c){"field"===d.processLevel&&d.processFunc(c)}}).forEach(function(c){k._processSectionJson(c,d)})},_processSectionJson:function(f,
d){"section"===d.processLevel&&d.processFunc(f);f.stack&&f.stack.forEach(function(c){"sectionElement"===d.processLevel&&d.processFunc(c);"table"===c.id&&k._processTableJson(c,d)})},_processTableJson:function(f,d,c){"table"===d.processLevel&&d.processFunc(f);f.rows.forEach(function(a){"tableRow"===d.processLevel&&d.processFunc(a,c);k._processTableDataObj(a,d,c)});f.backgroundSectionJson&&k._processSectionJson(f.backgroundSectionJson,d);f.foregroundSectionJson&&k._processSectionJson(f.foregroundSectionJson,
d);f.backgroundFloatingTablesSectionJson&&k._processSectionJson(f.backgroundFloatingTablesSectionJson,d);f.foregroundFloatingTablesSectionJson&&k._processSectionJson(f.foregroundFloatingTablesSectionJson,d)},_processTableDataObj:function(f,d,c){if(f.fieldInfos)for(var a in f.fieldInfos)k._processFieldInfo(f.fieldInfos[a],d,c,"tableCell")},_processFieldInfo:function(f,d,c,a){if(f){"field"!==d.processLevel||d.skipVariables&&(f.hasVariable||f.script)||d.processFunc(f,c,a);f.triggerJson&&f.triggerJson.fieldInfo&&
f.templateName!==f.triggerJson.fieldInfo.templateName&&k._processFieldInfo(f.triggerJson.fieldInfo,d,f,"trigger");f.dataDrillingPanelInfo&&k._processSectionJson(f.dataDrillingPanelInfo.sectionJson,d);f.tooltipInfo&&f.tooltipInfo.fieldInfo&&k._processFieldInfo(f.tooltipInfo.fieldInfo,d,f,"fieldTooltip");f.linkFieldInfo&&k._processFieldInfo(f.linkFieldInfo,d,f,"linkFieldInfo");if(f.isRichText)for(var e in f.richTextJson.fieldInfos)k._processFieldInfo(f.richTextJson.fieldInfos[e],d,f,"richTextPart");
f.isInfographic&&k._processInfographicFieldInfo(f,d);f.isChart&&k._processChartFieldInfo(f,d);f.isReportSection&&f.sectionJson&&k._processSectionJson(f.sectionJson,d)}},_processInfographicFieldInfo:function(f,d){var c=f.infographicJson;switch(c.type){case p.STATIC:c.header&&k._processTableJson(c.header,d,f);c.variableTables&&c.variableTables.forEach(function(b){b.variable&&k._processFieldInfo(b.variable.fieldInfo,d,f,"staticInfographicVariable");b.description&&b.description.fieldInfo&&k._processFieldInfo(b.description.fieldInfo,
d,f,"staticInfographicDescription")});if(c.dataDrilling)for(var a in c.dataDrilling){var e=c.dataDrilling[a];e&&e.sectionJson&&k._processSectionJson(e.sectionJson,d)}break;case p.AGE_PYRAMID:case p.TAPESTRY:case p.PRIZM5:case p.RELATED_VARS:case p.ONE_VAR:!d.ignoreComparisonCalculators&&c.fieldInfos&&c.fieldInfos.forEach(function(b){k._processFieldInfo(b,d,f,"dynamicInfographicVariable")});break;case p.AREA_DETAILS:c.titleSectionJson&&k._processSectionJson(c.titleSectionJson,d,f);c.attributesSectionJson&&
k._processSectionJson(c.attributesSectionJson,d,f);c.notesSectionJson&&k._processSectionJson(c.notesSectionJson,d,f);break;case p.LOCATOR_TABLE:c.titleSectionJson&&k._processSectionJson(c.titleSectionJson,d);k._processSectionJson(c.headerSectionJson,d);k._processSectionJson(c.dataSectionJson,d);c.summarySectionJson&&k._processSectionJson(c.summarySectionJson,d);c.summaryFooterSectionJson&&k._processSectionJson(c.summaryFooterSectionJson,d);c.summarizeFractionField&&"object"===typeof c.summarizeFractionField&&
k._processFieldInfo(c.summarizeFractionField,d,f,"locatorFractionFieldInfo");break;case p.COMPARISON_TABLE:c.titleSectionJson&&k._processSectionJson(c.titleSectionJson,d),d.ignoreComparisonCalculators||k._processSectionJson(c.dataSectionJson,d)}},_processChartFieldInfo:function(f,d){var c=f.chartJson.visualProperties;c.chartIcons&&c.chartIcons.forEach(function(a){k._processFieldInfo(a,d,f,"chartIcon")});c.floatingIcons&&c.floatingIcons.forEach(function(a){k._processTableJson(a,d,f,"floatingIcon")});
c.floatingTexts&&c.floatingTexts.forEach(function(a){k._processTableJson(a,d,f,"floatingText")});d.ignoreComparisonCalculators&&f.chartJson.comparisonInfo&&(d=Object.assign({},d),d.skipVariables=!0);c.tooltip&&c.tooltip.fieldInfo&&k._processFieldInfo(c.tooltip.fieldInfo,d,f,"chartTooltip");f.chartJson.dataDrillingPanelInfo&&k._processSectionJson(f.chartJson.dataDrillingPanelInfo.sectionJson,d);f.chartJson.seriesItems.forEach(function(a){a.points.forEach(function(e){k._processFieldInfo(e.fieldInfo,
d,f,"chartPointField");e.iconFieldInfo&&k._processFieldInfo(e.iconFieldInfo,d,f,"chartPointIcon");e.captionFieldInfo&&k._processFieldInfo(e.captionFieldInfo,d,f,"chartPointCaption")})})}};l.DOCUMENT="document";l.SECTION="section";l.TABLE="table";l.SECTION_ELEMENT="sectionElement";l.TABLE_ROW="tableRow";l.FIELD="field";l.process=k.process;l.processTemplateFieldInfos=function(f,d,c){k.process("document","field",f,d,c)};l.processSectionFieldInfos=function(f,d,c){k.process("section","field",f,d,c)};l.processSectionElements=
function(f,d){k.process("document","sectionElement",f,d)};l.processTableFieldInfos=function(f,d,c){k.process("table","field",f,d,c)};l.processChartFieldInfos=function(f,d){f.seriesItems.forEach(function(e){e.points.forEach(function(b){b.fieldInfo&&d(b.fieldInfo,"series")})});var c=f.visualProperties.tooltip;if(c&&c.fieldInfo&&c.fieldInfo.isRichText)for(var a in c.fieldInfo.richTextJson.fieldInfos)d(c.fieldInfo.richTextJson.fieldInfos[a],"tooltip");f.dataDrillingPanelInfo&&l.processSectionFieldInfos(f.dataDrillingPanelInfo.sectionJson,
function(e){d(e,"dataDrilling")})};l.processDataDrillingPanelInfos=function(f,d){l.processTemplateFieldInfos(f,function(c){if(c.isInfographic&&c.infographicJson.dataDrilling)for(var a in c.infographicJson.dataDrilling){var e=c.infographicJson.dataDrilling[a];e&&d(e)}else c.isChart&&c.chartJson.dataDrillingPanelInfo?d(c.chartJson.dataDrillingPanelInfo):c.dataDrillingPanelInfo&&d(c.dataDrillingPanelInfo)})};l.hasMultiFeatureChart=function(f){var d=!1;l.processTemplateFieldInfos(f,function(c){c.isChart&&
(d=d||c.chartJson&&!!c.chartJson.isMultiFeatureChart)});return d};l.hasComparisonInfographicTable=function(f){var d=!1;l.processTemplateFieldInfos(f,function(c){c.isInfographic&&(d=d||c.infographicJson&&c.infographicJson.type===p.COMPARISON_TABLE)});return d};l.isGraphicReport=function(f){return!!f.sectionsTables};l.hasDynamicColumns=function(f){return l._checkTableAttributes(f,function(d){return 0<d.dynamicColumns})};l.hasDynamicRows=function(f){return l._checkTableAttributes(f,function(d){return 0<
d.dynamicRows})};l._checkTableAttributes=function(f,d){var c;l.isGraphicReport(f)?l.processTemplateFieldInfos(f,function(a){a.isReportSection&&a.sectionJson&&a.sectionJson.stack&&a.sectionJson.stack.some(function(e){if("table"===e.id&&e.attributes&&d(e.attributes))return c=!0})}):c=l.collectSectionJsons(f).some(function(a){return a.stack&&a.stack.some(function(e){return"table"===e.id&&e.attributes&&d(e.attributes)})});return c};l.hasMultiFeatureSections=function(f){return l.isGraphicReport(f)?l.hasMultiFeatureChart(f)||
l.hasDynamicColumns(f)||l.hasComparisonInfographicTable(f):!1};l.calcNumberOfMaps=function(f,d){var c=0;l.collectSectionJsons(f).forEach(function(a){c+=l.calcNumberOfMapsInSectionJson(a,d)});return c};l.calcNumberOfMapsInSectionJson=function(f,d){var c=0;f.stack&&f.stack.forEach(function(a){a.isMap&&(d&&d(a),c++)});l.processSectionFieldInfos(f,function(a){a.isMap&&(d&&d(a.mapJson),c++)});return c};l.calcNumberOfMapsInTableJson=function(f,d){var c=0;l.processTableFieldInfos(f,function(a){a.isReportSection&&
(c+=l.calcNumberOfMapsInSectionJson(a.sectionJson,d))});return c};l.collectSectionJsons=t.collectSectionJsons;l.getParentBox=t.getParentBox;l.setParentBox=t.setParentBox;l.getParentStyle=t.getParentStyle;return l})},"esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/templateJsonUtils/query/_SectionJsonCollector":function(){define(["dojo/_base/lang","esri/dijit/geoenrichment/utils/MathUtil","esri/dijit/geoenrichment/ReportPlayer/core/grid/coreUtils/GridDataUtil","../../tableJson/TableJsonUtil"],
function(t,p,l,k){var f={},d={provideParentInfo:function(e,b,g,h,m,n){c.collectStatistics(b);a:{switch(m){case "floating":var q=b.style.left+n.left;break a;case "page":q=c.calcX(b,g,h)+n.left;break a}q=void 0}a:{switch(m){case "floating":m=b.style.top+n.top;break a;case "page":m=c.calcY(b,g,h)+n.top;break a}m=void 0}e._parentBox={x:q,y:m,w:c.calcFullWidth(b,g,h),h:c.calcFullHeight(b,g,h)};b=h.field;g.style.fields=g.style.fields||{};g=(g.style.fields[b]=g.style.fields[b]||{}).backgroundColor;e._parentStyle=
{backgroundColor:g}},sanitize:function(e){c.sanitize(e)}},c={collectStatistics:function(e){if(!e._measureInfo){var b={},g={},h;e.columns.forEach(function(w){h&&(g[h.field]=w);h=w;b[w.field]=w});var m={},n={},q={},r={},u={},v={};e.rows.forEach(function(w,A){e.columns.forEach(function(E,F){var D=u[F]||0,B=v[A]||0,y=c._getDataHeight(w,E.field);E=c._getFieldWidth(w,E);D+=y;B+=E;u[F]=D;v[A]=B;y=F+"_"+A;n[y]=D;m[y]=B;q[y]=m[F-1+"_"+A]||0;r[y]=n[F+"_"+(A-1)]||0})});e._measureInfo={xPositions:q,yPositions:r,
columnsHash:b,nextColumnHash:g}}},calcX:function(e,b,g){g=e.columns.indexOf(g);b=e.rows.indexOf(b);return e._measureInfo.xPositions[g+"_"+b]||0},calcY:function(e,b,g){g=e.columns.indexOf(g);b=e.rows.indexOf(b);return e._measureInfo.yPositions[g+"_"+b]||0},calcFullWidth:function(e,b,g){g=g.field;var h=c._getFieldWidth(b,e._measureInfo.columnsHash[g]),m=b.columnSpans&&b.columnSpans[g]||1;if(1<m)for(var n,q=0;q<m-1;q++)n=e._measureInfo.nextColumnHash[n?n.field:g],h+=c._getFieldWidth(b,n);return h},_getFieldWidth:function(e,
b){e.style.fields=e.style.fields||{};return(e.style.fields[b.field]=e.style.fields[b.field]||{}).width||b.style.width},calcFullHeight:function(e,b,g){g=g.field;var h=e.rows.indexOf(b),m=c._getDataHeight(b,g);b=b.rowSpans&&b.rowSpans[g]||1;if(1<b)for(var n=h+1,q=0;q<b-1;q++)h=e.rows[n++],m+=c._getDataHeight(h,g);return m},_getDataHeight:function(e,b){e.style.fields=e.style.fields||{};return(e.style.fields[b]=e.style.fields[b]||{}).height||e.style.height},sanitize:function(e){delete e._measureInfo}},
a={getIntersectingTableJsonsBehind:function(e,b,g,h,m){function n(v){var w=v.rows[0].fieldInfos[v.columns[0].field];return l.isTextLikeCell(w)||l.isShapeCell(w)||l.isImageCell(w)?p.checkRectsIntersect([g,{x:v.style.left+b.left,y:v.style.top+b.top,w:k.getTableWidth(v),h:k.getTableHeight(v)}]):!1}function q(v){return p.checkRectsIntersect([g,{x:v.style.left+b.left,y:v.style.top+b.top,w:v.style.width,h:v.style.height}])}var r=[],u=[];e.backgroundFloatingTablesSectionJson&&e.backgroundFloatingTablesSectionJson.stack.forEach(function(v,
w){if(-1===h||m||h!==w)if("table"===v.id&&n(v)||"img"===v.id&&q(v))-1===h||m||h>w?r.push(v):u.push(v)});e.foregroundFloatingTablesSectionJson&&e.foregroundFloatingTablesSectionJson.stack.forEach(function(v,w){if(m&&h===w)return!0;if("table"===v.id&&n(v)||"img"===v.id&&q(v))m&&h>w?r.push(v):u.push(v)});return{elementJsonsBehind:r,elementJsonsAbove:u}}};f.collectSectionJsons=function(e,b){b=b||{};var g=[];if(!e)return[];if(e.sections)return e.sections;if(!e.sectionsTables)return[];b.processSectionJson=
b.processSectionJson||function(){};e.sectionsTables.forEach(function(h,m){var n={addBackground:function(){!1!==b.backgroundForeground&&h.backgroundSectionJson&&h.backgroundSectionJson.stack&&g.push(h.backgroundSectionJson)},addBackgroundTables:function(q){var r=[];!1!==b.floatingTables&&h.backgroundFloatingTablesSectionJson&&h.backgroundFloatingTablesSectionJson.stack.forEach(function(u,v){"table"===u.id&&f._processTableJson(u,r,"floating",e.documentOptions,b,h,v,!1)});q&&r.reverse();r.forEach(function(u){b.processSectionJson(u,
{pageIndex:m,source:"foreground",floatingIndex:u.__floatingIndex});delete u.__floatingIndex});g=g.concat(r)},addInGridSections:function(){var q=[];f._processTableJson(h,q,"page",e.documentOptions,b,h);q.forEach(function(r){b.processSectionJson(r,{pageIndex:m,source:"grid",index:r.__inGridIndex});delete r.__inGridIndex});g=g.concat(q)},addForegroundTables:function(q){var r=[];!1!==b.floatingTables&&h.foregroundFloatingTablesSectionJson&&h.foregroundFloatingTablesSectionJson.stack.forEach(function(u,
v){"table"===u.id&&f._processTableJson(u,r,"floating",e.documentOptions,b,h,v,!0)});q&&r.reverse();r.forEach(function(u){b.processSectionJson(u,{pageIndex:m,source:"foreground",floatingIndex:u.__floatingIndex});delete u.__floatingIndex});g=g.concat(r)},addForeground:function(){!1!==b.backgroundForeground&&h.foregroundSectionJson&&h.foregroundSectionJson.stack&&g.push(h.foregroundSectionJson)}};b.topFirst?(n.addForeground(),n.addForegroundTables(!0),n.addInGridSections(),n.addBackgroundTables(!0),
n.addBackground()):(n.addBackground(),n.addBackgroundTables(),n.addInGridSections(),n.addForegroundTables(),n.addForeground())});return g};f._processTableJson=function(e,b,g,h,m,n,q,r){e.rows.forEach(function(u,v){u.fieldInfos&&e.columns.forEach(function(w,A){var E=u.fieldInfos[w.field];if(E&&E.sectionJson&&E.sectionJson.stack){m.processFieldInfoFunc&&m.processFieldInfoFunc(E);(!1!==m.saveParentInfo||m.populateWithFloatingElementsBehind)&&d.provideParentInfo(E.sectionJson,e,u,w,g,h);if(m.populateWithFloatingElementsBehind){var F=
t.clone(E.sectionJson),D;"page"===g?D=a.getIntersectingTableJsonsBehind(n,h,F._parentBox,-1,void 0):"floating"===g&&(D=a.getIntersectingTableJsonsBehind(n,h,F._parentBox,q,r));E=function(B){B=t.clone(B);B.isContextFloatingElement=!0;B.style.left=B.style.left+h.left-F._parentBox.x;if("table"===B.id)B.style.top=B.style.top+h.top-F._parentBox.y;else if("img"===B.id||"map"===B.id)B.style.top=B.style.top+h.top-F._parentBox.y;return B};w=D.elementJsonsBehind.map(E);D=D.elementJsonsAbove.map(E);F.stack=
w.concat(F.stack);F.stack=F.stack.concat(D);b.push(F)}else b.push(E.sectionJson);D=b[b.length-1];"page"===g?D.__inGridIndex=v*e.columns.length+A:D.__floatingIndex=q}})});d.sanitize(e)};f.getParentBox=function(e){return e&&e._parentBox};f.setParentBox=function(e,b){e._parentBox=b};f.getParentStyle=function(e){return e&&e._parentStyle};return f})},"esri/dijit/geoenrichment/utils/MathUtil":function(){define([],function(){function t(d){return Array.isArray(d)?d:[d.x,d.y]}function p(d){return Array.isArray(d)?
d:[d.x,d.y,d.x+d.w,d.y+d.h]}function l(d){return Array.isArray(d)?{x:d[0],y:d[1],w:d[2]-d[0],h:d[3]-d[1]}:d}function k(d){return[[d[0],d[1]],[d[2],d[1]],[d[2],d[3]],[d[0],d[3]],[d[0]+(d[2]-d[0])/2,d[1]+(d[3]-d[1])/2]]}var f={rotatePointAroundPoint:function(d,c,a){a=f.degToRad(a);var e=t(d),b=t(c);c=Math.cos(a)*(b[0]-e[0])-Math.sin(a)*(b[1]-e[1])+e[0];a=Math.sin(a)*(b[0]-e[0])+Math.cos(a)*(b[1]-e[1])+e[1];return Array.isArray(d)?[c,a]:{x:c,y:a}},degToRad:function(d){return d*Math.PI/180},radToDeg:function(d){return 180*
d/Math.PI},cosDeg:function(d){return Math.cos(f.degToRad(d))},sinDeg:function(d){return Math.sin(f.degToRad(d))},angleTo180_180Range:function(d){d=(d+180)%360;0>d&&(d=360+d);return d-180},angleTo0_360Range:function(d){d%=360;0>d&&(d=360+d);return d},calcVectorLength:function(d){var c=d[0]-d[2];d=d[1]-d[3];return Math.sqrt(c*c+d*d)},addPointToVector:function(d,c){c=t(c);d=d.slice();d[0]+=c[0];d[1]+=c[1];d[2]+=c[0];d[3]+=c[1];return d},subtractPointFromVector:function(d,c){c=t(c);d=d.slice();d[0]-=
c[0];d[1]-=c[1];d[2]-=c[0];d[3]-=c[1];return d},putVectorToOrigin:function(d){return f.subtractPointFromVector(d,[d[0],d[1]])},normalizeVector:function(d){d=f.putVectorToOrigin(d);var c=f.calcVectorLength(d);d[2]/=c;d[3]/=c;return d},calcDotProduct:function(d,c){d=f.putVectorToOrigin(d);c=f.putVectorToOrigin(c);return d[2]*c[2]+d[3]*c[3]},calcAngleBetweenVectors:function(d,c){d=f.normalizeVector(d);c=f.normalizeVector(c);return Math.acos(f.calcDotProduct(d,c))},addLengthToVector:function(d,c){var a=
f.calcVectorLength(d),e=[d[0],d[1]];d=f.normalizeVector(d);d[2]*=a+c;d[3]*=a+c;return f.addPointToVector(d,e)},rotateVectorAroundPoint:function(d,c,a){c=t(c);var e=f.rotatePointAroundPoint(c,[d[0],d[1]],a);d=f.rotatePointAroundPoint(c,[d[2],d[3]],a);return[e[0],e[1],d[0],d[1]]},toLineABC:function(d){var c=d[3]-d[1],a=d[0]-d[2];return[c,a,-c*d[0]-a*d[1]]},intersect2Lines:function(d,c){var a=f.toLineABC(d),e=f.toLineABC(c);c=a[0];d=a[1];a=a[2];var b=e[0],g=e[1];e=e[2];var h=c*g-b*d;return 0===h?null:
[(e*d-a*g)/h,(b*a-c*e)/h]},intersectLineWithRect:function(d,c){function a(n,q){(n=f.intersect2Lines(d,[n[0],n[1],q[0],q[1]]))&&f.isPointInRect(c,n)&&m.push(n)}var e=k(c),b=e[0],g=e[1],h=e[2];e=e[3];var m=[];a(b,g);a(g,h);a(h,e);a(e,b);if(2!==m.length)return null;b=[m[0][0],m[0][1],m[1][0],m[1][1]];return f.calcVectorLength(b)?b:null},isPointInRect:function(d,c){d=p(d);c=t(c);var a=d[2]-d[0],e=d[3]-d[1];return!(c[0]<d[0]||c[0]>d[0]+a||c[1]<d[1]||c[1]>d[1]+e)},isRectInRect:function(d,c){return f.checkRectsIntersect([d,
c])&&k(p(d)).every(function(a){return f.isPointInRect(c,a)})},checkRectsIntersect:function(d){d=d.map(p);return d.every(function(c){var a=k(c);return d.every(function(e){return c===e?!0:a.some(function(b){return f.isPointInRect(e,b)})||k(e).some(function(b){return f.isPointInRect(c,b)})})})},getRotatedRectBox:function(d,c){var a=!Array.isArray(d);d=p(d);var e=k(d);d=e[0];var b=e[1],g=e[2],h=e[3];e=e[4];d=f.rotatePointAroundPoint(e,d,c);b=f.rotatePointAroundPoint(e,b,c);g=f.rotatePointAroundPoint(e,
g,c);h=f.rotatePointAroundPoint(e,h,c);d=f.getPointsExtent([d,b,g,h]);return a?l(d):d},uniteRects:function(d){var c=!Array.isArray(d[0]);d=d.map(p);var a=[];d.forEach(function(e){a=a.concat(k(e))});d=f.getPointsExtent(a);return c?l(d):d},getPointsExtent:function(d){var c=!Array.isArray(d[0]),a=Infinity,e=-Infinity,b=Infinity,g=-Infinity;d.forEach(function(h){h=t(h);a=Math.min(a,h[0]);e=Math.max(e,h[0]);b=Math.min(b,h[1]);g=Math.max(g,h[1])});d=[a,b,e,g];return c?l(d):d}};return f})},"esri/dijit/geoenrichment/ReportPlayer/core/grid/coreUtils/GridDataUtil":function(){define(["dojo/_base/lang",
"../../supportClasses/templateJsonUtils/fieldInfo/FieldLibrary","esri/dijit/geoenrichment/utils/FieldUtil","esri/dijit/geoenrichment/utils/ObjectUtil","esri/dijit/geoenrichment/ReportPlayer/countryConfig"],function(t,p,l,k,f){var d={getFieldCellValue:function(c){return c.row&&c.row[c.column.field]},setFieldCellContent:function(c,a){c.set("value",a);c.row[c.column.field]=a},clearFieldInfo:function(c,a){c.fieldInfos&&delete c.fieldInfos[a];c[a]="";d.setNumericDataValue(void 0,c,a)},getNumericCellValue:function(c){return d.getNumericDataValue(c.row,
c.column.field)},setNumericCellValue:function(c,a){return d.setNumericDataValue(a,c.row,c.column.field)},getNumericDataValue:function(c,a){return c&&a&&c[a+"_numeric"]},setNumericDataValue:function(c,a,e){a[e+"_numeric"]=c},getCellGroupStyleStats:function(c){return c.row&&c.column.field&&c.row[c.column.field+"_groupStyle"]},setCellGroupStyleStats:function(c,a){c.row[c.column.field+"_groupStyle"]=a},getRenderedValue:function(c,a,e){var b={parentGrid:c,row:a,column:e};c=c._getCellRenderer().getRenderedContent(b);
if(c.isUnavailableData)return{};a=d.getNumericDataValue(a,e.field);"number"!==typeof a&&("number"!==typeof c.value||isNaN(c.value)?"string"===typeof c.formattedValue&&(e=k.parsePercentOrCurrency(c.formattedValue,f.getCurrencyFormat()),isNaN(e)||(a=e)):a=c.value);return{numericValue:a,formattedValue:c.formattedValue}},isEmptyCell:function(c){return!c.get("value")&&!c.row[c.column.field]&&!d.getFieldInfo(c)},hasSpans:function(c){return d.getColumnSpan(c)||d.getRowSpan(c)},getColumnSpan:function(c){return c&&
c.row&&c.row.columnSpans&&c.row.columnSpans[c.column.field]},getRowSpan:function(c){return c&&c.row&&c.row.rowSpans&&c.row.rowSpans[c.column.field]},getDataColumnSpan:function(c,a){return c&&c.columnSpans&&c.columnSpans[a]},getDataRowSpan:function(c,a){return c&&c.rowSpans&&c.rowSpans[a]},getFieldInfo:function(c){return c&&c.row&&c.column&&c.row.fieldInfos&&c.row.fieldInfos[c.column.field]},getGridFirstFieldInfo:function(c){return d.getFieldInfo(c.getFirstCell())},setFieldInfo:function(c,a){c.row&&
(c.row.fieldInfos[c.column.field]=a)},provideFieldInfo:function(c){d.setFieldInfo(c,d.getFieldInfo(c)||{});return d.getFieldInfo(c)},getPreservableSettings:function(c){return{triggerJson:d.getConditionalFormatting(c),dataDrilling:d.getDataDrilling(c),tooltipInfo:d.getTooltipInfo(c)}},setPreservableSettings:function(c,a){d.setConditionalFormatting(c,a&&a.triggerJson);d.setDataDrilling(c,a&&a.dataDrilling);d.setTooltipInfo(c,a&&a.tooltipInfo)},getCellStyle:function(c,a){if(!c||!c.row||!c.column)return null;
var e=c.row.style&&c.row.style.fields&&c.row.style.fields[c.column.field];!e&&a&&(e={},d.setCellStyle(c,e));return e},getCellThemeStyle:function(c){return c&&c.row&&c.column?c.row.themeStyle&&c.row.themeStyle.fields[c.column.field]:null},setCellStyle:function(c,a){var e=c.row.style=c.row.style||{};e.fields=e.fields||{};e.fields[c.column.field]=a},updateCellStyle:function(c,a){c=d.getCellStyle(c,!0);t.mixin(c,a)},copyFieldStyle:function(c,a,e){c=d.getCellStyle(c);a=d.getCellStyle(a,!0);for(var b in e)void 0!==
c[b]&&(a[b]=c[b])},getFieldCellUrl:function(c){if(c.row&&c.row.urls&&c.column)return c.row.urls[c.column.field]},setFieldCellUrl:function(c,a){c.row&&c.column&&(c.row.urls=c.row.urls||{},void 0===a?delete c.row.urls[c.column.field]:c.row.urls[c.column.field]=a)},getConditionalFormatting:function(c){return(c=d._toFieldInfo(c))&&c.triggerJson},setConditionalFormatting:function(c,a){var e=d.getFieldInfo(c);e.triggerJson=null;if(a){if(c=d.isVariableLikeFieldCell(c))a.fieldInfo=e;a.fieldInfo===e&&(a.fieldInfo=
t.clone(a.fieldInfo),delete a.fieldInfo.triggerJson,c&&(delete a.fieldInfo.tooltipInfo,delete a.fieldInfo.dataDrillingPanelInfo))}e.triggerJson=a},getDataDrilling:function(c){return(c=d.getSourceFieldInfo(c))&&c.dataDrillingPanelInfo},setDataDrilling:function(c,a){if(c=d.getSourceFieldInfo(c))c.dataDrillingPanelInfo=a},getTooltipInfo:function(c){return(c=d.getSourceFieldInfo(c))&&c.tooltipInfo},setTooltipInfo:function(c,a){if(c=d.getSourceFieldInfo(c))c.tooltipInfo=a},getSourceFieldInfo:function(c){var a=
d._toFieldInfo(c);c=d.getConditionalFormatting(c);return a&&a.isImage?c&&c.fieldInfo:a},_toFieldInfo:function(c){return c?c.row?d.getFieldInfo(c):"object"===typeof c&&c:null},isReportSectionCell:function(c){c=d._toFieldInfo(c);return!(!c||!c.isReportSection)},isInfographicCell:function(c){c=d._toFieldInfo(c);return!(!c||!c.isInfographic)},isChartCell:function(c){c=d._toFieldInfo(c);return!(!c||!c.isChart)},isMapCell:function(c){c=d._toFieldInfo(c);return!(!c||!c.isMap)},isImageCell:function(c){c=
d._toFieldInfo(c);return!(!c||!c.isImage)},isImageTriggerCell:function(c){c=d._toFieldInfo(c);return!!(c&&c.isImage&&c.triggerJson)},getImageTriggerFieldInfo:function(c){return(c=d._toFieldInfo(c))&&c.isImage&&c.triggerJson?c.triggerJson.fieldInfo:null},isShapeCell:function(c){c=d._toFieldInfo(c);return!(!c||!c.isShape)},isEmptyShapeCell:function(c){c=(c=d._toFieldInfo(c))&&c.shapeJson;return!(!c||c.g&&c.g.length)},isPlaceholderShapeCell:function(c){c=(c=d._toFieldInfo(c))&&c.shapeJson;return!(!c||
!c.isPlaceholder)},isTextLikeCell:function(c){return!d._toFieldInfo(c)||d.isRichTextCell(c)||d.isVariableLikeFieldCell(c)||d.isSpecialFieldCell(c)},isRichTextCell:function(c){c=d._toFieldInfo(c);return!(!c||!c.isRichText)},isVariableLikeFieldCell:function(c){c=d._toFieldInfo(c);return!(!c||!c.hasVariable&&!c.script&&"headers.CHART_POINT_VALUE"!==c.name&&"LocatorSummary"!==c.name)},isVariableFieldCell:function(c){c=d._toFieldInfo(c);return!(!c||!c.hasVariable)},isScriptFieldCell:function(c){c=d._toFieldInfo(c);
return!(!c||!c.script)},isUneditableScript:function(c){c=d._toFieldInfo(c);return!!(c&&c.script&&c.script.isUneditableScript)},isNumericVariableFieldCell:function(c){return(c=d._toFieldInfo(c))?c.hasVariable&&l.isNumericField(c)||c.script&&("Double"===c.script.type||!c.script.isUneditableScript&&"String"!==c.script.type)||"headers.CHART_POINT_VALUE"===c.name||"LocatorSummary"===c.name?!0:!1:!1},isCalculatableNumericVariableFieldCell:function(c){return d.isNumericVariableFieldCell(c)},isStringVariableFieldCell:function(c){c=
d._toFieldInfo(c);return!(!c||!(c.hasVariable&&"esriFieldTypeString"===c.type||c.script&&"String"===c.script.type))},isSpecialFieldCell:function(c){var a=d._toFieldInfo(c);return a&&("headers.CHART_POINT_VALUE"===a.name||"LocatorSummary"===a.name||!d.isVariableLikeFieldCell(c)&&p.hasField(a.name))}};return d})},"esri/dijit/geoenrichment/utils/FieldUtil":function(){define([],function(){function t(f){return("string"===typeof f?f:f&&f.type)||""}var p={isNumericField:function(f){switch(t(f)){case "esriFieldTypeSmallInteger":case "esriFieldTypeInteger":return"i";
case "esriFieldTypeSingle":case "esriFieldTypeDouble":return"f"}return!1},isStringField:function(f){return"esriFieldTypeString"==t(f)||!1},isDateField:function(f){return"esriFieldTypeDate"==t(f)||!1}},l=/DISTANCE$/;p.isDistanceField=function(f){return l.test(t(f))};var k=/^(SHAPE__Area|SHAPE__Length)$/i;p.canShowField=function(f,d){if(!f||!f.name||"esriFieldTypeOID"===f.type)return!1;if("esriFieldTypeDate"===f.type)return"d";var c=p.isNumericField(f)||p.isStringField(f);if("f"===c&&!1===f.editable&&
k.test(f.name))return null;void 0===d&&(d=/^(OBJECTID|OID|FID)$/i);return d&&d.test(f.name)?!1:!0===c?"s":c};p.createFieldInfo=function(f){var d=p.canShowField(f);f={fieldName:f.name,label:f.alias||f.name,isEditable:!!f.editable,visible:!!d};switch(d){case "i":f.format={places:0,digitSeparator:!0};break;case "f":f.format={digitSeparator:!0};break;case "s":f.stringFieldOption="textbox"}return f};return p})},"esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/tableJson/TableJsonUtil":function(){define(["dojo/_base/lang",
"../templateJsonUtils/fieldInfo/FieldInfoBuilder","../templateJsonUtils/fieldInfo/FieldLibrary","../../grid/coreUtils/GridDataUtil","esri/dijit/geoenrichment/ReportPlayer/core/sections/SectionTypes"],function(t,p,l,k,f){var d={createTable:function(c){var a=c.numColumns,e=c.numRows,b=c.width,g=c.widths,h=c.style,m=c.attributes&&c.attributes.fixedColumns,n=c.attributes&&c.attributes.dynamicColumns;if(b)if(g)g=g.map(function(F){return b*Number(F.replace("%",""))/100});else{var q=b/a;g=[];for(var r=0;r<
a;r++)g.push(q)}if(g)b||isNaN(Number(g[0]))||(b=0,g.forEach(function(F){b+=F}));else for(q=Number(100/a).toFixed(3)+"%",g=[],r=0;r<a;r++)g.push(q);q=[];for(r=0;r<a;r++)q.push({field:"field"+r,style:{width:g[r]}});g=[];for(var u=!0,v=c.height?c.height/e:c.rowHeight||15.07,w=0;w<e;w++){var A={style:{height:v,fields:{}},fieldInfos:{}};for(r=0;r<a;r++){var E="field"+r;!1!==c.useDefaultTheme&&(A.style.fields[E]=t.mixin({horizontalAlign:0===r?"left":"right",overrideStyle:0===w?1<e?!1!==c.useDefaultHeaderTheme?
"TableHeader":"Default":void 0:u?"AlternatingRow":"Default"},c.cellParams));n&&r>=m&&0===w&&(A.fieldInfos[E]=p.createFieldInfoFromSpecialFieldName("AREA_DESC"));c.processTableCell&&c.processTableCell(A,E,w,r,c)}g.push(A);u=!u}return{id:"table",attributes:t.mixin({},c.attributes),style:t.mixin({width:b||772.33},h),columns:q,rows:g}},createSingleCellTable:function(c){c=c||{};var a=d.createTable({numColumns:1,numRows:1,attributes:c.attributes,useDefaultTheme:!1});d.modifyTableJson(a,0,0,c);return a},
modifyTableJson:function(c,a,e,b){a=c.rows[a];e=c.columns[e];var g=e.field;b.text&&(a[g]=b.text);b.fieldInfo&&(a.fieldInfos[g]=b.fieldInfo);b.cellStyle&&(a.style.fields[g]=b.cellStyle);b.columnSpan&&(a.columnSpans=a.columnSpans||{},a.columnSpans[g]=b.columnSpan);b.rowSpan&&(a.rowSpans=a.rowSpans||{},a.rowSpans[g]=b.rowSpan);a.themeStyle=b.themeStyle;b.width&&(c.style.width=b.width,e.style.width=b.width);b.height&&(a.style.height=b.height);void 0!==b.left&&(c.style.left=b.left);void 0!==b.top&&(c.style.top=
b.top)},getTableWidth:function(c){return c.style.width},getTableHeight:function(c){var a=0;c.rows.forEach(function(e){a+=e.style?e.style.height:0});return a},calcTableBox:function(c){return{x:c.style.left||0,y:c.style.top||0,w:d.getTableWidth(c),h:d.getTableHeight(c)}},createDetailsSection:function(c){return{type:f.DETAILS,stack:[d.createTable(c)]}},createDetailsSectionForFieldInfos:function(c,a){return{type:f.DETAILS,stack:[function(){var e=d.createTable(t.mixin({numColumns:2,numRows:c.length+1},
a));e.rows.forEach(function(b,g){0===g?b.field0=c[0].hasVariable?c[0].fieldCategory:"":(g=c[g-1],b.field0=g.script?g.script.alias:g.hasVariable?g.alias:l.getFieldLabel(g.name)||"",b.fieldInfos.field1=g)});d.provideSpaceAfter(e);return e}()]}},createDetailsSectionForFieldInfoGroups:function(c,a){return{type:f.DETAILS,stack:[function(){var e=d.createTable(t.mixin({numColumns:c.length+1,numRows:c[0].length+1},a));e.rows.forEach(function(b,g){e.columns.forEach(function(h,m){0!==m&&(0===g?b[h.field]=c[m-
1][0].fieldCategory||"":(m=c[m-1][g-1],b.field0=b.field0||(m.script?m.script.alias:m.alias),b.fieldInfos[h.field]=m))})});d.provideSpaceAfter(e);return e}()]}},provideSpaceAfter:function(c,a){c.style.spaceAfter=Math.max(a||0,90-15.07*c.rows.length)},applyDefaultStyling:function(c){var a=!0;c.rows.forEach(function(e,b){c.columns.forEach(function(g){e.style.fields[g.field].overrideStyle=0===b?"TableHeader":a?"AlternatingRow":void 0});a=!a})},setTableHeaderStyle:function(c){if(c.style)for(var a in c.style.fields)(c.style.fields[a]=
c.style.fields[a]||{}).overrideStyle="TableHeader"},DEFAULT_ROW_HEIGHT:15.07,isEmptyTable:function(c){return!c.columns||!c.columns.length||!c.rows||!c.rows.length},isSingleCelledTable:function(c){return 1===c.columns.length&&1===c.rows.length},isMultiDataTable:function(c){return 1<c.columns.length||2<c.rows.length},getTableSubtype:function(c){if(!d.isSingleCelledTable(c))return null;c=d.getFirstFieldInfo(c);return k.isTextLikeCell(c)?"isTextLike":c.isImage?c.triggerJson?"isImage.hasConditionalStyling":
"isImage":c.isShape?"isShape":null},getFirstFieldInfo:function(c){return c.rows[0].fieldInfos&&c.rows[0].fieldInfos[c.columns[0].field]},tableJsonHasInfographic:function(c){return!!d.getTableJsonInfographic(c)},getTableJsonInfographic:function(c){var a;c.rows.some(function(e){if(e.fieldInfos)for(var b in e.fieldInfos){var g=e.fieldInfos[b];if(g&&g.isInfographic)return a=g.infographicJson,!0}});return a},getTableJsonFirstFieldInfo:function(c){return c.rows[0].fieldInfos[c.columns[0].field]},tableJsonHasChart:function(c){return c.rows.some(function(a){if(a.fieldInfos)for(var e in a.fieldInfos){var b=
a.fieldInfos[e];if(b&&b.isChart)return!0}})}};return d})},"esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/templateJsonUtils/fieldInfo/FieldInfoBuilder":function(){define(["./utils","dojo/i18n!esri/nls/jsapi"],function(t,p){function l(a){Object.keys(a).forEach(function(e){var b=a[e];void 0!==b&&null!==b||delete a[e]})}p=p.geoenrichment.dijit.ReportPlayer.ReportPlayer;var k={NUMBER:"n/",createFieldInfoFromCalculator:function(a,e,b){if(!a)return null;a=(e="function"===typeof a.getDescriptionWithType?
a:null)?e.variable:a;var g=b&&b.format,h=b&&b.autoformatCurrency,m=b&&b.additionalText,n=b&&b.calculatorName,q=b&&b.defaultDistanceUnits;b=b&&b.summaryType;var r=e&&e.getToggleGroup&&e.getToggleGroup();b={alias:e?e.getDescriptionWithType()||e.getAliasWithType():a.description||a.alias,hasVariable:!0,variableID:a.id,fullName:a.fullName,fieldCategory:a.fieldCategory,vintage:a.vintage,type:a.type,statefulName:r?r.value:"n/"+a.fullName,summaryType:b};e=e?e.getCalcType().charAt(0):"n";b.name=t.name.createFieldNameFromSource(a,
e);g?t.format.setFieldInfoFormat(b,g):(b.decimals=a.precision,b.showCurrency=!(!h||"n"!==e||!a.units||"CURRENCY"!==a.units.toUpperCase()),b.showPercent=!b.showCurrency&&("p"===e||"n"===e&&a.units&&"PCT"===a.units.toUpperCase()),b.useThousandsSeparator=!0);a.isWebMap&&(b.isWebMap=!0,b.webMapFieldName=a.fieldName,b.webMapField=a.fieldInfo,b.webMapId=a.webMapId,b.layerUrl=a.layerUrl,!g&&a.fieldInfo&&a.fieldInfo.format&&(b.decimals=a.fieldInfo.format.places,b.useThousandsSeparator=!1!==a.fieldInfo.format.digitSeparator));
a.customDataCollection&&(b.isCustomDataCollection=!0,b.customDataCollectionId=a.customDataCollection.id,b.customDataCollectionUrl=a.customDataCollection.url,b.customDataCollectionPortalUrl=a.customDataCollection.portalUrl);a.isSiteAttribute&&(b.isSiteAttribute=!0,b.attribute=a.attribute,b.type=a.attribute.type,!g&&0<a.attribute.places&&(b.decimals=a.attribute.places));a.isDataLayerAttribute&&(b.isDataLayerAttribute=!0,b.layerID=a.layerID,b.layerUrl=a.layerUrl,b.layerName=a.layerName,b.attribute=a.attribute,
b.type=a.attribute.type,!g&&0<a.attribute.decimals&&(b.decimals=a.attribute.decimals),"DISTANCE"===a.attribute.name&&(b.units=a.attribute.units||q||"esriMiles"));"string"===typeof m&&(b.additionalText=m);b.usedFields=a.usedFields;b.expressionText=a.expressionText;t.name.provideQualifiedFieldInfoTemplateName(b,n);l(b);return b},fieldInfoToVariable:function(a){if(!a.hasVariable)return null;var e={id:a.variableID,fullName:a.fullName,fieldCategory:a.fieldCategory,vintage:a.vintage,type:a.type,precision:a.decimals,
usedFields:a.usedFields,expressionText:a.expressionText};a.isWebMap&&(e.isWebMap=!0,e.fieldName=a.webMapFieldName,e.fieldInfo=a.webMapField,e.webMapId=a.webMapId,e.layerUrl=a.layerUrl);a.isSiteAttribute&&(e.isSiteAttribute=!0,e.attribute=a.attribute);return e},createFieldInfoFromScript:function(a,e){var b=e&&e.format,g=e&&e.additionalText;e=e&&e.calculatorName;a=a||{};a.name=a.name||t.name.DEFAULT_SCRIPT_NAME;a.alias=a.alias||p.scriptNameDefault;a.decimals=Number(a.decimals)||0;var h={};h.name=t.name.createFieldNameFromScript(a);
t.name.provideQualifiedFieldInfoTemplateName(h,e);h.script=a;b?t.format.setFieldInfoFormat(h,b):(h.decimals=Number(a.decimals),h.showCurrency=!1,h.showPercent=!1,h.useThousandsSeparator=!0);"string"===typeof g&&(h.additionalText=g);l(h);return h},createFieldInfoFromImage:function(a,e){return{isImage:!0,imageJson:a,triggerJson:e}},createFieldInfoFromMap:function(a){return{isMap:!0,mapJson:a}},createFieldInfoFromShape:function(a){return{isShape:!0,shapeJson:a}},createFieldInfoFromChart:function(a){return{isChart:!0,
chartJson:a}},createFieldInfoFromInfographic:function(a){return{isInfographic:!0,infographicJson:a}},createFieldInfoFromSection:function(a){return{isReportSection:!0,sectionJson:a}},createFieldInfoFromMissingVariable:function(a,e){return{name:a&&a.substr(a.indexOf(".")+1),templateName:a,isMissing:!0,alias:e}},createFieldInfoForUnsupportedContent:function(){return{isUnsupportedContent:!0}}},f=/^\[\w+\]$/,d=/\[\w+\]/;k.createFieldInfoFromLabel=function(a,e){if("string"!==typeof a)return null;a=a.trim();
var b=f.test(a);if(!e||b){if(!b)return null;a=a.replace(/\[|\]/g,"").toUpperCase();return k.createFieldInfoFromSpecialFieldName(t.fields.uiToTemplate(a))}return d.test(a)?t.richText.createFieldInfoFromRenderedXMLString(a):null};k.createFieldInfoFromSpecialFieldName=function(a,e){if("string"!==typeof a)return null;a=t.fields.trimTemplateHeaderName(a);a=a.toUpperCase();if("GROUPCOUNT"===a)var b={name:t.fields.GROUPCOUNT_FIELD_NAME,alias:t.fields.GROUPCOUNT_FIELD_ALIAS,type:"esriFieldTypeInteger"};else"LOCATORSUMMARY"===
a?(b={name:t.fields.LOCATORSUMMARY_FIELD_NAME,alias:t.fields.LOCATORSUMMARY_FIELD_ALIAS,type:"esriFieldTypeDouble",templateName:t.fields.LOCATORSUMMARY_FIELD_NAME},e&&Object.assign(b,t.format.processFieldInfoTagAttributes({m:"string"===typeof e?e:t.format.buildFormatStringFromObject(e)}))):"CURRDATE"===a?b={name:t.fields.DATE_FIELD_NAME,alias:t.fields.DATE_FIELD_ALIAS,format:e||t.fields.DATE_FIELD_DEFAULT_FORMAT}:"SITENOTES"===a?b={name:t.fields.qualifyTemplateHeaderName(t.fields.SITENOTES_FIELD_NAME),
alias:t.fields.SITENOTES_FIELD_ALIAS,type:"esriFieldTypeString"}:0===a.indexOf("SITENOTE")&&(b=t.fields.getSiteNoteFieldNameAt(a.replace("SITENOTE","")),b={name:t.fields.qualifyTemplateHeaderName(b),alias:b,type:"esriFieldTypeString"});if(b)return b;var g=t.fields.templateToUIHeader(a);g?(b={name:t.fields.qualifyTemplateHeaderName(a),alias:g,type:"esriFieldTypeString"},t.fields.isChartAttribute(a)&&(b.isChartAttribute=!0),"CHART_POINT_VALUE"===a&&(b.type="esriFieldTypeDouble",b.decimals=0,b.useThousandsSeparator=
!0,e&&t.format.setFieldInfoFormat(b,e))):(e=t.fields.templateToUIReportVar(a))&&(b={name:e,alias:e,type:"esriFieldTypeString"});b&&(b.templateName=b.name);return b};var c=/_P$/i;k.isFieldInfoInPercentState=function(a){return a?a.statefulName&&("p"===a.statefulName.charAt(0)||c.test(a.statefulName))||a.alias&&-1!==a.alias.indexOf("(%)"):!1};return k})},"esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/templateJsonUtils/fieldInfo/utils":function(){define(["esri/dijit/geoenrichment/Deferred",
"require"],function(t,p){var l={},k;l.init=function(){if(k)return k.promise;k=new t;p("./FieldInfoBuilder ./FieldInfoFormatUtil ./FieldInfoNameUtil ./FieldInfoRenderer ./RichTextJsonUtil ./FieldLibrary".split(" "),function(f,d,c,a,e,b){l.builder=f;l.format=d;l.name=c;l.renderer=a;l.richText=e;l.fields=b;k.resolve()});return k.promise};l.init();return l})},"esri/dijit/geoenrichment/ReportPlayer/core/sections/SectionTypes":function(){define([],function(){return{PAGE_HEADER:"PageHeader",DETAILS_HEADER:"DetailsHeader",
DETAILS:"Details",GROUP:"Group",PAGE_FOOTER:"PageFooter",REPORT_FOOTER:"ReportFooter",DATA_SOURCE:"DataSource",EMPTY:"empty",INFOGRAPHIC_HEADER:"InfographicHeader",INFOGRAPHIC_VARIABLE:"InfographicVariable",INFOGRAPHIC_BACKGROUND:"InfographicBackground",INFOGRAPHIC_FOREGROUND:"InfographicForeground",INFOGRAPHIC_ATTRIBUTES:"InfographicAttributes",INFOGRAPHIC_NOTES:"InfographicNotes",INFOGRAPHIC_SUMMARY:"InfographicSummary",INFOGRAPHIC_SUMMARY2:"InfographicSummary2",INFOGRAPHIC_SUMMARY_FOOTER:"InfographicSummaryFooter",
TABLE_BACKGROUND:"TableBackground",TABLE_FOREGROUND:"TableForeground",TABLE_BACKGROUND_FLOATING_PANELS:"BackgroundFloatingPanels",TABLE_FOREGROUND_FLOATING_PANELS:"ForegroundFloatingPanels",TABLE_FLOATING_PANELS:"FloatingPanels"}})},"esri/dijit/geoenrichment/utils/PortalUtil":function(){define("dojo/_base/lang esri/kernel esri/request ./requests/EveryRequest ./requests/UniversalClient ../ReportPlayer/dataProvider/commands/mapToImage/MapToURLUtil ./CacheUtil ./ProjectionUtil ./UrlUtil".split(" "),
function(t,p,l,k,f,d,c,a,e){var b={query:function(g,h,m,n){h=h||{};m=m||"results";n=n||100;var q="number"===typeof h.num?h.num:-1,r=h.num=0>q||h.num>n?n:h.num;h.start=h.start||1;return g(h).then(function(u){var v=u[m],w=u.total-h.start+1;0<=q&&w>q&&(w=q);w-=r;if(0>=w)return u;h.num=r;for(var A=[];0<w;)h.start+=r,A.push(g.bind(null,t.mixin({},h))),w-=r;return k(A,{stopOnError:!0}).then(function(E){E.forEach(function(F){Array.prototype.push.apply(v,F[m])});return u})})},queryCommon:function(g,h){return b.query(function(m){var n=
p.id.findCredential(g)||p.id.credentials[0];return l({url:g,content:t.mixin({f:"json",token:n?n.token:void 0},h,m),handleAs:"json"},{usePost:!0})}).then(function(m){return m.results})},getPortalSelf:function(g){return f.requestPublicFirst(e.combine(g,"sharing/rest/portals/self"),{})},getDefaultBasemaps:function(g){var h=c.get("PortalUtil.basemaps");h[g]||(h[g]=b.getPortalSelf(g).then(function(m){return f.request(e.combine(g,"sharing/rest/community/groups"),{content:{q:m.useVectorBasemaps?m.vectorBasemapGalleryGroupQuery:
m.basemapGalleryGroupQuery,f:"json"},handleAs:"json"}).then(function(n){return(n=n.results[0])?f.request(e.combine(g,"sharing/rest/search"),{content:{q:"group:"+n.id+' AND type:"web map"',num:100,f:"json"},handleAs:"json"}).then(function(q){return q.results}):null})}));return h[g]},tryConfigureServicesFromAGOLPublic:function(){return b.getPortalSelf("https://www.arcgis.com").then(function(g){if(g=g&&g.helperServices)g.geometry&&a.setGeometryServiceUrl(g.geometry.url),g.printTask&&d.setPrintMapTaskUrl(g.printTask.url)}).otherwise(function(g){console.log(g)})}};
return b})},"esri/dijit/geoenrichment/utils/requests/EveryRequest":function(){define(["dojo/_base/declare","esri/dijit/geoenrichment/Deferred","esri/dijit/geoenrichment/when"],function(t,p,l){var k=t(null,{requests:null,results:null,requestCount:0,chunkSize:0,stopOnError:!1,onProgress:null,index:0,completeCount:0,executeCount:0,isExecuting:!1,dfd:null,constructor:function(f,d,c,a,e){this.requests=f;this.results=d;this.requestCount=this.requests.length;this.chunkSize=Math.max(c,0);this.stopOnError=
a;this.onProgress=e},execute:function(){this.isExecuting=!0;for(this.dfd=new p;this.tryStartNextRequest(););return this.dfd.promise},tryStartNextRequest:function(){if(!this.isExecuting)return!1;if(this.index==this.requestCount&&!this.executeCount)return this.isExecuting=!1,this.dfd.resolve(this.results),!1;if(this.index==this.requestCount||this.executeCount==this.chunkSize)return!1;var f=this.requests[this.index++];this.executeCount++;var d=f.request;"function"===typeof d&&(d=d());var c=this,a=!0;
l(d,function(e){c.processResult(e,f.key,e instanceof Error,a)},function(e){c.processResult(e,f.key,!0,a)});a=!1;return!0},processResult:function(f,d,c,a){if(this.isExecuting)if(c&&this.stopOnError)this.isExecuting=!1,this.onProgress&&this.onProgress(1),this.dfd.reject(f);else if(this.results[d]=f,this.completeCount++,this.executeCount--,this.onProgress&&this.onProgress(this.completeCount/this.requestCount),!a)for(;this.tryStartNextRequest(););}});return function(f,d){var c=!1,a=10,e=null;"boolean"===
typeof d?c=d:d&&("number"===typeof d.chunkSize&&(a=d.chunkSize),"boolean"===typeof d.stopOnError&&(c=d.stopOnError),"function"===typeof d.onProgress&&(e=d.onProgress));var b=[];if(Array.isArray(f)){var g=[];f.forEach(function(m,n){b.push({key:n,request:m})})}else for(var h in f)g={},b.push({key:h,request:f[h]});return(new k(b,g,a,c,e)).execute()}})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/commands/mapToImage/MapToURLUtil":function(){define("require dojo/_base/declare esri/dijit/geoenrichment/Deferred esri/dijit/geoenrichment/when esri/dijit/geoenrichment/promise/all dojo/dom-style esri/dijit/geoenrichment/utils/DataUtil esri/dijit/geoenrichment/utils/ImageInfoUtil esri/dijit/geoenrichment/utils/RegExpUtil esri/dijit/geoenrichment/utils/UrlUtil".split(" "),
function(t,p,l,k,f,d,c,a,e,b){function g(){var F=new l;t("esri/tasks/PrintTask esri/tasks/PrintParameters esri/tasks/PrintTemplate esri/layers/GraphicsLayer ./DotDensityToImageUtil ./LegendToLayerUtil".split(" "),function(D,B,y,z,H,G){m=B;n=y;q=z;r=H;u=G;h=p(D,{returnJson:!1,mapName:null,_execute:function(){this.returnJson&&(this.printGp.submitJob=this.printGp.execute=function(I,L){I="data:application/json;base64,"+c.base64FromJson(I.Web_Map_as_JSON);L([{value:{url:I}}]);return(new l).resolve()});
return this.inherited(arguments)},_getPrintDefinition:function(I,L){var N=this.inherited(arguments);this.returnJson&&this.mapName&&(N.title=this.mapName);console.log(N);return N},_createOperationalLayers:function(I,L){var N=this.inherited(arguments);if(L.__legendLayerId){var O=N.filter(function(S){return S.id===L.__legendLayerId})[0];N.splice(N.indexOf(O),1);N.push(O)}return N},_createFeatureCollection:function(I,L,N,O){var S=this.inherited(arguments);this.returnJson&&S&&("esri.layers.FeatureLayer"===
I.declaredClass||"esri.layers.StreamLayer"===I.declaredClass||"esri.layers.GraphicsLayer"===I.declaredClass)&&S.featureCollection.layers.forEach(function(R){R.layerDefinition.name=I.arcgisProps&&I.arcgisProps.title||I._titleForLegend||I.name||I.id;R.layerDefinition.name=e.decodeXML(R.layerDefinition.name);R.layerDefinition.objectIdField="OBJECTID";R.layerDefinition.fields=[{name:"OBJECTID",type:"esriFieldTypeOID"}];var U={OBJECTID:1},Z=/[^\w]/g,da;R.featureSet.features.forEach(function(X,ea){X.attributes=
X.attributes||{};X.attributes.OBJECTID=ea+1+"";X.attributes.__nameField||(X.attributes.Name=e.decodeXML(X.attributes.Name||R.layerDefinition.name),da="Name");ea=X.attributes.__fieldAliases;for(var Q in X.attributes)if(0!==Q.indexOf("__")){var W=Q,V=X.attributes[Q];"string"===typeof V&&(V=e.decodeXML(V));var fa=ea&&ea[Q];(fa=fa&&fa.replace(Z,"_"))&&void 0===X.attributes[fa]&&(X.attributes[fa]=V,W=fa);X.attributes.__nameField===Q&&(da=W);U[Q]||(U[Q]=1,R.layerDefinition.fields.push({name:W,type:"string"===
typeof V?"esriFieldTypeString":"esriFieldTypeDouble"}))}});R.layerDefinition.displayField=da});return S},_convertSvgSymbol:function(I){return I}});F.resolve()});return F.promise}var h,m,n,q,r,u,v,w={setPrintMapTaskUrl:function(F){v=F;b.registerCORS(F)},mapToURL:function(F,D,B,y){var z=w._getUrlForMap(F);if(z)return z;z=g().then(function(){return w._replaceDotDensityLayersWithPictureMarkers(F).then(function(H){return k(D&&u.legendToGraphicsLayer(D,F,B),function(G){G&&F.addLayer(G);return k(w._runPrintTask(F,
B,G,y),function(I){G&&F.removeLayer(G);w._rollbackReplacing(F,H);var L=new l;setTimeout(function(){L.resolve(I.url)},100);return L.promise})})})});w._putUrlToCache(F,z);return z},_replaceDotDensityLayersWithPictureMarkers:function(F){var D=[];for(i=0;i<F.graphicsLayerIds.length;i++)layer=F.getLayer(F.graphicsLayerIds[i]),layer.loaded&&layer.visible&&r.isDotDensity(layer)&&D.push(w._createGraphicsLayerFromDotDensityLayer(i,layer,F));return f(D)},_createGraphicsLayerFromDotDensityLayer:function(F,D,
B){return r.createPictureMarkersFromDotDensityLayer(D,B.extent,B).then(function(y){if(!y)return null;var z=new q;y.map(function(H){z.add(H)});B.addLayer(z,F);D.visible=!1;return{addedLayer:z,hiddenLayer:D}}).otherwise(function(y){console.log(y);return null})},_runPrintTask:function(F,D,B,y){function z(){var H=new h(v);H.returnJson=y&&y.replaceWithJson;H.mapName=y&&y.mapName;var G=new m;G.map=F;var I=new n;I.exportOptions={width:3.125*d.get(D,"width"),height:3.125*d.get(D,"height"),dpi:300};I.format=
"png32";I.showAttribution=!1;I.forceFeatureAttributes=!0;I.__legendLayerId=B&&B.id;G.template=I;return H.execute(G)}return k(z(),function(H){return H},function(H){console.log(H);return k(z(),function(G){return G},function(G){console.log(G);return z()})})},_rollbackReplacing:function(F,D){D.forEach(function(B){B&&B.addedLayer&&F.removeLayer(B.addedLayer);B&&B.hiddenLayer&&(B.hiddenLayer.visible=!0)})},urlToSrc:function(F,D){return D&&D.saveImagesAsDataUrl?a.getRemoteImageDataUrl(F,{sizeLimit:1500}):
F}},A,E=0;w.enableCaching=function(){A={}};w.clearCaching=function(){A=null};w._putUrlToCache=function(F,D){A&&D&&(F.__mapToImageUtilKey=E++,A[F.__mapToImageUtilKey]=D)};w._getUrlForMap=function(F){return A&&A[F.__mapToImageUtilKey]};return w})},"esri/dijit/geoenrichment/utils/ImageInfoUtil":function(){define(["dojo/_base/lang","esri/dijit/geoenrichment/when","./CacheUtil","./ImageUtil","./UrlUtil"],function(t,p,l,k,f){var d=/^data:/i,c={getImageInfo:function(a,e,b){var g=b&&b.sizeLimit||1E5,h=l.get("ImageInfoUtil"),
m=a+(b&&b.crossOrigin||"");h[m]||(h[m]=k.imageFromUrl(a,b).then(function(n){var q=k.imageToDataURL(n),r={dataUrl:q,contentType:k.getContentType(q),width:n.width,height:n.height};setTimeout(function(){h[m]=r});return r}));return p(h[m],function(n){n=t.mixin({},n);e&&(n.filename=e&&e.replace(/\.\w+$/,".png").toLowerCase());return function(q){return p(c._processDataUrl(q,g),function(r){if(r&&r.dataUrl){var u=t.mixin({},q);u.dataUrl=r.dataUrl;u.width*=r.factor;u.height*=r.factor;return p(u)}return p(q)})}(n)})},
ensureDataUrlForRemoveImage:function(a,e){return!a||d.test(a)?a:c.getRemoteImageDataUrl(a,e)},getRemoteImageDataUrl:function(a,e){function b(n,q){return c.getImageInfo(n?m+"?"+a:a,null,{crossOrigin:q}).then(function(r){return p(c._processDataUrl(r,h),function(u){return u&&u.dataUrl||u})})}function g(){console.log("Failed to get data for URL: "+a);return a}if(!a)return a;var h=e&&e.sizeLimit||1E5,m=f.getProxyUrl();return b(!1,"anonymous").otherwise(function(){return b(!1,null)}).otherwise(function(){return m?
b(!0,"anonymous"):g()}).otherwise(function(){return b(!0,null)}).otherwise(g)},_processDataUrl:function(a,e){var b=Math.max(a.width,a.height);if(b<=e)return a.dataUrl;var g=e/b;return p(k.scaleImage(a.dataUrl,{factor:g}),function(h){return{dataUrl:h,factor:g}})}};return c})},"esri/dijit/geoenrichment/utils/ProjectionUtil":function(){define("esri/dijit/geoenrichment/Deferred esri/SpatialReference esri/geometry/jsonUtils esri/dijit/geoenrichment/utils/CoordinateUtil esri/dijit/geoenrichment/utils/PolygonUtil esri/dijit/geoenrichment/utils/UrlUtil esri/dijit/geoenrichment/utils/requests/UniversalClient esri/dijit/geoenrichment/utils/requests/EveryRequest".split(" "),
function(t,p,l,k,f,d,c,a){function e(u){return u&&u.spatialReference||u instanceof p&&u||u&&new p(u)||new p(k.WEB_MERCATOR_WKID)}function b(u,v){var w=[];try{for(var A=0;A<u.length;A++)w.push(k.toSpatialReference(u[A],v))}catch(E){console.log(E)}return(new t).resolve(w)}function g(u,v){function w(z){D.push(function(){return h(F,z,E,v)})}var A=u[0],E=l.getJsonType(A),F={outSR:v.wkid||v.toJson(),inSR:A.spatialReference.wkid||A.spatialReference.toJson()},D=[],B=0,y=[];1==u.length?y.push(A):u.forEach(function(z){var H=
f.getNumberOfPoints(z);B+=H;if(1E4<B){var G=[];y.length?(G.push(z),B=H):(y.push(z),B=0);w(y);y=G}else y.push(z)});y.length&&w(y);return a(D,{stopOnError:!0}).then(function(z){for(var H=z[0],G=1;G<z.length;G++)H=H.concat(z[G]);return H},function(z){console.log(z);return[]})}function h(u,v,w,A){u.geometries=m(v);return r("project",u).then(function(E){return n(E.geometries,w,A)})}function m(u){var v=u.map(function(w){w=w.toJson();delete w.spatialReference;return w});return{geometryType:l.getJsonType(u[0]),
geometries:v}}function n(u,v,w){var A=l.getGeometryType(v),E=w.toJson();return u.map(function(F){F.spatialReference=E;return new A(F)})}var q={},r;q.setGeometryServiceUrl=function(u){d.registerCORS(u);r=function(v,w){return c.requestPublicFirst({url:u,urlSuffix:v},{content:w})}};q.setGeometryRequest=function(u){r=u};q.getSpatialReference=e;q.projectGeometries=function(u,v){var w=e(v);v=Array.isArray(u)?u:[u];if(!v.length)return(new t).resolve(u);var A={},E=v.slice(),F=0;v=v.filter(function(D,B){if(D.spatialReference&&
D.spatialReference.wkid!==w.wkid)return A[B]=F++,!0});return v.length?(k.testSpatialReferenceWKID(w)&&k.testSpatialReferenceWKID(v[0].spatialReference)?b(v,w):g(v,w)).then(function(D){E.forEach(function(B,y){void 0!==A[y]&&(E[y]=D[A[y]])});return Array.isArray(u)?E:E[0]}):(new t).resolve(u)};q.unionGeometries=function(u){var v=e(u[0].spatialReference);u={sr:v.wkid||v.toJson(),geometries:m(u)};return r("union",u).then(function(w){return n([w.geometry],w.geometryType,v)[0]})};q.geometriesToJson=m;q.geometriesFromJson=
n;return q})},"esri/dijit/geoenrichment/utils/PolygonUtil":function(){define([],function(){var t={getNumberOfPoints:function(p){if(!p)return 0;Array.isArray(p)||(p=[p]);var l=0;p.forEach(function(k){l+=t.getGeometryPointCount(k.geometry||k)});return l},getGeometryPointCount:function(p){if(!p)return 0;var l=0,k=p.rings||p.paths;!k&&p.points&&(k=[p.points]);k?k.forEach(function(f){l+=f&&f.length||0}):l+="x"in p?1:2;return l}};return t})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/_ServerSerializationSupport":function(){define("dojo/_base/declare esri/dijit/geoenrichment/when esri/dijit/geoenrichment/utils/ImageUtil ./supportClasses/ReportDataProcessor ./supportClasses/tasks/parsers/DataXMLParser ./supportClasses/areas/AnalysisAreaUtil ./supportClasses/areas/AnalysisAreaJsonUtil ./supportClasses/areas/AreasPreprocessor ./supportClasses/GEUtil ../core/supportClasses/ReportTemplateTypes ../core/conversion/PortalToEditorConverter ../core/supportClasses/map/WebMapJsonUtil ../core/supportClasses/templateJsonUtils/query/TemplateJsonQueryUtil ./supportClasses/attachments/AttachmentsStoreSerializer ../core/supportClasses/templateJsonUtils/TemplateJsonSerializer ../core/conversion/portalToEditorUtils/variables/PlayerVariableProvider ../core/conversion/portalToEditorUtils/metadata/MetadataFromDataBuilder ../countryConfig".split(" "),
function(t,p,l,k,f,d,c,a,e,b,g,h,m,n,q,r,u,v){return t(null,{reportDataToServerData:function(w){return null},reportDataFromServerData:function(w,A){function E(N){D.some(function(O){return"metadata.xml"===O.name})||D.push({name:"metadata.xml",data:u.recoverMetadataFromAreaData(I.areaData,N)})}function F(N){w.sites=[];var O={},S=1;I.areaData.forEach(function(R){R=R.headers&&R.headers.data||{};var U=R.SITE_NAME||R.STORE_NAME,Z=R.STORE_ID||"unclassified."+S++;"number"!==typeof O[Z]&&(O[Z]=w.sites.length,
w.sites.push({locationName:U,name:null,shortName:null,description:null,address:R.STORE_ADDR,latitude:R.STORE_LAT,longitude:R.STORE_LONG,areas:[]}));w.sites[O[Z]].areas.push({locationName:U,name:R.AREA_DESC?U+" ("+R.AREA_DESC+")":U,shortName:R.AREA_DESC,description:R.AREA_DESC2,address:R.STORE_ADDR,latitude:R.STORE_LAT,longitude:R.STORE_LONG,feature:{attributes:{STORE_ID:R.STORE_ID,AREA_ID:R.AREA_ID}}})});w.sites.forEach(function(R){var U=!1;R.shortName=R.areas.map(function(da){return U=!!da.shortName,
da.shortName}).join(", ");U&&(R.name=R.locationName+" ("+R.shortName+")");var Z=R.areas.map(function(da){return da.description});R.description=1<Z.length?Z[0]===Z[1]?Z[0]:Z.join(", "):Z[0]||""});I.reportInfo.areaIdToAttachmentsInfo&&w.sites.forEach(function(R){R.areas.forEach(function(U){if(U=I.reportInfo.areaIdToAttachmentsInfo[U.feature.attributes.AREA_ID])R.attributes=R.attributes&&R.attributes.length?R.attributes:U.attributes,R.notes=R.notes&&R.notes.length?R.notes:U.notes,R.images&&R.images.length||
!U.images||(R.images=U.images,R.images.forEach(function(Z){function da(X){return(X=N[X])&&l.base64DataToDataURL(X,"image/png")}Z.url=da(Z.url);Z.thumbnail=da(Z.thumbnail)}))})})}v.reset();var D=w.reportItem.resources,B;if(!Array.isArray(D)){var y=D;D=[];for(var z in y)D.push({name:z,data:y[z]})}D.forEach(function(N){"theme.css"===N.name&&(N.name="theme.css.txt")});var H=D.filter(function(N){return"report.xml"===N.name})[0],G=D.filter(function(N){return"data.xml"===N.name})[0],I;(function(){var N=
/.*\.(png|jpg|jpeg)$/i,O=/(.*\.(json)$)|(^maps\/.*\.(png)$)/i,S={},R={};D.forEach(function(X){N.test(X.name)&&(S[X.name]=X.data,"logo.png"===X.name&&(B=l.base64DataToDataURL(X.data,"image/png")));O.test(X.name)&&(-1!==X.data.indexOf("operationalLayers")?R[X.name]=h.processWebMapJson(X.name,X.data):R[X.name]=X.data)});var U={},Z=H.data.match(/<section[^<>]*query=("|').+?("|').*?>/g);Z&&Z.forEach(function(X){X=X.replace(/.*?query=("|')/,"");X=X.replace(/("|').*/,"");U[X]=1});var da={};I=f.parse(G.data,
function(X,ea,Q){return(X=R[ea])?da[Q]=X:S[ea]||ea});E({map:da,locator:U});F(S)})();var L=new r;return p(function(N){var O=H.data.indexOf("\x3csection"),S={isGraphicReport:H.data.indexOf("\x3ctable")<O,isMultiFeature:!1,defaultComparisonZoom:null,type:b.STANDARD,portalJson:{files:D}};return p(g.provideEditorJson(S,{variableProvider:N}),function(){S.templateJson=q.deserialize(S.templateJson);S.isMultiFeature=m.hasMultiFeatureSections(S.templateJson);delete S.portalJson;return S})}(L),function(N){d.parseSites(w);
var O=c.areasFromJson(w.analysisAreas),S=w.combinedAreasInfo&&c.combinedAreasInfoFromJson(w.combinedAreasInfo)||{},R=w.attachmentsProvider&&n.getAttachmentsStoreFromJson(w.attachmentsProvider),U={isMultiFeature:N.isMultiFeature&&1<O.length,reportTitle:null,templateJson:N.templateJson,reportObject:N,fieldData:{specialTradeAreaCalculatorName:null,runReportTaskIDs:null,metadata:{},areaData:[],errors:[],reportInfo:null},analysisAreas:O,combinedAreasInfo:S,reverseAnalysisAreasOnMap:!0,attachmentsStore:R,
templateVariableProvider:L,customLogo:B,config:{}};d.populateCombinedAreasInfo(U.combinedAreasInfo,U.analysisAreas);a.provideAreasIndexes(U);e.setGeoenrichmentUrl(null);A&&A.forEach(function(Z){switch(Z){case "Maps":e.addCapability("FormatInfographicsMaps");break;case "ImageUrls":e.addCapability("FormatInfographicsImageUrls")}});return p(k.applyRunReportAndGetDataResults(I,U)).then(function(){return U})})}})})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/ReportDataProcessor":function(){define("esri/dijit/geoenrichment/when esri/dijit/geoenrichment/promise/all esri/dijit/geoenrichment/Deferred ./tasks/EnrichAreasTask ./tasks/RunReportTask ./data/AreaCalculatorsUtil ./data/VariablesUtil ./CustomReportsManager ./stdGeographies/StdGeographiesModel esri/dijit/geoenrichment/utils/DateUtil ../../core/supportClasses/templateJsonUtils/fieldInfo/FieldLibrary ../../core/supportClasses/templateJsonUtils/fieldInfo/FieldInfoNameUtil ../../core/supportClasses/templateJsonUtils/query/TemplateJsonQueryUtil ../../core/supportClasses/templateJsonUtils/TemplateJsonAnalyzer ../../core/infographics/utils/InfographicJsonUtil ../../config ../../countryConfig".split(" "),
function(t,p,l,k,f,d,c,a,e,b,g,h,m,n,q,r,u){return{runReportAndGetData:function(v,w){return p([a.getCustomReportByID(v),w]).then(function(A){var E=A[0];A=A[1];return(new f).execute({portalUrl:v.portalUrl,analysisAreas:v.analysisAreas,countryID:v.countryID,hierarchy:v.hierarchy,report:{reportID:E.reportID,portalUrl:E.templateData.getPortalUrl(!0),modified:E.modified,isMultiFeature:E.isMultiFeature},attachmentsStore:A,cacheResult:r.runReportTask.cacheResult}).then(function(F){return{taskIDs:F.taskIDs,
areaData:F.areaData,reportInfo:F.reportInfo}},function(F){v.fieldData.errors.push(F);return(new l).reject(F)})})},runReportFromVariables:function(v){var w={};v.variables.fullNames.forEach(function(A){var E=h.createFieldNameFromSource(A);w[A.substr(A.indexOf(".")+1)]=E});return(new k).enrichAreas({portalUrl:v.portalUrl,analysisAreas:v.analysisAreas,countryID:v.countryID,hierarchy:v.hierarchy,fields:c.convertForEnrich(v.variables),comparisonLevels:v.comparisonLevels||q.getDefaultLevels()}).then(function(A){var E=
v.analysisAreas.map(function(){return{}});d.addEnrichFeatures(A,w,h.DATA_COLLECTIONS_CALCULATOR_NAME,E);return{areaData:E}},function(A){v.fieldData.errors.push(A);return(new l).reject(A)})},applyRunReportAndGetDataResults:function(v,w){if(v&&v.areaData){var A=w.templateJson;w.fieldData.specialTradeAreaCalculatorName=A.metadata&&A.metadata.specialTradeAreaCalculatorName;delete A.metadata;w.fieldData.runReportTaskIDs=v.taskIDs;w.fieldData.areaData=v.areaData;(w.fieldData.reportInfo=v.reportInfo)&&this._populateReportDataFromReportInfo(v.reportInfo,
w);this._reportDataFromAreas(w.analysisAreas,w.fieldData.areaData);this._reportDataFromReport(w.reportObject,w.fieldData,w.combinedAreasInfo);return this._populateReportDataFromAttachmentsStore(w)}},_populateReportDataFromReportInfo:function(v,w){w.reportTitle=w.reportObject.title=w.reportTitle||v.Title||"";v.country&&!u.getCurrentCountry()&&(u.setCountry(v.country),u.setHierarchyID(null));v.stdLevels&&!u.getGeographiesModel()&&u.setGeographiesModel(new e({levels:v.stdLevels}));if(r.updateVariableInfoFromDataXml||
r.isPlayerOnServer){var A=v.variables;m.processTemplateFieldInfos(w.templateJson,function(E){if(E.hasVariable&&E.variableID&&E.templateName){var F=E.templateName.indexOf("."),D=E.templateName.substr(0,F);F=E.templateName.substr(F+1);(D=A[D]&&A[D][F])&&D.alias&&(E.alias=D.alias,E=w.templateVariableProvider.get(E.templateName))&&(E.alias=D.alias,D.vintage&&(E.vintage=D.vintage),D.source&&(E.source=D.source))}})}v=n.collectVariablesStats(w.templateJson);if(v=w.templateVariableProvider.getVariablesDataVintageDescription({usedVariablesCache:v}))w.reportObject.dataVintageDescription=
v},_populateReportDataFromAttachmentsStore:function(v){var w=v.attachmentsStore,A=[];v.analysisAreas.forEach(function(E,F){w.supportsMultipleAreas&&w.setCurrentAnalysisAreaIndex(F);A.push(t(w.getNotes(),function(D){if(D&&D.length){var B={attributes:{}};B.attributes[g.SITENOTES_FIELD_NAME]=D.map(function(y){return y.text}).join("\x3cbr/\x3e\x3cbr/\x3e");D.forEach(function(y,z){B.attributes[g.getSiteNoteFieldNameAt(z+1)]=y.text});(D=v.fieldData.areaData[F])&&d.addFeatureAttributesCalculator(B,D)}}));
A.push(t(w.getAttributes(),function(D){if(!D||!D.length)return null;var B={attributes:{}};D.forEach(function(y){B.attributes[y.name]=y});(D=v.fieldData.areaData[F])&&d.addFeatureAttributesCalculator(B,D)}))});return p(A)},_reportDataFromAreas:function(v,w){v.forEach(function(A,E){if(E=w[E])d.addFeatureAttributesCalculator(A.feature,E),d.addAreaInfoCalculator(A,E)})},_reportDataFromReport:function(v,w,A){var E=w.metadata;v&&!E.Title&&(E.Title=v.title);E.Subtitle=w.reportInfo&&w.reportInfo.Subtitle||
"";E.Source=v.dataVintageDescription||"Esri";E.Date=b.getReportFooterDate();E.Copyright="\u00a9 "+b.getFullYear()+" Esri";E.ProductLabel="";E.ProductUrl="";E.PhoneNumber="";E.TrialUrlText="";v.isMultiFeature&&(E.SITE_NAME=A.locationName||A.name,E.STORE_NAME=A.locationName||A.name,E.AREA_DESC2=A.description||A.name,E.STORE_ADDR=A.address)}}})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/tasks/EnrichAreasTask":function(){define("dojo/_base/declare dojo/_base/lang esri/dijit/geoenrichment/when esri/dijit/geoenrichment/promise/all esri/kernel esri/SpatialReference esri/tasks/FeatureSet esri/geometry/Point ../GEUtil ../areas/AnalysisAreaUtil ../attachments/AttributesUtil ../../../core/supportClasses/map/Projector ../../../countryConfig esri/dijit/geoenrichment/utils/CoordinateUtil".split(" "),
function(t,p,l,k,f,d,c,a,e,b,g,h,m,n){function q(r){return(r=r&&f.id.findCredential(r)||f.id.credentials[0])&&r.token}return t(null,{enrichAreas:function(r){var u={};return l(this._analysisAreasToStudyAreas(r.analysisAreas,r.countryID,r.comparisonLevels),function(v){u.studyAreas=v;r.report?u.analysisVariables=[{itemid:r.report.reportID,url:r.report.portalUrl,token:q(r.portalUrl),outFields:["*"]}]:r.fields&&(u.analysisVariables=r.fields);return this._doRunTask(u,r,"enrich")}.bind(this)).then(this._handleFeatureSetsRequest.bind(this))},
createReport:function(r){var u={f:"bin",format:"xml",reportfields:{}};u.report={itemid:r.report.reportID,url:r.report.portalUrl,token:q(r.portalUrl)};return l(this._analysisAreasToStudyAreas(r.analysisAreas,r.countryID,null,r.getAttributes),function(v){u.studyAreas=v;return this._doRunTask(u,r,"createReport")}.bind(this))},_analysisAreasToStudyAreas:function(r,u,v,w){var A=this;v=v&&v.map(function(E){return{layer:E}});return k(r.map(function(E,F){if(E.geographies&&E.geographies.length){var D=A._studyAreaFromGeographies(E.geographies,
u,!0);E.feature&&E.feature.attributes&&(D.attributes=p.mixin({},D.attributes,E.feature.attributes))}else D={attributes:p.mixin({},E.feature.attributes),geometry:E.feature.geometry.toJson()};v&&(D.comparisonLevels=v);return k([A._getStorePointForArea(E),w&&w(E)]).then(function(B){var y=B[0];B=B[1];D.attributes=D.attributes||{};y&&(D.attributes.STORE_LAT=D.attributes.STORE_LAT||y.STORE_LAT,D.attributes.STORE_LONG=D.attributes.STORE_LONG||y.STORE_LONG);D.attributes.STORE_ID=F+"";B&&B.forEach(function(z){D.attributes[z.name]=
g.formatAttributeValueForStudyArea(z)});return D})}))},_getStorePointForArea:function(r){if(r=r.location&&r.location.geometry||r.buffer&&r.buffer.point){r=r instanceof a?r:new a(r);var u=b.geometryToLatLong(r);return u?u:l(h.projectGeometries(r,new d(n.WGS_84_WKID)),function(v){return b.geometryToLatLong(v)})}},createFeatureForGeographies:function(r,u){return this._createFeaturesForGeographies(r,u,!0).then(function(v){return v[0]})},createFeaturesForGeographies:function(r,u){return this._createFeaturesForGeographies(r,
u,!1)},_createFeaturesForGeographies:function(r,u,v){r={returnGeometry:!0,outSR:u.outSR||new d(n.WEB_MERCATOR_WKID),studyAreas:v?[this._studyAreaFromGeographies(r,u.countryID,!0,u.generalizationLevel)]:r.map(function(w){return this._studyAreaFromGeographies([w],u.countryID,!1,u.generalizationLevel)},this),dataCollections:["GlobalIntersect"]};return this._doRunTask(r,u,"enrich").then(this._handleFeatureSetsRequest.bind(this))},_studyAreaFromGeographies:function(r,u,v,w){var A={sourceCountry:u,layer:null,
ids:null},E=null,F=[],D;r.forEach(function(B){if(!B||!B.id)throw Error("Wrong geography.");var y=B.levelId;if(y)if(!E)E=y;else if(v&&E!==y)throw Error("Geographies have different level IDs.");F.push(B.id);B.sourceCountry&&(A.sourceCountry=B.sourceCountry);B.hierarchy&&(A.hierarchy=B.hierarchy);B.attributes&&(D=p.mixin(D||{},B.attributes))});A.layer=E;A.ids=v?[F.join(",")]:F;A.attributes=D;A.generalizationlevel=w;return A},createFeaturesForBuffer:function(r,u){u=u||{};var v={bufferUnits:r.units,bufferRadii:r.radii||
[r.radius],areaType:r.areaType||"RingBuffer"};"NetworkServiceArea"===v.areaType&&(v.travelMode=r.travelMode,v.networkOptions=r.networkOptions);r=r.point||r.polyline;v={returnGeometry:!0,outSR:u.outSR||r.spatialReference||new d(n.WEB_MERCATOR_WKID),dataCollections:["GlobalIntersect"],studyAreasOptions:v,studyAreas:[{geometry:r.toJson?r.toJson():r}]};return this._doRunTask(v,u,"enrich").then(this._handleFeatureSetsRequest.bind(this))},createFeaturesForBuffers:function(r,u){function v(E){var F=E.point||
E.polyline;return JSON.stringify(F.toJson?F.toJson():F)+";"+E.units+";"+E.areaType+";"+E.travelMode+";"+JSON.stringify(E.networkOptions)}var w={},A=[];r.forEach(function(E){var F=v(E),D=w[F],B=!1;if(D){var y=E.radii||[E.radius];D.radii.some(function(z){return-1!==y.indexOf(z)})&&(D=null,B=!0)}D||(D=p.clone(E),B||(w[F]=D),delete D.radius,D.radii=[],A.push(D));E.radii?D.radii=D.radii.concat(E.radii):D.radii.push(E.radius)});return k(A.map(function(E){return this.createFeaturesForBuffer(E,u)},this)).then(function(E){var F=
[];E.forEach(function(D){F=F.concat(D)});return F})},_doRunTask:function(r,u,v){r=p.mixin({useData:{sourceCountry:u.countryID,hierarchy:u.hierarchy||m.getHierarchyID()},forStorage:!1},r);return e[v](r)},_handleFeatureSetsRequest:function(r){return(new c(r[0])).features}})})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/attachments/AttributesUtil":function(){define(["dojo/_base/lang","esri/layers/CodedValueDomain","esri/dijit/geoenrichment/utils/DateUtil","esri/dijit/geoenrichment/utils/ObjectUtil"],
function(t,p,l,k){var f={composeAttributesFromFieldInfos:function(d,c){return d&&d.filter(function(a){return a.visible}).map(function(a){var e=a.fieldName,b=a.label,g=a.format&&a.format.places,h=a.format&&a.format.digitSeparator,m=a.format&&a.format.dateFormat,n=c[a.fieldName];a=(a=a.format)&&a.dateFormat?"esriFieldTypeDate":a&&void 0!==a.places?0<a.places?"esriFieldTypeDouble":"esriFieldTypeInteger":"esriFieldTypeString";return{name:e,alias:b,places:g,digitSeparator:h,dateFormat:m,value:n,type:a,
domain:null,length:void 0}})},formatAttributeValue:function(d,c){c=c||{};var a=c.hasOwnProperty("unavailableDataValue")?c.unavailableDataValue:"";if(!d||null===d.value||void 0===d.value)return a;if(!c.skipFormattedValue&&d.formattedValue&&d.formattedValue!==a)return d.formattedValue;var e=d.domain&&"codedValue"===d.domain.type?new p(d.domain):null;e?(c=e.getName(d.value))||(c=d.value+""):"esriFieldTypeString"===d.type?c=d.value:"esriFieldTypeDate"===d.type?c=l.formatDateShort(d.value):(c=c.format,
c=k.formatNumber(d.value,{places:c&&void 0!==c.decimals?c.decimals:d.places,noSeparator:c&&void 0!==c.useThousandsSeparator?!c.useThousandsSeparator:!1===d.digitSeparator,preserveTrailingZeroes:!0}));return null===c||void 0===c?a:c},formatAttributeValueForStudyArea:function(d){var c;d&&null!==d.value&&void 0!==d.value||(c=!0);c||(c=d.domain&&"codedValue"===d.domain.type||"esriFieldTypeDate"===d.type);return c?f.formatAttributeValue(d):d.value},getAttributeTypeForStudyArea:function(d){return"esriFieldTypeDate"===
d.type?"esriFieldTypeString":d.type},attributeToJson:function(d){return{name:d.name,alias:d.alias,type:d.type,value:d.value,domain:d.domain&&(d.domain.toJson?d.domain.toJson():t.clone(d.domain)),places:d.places,digitSeparator:d.digitSeparator,dateFormat:d.dateFormat,length:d.length}},attributeFromJson:function(d){return{name:d.name,alias:d.alias,type:d.type,value:d.value,domain:d.domain,places:d.places,digitSeparator:d.digitSeparator,dateFormat:d.dateFormat,length:d.length}}};return f})},"esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/map/Projector":function(){define(["dojo/_base/declare",
"esri/dijit/geoenrichment/Deferred","esri/dijit/geoenrichment/when","esri/dijit/geoenrichment/promise/all","esri/dijit/geoenrichment/utils/ProjectionUtil"],function(t,p,l,k,f){function d(c,a){return f.projectGeometries(c,a)}t=t(null,{_pendingInfos:null,_isBusy:!1,constructor:function(){this._pendingInfos=[]},addForProjection:function(c,a){if(this._isBusy)throw Error("Can't interrupt the current projection process.");c=c&&c.geometry||c;var e=new p;this._pendingInfos.push({geom:c,mapOrSR:a,dfd:e,index:this._pendingInfos.length});
return e.promise},project:function(){function c(n){var q=b[n];return l(d(q.geoms,q.mapOrSR),function(r){r.forEach(function(u,v){v=q.indexMap[v];h[v]=u;e[v].resolve(u)})})}var a=this;if(this._isBusy)throw Error("Can't interrupt the current projection process.");this._isBusy=!0;var e=[],b={};this._pendingInfos.forEach(function(n){e.push(n.dfd);var q=n.geom.type+";"+n.geom.spatialReference.wkid+";"+f.getSpatialReference(n.mapOrSR).wkid;q=b[q]=b[q]||{geoms:[],indexMap:{},mapOrSR:n.mapOrSR};q.geoms.push(n.geom);
q.indexMap[q.geoms.length-1]=n.index});this._pendingInfos.length=0;var g=[],h=[],m;for(m in b)g.push(c(m));return k(g).then(function(){a._isBusy=!1;return h})}});t.needProject=function(c,a){c=c&&c.geometry||c;return c.spatialReference&&c.spatialReference.wkid!==f.getSpatialReference(a).wkid};t.projectGeometries=d;return t})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/tasks/RunReportTask":function(){define("dojo/_base/declare dojo/_base/lang esri/dijit/geoenrichment/promise/all esri/dijit/geoenrichment/Deferred esri/dijit/geoenrichment/when ./parsers/DataXMLParser ./EnrichAreasTask ../areas/AnalysisAreaJsonUtil esri/dijit/geoenrichment/utils/ArrayUtil esri/dijit/geoenrichment/utils/CacheUtil esri/dijit/geoenrichment/ReportPlayer/config esri/dijit/geoenrichment/ReportPlayer/_devConfig".split(" "),
function(t,p,l,k,f,d,c,a,e,b,g,h){var m={_getCache:function(){return b.get("CreateReportResultCache")},_buildKey:function(q){return[q.countryID,q.hierarchy,JSON.stringify(a.areasToJson(q.analysisAreas,{excludeInfoTemplate:!0})),q.report.reportID,q.report.portalUrl,q.report.modified].join("_")},getCopy:function(q){q=this._buildKey(q);return(q=this._getCache()[q])&&p.clone(q)},copyAndPut:function(q,r){q=this._buildKey(q);this._getCache()[q]=r&&p.clone(r)},getResults:function(){var q=[],r;for(r in this._getCache())q.push(this._getCache()[r]);
return q}},n={execute:function(q){var r=q.cacheResult&&m.getCopy(q);if(r)return f(r);r=e.splitArrayToBunches(q.analysisAreas,10);var u;return l(r.map(function(v){function w(){var A=p.mixin({},q,{analysisAreas:v});A.getAttributes=function(E){if(!q.attachmentsStore)return null;if(!q.attachmentsStore.supportsMultipleAreas&&u)return u;q.attachmentsStore.supportsMultipleAreas&&q.attachmentsStore.setCurrentAnalysisAreaIndex(q.analysisAreas.indexOf(E));return f(q.attachmentsStore.getAttributes(),function(F){u=
u||F;return F})};return(new c).createReport(A).then(function(E){var F=E&&E.taskID;E=E&&E.result;try{h.emulateErrors.createReportError&&(E={error:{message:"Error test: something crashed on the server!"}});if(E&&"object"===typeof E)var D=E.error;if(!D&&"string"===typeof E&&-1!==E.indexOf("{"))try{var B=JSON.parse(E);D=B&&B.error}catch(z){}if(D)if(g.runReportTask.ignoreErrors)E=[];else return(new k).reject(D);var y=d.parse(E);return{taskID:F,areaData:y.areaData,reportInfo:y.reportInfo,originalXML:E,
error:D}}catch(z){return(new k).reject(z)}})}return f(w(),function(A){return!A||A.error?g.runReportTask.secondAttempt?w():A:A},function(A){return g.runReportTask.secondAttempt?w():(new k).reject(A)})})).then(function(v){var w={taskIDs:[],areaData:[],reportInfo:null,originalXMLs:[],errors:[]};v.forEach(function(A){w.taskIDs.push(A.taskID);w.originalXMLs.push(A.originalXML);A.error&&w.errors.push(A.error);w.areaData=w.areaData.concat(A.areaData);w.reportInfo=A.reportInfo});q.cacheResult&&!w.errors.length&&
m.copyAndPut(q,w);return w})}};t=t(null,{execute:function(q){console.log("Creating a new report...");return n.execute(q)}});t.CreateReportResultCache=m;return t})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/tasks/parsers/DataXMLParser":function(){define("esri/units esri/dijit/geoenrichment/utils/FieldUtil esri/dijit/geoenrichment/utils/JsonXmlConverter ../../data/AreaDataUtil ../../../../core/supportClasses/DocumentOptions ./AttrUtil esri/dijit/geoenrichment/ReportPlayer/config esri/dijit/geoenrichment/ReportPlayer/_devConfig".split(" "),
function(t,p,l,k,f,d,c,a){function e(n){return n.innerHTML?n.innerHTML:n.tags&&n.tags.length&&n.tags[0].text||""}function b(n){var q={Title:null,Subtitle:null,country:null,hierarchyId:null,exportSettings:null};n.tags&&n.tags.forEach(function(r){"ReportTitle"===r.name&&(q.Title=e(r));"ReportTitle2"===r.name&&(q.Subtitle=e(r));if("CurrencyFormat"===r.name){r=e(r);var u=r.split(";")[0].replace("0","").trim();q.country={id:null,currencySymbol:u,currencyFormat:r}}else if("ReportLayout"===r.name){var v=
q.exportSettings={};r.tags&&r.tags.forEach(function(w){if("Options"===w.name&&w.attributes)v.addHeader=!!w.attributes.header,v.addDataSource=!!w.attributes.dataSource,v.addFooter=!!w.attributes.footer;else if("Page"===w.name&&w.attributes){v.pageSettings={};var A=w.attributes;if(A.width&&A.height&&A.units){w=Number(A.width);var E=Number(A.height);if(A=A.units===t.MILLIMETERS?"mm":A.units===t.CENTIMETERS?"cm":A.units===t.INCHES?"in":A.units===t.POINTS?"pt":null)v.pageSettings.pagesize=f.combineCustomSizeString(w,
E,A)}else A.size&&A.orientation&&(v.pageSettings.pagesize=A.size.toLowerCase(),v.pageSettings.orientation=A.orientation.toLowerCase())}})}});q.exportSettings&&q.Subtitle&&(q.exportSettings.reportSubtitle=q.Subtitle);return q}function g(n){function q(v){v.tags&&v.tags.forEach(function(w){var A=w.attributes.AREA_ID,E=u.areaIdToAttachmentsInfo[A];E||(E={attributes:null,notes:null,images:null},u.areaIdToAttachmentsInfo[A]=E);w.tags&&w.tags.forEach(function(F){"Attributes"===F.name&&F.tags&&(E.attributes=
F.tags.map(function(D){return{name:D.attributes.Name,alias:D.attributes.Alias,type:D.attributes.Type,value:p.isNumericField(D.attributes.Type)?Number(D.attributes.Value):D.attributes.Value}}));"Notes"===F.name&&F.tags&&(E.notes=F.tags&&F.tags.map(function(D){return{text:D.attributes.Text}}));"Images"===F.name&&F.tags&&(E.images=F.tags&&F.tags.map(function(D){return{url:D.attributes.Source,thumbnail:D.attributes.Thumbnail,description:D.attributes.Description,imageViewType:null}}))})})}function r(v){var w;
u.stdLevels=v.tags&&v.tags.map(function(A,E){w=w||A.attributes.Id.substr(0,A.attributes.Id.indexOf("."));return{id:A.attributes.Id,name:A.attributes.Caption,isWholeCountry:A.attributes.IsWholeCountry||0===E}});"US"===w&&(u.countrId="US");"CAN"===w&&(u.countrId="CA")}var u={areaIdToAttachmentsInfo:{},stdLevels:null,countrId:null};n.tags&&n.tags.forEach(function(v){"StudyAreas"===v.name?q(v):"StandardGeographyLevels"===v.name&&r(v)});return u}function h(n,q){function r(E){if(E=function(D){var B={},
y,z;D.tags.forEach(function(I){var L=e(I),N=L,O=A[D.name][I.name];"string"===(O&&O.type)?L=String(L):(L=Number(L),isNaN(L)&&(L=N),a.emulateErrors.createReportNaN&&(L=NaN),a.emulateErrors.createReportNull&&(L=null));q&&(L=q(I.name,L,D.name));void 0===B[I.name]&&(B[I.name]=L);"AREA_ID"===I.name&&(H=L);"IDFNDFIELD"===I.name&&(y=L);"STORE_ID"===I.name&&(z=L)});var H=H||y;if(!H&&!z)return null;var G;!H&&z&&(G=Number(z));H&&void 0===v[H]&&(v[H]=w++);d.cleanUpAttrs(B,c.isPlayerOnServer?{STORE_ID:1,AREA_ID:1}:
null);return{name:D.name,attrs:B,areaIndex:void 0!==G?G:v[H]}}(E)){var F=u[E.areaIndex]=u[E.areaIndex]||{};F[E.name]?F[E.name].comparisonLevels.push(E.attrs):F[E.name]=k.createCalculator(E.attrs)}}var u=[],v={},w=0,A;n.tags[0].tags.forEach(function(E){"xs:schema"===E.name?A=m.parseSchema(E):r(E)});return{areaData:u,schemaParseResult:A}}var m={parseSchema:function(n){var q={};n.tags.forEach(function(r){"xs:element"===r.name&&r.attributes&&"ReportData"===r.attributes.name&&l.queryJson(r,"xs:element").filter(function(u){return!!u.tags}).forEach(function(u){var v=
q[u.attributes.name]={};l.queryJson(u,"xs:element").forEach(function(w){v[w.attributes.name]={type:"xs:string"===w.attributes.type?"string":"number",alias:w.attributes["msdata:Caption"]||"",vintage:w.attributes["msdata:Vintage"]||"",source:w.attributes["msdata:Source"]||""}})})});return q}};return{parse:function(n,q){return this._parseDataXmlJson(l.parseXml(n,{saveInnerHTML:!0}),q)},_parseDataXmlJson:function(n,q){if(!n||!n.tags||2>n.tags.length)return[];var r,u,v,w;n.tags.forEach(function(A){"ReportInfo"===
A.name?r=b(A):"ReportArea"===A.name?u=g(A):"ReportData"===A.name&&(A=h(A,q),w=A.areaData,v=A.schemaParseResult)});a.logData&&(console.log("DataXMLPareser.js \x3d\x3e areaData:"),console.log(w));u&&(r.country.id=u.countrId,r.areaIdToAttachmentsInfo=u.areaIdToAttachmentsInfo,r.stdLevels=u.stdLevels);r.variables=v;return{reportInfo:r,areaData:w}}}})},"esri/dijit/geoenrichment/utils/JsonXmlConverter":function(){define(["dojo/_base/declare","./RegExpUtil"],function(t,p){function l(e,b,g,h){return a(g,
h)+"\x3c"+e+(b?c(b):"")+"\x3e"+(h?"\n":"")}function k(e,b,g){return a(b,g)+"\x3c/"+e+"\x3e"+(g?"\n":"")}function f(e,b,g,h){return a(g,h)+"\x3c"+e+(b?c(b):"")+" /\x3e"+(h?"\n":"")}function d(e,b,g){e=p.encodeXML(e,!1);return a(b,g)+e+(g?"\n":"")}function c(e){var b="",g;for(g in e){var h=e[g];Array.isArray(h)&&(h=h.join(";"));void 0===h||null===h||""===h||"number"===typeof h&&isNaN(h)||(b+=" "+g+'\x3d"'+p.encodeXML(h,!0)+'"')}return b}function a(e,b){if(!b)return"";b="";for(var g=0;g<e;g++)b+="     ";
return b}return t(null,{parseJson:function(e,b){function g(n,q){n.text||"#text"===n.name?m+=d(n.text,q,h):n.name&&(n.tags&&n.tags.length?(m+=l(n.name,n.attributes,q,h),n.tags&&n.tags.forEach(function(r){g(r,q+1)}),m+=k(n.name,q,h)):m+=f(n.name,n.attributes,q,h))}var h=b&&b.prettify,m="";b&&b.addDocumentOptions&&(m+='\x3c?xml version\x3d"1.0" encoding\x3d"utf-8"?\x3e');g(e,0);return m=decodeURIComponent(encodeURIComponent(m).replace("%19",""))},parseXml:function(e,b){function g(u,v){u.name=v.nodeName;
b.saveInnerHTML&&(u.innerHTML=v.innerHTML);if(v.attributes&&v.attributes.length){u.attributes={};for(var w=0;w<v.attributes.length;w++){var A=v.attributes[w],E=A.value;if(!0===E||"true"===E)E=!0;else if(!1===E||"false"===E)E=!1;else if(h&&E){var F=Number(E);isNaN(F)||(E=F)}u.attributes[A.nodeName]=E}}if(v.childNodes&&v.childNodes.length)for(u.tags=[],w=0;w<v.childNodes.length;w++){if(E=A=v.childNodes[w],"#text"!==E.nodeName||(m?E.nodeValue.trim():E.nodeValue))E={},u.tags.push(E),g(E,A)}else"#text"===
v.nodeName&&(delete u.name,u.text=p.decodeXML(v.nodeValue))}b=b||{};var h=b.parseNumbers,m=b.ignoreWhiteSpacedTextNodes;m=void 0===m?!0:m;var n={};e=(new DOMParser).parseFromString(e,"text/xml").childNodes;for(var q=0;q<e.length;q++)if(1===e[q].nodeType){var r=e[q];break}r&&g(n,r);return n},queryTopJson:function(e,b){return this.queryJson(e,b,!0)},queryJson:function(e,b,g){function h(n,q){n.tags&&n.tags.forEach(function(r){(b.test?b.test(r.name):r.name===b)&&m.push(r);g&&0===q||h(r,q+1)})}var m=[];
h(e,0);return m},traverseJson:function(e,b){function g(m){h||(!0===b(m)?h=!0:m.tags&&m.tags.forEach(g))}var h=!1;g(e)},getInnerHTML:function(e){return e.innerHTML?e.innerHTML.trim():this.parseJson(e).replace(/^<[^<]*>/,"").replace(/<\/[^<]*>$/,"").trim()},_IS_RICH_RE:/<.+>.*<\/.+>|<br\s*\/>|<\/br>/,_UNRICH_RE:/<.*?>/g,isRichText:function(e){return(e=String(e))&&this._IS_RICH_RE.test(e)},unrichHTML:function(e){if(!e)return"";e=p.decodeXML(String(e).trim()).replace(this._UNRICH_RE,"");0===e.indexOf("\x3c")&&
-1!==e.indexOf("\x3e")&&(e="");return e}})()})},"esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/DocumentOptions":function(){define(["dojo/_base/lang","esri/dijit/geoenrichment/utils/PageUnitsConverter","../themes/ThemeLibrary"],function(t,p,l){var k={},f={a:[[841,1189],[594,841],[420,594],[297,420],[210,297],[148,210],[105,148],[74,105],[52,74],[37,52],[26,37]],b:[[1E3,1414],[707,1E3],[500,707],[353,500],[250,353],[176,250],[125,176],[88,125],[62,88],[44,62],[31,44]],c:[[917,1297],[648,
917],[458,648],[324,458],[229,324],[162,229],[114,162],[81,114],[57,81],[40,57],[28,40]],letter:[216,279],legal:[216,356],tabloid:[279,432],ledger:[432,279]};k.PAPER_SIZES=f;var d={};"a3 a4 a5 b4 b5 c4 c5 letter legal tabloid ledger".split(" ").forEach(function(c){var a=2===c.length?f[c[0]][c[1]]:f[c];d[c]={portrait:{w:p.mmToIn(a[0]),h:p.mmToIn(a[1])},landscape:{w:p.mmToIn(a[1]),h:p.mmToIn(a[0])}}});k.SIZE_TYPE_TO_DIM_HASH=d;k.hasStandardSize=function(c){return d[c]};k.getSupportedPageSizes=function(){var c=
[],a;for(a in f)1===a.length?f[a].forEach(function(e,b){c.push(a+b)}):c.push(a);return c};k.getPageDim=function(c,a,e){d[c]?c=d[c][a||"portrait"]:(c=c.split("x"),c={w:p.ptToIn(Number(c[0])),h:p.ptToIn(Number(c[1]))});e&&(c=t.clone(c),p.roundNDigitsObj(c,e.places));return c};k.getPageBox=function(c){if(!c)return null;var a=k.getPageDim(c.pagesize,c.orientation),e=p.inToPx(a.w);a=p.inToPx(a.h);return{w:e,h:a,contentW:e-(c.left||0)-(c.right||0),contentH:a-(c.top||0)-(c.bottom||0)}};k.combineCustomSizeString=
function(c,a,e){return p.convert(c,e,"pt",5)+"x"+p.convert(a,e,"pt",5)};k.getDefaultDocumentOptions=function(c){return t.mixin({pagesize:"letter",orientation:"portrait",left:21.07,right:22.6,top:19.2,bottom:9.6,align:"left",lineSpacing:1.12,fontSize:10,fontFamily:l.DEFAULT_FONT_FAMILY_CLASSIC},c)};k.getDefaultDocumentOptionsGraphicReport=function(c){return t.mixin({pagesize:"letter",orientation:"landscape",left:21.07,right:22.6,top:19.2,bottom:9.6,align:"left",fontSize:10,fontFamily:l.DEFAULT_FONT_FAMILY_GRAPHIC},
c)};k.getClosestStandrdSizes=function(c,a){function e(m){var n=m.w/b.w;m=m.h/b.h;return Math.max(1-(1<n?1/n:n),1-(1<m?1/m:m))}a=void 0===a?.4:a;var b=k.getPageDim(c.pagesize,c.orientation);c=[];for(var g in d){var h=d[g];c.push({pagesize:g,orientation:"portrait",score:e(h.portrait)});c.push({pagesize:g,orientation:"landscape",score:e(h.landscape)})}c=c.filter(function(m){return m.score<=a});c.sort(function(m,n){return m.score-n.score});return c};k.tryGetStandardPageSize=function(c,a){function e(q){var r=
"portrait"===a?1:0;return q["portrait"===a?0:1]===g&&q[r]===h}if(k.SIZE_TYPE_TO_DIM_HASH[c])return c;var b=c.split("x"),g=p.convert(Number(b[0]),"pt","mm",0),h=p.convert(Number(b[1]),"pt","mm",0),m;for(m in k.PAPER_SIZES)if(b=k.PAPER_SIZES[m],1===m.length){if(b.some(function(q,r){if(e(q))return n=m+r,!0}))break}else if(e(b)){var n=m;break}return n||c};return k})},"esri/dijit/geoenrichment/utils/PageUnitsConverter":function(){define(["dojo/_base/lang"],function(t){function p(f,d,c){c&&(f=t.mixin({},
f));for(var a in f){var e=f[a];null!==e&&""!==e&&"boolean"!=typeof e&&("object"==typeof e?f[a]=p(e,d,c):(e=Number(e),isNaN(e)||(f[a]=d(e))))}return f}var l={},k="px pt mm cm in twip".split(" ");k.forEach(function(f){k.forEach(function(d){if(f!==d){var c=f+"To"+d.charAt(0).toUpperCase()+d.substr(1);l[c]=function(a,e){return l.convert(a,f,d,void 0!==e?e:5)}}})});l.convert=function(f,d,c,a){f=Number(f)||0;switch(d){case "in":f*=72;break;case "px":f*=.75;break;case "mm":f=f/25.4*72;break;case "cm":f=
f/2.54*72;break;case "twip":f/=20}switch(c){case "in":f/=72;break;case "px":f/=.75;break;case "mm":f=f/72*25.4;break;case "cm":f=f/72*2.54;break;case "twip":f=Math.round(20*f)}void 0!==a&&(f=l.roundNDigits(f,a));return f};l.pxToPtObj=function(f,d){return p(f,l.pxToPt,!d)};l.ptToPxObj=function(f,d){return p(f,l.ptToPx,!d)};l.roundNDigits=function(f,d){return Number(Number(f).toFixed(d))};l.roundNDigitsObj=function(f,d){for(var c in f){var a=f[c];"object"==typeof a?l.roundNDigitsObj(a,d):f[c]=l.roundNDigits(a,
d)}};return l})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/tasks/parsers/AttrUtil":function(){define([],function(){var t={},p="ID OBJECTID AREA_ID STORE_ID HasData aggregationMethod sourceCountry radiusIndex".split(" ");t.cleanUpAttrs=function(l,k){l&&p.forEach(function(f){k&&k[f]||delete l[f]})};return t})},"esri/dijit/geoenrichment/utils/ArrayUtil":function(){define(["dojo/_base/array"],function(t){var p={},l={}.toString();p.arraysEqual=function(k,f){if(!k&&!f)return!0;
if(!k||!f||k.length!==f.length)return!1;for(var d=0;d<k.length;d++)if(k[d]!==f[d])return!1;return!0};p.composeIdentityFunction=function(k,f){var d="function"===typeof k?k:k?function(c){return c[k]}:function(c){return c};return function(c){return(c=d(c))&&c.toString?c.toString():f&&void 0===c?c:String(c)}};p.removeDuplicates=function(k,f){var d=[],c={};f=p.composeIdentityFunction(f,!0);t.forEach(k,function(a,e){var b=f(a);b===l&&(void 0===a["__ArrayUtil.js_uniqueKey__"]&&(a["__ArrayUtil.js_uniqueKey__"]=
"__ArrayUtil.js_uniqueKey__"+e),b=a["__ArrayUtil.js_uniqueKey__"]);void 0===b||b in c||(c[b]=a,d.push(a))});return d};p.splitArrayToBunches=function(k,f){f=f||100;for(var d=[],c,a=0,e=k.length;a<e;a++)c&&c.length!==f||(c=[],d.push(c)),c.push(k[a]);return d};return p})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/data/AreaCalculatorsUtil":function(){define(["./AreaDataUtil","../../../core/supportClasses/templateJsonUtils/fieldInfo/FieldInfoNameUtil","../tasks/parsers/FeatureSetParser"],
function(t,p,l){return{addFeatureAttributesCalculator:function(k,f,d){d=d||p.AREA_ATTRIBUTES_CALCULATOR_NAME;for(var c in k.attributes)t.setAreaDataObjectValue(c,k.attributes[c],f,d)},addAreaInfoCalculator:function(k,f,d){d=d||p.AREA_ATTRIBUTES_CALCULATOR_NAME;t.setAreaDataObjectValue("SITE_NAME",k.locationName||k.name,f,d);t.setAreaDataObjectValue("STORE_NAME",k.locationName||k.name,f,d);t.setAreaDataObjectValue("AREA_DESC",k.shortName||k.name,f,d);t.setAreaDataObjectValue("AREA_DESC2",k.description||
k.name,f,d);t.setAreaDataObjectValue("AREA_DESC3",k.description||k.name,f,d);t.setAreaDataObjectValue("STORE_ADDR",k.address||"",f,d);t.setAreaDataObjectValue("STORE_LAT",k.latitude||"",f,d);t.setAreaDataObjectValue("STORE_LONG",k.longitude||"",f,d)},addEnrichFeatures:function(k,f,d,c){var a={},e={},b;for(b in f)a[b.toLowerCase()]=f[b],e[b.toUpperCase()]=f[b];k=l.parse(k,d||p.ENRICHED_DATA_NO_LEVELS,function(g){return f[g]||a[g.toLowerCase()]||e[g.toUpperCase()]});t.mergeAreaData(k,c)}}})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/tasks/parsers/FeatureSetParser":function(){define(["./AttrUtil"],
function(t){var p={ID_FIELDS:["ID","AREA_ID","IDFNDFIELD"],KNOWN_ATTRIBUTES:{StdGeographyLevel:1,StdGeographyName:1,StdGeographyID:1},parse:function(l,k,f){if(!l)return[];l=l.features||l;if(!l.length)return[];var d=[],c={},a=0;l.forEach(function(e){var b=e.attributes[p.ID_FIELDS[0]]||e.attributes[p.ID_FIELDS[1]];if(b){void 0===c[b]&&(c[b]=a++);var g={},h;for(h in e.attributes){var m=p.KNOWN_ATTRIBUTES[h]?h:f?f(h):h;m&&(g[m]=e.attributes[h])}t.cleanUpAttrs(g);e={name:k,attrs:g,areaIndex:c[b]}}else e=
null;e&&(b=d[e.areaIndex]=d[e.areaIndex]||{},b[e.name]?b[e.name].comparisonLevels.push(e.attrs):b[e.name]={data:e.attrs,comparisonLevels:[]})});console.log("FeatureSetPareser.js \x3d\x3e areaData:");console.log(d);return d}};return p})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/data/VariablesUtil":function(){define(["../dataCollections/DataCollectionsLoader"],function(t){var p={preprocessVariables:function(l,k){var f=p.convertForEnrich(p._splitVariables(l)).filter(function(d){return d.itemid});
return t.loadCustomDataVariables(f,{forceLowerCase:!0,portalUrl:k}).then(function(d){return p._splitVariables(l,d)})},_splitVariables:function(l,k){var f=[],d={};l.forEach(function(c){"string"===typeof c?f.push(c.toLowerCase()):c&&c.outFields&&c.outFields.forEach(function(a,e){e=c.itemid+"."+a;e=e.toLowerCase();f.push(e);d[e]={itemid:c.itemid,url:c.url,token:c.token,variable:k?k.fullNameToVariableCache[e]:{id:a}}})});return{fullNames:f,customDataMapping:d}},convertForEnrich:function(l){var k={},f=
[];l.fullNames.forEach(function(d){var c=l.customDataMapping[d];c?(d=k[c.itemid],d||(d={itemid:c.itemid,url:c.url,token:c.token,outFields:[]},d.url||delete d.url,d.token||delete d.token),d.outFields.push(c.variable.id),k[d.itemid]||(k[d.itemid]=d,f.push(d))):f.push(d)});return f}};return p})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/dataCollections/DataCollectionsLoader":function(){define("esri/dijit/geoenrichment/promise/all ../GEUtil ../ReportTemplateData esri/dijit/geoenrichment/utils/CacheUtil esri/dijit/geoenrichment/utils/JsonXmlConverter esri/dijit/geoenrichment/utils/UrlUtil".split(" "),
function(t,p,l,k,f,d){return{canLoad:function(){return p.canMakeRequests()},loadVariables:function(c){var a=k.get("DataCollectionsLoader"),e="*"===c.outFields,b=e?["*"]:c.outFields,g=c.countryID+";"+c.hierarchy+";"+b.join(";")+";"+!!c.forceLowerCase;a[g]||(e||(b=b.slice(),-1===b.indexOf("id")&&b.push("id")),a[g]=p.getDataCollections(c.countryID,c.hierarchy,{f:"json",outFields:e?"*":JSON.stringify(b),suppressNullValues:!0,AddDerivativeVariables:"all"}).then(function(h){var m={dataCollections:h,idToVariableCache:{},
fullNameToVariableCache:{}};h.forEach(function(n){n.data.forEach(function(q){function r(w){return c.forceLowerCase?w.toLowerCase():w}function u(w){if(e)return Object.keys(w).length;var A=0;b.forEach(function(E){void 0!==w[E]&&A++});return A}var v=m.idToVariableCache[r(q.id)];if(!v||u(q)>u(v))m.idToVariableCache[r(q.id)]=q;m.fullNameToVariableCache[r(n.dataCollectionID+"."+q.id)]=q})});return m}));return a[g]},loadCustomDataVariables:function(c,a){a=a||{};var e={idToVariableCache:{},fullNameToVariableCache:{}};
return t(c.map(function(b){var g=d.combineMulti([b.url||a.portalUrl,"sharing/rest/content/items",b.itemid,"resources/metadata.xml"]);return l.loadResource(g,b.token||d.getToken(a.portalUrl)).then(function(h){var m=f.parseXml(h.data);h=[];var n=f.queryJson(m,"Fields")[0];n&&(h=h.concat(f.queryJson(n,"Field")));(m=f.queryJson(m,"CalculatedFields")[0])&&(h=h.concat(f.queryJson(m,"Script")));h.forEach(function(q){function r(u){return a.forceLowerCase?u.toLowerCase():u}q=q.attributes;q={id:q.Name,fullName:b.itemid+
"."+q.Name,alias:q.Alias,description:q.Alias,type:"esriFieldType"+q.Type,precision:q.Precision?Number(q.Precision):void 0,vintage:q.Vintage};e.idToVariableCache[r(q.id)]=q;e.fullNameToVariableCache[r(q.fullName)]=q})})})).then(function(){return e})}}})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/ReportTemplateData":function(){define("dojo/_base/declare dojo/_base/lang dojo/request/xhr esri/dijit/geoenrichment/promise/all esri/kernel esri/request esri/urlUtils esri/dijit/geoenrichment/utils/DataUtil esri/dijit/geoenrichment/utils/PortalUtil esri/dijit/geoenrichment/utils/UrlUtil esri/dijit/geoenrichment/utils/requests/FileContent esri/dijit/geoenrichment/utils/requests/UniversalClient".split(" "),
function(t,p,l,k,f,d,c,a,e,b,g,h){function m(n,q){var r=n.substr(n.lastIndexOf("/")+1),u=c.getProxyRule(n);return l(u&&u.proxyUrl?u.proxyUrl+"?"+n:n,{method:"POST",handleAs:"arraybuffer",data:"token\x3d"+q,headers:{"X-Requested-With":null,"Content-Type":"application/x-www-form-urlencoded; charset\x3dutf-8"}}).then(function(v){var w=!/\.xml$|\.txt$|\.json$/i.test(r);return{name:r,data:w?a.base64FromByteSource(v):decodeURIComponent(escape(a.binaryStringFromByteSource(v)))}})}t=t(null,{id:null,_portalUrl:null,
_baseUrl:null,constructor:function(n,q){this.id=n.id;this._portalUrl=q;this._baseUrl=b.combine(this._portalUrl,"sharing/rest")},getFiles:function(){var n=this;return this._getResources().then(function(q){var r=[];q.map(function(u){u=u.resource;"thumbnail.png"!==u&&r.push(n.getFileByName(u))});return k(r)})},getFileByName:function(n){return m(this.getItemResourceUrl(n,!1),this._getToken())},getItemResourceUrl:function(n,q){n=this._baseUrl+"/"+this._contentItemPath(this.id+"/resources/"+n);return q?
b.addQueryPart(n,"token\x3d"+this._getToken()):n},updateFile:function(n,q){var r=this;return h.request({url:this._baseUrl,urlSuffix:"content/items/"+this.id}).then(function(u){var v=g.fromFileData(n,q);return h.request({url:r._baseUrl,urlSuffix:"content/users/"+u.owner+"/"+u.ownerFolder+"/items/"+r.id+"/updateResources"},{content:{file:v,filename:n}})})},_contentItemPath:function(n){return"content/items/"+n},_getToken:function(){var n=f.id.findCredential(this._portalUrl)||f.id.credentials[0];return n&&
n.token},_getResources:function(){var n=this;return e.query(function(q){return d({url:n._baseUrl+"/"+n._contentItemPath(n.id+"/resources"),content:p.mixin({f:"json",token:n._getToken()},q),handleAs:"json"},{usePost:!0})},null,"resources").then(function(q){return q.resources})},getPortalUrl:function(n){return n?/[^:]+:\/\/(.+)$/i.exec(this._portalUrl)[1]:this._portalUrl}});t.loadResource=m;return t})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/CustomReportsManager":function(){define("dojo/_base/lang esri/dijit/geoenrichment/Deferred esri/dijit/geoenrichment/when ./PortalManager ./ReportTemplateData ./StandardGraphicReportTemplates esri/dijit/geoenrichment/utils/CacheUtil esri/dijit/geoenrichment/utils/PortalUtil esri/dijit/geoenrichment/utils/PortalQueryUtil esri/dijit/geoenrichment/utils/UrlUtil ../../config ../../countryConfig".split(" "),
function(t,p,l,k,f,d,c,a,e,b,g,h){var m={TEMPLATE_TYPE:"Report Template",PLAYER_STANDARD_INFOGRAPHIC_TYPEKEYWORD:"esriReportPlayerStandardInfographic",STANDARD_INFOGRAPHIC_TYPEKEYWORD:"esriWebStandardInfographicReport",GALLERY_INFOGRAPHIC_TYPEKEYWORD:"esriWebGalleryInfographicReport",MOBILE_INFOGRAPHIC_TYPEKEYWORD:"esriMobileFactsInfographicReport",GALLERY_INFOGRAPHIC_USER:"esri_reports",resetCache:function(){c.set("CustomReportsManager",{})},_getCache:function(){return c.get("CustomReportsManager")},
getCustomReports:function(n){var q=this,r=b.getPortalUrl(n.portalUrl);return l(k.getSignedInPortal(r),function(u){u=u.user.username;u={q:e.combineQueryString({type:"Report Template",typeKeywords:n.typeKeywords,owner:!n.publicOnly&&u}),sortField:"modified",sortOrder:"desc"};return a.queryCommon(b.combine(r,"sharing/rest/search"),u).then(function(v){v=v.map(function(w){return q.prepareCustomReportFromItem(w,r,n)});return q._getCountryReports(v,n.countryID)})})},_getCountryReports:function(n,q){return n&&
("*"===q?n:n.filter(function(r){return!r.countries||r.countries.split(",").some(function(u){return q===u.trim()})}))},prepareCustomReportFromItem:function(n,q,r){function u(w){return"string"===typeof w?"true"===w:!!w}var v=t.mixin({},n.properties||n.details);v.isGraphicReport=u(v.isGraphicReport);v.isMultiFeature=u(v.isMultiFeature);v.reportID=n.id;q={title:n.title,templateData:q&&new f(n,q),modified:n.modified instanceof Date?n.modified.getTime():n.modified};r&&r.attachItemProperty&&(q[r.attachItemProperty]=
n);t.mixin(q,v);return q},getCustomReportByID:function(n){var q=this,r=this._getCache()[n.reportID];if(r)return r;var u=b.getPortalUrl(n.portalUrl);return this._getCache()[n.reportID]=l(k.getSignedInPortal(u),function(v){return v.user.getItem(n.reportID).then(function(w){return w&&q.prepareCustomReportFromItem(w,u,n)})}).otherwise(function(v){delete q._getCache()[n.reportID];return n.ignoreError?null:(new p).reject(v)})},tryFindReportIdByAlias:function(n){var q=this,r=d.aliasToID(n.countryID,n.reportID);
if(null==r)return null;var u=b.getPortalUrl(n.portalUrl);return l(r&&this.getCustomReportByID({reportID:r,portalUrl:u,ignoreError:!0,attachItemProperty:n.attachItemProperty}),function(v){return v?v&&(n.returnObject?v:v.reportID):l(q.getCustomReports({portalUrl:u,countryID:n.countryID,typeKeywords:"esriReportPlayerStandardInfographic",publicOnly:!0,attachItemProperty:n.attachItemProperty}),function(w){function A(z){z=z.split(".");return Number((Number(z[0])+Number(z[1])/100).toFixed(2))}var E=A(g.jsapiVersion),
F,D,B=-Infinity,y=Infinity;w.forEach(function(z){if(z.playerAlias===n.reportID){var H=A(z.jsapiVersion);E>=H&&H>B&&(B=H,F=z);E<H&&H<y&&(y=H,D=z)}});w=F||D;n.strictVersionCheck&&w&&w.jsapiVersion!==g.jsapiVersion&&(w=null);return w&&(n.returnObject?w:w.reportID)})})},itemUpdated:function(n){delete this._getCache()[n]},getFakeCustomReportByContext:function(n){return{title:"Generic template",type:"esriReportTemplateStandard",coverage:n.countryID,countries:n.countryID,hierarchy:n.hierarchy||h.getHierarchyID(),
isGraphicReport:!0,isMultiFeature:!1,reportID:null}}};m.resetCache();return m})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/PortalManager":function(){define(["dojo/Deferred","dojo/on","esri/dijit/geoenrichment/when","esri/arcgis/Portal","../../../utils/CacheUtil"],function(t,p,l,k,f){return{getSignedInPortal:function(d){var c=f.get("PortalManager.portal");if(!c[d]){var a=new t;c[d]=a.promise;var e=new k.Portal(d);p(e,"load",function(){e.user?a.resolve({user:new k.PortalUser({portal:e,
credential:{userId:e.user.username,server:e.url,token:"",expires:9999999999999,creationTime:9999999999999,scope:"portal",resources:[e.portalUrl]}}),portal:e}):l(e.signIn()).then(function(b){a.resolve({user:b,portal:e})})})}return c[d]}}})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/StandardGraphicReportTemplates":function(){define(["dojo/_base/lang","../../config","dojo/i18n!esri/nls/jsapi"],function(t,p,l){function k(){return c?c:c={"3.25":{"US.census":[{id:"e2a6868f979f4e37896b631581ae4918",
alias:"demographic-summary"},{id:"88420f4a98bb45cbacacbad67e23266e",alias:"key-facts"},{id:"efb6bee0a80d4801887ec4cf73aa67fc",alias:"marketing-profile"},{id:"12867e4a89d5461fbbe3b9c6c181993a",alias:"at-risk-population"},{id:"6637be1fbddf4e948fbd09ce6a7a7888",alias:"portrait-property-flyer"},{id:"02c1124e916847249aa91b9ce48c2552",alias:"skyscraper"},{id:"3afd4c5089584b089af5b0037d74a9d1",alias:"transportation-to-work"},{id:"a696eae378974ed5a63510fa70bed011",alias:"health-care"},{id:"c931fc6ebdb440189a8bc6bd34115807",
alias:"executive-summary-call-outs"},{id:"96096c8afa4847dea936942b1f89acb5",alias:"tapestry-profile"},{id:"7a20b92b48cc4e63bf7ba956295de948",alias:"nearby-restaurants"}],"CA.census":[{id:"6c467040a8a64c33972045cf091bca5b",alias:"key-facts"}],"*.census":[{id:"11c4cec3c0d34c4aa51cd8877e2db4ef",alias:"key-facts"}]},"3.26":{"US.census":[{id:"a5161c2ca50d44429daf2bf9dbe73eb5",alias:"demographic-summary"},{id:"693269bfbf6c4851901a3c9c56550294",alias:"key-facts"},{id:"aceee34210e748ba95cb9cae21e196b9",alias:"marketing-profile"},
{id:"a7936c5ce77c4d698140db21ab1a7858",alias:"at-risk-population"},{id:"8d42e32b12154bc580af89483c208d56",alias:"portrait-property-flyer"},{id:"7be44b15e29847a383906aac5699cf00",alias:"skyscraper"},{id:"537230b385fb45d9a8d6e59265e36fbf",alias:"transportation-to-work"},{id:"89c6ff4d96de4acaa024b7a408f186b0",alias:"health-care"},{id:"0fa71e0a74294e7b8265e4cd507c7d17",alias:"executive-summary-call-outs"},{id:"f2754d21223a491798dbc0ef2c71858f",alias:"tapestry-profile"},{id:"866e6a839ee348dfae5a8ee9bdafbfc0",
alias:"nearby-restaurants"},{id:"f808dfceddd149ff85a9d8825d4e5a5f",alias:"multi-ring-comparison"}],"CA.census":[{id:"f982018306a34cc58756ce0ed78c6b0c",alias:"key-facts"},{id:"c47fa8d040364abe80d288bb606da576",alias:"multi-ring-comparison"}],"*.census":[{id:"3813621424fc4443af1dcecab65be89c",alias:"key-facts"},{id:"dd1fa81faaf94541831cae16788393ab",alias:"multi-ring-comparison"}]},"3.27":{"US.census":[{id:"3c6959a7c7c4450f9bdcc7063c9023d5",alias:"demographic-summary"},{id:"4cc0a5e007d946d5909524fcf80bc666",
alias:"key-facts"},{id:"fb9b9a501c974540a52ab6d1027a8bcc",alias:"marketing-profile"},{id:"b0f05d5926d6444da40d6bf0c5c9846e",alias:"at-risk-population"},{id:"5cf609b26ce24633a2edc58d7ebeb3fd",alias:"portrait-property-flyer"},{id:"686d7af60bcb410db051ec8465889231",alias:"skyscraper"},{id:"a79a099ab7be4c34a9b0b28831b1aa9c",alias:"transportation-to-work"},{id:"6f64bb63647246dcb5d268fc301614f6",alias:"health-care"},{id:"99e919a7e9fd4fa2b55779f0dc118da8",alias:"executive-summary-call-outs"},{id:"f32b961757f347e2976ba011ee20cb13",
alias:"tapestry-profile"},{id:"a266260cc3ec46c1b66c86f263feb8e4",alias:"nearby-restaurants"},{id:"dab290529fd44063a2d83e03a8dc49eb",alias:"multi-ring-comparison"},{id:"1499719e83754c81ae1477223c0dde39",alias:"property-details"},{id:"9c441f80f80348c8b5b747e2cf2a2ccd",alias:"employment-overview"},{id:"bb59cd9292ec47a0928900c5fb9c17b8",alias:"office-market-profile"},{id:"6f75892c4a5f4f5ba3d0edb4d8a0b13b",alias:"health-care-and-insurance"},{id:"a7524b019e1f482493e43f32ab9568a0",alias:"demographic-profile"},
{id:"45d528a3865547bb89792d4517db2e7a",alias:"commute-profile"},{id:"acf5c12b54b64550ad7f582c9c97ed28",alias:"target-market-summary"},{id:"489d923d29d44c2681171a590fb37742",alias:"coronavirus-impact-planning"}],"CA.census":[{id:"91d1e8c9d0ea482b9947dfe4bdfbe0ba",alias:"key-facts"},{id:"e05eb227df9b4ceba0ace202b1d0c1e2",alias:"multi-ring-comparison"}],"NL.NLD_4orange":[{id:"77e9461032b24e47b6c6b643cf02381f",alias:"housing-profile"},{id:"b80fd38e5f43448da530521832e0dfba",alias:"insurance-profile"},
{id:"d36520d68d8e449c9f300be0e800f698",alias:"media-profile"},{id:"bad567fdf36e48e9a5108b66c96bf0ae",alias:"personicx-segmentation"},{id:"5726fe6cad4c491a863eff64e538231c",alias:"spending-profile"}],"JP.EsriJapan":[{id:"e4bd37bb10c74798a3600ca7484846ac",alias:"base-demographic-profile"},{id:"a5d7db5138644a9e95d9af1b40b31bb9",alias:"demographic-comparison-profile"},{id:"205b45f626f84650a1ca948be4f97411",alias:"future-population-profile"},{id:"ee12a9d9a2e04fb6b93628f075719bc9",alias:"population-households-profile"},
{id:"3f857a2a8d14488abfcec383197e5a0b",alias:"consumer-spending-profile"},{id:"77369125467c4c9a8f3b9a628eda3347",alias:"base-demographic-profile-ja"},{id:"08abfdb8b8174846bd3723f094a88d86",alias:"demographic-comparison-profile-ja"},{id:"e5db2ced023d4c53a0ef9fe231d7fd15",alias:"future-population-profile-ja"},{id:"4c55f8ddb53345298e59bccfeb45e489",alias:"population-households-profile-ja"},{id:"24c8ef9a8c5d45c78791a84445eed29d",alias:"consumer-spending-profile-ja"}],"DE.DEU_Nexiga":[{id:"7aa819f9816a494ab28ab7604553f488",
alias:"base-demographic-profile"},{id:"710051b492c3481a83e01bd6bf3dd3bf",alias:"household-profile"}],"ES.ESP_AIS":[{id:"3d046bf33ce04b598afd391a0dd195c9",alias:"base-demographic-profile"}],"PR.PRI_ACS_2020":[{id:"d8b9f282034d47db808175fef56a15e2",alias:"at-risk-population"},{id:"eab5646a29324a6282db3b8ca47bf2b3",alias:"commute-profile"},{id:"ed6b5a0736aa4e04862a1a4307c608cc",alias:"demographic-summary"},{id:"a4c64a9006544751ad18ce75a401112e",alias:"health-care-and-insurance"},{id:"96d00aefd766428394d6ee6698a56591",
alias:"coronavirus-impact-planning"}],"*.census":[{id:"365d52e6bac147a68a12eee229eb9b6b",alias:"key-facts"},{id:"0f7d2ba850fa40579cae1342001d80d7",alias:"multi-ring-comparison"}]},"3.28":{"US.census":[{id:"45cb423066194f5f98c6f4ff81124db3",alias:"demographic-summary"},{id:"98d5848a944b4787b2ca038256c7878d",alias:"key-facts"},{id:"879849b937ec4eb0bef31ff2861251f2",alias:"marketing-profile"},{id:"456d7a22adc8439a93d4164ed3846243",alias:"at-risk-population"},{id:"c7e01c953c7e4b70a46ca6408c3ed000",alias:"portrait-property-flyer"},
{id:"34330a47546f412d9d09632347da11d3",alias:"skyscraper"},{id:"d349b23334454274ab2a7a20a0a9a55d",alias:"transportation-to-work"},{id:"02086fe6b92b4ff5a9a7a8d172540fc9",alias:"health-care"},{id:"5d8b51e2b27b4832b193d9932bc6f862",alias:"executive-summary-call-outs"},{id:"1b07c48d4b58423990023b43150d7e99",alias:"tapestry-profile"},{id:"c21dd81cd9064649a4bb454530f12790",alias:"nearby-restaurants"},{id:"4d8c102ca7324d09931cfe65ab3a1168",alias:"multi-area-comparison"},{id:"9ed3b5dba02d4b46a3e063c8405fd0cc",
alias:"property-details"},{id:"db0606e41ee7485f88122069e74a9b6b",alias:"employment-overview"},{id:"2a43c204c1dd4a758087372d7d7d786b",alias:"office-market-profile"},{id:"f59a3621583d44bbafa14035c2ae3947",alias:"health-care-and-insurance"},{id:"ad58f06a480c4b16aadcff789f543cca",alias:"demographic-profile"},{id:"bd7390ab31dc485489733d22475db0ed",alias:"commute-profile"},{id:"38eab30d7e6840da869fee264ca9fc40",alias:"target-market-summary"},{id:"03b420681f6a466fb14e254669583244",alias:"coronavirus-impact-planning"}],
"CA.census":[{id:"6c0a945e91d44640a08776e5bed1b297",alias:"key-facts"},{id:"7464708f379b463c8eec8aed1315989f",alias:"multi-area-comparison"},{id:"425150e63a5346659721bfc0be94511b",alias:"prizm-profile"}],"NL.NLD_4orange":[{id:"e602295128e34ea2b2b50a1aa04253bf",alias:"housing-profile"},{id:"3d0f7e63256b43a59fcf037502380685",alias:"insurance-profile"},{id:"fbc685a8837945eb82cde447acfda982",alias:"media-profile"},{id:"da063bf765e341708fad9eeec07b09c7",alias:"personicx-segmentation"},{id:"5003049227804e5cba6ad3bfdbf2dba7",
alias:"spending-profile"}],"JP.EsriJapan":[{id:"bd9685651f484488ba24c2838a6a9000",alias:"base-demographic-profile"},{id:"f36b1cc0b9d84ea4b4db1742e875ff80",alias:"demographic-comparison-profile"},{id:"99a48ec44af94af290ab0e6d691a31c7",alias:"future-population-profile"},{id:"b29af5c2e6754f61ba38ad3128668095",alias:"population-households-profile"},{id:"d568dd78527c462e83eb68cb9ca02f09",alias:"consumer-spending-profile"},{id:"a29c9143bd044dad9475e6b6ee292e46",alias:"base-demographic-profile-ja"},{id:"3bb56ea4c4bd4a2aaa124e2e3a0fad60",
alias:"demographic-comparison-profile-ja"},{id:"28ef1772bd884db5ae8885731318e503",alias:"future-population-profile-ja"},{id:"7896c8adf89e4f47ab6e0acc7759a1cd",alias:"population-households-profile-ja"},{id:"6c28a650baaa40cda26f4fb372b14d0f",alias:"consumer-spending-profile-ja"}],"DE.DEU_Nexiga":[{id:"31cf6eac0339433f8b4b5f8b62e47554",alias:"base-demographic-profile"},{id:"ccf6bc8472ae4ca8852fec621197fec3",alias:"household-profile"}],"ES.ESP_AIS":[{id:"5b60de05c1694a78b6b6ce8e10a48cd4",alias:"base-demographic-profile"}],
"PR.PRI_ACS_2020":[{id:"f1d79448541642648293f4b75d7b595a",alias:"at-risk-population"},{id:"7943a0c2f1ca4cad967bb0bfeb8af3a4",alias:"commute-profile"},{id:"ef0579311aac4d14a771389f23263445",alias:"demographic-summary"},{id:"4edd44657989475493ca92a69e80f08c",alias:"health-care-and-insurance"},{id:"c440f0c671264732b16c39f6326a5987",alias:"coronavirus-impact-planning"}],"*.census":[{id:"5886dbf41f984a0a8ec4eb4b5e231584",alias:"key-facts"},{id:"41727f86773c4cf2a37fd99446ea83fc",alias:"multi-area-comparison"}]},
"3.29":{"US.census":[{id:"368e2bf603fb42c4aa3dac0fce50cdf8",alias:"demographic-summary"},{id:"a32be4a9e51d4affa4cc1ddc812cb629",alias:"key-facts"},{id:"df985e2579004a3292c3d00615d53c39",alias:"marketing-profile"},{id:"8c56287427f84ae8b59142fc5bf1df4c",alias:"at-risk-population"},{id:"d95e40c3c93d480ab4d1d0b0adbbc5d4",alias:"portrait-property-flyer"},{id:"f989f9b820cd44d390187402447051b4",alias:"skyscraper"},{id:"0d322ac073584079a8cd6a1bda981fe7",alias:"transportation-to-work"},{id:"2b9f186425844ec390584b739ffca026",
alias:"health-care"},{id:"3e9ccce6cca64e70be19ed789de5f290",alias:"executive-summary-call-outs"},{id:"2a812da4de404ceba3969472d32c42e7",alias:"tapestry-profile"},{id:"2cc25f7b5f194012b39c90b5f9bdb8d3",alias:"nearby-restaurants"},{id:"72d1e9e4cdf94bf9a2020f8214bef9ca",alias:"multi-area-comparison"},{id:"27034d31ab124b9bbe4e63b7df2a0d90",alias:"property-details"},{id:"4a59e329df06480eaa534513eb15f465",alias:"employment-overview"},{id:"d4fe343c4d6f4bea840a715f5b033d2d",alias:"office-market-profile"},
{id:"cb2224cc9cb24ce288da729f0650ebf0",alias:"health-care-and-insurance"},{id:"484825ed241c49d58eaf718d46772051",alias:"demographic-profile"},{id:"afee0a2eb16e46cc9bc61b5d82133249",alias:"commute-profile"},{id:"1d32fabd95b446e99049aa0a04f5508e",alias:"target-market-summary"},{id:"783847f3f03f402d855985b45a8bf2df",alias:"population-trends"},{id:"83aef26e61ca41da9b269c06cc418d79",alias:"coronavirus-impact-planning"}],"CA.census":[{id:"73f1c835b1624ff0b29a6a364f7ba6dc",alias:"key-facts"},{id:"84b05aed2d2f478eb6bb1e4749811cf1",
alias:"multi-area-comparison"},{id:"ea0737e1e7554c5caf2be381c28369cc",alias:"prizm-profile"}],"NL.NLD_4orange":[{id:"3d8cb941742d4fffbaca48c65b4bd5b5",alias:"housing-profile"},{id:"f126395e7bcc494899cfc1a13a34be1f",alias:"insurance-profile"},{id:"8da901e5729e457683f2e4f7081b1bda",alias:"media-profile"},{id:"f9ba90b373a245e1b8fd14a027cf1ba5",alias:"personicx-segmentation"},{id:"81fc53b93a0c4269848ce2ae22ec19e2",alias:"spending-profile"}],"JP.EsriJapan":[{id:"79b2394ea50d44f3b4c1b4bdabed6cc2",alias:"base-demographic-profile"},
{id:"9e824283a8954639ab0c0ac237b9e14d",alias:"demographic-comparison-profile"},{id:"f5812c2f542644368c0ff34eef7b731c",alias:"future-population-profile"},{id:"b51d7dde64c34a9796418c1788a6762d",alias:"population-households-profile"},{id:"48a993403d30431784b7bf47a06e4261",alias:"consumer-spending-profile"},{id:"531c59f55de646d5a78fef6c903a678f",alias:"base-demographic-profile-ja"},{id:"cf553f2090a64662a1f9efa8a355964c",alias:"demographic-comparison-profile-ja"},{id:"321150c8ac1049fc9cd253cb12c0b0bc",
alias:"future-population-profile-ja"},{id:"e0d6dea7667c47b49f159c207fc311e9",alias:"population-households-profile-ja"},{id:"ba5f50bd617e4519a9322ec24b9cd5b1",alias:"consumer-spending-profile-ja"}],"DE.DEU_Nexiga":[{id:"60ec4173caac4f87a831447d5bf7b450",alias:"base-demographic-profile"},{id:"98d3d99aadba47a8ab53b0dcd4eebf22",alias:"household-profile"}],"ES.ESP_AIS":[{id:"3978b02fbc354acca14d4e959fa5b531",alias:"base-demographic-profile"}],"PR.PRI_ACS_2020":[{id:"e2141ddd911c4aadb403db1e858edb51",alias:"at-risk-population"},
{id:"78360505668743e0a39ac0d085612dfa",alias:"commute-profile"},{id:"f296deceb6204f85853ac85e98ba3552",alias:"demographic-summary"},{id:"8a1c4d55a77c4cf9805cec380727fc5a",alias:"health-care-and-insurance"},{id:"8dd9de996ba0491d82a2ee8f01cd55b0",alias:"coronavirus-impact-planning"}],"*.census":[{id:"5645a1d6023c4d8a9d02943ad57a7ab2",alias:"key-facts"},{id:"e29f56b6d67447e08a45d08981db987c",alias:"multi-area-comparison"}]},"3.30":{"US.census":[{id:"981382ffe90c40bbb60318b1ce338ba4",alias:"demographic-summary"},
{id:"f62dec6c9750496796fdc0619c4c107f",alias:"key-facts"},{id:"f737236a8b644f1597a4457862fa169c",alias:"marketing-profile"},{id:"4746caa1254e4d93af121ce74e9aa8d6",alias:"at-risk-population"},{id:"0bcd882dd7a34fd39ace173243534df0",alias:"portrait-property-flyer"},{id:"4a340b8e642945f6bb7a381d07fb26b6",alias:"skyscraper"},{id:"3e2a42b2d03e42cf91e9727f67273ec3",alias:"transportation-to-work"},{id:"c26e9577d48b4499a07b75215c97c394",alias:"health-care"},{id:"cbc348e601104d0c9bbe971c0297142a",alias:"executive-summary-call-outs"},
{id:"d65aaa42b9824864b40eb1a75f2e4cbd",alias:"tapestry-profile"},{id:"d6242e8dd02142bdb98b85f094d5cd9b",alias:"nearby-restaurants"},{id:"aed9e00873fa4010881daaa90e7e8d71",alias:"multi-area-comparison"},{id:"eb0e0df0856e43cdb874f96945c566ac",alias:"property-details"},{id:"e29ebec17c2c4f42a1a929c40163bb90",alias:"employment-overview"},{id:"b84d0f0f5c69461ea52ce2702f7327d6",alias:"office-market-profile"},{id:"5eba537af36e4490869917ee888bacc4",alias:"health-care-and-insurance"},{id:"afb01a3f91374f65ba4c6be9229f2c15",
alias:"demographic-profile"},{id:"8074d1bbbfed4858bb24400a0c7bf224",alias:"commute-profile"},{id:"33621d85b1df4547851c904aaa7d44d2",alias:"target-market-summary"},{id:"440170eaae5240e79abbb0bb7de22b27",alias:"population-trends"},{id:"0576deee38714cc69357de9675ab39ae",alias:"coronavirus-impact-planning"}],"CA.census":[{id:"e054928366604fc7b401dcb4a343cd4c",alias:"key-facts"},{id:"986bc92490234c2697d5771b9771166e",alias:"multi-area-comparison"},{id:"52233708250449bc84f906d86616cace",alias:"prizm-profile"}],
"NL.NLD_4orange":[{id:"22a86d0f982d4b10934f32129f2674f9",alias:"housing-profile"},{id:"9811b2babd5f4283822782867476b92c",alias:"insurance-profile"},{id:"59957cc0524344449fc6035053bb6c4a",alias:"media-profile"},{id:"2511035fed0140b8a7eb7ec7240e41eb",alias:"personicx-segmentation"},{id:"defc390648e543508be22704f1db659c",alias:"spending-profile"}],"JP.EsriJapan":[{id:"91a180442f614c4d96fb40e33aa30948",alias:"base-demographic-profile"},{id:"e7415b6c9ff74922850851eac65ddbc6",alias:"demographic-comparison-profile"},
{id:"12e9eb63e4834d3681e15196bfc64642",alias:"future-population-profile"},{id:"291cc1bc2cee455483c96f50e5916f1d",alias:"population-households-profile"},{id:"217c72b7d0534ebc81658c71917c3e15",alias:"consumer-spending-profile"},{id:"48d5baf8e5574abda8fd776219fa0eb6",alias:"base-demographic-profile-ja"},{id:"01a7a0cbacf948b3b715e4f6c55aa5f2",alias:"demographic-comparison-profile-ja"},{id:"0317412d6fb541c9b4067923e314cad3",alias:"future-population-profile-ja"},{id:"0c826ce1e2de415aa2f7af3e615b1fe8",alias:"population-households-profile-ja"},
{id:"201211e23758432db4a841dae8ba9428",alias:"consumer-spending-profile-ja"}],"DE.DEU_Nexiga":[{id:"ec6477ce41fa464fb38a360cad0d3da3",alias:"base-demographic-profile"},{id:"e53b2c145f544efaa7d7b4e802c3d747",alias:"household-profile"}],"ES.ESP_AIS":[{id:"4483924cb42043ec85486c58e61a99ef",alias:"base-demographic-profile"}],"PR.PRI_ACS_2020":[{id:"7e3b955c4d904624b4cea5d015e693a0",alias:"at-risk-population"},{id:"8927492627124fd0845de8c0dc02bd3f",alias:"commute-profile"},{id:"a308a300f3b4482ea57b4ea4a54ea5ef",
alias:"demographic-summary"},{id:"5800acd3784e4a6d88e3228e1af1164f",alias:"health-care-and-insurance"},{id:"d40e2ba95fec40c6ad68ceddde4e160b",alias:"coronavirus-impact-planning"}],"*.census":[{id:"b9d1ca815d9a4a3ab35196ec299f0917",alias:"key-facts"},{id:"6f6d601c2eef4bd1a87baa2652e7bb0b",alias:"multi-area-comparison"}]},"3.31":{"US.census":[{id:"784d0b69c02c4cac862b89b0e44cd8fb",alias:"demographic-summary"},{id:"f1bb3a222fab470dbb96a79a51496b2b",alias:"key-facts"},{id:"1780d5b264734757b86e4655d779b213",
alias:"at-risk-population"},{id:"8c34121585894e91a50c493c360912f0",alias:"skyscraper"},{id:"1c314d9d06844d44b408caba6099b56b",alias:"executive-summary-call-outs"},{id:"4ee838a250084c9bad84f094895c793c",alias:"tapestry-profile"},{id:"dfba27ac04694513aee257cdd185c8c2",alias:"nearby-restaurants"},{id:"d7cfb836282747199cf0febea42627cc",alias:"multi-area-comparison"},{id:"3a34213116a340a0bbd0d463025444a2",alias:"property-details"},{id:"b277b8572469425fa54c5506c3dbcdf3",alias:"employment-overview"},{id:"eaf35c41f5714f48a1aa61fcbd6ae05f",
alias:"office-market-profile"},{id:"688f86931cc345f796154717dc6d0a15",alias:"health-care-and-insurance"},{id:"cb4edb43a1ae473ca651388b5c3fa54f",alias:"demographic-profile"},{id:"49224c10d4ac4c7ab0f8e016165ce235",alias:"commute-profile"},{id:"db67445e4dfa4b6c8c1e5fd30b229c92",alias:"target-market-summary"},{id:"6c9360bfec9041ddba0f03440cb446ca",alias:"population-trends"},{id:"2ae07567c78847abacb14773ffe9dede",alias:"coronavirus-impact-planning"}],"CA.census":[{id:"0704defc6960439ea5b9c484af15eb4c",
alias:"key-facts"},{id:"ee01fe05db964878bc6fb627e55dc9b1",alias:"multi-area-comparison"},{id:"a426bb6d944a46658640aee2ba480866",alias:"prizm-profile"}],"NL.NLD_4orange":[{id:"710037ca0f024ec5abbe4cf9fecad23f",alias:"housing-profile"},{id:"83bc643ea48344c892a8e9636e3677dd",alias:"insurance-profile"},{id:"53f63e3a9e854a8fa5e2c0222df6f848",alias:"media-profile"},{id:"ca9d66bf4bf940918129d0d5c97e0b50",alias:"personicx-segmentation"},{id:"ab19f90750fd469aa702f961b12eaee8",alias:"spending-profile"}],"JP.EsriJapan":[{id:"7f7c37e8f1fa4ab18b88368c12058eff",
alias:"base-demographic-profile"},{id:"25a71f196b7e4db182be346264b442dd",alias:"demographic-comparison-profile"},{id:"e1075eaada7744a59ecabfc445dcd877",alias:"future-population-profile"},{id:"8e2746d993584a7d94d0e66ca6dabdaa",alias:"population-households-profile"},{id:"bc9b91d7ae2c41a5bdece1d322ef6b88",alias:"consumer-spending-profile"},{id:"4f4736d5b2f842faaee83c57417c56b6",alias:"base-demographic-profile-ja"},{id:"bc400448bf3347619349cb7d4ccb3d87",alias:"demographic-comparison-profile-ja"},{id:"00ad3ad05e384d7ea764b356a950356d",
alias:"future-population-profile-ja"},{id:"db94d6af598f48778c4471f9fa0d6e4f",alias:"population-households-profile-ja"},{id:"c5f602a9d6714dd6bd6a2b720eced874",alias:"consumer-spending-profile-ja"}],"DE.DEU_Nexiga":[{id:"b0cd9df36d0747ecac2bc34f055f5583",alias:"base-demographic-profile"},{id:"1751ab1998db4e6fb79f484069605cfd",alias:"household-profile"}],"ES.ESP_AIS":[{id:"3d17356c9a5549dbaa4096365e7eb703",alias:"base-demographic-profile"}],"PR.PRI_ACS_2020":[{id:"7923818907d248ff8dcd7a5941e89b57",alias:"at-risk-population"},
{id:"c0b28d710379405eac4ecb6a64d817b4",alias:"commute-profile"},{id:"4b64ec164a3d4830ae8a4cedf067f55a",alias:"demographic-summary"},{id:"5e47986d4c4644a29a28c92c077919f2",alias:"health-care-and-insurance"},{id:"11c43309216b4d4a8fbd9a03cbcc22ec",alias:"coronavirus-impact-planning"}],"*.census":[{id:"f2d46b136acc46e2a2220388ddc43be0",alias:"key-facts"},{id:"228155af0095410c961cc82f33cdcf49",alias:"multi-area-comparison"}]},"3.32":{"US.census":[{id:"2ff58abf55554be4b19006c1e607afaa",alias:"demographic-summary"},
{id:"a19b321e3adc441886e706bb9704005c",alias:"key-facts"},{id:"f1e3b0c93e1d44e299eb0b752f93b7db",alias:"at-risk-population"},{id:"3bbc96da4ca142c7b80b082b0f986110",alias:"skyscraper"},{id:"1302184a2f584b86943b6c51d40acace",alias:"executive-summary-call-outs"},{id:"58035dcee74b4875bcd951b9174155d1",alias:"tapestry-profile"},{id:"4da5867dfda046ddb4b82ab01b7cb568",alias:"nearby-restaurants"},{id:"4498b9e35665480cafe3985f788ca61d",alias:"multi-area-comparison"},{id:"83a11d5f38f84e709ff1e24786e963b4",
alias:"property-details"},{id:"0a0354d2d0d842d8bd8e05d40545fc5b",alias:"employment-overview"},{id:"400924aa9d5f4bee8b9dd0c0af21dfbb",alias:"office-market-profile"},{id:"0a502ea9be8a43fdb6cd2fb5ff7503bc",alias:"health-care-and-insurance"},{id:"6147ac21718149a69ce15831f12181ed",alias:"demographic-profile"},{id:"4cdaddd947064ca690ebc06eec06ea57",alias:"commute-profile"},{id:"a8fe08a9c5114260a2a6f7ca436d36f6",alias:"target-market-summary"},{id:"34a17e1fceb646228e94089ec5e0890f",alias:"population-trends"},
{id:"eb5d984d78364a6596cd97e0bf7901a5",alias:"coronavirus-impact-planning"}],"CA.census":[{id:"5f6e17f3729145959fb38ed2cd508970",alias:"key-facts"},{id:"c86709cbd72043708e09e4a641adfbd0",alias:"multi-area-comparison"},{id:"bd9e3a17678843d4b1fa0716af91c231",alias:"prizm-profile"}],"NL.NLD_4orange":[{id:"470686f333d140c7b516294465eea037",alias:"housing-profile"},{id:"ab11f2f11ea3439197769a8189451bea",alias:"insurance-profile"},{id:"f0e6736d0f364d4b88ea613746e57c81",alias:"media-profile"},{id:"bfe0814bc0604a8faa48d01b026ef7a5",
alias:"personicx-segmentation"},{id:"bd1d4c7be5ad41ae909267b5e9c5f2dc",alias:"spending-profile"}],"JP.EsriJapan":[{id:"b9dcbb9f31fd4be7bd96a2f89ce66a1c",alias:"base-demographic-profile"},{id:"830ddad066c14c0dad27367a1b2ef132",alias:"demographic-comparison-profile"},{id:"7574f89d591f432da6ffdb94dcfdac52",alias:"future-population-profile"},{id:"ec8785d4c9cb446394e07fa7dd8451fd",alias:"population-households-profile"},{id:"9ac85d73187548b2bb0d0b4a73f88199",alias:"consumer-spending-profile"},{id:"e99eee823684452fbe564fe42dac9535",
alias:"base-demographic-profile-ja"},{id:"8598d6a8550d46aebd3fd598ceaefae7",alias:"demographic-comparison-profile-ja"},{id:"fdf81ddffb374e3f898006ffa59e259e",alias:"future-population-profile-ja"},{id:"f2468c2fef314427bd0865b460ef554f",alias:"population-households-profile-ja"},{id:"a96f28fb67024109b7c33161f3c9b308",alias:"consumer-spending-profile-ja"}],"DE.DEU_Nexiga":[{id:"40a5ba79d1204e78ac6deaa633ccd59b",alias:"base-demographic-profile"},{id:"2e647098c613476bbd92b1e07331cb86",alias:"household-profile"}],
"ES.ESP_AIS":[{id:"7d82cae4b3fc4575bab56ec82f51c368",alias:"base-demographic-profile"}],"PR.PRI_ACS_2020":[{id:"aa65005b75ba4e158afe63baa4bc5fe2",alias:"at-risk-population"},{id:"292a269a813e4d7797baf88a76c11a8c",alias:"commute-profile"},{id:"b1d50628f2484689b9e39d49fc2e16a0",alias:"demographic-summary"},{id:"64839b7a81be45e287e805afc145652e",alias:"health-care-and-insurance"},{id:"44be3c42b70c4aee840fdeb4656b7922",alias:"coronavirus-impact-planning"}],"*.census":[{id:"ce57630d5cc24759809dd54bc1f82c91",
alias:"key-facts"},{id:"c48ee0f58c8645bf8d689eb0db2d2936",alias:"multi-area-comparison"}]},"3.33":{"US.census":[{id:"55689c3ee7c1490e83accae002a8d164",alias:"demographic-summary"},{id:"173e40bebc9d426a8e4680242acafea4",alias:"key-facts"},{id:"218eba57314e476ba16d1d5d40bb0182",alias:"at-risk-population"},{id:"3d470c82d8664e34b5026675596a7a87",alias:"skyscraper"},{id:"b9381f481f9f417f9647e0a2c8686979",alias:"executive-summary-call-outs"},{id:"d2800b578d1c4dd38ac95ce36882d881",alias:"tapestry-profile"},
{id:"d9d8109c537943a78a24d65110291b43",alias:"nearby-restaurants"},{id:"2e835e58629a4f1e8192a729792b638f",alias:"multi-area-comparison"},{id:"6f3c32ed18834a4ea34b200e32ad7c33",alias:"property-details"},{id:"6b1267be3fcb401bbcb49afd221713cf",alias:"employment-overview"},{id:"67e6efc15cb142c2a7cc30a48a59c769",alias:"office-market-profile"},{id:"9d8b447adc634228b24deb315107c0f0",alias:"health-care-and-insurance"},{id:"e45f96db738140869981b7443b6e2658",alias:"demographic-profile"},{id:"88d896eada3340dc8f8f1a2406bd48f9",
alias:"commute-profile"},{id:"61492956f89a43ee86d245fca92858a2",alias:"target-market-summary"},{id:"91de69dede414856892dfdd94d2c4bab",alias:"population-trends"},{id:"ee9c6fdc902e4ea09509e4d1bf1582b5",alias:"coronavirus-impact-planning"}],"CA.census":[{id:"dfb663da790248fe89504c662c42aae3",alias:"key-facts"},{id:"9873fcafe7194fcf9dffa8bbb8e001a1",alias:"multi-area-comparison"},{id:"4766ad797ef84968be4b4d0d54b98416",alias:"prizm-profile"}],"NL.NLD_4orange":[{id:"2212ff30c72143e6bcd9b8f26b01c47f",alias:"housing-profile"},
{id:"c5efcef364ac4d8f82a6d54010ff75c7",alias:"insurance-profile"},{id:"e00894c000a94c42aefce551fe4e48c2",alias:"media-profile"},{id:"9d1da1c80e93407cb94589cee43a0f5a",alias:"personicx-segmentation"},{id:"578199262aa646bf8b0713f3f2160af6",alias:"spending-profile"}],"JP.EsriJapan":[{id:"00bd747c0e48477d8df692848560a8a2",alias:"base-demographic-profile"},{id:"8ac4bd99dd1848dc98967419ab8d299c",alias:"demographic-comparison-profile"},{id:"88f94b5e3b6d414d913957b46e9f8394",alias:"future-population-profile"},
{id:"41864cea64f3432a90006eb9a1f97608",alias:"population-households-profile"},{id:"44333ddcda38473d9a24010ed387eda7",alias:"consumer-spending-profile"},{id:"c35ebbeffb3b47fc9bbe3fc6283aaa7b",alias:"base-demographic-profile-ja"},{id:"6c8a565d12954927b83daaad81409a25",alias:"demographic-comparison-profile-ja"},{id:"fcba5d5750514c9c93b2cb5222609d98",alias:"future-population-profile-ja"},{id:"7ad858351b6b4268b791b6cc24bf4e0f",alias:"population-households-profile-ja"},{id:"7d94fec6df6b4bff9ad14f5b711f18c6",
alias:"consumer-spending-profile-ja"}],"DE.DEU_Nexiga":[{id:"571f323738c44d5a8b85d6d1e78d9c52",alias:"base-demographic-profile"},{id:"ef7624e051b6407488d8ad59b7979fc4",alias:"household-profile"}],"ES.ESP_AIS":[{id:"46e9329c7b2042fa84dfc1444f7decc0",alias:"base-demographic-profile"}],"PR.PRI_ACS_2020":[{id:"0cb7ba4d407640ff967829ae7dd39396",alias:"at-risk-population"},{id:"7598826f28124abf9134801a607d56ce",alias:"commute-profile"},{id:"848c5cc8a4284065a0055b047a106adf",alias:"demographic-summary"},
{id:"ecfc8db522004ea6848667e43589efd9",alias:"health-care-and-insurance"},{id:"4685d4c6c51e4ef392bdab89c0af8979",alias:"coronavirus-impact-planning"}],"*.census":[{id:"e4d3d1675d0044089f98a0f85ea16c8b",alias:"key-facts"},{id:"33b6e27f43644811b8a58f15c0832a67",alias:"multi-area-comparison"}]},"3.34":{"US.census":[{id:"13cd4abfa97e43b9a5f9d4ddcb43f492",alias:"demographic-summary"},{id:"8861429ac06948f79cdcaaadb39d597f",alias:"key-facts"},{id:"1056cbef133f49a18409a192fbdc221a",alias:"at-risk-population"},
{id:"25145b3ca4284dcc999c8d05182588cd",alias:"skyscraper"},{id:"7db2109b9f844be48f3e9154e992699f",alias:"executive-summary-call-outs"},{id:"f43c00c7b10241c097fb71fd5acf1ec2",alias:"tapestry-profile"},{id:"5fb04926a70345c18d6e21d9972ea347",alias:"nearby-restaurants"},{id:"fdd0406e7815402cbf70716c68f4f7d6",alias:"multi-area-comparison"},{id:"7b716975146743b3a56762befaca71ad",alias:"property-details"},{id:"2c0be4fe4d7245e39b4afd9b8eb607a9",alias:"employment-overview"},{id:"c7f42910bc4b49209835e333c6078e71",
alias:"office-market-profile"},{id:"7517a7a0409d42748c7ad94f81322bc2",alias:"health-care-and-insurance"},{id:"9919270d8b4846cb86761103def73e76",alias:"demographic-profile"},{id:"0bb0cc183ae145febbf3585518eeaae6",alias:"commute-profile"},{id:"27853eda823e4574b0666d533ba39061",alias:"target-market-summary"},{id:"1df7c5b56b6e431982ef2da037c081c8",alias:"population-trends"},{id:"aaf4cc69e58f43ea87a0c1e493431dd8",alias:"coronavirus-impact-planning"}],"CA.census":[{id:"3a2fb82b034d48bbb9474f8c158c32a8",
alias:"key-facts"},{id:"100f5b4d3cca46b38fd651e39cce97b1",alias:"multi-area-comparison"},{id:"41f7b7cfe9cb490593ace88aa627c6ca",alias:"prizm-profile"}],"NL.NLD_4orange":[{id:"f5b0ec07181f4b58a01ee0ca1df8201a",alias:"housing-profile"},{id:"a5e0b9b228da4ba5baaa5811c57f6552",alias:"insurance-profile"},{id:"5d24250e3cc14b0db3b3f9884462efbf",alias:"media-profile"},{id:"f216c6574ae0453c951e66ee8fb6b20f",alias:"personicx-segmentation"},{id:"267c816948334e72ab9ed94253790e22",alias:"spending-profile"}],"JP.EsriJapan":[{id:"434e01eacc8e432c8400f5a5aef6f3e4",
alias:"base-demographic-profile"},{id:"c44be13f1f8e412288e58048136681d6",alias:"demographic-comparison-profile"},{id:"35c0c12ce88645e7b7cbc0ffe73af85d",alias:"future-population-profile"},{id:"e87fb84cffaa49dba14b104d5b994aa5",alias:"population-households-profile"},{id:"31a4988db08c41d6b9ce755b21ea0b26",alias:"consumer-spending-profile"},{id:"bf9f0203a4c14d03823beadb3f7ac043",alias:"base-demographic-profile-ja"},{id:"fdbe0d4286ab419981bc80a96b46bdb1",alias:"demographic-comparison-profile-ja"},{id:"7541a90960e345308f73e99e4da5c0a8",
alias:"future-population-profile-ja"},{id:"f17ecec5cb8d4baeab7af68e1e9ce683",alias:"population-households-profile-ja"},{id:"ddaf4fb6c09447f6beaf4218139bfa20",alias:"consumer-spending-profile-ja"}],"DE.DEU_Nexiga":[{id:"80c74804e91440f08695ba11456f96af",alias:"base-demographic-profile"},{id:"eb49e7ee98f04e1e914a4ce29bbfc7d3",alias:"household-profile"}],"ES.ESP_AIS":[{id:"2e82d587530548569ad792556044342b",alias:"base-demographic-profile"}],"PR.PRI_ACS_2020":[{id:"b473aa30469e4e2eabcca3da3f306e94",alias:"at-risk-population"},
{id:"4e91594fb4fe4bf3be24380408f1b0c6",alias:"commute-profile"},{id:"321c818398684510ac62e3403ad6628f",alias:"demographic-summary"},{id:"1c3d60191b12460ca9a23dfcbce0c1db",alias:"health-care-and-insurance"},{id:"5e6d78b1c4aa4168b7a3af5751d92261",alias:"coronavirus-impact-planning"}],"*.census":[{id:"530b6aa054664166a7a3ab5f1e82e19b",alias:"key-facts"},{id:"4b8ddef8e8f0406ea9b0a6c3d062186a",alias:"multi-area-comparison"}]},"3.35":{"US.census":[{id:"167425f5e12d421eb5784cd3681eab45",alias:"demographic-summary"},
{id:"a1ab8710e1104385941825fe772d58fa",alias:"key-facts"},{id:"b3103dee1c994fa0916bd2b5c8ad2cab",alias:"at-risk-population"},{id:"0d261009a37247b4913266bc7093fedb",alias:"skyscraper"},{id:"2e7b01260b7840c196f30be52bf0b57e",alias:"executive-summary-call-outs"},{id:"f47aebc28aa64c7f924053a8c1ee16bd",alias:"tapestry-profile"},{id:"36e6e303ebd943d4aa55604ba7dc0bc0",alias:"nearby-restaurants"},{id:"2f6307fad95f43b193ac74f236fa82d3",alias:"multi-area-comparison"},{id:"1ac99acae7cf44c182727aca1387acc9",
alias:"property-details"},{id:"33cb09681a2147a5a07ae801596568c3",alias:"employment-overview"},{id:"8abaef7ba033448693dc6e6db55667c7",alias:"office-market-profile"},{id:"d29fcd15f66f46edad86499675b0ec03",alias:"health-care-and-insurance"},{id:"e631e96f389b4075bc249c01d7f4d1b7",alias:"demographic-profile"},{id:"f97c7b4c8bf84390ad5a5807fb6ca417",alias:"commute-profile"},{id:"c9aef7db1d56495eaf0765e1f3a2d87d",alias:"target-market-summary"},{id:"b0f42ee46e80440cbb567a9a754ba7d4",alias:"population-trends"},
{id:"ac36af7d86b74071a1cff5dc11f52ae8",alias:"coronavirus-impact-planning"}],"CA.census":[{id:"e1b06b3915bc4e9ba702a604931390f2",alias:"key-facts"},{id:"aabeb118af9d4d0ba61177b82ff20e6c",alias:"multi-area-comparison"},{id:"d91115c92b96414b8bebd5d5bee75feb",alias:"prizm-profile"}],"NL.NLD_4orange":[{id:"dc94c7a6946a49b5a2f3997a1d751b5d",alias:"housing-profile"},{id:"caaaf49e014840a2a7b2497a970fabc0",alias:"insurance-profile"},{id:"67e0ad06a076477d81f853755fe34fd9",alias:"media-profile"},{id:"2b777fe129f149e9830fa5659d83d164",
alias:"personicx-segmentation"},{id:"109338143a024b8eb70a1afcad567363",alias:"spending-profile"}],"JP.EsriJapan":[{id:"1f22c748ad5441a197c4c35ec3b88c6e",alias:"base-demographic-profile"},{id:"3321fc47d60b465bbf1f8312a2656c9d",alias:"demographic-comparison-profile"},{id:"44f656e0dd634f248501030bec1e4e56",alias:"future-population-profile"},{id:"10bee112cd5c452db06145cc97739272",alias:"population-households-profile"},{id:"9d50b931700f4d7e8bfff04362baf2b7",alias:"consumer-spending-profile"},{id:"6f15e753e76741e5b11443d987f9e31b",
alias:"base-demographic-profile-ja"},{id:"c89ff30c389b4af28c5e95d56b8b8a2b",alias:"demographic-comparison-profile-ja"},{id:"82cf4d90d4444a9fab0db12c38398ddb",alias:"future-population-profile-ja"},{id:"de0f4294ae8548f8852d3cfc44689262",alias:"population-households-profile-ja"},{id:"aa60be09466d494dab06b7fd3f227838",alias:"consumer-spending-profile-ja"}],"DE.DEU_Nexiga":[{id:"f65d4ab5669541eb82f8cfa44892076d",alias:"base-demographic-profile"},{id:"8f24b985758840bc865eb510c3a096c4",alias:"household-profile"}],
"ES.ESP_AIS":[{id:"19973b06ff48411cbe8da96db2201889",alias:"base-demographic-profile"}],"PR.PRI_ACS_2020":[{id:"08263fc5aa27402284ad1dd80de03ffe",alias:"at-risk-population"},{id:"1386ceb53e0741428b78182d5ad1295c",alias:"commute-profile"},{id:"52ca001ddcf54d4eab0bbc476a962486",alias:"demographic-summary"},{id:"79480fbe1f5048b69bc0611a2828d74b",alias:"health-care-and-insurance"},{id:"4a9c5dbf1ee6480bbed9a48bdb8aa2ed",alias:"coronavirus-impact-planning"}],"TH.EsriThailand":[{id:"1b202dbb81d7436c91dbd98f7f16da74",
alias:"demographic-by-gender"},{id:"a7575375c72244e3819a694bf6dcbd52",alias:"key-facts-circle"},{id:"d446734d5e3e4d13a4c1aebdd9497793",alias:"population-profile"}],"*.census":[{id:"de0d25e45d4549439c440d9f893afe18",alias:"key-facts"},{id:"19f9971696f74bae8c8fd383a61abac3",alias:"multi-area-comparison"}]}}}function f(b){var g=k();b=b||p.jsapiVersion;b=g[b]||g["3.35"];g={};for(var h in b){var m={};b[h].forEach(function(q){m[q.alias]=q.id});var n=h.substr(0,h.indexOf("."));g[n]=m}return g}function d(b,
g){g=f(g);return t.mixin({},g["*"],g[b])}l=l.geoenrichment.dijit.ReportPlayer.StandardTemplates;var c,a={"demographic-summary":l.demographicSummary,"key-facts":l.keyFacts,"marketing-profile":l.marketingProfile,"at-risk-population":l.atRiskPopulation,"portrait-property-flyer":l.portraitPropertyFlyer,skyscraper:l.skyscraper,"transportation-to-work":l.transportationToWork,"health-care":l.healthCare,"executive-summary-call-outs":l.executiveSummaryCallOuts,"tapestry-profile":l.tapestryProfile,"nearby-restaurants":l.nearbyRestaurants,
"multi-area-comparison":l.multiAreaComparison,"property-details":l.propertyDetails,"employment-overview":l.employmentOverview,"office-market-profile":l.officeMarketProfile,"health-care-and-insurance":l.healthCareAndInsuranceStatistics,"demographic-profile":l.demographicProfile,"commute-profile":l.commuteProfile,"target-market-summary":l.targetMarketSummary,"population-trends":l.populationTrends,"coronavirus-impact-planning":l.coronavirusImpactPlanning,"prizm-profile":l.prizmProfile,"housing-profile":l.housingProfile,
"insurance-profile":l.insuranceProfile,"media-profile":l.mediaProfile,"personicx-segmentation":l.personicxSegmentation,"spending-profile":l.spendingProfile,"base-demographic-profile":l.baseDemographicProfile,"demographic-comparison-profile":l.demographicComparisonProfile,"future-population-profile":l.futurePopulationProfile,"population-households-profile":l.populationHouseholdsProfile,"consumer-spending-profile":l.consumerSpendingProfile,"base-demographic-profile-ja":"\u57fa\u672c\u7d71\u8a08\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb",
"demographic-comparison-profile-ja":"\u4eba\u53e3\u7d71\u8a08\u6bd4\u8f03\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb","future-population-profile-ja":"\u5c06\u6765\u4eba\u53e3\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb","population-households-profile-ja":"\u4eba\u53e3\u30fb\u4e16\u5e2f\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb","consumer-spending-profile-ja":"\u6d88\u8cbb\u984d\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb","household-profile":l.householdProfile},e={portalUrl:"http://www.arcgis.com",user:"esri_reports",query:"http://www.arcgis.com/home/search.html?q\x3downer%3Aesri_reports",
aliasToID:function(b,g,h){return d(b,h)[g]},aliasToLabel:function(b){return a[b]},getAliases:function(b,g){b=Object.keys(d(b,g));b.sort(function(h,m){return h.localeCompare(m)});return b},getListOptions:function(b,g){return e.getAliases(b,g).map(function(h){return{value:e.aliasToID(b,h,g),label:a[h]}})},getSupportedCountries:function(b){return Object.keys(f(b)).map(function(g){return"*"===g?"AU":g})},getLibrary:function(){var b=t.clone(k()),g;for(g in b){var h=b[g];h["AU.census"]=h["*.census"];delete h["*.census"]}return b}};
return e})},"esri/dijit/geoenrichment/utils/PortalQueryUtil":function(){define([],function(){var t={combineQueryString:function(p){var l="";p.type&&(l+='type:"'+p.type+'"');p.typeKeywords?l=Array.isArray(p.typeKeywords[0])?l+(" typekeywords:("+p.typeKeywords.map(function(k){return t.combineTypeKeywords(k)}).join(" OR ")+")"):l+(" typekeywords:"+t.combineTypeKeywords(p.typeKeywords,p.typeKeywordsNot)):p.typeKeywordsNot&&(l+=" typekeywords:"+t.combineTypeKeywords(null,p.typeKeywordsNot));p.owner&&(l+=
" owner:"+p.owner);p.isShared&&(l+=p.orgId?" ((orgid:"+p.orgId+' AND access:"public") OR access:"shared" OR access:"org")':' (access:"shared" OR access:"org")');p.ownerNot&&(l+=" NOT owner:"+p.ownerNot);return l},combineTypeKeywords:function(p,l){p=p?t._combineArray(p):"";return l?(l=t._combineArray(l," OR "),"("+p+" NOT "+l+")"):p},_combineArray:function(p,l){var k="string"===typeof p?p:1===p.length?p[0]:null;return k?"("===k.charAt(0)||'"'===k.charAt(0)?k:'"'+k+'"':"("+p.map(function(f){return'"'+
f+'"'}).join(l||" ")+")"}};return t})},"esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/templateJsonUtils/TemplateJsonAnalyzer":function(){define(["./query/TemplateJsonQueryUtil"],function(t){return{collectVariablesStats:function(p){var l={};t.processTemplateFieldInfos(p,function(k){k.infographicJson&&k.infographicJson.variables?k.infographicJson.variables.forEach(function(f){l[f]=1}):k.hasVariable&&(k.usedMapTos?k.usedMapTos.forEach(function(f){l[f]=1}):k.fullName&&(l[k.fullName]=1))});
return l},collectMapItemIdsAndNames:function(p){var l={},k={};t.calcNumberOfMaps(p,function(c){c.defaultBasemapId&&(l[c.defaultBasemapId]=1);c.defaultBasemapName&&(k[c.defaultBasemapName]=1);c.webMapId&&(l[c.webMapId]=1);c.webMapName&&(k[c.webMapName]=1)});p=[];for(var f in l)p.push(f);var d=[];for(f in k)d.push(f);return{itemIds:p,mapNames:d}}}})},"esri/dijit/geoenrichment/ReportPlayer/core/infographics/utils/InfographicJsonUtil":function(){define(["esri/dijit/geoenrichment/config","esri/dijit/geoenrichment/utils/ArrayUtil"],
function(t,p){var l={getDefaultLevels:function(){var k=t.levels.slice();k.push(t.highestLevel);return k},getLevels:function(k){k=k.levels&&k.levels.length?k.levels:l.getDefaultLevels();return p.removeDuplicates(k)},getSubLevels:function(k){k=l.getLevels(k);k.pop();return k},getHighestLevel:function(k){k=l.getLevels(k);return k[k.length-1]},setLevels:function(k,f){f=p.removeDuplicates(f||[]);k.levels=f.length?f:l.getDefaultLevels()},getDataDrilling:function(k,f){"string"!==typeof f&&(f=(f=k.variableTables&&
k.variableTables[f])&&f.variable.fieldInfo&&f.variable.fieldInfo.templateName);return k.dataDrilling&&k.dataDrilling[f]},setDataDrilling:function(k,f,d){f&&(k.dataDrilling=k.dataDrilling||{},d?k.dataDrilling[f]=d:delete k.dataDrilling[f])},validateDataDrilling:function(k){var f=k.dataDrilling;if(f){var d={};k.variableTables.forEach(function(c){c.variable&&c.variable.fieldInfo&&c.variable.fieldInfo.templateName&&(d[c.variable.fieldInfo.templateName]=!0)});Object.keys(f).forEach(function(c){d[c]||delete f[c]})}},
analyzeVariables:function(k){k=k.fieldInfos?k.fieldInfos.map(function(a){return a.fullName}):k.variables;if(1===k.length&&-1!==k[0].indexOf(".*"))return{dataCollectionID:k[0].substr(0,k[0].indexOf("."))};var f={},d,c;k.forEach(function(a,e){f[a.substr(0,a.indexOf("."))]=1;d=a.substr(a.indexOf(".")+1);c=a});return{dataCollectionID:1===Object.keys(f).length?Object.keys(f)[0]:null,variableID:1===k.length?d:null,fullName:1===k.length?c:null}}};return l})},"esri/dijit/geoenrichment/config":function(){define(["esri/urlUtils"],
function(t){t=t.getProtocolForWebResource();return{portalUrl:t+"//arcgis.com",server:t+"//geoenrich.arcgis.com/arcgis/rest/services/World/GeoenrichmentServer",levels:["Admin3","Admin2"],highestLevel:"Admin1",locatorUrl:t+"//geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer",addressFormat:"${Address}, ${City}, ${Region} ${Postal}"}})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/areas/AreasPreprocessor":function(){define("dojo/_base/lang esri/dijit/geoenrichment/when esri/dijit/geoenrichment/promise/all dojo/string esri/graphic esri/symbols/jsonUtils ./FeatureNameUtil ../tasks/EnrichAreasTask esri/dijit/geoenrichment/utils/GeometryUtil esri/dijit/geoenrichment/ReportPlayer/config dojo/i18n!esri/nls/jsapi".split(" "),
function(t,p,l,k,f,d,c,a,e,b,g){var h={preprocessAreas:function(r,u){u=u||{};r.analysisAreas=r.analysisAreas.filter(function(v){return v.feature&&v.feature.geometry&&"polygon"===v.feature.geometry.type||v.geographies&&v.geographies.length||v.buffer});-1!==u.analysisAreasLimit&&(u.analysisAreasLimit=u.analysisAreasLimit||20,r.analysisAreas.length=Math.min(r.analysisAreas.length,u.analysisAreasLimit));h.provideAreasIndexes(r);r.analysisAreas.forEach(function(v){v.feature&&!v.feature.attributes&&(v.feature.attributes=
{})});r.analysisAreas.forEach(function(v){v.name=v.name||v.shortName;if(!v.name&&v.feature){var w=c.guessFeatureName(v.feature);w&&(v.name=v.shortName=w)}});return p(m.generalize(r.analysisAreas),function(){return l([n.provideGeographyFeatures(r),q.provideBufferFeatures(r)])})},provideAreasIndexes:function(r){var u=r.combinedAreasInfo.groups,v=u&&u.length;r.analysisAreas.forEach(function(w,A){w.index=A;u&&(u.forEach(function(E,F){-1!==E.indexes.indexOf(A)&&(w.isGrouped=!0,w.groupIndex=F)}),"number"!==
typeof w.groupIndex&&(w.isGrouped=!1,w.groupIndex=v++))})},removeGroupInfo:function(r){r.forEach(function(u){delete u.isGrouped;delete u.groupIndex})}},m={generalize:function(r){var u=[],v=[];r.forEach(function(w,A){!w.feature||w.geographies&&w.geographies.length||(u.push(w.feature),v.push(A))});return p(function(w){function A(y){var z=0;y.geometry.rings.forEach(function(H){z+=H.length});return z}var E=e.needGeneralizeGeometry(w,b.generalization.factor,b.generalization.maxVerticesInAllFeatures,b.generalization.numVerticesPerFeature);
if(E){var F=!0;var D=[];w=w.map(function(y){D.push(A(y));return new f(y.geometry,y.symbol,y.attributes)});var B=e.generalizeGeometry(w,E,b.generalization.numVerticesPerFeature,!0)}return p(B,function(){F&&(console.log("Generalize features:"),w.forEach(function(y,z){console.log("#"+z+" "+D[z]+" \x3d\x3e "+A(y))}));return w})}(u),function(w){v.forEach(function(A){r[A].feature=w.shift()})})}},n={provideGeographyFeatures:function(r){return l(r.analysisAreas.map(function(u){if(!u.feature&&u.geographies&&
u.geographies.length)return(new a).createFeatureForGeographies(u.geographies,{countryID:r.countryID,hierarchy:r.hierarchy}).then(function(v){u.feature=v;u.name=u.name||u.feature.attributes.StdGeographyName;u.description=u.description||g.geoenrichment.dijit.ReportPlayer.ReportPlayer.geography;u.address=u.address||u.name;u.geographies[0].attributes&&t.mixin(u.feature.attributes,u.geographies[0].attributes);if(v=u.geographies[0].symbol)v=v.toJson?v:d.fromJson(v),u.feature.setSymbol(v)})}))}},q={provideBufferFeatures:function(r){var u=
this,v=r.analysisAreas.filter(function(A){return!A.feature&&A.buffer}),w=v.map(function(A){return A.buffer});return(new a).createFeaturesForBuffers(w,{countryID:r.countryID}).then(function(A){A.forEach(function(E,F){F=v[F];F.feature=E;u._applyBufferParamsToArea(F)})})},_applyBufferParamsToArea:function(r){var u=r.buffer;if(!r.name){var v=g.geoenrichment.dijit.bufferTitle.pointRing;v[u.units]&&(r.name=k.substitute(v[u.units],{radius:u.radius}))}r.description=r.description||"Ring";u.attributes&&t.mixin(r.feature.attributes,
u.attributes);if(u=u.symbol)u=u.toJson?u:d.fromJson(u),r.feature.setSymbol(u)}};return h})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/areas/FeatureNameUtil":function(){define([],function(){return{_nameScores:[/^name$/i,/^title$/i,/(^name)|(name$)/i,/(^title)|(title$)/i],guessFeatureName:function(t){var p=Object.keys(t.attributes),l;this._nameScores.some(function(k){return p.some(function(f){if(k.test(f))return l=f,!0})});return t.attributes[l]||""}}})},"esri/dijit/geoenrichment/utils/GeometryUtil":function(){define("dojo/_base/lang esri/dijit/geoenrichment/Deferred esri/geometry/Polygon esri/workers/WorkerClient ./PolygonUtil ./GeometryUtil_base".split(" "),
function(t,p,l,k,f,d){function c(e,b,g){var h=new p,m=new k("./mutableWorker",function(){m.importScripts(["../dijit/geoenrichment/utils/GeometryUtil_worker","../dijit/geoenrichment/utils/GeometryUtil_base"]).then(function(){m.postMessage({rings:e,maxAllowableOffset:g}).then(function(n){var q=n.rings;b.forEach(function(r){for(var u=r.source.length=0;u<r.count;u++)r.source.push(q.shift())});h.resolve();m.terminate()})})},!0);return h.promise}var a=t.mixin({},d);a.calculateMaxAllowableOffset=function(e,
b,g){"number"!==typeof b&&(b=1);b*=e.extent.getWidth()/e.width;g&&(b*=Math.min(g.getWidth()/e.extent.getWidth(),g.getHeight()/e.extent.getHeight()));return b};a.getNumberOfPoints=f.getNumberOfPoints;a.needGeneralizeGeometry=function(e,b,g,h){if(!e||!b)return!1;h=h||(g?g/10:500);g=g||5E3;Array.isArray(e)||(e=[e]);var m=0>b,n=0,q=Math.abs(b)/100,r=0,u=0,v;e.forEach(function(w){w=w.geometry||w;if(!w.rings||!w.getExtent)return!1;var A=w.getExtent();if(A=A.getWidth()*A.getHeight())A=Math.sqrt(A),w=a.getNumberOfPoints(w),
r+=w,u=Math.max(u,w),m&&(n=Math.max(n,A*q)),v||(v=m?r>g:w*b>4*A)});return v&&u>h?n||b:0};a.generalizeGeometry=function(e,b,g,h){if(!e||!b||0>b)return!1;g=g||500;Array.isArray(e)||(e=[e]);var m=[],n=[];e.map(function(q){var r=q.geometry||q;if(r!=q&&r.rings){q.geometry=new l;q.geometry.setSpatialReference(r.spatialReference);var u=q.geometry.rings}u&&r.rings.forEach(function(v){u.push(v.slice())});a.getNumberOfPoints(r)>g&&(q=u||r.rings,m=m.concat(q),n.push({source:q,count:q.length}))});if(h&&window.Worker)return c(m,
n,b);m.forEach(function(q){(new a.RingInfo(q)).generalize(b,.8)})};return a})},"esri/workers/WorkerClient":function(){define("dojo/Evented dojo/_base/declare dojo/Deferred dojo/_base/lang dojo/request ../sniff ../kernel ../urlUtils require".split(" "),function(t,p,l,k,f,d,c,a,e){var b=window.Blob||window.webkitBlob||window.mozBlob,g=window.URL||window.webkitURL||window.mozURL;t=p([t],{declaredClass:"esri.workers.WorkerClient",worker:null,returnDeferreds:!1,_queue:null,constructor:function(h,m,n){this._isIE=
d("ie");this.returnDeferreds=!!n;this._queue={};this._acceptMessage=k.hitch(this,this._acceptMessage);this._errorMessage=k.hitch(this,this._errorMessage);h&&this.setWorker(h,k.hitch(this,function(q){this.worker=q;m(q)}))},setWorker:function(h,m){if(h instanceof Array){var n=h;h=n.shift()}var q=this._getUrl(h);q=a.normalize(q);h=!a.hasSameOrigin(q,location.href);if(!1===q)return console.log("Can not resolve worker path"),!1;if(this.worker){var r=this.worker;r.removeEventListener("message",this._acceptMessage,
!1);r.removeEventListener("error",this._errorMessage,!1);r.terminate();r=null}if(h){h=this._getUrl("./mutableWorker",!0);try{this._getRemoteText(h,k.hitch(this,function(u){u=g.createObjectURL(new b([u],{type:"text/javascript"}));m(this._createWorker(u,q))}))}catch(u){try{h=a.getProxyUrl(h).path+"?"+encodeURI(h),this._useProxy=!0,m(this._createWorker(h,n))}catch(v){return console.log("Can not create worker"),!1}}}else setTimeout(k.hitch(this,function(){m(this._createWorker(q,n))}),0)},_createWorker:function(h,
m){h=new Worker(h);h.addEventListener("message",this._acceptMessage,!1);h.addEventListener("error",this._errorMessage,!1);this.worker=h;m&&this.importScripts(m);return h},postMessage:function(h,m){if(h instanceof Array||"object"!=typeof h)h={data:h};var n=Math.floor(64E9*Math.random()).toString(36);h.msgId=n;n=this._queue[n]=new l;this.worker?(m?this.worker.postMessage(h,m):this.worker.postMessage(h),this.emit("start-message",{target:this,message:h})):n.reject({message:"No worker was set."});return this.returnDeferreds?
n:n.promise||n},terminate:function(){var h=Object.keys(this._queue);this.worker&&this.worker.terminate();for(var m=h.length-1;0<=m;m--)this._queue[h[m]].cancel("terminated"),delete this._queue[h[m]]},addWorkerCallback:function(h,m){var n=this._getUrl(h,!0);!1===n?(m=new l,m.reject({message:"Could not load text from "+h})):(m=this.postMessage({action:"add-callback",url:n,cbName:m||"main"}),m.then(k.hitch(this,function(q){q.target=this;this.emit("callback-added",q)})));return m},importScripts:function(h){Array.isArray(h)||
(h=[h]);h=h.map(function(m){m=this._getUrl(m,!0);this._useProxy&&!a.hasSameOrigin(m,location.href)&&(m=a.getProxyUrl(m).path+"?"+encodeURI(m));return m},this);h=this.postMessage({action:"import-script",url:h});h.then(k.hitch(this,function(m){m.target=this;this.emit("scripts-imported",m)}));return h},_acceptMessage:function(h){var m=h.data,n=m.msgId;if(m.status&&"debug"==m.status)console[m.showAs||"debug"](m);else if(n&&n in this._queue){var q=this._queue[n];"progress"==m.status?q.progress(h.data):
("error"==m.status?q.reject(h.data):q.resolve(h.data),delete this._queue[n])}this.emit("message",{message:h.data,event:h,target:this})},_errorMessage:function(h){this.onerror||this.onError?this.onerror?this.onerror(h):this.onError(h):console.log("Worker Error: "+h.message+"\nIn "+h.filename+" on "+h.lineno)},_getUrl:function(h,m){if(!h)return console.error("can not resolve empty path"),!1;h.match(/\.js$/)||(h+=".js");h=e.toUrl(h);return m?a.getAbsoluteUrl(h):h},_getRemoteText:function(h,m){(h=this._getUrl(h))&&
f.get(h,{sync:!1,handleAs:"text",headers:{"X-Requested-With":"","Content-Type":"text/plain"}}).then(function(n){m(n)})},_startBlobWorker:function(){var h=this._xdSource;h||(h=this._getUrl("./mutableWorker"),h=new b(["if(!self._mutable){importScripts('"+h+"');}"],{type:"text/javascript"}),h=this._xdSource=g.createObjectURL(h));try{return new Worker(h)}catch(m){return console.log(m.message),!1}}});d("extend-esri")&&k.setObject("workers.WorkerClient",t,c);return t})},"esri/dijit/geoenrichment/utils/GeometryUtil_base":function(){(function(t){function p(a,
e){var b=a.length;if(3>b)return 0;e||(e=a[0]);var g=e[0];e=e[1];var h=a[b-1];b=h[0]-g;for(var m=h[1]-e,n=0,q=0,r=a.length;q<r;q++){h=a[q];var u=h[0]-g;h=h[1]-e;n+=u*m-b*h;b=u;m=h}return n/2}var l={};l.calculateRingArea=p;l.calculateRingCentroid=function(a,e){var b=a.length;if(!b)return null;e||(e=a[0]);var g=e[0];e=e[1];var h=0,m=0,n=0;if(2<b){var q=a[b-1];b=q[0]-g;for(var r=q[1]-e,u=0,v=a.length;u<v;u++){q=a[u];var w=q[0]-g;q=q[1]-e;var A=w*r-b*q;h+=A;m+=(b+w)*A;n+=(r+q)*A;b=w;r=q}}0==h?m=n=0:(m/=
3*h,n/=3*h);return[g+m,e+n]};l.INTERIOR=1;l.EXTERIOR=-1;l.BOUNDARY=0;l.createRingInfo=function(a,e){return new d(a,e)};l.createSegmentCoordinates=function(a){return new c(null,0,0,a)};var k=function(a){return function(){for(var e in a){var b=a[e];this[e]="function"===typeof b?b.bind(this):b}a.ctr.bind(this).apply(this,arguments)}},f=k({xmin:null,ymin:null,xmax:null,ymax:null,spatialReference:null,ctr:function(a,e,b,g,h){this.xmin=a;this.ymin=e;this.xmax=b;this.ymax=g;this.spatialReference=h},printOut:function(){console.log([this.xmin,
this.xmax,this.ymin,this.ymax].join(" "))}}),d=k({ring:null,origin:null,area:0,clockwise:!1,extent:null,_coords:null,ctr:function(a,e){this.ring=a;this.origin=e;a=this.ring.length-1;if(!(0>a)){if(!a)a++;else if(this.ring[a][0]!=this.ring[0][0]||this.ring[a][1]!=this.ring[0][1])a++,this.ring.push(this.ring[0].slice());var b=0,g=0;e=!e;this.extent=new f(this.ring[0][0],this.ring[0][1],this.ring[0][0],this.ring[0][1]);for(var h=0;h<a;h++){var m=this.ring[h],n=m[0];e&&(b+=n);n<this.extent.xmin?this.extent.xmin=
n:n>this.extent.xmax&&(this.extent.xmax=n);n=m[1];e&&(g+=n);n<this.extent.ymin?this.extent.ymin=n:n>this.extent.ymax&&(this.extent.ymax=n)}e&&(this.origin=[b/a,g/a]);this.area=p(this.ring,this.origin);0>=this.area?this.area=-this.area:this.clockwise=!0}},setDirection:function(a){this.clockwise==!a&&(this.ring.reverse(),this.clockwise=!this.clockwise,this._coords=null)},testPoint:function(a,e){a=this.getRingCoordinates(e).testPoint(a[0]-this.origin[0],a[1]-this.origin[1]);return this.clockwise?a:-a},
generalize:function(a,e,b){function g(I,L,N){w=I;A=L;if(N||D<v)v=a,E=w-r,F=A-r,D=Math.sqrt(E*E+F*F),D>a*e?(E/=D,F/=D):D=0;v*=e}function h(){if(!D)return!0;var I=m.dx,L=m.dy,N=Math.sqrt(I*I+L*L);return N-I*E-L*F>=.9*N}e=e||.75;var m=this.getRingCoordinates(a),n=m.xs,q=m.ys,r=n[0],u=q[0],v,w,A,E,F,D=0,B=n.length-1;g(n[B],q[B],!0);for(var y=this,z=this.clockwise?function(I){y.ring.splice(I,1)}:function(I){y.ring.splice(-I-1,1)};0<B--&&4<n.length;){var H=n[B],G=q[B];m.setSegment(r,u,H,G)&&m.testPointOnTouch(w,
A,v)&&h()?(n.splice(B+1,1),q.splice(B+1,1),z(B+1),g(H,G)):(r=w,u=A,g(H,G,!0))}this._coords=null;b&&(this.area=p(this.ring,this.origin),this.clockwise||(this.area=-this.area))},getRingCoordinates:function(a,e){if(e)return new c(this.ring,e[0],e[1],a,this.extent,this.clockwise);this._coords&&this._coords.eps==a||(this._coords=new c(this.ring,this.origin[0],this.origin[1],a,this.extent,this.clockwise));return this._coords}});l.RingInfo=d;var c=k({xs:null,ys:null,extent:null,eps:NaN,dx:null,dy:null,_sx:null,
_sy:null,ctr:function(a,e,b,g,h,m){this.xs=[];this.ys=[];a||(a=[]);void 0===e&&(e=0);void 0===b&&(b=0);void 0===g&&(g=0);this.eps=Math.max(g,0);h&&(g=this.eps/2,this.extent=new f(h.xmin-e-g,h.ymin-b-g,h.xmax-e+g,h.ymax-b+g));var n=a.length-1;if(!(0>n))for(h=n?a[n][0]==a[0][0]&&a[n][1]==a[0][1]?n:n+1:1,g=m?1:-1,m=m?0:n;h--;m+=g)n=a[m],this.xs.push(n[0]-e),this.ys.push(n[1]-b)},testPoint:function(a,e){if(!this._pointBelongsToExtent(a,e))return-1;var b=this.xs.length,g=!1;this.dy=this.ys[0]-this.ys[b-
1];if(0==this.dy){for(g=b;1<g--&&(this.dy=this.ys[g]-this.ys[g-1],0==this.dy););if(0==this.dy)return 0}g=0<this.dy;for(var h=0,m=this.xs[0],n=this.ys[0],q,r,u=1;u<=b;u++,m=q,n=r)if(r=u==b?0:u,q=this.xs[r],r=this.ys[r],this.setSegment(m,n,q,r)){var v=n-e,w=r-e,A=!1;0>v&&(v=-v,w=-w,A=!0);if(!(v>this.eps&&w>this.eps)){if(this.testPointOnTouch(a,e,this.eps))return 0;0==v?0!==w&&(0>w&&(g=!g),a<m&&g&&h++):0==w?g=A:0>w&&a<m+this.dx/this.dy*(e-n)&&h++}}return 0!=h%2?1:-1},testPointOnTouch:function(a,e,b){var g=
this.findIntersectionDelta(a,e,a-this.dy,e+this.dx);a=this._sx+g*this.dx-a;e=this._sy+g*this.dy-e;return a*a+e*e<=b*b},_pointBelongsToExtent:function(a,e){return a>=this.extent.xmin&&a<=this.extent.xmax&&e>=this.extent.ymin&&e<=this.extent.ymax},setSegment:function(a,e,b,g){this._sx=a;this.dx=b-a;this._sy=e;this.dy=g-e;return 0!=this.dx||0!=this.dy},findIntersectionDelta:function(a,e,b,g,h){void 0===h&&(h=!0);b-=a;g-=e;var m=this.dy*b-this.dx*g;if(0==m)return 0;var n=a-this._sx,q=e-this._sy,r=q*b-
n*g;n=h?0:q*this.dx-n*this.dy;0>m&&(m=-m,r=-r,n=-n);return h||(n=0>n?0:n<m?n/m:1,this.testPointOnTouch(a+n*b,e+n*g,this.eps))?0>=r?0:r<m?r/m:1:-1},addPointOfSegmentAt:function(a){this.xs.push(this._sx+a*this.dx);this.ys.push(this._sy+a*this.dy)}});l.RingCoordinates=c;t.document?define(function(){return l}):t.GeometryUtil_base=l})(this)},"esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/ReportTemplateTypes":function(){define([],function(){return{STANDARD:"esriReportTemplateStandard",MULTICOLUMN:"esriReportTemplateMultiColumn",
MAP:"esriReportTemplateMapReport",FUSION:"esriReportTemplateFusion"}})},"esri/dijit/geoenrichment/ReportPlayer/core/conversion/PortalToEditorConverter":function(){define("esri/dijit/geoenrichment/when esri/dijit/geoenrichment/ReportPlayer/config ./portalToEditorUtils/layout/LayoutParser ./portalToEditorUtils/metadata/MetadataParser ./portalToEditorUtils/ImageCollector ./portalToEditorUtils/parsers/Parsers ./portalToEditorUtils/variables/PlayerVariableProvider ../supportClasses/DefaultStyles ../supportClasses/images/ImageDataHolder ../themes/conversion/CssParser esri/dijit/geoenrichment/utils/async/AsyncQueue esri/dijit/geoenrichment/utils/DelayUtil".split(" "),
function(t,p,l,k,f,d,c,a,e,b,g,h){return{provideEditorJson:function(m,n){function q(){function E(y,z,H){return t(n.preProcessFile&&n.preProcessFile(y,z,r),function(G){if(!1!==G)return t(H&&H(),function(){return n.postProcessFile&&n.postProcessFile(y,z,r)})})}if(u&&u.files&&u.files){var F=n.filesToProcess||["theme.css.txt","metadata.xml","report.xml"],D={"theme.css.txt":function(y){return E(y,"theme.css.txt",function(){r.theme=b.fromCssText(y.data,n)})},"metadata.xml":function(y){return E(y,"metadata.xml",
function(){return k.parseMetadataXML(y,r,n)})},"report.xml":function(y){return E(y,"report.xml",function(){return l.parseReportXML({report:m,parsers:d,file:y,templateJson:r,variableProvider:n.variableProvider,useVariableProviderToCollectOnly:n.useVariableProviderToCollectOnly,tableDefaultStyles:n.tableDefaultStyles,processFileName:w,putImageData:function(z,H){z=w(z);H=H||v[z];e.putImageData(z,H);return H},log:A,queryMetaDataFunc:function(z){return n.queryMetaDataFunc&&n.queryMetaDataFunc(z,r)},postProcessChartJson:function(z,
H){n.postProcessChartJson&&n.postProcessChartJson(r,z,H)},postProcessMapJson:function(z,H){n.postProcessMapJson&&n.postProcessMapJson(r,z,H)},postProcessInfographicJson:function(z,H){n.postProcessInfographicJson&&n.postProcessInfographicJson(r,z,H)},postProcessTableInSection:function(z,H){n.postProcessTableInSection&&n.postProcessTableInSection(r,z,H)}})})},generic:function(y,z){return E(y,z)}},B=new g;F.forEach(function(y){var z=u.files.filter(function(G){return G.name===y})[0],H=z&&(D[y]||D.generic);
H&&B.add(function(){return t(p.isPlayerOnServer?t():h.delay(50)).then(function(){return H(z,y)}).otherwise(function(G){r.metadata.parseErrors.push(G);console.log(G)})})});return B.getPromise()}}n=n||{};n.variableProvider=n.variableProvider||new c;n.tableDefaultStyles=n.tableDefaultStyles||new a;var r={documentOptions:{},metadata:{specialTradeAreaCalculatorName:null,parseErrors:[],mapImageInfosHash:{},comparisonCalculatorsHash:{},locatorCalculatorsHash:{}},theme:null},u=m.portalJson,v={};n.getImageData=
function(E){return v[w(E)]};var w=function(E){return E?E.toLowerCase():""},A=n.log||function(E){};return t(d.initialize(),function(){return t(f.collectImageResources(u,v,w),function(){for(var E in v)e.putImageData(E,v[E]);return t(q(),function(){r.metadata.parseErrors.length||(m.templateJson=r)})})})}}})},"esri/dijit/geoenrichment/ReportPlayer/core/conversion/portalToEditorUtils/layout/LayoutParser":function(){define(["esri/dijit/geoenrichment/utils/JsonXmlConverter","./GraphicReportSectionsParser",
"./ClassicReportSectionsParser"],function(t,p,l){return{parseReportXML:function(k){k.log(k.file.data);var f=t.parseXml(k.file.data);k.parsers.getParser("document").parseDocument(f,k);k.report.isGraphicReport?(k.templateJson.sectionsTables=[],p.parseSectionsGraphic(f,k)):(k.templateJson.sections=[],l.parseSectionsClassic(f,k))}}})},"esri/dijit/geoenrichment/ReportPlayer/core/conversion/portalToEditorUtils/layout/GraphicReportSectionsParser":function(){define(["esri/dijit/geoenrichment/utils/JsonXmlConverter"],
function(t){return{parseSectionsGraphic:function(p,l){t.queryTopJson(p,"table").forEach(function(k){try{l.templateJson.sectionsTables.push(l.parsers.getParser("section").parseTable(k,l,{fixTableWidthsForPage:!0}))}catch(f){console.log(f)}})}}})},"esri/dijit/geoenrichment/ReportPlayer/core/conversion/portalToEditorUtils/layout/ClassicReportSectionsParser":function(){define(["esri/dijit/geoenrichment/utils/JsonXmlConverter"],function(t){return{parseSectionsClassic:function(p,l){t.queryTopJson(p,"section").forEach(function(k){l.templateJson.sections.push(l.parsers.getParser("section").parseSection(k,
l,{fixTableWidthsForPage:!0}))});this._splitSections(l)},_splitSections:function(p){p=p.templateJson;var l=[];p.sections.forEach(function(k){function f(){d={type:k.type,stack:[]};l.push(d)}var d;f();k.stack.forEach(function(c){if("hr"===c.id){var a=!!d.stack.length;d.stack.push(c);a&&f()}else"table"===c.id?(d.stack.some(function(e){return"table"===e.id})&&f(),d.stack.push(c)):"pageBreak"===c.id?(d.stack.length&&f(),d.stack.push(c),f()):d.stack.push(c)})});l=l.filter(function(k){return!!k.stack.length});
p.sections=l}}})},"esri/dijit/geoenrichment/ReportPlayer/core/conversion/portalToEditorUtils/metadata/MetadataParser":function(){define("esri/dijit/geoenrichment/promise/all esri/dijit/geoenrichment/utils/JsonXmlConverter ./DataCollectionsCalculatorsParser ./ScriptsCalculatorsParser ./LocatorCalculatorsParser ./map/MapCalculatorsParser ./TradeAreaCalculatorsParser".split(" "),function(t,p,l,k,f,d,c){return{parseMetadataXML:function(a,e,b){b.log&&b.log(a.data);var g=p.parseXml(a.data);if(g&&g.tags)return t([c.parseTradeAreaCalculators(g,
e,b),l.parseDataCollectionsCalculators(g,e,b),k.parseScriptsCalculators(g,e,b),f.parseLocatorCalculators(g,e,b)]).then(function(){return d.parseMapCalculators(g,e,b)})}}})},"esri/dijit/geoenrichment/ReportPlayer/core/conversion/portalToEditorUtils/metadata/DataCollectionsCalculatorsParser":function(){define(["esri/dijit/geoenrichment/utils/JsonXmlConverter","./VariableScriptCollector","../../../../_devConfig"],function(t,p,l){return{parseDataCollectionsCalculators:function(k,f,d){t.queryJson(k,"DataCollections").forEach(function(c){var a=
t.queryJson(c,"ComparisonLevel");if(l.emulateErrors.metadataParseError)throw Error("Error test: something crashed during the parsing of the metadata!");if(d.variableProvider.isPlayerOnly||a.length)var e=p.getObjects(c);a.length&&(c={calculatorName:c.attributes.Name,levels:a.map(function(b){return b.attributes.Name}).filter(function(b){return!d.validateGeographyLevelFunc||d.validateGeographyLevelFunc(b)}),variableObjects:e.variableObjects},f&&(f.metadata.comparisonCalculatorsHash[c.calculatorName]=
c));d.variableProvider.isPlayerOnly&&(e.variableObjects.forEach(function(b){d.variableProvider.addVariable(b)}),e.scriptObjects.forEach(function(b){d.variableProvider.addScriptVariable(b)}))})}}})},"esri/dijit/geoenrichment/ReportPlayer/core/conversion/portalToEditorUtils/metadata/VariableScriptCollector":function(){define(["esri/dijit/geoenrichment/utils/JsonXmlConverter","../variables/VariableUtil"],function(t,p){var l={getObjects:function(k,f){f=l._getVariableInfo(k,f);k=l._getScriptObjects(k,
f.fieldNameToVariableCache);return{variables:f.variables,variableObjects:f.variableObjects,scriptObjects:k}},_getVariableInfo:function(k,f){var d=[];t.queryJson(k,f?/^(RawFields|Fields)$/:"Fields").forEach(function(b){d=d.concat(t.queryJson(b,/^(Field|PortalField)$/))});var c=[],a=[],e={};d.forEach(function(b){c.push(b.attributes.MapTo);if(b=p.fieldTagToVariable(b,k.attributes.Name))e[b.fieldName]=b,a.push(b)});return{variables:c,variableObjects:a,fieldNameToVariableCache:e}},_getScriptObjects:function(k,
f){var d=t.queryJson(k,"Scripts"===k.name?"Fields":"CalculatedFields")[0];d=d&&t.queryJson(d,"Script")||[];"Scripts"===k.name&&(d=d.filter(function(c){return!("STORE_ID"===c.attributes.Name||"AREA_ID"===c.attributes.Name)}));return d.map(function(c){var a=p.scriptTagToVariable(c,k.attributes.Name);a.usedFields&&(a.usedMapTos=[],a.usedFields.forEach(function(e){var b=f[e];b?b.usedMapTos?a.usedMapTos=a.usedMapTos.concat(b.usedMapTos):a.usedMapTos.push(b.fullName):console.log("Error parsing used fields for "+
e)}),f[a.fieldName]=a);return a})}};return l})},"esri/dijit/geoenrichment/ReportPlayer/core/conversion/portalToEditorUtils/variables/VariableUtil":function(){define([],function(){var t={getType:function(p,l){return p?0===p.indexOf("esriFieldType")?p:"esriFieldType"+p:l},fieldTagToVariable:function(p,l){return p.attributes.MapTo&&"AREA_ID"!==p.attributes.Name?{id:p.attributes.MapTo.substr(p.attributes.MapTo.lastIndexOf(".")+1),fullName:p.attributes.MapTo,alias:p.attributes.Alias,fieldName:p.attributes.Name,
precision:Number(p.attributes.Decimals)||0,calculatorName:l,templateName:l+"."+p.attributes.Name,type:t.getType(p.attributes.Type,p.attributes.Decimals?"esriFieldTypeDouble":"esriFieldTypeString"),vintage:null,source:null}:null},scriptTagToVariable:function(p,l){return{id:p.attributes.Name,fullName:l+"."+p.attributes.Name,fieldName:p.attributes.Name,alias:p.attributes.Alias,precision:Number(p.attributes.Decimals)||0,usedFields:p.attributes.usedFields?p.attributes.usedFields.split(","):[],usedMapTos:null,
expressionText:p.tags[0].text,calculatorName:l,templateName:l+"."+p.attributes.Name,type:t.getType(p.attributes.Type,p.attributes.Decimals?"esriFieldTypeDouble":"esriFieldTypeString")}}};return t})},"esri/dijit/geoenrichment/ReportPlayer/core/conversion/portalToEditorUtils/metadata/ScriptsCalculatorsParser":function(){define(["esri/dijit/geoenrichment/utils/JsonXmlConverter","./VariableScriptCollector"],function(t,p){return{parseScriptsCalculators:function(l,k,f){t.queryJson(l,"Scripts").forEach(function(d){f.variableProvider.isPlayerOnly&&
(d=p.getObjects(d),d.variableObjects.forEach(function(c){f.variableProvider.addVariable(c)}),d.scriptObjects.forEach(function(c){f.variableProvider.addScriptVariable(c)}))})}}})},"esri/dijit/geoenrichment/ReportPlayer/core/conversion/portalToEditorUtils/metadata/LocatorCalculatorsParser":function(){define(["esri/dijit/geoenrichment/promise/all","esri/dijit/geoenrichment/when","esri/dijit/geoenrichment/utils/JsonXmlConverter","../variables/VariableUtil"],function(t,p,l,k){return{parseLocatorCalculators:function(f,
d,c){f=l.queryJson(f,"Locator");return t(f.map(function(a){var e=[];l.queryJson(a,/^(PointFields|Fields)$/).forEach(function(h){e=e.concat(l.queryJson(h,/^(Field|Direction|Distance)$/))});var b=[];e.forEach(function(h){"Direction"===h.name?h.attributes.MapTo="DIRECTION":"Distance"===h.name&&(h.attributes.MapTo="DISTANCE");(h=k.fieldTagToVariable(h,a.attributes.Name))&&b.push(h)});var g={calculatorName:a.attributes.Name,variableObjects:b,layerID:null,layerUrl:null,layerName:a.attributes.LayerName};
a.attributes.Points&&0===a.attributes.Points.indexOf("std:")?g.layerID=a.attributes.Points.replace("std:",""):g.layerUrl=a.attributes.Layer;d.metadata.locatorCalculatorsHash[a.attributes.Name]=g;c.variableProvider.isPlayerOnly&&b.forEach(function(h){c.variableProvider.addVariable(h)});return p(!c.validateLocatorCalculator||c.validateLocatorCalculator(g.layerID,g.layerUrl),function(h){g.isValid=h})}))}}})},"esri/dijit/geoenrichment/ReportPlayer/core/conversion/portalToEditorUtils/metadata/map/MapCalculatorsParser":function(){define(["esri/dijit/geoenrichment/utils/JsonXmlConverter",
"./MetadataToRendererParser","./MapTagsUtil","esri/dijit/geoenrichment/utils/ImageUtil"],function(t,p,l,k){var f={parseMapCalculators:function(d,c,a){t.queryJson(d,"Maps").forEach(function(e){t.queryJson(e,"Map").forEach(function(b){var g=f._parsePortalLayers(b),h=f._parseStudyAreas(b);g={fieldName:b.attributes.Name,width:Number(b.attributes.Width),height:Number(b.attributes.Height),defaultBasemapId:g.defaultBasemapId,defaultBasemapName:g.defaultBasemapName,webMapId:g.webMapId,webMapName:g.webMapName,
additionalLayerInfos:f._parseAdditionalLayers(b,c),pinSymbolJson:f._parseSiteLayerPinSymbol(b,a),areaSymbolJsons:h.symbolJsons,areaSymbolRamp:h.ramp,mapScale:Number(b.attributes.Scale)||null};c&&(c.metadata.mapImageInfosHash[e.attributes.Name+"."+b.attributes.Name]=g)})})},_parsePortalLayers:function(d){var c;d=t.queryJson(d,"Layer").filter(function(a){return!(!a.attributes.PortalItemId&&!a.attributes.MapName)});1<d.length&&(c=d.shift());d=d.shift();return{defaultBasemapId:c&&c.attributes.PortalItemId,
defaultBasemapName:c&&c.attributes.MapName,webMapId:d&&d.attributes.PortalItemId,webMapName:d&&d.attributes.MapName}},_parseAdditionalLayers:function(d,c){var a=[];t.queryJson(d,/^(Layer|LocatorResultsLayer|ComparisonResultsLayer)$/).filter(function(e){return!!e.attributes.ServiceUrl||"LocatorResultsLayer"===e.name||"ComparisonResultsLayer"===e.name}).forEach(function(e){if(e.attributes.ServiceUrl)a.push({url:e.attributes.ServiceUrl});else if("LocatorResultsLayer"===e.name){var b=e.tags&&e.tags.filter(function(h){return"Renderer"===
h.name})[0],g=c.metadata.locatorCalculatorsHash[e.attributes.CalculatorName];g&&g.isValid&&a.push({isLocatorLayer:!0,layerName:e.attributes.LayerName,calculatorName:e.attributes.CalculatorName,calculatorInfo:g,rendererJson:b&&p.parseRendererJson(b)})}else"ComparisonResultsLayer"===e.name&&((b=(b=e.tags&&e.tags.filter(function(h){return"Renderer"===h.name})[0])&&p.parseRendererJson(b))&&"esriTS"===b.uniqueValueInfos[0].symbol.type?a[a.length-1].labelRendererJson=b:(g=(g=e.tags&&e.tags.filter(function(h){return"LabelingInfo"===
h.name})[0])&&p.parseLabelRendererJson(g),a.push({isComparisonLayer:!0,calculatorName:e.attributes.CalculatorName,rendererJson:b,labelRendererJson:g})))});return a.length&&a},_parseSiteLayerPinSymbol:function(d,c){var a;if(d=t.queryJson(d,"SiteLayer")[0])if((d=t.queryJson(d,"Symbol")[0])&&"Image"===d.attributes.Type)(c=c.getImageData(d.attributes.Name))&&(a={type:"esriPMS",contentType:k.getContentType(c),imageData:k.base64DataFromDataURL(c),url:d.attributes.Url,width:Number(d.attributes.Width),height:Number(d.attributes.Height),
angle:Number(d.attributes.Angle)||0,xoffset:Number(d.attributes.XOffset)||0,yoffset:Number(d.attributes.YOffset)||0});else if(d&&"Marker"===d.attributes.Type){a=(a=t.queryJson(d,"Fill")[0])&&t.queryJson(a,"Color")[0];var e=(c=t.queryJson(d,"Outline")[0])&&t.queryJson(c,"Color")[0];a={type:"esriSMS",style:"esriSMS"+(d.attributes.Style||"Circle"),size:Number(d.attributes.Size),angle:Number(d.attributes.Angle)||0,xoffset:Number(d.attributes.XOffset)||0,yoffset:Number(d.attributes.YOffset)||0,color:l.parseColorTag(a),
outline:c&&{type:"esriSLS",color:l.parseColorTag(e),style:"esriSLS"+(c.attributes.Style||"Solid"),width:void 0===c.attributes.Width?0:Number(c.attributes.Width)}}}return a},_parseStudyAreas:function(d){var c=(d=t.queryJson(d,"StudyAreasLayer")[0])&&t.queryTopJson(d,"SymbolsPalette")[0];d=(c&&t.queryTopJson(c,"Symbol")||[]).map(f._parseAreaSymbol);var a=c&&t.queryTopJson(c,"SymbolRamp")[0],e;a&&(c=t.queryTopJson(a,"First")[0],a=t.queryTopJson(a,"Last")[0],c=c&&t.queryTopJson(c,"Symbol")[0],a=a&&t.queryTopJson(a,
"Symbol")[0],c&&a&&(e=[c,a].map(f._parseAreaSymbol)));return{ramp:e,symbolJsons:d}},_parseAreaSymbol:function(d){var c=t.queryJson(d,"Fill")[0];c=c&&t.queryJson(c,"Color")[0];var a=(d=t.queryJson(d,"Outline")[0])&&t.queryJson(d,"Color")[0];return{type:"esriSFS",style:"esriSFSSolid",color:l.parseColorTag(c)||[0,0,0,1],outline:d&&{type:"esriSLS",color:l.parseColorTag(a),style:"esriSLS"+(d.attributes.Style||"Solid"),width:void 0===d.attributes.Width?0:Number(d.attributes.Width)}}}};return f})},"esri/dijit/geoenrichment/ReportPlayer/core/conversion/portalToEditorUtils/metadata/map/MetadataToRendererParser":function(){define(["esri/dijit/geoenrichment/utils/JsonXmlTypedConverter",
"esri/dijit/geoenrichment/utils/JsonXmlConverter"],function(t,p){return{parseRendererJson:function(l){return t.parseXml(p.parseJson(l))},parseLabelRendererJson:function(l){return{type:"uniqueValue",field1:"StdGeographyLevel",uniqueValueInfos:t.parseXml(p.parseJson(l)).map(function(k){return{value:k.where.match(/StdGeographyLevel='(.*?)'/)[1],symbol:k.symbol}})}}}})},"esri/dijit/geoenrichment/utils/JsonXmlTypedConverter":function(){define(["dojo/_base/declare","./RegExpUtil"],function(t,p){return t(null,
{parseJson:function(l,k){function f(e,b){if("string"===typeof e)a+="\x3c"+b+' type\x3d"string"\x3e'+p.encodeXML(e,!1)+"\x3c/"+b+"\x3e";else if("number"===typeof e)a+="\x3c"+b+' type\x3d"number"\x3e'+e+"\x3c/"+b+"\x3e";else if("boolean"===typeof e)a+="\x3c"+b+' type\x3d"boolean"\x3e'+e+"\x3c/"+b+"\x3e";else if(Array.isArray(e))d(e,b);else if(e&&"object"===typeof e){a+="\x3c"+b+' type\x3d"object"\x3e';for(var g in e)f(e[g],g);a+="\x3c/"+b+"\x3e"}}function d(e,b){a+="\x3c"+b+' type\x3d"array"\x3e';e.forEach(function(g){f(g,
"item")});a+="\x3c/"+b+"\x3e"}var c=k&&k.rootName||"root",a="";k&&k.addDocumentOptions&&(a+='\x3c?xml version\x3d"1.0" encoding\x3d"utf-8"?\x3e');f(l,c);return a=decodeURIComponent(encodeURIComponent(a).replace("%19",""))},parseXml:function(l){function k(g){if(!g.attributes)return null;for(var h=0;h<g.attributes.length;h++){var m=g.attributes[h];if("type"===m.name)return m.value}return null}function f(g,h){if(h.childNodes)for(var m=0,n=h.childNodes.length;m<n;m++){var q=h.childNodes[m],r=d(q);void 0!==
r&&(g[q.nodeName]=r)}return g}function d(g){var h=k(g);if(g.nodeName&&h)switch(h){case "string":return g.childNodes[0]?p.decodeXML(g.childNodes[0].nodeValue):"";case "number":return Number(g.childNodes[0].nodeValue);case "boolean":return"true"===g.childNodes[0].nodeValue;case "object":return f({},g);case "array":return c([],g)}}function c(g,h){if(h.childNodes)for(var m=0,n=h.childNodes.length;m<n;m++)g[m]=d(h.childNodes[m]);return g}var a;l=(new DOMParser).parseFromString(l,"text/xml").childNodes;
for(var e=0;e<l.length;e++)if(1===l[e].nodeType){var b=l[e];break}b&&(l=k(b),"object"===l?f(a={},b):"array"===l&&c(a=[],b));return a}})()})},"esri/dijit/geoenrichment/ReportPlayer/core/conversion/portalToEditorUtils/metadata/map/MapTagsUtil":function(){define([],function(){return{parseColorTag:function(t){if(!t)return null;t=t.attributes;return[Number(t.Red)||0,Number(t.Green)||0,Number(t.Blue)||0,t.Transparency?255*(1-Number(t.Transparency)/100):255]}}})},"esri/dijit/geoenrichment/ReportPlayer/core/conversion/portalToEditorUtils/metadata/TradeAreaCalculatorsParser":function(){define(["esri/dijit/geoenrichment/utils/JsonXmlConverter",
"./VariableScriptCollector","../../../supportClasses/templateJsonUtils/fieldInfo/FieldLibrary"],function(t,p,l){return{parseTradeAreaCalculators:function(k,f,d){k=t.queryJson(k,"SpecialTradeAreaFields");f.metadata.specialTradeAreaCalculatorName=k[0]&&k[0].attributes&&k[0].attributes.Name;k.forEach(function(c){d.variableProvider.isPlayerOnly&&p.getObjects(c,!0).variableObjects.forEach(function(a){a.alias=a.alias||l.getFieldLabel(a.id);d.variableProvider.addVariable(a)})})}}})},"esri/dijit/geoenrichment/ReportPlayer/core/conversion/portalToEditorUtils/ImageCollector":function(){define(["esri/dijit/geoenrichment/when",
"esri/dijit/geoenrichment/promise/all","esri/dijit/geoenrichment/utils/DataUtil","esri/dijit/geoenrichment/utils/ImageUtil","esri/dijit/geoenrichment/utils/ImageInfoUtil"],function(t,p,l,k,f){return{collectImageResources:function(d,c,a){function e(g){return t(f.getImageInfo(c[g],g),null,function(){/\.svg$/.test(g)||delete c[g]})}d&&d.files&&d.files.forEach(function(g){var h=l.getContentType(g.name);h&&"image/"===h.substr(0,6)&&(c[a(g.name)]=k.base64DataToDataURL(g.data,h))});d=[];for(var b in c)d.push(e(b));
return p(d)}}})},"esri/dijit/geoenrichment/ReportPlayer/core/conversion/portalToEditorUtils/parsers/Parsers":function(){define(["esri/dijit/geoenrichment/Deferred","require"],function(t,p){var l={},k={},f;l.initialize=function(){if(f)return f.promise;f=new t;p("./DocumentParser ./ChartConverterPtoE ./InfographicConverterPtoE ./SectionParser ./FieldParser ./FilterParser ./SortingParser ../../../supportClasses/templateJsonUtils/fieldInfo/utils".split(" "),function(d,c,a,e,b,g,h,m){k.document=d;k.chart=
c;k.infographic=a;k.section=e;k.field=b;k.filter=g;k.sorting=h;m.init().then(f.resolve)});return f.promise};l.getParser=function(d){return k[d]};return l})},"esri/dijit/geoenrichment/ReportPlayer/core/conversion/portalToEditorUtils/variables/PlayerVariableProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/string","dojo/i18n!esri/nls/jsapi"],function(t,p,l,k){k=k.geoenrichment.dijit.ReportPlayer.Variables;var f=t(null,{variable:null,constructor:function(d){this.variable=d},calculate:function(d){return 0},
getCalcType:function(){return"n/"},getAliasWithType:function(){return this.variable.alias},getDescriptionWithType:function(){return this.variable.alias},getDecimals:function(){return this.variable.precision||0}});return t(null,{isPlayerOnly:!0,_fieldNameToVariableCache:null,_templateNameToVariableCache:null,constructor:function(d){this._templateNameToVariableCache=d&&d.templateNameToVariableCache||{};this._fieldNameToVariableCache={};for(var c in this._templateNameToVariableCache)d=this._templateNameToVariableCache[c],
this._fieldNameToVariableCache[d.fieldName]=d},get:function(d){return this._templateNameToVariableCache[d]||this._fieldNameToVariableCache[d]},toCalculator:function(d){return(d=this.get(d))&&new f(d)},addVariable:function(d){this._fieldNameToVariableCache[d.fieldName]=d;this._templateNameToVariableCache[d.templateName]=d},addScriptVariable:function(d){this._fieldNameToVariableCache[d.fieldName]=d;this._templateNameToVariableCache[d.templateName]=d},getVariables:function(){return Object.keys(this._fieldNameToVariableCache).map(function(d){return this._fieldNameToVariableCache[d]},
this)},getVariablesDataVintageDescription:function(d){var c={},a={},e={};this.getVariables().forEach(function(g){g.fullName&&(e[g.fullName.toLowerCase()]=g)});for(var b in d.usedVariablesCache)if(d=e[b.toLowerCase()])d.vintage&&(a[d.vintage]=1),d.source&&(c[d.source]=1);if(!Object.keys(c).length&&!Object.keys(a).length)return"";b=[];Object.keys(c).length&&b.push(l.substitute(k.sourcePattern,{source:Object.keys(c).join(", ")}));Object.keys(a).length&&b.push(l.substitute(k.vintagePattern,{vintage:Object.keys(a).join(", ")}));
return b.join(" ")},toJson:function(){return{templateNameToVariableCache:p.clone(this._templateNameToVariableCache)}}})})},"esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/DefaultStyles":function(){define(["dojo/_base/declare","dojo/_base/lang","esri/dijit/geoenrichment/utils/ColorUtil"],function(t,p,l){return t(null,{_styles:null,_stylesArray:null,constructor:function(k){this._styles={Default:{color:"#4C4C4C",backgroundColor:"#FFFFFF"}};p.mixin(this._styles,k);this._stylesArray=[];for(var f in this._styles)this._stylesArray.push(f)},
getStyle:function(k){return this._styles[k]},getStylesArray:function(){return this._stylesArray},tryApplyStyle:function(k,f,d){if(f=this.getStyle(f))for(var c in f)d&&void 0!==k[c]||(k[c]=f[c])},findDefaultStyle:function(k){var f,d=this;this.getStylesArray().some(function(c){var a=d.getStyle(c),e;for(e in a){if(!k[e])return!1;if("color"===e||"backgroundColor"===e){if(!l.colorsEqual(k[e],a[e]))return!1}else if(k[e]!==a[e])return!1}f=c;return!0});return f}})})},"esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/images/ImageDataHolder":function(){define(["esri/dijit/geoenrichment/utils/CacheUtil"],
function(t){function p(){return t.get("ImageDataHolder.imageData")}function l(){return t.get("ImageDataHolder.fileNameToOriginal")}var k={},f;k.setImageDataHolder4x=function(d){f=d;d=p();for(var c in d)f.putImageData(c,d[c])};k.putImageData=function(d,c){if(f)f.putImageData(d,c);else if("string"===typeof d&&c){var a=d.toLowerCase();l()[a]=d;p()[a]=c}else console.error("Invalid image filename or data!")};k.getImageData=function(d){return f?f.getImageData(d):"string"!==typeof d?null:p()[d.toLowerCase()]};
k.findFileNameByData=function(d){if(f)return f.findFileNameByData(d);var c=p(),a;for(a in c)if(d===c[a])return l()[a];return null};return k})},"esri/dijit/geoenrichment/ReportPlayer/core/themes/conversion/CssParser":function(){define(["../PageBorderStyles","../ThemeUpdateUtil","../../../_devConfig"],function(t,p,l){var k={"font-size":"fontSize","font-family":"fontFamily","font-style":"fontStyle","font-weight":"fontWeight","text-decoration":"textDecoration",color:"color","background-color":"backgroundColor",
opacity:"opacity",url:"data","background-position":"position","background-repeat":"repeat","background-size":"scale"},f={colors:1,colors3series:1};return{fromCssText:function(d){function c(n){var q=g;n.split("@").forEach(function(r){q=q[r]=q[r]||{}});return q}function a(n,q){if(q.borderStyle||q.border)if(n.border={},n.border.style=t.toSupportedValue(q.borderStyle),"string"===typeof q.border){var r=q.border.split(" ");3===r.length&&(n.border.thickness=Number(r[0].replace("px","")),n.border.lineStyle=
r[1],n.border.color=r[2])}for(var u in q)if("border"!==u&&"borderStyle"!==u){r=q[u];var v=u;var w=r,A=n;"font-size"===v?(A[k[v]]=e(w.replace("px","")),v=!0):"background-repeat"===v?(A[k[v]]=e("repeat"===w),v=!0):"background-size"===v?(A[k[v]]=e("contain"===w||"cover"===w),A.size="auto"===w?null:w,v=!0):v=!1;v||(n[k[u]||u]=e(r))}}function e(n){if(void 0===n||null===n||"null"===n||"undefined"===n)return"";if("true"===n)return!0;if("false"===n)return!1;if(!0===n)return!0;if(!1===n)return!1;var q=Number(n);
return isNaN(q)?n:q}function b(n){if(l.emulateErrors.themeParseError)throw Error("Error test: something crashed during the parsing of the theme!");if("object"===typeof n)for(var q in n){var r=n[q];if(f[q]){var u=[],v=Object.keys(r);if(v.length){var w=v.every(function(A){return-1!==A.indexOf("_")});v.forEach(function(A,E){u[w?A.split("_")[1]:E]=r[A]})}n[q]=u}else b(r)}}var g={};d=d.replace(/\r?\n|\r/g,"");d=d.replace(/(\w|\d)_(\w|\d)/g,"$1@$2");d=d.replace("data:","dataM");d=d.replace(";base64","Mbase64");
var h=function(){var n={};(d.match(/\..*?\}/g)||[]).forEach(function(q){var r=q.substring(1,q.indexOf("{")).trim(),u={};q.substring(q.indexOf("{")+1,q.indexOf("}")).trim().split(";").forEach(function(v){if(v=v.trim()){v=v.split(":");var w=v[1].trim();w=w.replace("dataM","data:");w=w.replace("Mbase64",";base64");u[v[0].trim()]=w}});n[r]=u});return n}(),m;for(m in h)a(c(m),h[m]);delete g.themeMetadata;b(g);p.populateMissingStyles(g);return g}}})},"esri/dijit/geoenrichment/ReportPlayer/core/themes/ThemeUpdateUtil":function(){define(["dojo/_base/lang",
"esri/dijit/geoenrichment/utils/ObjectUtil","./ThemeLibrary","./ThemeUtil"],function(t,p,l,k){return{populateMissingStyles:function(f){if(f){f.table&&f.table.overrideStyles||(f.table={overrideStyles:t.mixin({},f.table)});f.icon||(f.icon=t.clone(f.infographic.staticInfographic.icon),f.highlightedIcon=t.clone(f.infographic.staticInfographic.highlightedIcon));f.chart.icon||(f.chart.icon=t.clone(f.infographic.staticInfographic.icon));f.chart.xAxis.lineColor||(f.chart.xAxis.lineColor=f.chart.xAxis.axisStyle.color,
f.chart.yAxis.lineColor=f.chart.yAxis.axisStyle.color);var d=k.getThemeColors(f),c=f.chart.colors.slice(),a=f.chart.colors3series&&f.chart.colors3series.slice(),e=l.getDefaultTheme({defaultFontFamilty:f.document.fontFamily,defaultFontSize:f.document.fontSize});k.applyThemeColorsToTheme({theme:e,colors:d,chartColors:c,colors3series:a});p.populateObject(f,e,!1)}}}})},"esri/dijit/geoenrichment/utils/async/AsyncQueue":function(){define("dojo/_base/declare dojo/_base/lang esri/dijit/geoenrichment/Deferred esri/dijit/geoenrichment/when dijit/Destroyable ../DelayUtil".split(" "),
function(t,p,l,k,f,d){var c=t(f,{_lastPromise:null,_isFinished:!1,_isDestroyed:!1,_lastDfd:null,_lastResult:null,constructor:function(a){p.mixin(this,a)},add:function(a,e){e=e||{};var b=this;if(!this._isDestroyed){this._lastDfd||(this.onStarted(),this._lastDfd=new l);this._isFinished=!1;var g=function(){var m=function(){if(!b._isDestroyed)try{return"function"===typeof a?a():a}catch(q){return(new l).reject(q)}},n=0<=e.delayBefore?function(){return d.delay(m,e.delayBefore)}:m;return(0<=e.delayAfter?
function(){return k(n(),function(q){return d.delay(function(){return q},e.delayAfter)})}:n)()};!this._lastPromise||this._lastPromise.isFulfilled()?this._lastPromise=k(g()):this._lastPromise=k(this._lastPromise).then(g);var h=this._lastPromise;k(h,function(m){h!==b._lastPromise||b._isDestroyed||b._isFinished||h&&!h.isFulfilled()||(b._isFinished=!0,b._lastDfd.resolve(m),b._lastResult=m,b._lastDfd=null,b.onFinished(m))},this._lastDfd.reject);return this.getPromise()}},getPromise:function(){return this._isDestroyed?
null:this._lastDfd&&this._lastDfd.promise||this._lastResult},isFinished:function(){return this._isFinished},isDestroyed:function(){return this._isDestroyed},destroy:function(){this._isDestroyed=!0},onStarted:function(){},onFinished:function(a){}});c.executeFunctions=function(a,e,b){b=b||{};var g=new c,h=[];a.forEach(function(m,n){g.add(function(){return k(m(),function(q){h.push(q);return q})},{delayBefore:0===n?void 0:e})});b.onQueueReady&&b.onQueueReady(g);return k(g.getPromise(),function(m){return b.collectResults?
h:m})};c.processArrayInBatches=function(a,e){function b(){if(a.length){for(var h=[],m=0;m<e.batchSize&&a.length;m++)h.push(a.shift());e.processBatch?e.callback(h):h.forEach(e.callback);setTimeout(b,e.timeout||0)}else g.resolve()}a=a.slice();var g=new l;b();return g.promise};return c})},"esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/map/WebMapJsonUtil":function(){define([],function(){return{processWebMapJson:function(t,p){function l(f,d,c){f=f.featureCollection.layers[0].featureSet.features[0];
f.attributes=f.attributes||{};f.attributes[d]=c}var k=JSON.parse(p);k.operationalLayers.forEach(function(f){var d=f.featureCollection&&f.featureCollection.layers&&1===f.featureCollection.layers.length?f.featureCollection.layers[0].id:void 0;"string"===typeof d&&0===d.indexOf("SiteLayer")?(f.isSiteLayer=!0,(d=0===d.indexOf("SiteLayer.")?d.replace("SiteLayer.",""):void 0)&&l(f,"STORE_ID",d)):"string"===typeof d&&0===d.indexOf("StudyAreasLayer.")?(f.isSiteLayer=!0,l(f,"AREA_ID",d.replace("StudyAreasLayer.",
""))):"string"===typeof d&&0===d.indexOf("LocatorResultsLayer.")?(f.isLocatorLayer=!0,f.calculatorName=d.replace("LocatorResultsLayer.","")):"string"===typeof d&&0===d.indexOf("ComparisonResultsLayer.")?(f.isComparisonLayer=!0,f.calculatorName=d.replace("ComparisonResultsLayer.","")):f.isOtherLayer=!0});return{fileName:t,originalString:p,webMapJson:k}}}})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/attachments/AttachmentsStoreSerializer":function(){define("esri/dijit/geoenrichment/when esri/dijit/geoenrichment/promise/all ./AttributesUtil ./NotesUtil ./CustomAttachmentsStore esri/dijit/geoenrichment/utils/ImageInfoUtil".split(" "),
function(t,p,l,k,f,d){return{getAttachmentsStoreJson:function(c,a){function e(r){if(a.noCache)return r;h=h||{};for(var u in h)if(h[u]===r)return u;u="image_"+g++;h[u]=r;return u}function b(){return p([a.saveImages&&c.getImages(),c.getAttributes(),c.getNotes()]).then(function(r){var u=r[0]||[],v=r[1]||[],w=r[2]||[];return p(u.map(function(A){return p([t(A.getThumbnail(),function(E){return d.ensureDataUrlForRemoveImage(E)}),t(A.getUrl(),function(E){return d.ensureDataUrlForRemoveImage(E)})]).then(function(E){A.__thumbnail=
e(E[0]);A.__url=e(E[1])})})).then(function(){return{images:u.map(function(A){var E=A.__thumbnail,F=A.__url;delete A.__thumbnail;delete A.__url;return{description:A.description,thumbnail:E,url:F,filename:A.filename,imageViewType:A.imageViewType}}),attributes:v.map(function(A){return l.attributeToJson(A)}),notes:w.map(function(A){return k.noteToJson(A)})}})})}if(!c)return null;var g=0,h,m=[],n=[];if(c.supportsMultipleAreas)for(var q=0;q<a.numAreas;q++)c.setCurrentAnalysisAreaIndex(q),n.push(t(b(),function(r){m.push(r)}));
else n.push(t(b(),function(r){m.push(r)}));return p(n).then(function(){return{supportsMultipleAreas:c.supportsMultipleAreas,areaAttachments:m,imageDataCache:h}})},getAttachmentsStoreFromJson:function(c){return c&&new f(c)}}})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/attachments/NotesUtil":function(){define([],function(){return{noteToJson:function(t){return{text:t.text}},noteFromJson:function(t){return{text:t.text}}}})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/attachments/CustomAttachmentsStore":function(){define(["dojo/_base/declare",
"esri/dijit/geoenrichment/when"],function(t,p){var l={fromJson:function(k){function f(d){return k.imageDataCache&&k.imageDataCache[d]||d}k.areaAttachments=k.areaAttachments||k.areaAttachements;delete k.areaAttachements;return{getImagesForAreaAt:function(d){d=k.supportsMultipleAreas?d:0;return(k.areaAttachments[d]&&(k.areaAttachments[d].images||k.areaAttachments[d].attachments)||[]).map(function(c){return{description:c.description,filename:c.filename,imageViewType:c.imageViewType,getThumbnail:function(){return f(c.thumbnail)},
getUrl:function(){return f(c.url)}}})},getAttributesForAreaAt:function(d){d=k.supportsMultipleAreas?d:0;return k.areaAttachments[d]&&k.areaAttachments[d].attributes||[]},getNotesForAreaAt:function(d){d=k.supportsMultipleAreas?d:0;return k.areaAttachments[d]&&k.areaAttachments[d].notes||[]}}}};return t(null,{supportsMultipleAreas:!1,_currentAreaIndex:0,_provider:null,constructor:function(k){(this._provider=k.getAttachmentsForAreaAt||k.getImagesForAreaAt||k.getAttributesForAreaAt||k.getNotesForAreaAt?
k:l.fromJson(k))&&this._provider.getAttachmentsForAreaAt&&(k.getImagesForAreaAt=function(f){return k.getAttachmentsForAreaAt(f)});this.supportsMultipleAreas=k.supportsMultipleAreas},initialize:function(){},getImages:function(){function k(d){d.forEach(function(c){!c.getUrl&&c.getAttachmentUrl&&(c.getUrl=function(){return c.getAttachmentUrl()})})}var f=this._provider.getImagesForAreaAt?this._provider.getImagesForAreaAt(this._currentAreaIndex):[];return f?Array.isArray(f)?(k(f),f):p(f,function(d){k(d);
return d}):f},getAttributes:function(){return this._provider.getAttributesForAreaAt?this._provider.getAttributesForAreaAt(this._currentAreaIndex):[]},getNotes:function(){return this._provider.getNotesForAreaAt?this._provider.getNotesForAreaAt(this._currentAreaIndex):[]},setCurrentAnalysisAreaIndex:function(k){this._currentAreaIndex=k}})})},"esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/templateJsonUtils/TemplateJsonSerializer":function(){define(["./query/TemplateJsonQueryUtil","../images/ImageDataHolder",
"../conditionalStyling/ConditionalStyleUtil"],function(t,p,l){return{serialize:function(k){this._attachImagesToTemplateJson(k);return k},_attachImagesToTemplateJson:function(k){function f(c){var a=p.getImageData(c);a&&(d[c]=a)}var d={};t.processTemplateFieldInfos(k,function(c){c.isImage?(f(c.imageJson.fileName),c.triggerJson&&l.collectImageFileNames(c.triggerJson).forEach(f)):c.isInfographic&&c.infographicJson.variableTables&&c.infographicJson.variableTables.forEach(function(a){a.image&&f(a.image.imageJson.fileName)})});
t.processSectionElements(k,function(c){"img"===c.id&&f(c.fileName)});k.imageData=d},deserialize:function(k){this._takeImagesFromTemplateJson(k);return k},_takeImagesFromTemplateJson:function(k){for(var f in k.imageData)p.putImageData(f,k.imageData[f]);delete k.imageData}}})},"esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/conditionalStyling/ConditionalStyleUtil":function(){define(["esri/dijit/geoenrichment/utils/PageUnitsConverter","esri/dijit/geoenrichment/utils/SortUtil"],function(t,
p){var l={getConditionalStyle:function(a,e,b){return(a=l.getMatchedCase(a,e,b))?l.styleFromSetters(a.setters):null},getMatchedCase:function(a,e,b){if(null!==a&&""!==a&&(a=Number(a),e&&!isNaN(a))){var g;e.cases.some(function(h){if(l._checkValueMatchesCase(a,h,b))return g=h,!0});return g}},_checkValueMatchesCase:function(a,e,b){function g(h,m,n){n=b?(h=+h,b(+n)):n;switch(m){case "\x3d":return h===n;case "\x3c":return h<n;case "\x3e":return h>n;case "\x3c\x3d":return h<=n;case "\x3e\x3d":return h>=n}return!1}
return e.compareInfos&&e.compareInfos.length&&e.compareInfos.every(function(h){return g(a,h.operator,Number(h.value))})}},k={FontSize:"fontSize",FontColor:"fontColor",FontFamily:"fontFamily",ForeColor:"color",BackColor:"backgroundColor"},f={},d;for(d in k)f[k[d]]=d;l.styleFromSetters=function(a){if(!a)return null;var e={};a.forEach(function(b){k[b.property]&&(e[k[b.property]]=b.value);"IsBold"===b.property&&(e.fontWeight="True"===b.value?"bold":"normal");"IsItalic"===b.property&&(e.fontStyle="True"===
b.value?"italic":"normal");"IsUnderlined"===b.property&&(e.textDecoration="True"===b.value?"underline":"none")});t.ptToPxObj(e);return e};l.settersFromStyle=function(a){var e=[];a=t.pxToPtObj(a,!0);for(var b in a){var g=f[b],h=a[b];!g||"string"!==typeof h&&isNaN(h)||e.push({property:g,value:h});"fontWeight"===b?e.push({property:"IsBold",value:"bold"===h?"True":"False"}):"fontStyle"===b?e.push({property:"IsItalic",value:"italic"===h?"True":"False"}):"textDecoration"===b&&e.push({property:"IsUnderlined",
value:"underline"===h?"True":"False"})}return e};l.getConditionalFileName=function(a,e,b){function g(h){var m;e.cases.some(function(n){return n.isDefault===h?(m=n,!0):!1});return m}return(a=(a="first-non-default"===a?g(!1):l.getMatchedCase(a,e,b))||g(!0))?a.setters[0].value:null};var c=/\.png$/i;l.collectImageFileNames=function(a){var e=[];a&&a.cases&&a.cases.forEach(function(b){b.setters&&b.setters.forEach(function(g){"Source"===g.property&&c.test(g.value)&&e.push(g.value)})});return e};l.isSupportedStyleCalcMethod=
function(a){return"percentInGroup"===a||"aboveAverage"===a||"belowAverage"===a||"indexDescOrder"===a};l.getConditionalStylesOrFileNamesForGroup=function(a,e,b){var g=e.map(function(w,A){return{value:w,index:A}}),h=[];for(e=0;e<g.length;e++)h.push(void 0);if(g.length){var m=a.calcMethod;g=g.filter(function(w){return"number"===typeof w.value&&!isNaN(w.value)});m&&(g=g.sort(function(w,A){return p.compareNumeric(w.value,A.value,"indexDescOrder"===m)}));if(g.length)if(m)if("percentInGroup"===m){var n=
g[0].value,q=g[g.length-1].value;var r={min:n,max:q};g.forEach(function(w){var A=(w.value-n)/(q-n||.001)*100;h[w.index]=b?l.getConditionalFileName(A,a):l.getConditionalStyle(A,a)})}else if("indexDescOrder"===m){r={min:null,max:null,numElements:g.length};var u=function(w){return 0<=w?w:g.length+w};g.forEach(function(w,A){h[w.index]=b?l.getConditionalFileName(A,a,u):l.getConditionalStyle(A,a,u)})}else{e=function(){var w=0;g.forEach(function(A){w+=A.value});return w/g.length};if("aboveAverage"===m){var v=
e();g=g.filter(function(w){return w.value>v})}else if("belowAverage"===m)v=e(),g=g.filter(function(w){return w.value<v});else return{styles:h};g.forEach(function(w){h[w.index]=b?l.getConditionalFileName("first-non-default",a):l.styleFromSetters(a.cases[0].setters)})}else g.forEach(function(w){h[w.index]=b?l.getConditionalFileName(w.value,a):l.getConditionalStyle(w.value,a)})}return{styles:h,stats:r}};l.conditionalValueFromPercentInGroup=function(a,e,b){return a+b/100*(e-a)};l.getStatistics=function(a){var e=
Infinity,b=-Infinity,g,h;if(a)if(a.calcMethod&&"percentInGroup"!==a.calcMethod){e=0;b=100;var m=!0}else a.cases.forEach(function(n){n.compareInfos&&n.compareInfos.forEach(function(q){var r=Number(q.value);isNaN(r)||(r<e&&(e=r,g="\x3c"===q.operator||"\x3c\x3d"===q.operator),r>b&&(b=r,h="\x3e"===q.operator||"\x3e\x3d"===q.operator),m=!0)})});return m&&-1E12<e&&1E12>e&&-1E12<b&&1E12>b?{calcMethod:a.calcMethod,min:e,max:b,canFallBelowMin:g,canFallAboveMax:h}:null};return l})},"esri/dijit/geoenrichment/utils/SortUtil":function(){define([],
function(){function t(f,d,c,a){f=void 0===f||null===f;return f!=(void 0===d||null===d)?(d=f?-1:1,(void 0===a?c:a)?-d:d):f?0:null}function p(f){var d=/^(.+)\s([1-9]\d*)$/.exec(f);return d?{base:d[1],number:d[2]}:/^[1-9]\d*$/.test(f)?{base:"",number:+f}:{base:f,number:0}}var l={NEWEST:"newest",OLDEST:"oldest",ALPHABETICAL:"alphabetical",UNALPHABETICAL:"unalphabetical",compareNumeric:function(f,d,c,a){a=t(f,d,c,a);if(null!==a)return a;f=Number(f);d=Number(d);a=f>d?1:f<d?-1:0;return c?-a:a},compareString:function(f,
d,c,a){a=t(f,d,c,a);if(null!==a)return a;f=String(f);d=String(d);a=f.localeCompare(d);return c?-a:a}},k=/^(.+)\s([1-9]\d*)(\D*)$/;l.compareNames=function(f,d,c,a){var e=p("string"===typeof f?f.toLowerCase():f),b=p("string"===typeof d?d.toLowerCase():d),g=null;if(e.base===b.base)g=l.compareNumeric(e.number,b.number,c,a);else{var h=k.exec(e.base);if(h){var m=k.exec(b.base);m&&h[1]===m[1]&&h[3]===m[3]&&(g=l.compareNumeric(h[2],m[2],c,a))}null===g&&(g=l.compareString(e.base,b.base,c,a))}return g||l.compareString(f,
d,c,a)};l.compare=function(f,d,c,a){var e=t(f,d,c,a);if(null!==e)return e;e=typeof f;typeof d!=e&&(e="");switch(e){case "number":case "boolean":break;case "object":f=f.valueOf();d=d.valueOf();break;default:return l.compareString(f,d,c,a)}e=f>d?1:f<d?-1:0;return c?-e:e};return l})},"esri/dijit/geoenrichment/ReportPlayer/core/conversion/portalToEditorUtils/metadata/MetadataFromDataBuilder":function(){define(["esri/dijit/geoenrichment/utils/JsonXmlConverter","./map/RendererToMetadataConverter"],function(t,
p){var l={},k={STORE_ID:1,AREA_ID:1,StdGeographyName:1,StdGeographyID:1,StdGeographyLevel:1};l.recoverMetadataFromAreaData=function(f,d){f=f[0];var c={name:"DataCollection",tags:[{name:"Calculators",tags:[]}]},a={},e;for(e in f){var b=f[e].data,g=f[e].comparisonLevels,h=d.map[e],m=!!h;h=m&&"object"===typeof h&&h.webMapJson||null;var n=d.locator[e];n={name:m?"Maps":n?"Locator":"DataCollections",attributes:{Name:e},tags:[]};c.tags[0].tags.push(n);var q=[];if(m)for(var r in b){if(!k[r]){var u={name:"Map",
attributes:{Name:r},tags:[{name:"Layers",tags:[]}]};h&&h.operationalLayers.forEach(function(A){if(A.isLocatorLayer){var E={name:"LocatorResultsLayer",attributes:{CalculatorName:A.calculatorName},tags:[p.convertRendererJson(A.featureCollection.layers[0].layerDefinition.drawingInfo.renderer)]};a[A.calculatorName]=A.featureCollection.layers[0].title;u.tags[0].tags.push(E)}A.isComparisonLayer&&(E=A.featureCollection.layers[0].layerDefinition.drawingInfo,A={name:"ComparisonResultsLayer",attributes:{CalculatorName:A.calculatorName},
tags:[p.convertRendererJson(E.renderer)]},E.labelingInfo&&A.tags.push(p.convertLabelingInfo(E.labelingInfo)),u.tags[0].tags.push(A))});q.push(u)}}else for(r in b)q.push({name:"Field",attributes:{Name:r,Alias:r,MapTo:"DC."+r,Type:"number"===typeof b[r]?"Double":"String"}});n.tags.push({name:"Fields",tags:q});if(g&&g.length){var v=[],w={};g.forEach(function(A){A.StdGeographyLevel&&!w[A.StdGeographyLevel]&&(w[A.StdGeographyLevel]=1,v.push(A.StdGeographyLevel))});v.length&&n.tags.push({name:"ComparisonLevels",
tags:v.map(function(A){return{name:"ComparisonLevel",attributes:{Name:A}}})})}}c.tags[0].tags.forEach(function(A){if("Locator"===A.name){var E=a[A.attributes.Name];E&&(A.attributes.LayerName=E)}});return t.parseJson(c)};return l})},"esri/dijit/geoenrichment/ReportPlayer/core/conversion/portalToEditorUtils/metadata/map/RendererToMetadataConverter":function(){define(["dojo/_base/lang","esri/dijit/geoenrichment/utils/JsonXmlTypedConverter","esri/dijit/geoenrichment/utils/JsonXmlConverter"],function(t,
p,l){var k={convertRendererJson:function(f){switch(f.type){case "simple":"esriPMS"===f.symbol.type&&(f=t.clone(f),delete f.symbol.url)}return l.parseXml(p.parseJson(f,{rootName:"Renderer"}))},convertLabelRendererJson:function(f){f=f.uniqueValueInfos.map(function(d){return{labelExpressionInfo:{expression:"$feature.StdGeographyName"},where:"StdGeographyLevel\x3d'"+d.value+"'",labelPlacement:"esriServerPolygonPlacementAlwaysHorizontal",symbol:d.symbol}});return k.convertLabelingInfo(f)},convertLabelingInfo:function(f){return l.parseXml(p.parseJson(f,
{rootName:"LabelingInfo"}))}};return k})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/TemplateJsonLoader":function(){define("dojo/_base/lang esri/dijit/geoenrichment/Deferred esri/dijit/geoenrichment/when esri/dijit/geoenrichment/utils/CacheUtil ./CustomReportsManager ./GenericTemplateGenerator ./dataCollections/DataCollectionsLoader ../../core/conversion/PortalToEditorConverter ../../core/conversion/portalToEditorUtils/variables/PlayerVariableProvider ../../core/supportClasses/templateJsonUtils/fieldInfo/FieldInfoNameUtil ../../core/conversion/portalToEditorUtils/parsers/_FieldInfoBuilder".split(" "),
function(t,p,l,k,f,d,c,a,e,b,g){var h={_getCache:function(){return k.get("TemplateJsonLoader")},getCachedTemplateJsonPromise:function(m,n){m=m+";"+n.reportID;return(m=this._getCache()[m])&&m.modified===n.modified?m.promise.then(function(q){return{templateJson:t.clone(q.templateJson),templateVariableProvider:q.templateVariableProvider}}):null},putCachedTemplateJsonPromise:function(m,n,q){n=n+";"+q.reportID;this._getCache()[n]={modified:q.modified,promise:m}}};return{getTemplateJsonByID:function(m,
n){var q=this,r=new p;l(f.getCustomReportByID(m),function(u){if(u){var v=n&&h.getCachedTemplateJsonPromise(m.countryID,u);v?v.then(r.resolve,r.reject):(v=q._loadCustomReportData(u).then(function(){var w=new e;return l(a.provideEditorJson(u,{variableProvider:w}),function(){var A=u.templateJson;u.portalJson=null;u.templateJson=null;return{templateJson:A,templateVariableProvider:w}})}),n?(h.putCachedTemplateJsonPromise(v,m.countryID,u),h.getCachedTemplateJsonPromise(m.countryID,u).then(r.resolve,r.reject)):
v.then(r.resolve,r.reject))}else r.reject("Can't find a report")},r.reject);return r.promise},_loadCustomReportData:function(m){m.portalJson=null;return m.templateData.getFiles().then(function(n){m.portalJson={files:n}})},createTemplateJsonFromVariables:function(m){return c.loadVariables({countryID:m.countryID,outFields:["description","precision","type","vintage"],forceLowerCase:!0}).then(function(n){var q=new e,r=n.fullNameToVariableCache;n=m.variables.fullNames.map(function(u){var v=b.createFieldNameFromSource(u),
w=m.variables.customDataMapping[u];w=w?w.variable:r[u];u={id:w.id.toLowerCase(),fullName:u,alias:w.description,fieldName:v,precision:w.precision,calculatorName:b.DATA_COLLECTIONS_CALCULATOR_NAME,templateName:b.DATA_COLLECTIONS_CALCULATOR_NAME+"."+v,type:w.type,vintage:w.vintage};q.addVariable(u);return g.getCalculatorOrScriptFieldInfo(u.templateName,{variableProvider:q})});return{templateJson:d.generateTemplatesFromFieldInfos(n,{comparisonLevels:m.comparisonLevels}),templateVariableProvider:q}})}}})},
"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/GenericTemplateGenerator":function(){define("../../core/supportClasses/templateJsonUtils/BlankTemplateJsonUtil ../../core/supportClasses/templateJsonUtils/fieldInfo/FieldInfoBuilder ../../core/supportClasses/tableJson/TableJsonUtil ../../core/sections/sectionUtils/SectionJsonUtil ../../core/infographics/InfographicTypes ../../core/infographics/utils/InfographicJsonUtil".split(" "),function(t,p,l,k,f,d){var c={},a={calcNumRowsColumns:function(g){var h=
2>=g?1:6>=g?2:12>=g?3:Math.ceil(g/4);var m=1===g?1:4>=g?2:9>=g?3:4;return{numRows:h,numColumns:m,numVarsInLastRow:m-(h*m-g),lastRowCellIndexes:null,lastRowCellWidths:null}}},e={mergeLastRow:function(g,h,m){2===h.numColumns?1===h.numVarsInLastRow&&(l.modifyTableJson(g,h.numRows-1,0,{columnSpan:2}),h.lastRowCellWidths=[2*m]):3===h.numColumns?1===h.numVarsInLastRow?(l.modifyTableJson(g,h.numRows-1,0,{columnSpan:3}),h.lastRowCellWidths=[3*m]):2===h.numVarsInLastRow&&(l.modifyTableJson(g,h.numRows-1,0,
{cellStyle:{width:1.5*m}}),l.modifyTableJson(g,h.numRows-1,1,{columnSpan:2,cellStyle:{width:.5*m}}),h.lastRowCellWidths=[1.5*m,1.5*m]):4===h.numColumns&&(1===h.numVarsInLastRow?(l.modifyTableJson(g,h.numRows-1,0,{columnSpan:4}),h.lastRowCellWidths=[4*m]):2===h.numVarsInLastRow?(l.modifyTableJson(g,h.numRows-1,0,{columnSpan:2}),l.modifyTableJson(g,h.numRows-1,2,{columnSpan:2}),h.lastRowCellIndexes=[0,2],h.lastRowCellWidths=[2*m,2*m]):3===h.numVarsInLastRow&&(l.modifyTableJson(g,h.numRows-1,0,{cellStyle:{width:4*
m/3}}),l.modifyTableJson(g,h.numRows-1,1,{columnSpan:2,cellStyle:{width:2*m/3}}),l.modifyTableJson(g,h.numRows-1,2,{cellStyle:{width:2*m/3}}),l.modifyTableJson(g,h.numRows-1,3,{cellStyle:{width:4*m/3}}),h.lastRowCellIndexes=[0,1,3],h.lastRowCellWidths=[4*m/3,4*m/3,4*m/3]))}},b={insertNextPanel:function(g,h,m){void 0===h.currentRowIndex&&(h.currentRowIndex=0,h.currentColumnIndex=0);var n=h.currentRowIndex===h.numRows-1;g.rows[h.currentRowIndex].fieldInfos["field"+(n&&h.lastRowCellIndexes?h.lastRowCellIndexes[h.currentColumnIndex]:
h.currentColumnIndex)]=m(n&&h.lastRowCellWidths&&h.lastRowCellWidths[h.currentColumnIndex]);h.currentColumnIndex++;h.currentColumnIndex>h.numColumns-1&&(h.currentColumnIndex=0,h.currentRowIndex++)}};c.generateTemplatesFromFieldInfos=function(g){var h=a.calcNumRowsColumns(g.length),m=t.createBlankTemplate({elementWidth:500,elementHeight:250,layout:{numRows:h.numRows,numColumns:h.numColumns}}),n=m.sectionsTables[0];e.mergeLastRow(n,h,500);g.forEach(function(q){b.insertNextPanel(n,h,function(r){var u=
c._createInfographicJson(q,r||500,250);r=l.createSingleCellTable({width:r||500,height:250,fieldInfo:p.createFieldInfoFromInfographic(u)});return p.createFieldInfoFromSection(k.wrapInDetailsSectionJson(r))})});return m};c._createInfographicJson=function(g,h,m){return{type:f.ONE_VAR,title:g.alias,style:{width:h,height:m},levels:d.getDefaultLevels(),fieldInfos:[g],calcData:{calculatorName:g.templateName.substr(0,g.templateName.indexOf(".")),variables:[g.fullName]}}};return c})},"esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/templateJsonUtils/BlankTemplateJsonUtil":function(){define(["esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/DocumentOptions",
"./TemplateJsonModificationUtil"],function(t,p){return{createBlankTemplate:function(l){var k={},f=l.documentOptions||t.getDefaultDocumentOptionsGraphicReport();f.pagesize=t.combineCustomSizeString(f.left+f.right+l.layout.numColumns*l.elementWidth,f.top+f.bottom+l.layout.numRows*l.elementHeight,"px");k.documentOptions=f;f={style:{width:l.layout.numColumns*l.elementWidth},columns:[],rows:[]};for(var d=0;d<l.layout.numColumns;d++)f.columns.push({field:"field"+d,style:{width:l.elementWidth}});for(d=0;d<
l.layout.numRows;d++)f.rows.push({style:{height:l.elementHeight},fieldInfos:{}});k.sectionsTables=[f];p.adjustDocumentOptions(k);return k}}})},"esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/templateJsonUtils/TemplateJsonModificationUtil":function(){define(["esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/DocumentOptions","esri/dijit/geoenrichment/ReportPlayer/core/grid/coreUtils/GridLayoutCalculator"],function(t,p){var l={},k={getJsonStat:function(d){var c=0,a=0,e=[];d.sectionsTables.forEach(function(b){var g=
0;b.columns.forEach(function(m){g+=f.getFieldWidth(b,b.rows[0],m)});c=Math.max(c,g);var h=0;b.rows.forEach(function(m){h+=f.getDataHeight(b,m,b.columns[0])});a=Math.max(a,h);e.push({totalW:g,totalH:h})});return{tableInfos:e,totalWMax:c,totalHMax:a}}},f={getFieldWidth:function(d,c,a){return p.getFieldWidth({looseResize:!0},c,a)||a.style.width},getDataHeight:function(d,c,a){return p.getDataHeight({looseResize:!0},c,a.field)},getAverageFieldWidth:function(d,c){var a=0;d.rows.forEach(function(e){a+=f.getFieldWidth(d,
e,c)});return a/d.rows.length},getAverageDataHeight:function(d,c){var a=0;d.columns.forEach(function(e){a+=f.getDataHeight(d,c,e)});return a/d.columns.length}};l.adjustDocumentOptions=function(d){if(d.documentOptions){var c=k.getJsonStat(d);c.totalWMax&&c.totalHMax&&!isNaN(c.totalWMax)&&!isNaN(c.totalHMax)&&(d=d.documentOptions,d.pagesize=t.combineCustomSizeString(d.left+d.right+c.totalWMax,d.top+d.bottom+c.totalHMax,"px"),(c=t.getClosestStandrdSizes(d)[0])&&.001>c.score&&c.orientation===d.orientation&&
(d.pagesize=c.pagesize))}};l.JsonStatCollector=k;l.DataUtil=f;return l})},"esri/dijit/geoenrichment/ReportPlayer/core/grid/coreUtils/GridLayoutCalculator":function(){define("dojo/_base/lang ./gridLayoutCalcUtils/GridLayoutCalculatorQueryUtil ./gridLayoutCalcUtils/GridElementBoxCalculator ./gridLayoutCalcUtils/GridCellNodePlacer ./gridLayoutCalcUtils/rows/GridLayoutRowsCalculator ./gridLayoutCalcUtils/columns/GridLayoutColumnsCalculator ./gridLayoutCalcUtils/GridLayoutSnapper ../../supportClasses/tableJson/TableJsonUtil".split(" "),
function(t,p,l,k,f,d,c,a){var e={};l.calculator=e;e.markAsDirty=p.markAsDirty;e.fieldToColumn=p.fieldToColumn;e.dataIdToData=p.dataIdToData;e.getSpannedColumns=p.getSpannedColumns;e.recalcRows=f.recalcRows;e.recalcColumns=d.recalcColumns;e.recalcColumnsTableJson=d.recalcColumnsTableJson;e.recalcRowsToFitHeight=f.recalcRowsToFitHeight;e.adjustColumnWidth=d.adjustColumnWidth;e.getAffectedCellsForColumnAdjust=d.getAffectedCells;e.adjustRowHeight=f.adjustRowHeight;e.getAffectedCellsForRowAdjust=f.getAffectedCells;
e.recalcGridWidth=d.recalcGridWidth;e.calcFieldWidth=d.calcFieldWidth;e.getFieldWidth=d.getFieldWidth;e.setFieldWidth=d.setFieldWidth;e.calcDataHeight=f.calcDataHeight;e.getDataHeight=f.getDataHeight;e.setDataHeight=f.setDataHeight;e.autoSnapLayout=c.autoSnapLayout;e.positionCells=k.positionCells;e.calcFeatureCount=function(b,g,h){return(b-g)/h};e.calcRingIndexForCell=function(b){var g=b.parentGrid;if(!g)return-1;if(g.getNumDynamicRows())return void 0!==b.row.currentFeatureIndex?b.row.currentFeatureIndex:
b.row.index-g.getNumFixedRows();var h=g.getNumFixedColumns();return b.column.index<h?-1:Math.floor((b.column.index-h)/g.getNumDynamicColumns())};e.trimColumnsForNumberOfFeatures=function(b){for(var g=b.viewModel.dynamicReportInfo.fieldData.areaData.length,h=e.recalcGridWidth(b),m=0,n=0;n<b.getNumFixedColumns();n++)m+=b.columns[n].style.width;h-=m;m=e.calcFeatureCount(b.columns.length,b.getNumFixedColumns(),b.getNumDynamicColumns())-g;if(!(0>m)){var q=b.columns.slice();n=q.length=b.getNumFixedColumns();
for(var r=[],u=0;b.columns[n];){for(var v=0;v<g;v++){var w=b.columns[n++];u+=w.style.width;r.push(w)}n+=m}var A=h/u;r.forEach(function(E){E.style.width*=A});b.columns=q.concat(r)}};e.adjustRowsForNumberOfFeatures=function(b){var g=b.viewModel.dynamicReportInfo.fieldData.areaData.length;if(!(1>=g)){var h=b.rows[b.getNumFixedRows()];h.currentFeatureIndex=0;for(var m=1;m<g;m++){var n=t.clone(h);n.currentFeatureIndex=m;b.rows.push(n)}a.applyDefaultStyling({rows:b.rows,columns:b.columns})}};return e})},
"esri/dijit/geoenrichment/ReportPlayer/core/grid/coreUtils/gridLayoutCalcUtils/GridLayoutCalculatorQueryUtil":function(){define([],function(){var t={markAsDirty:function(p){p._fieldToColumnHash=null;p._dataIdToDataHash=null},_calcGridHashes:function(p){p._fieldToColumnHash={};p.columns.forEach(function(l){p._fieldToColumnHash[l.field]=l});p._dataIdToDataHash={};p.rows.forEach(function(l){p._dataIdToDataHash[l.id]=l})},fieldToColumn:function(p,l){p._fieldToColumnHash||t._calcGridHashes(p);return p._fieldToColumnHash&&
p._fieldToColumnHash[l]},dataIdToData:function(p,l){p._dataIdToDataHash||t._calcGridHashes(p);return p._dataIdToDataHash&&p._dataIdToDataHash[l]},getSpannedColumns:function(p,l,k){var f=[];if(1>k)return[];var d;p.columns.some(function(c){if(d||c.field===l)f.push(c),d=!0;if(f.length===k)return!0});return f},getColumnSpannedFields:function(p,l,k){var f=null,d=l.fieldToRowSpanSourceDataIndex&&l.fieldToRowSpanSourceDataIndex[k];l=void 0!==d?p.rows[d]:l;l=l.columnSpans&&l.columnSpans[k];if(1<l)for(f=[],
k=t.fieldToColumn(p,k),d=k=p.columns.indexOf(k);d<k+l;d++)f.push(p.columns[d].field);return f},getRowSpannedData:function(p,l,k){var f=null;k=l.fieldToColumnSpanSourceField&&l.fieldToColumnSpanSourceField[k]||k;k=l.rowSpans&&l.rowSpans[k];if(1<k){f=[];for(var d=l=p.rows.indexOf(l);d<l+k;d++)f.push(p.rows[d])}return f},getMovableData:function(p,l,k){return(l=l.movableIndexHashVertical&&l.movableIndexHashVertical[k])&&p.rows[l]},getMovableColumn:function(p,l,k){return(l=l.movableFieldsHashHorizontal&&
l.movableFieldsHashHorizontal[k])&&t.fieldToColumn(p,l)}};return t})},"esri/dijit/geoenrichment/ReportPlayer/core/grid/coreUtils/gridLayoutCalcUtils/GridElementBoxCalculator":function(){define([],function(){function t(l,k,f,d,c){function a(n){return d&&void 0!==d.places?Number(n.toFixed(d.places)):n}if(!k||!f)return null;var e=p.calculator[c?"getFieldWidth":"calcFieldWidth"](l,k,f);c=p.calculator[c?"getDataHeight":"calcDataHeight"](l,k,f);for(var b=0,g=0,h=p.calculator.fieldToColumn(l,f),m=0;m<h.index;m++)b+=
p.calculator.getFieldWidth(l,k,l.columns[m].field);for(m=0;m<k.index;m++)g+=p.calculator.getDataHeight(l,l.rows[m],f);return{x:a(b),y:a(g),w:a(e),h:a(c)}}var p={calculator:null,calcCellBox:function(l,k){return t(l.parentGrid,l.row,l.column.field,k,!1)},calcDataBox:function(l,k,f,d){return t(l,k,f,d,!0)}};return p})},"esri/dijit/geoenrichment/ReportPlayer/core/grid/coreUtils/gridLayoutCalcUtils/GridCellNodePlacer":function(){define(["./rows/GridLayoutRowsCalculator","./columns/GridLayoutColumnsCalculator"],
function(t,p){return{positionCells:function(l){var k={},f={},d={},c={};if(l.rows.length){l.rows.forEach(function(g,h){l.columns.forEach(function(m,n){var q=d[n]||0,r=c[h]||0,u=t.getDataHeight(l,g,m.field);m=p.getFieldWidth(l,g,m.field);q+=u;r+=m;f[n+"_"+h]=q;k[n+"_"+h]=r;d[n]=q;c[h]=r})});l.getCells().forEach(function(g){g.domNode.style.left=(k[g.column.index-1+"_"+g.row.index]||0)+"px";g.domNode.style.top=(f[g.column.index+"_"+(g.row.index-1)]||0)+"px"});var a=0,e;for(e in d)a=Math.max(a,d[e]);var b=
0;for(e in c)b=Math.max(b,c[e]);l.mainNode.style.width=b+"px";l.mainNode.style.height=a+"px";l.domNode.style.width=b+"px";l.domNode.style.height=a+"px";l._width=b;l._height=a}}}})},"esri/dijit/geoenrichment/ReportPlayer/core/grid/coreUtils/gridLayoutCalcUtils/rows/GridLayoutRowsCalculator":function(){define(["./RowsProcessor","./RowsScaler","./RowDataUtil","./RowModifier"],function(t,p,l,k){var f={};f.recalcRows=t.recalcRows;f.recalcRowsToFitHeight=p.recalcRowsToFitHeight;f.adjustRowHeight=k.adjustRowHeight;
f.getAffectedCells=k.getAffectedCells;f.getDataHeight=l.getDataHeight;f.setDataHeight=l.setDataHeight;f.calcDataHeight=l.calcDataHeight;return f})},"esri/dijit/geoenrichment/ReportPlayer/core/grid/coreUtils/gridLayoutCalcUtils/rows/RowsProcessor":function(){define(["dojox/uuid/generateRandomUuid","./RowDataUtil","../GridLayoutCalculatorQueryUtil"],function(t,p,l){function k(d,c){var a=[],e,b=0;c&&Object.keys(c).forEach(function(g){l.fieldToColumn(d,g)?b++:delete c[g]});b&&d.columns.some(function(g){if(e||
c[g.field])a.push(g),e=!0;c[g.field]&&b--;if(!b)return!0});return a}function f(d,c){var a=[],e,b=0;c&&Object.keys(c).forEach(function(g){l.dataIdToData(d,g)?b++:delete c[g]});b&&d.rows.some(function(g){if(e||c[g.id])a.push(g),e=!0;c[g.id]&&b--;if(!b)return!0});return a}return{recalcRows:function(d){var c={};d.columns.forEach(function(g,h){c[g.field]=h});var a;d.rows.forEach(function(g,h){g.index=h;g.style=g.style||{};g.style.fields=g.style.fields||{};void 0===g.id&&(g.id=t());void 0===g.style.height&&
(g.style.height=d.layoutDefaults.defaultRowHeight);delete g.excludedIndexHorizontal;delete g.movableFieldsHashHorizontal;delete g.fieldToColumnSpanSourceField;if(g.columnSpans){g.excludedIndexHorizontal={};g.movableFieldsHashHorizontal={};g.fieldToColumnSpanSourceField={};g._columnSpans=g._columnSpans||{};for(a in g.columnSpans){h=g._columnSpans[a];var m={};h=h?k(d,h):l.getSpannedColumns(d,a,g.columnSpans[a]);1<h.length&&(h.forEach(function(q){m[q.field]=!0;q.field!==a&&(g.excludedIndexHorizontal[c[q.field]]=
!0,g.fieldToColumnSpanSourceField[q.field]=a)}),g.movableFieldsHashHorizontal[a]=h[h.length-1].field);g.columnSpans[a]=h.length;g._columnSpans[a]=m}var n=0;Object.keys(g.columnSpans).forEach(function(q){2>g.columnSpans[q]?(delete g.columnSpans[q],delete g._columnSpans[q]):n++});n||(delete g.columnSpans,delete g._columnSpans)}delete g.excludedIndexVertical;delete g.movableIndexHashVertical;delete g.fieldToRowSpanSourceDataIndex;g.fieldInfos=g.fieldInfos||{}});d.rows.forEach(function(g,h){if(g.rowSpans)for(a in g._rowSpans=
g._rowSpans||{},g.rowSpans){var m=g._rowSpans[a],n={};n[g.id]=!0;var q=c[a],r=g.rowSpans[a];if(m)m=f(d,m);else{m=[];for(var u=h;u<h+r;u++)m.push(d.rows[u])}1<m.length&&(m.forEach(function(v){if(v.id!==g.id){v.excludedIndexVertical=v.excludedIndexVertical||{};v.excludedIndexVertical[q]=!0;v.fieldToRowSpanSourceDataIndex=v.fieldToRowSpanSourceDataIndex||{};v.fieldToRowSpanSourceDataIndex[a]=g.index;var w=g.columnSpans&&g.columnSpans[a];if(w)for(var A=1;A<w;A++)v.excludedIndexVertical[q+A]=!0,v.fieldToRowSpanSourceDataIndex[d.columns[q+
A].field]=g.index}n[v.id]=!0}),g.movableIndexHashVertical=g.movableIndexHashVertical||{},g.movableIndexHashVertical[a]=h+m.length-1);g.rowSpans[a]=m.length;g._rowSpans[a]=n}});d.rows.forEach(function(g,h){if(g.rowSpans){for(a in g.rowSpans)g.rowSpans[a]=Math.min(g.rowSpans[a],d.rows.length-h);var m=0;Object.keys(g.rowSpans).forEach(function(n){2>g.rowSpans[n]?(delete g.rowSpans[n],g._rowSpans&&delete g._rowSpans[n]):m++});m||(delete g.rowSpans,delete g._rowSpans)}});d.rows.forEach(function(g,h){g.fieldInfos&&
Object.keys(g.fieldInfos).forEach(function(m){void 0===c[m]&&delete g.fieldInfos[m]});g.style&&g.style.fields&&Object.keys(g.style.fields).forEach(function(m){void 0===c[m]&&delete g.style.fields[m]})});if(d.looseResize){d.rows.forEach(function(g){d.columns.some(function(h){p.getDataHeightOwn(d,g,h.field)||p.setDataHeight(d,g,h.field,g.style.height)})});var e=d.rows[d.rows.length-1],b=p.recalcGridHeight(d);d.columns.some(function(g){var h=0;d.rows.forEach(function(n){h+=p.getDataHeightOwn(d,n,g.field)});
var m=b-h;0!==m&&p.setDataHeight(d,e,g.field,p.getDataHeightOwn(d,e,g.field)+m)})}p.recalcGridHeight(d)}}})},"esri/dijit/geoenrichment/ReportPlayer/core/grid/coreUtils/gridLayoutCalcUtils/rows/RowDataUtil":function(){define(["../GridLayoutCalculatorQueryUtil"],function(t){var p={getDataHeight:function(l,k,f){return l.looseResize?p.getDataHeightOwn(l,k,f)||k.style.height||0:k.style.height||0},getDataHeightOwn:function(l,k,f){if(l.looseResize)return k.style.fields=k.style.fields||{},(k.style.fields[f]=
k.style.fields[f]||{}).height},setDataHeight:function(l,k,f,d,c){l.looseResize?(c?t.getColumnSpannedFields(l,k,f)||[f]:[f]).forEach(function(a){k.style.fields=k.style.fields||{};(k.style.fields[a]=k.style.fields[a]||{}).height=d}):k.style.height=d},calcDataHeight:function(l,k,f,d){var c=0,a=k.rowSpans&&k.rowSpans[f];if(1<a)for(var e=k.index;e<k.index+a;e++)e!==d&&(c+=p.getDataHeight(l,l.rows[e],f));else c=p.getDataHeight(l,k,f);return c},recalcGridHeight:function(l){l._height=0;var k=l.columns[0].field;
l.rows.forEach(function(f){l._height+=p.getDataHeight(l,f,k)});return l._height}};return p})},"esri/dijit/geoenrichment/ReportPlayer/core/grid/coreUtils/gridLayoutCalcUtils/rows/RowsScaler":function(){define(["./RowDataUtil"],function(t){return{recalcRowsToFitHeight:function(p,l){function k(c){c.forEach(function(a){p.columns.some(function(e,b){if(!p.looseResize&&b)return!0;t.setDataHeight(p,a,e.field,t.getDataHeight(p,a,e.field)*d)})})}var f=t.recalcGridHeight(p),d=l/f;1!==d&&(k(p.rows),p._getSavedOriginalData()&&
k(p._getSavedOriginalData()),t.recalcGridHeight(p))}}})},"esri/dijit/geoenrichment/ReportPlayer/core/grid/coreUtils/gridLayoutCalcUtils/rows/RowModifier":function(){define(["../GridLayoutCalculatorQueryUtil","./RowDataUtil","./_RowModifierLoose","./_RowModifierNormal"],function(t,p,l,k){var f={},d={checkHeightLimit:function(e,b,g,h){if(e.getMaxHeight()){var m=0;e.rows.forEach(function(n){n!==b&&(m+=p.getDataHeight(e,n,g))});h=Math.min(e.getMaxHeight()-m,h)}return h}},c={findDataToMove:function(e,
b,g,h){var m=t.getMovableData(e,b,g);m&&(e=p.calcDataHeight(e,b,g,m.index),h-=e);return{data:m||b,height:h}}},a={finalResizeGridCells:function(e){e.getCells().forEach(function(b){b.setHeight(p.calcDataHeight(e,b.row,b.column.field))})}};f.adjustRowHeight=function(e,b,g,h){h=d.checkHeightLimit(e,b,g,h);b=c.findDataToMove(e,b,g,h);(e.looseResize?l:k).adjustRowHeight(e,b.data,g,b.height);a.finalResizeGridCells(e)};f.getAffectedCells=function(e,b,g){return e.looseResize?l.getAffectedCells(e,c.findDataToMove(e,
b,g).data,g):null};return f})},"esri/dijit/geoenrichment/ReportPlayer/core/grid/coreUtils/gridLayoutCalcUtils/rows/_RowModifierLoose":function(){define("dojo/_base/lang dojox/uuid/generateRandomUuid ../GridLayoutCalculatorQueryUtil ../GridElementBoxCalculator ./RowDataUtil ../../GridQueryUtil".split(" "),function(t,p,l,k,f,d){var c={collectRowBoxes:function(g,h){for(var m=[],n=0;n<g.columns.length;){var q=g.columns[n],r=this._createEmptyBox();q=l.getColumnSpannedFields(g,h,q.field)||[q.field];r.elements=
this._getFieldsElements(g,h,q);this._measureBox(r);var u=m[m.length-1];u&&(u.nextSibling=r,r.prevSibling=u);m.push(r);n+=q.length}return m},_createEmptyBox:function(){return{id:p(),box:null,elements:[],overlappingBoxes:[],overlappingBoxesCache:{},prevSibling:null,nextSibling:null}},_getFieldsElements:function(g,h,m){var n=[];m.forEach(function(q){q={data:h,dataIndex:h.index,field:q,box:k.calcDataBox(g,h,q,{places:2})};n.push(q)});return n},_measureBox:function(g){var h=0;g.elements.forEach(function(m){h+=
m.box.w});g.box={x:g.elements[0].box.x,y:g.elements[0].box.y,h:g.elements[0].box.h,w:h}},mergeBoxesForBottomRow:function(g){var h=this._createEmptyBox();g.forEach(function(m){m.elements.forEach(function(n){h.elements.push({data:null,field:n.field,box:t.clone(n.box)})})});this._measureBox(h);h.box.h=1E6;return[h]},getBoxAtField:function(g,h){return g.filter(function(m){return m.elements[0].field===h})[0]}},a={buildInfluenceTree:function(g,h,m){function n(q,r){(r?h:g).forEach(function(u){var v;if(v=
!u.overlappingBoxesCache[q.id]){v=q.box;var w=u.box;v=!(v.x+.5>=w.x+w.w||v.x+v.w<=w.x+.5)}v&&(q.overlappingBoxes.push(u),q.overlappingBoxesCache[u.id]=!0)});q.overlappingBoxes.forEach(function(u){n(u,!r)})}m=c.getBoxAtField(g,m);n(m,!0);return m}},e={applyForce:function(g,h,m){function n(r,u){var v=r.elements[0];v.data&&f.setDataHeight(g,v.data,v.field,f.getDataHeight(g,v.data,v.field)+(u?-1:1)*q,!0);r.overlappingBoxes.forEach(function(w){n(w,!u)})}var q=this._checkDelta(g,h,m);n(h,!1)},_checkDelta:function(g,
h,m){function n(u,v){0!==r&&(v?0>r||(r=Math.min(r,u.box.h-q),u.prevSibling&&(r=Math.min(r,u.prevSibling.box.y+u.prevSibling.box.h-q-u.box.y)),u.nextSibling&&(r=Math.min(r,u.nextSibling.box.y+u.nextSibling.box.h-q-u.box.y))):0<r||(r=Math.max(r,-(u.box.h-q)),u.prevSibling&&(r=Math.max(r,-(u.box.y+u.box.h-(u.prevSibling.box.y+q)))),u.nextSibling&&(r=Math.max(r,-(u.box.y+u.box.h-(u.nextSibling.box.y+q))))),u.overlappingBoxes.forEach(function(w){n(w,!v)}))}var q=g.layoutDefaults.rowMinHeight;m=Math.max(m,
q);var r=m-h.box.h;n(h,!1);return r}},b={_getInluencedStartBox:function(g,h,m){var n=g.rows[h.index+1];h=c.collectRowBoxes(g,h);g=n?c.collectRowBoxes(g,n):c.mergeBoxesForBottomRow(h);return a.buildInfluenceTree(h,g,m)},getAffectedCells:function(g,h,m){function n(r){if(r.elements[0].data){var u=d.querySingleCell(g,{rowIndex:r.elements[0].data.index,columnField:r.elements[0].field,considerSpans:!0});u&&q.push(u)}r.overlappingBoxes.forEach(n)}var q=[];h=this._getInluencedStartBox(g,h,m);n(h);return q},
adjustRowCell:function(g,h,m,n){h=this._getInluencedStartBox(g,h,m);e.applyForce(g,h,n)}};return{adjustRowHeight:function(g,h,m,n){b.adjustRowCell(g,h,m,n)},getAffectedCells:function(g,h,m){return b.getAffectedCells(g,h,m)}}})},"esri/dijit/geoenrichment/ReportPlayer/core/grid/coreUtils/GridQueryUtil":function(){define(["dojo/dom-geometry","./GridDataUtil","esri/dijit/geoenrichment/utils/ArrayUtil","esri/dijit/geoenrichment/utils/DomUtil","esri/dijit/geoenrichment/utils/MouseUtil"],function(t,p,l,
k,f){var d={querySingleCell:function(c,a){a.fieldCell&&(a={rowId:a.fieldCell.rowId,columnId:a.fieldCell.columnId});var e;c.getCells().some(function(n){if(n.parentGrid&&n.column&&n.row&&!(n.columnId!==a.columnId&&n.column.index!==a.columnIndex&&n.column.field!==a.columnField||n.rowId!==a.rowId&&n.row.index!==a.rowIndex))return e=n,!0});if(e)return e;if(a.considerSpans){var b=d.queryColumn(c,a),g=d.queryData(c,a);if(!b||!g)return null;var h=b.index,m=g.index;c.rows.some(function(n){return c.columns.some(function(q){var r=
q.index,u=q.index+(n.columnSpans&&n.columnSpans[q.field]||0),v=n.index;q=n.index+(n.rowSpans&&n.rowSpans[q.field]||0);if(r<=h&&u>=h&&v<=m&&q>=m)return e=d.querySingleCell(c,{columnIndex:r,rowIndex:v}),!0})})}return e},queryColumn:function(c,a){var e;c.columns.some(function(b){if(b.id===a.columnId||b.index===a.columnIndex||b.field===a.columnField)return e=b,!0});return e},queryData:function(c,a){var e;c.rows.some(function(b){if(b.id===a.rowId||b.index===a.rowIndex)return e=b,!0});return e},queryCells:function(c,
a){if(a.fieldCell){var e=[],b=a.rowSpan||1,g=a.columnSpan||1;if(a=d.querySingleCell(c,a))for(var h=a.row.index;h<a.row.index+b;h++)for(var m=a.column.index;m<a.column.index+g;m++){var n=d.querySingleCell(c,{rowIndex:h,columnIndex:m});n&&e.push(n)}return e}return this.queryCellsInArray(c.getCells(),a)},queryCellsInArray:function(c,a){var e=[];if(!Object.keys(a).length)return e;c.forEach(function(b,g){void 0!==a.cellIndex&&g!==a.cellIndex||void 0!==a.cellIndexes&&-1===a.cellIndexes.indexOf(g)||void 0!==
a.columnId&&b.columnId!==a.columnId||void 0!==a.columnIds&&-1===a.columnIds.indexOf(b.columnId)||void 0!==a.columnIndex&&b.column.index!==a.columnIndex||void 0!==a.columnIndexes&&-1===a.columnIndexes.indexOf(b.column.index)||void 0!==a.columnField&&b.column.field!==a.columnField||void 0!==a.columnFields&&-1===a.columnFields.indexOf(b.column.field)||void 0!==a.rowId&&b.rowId!==a.rowId||void 0!==a.rowIds&&-1===a.rowIds.indexOf(b.rowId)||void 0!==a.rowIndex&&b.row.index!==a.rowIndex||void 0!==a.rowIndexes&&
-1===a.rowIndexes.indexOf(b.row.index)||e.push(b)});return e},getTitleCell:function(c){var a=d.querySingleCell(c,{rowIndex:0,columnIndex:0});if(a&&!p.getFieldInfo(a)&&(1===c.columns.length||p.getColumnSpan(a)===c.columns.length))return a},isDynamicFieldCell:function(c,a){return c._dynamicBindings&&c._dynamicBindings[a.column.field]},getDynamicallyBoundColumns:function(c,a){return c._dynamicBindings&&c._dynamicBindings[a.field]},getDynamicallyBoundFieldCells:function(c,a){if(a.column){var e=c._dynamicBindings&&
c._dynamicBindings[a.column.field];if(!e)return null;var b=[];e.forEach(function(g){(g=g&&d.querySingleCell(c,{columnId:g.id,rowId:a.rowId}))&&b.push(g)});return b}},getAllBoundCells:function(c,a,e){var b=[],g={};a&&a.forEach(function(h){if((!e||e(h))&&!g[h.uniqueId]){g[h.uniqueId]=!0;var m=d.getDynamicallyBoundFieldCells(c,h);m?m.forEach(function(n){b.push(n);g[n.uniqueId]=!0}):b.push(h)}});return l.removeDuplicates(b,"uniqueId")},trimDynamicBindings:function(c,a){var e=[],b={};a&&a.forEach(function(g){var h=
d.getDynamicallyBoundFieldCells(c,g);h&&h.length?(b[h[0].uniqueId]||e.push(h[0]),h.forEach(function(m){b[m.uniqueId]=!0})):e.push(g)});return e},collectFieldInfos:function(c,a){var e=[];a=a||{};var b=a.fieldCells||c.getCells();a.trimDynamicBinding&&b&&(b=d.trimDynamicBindings(c,b));b&&b.forEach(function(g){(g=p.getFieldInfo(g))&&e.push(g)});return e},cellHasFloatingTableParent:function(c){function a(e){return e.isSection&&e.isDataDrillingView?!1:e.isFloatingTable?!0:e.parentWidget?a(e.parentWidget):
!1}return c&&c.parentGrid?a(c.parentGrid):!1},isMouseOver:function(c){return f.isMouseOverBox(d.getBBox(c))},getOverFieldCell:function(c,a){a=a||{};var e=a.cellFilter||function(){return!0},b;c.getForegroundFloatingCells({topFirst:!0}).some(function(g){if(e(g)&&g.isMouseOver())return b=g,!0});b||c.getCells().some(function(g){if(e(g)&&g.isMouseOver())return b=g,!0});b||c.getBackgroundFloatingCells({topFirst:!0}).some(function(g){if(e(g)&&g.isMouseOver())return b=g,!0});return b},getBBox:function(c,
a){var e=c.isSingleCelledTable()&&c.getFirstCell().getAngle();return"number"===typeof e&&0!==e?c.getFirstCell().getBBox(a):a&&a.noTransformation?k.noTransformPosition(c.domNode):t.position(c.domNode)}};return d})},"esri/dijit/geoenrichment/ReportPlayer/core/grid/coreUtils/gridLayoutCalcUtils/rows/_RowModifierNormal":function(){define(["./RowDataUtil"],function(t){return{adjustRowHeight:function(p,l,k,f){var d=p.layoutDefaults.rowMinHeight;f=Math.max(f,d);var c=f-t.getDataHeight(p,l,k);if(p.keepGridHeightWhenResized){var a=
p.rows[l.index+1];a&&(c=t.getDataHeight(p,a,k)-c,c<d&&(f-=d-c,c=d),t.setDataHeight(p,a,k,c,!0))}t.setDataHeight(p,l,k,f,!0)}}})},"esri/dijit/geoenrichment/ReportPlayer/core/grid/coreUtils/gridLayoutCalcUtils/columns/GridLayoutColumnsCalculator":function(){define(["./ColumnDataUtil","./ColumnModifier","./ColumnsProcessor"],function(t,p,l){var k={};k.recalcColumns=l.recalcColumns;k.recalcColumnsTableJson=l.recalcColumnsTableJson;k.adjustColumnWidth=p.adjustColumnWidth;k.getAffectedCells=p.getAffectedCells;
k.getFieldWidth=t.getFieldWidth;k.setFieldWidth=t.setFieldWidth;k.calcFieldWidth=t.calcFieldWidth;k.recalcGridWidth=t.recalcGridWidth;return k})},"esri/dijit/geoenrichment/ReportPlayer/core/grid/coreUtils/gridLayoutCalcUtils/columns/ColumnDataUtil":function(){define(["../GridLayoutCalculatorQueryUtil"],function(t){var p={getFieldWidth:function(l,k,f){var d="string"===typeof f?t.fieldToColumn(l,f):f;f=d?d.field:"string"===typeof f?f:null;return l.looseResize?p.getFieldWidthOwn(l,k,f)||d&&d.style.width||
0:d&&d.style.width||0},getFieldWidthOwn:function(l,k,f){if(l.looseResize)return k.style.fields=k.style.fields||{},(k.style.fields[f]=k.style.fields[f]||{}).width},setFieldWidth:function(l,k,f,d,c){var a="string"===typeof f?t.fieldToColumn(l,f):f,e=a?a.field:"string"===typeof f?f:null;l.looseResize?(c?t.getRowSpannedData(l,k,e)||[k]:[k]).forEach(function(b){b.style.fields=b.style.fields||{};(b.style.fields[e]=b.style.fields[e]||{}).width=d}):a&&(a.style.width=d)},calcFieldWidth:function(l,k,f,d){var c=
0;1<(k.columnSpans&&k.columnSpans[f])?t.getSpannedColumns(l,f,k.columnSpans[f]).forEach(function(a){d!==a.field&&(c+=p.getFieldWidth(l,k,a.field))}):c=p.getFieldWidth(l,k,f);return c},recalcGridWidth:function(l){l._width=0;var k=l.rows[0];l.columns.forEach(function(f){l._width+=p.getFieldWidth(l,k,f.field)});return l._width},getAllowedWidth:function(l){return l.fitParentWhenResized?l.getAllowedWidthFromParent():l.getAllowedWidth()}};return p})},"esri/dijit/geoenrichment/ReportPlayer/core/grid/coreUtils/gridLayoutCalcUtils/columns/ColumnModifier":function(){define(["../GridLayoutCalculatorQueryUtil",
"./ColumnDataUtil","./_ColumnModifierNormal","./_ColumnModifierLoose"],function(t,p,l,k){var f={},d={getColumnToChange:function(e,b,g,h){var m=t.getMovableColumn(e,b,g.field);m&&(e=p.calcFieldWidth(e,b,g.field,m.field),h-=e);return{column:m||g,width:h}}},c={finalResizeGridCells:function(e){e.getCells().forEach(function(b){b.setWidth(p.calcFieldWidth(e,b.row,b.column.field))});p.recalcGridWidth(e)}},a={recalcToStick:function(e){var b=e.columns[e.columns.length-1];e.rows.some(function(g,h){if(!e.looseResize&&
h)return!0;var m=0;e.columns.forEach(function(n){n!==b&&(m+=p.getFieldWidth(e,g,n.field))});p.setFieldWidth(e,g,b.field,p.getAllowedWidth(e)-m)})}};f.adjustColumnWidth=function(e,b,g,h){g=d.getColumnToChange(e,b,g,h);(e.looseResize?k:l).adjustColumnWidth(e,b,g.column,g.width);e.stickToRight&&a.recalcToStick(e);c.finalResizeGridCells(e)};f.getAffectedCells=function(e,b,g){return e.looseResize?k.getAffectedCells(e,b,d.getColumnToChange(e,b,g).column):null};return f})},"esri/dijit/geoenrichment/ReportPlayer/core/grid/coreUtils/gridLayoutCalcUtils/columns/_ColumnModifierNormal":function(){define(["./ColumnDataUtil"],
function(t){var p={},l={adjustColumnWidth:function(k,f,d,c,a){function e(r,u){return t.setFieldWidth(k,f,r.field,u,!0)}var b=k.layoutDefaults.columnMinWidth,g=function(){if(!d)return null;var r=t.getFieldWidth(k,f,d.field);void 0!==a&&(c=r+a);c=Math.max(b,c);var u,v=0,w=!1;k.columns.forEach(function(E){v+=t.getFieldWidth(k,f,E.field);w&&!u?u=E:E===d&&(w=!0)});var A=t.getAllowedWidth(k)-(v-r);return isNaN(A)?null:{width:c,widthMemo:r,maxAllowedColumnWidth:A,nextColumn:u}}();if(g){c=g.width;var h=g.widthMemo,
m=g.maxAllowedColumnWidth,n=(g=g.nextColumn)&&t.getFieldWidth(k,f,g.field);h=c-h;var q=0;k.keepGridWidthWhenResized?(g&&(h=n-h,h<b&&(c-=b-h,h=b),h<n&&(m+=n-h),e(g,h)),e(d,Math.min(m,c))):(g&&m<c&&n>b?(e(d,c),q=m-c):e(d,Math.min(m,c)),0!==q&&l.adjustColumnWidth(k,f,g,null,q))}}};p.adjustColumnWidth=function(k,f,d,c){l.adjustColumnWidth(k,f,d,c)};return p})},"esri/dijit/geoenrichment/ReportPlayer/core/grid/coreUtils/gridLayoutCalcUtils/columns/_ColumnModifierLoose":function(){define("dojo/_base/lang dojox/uuid/generateRandomUuid ../GridLayoutCalculatorQueryUtil ../GridElementBoxCalculator ./ColumnDataUtil ../../GridQueryUtil".split(" "),
function(t,p,l,k,f,d){var c={collectColumnBoxes:function(g,h){for(var m=[],n=0;n<g.rows.length;){var q=g.rows[n],r=this._createEmptyBox();q=l.getRowSpannedData(g,q,h.field)||[q];r.elements=this._getSpannedDataElements(g,h,q);this._measureBox(r);var u=m[m.length-1];u&&(u.nextSibling=r,r.prevSibling=u);m.push(r);n+=q.length}return m},_createEmptyBox:function(){return{id:p(),box:null,elements:[],overlappingBoxes:[],overlappingBoxesCache:{},prevSibling:null,nextSibling:null}},_getSpannedDataElements:function(g,
h,m){var n=[];m.forEach(function(q){q={data:q,dataIndex:q.index,field:h.field,box:k.calcDataBox(g,q,h.field)};n.push(q)});return n},_measureBox:function(g){var h=0;g.elements.forEach(function(m){h+=m.box.h});g.box={x:g.elements[0].box.x,y:g.elements[0].box.y,w:g.elements[0].box.w,h:h}},mergeBoxesForRightColumn:function(g){var h=this._createEmptyBox();g.forEach(function(m){m.elements.forEach(function(n){h.elements.push({data:n.data,field:null,box:t.clone(n.box)})})});this._measureBox(h);h.box.w=1E6;
return[h]},getBoxAtDataIndex:function(g,h){return g.filter(function(m){return m.elements[0].dataIndex===h})[0]}},a={buildInfluenceTree:function(g,h,m){function n(q,r){(r?h:g).forEach(function(u){var v;if(v=!u.overlappingBoxesCache[q.id]){v=q.box;var w=u.box;v=!(v.y+.5>=w.y+w.h||v.y+v.h<=w.y+.5)}v&&(q.overlappingBoxes.push(u),q.overlappingBoxesCache[u.id]=!0)});q.overlappingBoxes.forEach(function(u){n(u,!r)})}m=c.getBoxAtDataIndex(g,m.index);n(m,!0);return m}},e={applyForce:function(g,h,m){function n(r,
u){var v=r.elements[0];v.field&&f.setFieldWidth(g,v.data,v.field,f.getFieldWidth(g,v.data,v.field)+(u?-1:1)*q,!0);r.overlappingBoxes.forEach(function(w){n(w,!u)})}var q=this._checkDelta(g,h,m);n(h,!1)},_checkDelta:function(g,h,m){function n(v,w){0!==r&&(w?0>r||(r=Math.min(r,v.box.w-q),v.prevSibling&&(r=Math.min(r,v.prevSibling.box.x+v.prevSibling.box.w-q-v.box.x)),v.nextSibling&&(r=Math.min(r,v.nextSibling.box.x+v.nextSibling.box.w-q-v.box.x))):0<r||(r=Math.max(r,-(v.box.w-q)),v.prevSibling&&(r=Math.max(r,
-(v.box.x+v.box.w-(v.prevSibling.box.x+q)))),v.nextSibling&&(r=Math.max(r,-(v.box.x+v.box.w-(v.nextSibling.box.x+q))))),v.overlappingBoxes.forEach(function(A){n(A,!w)}))}var q=g.layoutDefaults.columnMinWidth;m=Math.max(m,q);var r=m-h.box.w;if(0<r&&h.elements[0].field===g.columns[g.columns.length-1].field){var u=0;g.columns.forEach(function(v){u+=f.getFieldWidth(g,h.elements[0].data,v.field)});r=Math.min(r,f.getAllowedWidth(g)-u)}n(h,!1);return r}},b={_getInluencedStartBox:function(g,h,m){var n=g.columns[m.index+
1];m=c.collectColumnBoxes(g,m);g=n?c.collectColumnBoxes(g,n):c.mergeBoxesForRightColumn(m);return a.buildInfluenceTree(m,g,h)},getAffectedCells:function(g,h,m){function n(r){if(r.elements[0].data){var u=d.querySingleCell(g,{rowIndex:r.elements[0].data.index,columnField:r.elements[0].field,considerSpans:!0});u&&q.push(u)}r.overlappingBoxes.forEach(n)}var q=[];h=this._getInluencedStartBox(g,h,m);n(h);return q},adjustColumnCell:function(g,h,m,n){h=this._getInluencedStartBox(g,h,m);e.applyForce(g,h,n)}};
return{adjustColumnWidth:function(g,h,m,n){b.adjustColumnCell(g,h,m,n)},getAffectedCells:function(g,h,m){return b.getAffectedCells(g,h,m)}}})},"esri/dijit/geoenrichment/ReportPlayer/core/grid/coreUtils/gridLayoutCalcUtils/columns/ColumnsProcessor":function(){define(["dojox/uuid/generateRandomUuid","./ColumnDataUtil"],function(t,p){function l(f){f._dynamicBindings={};if(f.getNumDynamicColumns()){for(var d=f.getNumDynamicColumns(),c=f.getNumFixedColumns(),a=0;a<c;a++)f.columns[a].isFixed=!0;a=[];for(var e=
0;e<d;e++){for(var b=c,g=[];b<f.columns.length;){var h=f.columns[b+e];h.isDynamic=!0;g.push(h);b+=d}a.push(g)}a.forEach(function(m){m.forEach(function(n){f._dynamicBindings[n.field]=m})})}}var k={recalcColumns:function(f,d){var c=d&&d.resetWidth,a=d&&d.columnsToPreserve,e=d&&d.stickToRight,b=d&&d.newWidth,g=d&&d.rightOffsetWeight;d=d&&d._isJson;var h={},m=0;f.columns.every(function(A,E){if(!A.style||!A.style.width||isNaN(A.style.width)||"number"!==typeof A.style.width)return m=0,!1;m+=A.style.width;
h[E]=A.style.width;return!0});var n=b?b:e?f.getAllowedWidth():m?Math.min(m,f._width):f._width;n-=0<g?n*g:0;var q=n/f.columns.length,r=n;if(a){var u=a.length*q,v=0;a.forEach(function(A){v+=A.style.width});a.forEach(function(A){A.style.width=u/v*A.style.width/r*100+"%"})}f.columns.forEach(function(A,E,F){A.index=E;A.style=A.style||{};if("number"!==typeof A.style.width||c)if(E===F.length-1)A.style.width=r;else{var D=A.style.width;"string"===typeof D&&-1!==D.indexOf("%")?A.style.width=parseFloat(D.substr(0,
D.length-1))/100*n:A.style.width=q}r-=A.style.width;E===F.length-1&&0>r&&(A.style.width+=r);void 0===A.id&&(A.id=t())});if(f.looseResize){f.columns.some(function(A,E){var F=h[E]?A.style.width/h[E]:void 0;f.rows.forEach(function(D){var B=p.getFieldWidthOwn(f,D,A.field);B?F&&1!==F&&p.setFieldWidth(f,D,A.field,B*F):p.setFieldWidth(f,D,A.field,A.style.width)})});var w=f.columns[f.columns.length-1].field;f.rows.forEach(function(A){var E=0;f.columns.some(function(D){E+=p.getFieldWidthOwn(f,A,D.field)});
var F=n-E;0!==F&&p.setFieldWidth(f,A,w,p.getFieldWidthOwn(f,A,w)+F)})}d||(l(f),p.recalcGridWidth(f));return n},recalcColumnsTableJson:function(f){k.recalcColumns(f,{resetWidth:!0,newWidth:f.style.width,_isJson:!0})}};return k})},"esri/dijit/geoenrichment/ReportPlayer/core/grid/coreUtils/gridLayoutCalcUtils/GridLayoutSnapper":function(){define(["dojo/_base/lang","./rows/RowDataUtil","./columns/ColumnDataUtil","./GridElementBoxCalculator"],function(t,p,l,k){return{autoSnapLayout:function(f){function d(){var n=
[];f.rows.forEach(function(q){f.columns.forEach(function(r){n.push(t.mixin({id:q.index+"_"+r.field,data:q,dataIndex:q.index,column:r,field:r.field},k.calcDataBox(f,q,r.field)))})});return n}if(f.looseResize)for(var c=f.rows.length*f.columns.length,a={},e=0;e<c;e++){var b=d(),g=b[e],h=g.x+g.w,m=g.y+g.h;a[g.id]=!0;b.forEach(function(n){if(!a[n.id]){var q=h-(n.x+n.w);.5>=Math.abs(q)&&l.setFieldWidth(f,n.data,n.field,n.w+q);q=m-(n.y+n.h);.5>=Math.abs(q)&&p.setDataHeight(f,n.data,n.field,n.h+q)}})}}}})},
"esri/dijit/geoenrichment/ReportPlayer/core/sections/sectionUtils/SectionJsonUtil":function(){define(["esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/templateJsonUtils/fieldInfo/FieldInfoBuilder","esri/dijit/geoenrichment/ReportPlayer/core/sections/SectionTypes","../../supportClasses/tableJson/TableJsonUtil"],function(t,p,l){var k={wrapInDetailsSectionJson:function(f,d){f=Array.isArray(f)?f:[f];var c=f.some(function(a){return"table"===a.id&&a.attributes&&(0<a.attributes.dynamicColumns||
0<a.attributes.dynamicRows)});return{type:d||(c?p.GROUP:p.DETAILS),stack:f}},createSectionJsonFromInfographicJson:function(f,d,c){f=l.createSingleCellTable({width:d,height:c,fieldInfo:t.createFieldInfoFromInfographic(f)});return k.wrapInDetailsSectionJson(f)},getSectionJsonInfographic:function(f){var d;f.stack&&f.stack.some(function(c){d="table"===c.id&&l.getTableJsonInfographic(c);return!!d});return d},getSectionJsonInfographicTable:function(f){var d;f.stack&&f.stack.some(function(c){if("table"===
c.id&&l.getTableJsonInfographic(c))return d=c,!0});return d},calcSectionJsonBox:function(f){var d,c;function a(g){d=Math.min(d,g.l);e=Math.min(e,g.t);c=Math.max(c,g.l+g.w);b=Math.max(b,g.t+g.h)}var e=d=Infinity;var b=c=0;f.stack&&f.stack.forEach(function(g){switch(g.id){case "table":var h=0;g.rows.forEach(function(m){h+=m.style.height});a({l:g.style.left||0,t:g.style.top||0,w:g.style.width,h:h});break;case "img":case "map":a({l:g.style.left||0,t:g.style.top||0,w:g.style.width,h:g.style.height})}});
f=f.style||{};return{x:f.left,y:f.top,w:f.width||d+c,h:f.height||e+b,contentLeft:d,contentTop:e,contentW:c-d,contentH:b-e}}};return k})},"esri/dijit/geoenrichment/ReportPlayer/core/conversion/portalToEditorUtils/parsers/_FieldInfoBuilder":function(){define(["../../../supportClasses/templateJsonUtils/fieldInfo/FieldInfoBuilder","dojo/i18n!esri/nls/jsapi"],function(t,p){p=p.geoenrichment.dijit.ReportPlayer.ReportPlayer;return{getCalculatorOrScriptFieldInfo:function(l,k,f){if(!l)return null;if(k.variableProvider.isPlayerOnly&&
!k.useVariableProviderToCollectOnly){var d=k.variableProvider.toCalculator(l);if(!d)return console.log("Can't create a dummy calculator for \x3d\x3e "+l),null;f=f||{};f.calculatorName=d.variable.calculatorName;l=t.createFieldInfoFromCalculator(d,k.variableProvider,f);l.name=d.variable.fieldName;l.templateName=d.variable.templateName;return l}d=k.queryMetaDataFunc(l);var c=l.substr(0,l.indexOf("."));f=f||{};f.calculatorName=c;if(d)return d.isScript?t.createFieldInfoFromScript(d,f):t.createFieldInfoFromCalculator(d,
k.variableProvider,f);f=t.createFieldInfoFromMissingVariable(l);k.variableProvider.isPlayerOnly&&(d=k.variableProvider.toCalculator(l),f.alias=d&&d.variable.alias);f.alias=f.alias?f.alias+" ("+p.missingVariable+")":p.missingVariable;return f}}})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/attachments/DefaultAttachmentsStore":function(){define(["dojo/_base/declare","esri/dijit/geoenrichment/promise/all","esri/dijit/geoenrichment/when","./WebMapAttachmentStore"],function(t,p,
l,k){return t(null,{supportsMultipleAreas:!0,_analysisAreas:null,_currentAreaIndex:-1,_webMapStores:null,constructor:function(f){this._analysisAreas=f},initialize:function(){var f=this;this._webMapStores={};return p(this._analysisAreas.map(function(d,c){if(d=d.feature||d.location||d.additionalFeatures&&d.additionalFeatures[0])return(f._webMapStores[c]=new k(d)).initialize()})).then(function(){return f})},_callStoreMethod:function(f){var d=this._webMapStores[this._currentAreaIndex];return d?l(d[f](),
function(c){return c?c.slice():[]}):[]},getImages:function(){return this._callStoreMethod("getImages")},getAttributes:function(){return this._callStoreMethod("getAttributes")},getNotes:function(){return this._callStoreMethod("getNotes")},setCurrentAnalysisAreaIndex:function(f){this._currentAreaIndex=f}})})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/attachments/WebMapAttachmentStore":function(){define("dojo/_base/declare dojo/_base/lang esri/dijit/geoenrichment/when esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/attachments/AttributesUtil esri/dijit/geoenrichment/utils/requests/UniversalClient esri/dijit/geoenrichment/utils/CacheUtil esri/dijit/geoenrichment/utils/ImageUtil ./AttachmentsUtil".split(" "),
function(t,p,l,k,f,d,c,a){var e={getThumbnail:function(b){var g=d.get("WebMapAttachmentStore");g[b.url]||(g[b.url]=this._getDataURL(b));return g[b.url]},_getDataURL:function(b){return 0===b.url.indexOf("data:")?b.url:f.request(b.url).then(function(g){return g&&g.Attachment&&c.base64DataToDataURL(g.Attachment,b.contentType)}).otherwise(function(){return null})}};return t(null,{supportsMultipleAreas:!1,_attachmentInfos:null,_feature:null,_fieldInfos:null,_attributes:null,constructor:function(b,g){this._feature=
b;this._attachmentInfos=g},initialize:function(){this._tryGetFieldInfosAndAttributes();return l(this._attachmentInfos||this._tryGetAttachmentInfos()).always(function(){return!!this._attachmentInfos}.bind(this))},_tryGetFieldInfosAndAttributes:function(){var b=this._feature.getLayer();this._fieldInfos=(b=this._feature.infoTemplate||b&&b.infoTemplate)&&b.info.fieldInfos||[];this._attributes=p.mixin({},this._feature.attributes)},_tryGetAttachmentInfos:function(){return l(a.getFeatureAttachmentInfos(this._feature),
function(b){this._attachmentInfos=b}.bind(this))},getImages:function(){return this._attachmentInfos?this._attachmentInfos.map(function(b){return{getThumbnail:function(){return e.getThumbnail(b)},getUrl:function(){return b.url}}}):[]},getAttributes:function(){return k.composeAttributesFromFieldInfos(this._fieldInfos,this._attributes)},getNotes:function(){return[]},setCurrentAnalysisAreaIndex:null})})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/supportClasses/attachments/AttachmentsUtil":function(){define([],
function(){return{getFeatureAttachmentInfos:function(t){var p=t.getLayer();if(p&&p.hasAttachments&&p.queryAttachmentInfos&&p.objectIdField)return p.queryAttachmentInfos(t.attributes[p.objectIdField])}}})},"esri/dijit/geoenrichment/ReportPlayer/dataProvider/commands/supportClasses/LayoutXMLBuilder":function(){define("dojo/_base/lang esri/dijit/geoenrichment/utils/JsonXmlConverter esri/dijit/geoenrichment/ReportPlayer/core/conversion/reportingEngine/converters/DocumentConverter esri/dijit/geoenrichment/ReportPlayer/core/conversion/ConversionUtil esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/DocumentOptions esri/dijit/geoenrichment/ReportPlayer/core/sections/SectionTypes".split(" "),
function(t,p,l,k,f,d){return{buildLayoutXML:function(c){var a=l.buildDocumentTag({addDefaultQuery:!0,report:{templateJson:{documentOptions:t.mixin({},c.documentOptions,{left:0,right:0,top:0,bottom:0})}}}).documentTag,e=f.getPageBox(c.documentOptions),b=k.pxToPt(e.w),g=k.pxToPt(e.h);c.svgStrings.forEach(function(m,n){a.tags.push({name:"section",attributes:{type:d.DETAILS},tags:[{name:"img",attributes:{left:0,top:0,width:b,height:g},tags:[{text:"__svgString__"+n+"__svgString__"}]}]});n<c.svgStrings.length-
1&&a.tags.push({name:"pageBreak"})});var h=p.parseJson(a);c.svgStrings.forEach(function(m,n){h=h.replace("__svgString__"+n+"__svgString__",m)});return h},stitchDocuments:function(c){if(!c||!c.length)return null;var a=c[0],e=a.substr(0,a.indexOf("\x3csection")),b="";c.forEach(function(g,h){b+=g.replace(e,"").replace("\x3c/HTMLextReport\x3e","")+(h<c.length-1?"\x3cpageBreak /\x3e":"")});return e+b+"\x3c/HTMLextReport\x3e"}}})},"esri/dijit/geoenrichment/ReportPlayer/core/conversion/reportingEngine/converters/DocumentConverter":function(){define(["../../ConversionUtil",
"../ReportingEnginePageSizeCompatibilityUtil"],function(t,p){var l={buildDocumentTag:function(k){var f=k.report,d=f.templateJson.documentOptions,c={name:"HTMLextReport",attributes:{version:"10.1",pagesize:p.getReportingEnginePageSize(d.pagesize,d.orientation),orientation:d.orientation,left:t.pxToPt(d.left),right:t.pxToPt(d.right),top:t.pxToPt(d.top),bottom:t.pxToPt(d.bottom),style:t.composeStyleString(l.buildDocumentStyle(k)),comparisonZoom:f.defaultComparisonZoom||void 0},tags:[]};k.addDefaultQuery&&
c.tags.push({name:"queries",tags:[{name:"query",attributes:{name:"default",table:"headers"}}]});k.report.isGraphicReport||c.tags.push({name:"def",attributes:{align:d.align,lineSpacing:d.lineSpacing}});f.templateJson.tooltipInfo&&(f.templateJson.tooltipInfo.table||f.templateJson.tooltipInfo.chart)&&(k={name:"tooltip",tags:[]},c.tags.push(k),(d=f.templateJson.tooltipInfo.table)&&k.tags.push({name:"table",attributes:{value:d.value||void 0,alias:d.alias||void 0,expression:d.expression||void 0,conditional:d.conditional||
void 0}}),(f=f.templateJson.tooltipInfo.chart)&&k.tags.push({name:"chart",attributes:{title:f.title||void 0,value:f.value||void 0,weight:f.weight||void 0,min:f.min||void 0,max:f.max||void 0,avg:f.avg||void 0,conditional:f.conditional||void 0}}));return{documentTag:c}},buildDocumentStyle:function(k){k=k.report.templateJson.documentOptions;return{fontSize:t.pxToPt(k.fontSize),fontFamily:k.fontFamily}}};return l})},"esri/dijit/geoenrichment/ReportPlayer/core/conversion/ConversionUtil":function(){define(["dojo/_base/lang",
"esri/dijit/geoenrichment/utils/PageUnitsConverter","esri/dijit/geoenrichment/utils/ColorUtil"],function(t,p,l){var k={};t.mixin(k,p);var f={"font-size":"fontSize","line-height":"lineHeight","font-family":"fontFamily","font-style":"fontStyle","font-weight":"fontWeight","text-decoration":"textDecoration",color:"color","background-color":"backgroundColor"},d={},c;for(c in f)d[f[c]]=c;k.splitTrim=function(b,g,h){b=String(b).split(g).map(function(m){return m.trim()});return h?b.filter(function(m){return!!m}):
b};k.parseStyleString=function(b){var g={};k.splitTrim(b||"",";",!0).forEach(function(h){var m=k.splitTrim(h,":");if(h=f[m[0]])m=m[1],"rgba(0, 0, 0, 0)"===m&&(m="transparent"),g[h]=m});return g};k.composeStyleString=function(b,g){g=g&&g.addPx;var h="",m;for(m in b){var n=d[m];if(n){var q=b[m];q&&("backgroundColor"===m&&(q=l.toCSSColor(q)),h+=n+":"+q+(g&&g[n]?"px;":";"))}}return h};k.removeZeroProperties=function(b){Object.keys(b).forEach(function(g){0===Number(b[g])&&delete b[g]});return b};var a=
{valign:{center:"middle"}},e={valign:{middle:"center"}};k.getPropValuePtoE=function(b,g){return a[b]&&a[b][g]||g};k.getPropValueEtoP=function(b,g){return e[b]&&e[b][g]||g};k.KEY_OPERATOR_RE=/^(!=|>=|<=|<|>|=)/;k.ONE_FIELD_KEY_TEST=/^((<|>|<=|>=|!=|=|)(-?\d+\.\d+|-?\d+))$/;k.KEY_INTERVAL_SEPARATOR=";";return k})},"esri/dijit/geoenrichment/ReportPlayer/core/conversion/reportingEngine/ReportingEnginePageSizeCompatibilityUtil":function(){define(["../../supportClasses/DocumentOptions"],function(t){var p=
{},l={a4:1,letter:1};p.getReportingEnginePageSize=function(k,f){return l[k]?k:(f=t.SIZE_TYPE_TO_DIM_HASH[k]&&t.SIZE_TYPE_TO_DIM_HASH[k][f])?t.combineCustomSizeString(f.w,f.h,"in"):k};return p})},"widgets/BusinessAnalyst/utils/ReportUtil":function(){define("dojo/Deferred dojo/promise/all dojo/when dojo/_base/array esri/request jimu/portalUtils dojo/i18n!../nls/strings".split(" "),function(t,p,l,k,f,d,c){STANDARD_INFOGRAPHIC_TYPEKEYWORD="esriReportPlayerStandardInfographic";return{_ownedCachedCustomReports:null,
_sharedCachedCustomReports:null,_cachedCountryClassicReports:[],_cachedInfographicReports:null,_countryInitDfds:[],getAvailableClassicReports:function(a,e){var b=this,g=[],h=new t,m;e&&k.forEach(e.countryConfig,function(u){a==u.countryID&&(m=u)});m||(m={countryID:a,allowEsriReports:!0,allowAllEsriReports:!0,allowEsriInfographics:!0,allowAllEsriInfographics:!0,allowMyReports:!0,allowMyInfographics:!0,allowSharedReports:!0,allowSharedInfographics:!0,allowAllOrgReports:!0,allowAllOrgInfographics:!0,
defaultInfographicID:"",defaultReportID:"",enabledEsriReports:[],enabledOrgReports:[],enabledEsriInfographics:[],enabledOrgInfographics:[]});var n=null,q=null,r=null;l(this._initReports(a),function(){if(!e||m.allowAllEsriReports||b._hasEnabledReports(b._cachedCountryClassicReports[a],m.enabledEsriReports))n=g.length,g.push({value:"esriReports",label:c.esriReports,children:[]});if(!e||m.allowAllOrgReports&&b._hasReportsForCountry(b._ownedCachedCustomReports,a)||b._hasEnabledReportsForCountry(b._ownedCachedCustomReports,
a,m.enabledOrgReports))q=g.length,g.push({value:"myReports",label:c.myReports,children:[]});if(!e||m.allowAllOrgReports&&b._hasReportsForCountry(b._sharedCachedCustomReports,a)||b._hasEnabledReportsForCountry(b._sharedCachedCustomReports,a,m.enabledOrgReports))r=g.length,g.push({value:"sharedReports",label:c.sharedReports,children:[]});(m.allowAllEsriReports||b._hasEnabledReports(b._cachedCountryClassicReports[a],m.enabledEsriReports))&&b._cachedCountryClassicReports[a]&&0<b._cachedCountryClassicReports[a].length&&
k.forEach(b._cachedCountryClassicReports[a],function(w){(m.allowAllEsriReports||m.enabledEsriReports.includes(w.reportID))&&g[n].children.push(b._formatClassicReportsForDropDown(w))});var u=["esriWebInfographicReport","esriWebSingleInfographic","esriWebBlankInfographic","esriWebHiddenInfographic","esriWebComparisonReport"];(m.allowAllOrgReports&&b._hasReportsForCountry(b._ownedCachedCustomReports,a)||b._hasEnabledReportsForCountry(b._ownedCachedCustomReports,a,m.enabledOrgReports))&&k.forEach(b._ownedCachedCustomReports,
function(w){w.properties.countries.includes(a)&&(m.allowAllOrgReports||m.enabledOrgReports.includes(w.id))&&(w.typeKeywords.some(function(A){return 0<=u.indexOf(A)})||g[q].children.push(b._formatClassicReportsForDropDown(w)))});(m.allowAllOrgReports&&b._hasReportsForCountry(b._sharedCachedCustomReports,a)||b._hasEnabledReportsForCountry(b._sharedCachedCustomReports,a,m.enabledOrgReports))&&k.forEach(b._sharedCachedCustomReports,function(w){w.properties.countries.includes(a)&&(m.allowAllOrgReports||
m.enabledOrgReports.includes(w.id))&&(w.typeKeywords.some(function(A){return 0<=u.indexOf(A)})||g[r].children.push(b._formatClassicReportsForDropDown(w)))});var v=function(w,A){w=w.label.toUpperCase();A=A.label.toUpperCase();var E=0;w>A?E=1:w<A&&(E=-1);return E};0<g.length&&g[0].children.sort(v);1<g.length&&g[1].children.sort(v);2<g.length&&g[2].children.sort(v);h.resolve(g)});return h},_hasEnabledReports:function(a,e){return a&&e?k.some(a,function(b){return e.includes(b.reportID)}):!1},_hasReportsForCountry:function(a,
e){return a&&e?k.some(a,function(b){return b.properties.countries.includes(e)}):!1},_hasEnabledReportsForCountry:function(a,e,b){return a&&e&&b?k.some(a,function(g){return g.properties.countries.includes(e)?b.includes(g.id):!1}):!1},_formatClassicReportsForDropDown:function(a){return a.metadata?{label:a.metadata.title,value:a.reportID,reportType:a.metadata.type}:{label:a.title,value:a.id,reportType:a.properties.type,item:{itemid:a.id,url:portalUrl,token:esri.id.credentials[0].token}}},getAvailableInfographicReports:function(a,
e){var b=this,g=[],h=new t,m;e&&k.forEach(e.countryConfig,function(u){a==u.countryID&&(m=u)});m||(m={countryID:a,allowEsriReports:!0,allowAllEsriReports:!0,allowEsriInfographics:!0,allowAllEsriInfographics:!0,allowMyReports:!0,allowMyInfographics:!0,allowSharedReports:!0,allowSharedInfographics:!0,allowAllOrgReports:!0,allowAllOrgInfographics:!0,defaultInfographicID:"",defaultReportID:"",enabledEsriReports:[],enabledOrgReports:[],enabledEsriInfographics:[],enabledOrgInfographics:[]});var n=null,q=
null,r=null;l(this._initReports(a),function(){if(!e||m.allowAllEsriInfographics||b._hasEnabledInfographics(b._cachedInfographicReports,m.enabledEsriInfographics))n=g.length,g.push({value:"esriReports",label:c.esriInfographics,children:[]});if(!e||m.allowAllOrgInfographics&&0<b._ownedCachedCustomReports.length||b._hasEnabledInfographics(b._ownedCachedCustomReports,m.enabledOrgInfographics))q=g.length,g.push({value:"myReports",label:c.myInfographics,children:[]});if(!e||m.allowAllOrgInfographics&&0<
b._sharedCachedCustomReports.length||b._hasEnabledInfographics(b._sharedCachedCustomReports,m.enabledOrgInfographics))r=g.length,g.push({value:"sharedReports",label:c.sharedInfographics,children:[]});(m.allowAllEsriInfographics||b._hasEnabledInfographics(b._cachedInfographicReports,m.enabledEsriInfographics))&&k.forEach(b._cachedInfographicReports,function(v){v.properties.countries.includes(a)&&(m.allowAllEsriInfographics||m.enabledEsriInfographics.includes(v.id))&&g[n].children.push(b._formatInfographicReportsForDropDown(v))});
(m.allowAllOrgInfographics&&0<b._ownedCachedCustomReports.length||b._hasEnabledInfographics(b._ownedCachedCustomReports,m.enabledOrgInfographics))&&k.forEach(b._ownedCachedCustomReports,function(v){v.properties.countries.includes(a)&&(m.allowAllOrgInfographics||m.enabledOrgInfographics.includes(v.id))&&(v.typeKeywords.includes("esriWebInfographicReport")||b._isOldPortalInfographic(v))&&g[q].children.push(b._formatInfographicReportsForDropDown(v))});(m.allowAllOrgInfographics&&0<b._sharedCachedCustomReports.length||
b._hasEnabledInfographics(b._sharedCachedCustomReports,m.enabledOrgInfographics))&&k.forEach(b._sharedCachedCustomReports,function(v){v.properties.countries.includes(a)&&(m.allowAllOrgInfographics||m.enabledOrgInfographics.includes(v.id))&&(v.typeKeywords.includes("esriWebInfographicReport")||b._isOldPortalInfographic(v))&&g[r].children.push(b._formatInfographicReportsForDropDown(v))});var u=function(v,w){v=v.label.toUpperCase();w=w.label.toUpperCase();var A=0;v>w?A=1:v<w&&(A=-1);return A};0<g.length&&
g[0].children.sort(u);1<g.length&&g[1].children.sort(u);2<g.length&&g[2].children.sort(u);h.resolve(g)});return h},_hasEnabledInfographics:function(a,e){return k.some(a,function(b){return e.includes(b.id)})},_isOldPortalInfographic:function(a){return a.properties&&a.properties.isHidden&&"true"===a.properties.isHidden?!1:a.properties&&a.properties.isGraphicReport&&"true"===a.properties.isGraphicReport?!0:!1},_formatInfographicReportsForDropDown:function(a){return{label:a.title,value:a.id}},_initReports:function(a){var e=
[],b=this;if(this._countryInitDfds[a])return this._countryInitDfds[a];this._countryInitDfds[a]=new t;var g=function(h,m){return f(h).then(function(n){k.forEach(n.results,function(q){m.push(q)});if(-1!=n.nextStart)return h.content.start=n.nextStart,g(h,m)},function(n){alert(n)})};d.getPortal(portalUrl).loadSelfInfo().then(function(h){var m=h&&h.helperServices&&h.helperServices.geoenrichment&&h.helperServices.geoenrichment.url?h.helperServices.geoenrichment.url:"https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver";
b._cachedCountryClassicReports[a]||e.push(f({url:m+"/Geoenrichment/reports/"+a,content:{appID:"webappbuilder",f:"json",langCode:"en-us"}}).then(function(n){b._cachedCountryClassicReports[a]=n.reports},function(n){alert(n)}));b._cachedInfographicReports||(b._cachedInfographicReports=[],e.push(g({url:portalUrl+"/sharing/rest/search",content:{appID:"webappbuilder",f:"json",start:1,num:100,sortField:"modified",sortOrder:"desc",q:"typekeywords:(esriWebStandardInfographicReport)"}},b._cachedInfographicReports)));
b._ownedCachedCustomReports||(b._ownedCachedCustomReports=[],e.push(g({url:portalUrl+"/sharing/rest/search",content:{appID:"webappbuilder",f:"json",start:1,num:100,sortField:"modified",sortOrder:"desc",q:'type:"Report Template" typekeywords:(esriWebReport NOT esriWebSingleInfographic) owner:'+esri.id.credentials[0].userId}},b._ownedCachedCustomReports)));b._sharedCachedCustomReports||(b._sharedCachedCustomReports=[],e.push(g({url:portalUrl+"/sharing/rest/search",content:{appID:"webappbuilder",f:"json",
start:1,num:100,sortField:"modified",sortOrder:"desc",q:'access:shared type:"Report Template" typekeywords:(esriWebReport NOT esriWebSingleInfographic) NOT owner:'+esri.id.credentials[0].userId}},b._sharedCachedCustomReports)),e.push(g({url:portalUrl+"/sharing/rest/search",content:{appID:"webappbuilder",f:"json",start:1,num:100,sortField:"modified",sortOrder:"desc",q:'access:org type:"Report Template" typekeywords:(esriWebReport NOT esriWebSingleInfographic) NOT owner:'+esri.id.credentials[0].userId}},
b._sharedCachedCustomReports)),h&&h.appInfo&&h.appInfo.orgId&&e.push(g({url:portalUrl+"/sharing/rest/search",content:{appID:"webappbuilder",f:"json",start:1,num:100,sortField:"modified",sortOrder:"desc",q:'access:public type:"Report Template" typekeywords:(esriWebReport NOT esriWebSingleInfographic) NOT owner:'+esri.id.credentials[0].userId+" orgid: "+h.id}},b._sharedCachedCustomReports)));0===e.length?b._countryInitDfds[a].resolve():p(e).then(function(){b._countryInitDfds[a].resolve()})});return this._countryInitDfds[a]}}})},
"widgets/BusinessAnalyst/esriAnalystX/widgets/Selects/FilteringSelectTree":function(){define(["dojo/_base/declare","./FilteringSelect","esri/dijit/geoenrichment/SelectableTree","../../widgets/SelectableTreeGrid/SelectableTreeGrid","xstyle/css!./css/FilteringSelect.css"],function(t,p,l,k){function f(c,a){var e=[];c.forEach(function(b){b.children.forEach(function(g){var h={};h[a.idProperty]=g[a.idProperty];h[a.labelProperty]=g[a.labelProperty];h.__item=g;e.push(h)})});return e}function d(c,a,e){var b=
{};a.forEach(function(h){b[h[e.idProperty]]=h});var g=[];c.forEach(function(h){var m=h.children.filter(function(q){return b[q[e.idProperty]]});if(m.length){var n={};n[e.idProperty]=h[e.idProperty];n[e.labelProperty]=h[e.labelProperty];n.children=m.map(function(q){var r={};r[e.idProperty]=q[e.idProperty];r[e.labelProperty]=q[e.labelProperty];return r});g.push(n)}});return{treeData:g,idsHash:b}}k=t(k,{showRootCheckbox:!1,showCheckboxColumn:!1,enableRowSelection:!0,expandOnNodeClick:!0,baseTree:null,
hostWidget:null,defaultExpand:null,_firstTimeExpand:!0,getLabel:function(c,a){return c[this.labelProperty]},onRowsSelected:function(c,a){c=c&&c[0];a=a&&a[0];c&&!c.children&&(a.setAttribute("item",c[this.idProperty]),this.onChange(a))},createOptions:function(c,a,e){c=d(this.baseTree.data,c,this);this.items=c.idsHash;this.tree.clear();if(this._firstTimeExpand){this._firstTimeExpand=!1;if(this.defaultExpand)var b=Object.assign({},this.defaultExpand);else{b={};var g=this;c.treeData.forEach(function(h){b[h[g.idProperty]]=
!0})}this.grid._expanded=b}this.tree.addNodes(c.treeData);this.refresh()},getHighlightedOption:function(){},highlightFirstOption:function(){},highlightLastOption:function(){},clearResultList:function(){this.tree.clear()},onChange:function(c){}});t=t(p,{dropDownClass:k,tree:null,autoComplete:!1,defaultExpand:null,postCreate:function(){this.inherited(arguments);this.tree&&this.setItems(this._getStoreItemsFromTree())},_setTreeAttr:function(c){this.tree=c;this._isCreated&&this.setItems(this._getStoreItemsFromTree());
this.dropDown&&(this.dropDown.baseTree=this.tree)},_getStoreItemsFromTree:function(){return f(this.tree.data,this)},_startSearch:function(c){if(!this.dropDown){var a=this.id+"_popup";this.dropDown=new this.dropDownClass({gridClass:"esriMapsAnalystXSelectableTreeGrid esriMapsAnalystXFilteringSelect_treeGrid",onChange:function(){return this._selectOption.apply(this,arguments)}.bind(this),id:a,dir:this.dir,textDir:this.textDir,tree:new l([],{idProperty:this.idProperty}),idProperty:this.idProperty,labelProperty:this.labelProperty,
baseTree:this.tree,hostWidget:this,defaultExpand:this.defaultExpand})}this.inherited(arguments)},_openResultList:function(){this.inherited(arguments);this.dropDown&&this.dropDown.refresh()},getSelectedItem:function(){var c=this.inherited(arguments);return c&&c.__item}});t.NONE_ID=p.NONE_ID;return t})},"widgets/BusinessAnalyst/esriAnalystX/widgets/Selects/FilteringSelect":function(){define("dojo/_base/declare dojo/store/Memory dojo/query dojo/dom-class dojo/dom-style dojo/dom-geometry dijit/form/FilteringSelect dijit/form/_ComboBoxMenu ../../dijit/tooltips/TooltipUtil dojo/i18n!../../../nls/strings xstyle/css!./css/FilteringSelect.css".split(" "),
function(t,p,l,k,f,d,c,a,e,b){var g=t(p,{filtered:!1,noneItem:null,get:function(h){return"None"==h?this.noneItem:this.inherited(arguments)},query:function(h,m){var n=this.inherited(arguments);this.filtered=n.length!=this.data.length;return n}});p=t(a,{baseClass:"dijitComboBoxMenu",idProperty:"value",postCreate:function(){this.inherited(arguments);e.autoTooltip(this.domNode)},_createMenuItem:function(){var h=this.inherited(arguments);h.className+=" TrimWithEllipses";return h},selectItem:function(h){if(this.items){for(var m=
-1,n=0;n<this.items.length;n++)if(this.items[n][this.idProperty]==h){m=n;break}if(!(0>m))for(h=this.containerNode.children,n=0;n<h.length;n++){var q=h[n];if("none"!=q.style.display&&q.getAttribute("item")==m){this.selectLastNode();this.set("selected",q,!0);break}}}}});t=t(c,{forceWidth:!1,autoWidth:!1,selectOnClick:!0,idProperty:"value",labelProperty:"label",placeHolder:null,dropDownClass:p,options:null,_assignedStore:null,_isCreated:!1,postMixInProperties:function(){this.searchAttr=this.labelAttr=
this.labelProperty;var h={};h[this.idProperty]="None";h[this.labelAttr]=this.placeHolder||b.None;this.set("store",new g({idProperty:this.idProperty,noneItem:h}));this.inherited(arguments)},_startSearch:function(){this.inherited(arguments);this.dropDown.idProperty=this.idProperty;this.dropDown.labelProperty=this.labelProperty},postCreate:function(){this.inherited(arguments);e.autoTooltip(this.domNode);(this.options||this._assignedStore)&&this.setItems(this.options||this._assignedStore.data);k.add(this.domNode,
"esriMapsAnalystXFilteringSelect");this._isCreated=!0},_onFocus:function(){this._updateTrimWithEllipses(!0);this.inherited(arguments)},_onBlur:function(){this.inherited(arguments);this._updateTrimWithEllipses(!1)},_updateTrimWithEllipses:function(h){var m=l(".dijitInputInner",this.domNode)[0];if(m)k[h?"remove":"add"](m,"TrimWithEllipses")},_setStoreAttr:function(h){h instanceof g?(this.store=h,this.inherited(arguments)):(this._assignedStore=h,this._isCreated&&this.setItems(this._assignedStore.data))},
_setOptionsAttr:function(h){this.options=h;this._isCreated&&this.setItems(this.options)},setItems:function(h,m){this.store.setData(h);this.closeDropDown();this.dropDown&&this.dropDown.clearResultList();h=this.get("value");m=m||"None";this.set("value",m);m==h&&this.emit("Change");this._updateTrimWithEllipses(this.get("focused"))},_openResultList:function(h,m,n){var q=d.getContentBox(this.domNode).w;f.set(this.dropDown.domNode,"width",q+"px");this.inherited(arguments);this.store.filtered||this.dropDown.selectItem&&
this.dropDown.selectItem(this.get("value"))},_setBlurValue:function(){var h=this.get("displayedValue");"undefined"==typeof this.item&&(this.item=null,this.set("displayedValue",h));this.value!=this._lastValueReported&&this._handleOnChange(this.value,!0);this._refreshState();this.focusNode.removeAttribute("aria-activedescendant")},getSelectedItem:function(){var h=this;return this.store.data.filter(function(m){return m[h.idProperty]==h.get("value")})[0]}});t.NONE_ID="None";return t})},"widgets/BusinessAnalyst/esriAnalystX/dijit/tooltips/TooltipUtil":function(){define("dojo/dom-construct dojo/dom-style dojo/dom-geometry dojo/dom-class dojo/query dojo/on dojox/gfx dojo/sniff dojo/aspect dojox/uuid/generateRandomUuid dijit/Tooltip ../utils/DomUtil ../utils/MouseUtil esri/dijit/geoenrichment/utils/TooltipUtil dojo/domReady!".split(" "),
function(t,p,l,k,f,d,c,a,e,b,g,h,m,n){function q(){D&&(D.isMultilineContainer?A.hideTooltipForNode(D):(clearInterval(D.__autoTooltipInLayoutCheckHandle),delete D.__autoTooltipInLayoutCheckHandle,g.hide(D)),D=null)}function r(B,y){y=y||"";var z=t.create("div",{class:"esriMapsAnalystXValidationTooltip"+y},document.body);!y&&t.create("div",{class:"esriMapsAnalystXValidationTooltipTip"+y},z);t.create("div",{innerHTML:B,class:"esriMapsAnalystXValidationTooltipBody"+y},z);p.set(z,"position","fixed");return z}
function u(B,y){function z(){B&&(document.body.removeChild(B),I.forEach(function(L){L.remove()}),B=I=null)}y=y.textbox||y;var H=l.getMarginBox(B),G=l.position(y);"rtl"===document.dir?p.set(B,{left:G.x-H.w+"px",top:G.y+G.h/2-H.h/2+"px"}):p.set(B,{left:G.x+G.w+"px",top:G.y+G.h/2-H.h/2+"px"});var I=[d(document.body,"mousedown, keydown",z),d(y,"blur",z)];return{remove:z}}function v(B,y,z){function H(){var O=t.create("div",{class:"esriMapsAnalystXClosableTooltipTip"},I);k.add(O,"right"===z?"esriMapsAnalystXClosableTooltipTipRight":
"esriMapsAnalystXClosableTooltipTipLeft")}function G(){L=t.create("div",{class:"esriMapsAnalystXClosableTooltipBody"},I);t.create("div",{innerHTML:B,class:"esriMapsAnalystXClosableTooltipLabel"},L);N=t.create("div",{class:"esriMapsAnalystXClosableTooltipCloseButton esriMapsAnalystXCloseWindow esriMapsAnalystXCloseWindowWhite"},L)}y={class:"esriMapsAnalystXClosableTooltip "+(y||"")};y.id=b();var I=t.create("div",y,document.body),L,N;"right"!==z?(G(),H()):(H(),G());p.set(I,"position","fixed");return{tooltip:I,
body:L,closeButton:N}}function w(B,y,z,H){var G=l.getMarginBox(B.tooltip),I=l.position(y);"rtl"===document.dir&&"right"!==H||"rtl"!==document.dir&&"right"===H?p.set(B.tooltip,{left:I.x+I.w+"px",top:I.y+I.h/2-G.h/2+"px"}):p.set(B.tooltip,{left:I.x-G.w+"px",top:I.y+I.h/2-G.h/2+"px"});var L,N=function(){L&&clearTimeout(L);O&&clearInterval(O);S&&S.remove();B.tooltip.parentNode===document.body&&document.body.removeChild(B.tooltip)};var O=setInterval(function(){h.isNodeInLayout(y)||N();h.isNodeVisible(y)?
h.show(B.tooltip):h.hide(B.tooltip)},300);z&&(L=setTimeout(N,z));var S=d(B.closeButton,"click",function(){N()});B.tooltip._removeFunc=N;return B.tooltip}var A={},E={};A.hideTooltipForNode=n.hideTooltipForNode;A.setTooltipToNode=n.setTooltipToNode;A.createTooltip=function(B,y,z){var H={orientation:l.isBodyLtr(document)?"right":"left",offset:{x:15,y:0}};y&&(H.innerHTML=y);z&&(H=Object.assign(H,z));H.id=b();H.toMouseCursor&&(H.mouseEvent=m.getCursorPosition(),delete H.toMouseCursor);y=H.mouseEvent;delete H.mouseEvent;
z=H.htmlFragment;delete H.htmlFragment;var G=H.widget;delete H.widget;var I=H.orientation;delete H.orientation;var L=H.offset;delete H.offset;var N=H.horizontalOffset;delete H.horizontalOffset;var O=t.create("div",H,B?B.container:document.body);z?t.place(z,O):G&&G.placeAt(O);p.set(O,"position","fixed");var S=l.getMarginBox(O),R=function(U,Z){var da=U.touches?event.touches[0].clientX:U.clientX;U=U.touches?event.touches[0].clientY:U.clientY;var X,ea,Q=L.x,W=L.y;"left"===I?0>da-S.w-Q&&(X="right"):da+
S.w+Q>document.body.clientWidth&&(X="left");U+S.h+W>document.body.clientHeight&&(ea="above");X=X||I;p.set(O,{left:Z?Z+"px":da+("left"===X?-S.w-Q:Q)+"px",top:U+("above"===ea?-S.h-W:W)+"px"});O.style.display=""};y&&R(y,N);H=[];H.push(d(B?B:document.body,B?"mouse-move, mousemove":"mousemove, touchmove",function(U){R(U,N)}));H.push(d(B?B:document.body,B?"mouse-out, mouseout":"mouseout, touchend",function(U){O.style.display="none"}));B={};B.handlers=H;B.tooltip=O;E[O.id]=B;return O};A.removeTooltip=function(B){if(B){B=
"string"===typeof B?B:B.id;var y=E[B];delete E[B];y&&(y.handlers.forEach(function(z){z.remove()}),t.destroy(y.tooltip))}};var F={};A.registerTooltipForSlider=function(B,y,z,H){var G={offsetX:0,offsetY:0,class:"esriMapsAnalystXTooltip"};y&&(G=Object.assign(G,y));G.id=b();var I=t.create("div",G,document.body);I.style.display="none";p.set(I,"position","fixed");var L=!1,N=function(S,R){if(!L){L=!0;I.style.display="";I.innerHTML=R();var U=l.getMarginBox(I),Z=l.position(S);p.set(I,{left:Z.x+Z.w/2-U.w/2+
G.offsetX+"px",top:Z.y-U.h-5+G.offsetY+"px"});var da=[];da.push(e.after(B,"onChange",function(){I.innerHTML=R();Z=l.position(S);p.set(I,{left:Z.x+Z.w/2-U.w/2+"px",top:Z.y-U.h-5+"px"})}));var X=function(){I.style.display="none";da.forEach(function(Q){Q.remove()});L=!1},ea=!1;da.push(d(S,"mousedown, mouseDown, mouse-down",function(){ea=!0;da.push(d(document,"mouseup, mouseUp, mouse-up",function(){X()}))}));da.push(d(S,"mouseout, mouseOut, mouse-out",function(){ea||X()}))}};y=[];y.push(d(B.sliderHandle,
"mouseover, mouseOver, mouse-over",function(){H&&B.isSliderDisabled&&B.isSliderDisabled()||N(B.sliderHandle,function(){var S=H?B.get("value")[0]:B.get("value");return z?z(S):S})}));H&&y.push(d(B.sliderHandleMax,"mouseover, mouseOver, mouse-over",function(){B.isSliderDisabled&&B.isSliderDisabled()||N(B.sliderHandleMax,function(){return z?z(B.get("value")[1]):B.get("value")[1]})}));y.push(e.before(B,"destroy",function(){A.unregisterTooltipForSlider(B)}));B.tooltipId=I.id;var O={};O.tooltip=I;O.handlers=
y;F[I.id]=O};A.unregisterTooltipForSlider=function(B){var y=F[B.tooltipId];y&&(y.handlers.forEach(function(z){z.remove()}),t.destroy(y.tooltip));delete F[B.tooltipId];delete B.tooltipId};var D=null;A.autoTooltip=function(B,y,z){"string"===typeof y&&(y=y.split(" ").filter(function(G){return G&&!!G.trim().length}));y=y||[];y.push("TrimWithEllipses");z=z||[];z.push("esriMapsAnalystXInfoIcon");for(var H=0;H<y.length;H++)d(B,"."+y[H]+":mouseover, "+y[H]+":touchstart, ",function(G){this!==D&&this.offsetWidth<
this.scrollWidth&&!this.noAutoTooltip&&(G=getComputedStyle(this).width,G=Number(G.substr(0,G.length-2)),0>G-Math.round(G)&&this.offsetWidth==this.scrollWidth-1||(q(),D=this,G=D.autoTooltip||D.textContent||D.value,D.title&&(G+=" ("+D.title+")"),G&&g.show(G,D,["above","below"]),d.once(D,"mouseout, touchstart, touchout",function(){q()}),D.__autoTooltipInLayoutCheckHandle=setInterval(function(){h.isNodeInLayout(D)||q()},500)))});if(a("touch"))for(H=0;H<z.length;H++)d(B,"."+z[H]+":touchstart ",function(G){this!==
D&&(D=this,D.title&&(g.show(D.title,D,["above","below"]),d.once(D,"touchstart, touchout",function(){g.hide(D);D=null})))})};A.addAutoTooltipsToTabContainer=function(B){f(".tabLabel",B.domNode).forEach(function(y){k.add(y,"TrimWithEllipses")});A.autoTooltip(B)};A.setMultilineText=function(B,y,z,H){z=z||2;y=y.trim();H=H||["above","below"];k.remove(B,"TrimWithEllipses");B.style.overflow="hidden";B.innerHTML="";for(var G=y,I=!1;G;){z--;var L=t.create("div",null,B);L.style.overflow="hidden";L.style.whiteSpace=
"nowrap";for(var N=G;N;)if(L.textContent=N,L.offsetWidth<L.scrollWidth-1)N=(N=N.match(/^(.*[^\s]+)\s+[^\s]+$/))&&N[1]||"";else break;!N||!z&&N!==G?(L.textContent=G,G="",L.style.textOverflow="ellipsis",I=!0):G=G.substr(N.length).trim()}I&&A.setTooltipToNode(B,function(){q();D=B;D.isMultilineContainer=!0;return y},{position:H})};A.showErrorTip=function(B,y){return u(r(y),B.domNode||B)};A.showNewStyleErrorTip=function(B,y,z){return u(r(y,"NewStyle"+(z?" esriMapsAnalystXWarningStyle":"")),B.domNode||
B)};A.showAlertTooltip=function(B){B&&B.node&&B.message&&(g.show(B.message,B.node,B.position||["above","below"]),setTimeout(function(){g.hide(B.node)},B.timeout||5E3))};A.showClosableTooltip=function(B){var y=v(B.message,B.tooltipClass,B.position);return w(y,B.component,B.timeout,B.position)};A.removeClosableTooltip=function(B){B&&B._removeFunc&&B._removeFunc()};A.showClosableTooltipOnVerticalBracket=function(B){var y=B.below||B.above,z=l.position(B.above,!0),H=l.position(y,!0),G="rtl"!==document.dir?
"start"===B.direction:"end"===B.direction,I=z.x+z.w*(G?0:1);z=z.y;var L=H.y+H.h,N=t.create("div",{class:"esriMapsAnalystFlexibleTooltip_tooltip esriMapsAnalystXNonSelectable"},document.body),O=t.create("div",{class:"esriMapsAnalystFlexibleTooltip_surfaceContainer"},N);H={};I={top:z-2,left:I+(G?-3:3),height:L-z+4,width:10};for(var S in I)H[S]=I[S]+"px";p.set(N,H);var R=c.createSurface(O,I.width,I.height);R.clear();R.createPolyline([{x:G?I.width:0,y:0},{x:G?0:I.width,y:0},{x:G?0:I.width,y:I.height},
{x:G?I.width:0,y:I.height}]).setStroke({color:"#6E6E6E",width:6});B.component=N;G=v(B.message,B.tooltipClass,B.position);var U=function(){clickHandler&&clickHandler.remove();Z&&clearInterval(Z);R&&R.clear();t.destroy(O);t.destroy(N)},Z=setInterval(function(){h.isNodeInLayout(y)||U();h.isNodeVisible(y)?p.set(N,"visibility","visible"):p.set(N,"visibility","hidden")},300);B.timeout&&setTimeout(U,B.timeout);clickHandler=d(G.closeButton,"click",U);tooltip=w(G,B.component,B.timeout,B.position);var da=tooltip._removeFunc;
tooltip._removeFunc=function(){da();U()};return tooltip};return A})},"widgets/BusinessAnalyst/esriAnalystX/dijit/utils/DomUtil":function(){define("dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/dom-class dojo/on ../../utils/ObjectUtil esri/dijit/geoenrichment/utils/DomUtil".split(" "),function(t,p,l,k,f,d,c){var a=Object.assign({},c);a.select=function(e){return a.addTag(e,"selected")};a.unselect=function(e){return a.removeTag(e,"selected")};a.floatStart=function(e){return a.addTag(e,"esriMapsAnalystXFloatStart")};
a.floatEnd=function(e){return a.addTag(e,"esriMapsAnalystXFloatEnd")};a.addSpacer=function(e,b){e=t.create("div",{"class":"esriMapsAnalystXSpacer",innerHTML:"\x26nbsp;"},e);if(b)a[b](e);return e};a.getAndUpdateNumber=function(e,b){if(!e)return NaN;var g=e.get&&e.set;void 0===b&&(b=0);var h=d.parseNumber(g?e.get("value"):e.value,b);isNaN(h)||(g?e.set("value",d.formatNumber(h,b)):e.value=d.formatNumber(h,b));return h};a.getAndUpdateString=function(e){if(!e)return null;if(e.get&&e.set){var b=e.get("value").trim();
e.set("value",b)}else b=e.value.trim(),e.value=b;return b};a.getScreenScaleFactor=function(){return a.getTextBox("",{style:"width: 72pt; height: 72pt"}).w/96};a.positionAtCenter=function(e,b){if(e&&b){var g=p.position(e);b=p.position(b);g.w&&g.h&&b.w&&b.h&&l.set(e,{left:(b.w-g.w)/2+"px",top:(b.h-g.h)/2+"px"})}};a.showAroundOverlay=function(e,b){b=b||{};a.removeAroundOverlay(e);var g={w:"width",h:"height",l:"left",t:"top",r:"right",b:"bottom"},h=p.position(e);if(b.viewPortContainer){var m=p.position(b.viewPortContainer),
n=h.x,q=h.y;h.x=Math.max(h.x,m.x);h.w-=h.x-n;h.y=Math.max(h.y,m.y);h.h-=h.y-q;h.w=Math.min(h.w,m.x+m.w-h.x);h.h=Math.min(h.h,m.y+m.h-h.y)}e.__aroundOverlays=(b.placeInNode?[{l:0,t:-h.y,w:h.w,h:h.y},{l:h.w,t:-h.y,w:document.body.clientWidth-(h.x+h.w),h:document.body.clientHeight},{l:0,t:h.h,w:h.w,h:document.body.clientHeight-(h.y+h.h)},{l:-h.x,t:-h.y,w:h.x,h:document.body.clientHeight}]:[{l:h.x,t:0,w:h.w,h:h.y},{w:document.body.clientWidth-(h.x+h.w),r:0,t:0,b:0},{l:h.x,h:document.body.clientHeight-
(h.y+h.h),w:h.w,b:0},{l:0,t:0,w:h.x,b:0}]).map(function(u){var v=t.create("div",{"class":b.overlayClass||"esriMapsAnalystXNodeAroundOverlay"},b.placeInNode?e:document.body),w={position:"absolute"},A;for(A in g)void 0!==u[A]&&(w[g[A]]=Math.round(u[A])+"px");l.set(v,w);return v});h=function(){a.removeAroundOverlay(e)};b.removeOnClick&&(e.__aroundOverlaysRemoveHandle=f.once(document.body,"click",h));e.__aroundOverlaysResizeHandle=f(window,"resize",function(){a.showAroundOverlay(e,b)});var r;e.__aroundOverlaysSetIntervalHandle=
setInterval(function(){if(r){var u=p.position(e);u.x==r.x&&u.y==r.y&&u.w==r.w&&u.h==r.h||a.showAroundOverlay(e,b)}else r=p.position(e)},50);return{remove:h}};a.removeAroundOverlay=function(e){e.__aroundOverlays&&e.__aroundOverlays.forEach(function(b){t.destroy(b)});delete e.__aroundOverlays;e.__aroundOverlaysRemoveHandle&&e.__aroundOverlaysRemoveHandle.remove();delete e.__aroundOverlaysRemoveHandle;e.__aroundOverlaysResizeHandle&&e.__aroundOverlaysResizeHandle.remove();delete e.__aroundOverlaysResizeHandle;
clearInterval(e.__aroundOverlaysSetIntervalHandle);delete e.__aroundOverlaysSetIntervalHandle};a.getDocumentStyleDeclaration=function(e){function b(m){try{var n=m.rules||m.cssRules}catch(r){n=null}if(n)for(m=0;m<n.length;m++){var q=n[m];if(q.styleSheet){if(q=b(q.styleSheet))return q}else if(q.selectorText==e)return q.style}}for(var g=0;g<document.styleSheets.length;g++){var h=b(document.styleSheets[g]);if(h)return h}return null};a.getNodeFontFamily=function(e){return(e=l.get(e,"fontFamily")||l.getComputedStyle(e)["font-family"])?
e.replace(/'|"/g,"").split(",")[0]:e};a.getNodeFontSize=function(e){return l.toPixelValue(e,l.get(e,"fontSize"))};a.listenToNodeAdded=function(e,b,g){if(a.isNodeInLayout(e))b();else{e.__listenToNodeAddedHandle&&e.__listenToNodeAddedHandle.remove();var h=setInterval(function(){a.isNodeInLayout(e)&&(e.__listenToNodeAddedHandle&&e.__listenToNodeAddedHandle.remove(),b())},g||100);e.__listenToNodeAddedHandle={remove:function(){clearInterval(h);delete e.__listenToNodeAddedHandle}};return e.__listenToNodeAddedHandle}};
a.isNodeVisible=function(e){return a.isChildOf(e,document.body,function(b){return!k.contains(b,"dijitHidden")&&"hidden"!=l.get(b,"visibility")})};a.enableHyperlink=function(e,b){b?k.replace(e,"esriMapsAnalystXLink","esriMapsAnalystXLinkDisabled"):k.replace(e,"esriMapsAnalystXLinkDisabled","esriMapsAnalystXLink")};return a})},"widgets/BusinessAnalyst/esriAnalystX/utils/ObjectUtil":function(){define(["../../baUtil/ObjectUtil","esri/dijit/geoenrichment/utils/ObjectUtil","esri/dijit/geoenrichment/utils/SortUtil"],
function(t,p,l){var k=Object.assign({},t,p,l);k.getPrototypeOf=function(f){try{return Object.getPrototypeOf?Object.getPrototypeOf(f):f.__proto__||f.constructor&&f.constructor.prototype}catch(d){return null}};k.isJson=function(f){return"object"===typeof f&&k.getPrototypeOf(f)===Object.prototype};k.copyJson=function(f){return void 0===f||null===f?null:JSON.parse(JSON.stringify({object:f})).object};k.convert=function(f,d,c){var a=d||function(){};d=a(f);if("undefined"!==typeof d)return d;if(Array.isArray(f)){var e=
[];f.forEach(function(m){e.push(k.convert(m,a,c))},this);return e}if(!k.isJson(f))return f;d={};for(var b in f){var g=f[b],h=c?a(b):b;"undefined"===typeof h&&(h=b);d[h]=k.convert(g,a,c)}return d};k.getDeepCopy=function(f){return k.convert(f)};k.getRange=function(f,d,c){d="function"===typeof d?d.bind(null==c?null:c):null;var a,e;for(e in f)if(c=f[e],c=Number(null===d?c:d(c,e)),!isNaN(c))if(void 0===b)var b=a=c;else b=Math.min(b,c),a=Math.max(a,c);return void 0===b?{}:{min:b,max:a}};k.removeEmptyObjects=
function(f){function d(a){a&&"object"===typeof a&&Object.keys(a).forEach(function(e){var b=a[e];!b||"object"!==typeof b||Array.isArray(b)||Object.keys(b).length?d(b):(c=!0,delete a[e])})}for(var c=!0;c;)c=!1,d(f);return f};k.removeValues=function(f,d){function c(a){a&&"object"===typeof a&&Object.keys(a).forEach(function(e){d(e,a[e])?c(a[e]):delete a[e]})}c(f);return f};k.isEqual=function(f,d){if(null===f||"object"!==typeof f||null===d||"object"!==typeof d)return f===d;if(Object.keys(f).length!==Object.keys(d).length)return!1;
var c={},a;for(a in f)c[a]=!0;for(a in d)if(void 0!==c[a])delete c[a];else return!1;for(a in f)if(!k.isEqual(f[a],d[a]))return!1;return!0};k.getObject=function(f,d){if(!d)return f;d=d.split(".");for(var c=0;c<d.length;c++)f=f&&f[d[c]];return f};k.formatNumber=function(f,d){d="number"===typeof d?{places:d}:d||{};if(null==d.places||0>d.places)d.places=k.getPlaces(f,!0),d.maxPlaces&&d.places>d.maxPlaces&&(d.places=d.maxPlaces);return p.formatNumber(f,d)};k.getPlaces=function(f,d){function c(h,m){var n=
f.indexOf(h,a);if(0>n)return e;h=f.charAt(n+h.length);return!h||0>m.indexOf(h)?e:n-a}f=+f;if(isNaN(f))return-1;f+="";var a=f.indexOf(".")+1,e=a?f.length-a:0;if(2>=e||!d)return e;d=0;if(!+f.substr(0,a-1))for(;"0"===f.charAt(a);)a++,d++,e--;for(var b=e-1;2<=b;b--){var g=Math.min(c("000000000000000".substr(0,b),"01234"),c("999999999999999".substr(0,b),"56789"));if(g!==e){e=g;break}}return e+d};return k})},"widgets/BusinessAnalyst/baUtil/ObjectUtil":function(){define(["require","exports"],function(t,
p){function l(k,f){for(var d=0,c=Object.keys(f);d<c.length;d++){var a=c[d];"object"!==typeof k[a]||null===k[a]||"object"!==typeof f[a]||null===f[a]?k[a]=f[a]:Array.isArray(k[a])?Array.isArray(f[a])?k[a].concat(f[a]):k[a]=f[a]:Array.isArray(f[a])?k[a]=f[a]:l(k[a],f[a])}}return{map:function(k,f,d){void 0!==d&&(f=f.bind(d));if("object"!==typeof k)throw Error("Object or array expected");if(Array.isArray(k)){d=[];for(var c=0,a=k.length;c<a;c++)d.push(f(k[c],c));return d}d={};c=0;for(a=Object.keys(k);c<
a.length;c++){var e=a[c];Object.hasOwnProperty.call(k,e)&&(d[e]=f(k[e],e))}return d},deepAssign:function(k){for(var f=[],d=1;d<arguments.length;d++)f[d-1]=arguments[d];for(d=0;d<f.length;d++)l(k,f[d]);return k}}})},"widgets/BusinessAnalyst/esriAnalystX/dijit/utils/MouseUtil":function(){define(["dojo/dom-geometry","esri/dijit/geoenrichment/utils/MouseUtil"],function(t,p){var l;p.unitTesting_setCursorOverNode=function(k){k=t.position(k);p.unitTesting_setCursorPosition(k.x+k.w/2,k.y+k.h/2)};p.unitTesting_setCursorPosition=
function(k,f){p._latestEvent={clientX:k,pageX:k,clientY:f,pageY:f}};p.unitTesting_lockPosition=function(k){l=k};p.unitTesting_shiftMousePosition=function(k,f){p.unitTesting_setCursorPosition(p._latestEvent.clientX+(k||0),p._latestEvent.clientY+(f||0))};p._setLatestEvent=function(k){l||(p._latestEvent=k)};return p})},"widgets/BusinessAnalyst/esriAnalystX/widgets/SelectableTreeGrid/SelectableTreeGrid":function(){define("dojo/_base/declare dojo/aspect dojo/Evented dojo/dom-class dojo/dom-construct dojo/dom-style dojo/on dojo/query dijit/Tooltip dijit/_WidgetBase ../../dijit/_TemplatedMixin dgrid/OnDemandGrid dgrid/tree esri/dijit/geoenrichment/utils/KeyboardUtil esri/dijit/geoenrichment/TriStateItem ../../dijit/utils/DgridUtil ../../dijit/utils/DomUtil ../../dijit/utils/MouseUtil ../../dijit/tooltips/TooltipUtil dojo/text!./templates/SelectableTreeGrid.html xstyle/css!./css/SelectableTreeGrid.css".split(" "),
function(t,p,l,k,f,d,c,a,e,b,g,h,m,n,q,r,u,v,w,A){var E=t(null,{_selectedRowInfos:null,_lastSelectedRowInfo:null,_outsideHandler:null,_isSelectionFrozen:!1,keepSelectionOnOutsideClick:!1,_previouslySelectedRowsByNode:null,constructor:function(){this._previouslySelectedRowsByNode=new WeakMap},buildRendering:function D(){this._selectedRowInfos={};this.inherited(D,arguments)},postCreate:function B(){this.inherited(B,arguments);k.add(this.domNode,"esriMapsAnalystXNonSelectable")},_reselectSingleNode:function(B){this.selectSingleRow(this._previouslySelectedRowsByNode.get(B),
B)},selectSingleRow:function(B,y){this.unselectAllRows();this._selectRow(B,y)},_selectRow:function(B,y){k.add(B,this.selectedRowClass);k.add(B,"row-level-"+this._getNodeLevel(y));var z=this.tree.getIdentity(y),H={row:B,node:y,nodeId:z,index:y.parent&&y.parent.children.indexOf(y)};this._lastSelectedRowInfo=this._selectedRowInfos[z]=H;this._previouslySelectedRowsByNode.set(y,B);var G=this;this._outsideHandler=this._outsideHandler||c(document.body,"click",function(){v.isMouseOver(G.domNode)||G._isSelectionFrozen||
G.keepSelectionOnOutsideClick||G.unselectAllRows()})},_unselectRow:function(B,y){delete this._selectedRowInfos[this.tree.getIdentity(y)];k.remove(B,this.selectedRowClass)},unselectAllRows:function(){for(var B in this._selectedRowInfos)k.remove(this._selectedRowInfos[B].row,this.selectedRowClass);this._selectedRowInfos={};this._lastSelectedRowInfo=null;this._outsideHandler&&this._outsideHandler.remove();this._outsideHandler=null},getSelectedRowNodes:function(){return this._getSelectedNodesRows().nodes},
selectRowNodes:function(B){var y=this;B&&B.forEach(function(z){var H=y.grid.row(z);H&&H.element&&y._selectRow(H.element,z)})},freezeRowSelection:function(){this._isSelectionFrozen=!0},unfreezeRowSelection:function(){this._isSelectionFrozen=!1},_getSelectedNodesRows:function(){var B=[],y=[],z=[],H;for(H in this._selectedRowInfos)z.push(this._selectedRowInfos[H]);z.sort(function(G,I){return G.index-I.index});z.forEach(function(G){B.push(G.node);y.push(G.row)});return{nodes:B,rows:y}},_emitSelectedRowsEvent:function(){var B=
this._getSelectedNodesRows();if(B.nodes.length)this.onRowsSelected(B.nodes,B.rows)}});return t([b,g,l,E],{templateString:A,tree:null,grid:null,gridClass:"",highlightSelected:!0,firstColumns:null,additionalColumns:null,showRootCheckbox:!0,showCheckboxColumn:!0,showHeader:!0,labelColumnField:"label",gridParams:null,keepContentUnderScroll:void 0,hideInvisibleExpandoIcons:!1,expandOnNodeClick:!1,checkLimit:0,checkLimitMessage:null,checkLimitMessageTimeout:5E3,handleMultipleCheck:!1,enableRowSelection:!1,
enableMultipleRowSelection:!1,allowSelectionFromManyParents:!1,selectedRowFilter:null,selectedRowClass:"row-selected",enableHeaderLabelToggleClick:!0,defaultExpand:null,fitParentSize:!1,renderAllRows:!1,rowPostProcessor:null,_rootCheckbox:null,_checkboxes:null,_lastCheckedNode:null,updateSelectionCountDiv:function(B,y){},getLabel:function(B,y){return B.label},postCreate:function y(){this.inherited(y,arguments);this._createGrid()},resize:function(){this.grid.resize();this._updateCheckboxState(this._rootCheckbox);
for(var y in this._checkboxes)this._updateCheckboxState(this._checkboxes[y]);this._emitSelectionChanged()},setWidth:function(y){this.grid&&this.grid.domNode&&d.set(this.grid.domNode,"width",y+"px")},setHeight:function(y){this.grid&&this.grid.domNode&&d.set(this.grid.domNode,"height",y+"px")},row:function(y){return this.grid.row(y)},cell:function(y){return this.grid.cell(y)},_labelColumn:null,_createGrid:function(){var y=this;this._checkboxes={};var z={label:this.getLabel(this.tree.root,!0),sortable:!1,
field:this.labelColumnField,renderCell:this._renderLabel.bind(this),renderHeaderCell:this._renderLabelHeader.bind(this,this.tree.root)},H;if(this.additionalColumns&&this.additionalColumns.length&&(H=this.additionalColumns.filter(function(I){return I.field===y.labelColumnField})[0])){for(var G in z)void 0===H[G]&&(H[G]=z[G]);z=H}z.indentWidth=z.indentWidth||16;this._labelColumn=z=this._prepareTreeColumn(z);G=[];this.firstColumns&&(G=G.concat(this.firstColumns));this.showCheckboxColumn&&G.push({label:"",
field:"checkbox",sortable:!1,renderCell:this._renderCheckboxForColumn.bind(this),renderHeaderCell:this._renderCheckboxForColumn.bind(this,this.tree.root)});H||G.push(z);this.additionalColumns&&(G=G.concat(this.additionalColumns));z=["esriMapsAnalystXSelectableTreeGrid"];this.gridClass&&z.push(this.gridClass);this.fitParentSize&&z.push("fitParentSize");z=Object.assign({class:z.join(" "),keepScrollPosition:!0,store:this.tree,columns:G},this.gridParams);this.grid=this._createGridObject(z,this.gridContainer);
this.own(this.grid);this.grid._expanded=this.defaultExpand||this.grid._expanded||{};r.oddEvenFix(this.grid);this.own(c(this.tree,"updated",this._onStoreUpdated.bind(this)));this._addKeepScrollHandlers();this._addGridHandlers();this.renderAllRows&&(this.grid.minRowsPerPage=1E4,this.grid.maxRowsPerPage=10250);this.grid.startup();w.autoTooltip(this.domNode);this.showHeader||k.add(this.domNode,"esriMapsAnalystXGridNoHeader");c(this.grid.domNode,".dgrid-expando-icon:click,.dgrid-content .dgrid-column-labelColumn:dblclick,.dgrid-content .dgrid-column-labelColumn:keydown",
function(I){(I=y.grid.row(I))&&y.onExpandChangedUser(I.data)})},_createGridObject:function(y,z){return new h(y,z)},onRowInserted:function(y,z){},_addGridHandlers:function(){function y(H,G){z.enableRowSelection&&G.parent&&(!z.selectedRowFilter||z.selectedRowFilter(G))&&(k.add(H,"esriMapsAnalystXClickable"),c(H,"click",function(I){setTimeout(function(){if(!z._isSelectionFrozen){if(I.shiftKey&&z.enableMultipleRowSelection){if(z._lastSelectedRowInfo&&z._lastSelectedRowInfo.row.parentNode&&z._lastSelectedRowInfo.node.parent===
G.parent){var L=u.getChildIndex(z._lastSelectedRowInfo.row.parentNode,z._lastSelectedRowInfo.row),N=u.getChildIndex(H.parentNode,H),O=L<=N?z._lastSelectedRowInfo.row:H;L=L<=N?H:z._lastSelectedRowInfo.row;N=O;if(O.id!==L.id){do{O=z.grid.row(N).data;z._selectRow(N,O);if(N.id===L.id)break;N=N.nextSibling}while(N)}}else z.selectSingleRow(H,G);u.stealFocus()}else n.isCtrl(I)&&z.enableMultipleRowSelection?z._lastSelectedRowInfo&&z._lastSelectedRowInfo.row.parentNode&&z._lastSelectedRowInfo.node.parent===
G.parent||z.allowSelectionFromManyParents?z._selectedRowInfos[G.id]?z._unselectRow(H,G):z._selectRow(H,G):z.selectSingleRow(H,G):z.selectSingleRow(H,G);z._emitSelectedRowsEvent()}})}))}var z=this;this.own(p.after(this.grid,"insertRow",function(H){var G=H&&z.grid._rowIdToObject[H.id];if(H){if(G&&z.hideInvisibleExpandoIcons&&(!G.children||!G.children.length)){var I=a(".dgrid-expando-icon",H)[0];I&&(I.style.width="0")}u[G&&!1===G.visible?"hide":"show"](H);y(H,G)}G&&(z._updateRowHighlighting(G,H),z.onRowInserted(H,
G));z.rowPostProcessor&&z.rowPostProcessor(H,G);return H}))},_addKeepScrollHandlers:function(){function y(H){if(!z.grid.contentNode)return H;if(z.fitParentSize){var G=u.hasScrollbars(z.grid.bodyNode);z.grid.headerNode.style[z.isLeftToRight()?"right":"left"]=G.w?"":"0px";z._lastContentWidth=z.grid.contentNode.style.width||z._lastContentWidth||"";z.grid.contentNode.style.width=G.h?z._lastContentWidth:""}else z.keepContentUnderScroll?z.grid.contentNode.style.width=z.grid.headerNode.firstChild.offsetWidth+
"px":!1===z.keepContentUnderScroll&&(z.grid.contentNode.style.width="");return H}var z=this;if(this.fitParentSize||void 0!==this.keepContentUnderScroll)p.before(this.grid,"refresh",function(){z.hideCheckLimitMessage();z._lastCheckedNode=null}),p.after(this.grid,"resize",y),p.after(this.grid,"refresh",y)},_getNodeLevel:function(y){var z=-1;for(y=y&&y.parent;y;)z++,y=y.parent;return z},_prepareTreeColumn:function(y){return this._wrapTreeColumn(m(y))},_wrapTreeColumn:function(y){return y},_onStoreUpdated:function(){this._checkboxes=
{};this._refreshGrid();this._rootCheckbox&&this._updateCheckboxState(this._rootCheckbox);this._emitSelectionChanged()},_emitSelectionChanged:function(y){var z=this.tree.root.selectCount;this.updateSelectionCountDiv(this.selectionCounter,z);this.emit("SelectionChanged",{selected:z,toggledTreeNode:y})},refresh:function(){this._refreshGrid();this.refreshCheckboxes()},_isRefreshSuspended:!1,setRefreshSuspended:function(y){this._isRefreshSuspended=y},_refreshGrid:function(){if(!this._isRefreshSuspended){var y=
this.grid.getScrollPosition();this.grid.refresh();this.grid.scrollTo(y);for(var z in this._selectedRowInfos)this.grid.row(this._selectedRowInfos[z].node).element&&this._selectRow(this.grid.row(this._selectedRowInfos[z].node).element,this._selectedRowInfos[z].node)}},getScrollPosition:function(){return this.grid&&this.grid.getScrollPosition()},setScrollPosition:function(y){return this.grid&&this.grid.scrollTo(y)},_renderCheckbox:function(y){if(!y.leafCount&&y!==this.tree.root||!this.showCheckboxColumn||
!1===y.selectable&&void 0===y.indepSelection)return document.createTextNode("");var z=new q(null,{class:"esriStyleInTable"});z.autoToggle=!1;z.node=y;this._updateCheckboxState(z,y);!1===y.enabled&&z.set("disabled",!0);y===this.tree.root?(this._rootCheckbox=z,u[this.showRootCheckbox?"show":"hide"](z.domNode)):this._checkboxes[this.tree.getIdentity(y)]=z;z.onClick=this._onCheckboxClick.bind(this,y,z);return z},_renderCheckboxForColumn:function(y){return(y=this._renderCheckbox(y))&&y.domNode},refreshCheckboxes:function(){this._rootCheckbox&&
this._updateCheckboxState(this._rootCheckbox);for(var y in this._checkboxes)this._updateCheckboxState(this._checkboxes[y])},clearLastCheckInfo:function(){this._lastCheckedNode=null},_onCheckboxClick:function(y,z,H){H.stopPropagation();this.hideCheckLimitMessage();var G=this.handleMultipleCheck&&("function"!==typeof this.handleMultipleCheck||this.handleMultipleCheck(y));G&&H.shiftKey&&this._tryToggleMultipleNodes(this._lastCheckedNode,y,z||H)?this._lastCheckedNode=y:(this._lastCheckedNode=G?y:null,
this._toggleNodeSelection(y,z||H),this.refreshCheckboxes())},_tryToggleMultipleNodes:function(y,z,H){if(!y||y===z||y.parent!==z.parent)return!1;var G=z.parent.children,I=G.indexOf(y);z=G.indexOf(z);y=I<z?1:-1;var L=[],N=[];for(I+=y;;I+=y){var O=G[I];((void 0===O.indepSelection?O.selected:O.indepSelection)?L:N).push(O);if(I===z)break}L.forEach(function(S){this._toggleNodeSelection(S,H)},this);N.every(function(S){return this._toggleNodeSelection(S,H)},this);this.refreshCheckboxes();return!0},_toggleNodeSelection:function(y,
z){var H=void 0===y.indepSelection?!y.selected:!y.indepSelection;if(H&&this.checkLimit){var G=this.getSelectedNodes().length,I="function"===typeof this.checkLimit?this.checkLimit(this.tree,G):this.checkLimit;if(G>=I)if(void 0===y.indepSelection&&y.children&&!1!==this.tree.getSelectionState(y))H=!1;else return this.showCheckLimitMessage(z),!1}G=!0;void 0===y.indepSelection?(G=this.tree.changeSelect(y,H,I),!G&&this.showCheckLimitMessage(z)):y.indepSelection=H;this._emitSelectionChanged(y);return G},
_checkLimitHandler:null,showCheckLimitMessage:function(y){if(this.checkLimitMessage){var z=y&&(y.domNode||y.target);z&&(e.show(this.checkLimitMessage,z,["above","below"]),y=function(){z&&e.hide(z);z=null},setTimeout(y,this.checkLimitMessageTimeout),this._checkLimitHandler=y,this.onCheckLimitReached(y))}},hideCheckLimitMessage:function(){this._checkLimitHandler&&this._checkLimitHandler();this._checkLimitHandler=null},onCheckLimitReached:function(y){},_updateCheckboxState:function(y){if(y){var z=this._getNodeSelection(y.node);
y.set("checked",z);this._updateRowHighlighting(y.node,null,z)}},_getNodeSelection:function(y){return void 0!==y.indepSelection?y.indepSelection:this.tree.getSelectionState(y)},_updateRowHighlighting:function(y,z,H){this.highlightSelected&&y&&(H=void 0!==H?H:this._getNodeSelection(y),(z=z||this.grid&&this.row(y).element)&&(!0!==H||void 0===y.indepSelection&&!1===y.selectable?k.remove(z,"selected"):k.add(z,"selected")))},_renderLabel:function(y,z,H){z=this._renderLabelNode(y,H);this._provideLabelClickAction(z,
H,y);return z},_provideLabelClickAction:function(y,z,H){var G=this.expandOnNodeClick&&H.children?H.children.length&&(y=z,function(){this.toggleExpand(H);this.onExpandChangedUser(H)}.bind(this)):!1!==H.enabled&&this.showCheckboxColumn?this._onCheckboxClick.bind(this,H,null):null;G&&(k.add(y,"esriMapsAnalystXClickable"),c(y,"click",function(I){I.stopPropagation();G(I)}))},_renderLabelNode:function(y){return f.create("div",{class:"esriMapsAnalystXSelectableTreeLabel TrimWithEllipses",innerHTML:this.getLabel(y)})},
_renderLabelHeader:function(y){var z=f.create("div",{class:"esriMapsAnalystXSelectableTreeLabel TrimWithEllipses",innerHTML:this.getLabel(y)||this._labelColumn&&this._labelColumn.label||""});this.enableHeaderLabelToggleClick&&this.showRootCheckbox&&(k.add(z,"esriMapsAnalystXClickable"),c(z,"click",this._onCheckboxClick.bind(this,y,null)));return z},onRowsSelected:function(y,z){},isNodeSelected:function(y){return y&&(y.selected||y.indepSelection)},getSelectedNodes:function(){var y=this.tree.getSelectedNodes(!1),
z=this._getIndepSelectedNodes();return y.concat(z)},_getIndepSelectedNodes:function(){function y(H){H&&(H.indepSelection&&z.push(H),H.children&&H.children.forEach(y))}var z=[];y(this.tree.root);return z},getSelectedState:function(){if(!this.tree)return null;var y={normalSelection:{},indepSelection:{}},z=this.tree.getSelectedNodes(!1);z&&z.forEach(function(H){y.normalSelection[H.id]=!0});(z=this._getIndepSelectedNodes())&&z.forEach(function(H){y.indepSelection[H.id]=!0});return y},setSelectedState:function(y){if(this.tree){this.tree.changeSelect(this.tree.root,
!1);if(y){for(var z in y.normalSelection){var H=this.tree.get(z);H&&this.tree.changeSelect(H,!0)}for(z in y.indepSelection)if(H=this.tree.get(z))H.indepSelection=!0}this.refreshCheckboxes()}},setNodeSelected:function(y,z,H){y&&(void 0!==y.indepSelection?y.indepSelection=z:this.tree.changeSelect(y,z),!1!==H&&this.refreshCheckboxes())},isExpanded:function(y){y="string"===typeof y?y:y[this.tree.idProperty];return this.grid._expanded&&this.grid._expanded[y]},setExpanded:function(y,z,H){y="string"==typeof y?
y:y[this.tree.idProperty];void 0!==y&&(!1!==H?(H=this.grid.row(y))&&H.element&&this.grid.expand(y,z):this.grid._expanded[y]=z)},toggleExpand:function(y){this.setExpanded(y,!this.isExpanded(y))},getExpandedState:function(){return Object.assign({},this.grid._expanded)},setExpandedState:function(y){this.grid._expanded=y||{}},onExpandChangedUser:function(y){},destroy:function(){this.unselectAllRows();this.inherited(arguments)}})})},"widgets/BusinessAnalyst/esriAnalystX/dijit/_TemplatedMixin":function(){define(["dojo/_base/declare",
"dijit/_TemplatedMixin","./_EscapeValueMixin"],function(t,p,l){return t([p,l],{})})},"widgets/BusinessAnalyst/esriAnalystX/dijit/_EscapeValueMixin":function(){define(["dojo/_base/declare"],function(t){return t(null,{_escapeValue:function(p){return p.replace(/"/g,"\x26quot;")}})})},"dgrid/tree":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/Deferred dojo/_base/lang dojo/query dojo/on dojo/aspect ./util/has-css3 ./Grid dojo/has!touch?./util/touch put-selector/put".split(" "),function(t,
p,l,k,f,d,c,a,e,b,g){function h(q,r,u,v){v=this.grid.isRTL?"right":"left";var w=".dgrid-expando-icon";r&&(w+=".ui-icon.ui-icon-triangle-1-"+(u?"se":"e"));q=g("div"+w+"[style\x3dmargin-"+v+": "+q*(this.indentWidth||9)+"px; float: "+v+"]");q.innerHTML="\x26nbsp;";return q}function m(q){var r=this,u=this.style.height;u&&(this.style.display="0px"==u?"none":"block");q&&(g(this,".dgrid-tree-resetting"),setTimeout(function(){g(r,"!dgrid-tree-resetting")}));this.style.height=""}function n(q){var r=q.renderCell||
e.defaultRenderCell,u,v;q||(q={});q.shouldExpand=q.shouldExpand||function(w,A,E){return E};c.after(q,"init",function(){var w=q.grid,A=".dgrid-content .dgrid-column-"+q.id,E=[];w.cleanEmptyObservers=!1;if(!w.store)throw Error("dgrid tree column plugin requires a store to operate.");q.renderExpando||(q.renderExpando=h);E.push(w.on(q.expandOn||".dgrid-expando-icon:click,"+A+":dblclick,"+A+":keydown",function(F){var D=w.row(F);w.store.mayHaveChildren&&!w.store.mayHaveChildren(D.data)||"keydown"==F.type&&
32!=F.keyCode||"dblclick"==F.type&&v&&1<v.count&&D.id==v.id&&-1<F.target.className.indexOf("dgrid-expando-icon")||w.expand(D);-1<F.target.className.indexOf("dgrid-expando-icon")&&(v&&v.id==w.row(F).id?v.count++:v={id:w.row(F).id,count:1})}));a("touch")&&E.push(w.on(b.selector(A,b.dbltap),function(){w.expand(this)}));w._expanded||(w._expanded={});E.push(c.after(w,"insertRow",function(F){var D=this.row(F);q.shouldExpand(D,u,this._expanded[D.id])&&this.expand(F,!0,!0);return F}));E.push(c.before(w,"removeRow",
function(F,D){if(F=F.connected)f("\x3e.dgrid-row",F).forEach(function(B){w.removeRow(B,!0)}),D||g(F,"!")}));q.collapseOnRefresh&&E.push(c.after(w,"cleanup",function(){this._expanded={}}));w._calcRowHeight=function(F){var D=F.connected;return F.offsetHeight+(D?D.offsetHeight:0)};w.expand=function(F,D,B){var y=F.element?F:w.row(F),z=a("transitionend");F=new l;var H=F.promise;F.resolve();F=y.element;F=-1<F.className.indexOf("dgrid-expando-icon")?F:f(".dgrid-expando-icon",F)[0];B=B||!1===q.enableTransitions;
if(F&&F.mayHaveChildren&&(B||D!==!!this._expanded[y.id])){var G=void 0===D?!this._expanded[y.id]:D;g(F,".ui-icon-triangle-1-"+(G?"se":"e")+"!ui-icon-triangle-1-"+(G?"e":"se"));D=y.element;var I=D.connected,L={originalQuery:this.query};if(!I){I=L.container=D.connected=g(D,"+div.dgrid-tree-container");var N=function(R){return w.store.getChildren(y.data,R)};q.allowDuplicates&&(L.parentId=y.id);"level"in F&&(N.level=F.level);H=H.then(function(){if(w.renderQuery)return w.renderQuery(N,L);var R=g(I,"div"),
U=w.renderArray(N(L),R,"level"in N?{queryLevel:N.level}:{});l.when(U,function(){g(R,"!")});return U});z?d(I,z,m):m.call(I)}I.hidden=!G;var O=I.style;if(!z||B)O.display=G?"block":"none",O.height="";else{if(G){O.display="block";var S=I.scrollHeight;O.height="0px"}else g(I,".dgrid-tree-resetting"),O.height=I.scrollHeight+"px";setTimeout(function(){g(I,"!dgrid-tree-resetting");O.height=G?S?S+"px":"auto":"0px"})}G?this._expanded[y.id]=!0:delete this._expanded[y.id]}return H};c.after(q,"destroy",function(){p.forEach(E,
function(F){F.remove()});delete w.expand;delete w._calcRowHeight})});q.renderCell=function(w,A,E,F){var D=q.grid,B=Number(F&&F.queryLevel)+1,y=!D.store.mayHaveChildren||D.store.mayHaveChildren(w),z=F.parentId;B=u=isNaN(B)?0:B;D=q.renderExpando(B,y,D._expanded[(z?z+"-":"")+D.store.getIdentity(w)],w);D.level=B;D.mayHaveChildren=y;(w=r.call(q,w,A,E,F))&&w.nodeType?(g(E,D),g(E,w)):E.insertBefore(D,E.firstChild)};return q}n.defaultRenderExpando=h;k.getObject("dgrid.tree",!0);return dgrid.tree=n})},"dgrid/util/has-css3":function(){define(["dojo/has"],
function(t){function p(k,f){k=k.style;var d;if(f in k)return!0;f=f.slice(0,1).toUpperCase()+f.slice(1);for(d=l.length;d--;)if(l[d]+f in k)return l[d];return!1}var l=["ms","O","Moz","Webkit"];t.add("css-transitions",function(k,f,d){return p(d,"transitionProperty")});t.add("css-transforms",function(k,f,d){return p(d,"transform")});t.add("css-transforms3d",function(k,f,d){return p(d,"perspective")});t.add("transitionend",function(){var k=t("css-transitions");return k?!0===k?"transitionend":{ms:"MSTransitionEnd",
O:"oTransitionEnd",Moz:"transitionend",Webkit:"webkitTransitionEnd"}[k]:!1});return t})},"widgets/BusinessAnalyst/esriAnalystX/dijit/utils/DgridUtil":function(){define(["dojo/aspect","dojo/dom-class","dojo/query","../../utils/ArrayUtil"],function(t,p,l,k){function f(e,b,g){if(void 0===g){var h=e._rowIdToObject[b.id];h&&(g=(e=e.store)&&e.isOdd&&e.isOdd(h))}0!==g&&1!==g||p.replace(b,a[g],a[1-g])}function d(e,b,g){var h=e.store;if(h&&h.updateExpand){g=h.updateExpand(b.data,g,!0,e.getSortingFunction());
for(var m in g)b=e.row(h.get(m)),b.element&&f(e,b.element,g[m])}}var c=["ui-icon-triangle-1-e","ui-icon-triangle-1-se"],a=["dgrid-row-even","dgrid-row-odd"];return{createExpando:function(e){p.add(e,"dgrid-expando-icon ui-icon ui-icon-triangle-1-e esriMapsAnalystXClickable");return{expando:e,update:function(b){b=b?1:0;p.replace(e,c[b],c[1-b])}}},oddEvenFix:function(e){e.expand&&(e.getSortingFunction=function(){var b=this.get("sort");return b&&b.length?k.getSorting(b):null},t.after(e,"insertRow",function(b){f(e,
b);return b}),t.before(e,"refresh",function(){var b=e.store;b&&b.updateExpandedNodes&&b.updateExpandedNodes(e._expanded,e.getSortingFunction())}),t.around(e,"expand",function(b){return function(g,h){var m=g.element?g:e.row(g);void 0===h&&(h=!e._expanded[m.id]);!0===h&&d(e,m,!0);var n=b.apply(this,arguments);!1===h&&d(e,m,!1);return n}}),t.around(e,"adjustRowIndices",function(b){return function(){var g=e.store;g&&g.updateExpandedNodes&&g.updateExpand&&g.isOdd||b.apply(this,arguments)}}))},makeContentNeverGoUnderScroll:function(e){function b(){var g=
e.headerNode.firstChild,h=e.contentNode;h&&g&&g.offsetWidth!==h.offsetWidth&&(h.style.width="",g.style.width="",g.style.width=h.offsetWidth+"px")}t.after(e,"resize",b);t.after(e,"refresh",b);t.after(e,"expand",function(g){setTimeout(b,100);setTimeout(b,300);return g})},inlineSortArrow:function(e,b,g){b=k.arrayToObject(k.listToArray(b));t.after(e,"updateSortArrow",function(h,m){if((m=h[0]&&h[0].attribute)&&b[m]){var n=(m=e._sortNode||e._findSortArrowParent(m))&&l(".dgrid-sort-arrow",m)[0];h=h[0].descending;
if(n){n.remove();p.remove(m,"dgrid-sort-down dgrid-sort-up");var q=g?l(g,m)[0]:m.lastChild.append?m.lastChild:m;q.append||(q=m);p.add(q,h?"dgrid-sort-down":"dgrid-sort-up");q.append(n)}}},!0)}}})},"widgets/BusinessAnalyst/esriAnalystX/utils/ArrayUtil":function(){define("require exports ../../baUtil/array dojo/store/util/SimpleQueryEngine ./ObjectUtil esri/dijit/geoenrichment/utils/ArrayUtil".split(" "),function(t,p,l,k,f,d){function c(b,g){b.some(function(h,m){g.func(h,m,g,b);if(g.stop)return!0});
return g}function a(b){var g=b.split(" "),h=g[1];b={};switch(g[0]){case "max":b.result=-Infinity;g=function(m,n,q){q.result=Math.max(q.result,f.getObject(m,h))};break;case "min":b.result=Infinity;g=function(m,n,q){q.result=Math.min(q.result,f.getObject(m,h))};break;case "sum":b.result=0;g=function(m,n,q){q.result+=f.getObject(m,h)};break;case "random":b.result=void 0;g=function(m,n,q,r){q.result=r[Math.round((r.length-1)*Math.random())];q.stop=!0};break;default:throw Error("Unsupported query.");}b.func=
g;return b}var e={getSorting:function(b,g){if(!b)return f.compare;if("function"===typeof b)return b;var h=Array.isArray(b)?b:b.sort||[b];var m={};"string"===typeof g&&(g=[g]);Array.isArray(g)?g.forEach(function(n){m[n]=f.compareNames}):g&&(m=g);return function(n,q){for(var r=void 0,u=0;r=h[u];u++){var v=n[r.attribute],w=q[r.attribute];if(v=(m[r.attribute]||(m["*"]?m["*"].bind(null,r.attribute):f.compare))(v,w,!1,!1,n,q))return r.descending?-v:v}return 0}},sort:function(b,g,h){return b.sort(e.getSorting(g,
h))},sortIndices:function(b,g,h){b=l.map(b,function(n,q){return{value:n,index:q}});var m=e.getSorting(g,h);b.sort(function(n,q){return m(n.value,q.value)});return l.map(b,function(n){return n.index})},getQueryEngine:function(b,g){return function(h,m){m&&m.sort&&(m=Object.assign({},m),m.sort=e.getSorting(m.sort,b));return(g||k)(h,m)}},objectToArray:function(b,g){void 0===g&&(g=null);var h=[],m=g?function(r){return b[r]?b[r][g]:void 0}:function(r){return b[r]},n;for(n in b){var q=m(n);"undefined"!==
typeof q&&h.push(q)}return h},arrayToObject:function(b,g){var h={},m=d.composeIdentityFunction(g);l.forEach(b,function(n){h[m(n)]=n});return h},composeIdentityFunction:d.composeIdentityFunction,removeDuplicates:d.removeDuplicates,splitArrayToBunches:d.splitArrayToBunches,contains:function(b,g){return-1!==l.indexOfLoose(b,g)},remove:function(b,g){g=l.indexOfLoose(b,g);-1!==g&&b.splice(g,1);return-1!==g},merge:function(b,g){b=b||[];null!=g&&Array.prototype.push.apply(b,g);return b},listToArray:function(b,
g){if(null==b)return[];void 0===g&&(g=",");b="string"===typeof b?b.split(g):b.slice();for(g=0;g<b.length;g++)"string"===typeof b[g]&&(b[g]=b[g].trim());return b},reorderArray:function(b,g){var h=b.length,m=0,n=Array(h),q={},r={},u;for(u in g){var v=Math.round(u);if(0<=v&&v<h&&!q[v]){var w=Math.round(g[u]);0<=w&&w<h&&!r[w]&&(n[w]=b[v],q[v]=1,r[w]=1,m++)}}m!==h&&(n=n.filter(function(A,E){return r[E]}),b.forEach(function(A,E){!q[E]&&n.push(A)}));return n},mapIndices:function(b,g,h,m){m=null==m?null:
m;if(1===b)h.call(m,0,Math.floor(g/2));else{g=(g-1)/(b-1);for(var n=0;n<b;n++)h.call(m,n,Math.floor(.5+n*g))}},moveElement:function(b,g,h,m){var n=Array.isArray(g)?g:[g];if(-1!==n.indexOf(h))return b.slice();var q=[];b.forEach(function(r){-1===n.indexOf(r)&&(r==h?"before"===m?(n.forEach(function(u){q.push(u)}),q.push(h)):"after"===m&&(q.push(h),n.forEach(function(u){q.push(u)})):q.push(r))});return q},min:function(b,g){var h=b.length;switch(h){case 0:return null;case 1:return b[0];default:for(var m=
b[0],n=g(m),q=0,r=1;r<h;r++){var u=g(b[r]);n>u&&(m=b[r],n=u,q=r)}return{key:q,value:m,comparisonValue:n}}},max:function(b,g){var h=b.length;switch(h){case 0:return null;case 1:return b[0];default:for(var m=b[0],n=g(m),q=0,r=1;r<h;r++){var u=g(b[r]);n<u&&(m=b[r],n=u,q=r)}return{key:q,value:m,comparisonValue:n}}},query:function(b,g){if("object"===typeof g)return c(b,g);if("string"===typeof g)return g=a(g),c(b,g).result},everyEqualProperty:function(b,g){if(2>b.length)return!0;var h;return!b.some(function(m,
n){if(0===n)h=m[g];else if(h!==m[g])return!0})}};return e})},"widgets/BusinessAnalyst/baUtil/array":function(){define(["require","exports"],function(t,p){var l=Array.prototype,k={every:function(f,d,c){return null==f?!0:"string"===typeof f?l.every.call(f.split(""),d,c):l.every.call(f,d,c)},some:function(f,d,c){return null==f?!1:"string"===typeof f?l.some.call(f.split(""),d,c):l.some.call(f,d,c)},forEach:function(f,d,c){if(null!=f)return"string"===typeof f?l.forEach.call(f.split(""),d,c):l.forEach.call(f,
d,c)},map:function(f,d,c){return null==f?[]:"string"===typeof f?l.map.call(f.split(""),d,c):l.map.call(f,d,c)},filter:function(f,d,c){return null==f?[]:"string"===typeof f?l.filter.call(f.split(""),d,c):l.filter.call(f,d,c)},indexOf:function(f,d){return null==f?-1:"string"===typeof f?l.indexOf.call(f.split(""),d):l.indexOf.call(f,d)},indexOfLoose:function(f,d){if(null==f||void 0===f.length)return-1;if("string"===typeof f)return k.indexOfLoose(f.split(""),d);for(var c=0,a=f.length;c<a;c++)if(f[c]==
d)return c;return-1},lastIndexOf:function(f,d){return null==f?-1:"string"===typeof f?l.lastIndexOf.call(f.split(""),d):l.lastIndexOf.call(f,d)},lastIndexOfLoose:function(f,d){if(null==f||void 0===f.length)return-1;if("string"===typeof f)return k.lastIndexOfLoose(f.split(""),d);for(var c=f.length-1;0<=c;c--)if(f[c]==d)return c;return-1}};return k})},"widgets/BusinessAnalyst/SelectPointPolygonPage":function(){define("dojo/_base/declare dojo/_base/html dojo/_base/lang dojo/dom-class dojo/dom-style dojo/on dojo/query dojo/when dijit/_TemplatedMixin dijit/_WidgetBase esri/Color esri/dijit/Search esri/dijit/geoenrichment/_WizardPage esri/geometry/webMercatorUtils esri/graphic esri/InfoTemplate esri/symbols/PictureMarkerSymbol esri/symbols/SimpleFillSymbol esri/symbols/SimpleLineSymbol esri/toolbars/draw jimu/dijit/EditorXssFilter jimu/utils dojo/text!./SelectPointPolygonPage.html ./utils/GeocodeUtil".split(" "),
function(t,p,l,k,f,d,c,a,e,b,g,h,m,n,q,r,u,v,w,A,E,F,D,B){return t([b,e,m],{templateString:D,polygonActive:!1,freehandPolygonActive:!1,postCreate:function(){this.inherited(arguments);var y=this;this.config.firstPageText=E.getInstance().sanitize(this.config.firstPageText);this.config.searchTextBoxOption?(this.search=(new h({map:this.map})).placeAt(this.searchContainer),this.search.activeSource.outFields.push("country"),this.own(d(this.search,"select-result",function(){y._loadSearchResult()}))):(k.remove(this.activatePinButton,
"esriBusinessAnalystButtonSearchPadding"),k.remove(this.activatePolygonButton,"esriBusinessAnalystButtonSearchPadding"),k.remove(this.activateFreehandPolygonButton,"esriBusinessAnalystButtonSearchPadding"));this.config.dropPinOption?this.own(d(this.activatePinButton,"click",function(){y._onActivatePinButtonClick()})):f.set(this.activatePinButton,"display","none");this.config.drawPolygonOption?this.own(d(this.activatePolygonButton,"click",function(){y._onActivatePolygonButtonClick()})):f.set(this.activatePolygonButton,
"display","none");this.config.drawFreehandPolygonOption?this.own(d(this.activateFreehandPolygonButton,"click",function(){y._onActivateFreehandPolygonButtonClick()})):f.set(this.activateFreehandPolygonButton,"display","none")},startup:function(){this.resize();this._started||k.add(this.layoutGrid.domNode,"business-analyst-search-suggestions-overflow")},_loadSearchResult:function(){this.wizard.selectedPoint.geometry=this.search.selectedResult.feature.geometry;this.wizard.selectedPoint.locationName=this.search.selectedResult.name;
var y=n.xyToLngLat(this.search.selectedResult.feature.geometry.x,this.search.selectedResult.feature.geometry.y);this.wizard.selectedPoint.long=y[0].toFixed(5);this.wizard.selectedPoint.lat=y[1].toFixed(5);this.wizard.setSelectedCountry(this.search.selectedResult.feature.attributes.country);this.onNext()},_onActivatePinButtonClick:function(){this._executeHandler?(this._deactivate(),this._deactivatePolygon(),this._deactivateFreehandPolygon()):(this._deactivatePolygon(),this._deactivateFreehandPolygon(),
this._setActive())},_setActive:function(){this._executeHandler||(k.add(this.activatePinButton,"esriBusinessAnalystPressedButton"),this.map.setInfoWindowOnClick(!1),this.map.setMapCursor("default"),this.map.disablePan(),this._executeHandler=d(this.map,"click",this._addPoint.bind(this)))},_deactivate:function(){this._executeHandler&&(k.remove(this.activatePinButton,"esriBusinessAnalystPressedButton"),this.map.setInfoWindowOnClick(!0),this.map.enablePan(),this._executeHandler.remove(),this._executeHandler=
null)},_addPoint:function(y){if(this._executeHandler){this._deactivate();var z=n.xyToLngLat(y.mapPoint.x,y.mapPoint.y),H=this;a(B.reverseGeocode({x:z[0],y:z[1]}),function(G){var I=new u("https://@sbaseurl@/jsapi/jsapi/esri/dijit/Search/images/search-pointer.png",36,36);H.wizard.selectedPoint.pointGraphic=new q(y.mapPoint,I);H.map.graphics.add(H.wizard.selectedPoint.pointGraphic);H.map.centerAndZoom(y.mapPoint,12);H.wizard.selectedPoint.geometry=y.mapPoint;H.wizard.selectedPoint.locationName=G&&G.address&&
G.address.LongLabel?G.address.LongLabel:"";H.wizard.setSelectedCountry(G.address.CountryCode);H.wizard.selectedPoint.long=z[0].toFixed(5);H.wizard.selectedPoint.lat=z[1].toFixed(5);H.onNext()})}},_onActivatePolygonButtonClick:function(){this.polygonActive?(this._deactivatePolygon(),this._deactivate(),this._deactivateFreehandPolygon()):(this._deactivate(),this._deactivateFreehandPolygon(),this._setActivePolygon())},_setActivePolygon:function(){this.polygonActive||(k.add(this.activatePolygonButton,
"esriBusinessAnalystPressedButton"),this.polygonActive=!0,this.toolbar||(this.toolbar=new A(this.map),this.toolbar.on("draw-end",l.hitch(this,this._addPolygon))),this.map.disablePan(),this.map.setInfoWindowOnClick(!1),this.toolbar.activate("polygon"))},_deactivatePolygon:function(){this.polygonActive&&(k.remove(this.activatePolygonButton,"esriBusinessAnalystPressedButton"),this.toolbar&&(this.toolbar.deactivate(),this.map.enablePan(),this.map.setInfoWindowOnClick(!0)),this.polygonActive=!1)},_onActivateFreehandPolygonButtonClick:function(){this.freehandPolygonActive?
(this._deactivateFreehandPolygon(),this._deactivate(),this._deactivatePolygon()):(this._deactivate(),this._deactivatePolygon(),this._setActiveFreehandPolygon())},_setActiveFreehandPolygon:function(){this.freehandPolygonActive||(k.add(this.activateFreehandPolygonButton,"esriBusinessAnalystPressedButton"),this.freehandPolygonActive=!0,this.toolbar||(this.toolbar=new A(this.map),this.toolbar.on("draw-end",l.hitch(this,this._addPolygon))),this.map.disablePan(),this.map.setInfoWindowOnClick(!1),this.toolbar.activate("freehandpolygon"))},
_deactivateFreehandPolygon:function(){this.freehandPolygonActive&&(k.remove(this.activateFreehandPolygonButton,"esriBusinessAnalystPressedButton"),this.toolbar&&(this.toolbar.deactivate(),this.map.enablePan(),this.map.setInfoWindowOnClick(!0)),this.freehandPolygonActive=!1)},_addPolygon:function(y){this._deactivate();this._deactivatePolygon();this._deactivateFreehandPolygon();var z=new v(v.STYLE_SOLID,new w(w.STYLE_SOLID,new g([199,55,36,1]),2),new g([199,55,36,.5]));y=new q(y.geometry,z);y.attributes=
{title:this.nls.customPolygon};z=new r;z.title="${title}";z.content=" ";z.info={};z.info.fieldInfos=[];y.setInfoTemplate(z);this.map.graphics.add(y);this.map.infoWindow.setFeatures([y]);this.map.infoWindow.show(this.map.toScreen(y.geometry.getExtent().getCenter()));this.map.infoWindow.removeActions("addMarker");this.wizard.drawnPolygonGraphic=y},resize:function(){this._resizeContentImg()},_resizeContentImg:function(){var y=document.activeElement;p.empty(this.contentContainer);var z=p.toDom(this.config.firstPageText);
p.place(z,this.contentContainer);this.contentContainer.nodeType&&1===this.contentContainer.nodeType&&((z=c("img",this.contentContainer))&&z.length&&z.forEach(l.hitch(this,function(H){"undefined"!==typeof H.complete&&!1===H.complete?this.own(d(H,"load",l.hitch(this,function(){this._resizeImg(H)}))):this._resizeImg(H)})),z=F.getFocusNodesInDom(this.domNode),z.length&&(F.initFirstFocusNode(this.domNode,z[0]),F.initLastFocusNode(this.domNode,z[z.length-1])),this.isOpen||p.isDescendant(y,this.domNode))&&
(y=F.getFirstFocusNode(this.domNode),F.isAutoFocusFirstNodeWidget(this)&&y.focus(),this.isOpen=!1)},_resizeImg:function(y){var z=p.getContentBox(this.contentContainer),H=p.getContentBox(y);H&&H.w&&H.w>=z.w&&p.setStyle(y,{maxWidth:z.w-20+"px",maxHeight:z.h-40+"px"})}})})},"esri/dijit/Search":function(){define("require dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/Evented dojo/Deferred dojo/keys dojo/on dojo/query dojo/uacss dojo/regexp dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-style dojo/dom-construct dojo/date/locale dojo/i18n!../nls/jsapi dojo/text!./Search/templates/Search.html dijit/_WidgetBase dijit/_TemplatedMixin dijit/_FocusMixin dijit/a11yclick dijit/focus ../lang ../InfoTemplate ../kernel ../SpatialReference ../graphic ../promiseList ../symbols/PictureMarkerSymbol ../symbols/SimpleMarkerSymbol ../symbols/SimpleLineSymbol ../symbols/SimpleFillSymbol ../symbols/TextSymbol ../symbols/Font ../geometry/Point ../geometry/Extent ../geometry/normalizeUtils ../geometry/scaleUtils ../tasks/locator ../tasks/query ../Color ../styles/basic".split(" "),
function(t,p,l,k,f,d,c,a,e,b,g,h,m,n,q,r,u,v,w,A,E,F,D,B,y,z,H,G,I,L,N,O,S,R,U,Z,da,X,ea,Q,W,V,fa,ka){function oa(C,J){C&&J&&(C._layer=J,C._sourceLayer=J)}p=p([A,E,F,f],{declaredClass:"esri.dijit.Search",templateString:w,reHostedFS:/https?:\/\/services.*\.arcgis\.com/i,constructor:function(C,J){this.css={searchGroup:"searchGroup",searchInput:"searchInput",searchInputGroup:"searchInputGroup",searchBtn:"searchBtn",searchSubmit:"searchSubmit",searchIcon:"searchIcon esri-icon-search",searchButtonText:"searchButtonText",
searchToggle:"searchToggle",searchToggleIcon:"searchIcon esri-icon-down-arrow",searchMenu:"searchMenu",searchMenuHeader:"menuHeader",searchClear:"searchClear",searchClearIcon:"searchIcon esri-icon-close searchClose",searchSpinner:"searchIcon esri-icon-loading-indicator searchSpinner",searchSourceName:"sourceName",suggestionsMenu:"suggestionsMenu",sourcesMenu:"sourcesMenu",activeSource:"active",hasValue:"hasValue",hasButtonMode:"hasButtonMode",hasMultipleSources:"hasMultipleSources",showSuggestions:"showSuggestions",
showSources:"showSources",showNoResults:"showNoResults",searchLoading:"searchLoading",latLonHeader:"searchLatLongHeader",searchMoreResults:"moreResults",searchMoreResultsList:"resultsList",searchMoreResultsHeader:"moreHeader",searchMoreResultsItem:"moreItem",searchMoreResultsListHeader:"popupHeader",searchShowMoreResults:"showMoreResults",searchNoResultsMenu:"noResultsMenu",searchNoResultsBody:"noResultsBody",searchNoResultsHeader:"noResultsHeader",searchNoValueIcon:"noValueIcon esri-icon-notice-triangle",
searchNoValueText:"noValueText",searchNoResultsText:"noResultsText",searchExpandContainer:"searchExpandContainer",searchAnimateContainer:"searchAnimate",searchExpanded:"searchExpanded",searchCollapsed:"searchCollapsed",searchClearFloat:"searchClearFloat"};this._allIndex="all";this._objectIdIdentifier="_objectId";this._deferreds=[];this._sourceNames=[];this.defaultSource={locator:new W("//geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer"),singleLineFieldName:"SingleLine",outFields:["Addr_type",
"Match_addr","StAddr","City"],name:v.widgets.Search.main.esriLocatorName,localSearchOptions:{minScale:3E5,distance:5E4},placeholder:v.widgets.Search.main.placeholder,highlightSymbol:(new N(t.toUrl("./Search/images/search-pointer.png"),36,36)).setOffset(9,18)};this.options={map:null,theme:"arcgisSearch",visible:!0,value:"",allPlaceholder:"",sources:[this.defaultSource],activeSourceIndex:0,suggestionDelay:150,enableSourcesMenu:!0,enableSuggestionsMenu:!0,enableInfoWindow:!0,showInfoWindowOnSelect:!0,
enableSuggestions:!0,enableButtonMode:!1,autoNavigate:!0,autoSelect:!0,addLayersFromMap:!1,zoomScale:1E3,graphicsLayer:null,enableHighlight:!0,highlightGraphic:null,enableLabel:!1,labelSymbol:(new U).setColor(new fa([181,56,46,.9])).setFont(new Z("14px",Z.STYLE_NORMAL,Z.VARIANT_NORMAL,Z.WEIGHT_BOLD,"Arial")),labelGraphic:null,infoTemplate:new z(v.widgets.Search.main.searchResult,'\x3cdiv class\x3d"${searchTheme}"\x3e\x3cdiv id\x3d"${searchMoreResultsId}" class\x3d"${searchMoreResults}"\x3e\x3cdiv class\x3d"${searchMoreResultsItem}"\x3e${searchResult}\x3c/div\x3e\x3cdiv\x3e${searchMoreResultsHtml}\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e'),
searchResults:null,suggestResults:null,selectedResult:null,magicKey:null,selectedFeatureId:null,expanded:!1,maxLength:128,maxResults:6,maxSuggestions:6,locationToAddressDistance:1500,minCharacters:3,enableSearchingAll:!0};C=l.mixin({},this.options,C);this.set(C);this._updateActiveSource();this._i18n=v;this._defaultSR=new G(4326);this.domNode=J},startup:function(){this.inherited(arguments);this.sources||(this.sources=[]);this._mapLoaded().then(l.hitch(this,this._init))},postCreate:function(){var C=
this;this.inherited(arguments);this._moreResultsId=this.id+"_more_results";this.own(a(this.submitNode,D,l.hitch(this,this._searchButton)));this.own(a(this.sourcesBtnNode,D,l.hitch(this,this._toggleSourcesMenu)));this.own(a(this.inputNode,D,l.hitch(this,this._inputClick)));this.own(a(this.clearNode,D,l.hitch(this,this._clearButton)));this.own(a(this.formNode,"submit",l.hitch(this,function(J){J.preventDefault();this._cancelSuggest();this.search()})));this.own(a(this.inputNode,"keyup",l.hitch(this,function(J){this._inputKey(J)})));
this.own(a(this.sourcesBtnNode,"keyup",l.hitch(this,function(J){this._sourceBtnKey(J)})));this.own(a(this.suggestionsNode,"li:click, li:keyup",function(J){C._suggestionsEvent(J,this)}));this.own(a(this.sourcesNode,"li:click, li:keyup",function(J){C._sourcesEvent(J,this)}));this.own(a(this.inputNode,"input, paste",l.hitch(this,function(){this._suggestDelay()})));this.map&&this.map.infoWindow&&this.map.infoWindow.domNode&&this.enableInfoWindow&&(this.own(a(this.map.infoWindow.domNode,"#"+this._moreResultsId+
"_show:click",l.hitch(this,function(J){this._showMoreResultsClick(J)}))),this.own(a(this.map.infoWindow.domNode,"#"+this._moreResultsId+"_list li a:click",l.hitch(this,function(J){this._moreResultsClick(J)}))),this.own(a(this.map.infoWindow.domNode,"#"+this._moreResultsId+" [data-switch-coordinates]:click",l.hitch(this,function(J){this._switchCoordinatesClick(J)}))));this.value&&this._checkStatus();this._hideMenus();this._updateVisible();this._insertSources(this.sources);this._setPlaceholder(this.activeSourceIndex);
this._updateButtonMode(this.enableButtonMode);this.toggle(this.expanded)},destroy:function(){this.clear();r.empty(this.domNode);this.inherited(arguments)},clear:function(){this.clearGraphics();m.get(this.inputNode,"value")&&m.set(this.inputNode,"value","");this._changeAttrValue("value","");this.set("searchResults",null);this.set("suggestResults",null);this.set("selectedResult",null);this.set("magicKey",null);this.set("selectedFeatureId",null);n.remove(this.containerNode,this.css.hasValue);m.set(this.clearNode,
"title","");this._hideMenus();this._closePopup();this._hideLoading();this.emit("clear-search")},show:function(){q.set(this.domNode,"display","block")},hide:function(){q.set(this.domNode,"display","none")},expand:function(){this.enableButtonMode&&(n.add(this.containerNode,this.css.searchExpanded),n.remove(this.containerNode,this.css.searchCollapsed),this._hideMenus(),this.set("expanded",!0))},collapse:function(){this.enableButtonMode&&(n.remove(this.containerNode,this.css.searchExpanded),n.add(this.containerNode,
this.css.searchCollapsed),this._hideMenus(),this.set("expanded",!1))},toggle:function(C){this.enableButtonMode&&("undefined"===typeof C&&(C=!this.expanded),C?this.expand():this.collapse())},search:function(C){var J=new d;this._mapLoaded().then(l.hitch(this,function(){this._searchDeferred(C).then(l.hitch(this,function(M){var K=M.results;this.set("searchResults",K);0===M.numResults&&(this._noResults(M.value),this._showNoResultsMenu());this._hideLoading();this.emit("search-results",M);this._selectFirstResult(K,
M.activeSourceIndex);J.resolve(K)}),l.hitch(this,function(M){J.reject(M)}))}));return J.promise},suggest:function(C){var J=new d;this._mapLoaded().then(l.hitch(this,function(){this._suggestDeferred(C).then(l.hitch(this,function(M){if(M){var K=M.results;this.set("suggestResults",K);this._insertSuggestions(K,M.value);this.emit("suggest-results",M);J.resolve(K)}}),l.hitch(this,function(M){J.reject(M)}))}));return J.promise},select:function(C){var J=this._getDefaultSymbol(C),M=this.labelSymbol,K=this.sources,
P=this.activeSourceIndex,T=this.enableHighlight,ba=this.enableLabel,ia=this.autoNavigate,aa=this.showInfoWindowOnSelect,ca=this.enableInfoWindow,Y=this.infoTemplate,ha=C.feature?new I(C.feature.toJson()):null,na=ha?C.feature._sourceLayer:null;oa(ha,na);if(P===this._allIndex){var la=this._getSourceIndexOfResult(C);if(null!==la){var ja=K[la];P=la}}else ja=K[P];ja&&(ja.hasOwnProperty("highlightSymbol")&&(J=ja.highlightSymbol),ja.hasOwnProperty("labelSymbol")&&(M=ja.labelSymbol),ja.hasOwnProperty("enableHighlight")&&
(T=ja.enableHighlight),ja.hasOwnProperty("enableLabel")&&(ba=ja.enableLabel),ja.hasOwnProperty("autoNavigate")&&(ia=ja.autoNavigate),ja.hasOwnProperty("showInfoWindowOnSelect")&&(aa=ja.showInfoWindowOnSelect),ja.hasOwnProperty("enableInfoWindow")&&(ca=ja.enableInfoWindow),ja.hasOwnProperty("infoTemplate")?Y=ja.infoTemplate:ja.featureLayer&&ja.featureLayer.infoTemplate&&(Y=ja.featureLayer.infoTemplate));this._hideMenus();this._hideLoading();if(ha){K=this.highlightGraphic;var ma=this.graphicsLayer;
la=this.labelGraphic;var pa=l.mixin({},ha.attributes,{searchTheme:this.theme,searchResult:this._searchResultHTML(C),searchMoreResults:this.css.searchMoreResults,searchMoreResultsItem:this.css.searchMoreResultsItem,searchMoreResultsId:this._moreResultsId,searchMoreResultsHtml:this._moreResultsHTML(C)}),qa=null;ca&&(qa=Y);la?(la.setGeometry(ha.geometry),la.setAttributes(pa),la.setSymbol(M),M&&"textsymbol"===M.type&&la.symbol.setText(C.name)):(la=new I(ha.geometry,M,pa),oa(la,na),M&&"textsymbol"===M.type&&
la.symbol.setText(C.name),ba&&(ma?ma.add(la):this.map&&this.map.graphics&&this.map.graphics.add(la)));K?(K.setGeometry(ha.geometry),K.setAttributes(pa),K.setInfoTemplate(qa),K.setSymbol(J)):(K=new I(ha.geometry,J,pa,qa),oa(K,na),T&&(ma?ma.add(K):this.map&&this.map.graphics&&this.map.graphics.add(K)));K&&K.symbol&&"textsymbol"===K.symbol.type&&K.symbol.setText(C.name);this.map&&this.map.infoWindow&&ca&&aa&&(this.map.infoWindow.setFeatures([K]),J=this._getPointFromGeometry(K.geometry),this.map.infoWindow.show(J));
this.map&&ia&&C&&C.hasOwnProperty("extent")&&"function"===typeof this.map.setExtent&&this.map.setExtent(C.extent,!0);this.set("highlightGraphic",K);this.set("labelGraphic",la)}this.set("selectedResult",C);this.emit("select-result",{result:C,source:ja,sourceIndex:P})},focus:function(){B.focus(this.inputNode)},blur:function(){this.inputNode.blur();B.curNode&&B.curNode.blur()},clearGraphics:function(){var C=this.highlightGraphic,J=this.graphicsLayer,M=this.labelGraphic;C&&(J?J.remove(C):this.map&&this.map.graphics&&
this.map.graphics.remove(C));M&&(J?J.remove(M):this.map&&this.map.graphics&&this.map.graphics.remove(M));this.set("labelGraphic",null);this.set("highlightGraphic",null)},_mapLoaded:function(){var C=new d;if(this.map)if(this.map.loaded)C.resolve();else a.once(this.map,"load",l.hitch(this,function(){C.resolve()}));else C.resolve();return C.promise},_init:function(){this._getMapLayers().then(l.hitch(this,function(){this.set("loaded",!0);this.emit("load")}))},_clearButton:function(){this.clear();B.focus(this.inputNode)},
_error:function(C){return Error(this.declaredClass+" "+C)},_searchDeferred:function(C){var J=new d,M=this.value,K=this.activeSourceIndex;C&&C.hasOwnProperty("index")&&(K=C.index);this._showLoading();this._hideMenus();this._closePopup();this.clearGraphics();var P={magicKey:this.magicKey,text:M};C?"string"===typeof C?(P.text=C,C=this._searchQueries(P)):C="object"===typeof C&&C.hasOwnProperty("magicKey")?this._searchQueries(C):"object"===typeof C&&C.hasOwnProperty("geometry")?this._searchQueries({geometry:C}):
"object"===typeof C&&C.hasOwnProperty(this._objectIdIdentifier)?this._searchQueries(C):"object"===typeof C&&"point"===C.type?this._searchQueries({point:C}):C instanceof Array&&2===C.length?this._searchQueries({latlon:C}):this._searchQueries(P):C=this._searchQueries(P);C.always(l.hitch(this,function(T){T=this._formatResults(T,K,M);J.resolve(T)}));return J.promise},_suggestDeferred:function(C){var J=new d;this._deferreds.push(J);C||(C=this.value);var M=this.activeSourceIndex;this._suggestQueries({text:C}).always(l.hitch(this,
function(K){var P;if(K)for(var T=0;T<K.length;T++)K[T]&&(P=!0);P?(K=this._formatResults(K,M,C),J.resolve(K)):J.resolve()}));return J.promise},_getDefaultSymbol:function(C){var J;this.map&&(J=this.map.getBasemap());J||(J="topo");if(C&&C.feature&&C.feature.geometry)var M=C.feature.geometry.type;"polyline"===M?M="line":"circle"===M||"extent"===M?M="polygon":"multipoint"===M&&(M="point");if(M){if(C=ka.getSchemes({theme:"default",basemap:J,geometryType:M}))var K=C.primaryScheme;if(K){K.color&&K.hasOwnProperty("opacity")&&
(K.color.a=K.opacity);var P=K;C=K.color;K=K.size;switch(M){case "point":var T=new O;T.setColor(C);T.setSize(null!==K?K:P.size);M=new S;M.setColor(P.outline.color);M.setWidth(P.outline.width);T.setOutline(M);break;case "line":T=new S;T.setColor(C);T.setWidth(null!==K?K:P.width);break;case "polygon":T=new R,T.setColor(C),M=new S,M.setColor(P.outline.color),M.setWidth(P.outline.width),T.setOutline(M)}P=T}}return P},_selectFirstResult:function(C,J){if(this.autoSelect&&C){var M;J===this._allIndex?M=this._getFirstResult(C):
C[J]&&C[J][0]&&(M=C[J][0]);M&&this.select(M)}},_getSourceIndexOfResult:function(C){var J=this.searchResults;if(J)for(var M in J)if(J[M]&&J[M].length)for(var K=0;K<J[M].length;K++)if(J[M][K]===C)return parseInt(M,10);return null},_getFirstResult:function(C){if(C)for(var J in C)if(C[J]&&C[J][0])return C[J][0];return!1},_onFocus:function(){this.map&&"function"===typeof this.map.disableKeyboardNavigation&&this.map.disableKeyboardNavigation();this.emit("focus");this.inherited(arguments)},_onBlur:function(){this._hideMenus();
this.map&&"function"===typeof this.map.enableKeyboardNavigation&&this.map.enableKeyboardNavigation();this.enableButtonMode&&this.loaded&&this.collapse();this.emit("blur");this.inherited(arguments)},_getMapLayers:function(){var C=new d;if(this.addLayersFromMap&&this.map){var J=[],M=this.map.graphicsLayerIds;if(M&&M.length){for(var K=0;K<M.length;K++){var P=this.map.getLayer(M[K]);P&&J.push(this._featureLayerLoaded(P))}L(J).always(l.hitch(this,function(T){for(var ba,ia=this.sources,aa=0;aa<T.length;aa++)T[aa]&&
T[aa].loaded&&"Feature Layer"===T[aa].type&&(ia.push({featureLayer:T[aa],enableSuggestions:!0}),ba=!0);ba&&this.set("sources",ia);C.resolve()}))}else C.resolve()}else C.resolve();return C.promise},_switchCoordinatesClick:function(C){C.preventDefault();if(C=m.get(C.target,"data-switch-coordinates"))this._cancelSuggest(),this.set("value",C),this.search()},_moreResultsClick:function(C){C.preventDefault();var J=C.target;C=parseInt(m.get(J,"data-source-index"),10);J=parseInt(m.get(J,"data-index"),10);
var M=this.searchResults;M&&M[C]&&(C=M[C][J])&&this.select(C)},_showMoreResultsClick:function(C){C.preventDefault();if(C=h.byId(this._moreResultsId)){n.toggle(C,this.css.searchShowMoreResults);var J=h.byId(this._moreResultsId+"_show");J&&(n.contains(C,this.css.searchShowMoreResults)?m.set(J,"textContent",v.widgets.Search.main.hideMoreResults):m.set(J,"textContent",v.widgets.Search.main.showMoreResults))}},_featureLayerLoaded:function(C){var J=new d;if(C.loaded)J.resolve(C);else if(C.loadError)J.reject(this._error("Layer failed to load."));
else{var M=a.once(C,"load",l.hitch(this,function(){K.remove();J.resolve(C)}));var K=a.once(C,"error",l.hitch(this,function(){M.remove();J.reject(this._error("Layer could not be loaded."))}))}return J.promise},_getObjectSize:function(C){var J=0,M;for(M in C)C.hasOwnProperty(M)&&J++;return J},_sourcesEvent:function(C,J){var M=m.get(J,"data-index"),K=e("li",this.sourcesNode);J=k.indexOf(K,J);M!==this._allIndex&&(M=parseInt(M,10));"click"===C.type||C.keyCode===c.ENTER?(this.set("activeSourceIndex",M),
B.focus(this.inputNode),this._hideSourcesMenu()):C.keyCode===c.UP_ARROW?(C.stopPropagation(),C.preventDefault(),C=J-1,0>C?B.focus(this.sourcesBtnNode):B.focus(K[C])):C.keyCode===c.DOWN_ARROW?(C.stopPropagation(),C.preventDefault(),C=J+1,C>=K.length?B.focus(this.sourcesBtnNode):B.focus(K[C])):C.keyCode===c.ESCAPE&&(this._hideSourcesMenu(),B.focus(this.inputNode))},_suggestionsEvent:function(C,J){var M=m.get(J,"data-source-index"),K=parseInt(m.get(J,"data-index"),10),P=e("li",this.suggestionsNode),
T=this.sources;J=k.indexOf(P,J);M!==this._allIndex&&(M=parseInt(M,10));var ba;this._clearQueryTimeout();"click"===C.type||C.keyCode===c.ENTER?((P=this.suggestResults)&&P[M]&&P[M][K]&&(ba=P[M][K]),ba&&(ba.index=M,T[M].featureLayer?(M=T[M].featureLayer.objectIdField,ba[this._objectIdIdentifier]=ba.feature.attributes[M],this.set("value",this._getSuggestionName(ba)),this.set("selectedFeatureId",ba.feature.attributes[M])):ba.magicKey&&ba.text&&(this.set("value",ba.text),this.set("magicKey",ba.magicKey)),
this.search(ba),B.focus(this.inputNode))):C.keyCode===c.BACKSPACE||C.keyCode===c.DELETE?B.focus(this.inputNode):C.keyCode===c.UP_ARROW?(C.stopPropagation(),C.preventDefault(),ba=J-1,0>ba?B.focus(this.inputNode):B.focus(P[ba])):C.keyCode===c.DOWN_ARROW?(C.stopPropagation(),C.preventDefault(),ba=J+1,ba>=P.length?B.focus(this.inputNode):B.focus(P[ba])):C.keyCode===c.ESCAPE&&(this._hideMenus(),B.focus(this.inputNode))},_getResultName:function(C){var J;C.hasOwnProperty("name")&&null!==C.name&&(J=C.name.toString());
J||(J=v.widgets.Search.main.untitledResult);return J},_getSuggestionName:function(C){var J;C.hasOwnProperty("name")&&null!==C.name&&(J=C.name.toString());C=C.text||J;C||(C=v.widgets.Search.main.untitledResult);return C},_searchResultHTML:function(C){var J="";if(C.feature&&C.feature.attributes&&C.feature.attributes.Addr_type&&"LatLong"===C.feature.attributes.Addr_type){var M=C.name.split(" ");if(2===M.length){var K=M[0];var P=M[1]}P&&K?(C=parseFloat(K),P=parseFloat(P),M=P+", "+C,J+='\x3cdiv class\x3d"'+
this.css.searchMoreResultsItem+'"\x3e',J+='\x3cdiv class\x3d"'+this.css.latLonHeader+'"\x3e'+v.widgets.Search.main.lonlat+"\x3c/div\x3e",J=J+(C+", "+P)+'\x3c/div\x3e\x3cdiv class\x3d"'+(this.css.searchMoreResultsItem+'"\x3e'),C===P||90<C||-90>C||180<P||-180>P||(J+='\x3cdiv class\x3d"'+this.css.latLonHeader+'"\x3e'+v.widgets.Search.main.reverseLonLatHeader+"\x3c/div\x3e",J+='\x3ca data-switch-coordinates\x3d"'+M+'" tabindex\x3d"0" href\x3d"#"\x3e'+M+"\x3c/a\x3e\x3c/div\x3e")):J=C.name}else J=C.name;
return J},_moreResultsHTML:function(C){var J="",M="",K=this.searchResults,P=this.sources,T=0;if(K){M+='\x3cdiv class\x3d"'+this.css.searchMoreResultsItem+'"\x3e';M+='\x3ca href\x3d"#" id\x3d"'+this._moreResultsId+'_show"\x3e'+v.widgets.Search.main.showMoreResults+"\x3c/a\x3e";M=M+'\x3c/div\x3e\x3cdiv class\x3d"'+(this.css.searchMoreResultsList+'"\x3e');M+='\x3cdiv id\x3d"'+this._moreResultsId+'_list"\x3e';for(var ba in K)if(K[ba]){var ia=K[ba].length;if(ia){var aa=1===ia&&K[ba][0]===C;if(1<this._getObjectSize(K)&&
!aa){var ca=this._getSourceName(ba);M+='\x3cdiv class\x3d"'+this.css.searchMoreResultsListHeader+'"\x3e'+ca+"\x3c/div\x3e"}if(ia&&!aa){M+="\x3cul\x3e";ca=P[ba].maxResults||this.maxResults;for(aa=0;aa<ia&&aa<ca;++aa)if(K[ba][aa]!==C){var Y=this._getResultName(K[ba][aa]);M+='\x3cli\x3e\x3ca tabindex\x3d"0" data-index\x3d"'+aa+'" data-source-index\x3d"'+ba+'" href\x3d"#"\x3e'+Y+"\x3c/a\x3e\x3c/li\x3e";T++}M+="\x3c/ul\x3e"}}}M+="\x3c/div\x3e\x3c/div\x3e"}T&&(J+=M);return J},_validField:function(C,J){return C.getField(J)},
_validFields:function(C,J){if(C&&J&&J.length){for(var M=0;M<J.length;M++)if(!this._validField(C,J[M]))return!1;return!0}return!1},_getCodedName:function(C,J){if(C&&C.length)for(var M=0,K=C.length;M<K;M++){var P=C[M];if(P.code===J)return P.name}},_getCodedValue:function(C,J,M){if(C&&C.length)for(var K=0,P=C.length;K<P;K++){var T=C[K],ba=T.name,ia=J;M||(ba=ba.toLowerCase(),ia=ia.toLowerCase());if(ba===ia)return T.code}return!1},_whereClause:function(C,J,M,K){var P=null;if(C){var T="";this.reHostedFS.test(J.url)&&
this._containsNonLatinCharacter(C)&&(T="N");if(M&&M.length)for(var ba=0,ia=M.length;ba<ia;ba++){var aa="",ca=C.replace(/'/g,"''");aa=M[ba];var Y=J.getField(aa),ha=J.getDomain(aa);ha&&"codedValue"===ha.type&&(ca=this._getCodedValue(ha.codedValues,ca,K));!1!==ca&&(Y=Y.type,"esriFieldTypeString"===Y||"esriFieldTypeDate"===Y?aa=K?aa+" \x3d "+T+"'"+ca+"'":"UPPER("+aa+") LIKE "+T+"'%"+ca.toUpperCase()+"%'":"esriFieldTypeOID"===Y||"esriFieldTypeSmallInteger"===Y||"esriFieldTypeInteger"===Y||"esriFieldTypeSingle"===
Y||"esriFieldTypeDouble"===Y?(ca=parseFloat(ca),aa=isNaN(ca)?!1:aa+" \x3d "+ca):aa=aa+" \x3d "+ca,aa&&(P=P?P+" or ":"",P+=aa))}}return P},_suggest:function(C){C||(C={index:this.activeSourceIndex,text:this.value});var J=new d,M=C.index,K=this.sources[M],P=this.enableSuggestions;K.hasOwnProperty("enableSuggestions")&&(P=K.enableSuggestions);var T=0;if(C.hasOwnProperty("text")&&C.text){var ba=l.trim(C.text);T=C.text.length}C=K.minCharacters||this.minCharacters;if(P&&ba&&T>=C&&this._supportsPagination(K)){var ia=
"";K.prefix&&(ia+=K.prefix);ia+=ba;K.suffix&&(ia+=K.suffix);var aa=this._defaultSR;this.map&&(aa=this.map.spatialReference);P={};K.locator?(K.categories&&(P.categories=K.categories),K.locator.outSpatialReference=aa,this.map&&K.localSearchOptions&&K.localSearchOptions.hasOwnProperty("distance")&&K.localSearchOptions.hasOwnProperty("minScale")&&(T=this._getScale(),!K.localSearchOptions.minScale||T&&T<=parseFloat(K.localSearchOptions.minScale))&&(P.location=this.map.extent.getCenter(),P.distance=K.localSearchOptions.distance),
P.text=ia,K.useMapExtent&&this.map&&this.map.extent&&(P.searchExtent=this.map.extent),K.searchExtent&&(P.searchExtent=K.searchExtent),P.maxSuggestions=K.maxSuggestions||this.maxSuggestions,K.sourceCountry&&(P.countryCode=K.sourceCountry),K.countryCode&&(P.countryCode=K.countryCode),K.locator.suggestLocations(P).then(l.hitch(this,function(ca){J.resolve(ca)}),l.hitch(this,function(ca){ca||(ca=this._error("Locator suggestLocations could not be performed."));J.reject(ca)}))):K.featureLayer?this._featureLayerLoaded(K.featureLayer).then(l.hitch(this,
function(){var ca=this._getDisplayField(K),Y=K.searchFields||[ca],ha=[];K.suggestionTemplate?K.suggestionTemplate.replace(/(?:\$\{([^}]+)\})/g,function(ma,pa){ha.push(pa)}):ha=[ca];-1===k.indexOf(ha,K.featureLayer.objectIdField)&&ha.push(K.featureLayer.objectIdField);ca=this._validField(K.featureLayer,ca);var na=this._validFields(K.featureLayer,ha),la=this._validFields(K.featureLayer,Y);if(ca&&na&&la){ca=new V;K.hasOwnProperty("suggestQueryParams")&&l.mixin(ca,K.suggestQueryParams);ca.outSpatialReference=
aa;ca.returnGeometry=!1;ca.num=K.maxSuggestions||this.maxSuggestions;ca.outFields=ha;K.useMapExtent&&this.map&&this.map.extent&&(ca.geometry=this.map.extent);K.searchExtent&&(ca.geometry=K.searchExtent);if(Y=this._whereClause(ia,K.featureLayer,Y,!1)){ca.where=Y;var ja=!0}ja?K.featureLayer.queryFeatures(ca,l.hitch(this,function(ma){var pa;(ma=ma.features)&&(pa=this._hydrateResults(ma,M,!0));J.resolve(pa)}),l.hitch(this,function(ma){ma||(ma=this._error("FeatureLayer queryFeatures errored with suggestions"));
J.reject(ma)})):J.resolve()}else J.reject(this._error("Invalid FeatureLayer field"))})):J.reject(this._error("Invalid source"))}else J.resolve();return J.promise},_supportsPagination:function(C){var J;C.locator?J=!0:C.featureLayer&&C.featureLayer.advancedQueryCapabilities&&C.featureLayer.advancedQueryCapabilities.supportsPagination&&(J=!0);return J},_suggestQueries:function(C){var J=this.sources,M=this.activeSourceIndex,K=[];if(M===this._allIndex)for(M=0;M<J.length;M++){var P=C;P.index=M;P=this._suggest(P);
K.push(P)}else C.index=M,P=this._suggest(C),K.push(P);return L(K)},_getPointFromGeometry:function(C){switch(C.type){case "extent":var J=C.getCenter();break;case "multipoint":J=C.getPoint(0);break;case "point":J=C;break;case "polygon":J=C.getCentroid();break;case "polyline":J=C.getPoint(0,0)}return J},_searchQueries:function(C){C.hasOwnProperty("index")||(C.index=this.activeSourceIndex);var J=[];if(C.index===this._allIndex)for(var M=this.sources,K=0;K<M.length;K++){var P=C;P.index=K;P=this._search(P);
J.push(P)}else C=this._search(C),J.push(C);return L(J)},_searchButton:function(){this.enableButtonMode&&!this.expanded?(this.expand(),B.focus(this.inputNode)):(this._cancelSuggest(),this.search())},_search:function(C){C||(C={text:this.value,magicKey:null,geometry:null,point:null,index:this.activeSourceIndex,latlon:null});this.selectedFeatureId&&(C.text=null,C[this._objectIdIdentifier]=this.selectedFeatureId);var J,M=new d,K=C.index,P=this.sources[K],T;C.hasOwnProperty("text")&&C.text&&(T=l.trim(C.text));
if(P){var ba="";P.prefix&&!C.magicKey&&(ba+=P.prefix);ba+=T;P.suffix&&!C.magicKey&&(ba+=P.suffix);var ia=this._defaultSR;this.map&&(ia=this.map.spatialReference);if(P.locator)if(C.hasOwnProperty("text")&&T){var aa={};P.categories&&(aa.categories=P.categories);P.locationType&&(aa.locationType=P.locationType);ia&&(P.locator.outSpatialReference=ia);if(this.map&&P.localSearchOptions&&P.localSearchOptions.hasOwnProperty("distance")&&P.localSearchOptions.hasOwnProperty("minScale")){var ca=this._getScale();
if(!P.localSearchOptions.minScale||ca&&ca<=parseFloat(P.localSearchOptions.minScale))aa.location=this.map.extent.getCenter(),aa.distance=P.localSearchOptions.distance}aa.address={};aa.maxLocations=P.maxResults||this.maxResults;P.useMapExtent&&this.map&&this.map.extent&&(aa.searchExtent=this.map.extent);P.searchExtent&&(aa.searchExtent=P.searchExtent);P.sourceCountry&&(aa.countryCode=P.sourceCountry);P.countryCode&&(aa.countryCode=P.countryCode);C.magicKey&&(aa.magicKey=C.magicKey);P.singleLineFieldName?
aa.address[P.singleLineFieldName]=ba:aa.address["Single Line Input"]=ba;P.outFields&&(aa.outFields=P.outFields);P.locator.addressToLocations(aa).then(l.hitch(this,function(Y){Y=this._hydrateResults(Y,K,!1);M.resolve(Y)}),l.hitch(this,function(Y){Y||(Y=this._error("Locator addressToLocations could not be performed"));M.reject(Y)}))}else C.geometry?(J=this._getPointFromGeometry(C.geometry.geometry))?this._reverseGeocodePoint(K,J).then(function(Y){M.resolve(Y)},function(Y){M.reject(Y)}):M.reject(this._error("Invalid point to reverse geocode")):
C.point?this._reverseGeocodePoint(K,C.point).then(function(Y){M.resolve(Y)},function(Y){M.reject(Y)}):C.latlon?(aa=new da(C.latlon,this._defaultSR),this._reverseGeocodePoint(K,aa).then(function(Y){M.resolve(Y)},function(Y){M.reject(Y)})):C.hasOwnProperty("text")&&!T?M.resolve([]):M.reject(this._error("Invalid query type for Locator"));else P.featureLayer?this._featureLayerLoaded(P.featureLayer).then(l.hitch(this,function(){var Y=this._getDisplayField(P),ha=P.searchFields||[Y];Y=this._validField(P.featureLayer,
Y);var na=this._validFields(P.featureLayer,ha);if(Y&&na){Y=new V;P.hasOwnProperty("searchQueryParams")&&l.mixin(Y,P.searchQueryParams);ia&&(Y.outSpatialReference=ia,na=this.map&&this.map.getMaxResolution()||1/Q.getUnitValueForSR(ia))&&(Y.maxAllowableOffset=na);Y.returnGeometry=!0;P.outFields&&(Y.outFields=P.outFields);if(!C.hasOwnProperty(this._objectIdIdentifier)){this._supportsPagination(P)&&(Y.num=P.maxResults||this.maxResults);P.useMapExtent&&this.map&&this.map.extent&&(Y.geometry=this.map.extent);
P.searchExtent&&(Y.geometry=P.searchExtent);var la=P.exactMatch}C.hasOwnProperty("text")&&T?(ha=this._whereClause(ba,P.featureLayer,ha,la))?(Y.where=ha,ha=!0):ha=!1:C.hasOwnProperty(this._objectIdIdentifier)?(Y.objectIds=[C[this._objectIdIdentifier]],ha=!0):C.geometry?(Y.geometry=C.geometry,ha=!0):C.point?(Y.geometry=C.point,ha=!0):C.latlon?(J=new da(C.latlon,this._defaultSR),Y.geometry=J,ha=!0):(C.hasOwnProperty("text")&&!T?M.resolve([]):M.reject(this._error("Invalid query type for FeatureLayer")),
ha=!1);ha?P.featureLayer.queryFeatures(Y,l.hitch(this,function(ja){ja=ja.features;var ma;ja&&(ma=this._hydrateResults(ja,K,!1));M.resolve(ma)}),l.hitch(this,function(ja){ja||(ja=this._error("FeatureLayer queryFeatures could not be performed"));M.reject(ja)})):M.resolve()}else M.reject(this._error("Invalid FeatureLayer field"))})):M.reject(this._error("Invalid source"))}else M.reject(this._error("Source is undefined"));return M.promise},_clearQueryTimeout:function(){this._queryTimer&&clearTimeout(this._queryTimer)},
_formatResults:function(C,J,M){M={activeSourceIndex:J,value:M,numResults:0,numErrors:0,errors:null,results:null};var K={},P={};if(C)if(J===this._allIndex)for(J=0;J<C.length;J++)C[J]&&(C[J]instanceof Error?(K[J]=C[J],M.numErrors++):(P[J]=C[J],M.numResults+=C[J].length));else C[0]&&(C[0]instanceof Error?(K[J]=C[0],M.numErrors++):(P[J]=C[0],M.numResults+=C[0].length));M.numErrors&&(M.errors=K);M.numResults&&(M.results=P);return M},_reverseGeocodePoint:function(C,J){var M=new d,K=this.sources[C];if(J&&
K){var P=K.locationToAddressDistance||this.locationToAddressDistance;K.locator.outSpatialReference=this._defaultSR;this.map&&(K.locator.outSpatialReference=this.map.spatialReference);K.locator.locationToAddress(J,P,l.hitch(this,function(T){T=this._hydrateResults([T],C,!1);M.resolve(T)}),l.hitch(this,function(T){T||(T=this._error("Locator locationToAddress could not be performed"));M.reject(T)}))}else M.reject(this._error("No point or source defined for reverse geocoding"));return M.promise},_cancelDeferreds:function(){if(this._deferreds&&
this._deferreds.length)for(var C=0;C<this._deferreds.length;C++)this._deferreds[C].cancel(this.declaredClass+" cancelling request");this._deferreds=[]},_sourceBtnKey:function(C){if(C){var J=e("li",this.sourcesNode);C.keyCode===c.UP_ARROW?(C.stopPropagation(),C.preventDefault(),this._showSourcesMenu(),(C=J.length)&&B.focus(J[C-1])):C.keyCode===c.DOWN_ARROW&&(C.stopPropagation(),C.preventDefault(),this._showSourcesMenu(),J[0]&&B.focus(J[0]))}},_inputKey:function(C){if(C){var J=e("li",this.suggestionsNode),
M=this.suggestResults;if(C.keyCode===c.TAB||C.keyCode===c.ESCAPE)this._cancelSuggest(),this._hideMenus();else if(C.keyCode===c.UP_ARROW)C.stopPropagation(),C.preventDefault(),this._cancelSuggest(),M&&this._showSuggestionsMenu(),(C=J.length)&&B.focus(J[C-1]);else if(C.keyCode===c.DOWN_ARROW)C.stopPropagation(),C.preventDefault(),this._cancelSuggest(),M&&this._showSuggestionsMenu(),J[0]&&B.focus(J[0]);else{if(C.ctrlKey||C.metaKey||C.keyCode===c.copyKey||C.keyCode===c.LEFT_ARROW||C.keyCode===c.RIGHT_ARROW||
C.keyCode===c.ENTER)return C;this._suggestDelay()}}},_cancelSuggest:function(){this._cancelDeferreds();this._clearQueryTimeout()},_suggestDelay:function(){this._cancelSuggest();this._changeValue();this._queryTimer=setTimeout(l.hitch(this,function(){this.suggest()}),this.suggestionDelay)},_changeValue:function(){this.set("magicKey",null);this.set("selectedFeatureId",null);this._changeAttrValue("value",this.inputNode.value);this._checkStatus()},_inputClick:function(){this._hideSourcesMenu();this._hideNoResultsMenu()},
_getSourceName:function(C){return this._sourceNames[C]},_loadSources:function(C){C=k.filter(C,function(J){return!!J.featureLayer});C=k.map(C,function(J){return this._featureLayerLoaded(J.featureLayer)},this);return L(C)},_createSourceNameMap:function(C){return this._loadSources(C).then(l.hitch(this,function(){var J=k.map(C,function(M){return M.name||M.featureLayer&&M.featureLayer.name||v.widgets.Search.main.untitledSource});this._preventDuplicateSourceNames(C,J);return J}))},_getDuplicateSourceNameIndexes:function(C){var J=
{},M=[];k.forEach(C,function(K,P){J.hasOwnProperty(K)?(-1===M.indexOf(J[K])&&M.push(J[K]),M.push(P)):C.lastIndexOf(K)!==P&&(J[K]=P)});return M},_preventDuplicateSourceNames:function(C,J){if(J&&1<J.length){var M=this._getDuplicateSourceNameIndexes(J);k.forEach(M,function(K){J[K]+=this._getFieldsString(C[K])},this)}},_getFieldsString:function(C){var J="",M=C.featureLayer;if(M){C=C.searchFields||[this._getDisplayField(C)];for(var K=0;K<C.length;K++){J=0===K?J+": ":J+", ";var P=C[K],T=M.getFieldLabel(P);
J+=T||P}}return J},_splitResult:function(C,J){J=g.escapeString(J);return C.replace(new RegExp("(^|)("+J+")(|$)","ig"),"$1|$2|$3").split("|")},_insertSuggestions:function(C,J){if(this.enableSuggestionsMenu&&this.suggestionsNode){this._hideSourcesMenu();this._hideNoResultsMenu();var M=this.sources;if(C){var K=r.create("div");for(var P in C)if(C[P]&&C[P].length){var T=this._getSourceName(P);1<M.length&&this.activeSourceIndex===this._allIndex&&r.create("div",{className:this.css.searchMenuHeader,textContent:T},
K);T=r.create("ul",{role:"menu"},K);for(var ba=M[P].maxSuggestions||this.maxSuggestions,ia=0;ia<C[P].length&&ia<ba;++ia){var aa=r.create("li",{"data-index":ia,"data-source-index":P,role:"menuitem",tabindex:0},T),ca=this._getSuggestionName(C[P][ia]);ca=this._splitResult(ca,J);for(var Y=ca.length,ha=0;ha<Y;ha++){var na=ca[ha];na.toLowerCase()===J.toLowerCase()?r.create("strong",{textContent:na},aa):(na=document.createTextNode(na),r.place(na,aa))}}}}K?(r.place(K,this.suggestionsNode,"only"),this._showSuggestionsMenu()):
(r.empty(this.suggestionsNode),this._hideSuggestionsMenu())}},_insertSources:function(C){if(this.enableSourcesMenu&&C&&1<C.length){var J,M=this.activeSourceIndex,K=r.create("ul",{role:"menu"});if(this.enableSearchingAll){var P="";M===this._allIndex&&(P="active");r.create("li",{"data-index":this._allIndex,role:"menuitem",className:P,tabIndex:0,textContent:v.widgets.Search.main.all},K)}for(J=0;J<C.length;J++){P="";J===M&&(P=this.css.activeSource);var T=this._getSourceName(J);r.create("li",{"data-index":J,
role:"menuitem",className:P,tabIndex:0,textContent:T},K)}n.add(this.containerNode,this.css.hasMultipleSources);r.place(K,this.sourcesNode,"only")}else n.remove(this.containerNode,this.css.hasMultipleSources),r.empty(this.sourcesNode)},_showLoading:function(){n.add(this.containerNode,this.css.searchLoading)},_hideLoading:function(){n.remove(this.containerNode,this.css.searchLoading)},_checkStatus:function(){this.value?(n.add(this.containerNode,this.css.hasValue),m.set(this.clearNode,"title",v.widgets.Search.main.clearButtonTitle)):
this.clear()},_closePopup:function(){this.enableInfoWindow&&this.map&&this.map.infoWindow&&this.map.infoWindow.hide()},_noResults:function(C){var J;C&&(J=l.trim(C));var M=r.create("div",{className:this.css.searchNoResultsBody});C&&J?(r.create("div",{className:this.css.searchNoResultsHeader,textContent:v.widgets.Search.main.noResults},M),r.create("div",{className:this.css.searchNoResultsText,textContent:y.substitute({value:'"'+C+'"'},v.widgets.Search.main.noResultsFound)},M)):(C=r.create("div",{},
M),r.create("span",{"aria-hidden":"true",className:this.css.searchNoValueIcon},C),r.create("span",{className:this.css.searchNoValueText,textContent:v.widgets.Search.main.emptyValue},C));r.place(M,this.noResultsMenuNode,"only")},_hideMenus:function(){this._hideSourcesMenu();this._hideSuggestionsMenu();this._hideNoResultsMenu()},_hideNoResultsMenu:function(){n.remove(this.containerNode,this.css.showNoResults)},_showNoResultsMenu:function(){this._hideSourcesMenu();this._hideSuggestionsMenu();n.add(this.containerNode,
this.css.showNoResults)},_hideSourcesMenu:function(){n.remove(this.containerNode,this.css.showSources)},_hideSuggestionsMenu:function(){n.remove(this.containerNode,this.css.showSuggestions)},_showSourcesMenu:function(){this._hideSuggestionsMenu();this._hideNoResultsMenu();n.add(this.containerNode,this.css.showSources)},_showSuggestionsMenu:function(){this._hideSourcesMenu();this._hideNoResultsMenu();n.add(this.containerNode,this.css.showSuggestions)},_toggleSourcesMenu:function(){this._hideSuggestionsMenu();
this._hideNoResultsMenu();n.toggle(this.containerNode,this.css.showSources)},_getFirstStringField:function(C){if(C&&(C=C.fields)&&C.length)for(var J=0;J<C.length;J++){var M=C[J];if("esriFieldTypeString"===M.type)return M.name}return""},_getDisplayField:function(C){return C.displayField||C.featureLayer.displayField||this._getFirstStringField(C.featureLayer)},_validLocation:function(C){return C&&"number"===typeof C.x&&"number"===typeof C.y},_validExtent:function(C){return C&&"number"===typeof C.xmin&&
"number"===typeof C.ymin&&"number"===typeof C.xmax&&"number"===typeof C.ymax},_hydrateResult:function(C,J,M){var K={},P=this._defaultSR;J=this.sources[J];this.map&&(P=this.map.spatialReference);if(C.hasOwnProperty("text")&&C.hasOwnProperty("magicKey"))return C;if(C.hasOwnProperty("geometry")){var T=new I(C.toJson());K.feature=T;(T=K.feature.geometry)&&T.setSpatialReference(P)}else if(C.hasOwnProperty("location")&&this._validLocation(C.location)){var ba=new da(C.location.x,C.location.y,P);T={};C.hasOwnProperty("attributes")&&
(T=C.attributes);C.hasOwnProperty("address")&&"object"===typeof C.address&&l.mixin(T,C.address);C.hasOwnProperty("score")&&(T.score=C.score);K.feature=new I(ba,null,T,null)}!K.feature&&M&&(T={},C.hasOwnProperty("attributes")&&(T=C.attributes),C.hasOwnProperty("score")&&(T.score=C.score),K.feature=new I(null,null,T,null));if(K.feature){if(C.hasOwnProperty("extent")&&this._validExtent(C.extent))K.extent=new X(C.extent),K.extent.setSpatialReference(P);else if(K.feature&&K.feature.geometry)switch(K.feature.geometry.type){case "extent":K.extent=
K.feature.geometry;break;case "multipoint":K.extent=ea.getDenormalizedExtent(K.feature.geometry);break;case "polygon":K.extent=ea.getDenormalizedExtent(K.feature.geometry);break;case "polyline":K.extent=ea.getDenormalizedExtent(K.feature.geometry);break;case "point":this.map?(P=this.zoomScale,J&&J.zoomScale&&(P=J.zoomScale),this._getScale()>P?K.extent=Q.getExtentForScale(this.map,P).centerAt(K.feature.geometry):K.extent=this.map.extent.centerAt(K.feature.geometry)):K.extent=new X({xmin:K.feature.geometry.x-
.25,ymin:K.feature.geometry.y-.25,xmax:K.feature.geometry.x+.25,ymax:K.feature.geometry.y+.25,spatialReference:this._defaultSR})}else K.extent=null;K.name="";J.featureLayer?J.suggestionTemplate&&M?K.name=y.substitute(C.attributes,J.suggestionTemplate):J.searchTemplate?K.name=y.substitute(C.attributes,J.searchTemplate):(T=this._getDisplayField(J),M=J.featureLayer.getField(T),P=J.featureLayer.getDomain(T),T&&C.hasOwnProperty("attributes")&&C.attributes.hasOwnProperty(T)&&(C=C.attributes[T],P&&"codedValue"===
P.type?K.name=this._getCodedName(P.codedValues,C):M&&"esriFieldTypeDate"===M.type&&!isNaN(C)?K.name=u.format(new Date(C)):K.name=C)):C.address&&J.searchTemplate?K.name=y.substitute(C.address,J.searchTemplate):C.hasOwnProperty("name")?K.name=C.name:C.hasOwnProperty("attributes")&&"object"===typeof C.attributes&&C.attributes.LongLabel?K.name=C.attributes.LongLabel:C.hasOwnProperty("attributes")&&"object"===typeof C.attributes&&C.attributes.Match_addr?(K.name=C.attributes.Match_addr,C.attributes.Addr_type&&
"POI"===C.attributes.Addr_type&&C.attributes.StAddr&&C.attributes.City?K.name+=" - "+C.attributes.StAddr+", "+C.attributes.City:C.attributes.Addr_type&&"POI"===C.attributes.Addr_type&&C.attributes.City&&(K.name+=" - "+C.attributes.City)):C.hasOwnProperty("address")&&"string"===typeof C.address?K.name=C.address:C.hasOwnProperty("address")&&"object"===typeof C.address&&C.address.hasOwnProperty("Address")?C.address.hasOwnProperty("Match_addr")?K.name=C.address.Match_addr:C.address.hasOwnProperty("Address")&&
(K.name=C.address.Address):K.feature&&K.feature.geometry&&(K.name=K.feature.geometry.x+","+K.feature.geometry.y);J.featureLayer&&K.feature&&oa(K.feature,J.featureLayer);return K}},_getScale:function(){var C;this.map&&"function"===typeof this.map.getScale&&(C=this.map.getScale());return C},_hydrateResults:function(C,J,M,K){K=[];var P=0;if(C&&C.length)for(P;P<C.length;P++){var T=this._hydrateResult(C[P],J,M);T&&K.push(T)}return K},_containsNonLatinCharacter:function(C){for(var J=0;J<C.length;J++)if(255<
C.charCodeAt(J))return!0;return!1},_setPlaceholder:function(C){var J="",M=this.sources[C];C===this._allIndex?J=this.allPlaceholder||v.widgets.Search.main.allPlaceholder:M&&M.placeholder&&(J=M.placeholder);var K=v.widgets.Search.main.all;M&&(K=this._getSourceName(C));m.set(this.sourceNameNode,"textContent",K);m.set(this.inputNode,"placeholder",J);m.set(this.inputNode,"title",J)},_updateActiveSource:function(){var C=this.sources,J=this.activeSourceIndex,M;C&&C[J]&&(M=C[J]);M?this.set("activeSource",
M):this.set("activeSource",null)},_updateVisible:function(){this.visible?this.show():this.hide()},_updateButtonMode:function(C){C?(n.toggle(this.containerNode,this.css.searchExpanded,this.expanded),n.toggle(this.containerNode,this.css.searchCollapsed,!this.expanded),n.add(this.containerNode,this.css.hasButtonMode)):(n.remove(this.containerNode,this.css.searchExpanded),n.remove(this.containerNode,this.css.searchCollapsed),n.remove(this.containerNode,this.css.hasButtonMode))},_setDefaultActiveSourceIndex:function(C){C&&
1===C.length||!this.enableSearchingAll?this.set("activeSourceIndex",0):this.set("activeSourceIndex",this._allIndex)},_setEnableSourcesMenuAttr:function(C){this._set("enableSourcesMenu",C);this._created&&this._insertSources(this.sources)},_setEnableSearchingAllAttr:function(C){this._set("enableSearchingAll",C);this._created&&(this._setDefaultActiveSourceIndex(this.sources),this._hideMenus(),this._insertSources(this.sources))},_setSourcesAttr:function(C){this._createSourceNameMap(C).then(l.hitch(this,
function(J){this._sourceNames=J;this._created&&(this._setDefaultActiveSourceIndex(C),this._hideMenus(),this._insertSources(C))}));this._set("sources",C)},_setAllPlaceholderAttr:function(C){this._set("allPlaceholder",C);this._created&&this._setPlaceholder(this.activeSourceIndex)},_setActiveSourceIndexAttr:function(C){this._set("activeSourceIndex",C);this._updateActiveSource();this._created&&(this._setPlaceholder(C),this._hideMenus(),this._insertSources(this.sources))},_setMaxLengthAttr:function(C){this._set("maxLength",
C);this._created&&m.set(this.inputNode,"maxLength",C)},_setValueAttr:function(C){this.set("magicKey",null);this.set("selectedFeatureId",null);this._set("value",C);this._created&&(m.set(this.inputNode,"value",C),this._checkStatus())},_setVisibleAttr:function(C){this._set("visible",C);this._created&&this._updateVisible()},_setEnableButtonModeAttr:function(C){this._set("enableButtonMode",C);this._created&&this._updateButtonMode(C)},_setThemeAttr:function(C){this._created&&(n.remove(this.domNode,this.theme),
n.add(this.domNode,C));this._set("theme",C)}});b("extend-esri")&&l.setObject("dijit.Search",p,H);return p})},"esri/tasks/locator":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/Deferred dojo/_base/json dojo/has ../kernel ../request ../deferredUtils ./Task ./AddressCandidate".split(" "),function(t,p,l,k,f,d,c,a,e,b,g){t=t(b,{declaredClass:"esri.tasks.Locator",_eventMap:{"address-to-locations-complete":["addresses"],"addresses-to-locations-complete":["addresses"],
"location-to-address-complete":["address"],"suggest-locations-complete":["suggestions"]},constructor:function(h){this._geocodeHandler=p.hitch(this,this._geocodeHandler);this._geocodeAddressesHandler=p.hitch(this,this._geocodeAddressesHandler);this._reverseGeocodeHandler=p.hitch(this,this._reverseGeocodeHandler);this.registerConnectEvents()},outSpatialReference:null,setOutSpatialReference:function(h){this.outSpatialReference=h},_geocodeHandler:function(h,m,n,q,r){try{var u=h.candidates;m=[];var v,
w=u.length,A=h.spatialReference,E;for(v=0;v<w;v++){var F=u[v];if(E=F.location)E.spatialReference=A;m[v]=new g(F)}this._successHandler([m],"onAddressToLocationsComplete",n,r)}catch(D){this._errorHandler(D,q,r)}},_geocodeAddressesHandler:function(h,m,n,q,r){try{var u=h.locations;m=[];var v,w=u.length,A=h.spatialReference,E;for(v=0;v<w;v++){if(E=u[v].location)E.spatialReference=A;m[v]=new g(u[v])}this._successHandler([m],"onAddressesToLocationsComplete",n,r)}catch(F){this._errorHandler(F,q,r)}},addressToLocations:function(h,
m,n,q,r){var u;if(h.address){q=n;n=m;m=h.outFields;r=h.searchExtent;var v=h.countryCode;var w=h.magicKey;var A=h.distance;var E=h.categories;h.location&&this.normalization&&(u=h.location.normalize());var F=h.locationType;var D=h.maxLocations;var B=h.forStorage;h=h.address}r&&(r=r.shiftCentralMeridian());var y=this.outSpatialReference;h=this._encode(p.mixin({},this._url.query,h,{f:"json",outSR:y&&f.toJson(y.toJson()),outFields:m&&m.join(",")||null,searchExtent:r&&f.toJson(r.toJson()),category:E&&E.join(",")||
null,countryCode:v||null,magicKey:w||null,distance:A||null,location:u||null,locationType:F||null,maxLocations:D||null,forStorage:B||null}));var z=this._geocodeHandler,H=this._errorHandler,G=new k(e._dfdCanceller);G._pendingDfd=a({url:this._url.path+"/findAddressCandidates",content:h,callbackParamName:"callback",load:function(I,L){z(I,L,n,q,G)},error:function(I){H(I,q,G)}});return G},suggestLocations:function(h){var m=new k(e._dfdCanceller);h.hasOwnProperty("location")&&this.normalization&&(h.location=
h.location.normalize());h.searchExtent&&(h.searchExtent=h.searchExtent.shiftCentralMeridian());h=this._encode(p.mixin({},this._url.query,{f:"json",text:h.text,maxSuggestions:h.maxSuggestions,searchExtent:h.searchExtent&&f.toJson(h.searchExtent.toJson()),category:h.categories&&h.categories.join(",")||null,countryCode:h.countryCode||null,location:h.location||null,distance:h.distance||null},{f:"json"}));h=a({url:this._url.path+"/suggest",content:h,callbackParamName:"callback"});m._pendingDfd=h;h.then(p.hitch(this,
function(n){n=n.suggestions||[];this.onSuggestLocationsComplete(n);m.resolve(n)}),p.hitch(this,function(n){this._errorHandler(n);m.reject(n)}));return m},addressesToLocations:function(h,m,n){var q=this.outSpatialReference,r=[],u=h.categories,v=h.locationType,w=h.countryCode;l.forEach(h.addresses,function(D,B){r.push({attributes:D})});h=this._encode(p.mixin({},this._url.query,{category:u&&u.join(",")||null,locationType:v||null,sourceCountry:w||null},{addresses:f.toJson({records:r})},{f:"json",outSR:q&&
f.toJson(q.toJson())}));var A=this._geocodeAddressesHandler,E=this._errorHandler,F=new k(e._dfdCanceller);F._pendingDfd=a({url:this._url.path+"/geocodeAddresses",content:h,callbackParamName:"callback",load:function(D,B){A(D,B,m,n,F)},error:function(D){E(D,n,F)}});return F},_reverseGeocodeHandler:function(h,m,n,q,r){try{var u=new g({address:h.address,location:h.location,score:100});this._successHandler([u],"onLocationToAddressComplete",n,r)}catch(v){this._errorHandler(v,q,r)}},locationToAddress:function(h,
m,n,q){h&&this.normalization&&(h=h.normalize());var r=this.outSpatialReference;h=this._encode(p.mixin({},this._url.query,{outSR:r&&f.toJson(r.toJson()),location:h&&f.toJson(h.toJson()),distance:m,f:"json"}));var u=this._reverseGeocodeHandler,v=this._errorHandler,w=new k(e._dfdCanceller);w._pendingDfd=a({url:this._url.path+"/reverseGeocode",content:h,callbackParamName:"callback",load:function(A,E){u(A,E,n,q,w)},error:function(A){v(A,q,w)}});return w},onSuggestLocationsComplete:function(){},onAddressToLocationsComplete:function(){},
onAddressesToLocationsComplete:function(){},onLocationToAddressComplete:function(){}});d("extend-esri")&&p.setObject("tasks.Locator",t,c);return t})},"esri/tasks/AddressCandidate":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel","../geometry/Point"],function(t,p,l,k,f){t=t(null,{declaredClass:"esri.tasks.AddressCandidate",constructor:function(d){p.mixin(this,d);this.location=new f(this.location)}});l("extend-esri")&&p.setObject("tasks.AddressCandidate",t,k);return t})},
"esri/styles/basic":function(){define(["dojo/_base/array","dojo/_base/lang","dojo/has","../kernel","../Color"],function(t,p,l,k,f){function d(g,h){if(g){var m={};m.color=new f(g.color);m.opacity=g.opacity||1;switch(h){case "point":m.outline={color:new f(g.outline.color),width:g.outline.width};m.size=g.size;break;case "line":m.width=g.width;break;case "polygon":m.outline={color:new f(g.outline.color),width:g.outline.width}}}return m}function c(g){if("esriGeometryPoint"===g||"esriGeometryMultipoint"===
g)g="point";else if("esriGeometryPolyline"===g)g="line";else if("esriGeometryPolygon"===g||"esriGeometryMultiPatch"===g)g="polygon";return g}var a={"default":{name:"default",label:"Default",description:"Default theme for basic visualization of features.",basemapGroups:{light:"streets gray topo terrain national-geographic oceans osm gray-vector streets-vector topo-vector streets-relief-vector streets-navigation-vector".split(" "),dark:["satellite","hybrid","dark-gray","dark-gray-vector","streets-night-vector"]},
pointSchemes:{light:{primary:{color:[77,77,77,1],outline:{color:[255,255,255,.25],width:1},size:8},secondary:[{color:[226,119,40,1],outline:{color:[255,255,255,.25],width:1},size:8},{color:[255,255,255,1],outline:{color:[51,51,51,.25],width:1},size:8}]},dark:{primary:{color:[255,255,255,1],outline:{color:[92,92,92,.25],width:1},size:8},secondary:[{color:[226,119,40,1],outline:{color:[255,255,255,.25],width:1},size:8},{color:[26,26,26,1],outline:{color:[178,178,178,.25],width:1},size:8}]}},lineSchemes:{light:{primary:{color:[77,
77,77,1],width:2},secondary:[{color:[226,119,40,1],width:2},{color:[255,255,255,1],width:2}]},dark:{primary:{color:[255,255,255,1],width:2},secondary:[{color:[226,119,40,1],width:2},{color:[26,26,26,1],width:2}]}},polygonSchemes:{light:{primary:{color:[227,139,79,1],outline:{color:[255,255,255,.25],width:1},opacity:.8},secondary:[{color:[128,128,128,1],outline:{color:[255,255,255,.25],width:1},opacity:.8},{color:[255,255,255,1],outline:{color:[128,128,128,.25],width:1},opacity:.8}]},dark:{primary:{color:[227,
139,79,1],outline:{color:[92,92,92,.25],width:1},opacity:.8},secondary:[{color:[178,178,178,1],outline:{color:[92,92,92,.25],width:1},opacity:.8},{color:[26,26,26,1],outline:{color:[128,128,128,.25],width:1},opacity:.8}]}}}},e={};(function(){var g,h,m;for(g in a){var n=a[g];var q=n.basemapGroups;var r=e[g]={basemaps:[].concat(q.light).concat(q.dark),point:{},line:{},polygon:{}};for(h in q){var u=q[h];for(m=0;m<u.length;m++){var v=u[m];n.pointSchemes&&(r.point[v]=n.pointSchemes[h]);n.lineSchemes&&
(r.line[v]=n.lineSchemes[h]);n.polygonSchemes&&(r.polygon[v]=n.polygonSchemes[h])}}}})();var b={getAvailableThemes:function(g){var h=[],m;for(m in a){var n=a[m];var q=e[m];g&&-1===t.indexOf(q.basemaps,g)||h.push({name:n.name,label:n.label,description:n.description,basemaps:q.basemaps.slice(0)})}return h},getSchemes:function(g){var h=g.theme,m=g.basemap,n=c(g.geometryType);g=e[h];var q;(g=(g=g&&g[n])&&g[m])&&(q={primaryScheme:d(g.primary,n),secondarySchemes:t.map(g.secondary,function(r){return d(r,
n)})});return q},cloneScheme:function(g){if(g){var h=p.mixin({},g);h.color&&(h.color=new f(h.color));h.outline&&(h.outline={color:h.outline.color&&new f(h.outline.color),width:h.outline.width})}return h}};l("extend-esri")&&p.setObject("styles.basic",b,k);return b})},"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(t,p,l,k,f,d){var c=null,a=t([l,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 d({whiteList:this.whiteList,safeAttrValue:k.hitch(this,function(e,b,g,h){return"style"===b?this.xss.friendlyAttrValue(g).replace(/"/g,"'"):"img"===e&&"src"===b?this.xss.escapeAttrValue(g):this.xss.safeAttrValue(e,b,g,h)}),onTag:k.hitch(this,function(e,b,g){if(g.isWhite&&this._isInWhiteList(e,
this.graphicsWhiteList))return b}),onIgnoreTagAttr:k.hitch(this,function(e,b,g,h){if("data-"===b.substr(0,5))return b+'\x3d"'+this.xss.escapeAttrValue(g)+'"'}),onIgnoreTag:k.hitch(this,function(e,b,g){if("o:"===e.substr(0,2)||"!--[if"===e||"!--[endif]--"===e)return b})},!0);this.xss=this.sanitizer.xss},sanitize:function(e){return this.sanitizer.sanitize(e)},_getWhiteList:function(){var e="title height width class style font-family id align text-align".split(" "),b={div:e,h1:e,h2:e,h3:e,h4:e,h5:e,
h6:e,span:e,p:e,s:e,strong:e,em:e,u:e,ol:e,ul:e,li:e,a:["href","target"].concat(e),img:["src","alt","border"].concat(e),blockquote:e,font:["face","size","color"].concat(e),pre:e,code:e,b:e,i:e,wbr:e,video:"autoplay controls loop muted poster preload".split(" ").concat(e),audio:["autoplay","controls","loop","muted","preload"].concat(e),source:["media","src","type"].concat(e),table:["cellpadding","cellspacing","border"].concat(e),tbody:[].concat(e),tr:["valign"].concat(e),td:["valign","colspan","rowspan",
"nowrap"].concat(e),th:["valign","colspan","rowspan","nowrap"].concat(e),hr:e,html:e,title:e,link:["rel","href"],style:["type"].concat(e),body:e};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:e};return this._extendObjectOfArrays([b,{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(e){var b={};p.forEach(e,function(g){var h=Object.keys(g);p.forEach(h,function(m){Array.isArray(g[m])&&Array.isArray(b[m])?b[m]=b[m].concat(g[m]):b[m]=g[m]},this)},this);return b},_isInWhiteList:function(e,b){b=Object.keys(b);var g=!1;p.forEach(b,function(h){e===h&&(g=!0)},this);return g}});a.getInstance=function(){null===c&&(c=new a);return c};return a})},"widgets/BusinessAnalyst/_build-generate_module":function(){define(["dojo/text!./Widget.html",
"dojo/text!./css/style.css","dojo/i18n!./nls/strings"],function(){})},"url:esri/dijit/geoenrichment/templates/_WizardPage.html":'\x3cdiv style\x3d"width: 100%; height: 100%;"\x3e\r\n    \x3cdiv data-dojo-type\x3d"esri/dijit/geoenrichment/Grid" data-dojo-attach-point\x3d"layoutGrid"  class\x3d"Grid"\x3e\r\n        ${content}\r\n    \x3c/div\x3e\r\n\x3c/div\x3e',"url:widgets/BusinessAnalyst/CreateBuffersPage.html":'\x3cdiv\x3e\r\n\t\x3cdiv\x3e${nls.addRingsDtWt}\x3c/div\x3e\r\n\t\x3cbr\x3e\r\n    \x3cdiv style\x3d"width: 350 px; height: 110px"\x3e\r\n\t\t\x3cdiv data-dojo-attach-point\x3d"ringDtWtTabContainer" style\x3d"width: 100%; height: 110px;"\x3e\r\n\t\t\t\x3cdiv data-dojo-attach-point\x3d"ringsContentPane" title\x3d"${nls.rings}" style\x3d"margin-top: 15px;"\x3e\r\n\t\t\t\t${nls.radius}\r\n\t\t\t\t\x3cdiv data-dojo-type\x3d"dijit/form/TextBox" style\x3d"width: 42px;" data-dojo-props\x3d"value: 1" data-dojo-attach-point\x3d"ringsBufferRadii1"\x3e\x3c/div\x3e\r\n\t\t\t\t\x3cdiv data-dojo-type\x3d"dijit/form/TextBox" style\x3d"width: 42px;" data-dojo-props\x3d"value: 3" data-dojo-attach-point\x3d"ringsBufferRadii2"\x3e\x3c/div\x3e\r\n\t\t\t\t\x3cdiv data-dojo-type\x3d"dijit/form/TextBox" style\x3d"width: 42px;" data-dojo-props\x3d"value: 5" data-dojo-attach-point\x3d"ringsBufferRadii3"\x3e\x3c/div\x3e\r\n\t\t\t\t\x3cselect data-dojo-type\x3d"dijit/form/Select" data-dojo-attach-point\x3d"ringsBufferUnits"\x3e\r\n\t\t\t\t\t\x3coption value\x3d"esriMiles" selected\x3d"selected"\x3e${nls.miles}\x3c/option\x3e\r\n\t\t\t\t\t\x3coption value\x3d"esriKilometers"\x3e${nls.km}\x3c/option\x3e\r\n\t\t\t\t\x3c/select\x3e\r\n\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"ringValidationErrorMessage" class\x3d"validationErrorMessage hidden"\x3e\x3c/div\x3e\r\n\t\t\t\t\x3ca href\x3d"https://doc.arcgis.com/en/arcgis-online/reference/credits.htm" target\x3d"_blank" class\x3d"esriFloatTrailing esriSmallFont" style\x3d"position: absolute; right: 0px; top: 94px;"\x3e${nls.creditInformation}\x3c/a\x3e\r\n\t\t\t\x3c/div\x3e\r\n\t\t\t\x3cdiv data-dojo-attach-point\x3d"driveTimeContentPane" title\x3d"${nls.driveTime}" style\x3d"margin-top: 15px;"\x3e\r\n\t\t\t\t${nls.time}\r\n\t\t\t\t\x3cdiv data-dojo-type\x3d"dijit/form/TextBox" style\x3d"width: 42px;" data-dojo-props\x3d"value: 5" data-dojo-attach-point\x3d"driveTimeBufferRadii1"\x3e\x3c/div\x3e\r\n\t\t\t\t\x3cdiv data-dojo-type\x3d"dijit/form/TextBox" style\x3d"width: 42px;" data-dojo-props\x3d"value: 10" data-dojo-attach-point\x3d"driveTimeBufferRadii2"\x3e\x3c/div\x3e\r\n\t\t\t\t\x3cdiv data-dojo-type\x3d"dijit/form/TextBox" style\x3d"width: 42px;" data-dojo-props\x3d"value: 15" data-dojo-attach-point\x3d"driveTimeBufferRadii3"\x3e\x3c/div\x3e\r\n\t\t\t\t\x3cselect data-dojo-type\x3d"dijit/form/Select" data-dojo-attach-point\x3d"driveTimeBufferUnits"\x3e\r\n\t\t\t\t\t\x3coption value\x3d"Minutes" selected\x3d"selected"\x3e${nls.minutes}\x3c/option\x3e\r\n\t\t\t\t\t\x3coption value\x3d"esriMiles"\x3e${nls.miles}\x3c/option\x3e\r\n\t\t\t\t\t\x3coption value\x3d"esriKilometers"\x3e${nls.km}\x3c/option\x3e\r\n\t\t\t\t\x3c/select\x3e\r\n\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"driveTimeValidationErrorMessage" class\x3d"validationErrorMessage hidden"\x3e\x3c/div\x3e\r\n\t\t\t\t\x3ca href\x3d"https://doc.arcgis.com/en/arcgis-online/reference/credits.htm" target\x3d"_blank" class\x3d"esriFloatTrailing esriSmallFont" style\x3d"position: absolute; right: 0px; top: 94px;"\x3e${nls.creditInformation}\x3c/a\x3e\r\n\t\t\t\x3c/div\x3e\r\n\t\t\t\x3cdiv data-dojo-attach-point\x3d"walkTimeContentPane" title\x3d"${nls.walkTime}" style\x3d"margin-top: 15px;"\x3e\r\n\t\t\t\t${nls.time}\r\n\t\t\t\t\x3cdiv data-dojo-type\x3d"dijit/form/TextBox" style\x3d"width: 42px;" data-dojo-props\x3d"value: 5" data-dojo-attach-point\x3d"walkTimeBufferRadii1"\x3e\x3c/div\x3e\r\n\t\t\t\t\x3cdiv data-dojo-type\x3d"dijit/form/TextBox" style\x3d"width: 42px;" data-dojo-props\x3d"value: 10" data-dojo-attach-point\x3d"walkTimeBufferRadii2"\x3e\x3c/div\x3e\r\n\t\t\t\t\x3cdiv data-dojo-type\x3d"dijit/form/TextBox" style\x3d"width: 42px;" data-dojo-props\x3d"value: 15" data-dojo-attach-point\x3d"walkTimeBufferRadii3"\x3e\x3c/div\x3e\r\n\t\t\t\t\x3cselect data-dojo-type\x3d"dijit/form/Select" data-dojo-attach-point\x3d"walkTimeBufferUnits"\x3e\r\n\t\t\t\t\t\x3coption value\x3d"Minutes" selected\x3d"selected"\x3e${nls.minutes}\x3c/option\x3e\r\n\t\t\t\t\t\x3coption value\x3d"esriMiles"\x3e${nls.miles}\x3c/option\x3e\r\n\t\t\t\t\t\x3coption value\x3d"esriKilometers"\x3e${nls.km}\x3c/option\x3e\r\n\t\t\t\t\x3c/select\x3e\r\n\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"walkTimeValidationErrorMessage" class\x3d"validationErrorMessage hidden"\x3e\x3c/div\x3e\r\n\t\t\t\t\x3ca href\x3d"https://doc.arcgis.com/en/arcgis-online/reference/credits.htm" target\x3d"_blank" class\x3d"esriFloatTrailing esriSmallFont" style\x3d"position: absolute; right: 0px; top: 94px;"\x3e${nls.creditInformation}\x3c/a\x3e\r\n\t\t\t\x3c/div\x3e\r\n\t\t\x3c/div\x3e\r\n\t\x3c/div\x3e\r\n\t\x3cdiv style\x3d"margin-top: 10px;" class\x3d"jimu-btn jimu-btn-vacation"  data-dojo-attach-point\x3d"backBtn" data-dojo-attach-event\x3d"onclick:backOnClick"\x3e${nls.back}\x3c/div\x3e\r\n\t\x3cdiv style\x3d"margin-top: 10px;" class\x3d"jimu-btn"  data-dojo-attach-point\x3d"createBufferBtn" data-dojo-attach-event\x3d"onclick:applyBuffer"\x3e${nls.apply}\x3c/div\x3e\r\n\r\n\t\x3cdiv data-dojo-attach-point\x3d"shelter" data-dojo-type\x3d"jimu/dijit/LoadingIndicator" data-dojo-props\x3d\'hidden:true\'\x3e\x3c/div\x3e\r\n\x3c/div\x3e',
"url:widgets/BusinessAnalyst/ErrorPage.html":'\x3cdiv\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"noPermissionsErrorDiv"\x3e\x3c/div\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"servicesErrorDiv"\r\n\x3c/div\x3e\r\n',"url:esri/dijit/geoenrichment/templates/OnDemandSelect.html":'\x3cdiv class\x3d"esriGEOnDemandSelect"\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"openButton" class\x3d"onDemandSelect_openButton"\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"arrow" class\x3d"onDemandSelect_arrow"\x3e\x26nbsp;\x3c/div\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"selectedLabel" class\x3d"onDemandSelect_selectedLabel TrimWithEllipses"\x3e\x3c/div\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"selectedItemHolder" class\x3d"onDemandSelect_selectedItem TrimWithEllipses"\x3e\x3c/div\x3e\r\n    \x3c/div\x3e\r\n\x3c/div\x3e',
"url:esri/dijit/geoenrichment/ReportPlayer/templates/ComparisonSettings.html":'\x3cdiv class\x3d"esriGEReportPlayerToolbar_comparisonSettings esriGENonSelectable"\x3e\r\n    \x3cdiv class\x3d"esriGERow20" data-dojo-attach-point\x3d"showBackgroundImageBlock"\x3e\r\n        ${nls.comparisonSettings}\r\n    \x3c/div\x3e\r\n\r\n    \x3cdiv class\x3d"esriGESpaceBefore20"\x3e\r\n        \x3cdiv class\x3d"esriGERow20" data-dojo-attach-point\x3d"showBackgroundImageBlock"\x3e\r\n            \x3clabel data-dojo-attach-point\x3d"showBackgroundImageLabel"\x3e\x26nbsp;${nls.showBackgroundImage}\x3c/label\x3e\r\n        \x3c/div\x3e\r\n\r\n        \x3cdiv class\x3d"esriGERow20"\x3e\r\n            \x3cdiv class\x3d"dijitInline"\x3e\r\n                \x3clabel data-dojo-attach-point\x3d"splitPanelsLabel"\x3e\x26nbsp;${nls.splitPanels}\x3c/label\x3e\r\n            \x3c/div\x3e\r\n            \x3cdiv class\x3d"dijitInline esriGESpaceBeforeBig esriGEInfoIcon" data-dojo-attach-point\x3d"splitPanelsInfoIcon"\x3e\x3c/div\x3e\r\n        \x3c/div\x3e\r\n\r\n        \x3cdiv class\x3d"esriGERow20"\x3e\r\n            \x3cdiv class\x3d"dijitInline"\x3e${nls.zoomPanels}\x3c/div\x3e\r\n            \x3cdiv class\x3d"dijitInline esriGESpaceBeforeBig esriGEInfoIcon" data-dojo-attach-point\x3d"zoomPanelsInfoIcon"\x3e\x3c/div\x3e\r\n        \x3c/div\x3e\r\n\r\n        \x3cdiv class\x3d"esriGERow20 esriGESpaceBefore20" data-dojo-attach-point\x3d"zoomBlock"\x3e\r\n            \x3cdiv class\x3d"dijitInline esriGESpaceAfterBig comparisonSettings_zoomOutButton esriGEIcon16" data-dojo-attach-point\x3d"zoomOutButton"\x3e\x3c/div\x3e\r\n            \x3cdiv class\x3d"dijitInline esriGESpaceAfterBig comparisonSettings_zoomLabel" data-dojo-attach-point\x3d"zoomLabel"\x3e\x3c/div\x3e\r\n            \x3cdiv class\x3d"dijitInline esriGESpaceAfterBig comparisonSettings_zoomInButton esriGEIcon16" data-dojo-attach-point\x3d"zoomInButton"\x3e\x3c/div\x3e\r\n            \x3cdiv class\x3d"dijitInline esriGELink comparisonSettings_resetLink" data-dojo-attach-point\x3d"resetButton"\x3e${nls.reset}\x3c/div\x3e\r\n        \x3c/div\x3e\r\n\r\n        \x3cdiv class\x3d"esriGERow20 esriGESpaceBefore20" data-dojo-attach-point\x3d"zoomSplitBlock"\x3e\r\n            \x3cdiv class\x3d"dijitInline esriGESpaceAfterBig comparisonSettings_zoomOutButton esriGEIcon16" data-dojo-attach-point\x3d"zoomOutSplitButton"\x3e\x3c/div\x3e\r\n            \x3cdiv class\x3d"dijitInline esriGESpaceAfterBig comparisonSettings_zoomLabel" data-dojo-attach-point\x3d"zoomSplitLabel"\x3e\x3c/div\x3e\r\n            \x3cdiv class\x3d"dijitInline esriGESpaceAfterBig comparisonSettings_zoomInButton esriGEIcon16" data-dojo-attach-point\x3d"zoomInSplitButton"\x3e\x3c/div\x3e\r\n            \x3cdiv class\x3d"dijitInline esriGELink comparisonSettings_resetLink" data-dojo-attach-point\x3d"resetSplitButton"\x3e${nls.reset}\x3c/div\x3e\r\n        \x3c/div\x3e\r\n    \x3c/div\x3e\r\n\x3c/div\x3e',
"url:esri/dijit/geoenrichment/ReportPlayer/templates/PlayerToolbarHolder.html":'\x3cdiv class\x3d"esriGEPlayerToolbar"\x3e\r\n\r\n    \x3c!--left--\x3e\r\n\r\n    \x3cdiv data-dojo-attach-point\x3d"infographicsSelectDiv" class\x3d"dijitInline playerToolbar_infographicsSelectDiv"\x3e\x3c/div\x3e\r\n    \r\n    \x3c!--center--\x3e\r\n    \r\n    \x3cdiv data-dojo-attach-point\x3d"areaTitleDiv" class\x3d"dijitInline playerToolbar_areaTitleDiv"\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"areaTitleInnerDiv" class\x3d"dijitInline playerToolbar_areaTitleInnerDiv TrimWithEllipses"\x3e\x3c/div\x3e\r\n    \x3c/div\x3e\r\n\r\n    \x3cdiv data-dojo-attach-point\x3d"areasSelectDiv" class\x3d"dijitInline playerToolbar_areasSelectDiv"\x3e\x3c/div\x3e\r\n\r\n    \x3c!--right--\x3e\r\n\r\n    \x3cdiv data-dojo-attach-point\x3d"rightSideControlsBlock" class\x3d"dijitInline playerToolbar_rightSideControlsBlock"\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"zoomSelectDiv" class\x3d"dijitInline dijitInline playerToolbar_zoomSelectDiv"\x3e\x3c/div\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"pageSelectDiv" class\x3d"dijitInline dijitInline playerToolbar_pageSelectDiv"\x3e\x3c/div\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"commandButtonsContainer" class\x3d"dijitInline playerToolbar_commandButtonsContainer"\x3e\x3c/div\x3e\r\n    \x3c/div\x3e\r\n\x3c/div\x3e',
"url:esri/dijit/geoenrichment/ReportPlayer/templates/ReportPlayer.html":'\x3cdiv class\x3d"esriGEReportPlayer esriGENonSelectable"\x3e\r\n\r\n    \x3cdiv data-dojo-attach-point\x3d"printBackgroundView" class\x3d"esriGEAbsoluteStretched"\x3e\x3c/div\x3e\r\n\r\n    \x3cdiv data-dojo-attach-point\x3d"normalViewDiv"\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"playerToolbarDiv"\x3e\x3c/div\x3e\r\n\r\n        \x3cdiv data-dojo-attach-point\x3d"printableDivContainer" class\x3d"reportPalyer_printableDivContainer"\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"printableDiv" class\x3d"reportPalyer_printableDiv"\x3e\r\n                \x3cdiv data-dojo-attach-point\x3d"reportContainerDiv"\x3e\x3c/div\x3e\r\n            \x3c/div\x3e\r\n        \x3c/div\x3e\r\n\r\n        \x3cdiv class\x3d"reportPlayer_sidePageNavigator" data-dojo-attach-point\x3d"sidePageNavigator"\x3e\r\n            \x3cdiv class\x3d"reportPlayer_paginationArrowUp" data-dojo-attach-point\x3d"prevPageButton"\x3e\x3c/div\x3e\r\n            \x3cdiv class\x3d"reportPlayer_paginationArrowDown" data-dojo-attach-point\x3d"nextPageButton"\x3e\x3c/div\x3e\r\n        \x3c/div\x3e\r\n\r\n        \x3cdiv data-dojo-attach-point\x3d"playerAfterToolbarDiv" class\x3d"reportPlayer_playerAfterToolbarDiv"\x3e\x3c/div\x3e\r\n    \x3c/div\x3e\r\n\x3c/div\x3e',
"url:widgets/BusinessAnalyst/esriAnalystX/widgets/SelectableTreeGrid/templates/SelectableTreeGrid.html":'\x3cdiv class\x3d"esriMapsAnalystXNonSelectable"\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"gridContainer"\x3e\x3c/div\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"selectionCounter" class\x3d"esriMapsAnalystXSelectableTreeCounter"\x3e\x3c/div\x3e\r\n\x3c/div\x3e',"url:widgets/BusinessAnalyst/RunReportsPage.html":'\x3cdiv\x3e\r\n\t\x3cdiv class\x3d"business-analyst-run-reports-page" style\x3d"width: 350 px; height: 150px"\x3e\r\n\t\t\x3cdiv data-dojo-attach-point\x3d"runReportTabContainer" style\x3d"width: 100%; height: 155px;"\x3e\r\n\t\t\t\x3cdiv data-dojo-attach-point\x3d"infographicsContentPane" title\x3d"${nls.infographics}" style\x3d"overflow-y: hidden"\x3e\r\n\t\t\t\t\x3cdiv style\x3d"margin-top: 15px;"\x3e\r\n\t\t\t\t\t\x3cdiv style\x3d"height: 40px;" data-dojo-attach-point\x3d"infographicDropDownContainer"\x3e\x3c/div\x3e\r\n\t\t\t\t\t\x3cbr /\x3e\r\n\t\t\t\t\t\x3cdiv class\x3d"jimu-btn runReportButton jimu-state-disabled" data-dojo-attach-point\x3d"runInfographicBtn" data-dojo-attach-event\x3d"onclick:runInfographic"\x3e${nls.runInfographic}\x3c/div\x3e\r\n\t\t\t\t\t\x3ca href\x3d"https://doc.arcgis.com/en/arcgis-online/reference/credits.htm" target\x3d"_blank" class\x3d"esriFloatTrailing esriSmallFont"\x3e${nls.creditInformation}\x3c/a\x3e\r\n\t\t\t\t\x3c/div\x3e\r\n\t\t\t\x3c/div\x3e\r\n\t\t\t\x3cdiv data-dojo-attach-point\x3d"reportsContentPane" title\x3d"${nls.reports}" style\x3d"overflow-y: hidden"\x3e\r\n\t\t\t\t\x3cdiv style\x3d"margin-top: 15px;"\x3e\r\n\t\t\t\t\t\x3cdiv style\x3d"height: 40px;" data-dojo-attach-point\x3d"reportFilteringSelectDropDownContainer"\x3e\x3c/div\x3e\r\n\t\t\t\t\t\x3cbr /\x3e\r\n\t\t\t\t\t\x3cdiv class\x3d"jimu-btn runReportButton jimu-state-disabled" data-dojo-attach-point\x3d"runReportBtn" data-dojo-attach-event\x3d"onclick:runReport"\x3e${nls.runReport}\x3c/div\x3e\r\n\t\t\t\t\t\x3ca href\x3d"https://doc.arcgis.com/en/arcgis-online/reference/credits.htm" target\x3d"_blank" class\x3d"esriFloatTrailing esriSmallFont"\x3e${nls.creditInformation}\x3c/a\x3e\r\n\t\t\t\t\x3c/div\x3e\r\n\t\t\t\x3c/div\x3e\r\n\t\t\x3c/div\x3e\r\n\t\x3c/div\x3e\r\n\t\x3cbr\x3e\r\n\t\x3cdiv class\x3d"jimu-btn jimu-btn-vacation" data-dojo-attach-point\x3d"backBtn" data-dojo-attach-event\x3d"onclick:backOnClick"\x3e${nls.back}\x3c/div\x3e\r\n\r\n\t\x3cdiv data-dojo-attach-point\x3d"shelter" data-dojo-type\x3d"jimu/dijit/LoadingIndicator" data-dojo-props\x3d\'hidden:true\'\x3e\x3c/div\x3e\r\n\x3c/div\x3e',
"url:esri/dijit/Search/templates/Search.html":'\x3cdiv role\x3d"presentation" class\x3d"${theme}"\x3e\r\n  \x3cdiv role\x3d"presentation" class\x3d"${css.searchGroup}" data-dojo-attach-point\x3d"containerNode"\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"expandNode" class\x3d"${css.searchExpandContainer}"\x3e\r\n      \x3cdiv class\x3d"${css.searchAnimateContainer}"\x3e\r\n        \x3cdiv role\x3d"button" title\x3d"${_i18n.widgets.Search.main.searchIn}" id\x3d"${id}_menu_button" class\x3d"${css.searchBtn} ${css.searchToggle}" tabindex\x3d"0" data-dojo-attach-point\x3d"sourcesBtnNode"\x3e\r\n          \x3cspan aria-hidden\x3d"true" role\x3d"presentation" class\x3d"${css.searchToggleIcon}"\x3e\x3c/span\x3e\x3cspan class\x3d"${css.searchSourceName}" data-dojo-attach-point\x3d"sourceNameNode"\x3e\x3c/span\x3e\r\n        \x3c/div\x3e\r\n        \x3cdiv class\x3d"${css.searchInputGroup}"\x3e\r\n          \x3cform data-dojo-attach-point\x3d"formNode"\x3e\r\n            \x3cinput maxlength\x3d"${maxLength}" autocomplete\x3d"off" type\x3d"text" tabindex\x3d"0" class\x3d"${css.searchInput}" value\x3d"${value}" aria-haspopup\x3d"true" id\x3d"${id}_input" data-dojo-attach-point\x3d"inputNode" role\x3d"textbox"\x3e\r\n          \x3c/form\x3e\r\n          \x3cdiv role\x3d"button" class\x3d"${css.searchClear}" tabindex\x3d"0" data-dojo-attach-point\x3d"clearNode"\x3e\x3cspan aria-hidden\x3d"true" class\x3d"${css.searchClearIcon}"\x3e\x3c/span\x3e\x3cspan aria-hidden\x3d"true" class\x3d"${css.searchSpinner}"\x3e\x3c/span\x3e\r\n          \x3c/div\x3e\r\n          \x3cdiv data-dojo-attach-point\x3d"suggestionsNode" class\x3d"${css.searchMenu} ${css.suggestionsMenu}"\x3e\x3c/div\x3e\r\n        \x3c/div\x3e\r\n      \x3c/div\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv role\x3d"button" title\x3d"${_i18n.widgets.Search.main.searchButtonTitle}" class\x3d"${css.searchBtn} ${css.searchSubmit}" tabindex\x3d"0" data-dojo-attach-point\x3d"submitNode"\x3e\r\n      \x3cspan aria-hidden\x3d"true" role\x3d"presentation" class\x3d"${css.searchIcon}"\x3e\x3c/span\x3e\r\n      \x3cspan class\x3d"${css.searchButtonText}"\x3e${_i18n.widgets.Search.main.searchButtonTitle}\x3c/span\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"sourcesNode" class\x3d"${css.searchMenu} ${css.sourcesMenu}"\x3e\x3c/div\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"noResultsMenuNode" class\x3d"${css.searchMenu} ${css.searchNoResultsMenu}"\x3e\x3c/div\x3e\r\n    \x3cdiv class\x3d"${css.searchClearFloat}"\x3e\x3c/div\x3e\r\n  \x3c/div\x3e\r\n\x3c/div\x3e',
"url:widgets/BusinessAnalyst/SelectPointPolygonPage.html":'\x3cdiv\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"contentContainer"\x3e\x3c/div\x3e\r\n    \x3cbr\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"searchContainer" class\x3d"esriBusinessAnalystSearchContainer"\x3e\x3c/div\x3e\r\n    \x3cdiv tabindex\x3d"0" role\x3d"button" data-dojo-attach-point\x3d"activatePinButton" title\x3d"${nls.addPoint}" class\x3d"esriBusinessAnalystButton esriBusinessAnalystPinButton esriBusinessAnalystButtonSearchPadding" data-blur-on-click\x3d"true" \x3e\x3c/div\x3e\r\n    \x3cdiv tabindex\x3d"1" role\x3d"button" data-dojo-attach-point\x3d"activatePolygonButton" title\x3d"${nls.addPolygon}" class\x3d"esriBusinessAnalystButton esriBusinessAnalystPolygonButton esriBusinessAnalystButtonSearchPadding" data-blur-on-click\x3d"true" \x3e\x3c/div\x3e\r\n    \x3cdiv tabindex\x3d"2" role\x3d"button" data-dojo-attach-point\x3d"activateFreehandPolygonButton" title\x3d"${nls.addFreehandPolygon}" class\x3d"esriBusinessAnalystButton esriBusinessAnalystFreehandPolygonButton esriBusinessAnalystButtonSearchPadding" data-blur-on-click\x3d"true" \x3e\x3c/div\x3e\r\n\x3c/div\x3e',
"url:widgets/BusinessAnalyst/Widget.html":'\x3cdiv\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"wizardContainer"\x3e\x3c/div\x3e\r\n\x3c/div\x3e\r\n',"url:widgets/BusinessAnalyst/css/style.css":'.esriBusinessAnalystButton {background: #fff; border: 1px solid #c5c5c5; color: #555; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; font-size: 12px; line-height: 12px; -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.125); -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.125); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.125); -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-transition: all .05s linear; -moz-transition: all .05s linear; -o-transition: all .05s linear; transition: all .05s linear; padding: 5px 10px; text-align: center; text-transform: uppercase; cursor: pointer; letter-spacing: 1px; position: relative; -webkit-font-smoothing: antialiased; width: 34px; height: 34px; background-repeat: no-repeat; background-position: center; margin-left: 1px;}.esriBusinessAnalystPressedButton {box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.2);}.esriBusinessAnalystPressedButton,.esriBusinessAnalystPressedButton:hover{background-color: #DDE8F2;}.esriBusinessAnalystButtonSearchPadding {top: 22px;}.esriBusinessAnalystPinButton {float: left; margin-right: 10px; background-image: url("../../../jimu.js/css/images/draw_point.png");}.esriBusinessAnalystPolygonButton {float: left; background-size: 45px 45px; margin-right: 10px; background-image: url("../../../jimu.js/css/images/draw_polygon.png");}.esriBusinessAnalystFreehandPolygonButton {float: left; background-image: url("../../../jimu.js/css/images/draw_freehand_polygon.png");}.esriGETooltip {box-sizing: initial !important;}.esriGEPlayerToolbar.playerThemeDark {background-color: inherit !important;}.runReportButton {display: block; margin-top: 15px; width: max-content;}.jimu-btn.runReportButton.jimu-state-disabled {cursor: default;}.jimu-widget-business-analyst .tabs {font-family: "Avenir Light"; color: #000000; height: 100%;} .jimu-widget-business-analyst .tabs .tab-description {margin: 10px 0;} .jimu-widget-business-analyst .jimu-tab3\x3e.control\x3e.tab{background-color: #fff; border-top: 0; border-left: 0; border-right: 0; border-bottom: 1px solid #dedede; color:#898989; font-family: "Avenir Medium"; font-size: 14px;} .jimu-widget-business-analyst .jimu-tab3 .tab-item-td.jimu-state-active {border-bottom: 3px solid #24b5cc; font-family: "Avenir Heavy"; color: #000000;} .DashboardTheme .jimu-widget-business-analyst .jimu-tab3 .tab-item-td.jimu-state-active {color: #FFFFFF;} .DashboardTheme.light .jimu-widget-business-analyst .jimu-tab3 .tab-item-td.jimu-state-active {color: #000000;} .jimu-widget-business-analyst .tabs .titles {font-weight: bold; font-family: "Avenir Medium"; font-size: 14px; margin: 20px 0 10px 0;} .jimu-widget-business-analyst .tabs .hide{display: none;} .jimu-widget-business-analyst .tabs .indent{margin-left: 20px; margin-top: 10px;} .jimu-widget-business-analyst .tabs .unit-item{margin: 15px 5px 5px 5px; line-height: 18px; height: 18px; vertical-align: middle;} .jimu-widget-business-analyst .tabs .clearFix {*overflow: hidden; *zoom: 1;} .jimu-widget-business-analyst .tabs .clearFix:after {display: table; content: ""; width: 0; clear: both;} .jimu-widget-business-analyst .tabs .view{height: 100%; overflow-y: auto;} .jimu-widget-business-analyst .tabs .jimu-tab3\x3e.jimu-viewstack{padding-bottom: 30px;} .claro .jimu-widget-business-analyst .dijitTextBox, .claro .esriGEReportPlayer .esriGEPlayerToolbar .dijitTextBox {height: 30px;} .claro .jimu-widget-business-analyst .ui-icon {background-image: inherit;} .business-analyst-search-suggestions-overflow {overflow: visible !important;} .claro .jimu-widget-business-analyst .arcgisSearch .searchClear {top: 2px;} .jimu-widget-business-analyst .validationErrorMessage {color: #FF0000; margin-top: 10px;} .jimu-widget-business-analyst .validationErrorMessage.hidden {display: none;} .jimu-widget-business-analyst .invalidValue {outline: 3px solid #FF0000;} .jimu-widget-business-analyst .business-analyst-run-reports-page .dijitTextBox, .esriGEReportPlayer .playerToolbar_infographicsSelectDiv .dijitTextBox {width: 20em;}',
"*now":function(t){t(['dojo/i18n!*preload*widgets/BusinessAnalyst/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","dojo/dom-class","dojo/query","jimu/BaseWidget","./BAWizard"],function(t,p,l,k,f){return t([k],{name:"BusinessAnalyst",baseClass:"jimu-widget-business-analyst",reportDropDown:null,infographicDropDown:null,tradeAreaGraphics:[],selectedPoint:{tradeAreas:[]},postCreate:function(){this.inherited(arguments);this.initializeNewConfigValues();this.baWizard=(new f({appConfig:this.appConfig,map:this.map,nls:this.nls,config:this.config})).placeAt(this.wizardContainer)},startup:function(){this.baWizard.resize();
l(".jimu-widget-business-analyst").parents(".jimu-widget-frame.jimu-container")[0]&&p.add(l(".jimu-widget-business-analyst").parents(".jimu-widget-frame.jimu-container")[0],"business-analyst-search-suggestions-overflow");l(".jimu-widget-business-analyst").parents(".jimu-panel.jimu-on-screen-widget-panel")[0]&&p.add(l(".jimu-widget-business-analyst").parents(".jimu-panel.jimu-on-screen-widget-panel")[0],"business-analyst-search-suggestions-overflow")},resize:function(){this.baWizard&&this.baWizard.resize()},
onClose:function(){this.baWizard._featureUnselected()},onOpen:function(){this.baWizard.refreshPage()},initializeNewConfigValues:function(){"undefined"===typeof this.config.exportInfographicsPrintOption&&(this.config.exportInfographicsPrintOption=!0);"undefined"===typeof this.config.exportInfographicsImageOption&&(this.config.exportInfographicsImageOption=!0);"undefined"===typeof this.config.exportInfographicsPDFOption&&(this.config.exportInfographicsPDFOption=!0);"undefined"===typeof this.config.exportInfographicsDynamicHTMLOption&&
(this.config.exportInfographicsDynamicHTMLOption=!0);"undefined"===typeof this.config.firstPageText&&(this.config.firstPageText="\x3cbr\x3e\x3cdiv\x3e"+this.nls.widgetDescription+"\x3c/div\x3e\x3cbr\x3e\x3cdiv\x3e"+this.nls.selectPointOrPolygon+"\x3c/div\x3e");"undefined"===typeof this.config.searchTextBoxOption&&(this.config.searchTextBoxOption=!0);"undefined"===typeof this.config.dropPinOption&&(this.config.dropPinOption=!0);"undefined"===typeof this.config.drawPolygonOption&&(this.config.drawPolygonOption=
!0);"undefined"===typeof this.config.drawFreehandPolygonOption&&(this.config.drawFreehandPolygonOption=!0)}})});