// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.23/esri/copyright.txt for details.
//>>built
require({cache:{"url:esri/dijit/geoenrichment/ReportPlayer/core/templates/SimpleInfographic.html":'\x3cdiv class\x3d"esriGESimpleInfographic"\x3e\r\n    \r\n    \x3cdiv data-dojo-attach-point\x3d"mainViewDiv" class\x3d"esriGEAbsoluteStretched"\x3e\x3c/div\x3e\r\n\r\n    \x3cdiv data-dojo-attach-point\x3d"dataDrillingViewDiv" class\x3d"simpleInfographic_dataDrillingViewDiv"\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"drilledDataViewDiv" class\x3d"esriGEAbsoluteStretched"\x3e\x3c/div\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"topToolbar" class\x3d"simpleInfographic_topToolbar"\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"drillingOptionsButton" class\x3d"dijitInline simpleInfographic_drillingOptionsButton"\x3e\x3c/div\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"exportButton" class\x3d"dijitInline simpleInfographic_exportButton"\x3e\x3c/div\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"printButton" class\x3d"dijitInline simpleInfographic_printButton"\x3e\x3c/div\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"backToMainViewButton" class\x3d"dijitInline simpleInfographic_backToMainViewButton"\x3e\x3c/div\x3e\r\n        \x3c/div\x3e\r\n    \x3c/div\x3e\r\n\r\n\x3c/div\x3e\r\n\r\n\r\n'}});
define("esri/dijit/geoenrichment/ReportPlayer/core/infographics/simpleInfographic/SimpleInfographic","dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/dom-style dijit/_WidgetBase dijit/_TemplatedMixin ./_DataDrillingSupport ./_DDSlideAnimationSupport ./_DDZoomAnimationSupport ./SimpleInfographicViewModes esri/dijit/geoenrichment/_Invoke ../infographicUtils/InfographicLayoutResizer ../infographicUtils/InfographicJsonConversionUtil ../infographicUtils/InfographicThemeUtil ../../supportClasses/TableUtil ../../sections/supportClasses/InfographicValueController ../dataDrilling/DataDrillingAnimationTypes esri/dijit/geoenrichment/ReportPlayer/core/sections/SectionTypes esri/dijit/geoenrichment/ReportPlayer/core/supportClasses/ViewModes dojo/text!../../templates/SimpleInfographic.html".split(" "),
function(q,l,r,k,t,u,v,w,x,g,y,z,A,B,m,C,e,D,n,E){function p(a){return a&&a.shape&&a.shape.shapeJson.showAsBar}return q([t,u,y,v,w,x],{templateString:E,viewModel:null,themeContext:null,theme:null,parentWidget:null,isEditMode:!1,adjustElementsWhenResized:!1,dataDrillingAnimationType:e.ZOOM,_sections:null,_currentInfographicJson:null,postCreate:function(){this.inherited(arguments);this._setViewMode(g.VIEW_MAIN)},_destroySections:function(){this._destroyDrillingSections();this._destroyDrillingSectionsButtons();
this._sections=this._sections||[];this._sections.forEach(function(a){a.destroy()});this._sections.length=0;this.domNode&&r.empty(this.mainViewDiv)},updateInfographic:function(a){this.domNode&&(this._currentInfographicJson=this._applyThemeToJson(a),this._doUpdateInfographic())},refresh:function(){this.updateInfographic(this._currentInfographicJson)},_doUpdateInfographic:function(){var a=this;if(this.domNode){this._destroySections();var b=this._currentInfographicJson;this._syncJsonDimensions();var d=
this.viewModel.getStaticInfographicDefaultStyles(this.theme||this.themeContext);k.set(this.domNode,"backgroundColor",b.style.backgroundColor||d&&d.backgroundColor);k.set(this.domNode,{width:b.style.width+"px",height:b.style.height+"px"});this._preRender();this._renderHeader();this._renderVariableTables();this._sections.forEach(function(b){b.setViewMode(a.isEditMode?n.EDIT:n.PREVIEW_VALUES)})}},_syncJsonDimensions:function(){this._currentInfographicJson&&this.width&&this.height&&(this._currentInfographicJson.style.width!==
this.width||this._currentInfographicJson.style.height!==this.height)&&z.resizeLayout(this._currentInfographicJson,{w:this.width,h:this.height},{preserveContentSizes:!this.adjustElementsWhenResized,usePrettyBox:!this.adjustElementsWhenResized,updateFontSize:this.adjustElementsWhenResized})},_infographicViewController:null,_preRender:function(){this._infographicViewController=new C;var a=this._currentInfographicJson.variableTables.filter(p);this._infographicViewController.setVariableTables(a)},_renderHeader:function(){if(this._currentInfographicJson.header){var a=
this._currentInfographicJson.header;this._createSection(m.getTableWidth(a),m.getTableHeight(a),[a],a.style,null,-1,null)}},_renderVariableTables:function(){var a=this;this._currentInfographicJson.variableTables.forEach(function(b,d){var f=A.variableTableToNormalTables(b);a._createSection(b.style.width,b.style.height,f.tableJsons,b.style,b,d,f)})},_prepareSectionCreationParams:function(a,b){return null},_createSection:function(a,b,d,f,e,h,g){h=-1===h;var c={"class":"infographicContainer_Section"};
c.initialWidth=a;c.json={type:D.DETAILS,stack:d};c.viewModel=this.viewModel;c.themeContext=this.themeContext;c.theme=this.theme;c.parentWidget=this;c.tableClass="infographicContainerTable";c.hasFixedLayout=!1;c.isInfographicSection=!0;c.isInfographicHeaderSection=h;c.infographicViewController=p(e)&&this._infographicViewController;l.mixin(c,this._prepareSectionCreationParams(e,h));a=this.viewModel.layoutBuilder.createElement("section",c,this.mainViewDiv);a.setResizedHeight(b);k.set(a.domNode,{position:"absolute",
left:(f.left||0)+"px",top:(f.spaceBefore||f.top||0)+"px"});this._sections.push(a);this.viewModel.dynamicReportInfo&&this.viewModel.enableDataDrilling&&g&&this._addDataDrillingHandlers(a,a.getTables()[g.variableIndex]);return a},_mode:null,_setViewMode:function(a,b,d){switch(this.dataDrillingAnimationType){case e.SLIDE:return this._showSlideTransition(a,b);case e.ZOOM:return this._showZoomTransition(a,b,d)}},getVisualState:function(){return{dataDrilling:this._mode===g.VIEW_DATA_DRILLING?this._getDataDrillingState():
null}},setVisualState:function(a){a&&a.dataDrilling&&this._setDataDrillingState(a.dataDrilling)},_applyThemeToJson:function(a){var b=this.viewModel.getStaticInfographicDefaultStyles(this.theme||this.themeContext);return B.applyThemeSettingsToJson(a,b)},_undoThemeFromJson:function(a){return a},width:null,height:null,resize:function(a,b){this.width&&this.height&&this._currentInfographicJson&&this._currentInfographicJson.style.width===a&&this._currentInfographicJson.style.height===b||(this.width=a,this.height=
b,this._syncJsonDimensions(),this.invoke("_doResize",50))},_doResize:function(){this._doUpdateInfographic()},toJson:function(){var a=l.clone(this._currentInfographicJson);return this._undoThemeFromJson(a)},onViewModeChanged:function(a){},destroy:function(){this._destroySections();this.inherited(arguments)}})});