_tf2.js 5.3 KB

123456
  1. // Licensed Materials - Property of IBM
  2. // IBM Cognos Products: irot
  3. // (C) Copyright IBM Corp. 2003, 2022.
  4. // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  5. function _tf2(_pb6, _435){this._d36=_pb6;this._wu4=_435;this._tg5={};};_tf2.prototype._rm1=null;_tf2.prototype._541=null;_tf2.prototype._vc1=null;_tf2.prototype._bu1=function(_5t3){var _979=_5t3.getAttribute("iid");var _cj8=this._tg5[_979];if(_cj8){return _cj8;}var _7i8=_5t3.selectSingleNode("*");switch(_7i8.nodeName){case "numberFormat":_cj8=_hp8._e89(this._iz());break;case "currencyFormat":_cj8=_hp8._e89(this._wn());break;case "percentFormat":_cj8=_hp8._e89(this._ys());break;} _cj8=this._m44(_cj8, _7i8);this._tg5[_979]=_cj8;return _cj8;};_tf2.prototype._yi=function(_kx7,_0i){var _as6=_kx7.filter(_109._mz2);var _979="";for(var i=0; i<_as6.length; i++){_979 += _as6[i].getAttribute("iid") + "_";}var _cj8=this._tg5[_979]; if(_cj8){return _cj8;}if(_as6.length==0){if(_0i){return this._iz();}return null;}if(_as6.length==1){return this._bu1(_as6[0]);}var _7i8=_as6[0].selectSingleNode("*");var _2y7=[]; _2y7.push(_7i8);for(var i=1; i<_as6.length; i++){var _jj7=_as6[i].selectSingleNode("*");if(_jj7.nodeName==_7i8.nodeName){_2y7.push(_jj7);}}switch(_7i8.nodeName){case "numberFormat":_cj8=_hp8._e89(this._iz());break;case "currencyFormat":_cj8=_hp8._e89(this._wn());break;case "percentFormat":_cj8=_hp8._e89(this._ys());break;} for(i=_2y7.length-1; i>=0; i--){ var _de4=_2y7[i];_cj8=this._m44(_cj8, _de4);}this._tg5[_979]=_cj8;return _cj8;};_tf2.prototype._m44=function(_cj8,_et3){var _yq5=_et3.getAttribute("decimalSize");var _7u2=_et3.getAttribute("decimalDelimiter");var _e79=_et3.getAttribute("sign");var _rc3=_et3.getAttribute("useTrailingSign");var _7y8=_et3.getAttribute("scale");var _ts5=_et3.getAttribute("useGrouping");var _vv3=_et3.getAttribute("groupDelimiter");var _r27=_et3.getAttribute("groupSize");var _t02=_et3.getAttribute("groupSecondarySize");switch(_et3.nodeName){case "numberFormat":if(_7y8){_cj8._4p8=parseInt(_7y8, 10);}break;case "currencyFormat":var _pv3=_et3.getAttribute("currencySymbol");var _if2=_et3.getAttribute("useTrailingSymbol");if(_pv3){if(_cj8._824){_cj8._824=_pv3;_cj8._rh3="";}else{_cj8._824="";_cj8._rh3=_pv3;}}if(_if2=="true"&&!_cj8._rh3){_cj8._rh3=_cj8._824;_cj8._824="";}else if(_if2=="false"&&!_cj8._824){_cj8._824=_cj8._rh3;_cj8._rh3="";}if(_7y8){_cj8._4p8=parseInt(_7y8, 10);}break;case "percentFormat":var _9i4=_et3.getAttribute("percentSymbol");var _955=_et3.getAttribute("percentScale");if(_9i4){_cj8._rh3=_9i4;if(_9i4.indexOf("\u2030")>=0){_cj8._4p8=3;}}if(_955){_cj8._4p8=parseInt(_955, 10)+_cj8._4p8;}if(_7y8){_cj8._4p8=parseInt(_7y8, 10)+_cj8._4p8;}break;}if(_yq5){_cj8._zj2=parseInt(_yq5, 10);}if(_7u2){_cj8._2k2=_7u2;}if(_e79){if(_e79=="()"){_cj8._y01="(";_cj8._ju=")";}else if(_cj8._y01){_cj8._y01=_e79;_cj8._ju="";}else{_cj8._y01="";_cj8._ju=_e79;}}if(_rc3=="true"&&!_cj8._ju){_cj8._ju=_cj8._y01;_cj8._y01="";}else if(_rc3=="false"&&!_cj8._y01){_cj8._y01=_cj8._ju;_cj8._ju="";}if(_ts5=="false"){delete _cj8._oh3;_cj8._za5=false;}else if((_ts5=="true"||_cj8._za5)&&_vv3){_cj8._oh3=_vv3;}if(_r27){_cj8._0k2=parseInt(_r27, 10);_cj8._6t1=_cj8._0k2;}if(_t02){_cj8._6t1=parseInt(_t02, 10);} return _cj8;};_tf2.prototype._q8=function(_cj8,_278,_378,_478){var _qq3=(_278.indexOf('\u0661')===-1);if(_278.match((_qq3?/1(.+)1/:/\u0661(.+)\u0661/))){_cj8._2k2=RegExp.$1;}if(!_378.match((_qq3?/1(.+)1/:/\u0661(.+)\u0661/))){_cj8._zj2=0;}else if(_478.match((_qq3?/[^0](0+)/:/[^\u0660](\u0660+)/))){_cj8._zj2=RegExp.$1.length;}if(_478.match((_qq3?/.*?(1+)([^1]+)(1+)[^1]*$/:/.*?(\u0661+)([^\u0661]+)(\u0661+)[^\u0661]*$/))){_cj8._za5=true;_cj8._oh3=RegExp.$2;_cj8._0k2=RegExp.$3.length;_cj8._6t1=RegExp.$1.length;}};_tf2.prototype._iz=function(){if(!this._rm1){var _cj8=new _v65();if(this._wu4){_cj8._q61(this._wu4);}else if(this._d36){var nl=this._d36.selectNodes("span");var _278=nl.item(0).text;var _378=nl.item(1).text;var _478=nl.item(2).text;var _578=nl.item(3).text;this._q8(_cj8, _278, _378, _478);var _qq3=(_278.indexOf('\u0661')===-1);if(_578.match((_qq3?/^([^1]*)1([^1]*)$/:/^([^\u0661]*)\u0661([^\u0661]*)$/))){_cj8._y01=RegExp.$1;_cj8._ju=RegExp.$2;}}this._rm1=_cj8;}return this._rm1;};_tf2.prototype._wn=function(){if(!this._541){var _cj8=new _v65();if(this._wu4){_cj8._7z(this._wu4);}else if(this._d36){var nl=this._d36.selectNodes("span");var _278=nl.item(4).text;var _378=nl.item(5).text;var _478=nl.item(6).text;var _578=nl.item(7).text;var _678=nl.item(8).text;this._q8(_cj8, _278, _378, _478);var _qq3=(_278.indexOf('\u0661')===-1);if(_578.match((_qq3?/^([^1]*?)\$1([^1]*)$/:/^([^\u0661]*?)\$\u0661([^\u0661]*)$/))){_cj8._y01=RegExp.$1;_cj8._ju=RegExp.$2;}if(_678.match((_qq3?/([^1]*)1([^1]*)/:/([^\u0661]*)\u0661([^\u0661]*)/))){_cj8._824=RegExp.$1;_cj8._rh3=RegExp.$2;}}this._541=_cj8;}return this._541;};_tf2.prototype._ys=function(){if(!this._vc1){var _cj8=new _v65();if(this._wu4){_cj8._mn(this._wu4);} else if(this._d36){var nl=this._d36.selectNodes("span");var _278=nl.item(9).text;var _378=nl.item(10).text;var _478=nl.item(11).text;var _578=nl.item(12).text;this._q8(_cj8, _278, _378, _478);var _qq3=(_278.indexOf('\u0661')===-1);if(_578.match(_qq3?/^([^1]*?)1\%([^1]*)$/:/^([^\u0661]*?)\u0661\%([^\u0661]*)$/)){_cj8._y01=RegExp.$1;_cj8._ju=RegExp.$2;}_cj8._rh3="%";_cj8._4p8=2;}this._vc1=_cj8;}return this._vc1;};