_emh.js 4.1 KB

123456
  1. // Licensed Materials - Property of IBM
  2. // IBM Cognos Products: rs
  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 _emh(_b6k, _h9m, _cpn, _rmm, _sen, _zck){this._vij=_b6k;this._2tl=_h9m;this._gin=_cpn;this._2im=(_rmm!==false);this._24n=_sen;this._zkj=_zck;this._b8a=[];};_emh.prototype._gfj=true;_emh.prototype._pjm=null;_emh.prototype._9zh=false;_emh.prototype._p2g=function(){return this._vij;};_emh.prototype._86g=function(_b6k){this._vij=_b6k;};_emh.prototype._b6g=function(_66e,_46e,_sxi){this._pjm=new _yym( _66e||"Web request failed.", _46e, _sxi );};_emh.prototype._bbb=function(_gi9,_46e,_sxi){this._b6g(self["_frh"]?_frh._c6j(_gi9):null, _46e, _sxi);};_emh.prototype._tjk=function(_5um){this._pjm=_5um;};_emh.prototype._8ik=function(){return this._pjm;};_emh.prototype._ck8=function(_vdn,_uxm){this._b8a.push(_vdn, _uxm);};_emh.prototype._q97=function(_vdn){return this._psk.getResponseHeader(_vdn);};_emh.prototype._kbb=function(_bwf){this._w2f=_bwf;};_emh.prototype._y7b=function(){return this._w2f;};_emh.prototype._ign=function(){if(!_o7g._2l2&&_zpn._70d&&_zpn._70d._pd7){_zpn._70d._pd7(this);}if(this._psk){this._psk=null;}this._9zh=false;_emh._kd8(this);this._psk=_o7g._2l2||(_8qn._852&&self.XMLHttpRequest)?new XMLHttpRequest():new ActiveXObject(_8qn._iw9);try{if(this._24n||this._zkj){this._psk.open(this._2tl, this._gin, this._2im, this._24n, this._zkj);}else{this._psk.open(this._2tl, this._gin, this._2im);}}catch(e){_vzm._ozm( "Error opening _emh request" );this._bbb( "IDS_HAL_WEBREQUEST_SEND_ERROR", "URL: " + this._gin);if(this._vij&&this._vij._996){this._vij._996(this);}return;}if(_o7g._csh){var _7on=this._gin.substr(this._gin.length-".dtd".length);if(_7on==".dtd"){this._psk.overrideMimeType("text/plain");}}for(var i=0;i<this._b8a.length;i+= 2){this._psk.setRequestHeader(this._b8a[i], this._b8a[i+1]);}if(!this._gfj){this._psk.setRequestHeader( "If-Modified-Since", "Thu, 01 Jan 1970 00:00:00 GMT" );}this._psk.onreadystatechange=this._0i6.bind(this);try{this._psk.send(this._w2f||"");}catch(e){_vzm._ozm( "Error sending _emh request" );this._bbb("IDS_HAL_WEBREQUEST_SEND_ERROR");if(this._vij&&this._vij._996){this._vij._996(this);}}};_emh.prototype._ndb=0;_emh.prototype._93d=function(){};_emh.prototype._0i6=function(){if(!this._tok&&(this._psk.readyState==4)){_emh._la5(this);this._psk.onreadystatechange=this._93d;if(!this._ds9()){var _66e=self["_frh"]?_frh._997( "IDS_HAL_WEBREQUEST_ERROR" ):null;var _46e=this._b6j()+" - " + this._9uc() + "\n" +"URL: " + this._0em();var _79e=this._0r9();if(_79e){_46e += "\n\nResponse Text:\n" + _79e;}if(!_o7g._2l2){_zpn._la6("_yym");}this._b6g(_66e, _46e, "");}if(this._ndb){setTimeout(this._2k4.bind(this), this._ndb);return;}this._2k4();}};_emh.prototype._2k4=function(){if(this._tok){return;}if(!this._xh8()){return;}this._9zh=true;this._kt9();if(this._vij&&this._vij._996){this._vij._996(this);}};_emh.prototype._kt9=function(){if(!_o7g._2l2&&_zpn._70d&&_zpn._70d._fy){_zpn._70d._fy(this);}if(this._pjm){_vzm._ozm(this._pjm._3q9()+"\n" + this._pjm._2q9());}};_emh.prototype._xh8=function(){return true;};_emh.prototype._7zm=function(){this._tok=true;_emh._la5(this);if(this._psk){this._psk.abort();this._psk=null;}if(!this._9zh&&this._vij&&this._vij._2c7){this._9zh=true;this._vij._2c7(this);}};_emh.prototype._ds9=function(){var _r0m=this._b6j();return((_r0m>=200)&&(_r0m<300));};_emh.prototype._b6j=function(){return _bnl._ln3(this._psk, "status");};_emh.prototype._9uc=function(){return _bnl._ln3(this._psk, "statusText");};_emh.prototype._0em=function(){return this._gin;};_emh.prototype._0r9=function(){return this._psk.responseText;};_emh.prototype._jqh=function(_8rj){this._gfj=_8rj;};_emh.prototype._lqh=function(_kil){this._6uk=_kil;};_emh.prototype._ynh=function(){return this._6uk;};_emh.prototype._q76=function(){return this._9zh;};_emh._r7a=[];_emh._455=function(){var _aga=this._r7a.concat();for(var i=0;i<_aga.length;i++){var _yal=_aga[i];_yal._vij=null;_yal._7zm();}};_emh._kd8=function(_yal){this._r7a.push(_yal);};_emh._la5=function(_yal){_m0n._bqh(this._r7a, _yal);};_emh._7a7=function(){return(this._r7a.length>0);};