cosmicflows-deployer/assets/js/dynloader.bundle.js

177 lines
4.6 KiB
JavaScript
Raw Normal View History

2024-12-04 06:55:48 +00:00
webpackJsonp([4],{
/***/ 680:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _dynloader = __webpack_require__(681);
var _dynloader2 = _interopRequireDefault(_dynloader);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var scriptList = [];
var scriptMapper = {};
var loaderActive = false;
var loader_id = null;
var real_body = null;
// This cleans up the DOM
function endLoader() {
loader_id.parentNode.replaceChild(loader_id, real_body);
loader_id = null;
}
function beginLoader() {
loader_id = document.createElement('body');
loader_id.classList.add(_dynloader2.default.progressTool);
document.createElement('div');
loader_id.innerHTML = '<div><div></div></div>';
real_body = document.getElementById('main_body');
real_body.parentNode.replaceChild(real_body, loader_id);
}
function runScripts() {
if (scriptList.length == 0) {
endLoader();
return;
}
var name = scriptList[0];
var scr = scriptMapper[name];
if ('data' in scr) {
var e = scr.data.target;
var s = document.createElement('script');
s.innerHTML = e.responseText;
document.documentElement.appendChild(s);
scriptList = scriptList.slice(1);
s.addEventListener('load', runScripts);
}
}
function updateProgressbar(progress) {}
// This function does the queuing and parallel loading of the given script.
function progressLoad(scriptname) {
var req = new XMLHttpRequest();
// Setup the progress event callback
req.addEventListener('progress', function (event) {
if (event.lengthComputable) {
scriptMapper[scriptname].total = event.total;
scriptMapper[scriptname].current = event.loaded;
} else {}
var totalProgress = { total: 0, current: 0 };
for (var k in scriptMapper) {
totalProgress.total += scriptMapper[k].total;
totalProgress.current += scriptMapper[k].current;
}
// Update total progress bar
updateProgressbar(totalProgress);
}, false);
// Now we loaded the script completely.
req.addEventListener('load', function (event) {
// Save the data
scriptMapper[scriptname].data = event;
// If it is the top script then try to execute all of
// them till the queue is empty.
if (scriptList[0] == scriptName) {
runScripts();
}
}, false);
req.open('GET', scriptname);
req.send();
scriptList.push(scriptname);
scriptMapper[scriptname] = { current: 0, total: 0 };
}
// Export it to the global symbol list
window['scriptProgressLoader'] = progressLoad;
/***/ }),
/***/ 681:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var content = __webpack_require__(682);
if (typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = { "hmr": true };
options.transform = transform;
options.insertInto = undefined;
var update = __webpack_require__(184)(content, options);
if (content.locals) module.exports = content.locals;
if (false) {
module.hot.accept("!!../node_modules/css-loader/index.js??ref--10-1!../node_modules/postcss-loader/lib/index.js??ref--10-2!./dynloader.mcss", function () {
var newContent = require("!!../node_modules/css-loader/index.js??ref--10-1!../node_modules/postcss-loader/lib/index.js??ref--10-2!./dynloader.mcss");
if (typeof newContent === 'string') newContent = [[module.id, newContent, '']];
var locals = function (a, b) {
var key,
idx = 0;
for (key in a) {
if (!b || a[key] !== b[key]) return false;
idx++;
}
for (key in b) {
idx--;
}return idx === 0;
}(content.locals, newContent.locals);
if (!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');
update(newContent);
});
module.hot.dispose(function () {
update();
});
}
/***/ }),
/***/ 682:
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(183)(false);
// imports
// module
exports.push([module.i, "#_5zhwv-dynloader-progress_tool {\n position:absolute;\n left:0;\n right:0;\n top:0;\n bottom:0;\n background-color:black;\n}\n\n#_227cc-dynloader-progress_div {\n position:absolute; left:50%; border:1px red dotted;\n top:50%;\n}\n\n#_2dmy7-dynloader-progress_div_div { \n position:relative; left:-50%;\n top:-50%;\n background-color:green;\n text-align:center;\n vertical-align:middle;\n min-width:10em;\n min-height:2em;\n}\n\n", ""]);
// exports
exports.locals = {
"progress_tool": "_5zhwv-dynloader-progress_tool",
"progress_div": "_227cc-dynloader-progress_div",
"progress_div_div": "_2dmy7-dynloader-progress_div_div"
};
/***/ })
},[680]);
//# sourceMappingURL=dynloader.bundle.js.map