halsvg.js 1.2 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. define([],function(){"use strict";var _t0d ={_url:new Map(),_j19:new Map(),_sjj:new Map()};_t0d._0i6=function(_cpn){var _tbl=this._sjj.get(_cpn);if(_tbl.readyState!=4){return;}this._sjj.delete(_cpn);var d=document;var div=d.getElementById("idHalSvg");if(!div){div=d.body.appendChild(d.createElement("DIV"));div.style.display="none";div.id="idHalSvg";}var _men=_tbl.responseText;if(_men==null){console.log( "Failed to load SVG file: " + _cpn );}div.insertAdjacentHTML( "beforeend", _men||"" );this._url.get(_cpn).resolve(true);var _j8i=this._j19.get(_cpn);_j8i.forEach(function(_m0l){ _m0l(); });_j8i.length=0;};_t0d.load=function(_cpn,_wtj,_m0l,_85m){var _0um=this._url.get(_cpn);if(_0um){if(_0um.promise.isPending()){this._j19.get(_cpn).push(_m0l);return;}setTimeout(_m0l, 0);return;}this._j19.set(_cpn, [_m0l]);this._url.set(_cpn, Q.defer());var _tbl=new XMLHttpRequest();this._sjj.set(_cpn, _tbl);_tbl.open("GET", _cpn, true);_tbl.onreadystatechange=this._0i6.bind(this, _cpn);_tbl.send("");};return _t0d;});