function A_Df(a,b){if(!a.fa&&!a.fe&&a.Ma!=AdfDhtmlPivotTablePeer.va){var c=A_Ze(a);if(c!=A_a&&(c!=A_&&""!=c)&&!a.jn){var c=A_2e(a,b)[1],d;if(d=c==A_)if(d=b!=A_){a:{d=b;for(var e=a.getDomElement();d&&1==d.nodeType;){if(d==e){d=A_b;break a}d=d.parentNode}d=A_c}d=!d}!d&&c!=a.L&&(a.jn=A_b,a.ij=A_c,a.Tv||(a.Tv=a.createCallback(a.km)),AdfAgent.AGENT.getDomWindow().setTimeout(a.Tv,300),a.ig=A_b)}}}
AdfDhtmlPivotTablePeer.prototype.km=function(a){this.Ma==AdfDhtmlPivotTablePeer.va?this.ig&&(this.ig=A_):(this.ij==A_c?(a==A_a&&(a=A_Ye(this)),a&&(this.fd=this.L,A_gf(this,A_,this.L,this.Kj),this.L=A_),A_Bf(this,A_,a),this.zd=this.Dj=A_):this.ig=A_,this.Qe=this.jn=A_c)};
function A_zf(a,b,c){var d=A_9f(a,b),e=AdfAgent.AGENT.getIntAttribute(d,"_startRow")<a.b.o[1]?0:1,f=AdfAgent.AGENT.getIntAttribute(d,"_startCol")<a.b.o[0]?0:1;b=b.parentNode.rowIndex;a:{for(var f=a.b.N[e][f],g=f.length,h=0;h<g;h++)for(var l=f[h],m=l.length,n=0;n<m;n++)if(l[n]==d){d=h;break a}d=-1}f=a.b.Ga[e][d].childNodes[0].rows[b].cells[0];f.parentNode.zc=f.offsetHeight+c;A_pf(a,A_c,e,d,f,b,c,A_b)}function A_Ze(a){return a.getComponent().getProperty(AdfRichPivotTable.Xc)}
function A_Bf(a,b,c){var d=a.getComponent(),e=d.getProperty(AdfRichPivotTable.Xc);d.setProperty(AdfRichPivotTable.Xc,b,A_c,AdfUIComponent.PROPAGATE_ALWAYS);d.setProperty("activeCellKey",b,A_c,AdfUIComponent.PROPAGATE_ALWAYS);c!=A_a&&c?a.Rj():A__f(a,b,e,a.zd,a.Sm)?a.Rm=e:(d.setProperty(AdfRichPivotTable.Xc,e,A_c,AdfUIComponent.PROPAGATE_ALWAYS),d.setProperty("activeCellKey",e,A_c,AdfUIComponent.PROPAGATE_ALWAYS),A_og(a,e),A_pg(a),A_Xg(a),a.ig=A_)}
function A__f(a,b,c,d,e){var f=a.getComponent();c=new A_ah(f,b,c,d,e);d=a.xm();c.xm=d;c.setPartial(A_b);f.queueEvent(c);f=c.isCanceled();f||(A_nf(a,AdfDhtmlPivotTablePeer.va),a.Id=A_,b!=A_?(a.Cq=A_c,a.vx=b):a.vx=A_);return f?A_:c}
AdfDhtmlPivotTablePeer.prototype.Rj=function(a){var b=this.L;if(b){A_Xg(this);var c=A_tf(this,b);if("TD"==b.tagName){var d=A_df(this,b);A_bh(this,d,b,c)}if(0<c.length){var e;this.er?(e=c[c.length-1],this.er=A_c):e=c[0];A_jf(e);b=AdfAgent.AGENT.getPlatform()==AdfAgent.IE_PLATFORM;if("INPUT"==e.tagName&&"text"==e.type||"TEXTAREA"==e.tagName)b&&e.focus(),this.enableUserSelect(),b&&a?setTimeout(function(){e.select()},0):e.select()}else A_jf(this.getDomElement())}else A_jf(this.getDomElement())};
function A_7e(a,b){b!=A_&&b.cancel();a.ij=A_c;a.km()}function A_Sf(a){if(a.Ma!=AdfDhtmlPivotTablePeer.va&&!a.fa&&!a.fe){var b=a.v;if(b!=A_&&A_Ef(b)==AdfPivotTableUtils.D){var c=A_n(b),c=A_Za(a,c);if(0<c.length&&(c=c[0],c!=A_&&(c.id||A_Ye(a))&&a.L!=c)){a.L=c;a.zd=c.parentNode.offsetHeight;var d=A_a;if(A_Ye(a)&&(d=A_yf(a,c,c))){var e=a.zd;a.zd=c.parentNode.offsetHeight;var f=a.zd-e;0!=f&&A_zf(a,c,f);A_gf(a,c,c,e)}e=A_9f(a,c);f=A_;e&&(f=A_7g(c,e),A_0f(a,b),A_Bf(a,f,d))}}}}
function A_gf(a,b,c,d){if(!(a.fd==A_||a.fd.parentNode==A_)){var e=A_xf(a,a.fd),f=e.ba;f!=A_&&f instanceof AdfRichInputText&&(e.element.getAttribute("_afrCellDirty")!=A_?A_ch(f,A_b):f.setProperty("readOnly",A_b,A_c,AdfUIComponent.Po),e=-1,b!=A_&&(e=A_Af(a,b).row),e!=a.Dj&&(b=a.Kj-a.fd.parentNode.offsetHeight,0!=b&&A_zf(a,a.fd,b),a.Kj=d,-1!=e&&(a.Dj=e)),a.fd=c)}}function A_Xg(a){if(a.Jq){var b=a.L.parentNode.offsetHeight-a.Jq;b&&(A_zf(a,a.L,b),a.Jq=A_)}}
function A_Gf(a,b,c){if(c==b)return A_;var d=b.getAttribute("id");return d!=A_&&(d=AdfPage.PAGE.findComponent(d),d!=A_&&d instanceof AdfRichInputText)?d:A_Gf(a,b.parentNode,c)}
function A_xf(a,b){var c=AdfAgent.AGENT.getDomDocument();if(c.evaluate)for(var c=c.evaluate(".//span[@id]",b,A_,XPathResult.ANY_TYPE,A_),d=c.iterateNext();d;){if(!d.disabled&&A_5g(a,d,b)){var e=AdfPage.PAGE.findComponent(d.id);if(e!=A_&&e instanceof AdfRichInputText)return{ba:e,element:d}}d=c.iterateNext()}else for(var c=b.getElementsByTagName("*"),f=c.length,g=0;g<f;g++)if(d=c[g],"SPAN"==d.tagName&&(d.id&&!d.disabled&&A_5g(a,d,b))&&(e=AdfPage.PAGE.findComponent(d.id),e!=A_&&e instanceof AdfRichInputText))return{ba:e,
element:d};return{ba:A_,element:A_}}function A_yf(a,b,c){b=A_Gf(a,b,c);b==A_&&(b=A_xf(a,c).ba);if(b!=A_){c=c.getAttribute("_ros");if(c==A_||-1==c.indexOf(b.getClientId())){a.Ix=A_b;try{A_ch(b,A_c),b.setProperty("readOnly",A_c,A_c,AdfUIComponent.Po)}finally{a.Ix=A_c}a.or==A_a&&(a.or=a.HG.bind(a));b.removeEventListener(AdfValueChangeEvent.VALUE_CHANGE_TYPE,a.or);b.addEventListener(AdfValueChangeEvent.VALUE_CHANGE_TYPE,a.or)}return A_b}return A_c}
AdfDhtmlPivotTablePeer.prototype.HG=function(a){var b=a.getSource(),c=AdfRichUIPeer.getDomElementForComponent(b);a.getOldValue()==A_&&c.getAttribute("_afrOldValue")==a.getNewValue()||(b.setProperty("readOnly",A_c,A_c,AdfUIComponent.Po),c.setAttribute("_afrCellDirty",A_b),A_ch(b,A_b),this.aq=A_b)};
AdfDhtmlPivotTablePeer.js=function(a,b){if("readOnly"==a.getPropertyName()){var c=AdfPage.PAGE.findComponent(b).getPeer();if(!c.Ix){var d=a.getSource(),e=AdfRichUIPeer.getDomElementForComponent(d),c=A_2e(c,e);if(c!=A_)if(c=c[1],e=c.getAttribute("_ros"),d=d.getClientId(),"true"==a.getNewValue())e==A_?c.setAttribute("_ros",d):c.setAttribute("_ros",e+" "+d);else if("false"==a.getNewValue()&&e!=A_){var f=e.indexOf(d);if(0==f&&-1==e.trim().indexOf(" "))c.removeAttribute("_ros");else{var g="";0<f&&(g+=
e.substring(0,f));f+d.length+1<g.length&&(g+=substring(f+d.length+1));c.setAttribute("_ros",g)}}}}};A_h("AdfDhtmlPivotTablePeer.handlePropertyChange",AdfDhtmlPivotTablePeer.js);
function A_ch(a,b){var c=AdfRichUIPeer.getDomElementForComponent(a);if(b)AdfDomUtils.ja(c,"p_AFClickToEdit")&&AdfDomUtils.S(c,"p_AFClickToEdit"),AdfDomUtils.sa(c,"p_AFReadOnly"),c.firstChild&&"INPUT"==c.firstChild.tagName&&(c.firstChild.setAttribute("readOnly","true"),c.firstChild.style.minHeight="inherit");else{AdfDomUtils.ja(c,"p_AFReadOnly")&&AdfDomUtils.S(c,"p_AFReadOnly");AdfDomUtils.sa(c,"p_AFClickToEdit");c.firstChild&&"INPUT"==c.firstChild.tagName&&c.firstChild.removeAttribute("readOnly");
var d=c.textContent;c.getAttribute("_afrOldValue")!=d&&c.setAttribute("_afrOldValue",d)}}AdfDhtmlPivotTablePeer.BB=function(a,b,c){a=AdfPage.PAGE.findComponent(a).getPeer();b=A_m(b,c);A_zg(a.b);A_1(a,b);A_0f(a,b);A_Sf(a)};A_h("AdfDhtmlPivotTablePeer.HandleInvalidCells",AdfDhtmlPivotTablePeer.BB);
AdfDhtmlPivotTablePeer.prototype.vG=function(a){this.Id==A_&&this.L!=A_&&(a.isBusy()?(this.fg=A_b,a=A_xf(this,this.L).ba,A_ch(a,A_b),A_1e(this,A_b,{dataCells:[]})):(this.fg=A_c,A_Ff(this,this.v)!=this.L?A_Sf(this):(A_yf(this,this.L,this.L),this.Rj(A_b))))};AdfDhtmlPivotTablePeer.prototype.xm=function(){if(!this.aq&&this.fd!=A_&&this.getDomElement().contains(this.fd)){var a=A_tf(this,this.fd);if(0<a.length){var b=a[0].pb,a=a[0].value;return b!=A_&&b!=a}}return A_b};