function A_mc(a,b,c){return AdfDhtmlPivotTablePeer.W(a.b.bc,a.b.pc+"::ph::"+b+"::"+c)}function A_kc(a){return a.getComponent().iz()}function A_nc(a,b,c){var d=null;null==d&&(d=A_mc(a,b,c));return AdfAgent.AGENT.getAttribute(d,"_layerId")}function A_lc(a,b,c,d){null==d&&(d=A_mc(a,b,c));return null==d?!1:AdfAgent.AGENT.getBooleanAttribute(d,"_canPivot")}function A_oc(a,b,c){var d=null;if(null==d||void 0==d)d=A_mc(a,b,c);return AdfAgent.AGENT.getBooleanAttribute(d,"_isMeasure")}
function A_Hf(a,b,c,d){if(!a.b.Nw&&!a.Ak&&(A_kc(a)&&A_lc(a,b,c,d)||a.getComponent().bo())){a.nc=d;var e=a.getComponent().bo(),f=a.b.bc,g=f._width,h=f.qJ;void 0==h&&(h=f.offsetHeight-f.clientHeight,f.qJ=h);var l=AdfAgent.AGENT.getPlatform()==AdfAgent.IE_PLATFORM,m=l&&8<=AdfAgent.AGENT.getVersion(),n=l&&!m,p=a.b.U,l=p&&n,m=p&&m;b==AdfPivotTableUtils.o?(b=a.b.wa[1][0].childNodes[0],p=b.rows[c+1],b=p.cells[0],b=b.offsetHeight+1,c==a.b.Qb-1&&e&&++b,c=a.b.za?0:a.b.nb[1].scrollTop,h=p.offsetTop-h-c-1,n&&
h--,c=d.rows[1].cells[0],n=Math.max(b-10,0),c.style.height=n+"px",p=d.offsetHeight-b,0!=p&&(c.style.height=n-p+"px"),n=d.rows[0].cells[0].offsetWidth,c=d.rows[0].cells[1],e?(c.style.display="",e=c,void 0==e._offsetWidth&&(e._offsetWidth=e.offsetWidth),n+=e._offsetWidth):c.style.display="none",l=l?0:g+f.scrollLeft-n,a.Gr=n):(b=a.b.Pa[1][0].childNodes[0],p=b.rows[0],b=p.cells[c+1],g=b.offsetWidth,n=g+1,b=b.offsetLeft,m&&(b=a.b.Tb[1].scrollWidth-b-g),c=a.b.za?0:a.b.Tb[1].scrollLeft,l=b-c-(l?0:1),c=d.rows[0].cells[1],
g=Math.max(n-10,0),c.style.width=g+"px",p=d.offsetWidth-n,0!=p&&(c.style.width=g-p+"px"),b=d.rows[0].cells[0].offsetHeight,c=d.rows[1].cells[0],e?(c.style.display="",b+=c.offsetHeight):c.style.display="none",h=f._height-h+f.scrollTop-b,a.Gr=b);d.style.width=n+"px";d.style.height=b+"px";d.style.top=h+"px";d.style[m?"right":"left"]=l+"px";d.style.tableLayout="fixed";d.style.position="absolute";d.style.overflow="hidden";d.style.zIndex=2;d.style.visibility="visible"}}
function A_Ye(a,b){a.Ak&&!b||!a.nc||(a.nc.style.visibility="hidden",a.nc=null)}function A_wc(a,b,c,d,e,f){var g=a.getComponent();b=new A_eh(g,b,c,d,e,f);b.setPartial(!0);g.queueEvent(b);b.isCanceled()?A_gf(a,A_Te(a)):(A_hf(a,AdfDhtmlPivotTablePeer.Ea),a.Qd=null,a.ma||a.Ec(a.ld,!0))}
function A_qc(a,b,c,d){var e=a.b.Tb[1],f=b.getElementPosition(e),g=e.scrollLeft,e=e.offsetWidth,h=A_8g(a.b.Pa[1]),l=Math.max(0,h._width-e);a.b.U&&(void 0==d&&(d=b.getWindowWidth()),c=d-c,f.x=d-f.x-e,g=l-g);c-=f.x;b=c+g;var m=h.childNodes[0].rows[0].cells,n=m.length,p=1,f=null;for(d=h=0;p<n&&!(f=m[p],h=f.offsetWidth,d+=h,d>=b);p++);m={};m.edge=AdfPivotTableUtils.s;m.layer=p-1;p=-1;0<l&&(c<4*AdfDhtmlPivotTablePeer.Re?0<g&&(p=Math.max(0,g-10)):c>e-4*AdfDhtmlPivotTablePeer.Re&&g<l&&(p=g+10));m.it=-1!=
p&&a.b.U?l-p:p;m.jt=-1;null!=f&&(0==a.b.Lb?(m.Yd=!0,m.Vn="after"):(m.Yd=!1,a=h>3*AdfDhtmlPivotTablePeer.Re?h/3:AdfDhtmlPivotTablePeer.Re,m.Vn=b-(d-h)<a?"before":b>d-a?"after":"swap"));return m}
function A_rc(a,b,c){var d=a.b.nb[1],e=b.getElementPosition(d),f=A_8g(a.b.wa[1]),g=f.childNodes[0],h=d.scrollTop;b=c-e.y+h;c-=e.y;e=d.offsetHeight;d=-1;e<f._height&&(c<4*AdfDhtmlPivotTablePeer.Re?(0<h&&(d=h-10),0>d&&(d=0)):c>e-4*AdfDhtmlPivotTablePeer.Re&&f._height-e>h&&(d=h+10));h=g.rows;c=h.length;f=0;for(g=1;g<c;g++){var l=h[g].cells[0],f=f+l.offsetHeight;if(f>=b)break}h={};h.edge=AdfPivotTableUtils.o;h.layer=g-1;h.jt=d;h.it=-1;null!=l&&(0==a.b.Qb?(h.Yd=!0,h.Vn="after"):(h.Yd=!1,a=l.offsetHeight,
l=a>3*AdfDhtmlPivotTablePeer.Re?a/3:AdfDhtmlPivotTablePeer.Re,h.Vn=b-(f-a)<l?"before":b>f-l?"after":"swap"));return h}
function A_xc(a,b,c,d){var e=b+":"+c+":"+d;if(a.Px!=e)if(A_yc(a),A_zc(a),a.Px=e,"swap"==d)A_tc(a,b,c,null);else{var f=a.b.U,g=A_fh(a.b,b).childNodes[0];indicator=a.b.Ox;e=indicator.style;if(b==AdfPivotTableUtils.s){c=g.rows[0].cells[c+1];g=a.b.Tb[1];g=g.ak-g.scrollLeft+c.offsetLeft-6;if(f?"before"==d:"after"==d)g+=c.offsetWidth;e.left=g+"px";e.width="10px";e.top=a.b.bc._height+"px";d=a.b.tb[1][1]._height;0<a.b.u[b]&&(d+=a.b.tb[0][1]._height);e.height=d+"px"}else c=g.rows[c+1].cells[0],g=0-a.b.nb[1].scrollTop+
c.offsetTop-6,"after"==d&&(g+=c.offsetHeight),e.top=g+"px",e.height="10px",e.left=a.b.tb[1][0<a.b.u[b]&&!f?0:1].ak+"px",d=a.b.tb[1][1]._width-1,0<a.b.u[b]&&(d+=a.b.tb[1][0]._width-1),e.width=d+"px";e.visibility="visible";e.zIndex=5}}function A_zc(a){var b=a.b.Ox;b&&(b.style.visibility="hidden");a.Px=""}function A_tc(a,b,c,d){if(null!=d||a.xk!=b||a.zk!=c)A_yc(a),a.xk=b,a.zk=c,A_gh(a,b,c,!1,d)}function A_yc(a){null!=a.xk&&null!=a.zk&&A_gh(a,a.xk,a.zk,!0,null);a.xk=null;a.zk=null}
function A_gh(a,b,c,d,e){for(var f=AdfAgent.AGENT,g=a.b.j[b];2>g;++g)for(var h=a.b.$[b][g],l=h.length,m=0;m<l;m++){var n=a,p=f,q=b,u=c,v=d,x=h[m].childNodes[0];if(q==AdfPivotTableUtils.s)for(var x=x.rows,w=x.length,y=1;y<w;y++){var r=x[y],r=r.cells,z=r.length;if(n.b.vS)H=r[z-1],u==A_6f(p,H)-1&&(A_hh(n,H,v,!0),A_ih(n,e,H,q));else for(var C=1;C<z&&!(C>u+1);C++){var H=r[C];if(u==A_6f(p,H)-1){A_hh(n,H,v,!0);A_ih(n,e,H,q);break}}}else for(r=x.rows[u+1],r=r.cells,z=r.length,p=n.b.U?x.offsetWidth:0,C=1;C<
z;C++)A_hh(n,r[C],v,!1),A_ih(n,e,r[C],q,p);e=null}A_sc(a,b,A_mc(a,b,c),d)}function A_ih(a,b,c,d,e){if(null!=b){if(d==AdfPivotTableUtils.s){var f=c.offsetWidth;if(void 0==b._width||b._width<f)b._width=f;b._height=c.offsetTop+c.offsetHeight}else{f=c.offsetHeight;if(void 0==b._height||b._height<f)b._height=f;b._width=c.offsetLeft+c.offsetWidth}b.appendChild(A_jh(a,d,c,b.Dk,b.$H,e))}}
function A_jh(a,b,c,d,e,f){var g=document.createElement("DIV"),h=AdfAgent.AGENT.getComputedStyle(c),l=parseInt(h.paddingTop),m=parseInt(h.paddingRight),n=parseInt(h.paddingBottom),p=parseInt(h.paddingLeft);b==AdfPivotTableUtils.s?(g.className=a.A(AdfPivotTableUtils.Bp),e=c.offsetTop,d&&(e+=d),g.style.top=e+"px",g.style.width=c.offsetWidth-(p+m+2)+"px",g.style.height=c.offsetHeight-(l+n+1)+"px"):(g.className=a.A(AdfPivotTableUtils.Io),a.b.U?(d=f-c.offsetLeft-c.offsetWidth,e&&(d+=e),g.style.right=d+
"px"):(d=c.offsetLeft,e&&(d+=e),g.style.left=d+"px"),g.style.width=c.offsetWidth-(p+m+1)+"px",g.style.height=c.offsetHeight-(l+n+2)+"px");g.style.color=h.color;g.innerHTML=c.innerHTML;return g}function A_hh(a,b,c,d){c?b.uw&&(b.className=b.uw):(b.uw=b.className,b.className=d?a.A(AdfPivotTableUtils.Ep):a.A(AdfPivotTableUtils.Ko))}
function A_sc(a,b,c,d){null!=c&&(b==AdfPivotTableUtils.s?(A_kh(a,c.rows[0].cells[0],d,a.A(AdfPivotTableUtils.zp)),A_kh(a,c.rows[0].cells[1],d,a.A(AdfPivotTableUtils.yp)),A_kh(a,c.rows[0].cells[2],d,a.A(AdfPivotTableUtils.Ap)),A_kh(a,c.rows[1].cells[0],d,a.A(AdfPivotTableUtils.Dp))):(A_kh(a,c.rows[0].cells[0],d,a.A(AdfPivotTableUtils.No)),A_kh(a,c.rows[0].cells[1],d,a.A(AdfPivotTableUtils.Oo)),A_kh(a,c.rows[1].cells[0],d,a.A(AdfPivotTableUtils.Mo)),A_kh(a,c.rows[2].cells[0],d,a.A(AdfPivotTableUtils.Lo))))}
function A_kh(a,b,c,d){c?b.className=d:(b.className=d,A_d.ya(b,a.A(AdfPivotTableUtils.Hp)))}
function A_If(a,b,c){var d,e,f;if(a.nn)e=a.Xj,f=a.Yj,d=a.rr;else{if(!A_kc(a))return;e=A_if(a);if(null==e||e==AdfPivotTableUtils.O)return;d=A_Gf(a);if(!A_lc(a,e,d))return;f=A_lh(d);a.jg=e;a.mn=f;d=A_mh(a,e,d)}if(b==AdfKeyStroke.ARROWUP_KEY&&(e==AdfPivotTableUtils.o&&0==f||a.jg==AdfPivotTableUtils.o&&1==a.mn&&1==f)){var g=a.Wd();if(null!=g){a.jn?c=a.Tq:(d=a.jg,f=Math.floor(a.mn/2),c={},c.edge=d,c.layer=f,c.layerId=A_nc(a,d,f));A_Ze(a,!0);a=g.getPeer();a.Ke=!0;c.edge!=A_X.Hf?a.rc=c:(c=c.layer,c=A_Ie(a,
a.getDomElement(),c),a.ba=c.id,a.ka=a.ba,null!=a.Bg&&(A__(a,c,c,"focus"),a.Bg=null));AdfFocusUtils.focusElement(a.getDomElement());c=A_te(a);null!=c?(a.J=c.id,a.J==a.ka?(c=A_Z(a.J),A__(a,c,c,"drop"),a.aa=A_X.Se):(A_He(a,AdfAgent.AGENT.getElementPageBounds(c),c.parentNode),a.aa=A_X.je),A_Be(a)):(A_Le(a,A_qe(a,a.getDomElement())),a.aa=A_X.je);return}}var h=b==(a.b.U?AdfKeyStroke.ARROWLEFT_KEY:AdfKeyStroke.ARROWRIGHT_KEY)||b==AdfKeyStroke.ARROWDOWN_KEY,g=b==AdfKeyStroke.ARROWLEFT_KEY||b==AdfKeyStroke.ARROWRIGHT_KEY?
AdfPivotTableUtils.s:AdfPivotTableUtils.o;if(e==g){if(e=A_nh(d[g],f,h),f==e)return}else e=A_nh(d[g],h?A_oh(a,g)-1:0,h);b=Math.floor(e/2);var h=g?a.b.Lb:a.b.Qb,l;b==h?(l="after",0<h?(b=h-1,f=a.gI):f=g?a.jI:a.iI):A_ph(e)?(l="swap",f=a.iJ):(l="before",f=a.hI);A_xc(a,g,b,l);0<h&&(b=A_mc(a,g,b).getAttribute("title"),f=TrFastMessageFormatUtils.format(f,b));AdfAgent.AGENT.setTextContent(a.b.Qx,f);a.nn=!0;a.UH=c;a.Xj=g;a.Yj=e;a.rr=d}
function A_mh(a,b,c){for(var d=[],e=0;2>e;++e){var f=[];d[e]=f;for(var g=A_oh(a,e),h=0;h<g;++h){var l=Math.floor(h/2);A_ph(h)&&!A_lc(a,e,l)?f[h]=!1:f[h]=e!=b||l!=c&&l!=c+1||A_ph(h)?!0:!1}}return d}function A_ph(a){a/=2;return 0!=a-Math.floor(a)}function A_lh(a){a*=2;++a;return a}function A_oh(a,b){return 2*(b?a.b.Lb:a.b.Qb)+1}function A_nh(a,b,c){var d=a.length;c=c?1:d-1;for(var e=0;e<d;++e)if(b=(b+c)%d,a[b])return b}
function A_Ze(a,b){a.Ak&&(A_Ye(a,!0),a.Ak=!1);if(a.nn){a.nn=!1;A_yc(a);A_zc(a);AdfAgent.AGENT.setTextContent(a.b.Qx,"");var c=a.jg,d=a.mn,e=a.Xj,f=a.Yj;if(b||c==e&&d==f)b&&(a.jn=!1,a.Tq=null);else{var g=A_oh(a,e),d=Math.floor(d/2);f==g-1?1==g?(g=0,f="to"):(g=(e?a.b.Lb:a.b.Qb)-1,f="after"):(g=Math.floor(f/2),f=A_ph(f)?"swap":"before");A_wc(a,c,d,e,g,f);a.jn&&(c=a.Wd(),null!=c&&(e=new AdfCustomEvent(c,"dragDropEnd"),c.queueEvent(e)),a.jn=!1,a.Tq=null)}}}
AdfDhtmlPivotTablePeer.prototype.Wd=function(){var a=this.getComponent().getProperty("modelName");return null!=a&&(a=AdfPage.PAGE.getPageProperty("PAGE_EDGE:"+a),null!=a)?AdfPage.PAGE.findComponent(a):null};
function A_Ee(a,b){AdfFocusUtils.focusElement(a.getDomElement());a.Tq=b;a.jg=b.edge;var c=parseInt(b.layer);a.nn=!0;a.Xj=AdfPivotTableUtils.o;a.mn=A_lh(c);if(a.jg==AdfPivotTableUtils.Hf){a.jn=!0;var d=1==A_oh(a,a.Xj)?"after":"before";a.Yj=0;for(var c=[],e=0;2>e;++e){var f=[];c[e]=f;for(var g=A_oh(a,e),h=0;h<g;++h)f[h]=!0}a.rr=c}else a.jg==AdfPivotTableUtils.o&&0==c?(d="swap",a.Yj=1):(d=1==A_oh(a,a.Xj)?"after":"before",a.Yj=0),a.rr=A_mh(a,a.jg,c);A_xc(a,AdfPivotTableUtils.o,0,d)};