function IsQueryObjectPreview(){return void 0!=window.external&&void 0!=window.external.SendText}function IsDashboardEdit(){return"undefined"!==typeof UCDashboardForEditor}function UpdateQueryObjectPreview(a){for(var d=Object.keys(qv.collection)[0],d=qv.collection[d],a=JSON.parse(a),e=Object.keys(a),b=0;b<e.length;b++){var c=e[b];d[c]=a[c]}d.realShow()}var qv={collection:{}};
qv.util={color:{getHtmlColor:function(a){return"string"==typeof a||"number"==typeof a?gx.color.toHex?-1==a?"":"#"+gx.color.toHex(a):"#"+gxToHex(a):void 0==a?"#000000":a.Html},parseCSSColor:function(a){return"rgb"==a.substring(0,3)?(a=a.replace("rgb","").replace("(","").replace(")","").split(","),this.getHtmlColor(gx.color.rgb(parseInt(a[0]),parseInt(a[1]),parseInt(a[2])))):a},convertValueToColor:function(a){a=-1==a.indexOf("#")?"#"+a:a;for(a=a.substring(1,a.length);6>a.length;)a="0"+a;return"#"+a}},
css:function(){var a={};return{replaceCssClasses:function(d){for(;0<=(posIni=d.indexOf("gxpl_cssReplace("));){posFin=d.indexOf(")",posIni);className=d.substring(posIni+16,posFin);var e=className;if(void 0!=a[e])style=a[e];else{for(var b=e,c=void 0,v=gx.theme+".css",r=!1,g=void 0,h=0;h<document.styleSheets.length;h++)if(null!=document.styleSheets[h].href&&0<=document.styleSheets[h].href.indexOf(v)){r=!0;c=document.styleSheets[h];break}r&&(c.cssRules?crossRules=c.cssRules:c.rules&&(crossRules=c.rules));
c=Number.MAX_SAFE_INTEGER;for(h=0;h<crossRules.length;h++)v=crossRules[h],void 0!=v.selectorText&&(0==v.selectorText.toLowerCase().indexOf("."+b.toLowerCase())&&v.selectorText.length<c)&&(g=v.style,c=v.selectorText.length);styleObj=g;void 0!=styleObj?(b=styleObj,g="",""!=b.color&&(g+=(""==g?"":";")+"color:"+qv.util.color.parseCSSColor(b.color)),""!=b.backgroundColor&&(g+=(""==g?"":";")+"backgroundColor:"+qv.util.color.parseCSSColor(b.backgroundColor)),""!=b.borderStyle&&(g+=(""==g?"":";")+"borderStyle:"+
b.borderStyle),""!=b.borderWidth&&(g+=(""==g?"":";")+"borderThickness:"+b.borderWidth.replace("pt","").replace("px","")),""!=b.borderColor&&(g+=(""==g?"":";")+"borderColor:"+qv.util.color.parseCSSColor(b.borderColor)),""!=b.fontFamily&&(g+=(""==g?"":";")+"fontFamily:"+b.fontFamily.replace(/"/g,"").replace(/'/g,"")),""!=b.fontSize&&(g+=(""==g?"":";")+"fontSize:"+b.fontSize.replace("pt","").replace("px","")),""!=b.fontWeight&&(g+=(""==g?"":";")+"fontWeight:"+b.fontWeight),""!=b.fontStyle&&(g+=(""==
g?"":";")+"fontStyle:"+b.fontStyle),""!=b.textDecoration&&(g+=(""==g?"":";")+"textDecoration:"+b.textDecoration),styleTransformed=g,style=a[e]=styleTransformed):style=""}toReplace=d.substring(posIni,posFin+1);d=d.replace(toReplace,style)}return d},parseStyle:function(a){var e="";if(""!=a&&void 0!=a){if(0>a.indexOf(":"))return a;for(var a=a.split(";"),b=0;b<a.length;b++)var c=a[b].split(":"),v=c[0],e=e+((""==e?"":",")+'"'+("borderThickness"==v?"borderWidth":v)+'":"'+c[1]+("borderThickness"==v||"fontSize"==
v?"px":"")+'"');return"{"+e+"}"}return"{}"}}}(),autorefresh:function(){return{UpdateLayoutSameGroup:function(a,d){function e(a,b,d){function v(a,f){function c(a,f,b){for(var k=0;k<a.length;k++){var d=a[k];if(d[f]==b)return d}return null}var b=c(a.Metadata.Axes,"Name",f);null==b&&(b=c(a.Metadata.Data,"Name",f));return b}function f(a,f){for(var c=null,b=0;b<a.Axes.length;b++)if(a.Axes[b].Name==f){c=a.Axes[b];break}return c}function k(a,f){void 0==f.Title&&(f.Title="");void 0==f.Visible&&(f.Visible=
!0);void 0==f.Aggregation&&(f.Aggregation="");void 0==f.AxisOrder&&(f.AxisOrder={Type:"None"});void 0==f.Format&&(f.Format={Subtotals:"Yes",CanDragToPages:!0});void 0==f.Actions&&(f.Actions={RaiseItemClick:!0});qv.util.MergeFields(f,a)}function s(a,f){for(var c=0;c<a.Metadata.Parameters.length;c++){var b=a.Metadata.Parameters[c];if(b.IsCollection&&b.Name==f)return[c,b]}return[null,null]}function e(a,f){for(var c=null,b=0;b<a.Parameters.length;b++)if(a.Parameters[b].Name==f){c=a.Parameters[b];break}return c}
function p(a,f){for(var c="",b="I"==f.Type||"R"==f.Type||"B"==f.Type?"":'"',k=0;k<a.Filter.Values.length;k++)c+=(""==c?"":",")+b+a.Filter.Values[k]+b;return"["+c+"]"}var o=[];a._parametersCloned||(a._parametersCloned=!0,a.Parameters=qv.util.cloneObject(a.Parameters));for(var w=qv.util.GetOrderedAxesKeys(c),t=0;t<w.length;t++){var F=parseInt(w[t].substr(5,4));sourceAxis=b[F];var A=s(a,sourceAxis.Name),F=A[0],A=A[1],I=v(a,sourceAxis.Name),z=null!=I,m=!z;z&&(z=f(a,sourceAxis.Name),null==z&&(z={},z.Name=
sourceAxis.Name),"Table"==d&&("Table"!=a.RealType&&"Row"==sourceAxis.AxisType&&"Hidden"!=I.AxisType)&&(sourceAxis.AxisType=qv.util.ToQueryViewerAxisType(I.AxisType)),k(sourceAxis,z),o.push(z));m&&null!=A&&(A=p(sourceAxis,A),a.Object?(I=eval(a.Object),I[F+2]=A,a.Object=JSON.stringify(I)):(F=e(a,sourceAxis.Name),null==F&&(F={},F.Name=sourceAxis.Name,a.Parameters.push(F)),F.Value=A))}a.Axes=o}function b(a,c,b){e(a,c,b);a.RememberLayout=!1;a.AllowChangeAxesOrder=!0;qv.util.autorefresh.SaveAxesAndParametersState(a);
a.realShow()}if(void 0!=a.AutoRefreshGroup&&null!=a.AutoRefreshGroup&&""!=a.AutoRefreshGroup&&""!=qv.util.trim(a.AutoRefreshGroup)){qv.util.autorefresh.DeleteAxesAndParametersState(a);var c=qv.pivot.GetRuntimeMetadata(d,a.RealType),v=a.RealType;for(index in qv.collection)qViewerOther=qv.collection[index],qv.services.IsObjectSet(qViewerOther)&&(qViewerOther.userControlId()!=a.userControlId()&&a.AutoRefreshGroup==qViewerOther.AutoRefreshGroup)&&(qViewerOther._isAutorefresh=!0,void 0!=qViewerOther.Metadata&&
void 0!=qViewerOther.Metadata.Parameters?b(qViewerOther,c,v):qViewerOther.getQueryParameters(function(a,d){var e=qv.util.dom.xmlDocument(a),e=qv.util.dom.getSingleElementByTagName(e,"gxpl_ParameterCollection");void 0==d.Metadata&&(d.Metadata={});d.Metadata.Parameters=[];for(var e=qv.util.dom.getMultipleElementsByTagName(e,"gxpl_Parameter"),n=0;n<e.length;n++){var f={};f.Name=qv.util.dom.getValueNode(qv.util.dom.getSingleElementByTagName(e[n],"Name"));f.Type=qv.util.dom.getValueNode(qv.util.dom.getSingleElementByTagName(e[n],
"Type"));f.IsCollection=gx.lang.gxBoolean(qv.util.dom.getValueNode(qv.util.dom.getSingleElementByTagName(e[n],"IsCollection")));d.Metadata.Parameters.push(f)}b(d,c,v)}))}},LoadAxesAndParametersState:function(a){var d=window.location.pathname+"_"+a.userControlId()+"_"+a.ObjectId+"_"+a.ObjectName+"_",e=d+"Axes",d=qv.util.storage.getItem(d+"Parameters"),e=qv.util.storage.getItem(e);null!=d&&""!=d&&(a.Parameters=JSON.parse(d),a.RememberLayout=!1);null!=e&&""!=e&&(a.Axes=JSON.parse(e),a.RememberLayout=
!1)},SaveAxesAndParametersState:function(a){var d=window.location.pathname+"_"+a.userControlId()+"_"+a.ObjectId+"_"+a.ObjectName+"_",e=d+"Axes";qv.util.storage.setItem(d+"Parameters",JSON.stringify(a.Parameters));qv.util.storage.setItem(e,JSON.stringify(a.Axes))},DeleteAxesAndParametersState:function(a){var a=window.location.pathname+"_"+a.userControlId()+"_"+a.ObjectId+"_"+a.ObjectName+"_",d=a+"Axes";qv.util.storage.removeItem(a+"Parameters");qv.util.storage.removeItem(d)}}}(),dom:{getSingleElementByTagName:function(a,
d){var e;e=this.getMultipleElementsByTagName(a,d);return 0<e.length?e[0]:null},getMultipleElementsByTagName:function(a,d){return!gx.util.browser.isIE()||12<=gx.util.browser.ieVersion()?a.getElementsByTagName(d):a.selectNodes(d)},getBooleanAttribute:function(a,d,e){a=a.getAttribute(d);return null==a?e:"true"==a.toLowerCase()},getValueNode:function(a){return null==a||void 0==a?null:null!=a.firstChild&&void 0!=a.firstChild?a.firstChild.nodeValue:null},selectXPathNode:function(a,d){var e;a.evaluate?(e=
a.evaluate(d,a,null,XPathResult.ANY_TYPE,null),e=e.iterateNext()):(e=a.selectNodes(d),e=0<e.length?e[0]:null);return e},xmlDocument:function(a){var d;!gx.util.browser.isIE()||12<=gx.util.browser.ieVersion()?(parser=new DOMParser,d=parser.parseFromString(a,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(a));return d},getEmptyContainer:function(a){for(a=a.getContainerControl();a.firstChild;)a.removeChild(a.firstChild);return a},setStyle:function(a,d){for(key in d)a.style[key]=
d[key]},createText:function(a,d){var e=document.createTextNode(d);a.appendChild(e);return e},createElement:function(a,d,e,b,c,v,r){d=document.createElement(d);""!=e&&(d.id=e);""!=b&&(d.className=b);qv.util.dom.setStyle(d,c);"function"==typeof v&&(d.onclick=v);""!=r&&qv.util.dom.createText(d,r);null!=a&&a.appendChild(d);return d},createTable:function(a,d,e){a=qv.util.dom.createElement(a,"TABLE","",d,e,null,"");d=document.createElement("TBODY");a.appendChild(d);return d},createRow:function(a){return qv.util.dom.createElement(a,
"TR","","",{},null,"")},createCell:function(a,d,e,b,c){a=qv.util.dom.createElement(a,"TD","","",b,null,c);1!=d&&(a.colSpan=d);""!=e&&(a.align=e);return a},createSpan:function(a,d,e,b,c,v,r){a=qv.util.dom.createElement(a,"SPAN",d,e,c,v,r);""!=b&&(a.title=b);return a},createDiv:function(a,d,e,b,c,v){a=qv.util.dom.createElement(a,"DIV",d,e,c,null,v);""!=b&&(a.title=b);return a},createAnchor:function(a,d,e,b){return qv.util.dom.createElement(a,"A",d,"",e,null,b)},createInput:function(a,d,e,b){a=qv.util.dom.createElement(a,
"INPUT",d,"",b,null,"");""!=e&&(a.type=e);return a},createSelect:function(a,d){return qv.util.dom.createElement(a,"SELECT",d,"",{},null,"")},createOption:function(a,d,e,b){a=qv.util.dom.createElement(a,"OPTION","","",{},null,b);""!=d&&(a.value=d);e&&(a.selected=!0);return a},createIcon:function(a,d,e,b){a=qv.util.dom.createElement(a,"I","","material-icons",e,null,b);""!=d&&(a.title=d);return a}},storage:function(){function a(a,e,b){if(b){var c=new Date;c.setTime(c.getTime()+864E5*b);b="; expires="+
c.toGMTString()}else b="";document.cookie=a+"="+e+b+"; path=/"}return{setItem:function(d,e){localStorage?localStorage.setItem(d,e):a(d,e,365)},getItem:function(a){if(localStorage)return localStorage.getItem(a);a:{for(var a=a+"=",e=document.cookie.split(";"),b=0;b<e.length;b++){for(var c=e[b];" "==c.charAt(0);)c=c.substring(1,c.length);if(0==c.indexOf(a)){a=c.substring(a.length,c.length);break a}}a=null}return a},removeItem:function(d){localStorage?localStorage.removeItem(d):a(d,"",-1)}}}(),ExecuteTracker:function(a,
d){for(var e=[],b=0;b<gx.fx.ctx.trackers.length;b++)gx.fx.ctx.trackers[b].types[0]==a&&(e[e.length]=gx.fx.ctx.trackers[b]);for(b=0;b<e.length;b++){var c=gx.O;gx.O=e[b].obj;var v=gx.csv.cmpCtx;gx.csv.cmpCtx=e[b].obj.CmpContext;gx.evt.setProcessing(!1);e[b].hdl.call(e[b].obj,null,null,d);gx.O=c;gx.csv.cmpCtx=v}},satisfyStyle:function(a,d){switch(d.Operator){case "EQ":return a==d.Value1;case "GT":return a>d.Value1;case "LT":return a<d.Value1;case "GE":return a>=d.Value1;case "LE":return a<=d.Value1;
case "NE":return a!=d.Value1;case "IN":return a>=d.Value1&&a<=d.Value2}},isGeneXusPreview:function(){return IsQueryObjectPreview()},getGenerator:function(){return gx.gen.isDotNet()?"C#":gx.gen.isJava()?"Java":""},getErrorFromText:function(a){return'<Result OK="True"></Result>'==a?"":a.replace('<Result OK="False"><Dsc>',"").replace("</Dsc></Result>","")},trim:function(a){return"string"!=typeof a?null:a.replace(/^[\s]+/,"").replace(/[\s]+$/,"").replace(/[\s]{2,}/," ")},capitalize:function(a){return a.charAt(0).toUpperCase()+
a.slice(1)},decapitalize:function(a){return a.charAt(0).toLowerCase()+a.slice(1)},dateToString:function(a,d){var e=a.getStringWithFmt("Y4MD").replace(/\//g,"-");d&&(a.TimeFmt=24,e+=" "+a.getTimeString(!0,!0));return e},cloneObject:function(a){return JSON.parse(JSON.stringify(a))},endsWith:function(a,d){return a.substr(a.length-d.length,d.length)==d},startsWith:function(a,d){return a.substr(0,d.length)==d},formatNumber:function(a,d,e,b){a=gx.num.formatNumber(a,d,e,0,!0,!1);if(b&&(0<=a.indexOf(".")||
0<=a.indexOf(","))){for(;qv.util.endsWith(a,"0");)a=a.slice(0,-1);if(qv.util.endsWith(a,".")||qv.util.endsWith(a,","))a=a.slice(0,-1)}return a},formatDateTime:function(a,d,e,b,c,v,r){a=new gx.date.gxdate(a,"Y4MD");e=a.getStringWithFmt(e);"datetime"==d&&(a.TimeFmt=24,e+=" "+a.getTimeString(c,v,b,r));return e},seconsdToText:function(a){return 60>a?qv.util.formatNumber(Math.round(a),0,"ZZZZZZZZZZZZZZ9",!1)+" "+qv.util.decapitalize(gx.getMessage("GXPL_QViewerSeconds")):3600>a?qv.util.formatNumber(Math.round(a/
60),0,"ZZZZZZZZZZZZZZ9",!1)+" "+qv.util.decapitalize(gx.getMessage("GXPL_QViewerMinutes")):86400>a?qv.util.formatNumber(Math.round(a/60/60),0,"ZZZZZZZZZZZZZZ9",!1)+" "+qv.util.decapitalize(gx.getMessage("GXPL_QViewerHours")):2630016>a?qv.util.formatNumber(Math.round(a/60/60/24),0,"ZZZZZZZZZZZZZZ9",!1)+" "+qv.util.decapitalize(gx.getMessage("GXPL_QViewerDays")):31557600>a?qv.util.formatNumber(Math.round(a/60/60/24/30.44),0,"ZZZZZZZZZZZZZZ9",!1)+" "+qv.util.decapitalize(gx.getMessage("GXPL_QViewerMonths")):
qv.util.formatNumber(Math.round(a/60/60/24/365.25),0,"ZZZZZZZZZZZZZZ9",!1)+" "+qv.util.decapitalize(gx.getMessage("GXPL_QViewerYears"))},ParseNumericPicture:function(a,d){var e,b,c="",v="";if(""==d)e="integer"==a?0:2,b=!1;else{0>d.indexOf(".")&&0>d.indexOf(",")?(e=0,b=!1):0<=d.indexOf(".")&&0>d.indexOf(",")?(e="integer"==a?0:d.length-d.indexOf(".")-1,b=!1):(e=0>d.indexOf(".")&&0<=d.indexOf(",")?0:"integer"==a?0:d.length-d.indexOf(".")-1,b=!0);for(var r=1,g=0;g<d.length;g++){var h=d.substr(g,1);if(("."==
h||","==h||"9"==h||"Z"==h)&&1==r)r=2;"."!=h&&(","!=h&&"9"!=h&&"Z"!=h)&&2==r&&(r=3);switch(r){case 1:c+=h;break;case 3:v+=h}}}return{DecimalPrecision:e,UseThousandsSeparator:b,Prefix:c,Suffix:v}},ParseDateTimePicture:function(a,d){var e=gx.dateFormat,b="datetime"==a,c="datetime"==a,v="datetime"==a,r="datetime"==a;""!=d&&(0<=d.indexOf("9999")&&0>e.indexOf("Y4")?e=e.replace("Y","Y4"):0>d.indexOf("9999")&&0<=e.indexOf("Y4")&&(e=e.replace("Y4","Y")),"datetime"==a&&(b=d.indexOf(" "),0<=b?(r=d.substr(b+
1,d.length-b),b=2<=r.length,c=5<=r.length,v=8<=r.length,r=12==r.length):r=v=c=b=!1));return{DateFormat:e,IncludeHours:b,IncludeMinutes:c,IncludeSeconds:v,IncludeMilliseconds:r}},aggregate:function(a,d,e){var b=null,c=null,v=null,r=null;switch(a||"Sum"){case "Sum":for(a=0;a<d.length;a++)null!=d[a]&&(b+=d[a]);return b;case "Average":for(a=0;a<d.length;a++)null!=d[a]&&(b+=d[a],c+=e[a]);return null!=b?b/c:null;case "Count":for(a=0;a<e.length;a++)c+=e[a];return c;case "Max":for(a=0;a<d.length;a++)r=null==
r?d[a]:d[a]>r?d[a]:r;return r;case "Min":for(a=0;a<d.length;a++)v=null==v?d[a]:d[a]<v?d[a]:v;return v}},ToQueryViewerAxisType:function(a){switch(a){case "Rows":return"Row";case "Columns":return"Column";case "Pages":return"Page";case "Data":return"Data";case "Hidden":return"NotShow";default:return""}},anyError:function(a){return 0==a.indexOf('<Result OK="False"><Dsc>')},showActivityIndicator:function(a){var d='qv.util.showActivityIndicatorMain("'+a.getContainerControl().id+'");';a._fadeTimeout=setTimeout(d,
500)},showActivityIndicatorMain:function(a){a=document.getElementById(a);gx.dom.addClass(a,"gx-qv-loading");for(var d=0;d<a.childNodes.length;d++)gx.dom.addClass(a.childNodes[d],"gx-qv-loading-children")},hideActivityIndicator:function(a){a._fadeTimeout&&(clearTimeout(a._fadeTimeout),a._fadeTimeout=void 0);a=a.getContainerControl();gx.dom.removeClass(a,"gx-qv-loading");for(var d=0;d<a.childNodes.length;d++)gx.dom.removeClass(a.childNodes[d],"gx-qv-loading-children")},renderError:function(a,d){if(IsQueryObjectPreview()&&
!IsDashboardEdit())window.external.SendText(a.ControlName,d);else{var e=qv.util.dom.getEmptyContainer(a);qv.util.dom.createDiv(e,"","gx-qv-centered-text","",{width:gx.dom.addUnits(a.Width),height:gx.dom.addUnits(a.Height),borderColor:"silver",borderWidth:"thin",borderStyle:"solid"},gx.getMessage("GXPL_QViewerError")+": "+d);a._ControlRenderedTo=void 0;qv.util.hideActivityIndicator(a)}},GetDesigntimeMetadata:function(a){for(var d=[],e=0;e<a.Metadata.Axes.length;e++){var b=a.Metadata.Axes[e];if(!b.IsComponent){var c=
{};c.Name=b.Name;c.Title=b.Title;c.DataField=b.DataField;c.Visible=b.Visible;c.Type=qv.util.ToQueryViewerAxisType(b.AxisType);c.Filter=b.Filter;c.ExpandCollapse=b.ExpandCollapse;c.AxisOrder=b.Order;c.Format={};c.Format.Subtotals=b.Subtotals;c.Format.Picture=b.Picture;c.Format.CanDragToPages=b.CanDragToPages;c.Format.Style=b.Style;0<b.ValuesStyles.length&&(c.Format.ValuesStyles=b.ValuesStyles);c.Actions={};c.Actions.RaiseItemClick=b.RaiseItemClick;d.push(c)}}for(e=0;e<a.Metadata.Data.length;e++)b=
a.Metadata.Data[e],b.IsComponent||(c={},c.Name=b.Name,c.Title=b.Title,c.DataField=b.DataField,c.Visible=b.Visible,c.Type=qv.util.ToQueryViewerAxisType(b.AxisType),c.Aggregation=b.Aggregation,c.Format={},c.Format.Picture=b.Picture,c.Format.Style=b.Style,c.Format.TargetValue=b.TargetValue,c.Format.MaximumValue=c.Format.TargetValue,0<b.ConditionalStyles.length&&(c.Format.ConditionalStyles=b.ConditionalStyles),c.Actions={},c.Actions.RaiseItemClick=b.RaiseItemClick,d.push(c));return d},MergeFields:function(a,
d){if(a.Visible&&(a.Type=d.AxisType,"Data"!=a.Type&&"Hidden"!=a.Type)){switch(a.AxisOrder.Type){case "None":case "Ascending":case "Descending":a.AxisOrder.Type=d.Order;break;case "Custom":"Descending"==d.Order&&a.AxisOrder.Values.reverse()}"No"!=a.Format.Subtotals&&void 0!=d.Subtotals&&(a.Format.Subtotals="Yes"==d.Subtotals?"Yes":"Hidden");a.Filter=d.Filter;d.ExpandCollapse&&(a.ExpandCollapse=d.ExpandCollapse)}},GetOrderedAxesKeys:function(a){function d(a,c,b){return Array(c-(""+a).length+1).join(b||
"0")+a}for(var e=[],b=0;b<a.length;b++){var c=a[b];switch(c.AxisType){case "Row":c="A"+d(c.AxisPosition,4,"0")+d(b,4,"0");break;case "Column":c="B"+d(c.AxisPosition,4,"0")+d(b,4,"0");break;case "Page":c="C"+d(c.AxisPosition,4,"0")+d(b,4,"0");break;case "Hidden":c="D"+d(c.AxisPosition,4,"0")+d(b,4,"0");break;case "Data":c="E"+d(c.AxisPosition,4,"0")+d(b,4,"0");break;default:c="Z"+d(c.AxisPosition,4,"0")+d(b,4,"0")}e.push(c)}e.sort();return e},GetContainerControlClass:function(a){return""!=a.Class?
a.Class+"-"+a.RealType.toLowerCase():""},GetContainerControlClasses:function(a){var d=qv.util.GetContainerControlClass(a),e;switch(a.RealType){case "Card":e="qv-card";break;case "Chart":e="qv-chart";break;case "PivotTable":e="qv-pivottable";break;case "Table":e="qv-table"}""!=d&&(e+=" "+d);return e},SetUserControlClass:function(a,d){a.getContainerControl().className="gx_usercontrol "+d}};var STATE_DONE=4,STATUS_OK=200;
qv.services=function(){function a(a){return eval(a)[1].replace(/\\/g,".")}function d(a,b){var d=qv.services.RuntimeFieldsJSON(a),g=qv.services.RuntimeParametersJSON(a),e="",n="",f;f="Table"==a.RealType?"OnlyRows":"AllAxisTypes";""!=a.QueryInfo&&(n=eval("("+a.QueryInfo+")"),e=n.TextForNullValues,n=gx.json.serializeJson(n.Fields));return a.ObjectName!=b.ObjectName||a.ObjectType!=b.ObjectType||a.ObjectId!=b.ObjectId||a.Object!=b.Object||d!=b.RuntimeFieldsJSON||g!=b.RuntimeParametersJSON||e!=b.QueryInfoTextForNullValues||
n!=b.QueryInfoFieldsJSON||f!=b.MetadataType?(b.ObjectName=a.ObjectName,b.ObjectType=a.ObjectType,b.ObjectId=a.ObjectId,b.Object=a.Object,b.RuntimeFieldsJSON=d,b.RuntimeParametersJSON=g,b.QueryInfoTextForNullValues=e,b.QueryInfoFieldsJSON=n,b.MetadataType=f,!0):!1}function e(a,d){function e(a,f,c){for(var a=b(a),k=0;k<f.length;k++){var d=f[k],s="";void 0!=d[c]&&(s=d[c].Type);""!=s&&(d=qv.services.postInfo._priv.SdtWithValuesJSON("Order",s,"Custom",d[c].Values,!1),a+=","+d)}return a}var g=qv.services.RuntimeParametersJSON(a),
h=e(a,a.Axes,"AxisOrder"),n="",f="",k="",s="Table"==a.RealType?"PagedRecordSet":"PivotTable"==a.RealType?"PagedLineSet":"NotPaged";""!=a.QueryInfo&&(k=eval("("+a.QueryInfo+")"),n=k.SQLSentence,f=gx.json.serializeJson(k.Parameters),k=e(a,k.Fields,"Order"));return a.ObjectName!=d.ObjectName||a.ObjectType!=d.ObjectType||a.ObjectId!=d.ObjectId||a.Object!=d.Object||g!=d.RuntimeParametersJSON||h!=d.OrderJSON||n!=d.QueryInfoSQLSentence||f!=d.QueryInfoParametersJSON||k!=d.QueryInfoOrderJSON||s!=d.DataType?
(d.ObjectName=a.ObjectName,d.ObjectType=a.ObjectType,d.ObjectId=a.ObjectId,d.Object=a.Object,d.RuntimeParametersJSON=g,d.OrderJSON=h,d.QueryInfoSQLSentence=n,d.QueryInfoParametersJSON=f,d.QueryInfoOrderJSON=k,d.DataType=s,!0):!1}function b(a){return"Chart"==a.RealType&&qv.chart.IsDatetimeXAxis(a)||"Card"==a.RealType&&(a.IncludeSparkline||a.IncludeTrend)}return{url:function(){function a(b,c){var d=qv.util.getGenerator(),e;e=(new Date).getTime();var n=b.enableServerDebug?"_debug":"";switch(d){case "C#":var d=
new gx.util.Url(location.href),f=d.path,f=f.substr(0,f.lastIndexOf("/")+1);urlresult=""==d.port?d.protocol+"://"+d.host+f:d.protocol+"://"+d.host+":"+d.port+f;return urlresult+"agxpl_get"+n+".aspx?"+c+","+e;case "Java":return d=gx.util.resourceUrl(gx.basePath,!0),d+"servlet/qviewer.services.agxpl_get"+n+"?"+c+","+e;default:return""}}return{getDefaultOutputURL:function(b){return a(b,"defaultoutput")},getRecordsetCacheKeyURL:function(b){return a(b,"recordsetcachekey")},getMetadataURL:function(b){return a(b,
"metadata")},getDataURL:function(b){return a(b,"data")},getAttributeValuesURL:function(b){return a(b,"attributevalues")},getPageDataForTableURL:function(b){return a(b,"pagedatafortable")},getPageDataForPivotTableURL:function(b){return a(b,"pagedataforpivottable")},getQueryParametersURL:function(b){return a(b,"queryparameters")},getDashboardSpecURL:function(b){return a(b,"dashboardspec")}}}(),postInfo:function(){function c(a,b){var c="",e,g,r,n,t,h,A,I,z,m,G;e=!1;for(i=0;void 0!=a.Axes[i];i++){e=!0;
c+=""!=c?",":"";c+="{";g="";n=r=0;h=t="";I=A=!0;G=m=z="";var C;C=a.Axes[i];var y="",x=!1;if(void 0!=C.Format&&void 0!=C.Format.ValuesStyles)for(var u=0;void 0!=C.Format.ValuesStyles[u];u++)x=!0,y+=""!=y?",":"",y+="{",y+='"Value":"'+encodeURIComponent(C.Format.ValuesStyles[u].Value)+'"',y+=",",y+='"Style":"'+encodeURIComponent(C.Format.ValuesStyles[u].StyleOrClass)+'"',y+=",",y+='"Propagate":'+(C.Format.ValuesStyles[u].ApplyToRowOrColumn?"true":"false"),y+="}";x&&(y='"ValuesStyles":['+y+"]");C=y;y=
a.Axes[i];x="";u=!1;if(void 0!=y.Format&&void 0!=y.Format.ConditionalStyles)for(var M=0;void 0!=y.Format.ConditionalStyles[M];M++)u=!0,x+=""!=x?",":"",x+="{",x+='"Operator":"'+y.Format.ConditionalStyles[M].Operator+'"',x+=",",x+='"Value1":"'+encodeURIComponent(y.Format.ConditionalStyles[M].Value1)+'"',"IN"==y.Format.ConditionalStyles[M].Operator&&(x+=",",x+='"Value2":"'+encodeURIComponent(y.Format.ConditionalStyles[M].Value2)+'"'),x+=",",x+='"Style":"'+encodeURIComponent(y.Format.ConditionalStyles[M].StyleOrClass)+
'"',x+="}";u&&(x='"ConditionalStyles":['+x+"]");y=x;x=a.Axes[i];u="";void 0!=x.Grouping&&(u+="{",u+='"GroupByYear":'+(x.Grouping.GroupByYear?"true":"false"),u+=",",u+='"YearTitle":"'+x.Grouping.YearTitle+'"',u+=",",u+='"GroupBySemester":'+(x.Grouping.GroupBySemester?"true":"false"),u+=",",u+='"SemesterTitle":"'+x.Grouping.SemesterTitle+'"',u+=",",u+='"GroupByQuarter":'+(x.Grouping.GroupByQuarter?"true":"false"),u+=",",u+='"QuarterTitle":"'+x.Grouping.QuarterTitle+'"',u+=",",u+='"GroupByMonth":'+(x.Grouping.GroupByMonth?
"true":"false"),u+=",",u+='"MonthTitle":"'+x.Grouping.MonthTitle+'"',u+=",",u+='"GroupByDayOfWeek":'+(x.Grouping.GroupByDayOfWeek?"true":"false"),u+=",",u+='"DayOfWeekTitle":"'+x.Grouping.DayOfWeekTitle+'"',u+=",",u+='"HideValue":'+(x.Grouping.HideValue?"true":"false"),u+="}",u='"Grouping":'+u);x=u;void 0!=a.Axes[i].Format&&(g=a.Axes[i].Format.Picture?a.Axes[i].Format.Picture:"",r=a.Axes[i].Format.TargetValue?a.Axes[i].Format.TargetValue:0,n=a.Axes[i].Format.MaximumValue?a.Axes[i].Format.MaximumValue:
0,t=a.Axes[i].Format.Style?a.Axes[i].Format.Style:"",h=a.Axes[i].Format.Subtotals?a.Axes[i].Format.Subtotals:"",A=a.Axes[i].Format.CanDragToPages);void 0!=a.Axes[i].Actions&&(I=a.Axes[i].Actions.RaiseItemClick);void 0!=a.Axes[i].AxisOrder&&(z=a.Axes[i].AxisOrder.Type);void 0!=a.Axes[i].ExpandCollapse&&(m=a.Axes[i].ExpandCollapse.Type);void 0!=a.Axes[i].Filter&&(G=a.Axes[i].Filter.Type);void 0==G&&(G="ShowSomeValues");c+='"Name":"'+encodeURIComponent(a.Axes[i].Name)+'"';c+=",";c+='"Caption":"'+encodeURIComponent(a.Axes[i].Title)+
'"';c+=",";c+='"Aggregation":"'+a.Axes[i].Aggregation+'"';c+=",";c+='"Visible":'+a.Axes[i].Visible;c+=",";u=a.Axes[i].Type;c+='"Axis":{"Type":"'+("Row"==u?"Rows":"Column"==u?"Columns":"Page"==u?"Pages":"NotShow"==u?"Hidden":u)+'"}';c+=",";c+='"Picture":"'+encodeURIComponent(g)+'"';c+=",";c+='"TargetValue":'+r;c+=",";c+='"MaximumValue":'+n;c+=",";c+='"Style":"'+t+'"';c+=",";c+='"Subtotals":"'+h+'"';c+=",";c+='"CanDragToPages":'+A;c+=",";c+='"RaiseItemClick":'+I;""!=z&&(g=d("Order",z,"Custom",a.Axes[i].AxisOrder.Values,
b),c+=""!=g?","+g:"");""!=m&&(m=d("ExpandCollapse",m,"ExpandSomeValues",a.Axes[i].ExpandCollapse.Values,b),c+=""!=m?","+m:"");""!=G&&a.Axes[i].Filter.Values&&(G=d("Filter",G,"ShowSomeValues",a.Axes[i].Filter.Values,b),c+=""!=G?","+G:"");c+=""!=C?","+C:"";c+=""!=y?","+y:"";c+=""!=x?","+x:"";c+="}"}e&&(c='"RuntimeFields":['+c+"]");return c}function d(a,c,b,e,g){var v="";if(""!=c){v=v+('"'+a+'":')+"{"+('"Type":"'+c+'"');strValues="";if(c==b){existValues=!1;for(j=0;void 0!=e[j];j++)existValues=!0,strValues+=
""!=strValues?",":"",strValues=g?strValues+('"'+encodeURIComponent(e[j])+'"'):strValues+('"'+e[j]+'"');existValues&&(strValues=',"Values":['+strValues+"]")}v+=strValues;v+="}"}return v}function e(a){var c="",b=!1;if(a.Object){a=eval(a.Object);for(i=2;i<a.length;i++)b=!0,c+=""!=c?",":"",c+="{",c+='"Value":"'+encodeURIComponent(a[i])+'"',c+="}"}else for(i=0;void 0!=a.Parameters[i];i++)b=!0,c+=""!=c?",":"",c+="{",c+='"Name":"'+a.Parameters[i].Name+'"',c+=",",c+='"Value":"'+encodeURIComponent(a.Parameters[i].Value)+
'"',c+="}";b&&(c='"RuntimeParameters":['+c+"]");return c}function g(a){var c="",b=!1;for(i=0;void 0!=a[i];i++){b=!0;c+=""!=c?",":"";c+="{";c+='"DataField":"'+a[i].DataField+'"';c+=",";c+='"NullIncluded":'+a[i].NullIncluded;strIncludedValues="";existValues=!1;for(j=0;void 0!=a[i].NotNullValues.Included[j];j++)existValues=!0,strIncludedValues+=""!=strIncludedValues?",":"",strIncludedValues+='"'+encodeURIComponent(a[i].NotNullValues.Included[j])+'"';existValues&&(strIncludedValues=',"Included":['+strIncludedValues+
"]");strExcludedValues="";existValues=!1;for(j=0;void 0!=a[i].NotNullValues.Excluded[j];j++)existValues=!0,strExcludedValues+=""!=strExcludedValues?",":"",strExcludedValues+='"'+encodeURIComponent(a[i].NotNullValues.Excluded[j])+'"';existValues&&(strExcludedValues=',"Excluded":['+strExcludedValues+"]");c+=",";c+='"NotNullValues":{"DefaultAction":"'+a[i].NotNullValues.DefaultAction+'"'+strIncludedValues+strExcludedValues+"}";c+="}"}b&&(c='"Filters":['+c+"]");return c}function h(a){return a.UseRecordsetCache?
'{"ActualKey":"'+a.RecordsetCache.ActualKey+'","OldKey":"'+a.RecordsetCache.OldKey+'","MinutesToKeep":'+a.MinutesToKeepInRecordsetCache+',"MaximumSize":'+a.MaximumCacheSize+"}":'{"ActualKey":"","OldKey":"","MinutesToKeep":0,"MaximumSize":0}'}function n(c){var b;b=""+(""!=c.ParentObject.PackageName?'"ApplicationNamespace":"'+c.ParentObject.PackageName+'",':"");c.Object?b+='"ObjectName":"'+a(c.Object)+'"':(b+='"ObjectName":"'+c.ObjectName+'"',b=b+","+('"Alt_ObjectType":"'+c.ObjectType+'"'),b=b+","+
('"Alt_ObjectId":'+c.ObjectId));return b}return{DefaultOutput:function(a){var c;c="{"+n(a);c+=""!=a.ObjectInfo?',"ObjectInfo":'+a.ObjectInfo:"";return"Data="+encodeURIComponent(c+"}")},RecordsetCacheKey:function(a){a="{"+n(a);return"Data="+encodeURIComponent(a+"}")},Metadata:function(a){var b="",d=e(a),g=c(a,!0),b=b+"{"+n(a),b=b+(""!=a.QueryInfo?',"QueryInfo":'+a.QueryInfo:""),b=b+(""!=a.AppSettings?',"AppSettings":'+a.AppSettings:""),b=b+(""!=d?","+d:"")+(""!=g?","+g:"")+","+('"TableType":"'+a.RealType+
'"'),b=b+","+('"AllowAxesOrderChange":'+a.AllowChangeAxesOrder),b=b+","+('"RememberLayout":'+a.RememberLayout),b=b+","+('"ShowDataLabelsIn":"'+a.ShowDataLabelsIn+'"'),b=b+","+('"RecordsetCacheInfo":'+h(a)),b=b+","+('"ReturnSampleData":'+a.ReturnSampleData);return"Data="+encodeURIComponent(b+"}")},Data:function(a){var d="",g=e(a),v=c(a,!0),d=d+"{"+n(a),d=d+(""!=a.QueryInfo?',"QueryInfo":'+a.QueryInfo:""),d=d+(""!=a.AppSettings?',"AppSettings":'+a.AppSettings:""),d=d+(""!=g?","+g:"")+(""!=v?","+v:"")+
","+('"TableType":"'+a.RealType+'"'),d=d+","+('"SortAscendingForced":'+b(a)),d=d+","+('"AllowAxesOrderChange":'+a.AllowChangeAxesOrder),d=d+","+('"RecordsetCacheInfo":'+h(a)),d=d+","+('"ReturnSampleData":'+a.ReturnSampleData);return"Data="+encodeURIComponent(d+"}")},AttributeValues:function(a,b,d,g,v){var o="",w=e(a),t=c(a,!0),o=o+"{"+n(a),o=o+","+('"DataField":"'+b+'"')+","+('"PageNumber":'+d)+","+('"PageSize":'+g)+","+('"Filter":"'+v+'"')+(""!=a.QueryInfo?',"QueryInfo":'+a.QueryInfo:""),o=o+(""!=
a.AppSettings?',"AppSettings":'+a.AppSettings:""),o=o+(""!=w?","+w:"")+(""!=t?","+t:"")+","+('"TableType":"'+a.RealType+'"'),o=o+","+('"AllowAxesOrderChange":'+a.AllowChangeAxesOrder),o=o+","+('"RecordsetCacheInfo":'+h(a)),o=o+","+('"ReturnSampleData":'+a.ReturnSampleData);return"Data="+encodeURIComponent(o+"}")},TablePageData:function(a,b,d,v,p,o,w){var t="",F=e(a),A=c(a,!0),w=g(w),t=t+"{"+n(a),t=t+","+('"PageNumber":'+b)+","+('"PageSize":'+(gx.lang.gxBoolean(a.Paging)?d:0)),t=t+","+('"ReturnTotPages":'+
v)+","+('"Order":'+('{"DataField":"'+p+'","Type":"'+o+'"}'))+(""!=w?","+w:"")+(""!=a.QueryInfo?',"QueryInfo":'+a.QueryInfo:""),t=t+(""!=a.AppSettings?',"AppSettings":'+a.AppSettings:""),t=t+(""!=F?","+F:"")+(""!=A?","+A:"")+","+('"AllowAxesOrderChange":'+a.AllowChangeAxesOrder),t=t+","+('"RecordsetCacheInfo":'+h(a)),t=t+","+('"ReturnSampleData":'+a.ReturnSampleData);return"Data="+encodeURIComponent(t+"}")},PivotTablePageData:function(a,b,d,v,p,o,w,t,F){for(var A="",I=e(a),z=c(a,!0),m="",G=!1,C=0;void 0!=
p[C];C++)G=!0,m+=""!=m?",":"",m+="{",m+='"DataField":"'+p[C].DataField+'"',m+=",",m+='"Axis":{"Type":"'+p[C].Axis.Type+'","Position":'+p[C].Axis.Position+"}",m+=",",m+='"Order":"'+p[C].Order+'"',m+=",",m+='"Subtotals":'+p[C].Subtotals,m+="}";G&&(m='"AxesInfo":['+m+"]");p=m;m="";G=!1;for(C=0;void 0!=o[C];C++)G=!0,m+=""!=m?",":"",m+="{",m+='"DataField":"'+o[C].DataField+'"',m+=",",m+='"Axis":{"Type":"'+o[C].Axis.Type+'","Position":'+o[C].Axis.Position+"}",m+="}";G&&(m='"DataInfo":['+m+"]");o=m;w=g(w);
m="";G=!1;for(C=0;void 0!=t[C];C++){G=!0;m+=""!=m?",":"";m+="{";m+='"DataField":"'+t[C].DataField+'"';m+=",";m+='"NullExpanded":'+t[C].NullExpanded;strExpandedValues="";existValues=!1;for(var y=0;void 0!=t[C].NotNullValues.Expanded[y];y++)existValues=!0,strExpandedValues+=""!=strExpandedValues?",":"",strExpandedValues+='"'+encodeURIComponent(t[C].NotNullValues.Expanded[y])+'"';existValues&&(strExpandedValues=',"Expanded":['+strExpandedValues+"]");strCollapsedValues="";existValues=!1;for(y=0;void 0!=
t[C].NotNullValues.Collapsed[y];y++)existValues=!0,strCollapsedValues+=""!=strCollapsedValues?",":"",strCollapsedValues+='"'+encodeURIComponent(t[C].NotNullValues.Collapsed[y])+'"';existValues&&(strCollapsedValues=',"Collapsed":['+strCollapsedValues+"]");m+=",";m+='"NotNullValues":{"DefaultAction":"'+t[C].NotNullValues.DefaultAction+'"'+strExpandedValues+strCollapsedValues+"}";m+="}"}G&&(m='"ExpandCollapse":['+m+"]");t=m;A=A+"{"+n(a);A=A+","+('"PageNumber":'+b)+","+('"PageSize":'+(gx.lang.gxBoolean(a.Paging)?
d:0));A=A+","+('"ReturnTotPages":'+v)+","+('"ShowDataLabelsIn":"'+a.ShowDataLabelsIn+'"');A=A+(""!=p?","+p:"")+(""!=o?","+o:"")+(""!=w?","+w:"")+(""!=t?","+t:"")+(""!=a.QueryInfo?',"QueryInfo":'+a.QueryInfo:"");A+=""!=a.AppSettings?',"AppSettings":'+a.AppSettings:"";A=A+(""!=I?","+I:"")+(""!=z?","+z:"")+","+('"AllowAxesOrderChange":'+a.AllowChangeAxesOrder);A=A+","+('"RecordsetCacheInfo":'+h(a));A=A+","+('"LayoutChanged":'+F)+","+('"ReturnSampleData":'+a.ReturnSampleData);return"Data="+encodeURIComponent(A+
"}")},getQueryParameters:function(a){var c;c="{"+n(a);c+=""!=a.ObjectInfo?',"ObjectInfo":'+a.ObjectInfo:"";return"Data="+encodeURIComponent(c+"}")},DashboardSpec:function(c){var b="";c.Object&&(b=a(c.Object));c=JSON.stringify({ApplicationNamespace:c.ParentObject.PackageName,ObjectName:b,Alt_ObjectId:0});return"Data="+encodeURIComponent(c)},_priv:{RuntimeParametersJSON:function(a){return e(a)},RuntimeFieldsJSON:function(a){return c(a)},SdtWithValuesJSON:function(a,c,b,e,g){return d(a,c,b,e,g)}}}}(),
RuntimeParametersJSON:function(a){return this.postInfo._priv.RuntimeParametersJSON(a)},RuntimeFieldsJSON:function(a,b){return this.postInfo._priv.RuntimeFieldsJSON(a,b)},getXMLHttpRequest:function(){if(window.XMLHttpRequest)return new window.XMLHttpRequest;try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(a){return null}},CallServerSync:function(a,b,d,e){e=e||[];e.unshift(a);a=b.call(qv.services.url,a);d=d.apply(qv.services.postInfo,e);e=qv.services.getXMLHttpRequest();e.open("POST",a,!1);
e.setRequestHeader("Content-Type","application/x-www-form-urlencoded");e.send(d);return e.responseText},createAsyncServerCallFn:function(a,b,d,e,h){return function(n,f){f=f||[];f.unshift(a);var k=function(b){h&&"Card"!=a.RealType&&(b=h.call(qv.util.css,b));n(b,a)};if(gx.lang.gxBoolean(a.IsExternalQuery))k(a.ExternalQueryResultObj()[e]);else{var s=b.call(qv.services.url,a),q=d.apply(qv.services.postInfo,f),p=qv.services.getXMLHttpRequest(),o=function(){p.readyState==STATE_DONE&&p.status==STATUS_OK&&
k(p.responseText)};gx.util.browser.isIE()?p.onreadystatechange=o:p.onload=o;p.open("POST",s);p.setRequestHeader("Content-Type","application/x-www-form-urlencoded");p.send(q)}}},parseRecordsetCacheKeyXML:function(a){""!=a.xml.recordsetCacheKey&&(a.RecordsetCache=a.RecordsetCache||{},a.RecordsetCache.OldKey=a.RecordsetCache.ActualKey?a.RecordsetCache.ActualKey:"",a.RecordsetCache.ActualKey=a.xml.recordsetCacheKey)},parseDataXML:function(a){if(""!=a.xml.data){var b=qv.util.dom.xmlDocument(a.xml.data),
b=qv.util.dom.getSingleElementByTagName(b,"Recordset");a.Data=a.Data||{};b=gx.util.browser.isIE()?qv.util.dom.getMultipleElementsByTagName(qv.util.dom.getSingleElementByTagName(b,"Page"),"Record"):qv.util.dom.getMultipleElementsByTagName(b,"Record");a.Data.Rows=[];for(var d=0;d<b.length;d++){for(var e={},h=0;h<b[d].childNodes.length;h++){var n=b[d].childNodes[h];1==n.nodeType&&(e[n.nodeName]=1==n.childNodes.length?n.childNodes[0].nodeValue:"")}a.Data.Rows.push(e)}}},parseMetadataXML:function(a){function b(a,
c){if("greaterequal"==a&&"lessequal"==c)return"IN";switch(a){case "equal":return"EQ";case "less":return"LT";case "greater":return"GT";case "lessequal":return"LE";case "greaterequal":return"GE";case "notequal":return"NE"}}function d(a){switch(a){case "rows":return"Rows";case "columns":return"Columns";case "filters":return"Pages";case "data":return"Data";case "hidden":return"Hidden";default:return""}}function e(a,b,c,d){var f={},a=qv.util.dom.getSingleElementByTagName(a,b);if(null!=a){f.GroupFound=
!0;f.TotalValueFound=!1;c=qv.util.dom.getMultipleElementsByTagName(a,c);f.Values=[];for(a=0;a<c.length;a++)b=null!=c[a].firstChild?c[a].firstChild.nodeValue:"","TOTAL"==b&&d?f.TotalValueFound=!0:f.Values.push(b)}else f.GroupFound=!1;return f}function h(a){if(0==a.indexOf("gxpl_cssReplace("))var b=a.indexOf("gxpl_cssReplace("),c=a.indexOf(")",b),a=a.substring(b+16,c);return a}function n(a){for(var a=qv.util.dom.getSingleElementByTagName(a,"formatValues"),a=null!=a?qv.util.dom.getMultipleElementsByTagName(a,
"value"):[],b=[],c=0;c<a.length;c++){var d={};d.Value=qv.util.trim(null!=a[c].firstChild?a[c].firstChild.nodeValue:"");d.StyleOrClass=h(a[c].getAttribute("format"));d.ApplyToRowOrColumn="yes"==a[c].getAttribute("recursive");b.push(d)}return b}function f(a){for(var a=qv.util.dom.getSingleElementByTagName(a,"conditionalFormats"),a=null!=a?qv.util.dom.getMultipleElementsByTagName(a,"rule"):[],c=[],d=0;d<a.length;d++){var f={};f.Operator=b(a[d].getAttribute("op1"),a[d].getAttribute("op2"));f.Value1=parseFloat(a[d].getAttribute("value1"));
"IN"==f.Operator&&(f.Value2=parseFloat(a[d].getAttribute("value2")));f.StyleOrClass=h(a[d].getAttribute("format"));c.push(f)}return c}if(""!=a.xml.metadata){var k=qv.util.dom.xmlDocument(a.xml.metadata),s=qv.util.dom.getSingleElementByTagName(k,"OLAPCube");a.Metadata=a.Metadata||{};a.Metadata.TextForNullValues=s.getAttribute("textForNullValues");var q=qv.util.dom.getMultipleElementsByTagName(s,"OLAPDimension");a.Metadata.Axes=[];for(k=0;k<q.length;k++){var p={};p.Name=q[k].getAttribute("name");p.Title=
q[k].getAttribute("displayName");p.DataField=q[k].getAttribute("dataField");p.DataType=q[k].getAttribute("dataType");var o=q[k].getAttribute("validPositions");p.Visible=""!=o;p.AxisType=d(q[k].getAttribute("defaultPosition"));p.Picture=q[k].getAttribute("picture");if(""==p.Picture)switch(p.DataType){case "integer":p.Picture="ZZZZZZZZZZZZZZ9";break;case "real":p.Picture="ZZZZZZZZZZZZZZ9.99";break;case "date":p.Picture="99/99/9999";break;case "datetime":p.Picture="99/99/9999 99:99:99";break;case "guid":p.Picture=
"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"}p.CanDragToPages=0<=o.indexOf("filters");p.RaiseItemClick=qv.util.dom.getBooleanAttribute(q[k],"raiseItemClick",!0);p.IsComponent=qv.util.dom.getBooleanAttribute(q[k],"isComponent",!1);p.Style=q[k].getAttribute("format");var w=e(q[k],"include","value",!0),t=e(q[k],"exclude","value",!0),F=e(q[k],"expand","value",!1),o=e(q[k],"customOrder","Value",!1);p.Subtotals="no"==q[k].getAttribute("summarize")?"No":t.GroupFound&&t.TotalValueFound?"Hidden":"Yes";p.Filter=
{};!w.GroupFound&&!t.GroupFound?(p.Filter.Type="ShowAllValues",p.Filter.Values=[]):!w.GroupFound&&t.GroupFound&&0==t.Values.length&t.TotalValueFound?(p.Filter.Type="ShowAllValues",p.Filter.Values=[]):w.GroupFound&&!t.GroupFound&&0==w.Values.length?(p.Filter.Type="HideAllValues",p.Filter.Values=[]):(p.Filter.Type="ShowSomeValues",p.Filter.Values=w.Values);p.ExpandCollapse={};F.GroupFound?F.GroupFound&&0==F.Values.length?(p.ExpandCollapse.Type="CollapseAllValues",p.ExpandCollapse.Values=[]):(p.ExpandCollapse.Type=
"ExpandSomeValues",p.ExpandCollapse.Values=F.Values):(p.ExpandCollapse.Type="ExpandAllValues",p.ExpandCollapse.Values=[]);p.Order={};w=q[k].getAttribute("order");null==w?(p.Order.Type="None",p.Order.Values=[]):(p.Order.Type=qv.util.capitalize(w),p.Order.Values="Custom"==p.Order.Type?o.Values:[]);p.ValuesStyles=n(q[k]);a.Metadata.Axes.push(p)}s=qv.util.dom.getMultipleElementsByTagName(s,"OLAPMeasure");a.Metadata.Data=[];for(k=0;k<s.length;k++)q={},q.Name=s[k].getAttribute("name"),q.Title=s[k].getAttribute("displayName"),
q.DataField=s[k].getAttribute("dataField"),q.Aggregation=s[k].getAttribute("aggregation"),q.DataType=s[k].getAttribute("dataType"),q.Visible=""!=s[k].getAttribute("validPositions"),q.AxisType=d(s[k].getAttribute("defaultPosition")),q.Picture=s[k].getAttribute("picture"),q.RaiseItemClick=qv.util.dom.getBooleanAttribute(s[k],"raiseItemClick",!0),q.IsComponent=qv.util.dom.getBooleanAttribute(s[k],"isComponent",!1),""==q.Picture&&(q.Picture="integer"==q.DataType?"ZZZZZZZZZZZZZZ9":"ZZZZZZZZZZZZZZ9.99"),
q.Aggregation=qv.util.capitalize(q.Aggregation),q.TargetValue=parseFloat(s[k].getAttribute("targetValue")),q.MaximumValue=parseFloat(s[k].getAttribute("maximumValue")),q.Style=s[k].getAttribute("format"),0>=q.TargetValue&&(q.TargetValue=100),0>=q.MaximumValue&&(q.MaximumValue=100),q.ConditionalStyles=f(s[k]),a.Metadata.Data.push(q)}},GetDataIfNeeded:function(a,b){a.Data=a.Data||{};a.Data.LastServiceCallKey=a.Data.LastServiceCallKey||{};e(a,a.Data.LastServiceCallKey)||gx.lang.gxBoolean(a.IsExternalQuery)?
a.calculatePivottableData(b):b(a.xml.data,a)},GetMetadataIfNeeded:function(a,b){a.Metadata=a.Metadata||{};a.Metadata.LastServiceCallKey=a.Metadata.LastServiceCallKey||{};d(a,a.Metadata.LastServiceCallKey)||gx.lang.gxBoolean(a.IsExternalQuery)?a.calculatePivottableMetadata(b):b(a.xml.metadata,a)},GetDashboardSpecIfNeeded:function(b,d){b.DashboardSpec=b.DashboardSpec||"";b.LastServiceCallKey=b.LastServiceCallKey||{};var e;e=b.LastServiceCallKey;if(b.Object){var g=a(b.Object);g!=e.ObjectName?(e.ObjectName=
g,e=!0):e=!1}else e=!1;e?b.GetDashboardSpec(d):d(b.DashboardSpec,b)},GetRecordsetCacheKeyIfNeeded:function(a,b){a.UseRecordsetCache&&!gx.lang.gxBoolean(a.IsExternalQuery)?(a.RecordsetCache=a.RecordsetCache||{},a.RecordsetCache.LastServiceCallKey=a.RecordsetCache.LastServiceCallKey||{},e(a,a.RecordsetCache.LastServiceCallKey)?a.getRecordsetCacheKey(b):b(a.xml.recordsetCacheKey,a)):b("",a)},IsObjectSet:function(a){return a.Object||""!=a.ObjectName||""!=a.ObjectType&&0!=a.ObjectId}}}();
qv.pivot=function(){function a(a){var c=qv.util.GetContainerControlClasses(a);""!=c&&qv.util.SetUserControlClass(a,c);c=a.userControlId()+"_"+a.ObjectName.replace(/,/g,"").replace(/\./g,"")+"_pivot_page";a.pivotParams={};a.pivotParams.page=c;var d=a.userControlId()+"_"+a.ObjectName.replace(/,/g,"").replace(/\./g,"")+"_pivot_content";a.pivotParams.content=d;if(a._ControlRenderedTo!=a.RealType||0==jQuery("#"+d).length)if(a._ControlRenderedTo!=a.RealType&&"PivotTable"==a.RealType){var e=qv.util.dom.getEmptyContainer(a);
qv.util.dom.createDiv(e,c,"","",{},"");qv.util.dom.createDiv(e,d,"","",{},"")}else jQuery("#"+a.ContainerName).find(".pivot_filter_div").attr("id",c),jQuery("#"+a.ContainerName).find(".conteiner_table_div").attr("id",d);a.pivotParams.container=a.getContainerControl();a.pivotParams.RealType=a.RealType;a.pivotParams.ObjectName=a.ObjectName;a.pivotParams.ControlName=a.ControlName;a.pivotParams.PageSize=a.Paging&&"false"!=a.Paging?a.PageSize:void 0;a.pivotParams.metadata=a.xml.metadata;c=gx.lang.gxBoolean(a.IsExternalQuery)?
a.xml.data:"Table"==a.RealType?a.ServerPagingForTable?a.xml.pageData:a.xml.data:a.ServerPagingForPivotTable?a.xml.pageData:a.xml.data;a.pivotParams.data=c;a.pivotParams.UcId=a.userControlId();a.pivotParams.AutoResize=gx.lang.gxBoolean(a.AutoResize)||gx.lang.gxBoolean(a.ShrinkToFit);a.pivotParams.DisableColumnSort=a.DisableColumnSort;a.pivotParams.RememberLayout=a.RememberLayout;a.pivotParams.ShowDataLabelsIn=a.ShowDataLabelsIn;a.pivotParams.ServerPaging=a.ServerPagingForTable&&!gx.lang.gxBoolean(a.IsExternalQuery);
a.pivotParams.ServerPagingPivot=a.ServerPagingForPivotTable&&!gx.lang.gxBoolean(a.IsExternalQuery);a.pivotParams.ServerPagingCacheSize=0;a.pivotParams.UseRecordsetCache=a.UseRecordsetCache&&!gx.lang.gxBoolean(a.IsExternalQuery);a.pivotParams.AllowSelection=a.AllowSelection;a.pivotParams.SelectLine=!0;void 0!=OAT.Loader?renderJSPivot(a.pivotParams,qv.collection,a):OAT.Loader.addListener(function(){renderJSPivot(a.pivotParams,qv.collection,a)});a._ControlRenderedTo=a.RealType;"Table"==a.RealType&&qv.util.hideActivityIndicator(a)}
function d(b){b.getPageDataForTable(function(b,d){(new Date).getTime();qv.util.anyError(b)?(errMsg=qv.util.getErrorFromText(b),qv.util.renderError(d,errMsg)):(""!=b&&(d.xml.pageData=b),a(d))},[1,b.PageSize,!0,"","",[]])}function e(a,c){var d=[];if(null!=a)for(var e=-1,g=0;g<a.childNodes.length;g++)if("ITEM"==a.childNodes[g].nodeName){var h=a.childNodes[g].getAttribute("name");if(0>c.indexOf(h)){e++;d[e]={};d[e].Name=h;d[e].Values=[];for(var h=-1,n=a.childNodes[g],f=0;f<a.childNodes[g].childNodes.length;f++)if("VALUES"==
a.childNodes[g].childNodes[f].nodeName){n=a.childNodes[g].childNodes[f];break}for(f=0;f<n.childNodes.length;f++)"VALUE"==n.childNodes[f].nodeName&&(h++,d[e].Values[h]=null!=n.childNodes[f].firstChild?n.childNodes[f].firstChild.nodeValue:"")}}return d}return{tryToRenderPivotTable:function(b){var c="",e=(new Date).getTime();b.xml=b.xml||{};qv.services.GetRecordsetCacheKeyIfNeeded(b,function(b,g){var h=!1;b!=g.xml.recordsetCacheKey&&(g.xml.recordsetCacheKey=b,h=!0);qv.util.anyError(b)?(c=qv.util.getErrorFromText(b),
qv.util.renderError(g,c)):(h&&qv.services.parseRecordsetCacheKeyXML(g),qv.services.GetMetadataIfNeeded(g,function(b,f){var g=false;if(b!=f.xml.metadata){f.xml.metadata=b;g=true}var h=(new Date).getTime();if(qv.util.anyError(b)){c=qv.util.getErrorFromText(b);qv.util.renderError(f,c)}else{g&&qv.services.parseMetadataXML(f);if(f.ServerPagingForTable&&f.RealType=="Table"&&!gx.lang.gxBoolean(f.IsExternalQuery)){g=false;OAT.getStateWhenServingPaging&&(g=OAT.getStateWhenServingPaging(f.userControlId()+"_"+
f.ObjectName,f.ObjectName));!g||!f.RememberLayout?d(f,e,h):a(f)}else if(f.ServerPagingForPivotTable&&f.RealType=="PivotTable"&&!gx.lang.gxBoolean(f.IsExternalQuery)){g=false;OAT.getStateWhenServingPaging&&(g=OAT.getStateWhenServingPaging(f.userControlId()+"_"+f.ObjectName,f.ObjectName));a(f)}else qv.services.GetDataIfNeeded(f,function(b,d){if(b!=d.xml.data)d.xml.data=b;(new Date).getTime();if(qv.util.anyError(b)){c=qv.util.getErrorFromText(b);qv.util.renderError(d,c)}else a(d)})}}))})},GetMetadataPivot:function(a){var c=
qv.util.GetDesigntimeMetadata(a);if(0<c.length){for(var d=a.oat_element.getMetadataXML(),a=qv.pivot.GetRuntimeMetadata(d,a.RealType),d=[],e=qv.util.GetOrderedAxesKeys(a),g=0;g<e.length;g++)for(var h=parseInt(e[g].substr(5,4)),h=a[h],n,f=0;f<c.length;f++)if(n=c[f],n.Name==h.Name){n=qv.util.cloneObject(n);qv.util.MergeFields(n,h);d.push(n);break}return d}return[]},GetRuntimeMetadata:function(a,c){function d(a,b,c,f,e){var b=qv.util.dom.getValueNode(qv.util.dom.getSingleElementByTagName(a,b)),g=[];if(b==
f&&(a=qv.util.dom.getSingleElementByTagName(a,c),null!=a)){a=qv.util.dom.getMultipleElementsByTagName(a,"value");for(c=0;c<a.length;c++)f=qv.util.trim(qv.util.dom.getValueNode(a[c])),null!=f&&("TOTAL"!=f.toUpperCase()||!e)&&g.push(f)}return{Type:b,Values:g}}function e(a,b,c,d){return a?"true"==b?"Hidden":!c?"Data":"rows"==d?"Row":"columns"==d?"Column":"pages"==d?"Page":"":""}for(var g=qv.util.dom.xmlDocument(a),h=qv.util.dom.getSingleElementByTagName(g,"OLAPCube"),g=[],n=qv.util.dom.getMultipleElementsByTagName(h,
"OLAPDimension"),f=0;f<n.length;f++){var k={},s=qv.util.dom.getValueNode(qv.util.dom.getSingleElementByTagName(n[f],"name")),q=qv.util.dom.getValueNode(qv.util.dom.getSingleElementByTagName(n[f],"hidden")),p=null!=qv.util.dom.getValueNode(qv.util.dom.getSingleElementByTagName(n[f],"validPositions")),o=qv.util.dom.getValueNode(qv.util.dom.getSingleElementByTagName(n[f],"defaultPosition"));null==o&&(o="");var w=qv.util.dom.getValueNode(qv.util.dom.getSingleElementByTagName(n[f],"axisOrder")),t=qv.util.dom.getValueNode(qv.util.dom.getSingleElementByTagName(n[f],
"summarize")),F=qv.util.dom.getValueNode(qv.util.dom.getSingleElementByTagName(n[f],"order"));k.Name=s;k.AxisType=e(p,q,!0,o);k.AxisPosition=w;k.Order=qv.util.capitalize(F);"Table"==c?(k.Filter=d(n[f],"","include",null,!0),k.Filter.Type="ShowSomeValues"):(k.Subtotals="no"==t?"No":"Yes",k.Filter=d(n[f],"filterType","include","ShowSomeValues",!0),k.ExpandCollapse=d(n[f],"collapseType","includeExpand","ExpandSomeValues",!1));g.push(k)}if("Table"!=c){h=qv.util.dom.getMultipleElementsByTagName(h,"OLAPMeasure");
for(f=0;f<h.length;f++)n={},s=qv.util.dom.getValueNode(qv.util.dom.getSingleElementByTagName(h[f],"name")),q=qv.util.dom.getValueNode(qv.util.dom.getSingleElementByTagName(h[f],"hidden")),w=(f+1).toString(),n.Name=s,n.AxisType=e(!0,q,!1,null),n.AxisPosition=w,g.push(n)}return g},GetDataPivot:function(a){return a.oat_element.getDataXML()},GetFilteredDataPivot:function(a){return a.oat_element.getFilteredDataXML()},onOAT_PIVOTDragAndDropEvent:function(a,c){var d;"PivotTable"==a.RealType&&(IsQueryObjectPreview()&&
window.external.SendText(a.ControlName,c),a.DragAndDrop&&(d=qv.util.dom.xmlDocument(c),d=qv.util.dom.selectXPathNode(d,"/DATA"),a.DragAndDropData.Name=d.getAttribute("name"),d=d.getAttribute("position"),a.DragAndDropData.Axis="rows"==d?"Row":"columns"==d?"Column":"Page",a.DragAndDrop()))},onItemClickEvent:function(a,c,d){var r,g;if(a.ItemClick&&!d||a.ItemDoubleClick&&d){g=d?g=a.ItemDoubleClickData:a.ItemClickData;var h=qv.util.dom.xmlDocument(c),n=qv.util.dom.selectXPathNode(h,"/DATA/ITEM"),c=qv.util.dom.selectXPathNode(h,
"/DATA/CONTEXT/RELATED"),h=qv.util.dom.selectXPathNode(h,"/DATA/CONTEXT/FILTERS");g.Name=n.getAttribute("name");r=n.getAttribute("location");g.Axis="rows"==r?"Row":"columns"==r?"Column":"pages"==r?"Page":"Data";g.Value=null!=n.firstChild?n.firstChild.nodeValue:"";g.Selected="true"==n.getAttribute("selected");n=[];for(r=0;r<a.Metadata.Axes.length;r++)a.Metadata.Axes[r].IsComponent&&n.push(a.Metadata.Axes[r].Name);for(r=0;r<a.Metadata.Data.length;r++)a.Metadata.Data[r].IsComponent&&n.push(a.Metadata.Data[r].Name);
g.Context=e(c,n);g.Filters=e(h,n);d?a.ItemDoubleClick():a.ItemClick()}},onItemExpandCollapseEvent:function(a,c,d){var e;IsQueryObjectPreview()&&window.external.SendText(a.ControlName,c);if(a.ItemExpand&&!d||a.ItemCollapse&&d){e=d?e=a.ItemCollapseData:a.ItemExpandData;var c=qv.util.dom.xmlDocument(c),g=qv.util.dom.selectXPathNode(c,"/DATA/ITEM"),c=qv.util.dom.selectXPathNode(c,"/DATA/CONTEXT/EXPANDEDVALUES");e.Name=g.getAttribute("name");e.Value=g.firstChild.nodeValue;e.ExpandedValues=[];for(var g=
-1,h=0;h<c.childNodes.length;h++)"VALUE"==c.childNodes[h].nodeName&&(g++,e.ExpandedValues[g]=c.childNodes[h].firstChild.nodeValue);d?a.ItemCollapse():a.ItemExpand()}},Select:function(a,d){a.oat_element.selectValue(d)},Deselect:function(a){a.oat_element.deselectValue()}}}();var HCChart,_highChartsDrawPointsWrapped,HIGHCHARTS_COLOR_PREFIX="highcharts-color-",HIGHCHARTS_MAX_COLORS=36,HIGHCHARTS_CUSTOM_COLOR=[],DEFAULTCHARTSPACING=10;
qv.chart=function(){function a(a){return"Timeline"==a.RealChartType||"SmoothTimeline"==a.RealChartType||"StepTimeline"==a.RealChartType}function d(d){return a(d)||"Sparkline"==d.RealChartType}function e(a){return"Pie"==a.RealChartType||"Pie3D"==a.RealChartType||"Doughnut"==a.RealChartType||"Doughnut3D"==a.RealChartType}function b(a){return"Radar"==a.RealChartType||"FilledRadar"==a.RealChartType||"PolarArea"==a.RealChartType}function c(a){return e(a)||"Funnel"==a.RealChartType||"Pyramid"==a.RealChartType}
function v(a){return("ColumnLine"==a.RealChartType||"Column3DLine"==a.RealChartType)&&1<a.Chart.Series.DataFields.length}function r(a){return"CircularGauge"==a.RealChartType||"LinearGauge"==a.RealChartType}function g(a){return"StackedColumn"==a.RealChartType||"StackedColumn3D"==a.RealChartType||"StackedColumn100"==a.RealChartType||"StackedBar"==a.RealChartType||"StackedBar100"==a.RealChartType||"StackedArea"==a.RealChartType||"StackedArea100"==a.RealChartType||"StackedLine"==a.RealChartType||"StackedLine100"==
a.RealChartType?!1:("InSeparateCharts"==a.PlotSeries||c(a))&&1<a.Chart.Series.DataFields.length}function h(a,d){for(var c=[],b=0;b<a.Charts.length;b++)for(var f=0;f<a.Charts[b].series.length;f++)c.push(a.Charts[b].series[f].data[d]);return c}function n(a,d,c,b,f){for(var D=0;D<a.Charts.length;D++)if(d.id!=a.Charts[D].container.id)for(var e=0;e<a.Charts[D].series.length;e++){var g=a.Charts[D].series[e].data[c];b?(f&&g.setState("hover"),a.Charts[D].tooltip.hide(0)):g.setState()}}function f(a){switch(a){case "Column":case "Column3D":case "StackedColumn":case "StackedColumn3D":case "StackedColumn100":case "PolarArea":return"column";
case "Bar":case "StackedBar":case "StackedBar100":case "LinearGauge":return"bar";case "Area":case "StackedArea":case "StackedArea100":case "FilledRadar":case "StepArea":return"area";case "SmoothArea":return"areaspline";case "Line":case "StackedLine":case "StackedLine100":case "Radar":case "Timeline":case "StepTimeline":case "Sparkline":case "StepLine":return"line";case "SmoothLine":case "SmoothTimeline":return"spline";case "ColumnLine":case "Column3DLine":return"column";case "Pie":case "Pie3D":case "Doughnut":case "Doughnut3D":return"pie";
case "Funnel":return"funnel";case "Pyramid":return"pyramid";case "CircularGauge":return"solidgauge";default:return"line"}}function k(a,d,c,b,f,D,e){function g(a,d){var c={};c.Name=a.Name;var b=y(a.DataType,a.Picture),b=C(d,a.Picture,a.DataType,b);c.Values=[b];return c}a.Name=c;a.Axis=b;a.Value=f;a.Selected=D;a.Context=[];for(c=0;c<d.Metadata.Axes.length;c++)b=d.Metadata.Axes[c],b.IsComponent||(b=g(b,e[b.DataField]),a.Context.push(b));for(c=0;c<d.Metadata.Data.length;c++)b=d.Metadata.Data[c],b.IsComponent||
(b=g(b,e[b.DataField]),a.Context.push(b));a.Filters=[]}function s(a,d){for(var c=!1,b=0;b<a.length;b++)for(var f=a[b],D=0;D<f.series.length;D++){var e=f.series[D].points[d];if(e.selected){e.select();break}else e.select(!0,0<D),c=!0}return c}function q(a){for(var c=0;c<a.length;c++){var d=a[c].getSelectedPoints();0<d.length&&d[0].select(!1,!1)}}function p(a){var c=qv.collection[this.chart.options.qv.viewerId],d=!1;if(c.SelectionAllowed())if("Point"==c.SelectionType){if(a.point.select(),d=a.point.selected,
"InSeparateCharts"==c.PlotSeries&&d)for(var b=0;b<c.Charts.length;b++){var f=c.Charts[b].series[0].points[a.point.index];f!=a.point&&f.select(!1)}}else d=s(c.Charts,a.point.index);c.ItemClick&&c.Metadata.Data[a.point.series.index].RaiseItemClick&&(b=c.Chart.Series.ByName[this.name],f=qv.util.formatNumber(a.point.y,b.NumberFormat.DecimalPrecision,b.Picture,!1),k(c.ItemClickData,c,b.FieldName,"Data",f,d,c.Data.Rows[a.point.index]),c.ItemClick())}function o(a,c){return""==c?qv.util.dom.createSpan(null,
"","","",{fontWeight:"bold"},null,a).outerHTML:qv.util.dom.createSpan(null,"","","",{fontWeight:"bold",color:c},null,a).outerHTML}function w(a,c){var d=Math.min(c.getContainerControl().offsetHeight,c.getContainerControl().offsetWidth)/(g(c)?c.Chart.Series.DataFields.length:1)/13;return qv.util.dom.createSpan(null,"","","",{color:K(c,a),fontSize:d+"px"},null,qv.util.formatNumber(a.point.y,2,"ZZZZZZZZZZZZZZ9.99",!0)+"%").outerHTML}function t(a,c){function d(a){for(var c=a.y,b=a.series.data,a=a.index,
l="",l=a,f=a+1;f<b.length&&b[f].y==c;f++)l=f;l<b.length-1&&l++;for(var e=a,f=a-1;0<=f&&b[f].y==c;f--)e=f;c=(b[l].x-b[e].x)/1E3;return l=" ("+gx.getMessage("GXPL_QViewerDuration")+": "+qv.util.seconsdToText(c)+")"}var b,f=qv.collection[a.points[0].series.chart.options.qv.viewerId];g(f)?b=h(f,a.points[0].point.index):(b=[],$.each(a.points,function(a,c){b.push(c.point)}));for(var e={},aa=!1,k=0;k<b.length;k++){var H=b[k].series.name;void 0==e[H]&&(e[H]=[]);e[H].push(b[k]);1<e[H].length&&(aa=!0)}var k=
"",S,B;for(B in e){var H=c[B],m=e[B],P=K(f,m[0]);aa&&(k+=qv.util.dom.createSpan(null,"","","",{fontWeight:"bold",color:P},null,B).outerHTML+"<br/>");for(var J=0;void 0!=m[J];J++){var U=m[J],na=parseInt(U.real_x?U.real_x:U.x);if(0<b.length&&b[0].series.chart.options.qv.comparing)k+=U.name+": "+qv.util.formatNumber(U.y,H.NumberFormat.DecimalPrecision,H.Picture,!1)+"<br/>";else{S!=na&&(k+=U.name+"<br/>",S=na);var na="StepTimeline"==f.RealChartType?d(U):"",p=qv.util.dom.createSpan(null,"","","",{color:P},
null,B+": ").outerHTML,U=qv.util.dom.createSpan(null,"","","",{fontWeight:"bold"},null,qv.util.formatNumber(U.y,H.NumberFormat.DecimalPrecision,H.Picture,!1)).outerHTML,k=k+(p+U+na+"<br/>")}}}return k}function F(a){"undefined"===typeof _avoidSelectionEventHandler&&(_avoidSelectionEventHandler=!1);if(!_avoidSelectionEventHandler){L(fa,"none");fa=null;if(a.xAxis){var c=a.target.options.qv,b=a.xAxis[0];sa(a.target.options.qv.viewerId,100*((b.min-c.dataMin)/(c.dataMax-c.dataMin)),100*((b.max-c.dataMin)/
(c.dataMax-c.dataMin)))}else sa(a.target.options.qv.viewerId,0,100);c=qv.collection[a.target.options.qv.viewerId];if(g(c)){var c=c.getContainerControl().id,c=$("[id^="+c+"_chart]"),d=[];$.each(c,function(c,b){if(b.id!=a.target.renderTo.id){var f=$("#"+b.id).highcharts();d.push(f)}});$.each(d,function(c,d){a.xAxis?d.get("xaxis").setExtremes(b.min,b.max):(_avoidSelectionEventHandler=!0,d.zoomOut(),_avoidSelectionEventHandler=!1)})}}}function A(a,c,b,d,f){function e(a,c,b,d,l){function f(a,c){return"date"==
a?10==c.length:" "==c.charAt(10)}function D(a,c,b,d,l){var f=a.substr(0,4),e=a.substr(5,2),a=a.substr(8,2);d||(c=c.replace("M",""));l||(c=c.replace("D",""));for(var g="",B=0;B<c.length;B++)g+=0==B?"":"/",g+=c.charAt(B);c=g.replace("Y",b?f:f.substr(2,2));d&&(c=c.replace("M",e));l&&(c=c.replace("D",a));return c}var g,B;if(""!=a)switch(l||("date"==b?"Days":"Seconds")){case "Years":g=a.substr(0,4)+"-01-01";B=D(g,d,f(b,c),!1,!1);break;case "Months":g=a.substr(0,7)+"-01";B=D(g,d,f(b,c),!0,!1);break;case "Semesters":g=
"06">=a.substr(5,2)?"01":"07";g=a.substr(0,5)+g+"-01";l="06">=a.substr(5,2)?"01":"02";dateStrSemester=a.substr(0,5)+l+"-01";B=D(dateStrSemester,d,f(b,c),!0,!1);break;case "Quarters":g="03">=a.substr(5,2)?"01":"06">=a.substr(5,2)?"04":"09">=a.substr(5,2)?"07":"10";g=a.substr(0,5)+g+"-01";l="03">=a.substr(5,2)?"01":"06">=a.substr(5,2)?"02":"09">=a.substr(5,2)?"03":"04";dateStrQuarter=a.substr(0,5)+l+"-01";B=D(dateStrQuarter,d,f(b,c),!0,!1);break;case "Weeks":a=new gx.date.gxdate(a,"Y4MD");g=gx.date.dow(a);
a=gx.date.dtadd(a,-86400*(g-1));g=qv.util.dateToString(a,!1);B=D(g,d,f(b,c),!0,!0);break;case "Days":g="date"==b?a:a.substr(0,10);B="date"==b?c:c.substr(0,10);break;case "Hours":g=a.substr(0,13)+":00:00";B=c.substr(0,13)+":00";break;case "Minutes":g=a.substr(0,16)+":00";B=c.substr(0,16);break;case "Seconds":g=a,B=c}else B=g="";return{dateStr:g,name:B}}var g;g={dateStr:null,name:null};var k=[],H=[],S=[];for(i=0;i<c.length;i++){var B=a.Values[i].ValueWithPicture,m=a.Values[i].Value,P,J;null!=c[i].Value?
"Count"==d?(P=0,J=parseFloat(qv.util.trim(c[i].Value))):"Average"==d?(P=parseFloat(qv.util.trim(c[i].Value_N)),J=parseFloat(qv.util.trim(c[i].Value_D))):(P=parseFloat(qv.util.trim(c[i].Value)),J=1):(P=null,J=0);B=e(m,B,b,gx.dateFormat,f);B.dateStr==g.dateStr||0==i?(null!=P&&(k.push(P),H.push(J)),0==i&&(g=B)):(g={x:g.dateStr,y:qv.util.aggregate(d,k,H),name:g.name},S.push(g),g=B,k=[P],H=[J])}0<k.length&&0<H.length&&(g={x:g.dateStr,y:qv.util.aggregate(d,k,H),name:g.name},S.push(g));return S}function I(a){var c=
[],b=[],d="";for(i=0;i<a.Points.length;i++){var f,e;"Count"==a.Aggregation?(f=0,e=parseFloat(qv.util.trim(a.Points[i].Value))):"Average"==a.Aggregation?(f=parseFloat(qv.util.trim(a.Points[i].Value_N)),e=parseFloat(qv.util.trim(a.Points[i].Value_D))):(f=parseFloat(qv.util.trim(a.Points[i].Value)),e=1);c.push(f);b.push(e);""==d&&(d=a.Points[i].Color)}c=qv.util.aggregate(a.Aggregation,c,b).toString();a.Points=[{Value:c,Value_N:c,Value_D:"1",Color:d}];a.NegativeValues=0>c;a.PositiveValues=0<c}function z(c){var b,
d,f;a(c)?(c=DEFAULTCHARTSPACING,b=0,d=DEFAULTCHARTSPACING,f=0):f=d=b=c=DEFAULTCHARTSPACING;return[c,b,d,f]}function m(a,c){var b,d;b=3>=a?24:50/(a-1)-1;d=100-(b+1)*(c-1);return{Width:b,Center:d,LowerExtreme:d-b/2,UpperExtreme:d+b/2}}function G(a,c){var b=1/a/2,d=-0.5+(c-0.5)/a;return{Width:b,Center:d,LowerExtreme:d-b/2,UpperExtreme:d+b/2}}function C(a,c,b,d){switch(b){case "integer":case "real":return qv.util.formatNumber(a,d.DecimalPrecision,c,!1);case "boolean":case "character":case "guid":return qv.util.trim(a);
case "date":case "datetime":return qv.util.formatDateTime(a,b,d.DateFormat,d.IncludeHours,d.IncludeMinutes,d.IncludeSeconds,d.IncludeMilliseconds)}}function y(a,c){return"integer"==a||"real"==a?qv.util.ParseNumericPicture(a,c):"date"==a||"datetime"==a?qv.util.ParseDateTimePicture(a,c):null}function x(b){function f(a){a.Chart.Categories={};a.Chart.Categories.DataFields=[];for(var c=0;c<a.Metadata.Axes.length;c++){var b=a.Metadata.Axes[c];("Rows"==b.AxisType||"Columns"==b.AxisType)&&a.Chart.Categories.DataFields.push(b.DataField)}a.Chart.Series=
{};a.Chart.Series.DataFields=[];for(c=0;c<a.Metadata.Data.length;c++)a.Chart.Series.DataFields.push(a.Metadata.Data[c].DataField)}function e(a){for(var c={},b=0;b<a.Metadata.Axes.length;b++){var d=a.Metadata.Axes[b],f=y(d.DataType,d.Picture);c[d.DataField]={Picture:d.Picture,DataType:d.DataType,PictureProperties:f,Filter:d.Filter}}return c}function k(b,d){function f(b,d,e){function l(a){for(var b=!1,c=0;c<a.length;c++)if(m(a[c].StyleOrClass,!1)[0]){b=!0;break}return b}c(b)||"PolarArea"==b.RealChartType&&
1==b.Chart.Series.DataFields.length?e=!0:"Area"==b.RealChartType||"StackedArea"==b.RealChartType||"StackedArea100"==b.RealChartType||"SmoothArea"==b.RealChartType||"StepArea"==b.RealChartType||"Line"==b.RealChartType||"StackedLine"==b.RealChartType||"StackedLine100"==b.RealChartType||"SmoothLine"==b.RealChartType||"StepLine"==b.RealChartType||"Sparkline"==b.RealChartType||a(b)||"Radar"==b.RealChartType||"FilledRadar"==b.RealChartType?e=!1:1<b.Chart.Series.DataFields.length&&!g(b)?e=!1:(b=l(d.ConditionalStyles),
d=!1,null!=e&&(d=l(e.ValuesStyles)),e=b||d);return e}for(var e={},l=0;l<b.Metadata.Data.length;l++){var D=b.Metadata.Data[l],B=f(b,D,d);e[D.DataField]={Datum:D,Multicolored:B}}return e}function m(a,b){var c="",d=!1,f=b?"backgroundcolor":"color";if(""!=a){for(var e=a.split(";"),l=0;l<e.length;l++){var D=e[l].split(":");if(2==D.length){var g=D[1];if(D[0].toLowerCase()==f){c=g;d=""!=g;break}}}d&&"#"==c.substr(0,1)&&(c=c.replace("#",""))}return[d,c]}function D(a,c,b,d,f,e,l){function D(a,b){for(var c=
[!1,""],d=0;d<a.ValuesStyles.length;d++){var f=a.ValuesStyles[d];if(f.Value==b){c=m(f.StyleOrClass,!1);break}}return c}function g(a,b){for(var c=[!1,""],d=!1,f=0;f<a.ConditionalStyles.length;f++){var e=a.ConditionalStyles[f];if(d=qv.util.satisfyStyle(b,e)){c=m(e.StyleOrClass,!1);break}}return c}var B,H=-1,k=!1;if(a){if(a=!1,null!=b&&(b=D(b,e),a=b[0],B=b[1]),!a)b=g(c,l),a=b[0],B=b[1],a||(H=f%HIGHCHARTS_MAX_COLORS,k=!0)}else b=m(c.Style,!1),a=b[0],B=b[1],a||(H=d%HIGHCHARTS_MAX_COLORS,k=!0);return{IsDefault:k,
Color:B,ColorIndex:H}}function aa(a,b,c,d){for(var f="",e="",l=0;l<a.Chart.Categories.DataFields.length;l++){var D=a.Chart.Categories.DataFields[l],g;void 0!=b[D]?(g=qv.util.trim(b[D]),D=C(g,d[D].Picture,d[D].DataType,d[D].PictureProperties)):D=g=a.Metadata.TextForNullValues;f+=(""==f?"":", ")+g;e+=(""==e?"":", ")+D}b=[f,e];d={};d.Value=b[0];d.ValueWithPicture=b[1];a.Chart.Categories.Values.push(d);if(0==c)a.Chart.Categories.MinValue=d.Value,a.Chart.Categories.MaxValue=d.Value;else if(d.Value>a.Chart.Categories.MaxValue&&
(a.Chart.Categories.MaxValue=d.Value),d.Value<a.Chart.Categories.MinValue)a.Chart.Categories.MinValue=d.Value}function Da(a,b,c,d,f){for(var e=0;e<a.Chart.Series.DataFields.length;e++){var l=a.Chart.Series.ByIndex[e],g=a.Chart.Series.DataFields[e],B=void 0!=b[g]?b[g]:null,H={};H.Value=B;var k=d[g].Datum,S=d[g].Multicolored;if("Average"==k.Aggregation){var aa=b[g+"_N"],g=b[g+"_D"];void 0==aa&&void 0==g&&(aa=B,g="1");H.Value_N=aa;H.Value_D=g}H.Color=S?D(S,k,f,0,c,a.Chart.Categories.Values[c].Value,
B):ta("");l.Points.push(H);0<H.Value&&(l.PositiveValues=!0);0>H.Value&&(l.NegativeValues=!0)}}function H(a,b){for(var c=0;c<b.ConditionalStyles.length;c++){var d=b.ConditionalStyles[c],f=m(d.StyleOrClass,!0),e=f[1];if(f[0]){plotBand={};plotBand.Color=ta(e);if("IN"==d.Operator)plotBand.From=parseFloat(d.Value1),plotBand.To=parseFloat(d.Value2);else if("EQ"==d.Operator)plotBand.From=parseFloat(d.Value1),plotBand.To=parseFloat(d.Value1);else if("GE"==d.Operator||"GT"==d.Operator)plotBand.From=parseFloat(d.Value1);
else if("LE"==d.Operator||"LT"==d.Operator)plotBand.To=parseFloat(d.Value1);plotBand.SeriesName=""!=b.Title?b.Title:b.Name;a.Chart.PlotBands.push(plotBand)}}}function S(a,b){for(var c=!1,d=0;d<a.Metadata.Axes.length;d++){var f=a.Metadata.Axes[d];if("Rows"==f.AxisType||"Columns"==f.AxisType||"Pages"==f.AxisType)if("HideAllValues"==f.Filter.Type){c=!0;break}else if("ShowSomeValues"==f.Filter.Type){var e=qv.util.trim(b[f.DataField]);if(0>f.Filter.Values.indexOf(e)){c=!0;break}}}return c}if(function(a){return d(a)?
(a=Q(a),"date"==a||"datetime"==a):!0}(b)){b.Chart={};f(b);b.Chart.Categories.MinValue=null;b.Chart.Categories.MaxValue=null;b.Chart.Categories.Values=[];var B=e(b);b.Chart.Series.ByName={};b.Chart.Series.ByIndex=[];var p=1==b.Chart.Categories.DataFields.length?ga(b,b.Chart.Categories.DataFields[0]):null,P=k(b,p);b.Chart.PlotBands=[];for(var J=0;J<b.Chart.Series.DataFields.length;J++){var n=b.Chart.Series.DataFields[J],o=P[n].Datum,h={},n=P[n].Multicolored;h.FieldName=o.Name;h.Name=""!=o.Title?o.Title:
o.Name;h.DataType=o.DataType;h.Aggregation=o.Aggregation;var q=o.Picture;h.Picture=""==q?"integer"==h.DataType?"ZZZZZZZZZZZZZZ9":"ZZZZZZZZZZZZZZ9.99":q;h.NumberFormat=qv.util.ParseNumericPicture(h.DataType,h.Picture);h.Color=n?ta(""):D(n,o,p,J,0,"",0);h.TargetValue=o.TargetValue;h.MaximumValue=o.MaximumValue;u(h);h.PositiveValues=!1;h.NegativeValues=!1;h.Points=[];b.Chart.Series.ByName[h.Name]=h;b.Chart.Series.ByIndex.push(h);H(b,o)}for(J=o=0;J<b.Data.Rows.length;J++)h=b.Data.Rows[J],S(b,h)||(aa(b,
h,o,B),Da(b,h,o,P,p),o++);if(r(b))for(J=0;J<b.Chart.Series.DataFields.length;J++)h=b.Chart.Series.ByIndex[J],I(h);return""}return gx.getMessage("GXPL_QViewerNoDatetimeAxis")}function u(a){0>=a.TargetValue&&(a.TargetValue=100);0>=a.MaximumValue&&(a.MaximumValue=100);a.MaximumValue<a.TargetValue&&(a.MaximumValue=a.TargetValue)}function M(a){a._themeStyleSheet||(a._themeStyleSheet=R(gx.theme+".css"));return a._themeStyleSheet}function R(a){for(var b,c=0;c<document.styleSheets.length;c++)if(null!=document.styleSheets[c].href&&
0<=document.styleSheets[c].href.indexOf(a)){b=document.styleSheets[c];break}return b}function E(a,b,c){for(var d=0,f=0;f<b.cssRules.length;f++){var e=b.cssRules[f];if(e.selectorText&&0==e.selectorText.indexOf(c)){var g=e.selectorText.replace(c,"");a[g]=e.style.fill;d++}if(d==HIGHCHARTS_MAX_COLORS)break}}function K(a,b){var c;c=b.className&&0==b.className.indexOf("highcharts-color-")?parseInt(b.className.replace("highcharts-color-","")):b.colorIndex;if(c<HIGHCHARTS_MAX_COLORS){if(!a._HighchartsDefaultColors){a._HighchartsDefaultColors=
[];var d={},f,e;a._queryViewerStyleSheet||(a._queryViewerStyleSheet=R("QueryViewer.css"));f=a._queryViewerStyleSheet;E(d,f,".highcharts-color-");""!=a.Class&&(f=M(a),e="."+qv.util.GetContainerControlClass(a)+" .highcharts-color-",E(d,f,e));for(f=0;f<HIGHCHARTS_MAX_COLORS;f++)a._HighchartsDefaultColors.push(d[f.toString()])}c=a._HighchartsDefaultColors[c]}else c=HIGHCHARTS_CUSTOM_COLOR[c-HIGHCHARTS_MAX_COLORS],6===c.length&&!isNaN(parseInt(c,16))&&(c="#"+c);return c}function ta(a){return{IsDefault:!1,
Color:a,ColorIndex:"-1"}}function ba(a){return a.IsDefault?0>a.ColorIndex:""==a.Color}function X(a,b,c,d){if(!ba(c)){if(c.IsDefault)a=c.ColorIndex;else{var f=c.Color,c=HIGHCHARTS_CUSTOM_COLOR.indexOf(f);if(0>c){HIGHCHARTS_CUSTOM_COLOR.push(f);var c=HIGHCHARTS_CUSTOM_COLOR.length-1,c=HIGHCHARTS_MAX_COLORS+c,e=6===f.length&&!isNaN(parseInt(f,16))?"#":"",f="."+HIGHCHARTS_COLOR_PREFIX+c+" {fill: "+e+f+"; stroke: "+e+f+";}",a=M(a);a.insertRule(f,a.cssRules.length)}else c=HIGHCHARTS_MAX_COLORS+c;a=c}d?
b.colorIndex=a:b.className=HIGHCHARTS_COLOR_PREFIX+a}}function ya(l,k,q){var u="date"==Q(l)?"Days":"Seconds",s={qv:{}};s.qv.viewerId=l.userControlId();s.chart=function(c,b){var d={styledMode:!0};d.spacing=z(c);if(g(c)){var e=c.userControlId(),e=a(c)?ia(e):e;d.renderTo=document.getElementById(e+"_chart"+b.toString())}else d.renderTo=a(c)?document.getElementById(ia(c.userControlId())):c.getContainerControl();v(c)||(d.type=f(c.RealChartType));"Radar"==c.RealChartType||"FilledRadar"==c.RealChartType||
"PolarArea"==c.RealChartType?d.polar=!0:"Column3D"==c.RealChartType||"StackedColumn3D"==c.RealChartType||"Column3DLine"==c.RealChartType?d.options3d={enabled:!0,alpha:15,beta:15,depth:50,viewDistance:25}:"Pie3D"==c.RealChartType||"Doughnut3D"==c.RealChartType?d.options3d={enabled:!0,alpha:45,beta:0}:a(c)&&(d.zoomType="x",d.resetZoomButton={theme:{display:"none"}},d.events={},d.events.selection=function(a){F(a)});return d}(l,q);s.credits={enabled:!1};s.legend={enabled:1<l.Chart.Series.DataFields.length&&
!g(l)||c(l),margin:0};s.title=""==l.Title?{text:null}:{text:null==q||0==q?l.Title:null};s.subtitle=function(a,b){var d={};if(g(a)&&(c(a)||"CircularGauge"==a.RealChartType))d.text=b.Name,d.floating=!0,d.align="left",d.verticalAlign="middle";return d}(l,k);s.pane=function(a,c){var b={};if("CircularGauge"==a.RealChartType){b.background=[];var d;g(a)&&(d=m(1,1));var f=0,e;for(e in a.Chart.Series.ByName){if(!g(a)||f==c){var l=a.Chart.Series.ByName[e],k={};g(a)||(d=m(a.Chart.Series.DataFields.length,f+
1));k.outerRadius=d.UpperExtreme.toString()+"%";k.innerRadius=d.LowerExtreme.toString()+"%";l=ba(l.Color)?l.Points[0].Color:l.Color;X(a,k,l,!1);k.borderWidth=0;b.background.push(k)}f++}}return b}(l,q);s.xAxis=function(a,c){xAxis={};if("CircularGauge"!=a.RealChartType){var f=d(a);if("Radar"!=a.RealChartType&&"FilledRadar"!=a.RealChartType&&"PolarArea"!=a.RealChartType&&"LinearGauge"!=a.RealChartType&&"Sparkline"!=a.RealChartType){var e=xAxis,l="";if(""==a.XAxisTitle)for(var B=0;B<a.Metadata.Axes.length;B++){var k=
a.Metadata.Axes[B];if("Rows"==k.AxisType||"Columns"==k.AxisType)l+=(""==l?"":", ")+gx.getMessage(k.Title)}else l=gx.getMessage(a.XAxisTitle);e.title={text:l}}else{"Sparkline"==a.RealChartType&&g(a)&&(xAxis.title={text:a.Chart.Series.ByIndex[c].Name});xAxis.lineWidth=0;if("LinearGauge"==a.RealChartType||"Sparkline"==a.RealChartType)xAxis.tickPositions=[];xAxis.tickmarkPlacement="Radar"==a.RealChartType||"FilledRadar"==a.RealChartType?"on":"between"}if("LinearGauge"==a.RealChartType){var e=0,h;g(a)&&
(h=G(1,1));xAxis.plotBands=[];for(var m in a.Chart.Series.ByName){if(!g(a)||e==c)l=a.Chart.Series.ByName[m],g(a)||(h=G(a.Chart.Series.DataFields.length,e+1)),plotBand={},l=ba(l.Color)?l.Points[0].Color:l.Color,X(a,plotBand,l,!1),plotBand.from=h.LowerExtreme,plotBand.to=h.UpperExtreme,xAxis.plotBands.push(plotBand);e++}}f||(xAxis.categories=[]);h=!1;for(e=0;e<a.Chart.Categories.Values.length;e++)""!=a.Chart.Categories.Values[e].ValueWithPicture&&(h=!0),f||(xAxis.categories[e]=a.Chart.Categories.Values[e].ValueWithPicture);
if(f)xAxis.type="datetime",xAxis.id="xaxis",xAxis.minRange=1,"date"==Q(a)&&(null!=a.Chart.Categories.MaxValue&&null!=a.Chart.Categories.MinValue)&&(f=new gx.date.gxdate(a.Chart.Categories.MinValue,"Y4MD"),864E6>(new gx.date.gxdate(a.Chart.Categories.MaxValue,"Y4MD")).Value.getTime()-f.Value.getTime()&&(xAxis.tickInterval=864E5));else if(xAxis.labels={},xAxis.labels.enabled=h,"Horizontally"!=a.XAxisLabels&&!("Bar"==a.RealChartType||"StackedBar"==a.RealChartType||"StackedBar100"==a.RealChartType)&&
!b(a))"Vertically"==a.XAxisLabels?(f=90,h=5):(f=parseInt(a.XAxisLabels.replace("Rotated","")),h=10),xAxis.labels.rotation=360-f,xAxis.labels.y=h,xAxis.labels.align="right";b(a)?xAxis.className="highcharts-no-axis-line highcharts-yes-grid-line":"Sparkline"==a.RealChartType&&(xAxis.className="highcharts-no-axis-line highcharts-no-grid-line")}return xAxis}(l,q);s.yAxis=function(a,c){function b(a){if(0==a.length)return!1;for(var c,d=0;d<a.length;d++)if(0==d)c=a[d].Picture;else if(a[d].Picture!=c)return!1;
return!0}if("Sparkline"==a.RealChartType)yAxis={visible:!1};else{var d;d="CircularGauge"==a.RealChartType?null:g(a)?c.Name:ja(a);v(a)&&!g(a)?(yAxis=[],yAxis[0]={title:{text:d}},yAxis[1]={title:{text:""},opposite:!0}):yAxis={title:{text:d}};yAxis.plotLines=[];yAxis.plotBands=[];if(!e(a)&&!("Funnel"==a.RealChartType||"Pyramid"==a.RealChartType)&&!r(a)){for(var f=0;f<a.Chart.PlotBands.length;f++){var l=a.Chart.PlotBands[f];if(null==c||c.Name==l.SeriesName)l.From==l.To&&null!=l.From?(d={value:l.From,
width:1,zIndex:3},X(a,d,l.Color,!1),yAxis.plotLines.push(d)):(d={},X(a,d,l.Color,!1),d.from=!l.From?Number.MIN_VALUE:l.From,d.to=!l.To?Number.MAX_VALUE:l.To,yAxis.plotBands.push(d))}if(g(a)||1==a.Chart.Series.ByIndex.length||b(a.Chart.Series.ByIndex)){var k=g(a)?c:a.Chart.Series.ByIndex[0];yAxis.labels={};yAxis.labels.formatter=function(){return qv.util.formatNumber(this.value,k.NumberFormat.DecimalPrecision,k.Picture,true)}}}if("Radar"==a.RealChartType||"FilledRadar"==a.RealChartType||"PolarArea"==
a.RealChartType)yAxis.min=0,yAxis.gridLineInterpolation="Radar"==a.RealChartType||"FilledRadar"==a.RealChartType?"polygon":"circle";if(r(a)){yAxis.min=0;yAxis.max=0;for(var h in a.Chart.Series.ByName)if(!g(a)||h==c.Name)d=a.Chart.Series.ByName[h],yAxis.max=Math.max(yAxis.max,100*d.MaximumValue/d.TargetValue);if("LinearGauge"==a.RealChartType||100!=yAxis.max){d={className:"highcharts-dashed-plot-line",value:100};if(g(a)||1==a.Chart.Series.DataFields.length){var f=g(a)?c:a.Chart.Series.ByIndex[0],m,
o;"LinearGauge"==a.RealChartType?(l=-10,m=-5,o="right"):(l=15,m=0,o="center");d.label={text:f.TargetValue,verticalAlign:"bottom",rotation:0,y:l,x:m,align:o}}yAxis.plotLines.push(d)}}"LinearGauge"==a.RealChartType?(yAxis.className="highcharts-no-axis-line highcharts-no-grid-line",yAxis.labels={enabled:!1}):"CircularGauge"==a.RealChartType&&(yAxis.lineWidth=0,yAxis.tickPositions=[]);if(gx.lang.gxBoolean(a.XAxisIntersectionAtZero)){l=f=!1;for(h in a.Chart.Series.ByName)d=a.Chart.Series.ByName[h],d.PositiveValues&&
(f=!0),d.NegativeValues&&(l=!0);l||(v(a)&&!g(a)?(yAxis[0].min=0,yAxis[1].min=0):yAxis.min=0);f||(v(a)&&!g(a)?(yAxis[0].max=0,yAxis[1].max=0):yAxis.max=0)}}return yAxis}(l,k);s.plotOptions=function(c,b){function d(a){var b;b=g(a)||1==a.Chart.Series.DataFields.length?23*(g(a)?a.Chart.Series.DataFields.length:1):29;return a.getContainerControl().offsetHeight-b}function f(a){var b={radius:1,symbol:"circle",states:{hover:{radius:4}}};a.SelectionAllowed()&&(b.states.select={radius:5,lineWidth:1});return b}
var e=gx.lang.gxBoolean(b.ShowValues),l={series:{}};l.series.events={};"CircularGauge"==b.RealChartType?(l.series.dataLabels={},l.series.dataLabels.enabled=1==b.Chart.Series.DataFields.length&&gx.lang.gxBoolean(b.ShowValues)||g(b),l.series.dataLabels.y=0,l.series.dataLabels.borderWidth=0,l.series.dataLabels.formatter=function(){return w(this,b)},l.series.marker={enabled:!1}):e&&(l.series.dataLabels={},l.series.dataLabels.enabled=!0,l.series.dataLabels.connectorColor="#000000",l.series.dataLabels.formatter=
function(){var a=b.Chart.Series.ByName[this.series.name];return qv.util.formatNumber(this.point.y*("LinearGauge"==b.RealChartType?a.TargetValue/100:1),a.NumberFormat.DecimalPrecision,a.Picture,!1)},"LinearGauge"==b.RealChartType&&(l.series.dataLabels.inside=!0));if(g(b)&&"CircularGauge"!=b.RealChartType){l.series.point={};l.series.point.events={};var k="LinearGauge"!=b.RealChartType;l.series.point.events.mouseOver=function(){n(b,this.series.chart.container,this.index,true,k)};l.series.point.events.mouseOut=
function(){n(b,this.series.chart.container,this.index,false,k)}}if(b.ItemClick||b.SelectionAllowed())l.series.events.click=p;switch(c){case "bar":l.bar={};"StackedBar"==b.RealChartType?(l.series.stacking="normal",l.bar.stacking="normal"):"StackedBar100"==b.RealChartType&&(l.series.stacking="percent",l.bar.stacking="percent");if("LinearGauge"==b.RealChartType){e=G(b.Chart.Series.DataFields.length,1).Width*d(b);l.bar.pointWidth=e;l.bar.pointPadding=0;l.bar.groupPadding=0;for(var h=Number.MAX_VALUE,
m=0;m<b.Chart.Series.DataFields.length;m++){var o=b.Chart.Series.ByIndex[m],o=o.Points[0].Value/o.TargetValue;o<h&&(h=o)}h*=b.getContainerControl().offsetWidth;l.bar.borderRadius=Math.min(e/2,h/2)}break;case "column":l.column={};"StackedColumn"==b.RealChartType||"StackedColumn3D"==b.RealChartType||"PolarArea"==b.RealChartType?(l.series.stacking="normal",l.column.stacking="normal"):"StackedColumn100"==b.RealChartType&&(l.series.stacking="percent",l.column.stacking="percent");"PolarArea"==b.RealChartType&&
(l.column.pointPadding=0,l.column.groupPadding=0);break;case "area":l.area={};"StepArea"==b.RealChartType&&(l.area.step="center");l.area.marker=f(b);"StackedArea"==b.RealChartType?l.area.stacking="normal":"StackedArea100"==b.RealChartType&&(l.area.stacking="percent");break;case "areaspline":l.areaspline={};l.areaspline.marker=f(b);break;case "line":l.line={};l.line.marker=f(b);"StepLine"==b.RealChartType?l.line.step="center":"StepTimeline"==b.RealChartType&&(l.line.step="left");a(b)?l.series.connectNulls=
!0:"StackedLine"==b.RealChartType?l.line.stacking="normal":"StackedLine100"==b.RealChartType&&(l.line.stacking="percent");break;case "spline":l.spline={};l.spline.marker=f(b);break;case "pie":l.pie={};if("Doughnut"==b.RealChartType||"Doughnut3D"==b.RealChartType)l.pie.innerSize="35%";if("Pie3D"==b.RealChartType||"Doughnut3D"==b.RealChartType)l.pie.depth=35;l.pie.dataLabels={enabled:e};l.pie.showInLegend=!0;break;case "solidgauge":l.solidgauge={};l.solidgauge.showInLegend=!0;l.solidgauge.rounded=!0;
break;case "funnel":l.funnel={};l.funnel.showInLegend=!0;l.funnel.dataLabels={enabled:e};break;case "pyramid":l.pyramid={},l.pyramid.showInLegend=!0,l.pyramid.dataLabels={enabled:e}}return l}(s.chart.type,l);s.tooltip=function(b){var d={};a(b)?(d.borderRadius=1,d.shadow=!0,d.shared=!0,d.useHTML=!1,d.formatter=function(){return t(this,b.Chart.Series.ByName)}):"StackedColumn100"==b.RealChartType||"StackedBar100"==b.RealChartType||"StackedArea100"==b.RealChartType||"StackedLine100"==b.RealChartType?
d.formatter=function(){return"<b>"+(""!=this.point.id?this.point.id:this.series.name)+"</b>: "+Math.round(100*this.point.percentage)/100+"%"}:e(b)?d.formatter=function(){var a;if(g(b)){a=qv.collection[this.point.series.chart.options.qv.viewerId];var d=c(a),f=h(a,this.point.index),e=0<f.length?f[0].id:"",l=""!=e,k="";l&&(k+=o(e,d?K(a,this):""));for(e=0;e<f.length;e++)var m=f[e],k=k+((l||0<e?"<br/>":"")+o(m.series.name+": ",d?"":K(a,m.series))),m=Math.round(100*m.percentage)/100,k=k+(m+"%");a=k}else m=
Math.round(100*this.point.percentage)/100,a="<b>"+(""!=this.point.name?this.point.name:this.point.series.name)+"</b>: "+m+"%";return a}:"CircularGauge"==b.RealChartType?(d.enabled=(1<b.Chart.Series.DataFields.length||!gx.lang.gxBoolean(b.ShowValues))&&!g(b),d.formatter=function(){return w(this,b)},d.positioner=function(a){return{x:(this.chart.plotWidth-a)/2,y:this.chart.plotHeight/2}}):d.formatter=function(){var a;var d=b.Chart.Series.ByName;if(!g(b)||r(b)){a=qv.collection[this.series.chart.options.qv.viewerId];
var f=d[this.series.name],d=r(a)?"ZZZZZZZZZZZZZZ9.99":f.Picture,e=r(a)?2:f.NumberFormat.DecimalPrecision,f=r(a);a="<b>"+(""!=this.point.id?this.point.id:this.series.name)+"</b>: "+qv.util.formatNumber(this.point.y,e,d,f)+(r(a)?"%":"")}else{this.points?(a=this.points[0],f=a.point.index):(a=this.point,f=a.index);a=qv.collection[a.series.chart.options.qv.viewerId];var e=c(a),l=h(a,f),f=!this.key?!this.x?"":this.x:this.key,k=""!=f&&"Sparkline"!=a.RealChartType,m="";k&&(m+=o(f,e?K(a,this):""));for(var p=
0;p<l.length;p++)var N=l[p],f=d[N.series.name],m=m+((k||0<p?"<br/>":"")+o(N.series.name+": ",e?"":K(a,N))),m=m+qv.util.formatNumber(N.y,f.NumberFormat.DecimalPrecision,f.Picture,!1);a=m}return a};return d}(l);s.series=function(b,c,f){var e=[],l=0,k;for(k in b.Chart.Series.ByName){if(!g(b)||l==c){var h;h=b;var o=b.Chart.Series.ByName[k],p=l,N=f,s={};h.ItemClick&&h.Metadata.Data[p].RaiseItemClick&&(s.className="highcharts-drilldown-point");if(a(h)){s.name=o.Name;s.data=[];s.turboThreshold=0;ba(o.Color)||
X(h,s,o.Color,!0);N=A(h.Chart.Categories,o.Points,Q(h),o.Aggregation,N);for(j=0;j<N.length;j++){var p=N[j].name,q=N[j].x,n=N[j].y,q=new gx.date.gxdate(q,"Y4MD");s.data[j]={x:q.Value.getTime()-6E4*q.Value.getTimezoneOffset(),y:n,name:p};ba(o.Color)&&X(h,s.data[j],o.Points[j].Color,!0)}}else{N=void 0;"CircularGauge"==h.RealChartType&&(N=g(h)?m(1,1):m(h.Chart.Series.DataFields.length,p+1));s.name=o.Name;s.data=[];s.turboThreshold=0;ba(o.Color)||X(h,s,o.Color,!0);if("Radar"==h.RealChartType||"FilledRadar"==
h.RealChartType||"PolarArea"==h.RealChartType)s.pointPlacement="Radar"==h.RealChartType||"FilledRadar"==h.RealChartType?"on":null;for(j=0;j<o.Points.length;j++)(n=null!=o.Points[j].Value?parseFloat(qv.util.trim(o.Points[j].Value).replace(",",".")):null,r(h)&&(n=100*(n/o.TargetValue)),p=h.Chart.Categories.Values[j].ValueWithPicture,s.data[j]={},s.data[j].y=n,s.data[j].name=r(h)?"":p,s.data[j].id=s.data[j].name,d(h)&&(q=h.Chart.Categories.Values[j].Value,q=new gx.date.gxdate(q,"Y4MD"),s.data[j].x=q.Value.getTime()-
6E4*q.Value.getTimezoneOffset(),s.data[j].id=q),"CircularGauge"==h.RealChartType&&(s.data[j].radius=N.UpperExtreme.toString()+"%",s.data[j].innerRadius=N.LowerExtreme.toString()+"%"),"CircularGauge"==h.RealChartType)?(p=ba(o.Color)?o.Points[0].Color:o.Color,X(h,s.data[j],p,!0)):ba(o.Color)&&X(h,s.data[j],o.Points[j].Color,!0)}h=s;o=null!=c?c:l;v(b)&&(0==o%2?(h.type="column",h.yAxis=0):(h.type="line",h.yAxis=g(b)?0:1));e.push(h)}l++}return e}(l,q,u);return s}function ga(a,b){for(var c=0;c<a.Metadata.Axes.length;c++)if(a.Metadata.Axes[c].DataField==
b)return a.Metadata.Axes[c]}function Q(a){for(var b=0,c="",d=0;d<a.Metadata.Axes.length;d++){var f=a.Metadata.Axes[d];if("Rows"==f.AxisType||"Columns"==f.AxisType)b++,c=f.DataType}return 1==b?c:"character"}function ja(a){var b="";if(""==a.YAxisTitle){if(1==a.Chart.Series.DataFields.length){var c;a:for(b=0;b<a.Metadata.Data.length;b++)if(a.Metadata.Data[b].DataField==a.Chart.Series.DataFields[0]){c=a.Metadata.Data[b];break a}b=gx.getMessage(c.Title)}}else b=gx.getMessage(a.YAxisTitle);return b}function O(a){return!isNaN(parseFloat(a))&&
isFinite(a)?gx.dom.el(ca+"_Zoom_"+a+"m"):gx.dom.el(a)}function L(a,b){if(zoom=O(a))zoom.style.textDecoration=b}function za(a){if(zoom=O(a))zoom.onclick();else if(0!=a){var b;switch(a){case 12:b=6;break;case 6:b=3;break;case 3:b=2;break;case 2:b=1;break;case 1:b=0}za(b)}}function Aa(a,b){gx.dom.el(a+"_options_compare_enable").disabled=!b;gx.dom.el(a+"_options_compare_text").disabled=!b;gx.dom.el(a+"_options_compare_text").style.opacity=!b?0.5:1;gx.dom.el(a+"_options_compare_options").disabled=!b;gx.dom.el(a+
"_options_compare_options").style.opacity=!b?0.5:1}function ea(a){return a+"_options"}function ia(a){return a+"_center"}function da(a){return a+"_footer_slider"}function ua(a){return a+"_footer_chart"}function ha(a){return a+"_footer_range"}function oa(a){return a+"_footer_left_cursor"}function pa(a){return a+"_footer_right_cursor"}function ka(a){return a+"_footer_center"}function sa(a,b,c){var d=Math.max(b,0),b=Math.min(d,100),d=Math.max(c,0),c=Math.min(d,100);$("#"+(a+"_footer")).css("width","100%").css("height",
Y.toString()+"px");$("#"+ua(a)).css("width","100%").css("height",(Y-2).toString()+"px");d=qv.collection[a].getContainerControl().offsetWidth;b=b*d/100;c=(100-c)*d/100;if(d-b-c<2*Z){var f=2*Z-(d-b-c),e;e=0==f%2?f/2:(f+1)/2;b-=e;c-=f-e;0>b&&(c+=b,b=0);0>c&&(b+=c,c=0)}$("#"+da(a)).css("width","100%").css("height",Y.toString()+"px").css("padding-left",(100*b/d).toString()+"%").css("padding-right",(100*c/d).toString()+"%");$("#"+ha(a)).css("width","100%").css("height",Y.toString()+"px");$("#"+oa(a)).css("width",
Z.toString()+"px").css("height",Y.toString()+"px");$("#"+pa(a)).css("width",Z.toString()+"px").css("height",Y.toString()+"px");$("#"+ka(a)).css("width","calc(100% - "+2*Z+"px)").css("height",Y.toString()+"px").css("left",Z.toString()+"px")}function Ba(a,b){var c=parseInt($("#"+da(a)).css("padding-left")),d=parseInt($("#"+ha(a)).css("width")),f;f=b.originalEvent.touches?b.originalEvent.touches[0].pageX-b.originalEvent.touches[0].target.offsetLeft:b.offsetX;switch(b.target.id){case da(a):return f;case oa(a):return f+
c;case ka(a):return f+c;case pa(a):return f+c+d-Z}}function Ea(b){function c(a){a.preventDefault();T=b;var d=$("#"+da(T)),f=$("#"+ha(T));parseInt(d.css("padding-left"));Ca=Ba(T,a);qa=parseInt(d.css("padding-left"));va=parseInt(d.css("padding-right"));ra=parseInt(d.css("width"));wa=parseInt(f.css("width"))}function d(){if(la||V||W){var b=$("#"+da(T)),c=qv.collection[T],f=gx.dom.el(T+"_options_compare_enable").checked,e=c.getContainerControl().offsetWidth,l;l=a(c)?ia(c.userControlId()):c.getContainerControl().id;
var c=g(c)?$("[id^="+l+"_chart]"):$("#"+l),k=[];$.each(c,function(a,b){var c=$("#"+b.id).highcharts();k.push(c)});c=k[0];l=parseInt(b.css("padding-left"));var h=parseInt(b.css("padding-right")),b=100*l/e,e=100*(1-h/e);if(0==b&&100==e)$.each(k,function(a,b){b.zoomOut()});else{c.get("xaxis").getExtremes();var c=c.options.qv,m=c.dataMin+b/100*(c.dataMax-c.dataMin),o=c.dataMin+e/100*(c.dataMax-c.dataMin),s=f?!1:!0;$.each(k,function(a,b){b.get("xaxis").setExtremes(m,o,s)})}f&&ma(k);if(V||W)L(fa,"none"),
fa=null}V=W=la=!1}function f(a){if(la||V||W)if(a=Ba(T,a)-Ca,a=W?Math.min(a,wa-2*Z):Math.min(a,va),a=V?Math.max(a,-wa+2*Z):Math.max(a,-qa),0!=a){$("#"+ka(T));var b=$("#"+da(T));$("#"+ha(T));W?b.css("padding-left",(100*(qa+a)/ra).toString()+"%"):(V||b.css("padding-left",(100*(qa+a)/ra).toString()+"%"),b.css("padding-right",(100*(va-a)/ra).toString()+"%"))}}var e=$("#"+oa(b)),k=$("#"+pa(b)),h=$("#"+ka(b)),m=$("#"+da(b));$("#"+ha(b));e.mousedown(function(a){a.preventDefault();W=!0});k.mousedown(function(a){a.preventDefault();
V=!0});h.mousedown(function(a){a.preventDefault();!W&&!V&&(la=!0)});m.mousedown(function(a){c(a)});$(document).mouseup(function(a){d(a)});m.mousemove(function(a){f(a)});e.on("touchstart",function(a){a.preventDefault();W=!0});k.on("touchstart",function(a){a.preventDefault();V=!0});h.on("touchstart",function(a){a.preventDefault();!W&&!V&&(la=!0)});m.on("touchstart",function(a){c(a)});$(document).on("touchend",function(a){d(a)});$(document).on("touchcancel",function(a){d(a)});m.on("touchmove",function(a){f(a)})}
function Fa(a,b){var c=qv.util.dom.createDiv(a,da(b),"gx-qv-footer-slider","",{},""),c=qv.util.dom.createDiv(c,ha(b),"gx-qv-footer-range","",{},"");qv.util.dom.createDiv(c,oa(b),"gx-qv-footer-left-cursor","",{},"");qv.util.dom.createDiv(c,pa(b),"gx-qv-footer-right-cursor","",{},"");qv.util.dom.createDiv(c,ka(b),"gx-qv-footer-center","",{},"");qv.util.dom.createDiv(a,ua(b),"gx-qv-footer-chart","",{},"")}function Ga(a,b){var c=ua(a.userControlId()),d="SmoothTimeline"==a.RealChartType?"spline":"line",
f="StepTimeline"==a.RealChartType?"left":"",e=[];if(g(a))for(k=0;k<b.length;k++)e.push(b[k].series[0]);else for(var k=0;k<b[0].series.length;k++)e.push(b[0].series[k]);return qv.chart.getSparklineChartOptions(a,c,d,!1,f,e)}function ma(a){var b=a[0],c=b.options.qv.viewerId,d=qv.collection[c],f=gx.dom.el(c+"_options_compare_enable").checked;$.each(a,function(a,b){b.options.qv.comparing=f});var e=b.get("xaxis").getExtremes();void 0!=e.userMin&&(e.min=e.userMin);void 0!=e.userMax&&(e.max=e.userMax);if(f){var k=
gx.dom.el(c+"_options_compare_options").children,h;for(ind=0;void 0!=k[ind]&&void 0==h;ind++)k[ind].selected&&(h=k[ind].value);var m,o;"PrevPeriod"==h?(o=new Date(e.min),m=new Date(e.min-(e.max-e.min))):"PrevYear"==h&&(m=new Date(e.min),m=new Date(m.setFullYear(m.getFullYear()-1)),o=new Date(e.max),o=new Date(o.setFullYear(o.getFullYear()-1)));m=m.getTime();o=o.getTime();if(zoom=O(c+"_Zoom_0m"))zoom.style.display="none"}else if(zoom=O(c+"_Zoom_0m"))zoom.style.display="";$.each(a,function(a,b){for(var c=
[];b.series.length>0;){b.options.qv.colorIndexesUsed||c.push(b.series[0].colorIndex);b.series[0].remove(true)}if(!b.options.qv.colorIndexesUsed)b.options.qv.colorIndexesUsed=c});var k=0,s;for(s in d.Chart.Series.ByName){var p=d.Chart.Series.ByName[s],q,n;g(d)?(q=a[k],n=q.options.qv.colorIndexesUsed[0]):(q=b,n=q.options.qv.colorIndexesUsed[k]);var u={turboThreshold:0};u.colorIndex=n;u.id=s+"1";u.name=s;u.data=[];if(f){var t={className:"highcharts-dashed-series-line",turboThreshold:0};t.colorIndex=
n;t.id=s+"2";t.name=s;t.data=[]}n=document.getElementById(c+"_options_group_options").value;p=A(d.Chart.Categories,p.Points,Q(d),p.Aggregation,n);for(i=0;i<p.length;i++){n=p[i].y;var w=new gx.date.gxdate(p[i].x,"Y4MD"),v=p[i].name,x=w.Value.getTime()-6E4*w.Value.getTimezoneOffset(),w=w.Value.getTime()-6E4*w.Value.getTimezoneOffset();if(f){var r=!1,y=!1;x<=e.max&&x>=e.min&&(r=!0);if(x<=o&&x>=m){var y=!0,z=new Date(x),F;"PrevPeriod"==h?F="1m"==q.options.qv.predef_zoom?z.setMonth(z.getMonth()+1):"2m"==
q.options.qv.predef_zoom?z.setMonth(z.getMonth()+2):"3m"==q.options.qv.predef_zoom?z.setMonth(z.getMonth()+3):"6m"==q.options.qv.predef_zoom?z.setMonth(z.getMonth()+6):"12m"==q.options.qv.predef_zoom?z.setFullYear(z.getFullYear()+1):F+(e.max-e.min):"PrevYear"==h&&(F=z.setFullYear(z.getFullYear()+1))}r&&(r={},r.x=x,r.y=n,r.name=v,u.data.push(r));y&&(r={},r.x=F,r.y=n,r.name=v,r.real_x=w,t.data.push(r))}else u.data.push({x:x,y:n,name:v})}q.addSeries(u);f&&q.addSeries(t);k++}}function Ha(a,b){if(a.length<
b)return 0;var c=(a[a.length-1].x-a[a.length-b].x)/1E3/3600/24/(365/12);return 1>=c?1:2>=c?2:3>=c?3:6>=c?6:12}function Ia(a,b){function c(a,b,d,f,e,g,l,k,h){var m=b.userControlId(),a=qv.util.dom.createSelect(a,ea(m)+"_group_options");"datetime"==Q(b)&&(qv.util.dom.createOption(a,"Seconds","Seconds"==b._groupOption,gx.getMessage("GXPL_QViewerSeconds")),h&&(qv.util.dom.createOption(a,"Minutes","Minutes"==b._groupOption,gx.getMessage("GXPL_QViewerMinutes")),k&&qv.util.dom.createOption(a,"Hours","Hours"==
b._groupOption,gx.getMessage("GXPL_QViewerHours"))));if(v||"date"==Q(b))qv.util.dom.createOption(a,"Days","Days"==b._groupOption,gx.getMessage("GXPL_QViewerDays")),l&&(qv.util.dom.createOption(a,"Weeks","Weeks"==b._groupOption,gx.getMessage("GXPL_QViewerWeeks")),g&&(qv.util.dom.createOption(a,"Months","Months"==b._groupOption,gx.getMessage("GXPL_QViewerMonths")),e&&(qv.util.dom.createOption(a,"Quarters","Quarters"==b._groupOption,gx.getMessage("GXPL_QViewerQuarters")),f&&(qv.util.dom.createOption(a,
"Semesters","Semesters"==b._groupOption,gx.getMessage("GXPL_QViewerSemesters")),d&&qv.util.dom.createOption(a,"Years","Years"==b._groupOption,gx.getMessage("GXPL_QViewerYears"))))));return a}var d=a[0];ca=d.options.qv.viewerId;var f=qv.collection[ca],e=document.getElementById(ea(ca)),g=document.getElementById(ca+"_footer"),k=d.get("xaxis").getExtremes(),h=k.dataMax-k.dataMin;$.each(a,function(a,b){b.options.qv.dataMax=k.dataMax;b.options.qv.dataMin=k.dataMin});var m=2628288E3<h,o=5255712E3<h,s=7884E6<
h,p=15768E6<h,h=31536E6<h;f._groupOption=f._groupOption||("date"==Q(f)?"Days":"Seconds");var q=new gx.date.gxdate(""),n=new gx.date.gxdate("");q.Value.setTime(k.dataMin+6E4*q.Value.getTimezoneOffset());n.Value.setTime(k.dataMax+6E4*n.Value.getTimezoneOffset());var u=!0,t=!0,r=!0,w=!0,x=!0,v=!0,z=!0,A=!0;gx.date.year(q)==gx.date.year(n)&&(u=!1,6>=gx.date.month(q)&&7<=gx.date.month(n)||(t=!1,3>=gx.date.month(q)&&4<=gx.date.month(n)||(6>=gx.date.month(q)&&7<=gx.date.month(n)||9>=gx.date.month(q)&&10<=
gx.date.month(n))||(r=!1,gx.date.month(q)==gx.date.month(n)&&(w=!1,gx.date.day(q)-gx.date.dow(q)==gx.date.day(n)-gx.date.dow(n)&&(x=!1,gx.date.day(q)==gx.date.day(n)&&(v=!1,gx.date.hour(q)==gx.date.hour(n)&&(z=!1,gx.date.minute(q)==gx.date.minute(n)&&(A=!1))))))));(function(a,b,d,f,e,g,l,k,h,m,o,s,q,n){function p(a){return qv.util.dom.createDiv(a,"","QVTimelineHeaderGroup","",{height:xa+"px",flexGrow:1},"")}function u(a,b,c){return qv.util.dom.createAnchor(a,c,{cursor:"pointer",paddingLeft:"6px"},
b)}var t=b.userControlId(),a=qv.util.dom.createDiv(a,"","QVTimelineHeader","",{display:"flex",flexDirection:"row",flexWrap:"wrap"},""),r=p(a),w=p(a),x=p(a),r=qv.util.dom.createDiv(r,"","","",{"float":"left"},"");qv.util.dom.createText(r,gx.getMessage("GXPL_QViewerJSChartZoom"));if(d){u(r,gx.getMessage("GXPL_QViewerJSChartZoomLevelToOneMonth"),t+"_Zoom_1m");if(f){u(r,gx.getMessage("GXPL_QViewerJSChartZoomLevelToTwoMonth"),t+"_Zoom_2m");if(e){u(r,gx.getMessage("GXPL_QViewerJSChartZoomLevelToThreeMonth"),
t+"_Zoom_3m");if(g){u(r,gx.getMessage("GXPL_QViewerJSChartZoomLevelToSixMonth"),t+"_Zoom_6m");l&&u(r,gx.getMessage("GXPL_QViewerJSChartZoomLevelToOneYear"),t+"_Zoom_12m")}}}}u(r,gx.getMessage("GXPL_QViewerJSChartZoomLevelToAll"),t+"_Zoom_0m");d=qv.util.dom.createDiv(w,"","","",{"float":"right",paddingLeft:"12px"},"");qv.util.dom.createSpan(d,ea(t)+"_groupby_text","","",{whiteSpace:"nowrap",paddingRight:"6px"},null,gx.getMessage("GXPL_QViewerGroupBy"));c(d,b,k,h,m,o,s,q,n);b=qv.util.dom.createDiv(x,
"","","",{"float":"right",paddingLeft:"12px"},"");qv.util.dom.createInput(b,ea(t)+"_compare_enable","checkbox",{verticalAlign:"sub"});qv.util.dom.createSpan(b,ea(t)+"_compare_text","","",{whiteSpace:"nowrap",paddingRight:"6px",paddingLeft:"6px"},null,gx.getMessage("GXPL_QViewerCompareWith"));t=qv.util.dom.createSelect(b,ea(t)+"_compare_options");qv.util.dom.createOption(t,"PrevPeriod",false,gx.getMessage("GXPL_QViewerPreviousPeriod"));qv.util.dom.createOption(t,"PrevYear",false,gx.getMessage("GXPL_QViewerPreviousYear"));
return a})(e,f,m,o,s,p,h,u,t,r,w,x,z,A);Fa(g,ca);Ea(ca);gx.dom.el(e.id+"_compare_enable").onclick=function(){ma(a)};gx.dom.el(e.id+"_compare_options").onchange=function(){gx.dom.el(e.id+"_compare_enable").checked&&ma(a)};gx.dom.el(e.id+"_group_options").onchange=function(){ma(a)};var g=function(b){var c=gx.dom.el(e.id+"_compare_enable").checked;if(b>0){var f,g;g=d.get("xaxis").getExtremes().dataMax;f=g-b*2628028800;var k=c?false:true;$.each(a,function(a,b){b.get("xaxis").setExtremes(f,g,k)});var h=
d.options.qv;sa(d.options.qv.viewerId,(f-h.dataMin)/(h.dataMax-h.dataMin)*100,(g-h.dataMin)/(h.dataMax-h.dataMin)*100);Aa(d.options.qv.viewerId,true)}else{$.each(a,function(a,b){b.zoomOut()});Aa(d.options.qv.viewerId,false)}L(fa,"none");L(this.id,"underline");$.each(a,function(a,c){c.options.qv.predef_zoom=b+"m"});fa=this.id;c&&ma(a)},m=[0,1,2,3,6,12],y;for(y in m)if(o=m[y],s=gx.dom.el(ca+"_Zoom_"+o+"m"))s.onclick=g.closure(s,[o]);y=Ha(d.series[0].points,20);za(y);f=Ga(f,b);new Highcharts.Chart(f)}
function Ja(b){var c=qv.collection[b.options.qv.viewerId];if(!d(c)){var f=c.SelectionAllowed(),e=!1;if(c.ItemClick)for(var g=0;g<c.Metadata.Axes.length;g++)if(c.Metadata.Axes[g].RaiseItemClick){e=!0;break}(e||f)&&jQuery.each(b.xAxis[0].ticks,function(c,d){d&&d.label&&(e&&d.label.addClass("gx-qv-clickable-element"),d.label.on("click",function(){var g=e,h=qv.collection[b.options.qv.viewerId],m=!1;f&&!a(h)&&(m=s(h.Charts,d.pos));g&&(g=1==h.Chart.Categories.DataFields.length?ga(h,h.Chart.Categories.DataFields[0]).Name:
"",k(h.ItemClickData,h,g,"Row",d.label.textStr,m,h.Data.Rows[c]),h.ItemClick())}))})}}var fa=null,ca=null,xa=35,Y=50,Z=10,Ca=0,T="",qa=0,va=0,wa=0,ra=0,W=!1,V=!1,la=!1;return{tryToRenderChart:function(b){var c="";(new Date).getTime();b.xml=b.xml||{};qv.services.GetRecordsetCacheKeyIfNeeded(b,function(b,d){var f=!1;b!=d.xml.recordsetCacheKey&&(d.xml.recordsetCacheKey=b,f=!0);qv.util.anyError(b)?(c=qv.util.getErrorFromText(b),qv.util.renderError(d,c)):(f&&qv.services.parseRecordsetCacheKeyXML(d),qv.services.GetMetadataIfNeeded(d,
function(b,d){var f=false;if(b!=d.xml.metadata){d.xml.metadata=b;f=true}(new Date).getTime();if(qv.util.anyError(b)){c=qv.util.getErrorFromText(b);qv.util.renderError(d,c)}else{f&&qv.services.parseMetadataXML(d);qv.services.GetDataIfNeeded(d,function(b,d){var f=false;if(b!=d.xml.data){d.xml.data=b;f=true}(new Date).getTime();if(qv.util.anyError(b)){c=qv.util.getErrorFromText(b);qv.util.renderError(d,c)}else{f&&qv.services.parseDataXML(d);f=qv.util.GetContainerControlClasses(d);f!=""&&qv.util.SetUserControlClass(d,
f);f=x(d);if(f==""){var e=d.userControlId(),f=qv.util.dom.getEmptyContainer(d);if((a(d)||g(d))&&f.offsetHeight==0)f.style.height="400px";if(a(d)){qv.util.dom.createDiv(f,ea(e),"QVTimelineHeaderContainer","",{width:"100%",height:xa+"px"},"");var l=qv.util.dom.createDiv(f,ia(e),"","",{width:"100%",height:"calc(100% - "+xa+"px - "+Y+"px)"},"");qv.util.dom.createDiv(f,e+"_footer","gx-qv-footer","",{width:"100%",height:Y+"px"},"");f.style.padding=DEFAULTCHARTSPACING+"px";f=l}if(g(d))for(var l=d.Chart.Series.DataFields.length,
k=parseInt(100/l),h=100%l,e=a(d)?ia(e):e,m=0;m<l;m++)qv.util.dom.createDiv(f,e+"_chart"+m.toString(),"","",{width:"100%",height:(k+(m<h?1:0)).toString()+"%"},"");f=[];if(g(d)){var l=0,o;for(o in d.Chart.Series.ByName){k=ya(d,d.Chart.Series.ByName[o],l);f.push(k);l++}}else{k=ya(d,null,null);f.push(k)}if(d.RealChartType=="CircularGauge"){o=M(d);o.insertRule("#"+d.ContainerName+" .highcharts-tooltip-box {fill: none !important; stroke-width: 0 !important; }",o.cssRules.length)}Highcharts.setOptions({lang:{months:[gx.getMessage("GXPL_QViewerJanuary"),
gx.getMessage("GXPL_QViewerFebruary"),gx.getMessage("GXPL_QViewerMarch"),gx.getMessage("GXPL_QViewerApril"),gx.getMessage("GXPL_QViewerMay"),gx.getMessage("GXPL_QViewerJune"),gx.getMessage("GXPL_QViewerJuly"),gx.getMessage("GXPL_QViewerAugust"),gx.getMessage("GXPL_QViewerSeptember"),gx.getMessage("GXPL_QViewerOctober"),gx.getMessage("GXPL_QViewerNovember"),gx.getMessage("GXPL_QViewerDecember")],weekdays:[gx.getMessage("GXPL_QViewerSunday"),gx.getMessage("GXPL_QViewerMonday"),gx.getMessage("GXPL_QViewerTuesday"),
gx.getMessage("GXPL_QViewerWednesday"),gx.getMessage("GXPL_QViewerThursday"),gx.getMessage("GXPL_QViewerFriday"),gx.getMessage("GXPL_QViewerSaturday")],shortMonths:[gx.getMessage("GXPL_QViewerJanuary").substring(0,3),gx.getMessage("GXPL_QViewerFebruary").substring(0,3),gx.getMessage("GXPL_QViewerMarch").substring(0,3),gx.getMessage("GXPL_QViewerApril").substring(0,3),gx.getMessage("GXPL_QViewerMay").substring(0,3),gx.getMessage("GXPL_QViewerJune").substring(0,3),gx.getMessage("GXPL_QViewerJuly").substring(0,
3),gx.getMessage("GXPL_QViewerAugust").substring(0,3),gx.getMessage("GXPL_QViewerSeptember").substring(0,3),gx.getMessage("GXPL_QViewerOctober").substring(0,3),gx.getMessage("GXPL_QViewerNovember").substring(0,3),gx.getMessage("GXPL_QViewerDecember").substring(0,3)],numericSymbols:null}});o=[];for(l=0;l<f.length;l++){HCChart=new Highcharts.Chart(f[l],Ja);o.push(HCChart)}d.Charts=o;a(d)&&Ia(o,f);d._ControlRenderedTo=d.RealType;qv.util.hideActivityIndicator(d)}else qv.util.renderError(d,f)}})}}))})},
GetMetadataChart:function(a){return qv.util.GetDesigntimeMetadata(a)},GetDataChart:function(a){return a.xml.data},getSparklineChartOptions:function(a,b,c,d,f,e){a={chart:{}};a.chart.renderTo=b;a.chart.margin=0;a.chart.type=c;d&&(a.chart.className="highcharts-no-background");a.title={};a.title.text="";a.credits={};a.credits.enabled=!1;a.xAxis={};a.xAxis.visible=!1;a.yAxis={};a.yAxis.visible=!1;a.legend={};a.legend.enabled=!1;a.tooltip={};a.tooltip.enabled=!1;a.plotOptions={};a.plotOptions.series={};
a.plotOptions.series.animation=!1;a.plotOptions.series.connectNulls=!0;a.plotOptions.series.enableMouseTracking=!1;a.plotOptions.series.lineWidth=1;a.plotOptions.series.shadow=!1;a.plotOptions.series.states={};a.plotOptions.series.states.hover={};a.plotOptions.series.states.hover.lineWidth=1;a.plotOptions.series.marker={};a.plotOptions.series.marker.radius=0;a.plotOptions.series.marker.states={};a.plotOptions.series.marker.states.hover={};a.plotOptions.series.marker.states.hover.radius=2;""!=f&&(a.plotOptions.series.step=
f);a.series=[];for(b=0;b<e.length;b++)a.series.push(e[b]);return a},IsDatetimeXAxis:function(a){return d(a)},Select:function(a,b){for(var c=[],d=0;d<a.Data.Rows.length;d++){var f=a.Data.Rows[d],e=!0;for(j=0;j<b.length;j++){var g=b[j];if(f[g.DataField]&&qv.util.trim(f[g.DataField])!=qv.util.trim(g.Value)){e=!1;break}}e&&c.push(d)}if(0<c.length){d=a.Charts;for(f=0;f<d.length;f++)for(var e=d[f],g=!1,k=0;k<c.length;k++)for(var h=c[k],m=0;m<e.series.length;m++)e.series[m].points[h].select(!0,g),g||(g=
!0)}else q(a.Charts)},Deselect:function(a){q(a.Charts)}}}();
qv.card=function(){function a(a,b){for(var c={},d=0;d<a.length;d++){var e=a[d],g;g=e;for(var h=b,n=[],r=[],v=0;v<h.length;v++){var I=h[v],z;"Count"==g.Aggregation?(z=0,I=parseFloat(I[g.DataField])):"Average"==g.Aggregation?(z=parseFloat(I[g.DataField+"_N"]),I=parseFloat(I[g.DataField+"_D"])):(z=parseFloat(I[g.DataField]),I=1);n.push(z);r.push(I)}g=qv.util.aggregate(g.Aggregation,n,r).toString();c[e.DataField]=g}return c}function d(a,b){if(0!=a.ConditionalStyles.length)for(var c=0;c<a.ConditionalStyles.length;c++){var d=
a.ConditionalStyles[c];if(qv.util.satisfyStyle(b,d))return qv.util.css.parseStyle(d.StyleOrClass)}return qv.util.css.parseStyle(a.Style)}function e(a,b,c,d){function e(a,b){var c=gx.date.now(),d;switch(a){case "LastYear":d=gx.date.addyr(c,-1);break;case "LastSemester":d=gx.date.addmth(c,-6);break;case "LastQuarter":d=gx.date.addmth(c,-3);break;case "LastMonth":d=gx.date.addmth(c,-1);break;case "LastWeek":d=gx.date.dtadd(c,-604800);break;case "LastDay":d=gx.date.dtadd(c,-86400);break;case "LastHour":d=
gx.date.dtadd(c,-3600);break;case "LastMinute":d=gx.date.dtadd(c,-60);break;case "LastSecond":d=gx.date.dtadd(c,-1)}return qv.util.dateToString(d,"datetime"==b)}var g={};if(a.IncludeTrend)if("SinceTheBeginning"==a.TrendPeriod||""==a.TrendPeriod)g=0;else for(var h=e(a.TrendPeriod,d),g=a.Data.Rows.length-1,n=a.Data.Rows.length-2;0<=n&&!(a.Data.Rows[n][c]<h);n--)g=n;else g=a.Data.Rows.length-1;return g=function(a,b,c,d,f,e){var g=null,k=null,h=null,o=null,n=[],s={AnyTrend:!1};if(""!=c){for(var q=f.length-
1,p=0,t=0,r=0,v=0,w=0,ga=0,Q=null,ja=null;a<=q;a++)if(void 0!=f[a][c]&&void 0!=f[a][d]){var p=p+1,O=new gx.date.gxdate(f[a][c],"Y4MD"),L=parseFloat(f[a][d]);n.push({x:O.Value.getTime()-6E4*O.Value.getTimezoneOffset(),y:L});if(null==g&&null==k)k=g=L,h=f[a][c],o=f[a][c];else if(L>k&&(o=f[a][c],k=L),L<g)h=f[a][c],g=L;a>=b&&(null==Q&&null==ja&&(Q=O,ja=L),O="date"==e?gx.date.daysDiff(O,Q):gx.date.secDiff(O,Q),L-=ja,t+=O,r+=L,v+=O*L,w+=O*O,ga+=L*L)}s.AnyTrend=1<p;s.Slope=(p*v-t*r)/(p*w-t*t);s.Intercept=
(r-s.Slope*t)/p;s.R2=Math.pow((p*v-t*r)/Math.sqrt((p*w-t*t)*(p*ga-r*r)),2)}b={};b.LinearRegression=s;b.MinValue=g;b.MinWhen=h;b.MaxValue=k;b.MaxWhen=o;b.ChartSeriesData=n;return b}(a.IncludeSparkline||a.IncludeMaxAndMin?0:g,g,c,b.DataField,a.Data.Rows,d)}function b(b,c,d,e){function g(a,b){function c(a,b,d){var f=[];if(d)for(d=0;d<b.length;d++)f.push(b[d][a]);else f.push(b[b.length-1][a]);return f}for(var d=[],f=0;f<a.Metadata.Axes.length;f++){var e=a.Metadata.Axes[f];if(!e.IsComponent){var h={};
h.Name=e.Name;h.Values=c(e.DataField,a.Data.Rows,b);d.push(h)}}for(f=0;f<a.Metadata.Data.length;f++)e=a.Metadata.Data[f],e.IsComponent||(h={},h.Name=e.Name,h.Values=c(e.DataField,a.Data.Rows,b),d.push(h));return d}for(var h=null,n=0;n<c.Metadata.Data.length;n++)if(c.Metadata.Data[n].Name==d){h=c.Metadata.Data[n];break}null!=h&&(b.Name=h.Name,b.Axis="Data",d=e?a(c.Metadata.Data,c.Data.Rows):c.Data.Rows[c.Data.Rows.length-1],b.Value=d[h.DataField],b.Context=g(c,e))}function c(a,b){return a+"_card_sparkline_"+
b}function v(a,b,d){d=c(a.userControlId(),d);return qv.chart.getSparklineChartOptions(a,d,"line",!0,"",[{data:b}])}function r(a,b,c,d){var e={textAlign:"center",paddingTop:"0px",paddingRight:"5px",paddingBottom:"0px",paddingLeft:"5px"},a=qv.util.dom.createTable(a,"",{}),g;g=qv.util.dom.createRow(a);g=qv.util.dom.createCell(g,1,"",e,"");qv.util.dom.createSpan(g,"","qv-card-max-and-min-value",c,{},null,b);g=qv.util.dom.createRow(a);g=qv.util.dom.createCell(g,1,"",e,"");qv.util.dom.createSpan(g,"","qv-card-max-and-min-title",
c,{},null,d);return a}function g(a){var a=new gx.date.gxdate(a,"Y4MD"),b=gx.date.now(),a=gx.date.secDiff(b,a);return gx.getMessage("GXPL_QViewerTimeAgo").replace("{0}",qv.util.seconsdToText(a))}function h(a,b,c,d){""!=b?(d=qv.util.formatNumber(parseFloat(b),d,c.Picture,!1),b=qv.util.formatNumber(parseFloat(100*b/c.TargetValue),2,"ZZZZZZZZZZZZZZ9.99",!1)+"%"):b=d="";switch(a.ShowDataAs){case "Values":return d;case "Percentages":return b;case "ValuesAndPercentages":return d+" ("+b+")";default:return d}}
function n(b){function k(a,b,c){var c=0<c.LinearRegression.Slope?"keyboard_arrow_up":0>c.LinearRegression.Slope?"keyboard_arrow_down":"drag_handle",d;d=""==b.TrendPeriod?gx.getMessage("GXPL_QViewerSinceTheBeginningTrend"):gx.getMessage("GXPL_QViewer"+b.TrendPeriod+"Trend");var e={width:"0px",marginLeft:"5px"};b.IncludeSparkline||(e.position="relative",e.top="2px");e.fontSize="36px";return c=qv.util.dom.createIcon(a,d,e,c)}for(var n=0<b.Data.Rows.length,q=!0,p="",o,w=0;w<b.Metadata.Axes.length;w++){var t=
b.Metadata.Axes[w];if("date"==t.DataType||"datetime"==t.DataType){q=!1;p=t.DataField;o=t.DataType;break}}var F;n&&(F=q?a(b.Metadata.Data,b.Data.Rows):b.Data.Rows[b.Data.Rows.length-1]);var A=qv.util.dom.getEmptyContainer(b);t=b.IsAutoResize()?w="":w="100%";var w=qv.util.dom.createTable(A,qv.util.GetContainerControlClasses(b),{width:w,height:t}),w=qv.util.dom.createRow(w),A=qv.util.dom.createCell(w,1,"center",{},""),w="Horizontal"==b.Orientation?"100%":"",t="Vertical"==b.Orientation?"100%":"",A=qv.util.dom.createTable(A,
"",{width:w,height:t,whiteSpace:"nowrap"}),I;"Horizontal"==b.Orientation&&(I=qv.util.dom.createRow(A));t=[];for(w=0;w<b.Metadata.Data.length;w++){var z=b.Metadata.Data[w],m=qv.util.ParseNumericPicture(z.DataType,z.Picture).DecimalPrecision,G,C,y;n?(G=F[z.DataField],C=h(b,F[z.DataField],z,m),y=g(F[p])):y=C=G="";if((gx.lang.gxBoolean(b.IncludeTrend)||gx.lang.gxBoolean(b.IncludeSparkline)||gx.lang.gxBoolean(b.IncludeMaxAndMin))&&n){var x=e(b,z,p,o);t.push(x)}var u=d(z,G);G={};var M="qv-card-element-value";
qv.util.startsWith(u,"{")&&qv.util.endsWith(u,"}")?G=JSON.parse(u):M=u;u=null;b.ItemClick&&z.RaiseItemClick&&(M+=(""==M?"":" ")+"gx-qv-clickable-element",u=function(){qv.card.fireItemClickEvent(event,b,q)});"Vertical"==b.Orientation&&(I=qv.util.dom.createRow(A));var R="Horizontal"==b.Orientation?"10px":"",E="Vertical"==b.Orientation?"10px":"",R=qv.util.dom.createCell(I,1,"center",{paddingRight:R,paddingLeft:R,paddingBottom:E,paddingTop:E},""),R=qv.util.dom.createTable(R,"",{}),E=qv.util.dom.createRow(R),
E=qv.util.dom.createCell(E,1,"center",{},""),E=qv.util.dom.createTable(E,"",{}),E=qv.util.dom.createRow(E),K=qv.util.dom.createCell(E,1,"center",{},"");qv.util.dom.createSpan(K,b.getContainerControl().id+"_"+z.Name,M,""!=p?y:"",G,u,C);var K=qv.util.dom.createCell(E,1,"",{},"");n&&(b.IncludeTrend&&!b.IncludeSparkline&&x.LinearRegression.AnyTrend)&&k(K,b,x);E=qv.util.dom.createRow(R);E=qv.util.dom.createCell(E,1,"center",{},"");span1=qv.util.dom.createSpan(E,"","qv-card-element-title",""!=p?y:"",{},
null,z.Title);b.IncludeSparkline&&(""!=p&&n)&&(E=qv.util.dom.createRow(R),E=qv.util.dom.createCell(E,1,"",{},""),E=qv.util.dom.createTable(E,"",{width:"100%"}),E=qv.util.dom.createRow(E),K=qv.util.dom.createCell(E,1,"",{width:"100%"},""),qv.util.dom.createDiv(K,c(b.userControlId(),w),"","",{height:"50px",width:"100%",minWidth:"100px"},""),K=qv.util.dom.createCell(E,1,"",{width:"0%"},""),n&&(b.IncludeTrend&&x.LinearRegression.AnyTrend)&&k(K,b,x));b.IncludeMaxAndMin&&(""!=p&&n)&&(E=qv.util.dom.createRow(R),
E=qv.util.dom.createCell(E,1,"center",{},""),E=qv.util.dom.createTable(E,"",{"margin-top":"10px"}),E=qv.util.dom.createRow(E),K=qv.util.dom.createCell(E,1,"",{},""),r(K,h(b,x.MinValue,z,m),g(x.MinWhen),gx.getMessage("GXPL_QViewerCardMinimum")),K=qv.util.dom.createCell(E,1,"",{},""),r(K,h(b,x.MaxValue,z,m),g(x.MaxWhen),gx.getMessage("GXPL_QViewerCardMaximum")))}if(b.IncludeSparkline&&""!=p&&n)for(w=0;w<b.Metadata.Data.length;w++)n=v(b,t[w].ChartSeriesData,w),new Highcharts.Chart(n);b._ControlRenderedTo=
b.RealType;qv.util.hideActivityIndicator(b)}return{tryToRenderCard:function(a){var b="";(new Date).getTime();a.xml=a.xml||{};qv.services.GetRecordsetCacheKeyIfNeeded(a,function(a,c){var d=!1;a!=c.xml.recordsetCacheKey&&(c.xml.recordsetCacheKey=a,d=!0);qv.util.anyError(a)?(b=qv.util.getErrorFromText(a),qv.util.renderError(c,b)):(d&&qv.services.parseRecordsetCacheKeyXML(c),qv.services.GetMetadataIfNeeded(c,function(a,c){var d=false;if(a!=c.xml.metadata){c.xml.metadata=a;d=true}(new Date).getTime();
if(qv.util.anyError(a)){b=qv.util.getErrorFromText(a);qv.util.renderError(c,b)}else{d&&qv.services.parseMetadataXML(c);qv.services.GetDataIfNeeded(c,function(a,c){var d=false;if(a!=c.xml.data){c.xml.data=a;d=true}(new Date).getTime();if(qv.util.anyError(a)){b=qv.util.getErrorFromText(a);qv.util.renderError(c,b)}else{d&&qv.services.parseDataXML(c);n(c)}})}}))})},GetMetadataCard:function(a){return qv.util.GetDesigntimeMetadata(a)},GetDataCard:function(a){return a.xml.data},fireItemClickEvent:function(a,
c,d){a=a.target.id;a=a.substr(a.lastIndexOf("_")+1);b(c.ItemClickData,c,a,d);c.ItemClick()}}}();
