_l57.js 2.7 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 _l57(_7l8){if(_7l8&&_7l8.match(/\d+/)){if(_7l8.match(/^(.*?)(\D\D?)\s*$/)){this._m19=RegExp.$2;this._7r8=new _c88(RegExp.$1);}else{this._7r8=new _c88(_7l8);this._m19="px";}}};_l57.prototype._7r8=null;_l57.prototype._m19="";_l57.prototype._898=function(){return this._m19;};_l57.prototype._jr7=function(){return this._7r8?this._7r8._ms7():"";};_l57.prototype._op8=function(){if(!this._m99){var _wa9=96;if(this._la8){_wa9=132;}else if(this._e87||this._ma8){_wa9=163;}_l57.prototype._m99=_wa9;}return this._m99;};_l57.prototype._ql4=function(){var _wa9=this._op8();switch(this._m19){case "px":return parseInt(this._jr7(), 10);case "pt":return Math.round((_wa9*parseFloat(this._jr7()))/ 70);case "pc":return Math.round((6*(_wa9*parseFloat(this._jr7())))/ 35);case "mm":return Math.round((_wa9*parseFloat(this._jr7()))/ 25.4);case "cm":return Math.round((_wa9*parseFloat(this._jr7()))/ 2.54);case "in":return Math.round(_wa9*parseFloat(this._jr7()));}return NaN;};_l57.prototype._es7=function(_445){this._7r8=new _c88(_445);};_l57.prototype._0a8=function(_n79){this._m19=_n79;};_l57.prototype._fg3=function(_8x8){this._7r8=_8x8;};_l57.prototype._he3=function(){return this._7r8;};_l57.prototype._jh2=function(){return this._7r8?this._7r8._aj2():"";};_l57.prototype._k85=function(){if(!_l57._846){_l57._846={};var _ce6=_l57._846;var _3e6=window["_4l6"]?_4l6:null;if(_3e6){_ce6["px"] = _3e6._m67( "IDS_HAL_CSS_LENGTH_UNIT_PX" );_ce6["pt"] = _3e6._m67( "IDS_HAL_CSS_LENGTH_UNIT_PT" );_ce6["pc"] = _3e6._m67( "IDS_HAL_CSS_LENGTH_UNIT_PC" );_ce6["mm"] = _3e6._m67( "IDS_HAL_CSS_LENGTH_UNIT_MM" );_ce6["cm"] = _3e6._m67( "IDS_HAL_CSS_LENGTH_UNIT_CM" );_ce6["in"] = _3e6._m67( "IDS_HAL_CSS_LENGTH_UNIT_IN" );_ce6["em"] = _3e6._m67( "IDS_HAL_CSS_LENGTH_UNIT_EM" );_ce6["ex"] = _3e6._m67( "IDS_HAL_CSS_LENGTH_UNIT_EX" );_ce6["%"] = _3e6._m67( "IDS_HAL_CSS_LENGTH_UNIT_PERCENT" );}}return _l57._846[this._m19]||this._m19;};_l57.prototype._jw2=function(_fb4,_zq3){var _0w3=this._jh2();if(_fb4){var _hy8=this._7r8._ms7();var i=_hy8.indexOf(".");if(i!=-1){var _868=_hy8.substring(0, i);_868=( _868=="0" )?"":( _868 );var _qn7=_hy8.substr(i);switch(_qn7){case ".25":_0w3=_868+"\u00BC";break;case ".5":_0w3=_868+"\u00BD";break;case ".75":_0w3=_868+"\u00BE";break;}}}return _0w3 +(_zq3?" ":"" ) + this._k85();};_l57.prototype._q75=function(){return this._jr7()+this._m19;};_l57.prototype._704=function(){switch(this._m19){case "%":case "em":case "ex":return false;default:return true;}};