123456 |
- // Licensed Materials - Property of IBM
- // IBM Cognos Products: hal
- // (C) Copyright IBM Corp. 2003, 2017.
- // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- if("".trimLeft){String.prototype.F_LTrim=function(){return this.trimLeft();};}else{String.prototype.F_LTrim=function(){return this.replace(/(^\s*)/g, "");};}if("".trimRight){String.prototype.F_RTrim=function(){return this.trimRight();};}else{String.prototype.F_RTrim=function(){return this.replace(/(\s*$)/g, "");};}if("".trim){String.prototype.F_Trim=function(){return this.trim();};}else{String.prototype.F_Trim=function(){return this.replace(/(^\s*)|(\s*$)/g, "");};}String.prototype.F_RemoveNewLines=function(){return this.replace(/[\r\n]/g, "");};String.prototype.F_Truncate=function(_hBZ1,_hDM){if(this.length<=_hBZ1){return this.valueOf();}var b=(_hDM!=false);if(this.F_ContainsSurrogatePairs()){var _hLF1=this.F_CharLength();if(_hLF1>_hBZ1){return this.F_CharSubStr(0, b?_hLF1-3:_hLF1)+(b?"...":"");}return this.valueOf();}return this.substr(0, b?_hBZ1-3:_hBZ1)+(b?"...":"");};String.prototype.F_JScriptEscape=function(){return this.replace( /\\/g, "\\\\" ).replace( /\'/g, "\\'" ).replace( /\"/g, '\\"' ).replace(/\r?\n/g, "\\r\\n");};String.prototype.F_ToXPathString=function(){if(this.indexOf("'")==-1){return("'" + this + "'" );}if(this.indexOf('"')==-1){return('"' + this + '"' );}var a=[];a.push("concat(");var _hLF=this.split("'");for(var i=0;i<_hLF.length;i++){if(a.length>1){a.push(',');}if(i>0){a.push('"\'"');}var _hCI=_hLF[i];if(_hCI){if(this.indexOf('"')==-1){if(a.length>1){a.push(',');}a.push( '"' + _hCI + '"' );}else{var _hMF=_hCI.split("'");for(var j=0;j<_hMF.length;j++){if(a.length>1){a.push(',');}if(_hMF[j]){a.push( "'" + _hMF[j] + "'" );}}}}}a.push(")");return a.join("");};String.prototype.F_XMLEncode=function(){return this.replace( /&/g, "&" ).replace( /</g, "<" ).replace( />/g, ">" ).replace( /'/g, "'" ).replace( /"/g, """ );};String.prototype.F_XMLDecode=function(){return this.replace( /"/g, "\"" ).replace( /'/g, "'" ).replace( />/g, ">" ).replace( /</g, "<" ).replace( /&/g, "&" );};String.prototype.F_HTMLEncode=function(){return this.replace( /&/g, "&" ).replace( /</g, "<" ).replace( />/g, ">" );};String.prototype.F_HTMLAttributeEncode=function(){return this.F_HTMLEncode().replace( /'/g, "'" ).replace( /"/g, """ );};String.prototype.F_RegExpEscape=function(){return this.replace(/([\[\]\^\$\*\+\?\(\)\{\}\|.])/g,function($0){ return "\\" + $0; });};String.prototype.F_PadLeft=function(_hY92,_hFA2){var _h142="";for(var _hI62=_hFA2-this.F_CharLength();_hI62>0;_hI62--){_h142+= _hY92;}return _h142+this;};String.prototype.F_PadRight=function(_hY92,_hFA2){var _h142="";for(var _hI62=_hFA2-this.F_CharLength();_hI62>0;_hI62--){_h142+= _hY92;}return this+_h142;};String.F_ParseFloat=function(s){if(typeof s=="string"){return parseFloat( s.replace( ",", "." ) );}return NaN;};String.prototype.F_ParseFloat=function(){return String.F_ParseFloat(this.valueOf());};String.F_ParseDecimal=function(s){return new C_Decimal(s);};String.prototype.F_ParseDecimal=function(){return String.F_ParseDecimal(this.valueOf());};String.prototype.F_GetChars=function(){if(!this.F_ContainsSurrogatePairs()){return this.split("");}var a=[];for(var i=0;i<this.length;i++){if(this.F_IsHS(i)){a.push(this.charAt(i)+this.charAt(++i));}else if(this.F_IsLS(i)){}else{a.push(this.charAt(i));}}return a;};String.prototype.F_ContainsSurrogatePairs=function(){return Boolean(this.match(/[\uD800-\uDBFF]/));};String.prototype.F_CharLength=function(){if(this.length<2){return this.length;}var a=this.match(/[\uD800-\uDBFF]/g);return a?(this.length-a.length):this.length;};String.F_FromCharCode=function(_hUM1){if(_hUM1>0xFFFF){_hUM1-= 0x10000;return this.fromCharCode(0xD800+(_hUM1 >> 10), 0xDC00+(_hUM1 & 0x3FF));}return this.fromCharCode(_hUM1);};String.prototype.F_CharAt=function(_hTB2){return this.F_GetChars()[_hTB2];};String.prototype.F_CharIndexOf=function(s){var i=this.indexOf(s);return(i==-1)?-1:this.substring(0, i).F_CharLength();};String.prototype.F_LastCharIndexOf=function(s){var i=this.lastIndexOf(s);return(i==-1)?-1:this.substring(0, i).F_CharLength();};String.prototype.F_CharSubStr=function(_hVM1,_hLF1){if(this.F_ContainsSurrogatePairs()){return this.F_GetChars().slice(_hVM1||0, _hLF1).join("");}return this.substr(_hVM1, _hLF1);};String.prototype.F_CharSubString=function(_hVM1,_hLY1){if(this.F_ContainsSurrogatePairs()){var a=this.F_GetChars();_hVM1=_hVM1||0;return a.slice(_hVM1, a.length-(_hLY1||0)).join("");}return this.substring(_hVM1, _hLY1);};String.prototype.F_IsHS=function(i){var _hUB2=this.charCodeAt(i);return((_hUB2>=0xD800)&&(_hUB2<=0xDBFF));};String.prototype.F_IsLS=function(i){var _hUB2=this.charCodeAt(i);return((_hUB2>=0xDC00)&&(_hUB2<=0xDFFF));};Number._hEW=".";Number.F_SetDecimalSymbol=function(s){this._hEW=s;};Number.F_ToLocalizedString=function(v){var f=NaN;switch(typeof v){case "number":f=v;break;case "string":f=parseFloat(v);break;}if(isNaN(f)){return "";}return f.toString().replace(".", Number._hEW);};Number.prototype.F_ToLocalizedString=function(){return Number.F_ToLocalizedString(this.valueOf());};Math.F_NonNeg=function(i){return(i<0)?0:i;};Math.F_NonNaN=function(i){return isNaN(i)?0:i;};Math.F_PointInRect=function(_hJC2,_hB92,_hMY1,_hZS1,_hWM1,_hMF1){return((_hJC2>=_hMY1)&&(_hJC2<=(_hMY1+_hMF1))&&(_hB92>=_hZS1)&&(_hB92<=(_hZS1+_hWM1)));};Math.F_SortNumeric=function(a,b){return a-b;};Array.prototype.F_Top=function(){return(this.length>0)?this[this.length-1]:null;};Array.prototype.F_Clear=function(){this.length=0;};Array.prototype.F_IndicesOf=function(_hVB2){var a=[];var _hBZ1=this.length;for(var i=0;i<_hBZ1;i++){if(this[i]==_hVB2){a.push(i);}}return a;};Array.prototype.F_PushUnique=function(_hVB2){if(this.indexOf(_hVB2)==-1){this.push(_hVB2);return true;}return false;};Array.prototype.F_RemoveItem=function(_hVB2){var i=this.indexOf(_hVB2);if(i!=-1){this.splice(i, 1);}return i!=-1;};Array.prototype.F_IndexOfProperty=function(_h492,_h552){var _hBZ1=this.length;for(var i=0;i<_hBZ1;i++){if(this[i][_h492]==_h552){return i;}}return-1;};Array.prototype.F_Compare=function(a){var _hBZ1=this.length;if(_hBZ1!=a.length){return false;}for(var i=0;i<_hBZ1;i++){if(this[i]!=a[i]){return false;}}return true;};Array.prototype.F_CompareIgnoreOrder=function(a){if(this.length!=a.length){return false;}for(var i=0; i<this.length; i++){if(a.indexOf(this[i])==-1){return false;}}return true;};Array.prototype.F_CreateDictionary=function(_hW81){var o=_hW81?[]:{};var _hBZ1=this.length;for(var i=0;i<_hBZ1;i++){o[this[i]]=true;}return o;};Array.prototype.F_CreateCompareDictionary=function(){var o={};var _hBZ1=this.length;for(var i=0;i<_hBZ1;i++){o[this[i]]=this[i];}return o;};Array.prototype.F_AppendArray=function(a){var _hBZ1=a.length;for(var i=0;i<_hBZ1;i++){this.push(a[i]);}};Array.prototype.F_CallEach=function(_hM12){var args=[];var _hBZ1=arguments.length;for(var i=1; i<_hBZ1;++i){args.push(arguments[i]);}var _hBZ1=this.length;for(var i=0;i<_hBZ1;i++){var o=this[i];var _hNY1=o?o[_hM12]:null;if(_hNY1){_hNY1.apply(o, args);}}};Array.prototype.F_SparseCount=function(){var i=0;for(var s in this){if((String(s >>> 0)==s)&&((s >>> 0)!=0xffffffff)){i++;}}return i;};function _hK8(){_hK8.caller.toString().match(/^function\s([^\(]+)/);window[RegExp.$1].baseConstructor.apply(this, arguments);};Function.prototype.F_Extends=function(_hNF1){function c(){};c.prototype=_hNF1.prototype;this.prototype=new c();this.prototype.constructor=this;this.baseConstructor=_hNF1;this.superClass=_hNF1.prototype;this.prototype.F_ConstructBaseClass=_hK8;};Function.prototype.F_CreateEventMethodCallback=function(_hSB2){var _hBA2=U_DOM.F_CreateArgumentsArray(arguments, 1);var _hNY1=this;return function(e){ var a=_hBA2.concat(); a.unshift(e, this); return _hNY1.apply(_hSB2, a); };};Function.prototype.F_GetFunctionName=function(){return this.toString().match(/^\s*function\s*(\w+)/)[1];};var U_Object={};U_Object.F_IsEmpty=function(o){for(var s in o){return false;}return true;};U_Object.F_ToArray=function(o){var a=[];for(var s in o){a.push(s);}return a;};U_Object.F_ToValueArray=function(o){var a=[];for(var s in o){a.push(o[s]);}return a;};U_Object.F_DictionaryToArray=function(o){var a=[];for(var s in o){if(o[s]){a.push(s);}}return a;};U_Object.F_GetLength=function(o){var i=0;for(var s in o){i++;}return i;};U_Object.F_Copy=function(o){var _hWB2={};for(var s in o){_hWB2[s]=o[s];}return _hWB2;};U_Object.F_TypeOf=function(v){var s=typeof v;if(s=="object"){if(!v){return "null";}if(v instanceof Array){return "array";}}return s;};U_Object.F_Clone=function(o){switch(this.F_TypeOf(o)){case "number":case "string":case "boolean":case "undefined":return o;case "object":var _hE82={};for(var s in o){if(o.hasOwnProperty(s)){_hE82[s]=this.F_Clone(o[s]);}}return _hE82;case "array":var _hF82=[];var _hBZ1=o.length;for(var i=0;i<_hBZ1;i++){_hF82[i]=this.F_Clone(o[i]);}return _hF82;case "function":}};U_Object.F_Subtract=function(o1,o2){var _h1E2=this.F_Copy(o1);for(var s in o2){delete _h1E2[s];}return _h1E2;};U_Object.F_GetClassName=function(o){return o.constructor.F_GetFunctionName();};U_Object.F_Compare=function(o1,o2){if(U_Object.F_GetLength(o1)!=U_Object.F_GetLength(o2)){return false;}for(var _hAP1 in o1){if(typeof o2[_hAP1]==="undefined"){return false;}var _hXB2=o1[_hAP1];var _hYB2=o2[_hAP1];var _hG82=false;switch(typeof o1[_hAP1]){case "object":_hG82=U_Object.F_Compare(_hXB2, _hYB2);break;case "function":_hG82=_hXB2.toString()===_hYB2.toString();break;default:_hG82=_hXB2===_hYB2;break;}if(!_hG82){return false;}}return true;};function C_StringStream(){this._h8F2=[];};C_StringStream.prototype.F_Write=function(s){this._h8F2.push(s);};C_StringStream.prototype.F_WriteStringStream=function(_hR21){this.F_Write(_hR21.F_ToString());};C_StringStream.prototype.F_ToString=function(){return this._h8F2.join("");};C_StringStream.prototype._hTQ=function(){if(!this._hS21){this._hS21={};this._h6D=0;}return this._hS21;};C_StringStream.prototype.F_CreatePlaceHolder=function(s){this._hTQ()[++this._h6D]=this._h8F2.length;this._h8F2.push(s?s:"");return this._h6D;};C_StringStream.prototype.F_WriteToPlaceHolder=function(_hFW,s){this._h8F2[this._hS21[_hFW]]=s;};function C_Decimal(s){s=s.replace( /\s*/g, "" ).replace(",",".");if(s&&(s.match(/^([\+\-]?)0*(\d*?)\.(\d*?)0*$/)||s.match(/^([\+\-]?)0*(\d*?)$/))){var _hT92=RegExp.$1;var _hGW=RegExp.$2;var _hT21=RegExp.$3;if(_hGW||_hT21){var _h552=_hGW?_hGW:"0";if(_hT21){_h552+= "." + _hT21;}_hT92=(_h552=="0")?"":_hT92;this._hOY1=_hT92+_h552;}else{this._hOY1="0";}}};C_Decimal.prototype.F_IsNaN=function(){return !this._hOY1;};C_Decimal.prototype.F_ToLocalizedString=function(){return this._hOY1?this._hOY1.replace( ".", Number._hEW ):"NaN";};C_Decimal.prototype.F_ToString=function(){return this._hOY1?this._hOY1:"";};C_Decimal.prototype.F_ToFloat=function(){return this._hOY1?String.F_ParseFloat(this._hOY1):NaN;};C_Decimal.F_Add=function(_hTE2,_hUE2){return this._hU21(_hTE2, _hUE2, true);};C_Decimal.F_Subtract=function(_hTE2,_hUE2){return this._hU21(_hTE2, _hUE2, false);};C_Decimal._hU21=function(_hTE2,_hUE2,_hLC2){var s1=_hTE2.F_ToString()||"0.0";var s2=_hUE2.F_ToString()||"0.0";var _hUQ=s1.lastIndexOf(".");if(_hUQ==-1){s1+= ".0";_hUQ=1;}else{_hUQ=s1.length-1-_hUQ;}var _hVQ=s2.lastIndexOf(".");if(_hVQ==-1){s2+= ".0";_hVQ=1;}else{_hVQ=s2.length-1-_hVQ;}var _hDI=Math.max(_hUQ, _hVQ);s1=s1.replace( ".", "" );s2=s2.replace( ".", "" );if(_hUQ>_hVQ){s2=s2.F_PadRight("0", s2.length+(_hUQ-_hVQ));}else if(_hVQ>_hUQ){s1=s1.F_PadRight("0", s1.length+(_hVQ-_hUQ));}if(s2.length>s1.length){s1=s1.F_PadLeft("0", s1.length+(s2.length-s1.length));}var a1=s1.split("").reverse();var a2=s2.split("").reverse();var _h242=new Array(a1.length+1);for(var i=0;i<_h242.length;i++){_h242[i]=0;}for(var i=0;i<a1.length;i++){var _hX81=_h242.length-1-i;var n1=parseInt(a1[i]);var n2=parseInt(a2[i]);n2=n2?n2:0;if(_hLC2){var _h342=n1+n2;if((_h342+_h242[_hX81])>9){_h242[_hX81-1]++;_h342-= 10;}_h242[_hX81]+= _h342;}else{var _h342=n1-n2;if(_h342<0){_h242[_hX81-1]--;_h342+= 10;}_h242[_hX81]+= _h342;if(_h242[_hX81]<0){_h242[_hX81-1]--;_h242[_hX81]+= 10;}}}_h242.splice(_h242.length-_hDI, 0, ".");return new C_Decimal(_h242.join(""));};var G_JSON;if(typeof JSON=="undefined"){G_JSON={};G_JSON.parse=function(_hZB2){return eval( "(" + _hZB2 + ")" );};G_JSON.stringify=function(o){var as=[];if(o==null){as.push("null");}else if(o instanceof Array){as.push("[");for(var i=0; i<o.length;++i){if(i>0){as.push(",");}as.push(this.stringify(o[i]));}as.push("]");}else{switch(typeof o){case 'object':as.push("{");var _h082=0;for(var s in o){if(_h082++>0){as.push(",");}as.push('"' + s.replace( /\\/g, "\\\\" ).replace( /\"/g, '\\"' ).replace(/\r?\n/g, "\\r\\n") + '":');as.push(this.stringify(o[s]));}as.push("}");break;case 'string':as.push('"' + o.replace( /\\/g, "\\\\" ).replace( /\"/g, '\\"' ).replace(/\r?\n/g, "\\r\\n") + '"');break;default:as.push(o);break;}}return as.join("");};}else{G_JSON=JSON;}var G_Performance={};G_Performance._hJA=Boolean(window.performance);G_Performance._hPY1={};if(G_Performance._hJA){G_Performance.F_Now=function(){return window.performance.now();};}else{G_Performance.F_Now=function(){return(new Date()).getTime();};}G_Performance.F_PrintLoadTime=function(_h0T1){if(this._hJA){G_Debug.F_Print((_h0T1||"" ) + " Load Time = " + ( ( window.performance.timing.loadEventEnd - window.performance.timing.responseEnd ) / 1000 ) + "s" );}};G_Performance.F_TimeStart=function(s){this._hPY1[s]=this.F_Now();};G_Performance.F_TimeEnd=function(s){var _hQY1=this.F_Now();if(this._hPY1[s]){var _hSN1=(_hQY1-this._hPY1[s]);G_Debug.F_Print( "Time(ms) " + s + ": " + _hSN1 );this._hPY1[s]=null;return _hSN1;}};
|