text: /**
   * Copyright (c) 2014, 2016, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   */
  "use strict";
  define(['./DvtToolkit'], function(dvt) {
    // Internal use only.  All APIs and functionality are subject to change at any time.
  
  var q;function ba(a,b){0==a.indexOf("dvt.")&&(a=a.substring(4));var c=a.split("."),d=eval("dvt");c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}Math.floor(2147483648*Math.random()).toString(36);
  (function(a){function b(a,b,c,d,e,f){this.Init(a,b,c,d,e,f)}function c(a,b){this.Init(a,b)}function d(a){this.Init(a.u(),a.ag,a);this.Ac=a}function e(){this.Init({skyros:e.lh,alta:e.pf,next:e.xv})}function f(a){this.Ac=a;this.Nf=this.Ac.D()}a.vf=function(){};a.v.F(a.vf,a.Je);a.vf.newInstance=function(b,c,d){var e=new a.vf;e.Init(b,c,d);return e};a.vf.Nr=function(a){return(new e).Nr(a)};a.vf.prototype.Init=function(b,c,f){a.vf.C.Init.call(this,b,c,f);this.setId("legend1000"+Math.floor(1E9*Math.random()));
  this.Xg=new e;this.I=new d(this);this.I.Qf(this);this.gw=[];this.Lx=[];this.we=null;this.xsa=[]};a.vf.prototype.xf=function(a){this.yk.OQ();a?(this.W=this.Xg.fn(a),this.gQa(this.W.sections)):this.W||(this.W=this.NF())};a.vf.prototype.ot=function(b,c,d){this.xf(b);this.D().isLayout=!0;b=h.ta(this,new a.Z(0,0,c,d));this.D().isLayout=!1;return new a.vj(b.a,b.b)};a.vf.prototype.ta=function(b,d,e){this.Bc.OQ();this.xf(b);isNaN(d)||isNaN(e)||(this.xb=d,this.Kb=e);this.D().isLayout=!1;this.Fl();this.gw=
  [];this.Lx=[];this.we=null;this.xsa=[];a.B.Va()||this.I.bs(new c(this.I,this));this.lr();this.Bma=h.ta(this,new a.Z(0,0,this.xb,this.Kb));(b=this.D().highlightedCategories)&&0<b.length&&this.Xe(b);this.ys();return this.Bma};a.vf.prototype.Xe=function(b){this.D().highlightedCategories=b&&0<b.length?b.slice():null;a.uh.Xe(b,this.gw,!0)};a.vf.prototype.ag=function(a,b){var c=a.type;if("categoryHighlight"==c&&"dim"==this.D().hoverBehavior){var d=this.gw;this!=b&&this.Xe(a.categories);for(var e=0;e<d.length;e++)if(d[e].getId()==
  a.categories){this.rRa.scrollIntoView(d[e].Re()[0]);break}}this!=b&&"adfShowPopup"!=c&&"adfHidePopup"!=c||this.dispatchEvent(a)};a.vf.prototype.kla=function(b){if(b.Re()[0]instanceof a.ja)this.Lx.push(b);else{var c=this.D().hideAndShowBehavior;(null!=b.Qg()||null!=b.Ah()||b.gk()||"none"!=c&&"off"!=c)&&this.Lx.push(b);this.gw.push(b)}};a.vf.prototype.lla=function(a){this.we=a.clone()};a.vf.prototype.Y6a=function(a){this.xsa.push(a)};a.vf.prototype.oh=function(){return new f(this)};a.vf.prototype.oM=
  function(){return null!=this.I?this.I.lf():null};a.vf.prototype.Tfa=function(a,b){if(null!=this.I){for(var c=this.Lx,d=0;d<c.length;d++)if(c[d].getId()==a.getId()){this.I.Zu(c[d]);b&&c[d].Sf();break}if(c=this.oM())d=c.Re()[0],d.Gd("label",c.Ed()),this.u().OI(d)}};a.vf.prototype.aa=function(b){var c=new a.Z(0,0,this.xb,this.Kb);return b&&b!==this?this.kj(c,b):c};a.vf.prototype.oC=function(a){return a&&a!==this?this.kj(this.Bma,a):this.Bma};a.vf.prototype.em=function(){return a.H.va(a.H.Ia,"LEGEND")};
  a.vf.prototype.gQa=function(b){if(b&&!(0>=b.length))for(var c=this.D().hiddenCategories,d=0;d<b.length;d++){var e=b[d];e.sections&&(c=this.gQa(e.sections));if((e=e.items)&&!(0>=e.length))for(var f=0;f<e.length;f++){var p=e[f],w=h.Uda(p);"hidden"==p.categoryVisibility&&0>a.na.kb(c,w)&&c.push(w);p.categoryVisibility=null}}};a.vf.prototype.lr=function(){if(this.g7()){var b=this.D(),c=b.hideAndShowBehavior;if("off"!=c&&"none"!=c||"dim"==b.hoverBehavior)this.u().bg("application"),this.u().V4(a.H.va(a.H.Ia,
  "COLON_SEP_LIST",[a.H.va(a.H.Ia,"DATA_VISUALIZATION"),a.Nd.II(this.em())]))}};a.vf.prototype.BI=function(){return 0<this.Lx.length};a.vf.nM=function(b){var c=b.yk.Hk("itemsCount");if(null!=c)return c;for(var c=0,d=b.D().sections,e=0;e<d.length;e++)c+=a.vf.jUa(d[e]);b.yk.Uh("itemsCount",c);return c};a.vf.jUa=function(b){var c=0;b.items&&(c+=b.items.length);if(b.qrb){b=b.qrb;for(var d=0;d<b.length;d++)c+=a.vf.jUa(b[d])}return c};a.v.F(f,a.Rd);f.prototype.zn=function(a){return(a=this.Ac.ab().lb(a))&&
  a instanceof b&&(a=a.getData(),a=this.$Ja(a,this.Nf))?"section"+a:null};f.prototype.$Ja=function(a,b){if(b.sections&&0<b.sections.length){for(var c=0;c<b.sections.length;c++){if(b.sections[c]==a)return"["+c+"]";var d=this.$Ja(a,b.sections[c]);if(d)return"["+c+"]"+d}return null}if(b.items&&0<b.items.length){for(c=0;c<b.items.length;c++)if(b.items[c]==a)return":item["+c+"]";return null}};f.prototype.bTa=function(a,b){if(b.sections&&0<b.sections.length){for(var c=0;c<b.sections.length;c++){var d=this.bTa(a,
  b.sections[c]);if(d)return"["+c+"]"+d}return null}if(b.items&&0<b.items.length){for(c=0;c<b.items.length;c++)if(b.items[c].text==a.name)return":item["+c+"]";return null}};f.prototype.Bua=function(a,b){var c=b.indexOf("["),d=b.indexOf("]");if(0<=c&&0<=d){var c=b.substring(c+1,d),e=b.indexOf(":");b=b.substring(d+1);d=b.indexOf("]");return 0<=b.indexOf("[")&&0<=d?this.Bua(a.sections[c],b):0==e?a.items[c]:a.sections[c]}};f.prototype.ph=function(b){if(b==a.Rd.qD)return this.RF(this.Ac);b=this.Bua(this.Nf,
  b);for(var c=this.Ac.gw,d=0;d<c.length;d++){var e=c[d].getData();if(b==e)return c[d].Re()[0].Wa()}return null};f.prototype.uC=function(){return this.Nf.title};f.prototype.getItem=function(a){for(var b,c=a.shift(),d=this.Nf;void 0!=c;)0<a.length?d=d.sections[c]:b=d.items[c],c=a.shift();return b?{text:b.text?b.text:null}:null};f.prototype.anb=function(a){for(var b,c=a.shift(),d=this.Nf;void 0!=c;)0<a.length?d=d.sections[c]:b=d.sections[c],c=a.shift();return{title:b.title?b.title:null,items:b.items?
  this.uJa(b.items):null,sections:b.sections?this.xJa(b.sections):null}};f.prototype.uJa=function(a){for(var b=[],c=0;c<a.length;c++)b.push({text:a[c].text});return b};f.prototype.xJa=function(a){for(var b=[],c=0;c<a.length;c++)b.push({title:a[c].title?a[c].title:null,items:a[c].items?this.uJa(a[c].items):null,sections:a[c].sections?this.xJa(a[c].sections):null});return b};a.v.F(e,a.eb);e.xv={skin:a.j.xv,titleStyle:new a.j("color: #737373;"),_sectionTitleStyle:new a.j("color: #737373;"),layout:{titleGapWidth:17,
  titleGapHeight:9,symbolGapWidth:7,symbolGapHeight:4,rowGap:4,columnGap:10,sectionGapHeight:16,sectionGapWidth:24}};e.pf={skin:a.j.pf,textStyle:new a.j(a.eb.Pm),titleStyle:new a.j(a.eb.zN+"color: #333333;"),_sectionTitleStyle:new a.j(a.eb.zN+"color: #333333;")};e.lh={skin:a.j.Hg,orientation:"vertical",position:null,backgroundColor:null,borderColor:null,textStyle:new a.j(a.eb.Mt+"font-size: 11px; color: #333333;"),titleStyle:new a.j(a.eb.Mt+"font-size: 12px; color: #003d5b;"),titleHalign:"start",hiddenCategories:[],
  hideAndShowBehavior:"off",hoverBehavior:"none",hoverBehaviorDelay:200,scrolling:"asNeeded",halign:"start",valign:"top",drilling:"off",_color:"#a6acb1",_markerShape:"square",_lineWidth:3,layout:{outerGapWidth:3,outerGapHeight:3,titleGapWidth:8,titleGapHeight:3,symbolGapWidth:5,symbolGapHeight:4,rowGap:0,columnGap:8,sectionGapHeight:6,sectionGapWidth:15},isLayout:!1};e.Bh=function(b,c){var d=Math.min(a.Ca.fF(b.u(),b.D().textStyle)/14,1);return Math.ceil(c*d)};e.prototype.Iua=function(){return{sections:{items:{_dataContext:!0}}}};
  a.v.F(d,a.I);d.prototype.Qj=function(a){d.C.Qj.call(this,a);var b=this.lb(a.target);if(b){var c=this.jxa(b),b=this.Qva(b,a);(c||b)&&a.stopPropagation()}};d.prototype.Py=function(b){d.C.Py.call(this,b);if(b=this.lb(b.target)){var c=b instanceof a.vi?b.Jr:null;c&&c.isCollapsible&&c.button&&c.button.b3();this.sD(b)}};d.prototype.To=function(b){d.C.To.call(this,b);(b=this.lb(b.target))&&(b=b instanceof a.vi?b.Jr:null)&&b.isCollapsible&&b.button&&b.button.NE()};d.prototype.Xw=function(a){var b=this.lb(a.target);
  if(b){var c=a.iya,d=this.jxa(b);a=this.Qva(b,a);(d||a)&&c&&c.preventDefault()}};d.prototype.jxa=function(b){var c=this.Ac.D().hideAndShowBehavior;if("none"==c||"off"==c)return!1;var d=b.Yd?b.Yd():null;if(!d||0>=d.length)return!1;for(var e=b.Yd()[0],c=this.Ac.D().hiddenCategories||[],c=c.slice(),f=b.Re(),p=0;p<f.length;p++){var w=f[p];w instanceof a.za?w.TI(b.fc()):w instanceof a.Rect&&b.nya()}b=d[0];h.Qea(e,this.Ac)?(c.splice(a.na.kb(c,e),1),b=a.Za.ypb(b,c)):(c.push(e),b=a.Za.xpb(b,c));this.Ac.D().hiddenCategories=
  c;this.kl(b,this.Ac);return!0};d.prototype.Qva=function(c,d){if(c&&c.Ah&&c.Ah())return this.kl(a.Za.GI("action",c.Ah(),c.getId()),this.Ac),!0;if(c instanceof b&&c.gk()){var e=c.getId();this.kl(a.Za.ifa(e,e,null),this.Ac);return!0}return(e=c instanceof a.vi?c.Jr:null)&&e.isCollapsible?(this.yXa(d,e.id),!0):!1};d.prototype.yq=function(b,c,d){b=this.Ac.D();"none"==b.hoverBehavior||c.Re&&c.Re()[0]instanceof a.ja||(c=c.Yd?c.Yd():[],b.highlightedCategories=d?c.slice():null,d=a.Za.HI(b.highlightedCategories,
  d),b=a.Ta.Ur(b.hoverBehaviorDelay),this.LJ.ag(d,this.Ac.gw,b,!0))};d.prototype.Owa=function(a,b){var c=b.getId();this.yXa(a,c)};d.prototype.yXa=function(b,c){for(var d=this.Ac.D(),e=0;e<c.length;e++)d=d.sections[c[e]];d.expanded="off"==d.expanded?"on":"off";b.type==a.MouseEvent.Be&&(d=this.lb(this.ne(b)),d.Fd&&this.Zu(d.Fd(b)));e=(d=this.Ac.oM())?d.Kd():!1;this.Ac.ta();d&&this.Ac.Tfa(d,e);this.qe();d=this.Ac.oC();this.kl(new a.Gn(d.a,d.b,d.x,d.y),this.Ac)};d.prototype.NA=function(){return this.Ac.D()._isScrollingLegend?
  a.I.jG:a.I.Ty};d.prototype.Gk=function(){return this.Ac};d.prototype.A4=function(){return!0};d.prototype.CN=function(){var a=this.Ef.tB;return a instanceof b&&null!=a.getData()._dataContext?"series":null};d.prototype.aZ=function(){var a=this.Ef.tB;return a instanceof b?[a.getData()._dataContext]:[]};d.prototype.NS=function(a){a=this.Ac.Md(this.u().eh(a.pageX,a.pageY));return this.Ac.we.Kj(a.x,a.y)?"legend":null};d.prototype.Iha=function(){return{}};d.prototype.Sja=function(a){if("legend"==this.NS(a)){a=
  this.Ac.D()._dropColor;var b=this.Ac.Bc.Hk("background");b&&b.fb(a)}};d.prototype.Nga=function(){var a=this.Ac.Bc.Hk("background");if(a){var b=this.Ac.D().backgroundColor;b?a.fb(b):a.Wb()}};a.v.F(c,a.Cb);c.prototype.Init=function(a,b){c.C.Init.call(this,a);this.Ac=b};c.prototype.ik=function(b){var d=b.keyCode,e=this.yb.lf(),f=e&&e.Re()[0]instanceof a.ja,h=null;null==e&&d==a.KeyboardEvent.Mh?(d=this.Ac.Lx,0<d.length&&(a.I.sc(b),h=this.kI(d))):e&&(d==a.KeyboardEvent.Mh?(a.I.sc(b),h=e):d==a.KeyboardEvent.Xi||
  d==a.KeyboardEvent.ji?(d==a.KeyboardEvent.Xi&&this.yb.Qva(e,b),f?this.yb.Owa(b,e.Re()[0]):this.yb.jxa(e),a.I.sc(b)):!f||d!=a.KeyboardEvent.Kf&&d!=a.KeyboardEvent.wf?h=c.C.ik.call(this,b):(this.yb.Owa(b,e.Re()[0]),a.I.sc(b)));h&&this.Ac.rRa.scrollIntoView(h.Re()[0]);return h};a.v.F(b,a.v);b.prototype.Init=function(a,b,c,d,e,f){this.Ac=a;this.Ag=b;this.Pn=c;this.xc=(this.FO=h.Uda(this.Pn))?this.FO:c.title;this.Zt=c.action;this.Qv=f;this.Fgb=c._spb;this.Sl=d;this.t$=e;this.dd=!1;if(this.Zt||this.Qv)for(a=
  0;a<this.Ag.length;a++)this.Ag[a].setCursor("pointer")};b.mb=function(a,c,d,e,f,h){if(!a||!d)return null;d=new b(c,a,d,e,f,h);c.kla(d);for(e=0;e<a.length;e++)c.ab().mb(a[e],d);return d};b.prototype.getData=function(){return this.Pn};b.prototype.fc=function(){return this.Pn.color};b.prototype.getId=function(){return this.xc};b.prototype.Re=function(){return this.Ag};b.prototype.Yd=function(){return null!=this.FO?[this.FO]:null};b.prototype.Ah=function(){return this.Zt};b.prototype.gk=function(){return this.Qv};
  b.prototype.Af=function(){return this.Fgb};b.prototype.Ed=function(){var b=[],c=this.Ac.D(),d=this.Ac.D().hideAndShowBehavior,e=h.Qea(this.FO,this.Ac),f=this.getData();if(this.Ag[0]instanceof a.ja)return b.push(a.H.va(a.H.Ia,"off"==f.expanded?"STATE_COLLAPSED":"STATE_EXPANDED")),a.oa.Fk(f.title,b);"off"!=d&&"none"!=d&&b.push(a.H.va(a.H.Ia,e?"STATE_HIDDEN":"STATE_VISIBLE"));this.gk()&&b.push(a.H.Cf(c,"stateDrillable",a.H.Ia,"STATE_DRILLABLE"));return null!=f.shortDesc?a.oa.Fk(f.shortDesc,b):0<b.length?
  a.oa.Fk(f.text,b):null};b.prototype.nya=function(){!a.B.hj()&&this.Ag[0]&&this.Ag[0].Gd("label",this.Ed())};b.prototype.Fd=function(b){return b.type==a.MouseEvent.Be?this:a.Cb.Fd(this,b,this.Ac.Lx,!0)};b.prototype.tf=function(b){return this.Ag[0]?this.Ag[0].aa(b):new a.Z(0,0,0,0)};b.prototype.Jm=function(){return this.Ag[0]?this.Ag[0].Wa():null};b.prototype.Sf=function(){this.dd=!0;this.Ag[0]&&(this.Ag[0]instanceof a.ja?this.Ag[0].b3():this.Ag[0].Tb(a.B.kua()))};b.prototype.Qd=function(){this.dd=
  !1;this.Ag[0]&&(this.Ag[0]instanceof a.ja?this.Ag[0].NE():this.Ag[0].Ga(null))};b.prototype.Kd=function(){return this.dd};b.prototype.Ri=function(){return this.Sl};b.prototype.Qg=function(){return this.t$};b.prototype.Ul=function(){return this.Pn.color};b.prototype.Xl=function(){return!0};b.prototype.Im=function(){return[this.getId()]};b.prototype.ht=function(){return this.Re()};var h={};a.v.F(h,a.v);h.Eka=2;h.AFa=.6;h.dFa=10;h.nl=12;h.XZ=2;h.ta=function(b,c){var d=b.D(),f=b.u(),r=a.B.da(f);b.lla(c);
  d.isLayout||h.Lr(b,c);var p=new a.Lh(f,c.a,c.b),w=new a.ma(f);p.Ea.A(w);b.A(p);b.rRa=p;var x=e.Bh(b,d.layout.outerGapWidth),v=e.Bh(b,d.layout.outerGapHeight);c.x+=x;c.y+=v;c.a-=2*x;c.b-=2*v;if(0>=c.a||0>=c.b)return new a.vj(0,0);f=h.ifb(b,w,new a.Z(c.x,c.y,c.a,c.b));if(0==f.a||0==f.b)return new a.vj(0,0);p.Q4();f.b>c.b?(f.b=c.b,d._isScrollingLegend=!0):d._isScrollingLegend=!1;var z=p=0,u=null!=d.hAlign?d.hAlign:d.halign;"center"==u?p=c.x-f.x+(c.a-f.a)/2:"end"==u&&(p=r?c.x-f.x:c.x-f.x+c.a-f.a);r=null!=
  d.vAlign?d.vAlign:d.valign;"middle"==r?z=c.y-f.y+(c.b-f.b)/2:"bottom"==r&&(z=c.y-f.y+c.b-f.b);r=new a.Z(f.x+p-x,f.y+z-v,f.a+2*x,f.b+2*v);if(d.isLayout)return r;(p||z)&&w.Na(p,z);d=b.xsa;for(w=0;w<d.length;w++)a.Dn.align(f,d[w].Snb,d[w].text,d[w].text.Pc().a);return r};h.ifb=function(a,b,c){var d=a.D();c=c.clone();var f=h.qQ(a,b,d.title,c,null,!0);if(f){var p=f.Pc(),w=e.Bh(a,d.layout.titleGapHeight);c.y+=p.b+w;c.b-=Math.floor(p.b+w)}a=h.POa(a,b,d.sections,c,[]);return f?p.tj(a):a};h.Lr=function(b,
  c){var d=b.D(),e=d.backgroundColor,f=d.borderColor,d=d.dnd?d.dnd.drop.legend:{};if(e||f||0<Object.keys(d).length)d=new a.Rect(b.u(),c.x,c.y,c.a,c.b),e?d.fb(e):d.Wb(),f&&(d.Tb(f),d.md()),b.A(d),b.Bc.Uh("background",d)};h.qQ=function(b,c,d,e,f,h,w,x){var v=b.D(),z=c.u(),u=a.B.da(z);if(!d)return null;d=new a.ca(z,d,e.x,e.y);z=v.titleStyle;f&&f.titleStyle?z=new a.j(f.titleStyle):f&&v._sectionTitleStyle&&(z=v._sectionTitleStyle);d.Bb(z);return a.Ca.kd(d,e.a,Infinity,c)?(u&&d.Fa(e.x+e.a-d.Pc().a),v.isLayout?
  c.removeChild(d):(c={id:w,button:x},c.isCollapsible=f&&("on"==f.collapsible||1==f.collapsible),b.ab().mb(d,new a.vi(d.Yq(),null,null,c)),h&&b.Y6a({text:d,Snb:f&&f.titleHalign?f.titleHalign:v.titleHalign})),d):null};h.POa=function(b,c,d,f,r){var p=b.D();null==p.symbolWidth&&null==p.symbolHeight?(p.symbolWidth=h.dFa,p.symbolHeight=h.dFa):(null==p.symbolWidth?p.symbolWidth=p.symbolHeight:null==p.symbolHeight&&(p.symbolHeight=p.symbolWidth),p.symbolWidth=parseInt(p.symbolWidth),p.symbolHeight=parseInt(p.symbolHeight));
  for(var w=e.Bh(b,p.layout.sectionGapHeight),x=e.Bh(b,p.layout.titleGapHeight),v=e.Bh(b,p.layout.sectionGapWidth),z=h.obb(b),p="vertical"!=p.orientation,u=null,D=f.clone(),C,B=0;B<d.length;B++){var A=r.concat([B]),F="off"==d[B].expanded||0==d[B].expanded?x:w;p?(C=h.GOa(b,c,d[B],D,z),C.a>D.a?(D.a<f.a&&(f.y+=C.b+F,f.b-=C.b+F),C=C.a<=f.a?h.GOa(b,c,d[B],f,z):h.SOa(b,c,d[B],f,z,A,!0),f.y+=C.b+F,f.b-=C.b+F,D=f.clone()):(D.a-=C.a+v,a.B.da(b.u())||(D.x+=C.a+v))):(C=h.SOa(b,c,d[B],f,z,A,!1),f.y+=C.b+F,f.b-=
  C.b+F);u=u?u.tj(C):C}return u};h.q9a=function(c,d,e,f,r,p,w,x,v,z,u){var D=h.Jma(c,f,r+"Enabled",p,w),C=h.Jma(c,f,r+"Over",p,w);f=h.Jma(c,f,r+"Down",p,w);c=new a.ja(c,D,C,f,null,v,z,u);d=b.mb([c],d,e,x,null,!1);c.bg("button");d.nya();return c};h.Jma=function(b,c,d,e,f){var p=a.B.da(b)?"RTL":"";b=new a.Image(b,c[d+p]?c[d+p]:c[d],e,f,h.nl,h.nl);b.Wb();return b};h.SOa=function(b,c,d,f,r,p,w){if(d){var x=b.D(),v=e.Bh(b,x.layout.symbolGapWidth),z=e.Bh(b,x.layout.rowGap),u=e.Bh(b,x.layout.columnGap),D=
  b.u(),C=a.B.da(D);f=f.clone();"off"!=x.scrolling&&(f.b=Infinity);var B,A="on"==d.collapsible||1==d.collapsible,F;if(A){B=C?f.x+f.a-h.nl:f.x;if(!x.isLayout){var y="off"==d.expanded||0==d.expanded;F=y?"closed":"open";var y=a.H.va(a.H.Ia,y?"EXPAND":"COLLAPSE",null),E=b.ab();F=h.q9a(D,b,d,x._resources,F,B,f.y,y,p,E.Owa,E);c.A(F)}B=new a.Z(B,f.y,h.nl,h.nl);D=e.Bh(b,x.layout.symbolGapWidth);C||(f.x+=h.nl+D);f.a-=h.nl+D}D=(D=h.qQ(b,c,d.title,f,d,!A&&1>=p.length,p,F))?D.Pc():new a.Z(C?f.x+f.a:f.x,f.y,0,0);
  D=B?D.tj(B):D;if(!d.items&&!d.sections||"off"==d.expanded||0==d.expanded)return D;0<D.b&&(A=e.Bh(b,x.layout.titleGapHeight),f.y+=D.b+A,f.b-=D.b+A);d.sections&&(p=h.POa(b,c,d.sections,f,p),D=D.tj(p));if(!d.items)return D;A=h.C8a(b,f,r,d.items,w);w=A.numCols;p=A.numRows;A=A.width;B=f.y;if(0==p||0==w)return D;F=Math.min(w*(A+u)-u,f.a);D=D.tj(new a.Z(C?f.x+f.a-F:f.x,f.y,F,p*(r+z)-z));if(x.isLayout)return D;x=A-x.symbolWidth-v;v=0;F=1;y=d.items.length;for(E=0;E<y&&(h.O_(b,c,d.items[E],f,x,r,E),f.y+=r+
  z,v++,v===p&&F!==w&&(f.y=B,f.a-=A+u,C||(f.x+=A+u),v=0,F++),v!==p);E++);return D}};h.GOa=function(b,c,d,f,r){if(d){var p=b.D(),w=p.symbolWidth,x=e.Bh(b,p.layout.symbolGapWidth),v=e.Bh(b,p.layout.columnGap),z=e.Bh(b,p.layout.titleGapWidth),u=d.items.length,D=a.B.da(b.u()),C=f.clone(),B=h.qQ(b,c,d.title,f,d,!1),A=B?B.Pc():new a.Z(D?f.x+f.a:f.x,f.y,0,0);if(!d.items)return A;0<A.a&&(C.a-=A.a+z,D||(C.x+=A.a+z));var z=[],F=f.a-C.a,y,E;for(E=0;E<u;E++)y=d.items[E],y=Math.ceil(a.Ca.Bea(b.u(),y.text,p.textStyle)),
  F+=y+w+x+v,z.push(y);0<u&&(F-=v);A=new a.Z(D?f.x+f.a-F:f.x,f.y,F,Math.max(r,A.b));if(p.isLayout||F>f.a)return c.removeChild(B),A;for(E=0;E<u;E++)y=d.items[E],h.O_(b,c,y,C,z[E],r,E),f=z[E]+w+x,C.a-=f+v,D||(C.x+=f+v);return A}};h.C8a=function(b,c,d,f,h){for(var p=b.D(),w=100<a.vf.nM(b),x=0,v=0;v<f.length;v++){var z=f[v];w?(z=new a.ca(b.u(),z.text),z.Bb(p.textStyle),z=a.Ca.Mj(z).a):z=a.Ca.Bea(b.u(),z.text,p.textStyle);z>x&&(x=z)}w=p.symbolWidth;z=e.Bh(b,p.layout.symbolGapWidth);v=e.Bh(b,p.layout.rowGap);
  b=e.Bh(b,p.layout.columnGap);x=Math.ceil(w+z+x);h?(h=Math.min(Math.floor((c.a+b)/(x+b)),f.length),d=Math.min(Math.floor((c.b+v)/(d+v)),Math.ceil(f.length/h)),h=Math.ceil(f.length/d),d=Math.ceil(f.length/h)):Infinity==c.b?(h=1,d=f.length):(d=Math.min(Math.floor((c.b+v)/(d+v)),f.length),h=Math.ceil(f.length/d),d=Math.ceil(f.length/h));c=Math.min(x,(c.a-b*(h-1))/h);return c<w?{width:0,numCols:0,numRows:0}:{width:c,numCols:h,numRows:d}};h.obb=function(b){var c=b.D(),d=new a.ca(b.u(),"Test");d.Bb(c.textStyle);
  d.Ng();d=a.Ca.Mj(d).b;b=c.symbolHeight+e.Bh(b,c.layout.symbolGapHeight);return Math.ceil(Math.max(d,b))};h.O_=function(c,d,f,m,r,p){var w=c.D(),x=c.u(),v=a.B.da(x),z=w.symbolWidth,u=e.Bh(c,w.layout.symbolGapWidth),D=v?m.x+m.a-z:m.x,C=v?m.x+m.a-z-u:m.x+z+u,B=h.B9a(c,D,m.y,p,f),A=f.text,F;A&&(F=h.C9a(d,r,A,w.textStyle))&&(F.Fa(C),a.Ca.EW(F,m.y+p/2),v&&F.Sh());d.A(B);m=new a.Rect(x,v?C-r-h.XZ:D-h.XZ,m.y-h.XZ,z+u+r+2*h.XZ,p+2*h.XZ);m.Wb();w=w.hideAndShowBehavior;"none"!=w&&"off"!=w&&m.setCursor("pointer");
  d.A(m);d=[m,B];null!=F&&d.push(F);F=b.mb(d,c,f,null!=F?F.Yq():null,f.shortDesc,h.Dcb(c,f));h.Qea(h.Uda(f),c)&&(B.TI(F.fc()),B.ea().He());if("none"!=w&&"off"!=w||null!=f.shortDesc)m.bg("img"),F.nya()};h.Dcb=function(a,b){return"on"==b.drilling?!0:"off"==b.drilling?!1:"on"==a.D().drilling};h.C9a=function(b,c,d,e){d=new a.ca(b.u(),d);d.Bb(e);return d=a.Ca.kd(d,c,Infinity,b)?d:null};h.B9a=function(b,c,d,e,f){var p=b.D(),w=b.u(),x=null!=f.type?f.type:f.symbolType;f.markerShape||(f.markerShape=p._markerShape);
  f.color||(f.color=p._color);f.lineWidth||(f.lineWidth="lineWithMarker"==x?h.Eka:p._lineWidth);var v=p.symbolWidth,p=p.symbolHeight,z=d+e/2,u=c+v/2;"line"==x?w=h.kIa(w,c,d,v,e,f):"lineWithMarker"==x?(w=h.kIa(w,c,d,v,e,f),h.Qea(h.Uda(f),b)||w.A(h.iz(b,u,z,v*h.AFa,p*h.AFa,f))):"image"==x?w=h.Lma(b,c,d,v,p,e,f):"_verticalBoxPlot"==x?(p=Math.max(4*Math.round(p/4),4),w=new a.ma(w),w.A(h.iz(b,u,z+p/4,v,p/2,h.P$(f,"q2"))),w.A(h.iz(b,u,z-p/4,v,p/2,h.P$(f,"q3")))):"_horizontalBoxPlot"==x?(c=a.B.da(w),v=Math.max(4*
  Math.round(v/4),4),c=v/4*(c?1:-1),w=new a.ma(w),w.A(h.iz(b,u+c,z,v/2,p,h.P$(f,"q2"))),w.A(h.iz(b,u-c,z,v/2,p,h.P$(f,"q3")))):w=h.iz(b,u,z,v,p,f);return w};h.Lma=function(b,c,d,e,f,h,w){return new a.Ff(b.u(),c+e/2,d+h/2,e,f,null,w.source)};h.iz=function(b,c,d,e,f,h){var w=b.u(),x=b.D();b=h.markerShape;var v=h.markerColor?h.markerColor:h.color,z=h.markerStyle?h.markerStyle:h.style,u=h.markerClassName?h.markerClassName:h.className,D=h.pattern;D&&"none"!=D?(e=new a.za(w,b,x.skin,0,0,e,f,null,null,!0),
  e.qa(new a.wc(D,v,"#FFFFFF")),e.Na(c,d)):(e=new a.za(w,b,x.skin,c,d,e,f,null,null,!0),e.fb(v));h.borderColor&&e.Tb(h.borderColor,null,h._borderWidth?h._borderWidth:1);"square"!=b&&"rectangle"!=b||e.md();e.He(u).ea(z);return e};h.kIa=function(b,c,d,e,f,h){d+=f/2;b=new a.Gc(b,c,d,c+e,d);c=new a.xa(h.color,1,h.lineWidth);e=h.lineStyle;"dashed"==e?c.bo(a.Yc.Vx(e),"4,2,4"):"dotted"==e&&c.bo(a.Yc.Vx(e),"2");b.He(h.className).ea(h.style);b.Ga(c);b.md();return b};h.P$=function(a,b){return{markerShape:"rectangle",
  color:a._boxPlot[b+"Color"],pattern:a._boxPlot["_"+b+"Pattern"],className:a._boxPlot[b+"ClassName"],style:a._boxPlot[b+"Style"]}};h.Uda=function(a){var b=null;return b=a.categories&&0<a.categories.length?a.categories[0]:a.id?a.id:a.text};h.Qea=function(b,c){var d=c.D().hiddenCategories;return!d||0>=d.length?!1:-1!==a.na.kb(d,b)};a.Ha(a,"Legend",a.vf);a.Ha(a.vf,"newInstance",a.vf.newInstance);a.Ha(a.vf.prototype,"destroy",a.vf.prototype.ya);a.Ha(a.vf.prototype,"getAutomation",a.vf.prototype.oh);a.Ha(a.vf.prototype,
  "getPreferredSize",a.vf.prototype.ot);a.Ha(a.vf.prototype,"highlight",a.vf.prototype.Xe);a.Ha(a.vf.prototype,"render",a.vf.prototype.ta);a.Ha(f.prototype,"getDomElementForSubId",f.prototype.ph);a.Ha(f.prototype,"getItem",f.prototype.getItem);a.Ha(f.prototype,"getSection",f.prototype.anb);a.Ha(f.prototype,"getTitle",f.prototype.uC)})(dvt);
    return dvt;
  });
  