// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.23/esri/copyright.txt for details.
//>>built
define("esri/dijit/geoenrichment/ReportPlayer/core/conversion/reportingEngine/converters/DocumentConverter",["dojo/_base/lang","../../../supportClasses/ReportTemplateTypes","../../../supportClasses/templateJsonUtils/fieldInfo/FieldInfoNameUtil","../../ConversionUtil","../ReportingEnginePageSizeCompatibilityUtil"],function(f,g,h,d,k){var e={buildDocumentTag:function(a){var c=a.report,b=d.pxToPtObj(f.mixin({},c.templateJson.documentOptions));a={version:"10.1",pagesize:k.getReportingEnginePageSize(b.pagesize,
b.orientation),orientation:b.orientation,left:b.left,right:b.right,top:b.top,bottom:b.bottom,style:d.composeStyleString(e.buildDocumentStyle(a))};var l={name:"default",table:"headers",groupBy:c.type===g.MULTICOLUMN?"headers.STORE_ID":void 0},c=e.addCalculatorToQuery([{name:"sort",tags:[{name:"field",attributes:{name:"headers.AREA_ID",order:"Ascending"}}]}],h.DATA_COLLECTIONS_CALCULATOR_NAME);return{documentTag:{name:"HTMLextReport",attributes:a,tags:[{name:"queries",tags:[{name:"query",attributes:l,
tags:c}]},{name:"def",attributes:{align:b.align,lineSpacing:b.lineSpacing}}]},queryJoinArray:c}},addCalculatorToQuery:function(a,c){a.push({name:"join",attributes:{table:c,key:"AREA_ID",to:"AREA_ID"}});return a},buildDocumentStyle:function(a){a=d.pxToPtObj(f.mixin({},a.report.templateJson.documentOptions));return{fontSize:a.fontSize,fontFamily:a.fontFamily}}};return e});